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

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(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(466));t.default=o.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://erp-integration-api.sls.epilot.io"}],"paths":{"/v1/erp/tracking/acknowledgement":{"post":{"operationId":"acknowledgeTracking","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/erp/trigger":{"post":{"operationId":"triggerErp","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/erp/updates/events":{"post":{"deprecated":true,"operationId":"processErpUpdatesEvents","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/events":{"post":{"deprecated":true,"operationId":"processErpUpdatesEventsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v3/erp/updates/events":{"post":{"operationId":"processErpUpdatesEventsV3","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/mapping_simulation":{"post":{"operationId":"simulateMappingV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/erp/updates/mapping_simulation":{"post":{"operationId":"simulateMapping","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations":{"get":{"operationId":"listIntegrations","responses":{}},"post":{"operationId":"createIntegration","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}":{"get":{"operationId":"getIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/events":{"post":{"operationId":"queryEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/events/replay":{"post":{"operationId":"replayEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/use-cases":{"get":{"operationId":"listUseCases","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"post":{"operationId":"createUseCase","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/use-cases/{useCaseId}":{"get":{"operationId":"getUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/use-cases/{useCaseId}/history":{"get":{"operationId":"listUseCaseHistory","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true},{"name":"cursor","in":"query","required":false}],"responses":{}}},"/v2/integrations":{"get":{"operationId":"listIntegrationsV2","responses":{}},"post":{"operationId":"createIntegrationV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}":{"get":{"operationId":"getIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/app-mapping":{"put":{"operationId":"setIntegrationAppMapping","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegrationAppMapping","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/inbound-events":{"post":{"operationId":"queryInboundMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStats","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/timeseries":{"post":{"operationId":"getMonitoringTimeSeries","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/outbound-status":{"get":{"operationId":"getOutboundStatus","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/monitoring/access-logs":{"post":{"operationId":"queryAccessLogs","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/outbound-events":{"post":{"operationId":"queryOutboundMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/events":{"post":{"operationId":"queryMonitoringEventsV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStatsV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/time-series":{"post":{"operationId":"getMonitoringTimeSeriesV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/secure-proxies":{"get":{"operationId":"listSecureProxies","responses":{}}},"/v1/secure-proxy":{"post":{"operationId":"secureProxy","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/managed-call/{slug}/execute":{"post":{"operationId":"managedCallExecute","parameters":[{"name":"slug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{"responses":{"BadRequest":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"Unauthorized":{"content":{"application/json":{}}},"Forbidden":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"QueryInboundMonitoringEventsResponse":{"content":{"application/json":{}}},"GetMonitoringStatsResponse":{"content":{"application/json":{}}},"GetMonitoringTimeSeriesResponse":{"content":{"application/json":{}}},"QueryAccessLogsResponse":{"content":{"application/json":{}}},"QueryOutboundMonitoringEventsResponse":{"content":{"application/json":{}}},"ReplayEventsResponse":{"content":{"application/json":{}}},"ERPUpdatesResponse":{"content":{"application/json":{}}},"TriggerWebhookResponse":{"content":{"application/json":{}}},"QueryEventsResponse":{"content":{"application/json":{}}},"QueryMonitoringEventsV2Response":{"content":{"application/json":{}}},"GetMonitoringStatsV2Response":{"content":{"application/json":{}}},"GetMonitoringTimeSeriesV2Response":{"content":{"application/json":{}}}}}}')}},t={},n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(330),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(466));t.default=o.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"servers":[{"url":"https://erp-integration-api.sls.epilot.io"}],"paths":{"/v1/erp/tracking/acknowledgement":{"post":{"operationId":"acknowledgeTracking","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/erp/trigger":{"post":{"operationId":"triggerErp","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/erp/updates/events":{"post":{"deprecated":true,"operationId":"processErpUpdatesEvents","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/events":{"post":{"deprecated":true,"operationId":"processErpUpdatesEventsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v3/erp/updates/events":{"post":{"operationId":"processErpUpdatesEventsV3","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/erp/updates/mapping_simulation":{"post":{"operationId":"simulateMappingV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/erp/updates/mapping_simulation":{"post":{"operationId":"simulateMapping","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations":{"get":{"operationId":"listIntegrations","responses":{}},"post":{"operationId":"createIntegration","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}":{"get":{"operationId":"getIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegration","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/events":{"post":{"operationId":"queryEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/events/replay":{"post":{"operationId":"replayEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/use-cases":{"get":{"operationId":"listUseCases","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"post":{"operationId":"createUseCase","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/use-cases/{useCaseId}":{"get":{"operationId":"getUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteUseCase","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/use-cases/{useCaseId}/history":{"get":{"operationId":"listUseCaseHistory","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"useCaseId","in":"path","required":true},{"name":"cursor","in":"query","required":false}],"responses":{}}},"/v2/integrations":{"get":{"operationId":"listIntegrationsV2","responses":{}},"post":{"operationId":"createIntegrationV2","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}":{"get":{"operationId":"getIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}},"put":{"operationId":"updateIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegrationV2","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/app-mapping":{"put":{"operationId":"setIntegrationAppMapping","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteIntegrationAppMapping","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/inbound-events":{"post":{"operationId":"queryInboundMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStats","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/timeseries":{"post":{"operationId":"getMonitoringTimeSeries","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/outbound-status":{"get":{"operationId":"getOutboundStatus","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/monitoring/access-logs":{"post":{"operationId":"queryAccessLogs","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/monitoring/outbound-events":{"post":{"operationId":"queryOutboundMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/events":{"post":{"operationId":"queryMonitoringEventsV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/stats":{"post":{"operationId":"getMonitoringStatsV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/time-series":{"post":{"operationId":"getMonitoringTimeSeriesV2","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/integrations/{integrationId}/monitoring/events/{eventId}/associated":{"get":{"operationId":"getAssociatedMonitoringEvents","parameters":[{"name":"integrationId","in":"path","required":true},{"name":"eventId","in":"path","required":true}],"responses":{}}},"/v1/integrations/secure-proxies":{"get":{"operationId":"listSecureProxies","responses":{}}},"/v1/secure-proxy":{"post":{"operationId":"secureProxy","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/managed-call/{slug}/execute":{"post":{"operationId":"managedCallExecute","parameters":[{"name":"slug","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/generate-types-preview":{"post":{"operationId":"generateTypesPreview","parameters":[{"name":"integrationId","in":"path","required":true}],"responses":{}}},"/v1/integrations/{integrationId}/generate-types":{"post":{"operationId":"generateTypes","parameters":[{"name":"integrationId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/integrations/{integrationId}/commit-types":{"post":{"operationId":"commitTypes","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":{}}},"Forbidden":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"QueryInboundMonitoringEventsResponse":{"content":{"application/json":{}}},"GetMonitoringStatsResponse":{"content":{"application/json":{}}},"GetMonitoringTimeSeriesResponse":{"content":{"application/json":{}}},"QueryAccessLogsResponse":{"content":{"application/json":{}}},"QueryOutboundMonitoringEventsResponse":{"content":{"application/json":{}}},"ReplayEventsResponse":{"content":{"application/json":{}}},"ERPUpdatesResponse":{"content":{"application/json":{}}},"TriggerWebhookResponse":{"content":{"application/json":{}}},"QueryEventsResponse":{"content":{"application/json":{}}},"QueryMonitoringEventsV2Response":{"content":{"application/json":{}}},"GetMonitoringStatsV2Response":{"content":{"application/json":{}}},"GetMonitoringTimeSeriesV2Response":{"content":{"application/json":{}}},"GetAssociatedMonitoringEventsResponse":{"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})})();
@@ -554,6 +554,24 @@
554
554
  "responses": {}
555
555
  }
556
556
  },
557
+ "/v2/integrations/{integrationId}/monitoring/events/{eventId}/associated": {
558
+ "get": {
559
+ "operationId": "getAssociatedMonitoringEvents",
560
+ "parameters": [
561
+ {
562
+ "name": "integrationId",
563
+ "in": "path",
564
+ "required": true
565
+ },
566
+ {
567
+ "name": "eventId",
568
+ "in": "path",
569
+ "required": true
570
+ }
571
+ ],
572
+ "responses": {}
573
+ }
574
+ },
557
575
  "/v1/integrations/secure-proxies": {
558
576
  "get": {
559
577
  "operationId": "listSecureProxies",
@@ -590,6 +608,57 @@
590
608
  },
591
609
  "responses": {}
592
610
  }
611
+ },
612
+ "/v1/integrations/{integrationId}/generate-types-preview": {
613
+ "post": {
614
+ "operationId": "generateTypesPreview",
615
+ "parameters": [
616
+ {
617
+ "name": "integrationId",
618
+ "in": "path",
619
+ "required": true
620
+ }
621
+ ],
622
+ "responses": {}
623
+ }
624
+ },
625
+ "/v1/integrations/{integrationId}/generate-types": {
626
+ "post": {
627
+ "operationId": "generateTypes",
628
+ "parameters": [
629
+ {
630
+ "name": "integrationId",
631
+ "in": "path",
632
+ "required": true
633
+ }
634
+ ],
635
+ "requestBody": {
636
+ "required": true,
637
+ "content": {
638
+ "application/json": {}
639
+ }
640
+ },
641
+ "responses": {}
642
+ }
643
+ },
644
+ "/v1/integrations/{integrationId}/commit-types": {
645
+ "post": {
646
+ "operationId": "commitTypes",
647
+ "parameters": [
648
+ {
649
+ "name": "integrationId",
650
+ "in": "path",
651
+ "required": true
652
+ }
653
+ ],
654
+ "requestBody": {
655
+ "required": true,
656
+ "content": {
657
+ "application/json": {}
658
+ }
659
+ },
660
+ "responses": {}
661
+ }
593
662
  }
594
663
  },
595
664
  "components": {
@@ -678,6 +747,11 @@
678
747
  "content": {
679
748
  "application/json": {}
680
749
  }
750
+ },
751
+ "GetAssociatedMonitoringEventsResponse": {
752
+ "content": {
753
+ "application/json": {}
754
+ }
681
755
  }
682
756
  }
683
757
  }
package/dist/openapi.d.ts CHANGED
@@ -23,6 +23,18 @@ declare namespace Components {
23
23
  }[];
24
24
  }
25
25
  export type Forbidden = Schemas.ErrorResponseBase;
26
+ export interface GetAssociatedMonitoringEventsResponse {
27
+ /**
28
+ * All monitoring events sharing this event_id, ordered by created_at ASC
29
+ */
30
+ monitoring_events?: Schemas.MonitoringEventV2[];
31
+ /**
32
+ * The original inbound event payload from erp_incoming_events, if available
33
+ */
34
+ inbound_event?: {
35
+ [name: string]: any;
36
+ } | null;
37
+ }
26
38
  export type GetMonitoringStatsResponse = Schemas.MonitoringStats;
27
39
  export type GetMonitoringStatsV2Response = Schemas.MonitoringStatsV2;
28
40
  export interface GetMonitoringTimeSeriesResponse {
@@ -226,6 +238,30 @@ declare namespace Components {
226
238
  */
227
239
  freshnessThresholdMinutes?: number;
228
240
  }
241
+ export interface CommitTypesRequest {
242
+ /**
243
+ * npm package name
244
+ * example:
245
+ * @epilot/hems-cleverpv
246
+ */
247
+ package_name: string;
248
+ /**
249
+ * Package version
250
+ * example:
251
+ * 1.0.0
252
+ */
253
+ version: string;
254
+ /**
255
+ * Type annotations per use case slug
256
+ */
257
+ annotations?: {
258
+ [name: string]: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations;
259
+ };
260
+ }
261
+ export interface CommitTypesResponse {
262
+ committed: boolean;
263
+ warnings?: string[];
264
+ }
229
265
  /**
230
266
  * Shared configuration for connector-type integrations
231
267
  */
@@ -235,6 +271,24 @@ declare namespace Components {
235
271
  */
236
272
  base_url?: string;
237
273
  auth?: /* Authentication configuration for managed call requests */ ManagedCallAuth;
274
+ /**
275
+ * History of generated type package versions
276
+ */
277
+ types_versions?: {
278
+ version: string;
279
+ package_name: string;
280
+ generated_at: string; // date-time
281
+ generated_by: string;
282
+ status: "active" | "deprecated";
283
+ }[];
284
+ /**
285
+ * Latest active types package version
286
+ */
287
+ latest_types_version?: string;
288
+ /**
289
+ * Latest active types package name
290
+ */
291
+ latest_types_package_name?: string;
238
292
  }
239
293
  export interface CreateFileProxyUseCaseRequest {
240
294
  /**
@@ -1137,6 +1191,69 @@ declare namespace Components {
1137
1191
  */
1138
1192
  FileProxyUseCaseConfiguration;
1139
1193
  }
1194
+ export interface GenerateTypesPreviewResponse {
1195
+ integration_name?: string;
1196
+ use_cases: /* Scaffolded type descriptors for a single use case */ UseCaseTypePreview[];
1197
+ /**
1198
+ * Previously generated version, if any
1199
+ */
1200
+ previous_version?: string;
1201
+ /**
1202
+ * Suggested next version based on detected changes
1203
+ */
1204
+ suggested_version?: string;
1205
+ suggested_bump?: "major" | "minor";
1206
+ detected_changes?: {
1207
+ slug: string;
1208
+ field: string;
1209
+ type: "breaking" | "non-breaking";
1210
+ description: string;
1211
+ }[];
1212
+ }
1213
+ export interface GenerateTypesRequest {
1214
+ /**
1215
+ * npm package name
1216
+ * example:
1217
+ * @epilot/hems-cleverpv
1218
+ */
1219
+ package_name: string;
1220
+ /**
1221
+ * Package version
1222
+ * example:
1223
+ * 1.0.0
1224
+ */
1225
+ version: string;
1226
+ description?: string;
1227
+ /**
1228
+ * Domain standard package to extend
1229
+ * example:
1230
+ * @epilot/hems
1231
+ */
1232
+ domain_package?: string;
1233
+ /**
1234
+ * Name of the domain UseCaseMap to extend
1235
+ * example:
1236
+ * HemsUseCaseMap
1237
+ */
1238
+ domain_map_name?: string;
1239
+ /**
1240
+ * Type annotations per use case slug
1241
+ */
1242
+ annotations?: {
1243
+ [name: string]: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations;
1244
+ };
1245
+ }
1246
+ export interface GenerateTypesResponse {
1247
+ package_name: string;
1248
+ version: string;
1249
+ /**
1250
+ * Generated file contents keyed by file path
1251
+ */
1252
+ files: {
1253
+ [name: string]: string;
1254
+ };
1255
+ warnings?: string[];
1256
+ }
1140
1257
  export interface GetMonitoringStatsRequest {
1141
1258
  /**
1142
1259
  * Start date for statistics period (inclusive)
@@ -1909,6 +2026,11 @@ declare namespace Components {
1909
2026
  */
1910
2027
  updated_at: string; // date-time
1911
2028
  configuration?: /* Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ ManagedCallOperationConfig;
2029
+ type_annotations?: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations;
2030
+ /**
2031
+ * Whether types have been generated for this use case
2032
+ */
2033
+ types_locked?: boolean;
1912
2034
  }
1913
2035
  export interface ManagedCallUseCaseHistoryEntry {
1914
2036
  /**
@@ -1956,6 +2078,11 @@ declare namespace Components {
1956
2078
  */
1957
2079
  type: "managed_call";
1958
2080
  configuration?: /* Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ ManagedCallOperationConfig;
2081
+ type_annotations?: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations;
2082
+ /**
2083
+ * Whether types have been generated for this use case
2084
+ */
2085
+ types_locked?: boolean;
1959
2086
  }
1960
2087
  export interface MappingSimulationRequest {
1961
2088
  mapping_configuration: IntegrationConfigurationV1 | IntegrationConfigurationV2;
@@ -3341,6 +3468,67 @@ declare namespace Components {
3341
3468
  end_date?: string;
3342
3469
  event_id?: string;
3343
3470
  }
3471
+ /**
3472
+ * Developer-provided type annotations for a use case's request and response fields
3473
+ */
3474
+ export interface TypeAnnotations {
3475
+ /**
3476
+ * Type annotations for request fields, keyed by dot-path (e.g., "vendors[].id" -> "string")
3477
+ */
3478
+ request?: {
3479
+ [name: string]: string;
3480
+ };
3481
+ /**
3482
+ * Type annotations for response fields
3483
+ */
3484
+ response?: {
3485
+ [name: string]: string;
3486
+ };
3487
+ }
3488
+ /**
3489
+ * Describes the inferred type shape of a JSONata expression
3490
+ */
3491
+ export interface TypeDescriptor {
3492
+ kind: "object" | "array" | "string" | "number" | "boolean" | "null" | "unknown" | "union";
3493
+ /**
3494
+ * For kind=object, the properties and their type descriptors
3495
+ */
3496
+ properties?: {
3497
+ [name: string]: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor;
3498
+ };
3499
+ /**
3500
+ * For kind=array, the type of array items
3501
+ */
3502
+ items?: {
3503
+ kind: "object" | "array" | "string" | "number" | "boolean" | "null" | "unknown" | "union";
3504
+ /**
3505
+ * For kind=object, the properties and their type descriptors
3506
+ */
3507
+ properties?: {
3508
+ [name: string]: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor;
3509
+ };
3510
+ /**
3511
+ * For kind=array, the type of array items
3512
+ */
3513
+ items?: any;
3514
+ /**
3515
+ * For kind=unknown, the JSONata path that produced this value
3516
+ */
3517
+ source?: string;
3518
+ /**
3519
+ * For kind=union, the variant types
3520
+ */
3521
+ variants?: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor[];
3522
+ };
3523
+ /**
3524
+ * For kind=unknown, the JSONata path that produced this value
3525
+ */
3526
+ source?: string;
3527
+ /**
3528
+ * For kind=union, the variant types
3529
+ */
3530
+ variants?: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor[];
3531
+ }
3344
3532
  export interface UpdateFileProxyUseCaseRequest {
3345
3533
  /**
3346
3534
  * Use case name
@@ -3421,6 +3609,7 @@ declare namespace Components {
3421
3609
  */
3422
3610
  type?: "managed_call";
3423
3611
  configuration?: /* Configuration for managed_call use cases. Defines a single API operation with JSONata mapping. */ ManagedCallOperationConfig;
3612
+ type_annotations?: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations;
3424
3613
  }
3425
3614
  export interface UpdateOutboundUseCaseRequest {
3426
3615
  /**
@@ -3620,6 +3809,16 @@ declare namespace Components {
3620
3809
  */
3621
3810
  history_created_at: string; // date-time
3622
3811
  }
3812
+ /**
3813
+ * Scaffolded type descriptors for a single use case
3814
+ */
3815
+ export interface UseCaseTypePreview {
3816
+ slug: string;
3817
+ name?: string;
3818
+ request_shape: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor;
3819
+ response_shape: /* Describes the inferred type shape of a JSONata expression */ TypeDescriptor;
3820
+ existing_annotations?: /* Developer-provided type annotations for a use case's request and response fields */ TypeAnnotations;
3821
+ }
3623
3822
  export interface WebhookStatus {
3624
3823
  /**
3625
3824
  * Unique identifier for the webhook
@@ -3658,6 +3857,22 @@ declare namespace Paths {
3658
3857
  }
3659
3858
  }
3660
3859
  }
3860
+ namespace CommitTypes {
3861
+ namespace Parameters {
3862
+ export type IntegrationId = string; // uuid
3863
+ }
3864
+ export interface PathParameters {
3865
+ integrationId: Parameters.IntegrationId /* uuid */;
3866
+ }
3867
+ export type RequestBody = Components.Schemas.CommitTypesRequest;
3868
+ namespace Responses {
3869
+ export type $200 = Components.Schemas.CommitTypesResponse;
3870
+ export type $400 = Components.Responses.BadRequest;
3871
+ export type $403 = Components.Responses.Forbidden;
3872
+ export type $404 = Components.Responses.NotFound;
3873
+ export type $500 = Components.Responses.InternalServerError;
3874
+ }
3875
+ }
3661
3876
  namespace CreateIntegration {
3662
3877
  export type RequestBody = Components.Schemas.CreateIntegrationRequest;
3663
3878
  namespace Responses {
@@ -3770,6 +3985,53 @@ declare namespace Paths {
3770
3985
  export type $500 = Components.Responses.InternalServerError;
3771
3986
  }
3772
3987
  }
3988
+ namespace GenerateTypes {
3989
+ namespace Parameters {
3990
+ export type IntegrationId = string; // uuid
3991
+ }
3992
+ export interface PathParameters {
3993
+ integrationId: Parameters.IntegrationId /* uuid */;
3994
+ }
3995
+ export type RequestBody = Components.Schemas.GenerateTypesRequest;
3996
+ namespace Responses {
3997
+ export type $200 = Components.Schemas.GenerateTypesResponse;
3998
+ export type $400 = Components.Responses.BadRequest;
3999
+ export type $403 = Components.Responses.Forbidden;
4000
+ export type $404 = Components.Responses.NotFound;
4001
+ export type $500 = Components.Responses.InternalServerError;
4002
+ }
4003
+ }
4004
+ namespace GenerateTypesPreview {
4005
+ namespace Parameters {
4006
+ export type IntegrationId = string; // uuid
4007
+ }
4008
+ export interface PathParameters {
4009
+ integrationId: Parameters.IntegrationId /* uuid */;
4010
+ }
4011
+ namespace Responses {
4012
+ export type $200 = Components.Schemas.GenerateTypesPreviewResponse;
4013
+ export type $400 = Components.Responses.BadRequest;
4014
+ export type $403 = Components.Responses.Forbidden;
4015
+ export type $404 = Components.Responses.NotFound;
4016
+ export type $500 = Components.Responses.InternalServerError;
4017
+ }
4018
+ }
4019
+ namespace GetAssociatedMonitoringEvents {
4020
+ namespace Parameters {
4021
+ export type EventId = string;
4022
+ export type IntegrationId = string; // uuid
4023
+ }
4024
+ export interface PathParameters {
4025
+ integrationId: Parameters.IntegrationId /* uuid */;
4026
+ eventId: Parameters.EventId;
4027
+ }
4028
+ namespace Responses {
4029
+ export type $200 = Components.Responses.GetAssociatedMonitoringEventsResponse;
4030
+ export type $400 = Components.Responses.BadRequest;
4031
+ export type $401 = Components.Responses.Unauthorized;
4032
+ export type $500 = Components.Responses.InternalServerError;
4033
+ }
4034
+ }
3773
4035
  namespace GetIntegration {
3774
4036
  namespace Parameters {
3775
4037
  export type IntegrationId = string; // uuid
@@ -4682,6 +4944,19 @@ export interface OperationMethods {
4682
4944
  data?: Paths.GetMonitoringTimeSeriesV2.RequestBody,
4683
4945
  config?: AxiosRequestConfig
4684
4946
  ): OperationResponse<Paths.GetMonitoringTimeSeriesV2.Responses.$200>
4947
+ /**
4948
+ * getAssociatedMonitoringEvents - getAssociatedMonitoringEvents
4949
+ *
4950
+ * Returns all monitoring events sharing the same event_id, ordered chronologically.
4951
+ * Also includes the original inbound event payload from erp_incoming_events if available.
4952
+ * Used to display a full event trace/timeline.
4953
+ *
4954
+ */
4955
+ 'getAssociatedMonitoringEvents'(
4956
+ parameters?: Parameters<Paths.GetAssociatedMonitoringEvents.PathParameters> | null,
4957
+ data?: any,
4958
+ config?: AxiosRequestConfig
4959
+ ): OperationResponse<Paths.GetAssociatedMonitoringEvents.Responses.$200>
4685
4960
  /**
4686
4961
  * listSecureProxies - List all secure proxy use cases
4687
4962
  *
@@ -4719,6 +4994,39 @@ export interface OperationMethods {
4719
4994
  data?: Paths.ManagedCallExecute.RequestBody,
4720
4995
  config?: AxiosRequestConfig
4721
4996
  ): OperationResponse<Paths.ManagedCallExecute.Responses.$200>
4997
+ /**
4998
+ * generateTypesPreview - Preview scaffolded types for a connector integration
4999
+ *
5000
+ * Analyses the JSONata mappings of all managed-call use cases in the integration and returns scaffolded type descriptors. The frontend uses these to show the type editor modal where developers fill in leaf types.
5001
+ *
5002
+ */
5003
+ 'generateTypesPreview'(
5004
+ parameters?: Parameters<Paths.GenerateTypesPreview.PathParameters> | null,
5005
+ data?: any,
5006
+ config?: AxiosRequestConfig
5007
+ ): OperationResponse<Paths.GenerateTypesPreview.Responses.$200>
5008
+ /**
5009
+ * generateTypes - Generate a TypeScript npm package for a connector integration
5010
+ *
5011
+ * Generates a complete TypeScript npm package with typed interfaces for all managed-call use cases. This is a stateless operation that does not persist any changes. Use the commit-types endpoint to lock configurations after review.
5012
+ *
5013
+ */
5014
+ 'generateTypes'(
5015
+ parameters?: Parameters<Paths.GenerateTypes.PathParameters> | null,
5016
+ data?: Paths.GenerateTypes.RequestBody,
5017
+ config?: AxiosRequestConfig
5018
+ ): OperationResponse<Paths.GenerateTypes.Responses.$200>
5019
+ /**
5020
+ * commitTypes - Commit generated types and lock use case configurations
5021
+ *
5022
+ * Commits the generated types by locking use case configurations and updating version tracking. Should be called after the user reviews and downloads the generated package.
5023
+ *
5024
+ */
5025
+ 'commitTypes'(
5026
+ parameters?: Parameters<Paths.CommitTypes.PathParameters> | null,
5027
+ data?: Paths.CommitTypes.RequestBody,
5028
+ config?: AxiosRequestConfig
5029
+ ): OperationResponse<Paths.CommitTypes.Responses.$200>
4722
5030
  }
4723
5031
 
4724
5032
  export interface PathsDictionary {
@@ -5188,6 +5496,21 @@ export interface PathsDictionary {
5188
5496
  config?: AxiosRequestConfig
5189
5497
  ): OperationResponse<Paths.GetMonitoringTimeSeriesV2.Responses.$200>
5190
5498
  }
5499
+ ['/v2/integrations/{integrationId}/monitoring/events/{eventId}/associated']: {
5500
+ /**
5501
+ * getAssociatedMonitoringEvents - getAssociatedMonitoringEvents
5502
+ *
5503
+ * Returns all monitoring events sharing the same event_id, ordered chronologically.
5504
+ * Also includes the original inbound event payload from erp_incoming_events if available.
5505
+ * Used to display a full event trace/timeline.
5506
+ *
5507
+ */
5508
+ 'get'(
5509
+ parameters?: Parameters<Paths.GetAssociatedMonitoringEvents.PathParameters> | null,
5510
+ data?: any,
5511
+ config?: AxiosRequestConfig
5512
+ ): OperationResponse<Paths.GetAssociatedMonitoringEvents.Responses.$200>
5513
+ }
5191
5514
  ['/v1/integrations/secure-proxies']: {
5192
5515
  /**
5193
5516
  * listSecureProxies - List all secure proxy use cases
@@ -5231,6 +5554,45 @@ export interface PathsDictionary {
5231
5554
  config?: AxiosRequestConfig
5232
5555
  ): OperationResponse<Paths.ManagedCallExecute.Responses.$200>
5233
5556
  }
5557
+ ['/v1/integrations/{integrationId}/generate-types-preview']: {
5558
+ /**
5559
+ * generateTypesPreview - Preview scaffolded types for a connector integration
5560
+ *
5561
+ * Analyses the JSONata mappings of all managed-call use cases in the integration and returns scaffolded type descriptors. The frontend uses these to show the type editor modal where developers fill in leaf types.
5562
+ *
5563
+ */
5564
+ 'post'(
5565
+ parameters?: Parameters<Paths.GenerateTypesPreview.PathParameters> | null,
5566
+ data?: any,
5567
+ config?: AxiosRequestConfig
5568
+ ): OperationResponse<Paths.GenerateTypesPreview.Responses.$200>
5569
+ }
5570
+ ['/v1/integrations/{integrationId}/generate-types']: {
5571
+ /**
5572
+ * generateTypes - Generate a TypeScript npm package for a connector integration
5573
+ *
5574
+ * Generates a complete TypeScript npm package with typed interfaces for all managed-call use cases. This is a stateless operation that does not persist any changes. Use the commit-types endpoint to lock configurations after review.
5575
+ *
5576
+ */
5577
+ 'post'(
5578
+ parameters?: Parameters<Paths.GenerateTypes.PathParameters> | null,
5579
+ data?: Paths.GenerateTypes.RequestBody,
5580
+ config?: AxiosRequestConfig
5581
+ ): OperationResponse<Paths.GenerateTypes.Responses.$200>
5582
+ }
5583
+ ['/v1/integrations/{integrationId}/commit-types']: {
5584
+ /**
5585
+ * commitTypes - Commit generated types and lock use case configurations
5586
+ *
5587
+ * Commits the generated types by locking use case configurations and updating version tracking. Should be called after the user reviews and downloads the generated package.
5588
+ *
5589
+ */
5590
+ 'post'(
5591
+ parameters?: Parameters<Paths.CommitTypes.PathParameters> | null,
5592
+ data?: Paths.CommitTypes.RequestBody,
5593
+ config?: AxiosRequestConfig
5594
+ ): OperationResponse<Paths.CommitTypes.Responses.$200>
5595
+ }
5234
5596
  }
5235
5597
 
5236
5598
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -5238,6 +5600,8 @@ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
5238
5600
 
5239
5601
  export type AccessLogEntry = Components.Schemas.AccessLogEntry;
5240
5602
  export type AutoRefreshSettings = Components.Schemas.AutoRefreshSettings;
5603
+ export type CommitTypesRequest = Components.Schemas.CommitTypesRequest;
5604
+ export type CommitTypesResponse = Components.Schemas.CommitTypesResponse;
5241
5605
  export type ConnectorConfig = Components.Schemas.ConnectorConfig;
5242
5606
  export type CreateFileProxyUseCaseRequest = Components.Schemas.CreateFileProxyUseCaseRequest;
5243
5607
  export type CreateInboundUseCaseRequest = Components.Schemas.CreateInboundUseCaseRequest;
@@ -5274,6 +5638,9 @@ export type FileProxyUrlParams = Components.Schemas.FileProxyUrlParams;
5274
5638
  export type FileProxyUseCase = Components.Schemas.FileProxyUseCase;
5275
5639
  export type FileProxyUseCaseConfiguration = Components.Schemas.FileProxyUseCaseConfiguration;
5276
5640
  export type FileProxyUseCaseHistoryEntry = Components.Schemas.FileProxyUseCaseHistoryEntry;
5641
+ export type GenerateTypesPreviewResponse = Components.Schemas.GenerateTypesPreviewResponse;
5642
+ export type GenerateTypesRequest = Components.Schemas.GenerateTypesRequest;
5643
+ export type GenerateTypesResponse = Components.Schemas.GenerateTypesResponse;
5277
5644
  export type GetMonitoringStatsRequest = Components.Schemas.GetMonitoringStatsRequest;
5278
5645
  export type GetMonitoringStatsV2Request = Components.Schemas.GetMonitoringStatsV2Request;
5279
5646
  export type GetMonitoringTimeSeriesRequest = Components.Schemas.GetMonitoringTimeSeriesRequest;
@@ -5345,6 +5712,8 @@ export type TimeSeriesBucket = Components.Schemas.TimeSeriesBucket;
5345
5712
  export type TimeSeriesBucketV2 = Components.Schemas.TimeSeriesBucketV2;
5346
5713
  export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
5347
5714
  export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
5715
+ export type TypeAnnotations = Components.Schemas.TypeAnnotations;
5716
+ export type TypeDescriptor = Components.Schemas.TypeDescriptor;
5348
5717
  export type UpdateFileProxyUseCaseRequest = Components.Schemas.UpdateFileProxyUseCaseRequest;
5349
5718
  export type UpdateInboundUseCaseRequest = Components.Schemas.UpdateInboundUseCaseRequest;
5350
5719
  export type UpdateIntegrationRequest = Components.Schemas.UpdateIntegrationRequest;
@@ -5358,4 +5727,5 @@ export type UseCase = Components.Schemas.UseCase;
5358
5727
  export type UseCaseBase = Components.Schemas.UseCaseBase;
5359
5728
  export type UseCaseHistoryEntry = Components.Schemas.UseCaseHistoryEntry;
5360
5729
  export type UseCaseHistoryEntryBase = Components.Schemas.UseCaseHistoryEntryBase;
5730
+ export type UseCaseTypePreview = Components.Schemas.UseCaseTypePreview;
5361
5731
  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.51.0",
5
+ "version": "0.56.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": [
@@ -2407,6 +2407,52 @@
2407
2407
  }
2408
2408
  }
2409
2409
  },
2410
+ "/v2/integrations/{integrationId}/monitoring/events/{eventId}/associated": {
2411
+ "get": {
2412
+ "operationId": "getAssociatedMonitoringEvents",
2413
+ "summary": "getAssociatedMonitoringEvents",
2414
+ "description": "Returns all monitoring events sharing the same event_id, ordered chronologically.\nAlso includes the original inbound event payload from erp_incoming_events if available.\nUsed to display a full event trace/timeline.\n",
2415
+ "tags": [
2416
+ "monitoring",
2417
+ "integrations"
2418
+ ],
2419
+ "parameters": [
2420
+ {
2421
+ "name": "integrationId",
2422
+ "in": "path",
2423
+ "required": true,
2424
+ "description": "The integration ID",
2425
+ "schema": {
2426
+ "type": "string",
2427
+ "format": "uuid"
2428
+ }
2429
+ },
2430
+ {
2431
+ "name": "eventId",
2432
+ "in": "path",
2433
+ "required": true,
2434
+ "description": "The event ID to get associated events for",
2435
+ "schema": {
2436
+ "type": "string"
2437
+ }
2438
+ }
2439
+ ],
2440
+ "responses": {
2441
+ "200": {
2442
+ "$ref": "#/components/responses/GetAssociatedMonitoringEventsResponse"
2443
+ },
2444
+ "400": {
2445
+ "$ref": "#/components/responses/BadRequest"
2446
+ },
2447
+ "401": {
2448
+ "$ref": "#/components/responses/Unauthorized"
2449
+ },
2450
+ "500": {
2451
+ "$ref": "#/components/responses/InternalServerError"
2452
+ }
2453
+ }
2454
+ }
2455
+ },
2410
2456
  "/v1/integrations/secure-proxies": {
2411
2457
  "get": {
2412
2458
  "operationId": "listSecureProxies",
@@ -2622,6 +2668,176 @@
2622
2668
  }
2623
2669
  }
2624
2670
  }
2671
+ },
2672
+ "/v1/integrations/{integrationId}/generate-types-preview": {
2673
+ "post": {
2674
+ "operationId": "generateTypesPreview",
2675
+ "summary": "Preview scaffolded types for a connector integration",
2676
+ "description": "Analyses the JSONata mappings of all managed-call use cases in the integration and returns scaffolded type descriptors. The frontend uses these to show the type editor modal where developers fill in leaf types.\n",
2677
+ "tags": [
2678
+ "integrations"
2679
+ ],
2680
+ "security": [
2681
+ {
2682
+ "EpilotAuth": []
2683
+ }
2684
+ ],
2685
+ "parameters": [
2686
+ {
2687
+ "name": "integrationId",
2688
+ "in": "path",
2689
+ "required": true,
2690
+ "schema": {
2691
+ "type": "string",
2692
+ "format": "uuid"
2693
+ }
2694
+ }
2695
+ ],
2696
+ "responses": {
2697
+ "200": {
2698
+ "description": "Scaffolded type preview",
2699
+ "content": {
2700
+ "application/json": {
2701
+ "schema": {
2702
+ "$ref": "#/components/schemas/GenerateTypesPreviewResponse"
2703
+ }
2704
+ }
2705
+ }
2706
+ },
2707
+ "400": {
2708
+ "$ref": "#/components/responses/BadRequest"
2709
+ },
2710
+ "403": {
2711
+ "$ref": "#/components/responses/Forbidden"
2712
+ },
2713
+ "404": {
2714
+ "$ref": "#/components/responses/NotFound"
2715
+ },
2716
+ "500": {
2717
+ "$ref": "#/components/responses/InternalServerError"
2718
+ }
2719
+ }
2720
+ }
2721
+ },
2722
+ "/v1/integrations/{integrationId}/generate-types": {
2723
+ "post": {
2724
+ "operationId": "generateTypes",
2725
+ "summary": "Generate a TypeScript npm package for a connector integration",
2726
+ "description": "Generates a complete TypeScript npm package with typed interfaces for all managed-call use cases. This is a stateless operation that does not persist any changes. Use the commit-types endpoint to lock configurations after review.\n",
2727
+ "tags": [
2728
+ "integrations"
2729
+ ],
2730
+ "security": [
2731
+ {
2732
+ "EpilotAuth": []
2733
+ }
2734
+ ],
2735
+ "parameters": [
2736
+ {
2737
+ "name": "integrationId",
2738
+ "in": "path",
2739
+ "required": true,
2740
+ "schema": {
2741
+ "type": "string",
2742
+ "format": "uuid"
2743
+ }
2744
+ }
2745
+ ],
2746
+ "requestBody": {
2747
+ "required": true,
2748
+ "content": {
2749
+ "application/json": {
2750
+ "schema": {
2751
+ "$ref": "#/components/schemas/GenerateTypesRequest"
2752
+ }
2753
+ }
2754
+ }
2755
+ },
2756
+ "responses": {
2757
+ "200": {
2758
+ "description": "Generated package",
2759
+ "content": {
2760
+ "application/json": {
2761
+ "schema": {
2762
+ "$ref": "#/components/schemas/GenerateTypesResponse"
2763
+ }
2764
+ }
2765
+ }
2766
+ },
2767
+ "400": {
2768
+ "$ref": "#/components/responses/BadRequest"
2769
+ },
2770
+ "403": {
2771
+ "$ref": "#/components/responses/Forbidden"
2772
+ },
2773
+ "404": {
2774
+ "$ref": "#/components/responses/NotFound"
2775
+ },
2776
+ "500": {
2777
+ "$ref": "#/components/responses/InternalServerError"
2778
+ }
2779
+ }
2780
+ }
2781
+ },
2782
+ "/v1/integrations/{integrationId}/commit-types": {
2783
+ "post": {
2784
+ "operationId": "commitTypes",
2785
+ "summary": "Commit generated types and lock use case configurations",
2786
+ "description": "Commits the generated types by locking use case configurations and updating version tracking. Should be called after the user reviews and downloads the generated package.\n",
2787
+ "tags": [
2788
+ "integrations"
2789
+ ],
2790
+ "security": [
2791
+ {
2792
+ "EpilotAuth": []
2793
+ }
2794
+ ],
2795
+ "parameters": [
2796
+ {
2797
+ "name": "integrationId",
2798
+ "in": "path",
2799
+ "required": true,
2800
+ "schema": {
2801
+ "type": "string",
2802
+ "format": "uuid"
2803
+ }
2804
+ }
2805
+ ],
2806
+ "requestBody": {
2807
+ "required": true,
2808
+ "content": {
2809
+ "application/json": {
2810
+ "schema": {
2811
+ "$ref": "#/components/schemas/CommitTypesRequest"
2812
+ }
2813
+ }
2814
+ }
2815
+ },
2816
+ "responses": {
2817
+ "200": {
2818
+ "description": "Types committed successfully",
2819
+ "content": {
2820
+ "application/json": {
2821
+ "schema": {
2822
+ "$ref": "#/components/schemas/CommitTypesResponse"
2823
+ }
2824
+ }
2825
+ }
2826
+ },
2827
+ "400": {
2828
+ "$ref": "#/components/responses/BadRequest"
2829
+ },
2830
+ "403": {
2831
+ "$ref": "#/components/responses/Forbidden"
2832
+ },
2833
+ "404": {
2834
+ "$ref": "#/components/responses/NotFound"
2835
+ },
2836
+ "500": {
2837
+ "$ref": "#/components/responses/InternalServerError"
2838
+ }
2839
+ }
2840
+ }
2625
2841
  }
2626
2842
  },
2627
2843
  "components": {
@@ -2993,6 +3209,50 @@
2993
3209
  },
2994
3210
  "auth": {
2995
3211
  "$ref": "#/components/schemas/ManagedCallAuth"
3212
+ },
3213
+ "types_versions": {
3214
+ "type": "array",
3215
+ "description": "History of generated type package versions",
3216
+ "items": {
3217
+ "type": "object",
3218
+ "required": [
3219
+ "version",
3220
+ "package_name",
3221
+ "generated_at",
3222
+ "generated_by",
3223
+ "status"
3224
+ ],
3225
+ "properties": {
3226
+ "version": {
3227
+ "type": "string"
3228
+ },
3229
+ "package_name": {
3230
+ "type": "string"
3231
+ },
3232
+ "generated_at": {
3233
+ "type": "string",
3234
+ "format": "date-time"
3235
+ },
3236
+ "generated_by": {
3237
+ "type": "string"
3238
+ },
3239
+ "status": {
3240
+ "type": "string",
3241
+ "enum": [
3242
+ "active",
3243
+ "deprecated"
3244
+ ]
3245
+ }
3246
+ }
3247
+ }
3248
+ },
3249
+ "latest_types_version": {
3250
+ "type": "string",
3251
+ "description": "Latest active types package version"
3252
+ },
3253
+ "latest_types_package_name": {
3254
+ "type": "string",
3255
+ "description": "Latest active types package name"
2996
3256
  }
2997
3257
  }
2998
3258
  },
@@ -3986,6 +4246,13 @@
3986
4246
  },
3987
4247
  "configuration": {
3988
4248
  "$ref": "#/components/schemas/ManagedCallOperationConfig"
4249
+ },
4250
+ "type_annotations": {
4251
+ "$ref": "#/components/schemas/TypeAnnotations"
4252
+ },
4253
+ "types_locked": {
4254
+ "type": "boolean",
4255
+ "description": "Whether types have been generated for this use case"
3989
4256
  }
3990
4257
  }
3991
4258
  }
@@ -4365,6 +4632,9 @@
4365
4632
  },
4366
4633
  "configuration": {
4367
4634
  "$ref": "#/components/schemas/ManagedCallOperationConfig"
4635
+ },
4636
+ "type_annotations": {
4637
+ "$ref": "#/components/schemas/TypeAnnotations"
4368
4638
  }
4369
4639
  }
4370
4640
  }
@@ -4578,6 +4848,13 @@
4578
4848
  },
4579
4849
  "configuration": {
4580
4850
  "$ref": "#/components/schemas/ManagedCallOperationConfig"
4851
+ },
4852
+ "type_annotations": {
4853
+ "$ref": "#/components/schemas/TypeAnnotations"
4854
+ },
4855
+ "types_locked": {
4856
+ "type": "boolean",
4857
+ "description": "Whether types have been generated for this use case"
4581
4858
  }
4582
4859
  }
4583
4860
  }
@@ -4888,6 +5165,273 @@
4888
5165
  }
4889
5166
  }
4890
5167
  },
5168
+ "TypeAnnotations": {
5169
+ "type": "object",
5170
+ "description": "Developer-provided type annotations for a use case's request and response fields",
5171
+ "properties": {
5172
+ "request": {
5173
+ "type": "object",
5174
+ "description": "Type annotations for request fields, keyed by dot-path (e.g., \"vendors[].id\" -> \"string\")",
5175
+ "additionalProperties": {
5176
+ "type": "string"
5177
+ }
5178
+ },
5179
+ "response": {
5180
+ "type": "object",
5181
+ "description": "Type annotations for response fields",
5182
+ "additionalProperties": {
5183
+ "type": "string"
5184
+ }
5185
+ }
5186
+ }
5187
+ },
5188
+ "TypeDescriptor": {
5189
+ "type": "object",
5190
+ "description": "Describes the inferred type shape of a JSONata expression",
5191
+ "required": [
5192
+ "kind"
5193
+ ],
5194
+ "properties": {
5195
+ "kind": {
5196
+ "type": "string",
5197
+ "enum": [
5198
+ "object",
5199
+ "array",
5200
+ "string",
5201
+ "number",
5202
+ "boolean",
5203
+ "null",
5204
+ "unknown",
5205
+ "union"
5206
+ ]
5207
+ },
5208
+ "properties": {
5209
+ "type": "object",
5210
+ "description": "For kind=object, the properties and their type descriptors",
5211
+ "additionalProperties": {
5212
+ "$ref": "#/components/schemas/TypeDescriptor"
5213
+ }
5214
+ },
5215
+ "items": {
5216
+ "description": "For kind=array, the type of array items",
5217
+ "allOf": [
5218
+ {
5219
+ "$ref": "#/components/schemas/TypeDescriptor"
5220
+ }
5221
+ ]
5222
+ },
5223
+ "source": {
5224
+ "type": "string",
5225
+ "description": "For kind=unknown, the JSONata path that produced this value"
5226
+ },
5227
+ "variants": {
5228
+ "type": "array",
5229
+ "description": "For kind=union, the variant types",
5230
+ "items": {
5231
+ "$ref": "#/components/schemas/TypeDescriptor"
5232
+ }
5233
+ }
5234
+ }
5235
+ },
5236
+ "UseCaseTypePreview": {
5237
+ "type": "object",
5238
+ "description": "Scaffolded type descriptors for a single use case",
5239
+ "required": [
5240
+ "slug",
5241
+ "request_shape",
5242
+ "response_shape"
5243
+ ],
5244
+ "properties": {
5245
+ "slug": {
5246
+ "type": "string"
5247
+ },
5248
+ "name": {
5249
+ "type": "string"
5250
+ },
5251
+ "request_shape": {
5252
+ "$ref": "#/components/schemas/TypeDescriptor"
5253
+ },
5254
+ "response_shape": {
5255
+ "$ref": "#/components/schemas/TypeDescriptor"
5256
+ },
5257
+ "existing_annotations": {
5258
+ "$ref": "#/components/schemas/TypeAnnotations"
5259
+ }
5260
+ }
5261
+ },
5262
+ "GenerateTypesPreviewResponse": {
5263
+ "type": "object",
5264
+ "required": [
5265
+ "use_cases"
5266
+ ],
5267
+ "properties": {
5268
+ "integration_name": {
5269
+ "type": "string"
5270
+ },
5271
+ "use_cases": {
5272
+ "type": "array",
5273
+ "items": {
5274
+ "$ref": "#/components/schemas/UseCaseTypePreview"
5275
+ }
5276
+ },
5277
+ "previous_version": {
5278
+ "type": "string",
5279
+ "description": "Previously generated version, if any"
5280
+ },
5281
+ "suggested_version": {
5282
+ "type": "string",
5283
+ "description": "Suggested next version based on detected changes"
5284
+ },
5285
+ "suggested_bump": {
5286
+ "type": "string",
5287
+ "enum": [
5288
+ "major",
5289
+ "minor"
5290
+ ]
5291
+ },
5292
+ "detected_changes": {
5293
+ "type": "array",
5294
+ "items": {
5295
+ "type": "object",
5296
+ "required": [
5297
+ "slug",
5298
+ "field",
5299
+ "type",
5300
+ "description"
5301
+ ],
5302
+ "properties": {
5303
+ "slug": {
5304
+ "type": "string"
5305
+ },
5306
+ "field": {
5307
+ "type": "string"
5308
+ },
5309
+ "type": {
5310
+ "type": "string",
5311
+ "enum": [
5312
+ "breaking",
5313
+ "non-breaking"
5314
+ ]
5315
+ },
5316
+ "description": {
5317
+ "type": "string"
5318
+ }
5319
+ }
5320
+ }
5321
+ }
5322
+ }
5323
+ },
5324
+ "GenerateTypesRequest": {
5325
+ "type": "object",
5326
+ "required": [
5327
+ "package_name",
5328
+ "version"
5329
+ ],
5330
+ "properties": {
5331
+ "package_name": {
5332
+ "type": "string",
5333
+ "description": "npm package name",
5334
+ "example": "@epilot/hems-cleverpv"
5335
+ },
5336
+ "version": {
5337
+ "type": "string",
5338
+ "description": "Package version",
5339
+ "example": "1.0.0"
5340
+ },
5341
+ "description": {
5342
+ "type": "string"
5343
+ },
5344
+ "domain_package": {
5345
+ "type": "string",
5346
+ "description": "Domain standard package to extend",
5347
+ "example": "@epilot/hems"
5348
+ },
5349
+ "domain_map_name": {
5350
+ "type": "string",
5351
+ "description": "Name of the domain UseCaseMap to extend",
5352
+ "example": "HemsUseCaseMap"
5353
+ },
5354
+ "annotations": {
5355
+ "type": "object",
5356
+ "description": "Type annotations per use case slug",
5357
+ "additionalProperties": {
5358
+ "$ref": "#/components/schemas/TypeAnnotations"
5359
+ }
5360
+ }
5361
+ }
5362
+ },
5363
+ "GenerateTypesResponse": {
5364
+ "type": "object",
5365
+ "required": [
5366
+ "package_name",
5367
+ "version",
5368
+ "files"
5369
+ ],
5370
+ "properties": {
5371
+ "package_name": {
5372
+ "type": "string"
5373
+ },
5374
+ "version": {
5375
+ "type": "string"
5376
+ },
5377
+ "files": {
5378
+ "type": "object",
5379
+ "description": "Generated file contents keyed by file path",
5380
+ "additionalProperties": {
5381
+ "type": "string"
5382
+ }
5383
+ },
5384
+ "warnings": {
5385
+ "type": "array",
5386
+ "items": {
5387
+ "type": "string"
5388
+ }
5389
+ }
5390
+ }
5391
+ },
5392
+ "CommitTypesRequest": {
5393
+ "type": "object",
5394
+ "required": [
5395
+ "package_name",
5396
+ "version"
5397
+ ],
5398
+ "properties": {
5399
+ "package_name": {
5400
+ "type": "string",
5401
+ "description": "npm package name",
5402
+ "example": "@epilot/hems-cleverpv"
5403
+ },
5404
+ "version": {
5405
+ "type": "string",
5406
+ "description": "Package version",
5407
+ "example": "1.0.0"
5408
+ },
5409
+ "annotations": {
5410
+ "type": "object",
5411
+ "description": "Type annotations per use case slug",
5412
+ "additionalProperties": {
5413
+ "$ref": "#/components/schemas/TypeAnnotations"
5414
+ }
5415
+ }
5416
+ }
5417
+ },
5418
+ "CommitTypesResponse": {
5419
+ "type": "object",
5420
+ "required": [
5421
+ "committed"
5422
+ ],
5423
+ "properties": {
5424
+ "committed": {
5425
+ "type": "boolean"
5426
+ },
5427
+ "warnings": {
5428
+ "type": "array",
5429
+ "items": {
5430
+ "type": "string"
5431
+ }
5432
+ }
5433
+ }
5434
+ },
4891
5435
  "FileProxyUseCaseConfiguration": {
4892
5436
  "type": "object",
4893
5437
  "required": [
@@ -7352,6 +7896,31 @@
7352
7896
  }
7353
7897
  }
7354
7898
  }
7899
+ },
7900
+ "GetAssociatedMonitoringEventsResponse": {
7901
+ "description": "Associated monitoring events for the given event_id",
7902
+ "content": {
7903
+ "application/json": {
7904
+ "schema": {
7905
+ "type": "object",
7906
+ "properties": {
7907
+ "monitoring_events": {
7908
+ "type": "array",
7909
+ "items": {
7910
+ "$ref": "#/components/schemas/MonitoringEventV2"
7911
+ },
7912
+ "description": "All monitoring events sharing this event_id, ordered by created_at ASC"
7913
+ },
7914
+ "inbound_event": {
7915
+ "type": "object",
7916
+ "nullable": true,
7917
+ "additionalProperties": true,
7918
+ "description": "The original inbound event payload from erp_incoming_events, if available"
7919
+ }
7920
+ }
7921
+ }
7922
+ }
7923
+ }
7355
7924
  }
7356
7925
  }
7357
7926
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.30.0-rc2",
3
+ "version": "0.30.0",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",