@epilot/erp-integration-client 0.11.0 → 0.12.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.
@@ -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 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})})();
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})})();
@@ -4,6 +4,11 @@
4
4
  "title": "",
5
5
  "version": ""
6
6
  },
7
+ "servers": [
8
+ {
9
+ "url": "https://erp-integration-api.sls.epilot.io"
10
+ }
11
+ ],
7
12
  "paths": {
8
13
  "/v1/erp/tracking/acknowledgement": {
9
14
  "post": {
@@ -131,6 +136,25 @@
131
136
  "responses": {}
132
137
  }
133
138
  },
139
+ "/v1/integrations/{integrationId}/events": {
140
+ "post": {
141
+ "operationId": "queryEvents",
142
+ "parameters": [
143
+ {
144
+ "name": "integrationId",
145
+ "in": "path",
146
+ "required": true
147
+ }
148
+ ],
149
+ "requestBody": {
150
+ "required": true,
151
+ "content": {
152
+ "application/json": {}
153
+ }
154
+ },
155
+ "responses": {}
156
+ }
157
+ },
134
158
  "/v1/integrations/{integrationId}/use-cases": {
135
159
  "get": {
136
160
  "operationId": "listUseCases",
@@ -284,6 +308,11 @@
284
308
  "application/json": {}
285
309
  }
286
310
  },
311
+ "NotFound": {
312
+ "content": {
313
+ "application/json": {}
314
+ }
315
+ },
287
316
  "Unauthorized": {
288
317
  "content": {
289
318
  "application/json": {}
@@ -303,6 +332,11 @@
303
332
  "content": {
304
333
  "application/json": {}
305
334
  }
335
+ },
336
+ "QueryEventsResponse": {
337
+ "content": {
338
+ "application/json": {}
339
+ }
306
340
  }
307
341
  }
308
342
  }
package/dist/openapi.d.ts CHANGED
@@ -25,6 +25,34 @@ declare namespace Components {
25
25
  }[];
26
26
  }
27
27
  export type InternalServerError = Schemas.ErrorResponseBase;
28
+ export type NotFound = Schemas.ErrorResponseBase;
29
+ export interface QueryEventsResponse {
30
+ /**
31
+ * List of erp events
32
+ */
33
+ data?: Schemas.ErpEvent[];
34
+ /**
35
+ * Cursor to fetch the next page. Null if no more results.
36
+ */
37
+ next_cursor?: {
38
+ /**
39
+ * example:
40
+ * 2025-10-31T12:34:56Z
41
+ */
42
+ created_at?: string; // date-time
43
+ /**
44
+ * example:
45
+ * evt_1234567890abcdef
46
+ */
47
+ event_id?: string;
48
+ } | null;
49
+ /**
50
+ * Indicates if more results are available
51
+ * example:
52
+ * true
53
+ */
54
+ has_more?: boolean;
55
+ }
28
56
  export type TriggerWebhookResponse = Schemas.TriggerWebhookResp;
29
57
  export type Unauthorized = Schemas.ErrorResponseBase;
30
58
  }
@@ -569,6 +597,47 @@ declare namespace Components {
569
597
  type: "outbound";
570
598
  configuration?: /* Configuration for outbound use cases (epilot to ERP). Structure TBD. */ OutboundIntegrationEventConfiguration;
571
599
  }
600
+ export interface QueryEventsRequest {
601
+ /**
602
+ * Filter by event ID
603
+ */
604
+ event_id?: string;
605
+ /**
606
+ * Filter by event type
607
+ */
608
+ event_type?: "CREATE" | "UPDATE" | "DELETE";
609
+ /**
610
+ * Filter by correlation ID
611
+ */
612
+ correlation_id?: string;
613
+ /**
614
+ * Filter by object type
615
+ */
616
+ object_type?: string;
617
+ /**
618
+ * Maximum number of results to return
619
+ * example:
620
+ * 25
621
+ */
622
+ limit?: number;
623
+ /**
624
+ * Cursor for pagination. Use the next_cursor from the previous response to get the next page.
625
+ */
626
+ cursor?: {
627
+ /**
628
+ * Timestamp from the last event in the previous page
629
+ * example:
630
+ * 2025-10-31T12:34:56Z
631
+ */
632
+ event_time?: string; // date-time
633
+ /**
634
+ * Event ID from the last event in the previous page
635
+ * example:
636
+ * evt_1234567890abcdef
637
+ */
638
+ event_id?: string;
639
+ };
640
+ }
572
641
  export interface RelationConfig {
573
642
  /**
574
643
  * Relation operation:
@@ -1095,6 +1164,22 @@ declare namespace Paths {
1095
1164
  export type $500 = Components.Responses.InternalServerError;
1096
1165
  }
1097
1166
  }
1167
+ namespace QueryEvents {
1168
+ namespace Parameters {
1169
+ export type IntegrationId = string; // uuid
1170
+ }
1171
+ export interface PathParameters {
1172
+ integrationId: Parameters.IntegrationId /* uuid */;
1173
+ }
1174
+ export type RequestBody = Components.Schemas.QueryEventsRequest;
1175
+ namespace Responses {
1176
+ export type $200 = Components.Responses.QueryEventsResponse;
1177
+ export type $400 = Components.Responses.BadRequest;
1178
+ export type $401 = Components.Responses.Unauthorized;
1179
+ export type $404 = Components.Responses.NotFound;
1180
+ export type $500 = Components.Responses.InternalServerError;
1181
+ }
1182
+ }
1098
1183
  namespace SetIntegrationAppMapping {
1099
1184
  namespace Parameters {
1100
1185
  export type IntegrationId = string; // uuid
@@ -1313,6 +1398,16 @@ export interface OperationMethods {
1313
1398
  data?: any,
1314
1399
  config?: AxiosRequestConfig
1315
1400
  ): OperationResponse<Paths.DeleteIntegration.Responses.$200>
1401
+ /**
1402
+ * queryEvents - queryEvents
1403
+ *
1404
+ * Query events for a specific integration
1405
+ */
1406
+ 'queryEvents'(
1407
+ parameters?: Parameters<Paths.QueryEvents.PathParameters> | null,
1408
+ data?: Paths.QueryEvents.RequestBody,
1409
+ config?: AxiosRequestConfig
1410
+ ): OperationResponse<Paths.QueryEvents.Responses.$200>
1316
1411
  /**
1317
1412
  * listUseCases - listUseCases
1318
1413
  *
@@ -1542,6 +1637,18 @@ export interface PathsDictionary {
1542
1637
  config?: AxiosRequestConfig
1543
1638
  ): OperationResponse<Paths.DeleteIntegration.Responses.$200>
1544
1639
  }
1640
+ ['/v1/integrations/{integrationId}/events']: {
1641
+ /**
1642
+ * queryEvents - queryEvents
1643
+ *
1644
+ * Query events for a specific integration
1645
+ */
1646
+ 'post'(
1647
+ parameters?: Parameters<Paths.QueryEvents.PathParameters> | null,
1648
+ data?: Paths.QueryEvents.RequestBody,
1649
+ config?: AxiosRequestConfig
1650
+ ): OperationResponse<Paths.QueryEvents.Responses.$200>
1651
+ }
1545
1652
  ['/v1/integrations/{integrationId}/use-cases']: {
1546
1653
  /**
1547
1654
  * listUseCases - listUseCases
@@ -1672,6 +1779,7 @@ export type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig;
1672
1779
  export type OutboundIntegrationEventConfiguration = Components.Schemas.OutboundIntegrationEventConfiguration;
1673
1780
  export type OutboundUseCase = Components.Schemas.OutboundUseCase;
1674
1781
  export type OutboundUseCaseHistoryEntry = Components.Schemas.OutboundUseCaseHistoryEntry;
1782
+ export type QueryEventsRequest = Components.Schemas.QueryEventsRequest;
1675
1783
  export type RelationConfig = Components.Schemas.RelationConfig;
1676
1784
  export type RelationItemConfig = Components.Schemas.RelationItemConfig;
1677
1785
  export type RelationRefItemConfig = Components.Schemas.RelationRefItemConfig;
package/dist/openapi.json CHANGED
@@ -19,6 +19,14 @@
19
19
  "description": "Integration and Use Case management endpoints"
20
20
  }
21
21
  ],
22
+ "servers": [
23
+ {
24
+ "url": "https://erp-integration-api.sls.epilot.io"
25
+ },
26
+ {
27
+ "url": "https://erp-integration-api.sls.epilot.io"
28
+ }
29
+ ],
22
30
  "security": [
23
31
  {
24
32
  "EpilotAuth": []
@@ -1097,6 +1105,55 @@
1097
1105
  }
1098
1106
  }
1099
1107
  },
1108
+ "/v1/integrations/{integrationId}/events": {
1109
+ "post": {
1110
+ "operationId": "queryEvents",
1111
+ "summary": "queryEvents",
1112
+ "description": "Query events for a specific integration",
1113
+ "tags": [
1114
+ "integrations"
1115
+ ],
1116
+ "parameters": [
1117
+ {
1118
+ "name": "integrationId",
1119
+ "in": "path",
1120
+ "required": true,
1121
+ "description": "The integration ID",
1122
+ "schema": {
1123
+ "type": "string",
1124
+ "format": "uuid"
1125
+ }
1126
+ }
1127
+ ],
1128
+ "requestBody": {
1129
+ "required": true,
1130
+ "content": {
1131
+ "application/json": {
1132
+ "schema": {
1133
+ "$ref": "#/components/schemas/QueryEventsRequest"
1134
+ }
1135
+ }
1136
+ }
1137
+ },
1138
+ "responses": {
1139
+ "200": {
1140
+ "$ref": "#/components/responses/QueryEventsResponse"
1141
+ },
1142
+ "400": {
1143
+ "$ref": "#/components/responses/BadRequest"
1144
+ },
1145
+ "401": {
1146
+ "$ref": "#/components/responses/Unauthorized"
1147
+ },
1148
+ "404": {
1149
+ "$ref": "#/components/responses/NotFound"
1150
+ },
1151
+ "500": {
1152
+ "$ref": "#/components/responses/InternalServerError"
1153
+ }
1154
+ }
1155
+ }
1156
+ },
1100
1157
  "/v1/integrations/{integrationId}/use-cases": {
1101
1158
  "get": {
1102
1159
  "operationId": "listUseCases",
@@ -2945,6 +3002,57 @@
2945
3002
  "description": "Constant value (any type)"
2946
3003
  }
2947
3004
  }
3005
+ },
3006
+ "QueryEventsRequest": {
3007
+ "type": "object",
3008
+ "properties": {
3009
+ "event_id": {
3010
+ "type": "string",
3011
+ "description": "Filter by event ID"
3012
+ },
3013
+ "event_type": {
3014
+ "type": "string",
3015
+ "enum": [
3016
+ "CREATE",
3017
+ "UPDATE",
3018
+ "DELETE"
3019
+ ],
3020
+ "description": "Filter by event type"
3021
+ },
3022
+ "correlation_id": {
3023
+ "type": "string",
3024
+ "description": "Filter by correlation ID"
3025
+ },
3026
+ "object_type": {
3027
+ "type": "string",
3028
+ "description": "Filter by object type"
3029
+ },
3030
+ "limit": {
3031
+ "type": "integer",
3032
+ "description": "Maximum number of results to return",
3033
+ "example": 25,
3034
+ "default": 25,
3035
+ "minimum": 1,
3036
+ "maximum": 25
3037
+ },
3038
+ "cursor": {
3039
+ "type": "object",
3040
+ "description": "Cursor for pagination. Use the next_cursor from the previous response to get the next page.",
3041
+ "properties": {
3042
+ "event_time": {
3043
+ "type": "string",
3044
+ "format": "date-time",
3045
+ "description": "Timestamp from the last event in the previous page",
3046
+ "example": "2025-10-31T12:34:56Z"
3047
+ },
3048
+ "event_id": {
3049
+ "type": "string",
3050
+ "description": "Event ID from the last event in the previous page",
3051
+ "example": "evt_1234567890abcdef"
3052
+ }
3053
+ }
3054
+ }
3055
+ }
2948
3056
  }
2949
3057
  },
2950
3058
  "responses": {
@@ -2958,6 +3066,16 @@
2958
3066
  }
2959
3067
  }
2960
3068
  },
3069
+ "NotFound": {
3070
+ "description": "Resource not found",
3071
+ "content": {
3072
+ "application/json": {
3073
+ "schema": {
3074
+ "$ref": "#/components/schemas/ErrorResponseBase"
3075
+ }
3076
+ }
3077
+ }
3078
+ },
2961
3079
  "Unauthorized": {
2962
3080
  "description": "Unauthorized request",
2963
3081
  "content": {
@@ -3027,6 +3145,46 @@
3027
3145
  }
3028
3146
  }
3029
3147
  }
3148
+ },
3149
+ "QueryEventsResponse": {
3150
+ "description": "Events queried successfully",
3151
+ "content": {
3152
+ "application/json": {
3153
+ "schema": {
3154
+ "type": "object",
3155
+ "properties": {
3156
+ "data": {
3157
+ "type": "array",
3158
+ "items": {
3159
+ "$ref": "#/components/schemas/ErpEvent"
3160
+ },
3161
+ "description": "List of erp events"
3162
+ },
3163
+ "next_cursor": {
3164
+ "type": "object",
3165
+ "nullable": true,
3166
+ "description": "Cursor to fetch the next page. Null if no more results.",
3167
+ "properties": {
3168
+ "created_at": {
3169
+ "type": "string",
3170
+ "format": "date-time",
3171
+ "example": "2025-10-31T12:34:56Z"
3172
+ },
3173
+ "event_id": {
3174
+ "type": "string",
3175
+ "example": "evt_1234567890abcdef"
3176
+ }
3177
+ }
3178
+ },
3179
+ "has_more": {
3180
+ "type": "boolean",
3181
+ "description": "Indicates if more results are available",
3182
+ "example": true
3183
+ }
3184
+ }
3185
+ }
3186
+ }
3187
+ }
3030
3188
  }
3031
3189
  }
3032
3190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",