@epilot/erp-integration-client 0.17.0 → 0.18.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 +11 -0
- package/dist/openapi.d.ts +96 -3
- package/dist/openapi.json +147 -3
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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 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":{}},"post":{"operationId":"createIntegrationV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}":{"get":{"operationId":"getIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegrationV2","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":{}}},"/v1/integrations/{integrationId}/monitoring/inbound-events":{"post":{"operationId":"queryInboundMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStats","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/outbound-status":{"get":{"operationId":"getOutboundStatus","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/monitoring/access-logs":{"post":{"operationId":"queryAccessLogs","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/outbound-events":{"post":{"operationId":"queryOutboundMonitoringEvents","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":{}}},"QueryInboundMonitoringEventsResponse":{"content":{"application/json":{}}},"GetMonitoringStatsResponse":{"content":{"application/json":{}}},"QueryAccessLogsResponse":{"content":{"application/json":{}}},"QueryOutboundMonitoringEventsResponse":{"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 i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(330),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
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 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":{}}},"/v3/erp/updates/events":{"post":{"operationId":"processErpUpdatesEventsV3","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":{}},"post":{"operationId":"createIntegrationV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}":{"get":{"operationId":"getIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegrationV2","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":{}}},"/v1/integrations/{integrationId}/monitoring/inbound-events":{"post":{"operationId":"queryInboundMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStats","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/outbound-status":{"get":{"operationId":"getOutboundStatus","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/monitoring/access-logs":{"post":{"operationId":"queryAccessLogs","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/outbound-events":{"post":{"operationId":"queryOutboundMonitoringEvents","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":{}}},"QueryInboundMonitoringEventsResponse":{"content":{"application/json":{}}},"GetMonitoringStatsResponse":{"content":{"application/json":{}}},"QueryAccessLogsResponse":{"content":{"application/json":{}}},"QueryOutboundMonitoringEventsResponse":{"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 i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(330),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
@@ -55,6 +55,17 @@
|
|
|
55
55
|
"responses": {}
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
"/v3/erp/updates/events": {
|
|
59
|
+
"post": {
|
|
60
|
+
"operationId": "processErpUpdatesEventsV3",
|
|
61
|
+
"requestBody": {
|
|
62
|
+
"content": {
|
|
63
|
+
"application/json": {}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"responses": {}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
58
69
|
"/v2/erp/updates/mapping_simulation": {
|
|
59
70
|
"post": {
|
|
60
71
|
"operationId": "simulateMappingV2",
|
package/dist/openapi.d.ts
CHANGED
|
@@ -381,6 +381,33 @@ declare namespace Components {
|
|
|
381
381
|
*/
|
|
382
382
|
deduplication_id?: string; // ^[a-zA-Z0-9_-]+$
|
|
383
383
|
}
|
|
384
|
+
export interface ErpEventV3 {
|
|
385
|
+
/**
|
|
386
|
+
* Name of the event (e.g., business_partner, contract_account). Corresponds to the "Event Name" from the integration UI. Replaces object_type from V2.
|
|
387
|
+
*/
|
|
388
|
+
event_name: string;
|
|
389
|
+
/**
|
|
390
|
+
* Timestamp when the event occurred
|
|
391
|
+
*/
|
|
392
|
+
timestamp: string; // date-time
|
|
393
|
+
/**
|
|
394
|
+
* Format of the payload data
|
|
395
|
+
*/
|
|
396
|
+
format: "json" | "xml";
|
|
397
|
+
/**
|
|
398
|
+
* The object data payload - can be either a serialized string or a direct JSON object
|
|
399
|
+
*/
|
|
400
|
+
payload: /* The object data payload - can be either a serialized string or a direct JSON object */ string | {
|
|
401
|
+
[name: string]: any;
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.
|
|
405
|
+
*
|
|
406
|
+
* example:
|
|
407
|
+
* evt-2025-05-01-12345-bp
|
|
408
|
+
*/
|
|
409
|
+
deduplication_id?: string; // ^[a-zA-Z0-9_-]+$
|
|
410
|
+
}
|
|
384
411
|
export interface ErpUpdatesEventsV2Request {
|
|
385
412
|
/**
|
|
386
413
|
* UUID that identifies the integration configuration to use
|
|
@@ -395,6 +422,20 @@ declare namespace Components {
|
|
|
395
422
|
*/
|
|
396
423
|
events: ErpEvent[];
|
|
397
424
|
}
|
|
425
|
+
export interface ErpUpdatesEventsV3Request {
|
|
426
|
+
/**
|
|
427
|
+
* UUID that identifies the integration configuration to use
|
|
428
|
+
*/
|
|
429
|
+
integration_id: string; // uuid
|
|
430
|
+
/**
|
|
431
|
+
* Optional ID that identifies the specific request for debugging purposes
|
|
432
|
+
*/
|
|
433
|
+
correlation_id?: string;
|
|
434
|
+
/**
|
|
435
|
+
* List of ERP events to process
|
|
436
|
+
*/
|
|
437
|
+
events: ErpEventV3[];
|
|
438
|
+
}
|
|
398
439
|
export interface ErrorResponseBase {
|
|
399
440
|
/**
|
|
400
441
|
* Computer-readable error code
|
|
@@ -426,7 +467,7 @@ declare namespace Components {
|
|
|
426
467
|
* "status"
|
|
427
468
|
* ]
|
|
428
469
|
*/
|
|
429
|
-
inbound_group_by?: ("use_case_id" | "sync_type" | "status" | "error_category" | "object_type" | "date")[];
|
|
470
|
+
inbound_group_by?: ("use_case_id" | "sync_type" | "status" | "error_category" | "object_type" | "event_name" | "date")[];
|
|
430
471
|
/**
|
|
431
472
|
* Fields to group outbound statistics by
|
|
432
473
|
* example:
|
|
@@ -472,9 +513,13 @@ declare namespace Components {
|
|
|
472
513
|
*/
|
|
473
514
|
use_case_id?: string | null;
|
|
474
515
|
/**
|
|
475
|
-
* Type of event
|
|
516
|
+
* Type of event (optional for V3 events)
|
|
476
517
|
*/
|
|
477
|
-
event_type
|
|
518
|
+
event_type?: "CREATE" | "UPDATE" | "DELETE" | "TRIGGER";
|
|
519
|
+
/**
|
|
520
|
+
* Event name (alias for object_type, used in V3+)
|
|
521
|
+
*/
|
|
522
|
+
event_name?: string;
|
|
478
523
|
/**
|
|
479
524
|
* Type of object being synced (e.g., 'contract', 'meter')
|
|
480
525
|
*/
|
|
@@ -1334,6 +1379,10 @@ declare namespace Components {
|
|
|
1334
1379
|
* Filter by object type
|
|
1335
1380
|
*/
|
|
1336
1381
|
object_type?: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* Filter by event name (alias for object_type)
|
|
1384
|
+
*/
|
|
1385
|
+
event_name?: string;
|
|
1337
1386
|
/**
|
|
1338
1387
|
* Maximum number of results to return
|
|
1339
1388
|
* example:
|
|
@@ -1387,6 +1436,10 @@ declare namespace Components {
|
|
|
1387
1436
|
* Filter by object type (e.g., 'contract', 'meter')
|
|
1388
1437
|
*/
|
|
1389
1438
|
object_type?: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* Filter by event name (alias for object_type)
|
|
1441
|
+
*/
|
|
1442
|
+
event_name?: string;
|
|
1390
1443
|
/**
|
|
1391
1444
|
* Filter by event ID to find a specific event
|
|
1392
1445
|
*/
|
|
@@ -2276,6 +2329,16 @@ declare namespace Paths {
|
|
|
2276
2329
|
export type $500 = Components.Responses.InternalServerError;
|
|
2277
2330
|
}
|
|
2278
2331
|
}
|
|
2332
|
+
namespace ProcessErpUpdatesEventsV3 {
|
|
2333
|
+
export type RequestBody = Components.Schemas.ErpUpdatesEventsV3Request;
|
|
2334
|
+
namespace Responses {
|
|
2335
|
+
export type $200 = Components.Responses.ERPUpdatesResponse;
|
|
2336
|
+
export type $400 = Components.Responses.BadRequest;
|
|
2337
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
2338
|
+
export type $422 = Components.Responses.ERPUpdatesResponse;
|
|
2339
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2279
2342
|
namespace QueryAccessLogs {
|
|
2280
2343
|
namespace Parameters {
|
|
2281
2344
|
export type IntegrationId = string; // uuid
|
|
@@ -2516,6 +2579,19 @@ export interface OperationMethods {
|
|
|
2516
2579
|
data?: Paths.ProcessErpUpdatesEventsV2.RequestBody,
|
|
2517
2580
|
config?: AxiosRequestConfig
|
|
2518
2581
|
): OperationResponse<Paths.ProcessErpUpdatesEventsV2.Responses.$200>
|
|
2582
|
+
/**
|
|
2583
|
+
* processErpUpdatesEventsV3 - processErpUpdatesEventsV3
|
|
2584
|
+
*
|
|
2585
|
+
* Handles updates from ERP systems using integration_id directly.
|
|
2586
|
+
* This is the v3 version that removes the unused event_type field and renames object_type to event_name
|
|
2587
|
+
* to align with the integration UI naming.
|
|
2588
|
+
*
|
|
2589
|
+
*/
|
|
2590
|
+
'processErpUpdatesEventsV3'(
|
|
2591
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2592
|
+
data?: Paths.ProcessErpUpdatesEventsV3.RequestBody,
|
|
2593
|
+
config?: AxiosRequestConfig
|
|
2594
|
+
): OperationResponse<Paths.ProcessErpUpdatesEventsV3.Responses.$200>
|
|
2519
2595
|
/**
|
|
2520
2596
|
* simulateMappingV2 - simulateMappingV2
|
|
2521
2597
|
*
|
|
@@ -2878,6 +2954,21 @@ export interface PathsDictionary {
|
|
|
2878
2954
|
config?: AxiosRequestConfig
|
|
2879
2955
|
): OperationResponse<Paths.ProcessErpUpdatesEventsV2.Responses.$200>
|
|
2880
2956
|
}
|
|
2957
|
+
['/v3/erp/updates/events']: {
|
|
2958
|
+
/**
|
|
2959
|
+
* processErpUpdatesEventsV3 - processErpUpdatesEventsV3
|
|
2960
|
+
*
|
|
2961
|
+
* Handles updates from ERP systems using integration_id directly.
|
|
2962
|
+
* This is the v3 version that removes the unused event_type field and renames object_type to event_name
|
|
2963
|
+
* to align with the integration UI naming.
|
|
2964
|
+
*
|
|
2965
|
+
*/
|
|
2966
|
+
'post'(
|
|
2967
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2968
|
+
data?: Paths.ProcessErpUpdatesEventsV3.RequestBody,
|
|
2969
|
+
config?: AxiosRequestConfig
|
|
2970
|
+
): OperationResponse<Paths.ProcessErpUpdatesEventsV3.Responses.$200>
|
|
2971
|
+
}
|
|
2881
2972
|
['/v2/erp/updates/mapping_simulation']: {
|
|
2882
2973
|
/**
|
|
2883
2974
|
* simulateMappingV2 - simulateMappingV2
|
|
@@ -3239,7 +3330,9 @@ export type EmbeddedUseCaseRequest = Components.Schemas.EmbeddedUseCaseRequest;
|
|
|
3239
3330
|
export type EmbeddedUseCaseRequestBase = Components.Schemas.EmbeddedUseCaseRequestBase;
|
|
3240
3331
|
export type EntityUpdate = Components.Schemas.EntityUpdate;
|
|
3241
3332
|
export type ErpEvent = Components.Schemas.ErpEvent;
|
|
3333
|
+
export type ErpEventV3 = Components.Schemas.ErpEventV3;
|
|
3242
3334
|
export type ErpUpdatesEventsV2Request = Components.Schemas.ErpUpdatesEventsV2Request;
|
|
3335
|
+
export type ErpUpdatesEventsV3Request = Components.Schemas.ErpUpdatesEventsV3Request;
|
|
3243
3336
|
export type ErrorResponseBase = Components.Schemas.ErrorResponseBase;
|
|
3244
3337
|
export type GetMonitoringStatsRequest = Components.Schemas.GetMonitoringStatsRequest;
|
|
3245
3338
|
export type InboundIntegrationEventConfiguration = Components.Schemas.InboundIntegrationEventConfiguration;
|
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.31.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": [
|
|
@@ -281,6 +281,62 @@
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
},
|
|
284
|
+
"/v3/erp/updates/events": {
|
|
285
|
+
"post": {
|
|
286
|
+
"operationId": "processErpUpdatesEventsV3",
|
|
287
|
+
"summary": "processErpUpdatesEventsV3",
|
|
288
|
+
"description": "Handles updates from ERP systems using integration_id directly.\nThis is the v3 version that removes the unused event_type field and renames object_type to event_name\nto align with the integration UI naming.\n",
|
|
289
|
+
"tags": [
|
|
290
|
+
"erp"
|
|
291
|
+
],
|
|
292
|
+
"requestBody": {
|
|
293
|
+
"content": {
|
|
294
|
+
"application/json": {
|
|
295
|
+
"schema": {
|
|
296
|
+
"$ref": "#/components/schemas/ErpUpdatesEventsV3Request"
|
|
297
|
+
},
|
|
298
|
+
"example": {
|
|
299
|
+
"integration_id": "123e4567-e89b-12d3-a456-426614174000",
|
|
300
|
+
"correlation_id": "req-789e4567-e89b-12d3-a456-426614174000",
|
|
301
|
+
"events": [
|
|
302
|
+
{
|
|
303
|
+
"event_name": "business_partner",
|
|
304
|
+
"timestamp": "2025-05-01T08:30:00Z",
|
|
305
|
+
"format": "json",
|
|
306
|
+
"payload": "{\"id\":\"BP10001\",\"name\":\"Acme Corporation\",\"type\":\"organization\",\"tax_id\":\"DE123456789\",\"status\":\"active\"}",
|
|
307
|
+
"deduplication_id": "bp-create-20250501-083000-001"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"event_name": "contract_account",
|
|
311
|
+
"timestamp": "2025-05-01T08:35:00Z",
|
|
312
|
+
"format": "json",
|
|
313
|
+
"payload": "{\"id\":\"CA20001\",\"business_partner_id\":\"BP10001\",\"status\":\"active\",\"payment_method\":\"direct_debit\"}",
|
|
314
|
+
"deduplication_id": "ca-update-20250501-083500-001"
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"responses": {
|
|
322
|
+
"200": {
|
|
323
|
+
"$ref": "#/components/responses/ERPUpdatesResponse"
|
|
324
|
+
},
|
|
325
|
+
"400": {
|
|
326
|
+
"$ref": "#/components/responses/BadRequest"
|
|
327
|
+
},
|
|
328
|
+
"401": {
|
|
329
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
330
|
+
},
|
|
331
|
+
"422": {
|
|
332
|
+
"$ref": "#/components/responses/ERPUpdatesResponse"
|
|
333
|
+
},
|
|
334
|
+
"500": {
|
|
335
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
284
340
|
"/v2/erp/updates/mapping_simulation": {
|
|
285
341
|
"post": {
|
|
286
342
|
"operationId": "simulateMappingV2",
|
|
@@ -2260,6 +2316,82 @@
|
|
|
2260
2316
|
}
|
|
2261
2317
|
}
|
|
2262
2318
|
},
|
|
2319
|
+
"ErpEventV3": {
|
|
2320
|
+
"type": "object",
|
|
2321
|
+
"required": [
|
|
2322
|
+
"event_name",
|
|
2323
|
+
"timestamp",
|
|
2324
|
+
"format",
|
|
2325
|
+
"payload"
|
|
2326
|
+
],
|
|
2327
|
+
"properties": {
|
|
2328
|
+
"event_name": {
|
|
2329
|
+
"type": "string",
|
|
2330
|
+
"description": "Name of the event (e.g., business_partner, contract_account). Corresponds to the \"Event Name\" from the integration UI. Replaces object_type from V2."
|
|
2331
|
+
},
|
|
2332
|
+
"timestamp": {
|
|
2333
|
+
"type": "string",
|
|
2334
|
+
"format": "date-time",
|
|
2335
|
+
"description": "Timestamp when the event occurred"
|
|
2336
|
+
},
|
|
2337
|
+
"format": {
|
|
2338
|
+
"type": "string",
|
|
2339
|
+
"enum": [
|
|
2340
|
+
"json",
|
|
2341
|
+
"xml"
|
|
2342
|
+
],
|
|
2343
|
+
"default": "json",
|
|
2344
|
+
"description": "Format of the payload data"
|
|
2345
|
+
},
|
|
2346
|
+
"payload": {
|
|
2347
|
+
"oneOf": [
|
|
2348
|
+
{
|
|
2349
|
+
"type": "string",
|
|
2350
|
+
"description": "The serialized object data payload (JSON, XML, etc.) as a string"
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"type": "object",
|
|
2354
|
+
"description": "Direct JSON object (will be automatically serialized)",
|
|
2355
|
+
"additionalProperties": true
|
|
2356
|
+
}
|
|
2357
|
+
],
|
|
2358
|
+
"description": "The object data payload - can be either a serialized string or a direct JSON object"
|
|
2359
|
+
},
|
|
2360
|
+
"deduplication_id": {
|
|
2361
|
+
"type": "string",
|
|
2362
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
2363
|
+
"minLength": 1,
|
|
2364
|
+
"maxLength": 255,
|
|
2365
|
+
"description": "Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.\n",
|
|
2366
|
+
"example": "evt-2025-05-01-12345-bp"
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2369
|
+
},
|
|
2370
|
+
"ErpUpdatesEventsV3Request": {
|
|
2371
|
+
"type": "object",
|
|
2372
|
+
"required": [
|
|
2373
|
+
"integration_id",
|
|
2374
|
+
"events"
|
|
2375
|
+
],
|
|
2376
|
+
"properties": {
|
|
2377
|
+
"integration_id": {
|
|
2378
|
+
"type": "string",
|
|
2379
|
+
"format": "uuid",
|
|
2380
|
+
"description": "UUID that identifies the integration configuration to use"
|
|
2381
|
+
},
|
|
2382
|
+
"correlation_id": {
|
|
2383
|
+
"type": "string",
|
|
2384
|
+
"description": "Optional ID that identifies the specific request for debugging purposes"
|
|
2385
|
+
},
|
|
2386
|
+
"events": {
|
|
2387
|
+
"type": "array",
|
|
2388
|
+
"description": "List of ERP events to process",
|
|
2389
|
+
"items": {
|
|
2390
|
+
"$ref": "#/components/schemas/ErpEventV3"
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
},
|
|
2263
2395
|
"TriggerErpActionRequest": {
|
|
2264
2396
|
"type": "object",
|
|
2265
2397
|
"required": [
|
|
@@ -4038,6 +4170,10 @@
|
|
|
4038
4170
|
"type": "string",
|
|
4039
4171
|
"description": "Filter by object type"
|
|
4040
4172
|
},
|
|
4173
|
+
"event_name": {
|
|
4174
|
+
"type": "string",
|
|
4175
|
+
"description": "Filter by event name (alias for object_type)"
|
|
4176
|
+
},
|
|
4041
4177
|
"limit": {
|
|
4042
4178
|
"type": "integer",
|
|
4043
4179
|
"description": "Maximum number of results to return",
|
|
@@ -4119,6 +4255,10 @@
|
|
|
4119
4255
|
"type": "string",
|
|
4120
4256
|
"description": "Filter by object type (e.g., 'contract', 'meter')"
|
|
4121
4257
|
},
|
|
4258
|
+
"event_name": {
|
|
4259
|
+
"type": "string",
|
|
4260
|
+
"description": "Filter by event name (alias for object_type)"
|
|
4261
|
+
},
|
|
4122
4262
|
"event_id": {
|
|
4123
4263
|
"type": "string",
|
|
4124
4264
|
"description": "Filter by event ID to find a specific event"
|
|
@@ -4316,6 +4456,7 @@
|
|
|
4316
4456
|
"status",
|
|
4317
4457
|
"error_category",
|
|
4318
4458
|
"object_type",
|
|
4459
|
+
"event_name",
|
|
4319
4460
|
"date"
|
|
4320
4461
|
]
|
|
4321
4462
|
},
|
|
@@ -4588,7 +4729,6 @@
|
|
|
4588
4729
|
"required": [
|
|
4589
4730
|
"org_id",
|
|
4590
4731
|
"event_id",
|
|
4591
|
-
"event_type",
|
|
4592
4732
|
"object_type",
|
|
4593
4733
|
"sync_type",
|
|
4594
4734
|
"status",
|
|
@@ -4627,7 +4767,11 @@
|
|
|
4627
4767
|
"DELETE",
|
|
4628
4768
|
"TRIGGER"
|
|
4629
4769
|
],
|
|
4630
|
-
"description": "Type of event"
|
|
4770
|
+
"description": "Type of event (optional for V3 events)"
|
|
4771
|
+
},
|
|
4772
|
+
"event_name": {
|
|
4773
|
+
"type": "string",
|
|
4774
|
+
"description": "Event name (alias for object_type, used in V3+)"
|
|
4631
4775
|
},
|
|
4632
4776
|
"object_type": {
|
|
4633
4777
|
"type": "string",
|