@epilot/erp-integration-client 0.8.0 → 0.10.0
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 +12 -0
- package/dist/openapi.d.ts +178 -28
- package/dist/openapi.json +420 -16
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={330:function(e,t,
|
|
1
|
+
(()=>{"use strict";var e={330: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 s=r(n(466));t.default=s.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"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}/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":{}}},"/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":{}}},"Unauthorized":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"ERPUpdatesResponse":{"content":{"application/json":{}}},"TriggerWebhookResponse":{"content":{"application/json":{}}}}}}')}},t={},n=function n(r){var s=t[r];if(void 0!==s)return s.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(330),r=exports;for(var s in n)r[s]=n[s];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
@@ -50,6 +50,18 @@
|
|
|
50
50
|
"responses": {}
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
+
"/v2/erp/updates/mapping_simulation": {
|
|
54
|
+
"post": {
|
|
55
|
+
"operationId": "simulateMappingV2",
|
|
56
|
+
"requestBody": {
|
|
57
|
+
"required": true,
|
|
58
|
+
"content": {
|
|
59
|
+
"application/json": {}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"responses": {}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
53
65
|
"/v1/erp/updates/mapping_simulation": {
|
|
54
66
|
"post": {
|
|
55
67
|
"operationId": "simulateMapping",
|
package/dist/openapi.d.ts
CHANGED
|
@@ -358,6 +358,13 @@ declare namespace Components {
|
|
|
358
358
|
*/
|
|
359
359
|
enabled?: /* Controls whether this field mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. Defaults to true if omitted. */ boolean | string;
|
|
360
360
|
relations?: RelationConfig;
|
|
361
|
+
relation_refs?: /**
|
|
362
|
+
* Configuration for relation references ($relation_ref).
|
|
363
|
+
* Relation references link to a specific item within a repeatable attribute on a related entity.
|
|
364
|
+
* Common use case: referencing a specific address within a contact's address list.
|
|
365
|
+
*
|
|
366
|
+
*/
|
|
367
|
+
RelationRefsConfig;
|
|
361
368
|
}
|
|
362
369
|
export interface IntegrationFieldV1 {
|
|
363
370
|
/**
|
|
@@ -427,6 +434,24 @@ declare namespace Components {
|
|
|
427
434
|
entity_updates: EntityUpdate[];
|
|
428
435
|
meter_readings_updates?: MeterReadingUpdate[];
|
|
429
436
|
}
|
|
437
|
+
/**
|
|
438
|
+
* Request for v2 mapping simulation. Uses the same configuration format stored in integration use case resources,
|
|
439
|
+
* making it easier to test configurations before saving them.
|
|
440
|
+
*
|
|
441
|
+
*/
|
|
442
|
+
export interface MappingSimulationV2Request {
|
|
443
|
+
event_configuration: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration;
|
|
444
|
+
/**
|
|
445
|
+
* Format of the payload data
|
|
446
|
+
*/
|
|
447
|
+
format: "json" | "xml";
|
|
448
|
+
/**
|
|
449
|
+
* The event data payload - can be either a serialized string or a direct JSON object
|
|
450
|
+
*/
|
|
451
|
+
payload: /* The event data payload - can be either a serialized string or a direct JSON object */ string | {
|
|
452
|
+
[name: string]: any;
|
|
453
|
+
};
|
|
454
|
+
}
|
|
430
455
|
export interface MeterReadingUpdate {
|
|
431
456
|
meter: {
|
|
432
457
|
/**
|
|
@@ -548,10 +573,11 @@ declare namespace Components {
|
|
|
548
573
|
/**
|
|
549
574
|
* Relation operation:
|
|
550
575
|
* - '_set': Replace all existing relations with the specified items
|
|
551
|
-
* - '_append': Add new items to existing relations (
|
|
576
|
+
* - '_append': Add new unique items to existing relations (deduplicates by entity_id)
|
|
577
|
+
* - '_append_all': Add all items to existing relations (no deduplication, allows duplicates)
|
|
552
578
|
*
|
|
553
579
|
*/
|
|
554
|
-
operation: "_set" | "_append";
|
|
580
|
+
operation: "_set" | "_append" | "_append_all";
|
|
555
581
|
/**
|
|
556
582
|
* Array of relation item configurations
|
|
557
583
|
*/
|
|
@@ -575,6 +601,77 @@ declare namespace Components {
|
|
|
575
601
|
*/
|
|
576
602
|
unique_ids: RelationUniqueIdField[];
|
|
577
603
|
}
|
|
604
|
+
/**
|
|
605
|
+
* Configuration for a single relation reference item
|
|
606
|
+
*/
|
|
607
|
+
export interface RelationRefItemConfig {
|
|
608
|
+
/**
|
|
609
|
+
* Schema of the related entity (e.g., "contact")
|
|
610
|
+
*/
|
|
611
|
+
entity_schema: string;
|
|
612
|
+
/**
|
|
613
|
+
* Unique identifier mappings for the related entity
|
|
614
|
+
*/
|
|
615
|
+
unique_ids: RelationUniqueIdField[];
|
|
616
|
+
/**
|
|
617
|
+
* Attribute path on the related entity (e.g., "address")
|
|
618
|
+
*/
|
|
619
|
+
path: string;
|
|
620
|
+
value: /* Configuration for the value to set on the related entity's attribute */ RelationRefValueConfig;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Configuration for the value to set on the related entity's attribute
|
|
624
|
+
*/
|
|
625
|
+
export interface RelationRefValueConfig {
|
|
626
|
+
/**
|
|
627
|
+
* Target attribute name on the related entity
|
|
628
|
+
*/
|
|
629
|
+
attribute: string;
|
|
630
|
+
/**
|
|
631
|
+
* Operation for the attribute value:
|
|
632
|
+
* - '_set': Replace the attribute value
|
|
633
|
+
* - '_append': Add new unique items (deduplicates)
|
|
634
|
+
* - '_append_all': Add all items (no deduplication)
|
|
635
|
+
*
|
|
636
|
+
*/
|
|
637
|
+
operation?: "_set" | "_append" | "_append_all";
|
|
638
|
+
/**
|
|
639
|
+
* Source field name from the event data
|
|
640
|
+
*/
|
|
641
|
+
field?: string;
|
|
642
|
+
/**
|
|
643
|
+
* JSONata expression to compute the value
|
|
644
|
+
*/
|
|
645
|
+
jsonataExpression?: string;
|
|
646
|
+
/**
|
|
647
|
+
* Constant value (any type)
|
|
648
|
+
*/
|
|
649
|
+
constant?: any;
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Configuration for relation references ($relation_ref).
|
|
653
|
+
* Relation references link to a specific item within a repeatable attribute on a related entity.
|
|
654
|
+
* Common use case: referencing a specific address within a contact's address list.
|
|
655
|
+
*
|
|
656
|
+
*/
|
|
657
|
+
export interface RelationRefsConfig {
|
|
658
|
+
/**
|
|
659
|
+
* Relation reference operation:
|
|
660
|
+
* - '_set': Replace all existing relation_refs with the specified items
|
|
661
|
+
* - '_append': Add new unique items to existing relation_refs (deduplicates by entity_id + _id)
|
|
662
|
+
* - '_append_all': Add all items to existing relation_refs (no deduplication, allows duplicates)
|
|
663
|
+
*
|
|
664
|
+
*/
|
|
665
|
+
operation: "_set" | "_append" | "_append_all";
|
|
666
|
+
/**
|
|
667
|
+
* Array of relation reference item configurations
|
|
668
|
+
*/
|
|
669
|
+
items?: /* Configuration for a single relation reference item */ RelationRefItemConfig[];
|
|
670
|
+
/**
|
|
671
|
+
* JSONata expression that returns relation_ref items array (alternative to 'items')
|
|
672
|
+
*/
|
|
673
|
+
jsonataExpression?: string;
|
|
674
|
+
}
|
|
578
675
|
export interface RelationUniqueIdField {
|
|
579
676
|
/**
|
|
580
677
|
* Target attribute name in the related entity
|
|
@@ -1026,6 +1123,21 @@ declare namespace Paths {
|
|
|
1026
1123
|
export type $500 = Components.Responses.InternalServerError;
|
|
1027
1124
|
}
|
|
1028
1125
|
}
|
|
1126
|
+
namespace SimulateMappingV2 {
|
|
1127
|
+
export type RequestBody = /**
|
|
1128
|
+
* Request for v2 mapping simulation. Uses the same configuration format stored in integration use case resources,
|
|
1129
|
+
* making it easier to test configurations before saving them.
|
|
1130
|
+
*
|
|
1131
|
+
*/
|
|
1132
|
+
Components.Schemas.MappingSimulationV2Request;
|
|
1133
|
+
namespace Responses {
|
|
1134
|
+
export type $200 = Components.Schemas.MappingSimulationResponse;
|
|
1135
|
+
export type $400 = Components.Responses.BadRequest;
|
|
1136
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1137
|
+
export type $422 = Components.Schemas.ErrorResponseBase;
|
|
1138
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1029
1141
|
namespace TriggerErp {
|
|
1030
1142
|
export type RequestBody = Components.Schemas.TriggerErpActionRequest;
|
|
1031
1143
|
namespace Responses {
|
|
@@ -1121,6 +1233,22 @@ export interface OperationMethods {
|
|
|
1121
1233
|
data?: Paths.ProcessErpUpdatesEventsV2.RequestBody,
|
|
1122
1234
|
config?: AxiosRequestConfig
|
|
1123
1235
|
): OperationResponse<Paths.ProcessErpUpdatesEventsV2.Responses.$200>
|
|
1236
|
+
/**
|
|
1237
|
+
* simulateMappingV2 - simulateMappingV2
|
|
1238
|
+
*
|
|
1239
|
+
* Test v2.0 mapping configuration by transforming a payload using the provided mapping rules without persisting data.
|
|
1240
|
+
*
|
|
1241
|
+
* This endpoint accepts the same configuration format that is stored in the integration use case resource,
|
|
1242
|
+
* making it easier to test configurations before saving them to a use case.
|
|
1243
|
+
*
|
|
1244
|
+
* See documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification.
|
|
1245
|
+
*
|
|
1246
|
+
*/
|
|
1247
|
+
'simulateMappingV2'(
|
|
1248
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1249
|
+
data?: Paths.SimulateMappingV2.RequestBody,
|
|
1250
|
+
config?: AxiosRequestConfig
|
|
1251
|
+
): OperationResponse<Paths.SimulateMappingV2.Responses.$200>
|
|
1124
1252
|
/**
|
|
1125
1253
|
* simulateMapping - simulateMapping
|
|
1126
1254
|
*
|
|
@@ -1136,7 +1264,7 @@ export interface OperationMethods {
|
|
|
1136
1264
|
config?: AxiosRequestConfig
|
|
1137
1265
|
): OperationResponse<Paths.SimulateMapping.Responses.$200>
|
|
1138
1266
|
/**
|
|
1139
|
-
* listIntegrations -
|
|
1267
|
+
* listIntegrations - listIntegrations
|
|
1140
1268
|
*
|
|
1141
1269
|
* Retrieve all integrations for the authenticated organization
|
|
1142
1270
|
*/
|
|
@@ -1146,7 +1274,7 @@ export interface OperationMethods {
|
|
|
1146
1274
|
config?: AxiosRequestConfig
|
|
1147
1275
|
): OperationResponse<Paths.ListIntegrations.Responses.$200>
|
|
1148
1276
|
/**
|
|
1149
|
-
* createIntegration -
|
|
1277
|
+
* createIntegration - createIntegration
|
|
1150
1278
|
*
|
|
1151
1279
|
* Create a new integration configuration
|
|
1152
1280
|
*/
|
|
@@ -1156,7 +1284,7 @@ export interface OperationMethods {
|
|
|
1156
1284
|
config?: AxiosRequestConfig
|
|
1157
1285
|
): OperationResponse<Paths.CreateIntegration.Responses.$201>
|
|
1158
1286
|
/**
|
|
1159
|
-
* getIntegration -
|
|
1287
|
+
* getIntegration - getIntegration
|
|
1160
1288
|
*
|
|
1161
1289
|
* Retrieve a specific integration by its ID
|
|
1162
1290
|
*/
|
|
@@ -1166,7 +1294,7 @@ export interface OperationMethods {
|
|
|
1166
1294
|
config?: AxiosRequestConfig
|
|
1167
1295
|
): OperationResponse<Paths.GetIntegration.Responses.$200>
|
|
1168
1296
|
/**
|
|
1169
|
-
* updateIntegration -
|
|
1297
|
+
* updateIntegration - updateIntegration
|
|
1170
1298
|
*
|
|
1171
1299
|
* Update an existing integration configuration
|
|
1172
1300
|
*/
|
|
@@ -1176,7 +1304,7 @@ export interface OperationMethods {
|
|
|
1176
1304
|
config?: AxiosRequestConfig
|
|
1177
1305
|
): OperationResponse<Paths.UpdateIntegration.Responses.$200>
|
|
1178
1306
|
/**
|
|
1179
|
-
* deleteIntegration -
|
|
1307
|
+
* deleteIntegration - deleteIntegration
|
|
1180
1308
|
*
|
|
1181
1309
|
* Delete an integration and all its use cases
|
|
1182
1310
|
*/
|
|
@@ -1186,7 +1314,7 @@ export interface OperationMethods {
|
|
|
1186
1314
|
config?: AxiosRequestConfig
|
|
1187
1315
|
): OperationResponse<Paths.DeleteIntegration.Responses.$200>
|
|
1188
1316
|
/**
|
|
1189
|
-
* listUseCases -
|
|
1317
|
+
* listUseCases - listUseCases
|
|
1190
1318
|
*
|
|
1191
1319
|
* Retrieve all use cases for a specific integration
|
|
1192
1320
|
*/
|
|
@@ -1196,7 +1324,7 @@ export interface OperationMethods {
|
|
|
1196
1324
|
config?: AxiosRequestConfig
|
|
1197
1325
|
): OperationResponse<Paths.ListUseCases.Responses.$200>
|
|
1198
1326
|
/**
|
|
1199
|
-
* createUseCase -
|
|
1327
|
+
* createUseCase - createUseCase
|
|
1200
1328
|
*
|
|
1201
1329
|
* Create a new use case for an integration
|
|
1202
1330
|
*/
|
|
@@ -1206,7 +1334,7 @@ export interface OperationMethods {
|
|
|
1206
1334
|
config?: AxiosRequestConfig
|
|
1207
1335
|
): OperationResponse<Paths.CreateUseCase.Responses.$201>
|
|
1208
1336
|
/**
|
|
1209
|
-
* getUseCase -
|
|
1337
|
+
* getUseCase - getUseCase
|
|
1210
1338
|
*
|
|
1211
1339
|
* Retrieve a specific use case by its ID
|
|
1212
1340
|
*/
|
|
@@ -1216,7 +1344,7 @@ export interface OperationMethods {
|
|
|
1216
1344
|
config?: AxiosRequestConfig
|
|
1217
1345
|
): OperationResponse<Paths.GetUseCase.Responses.$200>
|
|
1218
1346
|
/**
|
|
1219
|
-
* updateUseCase -
|
|
1347
|
+
* updateUseCase - updateUseCase
|
|
1220
1348
|
*
|
|
1221
1349
|
* Update an existing use case configuration
|
|
1222
1350
|
*/
|
|
@@ -1226,7 +1354,7 @@ export interface OperationMethods {
|
|
|
1226
1354
|
config?: AxiosRequestConfig
|
|
1227
1355
|
): OperationResponse<Paths.UpdateUseCase.Responses.$200>
|
|
1228
1356
|
/**
|
|
1229
|
-
* deleteUseCase -
|
|
1357
|
+
* deleteUseCase - deleteUseCase
|
|
1230
1358
|
*
|
|
1231
1359
|
* Delete a use case from an integration
|
|
1232
1360
|
*/
|
|
@@ -1236,7 +1364,7 @@ export interface OperationMethods {
|
|
|
1236
1364
|
config?: AxiosRequestConfig
|
|
1237
1365
|
): OperationResponse<Paths.DeleteUseCase.Responses.$200>
|
|
1238
1366
|
/**
|
|
1239
|
-
* listUseCaseHistory -
|
|
1367
|
+
* listUseCaseHistory - listUseCaseHistory
|
|
1240
1368
|
*
|
|
1241
1369
|
* Retrieve historical versions of a use case's configuration.
|
|
1242
1370
|
* History entries are returned in reverse chronological order (newest first).
|
|
@@ -1249,7 +1377,7 @@ export interface OperationMethods {
|
|
|
1249
1377
|
config?: AxiosRequestConfig
|
|
1250
1378
|
): OperationResponse<Paths.ListUseCaseHistory.Responses.$200>
|
|
1251
1379
|
/**
|
|
1252
|
-
* setIntegrationAppMapping -
|
|
1380
|
+
* setIntegrationAppMapping - setIntegrationAppMapping
|
|
1253
1381
|
*
|
|
1254
1382
|
* Creates or updates a mapping from an app/component to an integration.
|
|
1255
1383
|
* This allows ERP updates sent via app_id and component_id to be associated
|
|
@@ -1262,7 +1390,7 @@ export interface OperationMethods {
|
|
|
1262
1390
|
config?: AxiosRequestConfig
|
|
1263
1391
|
): OperationResponse<Paths.SetIntegrationAppMapping.Responses.$200>
|
|
1264
1392
|
/**
|
|
1265
|
-
* deleteIntegrationAppMapping -
|
|
1393
|
+
* deleteIntegrationAppMapping - deleteIntegrationAppMapping
|
|
1266
1394
|
*
|
|
1267
1395
|
* Removes a mapping from an app/component to an integration.
|
|
1268
1396
|
*
|
|
@@ -1326,6 +1454,24 @@ export interface PathsDictionary {
|
|
|
1326
1454
|
config?: AxiosRequestConfig
|
|
1327
1455
|
): OperationResponse<Paths.ProcessErpUpdatesEventsV2.Responses.$200>
|
|
1328
1456
|
}
|
|
1457
|
+
['/v2/erp/updates/mapping_simulation']: {
|
|
1458
|
+
/**
|
|
1459
|
+
* simulateMappingV2 - simulateMappingV2
|
|
1460
|
+
*
|
|
1461
|
+
* Test v2.0 mapping configuration by transforming a payload using the provided mapping rules without persisting data.
|
|
1462
|
+
*
|
|
1463
|
+
* This endpoint accepts the same configuration format that is stored in the integration use case resource,
|
|
1464
|
+
* making it easier to test configurations before saving them to a use case.
|
|
1465
|
+
*
|
|
1466
|
+
* See documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification.
|
|
1467
|
+
*
|
|
1468
|
+
*/
|
|
1469
|
+
'post'(
|
|
1470
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1471
|
+
data?: Paths.SimulateMappingV2.RequestBody,
|
|
1472
|
+
config?: AxiosRequestConfig
|
|
1473
|
+
): OperationResponse<Paths.SimulateMappingV2.Responses.$200>
|
|
1474
|
+
}
|
|
1329
1475
|
['/v1/erp/updates/mapping_simulation']: {
|
|
1330
1476
|
/**
|
|
1331
1477
|
* simulateMapping - simulateMapping
|
|
@@ -1344,7 +1490,7 @@ export interface PathsDictionary {
|
|
|
1344
1490
|
}
|
|
1345
1491
|
['/v1/integrations']: {
|
|
1346
1492
|
/**
|
|
1347
|
-
* listIntegrations -
|
|
1493
|
+
* listIntegrations - listIntegrations
|
|
1348
1494
|
*
|
|
1349
1495
|
* Retrieve all integrations for the authenticated organization
|
|
1350
1496
|
*/
|
|
@@ -1354,7 +1500,7 @@ export interface PathsDictionary {
|
|
|
1354
1500
|
config?: AxiosRequestConfig
|
|
1355
1501
|
): OperationResponse<Paths.ListIntegrations.Responses.$200>
|
|
1356
1502
|
/**
|
|
1357
|
-
* createIntegration -
|
|
1503
|
+
* createIntegration - createIntegration
|
|
1358
1504
|
*
|
|
1359
1505
|
* Create a new integration configuration
|
|
1360
1506
|
*/
|
|
@@ -1366,7 +1512,7 @@ export interface PathsDictionary {
|
|
|
1366
1512
|
}
|
|
1367
1513
|
['/v1/integrations/{integrationId}']: {
|
|
1368
1514
|
/**
|
|
1369
|
-
* getIntegration -
|
|
1515
|
+
* getIntegration - getIntegration
|
|
1370
1516
|
*
|
|
1371
1517
|
* Retrieve a specific integration by its ID
|
|
1372
1518
|
*/
|
|
@@ -1376,7 +1522,7 @@ export interface PathsDictionary {
|
|
|
1376
1522
|
config?: AxiosRequestConfig
|
|
1377
1523
|
): OperationResponse<Paths.GetIntegration.Responses.$200>
|
|
1378
1524
|
/**
|
|
1379
|
-
* updateIntegration -
|
|
1525
|
+
* updateIntegration - updateIntegration
|
|
1380
1526
|
*
|
|
1381
1527
|
* Update an existing integration configuration
|
|
1382
1528
|
*/
|
|
@@ -1386,7 +1532,7 @@ export interface PathsDictionary {
|
|
|
1386
1532
|
config?: AxiosRequestConfig
|
|
1387
1533
|
): OperationResponse<Paths.UpdateIntegration.Responses.$200>
|
|
1388
1534
|
/**
|
|
1389
|
-
* deleteIntegration -
|
|
1535
|
+
* deleteIntegration - deleteIntegration
|
|
1390
1536
|
*
|
|
1391
1537
|
* Delete an integration and all its use cases
|
|
1392
1538
|
*/
|
|
@@ -1398,7 +1544,7 @@ export interface PathsDictionary {
|
|
|
1398
1544
|
}
|
|
1399
1545
|
['/v1/integrations/{integrationId}/use-cases']: {
|
|
1400
1546
|
/**
|
|
1401
|
-
* listUseCases -
|
|
1547
|
+
* listUseCases - listUseCases
|
|
1402
1548
|
*
|
|
1403
1549
|
* Retrieve all use cases for a specific integration
|
|
1404
1550
|
*/
|
|
@@ -1408,7 +1554,7 @@ export interface PathsDictionary {
|
|
|
1408
1554
|
config?: AxiosRequestConfig
|
|
1409
1555
|
): OperationResponse<Paths.ListUseCases.Responses.$200>
|
|
1410
1556
|
/**
|
|
1411
|
-
* createUseCase -
|
|
1557
|
+
* createUseCase - createUseCase
|
|
1412
1558
|
*
|
|
1413
1559
|
* Create a new use case for an integration
|
|
1414
1560
|
*/
|
|
@@ -1420,7 +1566,7 @@ export interface PathsDictionary {
|
|
|
1420
1566
|
}
|
|
1421
1567
|
['/v1/integrations/{integrationId}/use-cases/{useCaseId}']: {
|
|
1422
1568
|
/**
|
|
1423
|
-
* getUseCase -
|
|
1569
|
+
* getUseCase - getUseCase
|
|
1424
1570
|
*
|
|
1425
1571
|
* Retrieve a specific use case by its ID
|
|
1426
1572
|
*/
|
|
@@ -1430,7 +1576,7 @@ export interface PathsDictionary {
|
|
|
1430
1576
|
config?: AxiosRequestConfig
|
|
1431
1577
|
): OperationResponse<Paths.GetUseCase.Responses.$200>
|
|
1432
1578
|
/**
|
|
1433
|
-
* updateUseCase -
|
|
1579
|
+
* updateUseCase - updateUseCase
|
|
1434
1580
|
*
|
|
1435
1581
|
* Update an existing use case configuration
|
|
1436
1582
|
*/
|
|
@@ -1440,7 +1586,7 @@ export interface PathsDictionary {
|
|
|
1440
1586
|
config?: AxiosRequestConfig
|
|
1441
1587
|
): OperationResponse<Paths.UpdateUseCase.Responses.$200>
|
|
1442
1588
|
/**
|
|
1443
|
-
* deleteUseCase -
|
|
1589
|
+
* deleteUseCase - deleteUseCase
|
|
1444
1590
|
*
|
|
1445
1591
|
* Delete a use case from an integration
|
|
1446
1592
|
*/
|
|
@@ -1452,7 +1598,7 @@ export interface PathsDictionary {
|
|
|
1452
1598
|
}
|
|
1453
1599
|
['/v1/integrations/{integrationId}/use-cases/{useCaseId}/history']: {
|
|
1454
1600
|
/**
|
|
1455
|
-
* listUseCaseHistory -
|
|
1601
|
+
* listUseCaseHistory - listUseCaseHistory
|
|
1456
1602
|
*
|
|
1457
1603
|
* Retrieve historical versions of a use case's configuration.
|
|
1458
1604
|
* History entries are returned in reverse chronological order (newest first).
|
|
@@ -1467,7 +1613,7 @@ export interface PathsDictionary {
|
|
|
1467
1613
|
}
|
|
1468
1614
|
['/v1/integrations/{integrationId}/app-mapping']: {
|
|
1469
1615
|
/**
|
|
1470
|
-
* setIntegrationAppMapping -
|
|
1616
|
+
* setIntegrationAppMapping - setIntegrationAppMapping
|
|
1471
1617
|
*
|
|
1472
1618
|
* Creates or updates a mapping from an app/component to an integration.
|
|
1473
1619
|
* This allows ERP updates sent via app_id and component_id to be associated
|
|
@@ -1480,7 +1626,7 @@ export interface PathsDictionary {
|
|
|
1480
1626
|
config?: AxiosRequestConfig
|
|
1481
1627
|
): OperationResponse<Paths.SetIntegrationAppMapping.Responses.$200>
|
|
1482
1628
|
/**
|
|
1483
|
-
* deleteIntegrationAppMapping -
|
|
1629
|
+
* deleteIntegrationAppMapping - deleteIntegrationAppMapping
|
|
1484
1630
|
*
|
|
1485
1631
|
* Removes a mapping from an app/component to an integration.
|
|
1486
1632
|
*
|
|
@@ -1520,6 +1666,7 @@ export type IntegrationMeterReading = Components.Schemas.IntegrationMeterReading
|
|
|
1520
1666
|
export type IntegrationObjectV1 = Components.Schemas.IntegrationObjectV1;
|
|
1521
1667
|
export type MappingSimulationRequest = Components.Schemas.MappingSimulationRequest;
|
|
1522
1668
|
export type MappingSimulationResponse = Components.Schemas.MappingSimulationResponse;
|
|
1669
|
+
export type MappingSimulationV2Request = Components.Schemas.MappingSimulationV2Request;
|
|
1523
1670
|
export type MeterReadingUpdate = Components.Schemas.MeterReadingUpdate;
|
|
1524
1671
|
export type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig;
|
|
1525
1672
|
export type OutboundIntegrationEventConfiguration = Components.Schemas.OutboundIntegrationEventConfiguration;
|
|
@@ -1527,6 +1674,9 @@ export type OutboundUseCase = Components.Schemas.OutboundUseCase;
|
|
|
1527
1674
|
export type OutboundUseCaseHistoryEntry = Components.Schemas.OutboundUseCaseHistoryEntry;
|
|
1528
1675
|
export type RelationConfig = Components.Schemas.RelationConfig;
|
|
1529
1676
|
export type RelationItemConfig = Components.Schemas.RelationItemConfig;
|
|
1677
|
+
export type RelationRefItemConfig = Components.Schemas.RelationRefItemConfig;
|
|
1678
|
+
export type RelationRefValueConfig = Components.Schemas.RelationRefValueConfig;
|
|
1679
|
+
export type RelationRefsConfig = Components.Schemas.RelationRefsConfig;
|
|
1530
1680
|
export type RelationUniqueIdField = Components.Schemas.RelationUniqueIdField;
|
|
1531
1681
|
export type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationAppMappingRequest;
|
|
1532
1682
|
export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
|
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.15.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": [
|
|
@@ -272,6 +272,277 @@
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
},
|
|
275
|
+
"/v2/erp/updates/mapping_simulation": {
|
|
276
|
+
"post": {
|
|
277
|
+
"operationId": "simulateMappingV2",
|
|
278
|
+
"summary": "simulateMappingV2",
|
|
279
|
+
"description": "Test v2.0 mapping configuration by transforming a payload using the provided mapping rules without persisting data.\n\nThis endpoint accepts the same configuration format that is stored in the integration use case resource,\nmaking it easier to test configurations before saving them to a use case.\n\nSee documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification.\n",
|
|
280
|
+
"tags": [
|
|
281
|
+
"erp"
|
|
282
|
+
],
|
|
283
|
+
"requestBody": {
|
|
284
|
+
"required": true,
|
|
285
|
+
"content": {
|
|
286
|
+
"application/json": {
|
|
287
|
+
"schema": {
|
|
288
|
+
"$ref": "#/components/schemas/MappingSimulationV2Request"
|
|
289
|
+
},
|
|
290
|
+
"examples": {
|
|
291
|
+
"simple": {
|
|
292
|
+
"summary": "Simple Example",
|
|
293
|
+
"value": {
|
|
294
|
+
"event_configuration": {
|
|
295
|
+
"entities": [
|
|
296
|
+
{
|
|
297
|
+
"entity_schema": "contact",
|
|
298
|
+
"unique_ids": [
|
|
299
|
+
"customer_number"
|
|
300
|
+
],
|
|
301
|
+
"fields": [
|
|
302
|
+
{
|
|
303
|
+
"attribute": "customer_number",
|
|
304
|
+
"field": "customerId"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"attribute": "first_name",
|
|
308
|
+
"field": "firstName"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"attribute": "last_name",
|
|
312
|
+
"field": "lastName"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"attribute": "email",
|
|
316
|
+
"field": "email"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"attribute": "source",
|
|
320
|
+
"constant": "ERP"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
"format": "json",
|
|
327
|
+
"payload": "{\"customerId\":\"12345\",\"firstName\":\"Anna\",\"lastName\":\"Schmidt\",\"email\":\"anna@example.com\"}"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"advanced_with_relations": {
|
|
331
|
+
"summary": "Advanced with Relations",
|
|
332
|
+
"value": {
|
|
333
|
+
"event_configuration": {
|
|
334
|
+
"entities": [
|
|
335
|
+
{
|
|
336
|
+
"entity_schema": "contract",
|
|
337
|
+
"unique_ids": [
|
|
338
|
+
"contract_number"
|
|
339
|
+
],
|
|
340
|
+
"fields": [
|
|
341
|
+
{
|
|
342
|
+
"attribute": "contract_number",
|
|
343
|
+
"field": "number"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"attribute": "display_name",
|
|
347
|
+
"field": "displayName"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"attribute": "billing_account",
|
|
351
|
+
"relations": {
|
|
352
|
+
"operation": "_set",
|
|
353
|
+
"items": [
|
|
354
|
+
{
|
|
355
|
+
"entity_schema": "billing_account",
|
|
356
|
+
"_tags": [
|
|
357
|
+
"PRIMARY"
|
|
358
|
+
],
|
|
359
|
+
"unique_ids": [
|
|
360
|
+
{
|
|
361
|
+
"attribute": "external_id",
|
|
362
|
+
"field": "customerAccountId"
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"entity_schema": "meter",
|
|
373
|
+
"unique_ids": [
|
|
374
|
+
"meter_number"
|
|
375
|
+
],
|
|
376
|
+
"jsonataExpression": "meters.{\"number\": number, \"type\": meterType}",
|
|
377
|
+
"fields": [
|
|
378
|
+
{
|
|
379
|
+
"attribute": "meter_number",
|
|
380
|
+
"field": "number"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"attribute": "meter_type",
|
|
384
|
+
"field": "type"
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
},
|
|
390
|
+
"format": "json",
|
|
391
|
+
"payload": "{\"number\":\"CTR-001\",\"displayName\":\"Premium Contract\",\"customerAccountId\":\"ACC-999\",\"meters\":[{\"number\":\"M-001\",\"meterType\":\"electricity\"},{\"number\":\"M-002\",\"meterType\":\"gas\"}]}"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"with_meter_readings": {
|
|
395
|
+
"summary": "With Meter Readings",
|
|
396
|
+
"value": {
|
|
397
|
+
"event_configuration": {
|
|
398
|
+
"entities": [
|
|
399
|
+
{
|
|
400
|
+
"entity_schema": "contract",
|
|
401
|
+
"unique_ids": [
|
|
402
|
+
"contract_number"
|
|
403
|
+
],
|
|
404
|
+
"fields": [
|
|
405
|
+
{
|
|
406
|
+
"attribute": "contract_number",
|
|
407
|
+
"field": "number"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"attribute": "display_name",
|
|
411
|
+
"field": "name"
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"meter_readings": [
|
|
417
|
+
{
|
|
418
|
+
"jsonataExpression": "$.readings",
|
|
419
|
+
"meter": {
|
|
420
|
+
"unique_ids": [
|
|
421
|
+
{
|
|
422
|
+
"attribute": "external_id",
|
|
423
|
+
"field": "meter_id"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
"fields": [
|
|
428
|
+
{
|
|
429
|
+
"attribute": "external_id",
|
|
430
|
+
"field": "reading_id"
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"attribute": "timestamp",
|
|
434
|
+
"field": "read_at"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"attribute": "source",
|
|
438
|
+
"constant": "ERP"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"attribute": "value",
|
|
442
|
+
"field": "value"
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
]
|
|
447
|
+
},
|
|
448
|
+
"format": "json",
|
|
449
|
+
"payload": "{\"number\":\"CTR-001\",\"name\":\"Main Contract\",\"readings\":[{\"meter_id\":\"M-001\",\"reading_id\":\"R-001\",\"read_at\":\"2025-01-15T10:00:00Z\",\"value\":12345.6}]}"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"conditional_fields": {
|
|
453
|
+
"summary": "Conditional Field Processing",
|
|
454
|
+
"description": "Example showing how to conditionally enable/disable individual field mappings",
|
|
455
|
+
"value": {
|
|
456
|
+
"event_configuration": {
|
|
457
|
+
"entities": [
|
|
458
|
+
{
|
|
459
|
+
"entity_schema": "contact",
|
|
460
|
+
"unique_ids": [
|
|
461
|
+
"customer_number"
|
|
462
|
+
],
|
|
463
|
+
"fields": [
|
|
464
|
+
{
|
|
465
|
+
"attribute": "customer_number",
|
|
466
|
+
"field": "customerId"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"attribute": "email",
|
|
470
|
+
"field": "email",
|
|
471
|
+
"enabled": "$exists(email) and email != ''"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"attribute": "phone",
|
|
475
|
+
"field": "phone",
|
|
476
|
+
"enabled": "$exists(phone) and phone != ''"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"attribute": "vip_status",
|
|
480
|
+
"constant": "VIP",
|
|
481
|
+
"enabled": "vipFlag = true"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"attribute": "billing_account",
|
|
485
|
+
"enabled": "$exists(billingAccountId)",
|
|
486
|
+
"relations": {
|
|
487
|
+
"operation": "_set",
|
|
488
|
+
"items": [
|
|
489
|
+
{
|
|
490
|
+
"entity_schema": "billing_account",
|
|
491
|
+
"unique_ids": [
|
|
492
|
+
{
|
|
493
|
+
"attribute": "external_id",
|
|
494
|
+
"field": "billingAccountId"
|
|
495
|
+
}
|
|
496
|
+
]
|
|
497
|
+
}
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
]
|
|
502
|
+
}
|
|
503
|
+
]
|
|
504
|
+
},
|
|
505
|
+
"format": "json",
|
|
506
|
+
"payload": "{\"customerId\":\"12345\",\"email\":\"user@example.com\",\"phone\":\"\",\"vipFlag\":true,\"billingAccountId\":\"ACC-999\"}"
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"responses": {
|
|
514
|
+
"200": {
|
|
515
|
+
"description": "Successfully simulated mapping",
|
|
516
|
+
"content": {
|
|
517
|
+
"application/json": {
|
|
518
|
+
"schema": {
|
|
519
|
+
"$ref": "#/components/schemas/MappingSimulationResponse"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"400": {
|
|
525
|
+
"$ref": "#/components/responses/BadRequest"
|
|
526
|
+
},
|
|
527
|
+
"401": {
|
|
528
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
529
|
+
},
|
|
530
|
+
"422": {
|
|
531
|
+
"description": "Unprocessable entity - mapping configuration or payload validation failed",
|
|
532
|
+
"content": {
|
|
533
|
+
"application/json": {
|
|
534
|
+
"schema": {
|
|
535
|
+
"$ref": "#/components/schemas/ErrorResponseBase"
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
"500": {
|
|
541
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
},
|
|
275
546
|
"/v1/erp/updates/mapping_simulation": {
|
|
276
547
|
"post": {
|
|
277
548
|
"operationId": "simulateMapping",
|
|
@@ -608,7 +879,7 @@
|
|
|
608
879
|
"/v1/integrations": {
|
|
609
880
|
"get": {
|
|
610
881
|
"operationId": "listIntegrations",
|
|
611
|
-
"summary": "
|
|
882
|
+
"summary": "listIntegrations",
|
|
612
883
|
"description": "Retrieve all integrations for the authenticated organization",
|
|
613
884
|
"tags": [
|
|
614
885
|
"integrations"
|
|
@@ -645,7 +916,7 @@
|
|
|
645
916
|
},
|
|
646
917
|
"post": {
|
|
647
918
|
"operationId": "createIntegration",
|
|
648
|
-
"summary": "
|
|
919
|
+
"summary": "createIntegration",
|
|
649
920
|
"description": "Create a new integration configuration",
|
|
650
921
|
"tags": [
|
|
651
922
|
"integrations"
|
|
@@ -686,7 +957,7 @@
|
|
|
686
957
|
"/v1/integrations/{integrationId}": {
|
|
687
958
|
"get": {
|
|
688
959
|
"operationId": "getIntegration",
|
|
689
|
-
"summary": "
|
|
960
|
+
"summary": "getIntegration",
|
|
690
961
|
"description": "Retrieve a specific integration by its ID",
|
|
691
962
|
"tags": [
|
|
692
963
|
"integrations"
|
|
@@ -727,7 +998,7 @@
|
|
|
727
998
|
},
|
|
728
999
|
"put": {
|
|
729
1000
|
"operationId": "updateIntegration",
|
|
730
|
-
"summary": "
|
|
1001
|
+
"summary": "updateIntegration",
|
|
731
1002
|
"description": "Update an existing integration configuration",
|
|
732
1003
|
"tags": [
|
|
733
1004
|
"integrations"
|
|
@@ -781,7 +1052,7 @@
|
|
|
781
1052
|
},
|
|
782
1053
|
"delete": {
|
|
783
1054
|
"operationId": "deleteIntegration",
|
|
784
|
-
"summary": "
|
|
1055
|
+
"summary": "deleteIntegration",
|
|
785
1056
|
"description": "Delete an integration and all its use cases",
|
|
786
1057
|
"tags": [
|
|
787
1058
|
"integrations"
|
|
@@ -829,7 +1100,7 @@
|
|
|
829
1100
|
"/v1/integrations/{integrationId}/use-cases": {
|
|
830
1101
|
"get": {
|
|
831
1102
|
"operationId": "listUseCases",
|
|
832
|
-
"summary": "
|
|
1103
|
+
"summary": "listUseCases",
|
|
833
1104
|
"description": "Retrieve all use cases for a specific integration",
|
|
834
1105
|
"tags": [
|
|
835
1106
|
"integrations"
|
|
@@ -878,7 +1149,7 @@
|
|
|
878
1149
|
},
|
|
879
1150
|
"post": {
|
|
880
1151
|
"operationId": "createUseCase",
|
|
881
|
-
"summary": "
|
|
1152
|
+
"summary": "createUseCase",
|
|
882
1153
|
"description": "Create a new use case for an integration",
|
|
883
1154
|
"tags": [
|
|
884
1155
|
"integrations"
|
|
@@ -934,7 +1205,7 @@
|
|
|
934
1205
|
"/v1/integrations/{integrationId}/use-cases/{useCaseId}": {
|
|
935
1206
|
"get": {
|
|
936
1207
|
"operationId": "getUseCase",
|
|
937
|
-
"summary": "
|
|
1208
|
+
"summary": "getUseCase",
|
|
938
1209
|
"description": "Retrieve a specific use case by its ID",
|
|
939
1210
|
"tags": [
|
|
940
1211
|
"integrations"
|
|
@@ -985,7 +1256,7 @@
|
|
|
985
1256
|
},
|
|
986
1257
|
"put": {
|
|
987
1258
|
"operationId": "updateUseCase",
|
|
988
|
-
"summary": "
|
|
1259
|
+
"summary": "updateUseCase",
|
|
989
1260
|
"description": "Update an existing use case configuration",
|
|
990
1261
|
"tags": [
|
|
991
1262
|
"integrations"
|
|
@@ -1049,7 +1320,7 @@
|
|
|
1049
1320
|
},
|
|
1050
1321
|
"delete": {
|
|
1051
1322
|
"operationId": "deleteUseCase",
|
|
1052
|
-
"summary": "
|
|
1323
|
+
"summary": "deleteUseCase",
|
|
1053
1324
|
"description": "Delete a use case from an integration",
|
|
1054
1325
|
"tags": [
|
|
1055
1326
|
"integrations"
|
|
@@ -1107,7 +1378,7 @@
|
|
|
1107
1378
|
"/v1/integrations/{integrationId}/use-cases/{useCaseId}/history": {
|
|
1108
1379
|
"get": {
|
|
1109
1380
|
"operationId": "listUseCaseHistory",
|
|
1110
|
-
"summary": "
|
|
1381
|
+
"summary": "listUseCaseHistory",
|
|
1111
1382
|
"description": "Retrieve historical versions of a use case's configuration.\nHistory entries are returned in reverse chronological order (newest first).\nUse the 'cursor' parameter for pagination to fetch additional entries.\n",
|
|
1112
1383
|
"tags": [
|
|
1113
1384
|
"integrations"
|
|
@@ -1186,7 +1457,7 @@
|
|
|
1186
1457
|
"/v1/integrations/{integrationId}/app-mapping": {
|
|
1187
1458
|
"put": {
|
|
1188
1459
|
"operationId": "setIntegrationAppMapping",
|
|
1189
|
-
"summary": "
|
|
1460
|
+
"summary": "setIntegrationAppMapping",
|
|
1190
1461
|
"description": "Creates or updates a mapping from an app/component to an integration.\nThis allows ERP updates sent via app_id and component_id to be associated\nwith a specific integration configuration.\n",
|
|
1191
1462
|
"tags": [
|
|
1192
1463
|
"integrations"
|
|
@@ -1250,7 +1521,7 @@
|
|
|
1250
1521
|
},
|
|
1251
1522
|
"delete": {
|
|
1252
1523
|
"operationId": "deleteIntegrationAppMapping",
|
|
1253
|
-
"summary": "
|
|
1524
|
+
"summary": "deleteIntegrationAppMapping",
|
|
1254
1525
|
"description": "Removes a mapping from an app/component to an integration.\n",
|
|
1255
1526
|
"tags": [
|
|
1256
1527
|
"integrations"
|
|
@@ -2111,6 +2382,43 @@
|
|
|
2111
2382
|
}
|
|
2112
2383
|
}
|
|
2113
2384
|
},
|
|
2385
|
+
"MappingSimulationV2Request": {
|
|
2386
|
+
"type": "object",
|
|
2387
|
+
"description": "Request for v2 mapping simulation. Uses the same configuration format stored in integration use case resources,\nmaking it easier to test configurations before saving them.\n",
|
|
2388
|
+
"required": [
|
|
2389
|
+
"event_configuration",
|
|
2390
|
+
"format",
|
|
2391
|
+
"payload"
|
|
2392
|
+
],
|
|
2393
|
+
"properties": {
|
|
2394
|
+
"event_configuration": {
|
|
2395
|
+
"$ref": "#/components/schemas/InboundIntegrationEventConfiguration"
|
|
2396
|
+
},
|
|
2397
|
+
"format": {
|
|
2398
|
+
"type": "string",
|
|
2399
|
+
"enum": [
|
|
2400
|
+
"json",
|
|
2401
|
+
"xml"
|
|
2402
|
+
],
|
|
2403
|
+
"default": "json",
|
|
2404
|
+
"description": "Format of the payload data"
|
|
2405
|
+
},
|
|
2406
|
+
"payload": {
|
|
2407
|
+
"oneOf": [
|
|
2408
|
+
{
|
|
2409
|
+
"type": "string",
|
|
2410
|
+
"description": "The serialized event data payload (JSON, XML, etc.) as a string"
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
"type": "object",
|
|
2414
|
+
"description": "Direct JSON object (will be automatically serialized)",
|
|
2415
|
+
"additionalProperties": true
|
|
2416
|
+
}
|
|
2417
|
+
],
|
|
2418
|
+
"description": "The event data payload - can be either a serialized string or a direct JSON object"
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
},
|
|
2114
2422
|
"MappingSimulationResponse": {
|
|
2115
2423
|
"type": "object",
|
|
2116
2424
|
"required": [
|
|
@@ -2462,6 +2770,9 @@
|
|
|
2462
2770
|
},
|
|
2463
2771
|
"relations": {
|
|
2464
2772
|
"$ref": "#/components/schemas/RelationConfig"
|
|
2773
|
+
},
|
|
2774
|
+
"relation_refs": {
|
|
2775
|
+
"$ref": "#/components/schemas/RelationRefsConfig"
|
|
2465
2776
|
}
|
|
2466
2777
|
}
|
|
2467
2778
|
},
|
|
@@ -2475,9 +2786,10 @@
|
|
|
2475
2786
|
"type": "string",
|
|
2476
2787
|
"enum": [
|
|
2477
2788
|
"_set",
|
|
2478
|
-
"_append"
|
|
2789
|
+
"_append",
|
|
2790
|
+
"_append_all"
|
|
2479
2791
|
],
|
|
2480
|
-
"description": "Relation operation:\n- '_set': Replace all existing relations with the specified items\n- '_append': Add new items to existing relations (
|
|
2792
|
+
"description": "Relation operation:\n- '_set': Replace all existing relations with the specified items\n- '_append': Add new unique items to existing relations (deduplicates by entity_id)\n- '_append_all': Add all items to existing relations (no deduplication, allows duplicates)\n"
|
|
2481
2793
|
},
|
|
2482
2794
|
"items": {
|
|
2483
2795
|
"type": "array",
|
|
@@ -2541,6 +2853,98 @@
|
|
|
2541
2853
|
"description": "Constant value (any type)"
|
|
2542
2854
|
}
|
|
2543
2855
|
}
|
|
2856
|
+
},
|
|
2857
|
+
"RelationRefsConfig": {
|
|
2858
|
+
"type": "object",
|
|
2859
|
+
"description": "Configuration for relation references ($relation_ref).\nRelation references link to a specific item within a repeatable attribute on a related entity.\nCommon use case: referencing a specific address within a contact's address list.\n",
|
|
2860
|
+
"required": [
|
|
2861
|
+
"operation"
|
|
2862
|
+
],
|
|
2863
|
+
"properties": {
|
|
2864
|
+
"operation": {
|
|
2865
|
+
"type": "string",
|
|
2866
|
+
"enum": [
|
|
2867
|
+
"_set",
|
|
2868
|
+
"_append",
|
|
2869
|
+
"_append_all"
|
|
2870
|
+
],
|
|
2871
|
+
"description": "Relation reference operation:\n- '_set': Replace all existing relation_refs with the specified items\n- '_append': Add new unique items to existing relation_refs (deduplicates by entity_id + _id)\n- '_append_all': Add all items to existing relation_refs (no deduplication, allows duplicates)\n"
|
|
2872
|
+
},
|
|
2873
|
+
"items": {
|
|
2874
|
+
"type": "array",
|
|
2875
|
+
"description": "Array of relation reference item configurations",
|
|
2876
|
+
"items": {
|
|
2877
|
+
"$ref": "#/components/schemas/RelationRefItemConfig"
|
|
2878
|
+
}
|
|
2879
|
+
},
|
|
2880
|
+
"jsonataExpression": {
|
|
2881
|
+
"type": "string",
|
|
2882
|
+
"description": "JSONata expression that returns relation_ref items array (alternative to 'items')"
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
},
|
|
2886
|
+
"RelationRefItemConfig": {
|
|
2887
|
+
"type": "object",
|
|
2888
|
+
"description": "Configuration for a single relation reference item",
|
|
2889
|
+
"required": [
|
|
2890
|
+
"entity_schema",
|
|
2891
|
+
"unique_ids",
|
|
2892
|
+
"path",
|
|
2893
|
+
"value"
|
|
2894
|
+
],
|
|
2895
|
+
"properties": {
|
|
2896
|
+
"entity_schema": {
|
|
2897
|
+
"type": "string",
|
|
2898
|
+
"description": "Schema of the related entity (e.g., \"contact\")"
|
|
2899
|
+
},
|
|
2900
|
+
"unique_ids": {
|
|
2901
|
+
"type": "array",
|
|
2902
|
+
"description": "Unique identifier mappings for the related entity",
|
|
2903
|
+
"items": {
|
|
2904
|
+
"$ref": "#/components/schemas/RelationUniqueIdField"
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
"path": {
|
|
2908
|
+
"type": "string",
|
|
2909
|
+
"description": "Attribute path on the related entity (e.g., \"address\")"
|
|
2910
|
+
},
|
|
2911
|
+
"value": {
|
|
2912
|
+
"$ref": "#/components/schemas/RelationRefValueConfig"
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
},
|
|
2916
|
+
"RelationRefValueConfig": {
|
|
2917
|
+
"type": "object",
|
|
2918
|
+
"description": "Configuration for the value to set on the related entity's attribute",
|
|
2919
|
+
"required": [
|
|
2920
|
+
"attribute"
|
|
2921
|
+
],
|
|
2922
|
+
"properties": {
|
|
2923
|
+
"attribute": {
|
|
2924
|
+
"type": "string",
|
|
2925
|
+
"description": "Target attribute name on the related entity"
|
|
2926
|
+
},
|
|
2927
|
+
"operation": {
|
|
2928
|
+
"type": "string",
|
|
2929
|
+
"enum": [
|
|
2930
|
+
"_set",
|
|
2931
|
+
"_append",
|
|
2932
|
+
"_append_all"
|
|
2933
|
+
],
|
|
2934
|
+
"description": "Operation for the attribute value:\n- '_set': Replace the attribute value\n- '_append': Add new unique items (deduplicates)\n- '_append_all': Add all items (no deduplication)\n"
|
|
2935
|
+
},
|
|
2936
|
+
"field": {
|
|
2937
|
+
"type": "string",
|
|
2938
|
+
"description": "Source field name from the event data"
|
|
2939
|
+
},
|
|
2940
|
+
"jsonataExpression": {
|
|
2941
|
+
"type": "string",
|
|
2942
|
+
"description": "JSONata expression to compute the value"
|
|
2943
|
+
},
|
|
2944
|
+
"constant": {
|
|
2945
|
+
"description": "Constant value (any type)"
|
|
2946
|
+
}
|
|
2947
|
+
}
|
|
2544
2948
|
}
|
|
2545
2949
|
},
|
|
2546
2950
|
"responses": {
|