@epilot/sdk 2.11.7 → 2.12.1

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 (144) hide show
  1. package/definitions/event-catalog.json +63 -1
  2. package/definitions/integration-toolkit.json +26 -19
  3. package/definitions/notification.json +14 -0
  4. package/dist/apis/access-token.cjs +6 -6
  5. package/dist/apis/access-token.js +1 -1
  6. package/dist/apis/address-suggestions.cjs +6 -6
  7. package/dist/apis/address-suggestions.js +1 -1
  8. package/dist/apis/address.cjs +6 -6
  9. package/dist/apis/address.js +1 -1
  10. package/dist/apis/ai-agents.cjs +6 -6
  11. package/dist/apis/ai-agents.js +1 -1
  12. package/dist/apis/app.cjs +6 -6
  13. package/dist/apis/app.js +1 -1
  14. package/dist/apis/audit-logs.cjs +6 -6
  15. package/dist/apis/audit-logs.js +1 -1
  16. package/dist/apis/automation.cjs +6 -6
  17. package/dist/apis/automation.js +1 -1
  18. package/dist/apis/billing.cjs +6 -6
  19. package/dist/apis/billing.js +1 -1
  20. package/dist/apis/blueprint-manifest.cjs +6 -6
  21. package/dist/apis/blueprint-manifest.js +1 -1
  22. package/dist/apis/calendar.cjs +6 -6
  23. package/dist/apis/calendar.js +1 -1
  24. package/dist/apis/configuration-hub.cjs +6 -6
  25. package/dist/apis/configuration-hub.js +1 -1
  26. package/dist/apis/consent.cjs +6 -6
  27. package/dist/apis/consent.js +1 -1
  28. package/dist/apis/customer-portal.cjs +6 -6
  29. package/dist/apis/customer-portal.js +1 -1
  30. package/dist/apis/dashboard.cjs +6 -6
  31. package/dist/apis/dashboard.js +1 -1
  32. package/dist/apis/data-governance.cjs +6 -6
  33. package/dist/apis/data-governance.js +1 -1
  34. package/dist/apis/deduplication.cjs +6 -6
  35. package/dist/apis/deduplication.js +1 -1
  36. package/dist/apis/design.cjs +6 -6
  37. package/dist/apis/design.js +1 -1
  38. package/dist/apis/document.cjs +6 -6
  39. package/dist/apis/document.js +1 -1
  40. package/dist/apis/email-settings.cjs +6 -6
  41. package/dist/apis/email-settings.js +1 -1
  42. package/dist/apis/email-template.cjs +6 -6
  43. package/dist/apis/email-template.js +1 -1
  44. package/dist/apis/entity-mapping.cjs +6 -6
  45. package/dist/apis/entity-mapping.js +1 -1
  46. package/dist/apis/entity.cjs +6 -6
  47. package/dist/apis/entity.js +1 -1
  48. package/dist/apis/environments.cjs +6 -6
  49. package/dist/apis/environments.js +1 -1
  50. package/dist/apis/event-catalog.cjs +6 -6
  51. package/dist/apis/event-catalog.d.cts +2 -2
  52. package/dist/apis/event-catalog.d.ts +2 -2
  53. package/dist/apis/event-catalog.js +1 -1
  54. package/dist/apis/file.cjs +6 -6
  55. package/dist/apis/file.js +1 -1
  56. package/dist/apis/iban.cjs +6 -6
  57. package/dist/apis/iban.js +1 -1
  58. package/dist/apis/integration-toolkit.cjs +6 -6
  59. package/dist/apis/integration-toolkit.d.cts +2 -2
  60. package/dist/apis/integration-toolkit.d.ts +2 -2
  61. package/dist/apis/integration-toolkit.js +1 -1
  62. package/dist/apis/journey.cjs +6 -6
  63. package/dist/apis/journey.js +1 -1
  64. package/dist/apis/kanban.cjs +6 -6
  65. package/dist/apis/kanban.js +1 -1
  66. package/dist/apis/message.cjs +6 -6
  67. package/dist/apis/message.js +1 -1
  68. package/dist/apis/metering.cjs +6 -6
  69. package/dist/apis/metering.js +1 -1
  70. package/dist/apis/notes.cjs +6 -6
  71. package/dist/apis/notes.js +1 -1
  72. package/dist/apis/notification.cjs +6 -6
  73. package/dist/apis/notification.d.cts +2 -2
  74. package/dist/apis/notification.d.ts +2 -2
  75. package/dist/apis/notification.js +1 -1
  76. package/dist/apis/organization.cjs +6 -6
  77. package/dist/apis/organization.js +1 -1
  78. package/dist/apis/partner-directory.cjs +6 -6
  79. package/dist/apis/partner-directory.js +1 -1
  80. package/dist/apis/permissions.cjs +6 -6
  81. package/dist/apis/permissions.js +1 -1
  82. package/dist/apis/pricing-tier.cjs +6 -6
  83. package/dist/apis/pricing-tier.js +1 -1
  84. package/dist/apis/pricing.cjs +6 -6
  85. package/dist/apis/pricing.js +1 -1
  86. package/dist/apis/purpose.cjs +6 -6
  87. package/dist/apis/purpose.js +1 -1
  88. package/dist/apis/query.cjs +6 -6
  89. package/dist/apis/query.js +1 -1
  90. package/dist/apis/sandbox.cjs +6 -6
  91. package/dist/apis/sandbox.js +1 -1
  92. package/dist/apis/sharing.cjs +6 -6
  93. package/dist/apis/sharing.js +1 -1
  94. package/dist/apis/snapshot.cjs +6 -6
  95. package/dist/apis/snapshot.js +1 -1
  96. package/dist/apis/submission.cjs +6 -6
  97. package/dist/apis/submission.js +1 -1
  98. package/dist/apis/target.cjs +6 -6
  99. package/dist/apis/target.js +1 -1
  100. package/dist/apis/targeting.cjs +6 -6
  101. package/dist/apis/targeting.js +1 -1
  102. package/dist/apis/template-variables.cjs +6 -6
  103. package/dist/apis/template-variables.js +1 -1
  104. package/dist/apis/user.cjs +6 -6
  105. package/dist/apis/user.js +1 -1
  106. package/dist/apis/validation-rules.cjs +6 -6
  107. package/dist/apis/validation-rules.js +1 -1
  108. package/dist/apis/webhooks.cjs +6 -6
  109. package/dist/apis/webhooks.js +1 -1
  110. package/dist/apis/workflow-definition.cjs +6 -6
  111. package/dist/apis/workflow-definition.js +1 -1
  112. package/dist/apis/workflow.cjs +6 -6
  113. package/dist/apis/workflow.js +1 -1
  114. package/dist/{chunk-XHYQCPF2.cjs → chunk-AJDY36Y6.cjs} +3 -3
  115. package/dist/{chunk-UMH5J2WT.js → chunk-L3UZLJPQ.js} +3 -3
  116. package/dist/event-catalog-6ZSSF5JU.cjs +7 -0
  117. package/dist/event-catalog-RS4LJMY2.js +7 -0
  118. package/dist/{event-catalog.d-CXbUn8T1.d.cts → event-catalog.d-QIhhewVH.d.cts} +153 -3
  119. package/dist/{event-catalog.d-CXbUn8T1.d.ts → event-catalog.d-QIhhewVH.d.ts} +153 -3
  120. package/dist/index.cjs +8 -8
  121. package/dist/index.d.cts +3 -3
  122. package/dist/index.d.ts +3 -3
  123. package/dist/index.js +1 -1
  124. package/dist/integration-toolkit-2BLX4CSH.cjs +7 -0
  125. package/dist/integration-toolkit-OLFKCTLY.js +7 -0
  126. package/dist/{integration-toolkit.d-BVe_MBBi.d.cts → integration-toolkit.d-7q19qDTD.d.cts} +20 -11
  127. package/dist/{integration-toolkit.d-BVe_MBBi.d.ts → integration-toolkit.d-7q19qDTD.d.ts} +20 -11
  128. package/dist/js-yaml-DLCVPJ7G.js +0 -0
  129. package/dist/notification-PLIRHBNF.js +7 -0
  130. package/dist/notification-R2XBHFEW.cjs +7 -0
  131. package/dist/{notification.d-BfBL3lga.d.ts → notification.d-r89Jec85.d.cts} +24 -2
  132. package/dist/{notification.d-BfBL3lga.d.cts → notification.d-r89Jec85.d.ts} +24 -2
  133. package/docs/event-catalog.md +90 -5
  134. package/docs/integration-toolkit.md +20 -14
  135. package/docs/notification.md +10 -3
  136. package/package.json +11 -12
  137. package/definitions/focus-pocus-runtime.json +0 -1
  138. package/definitions/focus-pocus.json +0 -757
  139. package/dist/event-catalog-3YOQ46ZW.js +0 -7
  140. package/dist/event-catalog-HLWUT7RM.cjs +0 -7
  141. package/dist/integration-toolkit-DUMRNE6A.cjs +0 -7
  142. package/dist/integration-toolkit-IK7KA76K.js +0 -7
  143. package/dist/notification-PZOCUYD5.cjs +0 -7
  144. package/dist/notification-VWDZRSFZ.js +0 -7
@@ -202,6 +202,10 @@ declare namespace Components {
202
202
  *
203
203
  */
204
204
  _ack_id?: string;
205
+ /**
206
+ * Inline downgrade chain stamped by Event Catalog at publish time, ordered newest-to-oldest. Present ONLY on multi-version events. Internal versioning transport: consumers (e.g. svc-webhooks) walk the payload back to a pinned version using these JSONata steps, then strip the field before delivery -- end customers never receive it.
207
+ */
208
+ _downgrades?: /* One 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. */ InlineDowngradeStep[];
205
209
  }
206
210
  /**
207
211
  * A file attachment associated with an event
@@ -394,6 +398,41 @@ declare namespace Components {
394
398
  * true
395
399
  */
396
400
  automation_trigger?: boolean;
401
+ /**
402
+ * Org-defined success criteria for this event: the entity attributes that an
403
+ * organization considers must be captured for an event change request to be
404
+ * treated as complete (e.g. for telephony / self-service flows).
405
+ *
406
+ * Advisory metadata — event-catalog does NOT require an org to define any and
407
+ * does NOT enforce them when an event is triggered or published. The org may
408
+ * define none (empty array or omitted). When provided, each entry is validated
409
+ * for well-formedness on write (see SuccessCriterion).
410
+ *
411
+ * example:
412
+ * [
413
+ * {
414
+ * "entity_schema": "contract",
415
+ * "attribute": "installment_amount"
416
+ * },
417
+ * {
418
+ * "entity_schema": "billing_account",
419
+ * "attribute": "due_date"
420
+ * }
421
+ * ]
422
+ */
423
+ success_criteria?: /**
424
+ * A single org-defined success criterion: an entity attribute that must be captured
425
+ * for this event's change request to be considered complete.
426
+ *
427
+ * Identity is the entity schema plus the attribute name — mirroring the
428
+ * EntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both
429
+ * `attribute` and `entity_schema` are required and `entity_schema` must match the
430
+ * `schema` of a node in the event's `entity_graph` (else the request is rejected) —
431
+ * this prevents unsatisfiable criteria. The criteria themselves are advisory and are
432
+ * never enforced when an event is triggered or published.
433
+ *
434
+ */
435
+ SuccessCriterion[];
397
436
  }
398
437
  /**
399
438
  * Base properties shared between EventConfig and UpdateEventPayload
@@ -544,6 +583,41 @@ declare namespace Components {
544
583
  * true
545
584
  */
546
585
  automation_trigger?: boolean;
586
+ /**
587
+ * Org-defined success criteria for this event: the entity attributes that an
588
+ * organization considers must be captured for an event change request to be
589
+ * treated as complete (e.g. for telephony / self-service flows).
590
+ *
591
+ * Advisory metadata — event-catalog does NOT require an org to define any and
592
+ * does NOT enforce them when an event is triggered or published. The org may
593
+ * define none (empty array or omitted). When provided, each entry is validated
594
+ * for well-formedness on write (see SuccessCriterion).
595
+ *
596
+ * example:
597
+ * [
598
+ * {
599
+ * "entity_schema": "contract",
600
+ * "attribute": "installment_amount"
601
+ * },
602
+ * {
603
+ * "entity_schema": "billing_account",
604
+ * "attribute": "due_date"
605
+ * }
606
+ * ]
607
+ */
608
+ success_criteria?: /**
609
+ * A single org-defined success criterion: an entity attribute that must be captured
610
+ * for this event's change request to be considered complete.
611
+ *
612
+ * Identity is the entity schema plus the attribute name — mirroring the
613
+ * EntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both
614
+ * `attribute` and `entity_schema` are required and `entity_schema` must match the
615
+ * `schema` of a node in the event's `entity_graph` (else the request is rejected) —
616
+ * this prevents unsatisfiable criteria. The criteria themselves are advisory and are
617
+ * never enforced when an event is triggered or published.
618
+ *
619
+ */
620
+ SuccessCriterion[];
547
621
  }
548
622
  /**
549
623
  * JSON Schema declaring the event payload structure
@@ -887,6 +961,19 @@ declare namespace Components {
887
961
  */
888
962
  fields?: string[];
889
963
  }
964
+ /**
965
+ * One 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.
966
+ */
967
+ export interface InlineDowngradeStep {
968
+ /**
969
+ * Version label this step downgrades to (the previous version).
970
+ */
971
+ to: string;
972
+ /**
973
+ * JSONata expression mapping the current-shape payload to the previous-shape payload.
974
+ */
975
+ jsonata: string;
976
+ }
890
977
  /**
891
978
  * A primitive JSON Schema field definition
892
979
  */
@@ -1051,6 +1138,32 @@ declare namespace Components {
1051
1138
  */
1052
1139
  FieldsParam;
1053
1140
  }
1141
+ /**
1142
+ * A single org-defined success criterion: an entity attribute that must be captured
1143
+ * for this event's change request to be considered complete.
1144
+ *
1145
+ * Identity is the entity schema plus the attribute name — mirroring the
1146
+ * EntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both
1147
+ * `attribute` and `entity_schema` are required and `entity_schema` must match the
1148
+ * `schema` of a node in the event's `entity_graph` (else the request is rejected) —
1149
+ * this prevents unsatisfiable criteria. The criteria themselves are advisory and are
1150
+ * never enforced when an event is triggered or published.
1151
+ *
1152
+ */
1153
+ export interface SuccessCriterion {
1154
+ /**
1155
+ * Entity schema slug the attribute belongs to (matches a node schema in the event's entity_graph).
1156
+ * example:
1157
+ * contract
1158
+ */
1159
+ entity_schema: string;
1160
+ /**
1161
+ * Attribute name on the entity schema.
1162
+ * example:
1163
+ * installment_amount
1164
+ */
1165
+ attribute: string;
1166
+ }
1054
1167
  /**
1055
1168
  * Payload for explicitly triggering an event via API
1056
1169
  */
@@ -1122,7 +1235,7 @@ declare namespace Components {
1122
1235
  /**
1123
1236
  * Payload for updating an event configuration.
1124
1237
  * Accepts the same fields as EventConfig (all optional for PATCH).
1125
- * Currently `enabled` and `auto_trigger` fields are processed.
1238
+ * Currently `enabled`, `auto_trigger` and `success_criteria` fields are processed.
1126
1239
  *
1127
1240
  */
1128
1241
  export interface UpdateEventPayload {
@@ -1271,6 +1384,41 @@ declare namespace Components {
1271
1384
  * true
1272
1385
  */
1273
1386
  automation_trigger?: boolean;
1387
+ /**
1388
+ * Org-defined success criteria for this event: the entity attributes that an
1389
+ * organization considers must be captured for an event change request to be
1390
+ * treated as complete (e.g. for telephony / self-service flows).
1391
+ *
1392
+ * Advisory metadata — event-catalog does NOT require an org to define any and
1393
+ * does NOT enforce them when an event is triggered or published. The org may
1394
+ * define none (empty array or omitted). When provided, each entry is validated
1395
+ * for well-formedness on write (see SuccessCriterion).
1396
+ *
1397
+ * example:
1398
+ * [
1399
+ * {
1400
+ * "entity_schema": "contract",
1401
+ * "attribute": "installment_amount"
1402
+ * },
1403
+ * {
1404
+ * "entity_schema": "billing_account",
1405
+ * "attribute": "due_date"
1406
+ * }
1407
+ * ]
1408
+ */
1409
+ success_criteria?: /**
1410
+ * A single org-defined success criterion: an entity attribute that must be captured
1411
+ * for this event's change request to be considered complete.
1412
+ *
1413
+ * Identity is the entity schema plus the attribute name — mirroring the
1414
+ * EntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both
1415
+ * `attribute` and `entity_schema` are required and `entity_schema` must match the
1416
+ * `schema` of a node in the event's `entity_graph` (else the request is rejected) —
1417
+ * this prevents unsatisfiable criteria. The criteria themselves are advisory and are
1418
+ * never enforced when an event is triggered or published.
1419
+ *
1420
+ */
1421
+ SuccessCriterion[];
1274
1422
  }
1275
1423
  /**
1276
1424
  * One entry of an event's version timeline.
@@ -1574,7 +1722,7 @@ declare namespace Paths {
1574
1722
  export type RequestBody = /**
1575
1723
  * Payload for updating an event configuration.
1576
1724
  * Accepts the same fields as EventConfig (all optional for PATCH).
1577
- * Currently `enabled` and `auto_trigger` fields are processed.
1725
+ * Currently `enabled`, `auto_trigger` and `success_criteria` fields are processed.
1578
1726
  *
1579
1727
  */
1580
1728
  Components.Schemas.UpdateEventPayload;
@@ -2007,13 +2155,15 @@ type FieldsParam = Components.Schemas.FieldsParam;
2007
2155
  type GraphDefinition = Components.Schemas.GraphDefinition;
2008
2156
  type GraphEdge = Components.Schemas.GraphEdge;
2009
2157
  type GraphNode = Components.Schemas.GraphNode;
2158
+ type InlineDowngradeStep = Components.Schemas.InlineDowngradeStep;
2010
2159
  type PrimitiveField = Components.Schemas.PrimitiveField;
2011
2160
  type SchemaField = Components.Schemas.SchemaField;
2012
2161
  type SearchOptions = Components.Schemas.SearchOptions;
2013
2162
  type SearchOptionsV2 = Components.Schemas.SearchOptionsV2;
2163
+ type SuccessCriterion = Components.Schemas.SuccessCriterion;
2014
2164
  type TriggerEventPayload = Components.Schemas.TriggerEventPayload;
2015
2165
  type TriggerEventResponse = Components.Schemas.TriggerEventResponse;
2016
2166
  type UpdateEventPayload = Components.Schemas.UpdateEventPayload;
2017
2167
  type VersionMeta = Components.Schemas.VersionMeta;
2018
2168
 
2019
- export { type AttachmentField as A, type Client as C, type EntityOperationTrigger as E, type FieldChange as F, type GraphDefinition as G, type OperationMethods as O, Paths as P, type SchemaField as S, type TriggerEventPayload as T, type UpdateEventPayload as U, type VersionMeta as V, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type EventAttachment as f, type EventConfig as g, type EventConfigBase as h, type EventJsonSchema as i, type EventSummary as j, type EventVersionRegistrySummary as k, type FieldsParam as l, type GraphEdge as m, type GraphNode as n, type PrimitiveField as o, type SearchOptions as p, type SearchOptionsV2 as q, type TriggerEventResponse as r };
2169
+ export { type AttachmentField as A, type Client as C, type EntityOperationTrigger as E, type FieldChange as F, type GraphDefinition as G, type InlineDowngradeStep as I, type OperationMethods as O, Paths as P, type SchemaField as S, type TriggerEventPayload as T, type UpdateEventPayload as U, type VersionMeta as V, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type EventAttachment as f, type EventConfig as g, type EventConfigBase as h, type EventJsonSchema as i, type EventSummary as j, type EventVersionRegistrySummary as k, type FieldsParam as l, type GraphEdge as m, type GraphNode as n, type PrimitiveField as o, type SearchOptions as p, type SearchOptionsV2 as q, type SuccessCriterion as r, type TriggerEventResponse as s };
@@ -202,6 +202,10 @@ declare namespace Components {
202
202
  *
203
203
  */
204
204
  _ack_id?: string;
205
+ /**
206
+ * Inline downgrade chain stamped by Event Catalog at publish time, ordered newest-to-oldest. Present ONLY on multi-version events. Internal versioning transport: consumers (e.g. svc-webhooks) walk the payload back to a pinned version using these JSONata steps, then strip the field before delivery -- end customers never receive it.
207
+ */
208
+ _downgrades?: /* One 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. */ InlineDowngradeStep[];
205
209
  }
206
210
  /**
207
211
  * A file attachment associated with an event
@@ -394,6 +398,41 @@ declare namespace Components {
394
398
  * true
395
399
  */
396
400
  automation_trigger?: boolean;
401
+ /**
402
+ * Org-defined success criteria for this event: the entity attributes that an
403
+ * organization considers must be captured for an event change request to be
404
+ * treated as complete (e.g. for telephony / self-service flows).
405
+ *
406
+ * Advisory metadata — event-catalog does NOT require an org to define any and
407
+ * does NOT enforce them when an event is triggered or published. The org may
408
+ * define none (empty array or omitted). When provided, each entry is validated
409
+ * for well-formedness on write (see SuccessCriterion).
410
+ *
411
+ * example:
412
+ * [
413
+ * {
414
+ * "entity_schema": "contract",
415
+ * "attribute": "installment_amount"
416
+ * },
417
+ * {
418
+ * "entity_schema": "billing_account",
419
+ * "attribute": "due_date"
420
+ * }
421
+ * ]
422
+ */
423
+ success_criteria?: /**
424
+ * A single org-defined success criterion: an entity attribute that must be captured
425
+ * for this event's change request to be considered complete.
426
+ *
427
+ * Identity is the entity schema plus the attribute name — mirroring the
428
+ * EntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both
429
+ * `attribute` and `entity_schema` are required and `entity_schema` must match the
430
+ * `schema` of a node in the event's `entity_graph` (else the request is rejected) —
431
+ * this prevents unsatisfiable criteria. The criteria themselves are advisory and are
432
+ * never enforced when an event is triggered or published.
433
+ *
434
+ */
435
+ SuccessCriterion[];
397
436
  }
398
437
  /**
399
438
  * Base properties shared between EventConfig and UpdateEventPayload
@@ -544,6 +583,41 @@ declare namespace Components {
544
583
  * true
545
584
  */
546
585
  automation_trigger?: boolean;
586
+ /**
587
+ * Org-defined success criteria for this event: the entity attributes that an
588
+ * organization considers must be captured for an event change request to be
589
+ * treated as complete (e.g. for telephony / self-service flows).
590
+ *
591
+ * Advisory metadata — event-catalog does NOT require an org to define any and
592
+ * does NOT enforce them when an event is triggered or published. The org may
593
+ * define none (empty array or omitted). When provided, each entry is validated
594
+ * for well-formedness on write (see SuccessCriterion).
595
+ *
596
+ * example:
597
+ * [
598
+ * {
599
+ * "entity_schema": "contract",
600
+ * "attribute": "installment_amount"
601
+ * },
602
+ * {
603
+ * "entity_schema": "billing_account",
604
+ * "attribute": "due_date"
605
+ * }
606
+ * ]
607
+ */
608
+ success_criteria?: /**
609
+ * A single org-defined success criterion: an entity attribute that must be captured
610
+ * for this event's change request to be considered complete.
611
+ *
612
+ * Identity is the entity schema plus the attribute name — mirroring the
613
+ * EntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both
614
+ * `attribute` and `entity_schema` are required and `entity_schema` must match the
615
+ * `schema` of a node in the event's `entity_graph` (else the request is rejected) —
616
+ * this prevents unsatisfiable criteria. The criteria themselves are advisory and are
617
+ * never enforced when an event is triggered or published.
618
+ *
619
+ */
620
+ SuccessCriterion[];
547
621
  }
548
622
  /**
549
623
  * JSON Schema declaring the event payload structure
@@ -887,6 +961,19 @@ declare namespace Components {
887
961
  */
888
962
  fields?: string[];
889
963
  }
964
+ /**
965
+ * One 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.
966
+ */
967
+ export interface InlineDowngradeStep {
968
+ /**
969
+ * Version label this step downgrades to (the previous version).
970
+ */
971
+ to: string;
972
+ /**
973
+ * JSONata expression mapping the current-shape payload to the previous-shape payload.
974
+ */
975
+ jsonata: string;
976
+ }
890
977
  /**
891
978
  * A primitive JSON Schema field definition
892
979
  */
@@ -1051,6 +1138,32 @@ declare namespace Components {
1051
1138
  */
1052
1139
  FieldsParam;
1053
1140
  }
1141
+ /**
1142
+ * A single org-defined success criterion: an entity attribute that must be captured
1143
+ * for this event's change request to be considered complete.
1144
+ *
1145
+ * Identity is the entity schema plus the attribute name — mirroring the
1146
+ * EntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both
1147
+ * `attribute` and `entity_schema` are required and `entity_schema` must match the
1148
+ * `schema` of a node in the event's `entity_graph` (else the request is rejected) —
1149
+ * this prevents unsatisfiable criteria. The criteria themselves are advisory and are
1150
+ * never enforced when an event is triggered or published.
1151
+ *
1152
+ */
1153
+ export interface SuccessCriterion {
1154
+ /**
1155
+ * Entity schema slug the attribute belongs to (matches a node schema in the event's entity_graph).
1156
+ * example:
1157
+ * contract
1158
+ */
1159
+ entity_schema: string;
1160
+ /**
1161
+ * Attribute name on the entity schema.
1162
+ * example:
1163
+ * installment_amount
1164
+ */
1165
+ attribute: string;
1166
+ }
1054
1167
  /**
1055
1168
  * Payload for explicitly triggering an event via API
1056
1169
  */
@@ -1122,7 +1235,7 @@ declare namespace Components {
1122
1235
  /**
1123
1236
  * Payload for updating an event configuration.
1124
1237
  * Accepts the same fields as EventConfig (all optional for PATCH).
1125
- * Currently `enabled` and `auto_trigger` fields are processed.
1238
+ * Currently `enabled`, `auto_trigger` and `success_criteria` fields are processed.
1126
1239
  *
1127
1240
  */
1128
1241
  export interface UpdateEventPayload {
@@ -1271,6 +1384,41 @@ declare namespace Components {
1271
1384
  * true
1272
1385
  */
1273
1386
  automation_trigger?: boolean;
1387
+ /**
1388
+ * Org-defined success criteria for this event: the entity attributes that an
1389
+ * organization considers must be captured for an event change request to be
1390
+ * treated as complete (e.g. for telephony / self-service flows).
1391
+ *
1392
+ * Advisory metadata — event-catalog does NOT require an org to define any and
1393
+ * does NOT enforce them when an event is triggered or published. The org may
1394
+ * define none (empty array or omitted). When provided, each entry is validated
1395
+ * for well-formedness on write (see SuccessCriterion).
1396
+ *
1397
+ * example:
1398
+ * [
1399
+ * {
1400
+ * "entity_schema": "contract",
1401
+ * "attribute": "installment_amount"
1402
+ * },
1403
+ * {
1404
+ * "entity_schema": "billing_account",
1405
+ * "attribute": "due_date"
1406
+ * }
1407
+ * ]
1408
+ */
1409
+ success_criteria?: /**
1410
+ * A single org-defined success criterion: an entity attribute that must be captured
1411
+ * for this event's change request to be considered complete.
1412
+ *
1413
+ * Identity is the entity schema plus the attribute name — mirroring the
1414
+ * EntityOperationTrigger `schema`/`attribute` vocabulary. On write (PATCH), both
1415
+ * `attribute` and `entity_schema` are required and `entity_schema` must match the
1416
+ * `schema` of a node in the event's `entity_graph` (else the request is rejected) —
1417
+ * this prevents unsatisfiable criteria. The criteria themselves are advisory and are
1418
+ * never enforced when an event is triggered or published.
1419
+ *
1420
+ */
1421
+ SuccessCriterion[];
1274
1422
  }
1275
1423
  /**
1276
1424
  * One entry of an event's version timeline.
@@ -1574,7 +1722,7 @@ declare namespace Paths {
1574
1722
  export type RequestBody = /**
1575
1723
  * Payload for updating an event configuration.
1576
1724
  * Accepts the same fields as EventConfig (all optional for PATCH).
1577
- * Currently `enabled` and `auto_trigger` fields are processed.
1725
+ * Currently `enabled`, `auto_trigger` and `success_criteria` fields are processed.
1578
1726
  *
1579
1727
  */
1580
1728
  Components.Schemas.UpdateEventPayload;
@@ -2007,13 +2155,15 @@ type FieldsParam = Components.Schemas.FieldsParam;
2007
2155
  type GraphDefinition = Components.Schemas.GraphDefinition;
2008
2156
  type GraphEdge = Components.Schemas.GraphEdge;
2009
2157
  type GraphNode = Components.Schemas.GraphNode;
2158
+ type InlineDowngradeStep = Components.Schemas.InlineDowngradeStep;
2010
2159
  type PrimitiveField = Components.Schemas.PrimitiveField;
2011
2160
  type SchemaField = Components.Schemas.SchemaField;
2012
2161
  type SearchOptions = Components.Schemas.SearchOptions;
2013
2162
  type SearchOptionsV2 = Components.Schemas.SearchOptionsV2;
2163
+ type SuccessCriterion = Components.Schemas.SuccessCriterion;
2014
2164
  type TriggerEventPayload = Components.Schemas.TriggerEventPayload;
2015
2165
  type TriggerEventResponse = Components.Schemas.TriggerEventResponse;
2016
2166
  type UpdateEventPayload = Components.Schemas.UpdateEventPayload;
2017
2167
  type VersionMeta = Components.Schemas.VersionMeta;
2018
2168
 
2019
- export { type AttachmentField as A, type Client as C, type EntityOperationTrigger as E, type FieldChange as F, type GraphDefinition as G, type OperationMethods as O, Paths as P, type SchemaField as S, type TriggerEventPayload as T, type UpdateEventPayload as U, type VersionMeta as V, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type EventAttachment as f, type EventConfig as g, type EventConfigBase as h, type EventJsonSchema as i, type EventSummary as j, type EventVersionRegistrySummary as k, type FieldsParam as l, type GraphEdge as m, type GraphNode as n, type PrimitiveField as o, type SearchOptions as p, type SearchOptionsV2 as q, type TriggerEventResponse as r };
2169
+ export { type AttachmentField as A, type Client as C, type EntityOperationTrigger as E, type FieldChange as F, type GraphDefinition as G, type InlineDowngradeStep as I, type OperationMethods as O, Paths as P, type SchemaField as S, type TriggerEventPayload as T, type UpdateEventPayload as U, type VersionMeta as V, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type EventAttachment as f, type EventConfig as g, type EventConfigBase as h, type EventJsonSchema as i, type EventSummary as j, type EventVersionRegistrySummary as k, type FieldsParam as l, type GraphEdge as m, type GraphNode as n, type PrimitiveField as o, type SearchOptions as p, type SearchOptionsV2 as q, type SuccessCriterion as r, type TriggerEventResponse as s };
package/dist/index.cjs CHANGED
@@ -158,7 +158,7 @@ var _chunkDVM27A7Ecjs = require('./chunk-DVM27A7E.cjs');
158
158
 
159
159
 
160
160
 
161
- var _chunkXHYQCPF2cjs = require('./chunk-XHYQCPF2.cjs');
161
+ var _chunkAJDY36Y6cjs = require('./chunk-AJDY36Y6.cjs');
162
162
 
163
163
 
164
164
  var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
@@ -225,7 +225,7 @@ var resolveClient = (params) => {
225
225
  }
226
226
  if (!entry.instance) {
227
227
  const definition = entry.loader();
228
- entry.instance = _chunkXHYQCPF2cjs.createApiClient.call(void 0, {
228
+ entry.instance = _chunkAJDY36Y6cjs.createApiClient.call(void 0, {
229
229
  definition,
230
230
  token: state.token,
231
231
  headers: state.globalHeaders,
@@ -258,7 +258,7 @@ var resetAllClients = (registry) => {
258
258
  };
259
259
 
260
260
  // src/apis/_registry.ts
261
- var expandDef = (mod) => _chunkXHYQCPF2cjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
261
+ var expandDef = (mod) => _chunkAJDY36Y6cjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
262
262
  var registerBuiltinApis = (registry) => {
263
263
  registerApi({
264
264
  registry,
@@ -601,9 +601,9 @@ var createSDK = () => {
601
601
  const available = [...registry.keys()].join(", ");
602
602
  throw new Error(`Unknown API: "${name}". Available: ${available}`);
603
603
  }
604
- return _chunkXHYQCPF2cjs.createApiHandle.call(void 0, {
604
+ return _chunkAJDY36Y6cjs.createApiHandle.call(void 0, {
605
605
  resolveClient: () => resolveClient({ registry, name, state }),
606
- createClient: () => _chunkXHYQCPF2cjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
606
+ createClient: () => _chunkAJDY36Y6cjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
607
607
  apiName: name
608
608
  });
609
609
  };
@@ -651,9 +651,9 @@ var createSDK = () => {
651
651
  return interceptorUse;
652
652
  }
653
653
  case "help":
654
- return (apiName) => _chunkXHYQCPF2cjs.help.call(void 0, apiName);
654
+ return (apiName) => _chunkAJDY36Y6cjs.help.call(void 0, apiName);
655
655
  case "openapi":
656
- return (apiName) => _chunkXHYQCPF2cjs.openapi.call(void 0, apiName);
656
+ return (apiName) => _chunkAJDY36Y6cjs.openapi.call(void 0, apiName);
657
657
  case "then":
658
658
  case "catch":
659
659
  case "finally":
@@ -683,4 +683,4 @@ var epilot = createSDK();
683
683
 
684
684
 
685
685
 
686
- exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkXHYQCPF2cjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkXHYQCPF2cjs.help; exports.openapi = _chunkXHYQCPF2cjs.openapi;
686
+ exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkAJDY36Y6cjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkAJDY36Y6cjs.help; exports.openapi = _chunkAJDY36Y6cjs.openapi;
package/dist/index.d.cts CHANGED
@@ -26,16 +26,16 @@ import { C as Client$j } from './email-template.d-gtQkdaXM.cjs';
26
26
  import { C as Client$k } from './entity.d-fospShiN.cjs';
27
27
  import { C as Client$l } from './entity-mapping.d-DKSW3sfy.cjs';
28
28
  import { C as Client$m } from './environments.d-BvqvN-PD.cjs';
29
- import { C as Client$n } from './event-catalog.d-CXbUn8T1.cjs';
29
+ import { C as Client$n } from './event-catalog.d-QIhhewVH.cjs';
30
30
  import { C as Client$o } from './file.d-BN417xok.cjs';
31
31
  import { C as Client$p } from './iban.d-BwdiGbxi.cjs';
32
- import { C as Client$q } from './integration-toolkit.d-BVe_MBBi.cjs';
32
+ import { C as Client$q } from './integration-toolkit.d-7q19qDTD.cjs';
33
33
  import { C as Client$r } from './journey.d-B1sOeMHw.cjs';
34
34
  import { C as Client$s } from './kanban.d-BHnSRCYW.cjs';
35
35
  import { C as Client$t } from './message.d-B5UuSqgw.cjs';
36
36
  import { C as Client$u } from './metering.d-BrZWNonl.cjs';
37
37
  import { C as Client$v } from './notes.d-rbcyHfiB.cjs';
38
- import { C as Client$w } from './notification.d-BfBL3lga.cjs';
38
+ import { C as Client$w } from './notification.d-r89Jec85.cjs';
39
39
  import { C as Client$x } from './organization.d-DqwnNxMg.cjs';
40
40
  import { C as Client$y } from './partner-directory.d-BCIjHoGs.cjs';
41
41
  import { C as Client$z } from './permissions.d-l6AT8SYP.cjs';
package/dist/index.d.ts CHANGED
@@ -26,16 +26,16 @@ import { C as Client$j } from './email-template.d-gtQkdaXM.js';
26
26
  import { C as Client$k } from './entity.d-fospShiN.js';
27
27
  import { C as Client$l } from './entity-mapping.d-DKSW3sfy.js';
28
28
  import { C as Client$m } from './environments.d-BvqvN-PD.js';
29
- import { C as Client$n } from './event-catalog.d-CXbUn8T1.js';
29
+ import { C as Client$n } from './event-catalog.d-QIhhewVH.js';
30
30
  import { C as Client$o } from './file.d-BN417xok.js';
31
31
  import { C as Client$p } from './iban.d-BwdiGbxi.js';
32
- import { C as Client$q } from './integration-toolkit.d-BVe_MBBi.js';
32
+ import { C as Client$q } from './integration-toolkit.d-7q19qDTD.js';
33
33
  import { C as Client$r } from './journey.d-B1sOeMHw.js';
34
34
  import { C as Client$s } from './kanban.d-BHnSRCYW.js';
35
35
  import { C as Client$t } from './message.d-B5UuSqgw.js';
36
36
  import { C as Client$u } from './metering.d-BrZWNonl.js';
37
37
  import { C as Client$v } from './notes.d-rbcyHfiB.js';
38
- import { C as Client$w } from './notification.d-BfBL3lga.js';
38
+ import { C as Client$w } from './notification.d-r89Jec85.js';
39
39
  import { C as Client$x } from './organization.d-DqwnNxMg.js';
40
40
  import { C as Client$y } from './partner-directory.d-BCIjHoGs.js';
41
41
  import { C as Client$z } from './permissions.d-l6AT8SYP.js';
package/dist/index.js CHANGED
@@ -158,7 +158,7 @@ import {
158
158
  expand,
159
159
  help,
160
160
  openapi
161
- } from "./chunk-UMH5J2WT.js";
161
+ } from "./chunk-L3UZLJPQ.js";
162
162
  import {
163
163
  __require
164
164
  } from "./chunk-YPSWSI3M.js";