@epilot/erp-integration-client 0.24.2 → 0.24.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/openapi.d.ts CHANGED
@@ -187,6 +187,46 @@ declare namespace Components {
187
187
  */
188
188
  source_ip?: string;
189
189
  }
190
+ /**
191
+ * Auto-refresh settings for keeping integration data fresh
192
+ */
193
+ export interface AutoRefreshSettings {
194
+ /**
195
+ * Whether auto-refresh is enabled
196
+ */
197
+ enabled?: boolean;
198
+ /**
199
+ * Maximum age (in minutes) of data before it is considered stale and eligible for refresh
200
+ */
201
+ freshnessThresholdMinutes?: number;
202
+ /**
203
+ * Minimum interval (in minutes) between consecutive sync operations to prevent excessive API calls
204
+ */
205
+ minIntervalBetweenSyncsMinutes?: number;
206
+ }
207
+ export interface CreateFileProxyUseCaseRequest {
208
+ /**
209
+ * Use case name
210
+ */
211
+ name: string;
212
+ /**
213
+ * Whether the use case is enabled
214
+ */
215
+ enabled: boolean;
216
+ /**
217
+ * Use case type
218
+ */
219
+ type: "file_proxy";
220
+ configuration?: /**
221
+ * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems.
222
+ *
223
+ * The file proxy download URL always requires `orgId`, `integrationId`, and `useCaseId` as query parameters.
224
+ * The `orgId` is included in the signed URL to establish organization context without requiring authentication.
225
+ * Additional use-case-specific parameters are declared in the `params` array.
226
+ *
227
+ */
228
+ FileProxyUseCaseConfiguration;
229
+ }
190
230
  export interface CreateInboundUseCaseRequest {
191
231
  /**
192
232
  * Use case name
@@ -223,6 +263,7 @@ declare namespace Components {
223
263
  * Configuration defining environment variables needed by this integration
224
264
  */
225
265
  environment_config?: EnvironmentFieldConfig[];
266
+ settings?: /* Settings for the integration */ IntegrationSettings;
226
267
  }
227
268
  export interface CreateOutboundUseCaseRequest {
228
269
  /**
@@ -239,7 +280,7 @@ declare namespace Components {
239
280
  type: "outbound";
240
281
  configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration;
241
282
  }
242
- export type CreateUseCaseRequest = CreateInboundUseCaseRequest | CreateOutboundUseCaseRequest;
283
+ export type CreateUseCaseRequest = CreateInboundUseCaseRequest | CreateOutboundUseCaseRequest | CreateFileProxyUseCaseRequest;
243
284
  export interface CreateUseCaseRequestBase {
244
285
  /**
245
286
  * Use case name
@@ -498,6 +539,202 @@ declare namespace Components {
498
539
  */
499
540
  message?: string;
500
541
  }
542
+ export interface FileProxyAuth {
543
+ /**
544
+ * Authentication type
545
+ */
546
+ type: "oauth2_client_credentials";
547
+ /**
548
+ * Handlebars template for the OAuth2 token endpoint URL
549
+ */
550
+ token_url: string;
551
+ /**
552
+ * Handlebars template for the OAuth2 client ID
553
+ */
554
+ client_id: string;
555
+ /**
556
+ * Handlebars template for the OAuth2 client secret
557
+ */
558
+ client_secret: string;
559
+ /**
560
+ * Optional OAuth2 scope
561
+ */
562
+ scope?: string;
563
+ }
564
+ export interface FileProxyParam {
565
+ /**
566
+ * Parameter name as it appears in the query string
567
+ */
568
+ name: string;
569
+ /**
570
+ * Whether this parameter is required
571
+ */
572
+ required: boolean;
573
+ /**
574
+ * Human-readable description of the parameter
575
+ */
576
+ description?: string;
577
+ }
578
+ export interface FileProxyResponseConfig {
579
+ /**
580
+ * JSONata expression to extract file content from step results
581
+ */
582
+ body: string;
583
+ /**
584
+ * Encoding of the extracted body
585
+ */
586
+ encoding: "base64" | "binary";
587
+ /**
588
+ * JSONata expression to extract the filename
589
+ */
590
+ filename?: string;
591
+ /**
592
+ * JSONata expression to extract the content type
593
+ */
594
+ content_type?: string;
595
+ }
596
+ export interface FileProxyStep {
597
+ /**
598
+ * Handlebars template for the request URL
599
+ */
600
+ url: string;
601
+ /**
602
+ * HTTP method
603
+ */
604
+ method: "GET" | "POST";
605
+ /**
606
+ * Handlebars templates for request headers
607
+ */
608
+ headers?: {
609
+ [name: string]: string;
610
+ };
611
+ /**
612
+ * Handlebars template for the request body (POST only)
613
+ */
614
+ body?: string;
615
+ /**
616
+ * Expected response type
617
+ */
618
+ response_type: "json" | "binary";
619
+ }
620
+ export interface FileProxyUseCase {
621
+ /**
622
+ * Unique identifier for the use case
623
+ */
624
+ id: string; // uuid
625
+ /**
626
+ * Parent integration ID
627
+ */
628
+ integrationId: string; // uuid
629
+ /**
630
+ * Use case name
631
+ */
632
+ name: string;
633
+ /**
634
+ * Use case type
635
+ */
636
+ type: "inbound" | "outbound" | "file_proxy" | "file_proxy";
637
+ enabled: boolean;
638
+ /**
639
+ * Description of the last change made to this use case
640
+ */
641
+ change_description?: string;
642
+ /**
643
+ * ISO-8601 timestamp when the use case was created
644
+ */
645
+ created_at: string; // date-time
646
+ /**
647
+ * ISO-8601 timestamp when the use case was last updated
648
+ */
649
+ updated_at: string; // date-time
650
+ configuration?: /**
651
+ * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems.
652
+ *
653
+ * The file proxy download URL always requires `orgId`, `integrationId`, and `useCaseId` as query parameters.
654
+ * The `orgId` is included in the signed URL to establish organization context without requiring authentication.
655
+ * Additional use-case-specific parameters are declared in the `params` array.
656
+ *
657
+ */
658
+ FileProxyUseCaseConfiguration;
659
+ }
660
+ /**
661
+ * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems.
662
+ *
663
+ * The file proxy download URL always requires `orgId`, `integrationId`, and `useCaseId` as query parameters.
664
+ * The `orgId` is included in the signed URL to establish organization context without requiring authentication.
665
+ * Additional use-case-specific parameters are declared in the `params` array.
666
+ *
667
+ */
668
+ export interface FileProxyUseCaseConfiguration {
669
+ /**
670
+ * Whether requests require VPC routing for IP allowlisting
671
+ */
672
+ requires_vpc?: boolean;
673
+ auth?: FileProxyAuth;
674
+ /**
675
+ * Additional use-case-specific parameters expected in the download URL query string (beyond the required orgId, integrationId, useCaseId)
676
+ */
677
+ params?: FileProxyParam[];
678
+ /**
679
+ * Ordered list of HTTP steps to execute to retrieve the file
680
+ */
681
+ steps: [
682
+ FileProxyStep,
683
+ ...FileProxyStep[]
684
+ ];
685
+ response: FileProxyResponseConfig;
686
+ }
687
+ export interface FileProxyUseCaseHistoryEntry {
688
+ /**
689
+ * Unique identifier for this history entry
690
+ */
691
+ id: string; // uuid
692
+ /**
693
+ * Reference to the parent use case
694
+ */
695
+ useCaseId: string; // uuid
696
+ /**
697
+ * Parent integration ID
698
+ */
699
+ integrationId: string; // uuid
700
+ /**
701
+ * Use case name at this point in history
702
+ */
703
+ name: string;
704
+ /**
705
+ * Whether the use case was enabled at this point in history
706
+ */
707
+ enabled: boolean;
708
+ /**
709
+ * Description of the change that was made at this point in history
710
+ */
711
+ change_description?: string;
712
+ /**
713
+ * ISO-8601 timestamp when the use case was originally created
714
+ */
715
+ created_at: string; // date-time
716
+ /**
717
+ * ISO-8601 timestamp of this historical snapshot (before the update)
718
+ */
719
+ updated_at: string; // date-time
720
+ /**
721
+ * ISO-8601 timestamp when this history entry was created
722
+ */
723
+ history_created_at: string; // date-time
724
+ /**
725
+ * Use case type
726
+ */
727
+ type: "file_proxy";
728
+ configuration?: /**
729
+ * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems.
730
+ *
731
+ * The file proxy download URL always requires `orgId`, `integrationId`, and `useCaseId` as query parameters.
732
+ * The `orgId` is included in the signed URL to establish organization context without requiring authentication.
733
+ * Additional use-case-specific parameters are declared in the `params` array.
734
+ *
735
+ */
736
+ FileProxyUseCaseConfiguration;
737
+ }
501
738
  export interface GetMonitoringStatsRequest {
502
739
  /**
503
740
  * Start date for statistics period (inclusive)
@@ -647,7 +884,7 @@ declare namespace Components {
647
884
  /**
648
885
  * Use case type
649
886
  */
650
- type: "inbound" | "outbound" | "inbound";
887
+ type: "inbound" | "outbound" | "file_proxy" | "inbound";
651
888
  enabled: boolean;
652
889
  /**
653
890
  * Description of the last change made to this use case
@@ -735,6 +972,7 @@ declare namespace Components {
735
972
  * Configuration defining environment variables needed by this integration. Values are stored in the Environments API.
736
973
  */
737
974
  environment_config?: EnvironmentFieldConfig[];
975
+ settings?: /* Settings for the integration */ IntegrationSettings;
738
976
  /**
739
977
  * ISO-8601 timestamp when the integration was created
740
978
  */
@@ -925,6 +1163,12 @@ declare namespace Components {
925
1163
  */
926
1164
  fields: IntegrationFieldV1[];
927
1165
  }
1166
+ /**
1167
+ * Settings for the integration
1168
+ */
1169
+ export interface IntegrationSettings {
1170
+ autoRefresh?: /* Auto-refresh settings for keeping integration data fresh */ AutoRefreshSettings;
1171
+ }
928
1172
  /**
929
1173
  * Integration with embedded use cases for atomic CRUD operations
930
1174
  */
@@ -949,6 +1193,7 @@ declare namespace Components {
949
1193
  * List of access token IDs associated with this integration
950
1194
  */
951
1195
  access_token_ids?: string[];
1196
+ settings?: /* Settings for the integration */ IntegrationSettings;
952
1197
  /**
953
1198
  * All use cases belonging to this integration
954
1199
  */
@@ -1282,7 +1527,7 @@ declare namespace Components {
1282
1527
  /**
1283
1528
  * Use case type
1284
1529
  */
1285
- type: "inbound" | "outbound" | "outbound";
1530
+ type: "inbound" | "outbound" | "file_proxy" | "outbound";
1286
1531
  enabled: boolean;
1287
1532
  /**
1288
1533
  * Description of the last change made to this use case
@@ -1969,6 +2214,33 @@ declare namespace Components {
1969
2214
  end_date?: string;
1970
2215
  event_id?: string;
1971
2216
  }
2217
+ export interface UpdateFileProxyUseCaseRequest {
2218
+ /**
2219
+ * Use case name
2220
+ */
2221
+ name?: string;
2222
+ /**
2223
+ * Whether the use case is enabled
2224
+ */
2225
+ enabled?: boolean;
2226
+ /**
2227
+ * Optional description of this change (like a commit message)
2228
+ */
2229
+ change_description?: string;
2230
+ /**
2231
+ * Use case type
2232
+ */
2233
+ type?: "file_proxy";
2234
+ configuration?: /**
2235
+ * Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems.
2236
+ *
2237
+ * The file proxy download URL always requires `orgId`, `integrationId`, and `useCaseId` as query parameters.
2238
+ * The `orgId` is included in the signed URL to establish organization context without requiring authentication.
2239
+ * Additional use-case-specific parameters are declared in the `params` array.
2240
+ *
2241
+ */
2242
+ FileProxyUseCaseConfiguration;
2243
+ }
1972
2244
  export interface UpdateInboundUseCaseRequest {
1973
2245
  /**
1974
2246
  * Use case name
@@ -2009,6 +2281,7 @@ declare namespace Components {
2009
2281
  * Configuration defining environment variables needed by this integration
2010
2282
  */
2011
2283
  environment_config?: EnvironmentFieldConfig[];
2284
+ settings?: /* Settings for the integration */ IntegrationSettings;
2012
2285
  }
2013
2286
  export interface UpdateOutboundUseCaseRequest {
2014
2287
  /**
@@ -2029,7 +2302,7 @@ declare namespace Components {
2029
2302
  type?: "outbound";
2030
2303
  configuration?: /* Configuration for outbound use cases. Defines the event that triggers the flow and the webhook mappings. */ OutboundIntegrationEventConfiguration;
2031
2304
  }
2032
- export type UpdateUseCaseRequest = UpdateInboundUseCaseRequest | UpdateOutboundUseCaseRequest;
2305
+ export type UpdateUseCaseRequest = UpdateInboundUseCaseRequest | UpdateOutboundUseCaseRequest | UpdateFileProxyUseCaseRequest;
2033
2306
  export interface UpdateUseCaseRequestBase {
2034
2307
  /**
2035
2308
  * Use case name
@@ -2062,6 +2335,7 @@ declare namespace Components {
2062
2335
  * List of access token IDs to associate with this integration
2063
2336
  */
2064
2337
  access_token_ids?: string[];
2338
+ settings?: /* Settings for the integration */ IntegrationSettings;
2065
2339
  /**
2066
2340
  * Full list of use cases (declarative). This replaces ALL existing use cases.
2067
2341
  * - Use cases with an `id` field matching an existing use case will be updated
@@ -2071,7 +2345,7 @@ declare namespace Components {
2071
2345
  */
2072
2346
  use_cases?: EmbeddedUseCaseRequest[];
2073
2347
  }
2074
- export type UseCase = InboundUseCase | OutboundUseCase;
2348
+ export type UseCase = InboundUseCase | OutboundUseCase | FileProxyUseCase;
2075
2349
  export interface UseCaseBase {
2076
2350
  /**
2077
2351
  * Unique identifier for the use case
@@ -2088,7 +2362,7 @@ declare namespace Components {
2088
2362
  /**
2089
2363
  * Use case type
2090
2364
  */
2091
- type: "inbound" | "outbound";
2365
+ type: "inbound" | "outbound" | "file_proxy";
2092
2366
  enabled: boolean;
2093
2367
  /**
2094
2368
  * Description of the last change made to this use case
@@ -2103,7 +2377,7 @@ declare namespace Components {
2103
2377
  */
2104
2378
  updated_at: string; // date-time
2105
2379
  }
2106
- export type UseCaseHistoryEntry = InboundUseCaseHistoryEntry | OutboundUseCaseHistoryEntry;
2380
+ export type UseCaseHistoryEntry = InboundUseCaseHistoryEntry | OutboundUseCaseHistoryEntry | FileProxyUseCaseHistoryEntry;
2107
2381
  export interface UseCaseHistoryEntryBase {
2108
2382
  /**
2109
2383
  * Unique identifier for this history entry
@@ -3504,6 +3778,8 @@ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
3504
3778
 
3505
3779
 
3506
3780
  export type AccessLogEntry = Components.Schemas.AccessLogEntry;
3781
+ export type AutoRefreshSettings = Components.Schemas.AutoRefreshSettings;
3782
+ export type CreateFileProxyUseCaseRequest = Components.Schemas.CreateFileProxyUseCaseRequest;
3507
3783
  export type CreateInboundUseCaseRequest = Components.Schemas.CreateInboundUseCaseRequest;
3508
3784
  export type CreateIntegrationRequest = Components.Schemas.CreateIntegrationRequest;
3509
3785
  export type CreateOutboundUseCaseRequest = Components.Schemas.CreateOutboundUseCaseRequest;
@@ -3522,6 +3798,13 @@ export type ErpEventV3 = Components.Schemas.ErpEventV3;
3522
3798
  export type ErpUpdatesEventsV2Request = Components.Schemas.ErpUpdatesEventsV2Request;
3523
3799
  export type ErpUpdatesEventsV3Request = Components.Schemas.ErpUpdatesEventsV3Request;
3524
3800
  export type ErrorResponseBase = Components.Schemas.ErrorResponseBase;
3801
+ export type FileProxyAuth = Components.Schemas.FileProxyAuth;
3802
+ export type FileProxyParam = Components.Schemas.FileProxyParam;
3803
+ export type FileProxyResponseConfig = Components.Schemas.FileProxyResponseConfig;
3804
+ export type FileProxyStep = Components.Schemas.FileProxyStep;
3805
+ export type FileProxyUseCase = Components.Schemas.FileProxyUseCase;
3806
+ export type FileProxyUseCaseConfiguration = Components.Schemas.FileProxyUseCaseConfiguration;
3807
+ export type FileProxyUseCaseHistoryEntry = Components.Schemas.FileProxyUseCaseHistoryEntry;
3525
3808
  export type GetMonitoringStatsRequest = Components.Schemas.GetMonitoringStatsRequest;
3526
3809
  export type GetMonitoringTimeSeriesRequest = Components.Schemas.GetMonitoringTimeSeriesRequest;
3527
3810
  export type InboundIntegrationEventConfiguration = Components.Schemas.InboundIntegrationEventConfiguration;
@@ -3537,6 +3820,7 @@ export type IntegrationEntityField = Components.Schemas.IntegrationEntityField;
3537
3820
  export type IntegrationFieldV1 = Components.Schemas.IntegrationFieldV1;
3538
3821
  export type IntegrationMeterReading = Components.Schemas.IntegrationMeterReading;
3539
3822
  export type IntegrationObjectV1 = Components.Schemas.IntegrationObjectV1;
3823
+ export type IntegrationSettings = Components.Schemas.IntegrationSettings;
3540
3824
  export type IntegrationWithUseCases = Components.Schemas.IntegrationWithUseCases;
3541
3825
  export type MappingSimulationRequest = Components.Schemas.MappingSimulationRequest;
3542
3826
  export type MappingSimulationResponse = Components.Schemas.MappingSimulationResponse;
@@ -3570,6 +3854,7 @@ export type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationA
3570
3854
  export type TimeSeriesBucket = Components.Schemas.TimeSeriesBucket;
3571
3855
  export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
3572
3856
  export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
3857
+ export type UpdateFileProxyUseCaseRequest = Components.Schemas.UpdateFileProxyUseCaseRequest;
3573
3858
  export type UpdateInboundUseCaseRequest = Components.Schemas.UpdateInboundUseCaseRequest;
3574
3859
  export type UpdateIntegrationRequest = Components.Schemas.UpdateIntegrationRequest;
3575
3860
  export type UpdateOutboundUseCaseRequest = Components.Schemas.UpdateOutboundUseCaseRequest;
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.38.0",
5
+ "version": "0.40.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": [
@@ -2574,6 +2574,9 @@
2574
2574
  },
2575
2575
  "description": "Configuration defining environment variables needed by this integration. Values are stored in the Environments API."
2576
2576
  },
2577
+ "settings": {
2578
+ "$ref": "#/components/schemas/IntegrationSettings"
2579
+ },
2577
2580
  "created_at": {
2578
2581
  "type": "string",
2579
2582
  "format": "date-time",
@@ -2623,6 +2626,9 @@
2623
2626
  "$ref": "#/components/schemas/EnvironmentFieldConfig"
2624
2627
  },
2625
2628
  "description": "Configuration defining environment variables needed by this integration"
2629
+ },
2630
+ "settings": {
2631
+ "$ref": "#/components/schemas/IntegrationSettings"
2626
2632
  }
2627
2633
  }
2628
2634
  },
@@ -2660,6 +2666,9 @@
2660
2666
  "$ref": "#/components/schemas/EnvironmentFieldConfig"
2661
2667
  },
2662
2668
  "description": "Configuration defining environment variables needed by this integration"
2669
+ },
2670
+ "settings": {
2671
+ "$ref": "#/components/schemas/IntegrationSettings"
2663
2672
  }
2664
2673
  }
2665
2674
  },
@@ -2707,6 +2716,36 @@
2707
2716
  }
2708
2717
  }
2709
2718
  },
2719
+ "IntegrationSettings": {
2720
+ "type": "object",
2721
+ "description": "Settings for the integration",
2722
+ "properties": {
2723
+ "autoRefresh": {
2724
+ "$ref": "#/components/schemas/AutoRefreshSettings"
2725
+ }
2726
+ }
2727
+ },
2728
+ "AutoRefreshSettings": {
2729
+ "type": "object",
2730
+ "description": "Auto-refresh settings for keeping integration data fresh",
2731
+ "properties": {
2732
+ "enabled": {
2733
+ "type": "boolean",
2734
+ "default": false,
2735
+ "description": "Whether auto-refresh is enabled"
2736
+ },
2737
+ "freshnessThresholdMinutes": {
2738
+ "type": "integer",
2739
+ "minimum": 1,
2740
+ "description": "Maximum age (in minutes) of data before it is considered stale and eligible for refresh"
2741
+ },
2742
+ "minIntervalBetweenSyncsMinutes": {
2743
+ "type": "integer",
2744
+ "minimum": 1,
2745
+ "description": "Minimum interval (in minutes) between consecutive sync operations to prevent excessive API calls"
2746
+ }
2747
+ }
2748
+ },
2710
2749
  "SetIntegrationAppMappingRequest": {
2711
2750
  "type": "object",
2712
2751
  "required": [
@@ -2793,7 +2832,8 @@
2793
2832
  "type": "string",
2794
2833
  "enum": [
2795
2834
  "inbound",
2796
- "outbound"
2835
+ "outbound",
2836
+ "file_proxy"
2797
2837
  ],
2798
2838
  "description": "Use case type"
2799
2839
  },
@@ -2867,6 +2907,31 @@
2867
2907
  }
2868
2908
  ]
2869
2909
  },
2910
+ "FileProxyUseCase": {
2911
+ "allOf": [
2912
+ {
2913
+ "$ref": "#/components/schemas/UseCaseBase"
2914
+ },
2915
+ {
2916
+ "type": "object",
2917
+ "required": [
2918
+ "type"
2919
+ ],
2920
+ "properties": {
2921
+ "type": {
2922
+ "type": "string",
2923
+ "enum": [
2924
+ "file_proxy"
2925
+ ],
2926
+ "description": "Use case type"
2927
+ },
2928
+ "configuration": {
2929
+ "$ref": "#/components/schemas/FileProxyUseCaseConfiguration"
2930
+ }
2931
+ }
2932
+ }
2933
+ ]
2934
+ },
2870
2935
  "UseCase": {
2871
2936
  "oneOf": [
2872
2937
  {
@@ -2874,13 +2939,17 @@
2874
2939
  },
2875
2940
  {
2876
2941
  "$ref": "#/components/schemas/OutboundUseCase"
2942
+ },
2943
+ {
2944
+ "$ref": "#/components/schemas/FileProxyUseCase"
2877
2945
  }
2878
2946
  ],
2879
2947
  "discriminator": {
2880
2948
  "propertyName": "type",
2881
2949
  "mapping": {
2882
2950
  "inbound": "#/components/schemas/InboundUseCase",
2883
- "outbound": "#/components/schemas/OutboundUseCase"
2951
+ "outbound": "#/components/schemas/OutboundUseCase",
2952
+ "file_proxy": "#/components/schemas/FileProxyUseCase"
2884
2953
  }
2885
2954
  }
2886
2955
  },
@@ -2891,13 +2960,17 @@
2891
2960
  },
2892
2961
  {
2893
2962
  "$ref": "#/components/schemas/CreateOutboundUseCaseRequest"
2963
+ },
2964
+ {
2965
+ "$ref": "#/components/schemas/CreateFileProxyUseCaseRequest"
2894
2966
  }
2895
2967
  ],
2896
2968
  "discriminator": {
2897
2969
  "propertyName": "type",
2898
2970
  "mapping": {
2899
2971
  "inbound": "#/components/schemas/CreateInboundUseCaseRequest",
2900
- "outbound": "#/components/schemas/CreateOutboundUseCaseRequest"
2972
+ "outbound": "#/components/schemas/CreateOutboundUseCaseRequest",
2973
+ "file_proxy": "#/components/schemas/CreateFileProxyUseCaseRequest"
2901
2974
  }
2902
2975
  }
2903
2976
  },
@@ -2971,6 +3044,31 @@
2971
3044
  }
2972
3045
  ]
2973
3046
  },
3047
+ "CreateFileProxyUseCaseRequest": {
3048
+ "allOf": [
3049
+ {
3050
+ "$ref": "#/components/schemas/CreateUseCaseRequestBase"
3051
+ },
3052
+ {
3053
+ "type": "object",
3054
+ "required": [
3055
+ "type"
3056
+ ],
3057
+ "properties": {
3058
+ "type": {
3059
+ "type": "string",
3060
+ "enum": [
3061
+ "file_proxy"
3062
+ ],
3063
+ "description": "Use case type"
3064
+ },
3065
+ "configuration": {
3066
+ "$ref": "#/components/schemas/FileProxyUseCaseConfiguration"
3067
+ }
3068
+ }
3069
+ }
3070
+ ]
3071
+ },
2974
3072
  "UpdateUseCaseRequest": {
2975
3073
  "oneOf": [
2976
3074
  {
@@ -2978,13 +3076,17 @@
2978
3076
  },
2979
3077
  {
2980
3078
  "$ref": "#/components/schemas/UpdateOutboundUseCaseRequest"
3079
+ },
3080
+ {
3081
+ "$ref": "#/components/schemas/UpdateFileProxyUseCaseRequest"
2981
3082
  }
2982
3083
  ],
2983
3084
  "discriminator": {
2984
3085
  "propertyName": "type",
2985
3086
  "mapping": {
2986
3087
  "inbound": "#/components/schemas/UpdateInboundUseCaseRequest",
2987
- "outbound": "#/components/schemas/UpdateOutboundUseCaseRequest"
3088
+ "outbound": "#/components/schemas/UpdateOutboundUseCaseRequest",
3089
+ "file_proxy": "#/components/schemas/UpdateFileProxyUseCaseRequest"
2988
3090
  }
2989
3091
  }
2990
3092
  },
@@ -3052,6 +3154,28 @@
3052
3154
  }
3053
3155
  ]
3054
3156
  },
3157
+ "UpdateFileProxyUseCaseRequest": {
3158
+ "allOf": [
3159
+ {
3160
+ "$ref": "#/components/schemas/UpdateUseCaseRequestBase"
3161
+ },
3162
+ {
3163
+ "type": "object",
3164
+ "properties": {
3165
+ "type": {
3166
+ "type": "string",
3167
+ "enum": [
3168
+ "file_proxy"
3169
+ ],
3170
+ "description": "Use case type"
3171
+ },
3172
+ "configuration": {
3173
+ "$ref": "#/components/schemas/FileProxyUseCaseConfiguration"
3174
+ }
3175
+ }
3176
+ }
3177
+ ]
3178
+ },
3055
3179
  "UseCaseHistoryEntry": {
3056
3180
  "oneOf": [
3057
3181
  {
@@ -3059,13 +3183,17 @@
3059
3183
  },
3060
3184
  {
3061
3185
  "$ref": "#/components/schemas/OutboundUseCaseHistoryEntry"
3186
+ },
3187
+ {
3188
+ "$ref": "#/components/schemas/FileProxyUseCaseHistoryEntry"
3062
3189
  }
3063
3190
  ],
3064
3191
  "discriminator": {
3065
3192
  "propertyName": "type",
3066
3193
  "mapping": {
3067
3194
  "inbound": "#/components/schemas/InboundUseCaseHistoryEntry",
3068
- "outbound": "#/components/schemas/OutboundUseCaseHistoryEntry"
3195
+ "outbound": "#/components/schemas/OutboundUseCaseHistoryEntry",
3196
+ "file_proxy": "#/components/schemas/FileProxyUseCaseHistoryEntry"
3069
3197
  }
3070
3198
  }
3071
3199
  },
@@ -3177,6 +3305,192 @@
3177
3305
  }
3178
3306
  ]
3179
3307
  },
3308
+ "FileProxyUseCaseHistoryEntry": {
3309
+ "allOf": [
3310
+ {
3311
+ "$ref": "#/components/schemas/UseCaseHistoryEntryBase"
3312
+ },
3313
+ {
3314
+ "type": "object",
3315
+ "required": [
3316
+ "type"
3317
+ ],
3318
+ "properties": {
3319
+ "type": {
3320
+ "type": "string",
3321
+ "enum": [
3322
+ "file_proxy"
3323
+ ],
3324
+ "description": "Use case type"
3325
+ },
3326
+ "configuration": {
3327
+ "$ref": "#/components/schemas/FileProxyUseCaseConfiguration"
3328
+ }
3329
+ }
3330
+ }
3331
+ ]
3332
+ },
3333
+ "FileProxyUseCaseConfiguration": {
3334
+ "type": "object",
3335
+ "required": [
3336
+ "steps",
3337
+ "response"
3338
+ ],
3339
+ "description": "Configuration for file_proxy use cases. Defines how to authenticate and fetch files from external document systems.\n\nThe file proxy download URL always requires `orgId`, `integrationId`, and `useCaseId` as query parameters.\nThe `orgId` is included in the signed URL to establish organization context without requiring authentication.\nAdditional use-case-specific parameters are declared in the `params` array.\n",
3340
+ "properties": {
3341
+ "requires_vpc": {
3342
+ "type": "boolean",
3343
+ "description": "Whether requests require VPC routing for IP allowlisting",
3344
+ "default": false
3345
+ },
3346
+ "auth": {
3347
+ "$ref": "#/components/schemas/FileProxyAuth"
3348
+ },
3349
+ "params": {
3350
+ "type": "array",
3351
+ "items": {
3352
+ "$ref": "#/components/schemas/FileProxyParam"
3353
+ },
3354
+ "description": "Additional use-case-specific parameters expected in the download URL query string (beyond the required orgId, integrationId, useCaseId)"
3355
+ },
3356
+ "steps": {
3357
+ "type": "array",
3358
+ "minItems": 1,
3359
+ "items": {
3360
+ "$ref": "#/components/schemas/FileProxyStep"
3361
+ },
3362
+ "description": "Ordered list of HTTP steps to execute to retrieve the file"
3363
+ },
3364
+ "response": {
3365
+ "$ref": "#/components/schemas/FileProxyResponseConfig"
3366
+ }
3367
+ }
3368
+ },
3369
+ "FileProxyAuth": {
3370
+ "type": "object",
3371
+ "required": [
3372
+ "type",
3373
+ "token_url",
3374
+ "client_id",
3375
+ "client_secret"
3376
+ ],
3377
+ "properties": {
3378
+ "type": {
3379
+ "type": "string",
3380
+ "enum": [
3381
+ "oauth2_client_credentials"
3382
+ ],
3383
+ "description": "Authentication type"
3384
+ },
3385
+ "token_url": {
3386
+ "type": "string",
3387
+ "description": "Handlebars template for the OAuth2 token endpoint URL"
3388
+ },
3389
+ "client_id": {
3390
+ "type": "string",
3391
+ "description": "Handlebars template for the OAuth2 client ID"
3392
+ },
3393
+ "client_secret": {
3394
+ "type": "string",
3395
+ "description": "Handlebars template for the OAuth2 client secret"
3396
+ },
3397
+ "scope": {
3398
+ "type": "string",
3399
+ "description": "Optional OAuth2 scope"
3400
+ }
3401
+ }
3402
+ },
3403
+ "FileProxyParam": {
3404
+ "type": "object",
3405
+ "required": [
3406
+ "name",
3407
+ "required"
3408
+ ],
3409
+ "properties": {
3410
+ "name": {
3411
+ "type": "string",
3412
+ "description": "Parameter name as it appears in the query string"
3413
+ },
3414
+ "required": {
3415
+ "type": "boolean",
3416
+ "description": "Whether this parameter is required"
3417
+ },
3418
+ "description": {
3419
+ "type": "string",
3420
+ "description": "Human-readable description of the parameter"
3421
+ }
3422
+ }
3423
+ },
3424
+ "FileProxyStep": {
3425
+ "type": "object",
3426
+ "required": [
3427
+ "url",
3428
+ "method",
3429
+ "response_type"
3430
+ ],
3431
+ "properties": {
3432
+ "url": {
3433
+ "type": "string",
3434
+ "description": "Handlebars template for the request URL"
3435
+ },
3436
+ "method": {
3437
+ "type": "string",
3438
+ "enum": [
3439
+ "GET",
3440
+ "POST"
3441
+ ],
3442
+ "description": "HTTP method"
3443
+ },
3444
+ "headers": {
3445
+ "type": "object",
3446
+ "additionalProperties": {
3447
+ "type": "string"
3448
+ },
3449
+ "description": "Handlebars templates for request headers"
3450
+ },
3451
+ "body": {
3452
+ "type": "string",
3453
+ "description": "Handlebars template for the request body (POST only)"
3454
+ },
3455
+ "response_type": {
3456
+ "type": "string",
3457
+ "enum": [
3458
+ "json",
3459
+ "binary"
3460
+ ],
3461
+ "description": "Expected response type"
3462
+ }
3463
+ }
3464
+ },
3465
+ "FileProxyResponseConfig": {
3466
+ "type": "object",
3467
+ "required": [
3468
+ "body",
3469
+ "encoding"
3470
+ ],
3471
+ "properties": {
3472
+ "body": {
3473
+ "type": "string",
3474
+ "description": "JSONata expression to extract file content from step results"
3475
+ },
3476
+ "encoding": {
3477
+ "type": "string",
3478
+ "enum": [
3479
+ "base64",
3480
+ "binary"
3481
+ ],
3482
+ "description": "Encoding of the extracted body"
3483
+ },
3484
+ "filename": {
3485
+ "type": "string",
3486
+ "description": "JSONata expression to extract the filename"
3487
+ },
3488
+ "content_type": {
3489
+ "type": "string",
3490
+ "description": "JSONata expression to extract the content type"
3491
+ }
3492
+ }
3493
+ },
3180
3494
  "MappingSimulationRequest": {
3181
3495
  "type": "object",
3182
3496
  "required": [
@@ -4131,6 +4445,9 @@
4131
4445
  "type": "string"
4132
4446
  }
4133
4447
  },
4448
+ "settings": {
4449
+ "$ref": "#/components/schemas/IntegrationSettings"
4450
+ },
4134
4451
  "use_cases": {
4135
4452
  "type": "array",
4136
4453
  "description": "All use cases belonging to this integration",
@@ -4175,6 +4492,9 @@
4175
4492
  "type": "string"
4176
4493
  }
4177
4494
  },
4495
+ "settings": {
4496
+ "$ref": "#/components/schemas/IntegrationSettings"
4497
+ },
4178
4498
  "use_cases": {
4179
4499
  "type": "array",
4180
4500
  "description": "Full list of use cases (declarative). This replaces ALL existing use cases.\n- Use cases with an `id` field matching an existing use case will be updated\n- Use cases without an `id` or with a non-matching `id` will be created\n- Existing use cases not in this list will be deleted\n",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/erp-integration-client",
3
- "version": "0.24.2",
3
+ "version": "0.24.3",
4
4
  "description": "Client library for ePilot ERP Integration API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",