@epilot/erp-integration-client 0.29.0 → 0.30.0-rc2

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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(pnpm install:*)"
5
+ ]
6
+ }
7
+ }
@@ -1 +1 @@
1
- (()=>{"use strict";var e={438(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":{}}},"/v1/integrations/secure-proxies":{"get":{"operationId":"listSecureProxies","responses":{}}},"/v1/secure-proxy":{"post":{"operationId":"secureProxy","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/managed-call/{slug}/execute":{"post":{"operationId":"managedCallExecute","parameters":[{"name":"slug","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":{}}},"Forbidden":{"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}(438),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":{}}},"/v2/integrations/{integrationId}/monitoring/events":{"post":{"operationId":"queryMonitoringEventsV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStatsV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/time-series":{"post":{"operationId":"getMonitoringTimeSeriesV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/secure-proxies":{"get":{"operationId":"listSecureProxies","responses":{}}},"/v1/secure-proxy":{"post":{"operationId":"secureProxy","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/managed-call/{slug}/execute":{"post":{"operationId":"managedCallExecute","parameters":[{"name":"slug","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":{}}},"Forbidden":{"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":{}}},"QueryMonitoringEventsV2Response":{"content":{"application/json":{}}},"GetMonitoringStatsV2Response":{"content":{"application/json":{}}},"GetMonitoringTimeSeriesV2Response":{"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})})();
@@ -497,6 +497,63 @@
497
497
  "responses": {}
498
498
  }
499
499
  },
500
+ "/v2/integrations/{integrationId}/monitoring/events": {
501
+ "post": {
502
+ "operationId": "queryMonitoringEventsV2",
503
+ "parameters": [
504
+ {
505
+ "name": "integrationId",
506
+ "in": "path",
507
+ "required": true
508
+ }
509
+ ],
510
+ "requestBody": {
511
+ "required": true,
512
+ "content": {
513
+ "application/json": {}
514
+ }
515
+ },
516
+ "responses": {}
517
+ }
518
+ },
519
+ "/v2/integrations/{integrationId}/monitoring/stats": {
520
+ "post": {
521
+ "operationId": "getMonitoringStatsV2",
522
+ "parameters": [
523
+ {
524
+ "name": "integrationId",
525
+ "in": "path",
526
+ "required": true
527
+ }
528
+ ],
529
+ "requestBody": {
530
+ "required": true,
531
+ "content": {
532
+ "application/json": {}
533
+ }
534
+ },
535
+ "responses": {}
536
+ }
537
+ },
538
+ "/v2/integrations/{integrationId}/monitoring/time-series": {
539
+ "post": {
540
+ "operationId": "getMonitoringTimeSeriesV2",
541
+ "parameters": [
542
+ {
543
+ "name": "integrationId",
544
+ "in": "path",
545
+ "required": true
546
+ }
547
+ ],
548
+ "requestBody": {
549
+ "required": true,
550
+ "content": {
551
+ "application/json": {}
552
+ }
553
+ },
554
+ "responses": {}
555
+ }
556
+ },
500
557
  "/v1/integrations/secure-proxies": {
501
558
  "get": {
502
559
  "operationId": "listSecureProxies",
@@ -606,6 +663,21 @@
606
663
  "content": {
607
664
  "application/json": {}
608
665
  }
666
+ },
667
+ "QueryMonitoringEventsV2Response": {
668
+ "content": {
669
+ "application/json": {}
670
+ }
671
+ },
672
+ "GetMonitoringStatsV2Response": {
673
+ "content": {
674
+ "application/json": {}
675
+ }
676
+ },
677
+ "GetMonitoringTimeSeriesV2Response": {
678
+ "content": {
679
+ "application/json": {}
680
+ }
609
681
  }
610
682
  }
611
683
  }
package/dist/openapi.d.ts CHANGED
@@ -24,6 +24,7 @@ declare namespace Components {
24
24
  }
25
25
  export type Forbidden = Schemas.ErrorResponseBase;
26
26
  export type GetMonitoringStatsResponse = Schemas.MonitoringStats;
27
+ export type GetMonitoringStatsV2Response = Schemas.MonitoringStatsV2;
27
28
  export interface GetMonitoringTimeSeriesResponse {
28
29
  /**
29
30
  * The time bucket interval used for aggregation
@@ -42,6 +43,15 @@ declare namespace Components {
42
43
  */
43
44
  buckets: Schemas.TimeSeriesBucket[];
44
45
  }
46
+ export interface GetMonitoringTimeSeriesV2Response {
47
+ /**
48
+ * The bucket interval
49
+ */
50
+ interval?: "5m" | "10m" | "30m" | "1h" | "3h" | "1d";
51
+ from_date?: string; // date-time
52
+ to_date?: string; // date-time
53
+ buckets?: Schemas.TimeSeriesBucketV2[];
54
+ }
45
55
  export type InternalServerError = Schemas.ErrorResponseBase;
46
56
  export type NotFound = Schemas.ErrorResponseBase;
47
57
  export interface QueryAccessLogsResponse {
@@ -105,6 +115,23 @@ declare namespace Components {
105
115
  */
106
116
  has_more?: boolean;
107
117
  }
118
+ export interface QueryMonitoringEventsV2Response {
119
+ /**
120
+ * List of monitoring events
121
+ */
122
+ data?: Schemas.MonitoringEventV2[];
123
+ /**
124
+ * Cursor to fetch the next page. Null if no more results.
125
+ */
126
+ next_cursor?: {
127
+ created_at?: string; // date-time
128
+ id?: string; // uuid
129
+ } | null;
130
+ /**
131
+ * Indicates if more results are available
132
+ */
133
+ has_more?: boolean;
134
+ }
108
135
  export interface QueryOutboundMonitoringEventsResponse {
109
136
  /**
110
137
  * List of outbound monitoring events
@@ -1142,6 +1169,28 @@ declare namespace Components {
1142
1169
  */
1143
1170
  outbound_group_by?: ("event_name" | "status" | "webhook_config_id" | "date")[];
1144
1171
  }
1172
+ export interface GetMonitoringStatsV2Request {
1173
+ /**
1174
+ * Start of the time range
1175
+ * example:
1176
+ * 2025-01-01T00:00:00Z
1177
+ */
1178
+ from_date?: string; // date-time
1179
+ /**
1180
+ * End of the time range
1181
+ * example:
1182
+ * 2025-01-31T23:59:59Z
1183
+ */
1184
+ to_date?: string; // date-time
1185
+ /**
1186
+ * Filter stats by use case type
1187
+ */
1188
+ use_case_type?: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy";
1189
+ /**
1190
+ * Field to group the breakdown by
1191
+ */
1192
+ group_by?: "use_case_id" | "use_case_type" | "level" | "code" | "date";
1193
+ }
1145
1194
  export interface GetMonitoringTimeSeriesRequest {
1146
1195
  /**
1147
1196
  * Start date for the time series (inclusive)
@@ -1168,6 +1217,28 @@ declare namespace Components {
1168
1217
  */
1169
1218
  direction?: "inbound" | "outbound" | "both";
1170
1219
  }
1220
+ export interface GetMonitoringTimeSeriesV2Request {
1221
+ /**
1222
+ * Start of the time range (required)
1223
+ * example:
1224
+ * 2025-01-01T00:00:00Z
1225
+ */
1226
+ from_date: string; // date-time
1227
+ /**
1228
+ * End of the time range (defaults to now)
1229
+ * example:
1230
+ * 2025-01-31T23:59:59Z
1231
+ */
1232
+ to_date?: string; // date-time
1233
+ /**
1234
+ * Time bucket interval
1235
+ */
1236
+ interval: "5m" | "10m" | "30m" | "1h" | "3h" | "1d";
1237
+ /**
1238
+ * Filter by use case type
1239
+ */
1240
+ use_case_type?: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy";
1241
+ }
1171
1242
  /**
1172
1243
  * Configuration for inbound use cases (ERP to epilot)
1173
1244
  */
@@ -1992,6 +2063,58 @@ declare namespace Components {
1992
2063
  ...RelationUniqueIdField[]
1993
2064
  ];
1994
2065
  }
2066
+ export interface MonitoringEventV2 {
2067
+ /**
2068
+ * Unique monitoring event ID
2069
+ */
2070
+ id: string; // uuid
2071
+ /**
2072
+ * Organization ID
2073
+ */
2074
+ org_id: string;
2075
+ /**
2076
+ * Integration ID
2077
+ */
2078
+ integration_id: string;
2079
+ /**
2080
+ * Trigger/inbound event ID (groups related monitoring events)
2081
+ */
2082
+ event_id: string;
2083
+ /**
2084
+ * Correlation ID for tracing. Empty when unavailable.
2085
+ */
2086
+ correlation_id?: string;
2087
+ /**
2088
+ * Use case ID. Empty for system-level events ("General").
2089
+ */
2090
+ use_case_id?: string;
2091
+ /**
2092
+ * Use case type. Empty for system-level events.
2093
+ */
2094
+ use_case_type: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy" | "";
2095
+ /**
2096
+ * Event outcome level
2097
+ */
2098
+ level: "success" | "error" | "skipped" | "warning";
2099
+ /**
2100
+ * Taxonomy code (e.g. OAUTH2_TOKEN_FAILURE, HTTP_502). Empty for success.
2101
+ */
2102
+ code?: string;
2103
+ /**
2104
+ * Human-readable message. Empty when not applicable.
2105
+ */
2106
+ message?: string;
2107
+ /**
2108
+ * Event-specific JSON data. Structure determined by `code`.
2109
+ */
2110
+ detail?: {
2111
+ [name: string]: any;
2112
+ } | null;
2113
+ /**
2114
+ * When the monitoring event was created
2115
+ */
2116
+ created_at: string; // date-time
2117
+ }
1995
2118
  export interface MonitoringStats {
1996
2119
  /**
1997
2120
  * Statistics for inbound (ERP sync) events
@@ -2072,6 +2195,46 @@ declare namespace Components {
2072
2195
  }[];
2073
2196
  };
2074
2197
  }
2198
+ export interface MonitoringStatsV2 {
2199
+ /**
2200
+ * Total number of events in the period
2201
+ */
2202
+ total_events: number;
2203
+ /**
2204
+ * Number of successful events
2205
+ */
2206
+ success_count: number;
2207
+ /**
2208
+ * Number of error events
2209
+ */
2210
+ error_count: number;
2211
+ /**
2212
+ * Number of warning events
2213
+ */
2214
+ warning_count: number;
2215
+ /**
2216
+ * Number of skipped events
2217
+ */
2218
+ skipped_count: number;
2219
+ /**
2220
+ * Number of ACK_TIMEOUT events (acknowledgement timed out)
2221
+ */
2222
+ ack_timeout_count?: number;
2223
+ /**
2224
+ * Success rate as percentage (0-100)
2225
+ */
2226
+ success_rate?: number; // float
2227
+ /**
2228
+ * Timestamp of the most recent error
2229
+ */
2230
+ last_error_at?: string | null; // date-time
2231
+ /**
2232
+ * Statistics breakdown by requested group_by field
2233
+ */
2234
+ breakdown?: {
2235
+ [name: string]: any;
2236
+ }[];
2237
+ }
2075
2238
  export interface OutboundConflict {
2076
2239
  /**
2077
2240
  * Type of conflict:
@@ -2540,6 +2703,57 @@ declare namespace Components {
2540
2703
  event_id?: string;
2541
2704
  };
2542
2705
  }
2706
+ export interface QueryMonitoringEventsV2Request {
2707
+ /**
2708
+ * Filter by use case ID (UUID). Empty string matches "General" events.
2709
+ */
2710
+ use_case_id?: string;
2711
+ /**
2712
+ * Filter by use case type (replaces direction)
2713
+ */
2714
+ use_case_type?: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy";
2715
+ /**
2716
+ * Filter by event level
2717
+ */
2718
+ level?: "success" | "error" | "skipped" | "warning";
2719
+ /**
2720
+ * Filter by taxonomy code (e.g. OAUTH2_TOKEN_FAILURE, HTTP_502)
2721
+ */
2722
+ code?: string;
2723
+ /**
2724
+ * Filter by trigger/inbound event ID
2725
+ */
2726
+ event_id?: string;
2727
+ /**
2728
+ * Filter by correlation ID for tracing
2729
+ */
2730
+ correlation_id?: string;
2731
+ /**
2732
+ * Filter events from this date (inclusive)
2733
+ * example:
2734
+ * 2025-01-01T00:00:00Z
2735
+ */
2736
+ from_date?: string; // date-time
2737
+ /**
2738
+ * Filter events until this date (inclusive)
2739
+ * example:
2740
+ * 2025-01-31T23:59:59Z
2741
+ */
2742
+ to_date?: string; // date-time
2743
+ /**
2744
+ * Maximum number of results to return
2745
+ * example:
2746
+ * 50
2747
+ */
2748
+ limit?: number;
2749
+ /**
2750
+ * Cursor for pagination (from previous response's next_cursor)
2751
+ */
2752
+ cursor?: {
2753
+ created_at?: string; // date-time
2754
+ id?: string; // uuid
2755
+ };
2756
+ }
2543
2757
  export interface QueryOutboundMonitoringEventsRequest {
2544
2758
  /**
2545
2759
  * Filter by event name (event_catalog_event). If not specified, returns events for all linked event names in the integration's outbound use cases.
@@ -2886,6 +3100,7 @@ declare namespace Components {
2886
3100
  enabled: boolean;
2887
3101
  vpc_mode: "static_ip" | "secure_link";
2888
3102
  allowed_domains?: string[];
3103
+ allowed_ips?: string[];
2889
3104
  integration_id: string; // uuid
2890
3105
  integration_name: string;
2891
3106
  }
@@ -2948,6 +3163,13 @@ declare namespace Components {
2948
3163
  *
2949
3164
  */
2950
3165
  allowed_domains?: string[];
3166
+ /**
3167
+ * IP allowlist (CIDR notation) for secure_link mode. Admin-only — can only be modified directly in DynamoDB via admin script.
3168
+ * Required for secure_link mode. All DNS-resolved IPs must match at least one range.
3169
+ * Example: ["10.0.1.0/24", "192.168.1.0/24"]
3170
+ *
3171
+ */
3172
+ allowed_ips?: string[];
2951
3173
  }
2952
3174
  export interface SecureProxyUseCaseHistoryEntry {
2953
3175
  /**
@@ -3039,6 +3261,32 @@ declare namespace Components {
3039
3261
  total_count?: number;
3040
3262
  } | null;
3041
3263
  }
3264
+ export interface TimeSeriesBucketV2 {
3265
+ /**
3266
+ * Bucket start timestamp
3267
+ */
3268
+ timestamp: string; // date-time
3269
+ /**
3270
+ * Number of successful events in the bucket
3271
+ */
3272
+ success_count?: number;
3273
+ /**
3274
+ * Number of error events in the bucket
3275
+ */
3276
+ error_count?: number;
3277
+ /**
3278
+ * Number of warning events in the bucket
3279
+ */
3280
+ warning_count?: number;
3281
+ /**
3282
+ * Number of skipped events in the bucket
3283
+ */
3284
+ skipped_count?: number;
3285
+ /**
3286
+ * Total events in the bucket
3287
+ */
3288
+ total_count: number;
3289
+ }
3042
3290
  export interface TriggerErpActionRequest {
3043
3291
  /**
3044
3292
  * Unique identifier of the current automation execution
@@ -3568,6 +3816,22 @@ declare namespace Paths {
3568
3816
  export type $500 = Components.Responses.InternalServerError;
3569
3817
  }
3570
3818
  }
3819
+ namespace GetMonitoringStatsV2 {
3820
+ namespace Parameters {
3821
+ export type IntegrationId = string; // uuid
3822
+ }
3823
+ export interface PathParameters {
3824
+ integrationId: Parameters.IntegrationId /* uuid */;
3825
+ }
3826
+ export type RequestBody = Components.Schemas.GetMonitoringStatsV2Request;
3827
+ namespace Responses {
3828
+ export type $200 = Components.Responses.GetMonitoringStatsV2Response;
3829
+ export type $400 = Components.Responses.BadRequest;
3830
+ export type $401 = Components.Responses.Unauthorized;
3831
+ export type $404 = Components.Responses.NotFound;
3832
+ export type $500 = Components.Responses.InternalServerError;
3833
+ }
3834
+ }
3571
3835
  namespace GetMonitoringTimeSeries {
3572
3836
  namespace Parameters {
3573
3837
  export type IntegrationId = string; // uuid
@@ -3584,6 +3848,22 @@ declare namespace Paths {
3584
3848
  export type $500 = Components.Responses.InternalServerError;
3585
3849
  }
3586
3850
  }
3851
+ namespace GetMonitoringTimeSeriesV2 {
3852
+ namespace Parameters {
3853
+ export type IntegrationId = string; // uuid
3854
+ }
3855
+ export interface PathParameters {
3856
+ integrationId: Parameters.IntegrationId /* uuid */;
3857
+ }
3858
+ export type RequestBody = Components.Schemas.GetMonitoringTimeSeriesV2Request;
3859
+ namespace Responses {
3860
+ export type $200 = Components.Responses.GetMonitoringTimeSeriesV2Response;
3861
+ export type $400 = Components.Responses.BadRequest;
3862
+ export type $401 = Components.Responses.Unauthorized;
3863
+ export type $404 = Components.Responses.NotFound;
3864
+ export type $500 = Components.Responses.InternalServerError;
3865
+ }
3866
+ }
3587
3867
  namespace GetOutboundStatus {
3588
3868
  namespace Parameters {
3589
3869
  export type IntegrationId = string; // uuid
@@ -3811,6 +4091,22 @@ declare namespace Paths {
3811
4091
  export type $500 = Components.Responses.InternalServerError;
3812
4092
  }
3813
4093
  }
4094
+ namespace QueryMonitoringEventsV2 {
4095
+ namespace Parameters {
4096
+ export type IntegrationId = string; // uuid
4097
+ }
4098
+ export interface PathParameters {
4099
+ integrationId: Parameters.IntegrationId /* uuid */;
4100
+ }
4101
+ export type RequestBody = Components.Schemas.QueryMonitoringEventsV2Request;
4102
+ namespace Responses {
4103
+ export type $200 = Components.Responses.QueryMonitoringEventsV2Response;
4104
+ export type $400 = Components.Responses.BadRequest;
4105
+ export type $401 = Components.Responses.Unauthorized;
4106
+ export type $404 = Components.Responses.NotFound;
4107
+ export type $500 = Components.Responses.InternalServerError;
4108
+ }
4109
+ }
3814
4110
  namespace QueryOutboundMonitoringEvents {
3815
4111
  namespace Parameters {
3816
4112
  export type IntegrationId = string; // uuid
@@ -4349,6 +4645,43 @@ export interface OperationMethods {
4349
4645
  data?: Paths.QueryOutboundMonitoringEvents.RequestBody,
4350
4646
  config?: AxiosRequestConfig
4351
4647
  ): OperationResponse<Paths.QueryOutboundMonitoringEvents.Responses.$200>
4648
+ /**
4649
+ * queryMonitoringEventsV2 - queryMonitoringEventsV2
4650
+ *
4651
+ * Query monitoring events from the unified erp_monitoring_v2 table.
4652
+ * Returns all event types (inbound, outbound, file_proxy, etc.) in a single list.
4653
+ * Replaces the separate v1 inbound-events and outbound-events endpoints.
4654
+ *
4655
+ */
4656
+ 'queryMonitoringEventsV2'(
4657
+ parameters?: Parameters<Paths.QueryMonitoringEventsV2.PathParameters> | null,
4658
+ data?: Paths.QueryMonitoringEventsV2.RequestBody,
4659
+ config?: AxiosRequestConfig
4660
+ ): OperationResponse<Paths.QueryMonitoringEventsV2.Responses.$200>
4661
+ /**
4662
+ * getMonitoringStatsV2 - getMonitoringStatsV2
4663
+ *
4664
+ * Get aggregated statistics from the unified erp_monitoring_v2 table.
4665
+ * Returns combined metrics for all event types with optional breakdowns.
4666
+ *
4667
+ */
4668
+ 'getMonitoringStatsV2'(
4669
+ parameters?: Parameters<Paths.GetMonitoringStatsV2.PathParameters> | null,
4670
+ data?: Paths.GetMonitoringStatsV2.RequestBody,
4671
+ config?: AxiosRequestConfig
4672
+ ): OperationResponse<Paths.GetMonitoringStatsV2.Responses.$200>
4673
+ /**
4674
+ * getMonitoringTimeSeriesV2 - getMonitoringTimeSeriesV2
4675
+ *
4676
+ * Get time-series aggregated event counts from the unified erp_monitoring_v2 table.
4677
+ * Returns bucketed counts for chart rendering.
4678
+ *
4679
+ */
4680
+ 'getMonitoringTimeSeriesV2'(
4681
+ parameters?: Parameters<Paths.GetMonitoringTimeSeriesV2.PathParameters> | null,
4682
+ data?: Paths.GetMonitoringTimeSeriesV2.RequestBody,
4683
+ config?: AxiosRequestConfig
4684
+ ): OperationResponse<Paths.GetMonitoringTimeSeriesV2.Responses.$200>
4352
4685
  /**
4353
4686
  * listSecureProxies - List all secure proxy use cases
4354
4687
  *
@@ -4812,6 +5145,49 @@ export interface PathsDictionary {
4812
5145
  config?: AxiosRequestConfig
4813
5146
  ): OperationResponse<Paths.QueryOutboundMonitoringEvents.Responses.$200>
4814
5147
  }
5148
+ ['/v2/integrations/{integrationId}/monitoring/events']: {
5149
+ /**
5150
+ * queryMonitoringEventsV2 - queryMonitoringEventsV2
5151
+ *
5152
+ * Query monitoring events from the unified erp_monitoring_v2 table.
5153
+ * Returns all event types (inbound, outbound, file_proxy, etc.) in a single list.
5154
+ * Replaces the separate v1 inbound-events and outbound-events endpoints.
5155
+ *
5156
+ */
5157
+ 'post'(
5158
+ parameters?: Parameters<Paths.QueryMonitoringEventsV2.PathParameters> | null,
5159
+ data?: Paths.QueryMonitoringEventsV2.RequestBody,
5160
+ config?: AxiosRequestConfig
5161
+ ): OperationResponse<Paths.QueryMonitoringEventsV2.Responses.$200>
5162
+ }
5163
+ ['/v2/integrations/{integrationId}/monitoring/stats']: {
5164
+ /**
5165
+ * getMonitoringStatsV2 - getMonitoringStatsV2
5166
+ *
5167
+ * Get aggregated statistics from the unified erp_monitoring_v2 table.
5168
+ * Returns combined metrics for all event types with optional breakdowns.
5169
+ *
5170
+ */
5171
+ 'post'(
5172
+ parameters?: Parameters<Paths.GetMonitoringStatsV2.PathParameters> | null,
5173
+ data?: Paths.GetMonitoringStatsV2.RequestBody,
5174
+ config?: AxiosRequestConfig
5175
+ ): OperationResponse<Paths.GetMonitoringStatsV2.Responses.$200>
5176
+ }
5177
+ ['/v2/integrations/{integrationId}/monitoring/time-series']: {
5178
+ /**
5179
+ * getMonitoringTimeSeriesV2 - getMonitoringTimeSeriesV2
5180
+ *
5181
+ * Get time-series aggregated event counts from the unified erp_monitoring_v2 table.
5182
+ * Returns bucketed counts for chart rendering.
5183
+ *
5184
+ */
5185
+ 'post'(
5186
+ parameters?: Parameters<Paths.GetMonitoringTimeSeriesV2.PathParameters> | null,
5187
+ data?: Paths.GetMonitoringTimeSeriesV2.RequestBody,
5188
+ config?: AxiosRequestConfig
5189
+ ): OperationResponse<Paths.GetMonitoringTimeSeriesV2.Responses.$200>
5190
+ }
4815
5191
  ['/v1/integrations/secure-proxies']: {
4816
5192
  /**
4817
5193
  * listSecureProxies - List all secure proxy use cases
@@ -4899,7 +5275,9 @@ export type FileProxyUseCase = Components.Schemas.FileProxyUseCase;
4899
5275
  export type FileProxyUseCaseConfiguration = Components.Schemas.FileProxyUseCaseConfiguration;
4900
5276
  export type FileProxyUseCaseHistoryEntry = Components.Schemas.FileProxyUseCaseHistoryEntry;
4901
5277
  export type GetMonitoringStatsRequest = Components.Schemas.GetMonitoringStatsRequest;
5278
+ export type GetMonitoringStatsV2Request = Components.Schemas.GetMonitoringStatsV2Request;
4902
5279
  export type GetMonitoringTimeSeriesRequest = Components.Schemas.GetMonitoringTimeSeriesRequest;
5280
+ export type GetMonitoringTimeSeriesV2Request = Components.Schemas.GetMonitoringTimeSeriesV2Request;
4903
5281
  export type InboundIntegrationEventConfiguration = Components.Schemas.InboundIntegrationEventConfiguration;
4904
5282
  export type InboundMonitoringEvent = Components.Schemas.InboundMonitoringEvent;
4905
5283
  export type InboundUseCase = Components.Schemas.InboundUseCase;
@@ -4931,7 +5309,9 @@ export type MappingSimulationWarning = Components.Schemas.MappingSimulationWarni
4931
5309
  export type MeterReadingPruneScopeConfig = Components.Schemas.MeterReadingPruneScopeConfig;
4932
5310
  export type MeterReadingUpdate = Components.Schemas.MeterReadingUpdate;
4933
5311
  export type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig;
5312
+ export type MonitoringEventV2 = Components.Schemas.MonitoringEventV2;
4934
5313
  export type MonitoringStats = Components.Schemas.MonitoringStats;
5314
+ export type MonitoringStatsV2 = Components.Schemas.MonitoringStatsV2;
4935
5315
  export type OutboundConflict = Components.Schemas.OutboundConflict;
4936
5316
  export type OutboundIntegrationEventConfiguration = Components.Schemas.OutboundIntegrationEventConfiguration;
4937
5317
  export type OutboundMapping = Components.Schemas.OutboundMapping;
@@ -4944,6 +5324,7 @@ export type PruneScopeConfig = Components.Schemas.PruneScopeConfig;
4944
5324
  export type QueryAccessLogsRequest = Components.Schemas.QueryAccessLogsRequest;
4945
5325
  export type QueryEventsRequest = Components.Schemas.QueryEventsRequest;
4946
5326
  export type QueryInboundMonitoringEventsRequest = Components.Schemas.QueryInboundMonitoringEventsRequest;
5327
+ export type QueryMonitoringEventsV2Request = Components.Schemas.QueryMonitoringEventsV2Request;
4947
5328
  export type QueryOutboundMonitoringEventsRequest = Components.Schemas.QueryOutboundMonitoringEventsRequest;
4948
5329
  export type RelationConfig = Components.Schemas.RelationConfig;
4949
5330
  export type RelationItemConfig = Components.Schemas.RelationItemConfig;
@@ -4961,6 +5342,7 @@ export type SecureProxyUseCaseConfiguration = Components.Schemas.SecureProxyUseC
4961
5342
  export type SecureProxyUseCaseHistoryEntry = Components.Schemas.SecureProxyUseCaseHistoryEntry;
4962
5343
  export type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationAppMappingRequest;
4963
5344
  export type TimeSeriesBucket = Components.Schemas.TimeSeriesBucket;
5345
+ export type TimeSeriesBucketV2 = Components.Schemas.TimeSeriesBucketV2;
4964
5346
  export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
4965
5347
  export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
4966
5348
  export type UpdateFileProxyUseCaseRequest = Components.Schemas.UpdateFileProxyUseCaseRequest;
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.50.1",
5
+ "version": "0.51.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": [
@@ -2257,6 +2257,156 @@
2257
2257
  }
2258
2258
  }
2259
2259
  },
2260
+ "/v2/integrations/{integrationId}/monitoring/events": {
2261
+ "post": {
2262
+ "operationId": "queryMonitoringEventsV2",
2263
+ "summary": "queryMonitoringEventsV2",
2264
+ "description": "Query monitoring events from the unified erp_monitoring_v2 table.\nReturns all event types (inbound, outbound, file_proxy, etc.) in a single list.\nReplaces the separate v1 inbound-events and outbound-events endpoints.\n",
2265
+ "tags": [
2266
+ "monitoring",
2267
+ "integrations"
2268
+ ],
2269
+ "parameters": [
2270
+ {
2271
+ "name": "integrationId",
2272
+ "in": "path",
2273
+ "required": true,
2274
+ "description": "The integration ID",
2275
+ "schema": {
2276
+ "type": "string",
2277
+ "format": "uuid"
2278
+ }
2279
+ }
2280
+ ],
2281
+ "requestBody": {
2282
+ "required": true,
2283
+ "content": {
2284
+ "application/json": {
2285
+ "schema": {
2286
+ "$ref": "#/components/schemas/QueryMonitoringEventsV2Request"
2287
+ }
2288
+ }
2289
+ }
2290
+ },
2291
+ "responses": {
2292
+ "200": {
2293
+ "$ref": "#/components/responses/QueryMonitoringEventsV2Response"
2294
+ },
2295
+ "400": {
2296
+ "$ref": "#/components/responses/BadRequest"
2297
+ },
2298
+ "401": {
2299
+ "$ref": "#/components/responses/Unauthorized"
2300
+ },
2301
+ "404": {
2302
+ "$ref": "#/components/responses/NotFound"
2303
+ },
2304
+ "500": {
2305
+ "$ref": "#/components/responses/InternalServerError"
2306
+ }
2307
+ }
2308
+ }
2309
+ },
2310
+ "/v2/integrations/{integrationId}/monitoring/stats": {
2311
+ "post": {
2312
+ "operationId": "getMonitoringStatsV2",
2313
+ "summary": "getMonitoringStatsV2",
2314
+ "description": "Get aggregated statistics from the unified erp_monitoring_v2 table.\nReturns combined metrics for all event types with optional breakdowns.\n",
2315
+ "tags": [
2316
+ "monitoring",
2317
+ "integrations"
2318
+ ],
2319
+ "parameters": [
2320
+ {
2321
+ "name": "integrationId",
2322
+ "in": "path",
2323
+ "required": true,
2324
+ "description": "The integration ID",
2325
+ "schema": {
2326
+ "type": "string",
2327
+ "format": "uuid"
2328
+ }
2329
+ }
2330
+ ],
2331
+ "requestBody": {
2332
+ "required": true,
2333
+ "content": {
2334
+ "application/json": {
2335
+ "schema": {
2336
+ "$ref": "#/components/schemas/GetMonitoringStatsV2Request"
2337
+ }
2338
+ }
2339
+ }
2340
+ },
2341
+ "responses": {
2342
+ "200": {
2343
+ "$ref": "#/components/responses/GetMonitoringStatsV2Response"
2344
+ },
2345
+ "400": {
2346
+ "$ref": "#/components/responses/BadRequest"
2347
+ },
2348
+ "401": {
2349
+ "$ref": "#/components/responses/Unauthorized"
2350
+ },
2351
+ "404": {
2352
+ "$ref": "#/components/responses/NotFound"
2353
+ },
2354
+ "500": {
2355
+ "$ref": "#/components/responses/InternalServerError"
2356
+ }
2357
+ }
2358
+ }
2359
+ },
2360
+ "/v2/integrations/{integrationId}/monitoring/time-series": {
2361
+ "post": {
2362
+ "operationId": "getMonitoringTimeSeriesV2",
2363
+ "summary": "getMonitoringTimeSeriesV2",
2364
+ "description": "Get time-series aggregated event counts from the unified erp_monitoring_v2 table.\nReturns bucketed counts for chart rendering.\n",
2365
+ "tags": [
2366
+ "monitoring",
2367
+ "integrations"
2368
+ ],
2369
+ "parameters": [
2370
+ {
2371
+ "name": "integrationId",
2372
+ "in": "path",
2373
+ "required": true,
2374
+ "description": "The integration ID",
2375
+ "schema": {
2376
+ "type": "string",
2377
+ "format": "uuid"
2378
+ }
2379
+ }
2380
+ ],
2381
+ "requestBody": {
2382
+ "required": true,
2383
+ "content": {
2384
+ "application/json": {
2385
+ "schema": {
2386
+ "$ref": "#/components/schemas/GetMonitoringTimeSeriesV2Request"
2387
+ }
2388
+ }
2389
+ }
2390
+ },
2391
+ "responses": {
2392
+ "200": {
2393
+ "$ref": "#/components/responses/GetMonitoringTimeSeriesV2Response"
2394
+ },
2395
+ "400": {
2396
+ "$ref": "#/components/responses/BadRequest"
2397
+ },
2398
+ "401": {
2399
+ "$ref": "#/components/responses/Unauthorized"
2400
+ },
2401
+ "404": {
2402
+ "$ref": "#/components/responses/NotFound"
2403
+ },
2404
+ "500": {
2405
+ "$ref": "#/components/responses/InternalServerError"
2406
+ }
2407
+ }
2408
+ }
2409
+ },
2260
2410
  "/v1/integrations/secure-proxies": {
2261
2411
  "get": {
2262
2412
  "operationId": "listSecureProxies",
@@ -4481,6 +4631,14 @@
4481
4631
  },
4482
4632
  "readOnly": true,
4483
4633
  "description": "Domain whitelist for secure_link mode. Admin-only — can only be modified directly in DynamoDB via admin script.\nSupports exact match (e.g., \"api.wemag.com\") and wildcard prefix (e.g., \"*.wemag.com\").\n"
4634
+ },
4635
+ "allowed_ips": {
4636
+ "type": "array",
4637
+ "items": {
4638
+ "type": "string"
4639
+ },
4640
+ "readOnly": true,
4641
+ "description": "IP allowlist (CIDR notation) for secure_link mode. Admin-only — can only be modified directly in DynamoDB via admin script.\nRequired for secure_link mode. All DNS-resolved IPs must match at least one range.\nExample: [\"10.0.1.0/24\", \"192.168.1.0/24\"]\n"
4484
4642
  }
4485
4643
  }
4486
4644
  },
@@ -4521,6 +4679,12 @@
4521
4679
  "type": "string"
4522
4680
  }
4523
4681
  },
4682
+ "allowed_ips": {
4683
+ "type": "array",
4684
+ "items": {
4685
+ "type": "string"
4686
+ }
4687
+ },
4524
4688
  "integration_id": {
4525
4689
  "type": "string",
4526
4690
  "format": "uuid"
@@ -6440,6 +6604,334 @@
6440
6604
  "description": "When processing completed"
6441
6605
  }
6442
6606
  }
6607
+ },
6608
+ "QueryMonitoringEventsV2Request": {
6609
+ "type": "object",
6610
+ "properties": {
6611
+ "use_case_id": {
6612
+ "type": "string",
6613
+ "description": "Filter by use case ID (UUID). Empty string matches \"General\" events."
6614
+ },
6615
+ "use_case_type": {
6616
+ "type": "string",
6617
+ "enum": [
6618
+ "inbound",
6619
+ "outbound",
6620
+ "file_proxy",
6621
+ "managed_call",
6622
+ "secure_proxy"
6623
+ ],
6624
+ "description": "Filter by use case type (replaces direction)"
6625
+ },
6626
+ "level": {
6627
+ "type": "string",
6628
+ "enum": [
6629
+ "success",
6630
+ "error",
6631
+ "skipped",
6632
+ "warning"
6633
+ ],
6634
+ "description": "Filter by event level"
6635
+ },
6636
+ "code": {
6637
+ "type": "string",
6638
+ "description": "Filter by taxonomy code (e.g. OAUTH2_TOKEN_FAILURE, HTTP_502)"
6639
+ },
6640
+ "event_id": {
6641
+ "type": "string",
6642
+ "description": "Filter by trigger/inbound event ID"
6643
+ },
6644
+ "correlation_id": {
6645
+ "type": "string",
6646
+ "description": "Filter by correlation ID for tracing"
6647
+ },
6648
+ "from_date": {
6649
+ "type": "string",
6650
+ "format": "date-time",
6651
+ "description": "Filter events from this date (inclusive)",
6652
+ "example": "2025-01-01T00:00:00Z"
6653
+ },
6654
+ "to_date": {
6655
+ "type": "string",
6656
+ "format": "date-time",
6657
+ "description": "Filter events until this date (inclusive)",
6658
+ "example": "2025-01-31T23:59:59Z"
6659
+ },
6660
+ "limit": {
6661
+ "type": "integer",
6662
+ "description": "Maximum number of results to return",
6663
+ "example": 50,
6664
+ "default": 50,
6665
+ "minimum": 1,
6666
+ "maximum": 100
6667
+ },
6668
+ "cursor": {
6669
+ "type": "object",
6670
+ "description": "Cursor for pagination (from previous response's next_cursor)",
6671
+ "properties": {
6672
+ "created_at": {
6673
+ "type": "string",
6674
+ "format": "date-time"
6675
+ },
6676
+ "id": {
6677
+ "type": "string",
6678
+ "format": "uuid"
6679
+ }
6680
+ }
6681
+ }
6682
+ }
6683
+ },
6684
+ "MonitoringEventV2": {
6685
+ "type": "object",
6686
+ "required": [
6687
+ "id",
6688
+ "org_id",
6689
+ "integration_id",
6690
+ "event_id",
6691
+ "use_case_type",
6692
+ "level",
6693
+ "created_at"
6694
+ ],
6695
+ "properties": {
6696
+ "id": {
6697
+ "type": "string",
6698
+ "format": "uuid",
6699
+ "description": "Unique monitoring event ID"
6700
+ },
6701
+ "org_id": {
6702
+ "type": "string",
6703
+ "description": "Organization ID"
6704
+ },
6705
+ "integration_id": {
6706
+ "type": "string",
6707
+ "description": "Integration ID"
6708
+ },
6709
+ "event_id": {
6710
+ "type": "string",
6711
+ "description": "Trigger/inbound event ID (groups related monitoring events)"
6712
+ },
6713
+ "correlation_id": {
6714
+ "type": "string",
6715
+ "description": "Correlation ID for tracing. Empty when unavailable."
6716
+ },
6717
+ "use_case_id": {
6718
+ "type": "string",
6719
+ "description": "Use case ID. Empty for system-level events (\"General\")."
6720
+ },
6721
+ "use_case_type": {
6722
+ "type": "string",
6723
+ "enum": [
6724
+ "inbound",
6725
+ "outbound",
6726
+ "file_proxy",
6727
+ "managed_call",
6728
+ "secure_proxy",
6729
+ ""
6730
+ ],
6731
+ "description": "Use case type. Empty for system-level events."
6732
+ },
6733
+ "level": {
6734
+ "type": "string",
6735
+ "enum": [
6736
+ "success",
6737
+ "error",
6738
+ "skipped",
6739
+ "warning"
6740
+ ],
6741
+ "description": "Event outcome level"
6742
+ },
6743
+ "code": {
6744
+ "type": "string",
6745
+ "description": "Taxonomy code (e.g. OAUTH2_TOKEN_FAILURE, HTTP_502). Empty for success."
6746
+ },
6747
+ "message": {
6748
+ "type": "string",
6749
+ "description": "Human-readable message. Empty when not applicable."
6750
+ },
6751
+ "detail": {
6752
+ "type": "object",
6753
+ "nullable": true,
6754
+ "additionalProperties": true,
6755
+ "description": "Event-specific JSON data. Structure determined by `code`."
6756
+ },
6757
+ "created_at": {
6758
+ "type": "string",
6759
+ "format": "date-time",
6760
+ "description": "When the monitoring event was created"
6761
+ }
6762
+ }
6763
+ },
6764
+ "GetMonitoringStatsV2Request": {
6765
+ "type": "object",
6766
+ "properties": {
6767
+ "from_date": {
6768
+ "type": "string",
6769
+ "format": "date-time",
6770
+ "description": "Start of the time range",
6771
+ "example": "2025-01-01T00:00:00Z"
6772
+ },
6773
+ "to_date": {
6774
+ "type": "string",
6775
+ "format": "date-time",
6776
+ "description": "End of the time range",
6777
+ "example": "2025-01-31T23:59:59Z"
6778
+ },
6779
+ "use_case_type": {
6780
+ "type": "string",
6781
+ "enum": [
6782
+ "inbound",
6783
+ "outbound",
6784
+ "file_proxy",
6785
+ "managed_call",
6786
+ "secure_proxy"
6787
+ ],
6788
+ "description": "Filter stats by use case type"
6789
+ },
6790
+ "group_by": {
6791
+ "type": "string",
6792
+ "enum": [
6793
+ "use_case_id",
6794
+ "use_case_type",
6795
+ "level",
6796
+ "code",
6797
+ "date"
6798
+ ],
6799
+ "description": "Field to group the breakdown by"
6800
+ }
6801
+ }
6802
+ },
6803
+ "MonitoringStatsV2": {
6804
+ "type": "object",
6805
+ "required": [
6806
+ "total_events",
6807
+ "success_count",
6808
+ "error_count",
6809
+ "warning_count",
6810
+ "skipped_count"
6811
+ ],
6812
+ "properties": {
6813
+ "total_events": {
6814
+ "type": "integer",
6815
+ "description": "Total number of events in the period"
6816
+ },
6817
+ "success_count": {
6818
+ "type": "integer",
6819
+ "description": "Number of successful events"
6820
+ },
6821
+ "error_count": {
6822
+ "type": "integer",
6823
+ "description": "Number of error events"
6824
+ },
6825
+ "warning_count": {
6826
+ "type": "integer",
6827
+ "description": "Number of warning events"
6828
+ },
6829
+ "skipped_count": {
6830
+ "type": "integer",
6831
+ "description": "Number of skipped events"
6832
+ },
6833
+ "ack_timeout_count": {
6834
+ "type": "integer",
6835
+ "description": "Number of ACK_TIMEOUT events (acknowledgement timed out)"
6836
+ },
6837
+ "success_rate": {
6838
+ "type": "number",
6839
+ "format": "float",
6840
+ "description": "Success rate as percentage (0-100)"
6841
+ },
6842
+ "last_error_at": {
6843
+ "type": "string",
6844
+ "format": "date-time",
6845
+ "nullable": true,
6846
+ "description": "Timestamp of the most recent error"
6847
+ },
6848
+ "breakdown": {
6849
+ "type": "array",
6850
+ "description": "Statistics breakdown by requested group_by field",
6851
+ "items": {
6852
+ "type": "object",
6853
+ "additionalProperties": true
6854
+ }
6855
+ }
6856
+ }
6857
+ },
6858
+ "GetMonitoringTimeSeriesV2Request": {
6859
+ "type": "object",
6860
+ "required": [
6861
+ "from_date",
6862
+ "interval"
6863
+ ],
6864
+ "properties": {
6865
+ "from_date": {
6866
+ "type": "string",
6867
+ "format": "date-time",
6868
+ "description": "Start of the time range (required)",
6869
+ "example": "2025-01-01T00:00:00Z"
6870
+ },
6871
+ "to_date": {
6872
+ "type": "string",
6873
+ "format": "date-time",
6874
+ "description": "End of the time range (defaults to now)",
6875
+ "example": "2025-01-31T23:59:59Z"
6876
+ },
6877
+ "interval": {
6878
+ "type": "string",
6879
+ "enum": [
6880
+ "5m",
6881
+ "10m",
6882
+ "30m",
6883
+ "1h",
6884
+ "3h",
6885
+ "1d"
6886
+ ],
6887
+ "description": "Time bucket interval"
6888
+ },
6889
+ "use_case_type": {
6890
+ "type": "string",
6891
+ "enum": [
6892
+ "inbound",
6893
+ "outbound",
6894
+ "file_proxy",
6895
+ "managed_call",
6896
+ "secure_proxy"
6897
+ ],
6898
+ "description": "Filter by use case type"
6899
+ }
6900
+ }
6901
+ },
6902
+ "TimeSeriesBucketV2": {
6903
+ "type": "object",
6904
+ "required": [
6905
+ "timestamp",
6906
+ "total_count"
6907
+ ],
6908
+ "properties": {
6909
+ "timestamp": {
6910
+ "type": "string",
6911
+ "format": "date-time",
6912
+ "description": "Bucket start timestamp"
6913
+ },
6914
+ "success_count": {
6915
+ "type": "integer",
6916
+ "description": "Number of successful events in the bucket"
6917
+ },
6918
+ "error_count": {
6919
+ "type": "integer",
6920
+ "description": "Number of error events in the bucket"
6921
+ },
6922
+ "warning_count": {
6923
+ "type": "integer",
6924
+ "description": "Number of warning events in the bucket"
6925
+ },
6926
+ "skipped_count": {
6927
+ "type": "integer",
6928
+ "description": "Number of skipped events in the bucket"
6929
+ },
6930
+ "total_count": {
6931
+ "type": "integer",
6932
+ "description": "Total events in the bucket"
6933
+ }
6934
+ }
6443
6935
  }
6444
6936
  },
6445
6937
  "responses": {
@@ -6774,6 +7266,92 @@
6774
7266
  }
6775
7267
  }
6776
7268
  }
7269
+ },
7270
+ "QueryMonitoringEventsV2Response": {
7271
+ "description": "Monitoring events queried successfully",
7272
+ "content": {
7273
+ "application/json": {
7274
+ "schema": {
7275
+ "type": "object",
7276
+ "properties": {
7277
+ "data": {
7278
+ "type": "array",
7279
+ "items": {
7280
+ "$ref": "#/components/schemas/MonitoringEventV2"
7281
+ },
7282
+ "description": "List of monitoring events"
7283
+ },
7284
+ "next_cursor": {
7285
+ "type": "object",
7286
+ "nullable": true,
7287
+ "description": "Cursor to fetch the next page. Null if no more results.",
7288
+ "properties": {
7289
+ "created_at": {
7290
+ "type": "string",
7291
+ "format": "date-time"
7292
+ },
7293
+ "id": {
7294
+ "type": "string",
7295
+ "format": "uuid"
7296
+ }
7297
+ }
7298
+ },
7299
+ "has_more": {
7300
+ "type": "boolean",
7301
+ "description": "Indicates if more results are available"
7302
+ }
7303
+ }
7304
+ }
7305
+ }
7306
+ }
7307
+ },
7308
+ "GetMonitoringStatsV2Response": {
7309
+ "description": "Monitoring statistics retrieved successfully",
7310
+ "content": {
7311
+ "application/json": {
7312
+ "schema": {
7313
+ "$ref": "#/components/schemas/MonitoringStatsV2"
7314
+ }
7315
+ }
7316
+ }
7317
+ },
7318
+ "GetMonitoringTimeSeriesV2Response": {
7319
+ "description": "Time-series data retrieved successfully",
7320
+ "content": {
7321
+ "application/json": {
7322
+ "schema": {
7323
+ "type": "object",
7324
+ "properties": {
7325
+ "interval": {
7326
+ "type": "string",
7327
+ "enum": [
7328
+ "5m",
7329
+ "10m",
7330
+ "30m",
7331
+ "1h",
7332
+ "3h",
7333
+ "1d"
7334
+ ],
7335
+ "description": "The bucket interval"
7336
+ },
7337
+ "from_date": {
7338
+ "type": "string",
7339
+ "format": "date-time"
7340
+ },
7341
+ "to_date": {
7342
+ "type": "string",
7343
+ "format": "date-time"
7344
+ },
7345
+ "buckets": {
7346
+ "type": "array",
7347
+ "items": {
7348
+ "$ref": "#/components/schemas/TimeSeriesBucketV2"
7349
+ }
7350
+ }
7351
+ }
7352
+ }
7353
+ }
7354
+ }
6777
7355
  }
6778
7356
  }
6779
7357
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.29.0",
3
+ "version": "0.30.0-rc2",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",