diff --git a/backend/__pycache__/__init__.cpython-313.pyc b/backend/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..15311dc53ac77335cd5a296c5cebf49330817e63 Binary files /dev/null and b/backend/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/__pycache__/__init__.cpython-39.pyc b/backend/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..13bfa3d48057dc16f3cabeed1ef0538d32a388fb Binary files /dev/null and b/backend/__pycache__/__init__.cpython-39.pyc differ diff --git a/backend/__pycache__/config.cpython-313.pyc b/backend/__pycache__/config.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c51210b91df5c0bbc02e40b83beb151583acb252 Binary files /dev/null and b/backend/__pycache__/config.cpython-313.pyc differ diff --git a/backend/__pycache__/config.cpython-39.pyc b/backend/__pycache__/config.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0624c83c449332767edcfe0319591af6eb4d759c Binary files /dev/null and b/backend/__pycache__/config.cpython-39.pyc differ diff --git a/backend/__pycache__/main.cpython-313.pyc b/backend/__pycache__/main.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dfffa0b9a920c50958c12503bc7d3b5b02a244d7 Binary files /dev/null and b/backend/__pycache__/main.cpython-313.pyc differ diff --git a/backend/__pycache__/main.cpython-39.pyc b/backend/__pycache__/main.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..418a4d2624b72ee0c3f78df6d35f2548316fab4e Binary files /dev/null and b/backend/__pycache__/main.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/__init__.cpython-313.pyc b/backend/ai/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c4059636a0e0cb9da1a2f9f080a1397680bd74b Binary files /dev/null and b/backend/ai/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/__init__.cpython-39.pyc b/backend/ai/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..14cb43c22bf8851bf9dd56573ab0c32b8ba09b02 Binary files /dev/null and b/backend/ai/__pycache__/__init__.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/analyzer.cpython-313.pyc b/backend/ai/__pycache__/analyzer.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7ef917923dd0c53fd6a3036683186856d7141080 Binary files /dev/null and b/backend/ai/__pycache__/analyzer.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/analyzer.cpython-39.pyc b/backend/ai/__pycache__/analyzer.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51e4d4ec81513298cd83fb6d6f1856ec6929fddd Binary files /dev/null and b/backend/ai/__pycache__/analyzer.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/classifier.cpython-313.pyc b/backend/ai/__pycache__/classifier.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3924e1e454d57ee0592b2135993879e8caed1a1d Binary files /dev/null and b/backend/ai/__pycache__/classifier.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/classifier.cpython-39.pyc b/backend/ai/__pycache__/classifier.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fafcc17c9acd3ce889537ae65f1de29f4c6edb5c Binary files /dev/null and b/backend/ai/__pycache__/classifier.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/client.cpython-313.pyc b/backend/ai/__pycache__/client.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fbf306da17b7ad656fab554af3881957aa8973a6 Binary files /dev/null and b/backend/ai/__pycache__/client.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/client.cpython-39.pyc b/backend/ai/__pycache__/client.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2acbef2cc1ef2ee8f82d05c41c3c349f7a5ae567 Binary files /dev/null and b/backend/ai/__pycache__/client.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/composer.cpython-313.pyc b/backend/ai/__pycache__/composer.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b24330ad2b8aa100be3bfca8d39180cec05d63fd Binary files /dev/null and b/backend/ai/__pycache__/composer.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/composer.cpython-39.pyc b/backend/ai/__pycache__/composer.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c51f4f1916d284cfa8c02b094e4bea556182ce35 Binary files /dev/null and b/backend/ai/__pycache__/composer.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/extractor.cpython-313.pyc b/backend/ai/__pycache__/extractor.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f5c2f89561de545174c25294360cf00acb1d8b01 Binary files /dev/null and b/backend/ai/__pycache__/extractor.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/extractor.cpython-39.pyc b/backend/ai/__pycache__/extractor.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3e1a8bbd8cd84665aa78d120b18f3f6b736fab3b Binary files /dev/null and b/backend/ai/__pycache__/extractor.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/prompts.cpython-313.pyc b/backend/ai/__pycache__/prompts.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5bbfea87e332ae013863b5dda45022c9a5749278 Binary files /dev/null and b/backend/ai/__pycache__/prompts.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/prompts.cpython-39.pyc b/backend/ai/__pycache__/prompts.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9b294288ea99db8d77839b48b2b00f8973cf4f9c Binary files /dev/null and b/backend/ai/__pycache__/prompts.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/workflow_builder.cpython-313.pyc b/backend/ai/__pycache__/workflow_builder.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd6ba5ead4f1c9265655fbe5a0e5a7398ce399fe Binary files /dev/null and b/backend/ai/__pycache__/workflow_builder.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/workflow_builder.cpython-39.pyc b/backend/ai/__pycache__/workflow_builder.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..850e6bf0443803616b8e58cd0c496a92a73f7e00 Binary files /dev/null and b/backend/ai/__pycache__/workflow_builder.cpython-39.pyc differ diff --git a/backend/ai/__pycache__/workflow_suggester.cpython-313.pyc b/backend/ai/__pycache__/workflow_suggester.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..72f98da977be926607d1bbf58f0dad3edf617dce Binary files /dev/null and b/backend/ai/__pycache__/workflow_suggester.cpython-313.pyc differ diff --git a/backend/ai/__pycache__/workflow_suggester.cpython-39.pyc b/backend/ai/__pycache__/workflow_suggester.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dfea56137bf93256899444ec5f4d0243913ce63c Binary files /dev/null and b/backend/ai/__pycache__/workflow_suggester.cpython-39.pyc differ diff --git a/backend/api/__pycache__/__init__.cpython-313.pyc b/backend/api/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e1f402bcefb2b2015bf0722566e01c5aa1e95684 Binary files /dev/null and b/backend/api/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/api/__pycache__/__init__.cpython-39.pyc b/backend/api/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..35021f29740d4894e8e642842070d8a9d2c93580 Binary files /dev/null and b/backend/api/__pycache__/__init__.cpython-39.pyc differ diff --git a/backend/api/__pycache__/routes.cpython-313.pyc b/backend/api/__pycache__/routes.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8499871ecafa5560336db2d9a19d21d69d781c58 Binary files /dev/null and b/backend/api/__pycache__/routes.cpython-313.pyc differ diff --git a/backend/api/__pycache__/routes.cpython-313.pyc.2295725586400 b/backend/api/__pycache__/routes.cpython-313.pyc.2295725586400 new file mode 100644 index 0000000000000000000000000000000000000000..fd089adcde64be4d0a34f01505de7926ea71fe39 Binary files /dev/null and b/backend/api/__pycache__/routes.cpython-313.pyc.2295725586400 differ diff --git a/backend/api/__pycache__/routes.cpython-313.pyc.2509634041824 b/backend/api/__pycache__/routes.cpython-313.pyc.2509634041824 new file mode 100644 index 0000000000000000000000000000000000000000..fd089adcde64be4d0a34f01505de7926ea71fe39 Binary files /dev/null and b/backend/api/__pycache__/routes.cpython-313.pyc.2509634041824 differ diff --git a/backend/api/__pycache__/routes.cpython-39.pyc b/backend/api/__pycache__/routes.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e52757cf58a11cc7ea0a9445980f413378c9cf44 Binary files /dev/null and b/backend/api/__pycache__/routes.cpython-39.pyc differ diff --git a/backend/api/routes.py b/backend/api/routes.py index 78fe95f3f94939c467130543e3ed75be2bdb8e01..204cdd6777327d0afb6ff6793793a11758253479 100644 --- a/backend/api/routes.py +++ b/backend/api/routes.py @@ -92,6 +92,12 @@ def upload_data(request: FileUploadRequest) -> FileUploadResponse: return FileUploadResponse(file=record) +@router.post("/reset") +def reset_data() -> dict[str, str]: + db.reset() + return {"status": "ok", "message": "In-memory data reset."} + + @router.get("/status", response_model=OwnerStatusResponse) def status(owner_id: str) -> OwnerStatusResponse: owner = db.get_owner(owner_id) diff --git a/backend/engine/__pycache__/__init__.cpython-313.pyc b/backend/engine/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..06b33eb626a6c1fc8de3e8e6423e2165e13f1d9b Binary files /dev/null and b/backend/engine/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/engine/__pycache__/__init__.cpython-39.pyc b/backend/engine/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98238f9fd3e9f477e20e9ed9bf6e85bf6e952046 Binary files /dev/null and b/backend/engine/__pycache__/__init__.cpython-39.pyc differ diff --git a/backend/engine/__pycache__/compiler.cpython-313.pyc b/backend/engine/__pycache__/compiler.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..25010c84a9af66b9bcd3c4c9919e5de7b76275ba Binary files /dev/null and b/backend/engine/__pycache__/compiler.cpython-313.pyc differ diff --git a/backend/engine/__pycache__/compiler.cpython-39.pyc b/backend/engine/__pycache__/compiler.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..509cbaa6f9bd18190d57e2cbe3df920382ae213a Binary files /dev/null and b/backend/engine/__pycache__/compiler.cpython-39.pyc differ diff --git a/backend/engine/__pycache__/executor.cpython-313.pyc b/backend/engine/__pycache__/executor.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8cc49f34638e75f1dc7faec9072f49913936f48c Binary files /dev/null and b/backend/engine/__pycache__/executor.cpython-313.pyc differ diff --git a/backend/engine/__pycache__/executor.cpython-39.pyc b/backend/engine/__pycache__/executor.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b9bfd78b1a640056cf8a21a4413c091fecb10f0 Binary files /dev/null and b/backend/engine/__pycache__/executor.cpython-39.pyc differ diff --git a/backend/engine/__pycache__/primitives.cpython-313.pyc b/backend/engine/__pycache__/primitives.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..22923294f10cce29e11dcf6b05cf949b16927ca5 Binary files /dev/null and b/backend/engine/__pycache__/primitives.cpython-313.pyc differ diff --git a/backend/engine/__pycache__/primitives.cpython-39.pyc b/backend/engine/__pycache__/primitives.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c61ca8b9790c7c935f8ea0b10b465b484005583 Binary files /dev/null and b/backend/engine/__pycache__/primitives.cpython-39.pyc differ diff --git a/backend/engine/__pycache__/validator.cpython-313.pyc b/backend/engine/__pycache__/validator.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9277bae41d94ecde55f4401b183f2930567dd668 Binary files /dev/null and b/backend/engine/__pycache__/validator.cpython-313.pyc differ diff --git a/backend/engine/__pycache__/validator.cpython-39.pyc b/backend/engine/__pycache__/validator.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..defe099c2e27b95bc8b022b22e79afea5b9aabc1 Binary files /dev/null and b/backend/engine/__pycache__/validator.cpython-39.pyc differ diff --git a/backend/integrations/__pycache__/__init__.cpython-313.pyc b/backend/integrations/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e26c0690f7642cd00aa2640dc78d9d6db43a96a9 Binary files /dev/null and b/backend/integrations/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/integrations/__pycache__/__init__.cpython-39.pyc b/backend/integrations/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3b60e5dcf38e983059d5ba6443e1a446b39e21f8 Binary files /dev/null and b/backend/integrations/__pycache__/__init__.cpython-39.pyc differ diff --git a/backend/integrations/__pycache__/file_parser.cpython-313.pyc b/backend/integrations/__pycache__/file_parser.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c088aea5dd72a1c26387a67a18634c507fe24fb6 Binary files /dev/null and b/backend/integrations/__pycache__/file_parser.cpython-313.pyc differ diff --git a/backend/integrations/__pycache__/file_parser.cpython-39.pyc b/backend/integrations/__pycache__/file_parser.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d45a7e8e0d1ea4bfe03dc63df75e5d15cc874e3f Binary files /dev/null and b/backend/integrations/__pycache__/file_parser.cpython-39.pyc differ diff --git a/backend/models/__pycache__/__init__.cpython-313.pyc b/backend/models/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..da124a88bfe3b7bd60dea3040eceba9cc2e9f714 Binary files /dev/null and b/backend/models/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/models/__pycache__/__init__.cpython-39.pyc b/backend/models/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fb634945eb3bf5973945c1ba16956d8d17d38910 Binary files /dev/null and b/backend/models/__pycache__/__init__.cpython-39.pyc differ diff --git a/backend/models/__pycache__/schemas.cpython-313.pyc b/backend/models/__pycache__/schemas.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a9c8e8979548933c1611359e3a0ba8fed27be2af Binary files /dev/null and b/backend/models/__pycache__/schemas.cpython-313.pyc differ diff --git a/backend/models/__pycache__/schemas.cpython-39.pyc b/backend/models/__pycache__/schemas.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b918e19b13c5509cb3c14d4ad27682230a5191b6 Binary files /dev/null and b/backend/models/__pycache__/schemas.cpython-39.pyc differ diff --git a/backend/models/__pycache__/workflow_schema.cpython-313.pyc b/backend/models/__pycache__/workflow_schema.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..011bfdd6fd26917508eb53a5a985ce32b1a9afb4 Binary files /dev/null and b/backend/models/__pycache__/workflow_schema.cpython-313.pyc differ diff --git a/backend/models/__pycache__/workflow_schema.cpython-39.pyc b/backend/models/__pycache__/workflow_schema.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9184dc3d3ebbfdf03615842bbbb3e3041a29a539 Binary files /dev/null and b/backend/models/__pycache__/workflow_schema.cpython-39.pyc differ diff --git a/backend/storage/__pycache__/__init__.cpython-313.pyc b/backend/storage/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..db2d29ac13566612d67b0d4d338f421db7c86f94 Binary files /dev/null and b/backend/storage/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/storage/__pycache__/__init__.cpython-39.pyc b/backend/storage/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bc357aa320dfd0075673660d94e39b85bd779b68 Binary files /dev/null and b/backend/storage/__pycache__/__init__.cpython-39.pyc differ diff --git a/backend/storage/__pycache__/database.cpython-313.pyc b/backend/storage/__pycache__/database.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..10a04409ef7b529ec4db1904874c1b4f63d57d6d Binary files /dev/null and b/backend/storage/__pycache__/database.cpython-313.pyc differ diff --git a/backend/storage/__pycache__/database.cpython-313.pyc.2295758187504 b/backend/storage/__pycache__/database.cpython-313.pyc.2295758187504 new file mode 100644 index 0000000000000000000000000000000000000000..29b2de8a95d281e60422dcaee3b259bed931eca3 Binary files /dev/null and b/backend/storage/__pycache__/database.cpython-313.pyc.2295758187504 differ diff --git a/backend/storage/__pycache__/database.cpython-313.pyc.2509666331952 b/backend/storage/__pycache__/database.cpython-313.pyc.2509666331952 new file mode 100644 index 0000000000000000000000000000000000000000..29b2de8a95d281e60422dcaee3b259bed931eca3 Binary files /dev/null and b/backend/storage/__pycache__/database.cpython-313.pyc.2509666331952 differ diff --git a/backend/storage/__pycache__/database.cpython-39.pyc b/backend/storage/__pycache__/database.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8849cdac2d347415605c20c275c7e883e5e46d72 Binary files /dev/null and b/backend/storage/__pycache__/database.cpython-39.pyc differ diff --git a/backend/storage/__pycache__/migrations.cpython-313.pyc b/backend/storage/__pycache__/migrations.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd3b8cacb0123e3d6759d717655f231aa9c70c97 Binary files /dev/null and b/backend/storage/__pycache__/migrations.cpython-313.pyc differ diff --git a/backend/storage/__pycache__/migrations.cpython-39.pyc b/backend/storage/__pycache__/migrations.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c9046373802c672b59429c40b925ee2e4da3811 Binary files /dev/null and b/backend/storage/__pycache__/migrations.cpython-39.pyc differ diff --git a/backend/storage/database.py b/backend/storage/database.py index b13c97ff53312634a0d42a90e58dc9274aa1eee3..ea0647ba4f8614601118dbc51d8db2f686212c10 100644 --- a/backend/storage/database.py +++ b/backend/storage/database.py @@ -1,12 +1,15 @@ from __future__ import annotations from copy import deepcopy -from datetime import UTC, datetime +from datetime import datetime, timezone from uuid import uuid4 class InMemoryDatabase: def __init__(self) -> None: + self.reset() + + def reset(self) -> None: self.owners: dict[str, dict] = {} self.workflows: dict[str, list[dict]] = {} self.data_files: dict[str, list[dict]] = {} @@ -27,7 +30,7 @@ class InMemoryDatabase: "spreadsheet_id": "demo-sheet", "spreadsheet_config": {"connected": True, "inventory_sheet": "Inventory", "orders_sheet": "Orders"}, "preferred_tone": "friendly", - "created_at": datetime.now(UTC).isoformat(), + "created_at": datetime.now(timezone.utc).isoformat(), "state": "onboarding", } self.owners[owner_id] = owner @@ -72,7 +75,7 @@ class InMemoryDatabase: "file_type": file_type, "purpose": purpose, "parsed_data": parsed_data, - "uploaded_at": datetime.now(UTC).isoformat(), + "uploaded_at": datetime.now(timezone.utc).isoformat(), } self.data_files.setdefault(owner_id, []).append(record) return deepcopy(record) @@ -88,7 +91,7 @@ class InMemoryDatabase: "steps_executed": steps_executed, "outcome": outcome, "error_message": error_message, - "executed_at": datetime.now(UTC).isoformat(), + "executed_at": datetime.now(timezone.utc).isoformat(), } self.execution_logs.setdefault(owner_id, []).append(record) return deepcopy(record) @@ -106,7 +109,7 @@ class InMemoryDatabase: "options": payload.get("options", []), "owner_response": None, "status": "pending", - "created_at": datetime.now(UTC).isoformat(), + "created_at": datetime.now(timezone.utc).isoformat(), } self.escalations.setdefault(owner_id, []).append(record) return deepcopy(record) diff --git a/backend/watcher/__pycache__/__init__.cpython-313.pyc b/backend/watcher/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..72815e1b6a46802e90a98127d712965b55a05723 Binary files /dev/null and b/backend/watcher/__pycache__/__init__.cpython-313.pyc differ diff --git a/backend/watcher/__pycache__/__init__.cpython-39.pyc b/backend/watcher/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b50a6a6ed0fd6706c641b09ea5efa092ac328de Binary files /dev/null and b/backend/watcher/__pycache__/__init__.cpython-39.pyc differ diff --git a/backend/watcher/__pycache__/gmail_watcher.cpython-313.pyc b/backend/watcher/__pycache__/gmail_watcher.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de44c31b600fd6a227f9265177bdb9b943db3698 Binary files /dev/null and b/backend/watcher/__pycache__/gmail_watcher.cpython-313.pyc differ diff --git a/backend/watcher/__pycache__/gmail_watcher.cpython-39.pyc b/backend/watcher/__pycache__/gmail_watcher.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7fd383ea65e40e08d4bd3215d3952922de4c54c5 Binary files /dev/null and b/backend/watcher/__pycache__/gmail_watcher.cpython-39.pyc differ diff --git a/backend/watcher/__pycache__/trigger_manager.cpython-313.pyc b/backend/watcher/__pycache__/trigger_manager.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7ad90a6e42aa38e16670a60f19ae3a33d1bc5867 Binary files /dev/null and b/backend/watcher/__pycache__/trigger_manager.cpython-313.pyc differ diff --git a/backend/watcher/__pycache__/trigger_manager.cpython-39.pyc b/backend/watcher/__pycache__/trigger_manager.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55b1e6b03128ff5c2188f8167ce870ec165a91ae Binary files /dev/null and b/backend/watcher/__pycache__/trigger_manager.cpython-39.pyc differ diff --git a/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.19256 b/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.19256 new file mode 100644 index 0000000000000000000000000000000000000000..3a3ffa641749b55beb818e8d300a971ada2c774a Binary files /dev/null and b/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.19256 differ diff --git a/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.9816 b/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.9816 new file mode 100644 index 0000000000000000000000000000000000000000..3a3ffa641749b55beb818e8d300a971ada2c774a Binary files /dev/null and b/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.9816 differ diff --git a/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.9888 b/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.9888 new file mode 100644 index 0000000000000000000000000000000000000000..3a3ffa641749b55beb818e8d300a971ada2c774a Binary files /dev/null and b/tests/__pycache__/conftest.cpython-313-pytest-8.4.1.pyc.9888 differ diff --git a/tests/__pycache__/conftest.cpython-39-pytest-8.4.1.pyc.19116 b/tests/__pycache__/conftest.cpython-39-pytest-8.4.1.pyc.19116 new file mode 100644 index 0000000000000000000000000000000000000000..4cb8b16a0fa2e19b223858f57ebda80ef77ac9c1 Binary files /dev/null and b/tests/__pycache__/conftest.cpython-39-pytest-8.4.1.pyc.19116 differ diff --git a/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.19256 b/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.19256 new file mode 100644 index 0000000000000000000000000000000000000000..32c529572b80cdfb7241bfda42b789bf2a33b21e Binary files /dev/null and b/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.19256 differ diff --git a/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.9816 b/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.9816 new file mode 100644 index 0000000000000000000000000000000000000000..32c529572b80cdfb7241bfda42b789bf2a33b21e Binary files /dev/null and b/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.9816 differ diff --git a/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.9888 b/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.9888 new file mode 100644 index 0000000000000000000000000000000000000000..32c529572b80cdfb7241bfda42b789bf2a33b21e Binary files /dev/null and b/tests/__pycache__/test_flowpilot_api.cpython-313-pytest-8.4.1.pyc.9888 differ diff --git a/tests/__pycache__/test_flowpilot_api.cpython-39-pytest-8.4.1.pyc.19116 b/tests/__pycache__/test_flowpilot_api.cpython-39-pytest-8.4.1.pyc.19116 new file mode 100644 index 0000000000000000000000000000000000000000..468d71d4fb1ba6708156a5f19fd5738df45f711a Binary files /dev/null and b/tests/__pycache__/test_flowpilot_api.cpython-39-pytest-8.4.1.pyc.19116 differ diff --git a/tests/test_flowpilot_api.py b/tests/test_flowpilot_api.py index 0baee24f4e303904397088b3c7a28a0512695306..2dec60b94b065a426afb05eeb8570d86a492d43a 100644 --- a/tests/test_flowpilot_api.py +++ b/tests/test_flowpilot_api.py @@ -1,11 +1,20 @@ from fastapi.testclient import TestClient from backend.main import app +from backend.storage.database import InMemoryDatabase, db client = TestClient(app) +def test_in_memory_database_creates_timezone_aware_owner_timestamp(): + db = InMemoryDatabase() + + owner = db.ensure_owner("owner-1", "owner-1@example.com") + + assert owner["created_at"].endswith("+00:00") + + def test_owner_flow_builds_and_deploys_workflows(): analyze_response = client.post( "/api/analyze", @@ -75,3 +84,27 @@ def test_upload_and_status_endpoints(): status_response = client.get("/api/status", params={"owner_id": "raj2"}) assert status_response.status_code == 200 assert status_response.json()["owner"]["id"] == "raj2" + + +def test_reset_endpoint_clears_all_in_memory_data(): + analyze_response = client.post( + "/api/analyze", + json={ + "owner_id": "reset-user", + "owner_email": "reset-user@example.com", + "description": "Weekly pricing and orders.", + }, + ) + assert analyze_response.status_code == 200 + + reset_response = client.post("/api/reset") + + assert reset_response.status_code == 200 + assert reset_response.json() == {"status": "ok", "message": "In-memory data reset."} + assert db.owners == {} + assert db.workflows == {} + assert db.data_files == {} + assert db.execution_logs == {} + assert db.escalations == {} + assert db.sheets == {} + assert db.outbound_emails == {}