@epilot/erp-integration-client 0.16.1 → 0.17.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/openapi.d.ts +51 -0
- package/dist/openapi.json +51 -1
- package/package.json +2 -2
package/dist/openapi.d.ts
CHANGED
|
@@ -671,6 +671,23 @@ declare namespace Components {
|
|
|
671
671
|
* Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean.
|
|
672
672
|
*/
|
|
673
673
|
enabled?: /* Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. */ boolean | string;
|
|
674
|
+
/**
|
|
675
|
+
* Operation mode for entity mapping:
|
|
676
|
+
* - 'upsert': Create or update the entity (default)
|
|
677
|
+
* - 'delete': Soft delete the entity (marks as deleted)
|
|
678
|
+
* - 'purge': Hard delete the entity (permanent removal)
|
|
679
|
+
* - 'upsert-prune-scope-purge': Upsert entities from array, then purge entities in scope that weren't upserted
|
|
680
|
+
* - 'upsert-prune-scope-delete': Upsert entities from array, then soft delete entities in scope that weren't upserted
|
|
681
|
+
*
|
|
682
|
+
*/
|
|
683
|
+
mode?: "upsert" | "delete" | "purge" | "upsert-prune-scope-purge" | "upsert-prune-scope-delete";
|
|
684
|
+
scope?: /**
|
|
685
|
+
* Scope configuration for upsert-prune-scope modes.
|
|
686
|
+
* Defines how to find entities that should be pruned if not in the upsert payload.
|
|
687
|
+
* The scope is resolved against the original event payload (not individual array items).
|
|
688
|
+
*
|
|
689
|
+
*/
|
|
690
|
+
PruneScopeConfig;
|
|
674
691
|
/**
|
|
675
692
|
* Field mapping definitions
|
|
676
693
|
*/
|
|
@@ -1203,6 +1220,39 @@ declare namespace Components {
|
|
|
1203
1220
|
*/
|
|
1204
1221
|
conflicts?: OutboundConflict[];
|
|
1205
1222
|
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Scope configuration for upsert-prune-scope modes.
|
|
1225
|
+
* Defines how to find entities that should be pruned if not in the upsert payload.
|
|
1226
|
+
* The scope is resolved against the original event payload (not individual array items).
|
|
1227
|
+
*
|
|
1228
|
+
*/
|
|
1229
|
+
export interface PruneScopeConfig {
|
|
1230
|
+
/**
|
|
1231
|
+
* Scope mode for finding entities to prune:
|
|
1232
|
+
* - 'relations': Find scope by looking at all entities related to a specific entity (both direct and reverse relations)
|
|
1233
|
+
* - 'query': Find scope entities directly via query parameters
|
|
1234
|
+
*
|
|
1235
|
+
*/
|
|
1236
|
+
scope_mode: "relations" | "query";
|
|
1237
|
+
/**
|
|
1238
|
+
* For 'relations' mode: The schema of the entity to find (e.g., 'billing_account').
|
|
1239
|
+
* Not used for 'query' mode.
|
|
1240
|
+
*
|
|
1241
|
+
*/
|
|
1242
|
+
schema?: string;
|
|
1243
|
+
/**
|
|
1244
|
+
* For 'relations' mode: How to identify the scope entity from the payload.
|
|
1245
|
+
* Not used for 'query' mode.
|
|
1246
|
+
*
|
|
1247
|
+
*/
|
|
1248
|
+
unique_ids?: RelationUniqueIdField[];
|
|
1249
|
+
/**
|
|
1250
|
+
* For 'query' mode: Direct query parameters to find scope entities.
|
|
1251
|
+
* Not used for 'relations' or 'reverse-relations' modes.
|
|
1252
|
+
*
|
|
1253
|
+
*/
|
|
1254
|
+
query?: RelationUniqueIdField[];
|
|
1255
|
+
}
|
|
1206
1256
|
export interface QueryAccessLogsRequest {
|
|
1207
1257
|
/**
|
|
1208
1258
|
* Filter by a specific access token ID (e.g., 'api_5ZugdRXasLfWBypHi93Fk').
|
|
@@ -3220,6 +3270,7 @@ export type OutboundStatusResponse = Components.Schemas.OutboundStatusResponse;
|
|
|
3220
3270
|
export type OutboundUseCase = Components.Schemas.OutboundUseCase;
|
|
3221
3271
|
export type OutboundUseCaseHistoryEntry = Components.Schemas.OutboundUseCaseHistoryEntry;
|
|
3222
3272
|
export type OutboundUseCaseStatus = Components.Schemas.OutboundUseCaseStatus;
|
|
3273
|
+
export type PruneScopeConfig = Components.Schemas.PruneScopeConfig;
|
|
3223
3274
|
export type QueryAccessLogsRequest = Components.Schemas.QueryAccessLogsRequest;
|
|
3224
3275
|
export type QueryEventsRequest = Components.Schemas.QueryEventsRequest;
|
|
3225
3276
|
export type QueryInboundMonitoringEventsRequest = Components.Schemas.QueryInboundMonitoringEventsRequest;
|
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.30.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": [
|
|
@@ -3477,6 +3477,21 @@
|
|
|
3477
3477
|
],
|
|
3478
3478
|
"description": "Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean."
|
|
3479
3479
|
},
|
|
3480
|
+
"mode": {
|
|
3481
|
+
"type": "string",
|
|
3482
|
+
"enum": [
|
|
3483
|
+
"upsert",
|
|
3484
|
+
"delete",
|
|
3485
|
+
"purge",
|
|
3486
|
+
"upsert-prune-scope-purge",
|
|
3487
|
+
"upsert-prune-scope-delete"
|
|
3488
|
+
],
|
|
3489
|
+
"default": "upsert",
|
|
3490
|
+
"description": "Operation mode for entity mapping:\n- 'upsert': Create or update the entity (default)\n- 'delete': Soft delete the entity (marks as deleted)\n- 'purge': Hard delete the entity (permanent removal)\n- 'upsert-prune-scope-purge': Upsert entities from array, then purge entities in scope that weren't upserted\n- 'upsert-prune-scope-delete': Upsert entities from array, then soft delete entities in scope that weren't upserted\n"
|
|
3491
|
+
},
|
|
3492
|
+
"scope": {
|
|
3493
|
+
"$ref": "#/components/schemas/PruneScopeConfig"
|
|
3494
|
+
},
|
|
3480
3495
|
"fields": {
|
|
3481
3496
|
"type": "array",
|
|
3482
3497
|
"description": "Field mapping definitions",
|
|
@@ -3486,6 +3501,41 @@
|
|
|
3486
3501
|
}
|
|
3487
3502
|
}
|
|
3488
3503
|
},
|
|
3504
|
+
"PruneScopeConfig": {
|
|
3505
|
+
"type": "object",
|
|
3506
|
+
"description": "Scope configuration for upsert-prune-scope modes.\nDefines how to find entities that should be pruned if not in the upsert payload.\nThe scope is resolved against the original event payload (not individual array items).\n",
|
|
3507
|
+
"required": [
|
|
3508
|
+
"scope_mode"
|
|
3509
|
+
],
|
|
3510
|
+
"properties": {
|
|
3511
|
+
"scope_mode": {
|
|
3512
|
+
"type": "string",
|
|
3513
|
+
"enum": [
|
|
3514
|
+
"relations",
|
|
3515
|
+
"query"
|
|
3516
|
+
],
|
|
3517
|
+
"description": "Scope mode for finding entities to prune:\n- 'relations': Find scope by looking at all entities related to a specific entity (both direct and reverse relations)\n- 'query': Find scope entities directly via query parameters\n"
|
|
3518
|
+
},
|
|
3519
|
+
"schema": {
|
|
3520
|
+
"type": "string",
|
|
3521
|
+
"description": "For 'relations' mode: The schema of the entity to find (e.g., 'billing_account').\nNot used for 'query' mode.\n"
|
|
3522
|
+
},
|
|
3523
|
+
"unique_ids": {
|
|
3524
|
+
"type": "array",
|
|
3525
|
+
"description": "For 'relations' mode: How to identify the scope entity from the payload.\nNot used for 'query' mode.\n",
|
|
3526
|
+
"items": {
|
|
3527
|
+
"$ref": "#/components/schemas/RelationUniqueIdField"
|
|
3528
|
+
}
|
|
3529
|
+
},
|
|
3530
|
+
"query": {
|
|
3531
|
+
"type": "array",
|
|
3532
|
+
"description": "For 'query' mode: Direct query parameters to find scope entities.\nNot used for 'relations' or 'reverse-relations' modes.\n",
|
|
3533
|
+
"items": {
|
|
3534
|
+
"$ref": "#/components/schemas/RelationUniqueIdField"
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
}
|
|
3538
|
+
},
|
|
3489
3539
|
"IntegrationMeterReading": {
|
|
3490
3540
|
"type": "object",
|
|
3491
3541
|
"required": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/erp-integration-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Client library for ePilot ERP Integration API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "jest",
|
|
27
27
|
"typescript": "tsc",
|
|
28
28
|
"bundle-definition": "webpack",
|
|
29
|
-
"openapi": "node ../../scripts/update-openapi.js
|
|
29
|
+
"openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/erp-integration.yaml",
|
|
30
30
|
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
31
31
|
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
32
32
|
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|