@epilot/erp-integration-client 0.4.2 → 0.5.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 +12 -0
- package/dist/openapi.d.ts +107 -0
- package/dist/openapi.json +209 -4
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={330: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":{}}},"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}(330),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{"use strict";var e={330: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":{}}},"/v1/erp/updates/mapping_simulation":{"post":{"operationId":"simulateMapping","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":{}}}}},"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}(330),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
|
@@ -38,6 +38,18 @@
|
|
|
38
38
|
},
|
|
39
39
|
"responses": {}
|
|
40
40
|
}
|
|
41
|
+
},
|
|
42
|
+
"/v1/erp/updates/mapping_simulation": {
|
|
43
|
+
"post": {
|
|
44
|
+
"operationId": "simulateMapping",
|
|
45
|
+
"requestBody": {
|
|
46
|
+
"required": true,
|
|
47
|
+
"content": {
|
|
48
|
+
"application/json": {}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"responses": {}
|
|
52
|
+
}
|
|
41
53
|
}
|
|
42
54
|
},
|
|
43
55
|
"components": {
|
package/dist/openapi.d.ts
CHANGED
|
@@ -178,6 +178,91 @@ declare namespace Paths {
|
|
|
178
178
|
export type $500 = Components.Responses.InternalServerError;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
+
namespace SimulateMapping {
|
|
182
|
+
export interface RequestBody {
|
|
183
|
+
/**
|
|
184
|
+
* The integration mapping configuration
|
|
185
|
+
*/
|
|
186
|
+
mapping_configuration: {
|
|
187
|
+
mapping: {
|
|
188
|
+
/**
|
|
189
|
+
* Object type mappings
|
|
190
|
+
*/
|
|
191
|
+
objects: {
|
|
192
|
+
[name: string]: {
|
|
193
|
+
/**
|
|
194
|
+
* Mapping of entity types to their unique identifier field mappings
|
|
195
|
+
*/
|
|
196
|
+
unique_ids: {
|
|
197
|
+
[name: string]: {
|
|
198
|
+
[name: string]: string;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Field mapping definitions
|
|
203
|
+
*/
|
|
204
|
+
fields: {
|
|
205
|
+
/**
|
|
206
|
+
* Target entity slug
|
|
207
|
+
*/
|
|
208
|
+
entity: string;
|
|
209
|
+
/**
|
|
210
|
+
* Target attribute name
|
|
211
|
+
*/
|
|
212
|
+
attribute: string;
|
|
213
|
+
/**
|
|
214
|
+
* Source field name (mutually exclusive with jsonataExpression)
|
|
215
|
+
*/
|
|
216
|
+
field?: string;
|
|
217
|
+
/**
|
|
218
|
+
* JSONata expression for transformation (mutually exclusive with field)
|
|
219
|
+
*/
|
|
220
|
+
jsonataExpression?: string;
|
|
221
|
+
}[];
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Type of the object being mapped (must match a key in mapping_configuration.mapping.objects)
|
|
228
|
+
*/
|
|
229
|
+
object_type: string;
|
|
230
|
+
/**
|
|
231
|
+
* Format of the payload data
|
|
232
|
+
*/
|
|
233
|
+
format: "json" | "xml";
|
|
234
|
+
/**
|
|
235
|
+
* The serialized object data payload (JSON, XML, etc.) as a string
|
|
236
|
+
*/
|
|
237
|
+
payload: string;
|
|
238
|
+
}
|
|
239
|
+
namespace Responses {
|
|
240
|
+
export interface $200 {
|
|
241
|
+
entity_updates: {
|
|
242
|
+
/**
|
|
243
|
+
* The entity type slug
|
|
244
|
+
*/
|
|
245
|
+
entity_slug: string;
|
|
246
|
+
/**
|
|
247
|
+
* Unique identifier mappings for this entity
|
|
248
|
+
*/
|
|
249
|
+
uniqueIdentifiers: {
|
|
250
|
+
[name: string]: any;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Mapped attribute values
|
|
254
|
+
*/
|
|
255
|
+
attributes: {
|
|
256
|
+
[name: string]: any;
|
|
257
|
+
};
|
|
258
|
+
}[];
|
|
259
|
+
}
|
|
260
|
+
export type $400 = Components.Responses.BadRequest;
|
|
261
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
262
|
+
export type $422 = Components.Schemas.ErrorResponseBase;
|
|
263
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
181
266
|
namespace TriggerErp {
|
|
182
267
|
export type RequestBody = Components.Schemas.TriggerErpActionRequest;
|
|
183
268
|
namespace Responses {
|
|
@@ -224,6 +309,16 @@ export interface OperationMethods {
|
|
|
224
309
|
data?: Paths.ProcessErpUpdatesEvents.RequestBody,
|
|
225
310
|
config?: AxiosRequestConfig
|
|
226
311
|
): OperationResponse<Paths.ProcessErpUpdatesEvents.Responses.$200>
|
|
312
|
+
/**
|
|
313
|
+
* simulateMapping - Simulate ERP mapping transformation
|
|
314
|
+
*
|
|
315
|
+
* Test mapping configuration by transforming a payload using the provided mapping rules without persisting data
|
|
316
|
+
*/
|
|
317
|
+
'simulateMapping'(
|
|
318
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
319
|
+
data?: Paths.SimulateMapping.RequestBody,
|
|
320
|
+
config?: AxiosRequestConfig
|
|
321
|
+
): OperationResponse<Paths.SimulateMapping.Responses.$200>
|
|
227
322
|
}
|
|
228
323
|
|
|
229
324
|
export interface PathsDictionary {
|
|
@@ -263,6 +358,18 @@ export interface PathsDictionary {
|
|
|
263
358
|
config?: AxiosRequestConfig
|
|
264
359
|
): OperationResponse<Paths.ProcessErpUpdatesEvents.Responses.$200>
|
|
265
360
|
}
|
|
361
|
+
['/v1/erp/updates/mapping_simulation']: {
|
|
362
|
+
/**
|
|
363
|
+
* simulateMapping - Simulate ERP mapping transformation
|
|
364
|
+
*
|
|
365
|
+
* Test mapping configuration by transforming a payload using the provided mapping rules without persisting data
|
|
366
|
+
*/
|
|
367
|
+
'post'(
|
|
368
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
369
|
+
data?: Paths.SimulateMapping.RequestBody,
|
|
370
|
+
config?: AxiosRequestConfig
|
|
371
|
+
): OperationResponse<Paths.SimulateMapping.Responses.$200>
|
|
372
|
+
}
|
|
266
373
|
}
|
|
267
374
|
|
|
268
375
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
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.3.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": [
|
|
@@ -257,6 +257,214 @@
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
+
},
|
|
261
|
+
"/v1/erp/updates/mapping_simulation": {
|
|
262
|
+
"post": {
|
|
263
|
+
"operationId": "simulateMapping",
|
|
264
|
+
"summary": "Simulate ERP mapping transformation",
|
|
265
|
+
"description": "Test mapping configuration by transforming a payload using the provided mapping rules without persisting data",
|
|
266
|
+
"tags": [
|
|
267
|
+
"erp"
|
|
268
|
+
],
|
|
269
|
+
"requestBody": {
|
|
270
|
+
"required": true,
|
|
271
|
+
"content": {
|
|
272
|
+
"application/json": {
|
|
273
|
+
"schema": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"required": [
|
|
276
|
+
"mapping_configuration",
|
|
277
|
+
"object_type",
|
|
278
|
+
"format",
|
|
279
|
+
"payload"
|
|
280
|
+
],
|
|
281
|
+
"properties": {
|
|
282
|
+
"mapping_configuration": {
|
|
283
|
+
"type": "object",
|
|
284
|
+
"description": "The integration mapping configuration",
|
|
285
|
+
"required": [
|
|
286
|
+
"mapping"
|
|
287
|
+
],
|
|
288
|
+
"properties": {
|
|
289
|
+
"mapping": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"required": [
|
|
292
|
+
"objects"
|
|
293
|
+
],
|
|
294
|
+
"properties": {
|
|
295
|
+
"objects": {
|
|
296
|
+
"type": "object",
|
|
297
|
+
"description": "Object type mappings",
|
|
298
|
+
"additionalProperties": {
|
|
299
|
+
"type": "object",
|
|
300
|
+
"required": [
|
|
301
|
+
"unique_ids",
|
|
302
|
+
"fields"
|
|
303
|
+
],
|
|
304
|
+
"properties": {
|
|
305
|
+
"unique_ids": {
|
|
306
|
+
"type": "object",
|
|
307
|
+
"description": "Mapping of entity types to their unique identifier field mappings",
|
|
308
|
+
"additionalProperties": {
|
|
309
|
+
"type": "object",
|
|
310
|
+
"description": "Map of remote keys to local entity keys",
|
|
311
|
+
"additionalProperties": {
|
|
312
|
+
"type": "string"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"fields": {
|
|
317
|
+
"type": "array",
|
|
318
|
+
"description": "Field mapping definitions",
|
|
319
|
+
"items": {
|
|
320
|
+
"type": "object",
|
|
321
|
+
"required": [
|
|
322
|
+
"entity",
|
|
323
|
+
"attribute"
|
|
324
|
+
],
|
|
325
|
+
"properties": {
|
|
326
|
+
"entity": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"description": "Target entity slug"
|
|
329
|
+
},
|
|
330
|
+
"attribute": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"description": "Target attribute name"
|
|
333
|
+
},
|
|
334
|
+
"field": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"description": "Source field name (mutually exclusive with jsonataExpression)"
|
|
337
|
+
},
|
|
338
|
+
"jsonataExpression": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"description": "JSONata expression for transformation (mutually exclusive with field)"
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"object_type": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"description": "Type of the object being mapped (must match a key in mapping_configuration.mapping.objects)"
|
|
355
|
+
},
|
|
356
|
+
"format": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"enum": [
|
|
359
|
+
"json",
|
|
360
|
+
"xml"
|
|
361
|
+
],
|
|
362
|
+
"default": "json",
|
|
363
|
+
"description": "Format of the payload data"
|
|
364
|
+
},
|
|
365
|
+
"payload": {
|
|
366
|
+
"type": "string",
|
|
367
|
+
"description": "The serialized object data payload (JSON, XML, etc.) as a string"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"example": {
|
|
372
|
+
"mapping_configuration": {
|
|
373
|
+
"mapping": {
|
|
374
|
+
"objects": {
|
|
375
|
+
"business_partner": {
|
|
376
|
+
"unique_ids": {
|
|
377
|
+
"contact": {
|
|
378
|
+
"partner_id": "_id"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"fields": [
|
|
382
|
+
{
|
|
383
|
+
"entity": "contact",
|
|
384
|
+
"attribute": "first_name",
|
|
385
|
+
"field": "firstName"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"entity": "contact",
|
|
389
|
+
"attribute": "last_name",
|
|
390
|
+
"field": "lastName"
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"object_type": "business_partner",
|
|
398
|
+
"format": "json",
|
|
399
|
+
"payload": "{\"partner_id\":\"BP10001\",\"firstName\":\"John\",\"lastName\":\"Doe\"}"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"responses": {
|
|
405
|
+
"200": {
|
|
406
|
+
"description": "Successfully simulated mapping",
|
|
407
|
+
"content": {
|
|
408
|
+
"application/json": {
|
|
409
|
+
"schema": {
|
|
410
|
+
"type": "object",
|
|
411
|
+
"required": [
|
|
412
|
+
"entity_updates"
|
|
413
|
+
],
|
|
414
|
+
"properties": {
|
|
415
|
+
"entity_updates": {
|
|
416
|
+
"type": "array",
|
|
417
|
+
"items": {
|
|
418
|
+
"type": "object",
|
|
419
|
+
"required": [
|
|
420
|
+
"entity_slug",
|
|
421
|
+
"uniqueIdentifiers",
|
|
422
|
+
"attributes"
|
|
423
|
+
],
|
|
424
|
+
"properties": {
|
|
425
|
+
"entity_slug": {
|
|
426
|
+
"type": "string",
|
|
427
|
+
"description": "The entity type slug"
|
|
428
|
+
},
|
|
429
|
+
"uniqueIdentifiers": {
|
|
430
|
+
"type": "object",
|
|
431
|
+
"description": "Unique identifier mappings for this entity",
|
|
432
|
+
"additionalProperties": true
|
|
433
|
+
},
|
|
434
|
+
"attributes": {
|
|
435
|
+
"type": "object",
|
|
436
|
+
"description": "Mapped attribute values",
|
|
437
|
+
"additionalProperties": true
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"400": {
|
|
448
|
+
"$ref": "#/components/responses/BadRequest"
|
|
449
|
+
},
|
|
450
|
+
"401": {
|
|
451
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
452
|
+
},
|
|
453
|
+
"422": {
|
|
454
|
+
"description": "Unprocessable entity - mapping configuration or payload validation failed",
|
|
455
|
+
"content": {
|
|
456
|
+
"application/json": {
|
|
457
|
+
"schema": {
|
|
458
|
+
"$ref": "#/components/schemas/ErrorResponseBase"
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"500": {
|
|
464
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
260
468
|
}
|
|
261
469
|
},
|
|
262
470
|
"components": {
|
|
@@ -458,9 +666,6 @@
|
|
|
458
666
|
}
|
|
459
667
|
},
|
|
460
668
|
"servers": [
|
|
461
|
-
{
|
|
462
|
-
"url": "https://erp-integration-api.sls.epilot.io"
|
|
463
|
-
},
|
|
464
669
|
{
|
|
465
670
|
"url": "https://erp-integration-api.sls.epilot.io"
|
|
466
671
|
}
|