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

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,42 @@ 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
+ * Success rate as percentage (0-100)
2221
+ */
2222
+ success_rate?: number; // float
2223
+ /**
2224
+ * Timestamp of the most recent error
2225
+ */
2226
+ last_error_at?: string | null; // date-time
2227
+ /**
2228
+ * Statistics breakdown by requested group_by field
2229
+ */
2230
+ breakdown?: {
2231
+ [name: string]: any;
2232
+ }[];
2233
+ }
2075
2234
  export interface OutboundConflict {
2076
2235
  /**
2077
2236
  * Type of conflict:
@@ -2540,6 +2699,57 @@ declare namespace Components {
2540
2699
  event_id?: string;
2541
2700
  };
2542
2701
  }
2702
+ export interface QueryMonitoringEventsV2Request {
2703
+ /**
2704
+ * Filter by use case ID (UUID). Empty string matches "General" events.
2705
+ */
2706
+ use_case_id?: string;
2707
+ /**
2708
+ * Filter by use case type (replaces direction)
2709
+ */
2710
+ use_case_type?: "inbound" | "outbound" | "file_proxy" | "managed_call" | "secure_proxy";
2711
+ /**
2712
+ * Filter by event level
2713
+ */
2714
+ level?: "success" | "error" | "skipped" | "warning";
2715
+ /**
2716
+ * Filter by taxonomy code (e.g. OAUTH2_TOKEN_FAILURE, HTTP_502)
2717
+ */
2718
+ code?: string;
2719
+ /**
2720
+ * Filter by trigger/inbound event ID
2721
+ */
2722
+ event_id?: string;
2723
+ /**
2724
+ * Filter by correlation ID for tracing
2725
+ */
2726
+ correlation_id?: string;
2727
+ /**
2728
+ * Filter events from this date (inclusive)
2729
+ * example:
2730
+ * 2025-01-01T00:00:00Z
2731
+ */
2732
+ from_date?: string; // date-time
2733
+ /**
2734
+ * Filter events until this date (inclusive)
2735
+ * example:
2736
+ * 2025-01-31T23:59:59Z
2737
+ */
2738
+ to_date?: string; // date-time
2739
+ /**
2740
+ * Maximum number of results to return
2741
+ * example:
2742
+ * 50
2743
+ */
2744
+ limit?: number;
2745
+ /**
2746
+ * Cursor for pagination (from previous response's next_cursor)
2747
+ */
2748
+ cursor?: {
2749
+ created_at?: string; // date-time
2750
+ id?: string; // uuid
2751
+ };
2752
+ }
2543
2753
  export interface QueryOutboundMonitoringEventsRequest {
2544
2754
  /**
2545
2755
  * 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 +3096,7 @@ declare namespace Components {
2886
3096
  enabled: boolean;
2887
3097
  vpc_mode: "static_ip" | "secure_link";
2888
3098
  allowed_domains?: string[];
3099
+ allowed_ips?: string[];
2889
3100
  integration_id: string; // uuid
2890
3101
  integration_name: string;
2891
3102
  }
@@ -2948,6 +3159,13 @@ declare namespace Components {
2948
3159
  *
2949
3160
  */
2950
3161
  allowed_domains?: string[];
3162
+ /**
3163
+ * IP allowlist (CIDR notation) for secure_link mode. Admin-only — can only be modified directly in DynamoDB via admin script.
3164
+ * Required for secure_link mode. All DNS-resolved IPs must match at least one range.
3165
+ * Example: ["10.0.1.0/24", "192.168.1.0/24"]
3166
+ *
3167
+ */
3168
+ allowed_ips?: string[];
2951
3169
  }
2952
3170
  export interface SecureProxyUseCaseHistoryEntry {
2953
3171
  /**
@@ -3039,6 +3257,32 @@ declare namespace Components {
3039
3257
  total_count?: number;
3040
3258
  } | null;
3041
3259
  }
3260
+ export interface TimeSeriesBucketV2 {
3261
+ /**
3262
+ * Bucket start timestamp
3263
+ */
3264
+ timestamp: string; // date-time
3265
+ /**
3266
+ * Number of successful events in the bucket
3267
+ */
3268
+ success_count?: number;
3269
+ /**
3270
+ * Number of error events in the bucket
3271
+ */
3272
+ error_count?: number;
3273
+ /**
3274
+ * Number of warning events in the bucket
3275
+ */
3276
+ warning_count?: number;
3277
+ /**
3278
+ * Number of skipped events in the bucket
3279
+ */
3280
+ skipped_count?: number;
3281
+ /**
3282
+ * Total events in the bucket
3283
+ */
3284
+ total_count: number;
3285
+ }
3042
3286
  export interface TriggerErpActionRequest {
3043
3287
  /**
3044
3288
  * Unique identifier of the current automation execution
@@ -3568,6 +3812,22 @@ declare namespace Paths {
3568
3812
  export type $500 = Components.Responses.InternalServerError;
3569
3813
  }
3570
3814
  }
3815
+ namespace GetMonitoringStatsV2 {
3816
+ namespace Parameters {
3817
+ export type IntegrationId = string; // uuid
3818
+ }
3819
+ export interface PathParameters {
3820
+ integrationId: Parameters.IntegrationId /* uuid */;
3821
+ }
3822
+ export type RequestBody = Components.Schemas.GetMonitoringStatsV2Request;
3823
+ namespace Responses {
3824
+ export type $200 = Components.Responses.GetMonitoringStatsV2Response;
3825
+ export type $400 = Components.Responses.BadRequest;
3826
+ export type $401 = Components.Responses.Unauthorized;
3827
+ export type $404 = Components.Responses.NotFound;
3828
+ export type $500 = Components.Responses.InternalServerError;
3829
+ }
3830
+ }
3571
3831
  namespace GetMonitoringTimeSeries {
3572
3832
  namespace Parameters {
3573
3833
  export type IntegrationId = string; // uuid
@@ -3584,6 +3844,22 @@ declare namespace Paths {
3584
3844
  export type $500 = Components.Responses.InternalServerError;
3585
3845
  }
3586
3846
  }
3847
+ namespace GetMonitoringTimeSeriesV2 {
3848
+ namespace Parameters {
3849
+ export type IntegrationId = string; // uuid
3850
+ }
3851
+ export interface PathParameters {
3852
+ integrationId: Parameters.IntegrationId /* uuid */;
3853
+ }
3854
+ export type RequestBody = Components.Schemas.GetMonitoringTimeSeriesV2Request;
3855
+ namespace Responses {
3856
+ export type $200 = Components.Responses.GetMonitoringTimeSeriesV2Response;
3857
+ export type $400 = Components.Responses.BadRequest;
3858
+ export type $401 = Components.Responses.Unauthorized;
3859
+ export type $404 = Components.Responses.NotFound;
3860
+ export type $500 = Components.Responses.InternalServerError;
3861
+ }
3862
+ }
3587
3863
  namespace GetOutboundStatus {
3588
3864
  namespace Parameters {
3589
3865
  export type IntegrationId = string; // uuid
@@ -3811,6 +4087,22 @@ declare namespace Paths {
3811
4087
  export type $500 = Components.Responses.InternalServerError;
3812
4088
  }
3813
4089
  }
4090
+ namespace QueryMonitoringEventsV2 {
4091
+ namespace Parameters {
4092
+ export type IntegrationId = string; // uuid
4093
+ }
4094
+ export interface PathParameters {
4095
+ integrationId: Parameters.IntegrationId /* uuid */;
4096
+ }
4097
+ export type RequestBody = Components.Schemas.QueryMonitoringEventsV2Request;
4098
+ namespace Responses {
4099
+ export type $200 = Components.Responses.QueryMonitoringEventsV2Response;
4100
+ export type $400 = Components.Responses.BadRequest;
4101
+ export type $401 = Components.Responses.Unauthorized;
4102
+ export type $404 = Components.Responses.NotFound;
4103
+ export type $500 = Components.Responses.InternalServerError;
4104
+ }
4105
+ }
3814
4106
  namespace QueryOutboundMonitoringEvents {
3815
4107
  namespace Parameters {
3816
4108
  export type IntegrationId = string; // uuid
@@ -4349,6 +4641,43 @@ export interface OperationMethods {
4349
4641
  data?: Paths.QueryOutboundMonitoringEvents.RequestBody,
4350
4642
  config?: AxiosRequestConfig
4351
4643
  ): OperationResponse<Paths.QueryOutboundMonitoringEvents.Responses.$200>
4644
+ /**
4645
+ * queryMonitoringEventsV2 - queryMonitoringEventsV2
4646
+ *
4647
+ * Query monitoring events from the unified erp_monitoring_v2 table.
4648
+ * Returns all event types (inbound, outbound, file_proxy, etc.) in a single list.
4649
+ * Replaces the separate v1 inbound-events and outbound-events endpoints.
4650
+ *
4651
+ */
4652
+ 'queryMonitoringEventsV2'(
4653
+ parameters?: Parameters<Paths.QueryMonitoringEventsV2.PathParameters> | null,
4654
+ data?: Paths.QueryMonitoringEventsV2.RequestBody,
4655
+ config?: AxiosRequestConfig
4656
+ ): OperationResponse<Paths.QueryMonitoringEventsV2.Responses.$200>
4657
+ /**
4658
+ * getMonitoringStatsV2 - getMonitoringStatsV2
4659
+ *
4660
+ * Get aggregated statistics from the unified erp_monitoring_v2 table.
4661
+ * Returns combined metrics for all event types with optional breakdowns.
4662
+ *
4663
+ */
4664
+ 'getMonitoringStatsV2'(
4665
+ parameters?: Parameters<Paths.GetMonitoringStatsV2.PathParameters> | null,
4666
+ data?: Paths.GetMonitoringStatsV2.RequestBody,
4667
+ config?: AxiosRequestConfig
4668
+ ): OperationResponse<Paths.GetMonitoringStatsV2.Responses.$200>
4669
+ /**
4670
+ * getMonitoringTimeSeriesV2 - getMonitoringTimeSeriesV2
4671
+ *
4672
+ * Get time-series aggregated event counts from the unified erp_monitoring_v2 table.
4673
+ * Returns bucketed counts for chart rendering.
4674
+ *
4675
+ */
4676
+ 'getMonitoringTimeSeriesV2'(
4677
+ parameters?: Parameters<Paths.GetMonitoringTimeSeriesV2.PathParameters> | null,
4678
+ data?: Paths.GetMonitoringTimeSeriesV2.RequestBody,
4679
+ config?: AxiosRequestConfig
4680
+ ): OperationResponse<Paths.GetMonitoringTimeSeriesV2.Responses.$200>
4352
4681
  /**
4353
4682
  * listSecureProxies - List all secure proxy use cases
4354
4683
  *
@@ -4812,6 +5141,49 @@ export interface PathsDictionary {
4812
5141
  config?: AxiosRequestConfig
4813
5142
  ): OperationResponse<Paths.QueryOutboundMonitoringEvents.Responses.$200>
4814
5143
  }
5144
+ ['/v2/integrations/{integrationId}/monitoring/events']: {
5145
+ /**
5146
+ * queryMonitoringEventsV2 - queryMonitoringEventsV2
5147
+ *
5148
+ * Query monitoring events from the unified erp_monitoring_v2 table.
5149
+ * Returns all event types (inbound, outbound, file_proxy, etc.) in a single list.
5150
+ * Replaces the separate v1 inbound-events and outbound-events endpoints.
5151
+ *
5152
+ */
5153
+ 'post'(
5154
+ parameters?: Parameters<Paths.QueryMonitoringEventsV2.PathParameters> | null,
5155
+ data?: Paths.QueryMonitoringEventsV2.RequestBody,
5156
+ config?: AxiosRequestConfig
5157
+ ): OperationResponse<Paths.QueryMonitoringEventsV2.Responses.$200>
5158
+ }
5159
+ ['/v2/integrations/{integrationId}/monitoring/stats']: {
5160
+ /**
5161
+ * getMonitoringStatsV2 - getMonitoringStatsV2
5162
+ *
5163
+ * Get aggregated statistics from the unified erp_monitoring_v2 table.
5164
+ * Returns combined metrics for all event types with optional breakdowns.
5165
+ *
5166
+ */
5167
+ 'post'(
5168
+ parameters?: Parameters<Paths.GetMonitoringStatsV2.PathParameters> | null,
5169
+ data?: Paths.GetMonitoringStatsV2.RequestBody,
5170
+ config?: AxiosRequestConfig
5171
+ ): OperationResponse<Paths.GetMonitoringStatsV2.Responses.$200>
5172
+ }
5173
+ ['/v2/integrations/{integrationId}/monitoring/time-series']: {
5174
+ /**
5175
+ * getMonitoringTimeSeriesV2 - getMonitoringTimeSeriesV2
5176
+ *
5177
+ * Get time-series aggregated event counts from the unified erp_monitoring_v2 table.
5178
+ * Returns bucketed counts for chart rendering.
5179
+ *
5180
+ */
5181
+ 'post'(
5182
+ parameters?: Parameters<Paths.GetMonitoringTimeSeriesV2.PathParameters> | null,
5183
+ data?: Paths.GetMonitoringTimeSeriesV2.RequestBody,
5184
+ config?: AxiosRequestConfig
5185
+ ): OperationResponse<Paths.GetMonitoringTimeSeriesV2.Responses.$200>
5186
+ }
4815
5187
  ['/v1/integrations/secure-proxies']: {
4816
5188
  /**
4817
5189
  * listSecureProxies - List all secure proxy use cases
@@ -4899,7 +5271,9 @@ export type FileProxyUseCase = Components.Schemas.FileProxyUseCase;
4899
5271
  export type FileProxyUseCaseConfiguration = Components.Schemas.FileProxyUseCaseConfiguration;
4900
5272
  export type FileProxyUseCaseHistoryEntry = Components.Schemas.FileProxyUseCaseHistoryEntry;
4901
5273
  export type GetMonitoringStatsRequest = Components.Schemas.GetMonitoringStatsRequest;
5274
+ export type GetMonitoringStatsV2Request = Components.Schemas.GetMonitoringStatsV2Request;
4902
5275
  export type GetMonitoringTimeSeriesRequest = Components.Schemas.GetMonitoringTimeSeriesRequest;
5276
+ export type GetMonitoringTimeSeriesV2Request = Components.Schemas.GetMonitoringTimeSeriesV2Request;
4903
5277
  export type InboundIntegrationEventConfiguration = Components.Schemas.InboundIntegrationEventConfiguration;
4904
5278
  export type InboundMonitoringEvent = Components.Schemas.InboundMonitoringEvent;
4905
5279
  export type InboundUseCase = Components.Schemas.InboundUseCase;
@@ -4931,7 +5305,9 @@ export type MappingSimulationWarning = Components.Schemas.MappingSimulationWarni
4931
5305
  export type MeterReadingPruneScopeConfig = Components.Schemas.MeterReadingPruneScopeConfig;
4932
5306
  export type MeterReadingUpdate = Components.Schemas.MeterReadingUpdate;
4933
5307
  export type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig;
5308
+ export type MonitoringEventV2 = Components.Schemas.MonitoringEventV2;
4934
5309
  export type MonitoringStats = Components.Schemas.MonitoringStats;
5310
+ export type MonitoringStatsV2 = Components.Schemas.MonitoringStatsV2;
4935
5311
  export type OutboundConflict = Components.Schemas.OutboundConflict;
4936
5312
  export type OutboundIntegrationEventConfiguration = Components.Schemas.OutboundIntegrationEventConfiguration;
4937
5313
  export type OutboundMapping = Components.Schemas.OutboundMapping;
@@ -4944,6 +5320,7 @@ export type PruneScopeConfig = Components.Schemas.PruneScopeConfig;
4944
5320
  export type QueryAccessLogsRequest = Components.Schemas.QueryAccessLogsRequest;
4945
5321
  export type QueryEventsRequest = Components.Schemas.QueryEventsRequest;
4946
5322
  export type QueryInboundMonitoringEventsRequest = Components.Schemas.QueryInboundMonitoringEventsRequest;
5323
+ export type QueryMonitoringEventsV2Request = Components.Schemas.QueryMonitoringEventsV2Request;
4947
5324
  export type QueryOutboundMonitoringEventsRequest = Components.Schemas.QueryOutboundMonitoringEventsRequest;
4948
5325
  export type RelationConfig = Components.Schemas.RelationConfig;
4949
5326
  export type RelationItemConfig = Components.Schemas.RelationItemConfig;
@@ -4961,6 +5338,7 @@ export type SecureProxyUseCaseConfiguration = Components.Schemas.SecureProxyUseC
4961
5338
  export type SecureProxyUseCaseHistoryEntry = Components.Schemas.SecureProxyUseCaseHistoryEntry;
4962
5339
  export type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationAppMappingRequest;
4963
5340
  export type TimeSeriesBucket = Components.Schemas.TimeSeriesBucket;
5341
+ export type TimeSeriesBucketV2 = Components.Schemas.TimeSeriesBucketV2;
4964
5342
  export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
4965
5343
  export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
4966
5344
  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,330 @@
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
+ "success_rate": {
6834
+ "type": "number",
6835
+ "format": "float",
6836
+ "description": "Success rate as percentage (0-100)"
6837
+ },
6838
+ "last_error_at": {
6839
+ "type": "string",
6840
+ "format": "date-time",
6841
+ "nullable": true,
6842
+ "description": "Timestamp of the most recent error"
6843
+ },
6844
+ "breakdown": {
6845
+ "type": "array",
6846
+ "description": "Statistics breakdown by requested group_by field",
6847
+ "items": {
6848
+ "type": "object",
6849
+ "additionalProperties": true
6850
+ }
6851
+ }
6852
+ }
6853
+ },
6854
+ "GetMonitoringTimeSeriesV2Request": {
6855
+ "type": "object",
6856
+ "required": [
6857
+ "from_date",
6858
+ "interval"
6859
+ ],
6860
+ "properties": {
6861
+ "from_date": {
6862
+ "type": "string",
6863
+ "format": "date-time",
6864
+ "description": "Start of the time range (required)",
6865
+ "example": "2025-01-01T00:00:00Z"
6866
+ },
6867
+ "to_date": {
6868
+ "type": "string",
6869
+ "format": "date-time",
6870
+ "description": "End of the time range (defaults to now)",
6871
+ "example": "2025-01-31T23:59:59Z"
6872
+ },
6873
+ "interval": {
6874
+ "type": "string",
6875
+ "enum": [
6876
+ "5m",
6877
+ "10m",
6878
+ "30m",
6879
+ "1h",
6880
+ "3h",
6881
+ "1d"
6882
+ ],
6883
+ "description": "Time bucket interval"
6884
+ },
6885
+ "use_case_type": {
6886
+ "type": "string",
6887
+ "enum": [
6888
+ "inbound",
6889
+ "outbound",
6890
+ "file_proxy",
6891
+ "managed_call",
6892
+ "secure_proxy"
6893
+ ],
6894
+ "description": "Filter by use case type"
6895
+ }
6896
+ }
6897
+ },
6898
+ "TimeSeriesBucketV2": {
6899
+ "type": "object",
6900
+ "required": [
6901
+ "timestamp",
6902
+ "total_count"
6903
+ ],
6904
+ "properties": {
6905
+ "timestamp": {
6906
+ "type": "string",
6907
+ "format": "date-time",
6908
+ "description": "Bucket start timestamp"
6909
+ },
6910
+ "success_count": {
6911
+ "type": "integer",
6912
+ "description": "Number of successful events in the bucket"
6913
+ },
6914
+ "error_count": {
6915
+ "type": "integer",
6916
+ "description": "Number of error events in the bucket"
6917
+ },
6918
+ "warning_count": {
6919
+ "type": "integer",
6920
+ "description": "Number of warning events in the bucket"
6921
+ },
6922
+ "skipped_count": {
6923
+ "type": "integer",
6924
+ "description": "Number of skipped events in the bucket"
6925
+ },
6926
+ "total_count": {
6927
+ "type": "integer",
6928
+ "description": "Total events in the bucket"
6929
+ }
6930
+ }
6443
6931
  }
6444
6932
  },
6445
6933
  "responses": {
@@ -6774,6 +7262,92 @@
6774
7262
  }
6775
7263
  }
6776
7264
  }
7265
+ },
7266
+ "QueryMonitoringEventsV2Response": {
7267
+ "description": "Monitoring events queried successfully",
7268
+ "content": {
7269
+ "application/json": {
7270
+ "schema": {
7271
+ "type": "object",
7272
+ "properties": {
7273
+ "data": {
7274
+ "type": "array",
7275
+ "items": {
7276
+ "$ref": "#/components/schemas/MonitoringEventV2"
7277
+ },
7278
+ "description": "List of monitoring events"
7279
+ },
7280
+ "next_cursor": {
7281
+ "type": "object",
7282
+ "nullable": true,
7283
+ "description": "Cursor to fetch the next page. Null if no more results.",
7284
+ "properties": {
7285
+ "created_at": {
7286
+ "type": "string",
7287
+ "format": "date-time"
7288
+ },
7289
+ "id": {
7290
+ "type": "string",
7291
+ "format": "uuid"
7292
+ }
7293
+ }
7294
+ },
7295
+ "has_more": {
7296
+ "type": "boolean",
7297
+ "description": "Indicates if more results are available"
7298
+ }
7299
+ }
7300
+ }
7301
+ }
7302
+ }
7303
+ },
7304
+ "GetMonitoringStatsV2Response": {
7305
+ "description": "Monitoring statistics retrieved successfully",
7306
+ "content": {
7307
+ "application/json": {
7308
+ "schema": {
7309
+ "$ref": "#/components/schemas/MonitoringStatsV2"
7310
+ }
7311
+ }
7312
+ }
7313
+ },
7314
+ "GetMonitoringTimeSeriesV2Response": {
7315
+ "description": "Time-series data retrieved successfully",
7316
+ "content": {
7317
+ "application/json": {
7318
+ "schema": {
7319
+ "type": "object",
7320
+ "properties": {
7321
+ "interval": {
7322
+ "type": "string",
7323
+ "enum": [
7324
+ "5m",
7325
+ "10m",
7326
+ "30m",
7327
+ "1h",
7328
+ "3h",
7329
+ "1d"
7330
+ ],
7331
+ "description": "The bucket interval"
7332
+ },
7333
+ "from_date": {
7334
+ "type": "string",
7335
+ "format": "date-time"
7336
+ },
7337
+ "to_date": {
7338
+ "type": "string",
7339
+ "format": "date-time"
7340
+ },
7341
+ "buckets": {
7342
+ "type": "array",
7343
+ "items": {
7344
+ "$ref": "#/components/schemas/TimeSeriesBucketV2"
7345
+ }
7346
+ }
7347
+ }
7348
+ }
7349
+ }
7350
+ }
6777
7351
  }
6778
7352
  }
6779
7353
  }
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-rc1",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",