@epilot/erp-integration-client 0.6.0 → 0.8.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.
package/dist/openapi.d.ts CHANGED
@@ -29,6 +29,21 @@ declare namespace Components {
29
29
  export type Unauthorized = Schemas.ErrorResponseBase;
30
30
  }
31
31
  namespace Schemas {
32
+ export interface CreateInboundUseCaseRequest {
33
+ /**
34
+ * Use case name
35
+ */
36
+ name: string;
37
+ /**
38
+ * Whether the use case is enabled
39
+ */
40
+ enabled: boolean;
41
+ /**
42
+ * Use case type
43
+ */
44
+ type: "inbound";
45
+ configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration;
46
+ }
32
47
  export interface CreateIntegrationRequest {
33
48
  /**
34
49
  * Integration name
@@ -39,25 +54,41 @@ declare namespace Components {
39
54
  */
40
55
  description?: string;
41
56
  }
42
- export interface CreateUseCaseRequest {
57
+ export interface CreateOutboundUseCaseRequest {
43
58
  /**
44
59
  * Use case name
45
60
  */
46
61
  name: string;
62
+ /**
63
+ * Whether the use case is enabled
64
+ */
65
+ enabled: boolean;
47
66
  /**
48
67
  * Use case type
49
68
  */
50
- type: "inbound" | "outbound";
69
+ type: "outbound";
70
+ configuration?: /* Configuration for outbound use cases (epilot to ERP). Structure TBD. */ OutboundIntegrationEventConfiguration;
71
+ }
72
+ export type CreateUseCaseRequest = CreateInboundUseCaseRequest | CreateOutboundUseCaseRequest;
73
+ export interface CreateUseCaseRequestBase {
74
+ /**
75
+ * Use case name
76
+ */
77
+ name: string;
51
78
  /**
52
79
  * Whether the use case is enabled
53
80
  */
54
81
  enabled: boolean;
82
+ }
83
+ export interface DeleteIntegrationAppMappingRequest {
55
84
  /**
56
- * Use case specific configuration
85
+ * UUID of the integration app instance
57
86
  */
58
- configuration?: {
59
- [name: string]: any;
60
- };
87
+ app_id: string; // uuid
88
+ /**
89
+ * UUID of the integration app component instance
90
+ */
91
+ component_id: string; // uuid
61
92
  }
62
93
  export interface EntityUpdate {
63
94
  /**
@@ -77,6 +108,51 @@ declare namespace Components {
77
108
  [name: string]: any;
78
109
  };
79
110
  }
111
+ export interface ErpEvent {
112
+ /**
113
+ * Type of event (create, update, delete)
114
+ */
115
+ event_type: "CREATE" | "UPDATE" | "DELETE";
116
+ /**
117
+ * Type of the object being updated (business_partner, contract_account, etc.)
118
+ */
119
+ object_type: string;
120
+ /**
121
+ * Timestamp when the event occurred
122
+ */
123
+ timestamp: string; // date-time
124
+ /**
125
+ * Format of the payload data
126
+ */
127
+ format: "json" | "xml";
128
+ /**
129
+ * The object data payload - can be either a serialized string or a direct JSON object
130
+ */
131
+ payload: /* The object data payload - can be either a serialized string or a direct JSON object */ string | {
132
+ [name: string]: any;
133
+ };
134
+ /**
135
+ * Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same integration. Must contain only alphanumeric characters, hyphens, and underscores.
136
+ *
137
+ * example:
138
+ * evt-2025-05-01-12345-create-bp
139
+ */
140
+ deduplication_id?: string; // ^[a-zA-Z0-9_-]+$
141
+ }
142
+ export interface ErpUpdatesEventsV2Request {
143
+ /**
144
+ * UUID that identifies the integration configuration to use
145
+ */
146
+ integration_id: string; // uuid
147
+ /**
148
+ * Optional ID that identifies the specific request for debugging purposes
149
+ */
150
+ correlation_id?: string;
151
+ /**
152
+ * List of ERP events to process
153
+ */
154
+ events: ErpEvent[];
155
+ }
80
156
  export interface ErrorResponseBase {
81
157
  /**
82
158
  * Computer-readable error code
@@ -87,6 +163,97 @@ declare namespace Components {
87
163
  */
88
164
  message?: string;
89
165
  }
166
+ /**
167
+ * Configuration for inbound use cases (ERP to epilot)
168
+ */
169
+ export interface InboundIntegrationEventConfiguration {
170
+ /**
171
+ * Array of entity configurations for this event
172
+ */
173
+ entities?: IntegrationEntity[];
174
+ /**
175
+ * Array of meter reading configurations for this event
176
+ */
177
+ meter_readings?: IntegrationMeterReading[];
178
+ }
179
+ export interface InboundUseCase {
180
+ /**
181
+ * Unique identifier for the use case
182
+ */
183
+ id: string; // uuid
184
+ /**
185
+ * Parent integration ID
186
+ */
187
+ integrationId: string; // uuid
188
+ /**
189
+ * Use case name
190
+ */
191
+ name: string;
192
+ /**
193
+ * Use case type
194
+ */
195
+ type: "inbound";
196
+ /**
197
+ * Whether the use case is enabled
198
+ */
199
+ enabled: boolean;
200
+ configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration;
201
+ /**
202
+ * Description of the last change made to this use case
203
+ */
204
+ change_description?: string;
205
+ /**
206
+ * ISO-8601 timestamp when the use case was created
207
+ */
208
+ created_at: string; // date-time
209
+ /**
210
+ * ISO-8601 timestamp when the use case was last updated
211
+ */
212
+ updated_at: string; // date-time
213
+ }
214
+ export interface InboundUseCaseHistoryEntry {
215
+ /**
216
+ * Unique identifier for this history entry
217
+ */
218
+ id: string; // uuid
219
+ /**
220
+ * Reference to the parent use case
221
+ */
222
+ useCaseId: string; // uuid
223
+ /**
224
+ * Parent integration ID
225
+ */
226
+ integrationId: string; // uuid
227
+ /**
228
+ * Use case name at this point in history
229
+ */
230
+ name: string;
231
+ /**
232
+ * Whether the use case was enabled at this point in history
233
+ */
234
+ enabled: boolean;
235
+ /**
236
+ * Description of the change that was made at this point in history
237
+ */
238
+ change_description?: string;
239
+ /**
240
+ * ISO-8601 timestamp when the use case was originally created
241
+ */
242
+ created_at: string; // date-time
243
+ /**
244
+ * ISO-8601 timestamp of this historical snapshot (before the update)
245
+ */
246
+ updated_at: string; // date-time
247
+ /**
248
+ * ISO-8601 timestamp when this history entry was created
249
+ */
250
+ history_created_at: string; // date-time
251
+ /**
252
+ * Use case type
253
+ */
254
+ type: "inbound";
255
+ configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration;
256
+ }
90
257
  export interface Integration {
91
258
  /**
92
259
  * Unique identifier for the integration
@@ -113,6 +280,12 @@ declare namespace Components {
113
280
  */
114
281
  updated_at: string; // date-time
115
282
  }
283
+ export interface IntegrationAppMapping {
284
+ /**
285
+ * The integration ID this app/component is mapped to
286
+ */
287
+ integration_id: string; // uuid
288
+ }
116
289
  export interface IntegrationConfigurationV1 {
117
290
  /**
118
291
  * Mapping specification version
@@ -137,7 +310,7 @@ declare namespace Components {
137
310
  * [v2.0] Event type mappings
138
311
  */
139
312
  events: {
140
- [name: string]: IntegrationEvent;
313
+ [name: string]: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration;
141
314
  };
142
315
  };
143
316
  }
@@ -180,17 +353,11 @@ declare namespace Components {
180
353
  * Constant value to assign (any type)
181
354
  */
182
355
  constant?: any;
183
- relations?: RelationConfig;
184
- }
185
- export interface IntegrationEvent {
186
356
  /**
187
- * Array of entity configurations for this event
188
- */
189
- entities?: IntegrationEntity[];
190
- /**
191
- * Array of meter reading configurations for this event
357
+ * Controls whether this field mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. Defaults to true if omitted.
192
358
  */
193
- meter_readings?: IntegrationMeterReading[];
359
+ enabled?: /* Controls whether this field mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. Defaults to true if omitted. */ boolean | string;
360
+ relations?: RelationConfig;
194
361
  }
195
362
  export interface IntegrationFieldV1 {
196
363
  /**
@@ -293,6 +460,90 @@ declare namespace Components {
293
460
  ...RelationUniqueIdField[]
294
461
  ];
295
462
  }
463
+ /**
464
+ * Configuration for outbound use cases (epilot to ERP). Structure TBD.
465
+ */
466
+ export interface OutboundIntegrationEventConfiguration {
467
+ [name: string]: any;
468
+ }
469
+ export interface OutboundUseCase {
470
+ /**
471
+ * Unique identifier for the use case
472
+ */
473
+ id: string; // uuid
474
+ /**
475
+ * Parent integration ID
476
+ */
477
+ integrationId: string; // uuid
478
+ /**
479
+ * Use case name
480
+ */
481
+ name: string;
482
+ /**
483
+ * Use case type
484
+ */
485
+ type: "outbound";
486
+ /**
487
+ * Whether the use case is enabled
488
+ */
489
+ enabled: boolean;
490
+ configuration?: /* Configuration for outbound use cases (epilot to ERP). Structure TBD. */ OutboundIntegrationEventConfiguration;
491
+ /**
492
+ * Description of the last change made to this use case
493
+ */
494
+ change_description?: string;
495
+ /**
496
+ * ISO-8601 timestamp when the use case was created
497
+ */
498
+ created_at: string; // date-time
499
+ /**
500
+ * ISO-8601 timestamp when the use case was last updated
501
+ */
502
+ updated_at: string; // date-time
503
+ }
504
+ export interface OutboundUseCaseHistoryEntry {
505
+ /**
506
+ * Unique identifier for this history entry
507
+ */
508
+ id: string; // uuid
509
+ /**
510
+ * Reference to the parent use case
511
+ */
512
+ useCaseId: string; // uuid
513
+ /**
514
+ * Parent integration ID
515
+ */
516
+ integrationId: string; // uuid
517
+ /**
518
+ * Use case name at this point in history
519
+ */
520
+ name: string;
521
+ /**
522
+ * Whether the use case was enabled at this point in history
523
+ */
524
+ enabled: boolean;
525
+ /**
526
+ * Description of the change that was made at this point in history
527
+ */
528
+ change_description?: string;
529
+ /**
530
+ * ISO-8601 timestamp when the use case was originally created
531
+ */
532
+ created_at: string; // date-time
533
+ /**
534
+ * ISO-8601 timestamp of this historical snapshot (before the update)
535
+ */
536
+ updated_at: string; // date-time
537
+ /**
538
+ * ISO-8601 timestamp when this history entry was created
539
+ */
540
+ history_created_at: string; // date-time
541
+ /**
542
+ * Use case type
543
+ */
544
+ type: "outbound";
545
+ configuration?: /* Configuration for outbound use cases (epilot to ERP). Structure TBD. */ OutboundIntegrationEventConfiguration;
546
+ }
296
547
  export interface RelationConfig {
297
548
  /**
298
549
  * Relation operation:
@@ -342,6 +593,20 @@ declare namespace Components {
342
593
  */
343
594
  constant?: any;
344
595
  }
596
+ export interface SetIntegrationAppMappingRequest {
597
+ /**
598
+ * UUID of the integration app instance
599
+ */
600
+ app_id: string; // uuid
601
+ /**
602
+ * UUID of the integration app component instance
603
+ */
604
+ component_id: string; // uuid
605
+ /**
606
+ * If true, overwrites existing mapping. If false and mapping exists, returns 409 Conflict.
607
+ */
608
+ overwrite?: boolean;
609
+ }
345
610
  export interface TriggerErpActionRequest {
346
611
  /**
347
612
  * Unique identifier of the current automation execution
@@ -396,6 +661,25 @@ declare namespace Components {
396
661
  end_date?: string;
397
662
  event_id?: string;
398
663
  }
664
+ export interface UpdateInboundUseCaseRequest {
665
+ /**
666
+ * Use case name
667
+ */
668
+ name?: string;
669
+ /**
670
+ * Whether the use case is enabled
671
+ */
672
+ enabled?: boolean;
673
+ /**
674
+ * Optional description of this change (like a commit message)
675
+ */
676
+ change_description?: string;
677
+ /**
678
+ * Use case type
679
+ */
680
+ type?: "inbound";
681
+ configuration?: /* Configuration for inbound use cases (ERP to epilot) */ InboundIntegrationEventConfiguration;
682
+ }
399
683
  export interface UpdateIntegrationRequest {
400
684
  /**
401
685
  * Integration name
@@ -406,61 +690,79 @@ declare namespace Components {
406
690
  */
407
691
  description?: string;
408
692
  }
409
- export interface UpdateUseCaseRequest {
693
+ export interface UpdateOutboundUseCaseRequest {
410
694
  /**
411
695
  * Use case name
412
696
  */
413
697
  name?: string;
698
+ /**
699
+ * Whether the use case is enabled
700
+ */
701
+ enabled?: boolean;
702
+ /**
703
+ * Optional description of this change (like a commit message)
704
+ */
705
+ change_description?: string;
414
706
  /**
415
707
  * Use case type
416
708
  */
417
- type?: "inbound" | "outbound";
709
+ type?: "outbound";
710
+ configuration?: /* Configuration for outbound use cases (epilot to ERP). Structure TBD. */ OutboundIntegrationEventConfiguration;
711
+ }
712
+ export type UpdateUseCaseRequest = UpdateInboundUseCaseRequest | UpdateOutboundUseCaseRequest;
713
+ export interface UpdateUseCaseRequestBase {
714
+ /**
715
+ * Use case name
716
+ */
717
+ name?: string;
418
718
  /**
419
719
  * Whether the use case is enabled
420
720
  */
421
721
  enabled?: boolean;
422
722
  /**
423
- * Use case specific configuration
723
+ * Optional description of this change (like a commit message)
424
724
  */
425
- configuration?: {
426
- [name: string]: any;
427
- };
725
+ change_description?: string;
428
726
  }
429
- export interface UseCase {
727
+ export type UseCase = InboundUseCase | OutboundUseCase;
728
+ export type UseCaseHistoryEntry = InboundUseCaseHistoryEntry | OutboundUseCaseHistoryEntry;
729
+ export interface UseCaseHistoryEntryBase {
430
730
  /**
431
- * Unique identifier for the use case
731
+ * Unique identifier for this history entry
432
732
  */
433
733
  id: string; // uuid
734
+ /**
735
+ * Reference to the parent use case
736
+ */
737
+ useCaseId: string; // uuid
434
738
  /**
435
739
  * Parent integration ID
436
740
  */
437
741
  integrationId: string; // uuid
438
742
  /**
439
- * Use case name
743
+ * Use case name at this point in history
440
744
  */
441
745
  name: string;
442
746
  /**
443
- * Use case type
444
- */
445
- type: "inbound" | "outbound";
446
- /**
447
- * Whether the use case is enabled
747
+ * Whether the use case was enabled at this point in history
448
748
  */
449
749
  enabled: boolean;
450
750
  /**
451
- * Use case specific configuration
751
+ * Description of the change that was made at this point in history
452
752
  */
453
- configuration?: {
454
- [name: string]: any;
455
- };
753
+ change_description?: string;
456
754
  /**
457
- * ISO-8601 timestamp when the use case was created
755
+ * ISO-8601 timestamp when the use case was originally created
458
756
  */
459
757
  created_at: string; // date-time
460
758
  /**
461
- * ISO-8601 timestamp when the use case was last updated
759
+ * ISO-8601 timestamp of this historical snapshot (before the update)
462
760
  */
463
761
  updated_at: string; // date-time
762
+ /**
763
+ * ISO-8601 timestamp when this history entry was created
764
+ */
765
+ history_created_at: string; // date-time
464
766
  }
465
767
  }
466
768
  }
@@ -529,6 +831,25 @@ declare namespace Paths {
529
831
  export type $500 = Components.Responses.InternalServerError;
530
832
  }
531
833
  }
834
+ namespace DeleteIntegrationAppMapping {
835
+ namespace Parameters {
836
+ export type IntegrationId = string; // uuid
837
+ }
838
+ export interface PathParameters {
839
+ integrationId: Parameters.IntegrationId /* uuid */;
840
+ }
841
+ export type RequestBody = Components.Schemas.DeleteIntegrationAppMappingRequest;
842
+ namespace Responses {
843
+ export interface $200 {
844
+ message?: string;
845
+ }
846
+ export type $400 = Components.Responses.BadRequest;
847
+ export type $401 = Components.Responses.Unauthorized;
848
+ export interface $404 {
849
+ }
850
+ export type $500 = Components.Responses.InternalServerError;
851
+ }
852
+ }
532
853
  namespace DeleteUseCase {
533
854
  namespace Parameters {
534
855
  export type IntegrationId = string; // uuid
@@ -589,6 +910,36 @@ declare namespace Paths {
589
910
  export type $500 = Components.Responses.InternalServerError;
590
911
  }
591
912
  }
913
+ namespace ListUseCaseHistory {
914
+ namespace Parameters {
915
+ export type Cursor = string;
916
+ export type IntegrationId = string; // uuid
917
+ export type UseCaseId = string; // uuid
918
+ }
919
+ export interface PathParameters {
920
+ integrationId: Parameters.IntegrationId /* uuid */;
921
+ useCaseId: Parameters.UseCaseId /* uuid */;
922
+ }
923
+ export interface QueryParameters {
924
+ cursor?: Parameters.Cursor;
925
+ }
926
+ namespace Responses {
927
+ export interface $200 {
928
+ /**
929
+ * History entries in reverse chronological order (newest first)
930
+ */
931
+ history: Components.Schemas.UseCaseHistoryEntry[];
932
+ /**
933
+ * Opaque cursor for fetching the next page. Absent if no more pages.
934
+ */
935
+ next_cursor?: string;
936
+ }
937
+ export type $401 = Components.Responses.Unauthorized;
938
+ export interface $404 {
939
+ }
940
+ export type $500 = Components.Responses.InternalServerError;
941
+ }
942
+ }
592
943
  namespace ListUseCases {
593
944
  namespace Parameters {
594
945
  export type IntegrationId = string; // uuid
@@ -627,37 +978,7 @@ declare namespace Paths {
627
978
  /**
628
979
  * List of ERP events to process
629
980
  */
630
- events: {
631
- /**
632
- * Type of event (create, update, delete)
633
- */
634
- event_type: "CREATE" | "UPDATE" | "DELETE";
635
- /**
636
- * Type of the object being updated (business_partner, contract_account, etc.)
637
- */
638
- object_type: string;
639
- /**
640
- * Timestamp when the event occurred
641
- */
642
- timestamp: string; // date-time
643
- /**
644
- * Format of the payload data
645
- */
646
- format: "json" | "xml";
647
- /**
648
- * The object data payload - can be either a serialized string or a direct JSON object
649
- */
650
- payload: /* The object data payload - can be either a serialized string or a direct JSON object */ string | {
651
- [name: string]: any;
652
- };
653
- /**
654
- * Optional unique identifier for idempotency - prevents duplicate processing of the same event within 24 hours in context of the same app and component. Must contain only alphanumeric characters, hyphens, and underscores.
655
- *
656
- * example:
657
- * evt-2025-05-01-12345-create-bp
658
- */
659
- deduplication_id?: string; // ^[a-zA-Z0-9_-]+$
660
- }[];
981
+ events: Components.Schemas.ErpEvent[];
661
982
  }
662
983
  namespace Responses {
663
984
  export type $200 = Components.Responses.ERPUpdatesResponse;
@@ -667,6 +988,34 @@ declare namespace Paths {
667
988
  export type $500 = Components.Responses.InternalServerError;
668
989
  }
669
990
  }
991
+ namespace ProcessErpUpdatesEventsV2 {
992
+ export type RequestBody = Components.Schemas.ErpUpdatesEventsV2Request;
993
+ namespace Responses {
994
+ export type $200 = Components.Responses.ERPUpdatesResponse;
995
+ export type $400 = Components.Responses.BadRequest;
996
+ export type $401 = Components.Responses.Unauthorized;
997
+ export type $422 = Components.Responses.ERPUpdatesResponse;
998
+ export type $500 = Components.Responses.InternalServerError;
999
+ }
1000
+ }
1001
+ namespace SetIntegrationAppMapping {
1002
+ namespace Parameters {
1003
+ export type IntegrationId = string; // uuid
1004
+ }
1005
+ export interface PathParameters {
1006
+ integrationId: Parameters.IntegrationId /* uuid */;
1007
+ }
1008
+ export type RequestBody = Components.Schemas.SetIntegrationAppMappingRequest;
1009
+ namespace Responses {
1010
+ export type $200 = Components.Schemas.IntegrationAppMapping;
1011
+ export type $400 = Components.Responses.BadRequest;
1012
+ export type $401 = Components.Responses.Unauthorized;
1013
+ export interface $404 {
1014
+ }
1015
+ export type $409 = Components.Schemas.ErrorResponseBase;
1016
+ export type $500 = Components.Responses.InternalServerError;
1017
+ }
1018
+ }
670
1019
  namespace SimulateMapping {
671
1020
  export type RequestBody = Components.Schemas.MappingSimulationRequest;
672
1021
  namespace Responses {
@@ -759,6 +1108,19 @@ export interface OperationMethods {
759
1108
  data?: Paths.ProcessErpUpdatesEvents.RequestBody,
760
1109
  config?: AxiosRequestConfig
761
1110
  ): OperationResponse<Paths.ProcessErpUpdatesEvents.Responses.$200>
1111
+ /**
1112
+ * processErpUpdatesEventsV2 - processErpUpdatesEventsV2
1113
+ *
1114
+ * Handles updates from ERP systems using integration_id directly.
1115
+ * This is the v2 version that simplifies the API by accepting integration_id
1116
+ * instead of app_id and component_id.
1117
+ *
1118
+ */
1119
+ 'processErpUpdatesEventsV2'(
1120
+ parameters?: Parameters<UnknownParamsObject> | null,
1121
+ data?: Paths.ProcessErpUpdatesEventsV2.RequestBody,
1122
+ config?: AxiosRequestConfig
1123
+ ): OperationResponse<Paths.ProcessErpUpdatesEventsV2.Responses.$200>
762
1124
  /**
763
1125
  * simulateMapping - simulateMapping
764
1126
  *
@@ -873,6 +1235,43 @@ export interface OperationMethods {
873
1235
  data?: any,
874
1236
  config?: AxiosRequestConfig
875
1237
  ): OperationResponse<Paths.DeleteUseCase.Responses.$200>
1238
+ /**
1239
+ * listUseCaseHistory - List use case configuration history
1240
+ *
1241
+ * Retrieve historical versions of a use case's configuration.
1242
+ * History entries are returned in reverse chronological order (newest first).
1243
+ * Use the 'cursor' parameter for pagination to fetch additional entries.
1244
+ *
1245
+ */
1246
+ 'listUseCaseHistory'(
1247
+ parameters?: Parameters<Paths.ListUseCaseHistory.QueryParameters & Paths.ListUseCaseHistory.PathParameters> | null,
1248
+ data?: any,
1249
+ config?: AxiosRequestConfig
1250
+ ): OperationResponse<Paths.ListUseCaseHistory.Responses.$200>
1251
+ /**
1252
+ * setIntegrationAppMapping - Set integration app mapping
1253
+ *
1254
+ * Creates or updates a mapping from an app/component to an integration.
1255
+ * This allows ERP updates sent via app_id and component_id to be associated
1256
+ * with a specific integration configuration.
1257
+ *
1258
+ */
1259
+ 'setIntegrationAppMapping'(
1260
+ parameters?: Parameters<Paths.SetIntegrationAppMapping.PathParameters> | null,
1261
+ data?: Paths.SetIntegrationAppMapping.RequestBody,
1262
+ config?: AxiosRequestConfig
1263
+ ): OperationResponse<Paths.SetIntegrationAppMapping.Responses.$200>
1264
+ /**
1265
+ * deleteIntegrationAppMapping - Delete integration app mapping
1266
+ *
1267
+ * Removes a mapping from an app/component to an integration.
1268
+ *
1269
+ */
1270
+ 'deleteIntegrationAppMapping'(
1271
+ parameters?: Parameters<Paths.DeleteIntegrationAppMapping.PathParameters> | null,
1272
+ data?: Paths.DeleteIntegrationAppMapping.RequestBody,
1273
+ config?: AxiosRequestConfig
1274
+ ): OperationResponse<Paths.DeleteIntegrationAppMapping.Responses.$200>
876
1275
  }
877
1276
 
878
1277
  export interface PathsDictionary {
@@ -912,6 +1311,21 @@ export interface PathsDictionary {
912
1311
  config?: AxiosRequestConfig
913
1312
  ): OperationResponse<Paths.ProcessErpUpdatesEvents.Responses.$200>
914
1313
  }
1314
+ ['/v2/erp/updates/events']: {
1315
+ /**
1316
+ * processErpUpdatesEventsV2 - processErpUpdatesEventsV2
1317
+ *
1318
+ * Handles updates from ERP systems using integration_id directly.
1319
+ * This is the v2 version that simplifies the API by accepting integration_id
1320
+ * instead of app_id and component_id.
1321
+ *
1322
+ */
1323
+ 'post'(
1324
+ parameters?: Parameters<UnknownParamsObject> | null,
1325
+ data?: Paths.ProcessErpUpdatesEventsV2.RequestBody,
1326
+ config?: AxiosRequestConfig
1327
+ ): OperationResponse<Paths.ProcessErpUpdatesEventsV2.Responses.$200>
1328
+ }
915
1329
  ['/v1/erp/updates/mapping_simulation']: {
916
1330
  /**
917
1331
  * simulateMapping - simulateMapping
@@ -1036,21 +1450,71 @@ export interface PathsDictionary {
1036
1450
  config?: AxiosRequestConfig
1037
1451
  ): OperationResponse<Paths.DeleteUseCase.Responses.$200>
1038
1452
  }
1453
+ ['/v1/integrations/{integrationId}/use-cases/{useCaseId}/history']: {
1454
+ /**
1455
+ * listUseCaseHistory - List use case configuration history
1456
+ *
1457
+ * Retrieve historical versions of a use case's configuration.
1458
+ * History entries are returned in reverse chronological order (newest first).
1459
+ * Use the 'cursor' parameter for pagination to fetch additional entries.
1460
+ *
1461
+ */
1462
+ 'get'(
1463
+ parameters?: Parameters<Paths.ListUseCaseHistory.QueryParameters & Paths.ListUseCaseHistory.PathParameters> | null,
1464
+ data?: any,
1465
+ config?: AxiosRequestConfig
1466
+ ): OperationResponse<Paths.ListUseCaseHistory.Responses.$200>
1467
+ }
1468
+ ['/v1/integrations/{integrationId}/app-mapping']: {
1469
+ /**
1470
+ * setIntegrationAppMapping - Set integration app mapping
1471
+ *
1472
+ * Creates or updates a mapping from an app/component to an integration.
1473
+ * This allows ERP updates sent via app_id and component_id to be associated
1474
+ * with a specific integration configuration.
1475
+ *
1476
+ */
1477
+ 'put'(
1478
+ parameters?: Parameters<Paths.SetIntegrationAppMapping.PathParameters> | null,
1479
+ data?: Paths.SetIntegrationAppMapping.RequestBody,
1480
+ config?: AxiosRequestConfig
1481
+ ): OperationResponse<Paths.SetIntegrationAppMapping.Responses.$200>
1482
+ /**
1483
+ * deleteIntegrationAppMapping - Delete integration app mapping
1484
+ *
1485
+ * Removes a mapping from an app/component to an integration.
1486
+ *
1487
+ */
1488
+ 'delete'(
1489
+ parameters?: Parameters<Paths.DeleteIntegrationAppMapping.PathParameters> | null,
1490
+ data?: Paths.DeleteIntegrationAppMapping.RequestBody,
1491
+ config?: AxiosRequestConfig
1492
+ ): OperationResponse<Paths.DeleteIntegrationAppMapping.Responses.$200>
1493
+ }
1039
1494
  }
1040
1495
 
1041
1496
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
1042
1497
 
1043
1498
 
1499
+ export type CreateInboundUseCaseRequest = Components.Schemas.CreateInboundUseCaseRequest;
1044
1500
  export type CreateIntegrationRequest = Components.Schemas.CreateIntegrationRequest;
1501
+ export type CreateOutboundUseCaseRequest = Components.Schemas.CreateOutboundUseCaseRequest;
1045
1502
  export type CreateUseCaseRequest = Components.Schemas.CreateUseCaseRequest;
1503
+ export type CreateUseCaseRequestBase = Components.Schemas.CreateUseCaseRequestBase;
1504
+ export type DeleteIntegrationAppMappingRequest = Components.Schemas.DeleteIntegrationAppMappingRequest;
1046
1505
  export type EntityUpdate = Components.Schemas.EntityUpdate;
1506
+ export type ErpEvent = Components.Schemas.ErpEvent;
1507
+ export type ErpUpdatesEventsV2Request = Components.Schemas.ErpUpdatesEventsV2Request;
1047
1508
  export type ErrorResponseBase = Components.Schemas.ErrorResponseBase;
1509
+ export type InboundIntegrationEventConfiguration = Components.Schemas.InboundIntegrationEventConfiguration;
1510
+ export type InboundUseCase = Components.Schemas.InboundUseCase;
1511
+ export type InboundUseCaseHistoryEntry = Components.Schemas.InboundUseCaseHistoryEntry;
1048
1512
  export type Integration = Components.Schemas.Integration;
1513
+ export type IntegrationAppMapping = Components.Schemas.IntegrationAppMapping;
1049
1514
  export type IntegrationConfigurationV1 = Components.Schemas.IntegrationConfigurationV1;
1050
1515
  export type IntegrationConfigurationV2 = Components.Schemas.IntegrationConfigurationV2;
1051
1516
  export type IntegrationEntity = Components.Schemas.IntegrationEntity;
1052
1517
  export type IntegrationEntityField = Components.Schemas.IntegrationEntityField;
1053
- export type IntegrationEvent = Components.Schemas.IntegrationEvent;
1054
1518
  export type IntegrationFieldV1 = Components.Schemas.IntegrationFieldV1;
1055
1519
  export type IntegrationMeterReading = Components.Schemas.IntegrationMeterReading;
1056
1520
  export type IntegrationObjectV1 = Components.Schemas.IntegrationObjectV1;
@@ -1058,11 +1522,20 @@ export type MappingSimulationRequest = Components.Schemas.MappingSimulationReque
1058
1522
  export type MappingSimulationResponse = Components.Schemas.MappingSimulationResponse;
1059
1523
  export type MeterReadingUpdate = Components.Schemas.MeterReadingUpdate;
1060
1524
  export type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig;
1525
+ export type OutboundIntegrationEventConfiguration = Components.Schemas.OutboundIntegrationEventConfiguration;
1526
+ export type OutboundUseCase = Components.Schemas.OutboundUseCase;
1527
+ export type OutboundUseCaseHistoryEntry = Components.Schemas.OutboundUseCaseHistoryEntry;
1061
1528
  export type RelationConfig = Components.Schemas.RelationConfig;
1062
1529
  export type RelationItemConfig = Components.Schemas.RelationItemConfig;
1063
1530
  export type RelationUniqueIdField = Components.Schemas.RelationUniqueIdField;
1531
+ export type SetIntegrationAppMappingRequest = Components.Schemas.SetIntegrationAppMappingRequest;
1064
1532
  export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
1065
1533
  export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
1534
+ export type UpdateInboundUseCaseRequest = Components.Schemas.UpdateInboundUseCaseRequest;
1066
1535
  export type UpdateIntegrationRequest = Components.Schemas.UpdateIntegrationRequest;
1536
+ export type UpdateOutboundUseCaseRequest = Components.Schemas.UpdateOutboundUseCaseRequest;
1067
1537
  export type UpdateUseCaseRequest = Components.Schemas.UpdateUseCaseRequest;
1538
+ export type UpdateUseCaseRequestBase = Components.Schemas.UpdateUseCaseRequestBase;
1068
1539
  export type UseCase = Components.Schemas.UseCase;
1540
+ export type UseCaseHistoryEntry = Components.Schemas.UseCaseHistoryEntry;
1541
+ export type UseCaseHistoryEntryBase = Components.Schemas.UseCaseHistoryEntryBase;