{"openapi":"3.1.0","info":{"title":"Trigger Gateway","version":"dev"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingress/test":{"post":{"summary":"Post Ingress Test","description":"Accept, verify, dedup, normalise, and publish a test trigger event.","operationId":"post_ingress_test_ingress_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingress/asana/{ingress_key}":{"post":{"summary":"Post Ingress Asana Keyed","description":"Per-webhook ingress (cirosec B3).\n\nThe path segment was minted at registration and handed to Asana as the\ncallback target, so it arrives on every delivery — handshake included. That\nmakes both halves of the finding keyed:\n\n* the handshake secret lands under this webhook's own slot instead of the\n  shared `pending-handshake` one, so a second registration cannot overwrite\n  the first, and\n* an event is verified against that one secret, so another webhook's secret\n  cannot sign this one's delivery.\n\nNo fallback: an unknown key is refused. There is nothing to be backwards\ncompatible with — this path only exists for webhooks registered with a key.","operationId":"post_ingress_asana_keyed_ingress_asana__ingress_key__post","parameters":[{"name":"ingress_key","in":"path","required":true,"schema":{"type":"string","title":"Ingress Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingress/asana":{"post":{"summary":"Post Ingress Asana","description":"Accept, verify, dedup, normalise, and publish an Asana webhook delivery.\n\nSee module docstring for the full flow and secret-keying scheme.","operationId":"post_ingress_asana_ingress_asana_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/asana/webhooks":{"post":{"summary":"Register Asana Webhook","description":"Orchestrate Asana webhook registration.\n\nReads ``X-Gateway-Handle``, delegates the Asana API call to the BC\n(forwarding the handle — no token exchange here), then stores the\n``webhook_id → mapping`` in Firestore.","operationId":"register_asana_webhook_asana_webhooks_post","parameters":[{"name":"X-Gateway-Handle","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Gateway-Handle"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Asana Webhooks","description":"List the webhooks registered for ``case_id`` — the source of truth.\n\nReads only the trigger-gateway's own Firestore mapping store (NO Asana\ncall, NO token). Lets the panel show the actual registered webhook(s) on\nload, independent of client-side canvas state (which, under the E2E mock\ncanvas, is not persisted). No ``X-Gateway-Handle`` needed — this is a read\nof the gateway's own store; Cloud Run ingress IAM gates it in deployed envs.","operationId":"list_asana_webhooks_asana_webhooks_get","parameters":[{"name":"case_id","in":"query","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/asana/events":{"get":{"summary":"List Asana Events","description":"List the recent events stored for ``project_gid`` (newest first, ≤10).\n\nIncludes the raw delivered body so the panel can show exactly what Asana\nsent. Store read only — no handle / token.","operationId":"list_asana_events_asana_events_get","parameters":[{"name":"project_gid","in":"query","required":true,"schema":{"type":"string","title":"Project Gid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/asana/webhooks/{webhook_id}":{"delete":{"summary":"Delete Asana Webhook","description":"Deregister a webhook: delete at Asana (via BC) then drop the mapping +\nits stored events.\n\nDelete is a WRITE, so it uses the same single-use-deferred (\"Once\") consent\nas register. ``consent_event_id`` (the stable id `R`) is forwarded to the BC\nas a query param so the BC batch-claims the Once grant AFTER the Asana\ndelete. Absent → legacy caller, the BC skips the claim.","operationId":"delete_asana_webhook_asana_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"consent_event_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Consent Event Id"}},{"name":"X-Gateway-Handle","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Gateway-Handle"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}