@epilot/sdk 2.20.33 → 2.20.35

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 (153) hide show
  1. package/definitions/event-catalog-runtime.json +1 -1
  2. package/definitions/event-catalog.json +310 -1
  3. package/definitions/integration-toolkit-runtime.json +1 -1
  4. package/definitions/integration-toolkit.json +530 -13
  5. package/definitions/metering.json +19 -8
  6. package/dist/apis/access-token.cjs +6 -6
  7. package/dist/apis/access-token.js +1 -1
  8. package/dist/apis/address-suggestions.cjs +6 -6
  9. package/dist/apis/address-suggestions.js +1 -1
  10. package/dist/apis/address.cjs +6 -6
  11. package/dist/apis/address.js +1 -1
  12. package/dist/apis/ai-agents.cjs +6 -6
  13. package/dist/apis/ai-agents.js +1 -1
  14. package/dist/apis/app.cjs +6 -6
  15. package/dist/apis/app.js +1 -1
  16. package/dist/apis/audit-logs.cjs +6 -6
  17. package/dist/apis/audit-logs.js +1 -1
  18. package/dist/apis/automation.cjs +6 -6
  19. package/dist/apis/automation.js +1 -1
  20. package/dist/apis/billing.cjs +6 -6
  21. package/dist/apis/billing.js +1 -1
  22. package/dist/apis/blueprint-manifest.cjs +6 -6
  23. package/dist/apis/blueprint-manifest.js +1 -1
  24. package/dist/apis/calendar.cjs +6 -6
  25. package/dist/apis/calendar.js +1 -1
  26. package/dist/apis/chat.cjs +6 -6
  27. package/dist/apis/chat.js +1 -1
  28. package/dist/apis/configuration-hub.cjs +6 -6
  29. package/dist/apis/configuration-hub.js +1 -1
  30. package/dist/apis/consent.cjs +6 -6
  31. package/dist/apis/consent.js +1 -1
  32. package/dist/apis/customer-portal.cjs +6 -6
  33. package/dist/apis/customer-portal.js +1 -1
  34. package/dist/apis/dashboard.cjs +6 -6
  35. package/dist/apis/dashboard.js +1 -1
  36. package/dist/apis/data-governance.cjs +6 -6
  37. package/dist/apis/data-governance.js +1 -1
  38. package/dist/apis/deduplication.cjs +6 -6
  39. package/dist/apis/deduplication.js +1 -1
  40. package/dist/apis/design.cjs +6 -6
  41. package/dist/apis/design.js +1 -1
  42. package/dist/apis/document.cjs +6 -6
  43. package/dist/apis/document.js +1 -1
  44. package/dist/apis/email-settings.cjs +6 -6
  45. package/dist/apis/email-settings.js +1 -1
  46. package/dist/apis/email-template.cjs +6 -6
  47. package/dist/apis/email-template.js +1 -1
  48. package/dist/apis/entity-mapping.cjs +6 -6
  49. package/dist/apis/entity-mapping.js +1 -1
  50. package/dist/apis/entity.cjs +6 -6
  51. package/dist/apis/entity.js +1 -1
  52. package/dist/apis/environments.cjs +6 -6
  53. package/dist/apis/environments.js +1 -1
  54. package/dist/apis/event-catalog.cjs +8 -8
  55. package/dist/apis/event-catalog.d.cts +2 -2
  56. package/dist/apis/event-catalog.d.ts +2 -2
  57. package/dist/apis/event-catalog.js +2 -2
  58. package/dist/apis/file.cjs +6 -6
  59. package/dist/apis/file.js +1 -1
  60. package/dist/apis/iban.cjs +6 -6
  61. package/dist/apis/iban.js +1 -1
  62. package/dist/apis/integration-toolkit.cjs +19 -15
  63. package/dist/apis/integration-toolkit.d.cts +2 -2
  64. package/dist/apis/integration-toolkit.d.ts +2 -2
  65. package/dist/apis/integration-toolkit.js +13 -9
  66. package/dist/apis/journey.cjs +6 -6
  67. package/dist/apis/journey.js +1 -1
  68. package/dist/apis/kanban.cjs +6 -6
  69. package/dist/apis/kanban.js +1 -1
  70. package/dist/apis/message.cjs +6 -6
  71. package/dist/apis/message.js +1 -1
  72. package/dist/apis/metering.cjs +6 -6
  73. package/dist/apis/metering.d.cts +2 -2
  74. package/dist/apis/metering.d.ts +2 -2
  75. package/dist/apis/metering.js +1 -1
  76. package/dist/apis/notes.cjs +6 -6
  77. package/dist/apis/notes.js +1 -1
  78. package/dist/apis/notification.cjs +6 -6
  79. package/dist/apis/notification.js +1 -1
  80. package/dist/apis/organization.cjs +6 -6
  81. package/dist/apis/organization.js +1 -1
  82. package/dist/apis/partner-directory.cjs +6 -6
  83. package/dist/apis/partner-directory.js +1 -1
  84. package/dist/apis/permissions.cjs +6 -6
  85. package/dist/apis/permissions.js +1 -1
  86. package/dist/apis/pricing-tier.cjs +6 -6
  87. package/dist/apis/pricing-tier.js +1 -1
  88. package/dist/apis/pricing.cjs +6 -6
  89. package/dist/apis/pricing.js +1 -1
  90. package/dist/apis/purpose.cjs +6 -6
  91. package/dist/apis/purpose.js +1 -1
  92. package/dist/apis/query.cjs +6 -6
  93. package/dist/apis/query.js +1 -1
  94. package/dist/apis/sandbox.cjs +6 -6
  95. package/dist/apis/sandbox.js +1 -1
  96. package/dist/apis/sharing.cjs +6 -6
  97. package/dist/apis/sharing.js +1 -1
  98. package/dist/apis/snapshot.cjs +6 -6
  99. package/dist/apis/snapshot.js +1 -1
  100. package/dist/apis/submission.cjs +6 -6
  101. package/dist/apis/submission.js +1 -1
  102. package/dist/apis/target.cjs +6 -6
  103. package/dist/apis/target.js +1 -1
  104. package/dist/apis/targeting.cjs +6 -6
  105. package/dist/apis/targeting.js +1 -1
  106. package/dist/apis/template-variables.cjs +6 -6
  107. package/dist/apis/template-variables.js +1 -1
  108. package/dist/apis/user.cjs +6 -6
  109. package/dist/apis/user.js +1 -1
  110. package/dist/apis/validation-rules.cjs +6 -6
  111. package/dist/apis/validation-rules.js +1 -1
  112. package/dist/apis/webhooks.cjs +6 -6
  113. package/dist/apis/webhooks.js +1 -1
  114. package/dist/apis/workflow-definition.cjs +6 -6
  115. package/dist/apis/workflow-definition.js +1 -1
  116. package/dist/apis/workflow.cjs +6 -6
  117. package/dist/apis/workflow.js +1 -1
  118. package/dist/{chunk-4DTTVPUM.cjs → chunk-4M4Z7BKK.cjs} +1 -1
  119. package/dist/{chunk-WE4C7GER.js → chunk-4OBXBYLK.js} +1 -1
  120. package/dist/chunk-M6G3GHCU.js +14 -0
  121. package/dist/{chunk-YEFQY72W.js → chunk-OXXS3O7X.js} +5 -5
  122. package/dist/{chunk-ZBFAP6AO.cjs → chunk-RE2KDGKQ.cjs} +5 -5
  123. package/dist/chunk-ULV6ZQQR.cjs +14 -0
  124. package/dist/event-catalog-5HHAS7NI.js +7 -0
  125. package/dist/event-catalog-SAH4ZEOO.cjs +7 -0
  126. package/dist/{event-catalog-runtime-XWSYNUGQ.cjs → event-catalog-runtime-2ACQMB22.cjs} +2 -2
  127. package/dist/{event-catalog-runtime-Z6OMHQBD.js → event-catalog-runtime-5IXAZVIB.js} +1 -1
  128. package/dist/{event-catalog.d-CCE1qmBN.d.cts → event-catalog.d-BQqG_LGF.d.cts} +248 -1
  129. package/dist/{event-catalog.d-CCE1qmBN.d.ts → event-catalog.d-BQqG_LGF.d.ts} +248 -1
  130. package/dist/index.cjs +12 -12
  131. package/dist/index.d.cts +3 -3
  132. package/dist/index.d.ts +3 -3
  133. package/dist/index.js +3 -3
  134. package/dist/integration-toolkit-4ADZMNTB.cjs +7 -0
  135. package/dist/integration-toolkit-BCRYMKLW.js +7 -0
  136. package/dist/{integration-toolkit-runtime-TNDJH6HK.js → integration-toolkit-runtime-ABL4FFLI.js} +1 -1
  137. package/dist/{integration-toolkit-runtime-57I2O6DI.cjs → integration-toolkit-runtime-SU7VKZJB.cjs} +2 -2
  138. package/dist/{integration-toolkit.d-CEY26qJu.d.cts → integration-toolkit.d-BQ0Fj-48.d.cts} +274 -25
  139. package/dist/{integration-toolkit.d-CEY26qJu.d.ts → integration-toolkit.d-BQ0Fj-48.d.ts} +274 -25
  140. package/dist/{metering-COO4BTOC.js → metering-SHNCUA4O.js} +1 -1
  141. package/dist/{metering-FJI2AU7Q.cjs → metering-WAVFLJZD.cjs} +1 -1
  142. package/dist/{metering.d-DomHYl06.d.cts → metering.d-BP04w-gR.d.cts} +24 -15
  143. package/dist/{metering.d-DomHYl06.d.ts → metering.d-BP04w-gR.d.ts} +24 -15
  144. package/docs/event-catalog.md +439 -0
  145. package/docs/integration-toolkit.md +113 -8
  146. package/docs/metering.md +4 -4
  147. package/package.json +1 -1
  148. package/dist/chunk-2Q6CNXJ2.cjs +0 -14
  149. package/dist/chunk-LTCN52JS.js +0 -14
  150. package/dist/event-catalog-S4OYTDIB.js +0 -7
  151. package/dist/event-catalog-Z6BO4L2G.cjs +0 -7
  152. package/dist/integration-toolkit-FM53LFD7.cjs +0 -7
  153. package/dist/integration-toolkit-PUA7B6YT.js +0 -7
@@ -850,7 +850,9 @@ declare namespace Components {
850
850
  */
851
851
  counter_id?: EntityId /* uuid */;
852
852
  /**
853
- * The direction of the reading (feed-in or feed-out)
853
+ * The direction of the reading. Optional, but **strongly recommended**: readings are keyed by direction in storage, so every reading is stored with one.
854
+ * Resolution order: the value sent here, else the `direction` of the reading's counter, else a value derived from the counter's `obis_number` — `2.x.x` on an electricity counter is `feed-in`, and everything else (including heat, gas and water, which have no meaningful direction) is `feed-out`.
855
+ * Relying on the derived fallback is fine for single-flow media. For electricity, set `direction` on the reading or on the counter: an electricity export counter that carries neither, and whose OBIS code does not say `2.x.x`, will be stored as `feed-out`.
854
856
  */
855
857
  direction?: Direction;
856
858
  /**
@@ -1836,6 +1838,7 @@ declare namespace Paths {
1836
1838
  export type $400 = Components.Responses.InvalidRequest;
1837
1839
  export type $401 = Components.Responses.Unauthorized;
1838
1840
  export type $403 = Components.Responses.Forbidden;
1841
+ export type $413 = Components.Schemas.ErrorResp;
1839
1842
  export type $500 = Components.Responses.InternalServerError;
1840
1843
  }
1841
1844
  }
@@ -2150,7 +2153,10 @@ interface OperationMethods {
2150
2153
  config?: AxiosRequestConfig
2151
2154
  ): OperationResponse<Paths.DeleteMeterReading.Responses.$200>
2152
2155
  /**
2153
- * getReadingChangesets - List pending reading changesets for a counter
2156
+ * getReadingChangesets - getReadingChangesets
2157
+ *
2158
+ * Lists the pending reading changesets for a counter.
2159
+ *
2154
2160
  */
2155
2161
  'getReadingChangesets'(
2156
2162
  parameters?: Parameters<Paths.GetReadingChangesets.PathParameters> | null,
@@ -2158,9 +2164,9 @@ interface OperationMethods {
2158
2164
  config?: AxiosRequestConfig
2159
2165
  ): OperationResponse<Paths.GetReadingChangesets.Responses.$200>
2160
2166
  /**
2161
- * applyReadingChangeset - Apply (approve) a pending reading changeset
2167
+ * applyReadingChangeset - applyReadingChangeset
2162
2168
  *
2163
- * Applies the proposed reading value to ClickHouse and removes the pending changeset.
2169
+ * Applies (approves) a pending reading changeset: the proposed reading value is written to ClickHouse and the pending changeset is removed.
2164
2170
  *
2165
2171
  * Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
2166
2172
  *
@@ -2171,9 +2177,9 @@ interface OperationMethods {
2171
2177
  config?: AxiosRequestConfig
2172
2178
  ): OperationResponse<Paths.ApplyReadingChangeset.Responses.$200>
2173
2179
  /**
2174
- * dismissReadingChangeset - Dismiss (reject) a pending reading changeset
2180
+ * dismissReadingChangeset - dismissReadingChangeset
2175
2181
  *
2176
- * Removes the pending changeset without applying it. The reading value remains unchanged.
2182
+ * Dismisses (rejects) a pending reading changeset: the changeset is removed without being applied. The reading value remains unchanged.
2177
2183
  *
2178
2184
  * Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
2179
2185
  *
@@ -2184,9 +2190,9 @@ interface OperationMethods {
2184
2190
  config?: AxiosRequestConfig
2185
2191
  ): OperationResponse<Paths.DismissReadingChangeset.Responses.$200>
2186
2192
  /**
2187
- * updateReadingChangeset - Edit a pending reading changeset
2193
+ * updateReadingChangeset - updateReadingChangeset
2188
2194
  *
2189
- * Updates the proposed value of a pending changeset without going through the normal write path.
2195
+ * Edits a pending reading changeset by updating its proposed value, without going through the normal write path.
2190
2196
  *
2191
2197
  */
2192
2198
  'updateReadingChangeset'(
@@ -2459,7 +2465,10 @@ interface PathsDictionary {
2459
2465
  }
2460
2466
  ['/v1/metering/reading/{meter_id}/{counter_id}/changesets']: {
2461
2467
  /**
2462
- * getReadingChangesets - List pending reading changesets for a counter
2468
+ * getReadingChangesets - getReadingChangesets
2469
+ *
2470
+ * Lists the pending reading changesets for a counter.
2471
+ *
2463
2472
  */
2464
2473
  'get'(
2465
2474
  parameters?: Parameters<Paths.GetReadingChangesets.PathParameters> | null,
@@ -2469,9 +2478,9 @@ interface PathsDictionary {
2469
2478
  }
2470
2479
  ['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}:apply']: {
2471
2480
  /**
2472
- * applyReadingChangeset - Apply (approve) a pending reading changeset
2481
+ * applyReadingChangeset - applyReadingChangeset
2473
2482
  *
2474
- * Applies the proposed reading value to ClickHouse and removes the pending changeset.
2483
+ * Applies (approves) a pending reading changeset: the proposed reading value is written to ClickHouse and the pending changeset is removed.
2475
2484
  *
2476
2485
  * Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
2477
2486
  *
@@ -2484,9 +2493,9 @@ interface PathsDictionary {
2484
2493
  }
2485
2494
  ['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}:dismiss']: {
2486
2495
  /**
2487
- * dismissReadingChangeset - Dismiss (reject) a pending reading changeset
2496
+ * dismissReadingChangeset - dismissReadingChangeset
2488
2497
  *
2489
- * Removes the pending changeset without applying it. The reading value remains unchanged.
2498
+ * Dismisses (rejects) a pending reading changeset: the changeset is removed without being applied. The reading value remains unchanged.
2490
2499
  *
2491
2500
  * Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
2492
2501
  *
@@ -2499,9 +2508,9 @@ interface PathsDictionary {
2499
2508
  }
2500
2509
  ['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}']: {
2501
2510
  /**
2502
- * updateReadingChangeset - Edit a pending reading changeset
2511
+ * updateReadingChangeset - updateReadingChangeset
2503
2512
  *
2504
- * Updates the proposed value of a pending changeset without going through the normal write path.
2513
+ * Edits a pending reading changeset by updating its proposed value, without going through the normal write path.
2505
2514
  *
2506
2515
  */
2507
2516
  'patch'(
@@ -850,7 +850,9 @@ declare namespace Components {
850
850
  */
851
851
  counter_id?: EntityId /* uuid */;
852
852
  /**
853
- * The direction of the reading (feed-in or feed-out)
853
+ * The direction of the reading. Optional, but **strongly recommended**: readings are keyed by direction in storage, so every reading is stored with one.
854
+ * Resolution order: the value sent here, else the `direction` of the reading's counter, else a value derived from the counter's `obis_number` — `2.x.x` on an electricity counter is `feed-in`, and everything else (including heat, gas and water, which have no meaningful direction) is `feed-out`.
855
+ * Relying on the derived fallback is fine for single-flow media. For electricity, set `direction` on the reading or on the counter: an electricity export counter that carries neither, and whose OBIS code does not say `2.x.x`, will be stored as `feed-out`.
854
856
  */
855
857
  direction?: Direction;
856
858
  /**
@@ -1836,6 +1838,7 @@ declare namespace Paths {
1836
1838
  export type $400 = Components.Responses.InvalidRequest;
1837
1839
  export type $401 = Components.Responses.Unauthorized;
1838
1840
  export type $403 = Components.Responses.Forbidden;
1841
+ export type $413 = Components.Schemas.ErrorResp;
1839
1842
  export type $500 = Components.Responses.InternalServerError;
1840
1843
  }
1841
1844
  }
@@ -2150,7 +2153,10 @@ interface OperationMethods {
2150
2153
  config?: AxiosRequestConfig
2151
2154
  ): OperationResponse<Paths.DeleteMeterReading.Responses.$200>
2152
2155
  /**
2153
- * getReadingChangesets - List pending reading changesets for a counter
2156
+ * getReadingChangesets - getReadingChangesets
2157
+ *
2158
+ * Lists the pending reading changesets for a counter.
2159
+ *
2154
2160
  */
2155
2161
  'getReadingChangesets'(
2156
2162
  parameters?: Parameters<Paths.GetReadingChangesets.PathParameters> | null,
@@ -2158,9 +2164,9 @@ interface OperationMethods {
2158
2164
  config?: AxiosRequestConfig
2159
2165
  ): OperationResponse<Paths.GetReadingChangesets.Responses.$200>
2160
2166
  /**
2161
- * applyReadingChangeset - Apply (approve) a pending reading changeset
2167
+ * applyReadingChangeset - applyReadingChangeset
2162
2168
  *
2163
- * Applies the proposed reading value to ClickHouse and removes the pending changeset.
2169
+ * Applies (approves) a pending reading changeset: the proposed reading value is written to ClickHouse and the pending changeset is removed.
2164
2170
  *
2165
2171
  * Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
2166
2172
  *
@@ -2171,9 +2177,9 @@ interface OperationMethods {
2171
2177
  config?: AxiosRequestConfig
2172
2178
  ): OperationResponse<Paths.ApplyReadingChangeset.Responses.$200>
2173
2179
  /**
2174
- * dismissReadingChangeset - Dismiss (reject) a pending reading changeset
2180
+ * dismissReadingChangeset - dismissReadingChangeset
2175
2181
  *
2176
- * Removes the pending changeset without applying it. The reading value remains unchanged.
2182
+ * Dismisses (rejects) a pending reading changeset: the changeset is removed without being applied. The reading value remains unchanged.
2177
2183
  *
2178
2184
  * Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
2179
2185
  *
@@ -2184,9 +2190,9 @@ interface OperationMethods {
2184
2190
  config?: AxiosRequestConfig
2185
2191
  ): OperationResponse<Paths.DismissReadingChangeset.Responses.$200>
2186
2192
  /**
2187
- * updateReadingChangeset - Edit a pending reading changeset
2193
+ * updateReadingChangeset - updateReadingChangeset
2188
2194
  *
2189
- * Updates the proposed value of a pending changeset without going through the normal write path.
2195
+ * Edits a pending reading changeset by updating its proposed value, without going through the normal write path.
2190
2196
  *
2191
2197
  */
2192
2198
  'updateReadingChangeset'(
@@ -2459,7 +2465,10 @@ interface PathsDictionary {
2459
2465
  }
2460
2466
  ['/v1/metering/reading/{meter_id}/{counter_id}/changesets']: {
2461
2467
  /**
2462
- * getReadingChangesets - List pending reading changesets for a counter
2468
+ * getReadingChangesets - getReadingChangesets
2469
+ *
2470
+ * Lists the pending reading changesets for a counter.
2471
+ *
2463
2472
  */
2464
2473
  'get'(
2465
2474
  parameters?: Parameters<Paths.GetReadingChangesets.PathParameters> | null,
@@ -2469,9 +2478,9 @@ interface PathsDictionary {
2469
2478
  }
2470
2479
  ['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}:apply']: {
2471
2480
  /**
2472
- * applyReadingChangeset - Apply (approve) a pending reading changeset
2481
+ * applyReadingChangeset - applyReadingChangeset
2473
2482
  *
2474
- * Applies the proposed reading value to ClickHouse and removes the pending changeset.
2483
+ * Applies (approves) a pending reading changeset: the proposed reading value is written to ClickHouse and the pending changeset is removed.
2475
2484
  *
2476
2485
  * Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
2477
2486
  *
@@ -2484,9 +2493,9 @@ interface PathsDictionary {
2484
2493
  }
2485
2494
  ['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}:dismiss']: {
2486
2495
  /**
2487
- * dismissReadingChangeset - Dismiss (reject) a pending reading changeset
2496
+ * dismissReadingChangeset - dismissReadingChangeset
2488
2497
  *
2489
- * Removes the pending changeset without applying it. The reading value remains unchanged.
2498
+ * Dismisses (rejects) a pending reading changeset: the changeset is removed without being applied. The reading value remains unchanged.
2490
2499
  *
2491
2500
  * Requires `meter_reading:edit` permission (approval workflow action on the reading's approval state).
2492
2501
  *
@@ -2499,9 +2508,9 @@ interface PathsDictionary {
2499
2508
  }
2500
2509
  ['/v1/metering/reading/{meter_id}/{counter_id}/changesets/{changeset_id}']: {
2501
2510
  /**
2502
- * updateReadingChangeset - Edit a pending reading changeset
2511
+ * updateReadingChangeset - updateReadingChangeset
2503
2512
  *
2504
- * Updates the proposed value of a pending changeset without going through the normal write path.
2513
+ * Edits a pending reading changeset by updating its proposed value, without going through the normal write path.
2505
2514
  *
2506
2515
  */
2507
2516
  'patch'(
@@ -33,6 +33,10 @@ const { data } = await eventCatalogClient.listEvents(...)
33
33
  - [`deprecateCustomEvent`](#deprecatecustomevent)
34
34
  - [`previewCustomEvent`](#previewcustomevent)
35
35
  - [`publishCustomEventDefinition`](#publishcustomeventdefinition)
36
+ - [`getCustomEventVersionDraft`](#getcustomeventversiondraft)
37
+ - [`putCustomEventVersionDraft`](#putcustomeventversiondraft)
38
+ - [`deleteCustomEventVersionDraft`](#deletecustomeventversiondraft)
39
+ - [`publishCustomEventVersion`](#publishcustomeventversion)
36
40
  - [`getEventJSONSchema`](#geteventjsonschema)
37
41
  - [`getEventExample`](#geteventexample)
38
42
  - [`listEventVersions`](#listeventversions)
@@ -49,6 +53,8 @@ const { data } = await eventCatalogClient.listEvents(...)
49
53
  - [`CustomEventLineage`](#customeventlineage)
50
54
  - [`PurposeFilterSnapshot`](#purposefiltersnapshot)
51
55
  - [`PublishCustomEventPayload`](#publishcustomeventpayload)
56
+ - [`CustomEventVersionDraft`](#customeventversiondraft)
57
+ - [`PublishCustomEventVersionPayload`](#publishcustomeventversionpayload)
52
58
  - [`ValidationIssue`](#validationissue)
53
59
  - [`PreviewEventResponse`](#previeweventresponse)
54
60
  - [`UpdateEventPayload`](#updateeventpayload)
@@ -757,6 +763,360 @@ const { data } = await client.publishCustomEventDefinition(
757
763
 
758
764
  ---
759
765
 
766
+ ### `getCustomEventVersionDraft`
767
+
768
+ Read the in-progress successor of a published custom event, together with the version it
769
+ would be published as. The live version keeps firing while the successor is authored.
770
+
771
+ `GET /v1/events/{event_name}/version_draft`
772
+
773
+ ```ts
774
+ const { data } = await client.getCustomEventVersionDraft({
775
+ event_name: 'example',
776
+ })
777
+ ```
778
+
779
+ <details>
780
+ <summary>Response</summary>
781
+
782
+ ```json
783
+ {
784
+ "config": {
785
+ "event_name": "AddMeterReading",
786
+ "event_title": "Add Meter Reading",
787
+ "event_description": "Triggered when a new meter reading is added",
788
+ "event_version": "1.0",
789
+ "event_status": "active",
790
+ "event_tags": ["builtin", "metering", "erp"],
791
+ "schema_fields": {},
792
+ "entity_graph": {
793
+ "nodes": [
794
+ {
795
+ "id": "contact",
796
+ "schema": "contact",
797
+ "cardinality": "one",
798
+ "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]
799
+ }
800
+ ],
801
+ "edges": [
802
+ {
803
+ "from": "contact",
804
+ "to": "billing_account"
805
+ }
806
+ ]
807
+ },
808
+ "entity_operation": {
809
+ "operation": ["createEntity", "updateEntity"],
810
+ "schema": ["contact", "contract", "order"],
811
+ "attribute": ["email", "phone", "status"],
812
+ "purpose": ["Kündigung", "Umzug/Auszug"],
813
+ "purpose_filters": [
814
+ {
815
+ "id": "string",
816
+ "display_name": "string"
817
+ }
818
+ ]
819
+ },
820
+ "enabled": true,
821
+ "auto_trigger": true,
822
+ "automation_trigger": true,
823
+ "api_trigger": true,
824
+ "automation_trigger_only": true,
825
+ "automation_trigger_seed_node": "ticket",
826
+ "event_origin": "builtin",
827
+ "mapping": {
828
+ "mode": "guided",
829
+ "jsonata": "string"
830
+ },
831
+ "lineage": {
832
+ "base_event_name": "string",
833
+ "base_event_version": "string"
834
+ },
835
+ "success_criteria": [
836
+ {
837
+ "entity_schema": "contract",
838
+ "attribute": "installment_amount"
839
+ },
840
+ {
841
+ "entity_schema": "billing_account",
842
+ "attribute": "due_date"
843
+ }
844
+ ]
845
+ },
846
+ "change_class": "none",
847
+ "next_version": "1.1",
848
+ "changes": [
849
+ {
850
+ "field": "reading",
851
+ "op": "added",
852
+ "type_old": "string",
853
+ "type_new": "string"
854
+ }
855
+ ],
856
+ "remapped_fields": ["string"],
857
+ "added_nodes": ["string"],
858
+ "blocked_reason": "string"
859
+ }
860
+ ```
861
+
862
+ </details>
863
+
864
+ ---
865
+
866
+ ### `putCustomEventVersionDraft`
867
+
868
+ Create or replace the successor of a published custom event. The published definition stays
869
+ immutable and keeps firing; only publishing the draft promotes it.
870
+
871
+ `PUT /v1/events/{event_name}/version_draft`
872
+
873
+ ```ts
874
+ const { data } = await client.putCustomEventVersionDraft(
875
+ {
876
+ event_name: 'example',
877
+ },
878
+ {
879
+ event_name: 'string',
880
+ event_title: 'string',
881
+ event_description: 'string',
882
+ event_tags: ['string'],
883
+ schema_fields: {},
884
+ entity_graph: {
885
+ nodes: [
886
+ {
887
+ id: 'contact',
888
+ schema: 'contact',
889
+ cardinality: 'one',
890
+ fields: ['_id', '_title', 'first_name', 'account', '!account.*._files', '**._product']
891
+ }
892
+ ],
893
+ edges: [
894
+ {
895
+ from: 'contact',
896
+ to: 'billing_account'
897
+ }
898
+ ]
899
+ },
900
+ entity_operation: {
901
+ operation: ['createEntity', 'updateEntity'],
902
+ schema: ['contact', 'contract', 'order'],
903
+ attribute: ['email', 'phone', 'status'],
904
+ purpose: ['Kündigung', 'Umzug/Auszug'],
905
+ purpose_filters: [
906
+ {
907
+ id: 'string',
908
+ display_name: 'string'
909
+ }
910
+ ]
911
+ },
912
+ automation_trigger: true,
913
+ api_trigger: true,
914
+ automation_trigger_only: false,
915
+ automation_trigger_seed_node: 'string',
916
+ mapping: {
917
+ mode: 'guided',
918
+ jsonata: 'string'
919
+ },
920
+ lineage: {
921
+ base_event_name: 'string',
922
+ base_event_version: 'string'
923
+ },
924
+ example: {}
925
+ },
926
+ )
927
+ ```
928
+
929
+ <details>
930
+ <summary>Response</summary>
931
+
932
+ ```json
933
+ {
934
+ "config": {
935
+ "event_name": "AddMeterReading",
936
+ "event_title": "Add Meter Reading",
937
+ "event_description": "Triggered when a new meter reading is added",
938
+ "event_version": "1.0",
939
+ "event_status": "active",
940
+ "event_tags": ["builtin", "metering", "erp"],
941
+ "schema_fields": {},
942
+ "entity_graph": {
943
+ "nodes": [
944
+ {
945
+ "id": "contact",
946
+ "schema": "contact",
947
+ "cardinality": "one",
948
+ "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]
949
+ }
950
+ ],
951
+ "edges": [
952
+ {
953
+ "from": "contact",
954
+ "to": "billing_account"
955
+ }
956
+ ]
957
+ },
958
+ "entity_operation": {
959
+ "operation": ["createEntity", "updateEntity"],
960
+ "schema": ["contact", "contract", "order"],
961
+ "attribute": ["email", "phone", "status"],
962
+ "purpose": ["Kündigung", "Umzug/Auszug"],
963
+ "purpose_filters": [
964
+ {
965
+ "id": "string",
966
+ "display_name": "string"
967
+ }
968
+ ]
969
+ },
970
+ "enabled": true,
971
+ "auto_trigger": true,
972
+ "automation_trigger": true,
973
+ "api_trigger": true,
974
+ "automation_trigger_only": true,
975
+ "automation_trigger_seed_node": "ticket",
976
+ "event_origin": "builtin",
977
+ "mapping": {
978
+ "mode": "guided",
979
+ "jsonata": "string"
980
+ },
981
+ "lineage": {
982
+ "base_event_name": "string",
983
+ "base_event_version": "string"
984
+ },
985
+ "success_criteria": [
986
+ {
987
+ "entity_schema": "contract",
988
+ "attribute": "installment_amount"
989
+ },
990
+ {
991
+ "entity_schema": "billing_account",
992
+ "attribute": "due_date"
993
+ }
994
+ ]
995
+ },
996
+ "change_class": "none",
997
+ "next_version": "1.1",
998
+ "changes": [
999
+ {
1000
+ "field": "reading",
1001
+ "op": "added",
1002
+ "type_old": "string",
1003
+ "type_new": "string"
1004
+ }
1005
+ ],
1006
+ "remapped_fields": ["string"],
1007
+ "added_nodes": ["string"],
1008
+ "blocked_reason": "string"
1009
+ }
1010
+ ```
1011
+
1012
+ </details>
1013
+
1014
+ ---
1015
+
1016
+ ### `deleteCustomEventVersionDraft`
1017
+
1018
+ Discard the next-version draft. The published version is untouched.
1019
+
1020
+ `DELETE /v1/events/{event_name}/version_draft`
1021
+
1022
+ ```ts
1023
+ const { data } = await client.deleteCustomEventVersionDraft({
1024
+ event_name: 'example',
1025
+ })
1026
+ ```
1027
+
1028
+ ---
1029
+
1030
+ ### `publishCustomEventVersion`
1031
+
1032
+ Publish the next-version draft as the event's new live version.
1033
+
1034
+ `POST /v1/events/{event_name}/version_draft:publish`
1035
+
1036
+ ```ts
1037
+ const { data } = await client.publishCustomEventVersion(
1038
+ {
1039
+ event_name: 'example',
1040
+ },
1041
+ {
1042
+ change_summary: 'string',
1043
+ change_notes: 'string'
1044
+ },
1045
+ )
1046
+ ```
1047
+
1048
+ <details>
1049
+ <summary>Response</summary>
1050
+
1051
+ ```json
1052
+ {
1053
+ "event_name": "AddMeterReading",
1054
+ "event_title": "Add Meter Reading",
1055
+ "event_description": "Triggered when a new meter reading is added",
1056
+ "event_version": "1.0",
1057
+ "event_status": "active",
1058
+ "event_tags": ["builtin", "metering", "erp"],
1059
+ "schema_fields": {},
1060
+ "entity_graph": {
1061
+ "nodes": [
1062
+ {
1063
+ "id": "contact",
1064
+ "schema": "contact",
1065
+ "cardinality": "one",
1066
+ "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"]
1067
+ }
1068
+ ],
1069
+ "edges": [
1070
+ {
1071
+ "from": "contact",
1072
+ "to": "billing_account"
1073
+ }
1074
+ ]
1075
+ },
1076
+ "entity_operation": {
1077
+ "operation": ["createEntity", "updateEntity"],
1078
+ "schema": ["contact", "contract", "order"],
1079
+ "attribute": ["email", "phone", "status"],
1080
+ "purpose": ["Kündigung", "Umzug/Auszug"],
1081
+ "purpose_filters": [
1082
+ {
1083
+ "id": "string",
1084
+ "display_name": "string"
1085
+ }
1086
+ ]
1087
+ },
1088
+ "enabled": true,
1089
+ "auto_trigger": true,
1090
+ "automation_trigger": true,
1091
+ "api_trigger": true,
1092
+ "automation_trigger_only": true,
1093
+ "automation_trigger_seed_node": "ticket",
1094
+ "event_origin": "builtin",
1095
+ "mapping": {
1096
+ "mode": "guided",
1097
+ "jsonata": "string"
1098
+ },
1099
+ "lineage": {
1100
+ "base_event_name": "string",
1101
+ "base_event_version": "string"
1102
+ },
1103
+ "success_criteria": [
1104
+ {
1105
+ "entity_schema": "contract",
1106
+ "attribute": "installment_amount"
1107
+ },
1108
+ {
1109
+ "entity_schema": "billing_account",
1110
+ "attribute": "due_date"
1111
+ }
1112
+ ]
1113
+ }
1114
+ ```
1115
+
1116
+ </details>
1117
+
1118
+ ---
1119
+
760
1120
  ### `getEventJSONSchema`
761
1121
 
762
1122
  Retrieve the JSON Schema of a specific business event. Pass an optional
@@ -1408,6 +1768,85 @@ type PublishCustomEventPayload = {
1408
1768
  }
1409
1769
  ```
1410
1770
 
1771
+ ### `CustomEventVersionDraft`
1772
+
1773
+ A pending successor to a published custom event, with the version it would become.
1774
+
1775
+
1776
+ ```ts
1777
+ type CustomEventVersionDraft = {
1778
+ config: {
1779
+ event_name: string
1780
+ event_title?: string
1781
+ event_description?: string
1782
+ event_version: string
1783
+ event_status?: "active" | "deprecated" | "draft" | "disabled"
1784
+ event_tags?: string[]
1785
+ schema_fields: Record<string, {
1786
+ json_schema: { ... }
1787
+ required?: { ... }
1788
+ graph_source?: { ... }
1789
+ } | {
1790
+ entity_schema: { ... }
1791
+ required?: { ... }
1792
+ } | {
1793
+ items: { ... }
1794
+ required?: { ... }
1795
+ }>
1796
+ entity_graph?: {
1797
+ nodes: { ... }
1798
+ edges: { ... }
1799
+ }
1800
+ entity_operation?: {
1801
+ operation: { ... }
1802
+ schema: { ... }
1803
+ attribute?: { ... }
1804
+ purpose?: { ... }
1805
+ purpose_filters?: { ... }
1806
+ }
1807
+ enabled?: boolean
1808
+ auto_trigger?: boolean
1809
+ automation_trigger?: boolean
1810
+ api_trigger?: boolean
1811
+ automation_trigger_only?: boolean
1812
+ automation_trigger_seed_node?: string
1813
+ event_origin?: "builtin" | "custom"
1814
+ mapping?: {
1815
+ mode: { ... }
1816
+ jsonata?: { ... }
1817
+ }
1818
+ lineage?: {
1819
+ base_event_name: { ... }
1820
+ base_event_version: { ... }
1821
+ }
1822
+ success_criteria?: Array<{
1823
+ entity_schema: { ... }
1824
+ attribute: { ... }
1825
+ }>
1826
+ }
1827
+ change_class: "none" | "minor" | "major" | "blocked"
1828
+ next_version?: string
1829
+ changes: Array<{
1830
+ field: string
1831
+ op: "added" | "removed" | "type-changed"
1832
+ type_old?: string
1833
+ type_new?: string
1834
+ }>
1835
+ remapped_fields: string[]
1836
+ added_nodes: string[]
1837
+ blocked_reason?: string
1838
+ }
1839
+ ```
1840
+
1841
+ ### `PublishCustomEventVersionPayload`
1842
+
1843
+ ```ts
1844
+ type PublishCustomEventVersionPayload = {
1845
+ change_summary?: string
1846
+ change_notes?: string
1847
+ }
1848
+ ```
1849
+
1411
1850
  ### `ValidationIssue`
1412
1851
 
1413
1852
  ```ts