[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.

This commit is contained in:
2026-03-07 14:08:42 +00:00
parent 35c30bc39a
commit d1b77fd2f6
415 changed files with 24100 additions and 13301 deletions

View File

@@ -0,0 +1,40 @@
import sys
import os
import requests
from dotenv import load_dotenv
# Ensure we use the correct config and client
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'connector-superoffice')))
from superoffice_client import SuperOfficeClient
def cleanup():
print("🧹 Cleaning up Test Data...")
client = SuperOfficeClient()
if not client.access_token:
print("❌ Auth failed.")
return
# Objects to delete (Reverse order of dependency)
to_delete = [
("Sale", 342539),
("Appointment", 993350),
("Appointment", 993347),
("Person", 193092),
("Contact", 171185) # Attempting to delete the company too
]
for entity_type, entity_id in to_delete:
print(f"🗑️ Deleting {entity_type} {entity_id}...")
try:
# SuperOffice DELETE usually returns 204 No Content
# Our client returns None on success if response body is empty, or the JSON if not.
# We need to catch exceptions if it fails.
resp = client._delete(f"{entity_type}/{entity_id}")
print(f"✅ Deleted {entity_type} {entity_id}")
except Exception as e:
print(f"⚠️ Failed to delete {entity_type} {entity_id}: {e}")
if __name__ == "__main__":
cleanup()