@epilot/sdk 2.4.4-alpha.0 → 2.4.4

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 (222) hide show
  1. package/dist/access-token.d-CnmUTOlq.d.cts +552 -0
  2. package/dist/access-token.d-CnmUTOlq.d.ts +552 -0
  3. package/dist/address-suggestions.d-_YwTOR-9.d.cts +339 -0
  4. package/dist/address-suggestions.d-_YwTOR-9.d.ts +339 -0
  5. package/dist/address.d-CwAPOVxa.d.cts +437 -0
  6. package/dist/address.d-CwAPOVxa.d.ts +437 -0
  7. package/dist/ai-agents.d-OkXfr2bz.d.cts +1339 -0
  8. package/dist/ai-agents.d-OkXfr2bz.d.ts +1339 -0
  9. package/dist/apis/access-token.d.cts +18 -0
  10. package/dist/apis/access-token.d.ts +12 -9
  11. package/dist/apis/address-suggestions.d.cts +18 -0
  12. package/dist/apis/address-suggestions.d.ts +12 -9
  13. package/dist/apis/address.d.cts +18 -0
  14. package/dist/apis/address.d.ts +12 -9
  15. package/dist/apis/ai-agents.d.cts +18 -0
  16. package/dist/apis/ai-agents.d.ts +12 -9
  17. package/dist/apis/app.d.cts +18 -0
  18. package/dist/apis/app.d.ts +12 -9
  19. package/dist/apis/audit-logs.d.cts +18 -0
  20. package/dist/apis/audit-logs.d.ts +12 -9
  21. package/dist/apis/automation.d.cts +18 -0
  22. package/dist/apis/automation.d.ts +12 -9
  23. package/dist/apis/billing.d.cts +18 -0
  24. package/dist/apis/billing.d.ts +12 -9
  25. package/dist/apis/blueprint-manifest.d.cts +18 -0
  26. package/dist/apis/blueprint-manifest.d.ts +12 -9
  27. package/dist/apis/calendar.d.cts +18 -0
  28. package/dist/apis/calendar.d.ts +12 -9
  29. package/dist/apis/configuration-hub.d.cts +18 -0
  30. package/dist/apis/configuration-hub.d.ts +12 -9
  31. package/dist/apis/consent.d.cts +18 -0
  32. package/dist/apis/consent.d.ts +12 -9
  33. package/dist/apis/customer-portal.d.cts +18 -0
  34. package/dist/apis/customer-portal.d.ts +12 -9
  35. package/dist/apis/dashboard.d.cts +18 -0
  36. package/dist/apis/dashboard.d.ts +12 -9
  37. package/dist/apis/data-governance.d.cts +18 -0
  38. package/dist/apis/data-governance.d.ts +12 -9
  39. package/dist/apis/deduplication.d.cts +18 -0
  40. package/dist/apis/deduplication.d.ts +12 -9
  41. package/dist/apis/design.d.cts +18 -0
  42. package/dist/apis/design.d.ts +12 -9
  43. package/dist/apis/document.d.cts +18 -0
  44. package/dist/apis/document.d.ts +12 -9
  45. package/dist/apis/email-settings.d.cts +18 -0
  46. package/dist/apis/email-settings.d.ts +12 -9
  47. package/dist/apis/email-template.d.cts +18 -0
  48. package/dist/apis/email-template.d.ts +12 -9
  49. package/dist/apis/entity-mapping.d.cts +18 -0
  50. package/dist/apis/entity-mapping.d.ts +12 -9
  51. package/dist/apis/entity.d.cts +18 -0
  52. package/dist/apis/entity.d.ts +12 -9
  53. package/dist/apis/environments.d.cts +18 -0
  54. package/dist/apis/environments.d.ts +12 -9
  55. package/dist/apis/event-catalog.d.cts +18 -0
  56. package/dist/apis/event-catalog.d.ts +12 -9
  57. package/dist/apis/file.d.cts +18 -0
  58. package/dist/apis/file.d.ts +12 -9
  59. package/dist/apis/iban.d.cts +18 -0
  60. package/dist/apis/iban.d.ts +12 -9
  61. package/dist/apis/integration-toolkit.d.cts +18 -0
  62. package/dist/apis/integration-toolkit.d.ts +12 -9
  63. package/dist/apis/journey.d.cts +18 -0
  64. package/dist/apis/journey.d.ts +12 -9
  65. package/dist/apis/kanban.d.cts +18 -0
  66. package/dist/apis/kanban.d.ts +12 -9
  67. package/dist/apis/message.d.cts +18 -0
  68. package/dist/apis/message.d.ts +12 -9
  69. package/dist/apis/metering.d.cts +18 -0
  70. package/dist/apis/metering.d.ts +12 -9
  71. package/dist/apis/notes.d.cts +18 -0
  72. package/dist/apis/notes.d.ts +12 -9
  73. package/dist/apis/notification.d.cts +18 -0
  74. package/dist/apis/notification.d.ts +12 -9
  75. package/dist/apis/organization.d.cts +18 -0
  76. package/dist/apis/organization.d.ts +12 -9
  77. package/dist/apis/partner-directory.d.cts +18 -0
  78. package/dist/apis/partner-directory.d.ts +12 -9
  79. package/dist/apis/permissions.d.cts +18 -0
  80. package/dist/apis/permissions.d.ts +12 -9
  81. package/dist/apis/pricing-tier.d.cts +18 -0
  82. package/dist/apis/pricing-tier.d.ts +12 -9
  83. package/dist/apis/pricing.d.cts +18 -0
  84. package/dist/apis/pricing.d.ts +12 -9
  85. package/dist/apis/purpose.d.cts +18 -0
  86. package/dist/apis/purpose.d.ts +12 -9
  87. package/dist/apis/query.d.cts +18 -0
  88. package/dist/apis/query.d.ts +12 -9
  89. package/dist/apis/sandbox.d.cts +18 -0
  90. package/dist/apis/sandbox.d.ts +12 -9
  91. package/dist/apis/sharing.d.cts +18 -0
  92. package/dist/apis/sharing.d.ts +12 -9
  93. package/dist/apis/submission.d.cts +18 -0
  94. package/dist/apis/submission.d.ts +12 -9
  95. package/dist/apis/target.d.cts +597 -0
  96. package/dist/apis/target.d.ts +591 -9
  97. package/dist/apis/targeting.d.cts +18 -0
  98. package/dist/apis/targeting.d.ts +12 -9
  99. package/dist/apis/template-variables.d.cts +18 -0
  100. package/dist/apis/template-variables.d.ts +12 -9
  101. package/dist/apis/user.d.cts +18 -0
  102. package/dist/apis/user.d.ts +12 -9
  103. package/dist/apis/validation-rules.d.cts +18 -0
  104. package/dist/apis/validation-rules.d.ts +12 -9
  105. package/dist/apis/webhooks.d.cts +18 -0
  106. package/dist/apis/webhooks.d.ts +12 -9
  107. package/dist/apis/workflow-definition.d.cts +18 -0
  108. package/dist/apis/workflow-definition.d.ts +12 -9
  109. package/dist/apis/workflow.d.cts +18 -0
  110. package/dist/apis/workflow.d.ts +12 -9
  111. package/dist/app.d-u7Dq42kU.d.cts +3391 -0
  112. package/dist/app.d-u7Dq42kU.d.ts +3391 -0
  113. package/dist/audit-logs.d-BRToFqeX.d.cts +287 -0
  114. package/dist/audit-logs.d-BRToFqeX.d.ts +287 -0
  115. package/dist/automation.d-Du6-uiz5.d.cts +5283 -0
  116. package/dist/automation.d-Du6-uiz5.d.ts +5283 -0
  117. package/dist/billing.d-Bs8Ku9qE.d.cts +993 -0
  118. package/dist/billing.d-Bs8Ku9qE.d.ts +993 -0
  119. package/dist/blueprint-manifest.d-BPyzoR0X.d.cts +4343 -0
  120. package/dist/blueprint-manifest.d-BPyzoR0X.d.ts +4343 -0
  121. package/dist/calendar.d-BEjLDagH.d.cts +353 -0
  122. package/dist/calendar.d-BEjLDagH.d.ts +353 -0
  123. package/dist/configuration-hub.d-Cqaq2F-W.d.cts +478 -0
  124. package/dist/configuration-hub.d-Cqaq2F-W.d.ts +478 -0
  125. package/dist/consent.d-C2PROHhX.d.cts +265 -0
  126. package/dist/consent.d-C2PROHhX.d.ts +265 -0
  127. package/dist/customer-portal.d-DyZ2n2dW.d.cts +16728 -0
  128. package/dist/customer-portal.d-DyZ2n2dW.d.ts +16728 -0
  129. package/dist/dashboard.d-CsGcA74I.d.cts +440 -0
  130. package/dist/dashboard.d-CsGcA74I.d.ts +440 -0
  131. package/dist/data-governance.d-BbZ466j5.d.cts +1178 -0
  132. package/dist/data-governance.d-BbZ466j5.d.ts +1178 -0
  133. package/dist/deduplication.d-D5GYddVu.d.cts +218 -0
  134. package/dist/deduplication.d-D5GYddVu.d.ts +218 -0
  135. package/dist/design.d-BRre8iLg.d.cts +2346 -0
  136. package/dist/design.d-BRre8iLg.d.ts +2346 -0
  137. package/dist/document.d-DN37pjdx.d.cts +648 -0
  138. package/dist/document.d-DN37pjdx.d.ts +648 -0
  139. package/dist/email-settings.d-B7Q_xT25.d.cts +2417 -0
  140. package/dist/email-settings.d-B7Q_xT25.d.ts +2417 -0
  141. package/dist/email-template.d-gtQkdaXM.d.cts +1188 -0
  142. package/dist/email-template.d-gtQkdaXM.d.ts +1188 -0
  143. package/dist/entity-mapping.d-DKSW3sfy.d.cts +1092 -0
  144. package/dist/entity-mapping.d-DKSW3sfy.d.ts +1092 -0
  145. package/dist/entity.d-BHR9dEon.d.cts +18479 -0
  146. package/dist/entity.d-BHR9dEon.d.ts +18479 -0
  147. package/dist/environments.d-BvqvN-PD.d.cts +382 -0
  148. package/dist/environments.d-BvqvN-PD.d.ts +382 -0
  149. package/dist/event-catalog.d-ENw6HO-w.d.cts +1511 -0
  150. package/dist/event-catalog.d-ENw6HO-w.d.ts +1511 -0
  151. package/dist/file.d-DcTJxjp7.d.cts +2992 -0
  152. package/dist/file.d-DcTJxjp7.d.ts +2992 -0
  153. package/dist/iban.d-BwdiGbxi.d.cts +70 -0
  154. package/dist/iban.d-BwdiGbxi.d.ts +70 -0
  155. package/dist/index.d.cts +182 -0
  156. package/dist/index.d.ts +182 -12
  157. package/dist/integration-toolkit.d-Ry-KC9ow.d.cts +5796 -0
  158. package/dist/integration-toolkit.d-Ry-KC9ow.d.ts +5796 -0
  159. package/dist/journey.d-ClXO0xK8.d.cts +1931 -0
  160. package/dist/journey.d-ClXO0xK8.d.ts +1931 -0
  161. package/dist/kanban.d-BHnSRCYW.d.cts +760 -0
  162. package/dist/kanban.d-BHnSRCYW.d.ts +760 -0
  163. package/dist/message.d-B5UuSqgw.d.cts +3811 -0
  164. package/dist/message.d-B5UuSqgw.d.ts +3811 -0
  165. package/dist/metering.d-DvtPv7wk.d.cts +1841 -0
  166. package/dist/metering.d-DvtPv7wk.d.ts +1841 -0
  167. package/dist/notes.d-BC-scR42.d.cts +1046 -0
  168. package/dist/notes.d-BC-scR42.d.ts +1046 -0
  169. package/dist/notification.d-BfBL3lga.d.cts +1147 -0
  170. package/dist/notification.d-BfBL3lga.d.ts +1147 -0
  171. package/dist/organization.d-DqwnNxMg.d.cts +1271 -0
  172. package/dist/organization.d-DqwnNxMg.d.ts +1271 -0
  173. package/dist/partner-directory.d-BCIjHoGs.d.cts +2337 -0
  174. package/dist/partner-directory.d-BCIjHoGs.d.ts +2337 -0
  175. package/dist/permissions.d-l6AT8SYP.d.cts +1279 -0
  176. package/dist/permissions.d-l6AT8SYP.d.ts +1279 -0
  177. package/dist/pricing-tier.d-Cg0jl6n_.d.cts +81 -0
  178. package/dist/pricing-tier.d-Cg0jl6n_.d.ts +81 -0
  179. package/dist/pricing.d-BHpMU4KU.d.cts +12255 -0
  180. package/dist/pricing.d-BHpMU4KU.d.ts +12255 -0
  181. package/dist/purpose.d-CbIYfTua.d.cts +372 -0
  182. package/dist/purpose.d-CbIYfTua.d.ts +372 -0
  183. package/dist/query.d-Cmp78IhZ.d.cts +2375 -0
  184. package/dist/query.d-Cmp78IhZ.d.ts +2375 -0
  185. package/dist/sandbox.d-BdbOFzDu.d.cts +465 -0
  186. package/dist/sandbox.d-BdbOFzDu.d.ts +465 -0
  187. package/dist/sharing.d-sOXq-gtz.d.cts +571 -0
  188. package/dist/sharing.d-sOXq-gtz.d.ts +571 -0
  189. package/dist/submission.d-BamwfhXw.d.cts +469 -0
  190. package/dist/submission.d-BamwfhXw.d.ts +469 -0
  191. package/dist/targeting.d-BNmcVsNS.d.cts +2057 -0
  192. package/dist/targeting.d-BNmcVsNS.d.ts +2057 -0
  193. package/dist/template-variables.d-Ble9TSBa.d.cts +1320 -0
  194. package/dist/template-variables.d-Ble9TSBa.d.ts +1320 -0
  195. package/dist/types-ChU9Acbv.d.cts +37 -0
  196. package/dist/types-ChU9Acbv.d.ts +37 -0
  197. package/dist/user.d-D18fe97W.d.cts +2270 -0
  198. package/dist/user.d-D18fe97W.d.ts +2270 -0
  199. package/dist/validation-rules.d-Db5c5zTf.d.cts +807 -0
  200. package/dist/validation-rules.d-Db5c5zTf.d.ts +807 -0
  201. package/dist/webhooks.d-pLHIL_io.d.cts +1256 -0
  202. package/dist/webhooks.d-pLHIL_io.d.ts +1256 -0
  203. package/dist/workflow-definition.d-DOeb0KVV.d.cts +1922 -0
  204. package/dist/workflow-definition.d-DOeb0KVV.d.ts +1922 -0
  205. package/dist/workflow.d-CMSKt8oN.d.cts +3151 -0
  206. package/dist/workflow.d-CMSKt8oN.d.ts +3151 -0
  207. package/package.json +1 -1
  208. package/dist/apis/_registry.d.ts +0 -8
  209. package/dist/authorize.d.ts +0 -3
  210. package/dist/bin/cli.d.ts +0 -1
  211. package/dist/client-factory.d.ts +0 -9
  212. package/dist/client-map.d.ts +0 -102
  213. package/dist/compact.d.ts +0 -22
  214. package/dist/help.d.ts +0 -12
  215. package/dist/large-response.d.ts +0 -9
  216. package/dist/openapi.d.ts +0 -12
  217. package/dist/overrides.d.ts +0 -9
  218. package/dist/proxy.d.ts +0 -14
  219. package/dist/registry.d.ts +0 -19
  220. package/dist/retry.d.ts +0 -11
  221. package/dist/sdk.d.ts +0 -29
  222. package/dist/types.d.ts +0 -53
@@ -0,0 +1,1511 @@
1
+ import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios';
2
+
3
+ /* Auto-copied from event-catalog-client */
4
+ /* eslint-disable */
5
+
6
+
7
+
8
+ declare namespace Components {
9
+ namespace Schemas {
10
+ /**
11
+ * Common metadata fields present in all event payloads
12
+ * example:
13
+ * {
14
+ * "_org_id": {
15
+ * "type": "string",
16
+ * "description": "epilot tenant/organization ID"
17
+ * },
18
+ * "_event_time": {
19
+ * "type": "string",
20
+ * "format": "date-time",
21
+ * "description": "ISO 8601 timestamp when event occurred"
22
+ * },
23
+ * "_event_id": {
24
+ * "type": "string",
25
+ * "description": "Unique event identifier (ULID)"
26
+ * },
27
+ * "_event_name": {
28
+ * "type": "string",
29
+ * "description": "Event name from catalog"
30
+ * },
31
+ * "_event_version": {
32
+ * "type": "string",
33
+ * "description": "Schema version number"
34
+ * },
35
+ * "_event_source": {
36
+ * "type": "string",
37
+ * "description": "Source that triggered the event"
38
+ * },
39
+ * "_ack_id": {
40
+ * "type": "string",
41
+ * "description": "Unique acknowledgment tracking ID for the event"
42
+ * }
43
+ * }
44
+ */
45
+ export interface CommonEventMetadata {
46
+ }
47
+ export interface ContextEntity {
48
+ /**
49
+ * Schema slug of the context entity
50
+ * example:
51
+ * meter
52
+ */
53
+ entity_schema: string;
54
+ /**
55
+ * Whether this field is required in the event payload
56
+ */
57
+ required?: boolean;
58
+ }
59
+ /**
60
+ * Configuration for triggering an event based on entity operations.
61
+ *
62
+ * When an entity operation matches the configured criteria, the event will be triggered.
63
+ * - On createEntity: the attribute must be present in the entity payload
64
+ * - On updateEntity: the attribute must be in diff.added, diff.updated, or diff.deleted
65
+ * - On deleteEntity: the event triggers when the entity is deleted (attributes not checked)
66
+ *
67
+ */
68
+ export interface EntityOperationTrigger {
69
+ /**
70
+ * List of entity operations that can trigger this event
71
+ * example:
72
+ * [
73
+ * "createEntity",
74
+ * "updateEntity"
75
+ * ]
76
+ */
77
+ operation: ("createEntity" | "updateEntity" | "deleteEntity")[];
78
+ /**
79
+ * List of entity schema slugs that can trigger this event
80
+ * example:
81
+ * [
82
+ * "contact",
83
+ * "contract",
84
+ * "order"
85
+ * ]
86
+ */
87
+ schema: string[];
88
+ /**
89
+ * Optional list of entity attributes to track for changes.
90
+ * If specified, the event only triggers when these attributes are affected.
91
+ * - On createEntity: attribute must be defined in the entity payload
92
+ * - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
93
+ * If not specified, all changes to matching entities will trigger the event.
94
+ *
95
+ * example:
96
+ * [
97
+ * "email",
98
+ * "phone",
99
+ * "status"
100
+ * ]
101
+ */
102
+ attribute?: string[];
103
+ /**
104
+ * Optional list of purpose names to filter by.
105
+ * The entity must have at least one matching purpose in its _purpose array.
106
+ * Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
107
+ * If not specified, the event triggers regardless of entity purpose.
108
+ *
109
+ * example:
110
+ * [
111
+ * "Kündigung",
112
+ * "Umzug/Auszug"
113
+ * ]
114
+ */
115
+ purpose?: string[];
116
+ }
117
+ /**
118
+ * An event instance in the event history
119
+ * example:
120
+ * {
121
+ * "_org_id": "org_123456",
122
+ * "_event_time": "2024-01-01T12:00:00Z",
123
+ * "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
124
+ * "_event_name": "MeterReading",
125
+ * "_event_version": "1.0.0",
126
+ * "_event_source": "api",
127
+ * "_trigger_source_type": "api",
128
+ * "_trigger_source": "user_123456",
129
+ * "reading_value": 123.45,
130
+ * "reading_date": "2024-01-01T11:59:00Z",
131
+ * "read_by": "John Doe",
132
+ * "reason": "regular",
133
+ * "direction": "feed-out",
134
+ * "source": "portal",
135
+ * "meter_id": "550e8400-e29b-41d4-a716-446655440000",
136
+ * "counter_id": "660e8400-e29b-41d4-a716-446655440000",
137
+ * "meter_number": "MT123456789",
138
+ * "obis_number": "1-0:1.8.0",
139
+ * "unit": "kWh",
140
+ * "customer_id": "770e8400-e29b-41d4-a716-446655440000",
141
+ * "contract_id": "880e8400-e29b-41d4-a716-446655440000"
142
+ * }
143
+ */
144
+ export interface Event {
145
+ [name: string]: any;
146
+ /**
147
+ * epilot tenant/organization ID
148
+ */
149
+ _org_id: string;
150
+ /**
151
+ * ISO 8601 timestamp when event occurred
152
+ */
153
+ _event_time: string; // date-time
154
+ /**
155
+ * Unique event identifier (ULID)
156
+ */
157
+ _event_id: string;
158
+ /**
159
+ * Event name from catalog
160
+ */
161
+ _event_name: string;
162
+ /**
163
+ * Event version (semver)
164
+ * example:
165
+ * 1.0.0
166
+ */
167
+ _event_version: string;
168
+ /**
169
+ * Source that triggered the event
170
+ */
171
+ _event_source: string;
172
+ /**
173
+ * The type of system that triggered the event.
174
+ * Common values: api, automation, operation, portal_user
175
+ *
176
+ * example:
177
+ * api
178
+ */
179
+ _trigger_source_type?: string;
180
+ /**
181
+ * Identifier of the specific trigger source.
182
+ * - For api: User ID or API key identifier
183
+ * - For automation: Automation execution ID
184
+ * - For operation: Activity ID from the entity operation
185
+ * - For portal_user: Portal user email
186
+ *
187
+ */
188
+ _trigger_source?: string;
189
+ /**
190
+ * Unique acknowledgment tracking ID for the event.
191
+ * Used to track event delivery and processing status.
192
+ *
193
+ */
194
+ _ack_id?: string;
195
+ }
196
+ /**
197
+ * Event configuration with required fields
198
+ */
199
+ export interface EventConfig {
200
+ /**
201
+ * Unique human readable name of the event
202
+ * example:
203
+ * AddMeterReading
204
+ */
205
+ event_name: string;
206
+ /**
207
+ * Human-friendly title for the event
208
+ * example:
209
+ * Add Meter Reading
210
+ */
211
+ event_title?: string;
212
+ /**
213
+ * Description of when the event is triggered
214
+ * example:
215
+ * Triggered when a new meter reading is added
216
+ */
217
+ event_description?: string;
218
+ /**
219
+ * Event version (semver)
220
+ * example:
221
+ * 1.0.0
222
+ */
223
+ event_version: string;
224
+ /**
225
+ * Status of the event
226
+ * example:
227
+ * active
228
+ */
229
+ event_status?: "active" | "deprecated" | "draft" | "disabled";
230
+ /**
231
+ * Tags associated with the event for categorization and filtering
232
+ *
233
+ * The "builtin" tag indicates events that are built into the epilot system.
234
+ *
235
+ * example:
236
+ * [
237
+ * "builtin",
238
+ * "metering",
239
+ * "erp"
240
+ * ]
241
+ */
242
+ event_tags?: string[];
243
+ /**
244
+ * Fields that define the event schema
245
+ */
246
+ schema_fields: {
247
+ [name: string]: SchemaField;
248
+ };
249
+ /**
250
+ * Optional entity graph definition for resolving related entities
251
+ */
252
+ entity_graph?: {
253
+ /**
254
+ * List of node definitions in the graph
255
+ */
256
+ nodes: /* A node in the entity graph */ GraphNode[];
257
+ /**
258
+ * List of edge definitions connecting nodes
259
+ */
260
+ edges: /* An edge connecting two nodes in the graph */ GraphEdge[];
261
+ };
262
+ /**
263
+ * Optional configuration for triggering this event based on entity operations
264
+ */
265
+ entity_operation?: {
266
+ /**
267
+ * List of entity operations that can trigger this event
268
+ * example:
269
+ * [
270
+ * "createEntity",
271
+ * "updateEntity"
272
+ * ]
273
+ */
274
+ operation: ("createEntity" | "updateEntity" | "deleteEntity")[];
275
+ /**
276
+ * List of entity schema slugs that can trigger this event
277
+ * example:
278
+ * [
279
+ * "contact",
280
+ * "contract",
281
+ * "order"
282
+ * ]
283
+ */
284
+ schema: string[];
285
+ /**
286
+ * Optional list of entity attributes to track for changes.
287
+ * If specified, the event only triggers when these attributes are affected.
288
+ * - On createEntity: attribute must be defined in the entity payload
289
+ * - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
290
+ * If not specified, all changes to matching entities will trigger the event.
291
+ *
292
+ * example:
293
+ * [
294
+ * "email",
295
+ * "phone",
296
+ * "status"
297
+ * ]
298
+ */
299
+ attribute?: string[];
300
+ /**
301
+ * Optional list of purpose names to filter by.
302
+ * The entity must have at least one matching purpose in its _purpose array.
303
+ * Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
304
+ * If not specified, the event triggers regardless of entity purpose.
305
+ *
306
+ * example:
307
+ * [
308
+ * "Kündigung",
309
+ * "Umzug/Auszug"
310
+ * ]
311
+ */
312
+ purpose?: string[];
313
+ };
314
+ /**
315
+ * Whether this event is enabled for the organization.
316
+ * When disabled, the event will not be triggered by any means
317
+ * (automatic, API, or automation).
318
+ * Defaults to true if not specified.
319
+ *
320
+ * example:
321
+ * true
322
+ */
323
+ enabled?: boolean;
324
+ /**
325
+ * Whether the event should be triggered automatically by built-in logic
326
+ * (e.g., portal submissions, entity mutations, EventBridge rules).
327
+ * When false, the event can still be triggered manually via API or automations.
328
+ * Only meaningful for builtin events that have automatic trigger sources.
329
+ * Defaults to true if not specified.
330
+ *
331
+ * example:
332
+ * true
333
+ */
334
+ auto_trigger?: boolean;
335
+ /**
336
+ * Whether this event can be explicitly triggered by automations.
337
+ * When true, the event will appear in the automation builder as a
338
+ * "Trigger Event" action option.
339
+ * Defaults to false if not specified.
340
+ *
341
+ * example:
342
+ * true
343
+ */
344
+ automation_trigger?: boolean;
345
+ }
346
+ /**
347
+ * Base properties shared between EventConfig and UpdateEventPayload
348
+ */
349
+ export interface EventConfigBase {
350
+ /**
351
+ * Unique human readable name of the event
352
+ * example:
353
+ * AddMeterReading
354
+ */
355
+ event_name?: string;
356
+ /**
357
+ * Human-friendly title for the event
358
+ * example:
359
+ * Add Meter Reading
360
+ */
361
+ event_title?: string;
362
+ /**
363
+ * Description of when the event is triggered
364
+ * example:
365
+ * Triggered when a new meter reading is added
366
+ */
367
+ event_description?: string;
368
+ /**
369
+ * Event version (semver)
370
+ * example:
371
+ * 1.0.0
372
+ */
373
+ event_version?: string;
374
+ /**
375
+ * Status of the event
376
+ * example:
377
+ * active
378
+ */
379
+ event_status?: "active" | "deprecated" | "draft" | "disabled";
380
+ /**
381
+ * Tags associated with the event for categorization and filtering
382
+ *
383
+ * The "builtin" tag indicates events that are built into the epilot system.
384
+ *
385
+ * example:
386
+ * [
387
+ * "builtin",
388
+ * "metering",
389
+ * "erp"
390
+ * ]
391
+ */
392
+ event_tags?: string[];
393
+ /**
394
+ * Fields that define the event schema
395
+ */
396
+ schema_fields?: {
397
+ [name: string]: SchemaField;
398
+ };
399
+ /**
400
+ * Optional entity graph definition for resolving related entities
401
+ */
402
+ entity_graph?: {
403
+ /**
404
+ * List of node definitions in the graph
405
+ */
406
+ nodes: /* A node in the entity graph */ GraphNode[];
407
+ /**
408
+ * List of edge definitions connecting nodes
409
+ */
410
+ edges: /* An edge connecting two nodes in the graph */ GraphEdge[];
411
+ };
412
+ /**
413
+ * Optional configuration for triggering this event based on entity operations
414
+ */
415
+ entity_operation?: {
416
+ /**
417
+ * List of entity operations that can trigger this event
418
+ * example:
419
+ * [
420
+ * "createEntity",
421
+ * "updateEntity"
422
+ * ]
423
+ */
424
+ operation: ("createEntity" | "updateEntity" | "deleteEntity")[];
425
+ /**
426
+ * List of entity schema slugs that can trigger this event
427
+ * example:
428
+ * [
429
+ * "contact",
430
+ * "contract",
431
+ * "order"
432
+ * ]
433
+ */
434
+ schema: string[];
435
+ /**
436
+ * Optional list of entity attributes to track for changes.
437
+ * If specified, the event only triggers when these attributes are affected.
438
+ * - On createEntity: attribute must be defined in the entity payload
439
+ * - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
440
+ * If not specified, all changes to matching entities will trigger the event.
441
+ *
442
+ * example:
443
+ * [
444
+ * "email",
445
+ * "phone",
446
+ * "status"
447
+ * ]
448
+ */
449
+ attribute?: string[];
450
+ /**
451
+ * Optional list of purpose names to filter by.
452
+ * The entity must have at least one matching purpose in its _purpose array.
453
+ * Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
454
+ * If not specified, the event triggers regardless of entity purpose.
455
+ *
456
+ * example:
457
+ * [
458
+ * "Kündigung",
459
+ * "Umzug/Auszug"
460
+ * ]
461
+ */
462
+ purpose?: string[];
463
+ };
464
+ /**
465
+ * Whether this event is enabled for the organization.
466
+ * When disabled, the event will not be triggered by any means
467
+ * (automatic, API, or automation).
468
+ * Defaults to true if not specified.
469
+ *
470
+ * example:
471
+ * true
472
+ */
473
+ enabled?: boolean;
474
+ /**
475
+ * Whether the event should be triggered automatically by built-in logic
476
+ * (e.g., portal submissions, entity mutations, EventBridge rules).
477
+ * When false, the event can still be triggered manually via API or automations.
478
+ * Only meaningful for builtin events that have automatic trigger sources.
479
+ * Defaults to true if not specified.
480
+ *
481
+ * example:
482
+ * true
483
+ */
484
+ auto_trigger?: boolean;
485
+ /**
486
+ * Whether this event can be explicitly triggered by automations.
487
+ * When true, the event will appear in the automation builder as a
488
+ * "Trigger Event" action option.
489
+ * Defaults to false if not specified.
490
+ *
491
+ * example:
492
+ * true
493
+ */
494
+ automation_trigger?: boolean;
495
+ }
496
+ /**
497
+ * JSON Schema declaring the event payload structure
498
+ * example:
499
+ * {
500
+ * "type": "object",
501
+ * "properties": {
502
+ * "_org_id": {
503
+ * "type": "string",
504
+ * "description": "epilot tenant/organization ID"
505
+ * },
506
+ * "_event_time": {
507
+ * "type": "string",
508
+ * "format": "date-time",
509
+ * "description": "ISO 8601 timestamp when event occurred"
510
+ * },
511
+ * "_event_id": {
512
+ * "type": "string",
513
+ * "description": "Unique event identifier (ULID)"
514
+ * },
515
+ * "_event_name": {
516
+ * "type": "string",
517
+ * "description": "Event name from catalog"
518
+ * },
519
+ * "_event_version": {
520
+ * "type": "string",
521
+ * "description": "Event version (semver)"
522
+ * },
523
+ * "_event_source": {
524
+ * "type": "string",
525
+ * "description": "Source that triggered the event"
526
+ * },
527
+ * "reading_value": {
528
+ * "type": "number",
529
+ * "description": "The meter reading value"
530
+ * },
531
+ * "reading_date": {
532
+ * "type": "string",
533
+ * "format": "date-time",
534
+ * "description": "ISO 8601 timestamp when reading was taken"
535
+ * },
536
+ * "read_by": {
537
+ * "type": "string",
538
+ * "description": "Name or identifier of who submitted the reading"
539
+ * },
540
+ * "reason": {
541
+ * "type": "string",
542
+ * "enum": [
543
+ * "regular",
544
+ * "move-in",
545
+ * "move-out",
546
+ * "supplier-change",
547
+ * "correction",
548
+ * "final"
549
+ * ],
550
+ * "description": "Reason for the meter reading"
551
+ * },
552
+ * "direction": {
553
+ * "type": "string",
554
+ * "enum": [
555
+ * "feed-in",
556
+ * "feed-out"
557
+ * ],
558
+ * "description": "Direction of energy flow"
559
+ * },
560
+ * "source": {
561
+ * "type": "string",
562
+ * "enum": [
563
+ * "portal",
564
+ * "360",
565
+ * "api",
566
+ * "automation"
567
+ * ],
568
+ * "description": "Source system where reading was submitted"
569
+ * },
570
+ * "meter_id": {
571
+ * "type": "string",
572
+ * "format": "uuid",
573
+ * "description": "Entity ID of the meter"
574
+ * },
575
+ * "counter_id": {
576
+ * "type": "string",
577
+ * "format": "uuid",
578
+ * "description": "Entity ID of the meter counter"
579
+ * },
580
+ * "meter_number": {
581
+ * "type": "string",
582
+ * "description": "Human-readable meter number"
583
+ * },
584
+ * "obis_number": {
585
+ * "type": "string",
586
+ * "description": "OBIS code of the counter"
587
+ * },
588
+ * "unit": {
589
+ * "type": "string",
590
+ * "description": "Unit of measurement (e.g., kWh, m3)"
591
+ * },
592
+ * "customer_id": {
593
+ * "type": "string",
594
+ * "format": "uuid",
595
+ * "description": "Entity ID of the customer"
596
+ * },
597
+ * "contract_id": {
598
+ * "type": "string",
599
+ * "format": "uuid",
600
+ * "description": "Entity ID of the contract"
601
+ * },
602
+ * "user_id": {
603
+ * "type": "string",
604
+ * "description": "ID of the user who submitted the reading"
605
+ * },
606
+ * "user_email": {
607
+ * "type": "string",
608
+ * "format": "email",
609
+ * "description": "Email of the user who submitted the reading"
610
+ * }
611
+ * },
612
+ * "required": [
613
+ * "_org_id",
614
+ * "_event_time",
615
+ * "_event_id",
616
+ * "_event_name",
617
+ * "_event_version",
618
+ * "_event_source",
619
+ * "reading_value",
620
+ * "reading_date",
621
+ * "read_by",
622
+ * "reason",
623
+ * "direction",
624
+ * "source",
625
+ * "meter_id",
626
+ * "counter_id",
627
+ * "meter_number",
628
+ * "obis_number",
629
+ * "unit",
630
+ * "customer_id",
631
+ * "contract_id"
632
+ * ]
633
+ * }
634
+ */
635
+ export interface EventJsonSchema {
636
+ }
637
+ /**
638
+ * List of entity fields to include or exclude in the response
639
+ *
640
+ * Use ! to exclude fields, e.g. `!_id` to exclude the `_id` field.
641
+ *
642
+ * Globbing and globstart (**) is supported for nested fields.
643
+ *
644
+ * example:
645
+ * [
646
+ * "_id",
647
+ * "_title",
648
+ * "first_name",
649
+ * "account",
650
+ * "!account.*._files",
651
+ * "**._product"
652
+ * ]
653
+ */
654
+ export type FieldsParam = string[];
655
+ /**
656
+ * Entity graph definition for resolving related entities
657
+ */
658
+ export interface GraphDefinition {
659
+ /**
660
+ * List of node definitions in the graph
661
+ */
662
+ nodes: /* A node in the entity graph */ GraphNode[];
663
+ /**
664
+ * List of edge definitions connecting nodes
665
+ */
666
+ edges: /* An edge connecting two nodes in the graph */ GraphEdge[];
667
+ }
668
+ /**
669
+ * An edge connecting two nodes in the graph
670
+ */
671
+ export interface GraphEdge {
672
+ /**
673
+ * Source node ID
674
+ * example:
675
+ * contact
676
+ */
677
+ from: string;
678
+ /**
679
+ * Target node ID
680
+ * example:
681
+ * billing_account
682
+ */
683
+ to: string;
684
+ }
685
+ /**
686
+ * A node in the entity graph
687
+ */
688
+ export interface GraphNode {
689
+ /**
690
+ * Unique identifier for this node in the graph definition
691
+ * example:
692
+ * contact
693
+ */
694
+ id: string;
695
+ /**
696
+ * Entity schema slug for this node
697
+ * example:
698
+ * contact
699
+ */
700
+ schema: string;
701
+ /**
702
+ * Cardinality for this node when hydrated:
703
+ * - "one": Node can only contain one entity, returns single Entity object
704
+ * - "many": Node can contain multiple entities, returns array of Entity objects
705
+ * If not specified, defaults to "many" (returns array)
706
+ *
707
+ * example:
708
+ * one
709
+ */
710
+ cardinality?: "one" | "many";
711
+ /**
712
+ * Optional array of field names to include in the hydrated entity response for this node.
713
+ * When specified, only the requested fields plus required internal fields (_id, _schema, _org) will be returned.
714
+ * Only applies when hydrate=true.
715
+ *
716
+ * example:
717
+ * [
718
+ * "_id",
719
+ * "_title",
720
+ * "first_name",
721
+ * "account",
722
+ * "!account.*._files",
723
+ * "**._product"
724
+ * ]
725
+ */
726
+ fields?: string[];
727
+ }
728
+ /**
729
+ * A primitive JSON Schema field definition
730
+ */
731
+ export interface PrimitiveField {
732
+ /**
733
+ * JSON Schema definition of the field
734
+ * example:
735
+ * {
736
+ * "type": "string",
737
+ * "format": "date-time",
738
+ * "description": "ISO 8601 timestamp when reading was taken"
739
+ * }
740
+ */
741
+ json_schema: {
742
+ [key: string]: any;
743
+ };
744
+ /**
745
+ * Whether this field is required in the event payload
746
+ */
747
+ required?: boolean;
748
+ /**
749
+ * Optional JSONata expression to extract the field value from the hydrated entity graph.
750
+ *
751
+ * The expression has access to all hydrated graph nodes by their node ID.
752
+ * If not specified, the field value must be provided as input when triggering the event.
753
+ *
754
+ * Examples:
755
+ * - "ticket.meter_reading_value" (simple path)
756
+ * - "contact.email[0].email" (nested/array access)
757
+ * - "ticket.reading_timestamp ?? $now()" (with fallback)
758
+ * - "$number(meter_counter.reading_value)" (type coercion)
759
+ *
760
+ * example:
761
+ * ticket.meter_reading_value
762
+ */
763
+ graph_source?: string;
764
+ }
765
+ export type SchemaField = /* A primitive JSON Schema field definition */ PrimitiveField | ContextEntity;
766
+ export interface SearchOptions {
767
+ /**
768
+ * Maximum number of results to return
769
+ */
770
+ limit?: number;
771
+ /**
772
+ * Cursor for pagination. Use the next_cursor from the previous response to get the next page.
773
+ */
774
+ cursor?: {
775
+ /**
776
+ * Timestamp from the last event in the previous page
777
+ * example:
778
+ * 2025-10-31 12:34:56
779
+ */
780
+ event_time?: string;
781
+ /**
782
+ * Event ID from the last event in the previous page
783
+ * example:
784
+ * evt_1234567890abcdef
785
+ */
786
+ event_id?: string;
787
+ };
788
+ /**
789
+ * Filter events by timestamp range
790
+ */
791
+ timestamp?: {
792
+ /**
793
+ * Start timestamp in ISO 8601 format
794
+ * example:
795
+ * 2025-10-01T00:00:00Z
796
+ */
797
+ from?: string; // date-time
798
+ /**
799
+ * End timestamp in ISO 8601 format
800
+ * example:
801
+ * 2025-10-31T23:59:59Z
802
+ */
803
+ to?: string; // date-time
804
+ };
805
+ /**
806
+ * Filter by specific event ID
807
+ * example:
808
+ * evt_1234567890abcdef
809
+ */
810
+ event_id?: string;
811
+ }
812
+ /**
813
+ * Payload for explicitly triggering an event via API
814
+ */
815
+ export interface TriggerEventPayload {
816
+ /**
817
+ * Entity seed for graph hydration. Required for events that have an entity_graph defined.
818
+ * Specifies which entity to start graph traversal from.
819
+ *
820
+ */
821
+ seed?: {
822
+ /**
823
+ * Entity ID to seed the graph hydration
824
+ */
825
+ entity_id: string; // uuid
826
+ /**
827
+ * Node ID from the event's entity_graph definition that matches
828
+ * the seed entity. Must be a valid node in the event's graph.
829
+ *
830
+ */
831
+ node_id: string;
832
+ };
833
+ /**
834
+ * Input field values for the event. Keys must match the event's
835
+ * schema_fields definitions. Values are validated against each
836
+ * field's JSON Schema.
837
+ *
838
+ */
839
+ fields?: {
840
+ [name: string]: any;
841
+ };
842
+ /**
843
+ * Optional list of node IDs to skip during entity graph hydration.
844
+ * These nodes will be null/undefined in the event payload.
845
+ *
846
+ */
847
+ skip_hydration?: string[];
848
+ /**
849
+ * The type of system that triggered the event.
850
+ * Examples: api, automation, operation, portal_user
851
+ * Defaults to "api" if not specified.
852
+ *
853
+ */
854
+ _trigger_source_type?: string;
855
+ /**
856
+ * Identifier of the specific trigger source.
857
+ * Examples: user ID, automation execution ID, activity ID, portal user email
858
+ * Defaults to the calling user ID if not specified.
859
+ *
860
+ */
861
+ _trigger_source?: string;
862
+ }
863
+ /**
864
+ * Response from triggering an event
865
+ */
866
+ export interface TriggerEventResponse {
867
+ /**
868
+ * Whether the event was triggered successfully
869
+ */
870
+ success: boolean;
871
+ /**
872
+ * The unique event ID (ULID) assigned to this event
873
+ */
874
+ event_id: string;
875
+ /**
876
+ * EventBridge event ID from publishing
877
+ */
878
+ event_bridge_event_id?: string;
879
+ }
880
+ /**
881
+ * Payload for updating an event configuration.
882
+ * Accepts the same fields as EventConfig (all optional for PATCH).
883
+ * Currently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.
884
+ *
885
+ */
886
+ export interface UpdateEventPayload {
887
+ /**
888
+ * Unique human readable name of the event
889
+ * example:
890
+ * AddMeterReading
891
+ */
892
+ event_name?: string;
893
+ /**
894
+ * Human-friendly title for the event
895
+ * example:
896
+ * Add Meter Reading
897
+ */
898
+ event_title?: string;
899
+ /**
900
+ * Description of when the event is triggered
901
+ * example:
902
+ * Triggered when a new meter reading is added
903
+ */
904
+ event_description?: string;
905
+ /**
906
+ * Event version (semver)
907
+ * example:
908
+ * 1.0.0
909
+ */
910
+ event_version?: string;
911
+ /**
912
+ * Status of the event
913
+ * example:
914
+ * active
915
+ */
916
+ event_status?: "active" | "deprecated" | "draft" | "disabled";
917
+ /**
918
+ * Tags associated with the event for categorization and filtering
919
+ *
920
+ * The "builtin" tag indicates events that are built into the epilot system.
921
+ *
922
+ * example:
923
+ * [
924
+ * "builtin",
925
+ * "metering",
926
+ * "erp"
927
+ * ]
928
+ */
929
+ event_tags?: string[];
930
+ /**
931
+ * Fields that define the event schema
932
+ */
933
+ schema_fields?: {
934
+ [name: string]: SchemaField;
935
+ };
936
+ /**
937
+ * Optional entity graph definition for resolving related entities
938
+ */
939
+ entity_graph?: {
940
+ /**
941
+ * List of node definitions in the graph
942
+ */
943
+ nodes: /* A node in the entity graph */ GraphNode[];
944
+ /**
945
+ * List of edge definitions connecting nodes
946
+ */
947
+ edges: /* An edge connecting two nodes in the graph */ GraphEdge[];
948
+ };
949
+ /**
950
+ * Optional configuration for triggering this event based on entity operations
951
+ */
952
+ entity_operation?: {
953
+ /**
954
+ * List of entity operations that can trigger this event
955
+ * example:
956
+ * [
957
+ * "createEntity",
958
+ * "updateEntity"
959
+ * ]
960
+ */
961
+ operation: ("createEntity" | "updateEntity" | "deleteEntity")[];
962
+ /**
963
+ * List of entity schema slugs that can trigger this event
964
+ * example:
965
+ * [
966
+ * "contact",
967
+ * "contract",
968
+ * "order"
969
+ * ]
970
+ */
971
+ schema: string[];
972
+ /**
973
+ * Optional list of entity attributes to track for changes.
974
+ * If specified, the event only triggers when these attributes are affected.
975
+ * - On createEntity: attribute must be defined in the entity payload
976
+ * - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
977
+ * If not specified, all changes to matching entities will trigger the event.
978
+ *
979
+ * example:
980
+ * [
981
+ * "email",
982
+ * "phone",
983
+ * "status"
984
+ * ]
985
+ */
986
+ attribute?: string[];
987
+ /**
988
+ * Optional list of purpose names to filter by.
989
+ * The entity must have at least one matching purpose in its _purpose array.
990
+ * Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
991
+ * If not specified, the event triggers regardless of entity purpose.
992
+ *
993
+ * example:
994
+ * [
995
+ * "Kündigung",
996
+ * "Umzug/Auszug"
997
+ * ]
998
+ */
999
+ purpose?: string[];
1000
+ };
1001
+ /**
1002
+ * Whether this event is enabled for the organization.
1003
+ * When disabled, the event will not be triggered by any means
1004
+ * (automatic, API, or automation).
1005
+ * Defaults to true if not specified.
1006
+ *
1007
+ * example:
1008
+ * true
1009
+ */
1010
+ enabled?: boolean;
1011
+ /**
1012
+ * Whether the event should be triggered automatically by built-in logic
1013
+ * (e.g., portal submissions, entity mutations, EventBridge rules).
1014
+ * When false, the event can still be triggered manually via API or automations.
1015
+ * Only meaningful for builtin events that have automatic trigger sources.
1016
+ * Defaults to true if not specified.
1017
+ *
1018
+ * example:
1019
+ * true
1020
+ */
1021
+ auto_trigger?: boolean;
1022
+ /**
1023
+ * Whether this event can be explicitly triggered by automations.
1024
+ * When true, the event will appear in the automation builder as a
1025
+ * "Trigger Event" action option.
1026
+ * Defaults to false if not specified.
1027
+ *
1028
+ * example:
1029
+ * true
1030
+ */
1031
+ automation_trigger?: boolean;
1032
+ }
1033
+ }
1034
+ }
1035
+ declare namespace Paths {
1036
+ namespace GetEvent {
1037
+ namespace Parameters {
1038
+ export type EventName = string;
1039
+ }
1040
+ export interface PathParameters {
1041
+ event_name: Parameters.EventName;
1042
+ }
1043
+ namespace Responses {
1044
+ export type $200 = /* Event configuration with required fields */ Components.Schemas.EventConfig;
1045
+ }
1046
+ }
1047
+ namespace GetEventExample {
1048
+ namespace Parameters {
1049
+ export type EventName = string;
1050
+ }
1051
+ export interface PathParameters {
1052
+ event_name: Parameters.EventName;
1053
+ }
1054
+ namespace Responses {
1055
+ /**
1056
+ * A sample event payload generated from the JSON Schema
1057
+ */
1058
+ export interface $200 {
1059
+ }
1060
+ }
1061
+ }
1062
+ namespace GetEventJSONSchema {
1063
+ namespace Parameters {
1064
+ export type EventName = string;
1065
+ }
1066
+ export interface PathParameters {
1067
+ event_name: Parameters.EventName;
1068
+ }
1069
+ namespace Responses {
1070
+ export type $200 = /**
1071
+ * JSON Schema declaring the event payload structure
1072
+ * example:
1073
+ * {
1074
+ * "type": "object",
1075
+ * "properties": {
1076
+ * "_org_id": {
1077
+ * "type": "string",
1078
+ * "description": "epilot tenant/organization ID"
1079
+ * },
1080
+ * "_event_time": {
1081
+ * "type": "string",
1082
+ * "format": "date-time",
1083
+ * "description": "ISO 8601 timestamp when event occurred"
1084
+ * },
1085
+ * "_event_id": {
1086
+ * "type": "string",
1087
+ * "description": "Unique event identifier (ULID)"
1088
+ * },
1089
+ * "_event_name": {
1090
+ * "type": "string",
1091
+ * "description": "Event name from catalog"
1092
+ * },
1093
+ * "_event_version": {
1094
+ * "type": "string",
1095
+ * "description": "Event version (semver)"
1096
+ * },
1097
+ * "_event_source": {
1098
+ * "type": "string",
1099
+ * "description": "Source that triggered the event"
1100
+ * },
1101
+ * "reading_value": {
1102
+ * "type": "number",
1103
+ * "description": "The meter reading value"
1104
+ * },
1105
+ * "reading_date": {
1106
+ * "type": "string",
1107
+ * "format": "date-time",
1108
+ * "description": "ISO 8601 timestamp when reading was taken"
1109
+ * },
1110
+ * "read_by": {
1111
+ * "type": "string",
1112
+ * "description": "Name or identifier of who submitted the reading"
1113
+ * },
1114
+ * "reason": {
1115
+ * "type": "string",
1116
+ * "enum": [
1117
+ * "regular",
1118
+ * "move-in",
1119
+ * "move-out",
1120
+ * "supplier-change",
1121
+ * "correction",
1122
+ * "final"
1123
+ * ],
1124
+ * "description": "Reason for the meter reading"
1125
+ * },
1126
+ * "direction": {
1127
+ * "type": "string",
1128
+ * "enum": [
1129
+ * "feed-in",
1130
+ * "feed-out"
1131
+ * ],
1132
+ * "description": "Direction of energy flow"
1133
+ * },
1134
+ * "source": {
1135
+ * "type": "string",
1136
+ * "enum": [
1137
+ * "portal",
1138
+ * "360",
1139
+ * "api",
1140
+ * "automation"
1141
+ * ],
1142
+ * "description": "Source system where reading was submitted"
1143
+ * },
1144
+ * "meter_id": {
1145
+ * "type": "string",
1146
+ * "format": "uuid",
1147
+ * "description": "Entity ID of the meter"
1148
+ * },
1149
+ * "counter_id": {
1150
+ * "type": "string",
1151
+ * "format": "uuid",
1152
+ * "description": "Entity ID of the meter counter"
1153
+ * },
1154
+ * "meter_number": {
1155
+ * "type": "string",
1156
+ * "description": "Human-readable meter number"
1157
+ * },
1158
+ * "obis_number": {
1159
+ * "type": "string",
1160
+ * "description": "OBIS code of the counter"
1161
+ * },
1162
+ * "unit": {
1163
+ * "type": "string",
1164
+ * "description": "Unit of measurement (e.g., kWh, m3)"
1165
+ * },
1166
+ * "customer_id": {
1167
+ * "type": "string",
1168
+ * "format": "uuid",
1169
+ * "description": "Entity ID of the customer"
1170
+ * },
1171
+ * "contract_id": {
1172
+ * "type": "string",
1173
+ * "format": "uuid",
1174
+ * "description": "Entity ID of the contract"
1175
+ * },
1176
+ * "user_id": {
1177
+ * "type": "string",
1178
+ * "description": "ID of the user who submitted the reading"
1179
+ * },
1180
+ * "user_email": {
1181
+ * "type": "string",
1182
+ * "format": "email",
1183
+ * "description": "Email of the user who submitted the reading"
1184
+ * }
1185
+ * },
1186
+ * "required": [
1187
+ * "_org_id",
1188
+ * "_event_time",
1189
+ * "_event_id",
1190
+ * "_event_name",
1191
+ * "_event_version",
1192
+ * "_event_source",
1193
+ * "reading_value",
1194
+ * "reading_date",
1195
+ * "read_by",
1196
+ * "reason",
1197
+ * "direction",
1198
+ * "source",
1199
+ * "meter_id",
1200
+ * "counter_id",
1201
+ * "meter_number",
1202
+ * "obis_number",
1203
+ * "unit",
1204
+ * "customer_id",
1205
+ * "contract_id"
1206
+ * ]
1207
+ * }
1208
+ */
1209
+ Components.Schemas.EventJsonSchema;
1210
+ }
1211
+ }
1212
+ namespace ListEvents {
1213
+ namespace Responses {
1214
+ export interface $200 {
1215
+ results?: /* Event configuration with required fields */ Components.Schemas.EventConfig[];
1216
+ }
1217
+ }
1218
+ }
1219
+ namespace PatchEvent {
1220
+ namespace Parameters {
1221
+ export type EventName = string;
1222
+ }
1223
+ export interface PathParameters {
1224
+ event_name: Parameters.EventName;
1225
+ }
1226
+ export type RequestBody = /**
1227
+ * Payload for updating an event configuration.
1228
+ * Accepts the same fields as EventConfig (all optional for PATCH).
1229
+ * Currently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.
1230
+ *
1231
+ */
1232
+ Components.Schemas.UpdateEventPayload;
1233
+ namespace Responses {
1234
+ export type $200 = /* Event configuration with required fields */ Components.Schemas.EventConfig;
1235
+ export interface $404 {
1236
+ }
1237
+ }
1238
+ }
1239
+ namespace SearchEventHistory {
1240
+ namespace Parameters {
1241
+ export type EventName = string;
1242
+ }
1243
+ export interface PathParameters {
1244
+ event_name: Parameters.EventName;
1245
+ }
1246
+ export type RequestBody = Components.Schemas.SearchOptions;
1247
+ namespace Responses {
1248
+ export interface $200 {
1249
+ results?: /**
1250
+ * An event instance in the event history
1251
+ * example:
1252
+ * {
1253
+ * "_org_id": "org_123456",
1254
+ * "_event_time": "2024-01-01T12:00:00Z",
1255
+ * "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
1256
+ * "_event_name": "MeterReading",
1257
+ * "_event_version": "1.0.0",
1258
+ * "_event_source": "api",
1259
+ * "_trigger_source_type": "api",
1260
+ * "_trigger_source": "user_123456",
1261
+ * "reading_value": 123.45,
1262
+ * "reading_date": "2024-01-01T11:59:00Z",
1263
+ * "read_by": "John Doe",
1264
+ * "reason": "regular",
1265
+ * "direction": "feed-out",
1266
+ * "source": "portal",
1267
+ * "meter_id": "550e8400-e29b-41d4-a716-446655440000",
1268
+ * "counter_id": "660e8400-e29b-41d4-a716-446655440000",
1269
+ * "meter_number": "MT123456789",
1270
+ * "obis_number": "1-0:1.8.0",
1271
+ * "unit": "kWh",
1272
+ * "customer_id": "770e8400-e29b-41d4-a716-446655440000",
1273
+ * "contract_id": "880e8400-e29b-41d4-a716-446655440000"
1274
+ * }
1275
+ */
1276
+ Components.Schemas.Event[];
1277
+ /**
1278
+ * Cursor for pagination. Use this to get the next page of results.
1279
+ */
1280
+ next_cursor?: {
1281
+ /**
1282
+ * Timestamp from the last event in the current page
1283
+ * example:
1284
+ * 2025-10-31T12:34:56Z
1285
+ */
1286
+ event_time?: string;
1287
+ /**
1288
+ * Event ID from the last event in the current page
1289
+ * example:
1290
+ * evt_1234567890abcdef
1291
+ */
1292
+ event_id?: string;
1293
+ } | null;
1294
+ }
1295
+ }
1296
+ }
1297
+ namespace TriggerEvent {
1298
+ namespace Parameters {
1299
+ export type EventName = string;
1300
+ }
1301
+ export interface PathParameters {
1302
+ event_name: Parameters.EventName;
1303
+ }
1304
+ export type RequestBody = /* Payload for explicitly triggering an event via API */ Components.Schemas.TriggerEventPayload;
1305
+ namespace Responses {
1306
+ export type $200 = /* Response from triggering an event */ Components.Schemas.TriggerEventResponse;
1307
+ export interface $400 {
1308
+ }
1309
+ export interface $403 {
1310
+ }
1311
+ export interface $404 {
1312
+ }
1313
+ }
1314
+ }
1315
+ }
1316
+
1317
+
1318
+ interface OperationMethods {
1319
+ /**
1320
+ * listEvents - listEvents
1321
+ *
1322
+ * Retrieve list of available business events
1323
+ */
1324
+ 'listEvents'(
1325
+ parameters?: Parameters<UnknownParamsObject> | null,
1326
+ data?: any,
1327
+ config?: AxiosRequestConfig
1328
+ ): OperationResponse<Paths.ListEvents.Responses.$200>
1329
+ /**
1330
+ * getEvent - getEvent
1331
+ *
1332
+ * Retrieve the configuration of a specific business event
1333
+ */
1334
+ 'getEvent'(
1335
+ parameters?: Parameters<Paths.GetEvent.PathParameters> | null,
1336
+ data?: any,
1337
+ config?: AxiosRequestConfig
1338
+ ): OperationResponse<Paths.GetEvent.Responses.$200>
1339
+ /**
1340
+ * patchEvent - patchEvent
1341
+ *
1342
+ * Update the configuration of a specific business event for the organization
1343
+ */
1344
+ 'patchEvent'(
1345
+ parameters?: Parameters<Paths.PatchEvent.PathParameters> | null,
1346
+ data?: Paths.PatchEvent.RequestBody,
1347
+ config?: AxiosRequestConfig
1348
+ ): OperationResponse<Paths.PatchEvent.Responses.$200>
1349
+ /**
1350
+ * getEventJSONSchema - getEventJSONSchema
1351
+ *
1352
+ * Retrieve the JSON Schema of a specific business event
1353
+ */
1354
+ 'getEventJSONSchema'(
1355
+ parameters?: Parameters<Paths.GetEventJSONSchema.PathParameters> | null,
1356
+ data?: any,
1357
+ config?: AxiosRequestConfig
1358
+ ): OperationResponse<Paths.GetEventJSONSchema.Responses.$200>
1359
+ /**
1360
+ * getEventExample - getEventExample
1361
+ *
1362
+ * Generate a sample event payload based on the event's JSON Schema
1363
+ */
1364
+ 'getEventExample'(
1365
+ parameters?: Parameters<Paths.GetEventExample.PathParameters> | null,
1366
+ data?: any,
1367
+ config?: AxiosRequestConfig
1368
+ ): OperationResponse<Paths.GetEventExample.Responses.$200>
1369
+ /**
1370
+ * searchEventHistory - searchEventHistory
1371
+ *
1372
+ * Paginated history of events
1373
+ */
1374
+ 'searchEventHistory'(
1375
+ parameters?: Parameters<Paths.SearchEventHistory.PathParameters> | null,
1376
+ data?: Paths.SearchEventHistory.RequestBody,
1377
+ config?: AxiosRequestConfig
1378
+ ): OperationResponse<Paths.SearchEventHistory.Responses.$200>
1379
+ /**
1380
+ * triggerEvent - triggerEvent
1381
+ *
1382
+ * Explicitly trigger an event by providing input field values and an optional entity seed
1383
+ * for graph hydration. The event must be enabled for the organization.
1384
+ *
1385
+ * - For events with an entity_graph, a seed (entity_id + node_id) is required
1386
+ * - For events without an entity_graph, only fields are needed
1387
+ * - Entity operation context fields (operation, trigger_entity, activity_id, activity_type)
1388
+ * are not included when triggering via API
1389
+ *
1390
+ */
1391
+ 'triggerEvent'(
1392
+ parameters?: Parameters<Paths.TriggerEvent.PathParameters> | null,
1393
+ data?: Paths.TriggerEvent.RequestBody,
1394
+ config?: AxiosRequestConfig
1395
+ ): OperationResponse<Paths.TriggerEvent.Responses.$200>
1396
+ }
1397
+
1398
+ interface PathsDictionary {
1399
+ ['/v1/events']: {
1400
+ /**
1401
+ * listEvents - listEvents
1402
+ *
1403
+ * Retrieve list of available business events
1404
+ */
1405
+ 'get'(
1406
+ parameters?: Parameters<UnknownParamsObject> | null,
1407
+ data?: any,
1408
+ config?: AxiosRequestConfig
1409
+ ): OperationResponse<Paths.ListEvents.Responses.$200>
1410
+ }
1411
+ ['/v1/events/{event_name}']: {
1412
+ /**
1413
+ * getEvent - getEvent
1414
+ *
1415
+ * Retrieve the configuration of a specific business event
1416
+ */
1417
+ 'get'(
1418
+ parameters?: Parameters<Paths.GetEvent.PathParameters> | null,
1419
+ data?: any,
1420
+ config?: AxiosRequestConfig
1421
+ ): OperationResponse<Paths.GetEvent.Responses.$200>
1422
+ /**
1423
+ * patchEvent - patchEvent
1424
+ *
1425
+ * Update the configuration of a specific business event for the organization
1426
+ */
1427
+ 'patch'(
1428
+ parameters?: Parameters<Paths.PatchEvent.PathParameters> | null,
1429
+ data?: Paths.PatchEvent.RequestBody,
1430
+ config?: AxiosRequestConfig
1431
+ ): OperationResponse<Paths.PatchEvent.Responses.$200>
1432
+ }
1433
+ ['/v1/events/{event_name}/json_schema']: {
1434
+ /**
1435
+ * getEventJSONSchema - getEventJSONSchema
1436
+ *
1437
+ * Retrieve the JSON Schema of a specific business event
1438
+ */
1439
+ 'get'(
1440
+ parameters?: Parameters<Paths.GetEventJSONSchema.PathParameters> | null,
1441
+ data?: any,
1442
+ config?: AxiosRequestConfig
1443
+ ): OperationResponse<Paths.GetEventJSONSchema.Responses.$200>
1444
+ }
1445
+ ['/v1/events/{event_name}/example']: {
1446
+ /**
1447
+ * getEventExample - getEventExample
1448
+ *
1449
+ * Generate a sample event payload based on the event's JSON Schema
1450
+ */
1451
+ 'get'(
1452
+ parameters?: Parameters<Paths.GetEventExample.PathParameters> | null,
1453
+ data?: any,
1454
+ config?: AxiosRequestConfig
1455
+ ): OperationResponse<Paths.GetEventExample.Responses.$200>
1456
+ }
1457
+ ['/v1/events/{event_name}:history']: {
1458
+ /**
1459
+ * searchEventHistory - searchEventHistory
1460
+ *
1461
+ * Paginated history of events
1462
+ */
1463
+ 'post'(
1464
+ parameters?: Parameters<Paths.SearchEventHistory.PathParameters> | null,
1465
+ data?: Paths.SearchEventHistory.RequestBody,
1466
+ config?: AxiosRequestConfig
1467
+ ): OperationResponse<Paths.SearchEventHistory.Responses.$200>
1468
+ }
1469
+ ['/v1/events/{event_name}:trigger']: {
1470
+ /**
1471
+ * triggerEvent - triggerEvent
1472
+ *
1473
+ * Explicitly trigger an event by providing input field values and an optional entity seed
1474
+ * for graph hydration. The event must be enabled for the organization.
1475
+ *
1476
+ * - For events with an entity_graph, a seed (entity_id + node_id) is required
1477
+ * - For events without an entity_graph, only fields are needed
1478
+ * - Entity operation context fields (operation, trigger_entity, activity_id, activity_type)
1479
+ * are not included when triggering via API
1480
+ *
1481
+ */
1482
+ 'post'(
1483
+ parameters?: Parameters<Paths.TriggerEvent.PathParameters> | null,
1484
+ data?: Paths.TriggerEvent.RequestBody,
1485
+ config?: AxiosRequestConfig
1486
+ ): OperationResponse<Paths.TriggerEvent.Responses.$200>
1487
+ }
1488
+ }
1489
+
1490
+ type Client = OpenAPIClient<OperationMethods, PathsDictionary>
1491
+
1492
+
1493
+ type CommonEventMetadata = Components.Schemas.CommonEventMetadata;
1494
+ type ContextEntity = Components.Schemas.ContextEntity;
1495
+ type EntityOperationTrigger = Components.Schemas.EntityOperationTrigger;
1496
+ type Event = Components.Schemas.Event;
1497
+ type EventConfig = Components.Schemas.EventConfig;
1498
+ type EventConfigBase = Components.Schemas.EventConfigBase;
1499
+ type EventJsonSchema = Components.Schemas.EventJsonSchema;
1500
+ type FieldsParam = Components.Schemas.FieldsParam;
1501
+ type GraphDefinition = Components.Schemas.GraphDefinition;
1502
+ type GraphEdge = Components.Schemas.GraphEdge;
1503
+ type GraphNode = Components.Schemas.GraphNode;
1504
+ type PrimitiveField = Components.Schemas.PrimitiveField;
1505
+ type SchemaField = Components.Schemas.SchemaField;
1506
+ type SearchOptions = Components.Schemas.SearchOptions;
1507
+ type TriggerEventPayload = Components.Schemas.TriggerEventPayload;
1508
+ type TriggerEventResponse = Components.Schemas.TriggerEventResponse;
1509
+ type UpdateEventPayload = Components.Schemas.UpdateEventPayload;
1510
+
1511
+ export { type Client as C, type EntityOperationTrigger as E, type FieldsParam 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, Components as a, type PathsDictionary as b, type CommonEventMetadata as c, type ContextEntity as d, type Event as e, type EventConfig as f, type EventConfigBase as g, type EventJsonSchema as h, type GraphEdge as i, type GraphNode as j, type PrimitiveField as k, type SearchOptions as l, type TriggerEventResponse as m };