@epilot/erp-integration-client 0.3.0 → 0.4.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/LICENSE +21 -0
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +5 -0
- package/dist/openapi.d.ts +15 -10
- package/dist/openapi.json +45 -20
- package/package.json +15 -16
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 epilot GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={390: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}(390),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
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
|
|
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
|
-
"
|
|
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
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Client library for ePilot ERP Integration API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,18 +22,6 @@
|
|
|
22
22
|
"erp",
|
|
23
23
|
"integration"
|
|
24
24
|
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"test": "jest",
|
|
27
|
-
"typescript": "tsc",
|
|
28
|
-
"bundle-definition": "webpack",
|
|
29
|
-
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/erp-integration.yaml",
|
|
30
|
-
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
31
|
-
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
32
|
-
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
33
|
-
"build:watch": "npm run build && tsc -w",
|
|
34
|
-
"prepublishOnly": "npm run typegen && npm run build",
|
|
35
|
-
"lint": "pnpm exec eslint src"
|
|
36
|
-
},
|
|
37
25
|
"files": [
|
|
38
26
|
"*.js",
|
|
39
27
|
"*.d.ts",
|
|
@@ -48,7 +36,7 @@
|
|
|
48
36
|
"!*.config.js"
|
|
49
37
|
],
|
|
50
38
|
"peerDependencies": {
|
|
51
|
-
"axios": "^1.
|
|
39
|
+
"axios": "^1.0.0 || >=0.25.0 <1.0.0"
|
|
52
40
|
},
|
|
53
41
|
"dependencies": {
|
|
54
42
|
"@dazn/lambda-powertools-correlation-ids": "^1.28.1",
|
|
@@ -61,7 +49,7 @@
|
|
|
61
49
|
},
|
|
62
50
|
"devDependencies": {
|
|
63
51
|
"@types/jest": "^26.0.20",
|
|
64
|
-
"axios": "^1.
|
|
52
|
+
"axios": "^1.11.0",
|
|
65
53
|
"copy-webpack-plugin": "^7.0.0",
|
|
66
54
|
"jest": "^26.6.3",
|
|
67
55
|
"json-loader": "^0.5.7",
|
|
@@ -72,5 +60,16 @@
|
|
|
72
60
|
"typescript": "^4.1.3",
|
|
73
61
|
"webpack": "^5.18.0",
|
|
74
62
|
"webpack-cli": "^4.4.0"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"test": "jest",
|
|
66
|
+
"typescript": "tsc",
|
|
67
|
+
"bundle-definition": "webpack",
|
|
68
|
+
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/erp-integration.yaml",
|
|
69
|
+
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
70
|
+
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
71
|
+
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
72
|
+
"build:watch": "npm run build && tsc -w",
|
|
73
|
+
"lint": "pnpm exec eslint src"
|
|
75
74
|
}
|
|
76
|
-
}
|
|
75
|
+
}
|