@epilot/erp-integration-client 0.15.2 → 0.15.4
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.
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +37 -0
- package/dist/openapi.d.ts +375 -7
- package/dist/openapi.json +483 -3
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={187: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}/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":{}}}},"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}(187),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
|
@@ -413,6 +413,38 @@
|
|
|
413
413
|
},
|
|
414
414
|
"responses": {}
|
|
415
415
|
}
|
|
416
|
+
},
|
|
417
|
+
"/v1/integrations/{integrationId}/outbound-status": {
|
|
418
|
+
"get": {
|
|
419
|
+
"operationId": "getOutboundStatus",
|
|
420
|
+
"parameters": [
|
|
421
|
+
{
|
|
422
|
+
"name": "integrationId",
|
|
423
|
+
"in": "path",
|
|
424
|
+
"required": true
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
"responses": {}
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"/v1/integrations/{integrationId}/monitoring/access-logs": {
|
|
431
|
+
"post": {
|
|
432
|
+
"operationId": "queryAccessLogs",
|
|
433
|
+
"parameters": [
|
|
434
|
+
{
|
|
435
|
+
"name": "integrationId",
|
|
436
|
+
"in": "path",
|
|
437
|
+
"required": true
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"requestBody": {
|
|
441
|
+
"required": true,
|
|
442
|
+
"content": {
|
|
443
|
+
"application/json": {}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"responses": {}
|
|
447
|
+
}
|
|
416
448
|
}
|
|
417
449
|
},
|
|
418
450
|
"components": {
|
|
@@ -447,6 +479,11 @@
|
|
|
447
479
|
"application/json": {}
|
|
448
480
|
}
|
|
449
481
|
},
|
|
482
|
+
"QueryAccessLogsResponse": {
|
|
483
|
+
"content": {
|
|
484
|
+
"application/json": {}
|
|
485
|
+
}
|
|
486
|
+
},
|
|
450
487
|
"ReplayEventsResponse": {
|
|
451
488
|
"content": {
|
|
452
489
|
"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
|
|
@@ -119,7 +190,7 @@ declare namespace Components {
|
|
|
119
190
|
* Use case type
|
|
120
191
|
*/
|
|
121
192
|
type: "outbound";
|
|
122
|
-
configuration?: /* Configuration for outbound use cases
|
|
193
|
+
configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration;
|
|
123
194
|
}
|
|
124
195
|
export type CreateUseCaseRequest = CreateInboundUseCaseRequest | CreateOutboundUseCaseRequest;
|
|
125
196
|
export interface CreateUseCaseRequestBase {
|
|
@@ -142,6 +213,27 @@ declare namespace Components {
|
|
|
142
213
|
*/
|
|
143
214
|
component_id: string; // uuid
|
|
144
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Configuration for how the transformed event should be delivered
|
|
218
|
+
*/
|
|
219
|
+
export interface DeliveryConfig {
|
|
220
|
+
/**
|
|
221
|
+
* Delivery mechanism type (currently only webhook is supported)
|
|
222
|
+
*/
|
|
223
|
+
type: "webhook";
|
|
224
|
+
/**
|
|
225
|
+
* Reference to the webhook configuration in svc-webhooks
|
|
226
|
+
*/
|
|
227
|
+
webhook_id: string;
|
|
228
|
+
/**
|
|
229
|
+
* Cached webhook name for display purposes
|
|
230
|
+
*/
|
|
231
|
+
webhook_name?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Cached webhook URL for display purposes
|
|
234
|
+
*/
|
|
235
|
+
webhook_url?: string;
|
|
236
|
+
}
|
|
145
237
|
export interface EmbeddedInboundUseCaseRequest {
|
|
146
238
|
/**
|
|
147
239
|
* Optional use case ID for update matching.
|
|
@@ -194,7 +286,7 @@ declare namespace Components {
|
|
|
194
286
|
* Use case type
|
|
195
287
|
*/
|
|
196
288
|
type: "outbound";
|
|
197
|
-
configuration?: /* Configuration for outbound use cases
|
|
289
|
+
configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration;
|
|
198
290
|
}
|
|
199
291
|
export type EmbeddedUseCaseRequest = EmbeddedInboundUseCaseRequest | EmbeddedOutboundUseCaseRequest;
|
|
200
292
|
export interface EmbeddedUseCaseRequestBase {
|
|
@@ -774,6 +866,10 @@ declare namespace Components {
|
|
|
774
866
|
* Total number of events in the period
|
|
775
867
|
*/
|
|
776
868
|
total_events: number;
|
|
869
|
+
/**
|
|
870
|
+
* Total number of unique correlation IDs (a correlation_id groups multiple event_ids)
|
|
871
|
+
*/
|
|
872
|
+
total_correlations: number;
|
|
777
873
|
/**
|
|
778
874
|
* Number of successful events
|
|
779
875
|
*/
|
|
@@ -801,11 +897,79 @@ declare namespace Components {
|
|
|
801
897
|
[name: string]: any;
|
|
802
898
|
}[];
|
|
803
899
|
}
|
|
900
|
+
export interface OutboundConflict {
|
|
901
|
+
/**
|
|
902
|
+
* Type of conflict:
|
|
903
|
+
* - 'event_disabled': Event catalog event is disabled while use case is enabled
|
|
904
|
+
* - 'all_webhooks_disabled': All webhooks are disabled while use case is enabled
|
|
905
|
+
* - 'event_enabled_while_disabled': Event is enabled while use case is disabled
|
|
906
|
+
* - 'webhook_enabled_while_disabled': A webhook is enabled while use case is disabled
|
|
907
|
+
*
|
|
908
|
+
*/
|
|
909
|
+
type: "event_disabled" | "all_webhooks_disabled" | "event_enabled_while_disabled" | "webhook_enabled_while_disabled";
|
|
910
|
+
/**
|
|
911
|
+
* Webhook ID (only present for webhook_enabled_while_disabled conflicts)
|
|
912
|
+
*/
|
|
913
|
+
webhookId?: string;
|
|
914
|
+
/**
|
|
915
|
+
* Human-readable description of the conflict
|
|
916
|
+
*/
|
|
917
|
+
message: string;
|
|
918
|
+
}
|
|
804
919
|
/**
|
|
805
|
-
* Configuration for outbound use cases
|
|
920
|
+
* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings.
|
|
806
921
|
*/
|
|
807
922
|
export interface OutboundIntegrationEventConfiguration {
|
|
808
|
-
|
|
923
|
+
/**
|
|
924
|
+
* The Event Catalog event name that triggers this outbound flow
|
|
925
|
+
* example:
|
|
926
|
+
* contract.created
|
|
927
|
+
*/
|
|
928
|
+
event_catalog_event: string;
|
|
929
|
+
/**
|
|
930
|
+
* List of mappings that transform and deliver the event
|
|
931
|
+
*/
|
|
932
|
+
mappings: [
|
|
933
|
+
/* A mapping that transforms an event and delivers it to a webhook */ OutboundMapping,
|
|
934
|
+
.../* A mapping that transforms an event and delivers it to a webhook */ OutboundMapping[]
|
|
935
|
+
];
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* A mapping that transforms an event and delivers it to a webhook
|
|
939
|
+
*/
|
|
940
|
+
export interface OutboundMapping {
|
|
941
|
+
/**
|
|
942
|
+
* Unique identifier for this mapping
|
|
943
|
+
*/
|
|
944
|
+
id: string; // uuid
|
|
945
|
+
/**
|
|
946
|
+
* Human-readable name for this mapping
|
|
947
|
+
* example:
|
|
948
|
+
* ERP Contract Sync
|
|
949
|
+
*/
|
|
950
|
+
name: string;
|
|
951
|
+
/**
|
|
952
|
+
* JSONata expression to transform the event payload
|
|
953
|
+
* example:
|
|
954
|
+
* { "id": entity._id, "customer": entity.customer_name }
|
|
955
|
+
*/
|
|
956
|
+
jsonata_expression: string;
|
|
957
|
+
/**
|
|
958
|
+
* Whether this mapping is active
|
|
959
|
+
*/
|
|
960
|
+
enabled: boolean;
|
|
961
|
+
delivery: /* Configuration for how the transformed event should be delivered */ DeliveryConfig;
|
|
962
|
+
/**
|
|
963
|
+
* Timestamp when the mapping was created
|
|
964
|
+
*/
|
|
965
|
+
created_at?: string; // date-time
|
|
966
|
+
/**
|
|
967
|
+
* Timestamp when the mapping was last updated
|
|
968
|
+
*/
|
|
969
|
+
updated_at?: string; // date-time
|
|
970
|
+
}
|
|
971
|
+
export interface OutboundStatusResponse {
|
|
972
|
+
useCases: OutboundUseCaseStatus[];
|
|
809
973
|
}
|
|
810
974
|
export interface OutboundUseCase {
|
|
811
975
|
/**
|
|
@@ -837,7 +1001,7 @@ declare namespace Components {
|
|
|
837
1001
|
* ISO-8601 timestamp when the use case was last updated
|
|
838
1002
|
*/
|
|
839
1003
|
updated_at: string; // date-time
|
|
840
|
-
configuration?: /* Configuration for outbound use cases
|
|
1004
|
+
configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration;
|
|
841
1005
|
}
|
|
842
1006
|
export interface OutboundUseCaseHistoryEntry {
|
|
843
1007
|
/**
|
|
@@ -880,7 +1044,105 @@ declare namespace Components {
|
|
|
880
1044
|
* Use case type
|
|
881
1045
|
*/
|
|
882
1046
|
type: "outbound";
|
|
883
|
-
configuration?: /* Configuration for outbound use cases
|
|
1047
|
+
configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration;
|
|
1048
|
+
}
|
|
1049
|
+
export interface OutboundUseCaseStatus {
|
|
1050
|
+
/**
|
|
1051
|
+
* Unique identifier for the use case
|
|
1052
|
+
*/
|
|
1053
|
+
useCaseId: string; // uuid
|
|
1054
|
+
/**
|
|
1055
|
+
* Human-readable name of the use case
|
|
1056
|
+
*/
|
|
1057
|
+
name: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* Whether the use case is enabled
|
|
1060
|
+
*/
|
|
1061
|
+
useCaseEnabled: boolean;
|
|
1062
|
+
/**
|
|
1063
|
+
* The Event Catalog event name that triggers this outbound flow
|
|
1064
|
+
* example:
|
|
1065
|
+
* contract.created
|
|
1066
|
+
*/
|
|
1067
|
+
eventCatalogEvent?: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* Whether the event is enabled in Event Catalog. Null if the API is unreachable.
|
|
1070
|
+
*/
|
|
1071
|
+
eventEnabled?: boolean | null;
|
|
1072
|
+
webhooks?: WebhookStatus[];
|
|
1073
|
+
/**
|
|
1074
|
+
* Overall status of the use case:
|
|
1075
|
+
* - 'ok': Use case is enabled and all dependencies are properly configured
|
|
1076
|
+
* - 'conflict': Use case has configuration issues (disabled events/webhooks while enabled)
|
|
1077
|
+
* - 'disabled': Use case is disabled
|
|
1078
|
+
*
|
|
1079
|
+
*/
|
|
1080
|
+
status: "ok" | "conflict" | "disabled";
|
|
1081
|
+
/**
|
|
1082
|
+
* List of detected conflicts, if any
|
|
1083
|
+
*/
|
|
1084
|
+
conflicts?: OutboundConflict[];
|
|
1085
|
+
}
|
|
1086
|
+
export interface QueryAccessLogsRequest {
|
|
1087
|
+
/**
|
|
1088
|
+
* Filter by access token ID (e.g., 'api_5ZugdRXasLfWBypHi93Fk')
|
|
1089
|
+
* example:
|
|
1090
|
+
* api_5ZugdRXasLfWBypHi93Fk
|
|
1091
|
+
*/
|
|
1092
|
+
token_id: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* Filter by service name (e.g., 'entity', 'metering', 'submission-api')
|
|
1095
|
+
* example:
|
|
1096
|
+
* entity
|
|
1097
|
+
*/
|
|
1098
|
+
service?: string;
|
|
1099
|
+
/**
|
|
1100
|
+
* Filter by HTTP method
|
|
1101
|
+
*/
|
|
1102
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
|
|
1103
|
+
/**
|
|
1104
|
+
* Filter by request path (partial match)
|
|
1105
|
+
* example:
|
|
1106
|
+
* /v1/entity
|
|
1107
|
+
*/
|
|
1108
|
+
path?: string;
|
|
1109
|
+
/**
|
|
1110
|
+
* Filter by HTTP status code
|
|
1111
|
+
* example:
|
|
1112
|
+
* 200
|
|
1113
|
+
*/
|
|
1114
|
+
status?: number;
|
|
1115
|
+
/**
|
|
1116
|
+
* Filter logs from this date (inclusive)
|
|
1117
|
+
* example:
|
|
1118
|
+
* 2025-01-01T00:00:00Z
|
|
1119
|
+
*/
|
|
1120
|
+
from_date?: string; // date-time
|
|
1121
|
+
/**
|
|
1122
|
+
* Filter logs until this date (inclusive)
|
|
1123
|
+
* example:
|
|
1124
|
+
* 2025-01-31T23:59:59Z
|
|
1125
|
+
*/
|
|
1126
|
+
to_date?: string; // date-time
|
|
1127
|
+
/**
|
|
1128
|
+
* Maximum number of results to return
|
|
1129
|
+
* example:
|
|
1130
|
+
* 50
|
|
1131
|
+
*/
|
|
1132
|
+
limit?: number;
|
|
1133
|
+
/**
|
|
1134
|
+
* Cursor for pagination (infinite scroll)
|
|
1135
|
+
*/
|
|
1136
|
+
cursor?: {
|
|
1137
|
+
/**
|
|
1138
|
+
* Timestamp from the last log entry in the previous page
|
|
1139
|
+
*/
|
|
1140
|
+
timestamp?: string; // date-time
|
|
1141
|
+
/**
|
|
1142
|
+
* Request ID from the last log entry in the previous page
|
|
1143
|
+
*/
|
|
1144
|
+
request_id?: string;
|
|
1145
|
+
};
|
|
884
1146
|
}
|
|
885
1147
|
export interface QueryEventsRequest {
|
|
886
1148
|
/**
|
|
@@ -1346,7 +1608,7 @@ declare namespace Components {
|
|
|
1346
1608
|
* Use case type
|
|
1347
1609
|
*/
|
|
1348
1610
|
type?: "outbound";
|
|
1349
|
-
configuration?: /* Configuration for outbound use cases
|
|
1611
|
+
configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration;
|
|
1350
1612
|
}
|
|
1351
1613
|
export type UpdateUseCaseRequest = UpdateInboundUseCaseRequest | UpdateOutboundUseCaseRequest;
|
|
1352
1614
|
export interface UpdateUseCaseRequestBase {
|
|
@@ -1457,6 +1719,20 @@ declare namespace Components {
|
|
|
1457
1719
|
*/
|
|
1458
1720
|
history_created_at: string; // date-time
|
|
1459
1721
|
}
|
|
1722
|
+
export interface WebhookStatus {
|
|
1723
|
+
/**
|
|
1724
|
+
* Unique identifier for the webhook
|
|
1725
|
+
*/
|
|
1726
|
+
webhookId: string;
|
|
1727
|
+
/**
|
|
1728
|
+
* Human-readable name of the webhook
|
|
1729
|
+
*/
|
|
1730
|
+
webhookName?: string;
|
|
1731
|
+
/**
|
|
1732
|
+
* Whether the webhook is enabled. Null if the API is unreachable.
|
|
1733
|
+
*/
|
|
1734
|
+
enabled?: boolean | null;
|
|
1735
|
+
}
|
|
1460
1736
|
}
|
|
1461
1737
|
}
|
|
1462
1738
|
declare namespace Paths {
|
|
@@ -1639,6 +1915,20 @@ declare namespace Paths {
|
|
|
1639
1915
|
export type $500 = Components.Responses.InternalServerError;
|
|
1640
1916
|
}
|
|
1641
1917
|
}
|
|
1918
|
+
namespace GetOutboundStatus {
|
|
1919
|
+
namespace Parameters {
|
|
1920
|
+
export type IntegrationId = string; // uuid
|
|
1921
|
+
}
|
|
1922
|
+
export interface PathParameters {
|
|
1923
|
+
integrationId: Parameters.IntegrationId /* uuid */;
|
|
1924
|
+
}
|
|
1925
|
+
namespace Responses {
|
|
1926
|
+
export type $200 = Components.Schemas.OutboundStatusResponse;
|
|
1927
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
1928
|
+
export type $404 = Components.Responses.NotFound;
|
|
1929
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1642
1932
|
namespace GetUseCase {
|
|
1643
1933
|
namespace Parameters {
|
|
1644
1934
|
export type IntegrationId = string; // uuid
|
|
@@ -1762,6 +2052,22 @@ declare namespace Paths {
|
|
|
1762
2052
|
export type $500 = Components.Responses.InternalServerError;
|
|
1763
2053
|
}
|
|
1764
2054
|
}
|
|
2055
|
+
namespace QueryAccessLogs {
|
|
2056
|
+
namespace Parameters {
|
|
2057
|
+
export type IntegrationId = string; // uuid
|
|
2058
|
+
}
|
|
2059
|
+
export interface PathParameters {
|
|
2060
|
+
integrationId: Parameters.IntegrationId /* uuid */;
|
|
2061
|
+
}
|
|
2062
|
+
export type RequestBody = Components.Schemas.QueryAccessLogsRequest;
|
|
2063
|
+
namespace Responses {
|
|
2064
|
+
export type $200 = Components.Responses.QueryAccessLogsResponse;
|
|
2065
|
+
export type $400 = Components.Responses.BadRequest;
|
|
2066
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
2067
|
+
export type $404 = Components.Responses.NotFound;
|
|
2068
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
1765
2071
|
namespace QueryEvents {
|
|
1766
2072
|
namespace Parameters {
|
|
1767
2073
|
export type IntegrationId = string; // uuid
|
|
@@ -2240,6 +2546,31 @@ export interface OperationMethods {
|
|
|
2240
2546
|
data?: Paths.GetMonitoringStats.RequestBody,
|
|
2241
2547
|
config?: AxiosRequestConfig
|
|
2242
2548
|
): OperationResponse<Paths.GetMonitoringStats.Responses.$200>
|
|
2549
|
+
/**
|
|
2550
|
+
* getOutboundStatus - getOutboundStatus
|
|
2551
|
+
*
|
|
2552
|
+
* Get the status of all outbound use cases for a specific integration.
|
|
2553
|
+
* Returns conflict information when events or webhooks are disabled but the use case is enabled.
|
|
2554
|
+
*
|
|
2555
|
+
*/
|
|
2556
|
+
'getOutboundStatus'(
|
|
2557
|
+
parameters?: Parameters<Paths.GetOutboundStatus.PathParameters> | null,
|
|
2558
|
+
data?: any,
|
|
2559
|
+
config?: AxiosRequestConfig
|
|
2560
|
+
): OperationResponse<Paths.GetOutboundStatus.Responses.$200>
|
|
2561
|
+
/**
|
|
2562
|
+
* queryAccessLogs - queryAccessLogs
|
|
2563
|
+
*
|
|
2564
|
+
* Query API access logs for a specific integration's organization.
|
|
2565
|
+
* Returns access token usage analytics filtered by user_id (access token).
|
|
2566
|
+
* Supports infinite scroll pagination with cursor-based navigation.
|
|
2567
|
+
*
|
|
2568
|
+
*/
|
|
2569
|
+
'queryAccessLogs'(
|
|
2570
|
+
parameters?: Parameters<Paths.QueryAccessLogs.PathParameters> | null,
|
|
2571
|
+
data?: Paths.QueryAccessLogs.RequestBody,
|
|
2572
|
+
config?: AxiosRequestConfig
|
|
2573
|
+
): OperationResponse<Paths.QueryAccessLogs.Responses.$200>
|
|
2243
2574
|
}
|
|
2244
2575
|
|
|
2245
2576
|
export interface PathsDictionary {
|
|
@@ -2592,17 +2923,48 @@ export interface PathsDictionary {
|
|
|
2592
2923
|
config?: AxiosRequestConfig
|
|
2593
2924
|
): OperationResponse<Paths.GetMonitoringStats.Responses.$200>
|
|
2594
2925
|
}
|
|
2926
|
+
['/v1/integrations/{integrationId}/outbound-status']: {
|
|
2927
|
+
/**
|
|
2928
|
+
* getOutboundStatus - getOutboundStatus
|
|
2929
|
+
*
|
|
2930
|
+
* Get the status of all outbound use cases for a specific integration.
|
|
2931
|
+
* Returns conflict information when events or webhooks are disabled but the use case is enabled.
|
|
2932
|
+
*
|
|
2933
|
+
*/
|
|
2934
|
+
'get'(
|
|
2935
|
+
parameters?: Parameters<Paths.GetOutboundStatus.PathParameters> | null,
|
|
2936
|
+
data?: any,
|
|
2937
|
+
config?: AxiosRequestConfig
|
|
2938
|
+
): OperationResponse<Paths.GetOutboundStatus.Responses.$200>
|
|
2939
|
+
}
|
|
2940
|
+
['/v1/integrations/{integrationId}/monitoring/access-logs']: {
|
|
2941
|
+
/**
|
|
2942
|
+
* queryAccessLogs - queryAccessLogs
|
|
2943
|
+
*
|
|
2944
|
+
* Query API access logs for a specific integration's organization.
|
|
2945
|
+
* Returns access token usage analytics filtered by user_id (access token).
|
|
2946
|
+
* Supports infinite scroll pagination with cursor-based navigation.
|
|
2947
|
+
*
|
|
2948
|
+
*/
|
|
2949
|
+
'post'(
|
|
2950
|
+
parameters?: Parameters<Paths.QueryAccessLogs.PathParameters> | null,
|
|
2951
|
+
data?: Paths.QueryAccessLogs.RequestBody,
|
|
2952
|
+
config?: AxiosRequestConfig
|
|
2953
|
+
): OperationResponse<Paths.QueryAccessLogs.Responses.$200>
|
|
2954
|
+
}
|
|
2595
2955
|
}
|
|
2596
2956
|
|
|
2597
2957
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
2598
2958
|
|
|
2599
2959
|
|
|
2960
|
+
export type AccessLogEntry = Components.Schemas.AccessLogEntry;
|
|
2600
2961
|
export type CreateInboundUseCaseRequest = Components.Schemas.CreateInboundUseCaseRequest;
|
|
2601
2962
|
export type CreateIntegrationRequest = Components.Schemas.CreateIntegrationRequest;
|
|
2602
2963
|
export type CreateOutboundUseCaseRequest = Components.Schemas.CreateOutboundUseCaseRequest;
|
|
2603
2964
|
export type CreateUseCaseRequest = Components.Schemas.CreateUseCaseRequest;
|
|
2604
2965
|
export type CreateUseCaseRequestBase = Components.Schemas.CreateUseCaseRequestBase;
|
|
2605
2966
|
export type DeleteIntegrationAppMappingRequest = Components.Schemas.DeleteIntegrationAppMappingRequest;
|
|
2967
|
+
export type DeliveryConfig = Components.Schemas.DeliveryConfig;
|
|
2606
2968
|
export type EmbeddedInboundUseCaseRequest = Components.Schemas.EmbeddedInboundUseCaseRequest;
|
|
2607
2969
|
export type EmbeddedOutboundUseCaseRequest = Components.Schemas.EmbeddedOutboundUseCaseRequest;
|
|
2608
2970
|
export type EmbeddedUseCaseRequest = Components.Schemas.EmbeddedUseCaseRequest;
|
|
@@ -2632,9 +2994,14 @@ export type MeterReadingUpdate = Components.Schemas.MeterReadingUpdate;
|
|
|
2632
2994
|
export type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig;
|
|
2633
2995
|
export type MonitoringEvent = Components.Schemas.MonitoringEvent;
|
|
2634
2996
|
export type MonitoringStats = Components.Schemas.MonitoringStats;
|
|
2997
|
+
export type OutboundConflict = Components.Schemas.OutboundConflict;
|
|
2635
2998
|
export type OutboundIntegrationEventConfiguration = Components.Schemas.OutboundIntegrationEventConfiguration;
|
|
2999
|
+
export type OutboundMapping = Components.Schemas.OutboundMapping;
|
|
3000
|
+
export type OutboundStatusResponse = Components.Schemas.OutboundStatusResponse;
|
|
2636
3001
|
export type OutboundUseCase = Components.Schemas.OutboundUseCase;
|
|
2637
3002
|
export type OutboundUseCaseHistoryEntry = Components.Schemas.OutboundUseCaseHistoryEntry;
|
|
3003
|
+
export type OutboundUseCaseStatus = Components.Schemas.OutboundUseCaseStatus;
|
|
3004
|
+
export type QueryAccessLogsRequest = Components.Schemas.QueryAccessLogsRequest;
|
|
2638
3005
|
export type QueryEventsRequest = Components.Schemas.QueryEventsRequest;
|
|
2639
3006
|
export type QueryMonitoringEventsRequest = Components.Schemas.QueryMonitoringEventsRequest;
|
|
2640
3007
|
export type RelationConfig = Components.Schemas.RelationConfig;
|
|
@@ -2658,3 +3025,4 @@ export type UseCase = Components.Schemas.UseCase;
|
|
|
2658
3025
|
export type UseCaseBase = Components.Schemas.UseCaseBase;
|
|
2659
3026
|
export type UseCaseHistoryEntry = Components.Schemas.UseCaseHistoryEntry;
|
|
2660
3027
|
export type UseCaseHistoryEntryBase = Components.Schemas.UseCaseHistoryEntryBase;
|
|
3028
|
+
export type WebhookStatus = Components.Schemas.WebhookStatus;
|
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.
|
|
5
|
+
"version": "0.25.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,99 @@
|
|
|
2006
2006
|
}
|
|
2007
2007
|
}
|
|
2008
2008
|
}
|
|
2009
|
+
},
|
|
2010
|
+
"/v1/integrations/{integrationId}/outbound-status": {
|
|
2011
|
+
"get": {
|
|
2012
|
+
"operationId": "getOutboundStatus",
|
|
2013
|
+
"summary": "getOutboundStatus",
|
|
2014
|
+
"description": "Get the status of all outbound use cases for a specific integration.\nReturns conflict information when events or webhooks are disabled but the use case is enabled.\n",
|
|
2015
|
+
"tags": [
|
|
2016
|
+
"integrations"
|
|
2017
|
+
],
|
|
2018
|
+
"parameters": [
|
|
2019
|
+
{
|
|
2020
|
+
"name": "integrationId",
|
|
2021
|
+
"in": "path",
|
|
2022
|
+
"required": true,
|
|
2023
|
+
"description": "The integration ID",
|
|
2024
|
+
"schema": {
|
|
2025
|
+
"type": "string",
|
|
2026
|
+
"format": "uuid"
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
],
|
|
2030
|
+
"responses": {
|
|
2031
|
+
"200": {
|
|
2032
|
+
"description": "Successfully retrieved outbound status",
|
|
2033
|
+
"content": {
|
|
2034
|
+
"application/json": {
|
|
2035
|
+
"schema": {
|
|
2036
|
+
"$ref": "#/components/schemas/OutboundStatusResponse"
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
},
|
|
2041
|
+
"401": {
|
|
2042
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
2043
|
+
},
|
|
2044
|
+
"404": {
|
|
2045
|
+
"$ref": "#/components/responses/NotFound"
|
|
2046
|
+
},
|
|
2047
|
+
"500": {
|
|
2048
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
},
|
|
2053
|
+
"/v1/integrations/{integrationId}/monitoring/access-logs": {
|
|
2054
|
+
"post": {
|
|
2055
|
+
"operationId": "queryAccessLogs",
|
|
2056
|
+
"summary": "queryAccessLogs",
|
|
2057
|
+
"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",
|
|
2058
|
+
"tags": [
|
|
2059
|
+
"monitoring",
|
|
2060
|
+
"integrations"
|
|
2061
|
+
],
|
|
2062
|
+
"parameters": [
|
|
2063
|
+
{
|
|
2064
|
+
"name": "integrationId",
|
|
2065
|
+
"in": "path",
|
|
2066
|
+
"required": true,
|
|
2067
|
+
"description": "The integration ID (used for tenant authorization)",
|
|
2068
|
+
"schema": {
|
|
2069
|
+
"type": "string",
|
|
2070
|
+
"format": "uuid"
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
],
|
|
2074
|
+
"requestBody": {
|
|
2075
|
+
"required": true,
|
|
2076
|
+
"content": {
|
|
2077
|
+
"application/json": {
|
|
2078
|
+
"schema": {
|
|
2079
|
+
"$ref": "#/components/schemas/QueryAccessLogsRequest"
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
},
|
|
2084
|
+
"responses": {
|
|
2085
|
+
"200": {
|
|
2086
|
+
"$ref": "#/components/responses/QueryAccessLogsResponse"
|
|
2087
|
+
},
|
|
2088
|
+
"400": {
|
|
2089
|
+
"$ref": "#/components/responses/BadRequest"
|
|
2090
|
+
},
|
|
2091
|
+
"401": {
|
|
2092
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
2093
|
+
},
|
|
2094
|
+
"404": {
|
|
2095
|
+
"$ref": "#/components/responses/NotFound"
|
|
2096
|
+
},
|
|
2097
|
+
"500": {
|
|
2098
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2009
2102
|
}
|
|
2010
2103
|
},
|
|
2011
2104
|
"components": {
|
|
@@ -3065,8 +3158,219 @@
|
|
|
3065
3158
|
},
|
|
3066
3159
|
"OutboundIntegrationEventConfiguration": {
|
|
3067
3160
|
"type": "object",
|
|
3068
|
-
"
|
|
3069
|
-
|
|
3161
|
+
"required": [
|
|
3162
|
+
"event_catalog_event",
|
|
3163
|
+
"mappings"
|
|
3164
|
+
],
|
|
3165
|
+
"description": "Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings.",
|
|
3166
|
+
"properties": {
|
|
3167
|
+
"event_catalog_event": {
|
|
3168
|
+
"type": "string",
|
|
3169
|
+
"description": "The Event Catalog event name that triggers this outbound flow",
|
|
3170
|
+
"example": "contract.created"
|
|
3171
|
+
},
|
|
3172
|
+
"mappings": {
|
|
3173
|
+
"type": "array",
|
|
3174
|
+
"minItems": 1,
|
|
3175
|
+
"items": {
|
|
3176
|
+
"$ref": "#/components/schemas/OutboundMapping"
|
|
3177
|
+
},
|
|
3178
|
+
"description": "List of mappings that transform and deliver the event"
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
},
|
|
3182
|
+
"OutboundMapping": {
|
|
3183
|
+
"type": "object",
|
|
3184
|
+
"required": [
|
|
3185
|
+
"id",
|
|
3186
|
+
"name",
|
|
3187
|
+
"jsonata_expression",
|
|
3188
|
+
"enabled",
|
|
3189
|
+
"delivery"
|
|
3190
|
+
],
|
|
3191
|
+
"description": "A mapping that transforms an event and delivers it to a webhook",
|
|
3192
|
+
"properties": {
|
|
3193
|
+
"id": {
|
|
3194
|
+
"type": "string",
|
|
3195
|
+
"format": "uuid",
|
|
3196
|
+
"description": "Unique identifier for this mapping"
|
|
3197
|
+
},
|
|
3198
|
+
"name": {
|
|
3199
|
+
"type": "string",
|
|
3200
|
+
"description": "Human-readable name for this mapping",
|
|
3201
|
+
"example": "ERP Contract Sync"
|
|
3202
|
+
},
|
|
3203
|
+
"jsonata_expression": {
|
|
3204
|
+
"type": "string",
|
|
3205
|
+
"description": "JSONata expression to transform the event payload",
|
|
3206
|
+
"example": "{ \"id\": entity._id, \"customer\": entity.customer_name }"
|
|
3207
|
+
},
|
|
3208
|
+
"enabled": {
|
|
3209
|
+
"type": "boolean",
|
|
3210
|
+
"description": "Whether this mapping is active",
|
|
3211
|
+
"default": true
|
|
3212
|
+
},
|
|
3213
|
+
"delivery": {
|
|
3214
|
+
"$ref": "#/components/schemas/DeliveryConfig"
|
|
3215
|
+
},
|
|
3216
|
+
"created_at": {
|
|
3217
|
+
"type": "string",
|
|
3218
|
+
"format": "date-time",
|
|
3219
|
+
"description": "Timestamp when the mapping was created"
|
|
3220
|
+
},
|
|
3221
|
+
"updated_at": {
|
|
3222
|
+
"type": "string",
|
|
3223
|
+
"format": "date-time",
|
|
3224
|
+
"description": "Timestamp when the mapping was last updated"
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
},
|
|
3228
|
+
"DeliveryConfig": {
|
|
3229
|
+
"type": "object",
|
|
3230
|
+
"required": [
|
|
3231
|
+
"type",
|
|
3232
|
+
"webhook_id"
|
|
3233
|
+
],
|
|
3234
|
+
"description": "Configuration for how the transformed event should be delivered",
|
|
3235
|
+
"properties": {
|
|
3236
|
+
"type": {
|
|
3237
|
+
"type": "string",
|
|
3238
|
+
"enum": [
|
|
3239
|
+
"webhook"
|
|
3240
|
+
],
|
|
3241
|
+
"description": "Delivery mechanism type (currently only webhook is supported)"
|
|
3242
|
+
},
|
|
3243
|
+
"webhook_id": {
|
|
3244
|
+
"type": "string",
|
|
3245
|
+
"description": "Reference to the webhook configuration in svc-webhooks"
|
|
3246
|
+
},
|
|
3247
|
+
"webhook_name": {
|
|
3248
|
+
"type": "string",
|
|
3249
|
+
"description": "Cached webhook name for display purposes"
|
|
3250
|
+
},
|
|
3251
|
+
"webhook_url": {
|
|
3252
|
+
"type": "string",
|
|
3253
|
+
"description": "Cached webhook URL for display purposes"
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
},
|
|
3257
|
+
"OutboundStatusResponse": {
|
|
3258
|
+
"type": "object",
|
|
3259
|
+
"required": [
|
|
3260
|
+
"useCases"
|
|
3261
|
+
],
|
|
3262
|
+
"properties": {
|
|
3263
|
+
"useCases": {
|
|
3264
|
+
"type": "array",
|
|
3265
|
+
"items": {
|
|
3266
|
+
"$ref": "#/components/schemas/OutboundUseCaseStatus"
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3270
|
+
},
|
|
3271
|
+
"OutboundUseCaseStatus": {
|
|
3272
|
+
"type": "object",
|
|
3273
|
+
"required": [
|
|
3274
|
+
"useCaseId",
|
|
3275
|
+
"name",
|
|
3276
|
+
"useCaseEnabled",
|
|
3277
|
+
"status"
|
|
3278
|
+
],
|
|
3279
|
+
"properties": {
|
|
3280
|
+
"useCaseId": {
|
|
3281
|
+
"type": "string",
|
|
3282
|
+
"format": "uuid",
|
|
3283
|
+
"description": "Unique identifier for the use case"
|
|
3284
|
+
},
|
|
3285
|
+
"name": {
|
|
3286
|
+
"type": "string",
|
|
3287
|
+
"description": "Human-readable name of the use case"
|
|
3288
|
+
},
|
|
3289
|
+
"useCaseEnabled": {
|
|
3290
|
+
"type": "boolean",
|
|
3291
|
+
"description": "Whether the use case is enabled"
|
|
3292
|
+
},
|
|
3293
|
+
"eventCatalogEvent": {
|
|
3294
|
+
"type": "string",
|
|
3295
|
+
"description": "The Event Catalog event name that triggers this outbound flow",
|
|
3296
|
+
"example": "contract.created"
|
|
3297
|
+
},
|
|
3298
|
+
"eventEnabled": {
|
|
3299
|
+
"type": "boolean",
|
|
3300
|
+
"nullable": true,
|
|
3301
|
+
"description": "Whether the event is enabled in Event Catalog. Null if the API is unreachable."
|
|
3302
|
+
},
|
|
3303
|
+
"webhooks": {
|
|
3304
|
+
"type": "array",
|
|
3305
|
+
"items": {
|
|
3306
|
+
"$ref": "#/components/schemas/WebhookStatus"
|
|
3307
|
+
}
|
|
3308
|
+
},
|
|
3309
|
+
"status": {
|
|
3310
|
+
"type": "string",
|
|
3311
|
+
"enum": [
|
|
3312
|
+
"ok",
|
|
3313
|
+
"conflict",
|
|
3314
|
+
"disabled"
|
|
3315
|
+
],
|
|
3316
|
+
"description": "Overall status of the use case:\n- 'ok': Use case is enabled and all dependencies are properly configured\n- 'conflict': Use case has configuration issues (disabled events/webhooks while enabled)\n- 'disabled': Use case is disabled\n"
|
|
3317
|
+
},
|
|
3318
|
+
"conflicts": {
|
|
3319
|
+
"type": "array",
|
|
3320
|
+
"items": {
|
|
3321
|
+
"$ref": "#/components/schemas/OutboundConflict"
|
|
3322
|
+
},
|
|
3323
|
+
"description": "List of detected conflicts, if any"
|
|
3324
|
+
}
|
|
3325
|
+
}
|
|
3326
|
+
},
|
|
3327
|
+
"WebhookStatus": {
|
|
3328
|
+
"type": "object",
|
|
3329
|
+
"required": [
|
|
3330
|
+
"webhookId"
|
|
3331
|
+
],
|
|
3332
|
+
"properties": {
|
|
3333
|
+
"webhookId": {
|
|
3334
|
+
"type": "string",
|
|
3335
|
+
"description": "Unique identifier for the webhook"
|
|
3336
|
+
},
|
|
3337
|
+
"webhookName": {
|
|
3338
|
+
"type": "string",
|
|
3339
|
+
"description": "Human-readable name of the webhook"
|
|
3340
|
+
},
|
|
3341
|
+
"enabled": {
|
|
3342
|
+
"type": "boolean",
|
|
3343
|
+
"nullable": true,
|
|
3344
|
+
"description": "Whether the webhook is enabled. Null if the API is unreachable."
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
},
|
|
3348
|
+
"OutboundConflict": {
|
|
3349
|
+
"type": "object",
|
|
3350
|
+
"required": [
|
|
3351
|
+
"type",
|
|
3352
|
+
"message"
|
|
3353
|
+
],
|
|
3354
|
+
"properties": {
|
|
3355
|
+
"type": {
|
|
3356
|
+
"type": "string",
|
|
3357
|
+
"enum": [
|
|
3358
|
+
"event_disabled",
|
|
3359
|
+
"all_webhooks_disabled",
|
|
3360
|
+
"event_enabled_while_disabled",
|
|
3361
|
+
"webhook_enabled_while_disabled"
|
|
3362
|
+
],
|
|
3363
|
+
"description": "Type of conflict:\n- 'event_disabled': Event catalog event is disabled while use case is enabled\n- 'all_webhooks_disabled': All webhooks are disabled while use case is enabled\n- 'event_enabled_while_disabled': Event is enabled while use case is disabled\n- 'webhook_enabled_while_disabled': A webhook is enabled while use case is disabled\n"
|
|
3364
|
+
},
|
|
3365
|
+
"webhookId": {
|
|
3366
|
+
"type": "string",
|
|
3367
|
+
"description": "Webhook ID (only present for webhook_enabled_while_disabled conflicts)"
|
|
3368
|
+
},
|
|
3369
|
+
"message": {
|
|
3370
|
+
"type": "string",
|
|
3371
|
+
"description": "Human-readable description of the conflict"
|
|
3372
|
+
}
|
|
3373
|
+
}
|
|
3070
3374
|
},
|
|
3071
3375
|
"IntegrationEntity": {
|
|
3072
3376
|
"type": "object",
|
|
@@ -3731,6 +4035,140 @@
|
|
|
3731
4035
|
}
|
|
3732
4036
|
}
|
|
3733
4037
|
},
|
|
4038
|
+
"QueryAccessLogsRequest": {
|
|
4039
|
+
"type": "object",
|
|
4040
|
+
"required": [
|
|
4041
|
+
"token_id"
|
|
4042
|
+
],
|
|
4043
|
+
"properties": {
|
|
4044
|
+
"token_id": {
|
|
4045
|
+
"type": "string",
|
|
4046
|
+
"description": "Filter by access token ID (e.g., 'api_5ZugdRXasLfWBypHi93Fk')",
|
|
4047
|
+
"example": "api_5ZugdRXasLfWBypHi93Fk"
|
|
4048
|
+
},
|
|
4049
|
+
"service": {
|
|
4050
|
+
"type": "string",
|
|
4051
|
+
"description": "Filter by service name (e.g., 'entity', 'metering', 'submission-api')",
|
|
4052
|
+
"example": "entity"
|
|
4053
|
+
},
|
|
4054
|
+
"method": {
|
|
4055
|
+
"type": "string",
|
|
4056
|
+
"enum": [
|
|
4057
|
+
"GET",
|
|
4058
|
+
"POST",
|
|
4059
|
+
"PUT",
|
|
4060
|
+
"PATCH",
|
|
4061
|
+
"DELETE",
|
|
4062
|
+
"OPTIONS",
|
|
4063
|
+
"HEAD"
|
|
4064
|
+
],
|
|
4065
|
+
"description": "Filter by HTTP method"
|
|
4066
|
+
},
|
|
4067
|
+
"path": {
|
|
4068
|
+
"type": "string",
|
|
4069
|
+
"description": "Filter by request path (partial match)",
|
|
4070
|
+
"example": "/v1/entity"
|
|
4071
|
+
},
|
|
4072
|
+
"status": {
|
|
4073
|
+
"type": "integer",
|
|
4074
|
+
"description": "Filter by HTTP status code",
|
|
4075
|
+
"example": 200
|
|
4076
|
+
},
|
|
4077
|
+
"from_date": {
|
|
4078
|
+
"type": "string",
|
|
4079
|
+
"format": "date-time",
|
|
4080
|
+
"description": "Filter logs from this date (inclusive)",
|
|
4081
|
+
"example": "2025-01-01T00:00:00Z"
|
|
4082
|
+
},
|
|
4083
|
+
"to_date": {
|
|
4084
|
+
"type": "string",
|
|
4085
|
+
"format": "date-time",
|
|
4086
|
+
"description": "Filter logs until this date (inclusive)",
|
|
4087
|
+
"example": "2025-01-31T23:59:59Z"
|
|
4088
|
+
},
|
|
4089
|
+
"limit": {
|
|
4090
|
+
"type": "integer",
|
|
4091
|
+
"description": "Maximum number of results to return",
|
|
4092
|
+
"example": 50,
|
|
4093
|
+
"default": 50,
|
|
4094
|
+
"minimum": 1,
|
|
4095
|
+
"maximum": 100
|
|
4096
|
+
},
|
|
4097
|
+
"cursor": {
|
|
4098
|
+
"type": "object",
|
|
4099
|
+
"description": "Cursor for pagination (infinite scroll)",
|
|
4100
|
+
"properties": {
|
|
4101
|
+
"timestamp": {
|
|
4102
|
+
"type": "string",
|
|
4103
|
+
"format": "date-time",
|
|
4104
|
+
"description": "Timestamp from the last log entry in the previous page"
|
|
4105
|
+
},
|
|
4106
|
+
"request_id": {
|
|
4107
|
+
"type": "string",
|
|
4108
|
+
"description": "Request ID from the last log entry in the previous page"
|
|
4109
|
+
}
|
|
4110
|
+
}
|
|
4111
|
+
}
|
|
4112
|
+
}
|
|
4113
|
+
},
|
|
4114
|
+
"AccessLogEntry": {
|
|
4115
|
+
"type": "object",
|
|
4116
|
+
"properties": {
|
|
4117
|
+
"timestamp": {
|
|
4118
|
+
"type": "string",
|
|
4119
|
+
"format": "date-time",
|
|
4120
|
+
"description": "When the request was made"
|
|
4121
|
+
},
|
|
4122
|
+
"environment": {
|
|
4123
|
+
"type": "string",
|
|
4124
|
+
"description": "Environment (e.g., 'dev', 'prod')"
|
|
4125
|
+
},
|
|
4126
|
+
"service": {
|
|
4127
|
+
"type": "string",
|
|
4128
|
+
"description": "Service name (e.g., 'entity', 'metering')"
|
|
4129
|
+
},
|
|
4130
|
+
"request_id": {
|
|
4131
|
+
"type": "string",
|
|
4132
|
+
"description": "Unique request identifier"
|
|
4133
|
+
},
|
|
4134
|
+
"method": {
|
|
4135
|
+
"type": "string",
|
|
4136
|
+
"description": "HTTP method"
|
|
4137
|
+
},
|
|
4138
|
+
"path": {
|
|
4139
|
+
"type": "string",
|
|
4140
|
+
"description": "Request path"
|
|
4141
|
+
},
|
|
4142
|
+
"status": {
|
|
4143
|
+
"type": "integer",
|
|
4144
|
+
"description": "HTTP status code"
|
|
4145
|
+
},
|
|
4146
|
+
"response_latency_ms": {
|
|
4147
|
+
"type": "integer",
|
|
4148
|
+
"description": "Response latency in milliseconds"
|
|
4149
|
+
},
|
|
4150
|
+
"response_length": {
|
|
4151
|
+
"type": "integer",
|
|
4152
|
+
"description": "Response body length in bytes"
|
|
4153
|
+
},
|
|
4154
|
+
"token_id": {
|
|
4155
|
+
"type": "string",
|
|
4156
|
+
"description": "Access token identifier"
|
|
4157
|
+
},
|
|
4158
|
+
"org_id": {
|
|
4159
|
+
"type": "string",
|
|
4160
|
+
"description": "Organization ID"
|
|
4161
|
+
},
|
|
4162
|
+
"origin": {
|
|
4163
|
+
"type": "string",
|
|
4164
|
+
"description": "Request origin header"
|
|
4165
|
+
},
|
|
4166
|
+
"source_ip": {
|
|
4167
|
+
"type": "string",
|
|
4168
|
+
"description": "Client IP address"
|
|
4169
|
+
}
|
|
4170
|
+
}
|
|
4171
|
+
},
|
|
3734
4172
|
"GetMonitoringStatsRequest": {
|
|
3735
4173
|
"type": "object",
|
|
3736
4174
|
"properties": {
|
|
@@ -3912,6 +4350,7 @@
|
|
|
3912
4350
|
"type": "object",
|
|
3913
4351
|
"required": [
|
|
3914
4352
|
"total_events",
|
|
4353
|
+
"total_correlations",
|
|
3915
4354
|
"success_count",
|
|
3916
4355
|
"error_count",
|
|
3917
4356
|
"skipped_count"
|
|
@@ -3921,6 +4360,10 @@
|
|
|
3921
4360
|
"type": "integer",
|
|
3922
4361
|
"description": "Total number of events in the period"
|
|
3923
4362
|
},
|
|
4363
|
+
"total_correlations": {
|
|
4364
|
+
"type": "integer",
|
|
4365
|
+
"description": "Total number of unique correlation IDs (a correlation_id groups multiple event_ids)"
|
|
4366
|
+
},
|
|
3924
4367
|
"success_count": {
|
|
3925
4368
|
"type": "integer",
|
|
3926
4369
|
"description": "Number of successful events"
|
|
@@ -4043,6 +4486,43 @@
|
|
|
4043
4486
|
}
|
|
4044
4487
|
}
|
|
4045
4488
|
},
|
|
4489
|
+
"QueryAccessLogsResponse": {
|
|
4490
|
+
"description": "Access logs queried successfully",
|
|
4491
|
+
"content": {
|
|
4492
|
+
"application/json": {
|
|
4493
|
+
"schema": {
|
|
4494
|
+
"type": "object",
|
|
4495
|
+
"properties": {
|
|
4496
|
+
"data": {
|
|
4497
|
+
"type": "array",
|
|
4498
|
+
"items": {
|
|
4499
|
+
"$ref": "#/components/schemas/AccessLogEntry"
|
|
4500
|
+
},
|
|
4501
|
+
"description": "List of access log entries"
|
|
4502
|
+
},
|
|
4503
|
+
"next_cursor": {
|
|
4504
|
+
"type": "object",
|
|
4505
|
+
"nullable": true,
|
|
4506
|
+
"description": "Cursor to fetch the next page. Null if no more results.",
|
|
4507
|
+
"properties": {
|
|
4508
|
+
"timestamp": {
|
|
4509
|
+
"type": "string",
|
|
4510
|
+
"format": "date-time"
|
|
4511
|
+
},
|
|
4512
|
+
"request_id": {
|
|
4513
|
+
"type": "string"
|
|
4514
|
+
}
|
|
4515
|
+
}
|
|
4516
|
+
},
|
|
4517
|
+
"has_more": {
|
|
4518
|
+
"type": "boolean",
|
|
4519
|
+
"description": "Indicates if more results are available"
|
|
4520
|
+
}
|
|
4521
|
+
}
|
|
4522
|
+
}
|
|
4523
|
+
}
|
|
4524
|
+
}
|
|
4525
|
+
},
|
|
4046
4526
|
"ReplayEventsResponse": {
|
|
4047
4527
|
"description": "Events replay initiated",
|
|
4048
4528
|
"content": {
|