@epilot/erp-integration-client 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={187:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(466));t.default=r.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":{}}}},"components":{"responses":{"BadRequest":{"content":{"application/json":{}}},"Unauthorized":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"ERPUpdatesResponse":{"content":{"application/json":{}}}}},"servers":[{"url":"https://erp-integration-api.sls.epilot.io"}]}')}},t={},o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,o),s.exports}(187),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={187:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(466));t.default=r.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":{}}}},"components":{"responses":{"BadRequest":{"content":{"application/json":{}}},"Unauthorized":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"ERPUpdatesResponse":{"content":{"application/json":{}}},"TriggerWebhookResponse":{"content":{"application/json":{}}}}},"servers":[{"url":"https://erp-integration-api.sls.epilot.io"}]}')}},t={},o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,o),s.exports}(187),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
@@ -66,6 +66,11 @@
66
66
  "content": {
67
67
  "application/json": {}
68
68
  }
69
+ },
70
+ "TriggerWebhookResponse": {
71
+ "content": {
72
+ "application/json": {}
73
+ }
69
74
  }
70
75
  }
71
76
  },
package/dist/openapi.d.ts CHANGED
@@ -21,14 +21,12 @@ declare namespace Components {
21
21
  * Processing status for the event
22
22
  */
23
23
  status: "success" | "error";
24
- /**
25
- * Information about the processing status
26
- */
27
24
  message?: string;
28
25
  }[];
29
26
  }
30
27
  export type InternalServerError = Schemas.ErrorResponseBase;
31
28
  export type NotFound = Schemas.ErrorResponseBase;
29
+ export type TriggerWebhookResponse = Schemas.TriggerWebhookResp;
32
30
  export type Unauthorized = Schemas.ErrorResponseBase;
33
31
  }
34
32
  namespace Schemas {
@@ -43,10 +41,6 @@ declare namespace Components {
43
41
  message?: string;
44
42
  }
45
43
  export interface TriggerErpActionRequest {
46
- /**
47
- * Unique identifier of the ERP Toolkit manifest
48
- */
49
- manifest_id: string;
50
44
  /**
51
45
  * Unique identifier of the current automation execution
52
46
  */
@@ -88,6 +82,18 @@ declare namespace Components {
88
82
  */
89
83
  entity_id: string;
90
84
  }
85
+ export interface TriggerWebhookResp {
86
+ status_code?: string;
87
+ message?: string;
88
+ body?: {
89
+ [key: string]: any;
90
+ };
91
+ code?: string;
92
+ status?: "succeeded" | "failed";
93
+ start_date?: string;
94
+ end_date?: string;
95
+ event_id?: string;
96
+ }
91
97
  }
92
98
  }
93
99
  declare namespace Paths {
@@ -169,9 +175,7 @@ declare namespace Paths {
169
175
  namespace TriggerErp {
170
176
  export type RequestBody = Components.Schemas.TriggerErpActionRequest;
171
177
  namespace Responses {
172
- export interface $200 {
173
- message?: string;
174
- }
178
+ export type $200 = Components.Responses.TriggerWebhookResponse;
175
179
  export interface $400 {
176
180
  }
177
181
  export interface $401 {
@@ -260,3 +264,4 @@ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
260
264
 
261
265
  export type ErrorResponseBase = Components.Schemas.ErrorResponseBase;
262
266
  export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
267
+ export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
package/dist/openapi.json CHANGED
@@ -94,19 +94,7 @@
94
94
  },
95
95
  "responses": {
96
96
  "200": {
97
- "description": "Success - if the ERP Toolkit was triggered successfully",
98
- "content": {
99
- "application/json": {
100
- "schema": {
101
- "type": "object",
102
- "properties": {
103
- "message": {
104
- "type": "string"
105
- }
106
- }
107
- }
108
- }
109
- }
97
+ "$ref": "#/components/responses/TriggerWebhookResponse"
110
98
  },
111
99
  "400": {
112
100
  "description": "Bad request - invalid or missing parameters"
@@ -285,7 +273,6 @@
285
273
  "TriggerErpActionRequest": {
286
274
  "type": "object",
287
275
  "required": [
288
- "manifest_id",
289
276
  "execution_id",
290
277
  "org_id",
291
278
  "webhook_id",
@@ -298,10 +285,6 @@
298
285
  "entity_id"
299
286
  ],
300
287
  "properties": {
301
- "manifest_id": {
302
- "type": "string",
303
- "description": "Unique identifier of the ERP Toolkit manifest"
304
- },
305
288
  "execution_id": {
306
289
  "type": "string",
307
290
  "description": "Unique identifier of the current automation execution"
@@ -344,6 +327,39 @@
344
327
  "description": "Identifier of the entity referenced by the activity"
345
328
  }
346
329
  }
330
+ },
331
+ "TriggerWebhookResp": {
332
+ "type": "object",
333
+ "properties": {
334
+ "status_code": {
335
+ "type": "string"
336
+ },
337
+ "message": {
338
+ "type": "string"
339
+ },
340
+ "body": {
341
+ "type": "object"
342
+ },
343
+ "code": {
344
+ "type": "string"
345
+ },
346
+ "status": {
347
+ "type": "string",
348
+ "enum": [
349
+ "succeeded",
350
+ "failed"
351
+ ]
352
+ },
353
+ "start_date": {
354
+ "type": "string"
355
+ },
356
+ "end_date": {
357
+ "type": "string"
358
+ },
359
+ "event_id": {
360
+ "type": "string"
361
+ }
362
+ }
347
363
  }
348
364
  },
349
365
  "responses": {
@@ -416,8 +432,7 @@
416
432
  "description": "Processing status for the event"
417
433
  },
418
434
  "message": {
419
- "type": "string",
420
- "description": "Information about the processing status"
435
+ "type": "string"
421
436
  }
422
437
  }
423
438
  }
@@ -426,6 +441,16 @@
426
441
  }
427
442
  }
428
443
  }
444
+ },
445
+ "TriggerWebhookResponse": {
446
+ "description": "Result of triggering an ERP synchronization event",
447
+ "content": {
448
+ "application/json": {
449
+ "schema": {
450
+ "$ref": "#/components/schemas/TriggerWebhookResp"
451
+ }
452
+ }
453
+ }
429
454
  }
430
455
  }
431
456
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",