@epilot/erp-integration-client 0.19.0 → 0.19.1-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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={330: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}/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":{}}},"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})})();
1
+ (()=>{"use strict";var e={330: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}(330),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
@@ -427,6 +427,25 @@
427
427
  "responses": {}
428
428
  }
429
429
  },
430
+ "/v1/integrations/{integrationId}/monitoring/timeseries": {
431
+ "post": {
432
+ "operationId": "getMonitoringTimeSeries",
433
+ "parameters": [
434
+ {
435
+ "name": "integrationId",
436
+ "in": "path",
437
+ "required": true
438
+ }
439
+ ],
440
+ "requestBody": {
441
+ "required": true,
442
+ "content": {
443
+ "application/json": {}
444
+ }
445
+ },
446
+ "responses": {}
447
+ }
448
+ },
430
449
  "/v1/integrations/{integrationId}/outbound-status": {
431
450
  "get": {
432
451
  "operationId": "getOutboundStatus",
@@ -511,6 +530,11 @@
511
530
  "application/json": {}
512
531
  }
513
532
  },
533
+ "GetMonitoringTimeSeriesResponse": {
534
+ "content": {
535
+ "application/json": {}
536
+ }
537
+ },
514
538
  "QueryAccessLogsResponse": {
515
539
  "content": {
516
540
  "application/json": {}
package/dist/openapi.d.ts CHANGED
@@ -25,6 +25,24 @@ declare namespace Components {
25
25
  }[];
26
26
  }
27
27
  export type GetMonitoringStatsResponse = Schemas.MonitoringStats;
28
+ export interface GetMonitoringTimeSeriesResponse {
29
+ /**
30
+ * The time bucket interval used for aggregation
31
+ */
32
+ interval: "5m" | "30m" | "1h" | "1d";
33
+ /**
34
+ * Start date of the time series
35
+ */
36
+ from_date: string; // date-time
37
+ /**
38
+ * End date of the time series
39
+ */
40
+ to_date: string; // date-time
41
+ /**
42
+ * List of time-series buckets with event counts
43
+ */
44
+ buckets: Schemas.TimeSeriesBucket[];
45
+ }
28
46
  export type InternalServerError = Schemas.ErrorResponseBase;
29
47
  export type NotFound = Schemas.ErrorResponseBase;
30
48
  export interface QueryAccessLogsResponse {
@@ -478,6 +496,32 @@ declare namespace Components {
478
496
  */
479
497
  outbound_group_by?: ("event_name" | "status" | "webhook_config_id" | "date")[];
480
498
  }
499
+ export interface GetMonitoringTimeSeriesRequest {
500
+ /**
501
+ * Start date for the time series (inclusive)
502
+ * example:
503
+ * 2025-01-01T00:00:00Z
504
+ */
505
+ from_date: string; // date-time
506
+ /**
507
+ * End date for the time series (inclusive). Defaults to current time if not specified.
508
+ * example:
509
+ * 2025-01-31T23:59:59Z
510
+ */
511
+ to_date?: string; // date-time
512
+ /**
513
+ * The time bucket interval for aggregation
514
+ * example:
515
+ * 1h
516
+ */
517
+ interval: "5m" | "30m" | "1h" | "1d";
518
+ /**
519
+ * Filter by event direction. Defaults to both.
520
+ * example:
521
+ * both
522
+ */
523
+ direction?: "inbound" | "outbound" | "both";
524
+ }
481
525
  /**
482
526
  * Configuration for inbound use cases (ERP to epilot)
483
527
  */
@@ -922,7 +966,7 @@ declare namespace Components {
922
966
  };
923
967
  };
924
968
  /**
925
- * Meter reading attributes (external_id, timestamp, source, value, etc.)
969
+ * Meter reading attributes. Required: external_id, timestamp, source, value. `source` must be one of: ECP, ERP, 360, journey-submission. `reason` (optional) must be one of: regular, irregular, last, first, meter_change, contract_change, meter_adjustment (or empty/null).
926
970
  */
927
971
  attributes: {
928
972
  [name: string]: any;
@@ -1777,6 +1821,31 @@ declare namespace Components {
1777
1821
  */
1778
1822
  overwrite?: boolean;
1779
1823
  }
1824
+ export interface TimeSeriesBucket {
1825
+ /**
1826
+ * The start timestamp of the bucket
1827
+ */
1828
+ timestamp: string; // date-time
1829
+ /**
1830
+ * Inbound event counts for this bucket. Null when direction is outbound.
1831
+ */
1832
+ inbound?: {
1833
+ success_count?: number;
1834
+ error_count?: number;
1835
+ warning_count?: number;
1836
+ skipped_count?: number;
1837
+ total_count?: number;
1838
+ } | null;
1839
+ /**
1840
+ * Outbound event counts for this bucket. Null when direction is inbound.
1841
+ */
1842
+ outbound?: {
1843
+ success_count?: number;
1844
+ error_count?: number;
1845
+ pending_count?: number;
1846
+ total_count?: number;
1847
+ } | null;
1848
+ }
1780
1849
  export interface TriggerErpActionRequest {
1781
1850
  /**
1782
1851
  * Unique identifier of the current automation execution
@@ -2192,6 +2261,22 @@ declare namespace Paths {
2192
2261
  export type $500 = Components.Responses.InternalServerError;
2193
2262
  }
2194
2263
  }
2264
+ namespace GetMonitoringTimeSeries {
2265
+ namespace Parameters {
2266
+ export type IntegrationId = string; // uuid
2267
+ }
2268
+ export interface PathParameters {
2269
+ integrationId: Parameters.IntegrationId /* uuid */;
2270
+ }
2271
+ export type RequestBody = Components.Schemas.GetMonitoringTimeSeriesRequest;
2272
+ namespace Responses {
2273
+ export type $200 = Components.Responses.GetMonitoringTimeSeriesResponse;
2274
+ export type $400 = Components.Responses.BadRequest;
2275
+ export type $401 = Components.Responses.Unauthorized;
2276
+ export type $404 = Components.Responses.NotFound;
2277
+ export type $500 = Components.Responses.InternalServerError;
2278
+ }
2279
+ }
2195
2280
  namespace GetOutboundStatus {
2196
2281
  namespace Parameters {
2197
2282
  export type IntegrationId = string; // uuid
@@ -2859,6 +2944,18 @@ export interface OperationMethods {
2859
2944
  data?: Paths.GetMonitoringStats.RequestBody,
2860
2945
  config?: AxiosRequestConfig
2861
2946
  ): OperationResponse<Paths.GetMonitoringStats.Responses.$200>
2947
+ /**
2948
+ * getMonitoringTimeSeries - getMonitoringTimeSeries
2949
+ *
2950
+ * Get time-series aggregated event counts for monitoring charts.
2951
+ * Returns pre-bucketed counts at configurable intervals for both inbound and outbound events.
2952
+ *
2953
+ */
2954
+ 'getMonitoringTimeSeries'(
2955
+ parameters?: Parameters<Paths.GetMonitoringTimeSeries.PathParameters> | null,
2956
+ data?: Paths.GetMonitoringTimeSeries.RequestBody,
2957
+ config?: AxiosRequestConfig
2958
+ ): OperationResponse<Paths.GetMonitoringTimeSeries.Responses.$200>
2862
2959
  /**
2863
2960
  * getOutboundStatus - getOutboundStatus
2864
2961
  *
@@ -3264,6 +3361,20 @@ export interface PathsDictionary {
3264
3361
  config?: AxiosRequestConfig
3265
3362
  ): OperationResponse<Paths.GetMonitoringStats.Responses.$200>
3266
3363
  }
3364
+ ['/v1/integrations/{integrationId}/monitoring/timeseries']: {
3365
+ /**
3366
+ * getMonitoringTimeSeries - getMonitoringTimeSeries
3367
+ *
3368
+ * Get time-series aggregated event counts for monitoring charts.
3369
+ * Returns pre-bucketed counts at configurable intervals for both inbound and outbound events.
3370
+ *
3371
+ */
3372
+ 'post'(
3373
+ parameters?: Parameters<Paths.GetMonitoringTimeSeries.PathParameters> | null,
3374
+ data?: Paths.GetMonitoringTimeSeries.RequestBody,
3375
+ config?: AxiosRequestConfig
3376
+ ): OperationResponse<Paths.GetMonitoringTimeSeries.Responses.$200>
3377
+ }
3267
3378
  ['/v1/integrations/{integrationId}/outbound-status']: {
3268
3379
  /**
3269
3380
  * getOutboundStatus - getOutboundStatus
@@ -3332,6 +3443,7 @@ export type ErpUpdatesEventsV2Request = Components.Schemas.ErpUpdatesEventsV2Req
3332
3443
  export type ErpUpdatesEventsV3Request = Components.Schemas.ErpUpdatesEventsV3Request;
3333
3444
  export type ErrorResponseBase = Components.Schemas.ErrorResponseBase;
3334
3445
  export type GetMonitoringStatsRequest = Components.Schemas.GetMonitoringStatsRequest;
3446
+ export type GetMonitoringTimeSeriesRequest = Components.Schemas.GetMonitoringTimeSeriesRequest;
3335
3447
  export type InboundIntegrationEventConfiguration = Components.Schemas.InboundIntegrationEventConfiguration;
3336
3448
  export type InboundMonitoringEvent = Components.Schemas.InboundMonitoringEvent;
3337
3449
  export type InboundUseCase = Components.Schemas.InboundUseCase;
@@ -3374,6 +3486,7 @@ export type RelationUniqueIdField = Components.Schemas.RelationUniqueIdField;
3374
3486
  export type RepeatableFieldType = Components.Schemas.RepeatableFieldType;
3375
3487
  export type ReplayEventsRequest = Components.Schemas.ReplayEventsRequest;
3376
3488
  export type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationAppMappingRequest;
3489
+ export type TimeSeriesBucket = Components.Schemas.TimeSeriesBucket;
3377
3490
  export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
3378
3491
  export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
3379
3492
  export type UpdateInboundUseCaseRequest = Components.Schemas.UpdateInboundUseCaseRequest;
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.33.0",
5
+ "version": "0.35.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": [
@@ -2056,6 +2056,56 @@
2056
2056
  }
2057
2057
  }
2058
2058
  },
2059
+ "/v1/integrations/{integrationId}/monitoring/timeseries": {
2060
+ "post": {
2061
+ "operationId": "getMonitoringTimeSeries",
2062
+ "summary": "getMonitoringTimeSeries",
2063
+ "description": "Get time-series aggregated event counts for monitoring charts.\nReturns pre-bucketed counts at configurable intervals for both inbound and outbound events.\n",
2064
+ "tags": [
2065
+ "monitoring",
2066
+ "integrations"
2067
+ ],
2068
+ "parameters": [
2069
+ {
2070
+ "name": "integrationId",
2071
+ "in": "path",
2072
+ "required": true,
2073
+ "description": "The integration ID",
2074
+ "schema": {
2075
+ "type": "string",
2076
+ "format": "uuid"
2077
+ }
2078
+ }
2079
+ ],
2080
+ "requestBody": {
2081
+ "required": true,
2082
+ "content": {
2083
+ "application/json": {
2084
+ "schema": {
2085
+ "$ref": "#/components/schemas/GetMonitoringTimeSeriesRequest"
2086
+ }
2087
+ }
2088
+ }
2089
+ },
2090
+ "responses": {
2091
+ "200": {
2092
+ "$ref": "#/components/responses/GetMonitoringTimeSeriesResponse"
2093
+ },
2094
+ "400": {
2095
+ "$ref": "#/components/responses/BadRequest"
2096
+ },
2097
+ "401": {
2098
+ "$ref": "#/components/responses/Unauthorized"
2099
+ },
2100
+ "404": {
2101
+ "$ref": "#/components/responses/NotFound"
2102
+ },
2103
+ "500": {
2104
+ "$ref": "#/components/responses/InternalServerError"
2105
+ }
2106
+ }
2107
+ }
2108
+ },
2059
2109
  "/v1/integrations/{integrationId}/outbound-status": {
2060
2110
  "get": {
2061
2111
  "operationId": "getOutboundStatus",
@@ -3203,7 +3253,7 @@
3203
3253
  "attributes": {
3204
3254
  "type": "object",
3205
3255
  "additionalProperties": true,
3206
- "description": "Meter reading attributes (external_id, timestamp, source, value, etc.)"
3256
+ "description": "Meter reading attributes. Required: external_id, timestamp, source, value. `source` must be one of: ECP, ERP, 360, journey-submission. `reason` (optional) must be one of: regular, irregular, last, first, meter_change, contract_change, meter_adjustment (or empty/null)."
3207
3257
  }
3208
3258
  }
3209
3259
  },
@@ -4481,6 +4531,103 @@
4481
4531
  }
4482
4532
  }
4483
4533
  },
4534
+ "GetMonitoringTimeSeriesRequest": {
4535
+ "type": "object",
4536
+ "required": [
4537
+ "from_date",
4538
+ "interval"
4539
+ ],
4540
+ "properties": {
4541
+ "from_date": {
4542
+ "type": "string",
4543
+ "format": "date-time",
4544
+ "description": "Start date for the time series (inclusive)",
4545
+ "example": "2025-01-01T00:00:00Z"
4546
+ },
4547
+ "to_date": {
4548
+ "type": "string",
4549
+ "format": "date-time",
4550
+ "description": "End date for the time series (inclusive). Defaults to current time if not specified.",
4551
+ "example": "2025-01-31T23:59:59Z"
4552
+ },
4553
+ "interval": {
4554
+ "type": "string",
4555
+ "enum": [
4556
+ "5m",
4557
+ "30m",
4558
+ "1h",
4559
+ "1d"
4560
+ ],
4561
+ "description": "The time bucket interval for aggregation",
4562
+ "example": "1h"
4563
+ },
4564
+ "direction": {
4565
+ "type": "string",
4566
+ "enum": [
4567
+ "inbound",
4568
+ "outbound",
4569
+ "both"
4570
+ ],
4571
+ "default": "both",
4572
+ "description": "Filter by event direction. Defaults to both.",
4573
+ "example": "both"
4574
+ }
4575
+ }
4576
+ },
4577
+ "TimeSeriesBucket": {
4578
+ "type": "object",
4579
+ "required": [
4580
+ "timestamp"
4581
+ ],
4582
+ "properties": {
4583
+ "timestamp": {
4584
+ "type": "string",
4585
+ "format": "date-time",
4586
+ "description": "The start timestamp of the bucket"
4587
+ },
4588
+ "inbound": {
4589
+ "type": "object",
4590
+ "nullable": true,
4591
+ "description": "Inbound event counts for this bucket. Null when direction is outbound.",
4592
+ "properties": {
4593
+ "success_count": {
4594
+ "type": "integer"
4595
+ },
4596
+ "error_count": {
4597
+ "type": "integer"
4598
+ },
4599
+ "warning_count": {
4600
+ "type": "integer"
4601
+ },
4602
+ "skipped_count": {
4603
+ "type": "integer"
4604
+ },
4605
+ "total_count": {
4606
+ "type": "integer"
4607
+ }
4608
+ }
4609
+ },
4610
+ "outbound": {
4611
+ "type": "object",
4612
+ "nullable": true,
4613
+ "description": "Outbound event counts for this bucket. Null when direction is inbound.",
4614
+ "properties": {
4615
+ "success_count": {
4616
+ "type": "integer"
4617
+ },
4618
+ "error_count": {
4619
+ "type": "integer"
4620
+ },
4621
+ "pending_count": {
4622
+ "type": "integer"
4623
+ },
4624
+ "total_count": {
4625
+ "type": "integer"
4626
+ }
4627
+ }
4628
+ }
4629
+ }
4630
+ },
4484
4631
  "QueryOutboundMonitoringEventsRequest": {
4485
4632
  "type": "object",
4486
4633
  "properties": {
@@ -4921,6 +5068,51 @@
4921
5068
  }
4922
5069
  }
4923
5070
  },
5071
+ "GetMonitoringTimeSeriesResponse": {
5072
+ "description": "Time-series aggregated event counts retrieved successfully",
5073
+ "content": {
5074
+ "application/json": {
5075
+ "schema": {
5076
+ "type": "object",
5077
+ "required": [
5078
+ "interval",
5079
+ "from_date",
5080
+ "to_date",
5081
+ "buckets"
5082
+ ],
5083
+ "properties": {
5084
+ "interval": {
5085
+ "type": "string",
5086
+ "enum": [
5087
+ "5m",
5088
+ "30m",
5089
+ "1h",
5090
+ "1d"
5091
+ ],
5092
+ "description": "The time bucket interval used for aggregation"
5093
+ },
5094
+ "from_date": {
5095
+ "type": "string",
5096
+ "format": "date-time",
5097
+ "description": "Start date of the time series"
5098
+ },
5099
+ "to_date": {
5100
+ "type": "string",
5101
+ "format": "date-time",
5102
+ "description": "End date of the time series"
5103
+ },
5104
+ "buckets": {
5105
+ "type": "array",
5106
+ "items": {
5107
+ "$ref": "#/components/schemas/TimeSeriesBucket"
5108
+ },
5109
+ "description": "List of time-series buckets with event counts"
5110
+ }
5111
+ }
5112
+ }
5113
+ }
5114
+ }
5115
+ },
4924
5116
  "QueryAccessLogsResponse": {
4925
5117
  "description": "Access logs queried successfully",
4926
5118
  "content": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.19.0",
3
+ "version": "0.19.1-0",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",