@epilot/sdk 2.0.0-beta.3 → 2.0.0-beta.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.
- package/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +663 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +1711 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +4443 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +4850 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +837 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +3376 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +15000 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +484 -0
- package/definitions/data-management-runtime.json +1 -0
- package/definitions/data-management.json +962 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +183 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1423 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +758 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +2627 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1419 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1642 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +10074 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +363 -0
- package/definitions/erp-integration-runtime.json +1 -0
- package/definitions/erp-integration.json +5845 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +1051 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +2842 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +2341 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +929 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +2660 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +2321 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1531 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1425 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +629 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +1718 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1480 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +9884 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +1474 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1408 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +2408 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +1491 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1525 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3417 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4106 -0
- package/dist/apis/access-token.cjs +13 -84
- package/dist/apis/access-token.js +11 -82
- package/dist/apis/address-suggestions.cjs +13 -127
- package/dist/apis/address-suggestions.js +11 -125
- package/dist/apis/address.cjs +13 -79
- package/dist/apis/address.js +11 -77
- package/dist/apis/ai-agents.cjs +13 -210
- package/dist/apis/ai-agents.js +11 -208
- package/dist/apis/app.cjs +13 -568
- package/dist/apis/app.js +11 -566
- package/dist/apis/audit-logs.cjs +13 -50
- package/dist/apis/audit-logs.js +11 -48
- package/dist/apis/automation.cjs +13 -277
- package/dist/apis/automation.js +11 -275
- package/dist/apis/billing.cjs +13 -170
- package/dist/apis/billing.js +11 -168
- package/dist/apis/blueprint-manifest.cjs +13 -499
- package/dist/apis/blueprint-manifest.js +11 -497
- package/dist/apis/consent.cjs +13 -79
- package/dist/apis/consent.js +11 -77
- package/dist/apis/customer-portal.cjs +13 -2247
- package/dist/apis/customer-portal.js +11 -2245
- package/dist/apis/dashboard.cjs +13 -79
- package/dist/apis/dashboard.js +11 -77
- package/dist/apis/data-management.cjs +13 -235
- package/dist/apis/data-management.js +11 -233
- package/dist/apis/deduplication.cjs +13 -37
- package/dist/apis/deduplication.js +11 -35
- package/dist/apis/design.cjs +13 -214
- package/dist/apis/design.js +11 -212
- package/dist/apis/document.cjs +13 -73
- package/dist/apis/document.js +11 -71
- package/dist/apis/email-settings.cjs +13 -528
- package/dist/apis/email-settings.js +11 -526
- package/dist/apis/email-template.cjs +13 -117
- package/dist/apis/email-template.js +11 -115
- package/dist/apis/entity-mapping.cjs +13 -210
- package/dist/apis/entity-mapping.js +11 -208
- package/dist/apis/entity.cjs +13 -1595
- package/dist/apis/entity.js +11 -1593
- package/dist/apis/environments.cjs +13 -66
- package/dist/apis/environments.js +11 -64
- package/dist/apis/erp-integration.cjs +13 -581
- package/dist/apis/erp-integration.js +11 -579
- package/dist/apis/event-catalog.cjs +13 -125
- package/dist/apis/event-catalog.js +11 -123
- package/dist/apis/file.cjs +13 -568
- package/dist/apis/file.js +11 -566
- package/dist/apis/iban.cjs +13 -38
- package/dist/apis/iban.js +11 -36
- package/dist/apis/journey.cjs +13 -265
- package/dist/apis/journey.js +11 -263
- package/dist/apis/kanban.cjs +13 -159
- package/dist/apis/kanban.js +11 -157
- package/dist/apis/message.cjs +13 -668
- package/dist/apis/message.js +11 -666
- package/dist/apis/metering.cjs +13 -394
- package/dist/apis/metering.js +11 -392
- package/dist/apis/notes.cjs +13 -214
- package/dist/apis/notes.js +11 -212
- package/dist/apis/notification.cjs +13 -232
- package/dist/apis/notification.js +11 -230
- package/dist/apis/organization.cjs +13 -113
- package/dist/apis/organization.js +11 -111
- package/dist/apis/partner-directory.cjs +13 -277
- package/dist/apis/partner-directory.js +11 -275
- package/dist/apis/permissions.cjs +13 -173
- package/dist/apis/permissions.js +11 -171
- package/dist/apis/pricing-tier.cjs +14 -32
- package/dist/apis/pricing-tier.js +11 -29
- package/dist/apis/pricing.cjs +13 -434
- package/dist/apis/pricing.js +11 -432
- package/dist/apis/purpose.cjs +13 -175
- package/dist/apis/purpose.js +11 -173
- package/dist/apis/sandbox.cjs +13 -95
- package/dist/apis/sandbox.js +11 -93
- package/dist/apis/submission.cjs +13 -50
- package/dist/apis/submission.js +11 -48
- package/dist/apis/targeting.cjs +13 -270
- package/dist/apis/targeting.js +11 -268
- package/dist/apis/template-variables.cjs +13 -154
- package/dist/apis/template-variables.js +11 -152
- package/dist/apis/user.cjs +13 -483
- package/dist/apis/user.js +11 -481
- package/dist/apis/validation-rules.cjs +13 -115
- package/dist/apis/validation-rules.js +11 -113
- package/dist/apis/webhooks.cjs +13 -247
- package/dist/apis/webhooks.js +11 -245
- package/dist/apis/workflow-definition.cjs +13 -337
- package/dist/apis/workflow-definition.js +11 -335
- package/dist/apis/workflow.cjs +13 -397
- package/dist/apis/workflow.js +11 -395
- package/dist/{chunk-D7ICL3AM.cjs → chunk-5LXNSDG2.cjs} +51 -2
- package/dist/{chunk-DGCGLG7G.js → chunk-QMQNMCOC.js} +49 -0
- package/dist/index.cjs +56 -54
- package/dist/index.js +53 -51
- package/package.json +50 -3
|
@@ -0,0 +1,1051 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Event Catalog API",
|
|
5
|
+
"description": "Manages the catalog of business events available in epilot",
|
|
6
|
+
"version": "0.1.0"
|
|
7
|
+
},
|
|
8
|
+
"tags": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Event Catalog",
|
|
11
|
+
"description": "API for managing business event catalog"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"security": [
|
|
15
|
+
{
|
|
16
|
+
"EpilotAuth": []
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"EpilotOrg": []
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"paths": {
|
|
23
|
+
"/v1/events": {
|
|
24
|
+
"get": {
|
|
25
|
+
"operationId": "listEvents",
|
|
26
|
+
"summary": "listEvents",
|
|
27
|
+
"description": "Retrieve list of available business events",
|
|
28
|
+
"tags": [
|
|
29
|
+
"Event Catalog"
|
|
30
|
+
],
|
|
31
|
+
"responses": {
|
|
32
|
+
"200": {
|
|
33
|
+
"description": "A JSON array of event objects",
|
|
34
|
+
"content": {
|
|
35
|
+
"application/json": {
|
|
36
|
+
"schema": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"results": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"$ref": "#/components/schemas/EventConfig"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"/v1/events/{event_name}": {
|
|
54
|
+
"get": {
|
|
55
|
+
"operationId": "getEvent",
|
|
56
|
+
"summary": "getEvent",
|
|
57
|
+
"description": "Retrieve the configuration of a specific business event",
|
|
58
|
+
"tags": [
|
|
59
|
+
"Event Catalog"
|
|
60
|
+
],
|
|
61
|
+
"parameters": [
|
|
62
|
+
{
|
|
63
|
+
"name": "event_name",
|
|
64
|
+
"in": "path",
|
|
65
|
+
"required": true,
|
|
66
|
+
"description": "Unique human readable name of the event",
|
|
67
|
+
"schema": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"responses": {
|
|
73
|
+
"200": {
|
|
74
|
+
"description": "Event configuration object",
|
|
75
|
+
"content": {
|
|
76
|
+
"application/json": {
|
|
77
|
+
"schema": {
|
|
78
|
+
"$ref": "#/components/schemas/EventConfig"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"patch": {
|
|
86
|
+
"operationId": "patchEvent",
|
|
87
|
+
"summary": "patchEvent",
|
|
88
|
+
"description": "Update the configuration of a specific business event for the organization",
|
|
89
|
+
"tags": [
|
|
90
|
+
"Event Catalog"
|
|
91
|
+
],
|
|
92
|
+
"parameters": [
|
|
93
|
+
{
|
|
94
|
+
"name": "event_name",
|
|
95
|
+
"in": "path",
|
|
96
|
+
"required": true,
|
|
97
|
+
"description": "Unique human readable name of the event",
|
|
98
|
+
"schema": {
|
|
99
|
+
"type": "string"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"requestBody": {
|
|
104
|
+
"required": true,
|
|
105
|
+
"content": {
|
|
106
|
+
"application/json": {
|
|
107
|
+
"schema": {
|
|
108
|
+
"$ref": "#/components/schemas/UpdateEventPayload"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"responses": {
|
|
114
|
+
"200": {
|
|
115
|
+
"description": "Updated event configuration object",
|
|
116
|
+
"content": {
|
|
117
|
+
"application/json": {
|
|
118
|
+
"schema": {
|
|
119
|
+
"$ref": "#/components/schemas/EventConfig"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"404": {
|
|
125
|
+
"description": "Event not found"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"/v1/events/{event_name}/json_schema": {
|
|
131
|
+
"get": {
|
|
132
|
+
"operationId": "getEventJSONSchema",
|
|
133
|
+
"summary": "getEventJSONSchema",
|
|
134
|
+
"description": "Retrieve the JSON Schema of a specific business event",
|
|
135
|
+
"tags": [
|
|
136
|
+
"Event Catalog"
|
|
137
|
+
],
|
|
138
|
+
"parameters": [
|
|
139
|
+
{
|
|
140
|
+
"name": "event_name",
|
|
141
|
+
"in": "path",
|
|
142
|
+
"required": true,
|
|
143
|
+
"description": "Unique human readable name of the event",
|
|
144
|
+
"schema": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"responses": {
|
|
150
|
+
"200": {
|
|
151
|
+
"description": "Event JSON Schema object",
|
|
152
|
+
"content": {
|
|
153
|
+
"application/json": {
|
|
154
|
+
"schema": {
|
|
155
|
+
"$ref": "#/components/schemas/EventJsonSchema"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"/v1/events/{event_name}/example": {
|
|
164
|
+
"get": {
|
|
165
|
+
"operationId": "getEventExample",
|
|
166
|
+
"summary": "getEventExample",
|
|
167
|
+
"description": "Generate a sample event payload based on the event's JSON Schema",
|
|
168
|
+
"tags": [
|
|
169
|
+
"Event Catalog"
|
|
170
|
+
],
|
|
171
|
+
"parameters": [
|
|
172
|
+
{
|
|
173
|
+
"name": "event_name",
|
|
174
|
+
"in": "path",
|
|
175
|
+
"required": true,
|
|
176
|
+
"description": "Unique human readable name of the event",
|
|
177
|
+
"schema": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"responses": {
|
|
183
|
+
"200": {
|
|
184
|
+
"description": "Sample event payload object",
|
|
185
|
+
"content": {
|
|
186
|
+
"application/json": {
|
|
187
|
+
"schema": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"description": "A sample event payload generated from the JSON Schema"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"/v1/events/{event_name}:history": {
|
|
198
|
+
"post": {
|
|
199
|
+
"operationId": "searchEventHistory",
|
|
200
|
+
"summary": "searchEventHistory",
|
|
201
|
+
"description": "Paginated history of events",
|
|
202
|
+
"tags": [
|
|
203
|
+
"Event Catalog"
|
|
204
|
+
],
|
|
205
|
+
"parameters": [
|
|
206
|
+
{
|
|
207
|
+
"name": "event_name",
|
|
208
|
+
"in": "path",
|
|
209
|
+
"required": true,
|
|
210
|
+
"description": "Unique human readable name of the event",
|
|
211
|
+
"schema": {
|
|
212
|
+
"type": "string"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"requestBody": {
|
|
217
|
+
"content": {
|
|
218
|
+
"application/json": {
|
|
219
|
+
"schema": {
|
|
220
|
+
"$ref": "#/components/schemas/SearchOptions"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"responses": {
|
|
226
|
+
"200": {
|
|
227
|
+
"description": "List of events in the event history",
|
|
228
|
+
"content": {
|
|
229
|
+
"application/json": {
|
|
230
|
+
"schema": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"properties": {
|
|
233
|
+
"results": {
|
|
234
|
+
"type": "array",
|
|
235
|
+
"items": {
|
|
236
|
+
"$ref": "#/components/schemas/Event"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"next_cursor": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"description": "Cursor for pagination. Use this to get the next page of results.",
|
|
242
|
+
"nullable": true,
|
|
243
|
+
"properties": {
|
|
244
|
+
"event_time": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Timestamp from the last event in the current page",
|
|
247
|
+
"example": "2025-10-31T12:34:56Z"
|
|
248
|
+
},
|
|
249
|
+
"event_id": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "Event ID from the last event in the current page",
|
|
252
|
+
"example": "evt_1234567890abcdef"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"/v1/events/{event_name}:trigger": {
|
|
265
|
+
"post": {
|
|
266
|
+
"operationId": "triggerEvent",
|
|
267
|
+
"summary": "triggerEvent",
|
|
268
|
+
"description": "Explicitly trigger an event by providing input field values and an optional entity seed\nfor graph hydration. The event must be enabled for the organization.\n\n- For events with an entity_graph, a seed (entity_id + node_id) is required\n- For events without an entity_graph, only fields are needed\n- Entity operation context fields (operation, trigger_entity, activity_id, activity_type)\n are not included when triggering via API\n",
|
|
269
|
+
"tags": [
|
|
270
|
+
"Event Catalog"
|
|
271
|
+
],
|
|
272
|
+
"parameters": [
|
|
273
|
+
{
|
|
274
|
+
"name": "event_name",
|
|
275
|
+
"in": "path",
|
|
276
|
+
"required": true,
|
|
277
|
+
"description": "Unique human readable name of the event",
|
|
278
|
+
"schema": {
|
|
279
|
+
"type": "string"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"requestBody": {
|
|
284
|
+
"required": true,
|
|
285
|
+
"content": {
|
|
286
|
+
"application/json": {
|
|
287
|
+
"schema": {
|
|
288
|
+
"$ref": "#/components/schemas/TriggerEventPayload"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"responses": {
|
|
294
|
+
"200": {
|
|
295
|
+
"description": "Event triggered successfully",
|
|
296
|
+
"content": {
|
|
297
|
+
"application/json": {
|
|
298
|
+
"schema": {
|
|
299
|
+
"$ref": "#/components/schemas/TriggerEventResponse"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"400": {
|
|
305
|
+
"description": "Invalid input (validation error, missing seed, or missing required fields)"
|
|
306
|
+
},
|
|
307
|
+
"403": {
|
|
308
|
+
"description": "Event is disabled for this organization"
|
|
309
|
+
},
|
|
310
|
+
"404": {
|
|
311
|
+
"description": "Event not found"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"components": {
|
|
318
|
+
"securitySchemes": {
|
|
319
|
+
"EpilotAuth": {
|
|
320
|
+
"type": "http",
|
|
321
|
+
"scheme": "bearer",
|
|
322
|
+
"description": "Authorization header with epilot OAuth2 bearer token",
|
|
323
|
+
"bearerFormat": "JWT"
|
|
324
|
+
},
|
|
325
|
+
"EpilotOrg": {
|
|
326
|
+
"description": "Overrides the target organization to allow shared tenantaccess",
|
|
327
|
+
"name": "x-epilot-org-id",
|
|
328
|
+
"in": "header",
|
|
329
|
+
"type": "apiKey"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"schemas": {
|
|
333
|
+
"EventConfigBase": {
|
|
334
|
+
"type": "object",
|
|
335
|
+
"description": "Base properties shared between EventConfig and UpdateEventPayload",
|
|
336
|
+
"properties": {
|
|
337
|
+
"event_name": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"description": "Unique human readable name of the event",
|
|
340
|
+
"example": "AddMeterReading"
|
|
341
|
+
},
|
|
342
|
+
"event_title": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"description": "Human-friendly title for the event",
|
|
345
|
+
"example": "Add Meter Reading"
|
|
346
|
+
},
|
|
347
|
+
"event_description": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"description": "Description of when the event is triggered",
|
|
350
|
+
"example": "Triggered when a new meter reading is added"
|
|
351
|
+
},
|
|
352
|
+
"event_version": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"description": "Event version (semver)",
|
|
355
|
+
"example": "1.0.0"
|
|
356
|
+
},
|
|
357
|
+
"event_status": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"description": "Status of the event",
|
|
360
|
+
"enum": [
|
|
361
|
+
"active",
|
|
362
|
+
"deprecated",
|
|
363
|
+
"draft",
|
|
364
|
+
"disabled"
|
|
365
|
+
],
|
|
366
|
+
"example": "active"
|
|
367
|
+
},
|
|
368
|
+
"event_tags": {
|
|
369
|
+
"type": "array",
|
|
370
|
+
"description": "Tags associated with the event for categorization and filtering\n\nThe \"builtin\" tag indicates events that are built into the epilot system.\n",
|
|
371
|
+
"items": {
|
|
372
|
+
"type": "string"
|
|
373
|
+
},
|
|
374
|
+
"example": [
|
|
375
|
+
"builtin",
|
|
376
|
+
"metering",
|
|
377
|
+
"erp"
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
"schema_fields": {
|
|
381
|
+
"type": "object",
|
|
382
|
+
"description": "Fields that define the event schema",
|
|
383
|
+
"additionalProperties": {
|
|
384
|
+
"$ref": "#/components/schemas/SchemaField"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"entity_graph": {
|
|
388
|
+
"allOf": [
|
|
389
|
+
{
|
|
390
|
+
"$ref": "#/components/schemas/GraphDefinition"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"description": "Optional entity graph definition for resolving related entities"
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
"entity_operation": {
|
|
398
|
+
"allOf": [
|
|
399
|
+
{
|
|
400
|
+
"$ref": "#/components/schemas/EntityOperationTrigger"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"description": "Optional configuration for triggering this event based on entity operations"
|
|
404
|
+
}
|
|
405
|
+
]
|
|
406
|
+
},
|
|
407
|
+
"enabled": {
|
|
408
|
+
"type": "boolean",
|
|
409
|
+
"description": "Whether this event is enabled for the organization.\nWhen disabled, the event will not be triggered by any means\n(automatic, API, or automation).\nDefaults to true if not specified.\n",
|
|
410
|
+
"default": true,
|
|
411
|
+
"example": true
|
|
412
|
+
},
|
|
413
|
+
"auto_trigger": {
|
|
414
|
+
"type": "boolean",
|
|
415
|
+
"description": "Whether the event should be triggered automatically by built-in logic\n(e.g., portal submissions, entity mutations, EventBridge rules).\nWhen false, the event can still be triggered manually via API or automations.\nOnly meaningful for builtin events that have automatic trigger sources.\nDefaults to true if not specified.\n",
|
|
416
|
+
"default": true,
|
|
417
|
+
"example": true
|
|
418
|
+
},
|
|
419
|
+
"automation_trigger": {
|
|
420
|
+
"type": "boolean",
|
|
421
|
+
"description": "Whether this event can be explicitly triggered by automations.\nWhen true, the event will appear in the automation builder as a\n\"Trigger Event\" action option.\nDefaults to false if not specified.\n",
|
|
422
|
+
"default": false,
|
|
423
|
+
"example": true
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
"EventConfig": {
|
|
428
|
+
"description": "Event configuration with required fields",
|
|
429
|
+
"allOf": [
|
|
430
|
+
{
|
|
431
|
+
"$ref": "#/components/schemas/EventConfigBase"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"type": "object",
|
|
435
|
+
"required": [
|
|
436
|
+
"event_name",
|
|
437
|
+
"event_version",
|
|
438
|
+
"schema_fields"
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
"UpdateEventPayload": {
|
|
444
|
+
"description": "Payload for updating an event configuration.\nAccepts the same fields as EventConfig (all optional for PATCH).\nCurrently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.\n",
|
|
445
|
+
"allOf": [
|
|
446
|
+
{
|
|
447
|
+
"$ref": "#/components/schemas/EventConfigBase"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"type": "object"
|
|
451
|
+
}
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
"PrimitiveField": {
|
|
455
|
+
"type": "object",
|
|
456
|
+
"description": "A primitive JSON Schema field definition",
|
|
457
|
+
"properties": {
|
|
458
|
+
"json_schema": {
|
|
459
|
+
"type": "object",
|
|
460
|
+
"description": "JSON Schema definition of the field",
|
|
461
|
+
"example": {
|
|
462
|
+
"type": "string",
|
|
463
|
+
"format": "date-time",
|
|
464
|
+
"description": "ISO 8601 timestamp when reading was taken"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"required": {
|
|
468
|
+
"type": "boolean",
|
|
469
|
+
"description": "Whether this field is required in the event payload"
|
|
470
|
+
},
|
|
471
|
+
"graph_source": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"description": "Optional JSONata expression to extract the field value from the hydrated entity graph.\n\nThe expression has access to all hydrated graph nodes by their node ID.\nIf not specified, the field value must be provided as input when triggering the event.\n\nExamples:\n - \"ticket.meter_reading_value\" (simple path)\n - \"contact.email[0].email\" (nested/array access)\n - \"ticket.reading_timestamp ?? $now()\" (with fallback)\n - \"$number(meter_counter.reading_value)\" (type coercion)\n",
|
|
474
|
+
"example": "ticket.meter_reading_value"
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
"required": [
|
|
478
|
+
"json_schema"
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
"ContextEntity": {
|
|
482
|
+
"type": "object",
|
|
483
|
+
"properties": {
|
|
484
|
+
"entity_schema": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"example": "meter",
|
|
487
|
+
"description": "Schema slug of the context entity"
|
|
488
|
+
},
|
|
489
|
+
"required": {
|
|
490
|
+
"type": "boolean",
|
|
491
|
+
"description": "Whether this field is required in the event payload"
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"required": [
|
|
495
|
+
"entity_schema"
|
|
496
|
+
]
|
|
497
|
+
},
|
|
498
|
+
"SchemaField": {
|
|
499
|
+
"oneOf": [
|
|
500
|
+
{
|
|
501
|
+
"$ref": "#/components/schemas/PrimitiveField"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"$ref": "#/components/schemas/ContextEntity"
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
"CommonEventMetadata": {
|
|
509
|
+
"type": "object",
|
|
510
|
+
"description": "Common metadata fields present in all event payloads",
|
|
511
|
+
"example": {
|
|
512
|
+
"_org_id": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"description": "epilot tenant/organization ID"
|
|
515
|
+
},
|
|
516
|
+
"_event_time": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"format": "date-time",
|
|
519
|
+
"description": "ISO 8601 timestamp when event occurred"
|
|
520
|
+
},
|
|
521
|
+
"_event_id": {
|
|
522
|
+
"type": "string",
|
|
523
|
+
"description": "Unique event identifier (ULID)"
|
|
524
|
+
},
|
|
525
|
+
"_event_name": {
|
|
526
|
+
"type": "string",
|
|
527
|
+
"description": "Event name from catalog"
|
|
528
|
+
},
|
|
529
|
+
"_event_version": {
|
|
530
|
+
"type": "string",
|
|
531
|
+
"description": "Schema version number"
|
|
532
|
+
},
|
|
533
|
+
"_event_source": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "Source that triggered the event"
|
|
536
|
+
},
|
|
537
|
+
"_ack_id": {
|
|
538
|
+
"type": "string",
|
|
539
|
+
"description": "Unique acknowledgment tracking ID for the event"
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"required": [
|
|
543
|
+
"_org_id",
|
|
544
|
+
"_event_time",
|
|
545
|
+
"_event_id",
|
|
546
|
+
"_event_name",
|
|
547
|
+
"_event_version",
|
|
548
|
+
"_event_source"
|
|
549
|
+
]
|
|
550
|
+
},
|
|
551
|
+
"EventJsonSchema": {
|
|
552
|
+
"type": "object",
|
|
553
|
+
"description": "JSON Schema declaring the event payload structure",
|
|
554
|
+
"example": {
|
|
555
|
+
"type": "object",
|
|
556
|
+
"properties": {
|
|
557
|
+
"_org_id": {
|
|
558
|
+
"type": "string",
|
|
559
|
+
"description": "epilot tenant/organization ID"
|
|
560
|
+
},
|
|
561
|
+
"_event_time": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"format": "date-time",
|
|
564
|
+
"description": "ISO 8601 timestamp when event occurred"
|
|
565
|
+
},
|
|
566
|
+
"_event_id": {
|
|
567
|
+
"type": "string",
|
|
568
|
+
"description": "Unique event identifier (ULID)"
|
|
569
|
+
},
|
|
570
|
+
"_event_name": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"description": "Event name from catalog"
|
|
573
|
+
},
|
|
574
|
+
"_event_version": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"description": "Event version (semver)"
|
|
577
|
+
},
|
|
578
|
+
"_event_source": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"description": "Source that triggered the event"
|
|
581
|
+
},
|
|
582
|
+
"reading_value": {
|
|
583
|
+
"type": "number",
|
|
584
|
+
"description": "The meter reading value"
|
|
585
|
+
},
|
|
586
|
+
"reading_date": {
|
|
587
|
+
"type": "string",
|
|
588
|
+
"format": "date-time",
|
|
589
|
+
"description": "ISO 8601 timestamp when reading was taken"
|
|
590
|
+
},
|
|
591
|
+
"read_by": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"description": "Name or identifier of who submitted the reading"
|
|
594
|
+
},
|
|
595
|
+
"reason": {
|
|
596
|
+
"type": "string",
|
|
597
|
+
"enum": [
|
|
598
|
+
"regular",
|
|
599
|
+
"move-in",
|
|
600
|
+
"move-out",
|
|
601
|
+
"supplier-change",
|
|
602
|
+
"correction",
|
|
603
|
+
"final"
|
|
604
|
+
],
|
|
605
|
+
"description": "Reason for the meter reading"
|
|
606
|
+
},
|
|
607
|
+
"direction": {
|
|
608
|
+
"type": "string",
|
|
609
|
+
"enum": [
|
|
610
|
+
"feed-in",
|
|
611
|
+
"feed-out"
|
|
612
|
+
],
|
|
613
|
+
"description": "Direction of energy flow"
|
|
614
|
+
},
|
|
615
|
+
"source": {
|
|
616
|
+
"type": "string",
|
|
617
|
+
"enum": [
|
|
618
|
+
"portal",
|
|
619
|
+
"360",
|
|
620
|
+
"api",
|
|
621
|
+
"automation"
|
|
622
|
+
],
|
|
623
|
+
"description": "Source system where reading was submitted"
|
|
624
|
+
},
|
|
625
|
+
"meter_id": {
|
|
626
|
+
"type": "string",
|
|
627
|
+
"format": "uuid",
|
|
628
|
+
"description": "Entity ID of the meter"
|
|
629
|
+
},
|
|
630
|
+
"counter_id": {
|
|
631
|
+
"type": "string",
|
|
632
|
+
"format": "uuid",
|
|
633
|
+
"description": "Entity ID of the meter counter"
|
|
634
|
+
},
|
|
635
|
+
"meter_number": {
|
|
636
|
+
"type": "string",
|
|
637
|
+
"description": "Human-readable meter number"
|
|
638
|
+
},
|
|
639
|
+
"obis_number": {
|
|
640
|
+
"type": "string",
|
|
641
|
+
"description": "OBIS code of the counter"
|
|
642
|
+
},
|
|
643
|
+
"unit": {
|
|
644
|
+
"type": "string",
|
|
645
|
+
"description": "Unit of measurement (e.g., kWh, m3)"
|
|
646
|
+
},
|
|
647
|
+
"customer_id": {
|
|
648
|
+
"type": "string",
|
|
649
|
+
"format": "uuid",
|
|
650
|
+
"description": "Entity ID of the customer"
|
|
651
|
+
},
|
|
652
|
+
"contract_id": {
|
|
653
|
+
"type": "string",
|
|
654
|
+
"format": "uuid",
|
|
655
|
+
"description": "Entity ID of the contract"
|
|
656
|
+
},
|
|
657
|
+
"user_id": {
|
|
658
|
+
"type": "string",
|
|
659
|
+
"description": "ID of the user who submitted the reading"
|
|
660
|
+
},
|
|
661
|
+
"user_email": {
|
|
662
|
+
"type": "string",
|
|
663
|
+
"format": "email",
|
|
664
|
+
"description": "Email of the user who submitted the reading"
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
"required": [
|
|
668
|
+
"_org_id",
|
|
669
|
+
"_event_time",
|
|
670
|
+
"_event_id",
|
|
671
|
+
"_event_name",
|
|
672
|
+
"_event_version",
|
|
673
|
+
"_event_source",
|
|
674
|
+
"reading_value",
|
|
675
|
+
"reading_date",
|
|
676
|
+
"read_by",
|
|
677
|
+
"reason",
|
|
678
|
+
"direction",
|
|
679
|
+
"source",
|
|
680
|
+
"meter_id",
|
|
681
|
+
"counter_id",
|
|
682
|
+
"meter_number",
|
|
683
|
+
"obis_number",
|
|
684
|
+
"unit",
|
|
685
|
+
"customer_id",
|
|
686
|
+
"contract_id"
|
|
687
|
+
]
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
"Event": {
|
|
691
|
+
"type": "object",
|
|
692
|
+
"description": "An event instance in the event history",
|
|
693
|
+
"properties": {
|
|
694
|
+
"_org_id": {
|
|
695
|
+
"type": "string",
|
|
696
|
+
"description": "epilot tenant/organization ID"
|
|
697
|
+
},
|
|
698
|
+
"_event_time": {
|
|
699
|
+
"type": "string",
|
|
700
|
+
"format": "date-time",
|
|
701
|
+
"description": "ISO 8601 timestamp when event occurred"
|
|
702
|
+
},
|
|
703
|
+
"_event_id": {
|
|
704
|
+
"type": "string",
|
|
705
|
+
"description": "Unique event identifier (ULID)"
|
|
706
|
+
},
|
|
707
|
+
"_event_name": {
|
|
708
|
+
"type": "string",
|
|
709
|
+
"description": "Event name from catalog"
|
|
710
|
+
},
|
|
711
|
+
"_event_version": {
|
|
712
|
+
"type": "string",
|
|
713
|
+
"description": "Event version (semver)",
|
|
714
|
+
"example": "1.0.0"
|
|
715
|
+
},
|
|
716
|
+
"_event_source": {
|
|
717
|
+
"type": "string",
|
|
718
|
+
"description": "Source that triggered the event"
|
|
719
|
+
},
|
|
720
|
+
"_trigger_source_type": {
|
|
721
|
+
"type": "string",
|
|
722
|
+
"description": "The type of system that triggered the event.\nCommon values: api, automation, operation, portal_user\n",
|
|
723
|
+
"example": "api"
|
|
724
|
+
},
|
|
725
|
+
"_trigger_source": {
|
|
726
|
+
"type": "string",
|
|
727
|
+
"description": "Identifier of the specific trigger source.\n- For api: User ID or API key identifier\n- For automation: Automation execution ID\n- For operation: Activity ID from the entity operation\n- For portal_user: Portal user email\n"
|
|
728
|
+
},
|
|
729
|
+
"_ack_id": {
|
|
730
|
+
"type": "string",
|
|
731
|
+
"description": "Unique acknowledgment tracking ID for the event.\nUsed to track event delivery and processing status.\n"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"required": [
|
|
735
|
+
"_org_id",
|
|
736
|
+
"_event_time",
|
|
737
|
+
"_event_id",
|
|
738
|
+
"_event_name",
|
|
739
|
+
"_event_version",
|
|
740
|
+
"_event_source"
|
|
741
|
+
],
|
|
742
|
+
"additionalProperties": true,
|
|
743
|
+
"example": {
|
|
744
|
+
"_org_id": "org_123456",
|
|
745
|
+
"_event_time": "2024-01-01T12:00:00Z",
|
|
746
|
+
"_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
|
|
747
|
+
"_event_name": "MeterReading",
|
|
748
|
+
"_event_version": "1.0.0",
|
|
749
|
+
"_event_source": "api",
|
|
750
|
+
"_trigger_source_type": "api",
|
|
751
|
+
"_trigger_source": "user_123456",
|
|
752
|
+
"reading_value": 123.45,
|
|
753
|
+
"reading_date": "2024-01-01T11:59:00Z",
|
|
754
|
+
"read_by": "John Doe",
|
|
755
|
+
"reason": "regular",
|
|
756
|
+
"direction": "feed-out",
|
|
757
|
+
"source": "portal",
|
|
758
|
+
"meter_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
759
|
+
"counter_id": "660e8400-e29b-41d4-a716-446655440000",
|
|
760
|
+
"meter_number": "MT123456789",
|
|
761
|
+
"obis_number": "1-0:1.8.0",
|
|
762
|
+
"unit": "kWh",
|
|
763
|
+
"customer_id": "770e8400-e29b-41d4-a716-446655440000",
|
|
764
|
+
"contract_id": "880e8400-e29b-41d4-a716-446655440000"
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
"GraphDefinition": {
|
|
768
|
+
"type": "object",
|
|
769
|
+
"description": "Entity graph definition for resolving related entities",
|
|
770
|
+
"properties": {
|
|
771
|
+
"nodes": {
|
|
772
|
+
"type": "array",
|
|
773
|
+
"description": "List of node definitions in the graph",
|
|
774
|
+
"items": {
|
|
775
|
+
"$ref": "#/components/schemas/GraphNode"
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
"edges": {
|
|
779
|
+
"type": "array",
|
|
780
|
+
"description": "List of edge definitions connecting nodes",
|
|
781
|
+
"items": {
|
|
782
|
+
"$ref": "#/components/schemas/GraphEdge"
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
"required": [
|
|
787
|
+
"nodes",
|
|
788
|
+
"edges"
|
|
789
|
+
]
|
|
790
|
+
},
|
|
791
|
+
"GraphNode": {
|
|
792
|
+
"type": "object",
|
|
793
|
+
"description": "A node in the entity graph",
|
|
794
|
+
"properties": {
|
|
795
|
+
"id": {
|
|
796
|
+
"type": "string",
|
|
797
|
+
"description": "Unique identifier for this node in the graph definition",
|
|
798
|
+
"example": "contact"
|
|
799
|
+
},
|
|
800
|
+
"schema": {
|
|
801
|
+
"type": "string",
|
|
802
|
+
"description": "Entity schema slug for this node",
|
|
803
|
+
"example": "contact"
|
|
804
|
+
},
|
|
805
|
+
"cardinality": {
|
|
806
|
+
"type": "string",
|
|
807
|
+
"enum": [
|
|
808
|
+
"one",
|
|
809
|
+
"many"
|
|
810
|
+
],
|
|
811
|
+
"description": "Cardinality for this node when hydrated:\n- \"one\": Node can only contain one entity, returns single Entity object\n- \"many\": Node can contain multiple entities, returns array of Entity objects\nIf not specified, defaults to \"many\" (returns array)\n",
|
|
812
|
+
"example": "one"
|
|
813
|
+
},
|
|
814
|
+
"fields": {
|
|
815
|
+
"allOf": [
|
|
816
|
+
{
|
|
817
|
+
"$ref": "#/components/schemas/FieldsParam"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"description": "Optional array of field names to include in the hydrated entity response for this node.\nWhen specified, only the requested fields plus required internal fields (_id, _schema, _org) will be returned.\nOnly applies when hydrate=true.\n"
|
|
821
|
+
}
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
"required": [
|
|
826
|
+
"id",
|
|
827
|
+
"schema"
|
|
828
|
+
]
|
|
829
|
+
},
|
|
830
|
+
"GraphEdge": {
|
|
831
|
+
"type": "object",
|
|
832
|
+
"description": "An edge connecting two nodes in the graph",
|
|
833
|
+
"properties": {
|
|
834
|
+
"from": {
|
|
835
|
+
"type": "string",
|
|
836
|
+
"description": "Source node ID",
|
|
837
|
+
"example": "contact"
|
|
838
|
+
},
|
|
839
|
+
"to": {
|
|
840
|
+
"type": "string",
|
|
841
|
+
"description": "Target node ID",
|
|
842
|
+
"example": "billing_account"
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
"required": [
|
|
846
|
+
"from",
|
|
847
|
+
"to"
|
|
848
|
+
]
|
|
849
|
+
},
|
|
850
|
+
"EntityOperationTrigger": {
|
|
851
|
+
"type": "object",
|
|
852
|
+
"description": "Configuration for triggering an event based on entity operations.\n\nWhen an entity operation matches the configured criteria, the event will be triggered.\n- On createEntity: the attribute must be present in the entity payload\n- On updateEntity: the attribute must be in diff.added, diff.updated, or diff.deleted\n- On deleteEntity: the event triggers when the entity is deleted (attributes not checked)\n",
|
|
853
|
+
"properties": {
|
|
854
|
+
"operation": {
|
|
855
|
+
"type": "array",
|
|
856
|
+
"description": "List of entity operations that can trigger this event",
|
|
857
|
+
"items": {
|
|
858
|
+
"type": "string",
|
|
859
|
+
"enum": [
|
|
860
|
+
"createEntity",
|
|
861
|
+
"updateEntity",
|
|
862
|
+
"deleteEntity"
|
|
863
|
+
]
|
|
864
|
+
},
|
|
865
|
+
"example": [
|
|
866
|
+
"createEntity",
|
|
867
|
+
"updateEntity"
|
|
868
|
+
]
|
|
869
|
+
},
|
|
870
|
+
"schema": {
|
|
871
|
+
"type": "array",
|
|
872
|
+
"description": "List of entity schema slugs that can trigger this event",
|
|
873
|
+
"items": {
|
|
874
|
+
"type": "string"
|
|
875
|
+
},
|
|
876
|
+
"example": [
|
|
877
|
+
"contact",
|
|
878
|
+
"contract",
|
|
879
|
+
"order"
|
|
880
|
+
]
|
|
881
|
+
},
|
|
882
|
+
"attribute": {
|
|
883
|
+
"type": "array",
|
|
884
|
+
"description": "Optional list of entity attributes to track for changes.\nIf specified, the event only triggers when these attributes are affected.\n- On createEntity: attribute must be defined in the entity payload\n- On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted\nIf not specified, all changes to matching entities will trigger the event.\n",
|
|
885
|
+
"items": {
|
|
886
|
+
"type": "string"
|
|
887
|
+
},
|
|
888
|
+
"example": [
|
|
889
|
+
"email",
|
|
890
|
+
"phone",
|
|
891
|
+
"status"
|
|
892
|
+
]
|
|
893
|
+
},
|
|
894
|
+
"purpose": {
|
|
895
|
+
"type": "array",
|
|
896
|
+
"description": "Optional list of purpose names to filter by.\nThe entity must have at least one matching purpose in its _purpose array.\nPurpose names are matched against the taxonomy classification names (e.g., \"Kündigung\", \"Umzug/Auszug\").\nIf not specified, the event triggers regardless of entity purpose.\n",
|
|
897
|
+
"items": {
|
|
898
|
+
"type": "string"
|
|
899
|
+
},
|
|
900
|
+
"example": [
|
|
901
|
+
"Kündigung",
|
|
902
|
+
"Umzug/Auszug"
|
|
903
|
+
]
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
"required": [
|
|
907
|
+
"operation",
|
|
908
|
+
"schema"
|
|
909
|
+
]
|
|
910
|
+
},
|
|
911
|
+
"SearchOptions": {
|
|
912
|
+
"type": "object",
|
|
913
|
+
"properties": {
|
|
914
|
+
"limit": {
|
|
915
|
+
"type": "integer",
|
|
916
|
+
"description": "Maximum number of results to return",
|
|
917
|
+
"default": 10,
|
|
918
|
+
"minimum": 1,
|
|
919
|
+
"maximum": 25
|
|
920
|
+
},
|
|
921
|
+
"cursor": {
|
|
922
|
+
"type": "object",
|
|
923
|
+
"description": "Cursor for pagination. Use the next_cursor from the previous response to get the next page.",
|
|
924
|
+
"properties": {
|
|
925
|
+
"event_time": {
|
|
926
|
+
"type": "string",
|
|
927
|
+
"description": "Timestamp from the last event in the previous page",
|
|
928
|
+
"example": "2025-10-31 12:34:56"
|
|
929
|
+
},
|
|
930
|
+
"event_id": {
|
|
931
|
+
"type": "string",
|
|
932
|
+
"description": "Event ID from the last event in the previous page",
|
|
933
|
+
"example": "evt_1234567890abcdef"
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
"timestamp": {
|
|
938
|
+
"type": "object",
|
|
939
|
+
"description": "Filter events by timestamp range",
|
|
940
|
+
"properties": {
|
|
941
|
+
"from": {
|
|
942
|
+
"type": "string",
|
|
943
|
+
"format": "date-time",
|
|
944
|
+
"description": "Start timestamp in ISO 8601 format",
|
|
945
|
+
"example": "2025-10-01T00:00:00Z"
|
|
946
|
+
},
|
|
947
|
+
"to": {
|
|
948
|
+
"type": "string",
|
|
949
|
+
"format": "date-time",
|
|
950
|
+
"description": "End timestamp in ISO 8601 format",
|
|
951
|
+
"example": "2025-10-31T23:59:59Z"
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
},
|
|
955
|
+
"event_id": {
|
|
956
|
+
"type": "string",
|
|
957
|
+
"description": "Filter by specific event ID",
|
|
958
|
+
"example": "evt_1234567890abcdef"
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
"FieldsParam": {
|
|
963
|
+
"type": "array",
|
|
964
|
+
"description": "List of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n",
|
|
965
|
+
"items": {
|
|
966
|
+
"type": "string"
|
|
967
|
+
},
|
|
968
|
+
"example": [
|
|
969
|
+
"_id",
|
|
970
|
+
"_title",
|
|
971
|
+
"first_name",
|
|
972
|
+
"account",
|
|
973
|
+
"!account.*._files",
|
|
974
|
+
"**._product"
|
|
975
|
+
]
|
|
976
|
+
},
|
|
977
|
+
"TriggerEventPayload": {
|
|
978
|
+
"type": "object",
|
|
979
|
+
"description": "Payload for explicitly triggering an event via API",
|
|
980
|
+
"properties": {
|
|
981
|
+
"seed": {
|
|
982
|
+
"type": "object",
|
|
983
|
+
"description": "Entity seed for graph hydration. Required for events that have an entity_graph defined.\nSpecifies which entity to start graph traversal from.\n",
|
|
984
|
+
"properties": {
|
|
985
|
+
"entity_id": {
|
|
986
|
+
"type": "string",
|
|
987
|
+
"format": "uuid",
|
|
988
|
+
"description": "Entity ID to seed the graph hydration"
|
|
989
|
+
},
|
|
990
|
+
"node_id": {
|
|
991
|
+
"type": "string",
|
|
992
|
+
"description": "Node ID from the event's entity_graph definition that matches\nthe seed entity. Must be a valid node in the event's graph.\n"
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
"required": [
|
|
996
|
+
"entity_id",
|
|
997
|
+
"node_id"
|
|
998
|
+
]
|
|
999
|
+
},
|
|
1000
|
+
"fields": {
|
|
1001
|
+
"type": "object",
|
|
1002
|
+
"description": "Input field values for the event. Keys must match the event's\nschema_fields definitions. Values are validated against each\nfield's JSON Schema.\n",
|
|
1003
|
+
"additionalProperties": true
|
|
1004
|
+
},
|
|
1005
|
+
"skip_hydration": {
|
|
1006
|
+
"type": "array",
|
|
1007
|
+
"description": "Optional list of node IDs to skip during entity graph hydration.\nThese nodes will be null/undefined in the event payload.\n",
|
|
1008
|
+
"items": {
|
|
1009
|
+
"type": "string"
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"_trigger_source_type": {
|
|
1013
|
+
"type": "string",
|
|
1014
|
+
"description": "The type of system that triggered the event.\nExamples: api, automation, operation, portal_user\nDefaults to \"api\" if not specified.\n"
|
|
1015
|
+
},
|
|
1016
|
+
"_trigger_source": {
|
|
1017
|
+
"type": "string",
|
|
1018
|
+
"description": "Identifier of the specific trigger source.\nExamples: user ID, automation execution ID, activity ID, portal user email\nDefaults to the calling user ID if not specified.\n"
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
"TriggerEventResponse": {
|
|
1023
|
+
"type": "object",
|
|
1024
|
+
"description": "Response from triggering an event",
|
|
1025
|
+
"properties": {
|
|
1026
|
+
"success": {
|
|
1027
|
+
"type": "boolean",
|
|
1028
|
+
"description": "Whether the event was triggered successfully"
|
|
1029
|
+
},
|
|
1030
|
+
"event_id": {
|
|
1031
|
+
"type": "string",
|
|
1032
|
+
"description": "The unique event ID (ULID) assigned to this event"
|
|
1033
|
+
},
|
|
1034
|
+
"event_bridge_event_id": {
|
|
1035
|
+
"type": "string",
|
|
1036
|
+
"description": "EventBridge event ID from publishing"
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
"required": [
|
|
1040
|
+
"success",
|
|
1041
|
+
"event_id"
|
|
1042
|
+
]
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
"servers": [
|
|
1047
|
+
{
|
|
1048
|
+
"url": "https://event-catalog.sls.epilot.io"
|
|
1049
|
+
}
|
|
1050
|
+
]
|
|
1051
|
+
}
|