@epilot/entity-mapping-client 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +28 -6
- package/dist/openapi.d.ts +141 -65
- package/dist/openapi.json +144 -123
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={914:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(240));t.default=n.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/mappings":{"post":{"operationId":"storeConfig","parameters":[{"name":"with_id","in":"query","required":false}],"requestBody":{"content":{"application/json":{}}}}},"/v1/mappings/{id}":{"get":{"operationId":"getConfig","parameters":[{"name":"id","in":"path","required":true}]},"delete":{"operationId":"deleteConfig","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/mappings/{id}/versions":{"get":{"operationId":"getAllVersions","parameters":[{"name":"id","in":"path","required":true}]},"post":{"operationId":"storeNewVersion","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}}}},"/v1/mappings/{id}/versions/{version}":{"get":{"operationId":"getConfigVersion","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"path","required":true}]}},"/v1/mappings:execute":{"post":{"operationId":"executeMapping","parameters":[{"name":"preview_mode","in":"query","required":false}],"requestBody":{"content":{"application/json":{}}}}},"/v1/mappings:search":{"post":{"operationId":"searchConfigs","requestBody":{"content":{"application/json":{}}}}},"/v1/mappings/history":{"get":{"operationId":"queryMappingHistory","parameters":[{"in":"query","name":"from","required":false},{"in":"query","name":"to","required":false},{"in":"query","name":"targetEntityId"},{"in":"query","name":"sourceEntityId"}]}},"/v1/relations:execute":{"post":{"operationId":"executeRelations","requestBody":{"content":{"application/json":{}}}}}},"
|
|
1
|
+
(()=>{"use strict";var e={914:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=i(r(240));t.default=n.default},240:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/mappings":{"post":{"operationId":"storeConfig","parameters":[{"name":"with_id","in":"query","required":false}],"requestBody":{"content":{"application/json":{}}}}},"/v1/mappings/{id}":{"get":{"operationId":"getConfig","parameters":[{"name":"id","in":"path","required":true}]},"delete":{"operationId":"deleteConfig","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/mappings/{id}/versions":{"get":{"operationId":"getAllVersions","parameters":[{"name":"id","in":"path","required":true}]},"post":{"operationId":"storeNewVersion","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}}}},"/v1/mappings/{id}/versions/{version}":{"get":{"operationId":"getConfigVersion","parameters":[{"name":"id","in":"path","required":true},{"name":"version","in":"path","required":true}]}},"/v1/mappings:execute":{"post":{"operationId":"executeMapping","parameters":[{"name":"preview_mode","in":"query","required":false}],"requestBody":{"content":{"application/json":{}}}}},"/v1/mappings:search":{"post":{"operationId":"searchConfigs","requestBody":{"content":{"application/json":{}}}}},"/v1/mappings/history":{"get":{"operationId":"queryMappingHistory","parameters":[{"in":"query","name":"from","required":false},{"in":"query","name":"to","required":false},{"in":"query","name":"targetEntityId"},{"in":"query","name":"sourceEntityId"}]}},"/v1/relations:execute":{"post":{"operationId":"executeRelations","requestBody":{"content":{"application/json":{}}}}},"/v2/mappings/{id}":{"get":{"operationId":"getMappingConfig","parameters":[{"name":"id","in":"path","required":true}]},"put":{"operationId":"putMappingConfig","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}}}}},"components":{}}')}},t={},r=function r(i){var n=t[i];if(void 0!==n)return n.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.exports}(914),i=exports;for(var n in r)i[n]=r[n];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|
|
@@ -149,12 +149,34 @@
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
},
|
|
153
|
+
"/v2/mappings/{id}": {
|
|
154
|
+
"get": {
|
|
155
|
+
"operationId": "getMappingConfig",
|
|
156
|
+
"parameters": [
|
|
157
|
+
{
|
|
158
|
+
"name": "id",
|
|
159
|
+
"in": "path",
|
|
160
|
+
"required": true
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"put": {
|
|
165
|
+
"operationId": "putMappingConfig",
|
|
166
|
+
"parameters": [
|
|
167
|
+
{
|
|
168
|
+
"name": "id",
|
|
169
|
+
"in": "path",
|
|
170
|
+
"required": true
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"requestBody": {
|
|
174
|
+
"content": {
|
|
175
|
+
"application/json": {}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
152
179
|
}
|
|
153
180
|
},
|
|
154
|
-
"components": {}
|
|
155
|
-
"servers": [
|
|
156
|
-
{
|
|
157
|
-
"url": "https://entity-mapping.sls.epilot.io/"
|
|
158
|
-
}
|
|
159
|
-
]
|
|
181
|
+
"components": {}
|
|
160
182
|
}
|
package/dist/openapi.d.ts
CHANGED
|
@@ -179,8 +179,25 @@ declare namespace Components {
|
|
|
179
179
|
}
|
|
180
180
|
export interface MappingConfig {
|
|
181
181
|
id: string;
|
|
182
|
+
source: SourceConfig;
|
|
183
|
+
targets: TargetConfig[];
|
|
184
|
+
created_at?: string; // date-time
|
|
185
|
+
updated_at?: string; // date-time
|
|
186
|
+
created_by?: Owner;
|
|
187
|
+
last_updated_by?: Owner;
|
|
188
|
+
/**
|
|
189
|
+
* example:
|
|
190
|
+
* 66
|
|
191
|
+
*/
|
|
182
192
|
org_id: string;
|
|
193
|
+
/**
|
|
194
|
+
* example:
|
|
195
|
+
* 2
|
|
196
|
+
*/
|
|
183
197
|
version: number;
|
|
198
|
+
}
|
|
199
|
+
export interface MappingConfigCommonFields {
|
|
200
|
+
id: string;
|
|
184
201
|
source: SourceConfig;
|
|
185
202
|
targets: TargetConfig[];
|
|
186
203
|
created_at?: string; // date-time
|
|
@@ -204,6 +221,25 @@ declare namespace Components {
|
|
|
204
221
|
*/
|
|
205
222
|
last_updated_by?: Owner;
|
|
206
223
|
}
|
|
224
|
+
export interface MappingConfigV2 {
|
|
225
|
+
id: string;
|
|
226
|
+
source: SourceConfig;
|
|
227
|
+
targets: TargetConfig[];
|
|
228
|
+
created_at?: string; // date-time
|
|
229
|
+
updated_at?: string; // date-time
|
|
230
|
+
created_by?: Owner;
|
|
231
|
+
last_updated_by?: Owner;
|
|
232
|
+
/**
|
|
233
|
+
* example:
|
|
234
|
+
* 66
|
|
235
|
+
*/
|
|
236
|
+
org_id?: string;
|
|
237
|
+
/**
|
|
238
|
+
* example:
|
|
239
|
+
* 2
|
|
240
|
+
*/
|
|
241
|
+
version?: number;
|
|
242
|
+
}
|
|
207
243
|
export type MappingConfigs = MappingConfig[];
|
|
208
244
|
export interface MappingConfigsResp {
|
|
209
245
|
configs: MappingConfigs;
|
|
@@ -219,7 +255,7 @@ declare namespace Components {
|
|
|
219
255
|
export interface MappingHistoryEntry {
|
|
220
256
|
/**
|
|
221
257
|
* example:
|
|
222
|
-
*
|
|
258
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
223
259
|
*/
|
|
224
260
|
id: string;
|
|
225
261
|
timestamp: string; // ISO datetime
|
|
@@ -230,60 +266,6 @@ declare namespace Components {
|
|
|
230
266
|
export interface MappingHistoryResp {
|
|
231
267
|
results: MappingHistoryEntry[];
|
|
232
268
|
}
|
|
233
|
-
export interface MappingSource {
|
|
234
|
-
/**
|
|
235
|
-
* Key aiming to identify source
|
|
236
|
-
*/
|
|
237
|
-
key: string;
|
|
238
|
-
/**
|
|
239
|
-
* Each item describes a property under the main source and a possibly, a default value for its target attribute
|
|
240
|
-
*/
|
|
241
|
-
sub_properties?: MappingSourceProperty[];
|
|
242
|
-
/**
|
|
243
|
-
* Data Structure type of source
|
|
244
|
-
*/
|
|
245
|
-
source_type: string;
|
|
246
|
-
/**
|
|
247
|
-
* Data Structure Type of the underlaying output value
|
|
248
|
-
*/
|
|
249
|
-
possible_target_types?: MappingSourceTargetType[];
|
|
250
|
-
/**
|
|
251
|
-
* Initial value of a relation to be added
|
|
252
|
-
*/
|
|
253
|
-
initial_relation?: RelationAttribute;
|
|
254
|
-
/**
|
|
255
|
-
* Human readable name of the Source
|
|
256
|
-
*/
|
|
257
|
-
title: string;
|
|
258
|
-
/**
|
|
259
|
-
* Human readable type of the source
|
|
260
|
-
*/
|
|
261
|
-
sub_title?: string;
|
|
262
|
-
target_settings?: {
|
|
263
|
-
/**
|
|
264
|
-
* Describes which actions the user can perform on each target, if specified. If not specified, all actions are allowed
|
|
265
|
-
*/
|
|
266
|
-
allowed_ui_actions?: ("schema-select" | "attribute-select" | "target-delete" | "target-add" | "target")[];
|
|
267
|
-
/**
|
|
268
|
-
* Whether its a read-only ui or not. Can be each target, or only the first. Overwrites uiActions
|
|
269
|
-
*/
|
|
270
|
-
locked?: "each" | "first" | "system_recommendation";
|
|
271
|
-
/**
|
|
272
|
-
* Whether all source mappings flow into a single attribute (e.g. address)
|
|
273
|
-
*/
|
|
274
|
-
isSingleTarget?: boolean;
|
|
275
|
-
/**
|
|
276
|
-
* Determines whether a mapping target should be shown or not. Use if there are targets which cannot be manipulated by the UI. E.g journey_data
|
|
277
|
-
*/
|
|
278
|
-
visibility?: {
|
|
279
|
-
mode: "hide" | "show" | "message";
|
|
280
|
-
if: {
|
|
281
|
-
[name: string]: string;
|
|
282
|
-
};
|
|
283
|
-
message?: string;
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
269
|
export interface MappingSourceProperty {
|
|
288
270
|
value: string;
|
|
289
271
|
label: string;
|
|
@@ -455,6 +437,19 @@ declare namespace Components {
|
|
|
455
437
|
* Unique key for target entity (see upsertEntity of Entity API)
|
|
456
438
|
*/
|
|
457
439
|
target_unique?: string[];
|
|
440
|
+
/**
|
|
441
|
+
* contains config in case of running in loop mode
|
|
442
|
+
*/
|
|
443
|
+
loop_config?: {
|
|
444
|
+
/**
|
|
445
|
+
* path to the array from the entity payload
|
|
446
|
+
*/
|
|
447
|
+
source_path?: string;
|
|
448
|
+
/**
|
|
449
|
+
* a hard limit of how many times the loop is allowed to run.
|
|
450
|
+
*/
|
|
451
|
+
length?: number;
|
|
452
|
+
};
|
|
458
453
|
/**
|
|
459
454
|
* Mode of how conditions are considered valid
|
|
460
455
|
*/
|
|
@@ -501,14 +496,14 @@ declare namespace Paths {
|
|
|
501
496
|
namespace Parameters {
|
|
502
497
|
/**
|
|
503
498
|
* example:
|
|
504
|
-
*
|
|
499
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
505
500
|
*/
|
|
506
501
|
export type Id = string;
|
|
507
502
|
}
|
|
508
503
|
export interface PathParameters {
|
|
509
504
|
id: /**
|
|
510
505
|
* example:
|
|
511
|
-
*
|
|
506
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
512
507
|
*/
|
|
513
508
|
Parameters.Id;
|
|
514
509
|
}
|
|
@@ -546,14 +541,14 @@ declare namespace Paths {
|
|
|
546
541
|
namespace Parameters {
|
|
547
542
|
/**
|
|
548
543
|
* example:
|
|
549
|
-
*
|
|
544
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
550
545
|
*/
|
|
551
546
|
export type Id = string;
|
|
552
547
|
}
|
|
553
548
|
export interface PathParameters {
|
|
554
549
|
id: /**
|
|
555
550
|
* example:
|
|
556
|
-
*
|
|
551
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
557
552
|
*/
|
|
558
553
|
Parameters.Id;
|
|
559
554
|
}
|
|
@@ -565,14 +560,14 @@ declare namespace Paths {
|
|
|
565
560
|
namespace Parameters {
|
|
566
561
|
/**
|
|
567
562
|
* example:
|
|
568
|
-
*
|
|
563
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
569
564
|
*/
|
|
570
565
|
export type Id = string;
|
|
571
566
|
}
|
|
572
567
|
export interface PathParameters {
|
|
573
568
|
id: /**
|
|
574
569
|
* example:
|
|
575
|
-
*
|
|
570
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
576
571
|
*/
|
|
577
572
|
Parameters.Id;
|
|
578
573
|
}
|
|
@@ -584,7 +579,7 @@ declare namespace Paths {
|
|
|
584
579
|
namespace Parameters {
|
|
585
580
|
/**
|
|
586
581
|
* example:
|
|
587
|
-
*
|
|
582
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
588
583
|
*/
|
|
589
584
|
export type Id = string;
|
|
590
585
|
/**
|
|
@@ -596,7 +591,7 @@ declare namespace Paths {
|
|
|
596
591
|
export interface PathParameters {
|
|
597
592
|
id: /**
|
|
598
593
|
* example:
|
|
599
|
-
*
|
|
594
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
600
595
|
*/
|
|
601
596
|
Parameters.Id;
|
|
602
597
|
version: /**
|
|
@@ -609,6 +604,45 @@ declare namespace Paths {
|
|
|
609
604
|
export type $200 = Components.Schemas.MappingConfig;
|
|
610
605
|
}
|
|
611
606
|
}
|
|
607
|
+
namespace GetMappingConfig {
|
|
608
|
+
namespace Parameters {
|
|
609
|
+
/**
|
|
610
|
+
* example:
|
|
611
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
612
|
+
*/
|
|
613
|
+
export type Id = string;
|
|
614
|
+
}
|
|
615
|
+
export interface PathParameters {
|
|
616
|
+
id: /**
|
|
617
|
+
* example:
|
|
618
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
619
|
+
*/
|
|
620
|
+
Parameters.Id;
|
|
621
|
+
}
|
|
622
|
+
namespace Responses {
|
|
623
|
+
export type $200 = Components.Schemas.MappingConfigV2;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
namespace PutMappingConfig {
|
|
627
|
+
namespace Parameters {
|
|
628
|
+
/**
|
|
629
|
+
* example:
|
|
630
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
631
|
+
*/
|
|
632
|
+
export type Id = string;
|
|
633
|
+
}
|
|
634
|
+
export interface PathParameters {
|
|
635
|
+
id: /**
|
|
636
|
+
* example:
|
|
637
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
638
|
+
*/
|
|
639
|
+
Parameters.Id;
|
|
640
|
+
}
|
|
641
|
+
export type RequestBody = Components.Schemas.MappingConfigV2;
|
|
642
|
+
namespace Responses {
|
|
643
|
+
export type $200 = Components.Schemas.MappingConfigV2;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
612
646
|
namespace QueryMappingHistory {
|
|
613
647
|
namespace Parameters {
|
|
614
648
|
export type From = string; // datetime
|
|
@@ -650,14 +684,14 @@ declare namespace Paths {
|
|
|
650
684
|
namespace Parameters {
|
|
651
685
|
/**
|
|
652
686
|
* example:
|
|
653
|
-
*
|
|
687
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
654
688
|
*/
|
|
655
689
|
export type Id = string;
|
|
656
690
|
}
|
|
657
691
|
export interface PathParameters {
|
|
658
692
|
id: /**
|
|
659
693
|
* example:
|
|
660
|
-
*
|
|
694
|
+
* 70542580-2b38-4bfc-af8d-bb90102f9f47
|
|
661
695
|
*/
|
|
662
696
|
Parameters.Id;
|
|
663
697
|
}
|
|
@@ -769,6 +803,26 @@ export interface OperationMethods {
|
|
|
769
803
|
data?: Paths.ExecuteRelations.RequestBody,
|
|
770
804
|
config?: AxiosRequestConfig
|
|
771
805
|
): OperationResponse<Paths.ExecuteRelations.Responses.$200>
|
|
806
|
+
/**
|
|
807
|
+
* getMappingConfig - getMappingConfig
|
|
808
|
+
*
|
|
809
|
+
* Get latest version of a mapping config by id V2
|
|
810
|
+
*/
|
|
811
|
+
'getMappingConfig'(
|
|
812
|
+
parameters?: Parameters<Paths.GetMappingConfig.PathParameters> | null,
|
|
813
|
+
data?: any,
|
|
814
|
+
config?: AxiosRequestConfig
|
|
815
|
+
): OperationResponse<Paths.GetMappingConfig.Responses.$200>
|
|
816
|
+
/**
|
|
817
|
+
* putMappingConfig - putMappingConfig
|
|
818
|
+
*
|
|
819
|
+
* Stores new version of entity mapping config
|
|
820
|
+
*/
|
|
821
|
+
'putMappingConfig'(
|
|
822
|
+
parameters?: Parameters<Paths.PutMappingConfig.PathParameters> | null,
|
|
823
|
+
data?: Paths.PutMappingConfig.RequestBody,
|
|
824
|
+
config?: AxiosRequestConfig
|
|
825
|
+
): OperationResponse<Paths.PutMappingConfig.Responses.$200>
|
|
772
826
|
}
|
|
773
827
|
|
|
774
828
|
export interface PathsDictionary {
|
|
@@ -888,6 +942,28 @@ export interface PathsDictionary {
|
|
|
888
942
|
config?: AxiosRequestConfig
|
|
889
943
|
): OperationResponse<Paths.ExecuteRelations.Responses.$200>
|
|
890
944
|
}
|
|
945
|
+
['/v2/mappings/{id}']: {
|
|
946
|
+
/**
|
|
947
|
+
* getMappingConfig - getMappingConfig
|
|
948
|
+
*
|
|
949
|
+
* Get latest version of a mapping config by id V2
|
|
950
|
+
*/
|
|
951
|
+
'get'(
|
|
952
|
+
parameters?: Parameters<Paths.GetMappingConfig.PathParameters> | null,
|
|
953
|
+
data?: any,
|
|
954
|
+
config?: AxiosRequestConfig
|
|
955
|
+
): OperationResponse<Paths.GetMappingConfig.Responses.$200>
|
|
956
|
+
/**
|
|
957
|
+
* putMappingConfig - putMappingConfig
|
|
958
|
+
*
|
|
959
|
+
* Stores new version of entity mapping config
|
|
960
|
+
*/
|
|
961
|
+
'put'(
|
|
962
|
+
parameters?: Parameters<Paths.PutMappingConfig.PathParameters> | null,
|
|
963
|
+
data?: Paths.PutMappingConfig.RequestBody,
|
|
964
|
+
config?: AxiosRequestConfig
|
|
965
|
+
): OperationResponse<Paths.PutMappingConfig.Responses.$200>
|
|
966
|
+
}
|
|
891
967
|
}
|
|
892
968
|
|
|
893
969
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
package/dist/openapi.json
CHANGED
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"description": "Mapping Config Id",
|
|
77
77
|
"schema": {
|
|
78
78
|
"type": "string",
|
|
79
|
-
"example": "
|
|
79
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
],
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"description": "Mapping Config Id",
|
|
109
109
|
"schema": {
|
|
110
110
|
"type": "string",
|
|
111
|
-
"example": "
|
|
111
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
],
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"description": "Mapping Config Id",
|
|
143
143
|
"schema": {
|
|
144
144
|
"type": "string",
|
|
145
|
-
"example": "
|
|
145
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
],
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"description": "Mapping Config Id",
|
|
175
175
|
"schema": {
|
|
176
176
|
"type": "string",
|
|
177
|
-
"example": "
|
|
177
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
],
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"description": "Mapping Config Id",
|
|
219
219
|
"schema": {
|
|
220
220
|
"type": "string",
|
|
221
|
-
"example": "
|
|
221
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
224
|
{
|
|
@@ -418,6 +418,82 @@
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
+
},
|
|
422
|
+
"/v2/mappings/{id}": {
|
|
423
|
+
"get": {
|
|
424
|
+
"operationId": "getMappingConfig",
|
|
425
|
+
"summary": "getMappingConfig",
|
|
426
|
+
"description": "Get latest version of a mapping config by id V2",
|
|
427
|
+
"tags": [
|
|
428
|
+
"mappings"
|
|
429
|
+
],
|
|
430
|
+
"parameters": [
|
|
431
|
+
{
|
|
432
|
+
"name": "id",
|
|
433
|
+
"in": "path",
|
|
434
|
+
"required": true,
|
|
435
|
+
"description": "Mapping Config Id",
|
|
436
|
+
"schema": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
],
|
|
442
|
+
"responses": {
|
|
443
|
+
"200": {
|
|
444
|
+
"description": "Entity Mapping Config",
|
|
445
|
+
"content": {
|
|
446
|
+
"application/json": {
|
|
447
|
+
"schema": {
|
|
448
|
+
"$ref": "#/components/schemas/MappingConfigV2"
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"put": {
|
|
456
|
+
"operationId": "putMappingConfig",
|
|
457
|
+
"summary": "putMappingConfig",
|
|
458
|
+
"description": "Stores new version of entity mapping config",
|
|
459
|
+
"tags": [
|
|
460
|
+
"mappings"
|
|
461
|
+
],
|
|
462
|
+
"parameters": [
|
|
463
|
+
{
|
|
464
|
+
"name": "id",
|
|
465
|
+
"in": "path",
|
|
466
|
+
"required": true,
|
|
467
|
+
"description": "Mapping Config Id",
|
|
468
|
+
"schema": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
],
|
|
474
|
+
"requestBody": {
|
|
475
|
+
"description": "Mapping Config to store",
|
|
476
|
+
"content": {
|
|
477
|
+
"application/json": {
|
|
478
|
+
"schema": {
|
|
479
|
+
"$ref": "#/components/schemas/MappingConfigV2"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"responses": {
|
|
485
|
+
"200": {
|
|
486
|
+
"description": "The updated entity mapping config",
|
|
487
|
+
"content": {
|
|
488
|
+
"application/json": {
|
|
489
|
+
"schema": {
|
|
490
|
+
"$ref": "#/components/schemas/MappingConfigV2"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
421
497
|
}
|
|
422
498
|
},
|
|
423
499
|
"components": {
|
|
@@ -455,17 +531,57 @@
|
|
|
455
531
|
}
|
|
456
532
|
},
|
|
457
533
|
"MappingConfig": {
|
|
534
|
+
"allOf": [
|
|
535
|
+
{
|
|
536
|
+
"$ref": "#/components/schemas/MappingConfigCommonFields"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"type": "object",
|
|
540
|
+
"properties": {
|
|
541
|
+
"org_id": {
|
|
542
|
+
"type": "string",
|
|
543
|
+
"example": "66"
|
|
544
|
+
},
|
|
545
|
+
"version": {
|
|
546
|
+
"type": "integer",
|
|
547
|
+
"example": 2
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
],
|
|
552
|
+
"required": [
|
|
553
|
+
"org_id",
|
|
554
|
+
"version"
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
"MappingConfigV2": {
|
|
558
|
+
"allOf": [
|
|
559
|
+
{
|
|
560
|
+
"$ref": "#/components/schemas/MappingConfigCommonFields"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"type": "object",
|
|
564
|
+
"properties": {
|
|
565
|
+
"org_id": {
|
|
566
|
+
"type": "string",
|
|
567
|
+
"example": "66",
|
|
568
|
+
"readOnly": true
|
|
569
|
+
},
|
|
570
|
+
"version": {
|
|
571
|
+
"type": "integer",
|
|
572
|
+
"example": 2,
|
|
573
|
+
"readOnly": true
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
]
|
|
578
|
+
},
|
|
579
|
+
"MappingConfigCommonFields": {
|
|
458
580
|
"type": "object",
|
|
459
581
|
"properties": {
|
|
460
582
|
"id": {
|
|
461
583
|
"type": "string"
|
|
462
584
|
},
|
|
463
|
-
"org_id": {
|
|
464
|
-
"type": "string"
|
|
465
|
-
},
|
|
466
|
-
"version": {
|
|
467
|
-
"type": "number"
|
|
468
|
-
},
|
|
469
585
|
"source": {
|
|
470
586
|
"$ref": "#/components/schemas/SourceConfig"
|
|
471
587
|
},
|
|
@@ -502,8 +618,6 @@
|
|
|
502
618
|
},
|
|
503
619
|
"required": [
|
|
504
620
|
"id",
|
|
505
|
-
"org_id",
|
|
506
|
-
"version",
|
|
507
621
|
"source",
|
|
508
622
|
"targets"
|
|
509
623
|
]
|
|
@@ -839,6 +953,21 @@
|
|
|
839
953
|
"type": "string"
|
|
840
954
|
}
|
|
841
955
|
},
|
|
956
|
+
"loop_config": {
|
|
957
|
+
"type": "object",
|
|
958
|
+
"description": "contains config in case of running in loop mode",
|
|
959
|
+
"properties": {
|
|
960
|
+
"source_path": {
|
|
961
|
+
"type": "string",
|
|
962
|
+
"description": "path to the array from the entity payload"
|
|
963
|
+
},
|
|
964
|
+
"length": {
|
|
965
|
+
"type": "number",
|
|
966
|
+
"description": "a hard limit of how many times the loop is allowed to run.",
|
|
967
|
+
"default": "the length of the array"
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
},
|
|
842
971
|
"conditionMode": {
|
|
843
972
|
"description": "Mode of how conditions are considered valid",
|
|
844
973
|
"type": "string",
|
|
@@ -1286,7 +1415,7 @@
|
|
|
1286
1415
|
"properties": {
|
|
1287
1416
|
"id": {
|
|
1288
1417
|
"type": "string",
|
|
1289
|
-
"example": "
|
|
1418
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
1290
1419
|
},
|
|
1291
1420
|
"timestamp": {
|
|
1292
1421
|
"type": "string",
|
|
@@ -1316,109 +1445,6 @@
|
|
|
1316
1445
|
"mapped_entities_snapshot"
|
|
1317
1446
|
]
|
|
1318
1447
|
},
|
|
1319
|
-
"MappingSource": {
|
|
1320
|
-
"type": "object",
|
|
1321
|
-
"properties": {
|
|
1322
|
-
"key": {
|
|
1323
|
-
"type": "string",
|
|
1324
|
-
"description": "Key aiming to identify source"
|
|
1325
|
-
},
|
|
1326
|
-
"sub_properties": {
|
|
1327
|
-
"description": "Each item describes a property under the main source and a possibly, a default value for its target attribute",
|
|
1328
|
-
"type": "array",
|
|
1329
|
-
"items": {
|
|
1330
|
-
"$ref": "#/components/schemas/MappingSourceProperty"
|
|
1331
|
-
}
|
|
1332
|
-
},
|
|
1333
|
-
"source_type": {
|
|
1334
|
-
"type": "string",
|
|
1335
|
-
"description": "Data Structure type of source"
|
|
1336
|
-
},
|
|
1337
|
-
"possible_target_types": {
|
|
1338
|
-
"type": "array",
|
|
1339
|
-
"items": {
|
|
1340
|
-
"$ref": "#/components/schemas/MappingSourceTargetType"
|
|
1341
|
-
},
|
|
1342
|
-
"description": "Data Structure Type of the underlaying output value"
|
|
1343
|
-
},
|
|
1344
|
-
"initial_relation": {
|
|
1345
|
-
"description": "Initial value of a relation to be added",
|
|
1346
|
-
"$ref": "#/components/schemas/RelationAttribute"
|
|
1347
|
-
},
|
|
1348
|
-
"title": {
|
|
1349
|
-
"type": "string",
|
|
1350
|
-
"description": "Human readable name of the Source"
|
|
1351
|
-
},
|
|
1352
|
-
"sub_title": {
|
|
1353
|
-
"type": "string",
|
|
1354
|
-
"description": "Human readable type of the source"
|
|
1355
|
-
},
|
|
1356
|
-
"target_settings": {
|
|
1357
|
-
"type": "object",
|
|
1358
|
-
"properties": {
|
|
1359
|
-
"allowed_ui_actions": {
|
|
1360
|
-
"type": "array",
|
|
1361
|
-
"items": {
|
|
1362
|
-
"type": "string",
|
|
1363
|
-
"enum": [
|
|
1364
|
-
"schema-select",
|
|
1365
|
-
"attribute-select",
|
|
1366
|
-
"target-delete",
|
|
1367
|
-
"target-add",
|
|
1368
|
-
"target"
|
|
1369
|
-
]
|
|
1370
|
-
},
|
|
1371
|
-
"description": "Describes which actions the user can perform on each target, if specified. If not specified, all actions are allowed"
|
|
1372
|
-
},
|
|
1373
|
-
"locked": {
|
|
1374
|
-
"type": "string",
|
|
1375
|
-
"enum": [
|
|
1376
|
-
"each",
|
|
1377
|
-
"first",
|
|
1378
|
-
"system_recommendation"
|
|
1379
|
-
],
|
|
1380
|
-
"description": "Whether its a read-only ui or not. Can be each target, or only the first. Overwrites uiActions"
|
|
1381
|
-
},
|
|
1382
|
-
"isSingleTarget": {
|
|
1383
|
-
"type": "boolean",
|
|
1384
|
-
"description": "Whether all source mappings flow into a single attribute (e.g. address)"
|
|
1385
|
-
},
|
|
1386
|
-
"visibility": {
|
|
1387
|
-
"description": "Determines whether a mapping target should be shown or not. Use if there are targets which cannot be manipulated by the UI. E.g journey_data",
|
|
1388
|
-
"type": "object",
|
|
1389
|
-
"properties": {
|
|
1390
|
-
"mode": {
|
|
1391
|
-
"type": "string",
|
|
1392
|
-
"enum": [
|
|
1393
|
-
"hide",
|
|
1394
|
-
"show",
|
|
1395
|
-
"message"
|
|
1396
|
-
]
|
|
1397
|
-
},
|
|
1398
|
-
"if": {
|
|
1399
|
-
"type": "object",
|
|
1400
|
-
"additionalProperties": {
|
|
1401
|
-
"type": "string"
|
|
1402
|
-
}
|
|
1403
|
-
},
|
|
1404
|
-
"message": {
|
|
1405
|
-
"type": "string"
|
|
1406
|
-
}
|
|
1407
|
-
},
|
|
1408
|
-
"required": [
|
|
1409
|
-
"mode",
|
|
1410
|
-
"if"
|
|
1411
|
-
]
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
},
|
|
1416
|
-
"required": [
|
|
1417
|
-
"key",
|
|
1418
|
-
"title",
|
|
1419
|
-
"source_type"
|
|
1420
|
-
]
|
|
1421
|
-
},
|
|
1422
1448
|
"MappingSourceProperty": {
|
|
1423
1449
|
"type": "object",
|
|
1424
1450
|
"properties": {
|
|
@@ -1466,10 +1492,5 @@
|
|
|
1466
1492
|
]
|
|
1467
1493
|
}
|
|
1468
1494
|
}
|
|
1469
|
-
}
|
|
1470
|
-
"servers": [
|
|
1471
|
-
{
|
|
1472
|
-
"url": "https://entity-mapping.sls.epilot.io/"
|
|
1473
|
-
}
|
|
1474
|
-
]
|
|
1495
|
+
}
|
|
1475
1496
|
}
|