@epilot/erp-integration-client 0.13.0 → 0.15.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 +24 -0
- package/dist/openapi.d.ts +218 -59
- package/dist/openapi.json +150 -63
- 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}/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":{}}},"NotFound":{"content":{"application/json":{}}},"Unauthorized":{"content":{"application/json":{}}},"InternalServerError":{"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 s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.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":{}}},"/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":{}}},"/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 s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}(330),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
@@ -155,6 +155,25 @@
|
|
|
155
155
|
"responses": {}
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
|
+
"/v1/integrations/{integrationId}/events/replay": {
|
|
159
|
+
"post": {
|
|
160
|
+
"operationId": "replayEvents",
|
|
161
|
+
"parameters": [
|
|
162
|
+
{
|
|
163
|
+
"name": "integrationId",
|
|
164
|
+
"in": "path",
|
|
165
|
+
"required": true
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"requestBody": {
|
|
169
|
+
"required": true,
|
|
170
|
+
"content": {
|
|
171
|
+
"application/json": {}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"responses": {}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
158
177
|
"/v1/integrations/{integrationId}/use-cases": {
|
|
159
178
|
"get": {
|
|
160
179
|
"operationId": "listUseCases",
|
|
@@ -323,6 +342,11 @@
|
|
|
323
342
|
"application/json": {}
|
|
324
343
|
}
|
|
325
344
|
},
|
|
345
|
+
"ReplayEventsResponse": {
|
|
346
|
+
"content": {
|
|
347
|
+
"application/json": {}
|
|
348
|
+
}
|
|
349
|
+
},
|
|
326
350
|
"ERPUpdatesResponse": {
|
|
327
351
|
"content": {
|
|
328
352
|
"application/json": {}
|
package/dist/openapi.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ declare namespace Components {
|
|
|
39
39
|
* example:
|
|
40
40
|
* 2025-10-31T12:34:56Z
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
event_time?: string; // date-time
|
|
43
43
|
/**
|
|
44
44
|
* example:
|
|
45
45
|
* evt_1234567890abcdef
|
|
@@ -53,6 +53,12 @@ declare namespace Components {
|
|
|
53
53
|
*/
|
|
54
54
|
has_more?: boolean;
|
|
55
55
|
}
|
|
56
|
+
export interface ReplayEventsResponse {
|
|
57
|
+
/**
|
|
58
|
+
* List of event IDs for which replay was requested
|
|
59
|
+
*/
|
|
60
|
+
event_ids?: string[];
|
|
61
|
+
}
|
|
56
62
|
export type TriggerWebhookResponse = Schemas.TriggerWebhookResp;
|
|
57
63
|
export type Unauthorized = Schemas.ErrorResponseBase;
|
|
58
64
|
}
|
|
@@ -205,39 +211,11 @@ declare namespace Components {
|
|
|
205
211
|
meter_readings?: IntegrationMeterReading[];
|
|
206
212
|
}
|
|
207
213
|
export interface InboundUseCase {
|
|
208
|
-
/**
|
|
209
|
-
* Unique identifier for the use case
|
|
210
|
-
*/
|
|
211
|
-
id: string; // uuid
|
|
212
|
-
/**
|
|
213
|
-
* Parent integration ID
|
|
214
|
-
*/
|
|
215
|
-
integrationId: string; // uuid
|
|
216
|
-
/**
|
|
217
|
-
* Use case name
|
|
218
|
-
*/
|
|
219
|
-
name: string;
|
|
220
214
|
/**
|
|
221
215
|
* Use case type
|
|
222
216
|
*/
|
|
223
217
|
type: "inbound";
|
|
224
|
-
/**
|
|
225
|
-
* Whether the use case is enabled
|
|
226
|
-
*/
|
|
227
|
-
enabled: boolean;
|
|
228
218
|
configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration;
|
|
229
|
-
/**
|
|
230
|
-
* Description of the last change made to this use case
|
|
231
|
-
*/
|
|
232
|
-
change_description?: string;
|
|
233
|
-
/**
|
|
234
|
-
* ISO-8601 timestamp when the use case was created
|
|
235
|
-
*/
|
|
236
|
-
created_at: string; // date-time
|
|
237
|
-
/**
|
|
238
|
-
* ISO-8601 timestamp when the use case was last updated
|
|
239
|
-
*/
|
|
240
|
-
updated_at: string; // date-time
|
|
241
219
|
}
|
|
242
220
|
export interface InboundUseCaseHistoryEntry {
|
|
243
221
|
/**
|
|
@@ -348,7 +326,10 @@ declare namespace Components {
|
|
|
348
326
|
*/
|
|
349
327
|
entity_schema: string;
|
|
350
328
|
/**
|
|
351
|
-
* Array of attribute names that uniquely identify this entity
|
|
329
|
+
* Array of attribute names that uniquely identify this entity.
|
|
330
|
+
* The _type hint for repeatable fields (e.g., email, phone) should be specified
|
|
331
|
+
* on the corresponding field definition in the fields array.
|
|
332
|
+
*
|
|
352
333
|
*/
|
|
353
334
|
unique_ids: string[];
|
|
354
335
|
/**
|
|
@@ -381,6 +362,12 @@ declare namespace Components {
|
|
|
381
362
|
* Constant value to assign (any type)
|
|
382
363
|
*/
|
|
383
364
|
constant?: any;
|
|
365
|
+
_type?: /**
|
|
366
|
+
* Type hint for repeatable fields that require special search handling.
|
|
367
|
+
* These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]).
|
|
368
|
+
*
|
|
369
|
+
*/
|
|
370
|
+
RepeatableFieldType;
|
|
384
371
|
/**
|
|
385
372
|
* 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.
|
|
386
373
|
*/
|
|
@@ -417,6 +404,14 @@ declare namespace Components {
|
|
|
417
404
|
* JSONata expression to extract meter reading items from the event data
|
|
418
405
|
*/
|
|
419
406
|
jsonataExpression: string;
|
|
407
|
+
/**
|
|
408
|
+
* Strategy for matching incoming readings against existing readings.
|
|
409
|
+
* - 'external_id': Match readings by external_id attribute (default behavior)
|
|
410
|
+
* - 'strict-date': Match by meter_id + counter_id + direction + date (German timezone).
|
|
411
|
+
* Useful when readings originate from ECP and are echoed back by the ERP with truncated timestamps.
|
|
412
|
+
*
|
|
413
|
+
*/
|
|
414
|
+
reading_matching?: "external_id" | "strict-date";
|
|
420
415
|
meter: MeterUniqueIdsConfig;
|
|
421
416
|
meter_counter?: MeterUniqueIdsConfig;
|
|
422
417
|
/**
|
|
@@ -520,39 +515,11 @@ declare namespace Components {
|
|
|
520
515
|
[name: string]: any;
|
|
521
516
|
}
|
|
522
517
|
export interface OutboundUseCase {
|
|
523
|
-
/**
|
|
524
|
-
* Unique identifier for the use case
|
|
525
|
-
*/
|
|
526
|
-
id: string; // uuid
|
|
527
|
-
/**
|
|
528
|
-
* Parent integration ID
|
|
529
|
-
*/
|
|
530
|
-
integrationId: string; // uuid
|
|
531
|
-
/**
|
|
532
|
-
* Use case name
|
|
533
|
-
*/
|
|
534
|
-
name: string;
|
|
535
518
|
/**
|
|
536
519
|
* Use case type
|
|
537
520
|
*/
|
|
538
521
|
type: "outbound";
|
|
539
|
-
/**
|
|
540
|
-
* Whether the use case is enabled
|
|
541
|
-
*/
|
|
542
|
-
enabled: boolean;
|
|
543
522
|
configuration?: /* Configuration for outbound use cases (epilot to ERP). Structure TBD. */ OutboundIntegrationEventConfiguration;
|
|
544
|
-
/**
|
|
545
|
-
* Description of the last change made to this use case
|
|
546
|
-
*/
|
|
547
|
-
change_description?: string;
|
|
548
|
-
/**
|
|
549
|
-
* ISO-8601 timestamp when the use case was created
|
|
550
|
-
*/
|
|
551
|
-
created_at: string; // date-time
|
|
552
|
-
/**
|
|
553
|
-
* ISO-8601 timestamp when the use case was last updated
|
|
554
|
-
*/
|
|
555
|
-
updated_at: string; // date-time
|
|
556
523
|
}
|
|
557
524
|
export interface OutboundUseCaseHistoryEntry {
|
|
558
525
|
/**
|
|
@@ -746,6 +713,12 @@ declare namespace Components {
|
|
|
746
713
|
* Target attribute name in the related entity
|
|
747
714
|
*/
|
|
748
715
|
attribute: string;
|
|
716
|
+
_type?: /**
|
|
717
|
+
* Type hint for repeatable fields that require special search handling.
|
|
718
|
+
* These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]).
|
|
719
|
+
*
|
|
720
|
+
*/
|
|
721
|
+
RepeatableFieldType;
|
|
749
722
|
/**
|
|
750
723
|
* Source field name from the event data
|
|
751
724
|
*/
|
|
@@ -759,6 +732,119 @@ declare namespace Components {
|
|
|
759
732
|
*/
|
|
760
733
|
constant?: any;
|
|
761
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
* Type hint for repeatable fields that require special search handling.
|
|
737
|
+
* These fields are stored as arrays of objects (e.g., email: [{ email: "value" }]).
|
|
738
|
+
*
|
|
739
|
+
*/
|
|
740
|
+
export type RepeatableFieldType = "email" | "phone";
|
|
741
|
+
export interface ReplayEventsRequest {
|
|
742
|
+
/**
|
|
743
|
+
* List of event IDs to replay. Maximum 100 events per request.
|
|
744
|
+
*/
|
|
745
|
+
event_ids: [
|
|
746
|
+
string,
|
|
747
|
+
string?,
|
|
748
|
+
string?,
|
|
749
|
+
string?,
|
|
750
|
+
string?,
|
|
751
|
+
string?,
|
|
752
|
+
string?,
|
|
753
|
+
string?,
|
|
754
|
+
string?,
|
|
755
|
+
string?,
|
|
756
|
+
string?,
|
|
757
|
+
string?,
|
|
758
|
+
string?,
|
|
759
|
+
string?,
|
|
760
|
+
string?,
|
|
761
|
+
string?,
|
|
762
|
+
string?,
|
|
763
|
+
string?,
|
|
764
|
+
string?,
|
|
765
|
+
string?,
|
|
766
|
+
string?,
|
|
767
|
+
string?,
|
|
768
|
+
string?,
|
|
769
|
+
string?,
|
|
770
|
+
string?,
|
|
771
|
+
string?,
|
|
772
|
+
string?,
|
|
773
|
+
string?,
|
|
774
|
+
string?,
|
|
775
|
+
string?,
|
|
776
|
+
string?,
|
|
777
|
+
string?,
|
|
778
|
+
string?,
|
|
779
|
+
string?,
|
|
780
|
+
string?,
|
|
781
|
+
string?,
|
|
782
|
+
string?,
|
|
783
|
+
string?,
|
|
784
|
+
string?,
|
|
785
|
+
string?,
|
|
786
|
+
string?,
|
|
787
|
+
string?,
|
|
788
|
+
string?,
|
|
789
|
+
string?,
|
|
790
|
+
string?,
|
|
791
|
+
string?,
|
|
792
|
+
string?,
|
|
793
|
+
string?,
|
|
794
|
+
string?,
|
|
795
|
+
string?,
|
|
796
|
+
string?,
|
|
797
|
+
string?,
|
|
798
|
+
string?,
|
|
799
|
+
string?,
|
|
800
|
+
string?,
|
|
801
|
+
string?,
|
|
802
|
+
string?,
|
|
803
|
+
string?,
|
|
804
|
+
string?,
|
|
805
|
+
string?,
|
|
806
|
+
string?,
|
|
807
|
+
string?,
|
|
808
|
+
string?,
|
|
809
|
+
string?,
|
|
810
|
+
string?,
|
|
811
|
+
string?,
|
|
812
|
+
string?,
|
|
813
|
+
string?,
|
|
814
|
+
string?,
|
|
815
|
+
string?,
|
|
816
|
+
string?,
|
|
817
|
+
string?,
|
|
818
|
+
string?,
|
|
819
|
+
string?,
|
|
820
|
+
string?,
|
|
821
|
+
string?,
|
|
822
|
+
string?,
|
|
823
|
+
string?,
|
|
824
|
+
string?,
|
|
825
|
+
string?,
|
|
826
|
+
string?,
|
|
827
|
+
string?,
|
|
828
|
+
string?,
|
|
829
|
+
string?,
|
|
830
|
+
string?,
|
|
831
|
+
string?,
|
|
832
|
+
string?,
|
|
833
|
+
string?,
|
|
834
|
+
string?,
|
|
835
|
+
string?,
|
|
836
|
+
string?,
|
|
837
|
+
string?,
|
|
838
|
+
string?,
|
|
839
|
+
string?,
|
|
840
|
+
string?,
|
|
841
|
+
string?,
|
|
842
|
+
string?,
|
|
843
|
+
string?,
|
|
844
|
+
string?,
|
|
845
|
+
string?
|
|
846
|
+
];
|
|
847
|
+
}
|
|
762
848
|
export interface SetIntegrationAppMappingRequest {
|
|
763
849
|
/**
|
|
764
850
|
* UUID of the integration app instance
|
|
@@ -890,7 +976,40 @@ declare namespace Components {
|
|
|
890
976
|
*/
|
|
891
977
|
change_description?: string;
|
|
892
978
|
}
|
|
893
|
-
export type UseCase =
|
|
979
|
+
export type UseCase = {
|
|
980
|
+
/**
|
|
981
|
+
* Unique identifier for the use case
|
|
982
|
+
*/
|
|
983
|
+
id: string; // uuid
|
|
984
|
+
/**
|
|
985
|
+
* Parent integration ID
|
|
986
|
+
*/
|
|
987
|
+
integrationId: string; // uuid
|
|
988
|
+
/**
|
|
989
|
+
* Use case name
|
|
990
|
+
*/
|
|
991
|
+
name: string;
|
|
992
|
+
/**
|
|
993
|
+
* Use case type
|
|
994
|
+
*/
|
|
995
|
+
type: "inbound" | "outbound";
|
|
996
|
+
/**
|
|
997
|
+
* Whether the use case is enabled
|
|
998
|
+
*/
|
|
999
|
+
enabled: boolean;
|
|
1000
|
+
/**
|
|
1001
|
+
* Description of the last change made to this use case
|
|
1002
|
+
*/
|
|
1003
|
+
change_description?: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* ISO-8601 timestamp when the use case was created
|
|
1006
|
+
*/
|
|
1007
|
+
created_at: string; // date-time
|
|
1008
|
+
/**
|
|
1009
|
+
* ISO-8601 timestamp when the use case was last updated
|
|
1010
|
+
*/
|
|
1011
|
+
updated_at: string; // date-time
|
|
1012
|
+
} & (InboundUseCase | OutboundUseCase);
|
|
894
1013
|
export type UseCaseHistoryEntry = InboundUseCaseHistoryEntry | OutboundUseCaseHistoryEntry;
|
|
895
1014
|
export interface UseCaseHistoryEntryBase {
|
|
896
1015
|
/**
|
|
@@ -1180,6 +1299,22 @@ declare namespace Paths {
|
|
|
1180
1299
|
export type $500 = Components.Responses.InternalServerError;
|
|
1181
1300
|
}
|
|
1182
1301
|
}
|
|
1302
|
+
namespace ReplayEvents {
|
|
1303
|
+
namespace Parameters {
|
|
1304
|
+
export type IntegrationId = string; // uuid
|
|
1305
|
+
}
|
|
1306
|
+
export interface PathParameters {
|
|
1307
|
+
integrationId: Parameters.IntegrationId /* uuid */;
|
|
1308
|
+
}
|
|
1309
|
+
export type RequestBody = Components.Schemas.ReplayEventsRequest;
|
|
1310
|
+
namespace Responses {
|
|
1311
|
+
export type $200 = Components.Responses.ReplayEventsResponse;
|
|
1312
|
+
export type $400 = Components.Responses.BadRequest;
|
|
1313
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1314
|
+
export type $404 = Components.Responses.NotFound;
|
|
1315
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1183
1318
|
namespace SetIntegrationAppMapping {
|
|
1184
1319
|
namespace Parameters {
|
|
1185
1320
|
export type IntegrationId = string; // uuid
|
|
@@ -1408,6 +1543,16 @@ export interface OperationMethods {
|
|
|
1408
1543
|
data?: Paths.QueryEvents.RequestBody,
|
|
1409
1544
|
config?: AxiosRequestConfig
|
|
1410
1545
|
): OperationResponse<Paths.QueryEvents.Responses.$200>
|
|
1546
|
+
/**
|
|
1547
|
+
* replayEvents - replayEvents
|
|
1548
|
+
*
|
|
1549
|
+
* Replay one or more events for a specific integration. Events will be re-processed with their original payloads but with a new correlation ID for traceability.
|
|
1550
|
+
*/
|
|
1551
|
+
'replayEvents'(
|
|
1552
|
+
parameters?: Parameters<Paths.ReplayEvents.PathParameters> | null,
|
|
1553
|
+
data?: Paths.ReplayEvents.RequestBody,
|
|
1554
|
+
config?: AxiosRequestConfig
|
|
1555
|
+
): OperationResponse<Paths.ReplayEvents.Responses.$200>
|
|
1411
1556
|
/**
|
|
1412
1557
|
* listUseCases - listUseCases
|
|
1413
1558
|
*
|
|
@@ -1649,6 +1794,18 @@ export interface PathsDictionary {
|
|
|
1649
1794
|
config?: AxiosRequestConfig
|
|
1650
1795
|
): OperationResponse<Paths.QueryEvents.Responses.$200>
|
|
1651
1796
|
}
|
|
1797
|
+
['/v1/integrations/{integrationId}/events/replay']: {
|
|
1798
|
+
/**
|
|
1799
|
+
* replayEvents - replayEvents
|
|
1800
|
+
*
|
|
1801
|
+
* Replay one or more events for a specific integration. Events will be re-processed with their original payloads but with a new correlation ID for traceability.
|
|
1802
|
+
*/
|
|
1803
|
+
'post'(
|
|
1804
|
+
parameters?: Parameters<Paths.ReplayEvents.PathParameters> | null,
|
|
1805
|
+
data?: Paths.ReplayEvents.RequestBody,
|
|
1806
|
+
config?: AxiosRequestConfig
|
|
1807
|
+
): OperationResponse<Paths.ReplayEvents.Responses.$200>
|
|
1808
|
+
}
|
|
1652
1809
|
['/v1/integrations/{integrationId}/use-cases']: {
|
|
1653
1810
|
/**
|
|
1654
1811
|
* listUseCases - listUseCases
|
|
@@ -1786,6 +1943,8 @@ export type RelationRefItemConfig = Components.Schemas.RelationRefItemConfig;
|
|
|
1786
1943
|
export type RelationRefValueConfig = Components.Schemas.RelationRefValueConfig;
|
|
1787
1944
|
export type RelationRefsConfig = Components.Schemas.RelationRefsConfig;
|
|
1788
1945
|
export type RelationUniqueIdField = Components.Schemas.RelationUniqueIdField;
|
|
1946
|
+
export type RepeatableFieldType = Components.Schemas.RepeatableFieldType;
|
|
1947
|
+
export type ReplayEventsRequest = Components.Schemas.ReplayEventsRequest;
|
|
1789
1948
|
export type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationAppMappingRequest;
|
|
1790
1949
|
export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
|
|
1791
1950
|
export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
|
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.17.2",
|
|
6
6
|
"description": "API for integrating with ERP systems, handling tracking acknowledgments, triggering ERP processes, and processing ERP updates."
|
|
7
7
|
},
|
|
8
8
|
"tags": [
|
|
@@ -1154,6 +1154,55 @@
|
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
1156
|
},
|
|
1157
|
+
"/v1/integrations/{integrationId}/events/replay": {
|
|
1158
|
+
"post": {
|
|
1159
|
+
"operationId": "replayEvents",
|
|
1160
|
+
"summary": "replayEvents",
|
|
1161
|
+
"description": "Replay one or more events for a specific integration. Events will be re-processed with their original payloads but with a new correlation ID for traceability.",
|
|
1162
|
+
"tags": [
|
|
1163
|
+
"integrations"
|
|
1164
|
+
],
|
|
1165
|
+
"parameters": [
|
|
1166
|
+
{
|
|
1167
|
+
"name": "integrationId",
|
|
1168
|
+
"in": "path",
|
|
1169
|
+
"required": true,
|
|
1170
|
+
"description": "The integration ID",
|
|
1171
|
+
"schema": {
|
|
1172
|
+
"type": "string",
|
|
1173
|
+
"format": "uuid"
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
],
|
|
1177
|
+
"requestBody": {
|
|
1178
|
+
"required": true,
|
|
1179
|
+
"content": {
|
|
1180
|
+
"application/json": {
|
|
1181
|
+
"schema": {
|
|
1182
|
+
"$ref": "#/components/schemas/ReplayEventsRequest"
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
},
|
|
1187
|
+
"responses": {
|
|
1188
|
+
"200": {
|
|
1189
|
+
"$ref": "#/components/responses/ReplayEventsResponse"
|
|
1190
|
+
},
|
|
1191
|
+
"400": {
|
|
1192
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1193
|
+
},
|
|
1194
|
+
"401": {
|
|
1195
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1196
|
+
},
|
|
1197
|
+
"404": {
|
|
1198
|
+
"$ref": "#/components/responses/NotFound"
|
|
1199
|
+
},
|
|
1200
|
+
"500": {
|
|
1201
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1157
1206
|
"/v1/integrations/{integrationId}/use-cases": {
|
|
1158
1207
|
"get": {
|
|
1159
1208
|
"operationId": "listUseCases",
|
|
@@ -1968,23 +2017,6 @@
|
|
|
1968
2017
|
}
|
|
1969
2018
|
},
|
|
1970
2019
|
"UseCase": {
|
|
1971
|
-
"oneOf": [
|
|
1972
|
-
{
|
|
1973
|
-
"$ref": "#/components/schemas/InboundUseCase"
|
|
1974
|
-
},
|
|
1975
|
-
{
|
|
1976
|
-
"$ref": "#/components/schemas/OutboundUseCase"
|
|
1977
|
-
}
|
|
1978
|
-
],
|
|
1979
|
-
"discriminator": {
|
|
1980
|
-
"propertyName": "type",
|
|
1981
|
-
"mapping": {
|
|
1982
|
-
"inbound": "#/components/schemas/InboundUseCase",
|
|
1983
|
-
"outbound": "#/components/schemas/OutboundUseCase"
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
},
|
|
1987
|
-
"InboundUseCase": {
|
|
1988
2020
|
"type": "object",
|
|
1989
2021
|
"required": [
|
|
1990
2022
|
"id",
|
|
@@ -2013,7 +2045,8 @@
|
|
|
2013
2045
|
"type": {
|
|
2014
2046
|
"type": "string",
|
|
2015
2047
|
"enum": [
|
|
2016
|
-
"inbound"
|
|
2048
|
+
"inbound",
|
|
2049
|
+
"outbound"
|
|
2017
2050
|
],
|
|
2018
2051
|
"description": "Use case type"
|
|
2019
2052
|
},
|
|
@@ -2021,9 +2054,6 @@
|
|
|
2021
2054
|
"type": "boolean",
|
|
2022
2055
|
"description": "Whether the use case is enabled"
|
|
2023
2056
|
},
|
|
2024
|
-
"configuration": {
|
|
2025
|
-
"$ref": "#/components/schemas/InboundIntegrationEventConfiguration"
|
|
2026
|
-
},
|
|
2027
2057
|
"change_description": {
|
|
2028
2058
|
"type": "string",
|
|
2029
2059
|
"maxLength": 2000,
|
|
@@ -2039,34 +2069,47 @@
|
|
|
2039
2069
|
"format": "date-time",
|
|
2040
2070
|
"description": "ISO-8601 timestamp when the use case was last updated"
|
|
2041
2071
|
}
|
|
2072
|
+
},
|
|
2073
|
+
"anyOf": [
|
|
2074
|
+
{
|
|
2075
|
+
"$ref": "#/components/schemas/InboundUseCase"
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
"$ref": "#/components/schemas/OutboundUseCase"
|
|
2079
|
+
}
|
|
2080
|
+
],
|
|
2081
|
+
"discriminator": {
|
|
2082
|
+
"propertyName": "type",
|
|
2083
|
+
"mapping": {
|
|
2084
|
+
"inbound": "#/components/schemas/InboundUseCase",
|
|
2085
|
+
"outbound": "#/components/schemas/OutboundUseCase"
|
|
2086
|
+
}
|
|
2042
2087
|
}
|
|
2043
2088
|
},
|
|
2044
|
-
"
|
|
2089
|
+
"InboundUseCase": {
|
|
2045
2090
|
"type": "object",
|
|
2046
2091
|
"required": [
|
|
2047
|
-
"
|
|
2048
|
-
"integrationId",
|
|
2049
|
-
"name",
|
|
2050
|
-
"type",
|
|
2051
|
-
"enabled",
|
|
2052
|
-
"created_at",
|
|
2053
|
-
"updated_at"
|
|
2092
|
+
"type"
|
|
2054
2093
|
],
|
|
2055
2094
|
"properties": {
|
|
2056
|
-
"
|
|
2057
|
-
"type": "string",
|
|
2058
|
-
"format": "uuid",
|
|
2059
|
-
"description": "Unique identifier for the use case"
|
|
2060
|
-
},
|
|
2061
|
-
"integrationId": {
|
|
2062
|
-
"type": "string",
|
|
2063
|
-
"format": "uuid",
|
|
2064
|
-
"description": "Parent integration ID"
|
|
2065
|
-
},
|
|
2066
|
-
"name": {
|
|
2095
|
+
"type": {
|
|
2067
2096
|
"type": "string",
|
|
2068
|
-
"
|
|
2097
|
+
"enum": [
|
|
2098
|
+
"inbound"
|
|
2099
|
+
],
|
|
2100
|
+
"description": "Use case type"
|
|
2069
2101
|
},
|
|
2102
|
+
"configuration": {
|
|
2103
|
+
"$ref": "#/components/schemas/InboundIntegrationEventConfiguration"
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
"OutboundUseCase": {
|
|
2108
|
+
"type": "object",
|
|
2109
|
+
"required": [
|
|
2110
|
+
"type"
|
|
2111
|
+
],
|
|
2112
|
+
"properties": {
|
|
2070
2113
|
"type": {
|
|
2071
2114
|
"type": "string",
|
|
2072
2115
|
"enum": [
|
|
@@ -2074,27 +2117,8 @@
|
|
|
2074
2117
|
],
|
|
2075
2118
|
"description": "Use case type"
|
|
2076
2119
|
},
|
|
2077
|
-
"enabled": {
|
|
2078
|
-
"type": "boolean",
|
|
2079
|
-
"description": "Whether the use case is enabled"
|
|
2080
|
-
},
|
|
2081
2120
|
"configuration": {
|
|
2082
2121
|
"$ref": "#/components/schemas/OutboundIntegrationEventConfiguration"
|
|
2083
|
-
},
|
|
2084
|
-
"change_description": {
|
|
2085
|
-
"type": "string",
|
|
2086
|
-
"maxLength": 2000,
|
|
2087
|
-
"description": "Description of the last change made to this use case"
|
|
2088
|
-
},
|
|
2089
|
-
"created_at": {
|
|
2090
|
-
"type": "string",
|
|
2091
|
-
"format": "date-time",
|
|
2092
|
-
"description": "ISO-8601 timestamp when the use case was created"
|
|
2093
|
-
},
|
|
2094
|
-
"updated_at": {
|
|
2095
|
-
"type": "string",
|
|
2096
|
-
"format": "date-time",
|
|
2097
|
-
"description": "ISO-8601 timestamp when the use case was last updated"
|
|
2098
2122
|
}
|
|
2099
2123
|
}
|
|
2100
2124
|
},
|
|
@@ -2724,7 +2748,7 @@
|
|
|
2724
2748
|
"items": {
|
|
2725
2749
|
"type": "string"
|
|
2726
2750
|
},
|
|
2727
|
-
"description": "Array of attribute names that uniquely identify this entity"
|
|
2751
|
+
"description": "Array of attribute names that uniquely identify this entity.\nThe _type hint for repeatable fields (e.g., email, phone) should be specified\non the corresponding field definition in the fields array.\n"
|
|
2728
2752
|
},
|
|
2729
2753
|
"jsonataExpression": {
|
|
2730
2754
|
"type": "string",
|
|
@@ -2762,6 +2786,15 @@
|
|
|
2762
2786
|
"type": "string",
|
|
2763
2787
|
"description": "JSONata expression to extract meter reading items from the event data"
|
|
2764
2788
|
},
|
|
2789
|
+
"reading_matching": {
|
|
2790
|
+
"type": "string",
|
|
2791
|
+
"enum": [
|
|
2792
|
+
"external_id",
|
|
2793
|
+
"strict-date"
|
|
2794
|
+
],
|
|
2795
|
+
"default": "external_id",
|
|
2796
|
+
"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"
|
|
2797
|
+
},
|
|
2765
2798
|
"meter": {
|
|
2766
2799
|
"$ref": "#/components/schemas/MeterUniqueIdsConfig"
|
|
2767
2800
|
},
|
|
@@ -2814,6 +2847,9 @@
|
|
|
2814
2847
|
"constant": {
|
|
2815
2848
|
"description": "Constant value to assign (any type)"
|
|
2816
2849
|
},
|
|
2850
|
+
"_type": {
|
|
2851
|
+
"$ref": "#/components/schemas/RepeatableFieldType"
|
|
2852
|
+
},
|
|
2817
2853
|
"enabled": {
|
|
2818
2854
|
"oneOf": [
|
|
2819
2855
|
{
|
|
@@ -2898,6 +2934,9 @@
|
|
|
2898
2934
|
"type": "string",
|
|
2899
2935
|
"description": "Target attribute name in the related entity"
|
|
2900
2936
|
},
|
|
2937
|
+
"_type": {
|
|
2938
|
+
"$ref": "#/components/schemas/RepeatableFieldType"
|
|
2939
|
+
},
|
|
2901
2940
|
"field": {
|
|
2902
2941
|
"type": "string",
|
|
2903
2942
|
"description": "Source field name from the event data"
|
|
@@ -3003,6 +3042,31 @@
|
|
|
3003
3042
|
}
|
|
3004
3043
|
}
|
|
3005
3044
|
},
|
|
3045
|
+
"RepeatableFieldType": {
|
|
3046
|
+
"type": "string",
|
|
3047
|
+
"enum": [
|
|
3048
|
+
"email",
|
|
3049
|
+
"phone"
|
|
3050
|
+
],
|
|
3051
|
+
"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"
|
|
3052
|
+
},
|
|
3053
|
+
"ReplayEventsRequest": {
|
|
3054
|
+
"type": "object",
|
|
3055
|
+
"required": [
|
|
3056
|
+
"event_ids"
|
|
3057
|
+
],
|
|
3058
|
+
"properties": {
|
|
3059
|
+
"event_ids": {
|
|
3060
|
+
"type": "array",
|
|
3061
|
+
"items": {
|
|
3062
|
+
"type": "string"
|
|
3063
|
+
},
|
|
3064
|
+
"minItems": 1,
|
|
3065
|
+
"maxItems": 100,
|
|
3066
|
+
"description": "List of event IDs to replay. Maximum 100 events per request."
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
},
|
|
3006
3070
|
"QueryEventsRequest": {
|
|
3007
3071
|
"type": "object",
|
|
3008
3072
|
"properties": {
|
|
@@ -3096,6 +3160,29 @@
|
|
|
3096
3160
|
}
|
|
3097
3161
|
}
|
|
3098
3162
|
},
|
|
3163
|
+
"ReplayEventsResponse": {
|
|
3164
|
+
"description": "Events replay initiated",
|
|
3165
|
+
"content": {
|
|
3166
|
+
"application/json": {
|
|
3167
|
+
"schema": {
|
|
3168
|
+
"type": "object",
|
|
3169
|
+
"required": [
|
|
3170
|
+
"replayed",
|
|
3171
|
+
"results"
|
|
3172
|
+
],
|
|
3173
|
+
"properties": {
|
|
3174
|
+
"event_ids": {
|
|
3175
|
+
"type": "array",
|
|
3176
|
+
"items": {
|
|
3177
|
+
"type": "string"
|
|
3178
|
+
},
|
|
3179
|
+
"description": "List of event IDs for which replay was requested"
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
},
|
|
3099
3186
|
"ERPUpdatesResponse": {
|
|
3100
3187
|
"description": "Some events failed to process",
|
|
3101
3188
|
"content": {
|
|
@@ -3165,7 +3252,7 @@
|
|
|
3165
3252
|
"nullable": true,
|
|
3166
3253
|
"description": "Cursor to fetch the next page. Null if no more results.",
|
|
3167
3254
|
"properties": {
|
|
3168
|
-
"
|
|
3255
|
+
"event_time": {
|
|
3169
3256
|
"type": "string",
|
|
3170
3257
|
"format": "date-time",
|
|
3171
3258
|
"example": "2025-10-31T12:34:56Z"
|