@epilot/erp-integration-client 0.24.0 → 0.24.2

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={390: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":{"deprecated":true,"operationId":"processErpUpdatesEvents","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/events":{"post":{"deprecated":true,"operationId":"processErpUpdatesEventsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v3/erp/updates/events":{"post":{"operationId":"processErpUpdatesEventsV3","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}/events/replay":{"post":{"operationId":"replayEvents","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":{}}},"/v2/integrations":{"get":{"operationId":"listIntegrationsV2","responses":{}},"post":{"operationId":"createIntegrationV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}":{"get":{"operationId":"getIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"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":{}}},"/v1/integrations/{integrationId}/monitoring/inbound-events":{"post":{"operationId":"queryInboundMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStats","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/timeseries":{"post":{"operationId":"getMonitoringTimeSeries","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/outbound-status":{"get":{"operationId":"getOutboundStatus","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/monitoring/access-logs":{"post":{"operationId":"queryAccessLogs","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/outbound-events":{"post":{"operationId":"queryOutboundMonitoringEvents","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":{}}},"QueryInboundMonitoringEventsResponse":{"content":{"application/json":{}}},"GetMonitoringStatsResponse":{"content":{"application/json":{}}},"GetMonitoringTimeSeriesResponse":{"content":{"application/json":{}}},"QueryAccessLogsResponse":{"content":{"application/json":{}}},"QueryOutboundMonitoringEventsResponse":{"content":{"application/json":{}}},"ReplayEventsResponse":{"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 i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(390),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330(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":{"deprecated":true,"operationId":"processErpUpdatesEvents","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/events":{"post":{"deprecated":true,"operationId":"processErpUpdatesEventsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v3/erp/updates/events":{"post":{"operationId":"processErpUpdatesEventsV3","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}/events/replay":{"post":{"operationId":"replayEvents","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":{}}},"/v2/integrations":{"get":{"operationId":"listIntegrationsV2","responses":{}},"post":{"operationId":"createIntegrationV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}":{"get":{"operationId":"getIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"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":{}}},"/v1/integrations/{integrationId}/monitoring/inbound-events":{"post":{"operationId":"queryInboundMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStats","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/timeseries":{"post":{"operationId":"getMonitoringTimeSeries","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/outbound-status":{"get":{"operationId":"getOutboundStatus","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/monitoring/access-logs":{"post":{"operationId":"queryAccessLogs","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/outbound-events":{"post":{"operationId":"queryOutboundMonitoringEvents","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":{}}},"QueryInboundMonitoringEventsResponse":{"content":{"application/json":{}}},"GetMonitoringStatsResponse":{"content":{"application/json":{}}},"GetMonitoringTimeSeriesResponse":{"content":{"application/json":{}}},"QueryAccessLogsResponse":{"content":{"application/json":{}}},"QueryOutboundMonitoringEventsResponse":{"content":{"application/json":{}}},"ReplayEventsResponse":{"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 i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(330),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -215,6 +215,10 @@ declare namespace Components {
215
215
  * List of access token IDs to associate with this integration
216
216
  */
217
217
  access_token_ids?: string[];
218
+ /**
219
+ * List of app IDs to associate with this integration
220
+ */
221
+ app_ids?: string[];
218
222
  /**
219
223
  * Configuration defining environment variables needed by this integration
220
224
  */
@@ -723,6 +727,10 @@ declare namespace Components {
723
727
  * List of access token IDs associated with this integration
724
728
  */
725
729
  access_token_ids?: string[];
730
+ /**
731
+ * List of app IDs associated with this integration
732
+ */
733
+ app_ids?: string[];
726
734
  /**
727
735
  * Configuration defining environment variables needed by this integration. Values are stored in the Environments API.
728
736
  */
@@ -882,6 +890,20 @@ declare namespace Components {
882
890
  *
883
891
  */
884
892
  reading_matching?: "external_id" | "strict-date";
893
+ /**
894
+ * Operation mode for meter reading mapping:
895
+ * - 'upsert': Create or update meter readings (default)
896
+ * - 'delete': Delete the meter reading
897
+ * - 'upsert-prune-scope': Upsert readings from array, then delete all other readings for the same meter+counter that weren't upserted
898
+ *
899
+ */
900
+ mode?: "upsert" | "delete" | "upsert-prune-scope";
901
+ scope?: /**
902
+ * Scope configuration for meter reading upsert-prune-scope mode.
903
+ * The scope is all readings for the same meter + counter.
904
+ *
905
+ */
906
+ MeterReadingPruneScopeConfig;
885
907
  meter: MeterUniqueIdsConfig;
886
908
  meter_counter?: MeterUniqueIdsConfig;
887
909
  /**
@@ -982,6 +1004,19 @@ declare namespace Components {
982
1004
  [name: string]: any;
983
1005
  };
984
1006
  }
1007
+ /**
1008
+ * Scope configuration for meter reading upsert-prune-scope mode.
1009
+ * The scope is all readings for the same meter + counter.
1010
+ *
1011
+ */
1012
+ export interface MeterReadingPruneScopeConfig {
1013
+ /**
1014
+ * Optional source filter. When set, only readings with this source
1015
+ * are eligible for pruning (e.g., 'ERP' to only prune ERP-synced readings).
1016
+ *
1017
+ */
1018
+ source?: string;
1019
+ }
985
1020
  export interface MeterReadingUpdate {
986
1021
  meter: {
987
1022
  /**
@@ -1966,6 +2001,10 @@ declare namespace Components {
1966
2001
  * List of access token IDs to associate with this integration
1967
2002
  */
1968
2003
  access_token_ids?: string[];
2004
+ /**
2005
+ * List of app IDs to associate with this integration
2006
+ */
2007
+ app_ids?: string[];
1969
2008
  /**
1970
2009
  * Configuration defining environment variables needed by this integration
1971
2010
  */
@@ -3502,6 +3541,7 @@ export type IntegrationWithUseCases = Components.Schemas.IntegrationWithUseCases
3502
3541
  export type MappingSimulationRequest = Components.Schemas.MappingSimulationRequest;
3503
3542
  export type MappingSimulationResponse = Components.Schemas.MappingSimulationResponse;
3504
3543
  export type MappingSimulationV2Request = Components.Schemas.MappingSimulationV2Request;
3544
+ export type MeterReadingPruneScopeConfig = Components.Schemas.MeterReadingPruneScopeConfig;
3505
3545
  export type MeterReadingUpdate = Components.Schemas.MeterReadingUpdate;
3506
3546
  export type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig;
3507
3547
  export type MonitoringStats = Components.Schemas.MonitoringStats;
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.36.0",
5
+ "version": "0.38.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": [
@@ -2560,6 +2560,13 @@
2560
2560
  "type": "string"
2561
2561
  }
2562
2562
  },
2563
+ "app_ids": {
2564
+ "type": "array",
2565
+ "description": "List of app IDs associated with this integration",
2566
+ "items": {
2567
+ "type": "string"
2568
+ }
2569
+ },
2563
2570
  "environment_config": {
2564
2571
  "type": "array",
2565
2572
  "items": {
@@ -2603,6 +2610,13 @@
2603
2610
  "type": "string"
2604
2611
  }
2605
2612
  },
2613
+ "app_ids": {
2614
+ "type": "array",
2615
+ "description": "List of app IDs to associate with this integration",
2616
+ "items": {
2617
+ "type": "string"
2618
+ }
2619
+ },
2606
2620
  "environment_config": {
2607
2621
  "type": "array",
2608
2622
  "items": {
@@ -2633,6 +2647,13 @@
2633
2647
  "type": "string"
2634
2648
  }
2635
2649
  },
2650
+ "app_ids": {
2651
+ "type": "array",
2652
+ "description": "List of app IDs to associate with this integration",
2653
+ "items": {
2654
+ "type": "string"
2655
+ }
2656
+ },
2636
2657
  "environment_config": {
2637
2658
  "type": "array",
2638
2659
  "items": {
@@ -3776,6 +3797,16 @@
3776
3797
  }
3777
3798
  }
3778
3799
  },
3800
+ "MeterReadingPruneScopeConfig": {
3801
+ "type": "object",
3802
+ "description": "Scope configuration for meter reading upsert-prune-scope mode.\nThe scope is all readings for the same meter + counter.\n",
3803
+ "properties": {
3804
+ "source": {
3805
+ "type": "string",
3806
+ "description": "Optional source filter. When set, only readings with this source\nare eligible for pruning (e.g., 'ERP' to only prune ERP-synced readings).\n"
3807
+ }
3808
+ }
3809
+ },
3779
3810
  "IntegrationMeterReading": {
3780
3811
  "type": "object",
3781
3812
  "required": [
@@ -3796,6 +3827,19 @@
3796
3827
  "default": "external_id",
3797
3828
  "description": "Strategy for matching incoming readings against existing readings.\n- 'external_id': Match readings by external_id attribute (default behavior)\n- 'strict-date': Match by meter_id + counter_id + direction + date (German timezone).\n Useful when readings originate from ECP and are echoed back by the ERP with truncated timestamps.\n"
3798
3829
  },
3830
+ "mode": {
3831
+ "type": "string",
3832
+ "enum": [
3833
+ "upsert",
3834
+ "delete",
3835
+ "upsert-prune-scope"
3836
+ ],
3837
+ "default": "upsert",
3838
+ "description": "Operation mode for meter reading mapping:\n- 'upsert': Create or update meter readings (default)\n- 'delete': Delete the meter reading\n- 'upsert-prune-scope': Upsert readings from array, then delete all other readings for the same meter+counter that weren't upserted\n"
3839
+ },
3840
+ "scope": {
3841
+ "$ref": "#/components/schemas/MeterReadingPruneScopeConfig"
3842
+ },
3799
3843
  "meter": {
3800
3844
  "$ref": "#/components/schemas/MeterUniqueIdsConfig"
3801
3845
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.24.0",
3
+ "version": "0.24.2",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/jest": "^26.0.20",
64
- "axios": "^1.11.0",
64
+ "axios": "^1.13.5",
65
65
  "copy-webpack-plugin": "^7.0.0",
66
66
  "jest": "^29.6.2",
67
67
  "json-loader": "^0.5.7",
@@ -70,7 +70,7 @@
70
70
  "ts-loader": "^8.0.14",
71
71
  "ts-node": "^10.9.1",
72
72
  "typescript": "^4.1.3",
73
- "webpack": "^5.18.0",
73
+ "webpack": "^5.104.1",
74
74
  "webpack-cli": "^4.4.0"
75
75
  }
76
76
  }