@epilot/erp-integration-client 0.15.2 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={330:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(466));t.default=o.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://erp-integration-api.sls.epilot.io"}],"paths":{"/v1/erp/tracking/acknowledgement":{"post":{"operationId":"acknowledgeTracking","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/erp/trigger":{"post":{"operationId":"triggerErp","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/erp/updates/events":{"post":{"operationId":"processErpUpdatesEvents","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/events":{"post":{"operationId":"processErpUpdatesEventsV2","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/events":{"post":{"operationId":"queryMonitoringEvents","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":{}}}},"components":{"responses":{"BadRequest":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"Unauthorized":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"QueryMonitoringEventsResponse":{"content":{"application/json":{}}},"GetMonitoringStatsResponse":{"content":{"application/json":{}}},"ReplayEventsResponse":{"content":{"application/json":{}}},"ERPUpdatesResponse":{"content":{"application/json":{}}},"TriggerWebhookResponse":{"content":{"application/json":{}}},"QueryEventsResponse":{"content":{"application/json":{}}}}}}')}},t={},n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(330),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(466));t.default=o.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://erp-integration-api.sls.epilot.io"}],"paths":{"/v1/erp/tracking/acknowledgement":{"post":{"operationId":"acknowledgeTracking","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/erp/trigger":{"post":{"operationId":"triggerErp","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/erp/updates/events":{"post":{"operationId":"processErpUpdatesEvents","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/events":{"post":{"operationId":"processErpUpdatesEventsV2","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/events":{"post":{"operationId":"queryMonitoringEvents","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/access-logs":{"post":{"operationId":"queryAccessLogs","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{"responses":{"BadRequest":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"Unauthorized":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"QueryMonitoringEventsResponse":{"content":{"application/json":{}}},"GetMonitoringStatsResponse":{"content":{"application/json":{}}},"QueryAccessLogsResponse":{"content":{"application/json":{}}},"ReplayEventsResponse":{"content":{"application/json":{}}},"ERPUpdatesResponse":{"content":{"application/json":{}}},"TriggerWebhookResponse":{"content":{"application/json":{}}},"QueryEventsResponse":{"content":{"application/json":{}}}}}}')}},t={},n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(330),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
@@ -413,6 +413,25 @@
413
413
  },
414
414
  "responses": {}
415
415
  }
416
+ },
417
+ "/v1/integrations/{integrationId}/monitoring/access-logs": {
418
+ "post": {
419
+ "operationId": "queryAccessLogs",
420
+ "parameters": [
421
+ {
422
+ "name": "integrationId",
423
+ "in": "path",
424
+ "required": true
425
+ }
426
+ ],
427
+ "requestBody": {
428
+ "required": true,
429
+ "content": {
430
+ "application/json": {}
431
+ }
432
+ },
433
+ "responses": {}
434
+ }
416
435
  }
417
436
  },
418
437
  "components": {
@@ -447,6 +466,11 @@
447
466
  "application/json": {}
448
467
  }
449
468
  },
469
+ "QueryAccessLogsResponse": {
470
+ "content": {
471
+ "application/json": {}
472
+ }
473
+ },
450
474
  "ReplayEventsResponse": {
451
475
  "content": {
452
476
  "application/json": {}
package/dist/openapi.d.ts CHANGED
@@ -27,6 +27,23 @@ declare namespace Components {
27
27
  export type GetMonitoringStatsResponse = Schemas.MonitoringStats;
28
28
  export type InternalServerError = Schemas.ErrorResponseBase;
29
29
  export type NotFound = Schemas.ErrorResponseBase;
30
+ export interface QueryAccessLogsResponse {
31
+ /**
32
+ * List of access log entries
33
+ */
34
+ data?: Schemas.AccessLogEntry[];
35
+ /**
36
+ * Cursor to fetch the next page. Null if no more results.
37
+ */
38
+ next_cursor?: {
39
+ timestamp?: string; // date-time
40
+ request_id?: string;
41
+ } | null;
42
+ /**
43
+ * Indicates if more results are available
44
+ */
45
+ has_more?: boolean;
46
+ }
30
47
  export interface QueryEventsResponse {
31
48
  /**
32
49
  * List of erp events
@@ -81,6 +98,60 @@ declare namespace Components {
81
98
  export type Unauthorized = Schemas.ErrorResponseBase;
82
99
  }
83
100
  namespace Schemas {
101
+ export interface AccessLogEntry {
102
+ /**
103
+ * When the request was made
104
+ */
105
+ timestamp?: string; // date-time
106
+ /**
107
+ * Environment (e.g., 'dev', 'prod')
108
+ */
109
+ environment?: string;
110
+ /**
111
+ * Service name (e.g., 'entity', 'metering')
112
+ */
113
+ service?: string;
114
+ /**
115
+ * Unique request identifier
116
+ */
117
+ request_id?: string;
118
+ /**
119
+ * HTTP method
120
+ */
121
+ method?: string;
122
+ /**
123
+ * Request path
124
+ */
125
+ path?: string;
126
+ /**
127
+ * HTTP status code
128
+ */
129
+ status?: number;
130
+ /**
131
+ * Response latency in milliseconds
132
+ */
133
+ response_latency_ms?: number;
134
+ /**
135
+ * Response body length in bytes
136
+ */
137
+ response_length?: number;
138
+ /**
139
+ * Access token identifier
140
+ */
141
+ token_id?: string;
142
+ /**
143
+ * Organization ID
144
+ */
145
+ org_id?: string;
146
+ /**
147
+ * Request origin header
148
+ */
149
+ origin?: string;
150
+ /**
151
+ * Client IP address
152
+ */
153
+ source_ip?: string;
154
+ }
84
155
  export interface CreateInboundUseCaseRequest {
85
156
  /**
86
157
  * Use case name
@@ -774,6 +845,10 @@ declare namespace Components {
774
845
  * Total number of events in the period
775
846
  */
776
847
  total_events: number;
848
+ /**
849
+ * Total number of unique correlation IDs (a correlation_id groups multiple event_ids)
850
+ */
851
+ total_correlations: number;
777
852
  /**
778
853
  * Number of successful events
779
854
  */
@@ -882,6 +957,67 @@ declare namespace Components {
882
957
  type: "outbound";
883
958
  configuration?: /* Configuration for outbound use cases (epilot to ERP). Structure TBD. */ OutboundIntegrationEventConfiguration;
884
959
  }
960
+ export interface QueryAccessLogsRequest {
961
+ /**
962
+ * Filter by access token ID (e.g., 'api_5ZugdRXasLfWBypHi93Fk')
963
+ * example:
964
+ * api_5ZugdRXasLfWBypHi93Fk
965
+ */
966
+ token_id: string;
967
+ /**
968
+ * Filter by service name (e.g., 'entity', 'metering', 'submission-api')
969
+ * example:
970
+ * entity
971
+ */
972
+ service?: string;
973
+ /**
974
+ * Filter by HTTP method
975
+ */
976
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
977
+ /**
978
+ * Filter by request path (partial match)
979
+ * example:
980
+ * /v1/entity
981
+ */
982
+ path?: string;
983
+ /**
984
+ * Filter by HTTP status code
985
+ * example:
986
+ * 200
987
+ */
988
+ status?: number;
989
+ /**
990
+ * Filter logs from this date (inclusive)
991
+ * example:
992
+ * 2025-01-01T00:00:00Z
993
+ */
994
+ from_date?: string; // date-time
995
+ /**
996
+ * Filter logs until this date (inclusive)
997
+ * example:
998
+ * 2025-01-31T23:59:59Z
999
+ */
1000
+ to_date?: string; // date-time
1001
+ /**
1002
+ * Maximum number of results to return
1003
+ * example:
1004
+ * 50
1005
+ */
1006
+ limit?: number;
1007
+ /**
1008
+ * Cursor for pagination (infinite scroll)
1009
+ */
1010
+ cursor?: {
1011
+ /**
1012
+ * Timestamp from the last log entry in the previous page
1013
+ */
1014
+ timestamp?: string; // date-time
1015
+ /**
1016
+ * Request ID from the last log entry in the previous page
1017
+ */
1018
+ request_id?: string;
1019
+ };
1020
+ }
885
1021
  export interface QueryEventsRequest {
886
1022
  /**
887
1023
  * Filter by event ID
@@ -1762,6 +1898,22 @@ declare namespace Paths {
1762
1898
  export type $500 = Components.Responses.InternalServerError;
1763
1899
  }
1764
1900
  }
1901
+ namespace QueryAccessLogs {
1902
+ namespace Parameters {
1903
+ export type IntegrationId = string; // uuid
1904
+ }
1905
+ export interface PathParameters {
1906
+ integrationId: Parameters.IntegrationId /* uuid */;
1907
+ }
1908
+ export type RequestBody = Components.Schemas.QueryAccessLogsRequest;
1909
+ namespace Responses {
1910
+ export type $200 = Components.Responses.QueryAccessLogsResponse;
1911
+ export type $400 = Components.Responses.BadRequest;
1912
+ export type $401 = Components.Responses.Unauthorized;
1913
+ export type $404 = Components.Responses.NotFound;
1914
+ export type $500 = Components.Responses.InternalServerError;
1915
+ }
1916
+ }
1765
1917
  namespace QueryEvents {
1766
1918
  namespace Parameters {
1767
1919
  export type IntegrationId = string; // uuid
@@ -2240,6 +2392,19 @@ export interface OperationMethods {
2240
2392
  data?: Paths.GetMonitoringStats.RequestBody,
2241
2393
  config?: AxiosRequestConfig
2242
2394
  ): OperationResponse<Paths.GetMonitoringStats.Responses.$200>
2395
+ /**
2396
+ * queryAccessLogs - queryAccessLogs
2397
+ *
2398
+ * Query API access logs for a specific integration's organization.
2399
+ * Returns access token usage analytics filtered by user_id (access token).
2400
+ * Supports infinite scroll pagination with cursor-based navigation.
2401
+ *
2402
+ */
2403
+ 'queryAccessLogs'(
2404
+ parameters?: Parameters<Paths.QueryAccessLogs.PathParameters> | null,
2405
+ data?: Paths.QueryAccessLogs.RequestBody,
2406
+ config?: AxiosRequestConfig
2407
+ ): OperationResponse<Paths.QueryAccessLogs.Responses.$200>
2243
2408
  }
2244
2409
 
2245
2410
  export interface PathsDictionary {
@@ -2592,11 +2757,27 @@ export interface PathsDictionary {
2592
2757
  config?: AxiosRequestConfig
2593
2758
  ): OperationResponse<Paths.GetMonitoringStats.Responses.$200>
2594
2759
  }
2760
+ ['/v1/integrations/{integrationId}/monitoring/access-logs']: {
2761
+ /**
2762
+ * queryAccessLogs - queryAccessLogs
2763
+ *
2764
+ * Query API access logs for a specific integration's organization.
2765
+ * Returns access token usage analytics filtered by user_id (access token).
2766
+ * Supports infinite scroll pagination with cursor-based navigation.
2767
+ *
2768
+ */
2769
+ 'post'(
2770
+ parameters?: Parameters<Paths.QueryAccessLogs.PathParameters> | null,
2771
+ data?: Paths.QueryAccessLogs.RequestBody,
2772
+ config?: AxiosRequestConfig
2773
+ ): OperationResponse<Paths.QueryAccessLogs.Responses.$200>
2774
+ }
2595
2775
  }
2596
2776
 
2597
2777
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
2598
2778
 
2599
2779
 
2780
+ export type AccessLogEntry = Components.Schemas.AccessLogEntry;
2600
2781
  export type CreateInboundUseCaseRequest = Components.Schemas.CreateInboundUseCaseRequest;
2601
2782
  export type CreateIntegrationRequest = Components.Schemas.CreateIntegrationRequest;
2602
2783
  export type CreateOutboundUseCaseRequest = Components.Schemas.CreateOutboundUseCaseRequest;
@@ -2635,6 +2816,7 @@ export type MonitoringStats = Components.Schemas.MonitoringStats;
2635
2816
  export type OutboundIntegrationEventConfiguration = Components.Schemas.OutboundIntegrationEventConfiguration;
2636
2817
  export type OutboundUseCase = Components.Schemas.OutboundUseCase;
2637
2818
  export type OutboundUseCaseHistoryEntry = Components.Schemas.OutboundUseCaseHistoryEntry;
2819
+ export type QueryAccessLogsRequest = Components.Schemas.QueryAccessLogsRequest;
2638
2820
  export type QueryEventsRequest = Components.Schemas.QueryEventsRequest;
2639
2821
  export type QueryMonitoringEventsRequest = Components.Schemas.QueryMonitoringEventsRequest;
2640
2822
  export type RelationConfig = Components.Schemas.RelationConfig;
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.22.0",
5
+ "version": "0.24.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": [
@@ -2006,6 +2006,56 @@
2006
2006
  }
2007
2007
  }
2008
2008
  }
2009
+ },
2010
+ "/v1/integrations/{integrationId}/monitoring/access-logs": {
2011
+ "post": {
2012
+ "operationId": "queryAccessLogs",
2013
+ "summary": "queryAccessLogs",
2014
+ "description": "Query API access logs for a specific integration's organization.\nReturns access token usage analytics filtered by user_id (access token).\nSupports infinite scroll pagination with cursor-based navigation.\n",
2015
+ "tags": [
2016
+ "monitoring",
2017
+ "integrations"
2018
+ ],
2019
+ "parameters": [
2020
+ {
2021
+ "name": "integrationId",
2022
+ "in": "path",
2023
+ "required": true,
2024
+ "description": "The integration ID (used for tenant authorization)",
2025
+ "schema": {
2026
+ "type": "string",
2027
+ "format": "uuid"
2028
+ }
2029
+ }
2030
+ ],
2031
+ "requestBody": {
2032
+ "required": true,
2033
+ "content": {
2034
+ "application/json": {
2035
+ "schema": {
2036
+ "$ref": "#/components/schemas/QueryAccessLogsRequest"
2037
+ }
2038
+ }
2039
+ }
2040
+ },
2041
+ "responses": {
2042
+ "200": {
2043
+ "$ref": "#/components/responses/QueryAccessLogsResponse"
2044
+ },
2045
+ "400": {
2046
+ "$ref": "#/components/responses/BadRequest"
2047
+ },
2048
+ "401": {
2049
+ "$ref": "#/components/responses/Unauthorized"
2050
+ },
2051
+ "404": {
2052
+ "$ref": "#/components/responses/NotFound"
2053
+ },
2054
+ "500": {
2055
+ "$ref": "#/components/responses/InternalServerError"
2056
+ }
2057
+ }
2058
+ }
2009
2059
  }
2010
2060
  },
2011
2061
  "components": {
@@ -3731,6 +3781,140 @@
3731
3781
  }
3732
3782
  }
3733
3783
  },
3784
+ "QueryAccessLogsRequest": {
3785
+ "type": "object",
3786
+ "required": [
3787
+ "token_id"
3788
+ ],
3789
+ "properties": {
3790
+ "token_id": {
3791
+ "type": "string",
3792
+ "description": "Filter by access token ID (e.g., 'api_5ZugdRXasLfWBypHi93Fk')",
3793
+ "example": "api_5ZugdRXasLfWBypHi93Fk"
3794
+ },
3795
+ "service": {
3796
+ "type": "string",
3797
+ "description": "Filter by service name (e.g., 'entity', 'metering', 'submission-api')",
3798
+ "example": "entity"
3799
+ },
3800
+ "method": {
3801
+ "type": "string",
3802
+ "enum": [
3803
+ "GET",
3804
+ "POST",
3805
+ "PUT",
3806
+ "PATCH",
3807
+ "DELETE",
3808
+ "OPTIONS",
3809
+ "HEAD"
3810
+ ],
3811
+ "description": "Filter by HTTP method"
3812
+ },
3813
+ "path": {
3814
+ "type": "string",
3815
+ "description": "Filter by request path (partial match)",
3816
+ "example": "/v1/entity"
3817
+ },
3818
+ "status": {
3819
+ "type": "integer",
3820
+ "description": "Filter by HTTP status code",
3821
+ "example": 200
3822
+ },
3823
+ "from_date": {
3824
+ "type": "string",
3825
+ "format": "date-time",
3826
+ "description": "Filter logs from this date (inclusive)",
3827
+ "example": "2025-01-01T00:00:00Z"
3828
+ },
3829
+ "to_date": {
3830
+ "type": "string",
3831
+ "format": "date-time",
3832
+ "description": "Filter logs until this date (inclusive)",
3833
+ "example": "2025-01-31T23:59:59Z"
3834
+ },
3835
+ "limit": {
3836
+ "type": "integer",
3837
+ "description": "Maximum number of results to return",
3838
+ "example": 50,
3839
+ "default": 50,
3840
+ "minimum": 1,
3841
+ "maximum": 100
3842
+ },
3843
+ "cursor": {
3844
+ "type": "object",
3845
+ "description": "Cursor for pagination (infinite scroll)",
3846
+ "properties": {
3847
+ "timestamp": {
3848
+ "type": "string",
3849
+ "format": "date-time",
3850
+ "description": "Timestamp from the last log entry in the previous page"
3851
+ },
3852
+ "request_id": {
3853
+ "type": "string",
3854
+ "description": "Request ID from the last log entry in the previous page"
3855
+ }
3856
+ }
3857
+ }
3858
+ }
3859
+ },
3860
+ "AccessLogEntry": {
3861
+ "type": "object",
3862
+ "properties": {
3863
+ "timestamp": {
3864
+ "type": "string",
3865
+ "format": "date-time",
3866
+ "description": "When the request was made"
3867
+ },
3868
+ "environment": {
3869
+ "type": "string",
3870
+ "description": "Environment (e.g., 'dev', 'prod')"
3871
+ },
3872
+ "service": {
3873
+ "type": "string",
3874
+ "description": "Service name (e.g., 'entity', 'metering')"
3875
+ },
3876
+ "request_id": {
3877
+ "type": "string",
3878
+ "description": "Unique request identifier"
3879
+ },
3880
+ "method": {
3881
+ "type": "string",
3882
+ "description": "HTTP method"
3883
+ },
3884
+ "path": {
3885
+ "type": "string",
3886
+ "description": "Request path"
3887
+ },
3888
+ "status": {
3889
+ "type": "integer",
3890
+ "description": "HTTP status code"
3891
+ },
3892
+ "response_latency_ms": {
3893
+ "type": "integer",
3894
+ "description": "Response latency in milliseconds"
3895
+ },
3896
+ "response_length": {
3897
+ "type": "integer",
3898
+ "description": "Response body length in bytes"
3899
+ },
3900
+ "token_id": {
3901
+ "type": "string",
3902
+ "description": "Access token identifier"
3903
+ },
3904
+ "org_id": {
3905
+ "type": "string",
3906
+ "description": "Organization ID"
3907
+ },
3908
+ "origin": {
3909
+ "type": "string",
3910
+ "description": "Request origin header"
3911
+ },
3912
+ "source_ip": {
3913
+ "type": "string",
3914
+ "description": "Client IP address"
3915
+ }
3916
+ }
3917
+ },
3734
3918
  "GetMonitoringStatsRequest": {
3735
3919
  "type": "object",
3736
3920
  "properties": {
@@ -3912,6 +4096,7 @@
3912
4096
  "type": "object",
3913
4097
  "required": [
3914
4098
  "total_events",
4099
+ "total_correlations",
3915
4100
  "success_count",
3916
4101
  "error_count",
3917
4102
  "skipped_count"
@@ -3921,6 +4106,10 @@
3921
4106
  "type": "integer",
3922
4107
  "description": "Total number of events in the period"
3923
4108
  },
4109
+ "total_correlations": {
4110
+ "type": "integer",
4111
+ "description": "Total number of unique correlation IDs (a correlation_id groups multiple event_ids)"
4112
+ },
3924
4113
  "success_count": {
3925
4114
  "type": "integer",
3926
4115
  "description": "Number of successful events"
@@ -4043,6 +4232,43 @@
4043
4232
  }
4044
4233
  }
4045
4234
  },
4235
+ "QueryAccessLogsResponse": {
4236
+ "description": "Access logs queried successfully",
4237
+ "content": {
4238
+ "application/json": {
4239
+ "schema": {
4240
+ "type": "object",
4241
+ "properties": {
4242
+ "data": {
4243
+ "type": "array",
4244
+ "items": {
4245
+ "$ref": "#/components/schemas/AccessLogEntry"
4246
+ },
4247
+ "description": "List of access log entries"
4248
+ },
4249
+ "next_cursor": {
4250
+ "type": "object",
4251
+ "nullable": true,
4252
+ "description": "Cursor to fetch the next page. Null if no more results.",
4253
+ "properties": {
4254
+ "timestamp": {
4255
+ "type": "string",
4256
+ "format": "date-time"
4257
+ },
4258
+ "request_id": {
4259
+ "type": "string"
4260
+ }
4261
+ }
4262
+ },
4263
+ "has_more": {
4264
+ "type": "boolean",
4265
+ "description": "Indicates if more results are available"
4266
+ }
4267
+ }
4268
+ }
4269
+ }
4270
+ }
4271
+ },
4046
4272
  "ReplayEventsResponse": {
4047
4273
  "description": "Events replay initiated",
4048
4274
  "content": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",