@epilot/erp-integration-client 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +47 -0
- package/dist/openapi.d.ts +311 -58
- package/dist/openapi.json +341 -34
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={390:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(466));t.default=o.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://erp-integration-api.sls.epilot.io"}],"paths":{"/v1/erp/tracking/acknowledgement":{"post":{"operationId":"acknowledgeTracking","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/erp/trigger":{"post":{"operationId":"triggerErp","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/erp/updates/events":{"post":{"operationId":"processErpUpdatesEvents","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/events":{"post":{"operationId":"processErpUpdatesEventsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/mapping_simulation":{"post":{"operationId":"simulateMappingV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/erp/updates/mapping_simulation":{"post":{"operationId":"simulateMapping","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations":{"get":{"operationId":"listIntegrations","responses":{}},"post":{"operationId":"createIntegration","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}":{"get":{"operationId":"getIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/events":{"post":{"operationId":"queryEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/events/replay":{"post":{"operationId":"replayEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/use-cases":{"get":{"operationId":"listUseCases","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"post":{"operationId":"createUseCase","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/use-cases/{useCaseId}":{"get":{"operationId":"getUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/use-cases/{useCaseId}/history":{"get":{"operationId":"listUseCaseHistory","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true},{"name":"cursor","in":"query","required":false}],"responses":{}}},"/v2/integrations":{"get":{"operationId":"listIntegrationsV2","responses":{}}},"/v2/integrations/{integrationId}":{"get":{"operationId":"getIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"upsertIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/app-mapping":{"put":{"operationId":"setIntegrationAppMapping","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegrationAppMapping","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{"responses":{"BadRequest":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"Unauthorized":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"ReplayEventsResponse":{"content":{"application/json":{}}},"ERPUpdatesResponse":{"content":{"application/json":{}}},"TriggerWebhookResponse":{"content":{"application/json":{}}},"QueryEventsResponse":{"content":{"application/json":{}}}}}}')}},t={},n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(390),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
@@ -283,6 +283,53 @@
|
|
|
283
283
|
"responses": {}
|
|
284
284
|
}
|
|
285
285
|
},
|
|
286
|
+
"/v2/integrations": {
|
|
287
|
+
"get": {
|
|
288
|
+
"operationId": "listIntegrationsV2",
|
|
289
|
+
"responses": {}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"/v2/integrations/{integrationId}": {
|
|
293
|
+
"get": {
|
|
294
|
+
"operationId": "getIntegrationV2",
|
|
295
|
+
"parameters": [
|
|
296
|
+
{
|
|
297
|
+
"name": "integrationId",
|
|
298
|
+
"in": "path",
|
|
299
|
+
"required": true
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
"responses": {}
|
|
303
|
+
},
|
|
304
|
+
"put": {
|
|
305
|
+
"operationId": "upsertIntegrationV2",
|
|
306
|
+
"parameters": [
|
|
307
|
+
{
|
|
308
|
+
"name": "integrationId",
|
|
309
|
+
"in": "path",
|
|
310
|
+
"required": true
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"requestBody": {
|
|
314
|
+
"required": true,
|
|
315
|
+
"content": {
|
|
316
|
+
"application/json": {}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"responses": {}
|
|
320
|
+
},
|
|
321
|
+
"delete": {
|
|
322
|
+
"operationId": "deleteIntegrationV2",
|
|
323
|
+
"parameters": [
|
|
324
|
+
{
|
|
325
|
+
"name": "integrationId",
|
|
326
|
+
"in": "path",
|
|
327
|
+
"required": true
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
"responses": {}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
286
333
|
"/v1/integrations/{integrationId}/app-mapping": {
|
|
287
334
|
"put": {
|
|
288
335
|
"operationId": "setIntegrationAppMapping",
|
package/dist/openapi.d.ts
CHANGED
|
@@ -124,6 +124,83 @@ declare namespace Components {
|
|
|
124
124
|
*/
|
|
125
125
|
component_id: string; // uuid
|
|
126
126
|
}
|
|
127
|
+
export interface EmbeddedInboundUseCaseRequest {
|
|
128
|
+
/**
|
|
129
|
+
* Optional use case ID for update matching.
|
|
130
|
+
* - If provided and matches an existing use case, that use case is updated
|
|
131
|
+
* - If provided but no match, a new use case with this ID is created
|
|
132
|
+
* - If omitted, a new use case with auto-generated ID is created
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
id?: string; // uuid
|
|
136
|
+
/**
|
|
137
|
+
* Use case name
|
|
138
|
+
*/
|
|
139
|
+
name: string;
|
|
140
|
+
/**
|
|
141
|
+
* Whether the use case is enabled
|
|
142
|
+
*/
|
|
143
|
+
enabled: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Optional description of this change (like a commit message)
|
|
146
|
+
*/
|
|
147
|
+
change_description?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Use case type
|
|
150
|
+
*/
|
|
151
|
+
type: "inbound";
|
|
152
|
+
configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration;
|
|
153
|
+
}
|
|
154
|
+
export interface EmbeddedOutboundUseCaseRequest {
|
|
155
|
+
/**
|
|
156
|
+
* Optional use case ID for update matching.
|
|
157
|
+
* - If provided and matches an existing use case, that use case is updated
|
|
158
|
+
* - If provided but no match, a new use case with this ID is created
|
|
159
|
+
* - If omitted, a new use case with auto-generated ID is created
|
|
160
|
+
*
|
|
161
|
+
*/
|
|
162
|
+
id?: string; // uuid
|
|
163
|
+
/**
|
|
164
|
+
* Use case name
|
|
165
|
+
*/
|
|
166
|
+
name: string;
|
|
167
|
+
/**
|
|
168
|
+
* Whether the use case is enabled
|
|
169
|
+
*/
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Optional description of this change (like a commit message)
|
|
173
|
+
*/
|
|
174
|
+
change_description?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Use case type
|
|
177
|
+
*/
|
|
178
|
+
type: "outbound";
|
|
179
|
+
configuration?: /* Configuration for outbound use cases (epilot to ERP). Structure TBD. */ OutboundIntegrationEventConfiguration;
|
|
180
|
+
}
|
|
181
|
+
export type EmbeddedUseCaseRequest = EmbeddedInboundUseCaseRequest | EmbeddedOutboundUseCaseRequest;
|
|
182
|
+
export interface EmbeddedUseCaseRequestBase {
|
|
183
|
+
/**
|
|
184
|
+
* Optional use case ID for update matching.
|
|
185
|
+
* - If provided and matches an existing use case, that use case is updated
|
|
186
|
+
* - If provided but no match, a new use case with this ID is created
|
|
187
|
+
* - If omitted, a new use case with auto-generated ID is created
|
|
188
|
+
*
|
|
189
|
+
*/
|
|
190
|
+
id?: string; // uuid
|
|
191
|
+
/**
|
|
192
|
+
* Use case name
|
|
193
|
+
*/
|
|
194
|
+
name: string;
|
|
195
|
+
/**
|
|
196
|
+
* Whether the use case is enabled
|
|
197
|
+
*/
|
|
198
|
+
enabled: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Optional description of this change (like a commit message)
|
|
201
|
+
*/
|
|
202
|
+
change_description?: string;
|
|
203
|
+
}
|
|
127
204
|
export interface EntityUpdate {
|
|
128
205
|
/**
|
|
129
206
|
* The entity type slug
|
|
@@ -197,25 +274,6 @@ declare namespace Components {
|
|
|
197
274
|
*/
|
|
198
275
|
message?: string;
|
|
199
276
|
}
|
|
200
|
-
/**
|
|
201
|
-
* Extended unique identifier field configuration with type hints for repeatable fields
|
|
202
|
-
*/
|
|
203
|
-
export interface ExtendedUniqueIdField {
|
|
204
|
-
/**
|
|
205
|
-
* The attribute name to use as unique identifier
|
|
206
|
-
*/
|
|
207
|
-
attribute: string;
|
|
208
|
-
_type?: /**
|
|
209
|
-
* Type hint for repeatable fields that require special search handling.
|
|
210
|
-
* These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]).
|
|
211
|
-
*
|
|
212
|
-
*/
|
|
213
|
-
RepeatableFieldType;
|
|
214
|
-
/**
|
|
215
|
-
* Which array item to use (0-indexed, default first)
|
|
216
|
-
*/
|
|
217
|
-
index?: number;
|
|
218
|
-
}
|
|
219
277
|
/**
|
|
220
278
|
* Configuration for inbound use cases (ERP to epilot)
|
|
221
279
|
*/
|
|
@@ -381,12 +439,6 @@ declare namespace Components {
|
|
|
381
439
|
* Constant value to assign (any type)
|
|
382
440
|
*/
|
|
383
441
|
constant?: any;
|
|
384
|
-
/**
|
|
385
|
-
* Type hint for repeatable fields (email, phone).
|
|
386
|
-
* When this attribute is used as a unique identifier, specifying the _type
|
|
387
|
-
* enables correct search path generation (e.g., email.email.keyword).
|
|
388
|
-
*
|
|
389
|
-
*/
|
|
390
442
|
_type?: /**
|
|
391
443
|
* Type hint for repeatable fields that require special search handling.
|
|
392
444
|
* These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]).
|
|
@@ -426,9 +478,20 @@ declare namespace Components {
|
|
|
426
478
|
}
|
|
427
479
|
export interface IntegrationMeterReading {
|
|
428
480
|
/**
|
|
429
|
-
* JSONata expression to extract meter reading items from the event data
|
|
481
|
+
* Optional JSONata expression to extract meter reading items from the event data.
|
|
482
|
+
* If not provided, the entire payload is used as the reading data.
|
|
483
|
+
* Useful when you need to extract an array of readings from a nested structure (e.g., "$.readings").
|
|
484
|
+
*
|
|
485
|
+
*/
|
|
486
|
+
jsonataExpression?: string;
|
|
487
|
+
/**
|
|
488
|
+
* Strategy for matching incoming readings against existing readings.
|
|
489
|
+
* - 'external_id': Match readings by external_id attribute (default behavior)
|
|
490
|
+
* - 'strict-date': Match by meter_id + counter_id + direction + date (German timezone).
|
|
491
|
+
* Useful when readings originate from ECP and are echoed back by the ERP with truncated timestamps.
|
|
492
|
+
*
|
|
430
493
|
*/
|
|
431
|
-
|
|
494
|
+
reading_matching?: "external_id" | "strict-date";
|
|
432
495
|
meter: MeterUniqueIdsConfig;
|
|
433
496
|
meter_counter?: MeterUniqueIdsConfig;
|
|
434
497
|
/**
|
|
@@ -450,6 +513,39 @@ declare namespace Components {
|
|
|
450
513
|
*/
|
|
451
514
|
fields: IntegrationFieldV1[];
|
|
452
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* Integration with embedded use cases for atomic CRUD operations
|
|
518
|
+
*/
|
|
519
|
+
export interface IntegrationWithUseCases {
|
|
520
|
+
/**
|
|
521
|
+
* Unique identifier for the integration
|
|
522
|
+
*/
|
|
523
|
+
id: string; // uuid
|
|
524
|
+
/**
|
|
525
|
+
* Organization ID
|
|
526
|
+
*/
|
|
527
|
+
orgId: string;
|
|
528
|
+
/**
|
|
529
|
+
* Integration name
|
|
530
|
+
*/
|
|
531
|
+
name: string;
|
|
532
|
+
/**
|
|
533
|
+
* Optional description of the integration
|
|
534
|
+
*/
|
|
535
|
+
description?: string;
|
|
536
|
+
/**
|
|
537
|
+
* All use cases belonging to this integration
|
|
538
|
+
*/
|
|
539
|
+
use_cases: UseCase[];
|
|
540
|
+
/**
|
|
541
|
+
* ISO-8601 timestamp when the integration was created
|
|
542
|
+
*/
|
|
543
|
+
created_at: string; // date-time
|
|
544
|
+
/**
|
|
545
|
+
* ISO-8601 timestamp when the integration was last updated
|
|
546
|
+
*/
|
|
547
|
+
updated_at: string; // date-time
|
|
548
|
+
}
|
|
453
549
|
export interface MappingSimulationRequest {
|
|
454
550
|
mapping_configuration: IntegrationConfigurationV1 | IntegrationConfigurationV2;
|
|
455
551
|
/**
|
|
@@ -930,34 +1026,6 @@ declare namespace Components {
|
|
|
930
1026
|
end_date?: string;
|
|
931
1027
|
event_id?: string;
|
|
932
1028
|
}
|
|
933
|
-
/**
|
|
934
|
-
* Unique identifier field configuration. Can be either:
|
|
935
|
-
* - A simple string (attribute name)
|
|
936
|
-
* - An extended object with type hints for repeatable fields
|
|
937
|
-
*
|
|
938
|
-
*/
|
|
939
|
-
export type UniqueIdField = /**
|
|
940
|
-
* Unique identifier field configuration. Can be either:
|
|
941
|
-
* - A simple string (attribute name)
|
|
942
|
-
* - An extended object with type hints for repeatable fields
|
|
943
|
-
*
|
|
944
|
-
*/
|
|
945
|
-
string | /* Extended unique identifier field configuration with type hints for repeatable fields */ ExtendedUniqueIdField;
|
|
946
|
-
/**
|
|
947
|
-
* Metadata about a unique identifier field (used in message payloads)
|
|
948
|
-
*/
|
|
949
|
-
export interface UniqueIdMetadata {
|
|
950
|
-
fieldType?: /**
|
|
951
|
-
* Type hint for repeatable fields that require special search handling.
|
|
952
|
-
* These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]).
|
|
953
|
-
*
|
|
954
|
-
*/
|
|
955
|
-
RepeatableFieldType;
|
|
956
|
-
/**
|
|
957
|
-
* Which array item was used (0-indexed)
|
|
958
|
-
*/
|
|
959
|
-
index?: number;
|
|
960
|
-
}
|
|
961
1029
|
export interface UpdateInboundUseCaseRequest {
|
|
962
1030
|
/**
|
|
963
1031
|
* Use case name
|
|
@@ -1021,6 +1089,29 @@ declare namespace Components {
|
|
|
1021
1089
|
*/
|
|
1022
1090
|
change_description?: string;
|
|
1023
1091
|
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Request to create or update an integration with embedded use cases (upsert).
|
|
1094
|
+
* This is a declarative operation - the request represents the desired state.
|
|
1095
|
+
*
|
|
1096
|
+
*/
|
|
1097
|
+
export interface UpsertIntegrationWithUseCasesRequest {
|
|
1098
|
+
/**
|
|
1099
|
+
* Integration name
|
|
1100
|
+
*/
|
|
1101
|
+
name: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* Optional description of the integration
|
|
1104
|
+
*/
|
|
1105
|
+
description?: string;
|
|
1106
|
+
/**
|
|
1107
|
+
* Full list of use cases (declarative). This replaces ALL existing use cases.
|
|
1108
|
+
* - Use cases with an `id` field matching an existing use case will be updated
|
|
1109
|
+
* - Use cases without an `id` or with a non-matching `id` will be created
|
|
1110
|
+
* - Existing use cases not in this list will be deleted
|
|
1111
|
+
*
|
|
1112
|
+
*/
|
|
1113
|
+
use_cases?: EmbeddedUseCaseRequest[];
|
|
1114
|
+
}
|
|
1024
1115
|
export type UseCase = {
|
|
1025
1116
|
/**
|
|
1026
1117
|
* Unique identifier for the use case
|
|
@@ -1180,6 +1271,23 @@ declare namespace Paths {
|
|
|
1180
1271
|
export type $500 = Components.Responses.InternalServerError;
|
|
1181
1272
|
}
|
|
1182
1273
|
}
|
|
1274
|
+
namespace DeleteIntegrationV2 {
|
|
1275
|
+
namespace Parameters {
|
|
1276
|
+
export type IntegrationId = string; // uuid
|
|
1277
|
+
}
|
|
1278
|
+
export interface PathParameters {
|
|
1279
|
+
integrationId: Parameters.IntegrationId /* uuid */;
|
|
1280
|
+
}
|
|
1281
|
+
namespace Responses {
|
|
1282
|
+
export interface $200 {
|
|
1283
|
+
message?: string;
|
|
1284
|
+
}
|
|
1285
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1286
|
+
export interface $404 {
|
|
1287
|
+
}
|
|
1288
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1183
1291
|
namespace DeleteUseCase {
|
|
1184
1292
|
namespace Parameters {
|
|
1185
1293
|
export type IntegrationId = string; // uuid
|
|
@@ -1214,6 +1322,21 @@ declare namespace Paths {
|
|
|
1214
1322
|
export type $500 = Components.Responses.InternalServerError;
|
|
1215
1323
|
}
|
|
1216
1324
|
}
|
|
1325
|
+
namespace GetIntegrationV2 {
|
|
1326
|
+
namespace Parameters {
|
|
1327
|
+
export type IntegrationId = string; // uuid
|
|
1328
|
+
}
|
|
1329
|
+
export interface PathParameters {
|
|
1330
|
+
integrationId: Parameters.IntegrationId /* uuid */;
|
|
1331
|
+
}
|
|
1332
|
+
namespace Responses {
|
|
1333
|
+
export type $200 = /* Integration with embedded use cases for atomic CRUD operations */ Components.Schemas.IntegrationWithUseCases;
|
|
1334
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1335
|
+
export interface $404 {
|
|
1336
|
+
}
|
|
1337
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1217
1340
|
namespace GetUseCase {
|
|
1218
1341
|
namespace Parameters {
|
|
1219
1342
|
export type IntegrationId = string; // uuid
|
|
@@ -1240,6 +1363,15 @@ declare namespace Paths {
|
|
|
1240
1363
|
export type $500 = Components.Responses.InternalServerError;
|
|
1241
1364
|
}
|
|
1242
1365
|
}
|
|
1366
|
+
namespace ListIntegrationsV2 {
|
|
1367
|
+
namespace Responses {
|
|
1368
|
+
export interface $200 {
|
|
1369
|
+
integrations: /* Integration with embedded use cases for atomic CRUD operations */ Components.Schemas.IntegrationWithUseCases[];
|
|
1370
|
+
}
|
|
1371
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1372
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1243
1375
|
namespace ListUseCaseHistory {
|
|
1244
1376
|
namespace Parameters {
|
|
1245
1377
|
export type Cursor = string;
|
|
@@ -1451,6 +1583,26 @@ declare namespace Paths {
|
|
|
1451
1583
|
export type $500 = Components.Responses.InternalServerError;
|
|
1452
1584
|
}
|
|
1453
1585
|
}
|
|
1586
|
+
namespace UpsertIntegrationV2 {
|
|
1587
|
+
namespace Parameters {
|
|
1588
|
+
export type IntegrationId = string; // uuid
|
|
1589
|
+
}
|
|
1590
|
+
export interface PathParameters {
|
|
1591
|
+
integrationId: Parameters.IntegrationId /* uuid */;
|
|
1592
|
+
}
|
|
1593
|
+
export type RequestBody = /**
|
|
1594
|
+
* Request to create or update an integration with embedded use cases (upsert).
|
|
1595
|
+
* This is a declarative operation - the request represents the desired state.
|
|
1596
|
+
*
|
|
1597
|
+
*/
|
|
1598
|
+
Components.Schemas.UpsertIntegrationWithUseCasesRequest;
|
|
1599
|
+
namespace Responses {
|
|
1600
|
+
export type $200 = /* Integration with embedded use cases for atomic CRUD operations */ Components.Schemas.IntegrationWithUseCases;
|
|
1601
|
+
export type $400 = Components.Responses.BadRequest;
|
|
1602
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1603
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1454
1606
|
}
|
|
1455
1607
|
|
|
1456
1608
|
|
|
@@ -1661,6 +1813,53 @@ export interface OperationMethods {
|
|
|
1661
1813
|
data?: any,
|
|
1662
1814
|
config?: AxiosRequestConfig
|
|
1663
1815
|
): OperationResponse<Paths.ListUseCaseHistory.Responses.$200>
|
|
1816
|
+
/**
|
|
1817
|
+
* listIntegrationsV2 - listIntegrationsV2
|
|
1818
|
+
*
|
|
1819
|
+
* Retrieve all integrations with embedded use cases for the authenticated organization
|
|
1820
|
+
*/
|
|
1821
|
+
'listIntegrationsV2'(
|
|
1822
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1823
|
+
data?: any,
|
|
1824
|
+
config?: AxiosRequestConfig
|
|
1825
|
+
): OperationResponse<Paths.ListIntegrationsV2.Responses.$200>
|
|
1826
|
+
/**
|
|
1827
|
+
* getIntegrationV2 - getIntegrationV2
|
|
1828
|
+
*
|
|
1829
|
+
* Retrieve a specific integration with all its embedded use cases
|
|
1830
|
+
*/
|
|
1831
|
+
'getIntegrationV2'(
|
|
1832
|
+
parameters?: Parameters<Paths.GetIntegrationV2.PathParameters> | null,
|
|
1833
|
+
data?: any,
|
|
1834
|
+
config?: AxiosRequestConfig
|
|
1835
|
+
): OperationResponse<Paths.GetIntegrationV2.Responses.$200>
|
|
1836
|
+
/**
|
|
1837
|
+
* upsertIntegrationV2 - upsertIntegrationV2
|
|
1838
|
+
*
|
|
1839
|
+
* Create or update an integration with embedded use cases (upsert).
|
|
1840
|
+
* If the integration does not exist, it will be created with the specified ID.
|
|
1841
|
+
* If it exists, it will be updated declaratively:
|
|
1842
|
+
* - Use cases in the request with matching IDs are updated
|
|
1843
|
+
* - Use cases in the request without matching IDs are created
|
|
1844
|
+
* - Existing use cases not in the request are deleted
|
|
1845
|
+
* This is ideal for Infrastructure-as-Code tools like Terraform.
|
|
1846
|
+
*
|
|
1847
|
+
*/
|
|
1848
|
+
'upsertIntegrationV2'(
|
|
1849
|
+
parameters?: Parameters<Paths.UpsertIntegrationV2.PathParameters> | null,
|
|
1850
|
+
data?: Paths.UpsertIntegrationV2.RequestBody,
|
|
1851
|
+
config?: AxiosRequestConfig
|
|
1852
|
+
): OperationResponse<Paths.UpsertIntegrationV2.Responses.$200>
|
|
1853
|
+
/**
|
|
1854
|
+
* deleteIntegrationV2 - deleteIntegrationV2
|
|
1855
|
+
*
|
|
1856
|
+
* Delete an integration and all its use cases
|
|
1857
|
+
*/
|
|
1858
|
+
'deleteIntegrationV2'(
|
|
1859
|
+
parameters?: Parameters<Paths.DeleteIntegrationV2.PathParameters> | null,
|
|
1860
|
+
data?: any,
|
|
1861
|
+
config?: AxiosRequestConfig
|
|
1862
|
+
): OperationResponse<Paths.DeleteIntegrationV2.Responses.$200>
|
|
1664
1863
|
/**
|
|
1665
1864
|
* setIntegrationAppMapping - setIntegrationAppMapping
|
|
1666
1865
|
*
|
|
@@ -1920,6 +2119,57 @@ export interface PathsDictionary {
|
|
|
1920
2119
|
config?: AxiosRequestConfig
|
|
1921
2120
|
): OperationResponse<Paths.ListUseCaseHistory.Responses.$200>
|
|
1922
2121
|
}
|
|
2122
|
+
['/v2/integrations']: {
|
|
2123
|
+
/**
|
|
2124
|
+
* listIntegrationsV2 - listIntegrationsV2
|
|
2125
|
+
*
|
|
2126
|
+
* Retrieve all integrations with embedded use cases for the authenticated organization
|
|
2127
|
+
*/
|
|
2128
|
+
'get'(
|
|
2129
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2130
|
+
data?: any,
|
|
2131
|
+
config?: AxiosRequestConfig
|
|
2132
|
+
): OperationResponse<Paths.ListIntegrationsV2.Responses.$200>
|
|
2133
|
+
}
|
|
2134
|
+
['/v2/integrations/{integrationId}']: {
|
|
2135
|
+
/**
|
|
2136
|
+
* getIntegrationV2 - getIntegrationV2
|
|
2137
|
+
*
|
|
2138
|
+
* Retrieve a specific integration with all its embedded use cases
|
|
2139
|
+
*/
|
|
2140
|
+
'get'(
|
|
2141
|
+
parameters?: Parameters<Paths.GetIntegrationV2.PathParameters> | null,
|
|
2142
|
+
data?: any,
|
|
2143
|
+
config?: AxiosRequestConfig
|
|
2144
|
+
): OperationResponse<Paths.GetIntegrationV2.Responses.$200>
|
|
2145
|
+
/**
|
|
2146
|
+
* upsertIntegrationV2 - upsertIntegrationV2
|
|
2147
|
+
*
|
|
2148
|
+
* Create or update an integration with embedded use cases (upsert).
|
|
2149
|
+
* If the integration does not exist, it will be created with the specified ID.
|
|
2150
|
+
* If it exists, it will be updated declaratively:
|
|
2151
|
+
* - Use cases in the request with matching IDs are updated
|
|
2152
|
+
* - Use cases in the request without matching IDs are created
|
|
2153
|
+
* - Existing use cases not in the request are deleted
|
|
2154
|
+
* This is ideal for Infrastructure-as-Code tools like Terraform.
|
|
2155
|
+
*
|
|
2156
|
+
*/
|
|
2157
|
+
'put'(
|
|
2158
|
+
parameters?: Parameters<Paths.UpsertIntegrationV2.PathParameters> | null,
|
|
2159
|
+
data?: Paths.UpsertIntegrationV2.RequestBody,
|
|
2160
|
+
config?: AxiosRequestConfig
|
|
2161
|
+
): OperationResponse<Paths.UpsertIntegrationV2.Responses.$200>
|
|
2162
|
+
/**
|
|
2163
|
+
* deleteIntegrationV2 - deleteIntegrationV2
|
|
2164
|
+
*
|
|
2165
|
+
* Delete an integration and all its use cases
|
|
2166
|
+
*/
|
|
2167
|
+
'delete'(
|
|
2168
|
+
parameters?: Parameters<Paths.DeleteIntegrationV2.PathParameters> | null,
|
|
2169
|
+
data?: any,
|
|
2170
|
+
config?: AxiosRequestConfig
|
|
2171
|
+
): OperationResponse<Paths.DeleteIntegrationV2.Responses.$200>
|
|
2172
|
+
}
|
|
1923
2173
|
['/v1/integrations/{integrationId}/app-mapping']: {
|
|
1924
2174
|
/**
|
|
1925
2175
|
* setIntegrationAppMapping - setIntegrationAppMapping
|
|
@@ -1957,11 +2207,14 @@ export type CreateOutboundUseCaseRequest = Components.Schemas.CreateOutboundUseC
|
|
|
1957
2207
|
export type CreateUseCaseRequest = Components.Schemas.CreateUseCaseRequest;
|
|
1958
2208
|
export type CreateUseCaseRequestBase = Components.Schemas.CreateUseCaseRequestBase;
|
|
1959
2209
|
export type DeleteIntegrationAppMappingRequest = Components.Schemas.DeleteIntegrationAppMappingRequest;
|
|
2210
|
+
export type EmbeddedInboundUseCaseRequest = Components.Schemas.EmbeddedInboundUseCaseRequest;
|
|
2211
|
+
export type EmbeddedOutboundUseCaseRequest = Components.Schemas.EmbeddedOutboundUseCaseRequest;
|
|
2212
|
+
export type EmbeddedUseCaseRequest = Components.Schemas.EmbeddedUseCaseRequest;
|
|
2213
|
+
export type EmbeddedUseCaseRequestBase = Components.Schemas.EmbeddedUseCaseRequestBase;
|
|
1960
2214
|
export type EntityUpdate = Components.Schemas.EntityUpdate;
|
|
1961
2215
|
export type ErpEvent = Components.Schemas.ErpEvent;
|
|
1962
2216
|
export type ErpUpdatesEventsV2Request = Components.Schemas.ErpUpdatesEventsV2Request;
|
|
1963
2217
|
export type ErrorResponseBase = Components.Schemas.ErrorResponseBase;
|
|
1964
|
-
export type ExtendedUniqueIdField = Components.Schemas.ExtendedUniqueIdField;
|
|
1965
2218
|
export type InboundIntegrationEventConfiguration = Components.Schemas.InboundIntegrationEventConfiguration;
|
|
1966
2219
|
export type InboundUseCase = Components.Schemas.InboundUseCase;
|
|
1967
2220
|
export type InboundUseCaseHistoryEntry = Components.Schemas.InboundUseCaseHistoryEntry;
|
|
@@ -1974,6 +2227,7 @@ export type IntegrationEntityField = Components.Schemas.IntegrationEntityField;
|
|
|
1974
2227
|
export type IntegrationFieldV1 = Components.Schemas.IntegrationFieldV1;
|
|
1975
2228
|
export type IntegrationMeterReading = Components.Schemas.IntegrationMeterReading;
|
|
1976
2229
|
export type IntegrationObjectV1 = Components.Schemas.IntegrationObjectV1;
|
|
2230
|
+
export type IntegrationWithUseCases = Components.Schemas.IntegrationWithUseCases;
|
|
1977
2231
|
export type MappingSimulationRequest = Components.Schemas.MappingSimulationRequest;
|
|
1978
2232
|
export type MappingSimulationResponse = Components.Schemas.MappingSimulationResponse;
|
|
1979
2233
|
export type MappingSimulationV2Request = Components.Schemas.MappingSimulationV2Request;
|
|
@@ -1994,13 +2248,12 @@ export type ReplayEventsRequest = Components.Schemas.ReplayEventsRequest;
|
|
|
1994
2248
|
export type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationAppMappingRequest;
|
|
1995
2249
|
export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
|
|
1996
2250
|
export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
|
|
1997
|
-
export type UniqueIdField = Components.Schemas.UniqueIdField;
|
|
1998
|
-
export type UniqueIdMetadata = Components.Schemas.UniqueIdMetadata;
|
|
1999
2251
|
export type UpdateInboundUseCaseRequest = Components.Schemas.UpdateInboundUseCaseRequest;
|
|
2000
2252
|
export type UpdateIntegrationRequest = Components.Schemas.UpdateIntegrationRequest;
|
|
2001
2253
|
export type UpdateOutboundUseCaseRequest = Components.Schemas.UpdateOutboundUseCaseRequest;
|
|
2002
2254
|
export type UpdateUseCaseRequest = Components.Schemas.UpdateUseCaseRequest;
|
|
2003
2255
|
export type UpdateUseCaseRequestBase = Components.Schemas.UpdateUseCaseRequestBase;
|
|
2256
|
+
export type UpsertIntegrationWithUseCasesRequest = Components.Schemas.UpsertIntegrationWithUseCasesRequest;
|
|
2004
2257
|
export type UseCase = Components.Schemas.UseCase;
|
|
2005
2258
|
export type UseCaseHistoryEntry = Components.Schemas.UseCaseHistoryEntry;
|
|
2006
2259
|
export type UseCaseHistoryEntryBase = Components.Schemas.UseCaseHistoryEntryBase;
|
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "ERP Integration API",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.18.0",
|
|
6
6
|
"description": "API for integrating with ERP systems, handling tracking acknowledgments, triggering ERP processes, and processing ERP updates."
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -20,9 +20,6 @@
|
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"servers": [
|
|
23
|
-
{
|
|
24
|
-
"url": "https://erp-integration-api.sls.epilot.io"
|
|
25
|
-
},
|
|
26
23
|
{
|
|
27
24
|
"url": "https://erp-integration-api.sls.epilot.io"
|
|
28
25
|
}
|
|
@@ -1560,6 +1557,185 @@
|
|
|
1560
1557
|
}
|
|
1561
1558
|
}
|
|
1562
1559
|
},
|
|
1560
|
+
"/v2/integrations": {
|
|
1561
|
+
"get": {
|
|
1562
|
+
"operationId": "listIntegrationsV2",
|
|
1563
|
+
"summary": "listIntegrationsV2",
|
|
1564
|
+
"description": "Retrieve all integrations with embedded use cases for the authenticated organization",
|
|
1565
|
+
"tags": [
|
|
1566
|
+
"integrations"
|
|
1567
|
+
],
|
|
1568
|
+
"responses": {
|
|
1569
|
+
"200": {
|
|
1570
|
+
"description": "Successfully retrieved integrations with use cases",
|
|
1571
|
+
"content": {
|
|
1572
|
+
"application/json": {
|
|
1573
|
+
"schema": {
|
|
1574
|
+
"type": "object",
|
|
1575
|
+
"required": [
|
|
1576
|
+
"integrations"
|
|
1577
|
+
],
|
|
1578
|
+
"properties": {
|
|
1579
|
+
"integrations": {
|
|
1580
|
+
"type": "array",
|
|
1581
|
+
"items": {
|
|
1582
|
+
"$ref": "#/components/schemas/IntegrationWithUseCases"
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1590
|
+
"401": {
|
|
1591
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1592
|
+
},
|
|
1593
|
+
"500": {
|
|
1594
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
"/v2/integrations/{integrationId}": {
|
|
1600
|
+
"get": {
|
|
1601
|
+
"operationId": "getIntegrationV2",
|
|
1602
|
+
"summary": "getIntegrationV2",
|
|
1603
|
+
"description": "Retrieve a specific integration with all its embedded use cases",
|
|
1604
|
+
"tags": [
|
|
1605
|
+
"integrations"
|
|
1606
|
+
],
|
|
1607
|
+
"parameters": [
|
|
1608
|
+
{
|
|
1609
|
+
"name": "integrationId",
|
|
1610
|
+
"in": "path",
|
|
1611
|
+
"required": true,
|
|
1612
|
+
"description": "The integration ID",
|
|
1613
|
+
"schema": {
|
|
1614
|
+
"type": "string",
|
|
1615
|
+
"format": "uuid"
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
],
|
|
1619
|
+
"responses": {
|
|
1620
|
+
"200": {
|
|
1621
|
+
"description": "Successfully retrieved integration with use cases",
|
|
1622
|
+
"content": {
|
|
1623
|
+
"application/json": {
|
|
1624
|
+
"schema": {
|
|
1625
|
+
"$ref": "#/components/schemas/IntegrationWithUseCases"
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
},
|
|
1630
|
+
"401": {
|
|
1631
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1632
|
+
},
|
|
1633
|
+
"404": {
|
|
1634
|
+
"description": "Integration not found"
|
|
1635
|
+
},
|
|
1636
|
+
"500": {
|
|
1637
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
"put": {
|
|
1642
|
+
"operationId": "upsertIntegrationV2",
|
|
1643
|
+
"summary": "upsertIntegrationV2",
|
|
1644
|
+
"description": "Create or update an integration with embedded use cases (upsert).\nIf the integration does not exist, it will be created with the specified ID.\nIf it exists, it will be updated declaratively:\n- Use cases in the request with matching IDs are updated\n- Use cases in the request without matching IDs are created\n- Existing use cases not in the request are deleted\nThis is ideal for Infrastructure-as-Code tools like Terraform.\n",
|
|
1645
|
+
"tags": [
|
|
1646
|
+
"integrations"
|
|
1647
|
+
],
|
|
1648
|
+
"parameters": [
|
|
1649
|
+
{
|
|
1650
|
+
"name": "integrationId",
|
|
1651
|
+
"in": "path",
|
|
1652
|
+
"required": true,
|
|
1653
|
+
"description": "The integration ID (client-provided)",
|
|
1654
|
+
"schema": {
|
|
1655
|
+
"type": "string",
|
|
1656
|
+
"format": "uuid"
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
],
|
|
1660
|
+
"requestBody": {
|
|
1661
|
+
"required": true,
|
|
1662
|
+
"content": {
|
|
1663
|
+
"application/json": {
|
|
1664
|
+
"schema": {
|
|
1665
|
+
"$ref": "#/components/schemas/UpsertIntegrationWithUseCasesRequest"
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
},
|
|
1670
|
+
"responses": {
|
|
1671
|
+
"200": {
|
|
1672
|
+
"description": "Integration created or updated successfully with use cases",
|
|
1673
|
+
"content": {
|
|
1674
|
+
"application/json": {
|
|
1675
|
+
"schema": {
|
|
1676
|
+
"$ref": "#/components/schemas/IntegrationWithUseCases"
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1681
|
+
"400": {
|
|
1682
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1683
|
+
},
|
|
1684
|
+
"401": {
|
|
1685
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1686
|
+
},
|
|
1687
|
+
"500": {
|
|
1688
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
"delete": {
|
|
1693
|
+
"operationId": "deleteIntegrationV2",
|
|
1694
|
+
"summary": "deleteIntegrationV2",
|
|
1695
|
+
"description": "Delete an integration and all its use cases",
|
|
1696
|
+
"tags": [
|
|
1697
|
+
"integrations"
|
|
1698
|
+
],
|
|
1699
|
+
"parameters": [
|
|
1700
|
+
{
|
|
1701
|
+
"name": "integrationId",
|
|
1702
|
+
"in": "path",
|
|
1703
|
+
"required": true,
|
|
1704
|
+
"description": "The integration ID",
|
|
1705
|
+
"schema": {
|
|
1706
|
+
"type": "string",
|
|
1707
|
+
"format": "uuid"
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
],
|
|
1711
|
+
"responses": {
|
|
1712
|
+
"200": {
|
|
1713
|
+
"description": "Integration deleted successfully",
|
|
1714
|
+
"content": {
|
|
1715
|
+
"application/json": {
|
|
1716
|
+
"schema": {
|
|
1717
|
+
"type": "object",
|
|
1718
|
+
"properties": {
|
|
1719
|
+
"message": {
|
|
1720
|
+
"type": "string"
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
},
|
|
1727
|
+
"401": {
|
|
1728
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1729
|
+
},
|
|
1730
|
+
"404": {
|
|
1731
|
+
"description": "Integration not found"
|
|
1732
|
+
},
|
|
1733
|
+
"500": {
|
|
1734
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
},
|
|
1563
1739
|
"/v1/integrations/{integrationId}/app-mapping": {
|
|
1564
1740
|
"put": {
|
|
1565
1741
|
"operationId": "setIntegrationAppMapping",
|
|
@@ -2777,14 +2953,22 @@
|
|
|
2777
2953
|
"IntegrationMeterReading": {
|
|
2778
2954
|
"type": "object",
|
|
2779
2955
|
"required": [
|
|
2780
|
-
"jsonataExpression",
|
|
2781
2956
|
"meter",
|
|
2782
2957
|
"fields"
|
|
2783
2958
|
],
|
|
2784
2959
|
"properties": {
|
|
2785
2960
|
"jsonataExpression": {
|
|
2786
2961
|
"type": "string",
|
|
2787
|
-
"description": "JSONata expression to extract meter reading items from the event data"
|
|
2962
|
+
"description": "Optional JSONata expression to extract meter reading items from the event data.\nIf not provided, the entire payload is used as the reading data.\nUseful when you need to extract an array of readings from a nested structure (e.g., \"$.readings\").\n"
|
|
2963
|
+
},
|
|
2964
|
+
"reading_matching": {
|
|
2965
|
+
"type": "string",
|
|
2966
|
+
"enum": [
|
|
2967
|
+
"external_id",
|
|
2968
|
+
"strict-date"
|
|
2969
|
+
],
|
|
2970
|
+
"default": "external_id",
|
|
2971
|
+
"description": "Strategy for matching incoming readings against existing readings.\n- 'external_id': Match readings by external_id attribute (default behavior)\n- 'strict-date': Match by meter_id + counter_id + direction + date (German timezone).\n Useful when readings originate from ECP and are echoed back by the ERP with truncated timestamps.\n"
|
|
2788
2972
|
},
|
|
2789
2973
|
"meter": {
|
|
2790
2974
|
"$ref": "#/components/schemas/MeterUniqueIdsConfig"
|
|
@@ -2839,8 +3023,7 @@
|
|
|
2839
3023
|
"description": "Constant value to assign (any type)"
|
|
2840
3024
|
},
|
|
2841
3025
|
"_type": {
|
|
2842
|
-
"$ref": "#/components/schemas/RepeatableFieldType"
|
|
2843
|
-
"description": "Type hint for repeatable fields (email, phone).\nWhen this attribute is used as a unique identifier, specifying the _type\nenables correct search path generation (e.g., email.email.keyword).\n"
|
|
3026
|
+
"$ref": "#/components/schemas/RepeatableFieldType"
|
|
2844
3027
|
},
|
|
2845
3028
|
"enabled": {
|
|
2846
3029
|
"oneOf": [
|
|
@@ -3042,54 +3225,178 @@
|
|
|
3042
3225
|
],
|
|
3043
3226
|
"description": "Type hint for repeatable fields that require special search handling.\nThese fields are stored as arrays of objects (e.g., email: [{ email: \"value\" }]).\n"
|
|
3044
3227
|
},
|
|
3045
|
-
"
|
|
3228
|
+
"IntegrationWithUseCases": {
|
|
3046
3229
|
"type": "object",
|
|
3047
|
-
"description": "
|
|
3230
|
+
"description": "Integration with embedded use cases for atomic CRUD operations",
|
|
3048
3231
|
"required": [
|
|
3049
|
-
"
|
|
3232
|
+
"id",
|
|
3233
|
+
"orgId",
|
|
3234
|
+
"name",
|
|
3235
|
+
"use_cases",
|
|
3236
|
+
"created_at",
|
|
3237
|
+
"updated_at"
|
|
3050
3238
|
],
|
|
3051
3239
|
"properties": {
|
|
3052
|
-
"
|
|
3240
|
+
"id": {
|
|
3053
3241
|
"type": "string",
|
|
3054
|
-
"
|
|
3242
|
+
"format": "uuid",
|
|
3243
|
+
"description": "Unique identifier for the integration"
|
|
3055
3244
|
},
|
|
3056
|
-
"
|
|
3057
|
-
"
|
|
3245
|
+
"orgId": {
|
|
3246
|
+
"type": "string",
|
|
3247
|
+
"description": "Organization ID"
|
|
3058
3248
|
},
|
|
3059
|
-
"
|
|
3060
|
-
"type": "
|
|
3061
|
-
"
|
|
3062
|
-
|
|
3063
|
-
|
|
3249
|
+
"name": {
|
|
3250
|
+
"type": "string",
|
|
3251
|
+
"description": "Integration name"
|
|
3252
|
+
},
|
|
3253
|
+
"description": {
|
|
3254
|
+
"type": "string",
|
|
3255
|
+
"description": "Optional description of the integration"
|
|
3256
|
+
},
|
|
3257
|
+
"use_cases": {
|
|
3258
|
+
"type": "array",
|
|
3259
|
+
"description": "All use cases belonging to this integration",
|
|
3260
|
+
"items": {
|
|
3261
|
+
"$ref": "#/components/schemas/UseCase"
|
|
3262
|
+
}
|
|
3263
|
+
},
|
|
3264
|
+
"created_at": {
|
|
3265
|
+
"type": "string",
|
|
3266
|
+
"format": "date-time",
|
|
3267
|
+
"description": "ISO-8601 timestamp when the integration was created"
|
|
3268
|
+
},
|
|
3269
|
+
"updated_at": {
|
|
3270
|
+
"type": "string",
|
|
3271
|
+
"format": "date-time",
|
|
3272
|
+
"description": "ISO-8601 timestamp when the integration was last updated"
|
|
3273
|
+
}
|
|
3274
|
+
}
|
|
3275
|
+
},
|
|
3276
|
+
"UpsertIntegrationWithUseCasesRequest": {
|
|
3277
|
+
"type": "object",
|
|
3278
|
+
"description": "Request to create or update an integration with embedded use cases (upsert).\nThis is a declarative operation - the request represents the desired state.\n",
|
|
3279
|
+
"required": [
|
|
3280
|
+
"name"
|
|
3281
|
+
],
|
|
3282
|
+
"properties": {
|
|
3283
|
+
"name": {
|
|
3284
|
+
"type": "string",
|
|
3285
|
+
"minLength": 1,
|
|
3286
|
+
"maxLength": 255,
|
|
3287
|
+
"description": "Integration name"
|
|
3288
|
+
},
|
|
3289
|
+
"description": {
|
|
3290
|
+
"type": "string",
|
|
3291
|
+
"maxLength": 1000,
|
|
3292
|
+
"description": "Optional description of the integration"
|
|
3293
|
+
},
|
|
3294
|
+
"use_cases": {
|
|
3295
|
+
"type": "array",
|
|
3296
|
+
"description": "Full list of use cases (declarative). This replaces ALL existing use cases.\n- Use cases with an `id` field matching an existing use case will be updated\n- Use cases without an `id` or with a non-matching `id` will be created\n- Existing use cases not in this list will be deleted\n",
|
|
3297
|
+
"items": {
|
|
3298
|
+
"$ref": "#/components/schemas/EmbeddedUseCaseRequest"
|
|
3299
|
+
}
|
|
3064
3300
|
}
|
|
3065
3301
|
}
|
|
3066
3302
|
},
|
|
3067
|
-
"
|
|
3068
|
-
"description": "Unique identifier field configuration. Can be either:\n- A simple string (attribute name)\n- An extended object with type hints for repeatable fields\n",
|
|
3303
|
+
"EmbeddedUseCaseRequest": {
|
|
3069
3304
|
"oneOf": [
|
|
3070
3305
|
{
|
|
3071
|
-
"
|
|
3072
|
-
"description": "Simple attribute name"
|
|
3306
|
+
"$ref": "#/components/schemas/EmbeddedInboundUseCaseRequest"
|
|
3073
3307
|
},
|
|
3074
3308
|
{
|
|
3075
|
-
"$ref": "#/components/schemas/
|
|
3309
|
+
"$ref": "#/components/schemas/EmbeddedOutboundUseCaseRequest"
|
|
3076
3310
|
}
|
|
3077
|
-
]
|
|
3311
|
+
],
|
|
3312
|
+
"discriminator": {
|
|
3313
|
+
"propertyName": "type",
|
|
3314
|
+
"mapping": {
|
|
3315
|
+
"inbound": "#/components/schemas/EmbeddedInboundUseCaseRequest",
|
|
3316
|
+
"outbound": "#/components/schemas/EmbeddedOutboundUseCaseRequest"
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3078
3319
|
},
|
|
3079
|
-
"
|
|
3320
|
+
"EmbeddedUseCaseRequestBase": {
|
|
3080
3321
|
"type": "object",
|
|
3081
|
-
"
|
|
3322
|
+
"required": [
|
|
3323
|
+
"name",
|
|
3324
|
+
"type",
|
|
3325
|
+
"enabled"
|
|
3326
|
+
],
|
|
3082
3327
|
"properties": {
|
|
3083
|
-
"
|
|
3084
|
-
"
|
|
3328
|
+
"id": {
|
|
3329
|
+
"type": "string",
|
|
3330
|
+
"format": "uuid",
|
|
3331
|
+
"description": "Optional use case ID for update matching.\n- If provided and matches an existing use case, that use case is updated\n- If provided but no match, a new use case with this ID is created\n- If omitted, a new use case with auto-generated ID is created\n"
|
|
3085
3332
|
},
|
|
3086
|
-
"
|
|
3087
|
-
"type": "
|
|
3088
|
-
"
|
|
3089
|
-
"
|
|
3333
|
+
"name": {
|
|
3334
|
+
"type": "string",
|
|
3335
|
+
"minLength": 1,
|
|
3336
|
+
"maxLength": 255,
|
|
3337
|
+
"description": "Use case name"
|
|
3338
|
+
},
|
|
3339
|
+
"enabled": {
|
|
3340
|
+
"type": "boolean",
|
|
3341
|
+
"description": "Whether the use case is enabled"
|
|
3342
|
+
},
|
|
3343
|
+
"change_description": {
|
|
3344
|
+
"type": "string",
|
|
3345
|
+
"maxLength": 2000,
|
|
3346
|
+
"description": "Optional description of this change (like a commit message)"
|
|
3090
3347
|
}
|
|
3091
3348
|
}
|
|
3092
3349
|
},
|
|
3350
|
+
"EmbeddedInboundUseCaseRequest": {
|
|
3351
|
+
"allOf": [
|
|
3352
|
+
{
|
|
3353
|
+
"$ref": "#/components/schemas/EmbeddedUseCaseRequestBase"
|
|
3354
|
+
},
|
|
3355
|
+
{
|
|
3356
|
+
"type": "object",
|
|
3357
|
+
"required": [
|
|
3358
|
+
"type"
|
|
3359
|
+
],
|
|
3360
|
+
"properties": {
|
|
3361
|
+
"type": {
|
|
3362
|
+
"type": "string",
|
|
3363
|
+
"enum": [
|
|
3364
|
+
"inbound"
|
|
3365
|
+
],
|
|
3366
|
+
"description": "Use case type"
|
|
3367
|
+
},
|
|
3368
|
+
"configuration": {
|
|
3369
|
+
"$ref": "#/components/schemas/InboundIntegrationEventConfiguration"
|
|
3370
|
+
}
|
|
3371
|
+
}
|
|
3372
|
+
}
|
|
3373
|
+
]
|
|
3374
|
+
},
|
|
3375
|
+
"EmbeddedOutboundUseCaseRequest": {
|
|
3376
|
+
"allOf": [
|
|
3377
|
+
{
|
|
3378
|
+
"$ref": "#/components/schemas/EmbeddedUseCaseRequestBase"
|
|
3379
|
+
},
|
|
3380
|
+
{
|
|
3381
|
+
"type": "object",
|
|
3382
|
+
"required": [
|
|
3383
|
+
"type"
|
|
3384
|
+
],
|
|
3385
|
+
"properties": {
|
|
3386
|
+
"type": {
|
|
3387
|
+
"type": "string",
|
|
3388
|
+
"enum": [
|
|
3389
|
+
"outbound"
|
|
3390
|
+
],
|
|
3391
|
+
"description": "Use case type"
|
|
3392
|
+
},
|
|
3393
|
+
"configuration": {
|
|
3394
|
+
"$ref": "#/components/schemas/OutboundIntegrationEventConfiguration"
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3397
|
+
}
|
|
3398
|
+
]
|
|
3399
|
+
},
|
|
3093
3400
|
"ReplayEventsRequest": {
|
|
3094
3401
|
"type": "object",
|
|
3095
3402
|
"required": [
|