@epilot/erp-integration-client 0.15.1 → 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.
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +83 -1
- package/dist/openapi.d.ts +621 -38
- package/dist/openapi.json +811 -49
- package/package.json +1 -1
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.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": [
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
{
|
|
18
18
|
"name": "integrations",
|
|
19
19
|
"description": "Integration and Use Case management endpoints"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "monitoring",
|
|
23
|
+
"description": "Monitoring and analytics endpoints"
|
|
20
24
|
}
|
|
21
25
|
],
|
|
22
26
|
"servers": [
|
|
@@ -1594,6 +1598,45 @@
|
|
|
1594
1598
|
"$ref": "#/components/responses/InternalServerError"
|
|
1595
1599
|
}
|
|
1596
1600
|
}
|
|
1601
|
+
},
|
|
1602
|
+
"post": {
|
|
1603
|
+
"operationId": "createIntegrationV2",
|
|
1604
|
+
"summary": "createIntegrationV2",
|
|
1605
|
+
"description": "Create a new integration with embedded use cases.\n",
|
|
1606
|
+
"tags": [
|
|
1607
|
+
"integrations"
|
|
1608
|
+
],
|
|
1609
|
+
"requestBody": {
|
|
1610
|
+
"required": true,
|
|
1611
|
+
"content": {
|
|
1612
|
+
"application/json": {
|
|
1613
|
+
"schema": {
|
|
1614
|
+
"$ref": "#/components/schemas/UpsertIntegrationWithUseCasesRequest"
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
"responses": {
|
|
1620
|
+
"201": {
|
|
1621
|
+
"description": "Integration created successfully with use cases",
|
|
1622
|
+
"content": {
|
|
1623
|
+
"application/json": {
|
|
1624
|
+
"schema": {
|
|
1625
|
+
"$ref": "#/components/schemas/IntegrationWithUseCases"
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
},
|
|
1630
|
+
"400": {
|
|
1631
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1632
|
+
},
|
|
1633
|
+
"401": {
|
|
1634
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1635
|
+
},
|
|
1636
|
+
"500": {
|
|
1637
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1597
1640
|
}
|
|
1598
1641
|
},
|
|
1599
1642
|
"/v2/integrations/{integrationId}": {
|
|
@@ -1639,9 +1682,9 @@
|
|
|
1639
1682
|
}
|
|
1640
1683
|
},
|
|
1641
1684
|
"put": {
|
|
1642
|
-
"operationId": "
|
|
1643
|
-
"summary": "
|
|
1644
|
-
"description": "
|
|
1685
|
+
"operationId": "updateIntegrationV2",
|
|
1686
|
+
"summary": "updateIntegrationV2",
|
|
1687
|
+
"description": "Update an existing integration with embedded use cases.\nThe integration must already exist.\nUse cases are updated declaratively:\n- Use cases in the request with matching IDs are updated\n- Use cases in the request without matching IDs are created\n- Existing use cases not in the request are deleted\n",
|
|
1645
1688
|
"tags": [
|
|
1646
1689
|
"integrations"
|
|
1647
1690
|
],
|
|
@@ -1669,7 +1712,7 @@
|
|
|
1669
1712
|
},
|
|
1670
1713
|
"responses": {
|
|
1671
1714
|
"200": {
|
|
1672
|
-
"description": "Integration
|
|
1715
|
+
"description": "Integration updated successfully with use cases",
|
|
1673
1716
|
"content": {
|
|
1674
1717
|
"application/json": {
|
|
1675
1718
|
"schema": {
|
|
@@ -1684,6 +1727,9 @@
|
|
|
1684
1727
|
"401": {
|
|
1685
1728
|
"$ref": "#/components/responses/Unauthorized"
|
|
1686
1729
|
},
|
|
1730
|
+
"404": {
|
|
1731
|
+
"description": "Integration not found"
|
|
1732
|
+
},
|
|
1687
1733
|
"500": {
|
|
1688
1734
|
"$ref": "#/components/responses/InternalServerError"
|
|
1689
1735
|
}
|
|
@@ -1860,6 +1906,156 @@
|
|
|
1860
1906
|
}
|
|
1861
1907
|
}
|
|
1862
1908
|
}
|
|
1909
|
+
},
|
|
1910
|
+
"/v1/integrations/{integrationId}/monitoring/events": {
|
|
1911
|
+
"post": {
|
|
1912
|
+
"operationId": "queryMonitoringEvents",
|
|
1913
|
+
"summary": "queryMonitoringEvents",
|
|
1914
|
+
"description": "Query ERP sync monitoring events for a specific integration.\nReturns detailed information about inbound/outbound sync events,\nincluding success rates, error breakdowns, and processing metrics.\n",
|
|
1915
|
+
"tags": [
|
|
1916
|
+
"monitoring",
|
|
1917
|
+
"integrations"
|
|
1918
|
+
],
|
|
1919
|
+
"parameters": [
|
|
1920
|
+
{
|
|
1921
|
+
"name": "integrationId",
|
|
1922
|
+
"in": "path",
|
|
1923
|
+
"required": true,
|
|
1924
|
+
"description": "The integration ID",
|
|
1925
|
+
"schema": {
|
|
1926
|
+
"type": "string",
|
|
1927
|
+
"format": "uuid"
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
],
|
|
1931
|
+
"requestBody": {
|
|
1932
|
+
"required": true,
|
|
1933
|
+
"content": {
|
|
1934
|
+
"application/json": {
|
|
1935
|
+
"schema": {
|
|
1936
|
+
"$ref": "#/components/schemas/QueryMonitoringEventsRequest"
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
},
|
|
1941
|
+
"responses": {
|
|
1942
|
+
"200": {
|
|
1943
|
+
"$ref": "#/components/responses/QueryMonitoringEventsResponse"
|
|
1944
|
+
},
|
|
1945
|
+
"400": {
|
|
1946
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1947
|
+
},
|
|
1948
|
+
"401": {
|
|
1949
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1950
|
+
},
|
|
1951
|
+
"404": {
|
|
1952
|
+
"$ref": "#/components/responses/NotFound"
|
|
1953
|
+
},
|
|
1954
|
+
"500": {
|
|
1955
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
"/v1/integrations/{integrationId}/monitoring/stats": {
|
|
1961
|
+
"post": {
|
|
1962
|
+
"operationId": "getMonitoringStats",
|
|
1963
|
+
"summary": "getMonitoringStats",
|
|
1964
|
+
"description": "Get aggregated statistics for ERP sync monitoring events for a specific integration.\nReturns summary metrics like total events, success/error counts,\nand breakdowns by use case, direction, and sync type.\n",
|
|
1965
|
+
"tags": [
|
|
1966
|
+
"monitoring",
|
|
1967
|
+
"integrations"
|
|
1968
|
+
],
|
|
1969
|
+
"parameters": [
|
|
1970
|
+
{
|
|
1971
|
+
"name": "integrationId",
|
|
1972
|
+
"in": "path",
|
|
1973
|
+
"required": true,
|
|
1974
|
+
"description": "The integration ID",
|
|
1975
|
+
"schema": {
|
|
1976
|
+
"type": "string",
|
|
1977
|
+
"format": "uuid"
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
],
|
|
1981
|
+
"requestBody": {
|
|
1982
|
+
"required": true,
|
|
1983
|
+
"content": {
|
|
1984
|
+
"application/json": {
|
|
1985
|
+
"schema": {
|
|
1986
|
+
"$ref": "#/components/schemas/GetMonitoringStatsRequest"
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
},
|
|
1991
|
+
"responses": {
|
|
1992
|
+
"200": {
|
|
1993
|
+
"$ref": "#/components/responses/GetMonitoringStatsResponse"
|
|
1994
|
+
},
|
|
1995
|
+
"400": {
|
|
1996
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1997
|
+
},
|
|
1998
|
+
"401": {
|
|
1999
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
2000
|
+
},
|
|
2001
|
+
"404": {
|
|
2002
|
+
"$ref": "#/components/responses/NotFound"
|
|
2003
|
+
},
|
|
2004
|
+
"500": {
|
|
2005
|
+
"$ref": "#/components/responses/InternalServerError"
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
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
|
+
}
|
|
1863
2059
|
}
|
|
1864
2060
|
},
|
|
1865
2061
|
"components": {
|
|
@@ -1906,7 +2102,7 @@
|
|
|
1906
2102
|
},
|
|
1907
2103
|
"object_type": {
|
|
1908
2104
|
"type": "string",
|
|
1909
|
-
"description": "Type of the object being updated (business_partner, contract_account, etc.)"
|
|
2105
|
+
"description": "Type of the object being updated (business_partner, contract_account, etc.). Corresponds to \"Event Name\" from the integration UI."
|
|
1910
2106
|
},
|
|
1911
2107
|
"timestamp": {
|
|
1912
2108
|
"type": "string",
|
|
@@ -2192,7 +2388,7 @@
|
|
|
2192
2388
|
}
|
|
2193
2389
|
}
|
|
2194
2390
|
},
|
|
2195
|
-
"
|
|
2391
|
+
"UseCaseBase": {
|
|
2196
2392
|
"type": "object",
|
|
2197
2393
|
"required": [
|
|
2198
2394
|
"id",
|
|
@@ -2227,8 +2423,7 @@
|
|
|
2227
2423
|
"description": "Use case type"
|
|
2228
2424
|
},
|
|
2229
2425
|
"enabled": {
|
|
2230
|
-
"type": "boolean"
|
|
2231
|
-
"description": "Whether the use case is enabled"
|
|
2426
|
+
"type": "boolean"
|
|
2232
2427
|
},
|
|
2233
2428
|
"change_description": {
|
|
2234
2429
|
"type": "string",
|
|
@@ -2245,8 +2440,60 @@
|
|
|
2245
2440
|
"format": "date-time",
|
|
2246
2441
|
"description": "ISO-8601 timestamp when the use case was last updated"
|
|
2247
2442
|
}
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2443
|
+
}
|
|
2444
|
+
},
|
|
2445
|
+
"InboundUseCase": {
|
|
2446
|
+
"allOf": [
|
|
2447
|
+
{
|
|
2448
|
+
"$ref": "#/components/schemas/UseCaseBase"
|
|
2449
|
+
},
|
|
2450
|
+
{
|
|
2451
|
+
"type": "object",
|
|
2452
|
+
"required": [
|
|
2453
|
+
"type"
|
|
2454
|
+
],
|
|
2455
|
+
"properties": {
|
|
2456
|
+
"type": {
|
|
2457
|
+
"type": "string",
|
|
2458
|
+
"enum": [
|
|
2459
|
+
"inbound"
|
|
2460
|
+
],
|
|
2461
|
+
"description": "Use case type"
|
|
2462
|
+
},
|
|
2463
|
+
"configuration": {
|
|
2464
|
+
"$ref": "#/components/schemas/InboundIntegrationEventConfiguration"
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
]
|
|
2469
|
+
},
|
|
2470
|
+
"OutboundUseCase": {
|
|
2471
|
+
"allOf": [
|
|
2472
|
+
{
|
|
2473
|
+
"$ref": "#/components/schemas/UseCaseBase"
|
|
2474
|
+
},
|
|
2475
|
+
{
|
|
2476
|
+
"type": "object",
|
|
2477
|
+
"required": [
|
|
2478
|
+
"type"
|
|
2479
|
+
],
|
|
2480
|
+
"properties": {
|
|
2481
|
+
"type": {
|
|
2482
|
+
"type": "string",
|
|
2483
|
+
"enum": [
|
|
2484
|
+
"outbound"
|
|
2485
|
+
],
|
|
2486
|
+
"description": "Use case type"
|
|
2487
|
+
},
|
|
2488
|
+
"configuration": {
|
|
2489
|
+
"$ref": "#/components/schemas/OutboundIntegrationEventConfiguration"
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
]
|
|
2494
|
+
},
|
|
2495
|
+
"UseCase": {
|
|
2496
|
+
"oneOf": [
|
|
2250
2497
|
{
|
|
2251
2498
|
"$ref": "#/components/schemas/InboundUseCase"
|
|
2252
2499
|
},
|
|
@@ -2262,42 +2509,6 @@
|
|
|
2262
2509
|
}
|
|
2263
2510
|
}
|
|
2264
2511
|
},
|
|
2265
|
-
"InboundUseCase": {
|
|
2266
|
-
"type": "object",
|
|
2267
|
-
"required": [
|
|
2268
|
-
"type"
|
|
2269
|
-
],
|
|
2270
|
-
"properties": {
|
|
2271
|
-
"type": {
|
|
2272
|
-
"type": "string",
|
|
2273
|
-
"enum": [
|
|
2274
|
-
"inbound"
|
|
2275
|
-
],
|
|
2276
|
-
"description": "Use case type"
|
|
2277
|
-
},
|
|
2278
|
-
"configuration": {
|
|
2279
|
-
"$ref": "#/components/schemas/InboundIntegrationEventConfiguration"
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
},
|
|
2283
|
-
"OutboundUseCase": {
|
|
2284
|
-
"type": "object",
|
|
2285
|
-
"required": [
|
|
2286
|
-
"type"
|
|
2287
|
-
],
|
|
2288
|
-
"properties": {
|
|
2289
|
-
"type": {
|
|
2290
|
-
"type": "string",
|
|
2291
|
-
"enum": [
|
|
2292
|
-
"outbound"
|
|
2293
|
-
],
|
|
2294
|
-
"description": "Use case type"
|
|
2295
|
-
},
|
|
2296
|
-
"configuration": {
|
|
2297
|
-
"$ref": "#/components/schemas/OutboundIntegrationEventConfiguration"
|
|
2298
|
-
}
|
|
2299
|
-
}
|
|
2300
|
-
},
|
|
2301
2512
|
"CreateUseCaseRequest": {
|
|
2302
2513
|
"oneOf": [
|
|
2303
2514
|
{
|
|
@@ -3464,8 +3675,475 @@
|
|
|
3464
3675
|
}
|
|
3465
3676
|
}
|
|
3466
3677
|
}
|
|
3467
|
-
}
|
|
3468
|
-
|
|
3678
|
+
},
|
|
3679
|
+
"QueryMonitoringEventsRequest": {
|
|
3680
|
+
"type": "object",
|
|
3681
|
+
"properties": {
|
|
3682
|
+
"use_case_id": {
|
|
3683
|
+
"type": "string",
|
|
3684
|
+
"format": "uuid",
|
|
3685
|
+
"description": "Filter by use case ID"
|
|
3686
|
+
},
|
|
3687
|
+
"direction": {
|
|
3688
|
+
"type": "string",
|
|
3689
|
+
"enum": [
|
|
3690
|
+
"inbound",
|
|
3691
|
+
"outbound"
|
|
3692
|
+
],
|
|
3693
|
+
"description": "Filter by sync direction"
|
|
3694
|
+
},
|
|
3695
|
+
"event_type": {
|
|
3696
|
+
"type": "string",
|
|
3697
|
+
"enum": [
|
|
3698
|
+
"CREATE",
|
|
3699
|
+
"UPDATE",
|
|
3700
|
+
"DELETE",
|
|
3701
|
+
"TRIGGER"
|
|
3702
|
+
],
|
|
3703
|
+
"description": "Filter by event type"
|
|
3704
|
+
},
|
|
3705
|
+
"sync_type": {
|
|
3706
|
+
"type": "string",
|
|
3707
|
+
"enum": [
|
|
3708
|
+
"entity",
|
|
3709
|
+
"meter_reading",
|
|
3710
|
+
"webhook"
|
|
3711
|
+
],
|
|
3712
|
+
"description": "Filter by sync type"
|
|
3713
|
+
},
|
|
3714
|
+
"status": {
|
|
3715
|
+
"type": "string",
|
|
3716
|
+
"enum": [
|
|
3717
|
+
"success",
|
|
3718
|
+
"error",
|
|
3719
|
+
"skipped"
|
|
3720
|
+
],
|
|
3721
|
+
"description": "Filter by processing status"
|
|
3722
|
+
},
|
|
3723
|
+
"error_category": {
|
|
3724
|
+
"type": "string",
|
|
3725
|
+
"enum": [
|
|
3726
|
+
"validation",
|
|
3727
|
+
"configuration",
|
|
3728
|
+
"downstream_api",
|
|
3729
|
+
"timeout",
|
|
3730
|
+
"system",
|
|
3731
|
+
"webhook_delivery"
|
|
3732
|
+
],
|
|
3733
|
+
"description": "Filter by error category (only applicable when status=error)"
|
|
3734
|
+
},
|
|
3735
|
+
"correlation_id": {
|
|
3736
|
+
"type": "string",
|
|
3737
|
+
"description": "Filter by correlation ID"
|
|
3738
|
+
},
|
|
3739
|
+
"object_type": {
|
|
3740
|
+
"type": "string",
|
|
3741
|
+
"description": "Filter by object type (e.g., 'contract', 'meter')"
|
|
3742
|
+
},
|
|
3743
|
+
"event_id": {
|
|
3744
|
+
"type": "string",
|
|
3745
|
+
"description": "Filter by event ID to find a specific event"
|
|
3746
|
+
},
|
|
3747
|
+
"from_date": {
|
|
3748
|
+
"type": "string",
|
|
3749
|
+
"format": "date-time",
|
|
3750
|
+
"description": "Filter events from this date (inclusive)",
|
|
3751
|
+
"example": "2025-01-01T00:00:00Z"
|
|
3752
|
+
},
|
|
3753
|
+
"to_date": {
|
|
3754
|
+
"type": "string",
|
|
3755
|
+
"format": "date-time",
|
|
3756
|
+
"description": "Filter events until this date (inclusive)",
|
|
3757
|
+
"example": "2025-01-31T23:59:59Z"
|
|
3758
|
+
},
|
|
3759
|
+
"limit": {
|
|
3760
|
+
"type": "integer",
|
|
3761
|
+
"description": "Maximum number of results to return",
|
|
3762
|
+
"example": 50,
|
|
3763
|
+
"default": 50,
|
|
3764
|
+
"minimum": 1,
|
|
3765
|
+
"maximum": 100
|
|
3766
|
+
},
|
|
3767
|
+
"cursor": {
|
|
3768
|
+
"type": "object",
|
|
3769
|
+
"description": "Cursor for pagination",
|
|
3770
|
+
"properties": {
|
|
3771
|
+
"completed_at": {
|
|
3772
|
+
"type": "string",
|
|
3773
|
+
"format": "date-time",
|
|
3774
|
+
"description": "Timestamp from the last event in the previous page"
|
|
3775
|
+
},
|
|
3776
|
+
"event_id": {
|
|
3777
|
+
"type": "string",
|
|
3778
|
+
"description": "Event ID from the last event in the previous page"
|
|
3779
|
+
}
|
|
3780
|
+
}
|
|
3781
|
+
}
|
|
3782
|
+
}
|
|
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
|
+
},
|
|
3918
|
+
"GetMonitoringStatsRequest": {
|
|
3919
|
+
"type": "object",
|
|
3920
|
+
"properties": {
|
|
3921
|
+
"use_case_id": {
|
|
3922
|
+
"type": "string",
|
|
3923
|
+
"format": "uuid",
|
|
3924
|
+
"description": "Filter by use case ID"
|
|
3925
|
+
},
|
|
3926
|
+
"direction": {
|
|
3927
|
+
"type": "string",
|
|
3928
|
+
"enum": [
|
|
3929
|
+
"inbound",
|
|
3930
|
+
"outbound"
|
|
3931
|
+
],
|
|
3932
|
+
"description": "Filter by sync direction"
|
|
3933
|
+
},
|
|
3934
|
+
"from_date": {
|
|
3935
|
+
"type": "string",
|
|
3936
|
+
"format": "date-time",
|
|
3937
|
+
"description": "Start date for statistics period (inclusive)",
|
|
3938
|
+
"example": "2025-01-01T00:00:00Z"
|
|
3939
|
+
},
|
|
3940
|
+
"to_date": {
|
|
3941
|
+
"type": "string",
|
|
3942
|
+
"format": "date-time",
|
|
3943
|
+
"description": "End date for statistics period (inclusive)",
|
|
3944
|
+
"example": "2025-01-31T23:59:59Z"
|
|
3945
|
+
},
|
|
3946
|
+
"group_by": {
|
|
3947
|
+
"type": "array",
|
|
3948
|
+
"items": {
|
|
3949
|
+
"type": "string",
|
|
3950
|
+
"enum": [
|
|
3951
|
+
"direction",
|
|
3952
|
+
"use_case_id",
|
|
3953
|
+
"sync_type",
|
|
3954
|
+
"status",
|
|
3955
|
+
"error_category",
|
|
3956
|
+
"object_type",
|
|
3957
|
+
"date"
|
|
3958
|
+
]
|
|
3959
|
+
},
|
|
3960
|
+
"description": "Fields to group statistics by",
|
|
3961
|
+
"example": [
|
|
3962
|
+
"direction",
|
|
3963
|
+
"status"
|
|
3964
|
+
]
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
},
|
|
3968
|
+
"MonitoringEvent": {
|
|
3969
|
+
"type": "object",
|
|
3970
|
+
"required": [
|
|
3971
|
+
"org_id",
|
|
3972
|
+
"event_id",
|
|
3973
|
+
"direction",
|
|
3974
|
+
"event_type",
|
|
3975
|
+
"object_type",
|
|
3976
|
+
"sync_type",
|
|
3977
|
+
"status",
|
|
3978
|
+
"received_at",
|
|
3979
|
+
"completed_at"
|
|
3980
|
+
],
|
|
3981
|
+
"properties": {
|
|
3982
|
+
"org_id": {
|
|
3983
|
+
"type": "string",
|
|
3984
|
+
"description": "Organization ID"
|
|
3985
|
+
},
|
|
3986
|
+
"event_id": {
|
|
3987
|
+
"type": "string",
|
|
3988
|
+
"description": "Unique event identifier"
|
|
3989
|
+
},
|
|
3990
|
+
"correlation_id": {
|
|
3991
|
+
"type": "string",
|
|
3992
|
+
"nullable": true,
|
|
3993
|
+
"description": "Correlation ID for tracing related events"
|
|
3994
|
+
},
|
|
3995
|
+
"integration_id": {
|
|
3996
|
+
"type": "string",
|
|
3997
|
+
"nullable": true,
|
|
3998
|
+
"description": "Integration ID"
|
|
3999
|
+
},
|
|
4000
|
+
"use_case_id": {
|
|
4001
|
+
"type": "string",
|
|
4002
|
+
"nullable": true,
|
|
4003
|
+
"description": "Use case ID"
|
|
4004
|
+
},
|
|
4005
|
+
"direction": {
|
|
4006
|
+
"type": "string",
|
|
4007
|
+
"enum": [
|
|
4008
|
+
"inbound",
|
|
4009
|
+
"outbound"
|
|
4010
|
+
],
|
|
4011
|
+
"description": "Sync direction"
|
|
4012
|
+
},
|
|
4013
|
+
"event_type": {
|
|
4014
|
+
"type": "string",
|
|
4015
|
+
"enum": [
|
|
4016
|
+
"CREATE",
|
|
4017
|
+
"UPDATE",
|
|
4018
|
+
"DELETE",
|
|
4019
|
+
"TRIGGER"
|
|
4020
|
+
],
|
|
4021
|
+
"description": "Type of event"
|
|
4022
|
+
},
|
|
4023
|
+
"object_type": {
|
|
4024
|
+
"type": "string",
|
|
4025
|
+
"description": "Type of object being synced (e.g., 'contract', 'meter')"
|
|
4026
|
+
},
|
|
4027
|
+
"sync_type": {
|
|
4028
|
+
"type": "string",
|
|
4029
|
+
"enum": [
|
|
4030
|
+
"entity",
|
|
4031
|
+
"meter_reading",
|
|
4032
|
+
"webhook"
|
|
4033
|
+
],
|
|
4034
|
+
"description": "Type of sync operation"
|
|
4035
|
+
},
|
|
4036
|
+
"status": {
|
|
4037
|
+
"type": "string",
|
|
4038
|
+
"enum": [
|
|
4039
|
+
"success",
|
|
4040
|
+
"error",
|
|
4041
|
+
"skipped"
|
|
4042
|
+
],
|
|
4043
|
+
"description": "Processing status"
|
|
4044
|
+
},
|
|
4045
|
+
"error_code": {
|
|
4046
|
+
"type": "string",
|
|
4047
|
+
"nullable": true,
|
|
4048
|
+
"description": "Error code (when status=error)"
|
|
4049
|
+
},
|
|
4050
|
+
"error_message": {
|
|
4051
|
+
"type": "string",
|
|
4052
|
+
"nullable": true,
|
|
4053
|
+
"description": "Error message (when status=error)"
|
|
4054
|
+
},
|
|
4055
|
+
"error_category": {
|
|
4056
|
+
"type": "string",
|
|
4057
|
+
"nullable": true,
|
|
4058
|
+
"enum": [
|
|
4059
|
+
"validation",
|
|
4060
|
+
"configuration",
|
|
4061
|
+
"downstream_api",
|
|
4062
|
+
"timeout",
|
|
4063
|
+
"system",
|
|
4064
|
+
"webhook_delivery"
|
|
4065
|
+
],
|
|
4066
|
+
"description": "Error category (when status=error)"
|
|
4067
|
+
},
|
|
4068
|
+
"processing_duration_ms": {
|
|
4069
|
+
"type": "integer",
|
|
4070
|
+
"nullable": true,
|
|
4071
|
+
"description": "Processing duration in milliseconds"
|
|
4072
|
+
},
|
|
4073
|
+
"target_url": {
|
|
4074
|
+
"type": "string",
|
|
4075
|
+
"nullable": true,
|
|
4076
|
+
"description": "Target URL for outbound requests"
|
|
4077
|
+
},
|
|
4078
|
+
"http_status_code": {
|
|
4079
|
+
"type": "integer",
|
|
4080
|
+
"nullable": true,
|
|
4081
|
+
"description": "HTTP status code from target (outbound only)"
|
|
4082
|
+
},
|
|
4083
|
+
"received_at": {
|
|
4084
|
+
"type": "string",
|
|
4085
|
+
"format": "date-time",
|
|
4086
|
+
"description": "When the event was received"
|
|
4087
|
+
},
|
|
4088
|
+
"completed_at": {
|
|
4089
|
+
"type": "string",
|
|
4090
|
+
"format": "date-time",
|
|
4091
|
+
"description": "When processing completed"
|
|
4092
|
+
}
|
|
4093
|
+
}
|
|
4094
|
+
},
|
|
4095
|
+
"MonitoringStats": {
|
|
4096
|
+
"type": "object",
|
|
4097
|
+
"required": [
|
|
4098
|
+
"total_events",
|
|
4099
|
+
"total_correlations",
|
|
4100
|
+
"success_count",
|
|
4101
|
+
"error_count",
|
|
4102
|
+
"skipped_count"
|
|
4103
|
+
],
|
|
4104
|
+
"properties": {
|
|
4105
|
+
"total_events": {
|
|
4106
|
+
"type": "integer",
|
|
4107
|
+
"description": "Total number of events in the period"
|
|
4108
|
+
},
|
|
4109
|
+
"total_correlations": {
|
|
4110
|
+
"type": "integer",
|
|
4111
|
+
"description": "Total number of unique correlation IDs (a correlation_id groups multiple event_ids)"
|
|
4112
|
+
},
|
|
4113
|
+
"success_count": {
|
|
4114
|
+
"type": "integer",
|
|
4115
|
+
"description": "Number of successful events"
|
|
4116
|
+
},
|
|
4117
|
+
"error_count": {
|
|
4118
|
+
"type": "integer",
|
|
4119
|
+
"description": "Number of failed events"
|
|
4120
|
+
},
|
|
4121
|
+
"skipped_count": {
|
|
4122
|
+
"type": "integer",
|
|
4123
|
+
"description": "Number of skipped events"
|
|
4124
|
+
},
|
|
4125
|
+
"success_rate": {
|
|
4126
|
+
"type": "number",
|
|
4127
|
+
"format": "float",
|
|
4128
|
+
"description": "Success rate as percentage (0-100)"
|
|
4129
|
+
},
|
|
4130
|
+
"last_error_at": {
|
|
4131
|
+
"type": "string",
|
|
4132
|
+
"format": "date-time",
|
|
4133
|
+
"nullable": true,
|
|
4134
|
+
"description": "Timestamp of the most recent error"
|
|
4135
|
+
},
|
|
4136
|
+
"breakdown": {
|
|
4137
|
+
"type": "array",
|
|
4138
|
+
"description": "Statistics breakdown by requested group_by fields",
|
|
4139
|
+
"items": {
|
|
4140
|
+
"type": "object",
|
|
4141
|
+
"additionalProperties": true
|
|
4142
|
+
}
|
|
4143
|
+
}
|
|
4144
|
+
}
|
|
4145
|
+
}
|
|
4146
|
+
},
|
|
3469
4147
|
"responses": {
|
|
3470
4148
|
"BadRequest": {
|
|
3471
4149
|
"description": "Bad request",
|
|
@@ -3507,6 +4185,90 @@
|
|
|
3507
4185
|
}
|
|
3508
4186
|
}
|
|
3509
4187
|
},
|
|
4188
|
+
"QueryMonitoringEventsResponse": {
|
|
4189
|
+
"description": "Monitoring events queried successfully",
|
|
4190
|
+
"content": {
|
|
4191
|
+
"application/json": {
|
|
4192
|
+
"schema": {
|
|
4193
|
+
"type": "object",
|
|
4194
|
+
"properties": {
|
|
4195
|
+
"data": {
|
|
4196
|
+
"type": "array",
|
|
4197
|
+
"items": {
|
|
4198
|
+
"$ref": "#/components/schemas/MonitoringEvent"
|
|
4199
|
+
},
|
|
4200
|
+
"description": "List of monitoring events"
|
|
4201
|
+
},
|
|
4202
|
+
"next_cursor": {
|
|
4203
|
+
"type": "object",
|
|
4204
|
+
"nullable": true,
|
|
4205
|
+
"description": "Cursor to fetch the next page. Null if no more results.",
|
|
4206
|
+
"properties": {
|
|
4207
|
+
"completed_at": {
|
|
4208
|
+
"type": "string",
|
|
4209
|
+
"format": "date-time"
|
|
4210
|
+
},
|
|
4211
|
+
"event_id": {
|
|
4212
|
+
"type": "string"
|
|
4213
|
+
}
|
|
4214
|
+
}
|
|
4215
|
+
},
|
|
4216
|
+
"has_more": {
|
|
4217
|
+
"type": "boolean",
|
|
4218
|
+
"description": "Indicates if more results are available"
|
|
4219
|
+
}
|
|
4220
|
+
}
|
|
4221
|
+
}
|
|
4222
|
+
}
|
|
4223
|
+
}
|
|
4224
|
+
},
|
|
4225
|
+
"GetMonitoringStatsResponse": {
|
|
4226
|
+
"description": "Monitoring statistics retrieved successfully",
|
|
4227
|
+
"content": {
|
|
4228
|
+
"application/json": {
|
|
4229
|
+
"schema": {
|
|
4230
|
+
"$ref": "#/components/schemas/MonitoringStats"
|
|
4231
|
+
}
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
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
|
+
},
|
|
3510
4272
|
"ReplayEventsResponse": {
|
|
3511
4273
|
"description": "Events replay initiated",
|
|
3512
4274
|
"content": {
|