@epilot/sdk 2.20.9 → 2.20.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/dist/apis/access-token.cjs +6 -6
  2. package/dist/apis/access-token.js +1 -1
  3. package/dist/apis/address-suggestions.cjs +6 -6
  4. package/dist/apis/address-suggestions.js +1 -1
  5. package/dist/apis/address.cjs +6 -6
  6. package/dist/apis/address.js +1 -1
  7. package/dist/apis/ai-agents.cjs +6 -6
  8. package/dist/apis/ai-agents.js +1 -1
  9. package/dist/apis/app.cjs +6 -6
  10. package/dist/apis/app.js +1 -1
  11. package/dist/apis/audit-logs.cjs +6 -6
  12. package/dist/apis/audit-logs.js +1 -1
  13. package/dist/apis/automation.cjs +6 -6
  14. package/dist/apis/automation.js +1 -1
  15. package/dist/apis/billing.cjs +6 -6
  16. package/dist/apis/billing.js +1 -1
  17. package/dist/apis/blueprint-manifest.cjs +6 -6
  18. package/dist/apis/blueprint-manifest.js +1 -1
  19. package/dist/apis/calendar.cjs +6 -6
  20. package/dist/apis/calendar.js +1 -1
  21. package/dist/apis/configuration-hub.cjs +6 -6
  22. package/dist/apis/configuration-hub.js +1 -1
  23. package/dist/apis/consent.cjs +6 -6
  24. package/dist/apis/consent.js +1 -1
  25. package/dist/apis/customer-portal.cjs +6 -6
  26. package/dist/apis/customer-portal.js +1 -1
  27. package/dist/apis/dashboard.cjs +6 -6
  28. package/dist/apis/dashboard.js +1 -1
  29. package/dist/apis/data-governance.cjs +6 -6
  30. package/dist/apis/data-governance.js +1 -1
  31. package/dist/apis/deduplication.cjs +6 -6
  32. package/dist/apis/deduplication.js +1 -1
  33. package/dist/apis/design.cjs +6 -6
  34. package/dist/apis/design.js +1 -1
  35. package/dist/apis/document.cjs +6 -6
  36. package/dist/apis/document.js +1 -1
  37. package/dist/apis/email-settings.cjs +6 -6
  38. package/dist/apis/email-settings.js +1 -1
  39. package/dist/apis/email-template.cjs +6 -6
  40. package/dist/apis/email-template.js +1 -1
  41. package/dist/apis/entity-mapping.cjs +6 -6
  42. package/dist/apis/entity-mapping.js +1 -1
  43. package/dist/apis/entity.cjs +24 -6
  44. package/dist/apis/entity.d.cts +15 -1
  45. package/dist/apis/entity.d.ts +15 -1
  46. package/dist/apis/entity.js +19 -1
  47. package/dist/apis/environments.cjs +6 -6
  48. package/dist/apis/environments.js +1 -1
  49. package/dist/apis/event-catalog.cjs +8 -8
  50. package/dist/apis/event-catalog.d.cts +2 -2
  51. package/dist/apis/event-catalog.d.ts +2 -2
  52. package/dist/apis/event-catalog.js +2 -2
  53. package/dist/apis/file.cjs +8 -8
  54. package/dist/apis/file.d.cts +2 -2
  55. package/dist/apis/file.d.ts +2 -2
  56. package/dist/apis/file.js +2 -2
  57. package/dist/apis/iban.cjs +6 -6
  58. package/dist/apis/iban.js +1 -1
  59. package/dist/apis/integration-toolkit.cjs +6 -6
  60. package/dist/apis/integration-toolkit.js +1 -1
  61. package/dist/apis/journey.cjs +8 -8
  62. package/dist/apis/journey.d.cts +2 -2
  63. package/dist/apis/journey.d.ts +2 -2
  64. package/dist/apis/journey.js +2 -2
  65. package/dist/apis/kanban.cjs +6 -6
  66. package/dist/apis/kanban.js +1 -1
  67. package/dist/apis/message.cjs +6 -6
  68. package/dist/apis/message.js +1 -1
  69. package/dist/apis/metering.cjs +6 -6
  70. package/dist/apis/metering.js +1 -1
  71. package/dist/apis/notes.cjs +6 -6
  72. package/dist/apis/notes.js +1 -1
  73. package/dist/apis/notification.cjs +6 -6
  74. package/dist/apis/notification.js +1 -1
  75. package/dist/apis/organization.cjs +6 -6
  76. package/dist/apis/organization.js +1 -1
  77. package/dist/apis/partner-directory.cjs +6 -6
  78. package/dist/apis/partner-directory.js +1 -1
  79. package/dist/apis/permissions.cjs +6 -6
  80. package/dist/apis/permissions.js +1 -1
  81. package/dist/apis/pricing-tier.cjs +6 -6
  82. package/dist/apis/pricing-tier.js +1 -1
  83. package/dist/apis/pricing.cjs +6 -27
  84. package/dist/apis/pricing.d.cts +1 -13
  85. package/dist/apis/pricing.d.ts +1 -13
  86. package/dist/apis/pricing.js +1 -22
  87. package/dist/apis/purpose.cjs +6 -6
  88. package/dist/apis/purpose.js +1 -1
  89. package/dist/apis/query.cjs +6 -6
  90. package/dist/apis/query.js +1 -1
  91. package/dist/apis/sandbox.cjs +6 -6
  92. package/dist/apis/sandbox.js +1 -1
  93. package/dist/apis/sharing.cjs +6 -6
  94. package/dist/apis/sharing.js +1 -1
  95. package/dist/apis/snapshot.cjs +6 -6
  96. package/dist/apis/snapshot.js +1 -1
  97. package/dist/apis/submission.cjs +6 -6
  98. package/dist/apis/submission.js +1 -1
  99. package/dist/apis/target.cjs +6 -6
  100. package/dist/apis/target.js +1 -1
  101. package/dist/apis/targeting.cjs +6 -6
  102. package/dist/apis/targeting.js +1 -1
  103. package/dist/apis/template-variables.cjs +6 -6
  104. package/dist/apis/template-variables.js +1 -1
  105. package/dist/apis/user.cjs +6 -6
  106. package/dist/apis/user.js +1 -1
  107. package/dist/apis/validation-rules.cjs +6 -6
  108. package/dist/apis/validation-rules.js +1 -1
  109. package/dist/apis/webhooks.cjs +6 -6
  110. package/dist/apis/webhooks.js +1 -1
  111. package/dist/apis/workflow-definition.cjs +6 -6
  112. package/dist/apis/workflow-definition.js +1 -1
  113. package/dist/apis/workflow.cjs +6 -6
  114. package/dist/apis/workflow.js +1 -1
  115. package/dist/chunk-2Q6CNXJ2.cjs +14 -0
  116. package/dist/{chunk-5S2PEECD.cjs → chunk-424JLS5G.cjs} +1 -1
  117. package/dist/chunk-FGQBS7TA.js +14 -0
  118. package/dist/chunk-HL4MZXEK.js +14 -0
  119. package/dist/chunk-LTCN52JS.js +14 -0
  120. package/dist/{chunk-VCD3C4UW.cjs → chunk-QZH7QNNP.cjs} +6 -6
  121. package/dist/{chunk-JBFTKLP2.js → chunk-SMERBU2T.js} +6 -6
  122. package/dist/chunk-W6R2J6KQ.cjs +14 -0
  123. package/dist/event-catalog-S4OYTDIB.js +7 -0
  124. package/dist/event-catalog-Z6BO4L2G.cjs +7 -0
  125. package/dist/{event-catalog-runtime-AME244T7.cjs → event-catalog-runtime-XWSYNUGQ.cjs} +2 -2
  126. package/dist/{event-catalog-runtime-Q3MKEDG4.js → event-catalog-runtime-Z6OMHQBD.js} +1 -1
  127. package/dist/{event-catalog.d-Bd2wmtlZ.d.ts → event-catalog.d-CCE1qmBN.d.cts} +105 -22
  128. package/dist/{event-catalog.d-Bd2wmtlZ.d.cts → event-catalog.d-CCE1qmBN.d.ts} +105 -22
  129. package/dist/file-LFOTXMRJ.cjs +7 -0
  130. package/dist/file-ND2JH5EM.js +7 -0
  131. package/dist/file-runtime-JL2IZ2CE.cjs +5 -0
  132. package/dist/{file-runtime-423SISQ2.js → file-runtime-RS4DX5LB.js} +1 -1
  133. package/dist/{file.d-CBsXF4W8.d.ts → file.d-DELNV63w.d.cts} +340 -9
  134. package/dist/{file.d-CBsXF4W8.d.cts → file.d-DELNV63w.d.ts} +340 -9
  135. package/dist/index.cjs +14 -14
  136. package/dist/index.d.cts +3 -3
  137. package/dist/index.d.ts +3 -3
  138. package/dist/index.js +4 -4
  139. package/dist/journey-FNWHSZW3.js +7 -0
  140. package/dist/journey-FUJDOH5O.cjs +7 -0
  141. package/dist/{journey-runtime-PAJVCFMZ.cjs → journey-runtime-EFWGEDUE.cjs} +2 -2
  142. package/dist/{journey-runtime-33QDS2WK.js → journey-runtime-VCADGDRV.js} +1 -1
  143. package/dist/{journey.d-bxl2l7qg.d.cts → journey.d-6Bs1uNLT.d.cts} +1062 -14
  144. package/dist/{journey.d-bxl2l7qg.d.ts → journey.d-6Bs1uNLT.d.ts} +1062 -14
  145. package/docs/event-catalog.md +155 -5
  146. package/docs/file.md +272 -0
  147. package/docs/journey.md +676 -0
  148. package/package.json +1 -1
  149. package/definitions/access-token-runtime.json +0 -1
  150. package/definitions/access-token.json +0 -835
  151. package/definitions/address-runtime.json +0 -1
  152. package/definitions/address-suggestions-runtime.json +0 -1
  153. package/definitions/address-suggestions.json +0 -582
  154. package/definitions/address.json +0 -578
  155. package/definitions/ai-agents-runtime.json +0 -1
  156. package/definitions/ai-agents.json +0 -2863
  157. package/definitions/app-runtime.json +0 -1
  158. package/definitions/app.json +0 -5993
  159. package/definitions/audit-logs-runtime.json +0 -1
  160. package/definitions/audit-logs.json +0 -305
  161. package/definitions/automation-runtime.json +0 -1
  162. package/definitions/automation.json +0 -5889
  163. package/definitions/billing-runtime.json +0 -1
  164. package/definitions/billing.json +0 -2394
  165. package/definitions/blueprint-manifest-runtime.json +0 -1
  166. package/definitions/blueprint-manifest.json +0 -7817
  167. package/definitions/calendar-runtime.json +0 -1
  168. package/definitions/calendar.json +0 -2904
  169. package/definitions/configuration-hub-runtime.json +0 -1
  170. package/definitions/configuration-hub.json +0 -2250
  171. package/definitions/consent-runtime.json +0 -1
  172. package/definitions/consent.json +0 -344
  173. package/definitions/customer-portal-runtime.json +0 -1
  174. package/definitions/customer-portal.json +0 -19945
  175. package/definitions/dashboard-runtime.json +0 -1
  176. package/definitions/dashboard.json +0 -1355
  177. package/definitions/data-governance-runtime.json +0 -1
  178. package/definitions/data-governance.json +0 -1126
  179. package/definitions/deduplication-runtime.json +0 -1
  180. package/definitions/deduplication.json +0 -782
  181. package/definitions/design-runtime.json +0 -1
  182. package/definitions/design.json +0 -1827
  183. package/definitions/document-runtime.json +0 -1
  184. package/definitions/document.json +0 -758
  185. package/definitions/email-settings-runtime.json +0 -1
  186. package/definitions/email-settings.json +0 -3736
  187. package/definitions/email-template-runtime.json +0 -1
  188. package/definitions/email-template.json +0 -1441
  189. package/definitions/entity-mapping-runtime.json +0 -1
  190. package/definitions/entity-mapping.json +0 -1829
  191. package/definitions/entity-runtime.json +0 -1
  192. package/definitions/entity.json +0 -11546
  193. package/definitions/environments-runtime.json +0 -1
  194. package/definitions/environments.json +0 -703
  195. package/definitions/event-catalog-runtime.json +0 -1
  196. package/definitions/event-catalog.json +0 -1943
  197. package/definitions/file-runtime.json +0 -1
  198. package/definitions/file.json +0 -3905
  199. package/definitions/iban-runtime.json +0 -1
  200. package/definitions/iban.json +0 -132
  201. package/definitions/integration-toolkit-runtime.json +0 -1
  202. package/definitions/integration-toolkit.json +0 -12966
  203. package/definitions/journey-runtime.json +0 -1
  204. package/definitions/journey.json +0 -3040
  205. package/definitions/kanban-runtime.json +0 -1
  206. package/definitions/kanban.json +0 -1506
  207. package/definitions/message-runtime.json +0 -1
  208. package/definitions/message.json +0 -3667
  209. package/definitions/metering-runtime.json +0 -1
  210. package/definitions/metering.json +0 -3132
  211. package/definitions/notes-runtime.json +0 -1
  212. package/definitions/notes.json +0 -1698
  213. package/definitions/notification-runtime.json +0 -1
  214. package/definitions/notification.json +0 -1439
  215. package/definitions/organization-runtime.json +0 -1
  216. package/definitions/organization.json +0 -1192
  217. package/definitions/partner-directory-runtime.json +0 -1
  218. package/definitions/partner-directory.json +0 -2284
  219. package/definitions/permissions-runtime.json +0 -1
  220. package/definitions/permissions.json +0 -1598
  221. package/definitions/pricing-runtime.json +0 -1
  222. package/definitions/pricing-tier-runtime.json +0 -1
  223. package/definitions/pricing-tier.json +0 -105
  224. package/definitions/pricing.json +0 -14301
  225. package/definitions/purpose-runtime.json +0 -1
  226. package/definitions/purpose.json +0 -524
  227. package/definitions/query-runtime.json +0 -1
  228. package/definitions/query.json +0 -3178
  229. package/definitions/sandbox-runtime.json +0 -1
  230. package/definitions/sandbox.json +0 -453
  231. package/definitions/sharing-runtime.json +0 -1
  232. package/definitions/sharing.json +0 -956
  233. package/definitions/snapshot-runtime.json +0 -1
  234. package/definitions/snapshot.json +0 -1103
  235. package/definitions/submission-runtime.json +0 -1
  236. package/definitions/submission.json +0 -313
  237. package/definitions/targeting-runtime.json +0 -1
  238. package/definitions/targeting.json +0 -2285
  239. package/definitions/template-variables-runtime.json +0 -1
  240. package/definitions/template-variables.json +0 -1416
  241. package/definitions/user-runtime.json +0 -1
  242. package/definitions/user.json +0 -3051
  243. package/definitions/validation-rules-runtime.json +0 -1
  244. package/definitions/validation-rules.json +0 -2642
  245. package/definitions/webhooks-runtime.json +0 -1
  246. package/definitions/webhooks.json +0 -1875
  247. package/definitions/workflow-definition-runtime.json +0 -1
  248. package/definitions/workflow-definition.json +0 -3592
  249. package/definitions/workflow-runtime.json +0 -1
  250. package/definitions/workflow.json +0 -4669
  251. package/dist/chunk-CIKDOXDL.cjs +0 -14
  252. package/dist/chunk-EEKJGTAS.js +0 -14
  253. package/dist/chunk-IBMGFLXF.js +0 -14
  254. package/dist/chunk-MPZICOVZ.cjs +0 -14
  255. package/dist/chunk-XJUB5BYM.js +0 -14
  256. package/dist/event-catalog-4FVQZ65M.cjs +0 -7
  257. package/dist/event-catalog-PEOHXUJO.js +0 -7
  258. package/dist/file-M5HNKOPG.cjs +0 -7
  259. package/dist/file-ZUNCUDBY.js +0 -7
  260. package/dist/file-runtime-IHVDQNIX.cjs +0 -5
  261. package/dist/journey-2HHH7MLM.js +0 -7
  262. package/dist/journey-4CXKZMKV.cjs +0 -7
@@ -0,0 +1,7 @@
1
+ import "./chunk-YPSWSI3M.js";
2
+
3
+ // src/docs/event-catalog.json
4
+ var event_catalog_default = '# Event Catalog API\n\n- **Base URL:** `https://event-catalog.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/event-catalog](https://docs.epilot.io/api/event-catalog)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.eventCatalog.listEvents(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/event-catalog\'\n\nconst eventCatalogClient = getClient()\nauthorize(eventCatalogClient, () => \'<token>\')\nconst { data } = await eventCatalogClient.listEvents(...)\n```\n\n## Operations\n\n**Event Catalog**\n- [`listEvents`](#listevents)\n- [`createCustomEvent`](#createcustomevent)\n- [`getEvent`](#getevent)\n- [`patchEvent`](#patchevent)\n- [`replaceCustomEventDraft`](#replacecustomeventdraft)\n- [`deprecateCustomEvent`](#deprecatecustomevent)\n- [`previewCustomEvent`](#previewcustomevent)\n- [`publishCustomEventDefinition`](#publishcustomeventdefinition)\n- [`getEventJSONSchema`](#geteventjsonschema)\n- [`getEventExample`](#geteventexample)\n- [`listEventVersions`](#listeventversions)\n- [`searchEventHistory`](#searcheventhistory)\n- [`searchEventHistoryV2`](#searcheventhistoryv2)\n- [`getHistoricalEvent`](#gethistoricalevent)\n- [`triggerEvent`](#triggerevent)\n\n**Schemas**\n- [`EventConfigBase`](#eventconfigbase)\n- [`EventConfig`](#eventconfig)\n- [`CreateCustomEventPayload`](#createcustomeventpayload)\n- [`EventMapping`](#eventmapping)\n- [`CustomEventLineage`](#customeventlineage)\n- [`PurposeFilterSnapshot`](#purposefiltersnapshot)\n- [`PublishCustomEventPayload`](#publishcustomeventpayload)\n- [`ValidationIssue`](#validationissue)\n- [`PreviewEventResponse`](#previeweventresponse)\n- [`UpdateEventPayload`](#updateeventpayload)\n- [`PrimitiveField`](#primitivefield)\n- [`ContextEntity`](#contextentity)\n- [`AttachmentField`](#attachmentfield)\n- [`CustomSchemaField`](#customschemafield)\n- [`SchemaField`](#schemafield)\n- [`SuccessCriterion`](#successcriterion)\n- [`CommonEventMetadata`](#commoneventmetadata)\n- [`EventJsonSchema`](#eventjsonschema)\n- [`InlineDowngradeStep`](#inlinedowngradestep)\n- [`Event`](#event)\n- [`EventSummary`](#eventsummary)\n- [`GraphDefinition`](#graphdefinition)\n- [`GraphNode`](#graphnode)\n- [`GraphEdge`](#graphedge)\n- [`EntityOperationTrigger`](#entityoperationtrigger)\n- [`SearchOptions`](#searchoptions)\n- [`SearchOptionsV2`](#searchoptionsv2)\n- [`FieldsParam`](#fieldsparam)\n- [`TriggerEventPayload`](#triggereventpayload)\n- [`TriggerEventResponse`](#triggereventresponse)\n- [`EventAttachment`](#eventattachment)\n- [`FieldChange`](#fieldchange)\n- [`VersionMeta`](#versionmeta)\n- [`EventVersionRegistrySummary`](#eventversionregistrysummary)\n\n### `listEvents`\n\nRetrieve list of available business events\n\n`GET /v1/events`\n\n```ts\nconst { data } = await client.listEvents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createCustomEvent`\n\nReserve an org-scoped custom event name and persist its immutable v1.0 draft definition. Custom events are always projected from an entity graph: entity_graph is required and, in guided mapping mode, \n\n`POST /v1/events`\n\n```ts\nconst { data } = await client.createCustomEvent(\n null,\n {\n event_name: \'string\',\n event_title: \'string\',\n event_description: \'string\',\n event_tags: [\'string\'],\n schema_fields: {},\n entity_graph: {\n nodes: [\n {\n id: \'contact\',\n schema: \'contact\',\n cardinality: \'one\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\']\n }\n ],\n edges: [\n {\n from: \'contact\',\n to: \'billing_account\'\n }\n ]\n },\n entity_operation: {\n operation: [\'createEntity\', \'updateEntity\'],\n schema: [\'contact\', \'contract\', \'order\'],\n attribute: [\'email\', \'phone\', \'status\'],\n purpose: [\'K\xFCndigung\', \'Umzug/Auszug\'],\n purpose_filters: [\n {\n id: \'string\',\n display_name: \'string\'\n }\n ]\n },\n automation_trigger: true,\n api_trigger: true,\n automation_trigger_only: false,\n automation_trigger_seed_node: \'string\',\n mapping: {\n mode: \'guided\',\n jsonata: \'string\'\n },\n lineage: {\n base_event_name: \'string\',\n base_event_version: \'string\'\n },\n example: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getEvent`\n\nRetrieve the configuration of a specific business event\n\n`GET /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.getEvent({\n event_name: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `patchEvent`\n\nUpdate the configuration of a specific business event for the organization\n\n`PATCH /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.patchEvent(\n {\n event_name: \'example\',\n },\n {\n enabled: true,\n auto_trigger: true,\n success_criteria: [\n {\n entity_schema: \'contract\',\n attribute: \'installment_amount\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `replaceCustomEventDraft`\n\nReplace the complete v1.0 definition of an org-scoped custom event while it is still an\nunpublished draft. Drafts have no consumers, so their definition is not yet immutable;\nthe event name is the ide\n\n`PUT /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.replaceCustomEventDraft(\n {\n event_name: \'example\',\n },\n {\n event_name: \'string\',\n event_title: \'string\',\n event_description: \'string\',\n event_tags: [\'string\'],\n schema_fields: {},\n entity_graph: {\n nodes: [\n {\n id: \'contact\',\n schema: \'contact\',\n cardinality: \'one\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\']\n }\n ],\n edges: [\n {\n from: \'contact\',\n to: \'billing_account\'\n }\n ]\n },\n entity_operation: {\n operation: [\'createEntity\', \'updateEntity\'],\n schema: [\'contact\', \'contract\', \'order\'],\n attribute: [\'email\', \'phone\', \'status\'],\n purpose: [\'K\xFCndigung\', \'Umzug/Auszug\'],\n purpose_filters: [\n {\n id: \'string\',\n display_name: \'string\'\n }\n ]\n },\n automation_trigger: true,\n api_trigger: true,\n automation_trigger_only: false,\n automation_trigger_seed_node: \'string\',\n mapping: {\n mode: \'guided\',\n jsonata: \'string\'\n },\n lineage: {\n base_event_name: \'string\',\n base_event_version: \'string\'\n },\n example: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `deprecateCustomEvent`\n\nSoft-deprecate an org-scoped custom event. Definitions and v1.0 history remain readable.\n\n`DELETE /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.deprecateCustomEvent({\n event_name: \'example\',\n})\n```\n\n---\n\n### `previewCustomEvent`\n\nAssemble and fully validate a persisted custom-event draft without publishing it.\n\n`POST /v1/events/{event_name}:preview`\n\n```ts\nconst { data } = await client.previewCustomEvent(\n {\n event_name: \'example\',\n },\n {\n seed: {\n entity_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n node_id: \'ticket\'\n },\n _trigger_source_type: \'automation\',\n _trigger_source: \'execution-id/action-id\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "payload": {},\n "errors": [\n {\n "path": "string",\n "message": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `publishCustomEventDefinition`\n\nConditionally activate an immutable custom-event v1.0 definition.\n\n`POST /v1/events/{event_name}:publish`\n\n```ts\nconst { data } = await client.publishCustomEventDefinition(\n {\n event_name: \'example\',\n },\n {\n enabled: true,\n auto_trigger: true,\n base_auto_trigger_enabled: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getEventJSONSchema`\n\nRetrieve the JSON Schema of a specific business event. Pass an optional\n`Epilot-Event-Version` header to retrieve a specific version\'s schema;\nwhen omitted, the event\'s latest version is returned.\n\n`GET /v1/events/{event_name}/json_schema`\n\n```ts\nconst { data } = await client.getEventJSONSchema({\n event_name: \'example\',\n Epilot-Event-Version: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "object",\n "properties": {\n "_org_id": {\n "type": "string",\n "description": "epilot tenant/organization ID"\n },\n "_event_time": {\n "type": "string",\n "format": "date-time",\n "description": "ISO 8601 timestamp when event occurred"\n },\n "_event_id": {\n "type": "string",\n "description": "Unique event identifier (ULID)"\n },\n "_event_name": {\n "type": "string",\n "description": "Event name from catalog"\n },\n "_event_version": {\n "type": "string",\n "description": "Event payload version (MAJOR.MINOR)"\n },\n "_event_source": {\n "type": "string",\n "description": "Source that triggered the event"\n },\n "reading_value": {\n "type": "number",\n "description": "The meter reading value"\n },\n "reading_date": {\n "type": "string",\n "format": "date-time",\n "description": "ISO 8601 timestamp when reading was taken"\n },\n "read_by": {\n "type": "string",\n "description": "Name or identifier of who submitted the reading"\n },\n "reason": {\n "type": "string",\n "enum": ["regular", "move-in", "move-out", "supplier-change", "correction", "final"],\n "description": "Reason for the meter reading"\n },\n "direction": {\n "type": "string",\n "enum": ["feed-in", "feed-out"],\n "description": "Direction of energy flow"\n },\n "source": {\n "type": "string",\n "enum": ["portal", "360", "api", "automation"],\n "description": "Source system where reading was submitted"\n },\n "meter_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the meter"\n },\n "counter_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the meter counter"\n },\n "meter_number": {\n "type": "string",\n "description": "Human-readable meter number"\n },\n "obis_number": {\n "type": "string",\n "description": "OBIS code of the counter"\n },\n "unit": {\n "type": "string",\n "description": "Unit of measurement (e.g., kWh, m3)"\n },\n "customer_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the customer"\n },\n "contract_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the contract"\n },\n "user_id": {\n "type": "string",\n "description": "ID of the user who submitted the reading"\n },\n "user_email": {\n "type": "string",\n "format": "email",\n "description": "Email of the user who submitted the reading"\n }\n },\n "required": ["_org_id", "_event_time", "_event_id", "_event_name", "_event_version", "_event_source", "reading_value", "reading_date", "read_by", "reason", "direction", "source", "meter_id", "counter_id", "meter_number", "obis_number", "unit", "customer_id", "contract_id"]\n}\n```\n\n</details>\n\n---\n\n### `getEventExample`\n\nGenerate a sample event payload based on the event\'s JSON Schema. Pass an\noptional `Epilot-Event-Version` header to generate the example for a\nspecific version; when omitted, the event\'s latest versio\n\n`GET /v1/events/{event_name}/example`\n\n```ts\nconst { data } = await client.getEventExample({\n event_name: \'example\',\n Epilot-Event-Version: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{}\n```\n\n</details>\n\n---\n\n### `listEventVersions`\n\nList every known version of an event, along with the `latest`\nand the set of currently `active` versions. See \xA73.2 of the\nEvent Payload Versioning RFC.\n\n`GET /v1/events/{event_name}/versions`\n\n```ts\nconst { data } = await client.listEventVersions({\n event_name: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "MeterReadingAdded",\n "latest": "1.0",\n "versions": [\n {\n "version": "1.0",\n "released_at": "2025-11-15",\n "change_summary": "string",\n "change_notes": "string",\n "changes": [\n {\n "field": "reading",\n "op": "added",\n "type_old": "string",\n "type_new": "string"\n }\n ]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `searchEventHistory`\n\nPaginated history of events\n\n`POST /v1/events/{event_name}:history`\n\n```ts\nconst { data } = await client.searchEventHistory(\n {\n event_name: \'example\',\n },\n {\n limit: 10,\n cursor: {\n event_time: \'2025-10-31 12:34:56\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_org_id": "org_123456",\n "_event_time": "2024-01-01T12:00:00Z",\n "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",\n "_event_name": "MeterReading",\n "_event_version": "1.0",\n "_event_source": "api",\n "_trigger_source_type": "api",\n "_trigger_source": "user_123456",\n "reading_value": 123.45,\n "reading_date": "2024-01-01T11:59:00Z",\n "read_by": "John Doe",\n "reason": "regular",\n "direction": "feed-out",\n "source": "portal",\n "meter_id": "550e8400-e29b-41d4-a716-446655440000",\n "counter_id": "660e8400-e29b-41d4-a716-446655440000",\n "meter_number": "MT123456789",\n "obis_number": "1-0:1.8.0",\n "unit": "kWh",\n "customer_id": "770e8400-e29b-41d4-a716-446655440000",\n "contract_id": "880e8400-e29b-41d4-a716-446655440000"\n }\n ],\n "next_cursor": {\n "event_time": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n }\n}\n```\n\n</details>\n\n---\n\n### `searchEventHistoryV2`\n\nPaginated history of events with projected/lightweight payload (v2).\n\n`POST /v2/events/{event_name}:history`\n\n```ts\nconst { data } = await client.searchEventHistoryV2(\n {\n event_name: \'example\',\n },\n {\n limit: 10,\n cursor: {\n event_time: \'2025-10-31 12:34:56\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_org_id": "string",\n "_event_time": "1970-01-01T00:00:00.000Z",\n "_event_id": "string",\n "_event_name": "string",\n "_event_version": "1.0",\n "_event_source": "string",\n "_trigger_source_type": "api",\n "_trigger_source": "string",\n "_ack_id": "string"\n }\n ],\n "next_cursor": {\n "event_time": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n }\n}\n```\n\n</details>\n\n---\n\n### `getHistoricalEvent`\n\nFetch a single historical event by id with full hydration\n\n`GET /v2/events/{event_name}/history/{event_id}`\n\n```ts\nconst { data } = await client.getHistoricalEvent({\n event_name: \'example\',\n event_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_org_id": "org_123456",\n "_event_time": "2024-01-01T12:00:00Z",\n "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",\n "_event_name": "MeterReading",\n "_event_version": "1.0",\n "_event_source": "api",\n "_trigger_source_type": "api",\n "_trigger_source": "user_123456",\n "reading_value": 123.45,\n "reading_date": "2024-01-01T11:59:00Z",\n "read_by": "John Doe",\n "reason": "regular",\n "direction": "feed-out",\n "source": "portal",\n "meter_id": "550e8400-e29b-41d4-a716-446655440000",\n "counter_id": "660e8400-e29b-41d4-a716-446655440000",\n "meter_number": "MT123456789",\n "obis_number": "1-0:1.8.0",\n "unit": "kWh",\n "customer_id": "770e8400-e29b-41d4-a716-446655440000",\n "contract_id": "880e8400-e29b-41d4-a716-446655440000"\n}\n```\n\n</details>\n\n---\n\n### `triggerEvent`\n\nExplicitly trigger an event by providing input field values and an optional entity seed\nfor graph hydration. The event must be enabled for the organization.\n\n`POST /v1/events/{event_name}:trigger`\n\n```ts\nconst { data } = await client.triggerEvent(\n {\n event_name: \'example\',\n },\n {\n seed: {\n entity_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n node_id: \'ticket\'\n },\n _trigger_source_type: \'automation\',\n _trigger_source: \'execution-id/action-id\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "success": true,\n "event_id": "string",\n "event_bridge_event_id": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `EventConfigBase`\n\nBase properties shared between EventConfig and UpdateEventPayload\n\n```ts\ntype EventConfigBase = {\n event_name?: string\n event_title?: string\n event_description?: string\n event_version?: string\n event_status?: "active" | "deprecated" | "draft" | "disabled"\n event_tags?: string[]\n schema_fields?: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n } | {\n items: {\n entity_id: { ... }\n filename?: { ... }\n mime_type?: { ... }\n size_bytes?: { ... }\n s3ref?: { ... }\n version_index: { ... }\n readable_size?: { ... }\n }\n required?: boolean\n }>\n entity_graph?: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n purpose_filters?: Array<{\n id: { ... }\n display_name: { ... }\n }>\n }\n enabled?: boolean\n auto_trigger?: boolean\n automation_trigger?: boolean\n api_trigger?: boolean\n automation_trigger_only?: boolean\n automation_trigger_seed_node?: string\n event_origin?: "builtin" | "custom"\n mapping?: {\n mode: "guided" | "jsonata"\n jsonata?: string\n }\n lineage?: {\n base_event_name: string\n base_event_version: string\n }\n success_criteria?: Array<{\n entity_schema: string\n attribute: string\n }>\n}\n```\n\n### `EventConfig`\n\nEvent configuration with required fields\n\n```ts\ntype EventConfig = {\n event_name: string\n event_title?: string\n event_description?: string\n event_version: string\n event_status?: "active" | "deprecated" | "draft" | "disabled"\n event_tags?: string[]\n schema_fields: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n } | {\n items: {\n entity_id: { ... }\n filename?: { ... }\n mime_type?: { ... }\n size_bytes?: { ... }\n s3ref?: { ... }\n version_index: { ... }\n readable_size?: { ... }\n }\n required?: boolean\n }>\n entity_graph?: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n purpose_filters?: Array<{\n id: { ... }\n display_name: { ... }\n }>\n }\n enabled?: boolean\n auto_trigger?: boolean\n automation_trigger?: boolean\n api_trigger?: boolean\n automation_trigger_only?: boolean\n automation_trigger_seed_node?: string\n event_origin?: "builtin" | "custom"\n mapping?: {\n mode: "guided" | "jsonata"\n jsonata?: string\n }\n lineage?: {\n base_event_name: string\n base_event_version: string\n }\n success_criteria?: Array<{\n entity_schema: string\n attribute: string\n }>\n}\n```\n\n### `CreateCustomEventPayload`\n\nComplete immutable custom-event v1.0 definition projected from a required entity graph. Publication is a separate conditional action.\n\n```ts\ntype CreateCustomEventPayload = {\n event_name: string\n event_title: string\n event_description?: string\n event_tags?: string[]\n schema_fields: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n }>\n entity_graph: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n purpose_filters?: Array<{\n id: { ... }\n display_name: { ... }\n }>\n }\n automation_trigger?: boolean\n api_trigger?: boolean\n automation_trigger_only?: boolean\n automation_trigger_seed_node?: string\n mapping?: {\n mode: "guided" | "jsonata"\n jsonata?: string\n }\n lineage?: {\n base_event_name: string\n base_event_version: string\n }\n example?: Record<string, unknown>\n}\n```\n\n### `EventMapping`\n\nGuided mappings use schema_fields graph_source expressions; raw mode evaluates one JSONata object transform.\n\n```ts\ntype EventMapping = {\n mode: "guided" | "jsonata"\n jsonata?: string\n}\n```\n\n### `CustomEventLineage`\n\nOptional catalog lineage to a separately named base event. Built-in inheritance is validated against this exact registered version; its trigger restrictions cannot be removed or replaced. It does not replace the base event.\n\n```ts\ntype CustomEventLineage = {\n base_event_name: string\n base_event_version: string\n}\n```\n\n### `PurposeFilterSnapshot`\n\n```ts\ntype PurposeFilterSnapshot = {\n id: string\n display_name: string\n}\n```\n\n### `PublishCustomEventPayload`\n\n```ts\ntype PublishCustomEventPayload = {\n enabled?: boolean\n auto_trigger?: boolean\n base_auto_trigger_enabled?: boolean\n}\n```\n\n### `ValidationIssue`\n\n```ts\ntype ValidationIssue = {\n path: string\n message: string\n}\n```\n\n### `PreviewEventResponse`\n\n```ts\ntype PreviewEventResponse = {\n payload: Record<string, unknown>\n errors: Array<{\n path: string\n message: string\n }>\n}\n```\n\n### `UpdateEventPayload`\n\nMutable org activation overlay. Immutable event definition fields are not accepted.\n\n```ts\ntype UpdateEventPayload = {\n enabled?: boolean\n auto_trigger?: boolean\n success_criteria?: Array<{\n entity_schema: string\n attribute: string\n }>\n}\n```\n\n### `PrimitiveField`\n\nA primitive JSON Schema field definition\n\n```ts\ntype PrimitiveField = {\n json_schema: object\n required?: boolean\n graph_source?: string\n}\n```\n\n### `ContextEntity`\n\n```ts\ntype ContextEntity = {\n entity_schema: string\n required?: boolean\n}\n```\n\n### `AttachmentField`\n\nA schema field representing file attachments associated with the event.\nPresent in schema_fields for events tagged with "attachment".\n\n\n```ts\ntype AttachmentField = {\n items: {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n version_index: number\n readable_size?: string\n }\n required?: boolean\n}\n```\n\n### `CustomSchemaField`\n\nCustom v1 fields support graph-projected JSON Schema values and context entities; attachment semantics are built-in-only.\n\n```ts\ntype CustomSchemaField = {\n json_schema: object\n required?: boolean\n graph_source?: string\n} | {\n entity_schema: string\n required?: boolean\n}\n```\n\n### `SchemaField`\n\n```ts\ntype SchemaField = {\n json_schema: object\n required?: boolean\n graph_source?: string\n} | {\n entity_schema: string\n required?: boolean\n} | {\n items: {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n version_index: number\n readable_size?: string\n }\n required?: boolean\n}\n```\n\n### `SuccessCriterion`\n\nA single org-defined success criterion: an entity attribute that must be captured\nfor this event\'s change request to be considered complete.\n\nIdentity is the entity schema plus the attribute name \u2014 mirroring the\nEntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both\n`attribut\n\n```ts\ntype SuccessCriterion = {\n entity_schema: string\n attribute: string\n}\n```\n\n### `CommonEventMetadata`\n\nCommon metadata fields present in all event payloads\n\n```ts\ntype CommonEventMetadata = object\n```\n\n### `EventJsonSchema`\n\nJSON Schema declaring the event payload structure\n\n```ts\ntype EventJsonSchema = object\n```\n\n### `InlineDowngradeStep`\n\nOne step of an event\'s inline `_downgrades` chain. Maps the current-version payload to the previous version via a JSONata expression. Stamped by Event Catalog at publish time; executed by consumers during walk-back, never by EC itself.\n\n```ts\ntype InlineDowngradeStep = {\n to: string\n jsonata: string\n}\n```\n\n### `Event`\n\nAn event instance in the event history\n\n```ts\ntype Event = {\n _org_id: string\n _event_time: string // date-time\n _event_id: string\n _event_name: string\n _event_version: string\n _event_source: string\n _trigger_source_type?: string\n _trigger_source?: string\n _ack_id?: string\n _downgrades?: Array<{\n to: string\n jsonata: string\n }>\n _automation_chain?: string[]\n}\n```\n\n### `EventSummary`\n\nA lightweight event summary returned by the v2 history endpoint.\n\nIncludes the standard `_*` metadata fields plus a projected subset of the\nevent payload. Hydrated entity objects (values carrying `_schema` or `_id`)\n\u2014 and arrays of such objects \u2014 are reduced to reference stubs\n`{_schema, _id, _title\n\n```ts\ntype EventSummary = {\n _org_id: string\n _event_time: string // date-time\n _event_id: string\n _event_name: string\n _event_version: string\n _event_source: string\n _trigger_source_type?: string\n _trigger_source?: string\n _ack_id?: string\n}\n```\n\n### `GraphDefinition`\n\nEntity graph definition for resolving related entities\n\n```ts\ntype GraphDefinition = {\n nodes: Array<{\n id: string\n schema: string\n cardinality?: "one" | "many"\n fields?: object\n }>\n edges: Array<{\n from: string\n to: string\n }>\n}\n```\n\n### `GraphNode`\n\nA node in the entity graph\n\n```ts\ntype GraphNode = {\n id: string\n schema: string\n cardinality?: "one" | "many"\n fields?: object\n}\n```\n\n### `GraphEdge`\n\nAn edge connecting two nodes in the graph\n\n```ts\ntype GraphEdge = {\n from: string\n to: string\n}\n```\n\n### `EntityOperationTrigger`\n\nConfiguration for triggering an event based on entity operations.\n\nWhen an entity operation matches the configured criteria, the event will be triggered.\n- On createEntity: the attribute must be present in the entity payload\n- On updateEntity: the attribute must be in diff.added, diff.updated, or di\n\n```ts\ntype EntityOperationTrigger = {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n purpose_filters?: Array<{\n id: string\n display_name: string\n }>\n}\n```\n\n### `SearchOptions`\n\n```ts\ntype SearchOptions = {\n limit?: number\n cursor?: {\n event_time?: string\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n}\n```\n\n### `SearchOptionsV2`\n\nSearch options for the v2 history endpoint.\n\nExtends `SearchOptions` with an optional `fields` projection. When `fields`\nis omitted, the response includes all `_*` metadata plus all scalar payload\nfields (and primitive arrays / empty objects/arrays) after entity stripping.\nWhen `fields` is provided,\n\n```ts\ntype SearchOptionsV2 = {\n limit?: number\n cursor?: {\n event_time?: string\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n fields?: string[]\n}\n```\n\n### `FieldsParam`\n\nList of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n\n\n```ts\ntype FieldsParam = string[]\n```\n\n### `TriggerEventPayload`\n\nPayload for explicitly triggering an event via API\n\n```ts\ntype TriggerEventPayload = {\n seed?: {\n entity_id: string // uuid\n node_id: string\n }\n fields?: Record<string, unknown>\n skip_hydration?: string[]\n _trigger_source_type?: string\n _trigger_source?: string\n _automation_chain?: string[]\n}\n```\n\n### `TriggerEventResponse`\n\nResponse from triggering an event\n\n```ts\ntype TriggerEventResponse = {\n success: boolean\n event_id: string\n event_bridge_event_id?: string\n}\n```\n\n### `EventAttachment`\n\nA file attachment associated with an event\n\n```ts\ntype EventAttachment = {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: string\n key: string\n }\n version_index: number\n readable_size?: string\n}\n```\n\n### `FieldChange`\n\nA field-level change descriptor. Powers the declarative half of the\nversion DSL.\n\n\n```ts\ntype FieldChange = {\n field: string\n op: "added" | "removed" | "type-changed"\n type_old?: string\n type_new?: string\n}\n```\n\n### `VersionMeta`\n\nOne entry of an event\'s version timeline.\n\n```ts\ntype VersionMeta = {\n version: string\n released_at: string\n change_summary: string\n change_notes?: string\n changes: Array<{\n field: string\n op: "added" | "removed" | "type-changed"\n type_old?: string\n type_new?: string\n }>\n}\n```\n\n### `EventVersionRegistrySummary`\n\nSummary of an event\'s version timeline returned by\n`GET /v1/events/{event_name}/versions`.\n\n\n```ts\ntype EventVersionRegistrySummary = {\n event_name: string\n latest: string\n versions: Array<{\n version: string\n released_at: string\n change_summary: string\n change_notes?: string\n changes: Array<{\n field: { ... }\n op: { ... }\n type_old?: { ... }\n type_new?: { ... }\n }>\n }>\n}\n```\n';
5
+ export {
6
+ event_catalog_default as default
7
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
+
3
+ // src/docs/event-catalog.json
4
+ var event_catalog_default = '# Event Catalog API\n\n- **Base URL:** `https://event-catalog.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/event-catalog](https://docs.epilot.io/api/event-catalog)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.eventCatalog.listEvents(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/event-catalog\'\n\nconst eventCatalogClient = getClient()\nauthorize(eventCatalogClient, () => \'<token>\')\nconst { data } = await eventCatalogClient.listEvents(...)\n```\n\n## Operations\n\n**Event Catalog**\n- [`listEvents`](#listevents)\n- [`createCustomEvent`](#createcustomevent)\n- [`getEvent`](#getevent)\n- [`patchEvent`](#patchevent)\n- [`replaceCustomEventDraft`](#replacecustomeventdraft)\n- [`deprecateCustomEvent`](#deprecatecustomevent)\n- [`previewCustomEvent`](#previewcustomevent)\n- [`publishCustomEventDefinition`](#publishcustomeventdefinition)\n- [`getEventJSONSchema`](#geteventjsonschema)\n- [`getEventExample`](#geteventexample)\n- [`listEventVersions`](#listeventversions)\n- [`searchEventHistory`](#searcheventhistory)\n- [`searchEventHistoryV2`](#searcheventhistoryv2)\n- [`getHistoricalEvent`](#gethistoricalevent)\n- [`triggerEvent`](#triggerevent)\n\n**Schemas**\n- [`EventConfigBase`](#eventconfigbase)\n- [`EventConfig`](#eventconfig)\n- [`CreateCustomEventPayload`](#createcustomeventpayload)\n- [`EventMapping`](#eventmapping)\n- [`CustomEventLineage`](#customeventlineage)\n- [`PurposeFilterSnapshot`](#purposefiltersnapshot)\n- [`PublishCustomEventPayload`](#publishcustomeventpayload)\n- [`ValidationIssue`](#validationissue)\n- [`PreviewEventResponse`](#previeweventresponse)\n- [`UpdateEventPayload`](#updateeventpayload)\n- [`PrimitiveField`](#primitivefield)\n- [`ContextEntity`](#contextentity)\n- [`AttachmentField`](#attachmentfield)\n- [`CustomSchemaField`](#customschemafield)\n- [`SchemaField`](#schemafield)\n- [`SuccessCriterion`](#successcriterion)\n- [`CommonEventMetadata`](#commoneventmetadata)\n- [`EventJsonSchema`](#eventjsonschema)\n- [`InlineDowngradeStep`](#inlinedowngradestep)\n- [`Event`](#event)\n- [`EventSummary`](#eventsummary)\n- [`GraphDefinition`](#graphdefinition)\n- [`GraphNode`](#graphnode)\n- [`GraphEdge`](#graphedge)\n- [`EntityOperationTrigger`](#entityoperationtrigger)\n- [`SearchOptions`](#searchoptions)\n- [`SearchOptionsV2`](#searchoptionsv2)\n- [`FieldsParam`](#fieldsparam)\n- [`TriggerEventPayload`](#triggereventpayload)\n- [`TriggerEventResponse`](#triggereventresponse)\n- [`EventAttachment`](#eventattachment)\n- [`FieldChange`](#fieldchange)\n- [`VersionMeta`](#versionmeta)\n- [`EventVersionRegistrySummary`](#eventversionregistrysummary)\n\n### `listEvents`\n\nRetrieve list of available business events\n\n`GET /v1/events`\n\n```ts\nconst { data } = await client.listEvents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createCustomEvent`\n\nReserve an org-scoped custom event name and persist its immutable v1.0 draft definition. Custom events are always projected from an entity graph: entity_graph is required and, in guided mapping mode, \n\n`POST /v1/events`\n\n```ts\nconst { data } = await client.createCustomEvent(\n null,\n {\n event_name: \'string\',\n event_title: \'string\',\n event_description: \'string\',\n event_tags: [\'string\'],\n schema_fields: {},\n entity_graph: {\n nodes: [\n {\n id: \'contact\',\n schema: \'contact\',\n cardinality: \'one\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\']\n }\n ],\n edges: [\n {\n from: \'contact\',\n to: \'billing_account\'\n }\n ]\n },\n entity_operation: {\n operation: [\'createEntity\', \'updateEntity\'],\n schema: [\'contact\', \'contract\', \'order\'],\n attribute: [\'email\', \'phone\', \'status\'],\n purpose: [\'K\xFCndigung\', \'Umzug/Auszug\'],\n purpose_filters: [\n {\n id: \'string\',\n display_name: \'string\'\n }\n ]\n },\n automation_trigger: true,\n api_trigger: true,\n automation_trigger_only: false,\n automation_trigger_seed_node: \'string\',\n mapping: {\n mode: \'guided\',\n jsonata: \'string\'\n },\n lineage: {\n base_event_name: \'string\',\n base_event_version: \'string\'\n },\n example: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getEvent`\n\nRetrieve the configuration of a specific business event\n\n`GET /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.getEvent({\n event_name: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `patchEvent`\n\nUpdate the configuration of a specific business event for the organization\n\n`PATCH /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.patchEvent(\n {\n event_name: \'example\',\n },\n {\n enabled: true,\n auto_trigger: true,\n success_criteria: [\n {\n entity_schema: \'contract\',\n attribute: \'installment_amount\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `replaceCustomEventDraft`\n\nReplace the complete v1.0 definition of an org-scoped custom event while it is still an\nunpublished draft. Drafts have no consumers, so their definition is not yet immutable;\nthe event name is the ide\n\n`PUT /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.replaceCustomEventDraft(\n {\n event_name: \'example\',\n },\n {\n event_name: \'string\',\n event_title: \'string\',\n event_description: \'string\',\n event_tags: [\'string\'],\n schema_fields: {},\n entity_graph: {\n nodes: [\n {\n id: \'contact\',\n schema: \'contact\',\n cardinality: \'one\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\']\n }\n ],\n edges: [\n {\n from: \'contact\',\n to: \'billing_account\'\n }\n ]\n },\n entity_operation: {\n operation: [\'createEntity\', \'updateEntity\'],\n schema: [\'contact\', \'contract\', \'order\'],\n attribute: [\'email\', \'phone\', \'status\'],\n purpose: [\'K\xFCndigung\', \'Umzug/Auszug\'],\n purpose_filters: [\n {\n id: \'string\',\n display_name: \'string\'\n }\n ]\n },\n automation_trigger: true,\n api_trigger: true,\n automation_trigger_only: false,\n automation_trigger_seed_node: \'string\',\n mapping: {\n mode: \'guided\',\n jsonata: \'string\'\n },\n lineage: {\n base_event_name: \'string\',\n base_event_version: \'string\'\n },\n example: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `deprecateCustomEvent`\n\nSoft-deprecate an org-scoped custom event. Definitions and v1.0 history remain readable.\n\n`DELETE /v1/events/{event_name}`\n\n```ts\nconst { data } = await client.deprecateCustomEvent({\n event_name: \'example\',\n})\n```\n\n---\n\n### `previewCustomEvent`\n\nAssemble and fully validate a persisted custom-event draft without publishing it.\n\n`POST /v1/events/{event_name}:preview`\n\n```ts\nconst { data } = await client.previewCustomEvent(\n {\n event_name: \'example\',\n },\n {\n seed: {\n entity_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n node_id: \'ticket\'\n },\n _trigger_source_type: \'automation\',\n _trigger_source: \'execution-id/action-id\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "payload": {},\n "errors": [\n {\n "path": "string",\n "message": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `publishCustomEventDefinition`\n\nConditionally activate an immutable custom-event v1.0 definition.\n\n`POST /v1/events/{event_name}:publish`\n\n```ts\nconst { data } = await client.publishCustomEventDefinition(\n {\n event_name: \'example\',\n },\n {\n enabled: true,\n auto_trigger: true,\n base_auto_trigger_enabled: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "AddMeterReading",\n "event_title": "Add Meter Reading",\n "event_description": "Triggered when a new meter reading is added",\n "event_version": "1.0",\n "event_status": "active",\n "event_tags": ["builtin", "metering", "erp"],\n "schema_fields": {},\n "entity_graph": {\n "nodes": [\n {\n "id": "contact",\n "schema": "contact",\n "cardinality": "one",\n "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]\n }\n ],\n "edges": [\n {\n "from": "contact",\n "to": "billing_account"\n }\n ]\n },\n "entity_operation": {\n "operation": ["createEntity", "updateEntity"],\n "schema": ["contact", "contract", "order"],\n "attribute": ["email", "phone", "status"],\n "purpose": ["K\xFCndigung", "Umzug/Auszug"],\n "purpose_filters": [\n {\n "id": "string",\n "display_name": "string"\n }\n ]\n },\n "enabled": true,\n "auto_trigger": true,\n "automation_trigger": true,\n "api_trigger": true,\n "automation_trigger_only": true,\n "automation_trigger_seed_node": "ticket",\n "event_origin": "builtin",\n "mapping": {\n "mode": "guided",\n "jsonata": "string"\n },\n "lineage": {\n "base_event_name": "string",\n "base_event_version": "string"\n },\n "success_criteria": [\n {\n "entity_schema": "contract",\n "attribute": "installment_amount"\n },\n {\n "entity_schema": "billing_account",\n "attribute": "due_date"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getEventJSONSchema`\n\nRetrieve the JSON Schema of a specific business event. Pass an optional\n`Epilot-Event-Version` header to retrieve a specific version\'s schema;\nwhen omitted, the event\'s latest version is returned.\n\n`GET /v1/events/{event_name}/json_schema`\n\n```ts\nconst { data } = await client.getEventJSONSchema({\n event_name: \'example\',\n Epilot-Event-Version: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "object",\n "properties": {\n "_org_id": {\n "type": "string",\n "description": "epilot tenant/organization ID"\n },\n "_event_time": {\n "type": "string",\n "format": "date-time",\n "description": "ISO 8601 timestamp when event occurred"\n },\n "_event_id": {\n "type": "string",\n "description": "Unique event identifier (ULID)"\n },\n "_event_name": {\n "type": "string",\n "description": "Event name from catalog"\n },\n "_event_version": {\n "type": "string",\n "description": "Event payload version (MAJOR.MINOR)"\n },\n "_event_source": {\n "type": "string",\n "description": "Source that triggered the event"\n },\n "reading_value": {\n "type": "number",\n "description": "The meter reading value"\n },\n "reading_date": {\n "type": "string",\n "format": "date-time",\n "description": "ISO 8601 timestamp when reading was taken"\n },\n "read_by": {\n "type": "string",\n "description": "Name or identifier of who submitted the reading"\n },\n "reason": {\n "type": "string",\n "enum": ["regular", "move-in", "move-out", "supplier-change", "correction", "final"],\n "description": "Reason for the meter reading"\n },\n "direction": {\n "type": "string",\n "enum": ["feed-in", "feed-out"],\n "description": "Direction of energy flow"\n },\n "source": {\n "type": "string",\n "enum": ["portal", "360", "api", "automation"],\n "description": "Source system where reading was submitted"\n },\n "meter_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the meter"\n },\n "counter_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the meter counter"\n },\n "meter_number": {\n "type": "string",\n "description": "Human-readable meter number"\n },\n "obis_number": {\n "type": "string",\n "description": "OBIS code of the counter"\n },\n "unit": {\n "type": "string",\n "description": "Unit of measurement (e.g., kWh, m3)"\n },\n "customer_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the customer"\n },\n "contract_id": {\n "type": "string",\n "format": "uuid",\n "description": "Entity ID of the contract"\n },\n "user_id": {\n "type": "string",\n "description": "ID of the user who submitted the reading"\n },\n "user_email": {\n "type": "string",\n "format": "email",\n "description": "Email of the user who submitted the reading"\n }\n },\n "required": ["_org_id", "_event_time", "_event_id", "_event_name", "_event_version", "_event_source", "reading_value", "reading_date", "read_by", "reason", "direction", "source", "meter_id", "counter_id", "meter_number", "obis_number", "unit", "customer_id", "contract_id"]\n}\n```\n\n</details>\n\n---\n\n### `getEventExample`\n\nGenerate a sample event payload based on the event\'s JSON Schema. Pass an\noptional `Epilot-Event-Version` header to generate the example for a\nspecific version; when omitted, the event\'s latest versio\n\n`GET /v1/events/{event_name}/example`\n\n```ts\nconst { data } = await client.getEventExample({\n event_name: \'example\',\n Epilot-Event-Version: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{}\n```\n\n</details>\n\n---\n\n### `listEventVersions`\n\nList every known version of an event, along with the `latest`\nand the set of currently `active` versions. See \xA73.2 of the\nEvent Payload Versioning RFC.\n\n`GET /v1/events/{event_name}/versions`\n\n```ts\nconst { data } = await client.listEventVersions({\n event_name: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_name": "MeterReadingAdded",\n "latest": "1.0",\n "versions": [\n {\n "version": "1.0",\n "released_at": "2025-11-15",\n "change_summary": "string",\n "change_notes": "string",\n "changes": [\n {\n "field": "reading",\n "op": "added",\n "type_old": "string",\n "type_new": "string"\n }\n ]\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `searchEventHistory`\n\nPaginated history of events\n\n`POST /v1/events/{event_name}:history`\n\n```ts\nconst { data } = await client.searchEventHistory(\n {\n event_name: \'example\',\n },\n {\n limit: 10,\n cursor: {\n event_time: \'2025-10-31 12:34:56\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_org_id": "org_123456",\n "_event_time": "2024-01-01T12:00:00Z",\n "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",\n "_event_name": "MeterReading",\n "_event_version": "1.0",\n "_event_source": "api",\n "_trigger_source_type": "api",\n "_trigger_source": "user_123456",\n "reading_value": 123.45,\n "reading_date": "2024-01-01T11:59:00Z",\n "read_by": "John Doe",\n "reason": "regular",\n "direction": "feed-out",\n "source": "portal",\n "meter_id": "550e8400-e29b-41d4-a716-446655440000",\n "counter_id": "660e8400-e29b-41d4-a716-446655440000",\n "meter_number": "MT123456789",\n "obis_number": "1-0:1.8.0",\n "unit": "kWh",\n "customer_id": "770e8400-e29b-41d4-a716-446655440000",\n "contract_id": "880e8400-e29b-41d4-a716-446655440000"\n }\n ],\n "next_cursor": {\n "event_time": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n }\n}\n```\n\n</details>\n\n---\n\n### `searchEventHistoryV2`\n\nPaginated history of events with projected/lightweight payload (v2).\n\n`POST /v2/events/{event_name}:history`\n\n```ts\nconst { data } = await client.searchEventHistoryV2(\n {\n event_name: \'example\',\n },\n {\n limit: 10,\n cursor: {\n event_time: \'2025-10-31 12:34:56\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "_org_id": "string",\n "_event_time": "1970-01-01T00:00:00.000Z",\n "_event_id": "string",\n "_event_name": "string",\n "_event_version": "1.0",\n "_event_source": "string",\n "_trigger_source_type": "api",\n "_trigger_source": "string",\n "_ack_id": "string"\n }\n ],\n "next_cursor": {\n "event_time": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n }\n}\n```\n\n</details>\n\n---\n\n### `getHistoricalEvent`\n\nFetch a single historical event by id with full hydration\n\n`GET /v2/events/{event_name}/history/{event_id}`\n\n```ts\nconst { data } = await client.getHistoricalEvent({\n event_name: \'example\',\n event_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_org_id": "org_123456",\n "_event_time": "2024-01-01T12:00:00Z",\n "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",\n "_event_name": "MeterReading",\n "_event_version": "1.0",\n "_event_source": "api",\n "_trigger_source_type": "api",\n "_trigger_source": "user_123456",\n "reading_value": 123.45,\n "reading_date": "2024-01-01T11:59:00Z",\n "read_by": "John Doe",\n "reason": "regular",\n "direction": "feed-out",\n "source": "portal",\n "meter_id": "550e8400-e29b-41d4-a716-446655440000",\n "counter_id": "660e8400-e29b-41d4-a716-446655440000",\n "meter_number": "MT123456789",\n "obis_number": "1-0:1.8.0",\n "unit": "kWh",\n "customer_id": "770e8400-e29b-41d4-a716-446655440000",\n "contract_id": "880e8400-e29b-41d4-a716-446655440000"\n}\n```\n\n</details>\n\n---\n\n### `triggerEvent`\n\nExplicitly trigger an event by providing input field values and an optional entity seed\nfor graph hydration. The event must be enabled for the organization.\n\n`POST /v1/events/{event_name}:trigger`\n\n```ts\nconst { data } = await client.triggerEvent(\n {\n event_name: \'example\',\n },\n {\n seed: {\n entity_id: \'3fa85f64-5717-4562-b3fc-2c963f66afa6\',\n node_id: \'ticket\'\n },\n _trigger_source_type: \'automation\',\n _trigger_source: \'execution-id/action-id\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "success": true,\n "event_id": "string",\n "event_bridge_event_id": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `EventConfigBase`\n\nBase properties shared between EventConfig and UpdateEventPayload\n\n```ts\ntype EventConfigBase = {\n event_name?: string\n event_title?: string\n event_description?: string\n event_version?: string\n event_status?: "active" | "deprecated" | "draft" | "disabled"\n event_tags?: string[]\n schema_fields?: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n } | {\n items: {\n entity_id: { ... }\n filename?: { ... }\n mime_type?: { ... }\n size_bytes?: { ... }\n s3ref?: { ... }\n version_index: { ... }\n readable_size?: { ... }\n }\n required?: boolean\n }>\n entity_graph?: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n purpose_filters?: Array<{\n id: { ... }\n display_name: { ... }\n }>\n }\n enabled?: boolean\n auto_trigger?: boolean\n automation_trigger?: boolean\n api_trigger?: boolean\n automation_trigger_only?: boolean\n automation_trigger_seed_node?: string\n event_origin?: "builtin" | "custom"\n mapping?: {\n mode: "guided" | "jsonata"\n jsonata?: string\n }\n lineage?: {\n base_event_name: string\n base_event_version: string\n }\n success_criteria?: Array<{\n entity_schema: string\n attribute: string\n }>\n}\n```\n\n### `EventConfig`\n\nEvent configuration with required fields\n\n```ts\ntype EventConfig = {\n event_name: string\n event_title?: string\n event_description?: string\n event_version: string\n event_status?: "active" | "deprecated" | "draft" | "disabled"\n event_tags?: string[]\n schema_fields: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n } | {\n items: {\n entity_id: { ... }\n filename?: { ... }\n mime_type?: { ... }\n size_bytes?: { ... }\n s3ref?: { ... }\n version_index: { ... }\n readable_size?: { ... }\n }\n required?: boolean\n }>\n entity_graph?: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n purpose_filters?: Array<{\n id: { ... }\n display_name: { ... }\n }>\n }\n enabled?: boolean\n auto_trigger?: boolean\n automation_trigger?: boolean\n api_trigger?: boolean\n automation_trigger_only?: boolean\n automation_trigger_seed_node?: string\n event_origin?: "builtin" | "custom"\n mapping?: {\n mode: "guided" | "jsonata"\n jsonata?: string\n }\n lineage?: {\n base_event_name: string\n base_event_version: string\n }\n success_criteria?: Array<{\n entity_schema: string\n attribute: string\n }>\n}\n```\n\n### `CreateCustomEventPayload`\n\nComplete immutable custom-event v1.0 definition projected from a required entity graph. Publication is a separate conditional action.\n\n```ts\ntype CreateCustomEventPayload = {\n event_name: string\n event_title: string\n event_description?: string\n event_tags?: string[]\n schema_fields: Record<string, {\n json_schema: object\n required?: boolean\n graph_source?: string\n } | {\n entity_schema: string\n required?: boolean\n }>\n entity_graph: {\n nodes: Array<{\n id: { ... }\n schema: { ... }\n cardinality?: { ... }\n fields?: { ... }\n }>\n edges: Array<{\n from: { ... }\n to: { ... }\n }>\n }\n entity_operation?: {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n purpose_filters?: Array<{\n id: { ... }\n display_name: { ... }\n }>\n }\n automation_trigger?: boolean\n api_trigger?: boolean\n automation_trigger_only?: boolean\n automation_trigger_seed_node?: string\n mapping?: {\n mode: "guided" | "jsonata"\n jsonata?: string\n }\n lineage?: {\n base_event_name: string\n base_event_version: string\n }\n example?: Record<string, unknown>\n}\n```\n\n### `EventMapping`\n\nGuided mappings use schema_fields graph_source expressions; raw mode evaluates one JSONata object transform.\n\n```ts\ntype EventMapping = {\n mode: "guided" | "jsonata"\n jsonata?: string\n}\n```\n\n### `CustomEventLineage`\n\nOptional catalog lineage to a separately named base event. Built-in inheritance is validated against this exact registered version; its trigger restrictions cannot be removed or replaced. It does not replace the base event.\n\n```ts\ntype CustomEventLineage = {\n base_event_name: string\n base_event_version: string\n}\n```\n\n### `PurposeFilterSnapshot`\n\n```ts\ntype PurposeFilterSnapshot = {\n id: string\n display_name: string\n}\n```\n\n### `PublishCustomEventPayload`\n\n```ts\ntype PublishCustomEventPayload = {\n enabled?: boolean\n auto_trigger?: boolean\n base_auto_trigger_enabled?: boolean\n}\n```\n\n### `ValidationIssue`\n\n```ts\ntype ValidationIssue = {\n path: string\n message: string\n}\n```\n\n### `PreviewEventResponse`\n\n```ts\ntype PreviewEventResponse = {\n payload: Record<string, unknown>\n errors: Array<{\n path: string\n message: string\n }>\n}\n```\n\n### `UpdateEventPayload`\n\nMutable org activation overlay. Immutable event definition fields are not accepted.\n\n```ts\ntype UpdateEventPayload = {\n enabled?: boolean\n auto_trigger?: boolean\n success_criteria?: Array<{\n entity_schema: string\n attribute: string\n }>\n}\n```\n\n### `PrimitiveField`\n\nA primitive JSON Schema field definition\n\n```ts\ntype PrimitiveField = {\n json_schema: object\n required?: boolean\n graph_source?: string\n}\n```\n\n### `ContextEntity`\n\n```ts\ntype ContextEntity = {\n entity_schema: string\n required?: boolean\n}\n```\n\n### `AttachmentField`\n\nA schema field representing file attachments associated with the event.\nPresent in schema_fields for events tagged with "attachment".\n\n\n```ts\ntype AttachmentField = {\n items: {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n version_index: number\n readable_size?: string\n }\n required?: boolean\n}\n```\n\n### `CustomSchemaField`\n\nCustom v1 fields support graph-projected JSON Schema values and context entities; attachment semantics are built-in-only.\n\n```ts\ntype CustomSchemaField = {\n json_schema: object\n required?: boolean\n graph_source?: string\n} | {\n entity_schema: string\n required?: boolean\n}\n```\n\n### `SchemaField`\n\n```ts\ntype SchemaField = {\n json_schema: object\n required?: boolean\n graph_source?: string\n} | {\n entity_schema: string\n required?: boolean\n} | {\n items: {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n version_index: number\n readable_size?: string\n }\n required?: boolean\n}\n```\n\n### `SuccessCriterion`\n\nA single org-defined success criterion: an entity attribute that must be captured\nfor this event\'s change request to be considered complete.\n\nIdentity is the entity schema plus the attribute name \u2014 mirroring the\nEntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both\n`attribut\n\n```ts\ntype SuccessCriterion = {\n entity_schema: string\n attribute: string\n}\n```\n\n### `CommonEventMetadata`\n\nCommon metadata fields present in all event payloads\n\n```ts\ntype CommonEventMetadata = object\n```\n\n### `EventJsonSchema`\n\nJSON Schema declaring the event payload structure\n\n```ts\ntype EventJsonSchema = object\n```\n\n### `InlineDowngradeStep`\n\nOne step of an event\'s inline `_downgrades` chain. Maps the current-version payload to the previous version via a JSONata expression. Stamped by Event Catalog at publish time; executed by consumers during walk-back, never by EC itself.\n\n```ts\ntype InlineDowngradeStep = {\n to: string\n jsonata: string\n}\n```\n\n### `Event`\n\nAn event instance in the event history\n\n```ts\ntype Event = {\n _org_id: string\n _event_time: string // date-time\n _event_id: string\n _event_name: string\n _event_version: string\n _event_source: string\n _trigger_source_type?: string\n _trigger_source?: string\n _ack_id?: string\n _downgrades?: Array<{\n to: string\n jsonata: string\n }>\n _automation_chain?: string[]\n}\n```\n\n### `EventSummary`\n\nA lightweight event summary returned by the v2 history endpoint.\n\nIncludes the standard `_*` metadata fields plus a projected subset of the\nevent payload. Hydrated entity objects (values carrying `_schema` or `_id`)\n\u2014 and arrays of such objects \u2014 are reduced to reference stubs\n`{_schema, _id, _title\n\n```ts\ntype EventSummary = {\n _org_id: string\n _event_time: string // date-time\n _event_id: string\n _event_name: string\n _event_version: string\n _event_source: string\n _trigger_source_type?: string\n _trigger_source?: string\n _ack_id?: string\n}\n```\n\n### `GraphDefinition`\n\nEntity graph definition for resolving related entities\n\n```ts\ntype GraphDefinition = {\n nodes: Array<{\n id: string\n schema: string\n cardinality?: "one" | "many"\n fields?: object\n }>\n edges: Array<{\n from: string\n to: string\n }>\n}\n```\n\n### `GraphNode`\n\nA node in the entity graph\n\n```ts\ntype GraphNode = {\n id: string\n schema: string\n cardinality?: "one" | "many"\n fields?: object\n}\n```\n\n### `GraphEdge`\n\nAn edge connecting two nodes in the graph\n\n```ts\ntype GraphEdge = {\n from: string\n to: string\n}\n```\n\n### `EntityOperationTrigger`\n\nConfiguration for triggering an event based on entity operations.\n\nWhen an entity operation matches the configured criteria, the event will be triggered.\n- On createEntity: the attribute must be present in the entity payload\n- On updateEntity: the attribute must be in diff.added, diff.updated, or di\n\n```ts\ntype EntityOperationTrigger = {\n operation: "createEntity" | "updateEntity" | "deleteEntity"[]\n schema: string[]\n attribute?: string[]\n purpose?: string[]\n purpose_filters?: Array<{\n id: string\n display_name: string\n }>\n}\n```\n\n### `SearchOptions`\n\n```ts\ntype SearchOptions = {\n limit?: number\n cursor?: {\n event_time?: string\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n}\n```\n\n### `SearchOptionsV2`\n\nSearch options for the v2 history endpoint.\n\nExtends `SearchOptions` with an optional `fields` projection. When `fields`\nis omitted, the response includes all `_*` metadata plus all scalar payload\nfields (and primitive arrays / empty objects/arrays) after entity stripping.\nWhen `fields` is provided,\n\n```ts\ntype SearchOptionsV2 = {\n limit?: number\n cursor?: {\n event_time?: string\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n fields?: string[]\n}\n```\n\n### `FieldsParam`\n\nList of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n\n\n```ts\ntype FieldsParam = string[]\n```\n\n### `TriggerEventPayload`\n\nPayload for explicitly triggering an event via API\n\n```ts\ntype TriggerEventPayload = {\n seed?: {\n entity_id: string // uuid\n node_id: string\n }\n fields?: Record<string, unknown>\n skip_hydration?: string[]\n _trigger_source_type?: string\n _trigger_source?: string\n _automation_chain?: string[]\n}\n```\n\n### `TriggerEventResponse`\n\nResponse from triggering an event\n\n```ts\ntype TriggerEventResponse = {\n success: boolean\n event_id: string\n event_bridge_event_id?: string\n}\n```\n\n### `EventAttachment`\n\nA file attachment associated with an event\n\n```ts\ntype EventAttachment = {\n entity_id: string // uuid\n filename?: string\n mime_type?: string\n size_bytes?: number\n s3ref?: {\n bucket: string\n key: string\n }\n version_index: number\n readable_size?: string\n}\n```\n\n### `FieldChange`\n\nA field-level change descriptor. Powers the declarative half of the\nversion DSL.\n\n\n```ts\ntype FieldChange = {\n field: string\n op: "added" | "removed" | "type-changed"\n type_old?: string\n type_new?: string\n}\n```\n\n### `VersionMeta`\n\nOne entry of an event\'s version timeline.\n\n```ts\ntype VersionMeta = {\n version: string\n released_at: string\n change_summary: string\n change_notes?: string\n changes: Array<{\n field: string\n op: "added" | "removed" | "type-changed"\n type_old?: string\n type_new?: string\n }>\n}\n```\n\n### `EventVersionRegistrySummary`\n\nSummary of an event\'s version timeline returned by\n`GET /v1/events/{event_name}/versions`.\n\n\n```ts\ntype EventVersionRegistrySummary = {\n event_name: string\n latest: string\n versions: Array<{\n version: string\n released_at: string\n change_summary: string\n change_notes?: string\n changes: Array<{\n field: { ... }\n op: { ... }\n type_old?: { ... }\n type_new?: { ... }\n }>\n }>\n}\n```\n';
5
+
6
+
7
+ exports.default = event_catalog_default;
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkMPZICOVZcjs = require('./chunk-MPZICOVZ.cjs');
3
+ var _chunk2Q6CNXJ2cjs = require('./chunk-2Q6CNXJ2.cjs');
4
4
  require('./chunk-NJK5F5TF.cjs');
5
- exports. default = _chunkMPZICOVZcjs.require_event_catalog_runtime.call(void 0, );
5
+ exports. default = _chunk2Q6CNXJ2cjs.require_event_catalog_runtime.call(void 0, );
@@ -1,5 +1,5 @@
1
1
  import {
2
2
  require_event_catalog_runtime
3
- } from "./chunk-EEKJGTAS.js";
3
+ } from "./chunk-LTCN52JS.js";
4
4
  import "./chunk-YPSWSI3M.js";
5
5
  export default require_event_catalog_runtime();
@@ -67,7 +67,7 @@ declare namespace Components {
67
67
  required?: boolean;
68
68
  }
69
69
  /**
70
- * Complete immutable custom-event v1.0 definition. Publication is a separate conditional action.
70
+ * Complete immutable custom-event v1.0 definition projected from a required entity graph. Publication is a separate conditional action.
71
71
  */
72
72
  export interface CreateCustomEventPayload {
73
73
  event_name: string; // ^[A-Z][A-Za-z0-9]{2,79}$
@@ -75,9 +75,9 @@ declare namespace Components {
75
75
  event_description?: string;
76
76
  event_tags?: string[];
77
77
  schema_fields: {
78
- [name: string]: /* Custom v1 fields support JSON Schema values and context entities; attachment semantics are built-in-only. */ CustomSchemaField;
78
+ [name: string]: /* Custom v1 fields support graph-projected JSON Schema values and context entities; attachment semantics are built-in-only. */ CustomSchemaField;
79
79
  };
80
- entity_graph?: /* Entity graph definition for resolving related entities */ GraphDefinition;
80
+ entity_graph: /* Entity graph definition for resolving related entities */ GraphDefinition;
81
81
  entity_operation?: /**
82
82
  * Configuration for triggering an event based on entity operations.
83
83
  *
@@ -89,23 +89,35 @@ declare namespace Components {
89
89
  */
90
90
  EntityOperationTrigger;
91
91
  automation_trigger?: boolean;
92
+ /**
93
+ * Allows API-source triggering independently of Automation (which also uses HTTP). Must be false for Automation-only events.
94
+ */
95
+ api_trigger?: boolean;
96
+ /**
97
+ * Restricts triggering to Automation with durable delivery and strict readiness. Requires automation_trigger true, api_trigger false, and no entity_operation.
98
+ */
99
+ automation_trigger_only?: boolean;
100
+ /**
101
+ * Required cardinality-one graph seed for an Automation-only event. Inherited restrictions cannot be changed.
102
+ */
103
+ automation_trigger_seed_node?: string;
92
104
  mapping?: /* Guided mappings use schema_fields graph_source expressions; raw mode evaluates one JSONata object transform. */ EventMapping;
93
- lineage?: /* Optional catalog lineage to a separately named base event. It does not replace the base event. */ CustomEventLineage;
105
+ lineage?: /* Optional catalog lineage to a separately named base event. Built-in inheritance is validated against this exact registered version; its trigger restrictions cannot be removed or replaced. It does not replace the base event. */ CustomEventLineage;
94
106
  example?: {
95
107
  [name: string]: any;
96
108
  };
97
109
  }
98
110
  /**
99
- * Optional catalog lineage to a separately named base event. It does not replace the base event.
111
+ * Optional catalog lineage to a separately named base event. Built-in inheritance is validated against this exact registered version; its trigger restrictions cannot be removed or replaced. It does not replace the base event.
100
112
  */
101
113
  export interface CustomEventLineage {
102
114
  base_event_name: string;
103
115
  base_event_version: string;
104
116
  }
105
117
  /**
106
- * Custom v1 fields support JSON Schema values and context entities; attachment semantics are built-in-only.
118
+ * Custom v1 fields support graph-projected JSON Schema values and context entities; attachment semantics are built-in-only.
107
119
  */
108
- export type CustomSchemaField = /* Custom v1 fields support JSON Schema values and context entities; attachment semantics are built-in-only. */ /* A primitive JSON Schema field definition */ PrimitiveField | ContextEntity;
120
+ export type CustomSchemaField = /* Custom v1 fields support graph-projected JSON Schema values and context entities; attachment semantics are built-in-only. */ /* A primitive JSON Schema field definition */ PrimitiveField | ContextEntity;
109
121
  /**
110
122
  * Configuration for triggering an event based on entity operations.
111
123
  *
@@ -141,6 +153,8 @@ declare namespace Components {
141
153
  * - On createEntity: attribute must be defined in the entity payload
142
154
  * - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
143
155
  * If not specified, all changes to matching entities will trigger the event.
156
+ * Derived built-in triggers retain every inherited attribute; additions are OR alternatives.
157
+ * An inherited unfiltered trigger cannot be narrowed by adding attribute filters.
144
158
  *
145
159
  * example:
146
160
  * [
@@ -154,7 +168,10 @@ declare namespace Components {
154
168
  * Optional list of purpose names to filter by.
155
169
  * The entity must have at least one matching purpose in its _purpose array.
156
170
  * Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
157
- * If not specified, the event triggers regardless of entity purpose.
171
+ * For custom events, names are allowed only when inherited unchanged from the actual
172
+ * pinned built-in lineage version. New purposes must use stable purpose_filters IDs.
173
+ * Names and stable IDs are OR alternatives; operation/schema/attribute conditions still apply.
174
+ * If neither purpose nor purpose_filters is specified, the event triggers regardless of purpose.
158
175
  *
159
176
  * example:
160
177
  * [
@@ -164,7 +181,7 @@ declare namespace Components {
164
181
  */
165
182
  purpose?: string[];
166
183
  /**
167
- * Stable purpose IDs plus immutable display-name snapshots for custom events.
184
+ * Stable purpose IDs plus immutable display-name snapshots for custom events. Additive to inherited purpose names (OR). Inherited unfiltered triggers cannot be narrowed.
168
185
  */
169
186
  purpose_filters?: PurposeFilterSnapshot[];
170
187
  }
@@ -392,6 +409,8 @@ declare namespace Components {
392
409
  * - On createEntity: attribute must be defined in the entity payload
393
410
  * - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
394
411
  * If not specified, all changes to matching entities will trigger the event.
412
+ * Derived built-in triggers retain every inherited attribute; additions are OR alternatives.
413
+ * An inherited unfiltered trigger cannot be narrowed by adding attribute filters.
395
414
  *
396
415
  * example:
397
416
  * [
@@ -405,7 +424,10 @@ declare namespace Components {
405
424
  * Optional list of purpose names to filter by.
406
425
  * The entity must have at least one matching purpose in its _purpose array.
407
426
  * Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
408
- * If not specified, the event triggers regardless of entity purpose.
427
+ * For custom events, names are allowed only when inherited unchanged from the actual
428
+ * pinned built-in lineage version. New purposes must use stable purpose_filters IDs.
429
+ * Names and stable IDs are OR alternatives; operation/schema/attribute conditions still apply.
430
+ * If neither purpose nor purpose_filters is specified, the event triggers regardless of purpose.
409
431
  *
410
432
  * example:
411
433
  * [
@@ -415,7 +437,7 @@ declare namespace Components {
415
437
  */
416
438
  purpose?: string[];
417
439
  /**
418
- * Stable purpose IDs plus immutable display-name snapshots for custom events.
440
+ * Stable purpose IDs plus immutable display-name snapshots for custom events. Additive to inherited purpose names (OR). Inherited unfiltered triggers cannot be narrowed.
419
441
  */
420
442
  purpose_filters?: PurposeFilterSnapshot[];
421
443
  };
@@ -450,6 +472,10 @@ declare namespace Components {
450
472
  * true
451
473
  */
452
474
  automation_trigger?: boolean;
475
+ /**
476
+ * Allows explicit API-source triggering, not HTTP transport. Automation also uses HTTP. Automation-only events always disable this source.
477
+ */
478
+ api_trigger?: boolean;
453
479
  /**
454
480
  * Whether explicit triggering is restricted to Automation. When true, callers must pass
455
481
  * `_trigger_source_type: automation` and a stable `_trigger_source`. The trigger uses
@@ -473,7 +499,7 @@ declare namespace Components {
473
499
  */
474
500
  event_origin?: "builtin" | "custom";
475
501
  mapping?: /* Guided mappings use schema_fields graph_source expressions; raw mode evaluates one JSONata object transform. */ EventMapping;
476
- lineage?: /* Optional catalog lineage to a separately named base event. It does not replace the base event. */ CustomEventLineage;
502
+ lineage?: /* Optional catalog lineage to a separately named base event. Built-in inheritance is validated against this exact registered version; its trigger restrictions cannot be removed or replaced. It does not replace the base event. */ CustomEventLineage;
477
503
  /**
478
504
  * Org-defined success criteria for this event: the entity attributes that an
479
505
  * organization considers must be captured for an event change request to be
@@ -605,6 +631,8 @@ declare namespace Components {
605
631
  * - On createEntity: attribute must be defined in the entity payload
606
632
  * - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
607
633
  * If not specified, all changes to matching entities will trigger the event.
634
+ * Derived built-in triggers retain every inherited attribute; additions are OR alternatives.
635
+ * An inherited unfiltered trigger cannot be narrowed by adding attribute filters.
608
636
  *
609
637
  * example:
610
638
  * [
@@ -618,7 +646,10 @@ declare namespace Components {
618
646
  * Optional list of purpose names to filter by.
619
647
  * The entity must have at least one matching purpose in its _purpose array.
620
648
  * Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
621
- * If not specified, the event triggers regardless of entity purpose.
649
+ * For custom events, names are allowed only when inherited unchanged from the actual
650
+ * pinned built-in lineage version. New purposes must use stable purpose_filters IDs.
651
+ * Names and stable IDs are OR alternatives; operation/schema/attribute conditions still apply.
652
+ * If neither purpose nor purpose_filters is specified, the event triggers regardless of purpose.
622
653
  *
623
654
  * example:
624
655
  * [
@@ -628,7 +659,7 @@ declare namespace Components {
628
659
  */
629
660
  purpose?: string[];
630
661
  /**
631
- * Stable purpose IDs plus immutable display-name snapshots for custom events.
662
+ * Stable purpose IDs plus immutable display-name snapshots for custom events. Additive to inherited purpose names (OR). Inherited unfiltered triggers cannot be narrowed.
632
663
  */
633
664
  purpose_filters?: PurposeFilterSnapshot[];
634
665
  };
@@ -663,6 +694,10 @@ declare namespace Components {
663
694
  * true
664
695
  */
665
696
  automation_trigger?: boolean;
697
+ /**
698
+ * Allows explicit API-source triggering, not HTTP transport. Automation also uses HTTP. Automation-only events always disable this source.
699
+ */
700
+ api_trigger?: boolean;
666
701
  /**
667
702
  * Whether explicit triggering is restricted to Automation. When true, callers must pass
668
703
  * `_trigger_source_type: automation` and a stable `_trigger_source`. The trigger uses
@@ -686,7 +721,7 @@ declare namespace Components {
686
721
  */
687
722
  event_origin?: "builtin" | "custom";
688
723
  mapping?: /* Guided mappings use schema_fields graph_source expressions; raw mode evaluates one JSONata object transform. */ EventMapping;
689
- lineage?: /* Optional catalog lineage to a separately named base event. It does not replace the base event. */ CustomEventLineage;
724
+ lineage?: /* Optional catalog lineage to a separately named base event. Built-in inheritance is validated against this exact registered version; its trigger restrictions cannot be removed or replaced. It does not replace the base event. */ CustomEventLineage;
690
725
  /**
691
726
  * Org-defined success criteria for this event: the entity attributes that an
692
727
  * organization considers must be captured for an event change request to be
@@ -1112,10 +1147,11 @@ declare namespace Components {
1112
1147
  */
1113
1148
  required?: boolean;
1114
1149
  /**
1115
- * Optional JSONata expression to extract the field value from the hydrated entity graph.
1150
+ * JSONata expression to extract the field value from the hydrated entity graph.
1116
1151
  *
1117
1152
  * The expression has access to all hydrated graph nodes by their node ID.
1118
- * If not specified, the field value must be provided as input when triggering the event.
1153
+ * Optional for built-in events, where an unset value must be provided as input when
1154
+ * triggering the event. Required for custom events in guided mapping mode.
1119
1155
  *
1120
1156
  * Examples:
1121
1157
  * - "ticket.meter_reading_value" (simple path)
@@ -1324,9 +1360,10 @@ declare namespace Components {
1324
1360
  node_id: string;
1325
1361
  };
1326
1362
  /**
1327
- * Input field values for the event. Keys must match the event's
1363
+ * Input field values for built-in events. Keys must match the event's
1328
1364
  * schema_fields definitions. Values are validated against each
1329
- * field's JSON Schema.
1365
+ * field's JSON Schema. Ignored for custom events, whose fields are
1366
+ * always projected from the entity graph.
1330
1367
  *
1331
1368
  */
1332
1369
  fields?: {
@@ -1438,7 +1475,7 @@ declare namespace Components {
1438
1475
  }
1439
1476
  declare namespace Paths {
1440
1477
  namespace CreateCustomEvent {
1441
- export type RequestBody = /* Complete immutable custom-event v1.0 definition. Publication is a separate conditional action. */ Components.Schemas.CreateCustomEventPayload;
1478
+ export type RequestBody = /* Complete immutable custom-event v1.0 definition projected from a required entity graph. Publication is a separate conditional action. */ Components.Schemas.CreateCustomEventPayload;
1442
1479
  namespace Responses {
1443
1480
  export type $201 = /* Event configuration with required fields */ Components.Schemas.EventConfig;
1444
1481
  export interface $409 {
@@ -1772,6 +1809,26 @@ declare namespace Paths {
1772
1809
  }
1773
1810
  }
1774
1811
  }
1812
+ namespace ReplaceCustomEventDraft {
1813
+ namespace Parameters {
1814
+ export type EventName = string;
1815
+ }
1816
+ export interface PathParameters {
1817
+ event_name: Parameters.EventName;
1818
+ }
1819
+ export type RequestBody = /* Complete immutable custom-event v1.0 definition projected from a required entity graph. Publication is a separate conditional action. */ Components.Schemas.CreateCustomEventPayload;
1820
+ namespace Responses {
1821
+ export type $200 = /* Event configuration with required fields */ Components.Schemas.EventConfig;
1822
+ export interface $400 {
1823
+ }
1824
+ export interface $404 {
1825
+ }
1826
+ export interface $409 {
1827
+ }
1828
+ export interface $422 {
1829
+ }
1830
+ }
1831
+ }
1775
1832
  namespace SearchEventHistory {
1776
1833
  namespace Parameters {
1777
1834
  export type EventName = string;
@@ -1938,7 +1995,7 @@ interface OperationMethods {
1938
1995
  /**
1939
1996
  * createCustomEvent - createCustomEvent
1940
1997
  *
1941
- * Reserve an org-scoped custom event name and persist its immutable v1.0 draft definition.
1998
+ * Reserve an org-scoped custom event name and persist its immutable v1.0 draft definition. Custom events are always projected from an entity graph: entity_graph is required and, in guided mapping mode, every schema field needs a graph_source expression. Caller-supplied trigger fields are ignored for custom events.
1942
1999
  */
1943
2000
  'createCustomEvent'(
1944
2001
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -1955,6 +2012,19 @@ interface OperationMethods {
1955
2012
  data?: any,
1956
2013
  config?: AxiosRequestConfig
1957
2014
  ): OperationResponse<Paths.GetEvent.Responses.$200>
2015
+ /**
2016
+ * replaceCustomEventDraft - replaceCustomEventDraft
2017
+ *
2018
+ * Replace the complete v1.0 definition of an org-scoped custom event while it is still an
2019
+ * unpublished draft. Drafts have no consumers, so their definition is not yet immutable;
2020
+ * the event name is the identity and cannot change. Publication remains a separate action.
2021
+ *
2022
+ */
2023
+ 'replaceCustomEventDraft'(
2024
+ parameters?: Parameters<Paths.ReplaceCustomEventDraft.PathParameters> | null,
2025
+ data?: Paths.ReplaceCustomEventDraft.RequestBody,
2026
+ config?: AxiosRequestConfig
2027
+ ): OperationResponse<Paths.ReplaceCustomEventDraft.Responses.$200>
1958
2028
  /**
1959
2029
  * patchEvent - patchEvent
1960
2030
  *
@@ -2108,7 +2178,7 @@ interface PathsDictionary {
2108
2178
  /**
2109
2179
  * createCustomEvent - createCustomEvent
2110
2180
  *
2111
- * Reserve an org-scoped custom event name and persist its immutable v1.0 draft definition.
2181
+ * Reserve an org-scoped custom event name and persist its immutable v1.0 draft definition. Custom events are always projected from an entity graph: entity_graph is required and, in guided mapping mode, every schema field needs a graph_source expression. Caller-supplied trigger fields are ignored for custom events.
2112
2182
  */
2113
2183
  'post'(
2114
2184
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -2137,6 +2207,19 @@ interface PathsDictionary {
2137
2207
  data?: Paths.PatchEvent.RequestBody,
2138
2208
  config?: AxiosRequestConfig
2139
2209
  ): OperationResponse<Paths.PatchEvent.Responses.$200>
2210
+ /**
2211
+ * replaceCustomEventDraft - replaceCustomEventDraft
2212
+ *
2213
+ * Replace the complete v1.0 definition of an org-scoped custom event while it is still an
2214
+ * unpublished draft. Drafts have no consumers, so their definition is not yet immutable;
2215
+ * the event name is the identity and cannot change. Publication remains a separate action.
2216
+ *
2217
+ */
2218
+ 'put'(
2219
+ parameters?: Parameters<Paths.ReplaceCustomEventDraft.PathParameters> | null,
2220
+ data?: Paths.ReplaceCustomEventDraft.RequestBody,
2221
+ config?: AxiosRequestConfig
2222
+ ): OperationResponse<Paths.ReplaceCustomEventDraft.Responses.$200>
2140
2223
  /**
2141
2224
  * deprecateCustomEvent - deprecateCustomEvent
2142
2225
  *