@epilot/erp-integration-client 0.5.2 → 0.6.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,54 @@ declare namespace Components {
29
29
  export type Unauthorized = Schemas.ErrorResponseBase;
30
30
  }
31
31
  namespace Schemas {
32
+ export interface CreateIntegrationRequest {
33
+ /**
34
+ * Integration name
35
+ */
36
+ name: string;
37
+ /**
38
+ * Optional description of the integration
39
+ */
40
+ description?: string;
41
+ }
42
+ export interface CreateUseCaseRequest {
43
+ /**
44
+ * Use case name
45
+ */
46
+ name: string;
47
+ /**
48
+ * Use case type
49
+ */
50
+ type: "inbound" | "outbound";
51
+ /**
52
+ * Whether the use case is enabled
53
+ */
54
+ enabled: boolean;
55
+ /**
56
+ * Use case specific configuration
57
+ */
58
+ configuration?: {
59
+ [name: string]: any;
60
+ };
61
+ }
62
+ export interface EntityUpdate {
63
+ /**
64
+ * The entity type slug
65
+ */
66
+ entity_slug: string;
67
+ /**
68
+ * Unique identifier mappings for this entity
69
+ */
70
+ unique_identifiers: {
71
+ [name: string]: any;
72
+ };
73
+ /**
74
+ * Mapped attribute values
75
+ */
76
+ attributes: {
77
+ [name: string]: any;
78
+ };
79
+ }
32
80
  export interface ErrorResponseBase {
33
81
  /**
34
82
  * Computer-readable error code
@@ -39,6 +87,261 @@ declare namespace Components {
39
87
  */
40
88
  message?: string;
41
89
  }
90
+ export interface Integration {
91
+ /**
92
+ * Unique identifier for the integration
93
+ */
94
+ id: string; // uuid
95
+ /**
96
+ * Organization ID
97
+ */
98
+ orgId: string;
99
+ /**
100
+ * Integration name
101
+ */
102
+ name: string;
103
+ /**
104
+ * Optional description of the integration
105
+ */
106
+ description?: string;
107
+ /**
108
+ * ISO-8601 timestamp when the integration was created
109
+ */
110
+ created_at: string; // date-time
111
+ /**
112
+ * ISO-8601 timestamp when the integration was last updated
113
+ */
114
+ updated_at: string; // date-time
115
+ }
116
+ export interface IntegrationConfigurationV1 {
117
+ /**
118
+ * Mapping specification version
119
+ */
120
+ version?: "1.0";
121
+ mapping: {
122
+ /**
123
+ * [v1.0] Object type mappings
124
+ */
125
+ objects: {
126
+ [name: string]: IntegrationObjectV1;
127
+ };
128
+ };
129
+ }
130
+ export interface IntegrationConfigurationV2 {
131
+ /**
132
+ * Mapping specification version
133
+ */
134
+ version: "2.0";
135
+ mapping: {
136
+ /**
137
+ * [v2.0] Event type mappings
138
+ */
139
+ events: {
140
+ [name: string]: IntegrationEvent;
141
+ };
142
+ };
143
+ }
144
+ export interface IntegrationEntity {
145
+ /**
146
+ * Target entity schema (e.g., 'contact', 'contract')
147
+ */
148
+ entity_schema: string;
149
+ /**
150
+ * Array of attribute names that uniquely identify this entity
151
+ */
152
+ unique_ids: string[];
153
+ /**
154
+ * Optional JSONata expression to pre-process the event data before field mapping
155
+ */
156
+ jsonataExpression?: string;
157
+ /**
158
+ * Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean.
159
+ */
160
+ enabled?: /* Controls whether this entity mapping should be processed. Can be a boolean or a JSONata expression (string) that evaluates to a boolean. */ boolean | string;
161
+ /**
162
+ * Field mapping definitions
163
+ */
164
+ fields: IntegrationEntityField[];
165
+ }
166
+ export interface IntegrationEntityField {
167
+ /**
168
+ * Target attribute name
169
+ */
170
+ attribute: string;
171
+ /**
172
+ * Source field name or JSONPath expression (if starts with $)
173
+ */
174
+ field?: string;
175
+ /**
176
+ * JSONata expression for transformation
177
+ */
178
+ jsonataExpression?: string;
179
+ /**
180
+ * Constant value to assign (any type)
181
+ */
182
+ constant?: any;
183
+ relations?: RelationConfig;
184
+ }
185
+ export interface IntegrationEvent {
186
+ /**
187
+ * Array of entity configurations for this event
188
+ */
189
+ entities?: IntegrationEntity[];
190
+ /**
191
+ * Array of meter reading configurations for this event
192
+ */
193
+ meter_readings?: IntegrationMeterReading[];
194
+ }
195
+ export interface IntegrationFieldV1 {
196
+ /**
197
+ * Target entity slug
198
+ */
199
+ entity: string;
200
+ /**
201
+ * Target attribute name
202
+ */
203
+ attribute: string;
204
+ /**
205
+ * Source field name (mutually exclusive with jsonataExpression)
206
+ */
207
+ field?: string;
208
+ /**
209
+ * JSONata expression for transformation (mutually exclusive with field)
210
+ */
211
+ jsonataExpression?: string;
212
+ }
213
+ export interface IntegrationMeterReading {
214
+ /**
215
+ * JSONata expression to extract meter reading items from the event data
216
+ */
217
+ jsonataExpression: string;
218
+ meter: MeterUniqueIdsConfig;
219
+ meter_counter?: MeterUniqueIdsConfig;
220
+ /**
221
+ * Field mapping definitions for meter reading attributes
222
+ */
223
+ fields: IntegrationEntityField[];
224
+ }
225
+ export interface IntegrationObjectV1 {
226
+ /**
227
+ * Mapping of entity types to their unique identifier field mappings
228
+ */
229
+ unique_ids: {
230
+ [name: string]: string[] | {
231
+ [name: string]: string;
232
+ };
233
+ };
234
+ /**
235
+ * Field mapping definitions
236
+ */
237
+ fields: IntegrationFieldV1[];
238
+ }
239
+ export interface MappingSimulationRequest {
240
+ mapping_configuration: IntegrationConfigurationV1 | IntegrationConfigurationV2;
241
+ /**
242
+ * Type of the object/event being mapped.
243
+ * For v1.0: must match a key in mapping_configuration.mapping.objects
244
+ * For v2.0: must match a key in mapping_configuration.mapping.events
245
+ *
246
+ */
247
+ object_type: string;
248
+ /**
249
+ * Format of the payload data
250
+ */
251
+ format: "json" | "xml";
252
+ /**
253
+ * The object data payload - can be either a serialized string or a direct JSON object
254
+ */
255
+ payload: /* The object data payload - can be either a serialized string or a direct JSON object */ string | {
256
+ [name: string]: any;
257
+ };
258
+ }
259
+ export interface MappingSimulationResponse {
260
+ entity_updates: EntityUpdate[];
261
+ meter_readings_updates?: MeterReadingUpdate[];
262
+ }
263
+ export interface MeterReadingUpdate {
264
+ meter: {
265
+ /**
266
+ * Unique identifiers for the meter
267
+ */
268
+ $entity_unique_ids: {
269
+ [name: string]: any;
270
+ };
271
+ };
272
+ meter_counter?: {
273
+ /**
274
+ * Unique identifiers for the meter counter
275
+ */
276
+ $entity_unique_ids?: {
277
+ [name: string]: any;
278
+ };
279
+ };
280
+ /**
281
+ * Meter reading attributes (external_id, timestamp, source, value, etc.)
282
+ */
283
+ attributes: {
284
+ [name: string]: any;
285
+ };
286
+ }
287
+ export interface MeterUniqueIdsConfig {
288
+ /**
289
+ * Array of unique identifier field mappings
290
+ */
291
+ unique_ids: [
292
+ RelationUniqueIdField,
293
+ ...RelationUniqueIdField[]
294
+ ];
295
+ }
296
+ export interface RelationConfig {
297
+ /**
298
+ * Relation operation:
299
+ * - '_set': Replace all existing relations with the specified items
300
+ * - '_append': Add new items to existing relations (fetches current entity first)
301
+ *
302
+ */
303
+ operation: "_set" | "_append";
304
+ /**
305
+ * Array of relation item configurations
306
+ */
307
+ items?: RelationItemConfig[];
308
+ /**
309
+ * JSONata expression that returns relation items array (alternative to 'items')
310
+ */
311
+ jsonataExpression?: string;
312
+ }
313
+ export interface RelationItemConfig {
314
+ /**
315
+ * Related entity schema
316
+ */
317
+ entity_schema: string;
318
+ /**
319
+ * Optional tags for this relation
320
+ */
321
+ _tags?: string[];
322
+ /**
323
+ * Unique identifier mappings for the related entity
324
+ */
325
+ unique_ids: RelationUniqueIdField[];
326
+ }
327
+ export interface RelationUniqueIdField {
328
+ /**
329
+ * Target attribute name in the related entity
330
+ */
331
+ attribute: string;
332
+ /**
333
+ * Source field name from the event data
334
+ */
335
+ field?: string;
336
+ /**
337
+ * JSONata expression to compute the value
338
+ */
339
+ jsonataExpression?: string;
340
+ /**
341
+ * Constant value (any type)
342
+ */
343
+ constant?: any;
344
+ }
42
345
  export interface TriggerErpActionRequest {
43
346
  /**
44
347
  * Unique identifier of the current automation execution
@@ -93,6 +396,72 @@ declare namespace Components {
93
396
  end_date?: string;
94
397
  event_id?: string;
95
398
  }
399
+ export interface UpdateIntegrationRequest {
400
+ /**
401
+ * Integration name
402
+ */
403
+ name?: string;
404
+ /**
405
+ * Optional description of the integration
406
+ */
407
+ description?: string;
408
+ }
409
+ export interface UpdateUseCaseRequest {
410
+ /**
411
+ * Use case name
412
+ */
413
+ name?: string;
414
+ /**
415
+ * Use case type
416
+ */
417
+ type?: "inbound" | "outbound";
418
+ /**
419
+ * Whether the use case is enabled
420
+ */
421
+ enabled?: boolean;
422
+ /**
423
+ * Use case specific configuration
424
+ */
425
+ configuration?: {
426
+ [name: string]: any;
427
+ };
428
+ }
429
+ export interface UseCase {
430
+ /**
431
+ * Unique identifier for the use case
432
+ */
433
+ id: string; // uuid
434
+ /**
435
+ * Parent integration ID
436
+ */
437
+ integrationId: string; // uuid
438
+ /**
439
+ * Use case name
440
+ */
441
+ name: string;
442
+ /**
443
+ * Use case type
444
+ */
445
+ type: "inbound" | "outbound";
446
+ /**
447
+ * Whether the use case is enabled
448
+ */
449
+ enabled: boolean;
450
+ /**
451
+ * Use case specific configuration
452
+ */
453
+ configuration?: {
454
+ [name: string]: any;
455
+ };
456
+ /**
457
+ * ISO-8601 timestamp when the use case was created
458
+ */
459
+ created_at: string; // date-time
460
+ /**
461
+ * ISO-8601 timestamp when the use case was last updated
462
+ */
463
+ updated_at: string; // date-time
464
+ }
96
465
  }
97
466
  }
98
467
  declare namespace Paths {
@@ -117,6 +486,124 @@ declare namespace Paths {
117
486
  }
118
487
  }
119
488
  }
489
+ namespace CreateIntegration {
490
+ export type RequestBody = Components.Schemas.CreateIntegrationRequest;
491
+ namespace Responses {
492
+ export type $201 = Components.Schemas.Integration;
493
+ export type $400 = Components.Responses.BadRequest;
494
+ export type $401 = Components.Responses.Unauthorized;
495
+ export type $500 = Components.Responses.InternalServerError;
496
+ }
497
+ }
498
+ namespace CreateUseCase {
499
+ namespace Parameters {
500
+ export type IntegrationId = string; // uuid
501
+ }
502
+ export interface PathParameters {
503
+ integrationId: Parameters.IntegrationId /* uuid */;
504
+ }
505
+ export type RequestBody = Components.Schemas.CreateUseCaseRequest;
506
+ namespace Responses {
507
+ export type $201 = Components.Schemas.UseCase;
508
+ export type $400 = Components.Responses.BadRequest;
509
+ export type $401 = Components.Responses.Unauthorized;
510
+ export interface $404 {
511
+ }
512
+ export type $500 = Components.Responses.InternalServerError;
513
+ }
514
+ }
515
+ namespace DeleteIntegration {
516
+ namespace Parameters {
517
+ export type IntegrationId = string; // uuid
518
+ }
519
+ export interface PathParameters {
520
+ integrationId: Parameters.IntegrationId /* uuid */;
521
+ }
522
+ namespace Responses {
523
+ export interface $200 {
524
+ message?: string;
525
+ }
526
+ export type $401 = Components.Responses.Unauthorized;
527
+ export interface $404 {
528
+ }
529
+ export type $500 = Components.Responses.InternalServerError;
530
+ }
531
+ }
532
+ namespace DeleteUseCase {
533
+ namespace Parameters {
534
+ export type IntegrationId = string; // uuid
535
+ export type UseCaseId = string; // uuid
536
+ }
537
+ export interface PathParameters {
538
+ integrationId: Parameters.IntegrationId /* uuid */;
539
+ useCaseId: Parameters.UseCaseId /* uuid */;
540
+ }
541
+ namespace Responses {
542
+ export interface $200 {
543
+ message?: string;
544
+ }
545
+ export type $401 = Components.Responses.Unauthorized;
546
+ export interface $404 {
547
+ }
548
+ export type $500 = Components.Responses.InternalServerError;
549
+ }
550
+ }
551
+ namespace GetIntegration {
552
+ namespace Parameters {
553
+ export type IntegrationId = string; // uuid
554
+ }
555
+ export interface PathParameters {
556
+ integrationId: Parameters.IntegrationId /* uuid */;
557
+ }
558
+ namespace Responses {
559
+ export type $200 = Components.Schemas.Integration;
560
+ export type $401 = Components.Responses.Unauthorized;
561
+ export interface $404 {
562
+ }
563
+ export type $500 = Components.Responses.InternalServerError;
564
+ }
565
+ }
566
+ namespace GetUseCase {
567
+ namespace Parameters {
568
+ export type IntegrationId = string; // uuid
569
+ export type UseCaseId = string; // uuid
570
+ }
571
+ export interface PathParameters {
572
+ integrationId: Parameters.IntegrationId /* uuid */;
573
+ useCaseId: Parameters.UseCaseId /* uuid */;
574
+ }
575
+ namespace Responses {
576
+ export type $200 = Components.Schemas.UseCase;
577
+ export type $401 = Components.Responses.Unauthorized;
578
+ export interface $404 {
579
+ }
580
+ export type $500 = Components.Responses.InternalServerError;
581
+ }
582
+ }
583
+ namespace ListIntegrations {
584
+ namespace Responses {
585
+ export interface $200 {
586
+ integrations: Components.Schemas.Integration[];
587
+ }
588
+ export type $401 = Components.Responses.Unauthorized;
589
+ export type $500 = Components.Responses.InternalServerError;
590
+ }
591
+ }
592
+ namespace ListUseCases {
593
+ namespace Parameters {
594
+ export type IntegrationId = string; // uuid
595
+ }
596
+ export interface PathParameters {
597
+ integrationId: Parameters.IntegrationId /* uuid */;
598
+ }
599
+ namespace Responses {
600
+ export interface $200 {
601
+ use_cases: Components.Schemas.UseCase[];
602
+ }
603
+ export type $401 = Components.Responses.Unauthorized;
604
+ export type $500 = Components.Responses.InternalServerError;
605
+ }
606
+ }
120
607
  namespace ProcessErpUpdatesEvents {
121
608
  export interface RequestBody {
122
609
  /**
@@ -158,9 +645,11 @@ declare namespace Paths {
158
645
  */
159
646
  format: "json" | "xml";
160
647
  /**
161
- * The serialized object data payload (JSON, XML, etc.) as a string
648
+ * The object data payload - can be either a serialized string or a direct JSON object
162
649
  */
163
- payload: string;
650
+ payload: /* The object data payload - can be either a serialized string or a direct JSON object */ string | {
651
+ [name: string]: any;
652
+ };
164
653
  /**
165
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.
166
655
  *
@@ -179,84 +668,9 @@ declare namespace Paths {
179
668
  }
180
669
  }
181
670
  namespace SimulateMapping {
182
- export interface RequestBody {
183
- /**
184
- * The integration mapping configuration
185
- */
186
- mapping_configuration: {
187
- mapping: {
188
- /**
189
- * Object type mappings
190
- */
191
- objects: {
192
- [name: string]: {
193
- /**
194
- * Mapping of entity types to their unique identifier field mappings
195
- */
196
- unique_ids: {
197
- [name: string]: {
198
- [name: string]: string;
199
- };
200
- };
201
- /**
202
- * Field mapping definitions
203
- */
204
- fields: {
205
- /**
206
- * Target entity slug
207
- */
208
- entity: string;
209
- /**
210
- * Target attribute name
211
- */
212
- attribute: string;
213
- /**
214
- * Source field name (mutually exclusive with jsonataExpression)
215
- */
216
- field?: string;
217
- /**
218
- * JSONata expression for transformation (mutually exclusive with field)
219
- */
220
- jsonataExpression?: string;
221
- }[];
222
- };
223
- };
224
- };
225
- };
226
- /**
227
- * Type of the object being mapped (must match a key in mapping_configuration.mapping.objects)
228
- */
229
- object_type: string;
230
- /**
231
- * Format of the payload data
232
- */
233
- format: "json" | "xml";
234
- /**
235
- * The serialized object data payload (JSON, XML, etc.) as a string
236
- */
237
- payload: string;
238
- }
671
+ export type RequestBody = Components.Schemas.MappingSimulationRequest;
239
672
  namespace Responses {
240
- export interface $200 {
241
- entity_updates: {
242
- /**
243
- * The entity type slug
244
- */
245
- entity_slug: string;
246
- /**
247
- * Unique identifier mappings for this entity
248
- */
249
- unique_identifiers: {
250
- [name: string]: any;
251
- };
252
- /**
253
- * Mapped attribute values
254
- */
255
- attributes: {
256
- [name: string]: any;
257
- };
258
- }[];
259
- }
673
+ export type $200 = Components.Schemas.MappingSimulationResponse;
260
674
  export type $400 = Components.Responses.BadRequest;
261
675
  export type $401 = Components.Responses.Unauthorized;
262
676
  export type $422 = Components.Schemas.ErrorResponseBase;
@@ -275,6 +689,42 @@ declare namespace Paths {
275
689
  }
276
690
  }
277
691
  }
692
+ namespace UpdateIntegration {
693
+ namespace Parameters {
694
+ export type IntegrationId = string; // uuid
695
+ }
696
+ export interface PathParameters {
697
+ integrationId: Parameters.IntegrationId /* uuid */;
698
+ }
699
+ export type RequestBody = Components.Schemas.UpdateIntegrationRequest;
700
+ namespace Responses {
701
+ export type $200 = Components.Schemas.Integration;
702
+ export type $400 = Components.Responses.BadRequest;
703
+ export type $401 = Components.Responses.Unauthorized;
704
+ export interface $404 {
705
+ }
706
+ export type $500 = Components.Responses.InternalServerError;
707
+ }
708
+ }
709
+ namespace UpdateUseCase {
710
+ namespace Parameters {
711
+ export type IntegrationId = string; // uuid
712
+ export type UseCaseId = string; // uuid
713
+ }
714
+ export interface PathParameters {
715
+ integrationId: Parameters.IntegrationId /* uuid */;
716
+ useCaseId: Parameters.UseCaseId /* uuid */;
717
+ }
718
+ export type RequestBody = Components.Schemas.UpdateUseCaseRequest;
719
+ namespace Responses {
720
+ export type $200 = Components.Schemas.UseCase;
721
+ export type $400 = Components.Responses.BadRequest;
722
+ export type $401 = Components.Responses.Unauthorized;
723
+ export interface $404 {
724
+ }
725
+ export type $500 = Components.Responses.InternalServerError;
726
+ }
727
+ }
278
728
  }
279
729
 
280
730
 
@@ -312,13 +762,117 @@ export interface OperationMethods {
312
762
  /**
313
763
  * simulateMapping - simulateMapping
314
764
  *
315
- * Test mapping configuration by transforming a payload using the provided mapping rules without persisting data
765
+ * Test mapping configuration by transforming a payload using the provided mapping rules without persisting data.
766
+ *
767
+ * Supports both v1.0 (object-based) and v2.0 (event-based) mapping formats.
768
+ * See documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification.
769
+ *
316
770
  */
317
771
  'simulateMapping'(
318
772
  parameters?: Parameters<UnknownParamsObject> | null,
319
773
  data?: Paths.SimulateMapping.RequestBody,
320
774
  config?: AxiosRequestConfig
321
775
  ): OperationResponse<Paths.SimulateMapping.Responses.$200>
776
+ /**
777
+ * listIntegrations - List all integrations
778
+ *
779
+ * Retrieve all integrations for the authenticated organization
780
+ */
781
+ 'listIntegrations'(
782
+ parameters?: Parameters<UnknownParamsObject> | null,
783
+ data?: any,
784
+ config?: AxiosRequestConfig
785
+ ): OperationResponse<Paths.ListIntegrations.Responses.$200>
786
+ /**
787
+ * createIntegration - Create a new integration
788
+ *
789
+ * Create a new integration configuration
790
+ */
791
+ 'createIntegration'(
792
+ parameters?: Parameters<UnknownParamsObject> | null,
793
+ data?: Paths.CreateIntegration.RequestBody,
794
+ config?: AxiosRequestConfig
795
+ ): OperationResponse<Paths.CreateIntegration.Responses.$201>
796
+ /**
797
+ * getIntegration - Get an integration by ID
798
+ *
799
+ * Retrieve a specific integration by its ID
800
+ */
801
+ 'getIntegration'(
802
+ parameters?: Parameters<Paths.GetIntegration.PathParameters> | null,
803
+ data?: any,
804
+ config?: AxiosRequestConfig
805
+ ): OperationResponse<Paths.GetIntegration.Responses.$200>
806
+ /**
807
+ * updateIntegration - Update an integration
808
+ *
809
+ * Update an existing integration configuration
810
+ */
811
+ 'updateIntegration'(
812
+ parameters?: Parameters<Paths.UpdateIntegration.PathParameters> | null,
813
+ data?: Paths.UpdateIntegration.RequestBody,
814
+ config?: AxiosRequestConfig
815
+ ): OperationResponse<Paths.UpdateIntegration.Responses.$200>
816
+ /**
817
+ * deleteIntegration - Delete an integration
818
+ *
819
+ * Delete an integration and all its use cases
820
+ */
821
+ 'deleteIntegration'(
822
+ parameters?: Parameters<Paths.DeleteIntegration.PathParameters> | null,
823
+ data?: any,
824
+ config?: AxiosRequestConfig
825
+ ): OperationResponse<Paths.DeleteIntegration.Responses.$200>
826
+ /**
827
+ * listUseCases - List all use cases for an integration
828
+ *
829
+ * Retrieve all use cases for a specific integration
830
+ */
831
+ 'listUseCases'(
832
+ parameters?: Parameters<Paths.ListUseCases.PathParameters> | null,
833
+ data?: any,
834
+ config?: AxiosRequestConfig
835
+ ): OperationResponse<Paths.ListUseCases.Responses.$200>
836
+ /**
837
+ * createUseCase - Create a new use case
838
+ *
839
+ * Create a new use case for an integration
840
+ */
841
+ 'createUseCase'(
842
+ parameters?: Parameters<Paths.CreateUseCase.PathParameters> | null,
843
+ data?: Paths.CreateUseCase.RequestBody,
844
+ config?: AxiosRequestConfig
845
+ ): OperationResponse<Paths.CreateUseCase.Responses.$201>
846
+ /**
847
+ * getUseCase - Get a use case by ID
848
+ *
849
+ * Retrieve a specific use case by its ID
850
+ */
851
+ 'getUseCase'(
852
+ parameters?: Parameters<Paths.GetUseCase.PathParameters> | null,
853
+ data?: any,
854
+ config?: AxiosRequestConfig
855
+ ): OperationResponse<Paths.GetUseCase.Responses.$200>
856
+ /**
857
+ * updateUseCase - Update a use case
858
+ *
859
+ * Update an existing use case configuration
860
+ */
861
+ 'updateUseCase'(
862
+ parameters?: Parameters<Paths.UpdateUseCase.PathParameters> | null,
863
+ data?: Paths.UpdateUseCase.RequestBody,
864
+ config?: AxiosRequestConfig
865
+ ): OperationResponse<Paths.UpdateUseCase.Responses.$200>
866
+ /**
867
+ * deleteUseCase - Delete a use case
868
+ *
869
+ * Delete a use case from an integration
870
+ */
871
+ 'deleteUseCase'(
872
+ parameters?: Parameters<Paths.DeleteUseCase.PathParameters> | null,
873
+ data?: any,
874
+ config?: AxiosRequestConfig
875
+ ): OperationResponse<Paths.DeleteUseCase.Responses.$200>
322
876
  }
323
877
 
324
878
  export interface PathsDictionary {
@@ -362,7 +916,11 @@ export interface PathsDictionary {
362
916
  /**
363
917
  * simulateMapping - simulateMapping
364
918
  *
365
- * Test mapping configuration by transforming a payload using the provided mapping rules without persisting data
919
+ * Test mapping configuration by transforming a payload using the provided mapping rules without persisting data.
920
+ *
921
+ * Supports both v1.0 (object-based) and v2.0 (event-based) mapping formats.
922
+ * See documentation at /docs/MAPPING_V2.md for detailed v2.0 format specification.
923
+ *
366
924
  */
367
925
  'post'(
368
926
  parameters?: Parameters<UnknownParamsObject> | null,
@@ -370,11 +928,141 @@ export interface PathsDictionary {
370
928
  config?: AxiosRequestConfig
371
929
  ): OperationResponse<Paths.SimulateMapping.Responses.$200>
372
930
  }
931
+ ['/v1/integrations']: {
932
+ /**
933
+ * listIntegrations - List all integrations
934
+ *
935
+ * Retrieve all integrations for the authenticated organization
936
+ */
937
+ 'get'(
938
+ parameters?: Parameters<UnknownParamsObject> | null,
939
+ data?: any,
940
+ config?: AxiosRequestConfig
941
+ ): OperationResponse<Paths.ListIntegrations.Responses.$200>
942
+ /**
943
+ * createIntegration - Create a new integration
944
+ *
945
+ * Create a new integration configuration
946
+ */
947
+ 'post'(
948
+ parameters?: Parameters<UnknownParamsObject> | null,
949
+ data?: Paths.CreateIntegration.RequestBody,
950
+ config?: AxiosRequestConfig
951
+ ): OperationResponse<Paths.CreateIntegration.Responses.$201>
952
+ }
953
+ ['/v1/integrations/{integrationId}']: {
954
+ /**
955
+ * getIntegration - Get an integration by ID
956
+ *
957
+ * Retrieve a specific integration by its ID
958
+ */
959
+ 'get'(
960
+ parameters?: Parameters<Paths.GetIntegration.PathParameters> | null,
961
+ data?: any,
962
+ config?: AxiosRequestConfig
963
+ ): OperationResponse<Paths.GetIntegration.Responses.$200>
964
+ /**
965
+ * updateIntegration - Update an integration
966
+ *
967
+ * Update an existing integration configuration
968
+ */
969
+ 'put'(
970
+ parameters?: Parameters<Paths.UpdateIntegration.PathParameters> | null,
971
+ data?: Paths.UpdateIntegration.RequestBody,
972
+ config?: AxiosRequestConfig
973
+ ): OperationResponse<Paths.UpdateIntegration.Responses.$200>
974
+ /**
975
+ * deleteIntegration - Delete an integration
976
+ *
977
+ * Delete an integration and all its use cases
978
+ */
979
+ 'delete'(
980
+ parameters?: Parameters<Paths.DeleteIntegration.PathParameters> | null,
981
+ data?: any,
982
+ config?: AxiosRequestConfig
983
+ ): OperationResponse<Paths.DeleteIntegration.Responses.$200>
984
+ }
985
+ ['/v1/integrations/{integrationId}/use-cases']: {
986
+ /**
987
+ * listUseCases - List all use cases for an integration
988
+ *
989
+ * Retrieve all use cases for a specific integration
990
+ */
991
+ 'get'(
992
+ parameters?: Parameters<Paths.ListUseCases.PathParameters> | null,
993
+ data?: any,
994
+ config?: AxiosRequestConfig
995
+ ): OperationResponse<Paths.ListUseCases.Responses.$200>
996
+ /**
997
+ * createUseCase - Create a new use case
998
+ *
999
+ * Create a new use case for an integration
1000
+ */
1001
+ 'post'(
1002
+ parameters?: Parameters<Paths.CreateUseCase.PathParameters> | null,
1003
+ data?: Paths.CreateUseCase.RequestBody,
1004
+ config?: AxiosRequestConfig
1005
+ ): OperationResponse<Paths.CreateUseCase.Responses.$201>
1006
+ }
1007
+ ['/v1/integrations/{integrationId}/use-cases/{useCaseId}']: {
1008
+ /**
1009
+ * getUseCase - Get a use case by ID
1010
+ *
1011
+ * Retrieve a specific use case by its ID
1012
+ */
1013
+ 'get'(
1014
+ parameters?: Parameters<Paths.GetUseCase.PathParameters> | null,
1015
+ data?: any,
1016
+ config?: AxiosRequestConfig
1017
+ ): OperationResponse<Paths.GetUseCase.Responses.$200>
1018
+ /**
1019
+ * updateUseCase - Update a use case
1020
+ *
1021
+ * Update an existing use case configuration
1022
+ */
1023
+ 'put'(
1024
+ parameters?: Parameters<Paths.UpdateUseCase.PathParameters> | null,
1025
+ data?: Paths.UpdateUseCase.RequestBody,
1026
+ config?: AxiosRequestConfig
1027
+ ): OperationResponse<Paths.UpdateUseCase.Responses.$200>
1028
+ /**
1029
+ * deleteUseCase - Delete a use case
1030
+ *
1031
+ * Delete a use case from an integration
1032
+ */
1033
+ 'delete'(
1034
+ parameters?: Parameters<Paths.DeleteUseCase.PathParameters> | null,
1035
+ data?: any,
1036
+ config?: AxiosRequestConfig
1037
+ ): OperationResponse<Paths.DeleteUseCase.Responses.$200>
1038
+ }
373
1039
  }
374
1040
 
375
1041
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
376
1042
 
377
1043
 
1044
+ export type CreateIntegrationRequest = Components.Schemas.CreateIntegrationRequest;
1045
+ export type CreateUseCaseRequest = Components.Schemas.CreateUseCaseRequest;
1046
+ export type EntityUpdate = Components.Schemas.EntityUpdate;
378
1047
  export type ErrorResponseBase = Components.Schemas.ErrorResponseBase;
1048
+ export type Integration = Components.Schemas.Integration;
1049
+ export type IntegrationConfigurationV1 = Components.Schemas.IntegrationConfigurationV1;
1050
+ export type IntegrationConfigurationV2 = Components.Schemas.IntegrationConfigurationV2;
1051
+ export type IntegrationEntity = Components.Schemas.IntegrationEntity;
1052
+ export type IntegrationEntityField = Components.Schemas.IntegrationEntityField;
1053
+ export type IntegrationEvent = Components.Schemas.IntegrationEvent;
1054
+ export type IntegrationFieldV1 = Components.Schemas.IntegrationFieldV1;
1055
+ export type IntegrationMeterReading = Components.Schemas.IntegrationMeterReading;
1056
+ export type IntegrationObjectV1 = Components.Schemas.IntegrationObjectV1;
1057
+ export type MappingSimulationRequest = Components.Schemas.MappingSimulationRequest;
1058
+ export type MappingSimulationResponse = Components.Schemas.MappingSimulationResponse;
1059
+ export type MeterReadingUpdate = Components.Schemas.MeterReadingUpdate;
1060
+ export type MeterUniqueIdsConfig = Components.Schemas.MeterUniqueIdsConfig;
1061
+ export type RelationConfig = Components.Schemas.RelationConfig;
1062
+ export type RelationItemConfig = Components.Schemas.RelationItemConfig;
1063
+ export type RelationUniqueIdField = Components.Schemas.RelationUniqueIdField;
379
1064
  export type TriggerErpActionRequest = Components.Schemas.TriggerErpActionRequest;
380
1065
  export type TriggerWebhookResp = Components.Schemas.TriggerWebhookResp;
1066
+ export type UpdateIntegrationRequest = Components.Schemas.UpdateIntegrationRequest;
1067
+ export type UpdateUseCaseRequest = Components.Schemas.UpdateUseCaseRequest;
1068
+ export type UseCase = Components.Schemas.UseCase;