@epilot/sdk 2.20.25 → 2.20.26
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/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +1025 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +2863 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +5994 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +5979 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +2394 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +7817 -0
- package/definitions/calendar-runtime.json +1 -0
- package/definitions/calendar.json +2904 -0
- package/definitions/chat-runtime.json +1 -0
- package/definitions/chat.json +2909 -0
- package/definitions/configuration-hub-runtime.json +1 -0
- package/definitions/configuration-hub.json +2250 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +21181 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +1355 -0
- package/definitions/data-governance-runtime.json +1 -0
- package/definitions/data-governance.json +1126 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +782 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1827 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +758 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +3736 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1441 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1852 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +11546 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +988 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +2014 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +4298 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/integration-toolkit-runtime.json +1 -0
- package/definitions/integration-toolkit.json +13106 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +3663 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +1506 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +3667 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +3132 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1698 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1439 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +1192 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +2284 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1598 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +14369 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/query-runtime.json +1 -0
- package/definitions/query.json +3178 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/sharing-runtime.json +1 -0
- package/definitions/sharing.json +956 -0
- package/definitions/snapshot-runtime.json +1 -0
- package/definitions/snapshot.json +1103 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +2285 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1416 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +3051 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +2642 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1875 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3592 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4669 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/chat.cjs +6 -6
- package/dist/apis/chat.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.d.cts +2 -2
- package/dist/apis/journey.d.ts +2 -2
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-PZ4TXAF5.cjs → chunk-6CWZ6WAC.cjs} +1 -1
- package/dist/{chunk-X742W7MI.js → chunk-ELW5R5D6.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/journey-IVIBYU5V.js +7 -0
- package/dist/journey-ZN46FFPM.cjs +7 -0
- package/dist/{journey.d-DvwLALwc.d.cts → journey.d-Dj93v-Lw.d.cts} +54 -5
- package/dist/{journey.d-DvwLALwc.d.ts → journey.d-Dj93v-Lw.d.ts} +54 -5
- package/docs/journey.md +47 -2
- package/package.json +1 -1
- package/dist/journey-LIJDXSEC.js +0 -7
- package/dist/journey-LNA7JFP3.cjs +0 -7
|
@@ -0,0 +1,1852 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Entity Mapping API",
|
|
5
|
+
"description": "API Backend for mapping source entity into target entities",
|
|
6
|
+
"version": "1.0.0"
|
|
7
|
+
},
|
|
8
|
+
"tags": [
|
|
9
|
+
{
|
|
10
|
+
"name": "mappings",
|
|
11
|
+
"description": "Entity Mapping Configs"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"security": [
|
|
15
|
+
{
|
|
16
|
+
"EpilotAuth": []
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/v1/mappings": {
|
|
21
|
+
"post": {
|
|
22
|
+
"operationId": "storeConfig",
|
|
23
|
+
"summary": "storeConfig",
|
|
24
|
+
"description": "Store new MappingConfig",
|
|
25
|
+
"tags": [
|
|
26
|
+
"mappings"
|
|
27
|
+
],
|
|
28
|
+
"parameters": [
|
|
29
|
+
{
|
|
30
|
+
"name": "with_id",
|
|
31
|
+
"in": "query",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Whether ids are part of the body or not",
|
|
34
|
+
"schema": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"requestBody": {
|
|
40
|
+
"description": "Mapping Config to store",
|
|
41
|
+
"content": {
|
|
42
|
+
"application/json": {
|
|
43
|
+
"schema": {
|
|
44
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"responses": {
|
|
50
|
+
"201": {
|
|
51
|
+
"description": "The updated entity mapping config",
|
|
52
|
+
"content": {
|
|
53
|
+
"application/json": {
|
|
54
|
+
"schema": {
|
|
55
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"/v1/mappings/{id}": {
|
|
64
|
+
"get": {
|
|
65
|
+
"operationId": "getConfig",
|
|
66
|
+
"summary": "getConfig",
|
|
67
|
+
"description": "Get latest version of a mapping config by id",
|
|
68
|
+
"tags": [
|
|
69
|
+
"mappings"
|
|
70
|
+
],
|
|
71
|
+
"parameters": [
|
|
72
|
+
{
|
|
73
|
+
"name": "id",
|
|
74
|
+
"in": "path",
|
|
75
|
+
"required": true,
|
|
76
|
+
"description": "Mapping Config Id",
|
|
77
|
+
"schema": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"responses": {
|
|
84
|
+
"200": {
|
|
85
|
+
"description": "Entity Mapping Config",
|
|
86
|
+
"content": {
|
|
87
|
+
"application/json": {
|
|
88
|
+
"schema": {
|
|
89
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"delete": {
|
|
97
|
+
"operationId": "deleteConfig",
|
|
98
|
+
"summary": "deleteConfig",
|
|
99
|
+
"description": "Delete entity mapping config",
|
|
100
|
+
"tags": [
|
|
101
|
+
"mappings"
|
|
102
|
+
],
|
|
103
|
+
"parameters": [
|
|
104
|
+
{
|
|
105
|
+
"name": "id",
|
|
106
|
+
"in": "path",
|
|
107
|
+
"required": true,
|
|
108
|
+
"description": "Mapping Config Id",
|
|
109
|
+
"schema": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"responses": {
|
|
116
|
+
"200": {
|
|
117
|
+
"description": "The deleted mapping config",
|
|
118
|
+
"content": {
|
|
119
|
+
"application/json": {
|
|
120
|
+
"schema": {
|
|
121
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"/v1/mappings/{id}/versions": {
|
|
130
|
+
"get": {
|
|
131
|
+
"operationId": "getAllVersions",
|
|
132
|
+
"summary": "getAllVersions",
|
|
133
|
+
"description": "Get all version of MappingConfig",
|
|
134
|
+
"tags": [
|
|
135
|
+
"mappings"
|
|
136
|
+
],
|
|
137
|
+
"parameters": [
|
|
138
|
+
{
|
|
139
|
+
"name": "id",
|
|
140
|
+
"in": "path",
|
|
141
|
+
"required": true,
|
|
142
|
+
"description": "Mapping Config Id",
|
|
143
|
+
"schema": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"responses": {
|
|
150
|
+
"200": {
|
|
151
|
+
"description": "All versions of a MappingConfig",
|
|
152
|
+
"content": {
|
|
153
|
+
"application/json": {
|
|
154
|
+
"schema": {
|
|
155
|
+
"$ref": "#/components/schemas/MappingConfigsResp"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"post": {
|
|
163
|
+
"operationId": "storeNewVersion",
|
|
164
|
+
"summary": "storeNewVersion",
|
|
165
|
+
"description": "Store new version of MappingConfig",
|
|
166
|
+
"tags": [
|
|
167
|
+
"mappings"
|
|
168
|
+
],
|
|
169
|
+
"parameters": [
|
|
170
|
+
{
|
|
171
|
+
"name": "id",
|
|
172
|
+
"in": "path",
|
|
173
|
+
"required": true,
|
|
174
|
+
"description": "Mapping Config Id",
|
|
175
|
+
"schema": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"requestBody": {
|
|
182
|
+
"description": "Mapping Config to store",
|
|
183
|
+
"content": {
|
|
184
|
+
"application/json": {
|
|
185
|
+
"schema": {
|
|
186
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"responses": {
|
|
192
|
+
"200": {
|
|
193
|
+
"description": "The updated entity mapping config",
|
|
194
|
+
"content": {
|
|
195
|
+
"application/json": {
|
|
196
|
+
"schema": {
|
|
197
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"/v1/mappings/{id}/versions/{version}": {
|
|
206
|
+
"get": {
|
|
207
|
+
"operationId": "getConfigVersion",
|
|
208
|
+
"summary": "getConfigVersion",
|
|
209
|
+
"description": "Get specific version of a mapping config by id & version",
|
|
210
|
+
"tags": [
|
|
211
|
+
"mappings"
|
|
212
|
+
],
|
|
213
|
+
"parameters": [
|
|
214
|
+
{
|
|
215
|
+
"name": "id",
|
|
216
|
+
"in": "path",
|
|
217
|
+
"required": true,
|
|
218
|
+
"description": "Mapping Config Id",
|
|
219
|
+
"schema": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "version",
|
|
226
|
+
"in": "path",
|
|
227
|
+
"required": true,
|
|
228
|
+
"description": "Version to be loaded",
|
|
229
|
+
"schema": {
|
|
230
|
+
"type": "number",
|
|
231
|
+
"example": 3
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"responses": {
|
|
236
|
+
"200": {
|
|
237
|
+
"description": "Entity Mapping Config",
|
|
238
|
+
"content": {
|
|
239
|
+
"application/json": {
|
|
240
|
+
"schema": {
|
|
241
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"/v1/mappings:execute": {
|
|
250
|
+
"post": {
|
|
251
|
+
"operationId": "executeMapping",
|
|
252
|
+
"summary": "executeMapping",
|
|
253
|
+
"description": "Execute entity mapping based on a config",
|
|
254
|
+
"parameters": [
|
|
255
|
+
{
|
|
256
|
+
"name": "preview_mode",
|
|
257
|
+
"in": "query",
|
|
258
|
+
"required": false,
|
|
259
|
+
"description": "True, if you want to preview the entities which will result",
|
|
260
|
+
"schema": {
|
|
261
|
+
"type": "boolean",
|
|
262
|
+
"example": true
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"requestBody": {
|
|
267
|
+
"content": {
|
|
268
|
+
"application/json": {
|
|
269
|
+
"schema": {
|
|
270
|
+
"$ref": "#/components/schemas/ExecuteMappingReq"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"tags": [
|
|
276
|
+
"mappings"
|
|
277
|
+
],
|
|
278
|
+
"responses": {
|
|
279
|
+
"200": {
|
|
280
|
+
"description": "The target entities which were mapped",
|
|
281
|
+
"content": {
|
|
282
|
+
"application/json": {
|
|
283
|
+
"schema": {
|
|
284
|
+
"$ref": "#/components/schemas/ExecuteMappingResp"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"/v1/mappings:search": {
|
|
293
|
+
"post": {
|
|
294
|
+
"operationId": "searchConfigs",
|
|
295
|
+
"summary": "searchConfigs",
|
|
296
|
+
"description": "Search mapping configs",
|
|
297
|
+
"tags": [
|
|
298
|
+
"mappings"
|
|
299
|
+
],
|
|
300
|
+
"requestBody": {
|
|
301
|
+
"description": "Search Mapping Configs",
|
|
302
|
+
"content": {
|
|
303
|
+
"application/json": {
|
|
304
|
+
"schema": {
|
|
305
|
+
"$ref": "#/components/schemas/SearchMappingReq"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"responses": {
|
|
311
|
+
"200": {
|
|
312
|
+
"description": "Entity Mapping Config",
|
|
313
|
+
"content": {
|
|
314
|
+
"application/json": {
|
|
315
|
+
"schema": {
|
|
316
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"/v1/mappings/history": {
|
|
325
|
+
"get": {
|
|
326
|
+
"operationId": "queryMappingHistory",
|
|
327
|
+
"summary": "queryMappingHistory",
|
|
328
|
+
"description": "Get the Mapping History",
|
|
329
|
+
"tags": [
|
|
330
|
+
"mappings"
|
|
331
|
+
],
|
|
332
|
+
"parameters": [
|
|
333
|
+
{
|
|
334
|
+
"in": "query",
|
|
335
|
+
"name": "from",
|
|
336
|
+
"schema": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"format": "datetime"
|
|
339
|
+
},
|
|
340
|
+
"required": false,
|
|
341
|
+
"description": "filter the history from this date on"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"in": "query",
|
|
345
|
+
"name": "to",
|
|
346
|
+
"schema": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"format": "datetime"
|
|
349
|
+
},
|
|
350
|
+
"required": false,
|
|
351
|
+
"description": "filter the history to this date on"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"in": "query",
|
|
355
|
+
"name": "targetEntityId",
|
|
356
|
+
"schema": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"format": "uuid"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"in": "query",
|
|
363
|
+
"name": "sourceEntityId",
|
|
364
|
+
"schema": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"format": "uuid"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
],
|
|
370
|
+
"responses": {
|
|
371
|
+
"200": {
|
|
372
|
+
"description": "Query result of mapping history",
|
|
373
|
+
"content": {
|
|
374
|
+
"application/json": {
|
|
375
|
+
"schema": {
|
|
376
|
+
"properties": {
|
|
377
|
+
"results": {
|
|
378
|
+
"type": "array",
|
|
379
|
+
"items": {
|
|
380
|
+
"$ref": "#/components/schemas/MappingHistoryResp"
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"/v1/relations:execute": {
|
|
392
|
+
"post": {
|
|
393
|
+
"operationId": "executeRelations",
|
|
394
|
+
"summary": "executeRelations",
|
|
395
|
+
"description": "Execute relation mapping between source entity and target entities",
|
|
396
|
+
"requestBody": {
|
|
397
|
+
"content": {
|
|
398
|
+
"application/json": {
|
|
399
|
+
"schema": {
|
|
400
|
+
"$ref": "#/components/schemas/ExecuteRelationsReq"
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"tags": [
|
|
406
|
+
"mappings"
|
|
407
|
+
],
|
|
408
|
+
"responses": {
|
|
409
|
+
"200": {
|
|
410
|
+
"description": "The relations which were for both source entity and main entity",
|
|
411
|
+
"content": {
|
|
412
|
+
"application/json": {
|
|
413
|
+
"schema": {
|
|
414
|
+
"$ref": "#/components/schemas/ExecuteRelationsResp"
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
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
|
+
}
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
"components": {
|
|
500
|
+
"securitySchemes": {
|
|
501
|
+
"EpilotAuth": {
|
|
502
|
+
"type": "http",
|
|
503
|
+
"scheme": "bearer",
|
|
504
|
+
"description": "Epilot Bearer Token"
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
"schemas": {
|
|
508
|
+
"SearchMappingReq": {
|
|
509
|
+
"type": "object",
|
|
510
|
+
"properties": {
|
|
511
|
+
"source": {
|
|
512
|
+
"$ref": "#/components/schemas/SourceConfig"
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"MappingConfigsResp": {
|
|
517
|
+
"type": "object",
|
|
518
|
+
"properties": {
|
|
519
|
+
"configs": {
|
|
520
|
+
"$ref": "#/components/schemas/MappingConfigs"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"required": [
|
|
524
|
+
"configs"
|
|
525
|
+
]
|
|
526
|
+
},
|
|
527
|
+
"MappingConfigs": {
|
|
528
|
+
"type": "array",
|
|
529
|
+
"items": {
|
|
530
|
+
"$ref": "#/components/schemas/MappingConfig"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
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": {
|
|
580
|
+
"type": "object",
|
|
581
|
+
"properties": {
|
|
582
|
+
"id": {
|
|
583
|
+
"type": "string"
|
|
584
|
+
},
|
|
585
|
+
"source": {
|
|
586
|
+
"$ref": "#/components/schemas/SourceConfig"
|
|
587
|
+
},
|
|
588
|
+
"targets": {
|
|
589
|
+
"type": "array",
|
|
590
|
+
"items": {
|
|
591
|
+
"$ref": "#/components/schemas/TargetConfig"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"created_at": {
|
|
595
|
+
"type": "string",
|
|
596
|
+
"format": "date-time"
|
|
597
|
+
},
|
|
598
|
+
"updated_at": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"format": "date-time"
|
|
601
|
+
},
|
|
602
|
+
"created_by": {
|
|
603
|
+
"$ref": "#/components/schemas/Owner",
|
|
604
|
+
"description": "User / service who created the entity mapping config",
|
|
605
|
+
"example": {
|
|
606
|
+
"type": "internal_service"
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"last_updated_by": {
|
|
610
|
+
"$ref": "#/components/schemas/Owner",
|
|
611
|
+
"description": "User / service who last updated entity mapping config",
|
|
612
|
+
"example": {
|
|
613
|
+
"type": "user",
|
|
614
|
+
"org_id": 255151,
|
|
615
|
+
"user_id": 99252
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
"required": [
|
|
620
|
+
"id",
|
|
621
|
+
"source",
|
|
622
|
+
"targets"
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
"Owner": {
|
|
626
|
+
"type": "object",
|
|
627
|
+
"properties": {
|
|
628
|
+
"type": {
|
|
629
|
+
"type": "string",
|
|
630
|
+
"enum": [
|
|
631
|
+
"user",
|
|
632
|
+
"internal_service"
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
"org_id": {
|
|
636
|
+
"type": "string"
|
|
637
|
+
},
|
|
638
|
+
"user_id": {
|
|
639
|
+
"type": "string"
|
|
640
|
+
}
|
|
641
|
+
},
|
|
642
|
+
"required": [
|
|
643
|
+
"type"
|
|
644
|
+
]
|
|
645
|
+
},
|
|
646
|
+
"ExecuteRelationsReq": {
|
|
647
|
+
"type": "object",
|
|
648
|
+
"description": "Build relations between a source entity and one or more target entities, dynamically identified",
|
|
649
|
+
"properties": {
|
|
650
|
+
"source_ref": {
|
|
651
|
+
"$ref": "#/components/schemas/EntityRef",
|
|
652
|
+
"description": "Entity for which to add relations."
|
|
653
|
+
},
|
|
654
|
+
"target": {
|
|
655
|
+
"type": "object",
|
|
656
|
+
"properties": {
|
|
657
|
+
"main_entity_ref": {
|
|
658
|
+
"$ref": "#/components/schemas/EntityRef",
|
|
659
|
+
"description": "Main Entity from where to locate target entities. Eg. submisssion entity"
|
|
660
|
+
},
|
|
661
|
+
"relation_attributes": {
|
|
662
|
+
"type": "array",
|
|
663
|
+
"description": "Relation mappings",
|
|
664
|
+
"items": {
|
|
665
|
+
"$ref": "#/components/schemas/RelationAttribute"
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
"linkback": {
|
|
669
|
+
"type": "object",
|
|
670
|
+
"description": "For cases where you want to store a relation between main entity (eg. submission) and current source entity.",
|
|
671
|
+
"properties": {
|
|
672
|
+
"attribute": {
|
|
673
|
+
"type": "string",
|
|
674
|
+
"default": "mapped_entities",
|
|
675
|
+
"description": "Relation attribute on the main entity (submission) where the target entity will be linked. Set to false to disable linkback\n"
|
|
676
|
+
},
|
|
677
|
+
"relation_tags": {
|
|
678
|
+
"type": "array",
|
|
679
|
+
"description": "Relation tags (labels) to include in main entity linkback relation attribute",
|
|
680
|
+
"items": {
|
|
681
|
+
"type": "string"
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"required": [
|
|
686
|
+
"attribute",
|
|
687
|
+
"relation_tags"
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"required": [
|
|
692
|
+
"main_entity_ref",
|
|
693
|
+
"relation_attributes"
|
|
694
|
+
]
|
|
695
|
+
},
|
|
696
|
+
"additional_relations": {
|
|
697
|
+
"type": "array",
|
|
698
|
+
"items": {
|
|
699
|
+
"$ref": "#/components/schemas/RelationItem"
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
"required": [
|
|
704
|
+
"source_ref"
|
|
705
|
+
]
|
|
706
|
+
},
|
|
707
|
+
"ExecuteRelationsResp": {
|
|
708
|
+
"type": "object",
|
|
709
|
+
"properties": {
|
|
710
|
+
"relations": {
|
|
711
|
+
"type": "array",
|
|
712
|
+
"items": {
|
|
713
|
+
"$ref": "#/components/schemas/NewRelationItem"
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"NewRelationItem": {
|
|
719
|
+
"type": "object",
|
|
720
|
+
"properties": {
|
|
721
|
+
"source_entity_id": {
|
|
722
|
+
"type": "string"
|
|
723
|
+
},
|
|
724
|
+
"target_entity_id": {
|
|
725
|
+
"type": "string"
|
|
726
|
+
},
|
|
727
|
+
"relation_attr": {
|
|
728
|
+
"type": "string"
|
|
729
|
+
},
|
|
730
|
+
"tags": {
|
|
731
|
+
"type": "array",
|
|
732
|
+
"items": {
|
|
733
|
+
"type": "string"
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
"required": [
|
|
738
|
+
"source_entity_id",
|
|
739
|
+
"target_entity_id",
|
|
740
|
+
"relation_attr"
|
|
741
|
+
]
|
|
742
|
+
},
|
|
743
|
+
"RelationItem": {
|
|
744
|
+
"type": "object",
|
|
745
|
+
"properties": {
|
|
746
|
+
"entity_id": {
|
|
747
|
+
"type": "string"
|
|
748
|
+
},
|
|
749
|
+
"attribute": {
|
|
750
|
+
"type": "string"
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
"required": [
|
|
754
|
+
"entity_id",
|
|
755
|
+
"attribute"
|
|
756
|
+
]
|
|
757
|
+
},
|
|
758
|
+
"ExecuteMappingReq": {
|
|
759
|
+
"type": "object",
|
|
760
|
+
"description": "Pass either source or source_entity",
|
|
761
|
+
"properties": {
|
|
762
|
+
"source_ref": {
|
|
763
|
+
"$ref": "#/components/schemas/EntityRef",
|
|
764
|
+
"description": "A reference (id and schema) to the entity to be used as source."
|
|
765
|
+
},
|
|
766
|
+
"loop_ref": {
|
|
767
|
+
"$ref": "#/components/schemas/EntityRef",
|
|
768
|
+
"description": "Reference to the current iteration's entity when running inside a flow loop.\nWhen set, its fields and relations are merged into the source context;\non schema conflicts the loop entity wins, so paths like `<schema>._id` resolve\nto the iteration entity rather than to a same-schema relation of the source.\n"
|
|
769
|
+
},
|
|
770
|
+
"targets": {
|
|
771
|
+
"type": "array",
|
|
772
|
+
"items": {
|
|
773
|
+
"$ref": "#/components/schemas/TargetConfig"
|
|
774
|
+
},
|
|
775
|
+
"description": "Mapping Configuration to apply."
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
"required": [
|
|
779
|
+
"source_ref",
|
|
780
|
+
"targets"
|
|
781
|
+
]
|
|
782
|
+
},
|
|
783
|
+
"ExecuteMappingResp": {
|
|
784
|
+
"type": "object",
|
|
785
|
+
"properties": {
|
|
786
|
+
"mapped_entities": {
|
|
787
|
+
"type": "array",
|
|
788
|
+
"items": {
|
|
789
|
+
"$ref": "#/components/schemas/Entity"
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
"failures": {
|
|
793
|
+
"type": "array",
|
|
794
|
+
"items": {
|
|
795
|
+
"$ref": "#/components/schemas/MappingFailure"
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
"warnings": {
|
|
799
|
+
"type": "array",
|
|
800
|
+
"items": {
|
|
801
|
+
"$ref": "#/components/schemas/MappingWarning"
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
"required": [
|
|
806
|
+
"mapped_entities"
|
|
807
|
+
]
|
|
808
|
+
},
|
|
809
|
+
"MappingFailure": {
|
|
810
|
+
"type": "object",
|
|
811
|
+
"properties": {
|
|
812
|
+
"target": {
|
|
813
|
+
"$ref": "#/components/schemas/TargetConfig"
|
|
814
|
+
},
|
|
815
|
+
"error": {
|
|
816
|
+
"type": "object",
|
|
817
|
+
"properties": {
|
|
818
|
+
"isSilent": {
|
|
819
|
+
"type": "boolean"
|
|
820
|
+
},
|
|
821
|
+
"message": {
|
|
822
|
+
"type": "string"
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
"additionalProperties": true
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
"MappingWarning": {
|
|
830
|
+
"type": "object",
|
|
831
|
+
"properties": {
|
|
832
|
+
"explanation": {
|
|
833
|
+
"type": "string"
|
|
834
|
+
},
|
|
835
|
+
"context": {
|
|
836
|
+
"type": "string"
|
|
837
|
+
},
|
|
838
|
+
"id": {
|
|
839
|
+
"type": "string"
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
"required": [
|
|
843
|
+
"explanation"
|
|
844
|
+
]
|
|
845
|
+
},
|
|
846
|
+
"Entity": {
|
|
847
|
+
"type": "object",
|
|
848
|
+
"properties": {
|
|
849
|
+
"_id": {
|
|
850
|
+
"type": "string"
|
|
851
|
+
},
|
|
852
|
+
"_schema": {
|
|
853
|
+
"type": "string"
|
|
854
|
+
},
|
|
855
|
+
"_title": {
|
|
856
|
+
"type": "string",
|
|
857
|
+
"nullable": true
|
|
858
|
+
},
|
|
859
|
+
"_org": {
|
|
860
|
+
"type": "string"
|
|
861
|
+
},
|
|
862
|
+
"_tags": {
|
|
863
|
+
"type": "array",
|
|
864
|
+
"items": {
|
|
865
|
+
"type": "string"
|
|
866
|
+
},
|
|
867
|
+
"nullable": true
|
|
868
|
+
},
|
|
869
|
+
"_created_at": {
|
|
870
|
+
"type": "string",
|
|
871
|
+
"nullable": true
|
|
872
|
+
},
|
|
873
|
+
"_updated_at": {
|
|
874
|
+
"type": "string",
|
|
875
|
+
"nullable": true
|
|
876
|
+
},
|
|
877
|
+
"required": [
|
|
878
|
+
"_id",
|
|
879
|
+
"_schema",
|
|
880
|
+
"_org",
|
|
881
|
+
"_created_at",
|
|
882
|
+
"_updated_at"
|
|
883
|
+
]
|
|
884
|
+
},
|
|
885
|
+
"additionalProperties": true
|
|
886
|
+
},
|
|
887
|
+
"EntityRef": {
|
|
888
|
+
"type": "object",
|
|
889
|
+
"properties": {
|
|
890
|
+
"entity_id": {
|
|
891
|
+
"type": "string",
|
|
892
|
+
"description": "id of the source entity to be mapped"
|
|
893
|
+
},
|
|
894
|
+
"entity_schema": {
|
|
895
|
+
"description": "schema of the source entity",
|
|
896
|
+
"type": "string",
|
|
897
|
+
"example": "submission"
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
"required": [
|
|
901
|
+
"entity_id"
|
|
902
|
+
]
|
|
903
|
+
},
|
|
904
|
+
"SourceConfig": {
|
|
905
|
+
"type": "object",
|
|
906
|
+
"properties": {
|
|
907
|
+
"type": {
|
|
908
|
+
"type": "string",
|
|
909
|
+
"enum": [
|
|
910
|
+
"journey",
|
|
911
|
+
"entity"
|
|
912
|
+
]
|
|
913
|
+
},
|
|
914
|
+
"config": {
|
|
915
|
+
"anyOf": [
|
|
916
|
+
{
|
|
917
|
+
"$ref": "#/components/schemas/JourneyRef"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"$ref": "#/components/schemas/EntityRef"
|
|
921
|
+
}
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
"JourneyRef": {
|
|
927
|
+
"type": "object",
|
|
928
|
+
"properties": {
|
|
929
|
+
"journey_id": {
|
|
930
|
+
"type": "string"
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
"Loop_Index_String": {
|
|
935
|
+
"type": "string",
|
|
936
|
+
"description": "This string value will be replaced with the value of the loop index, when mapping in loop mode",
|
|
937
|
+
"enum": [
|
|
938
|
+
"##LOOP_INDEX##"
|
|
939
|
+
]
|
|
940
|
+
},
|
|
941
|
+
"TargetConfig": {
|
|
942
|
+
"type": "object",
|
|
943
|
+
"properties": {
|
|
944
|
+
"id": {
|
|
945
|
+
"type": "string",
|
|
946
|
+
"description": "Identifier for target configuration. Useful for later usages when trying to identify which target config to map to."
|
|
947
|
+
},
|
|
948
|
+
"name": {
|
|
949
|
+
"type": "string",
|
|
950
|
+
"description": "A name for this configuration"
|
|
951
|
+
},
|
|
952
|
+
"allow_failure": {
|
|
953
|
+
"type": "boolean",
|
|
954
|
+
"description": "Pass it as true, when you don't want failures to interrupt the mapping process."
|
|
955
|
+
},
|
|
956
|
+
"target_schema": {
|
|
957
|
+
"type": "string",
|
|
958
|
+
"description": "Schema of target entity"
|
|
959
|
+
},
|
|
960
|
+
"target_unique": {
|
|
961
|
+
"type": "array",
|
|
962
|
+
"description": "Unique key for target entity (see upsertEntity of Entity API)",
|
|
963
|
+
"items": {
|
|
964
|
+
"type": "string"
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
"use_uniqueness_criteria": {
|
|
968
|
+
"type": "boolean",
|
|
969
|
+
"default": false,
|
|
970
|
+
"description": "Execution wire flag set per automation by automation-workers: resolve the target entity via the organization's global uniqueness criteria (deduplication-api) instead of target_unique. Never persisted in stored mapping configs.\n"
|
|
971
|
+
},
|
|
972
|
+
"loop_config": {
|
|
973
|
+
"type": "object",
|
|
974
|
+
"description": "contains config in case of running in loop mode",
|
|
975
|
+
"properties": {
|
|
976
|
+
"source_path": {
|
|
977
|
+
"type": "string",
|
|
978
|
+
"description": "path to the array from the entity payload"
|
|
979
|
+
},
|
|
980
|
+
"source_type": {
|
|
981
|
+
"type": "string",
|
|
982
|
+
"description": "Kind of journey block the loop iterates. 'journey-multi-select' (default) is a cards block with multi selection. 'journey-file-upload' is a file upload block: source_path points at the submission's `_files.$relation` array and `filter_tags` narrows it down to the block's files. Forwarded to the flow-level loop by the Automation Hub.\n",
|
|
983
|
+
"enum": [
|
|
984
|
+
"journey-multi-select",
|
|
985
|
+
"journey-file-upload"
|
|
986
|
+
],
|
|
987
|
+
"default": "journey-multi-select"
|
|
988
|
+
},
|
|
989
|
+
"filter_tags": {
|
|
990
|
+
"type": "array",
|
|
991
|
+
"description": "Only iterate items of the array whose `_tags` contain every listed tag. Meant for relation arrays such as `submission._files.$relation`, where the journey tags each file relation with the upload block it came from. `##LOOP_INDEX##` keeps referring to the item's index in the unfiltered array.\n",
|
|
992
|
+
"items": {
|
|
993
|
+
"type": "string"
|
|
994
|
+
},
|
|
995
|
+
"example": [
|
|
996
|
+
"_hidden_ 2a4b1c3d-0000-4000-8000-000000000000 - Dokumente"
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
"length": {
|
|
1000
|
+
"type": "number",
|
|
1001
|
+
"description": "a hard limit of how many times the loop is allowed to run."
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
"conditionMode": {
|
|
1006
|
+
"description": "Mode of how conditions are considered valid",
|
|
1007
|
+
"type": "string",
|
|
1008
|
+
"enum": [
|
|
1009
|
+
"oneOf",
|
|
1010
|
+
"anyOf",
|
|
1011
|
+
"allOf"
|
|
1012
|
+
]
|
|
1013
|
+
},
|
|
1014
|
+
"conditions": {
|
|
1015
|
+
"type": "array",
|
|
1016
|
+
"description": "Conditions necessary to hold for the target entity to be mapped",
|
|
1017
|
+
"items": {
|
|
1018
|
+
"$ref": "#/components/schemas/MapCondition"
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
"mapping_attributes": {
|
|
1022
|
+
"type": "array",
|
|
1023
|
+
"description": "Attribute mappings",
|
|
1024
|
+
"items": {
|
|
1025
|
+
"anyOf": [
|
|
1026
|
+
{
|
|
1027
|
+
"$ref": "#/components/schemas/MappingAttributeV2"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
"$ref": "#/components/schemas/MappingAttribute"
|
|
1031
|
+
}
|
|
1032
|
+
]
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
"relation_attributes": {
|
|
1036
|
+
"type": "array",
|
|
1037
|
+
"description": "Relation mappings",
|
|
1038
|
+
"items": {
|
|
1039
|
+
"$ref": "#/components/schemas/RelationAttribute"
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
"linkback_relation_attribute": {
|
|
1043
|
+
"type": "string",
|
|
1044
|
+
"default": "mapped_entities",
|
|
1045
|
+
"description": "Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback\n"
|
|
1046
|
+
},
|
|
1047
|
+
"linkback_relation_tags": {
|
|
1048
|
+
"type": "array",
|
|
1049
|
+
"description": "Relation tags (labels) to include in main entity linkback relation attribute",
|
|
1050
|
+
"items": {
|
|
1051
|
+
"type": "string"
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
"graph_context": {
|
|
1055
|
+
"type": "array",
|
|
1056
|
+
"description": "Multi-hop entity graph lookups resolved before any mapping_attribute is evaluated. Each\nentry queries entity-api's `POST /v1/entity:graph` and merges every node's result into\nsourceContext under its own `graph.nodes[].id`, so mapping_attributes can `_copy`/`_template`\nfrom `<node id>.<field>`. A graph node's value overwrites any existing sourceContext key of\nthe same name (a source entity field, a 1-hop relation, or another graph node).\n",
|
|
1057
|
+
"items": {
|
|
1058
|
+
"$ref": "#/components/schemas/GraphContextEntry"
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
"required": [
|
|
1063
|
+
"target_schema",
|
|
1064
|
+
"mapping_attributes"
|
|
1065
|
+
]
|
|
1066
|
+
},
|
|
1067
|
+
"MapCondition": {
|
|
1068
|
+
"type": "object",
|
|
1069
|
+
"properties": {
|
|
1070
|
+
"_exists": {
|
|
1071
|
+
"$ref": "#/components/schemas/ConditionNode"
|
|
1072
|
+
},
|
|
1073
|
+
"_equals": {
|
|
1074
|
+
"$ref": "#/components/schemas/ConditionNode"
|
|
1075
|
+
},
|
|
1076
|
+
"_not_exists": {
|
|
1077
|
+
"$ref": "#/components/schemas/ConditionNode"
|
|
1078
|
+
},
|
|
1079
|
+
"_any_of": {
|
|
1080
|
+
"$ref": "#/components/schemas/ConditionNode"
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
},
|
|
1084
|
+
"ConditionNode": {
|
|
1085
|
+
"type": "object",
|
|
1086
|
+
"properties": {
|
|
1087
|
+
"source": {
|
|
1088
|
+
"type": "string"
|
|
1089
|
+
},
|
|
1090
|
+
"value": {
|
|
1091
|
+
"oneOf": [
|
|
1092
|
+
{
|
|
1093
|
+
"type": "string"
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
"type": "number"
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
"type": "object"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"type": "array",
|
|
1103
|
+
"items": {
|
|
1104
|
+
"type": "object"
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
]
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
"RelationAttribute": {
|
|
1112
|
+
"type": "object",
|
|
1113
|
+
"properties": {
|
|
1114
|
+
"target": {
|
|
1115
|
+
"type": "string",
|
|
1116
|
+
"description": "Target attribute to store the relation in"
|
|
1117
|
+
},
|
|
1118
|
+
"target_tags": {
|
|
1119
|
+
"type": "array",
|
|
1120
|
+
"description": "Relation tags (labels) to set for the stored relations",
|
|
1121
|
+
"items": {
|
|
1122
|
+
"type": "string"
|
|
1123
|
+
}
|
|
1124
|
+
},
|
|
1125
|
+
"target_tags_include_source": {
|
|
1126
|
+
"type": "boolean",
|
|
1127
|
+
"description": "Include all relation tags (labels) present on the main entity relation",
|
|
1128
|
+
"default": false
|
|
1129
|
+
},
|
|
1130
|
+
"target_entity_tags": {
|
|
1131
|
+
"type": "array",
|
|
1132
|
+
"description": "Tags to add to the matched target entity's _tags array during mapping. Useful for assigning file collections to file entities.",
|
|
1133
|
+
"items": {
|
|
1134
|
+
"type": "string"
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
"override_with_source_filter": {
|
|
1138
|
+
"type": "boolean",
|
|
1139
|
+
"description": "Whether to override the relation source_filter with the specified one",
|
|
1140
|
+
"default": false
|
|
1141
|
+
},
|
|
1142
|
+
"source_filter": {
|
|
1143
|
+
"type": "object",
|
|
1144
|
+
"description": "A filter to identify which source entities to pick as relations from main entity",
|
|
1145
|
+
"properties": {
|
|
1146
|
+
"limit": {
|
|
1147
|
+
"type": "integer",
|
|
1148
|
+
"description": "Limit relations to maximum number (default, all matched relations)",
|
|
1149
|
+
"minimum": 0
|
|
1150
|
+
},
|
|
1151
|
+
"schema": {
|
|
1152
|
+
"type": "string",
|
|
1153
|
+
"description": "Filter by specific schema"
|
|
1154
|
+
},
|
|
1155
|
+
"attribute": {
|
|
1156
|
+
"type": "string",
|
|
1157
|
+
"description": "Filter by a specific relation attribute on the main entity"
|
|
1158
|
+
},
|
|
1159
|
+
"relation_tag": {
|
|
1160
|
+
"type": "string",
|
|
1161
|
+
"description": "Filter by relation tag (label) on the main entity"
|
|
1162
|
+
},
|
|
1163
|
+
"tag": {
|
|
1164
|
+
"type": "string",
|
|
1165
|
+
"description": "Filter by a specific tag on the related entity"
|
|
1166
|
+
},
|
|
1167
|
+
"self": {
|
|
1168
|
+
"type": "boolean",
|
|
1169
|
+
"description": "Picks main entity as relation (overrides other filters)",
|
|
1170
|
+
"default": false
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
"related_to": {
|
|
1175
|
+
"type": "object",
|
|
1176
|
+
"additionalProperties": true,
|
|
1177
|
+
"deprecated": true
|
|
1178
|
+
},
|
|
1179
|
+
"mode": {
|
|
1180
|
+
"type": "string",
|
|
1181
|
+
"enum": [
|
|
1182
|
+
"append",
|
|
1183
|
+
"prepend",
|
|
1184
|
+
"set"
|
|
1185
|
+
]
|
|
1186
|
+
},
|
|
1187
|
+
"origin": {
|
|
1188
|
+
"$ref": "#/components/schemas/AttributeOrigin"
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
"required": [
|
|
1192
|
+
"target",
|
|
1193
|
+
"mode"
|
|
1194
|
+
]
|
|
1195
|
+
},
|
|
1196
|
+
"GraphContextEntry": {
|
|
1197
|
+
"type": "object",
|
|
1198
|
+
"description": "One multi-hop graph lookup against entity-api's `POST /v1/entity:graph`, resolved during\ngraph_context enrichment (before mapping_attributes are evaluated). Every node in `graph.nodes`\nis merged into sourceContext under its own `id`, so listing several nodes here costs one\nentity-api call, not one per node.\n\nIf a node's `cardinality` is \"one\" (or it is the seed node), exactly one entity must be found\nfor it: zero or multiple matches fail the mapping execution instead of silently mapping\nmissing/wrong data. If \"many\" (the default), it resolves to an array - possibly empty - with no\nsuch failure. Each node's cardinality is validated independently.\n\n`seed.entity_id` and any `graph.nodes[].filter[].value` may contain `{{handlebars}}` placeholders\n(e.g. `{{contract._id}}`, `{{contract.origin_order}}`), resolved against the in-progress\nsourceContext (the source entity, its 1-hop relations, and any custom variables already\nresolved) before the graph query is sent.\n",
|
|
1199
|
+
"properties": {
|
|
1200
|
+
"seed": {
|
|
1201
|
+
"$ref": "#/components/schemas/GraphSeed"
|
|
1202
|
+
},
|
|
1203
|
+
"graph": {
|
|
1204
|
+
"$ref": "#/components/schemas/GraphDefinition"
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
"required": [
|
|
1208
|
+
"seed",
|
|
1209
|
+
"graph"
|
|
1210
|
+
]
|
|
1211
|
+
},
|
|
1212
|
+
"GraphSeed": {
|
|
1213
|
+
"description": "Mirrors entity-api's GraphSeed (see entity-api openapi.yml) - the entity the graph traversal starts from.",
|
|
1214
|
+
"type": "object",
|
|
1215
|
+
"properties": {
|
|
1216
|
+
"entity_id": {
|
|
1217
|
+
"type": "string",
|
|
1218
|
+
"description": "The id of the seed entity. Supports `{{handlebars}}` placeholders resolved against sourceContext.",
|
|
1219
|
+
"example": "{{contract._id}}"
|
|
1220
|
+
},
|
|
1221
|
+
"node_id": {
|
|
1222
|
+
"type": "string",
|
|
1223
|
+
"description": "The node ID in `graph.nodes` that corresponds to the seed entity.",
|
|
1224
|
+
"example": "contact"
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1227
|
+
"required": [
|
|
1228
|
+
"entity_id",
|
|
1229
|
+
"node_id"
|
|
1230
|
+
]
|
|
1231
|
+
},
|
|
1232
|
+
"GraphDefinition": {
|
|
1233
|
+
"description": "Mirrors entity-api's GraphDefinition (see entity-api openapi.yml) - the shape of the graph to traverse.",
|
|
1234
|
+
"type": "object",
|
|
1235
|
+
"properties": {
|
|
1236
|
+
"nodes": {
|
|
1237
|
+
"type": "array",
|
|
1238
|
+
"items": {
|
|
1239
|
+
"$ref": "#/components/schemas/GraphNode"
|
|
1240
|
+
}
|
|
1241
|
+
},
|
|
1242
|
+
"edges": {
|
|
1243
|
+
"type": "array",
|
|
1244
|
+
"items": {
|
|
1245
|
+
"$ref": "#/components/schemas/GraphEdge"
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
},
|
|
1249
|
+
"required": [
|
|
1250
|
+
"nodes",
|
|
1251
|
+
"edges"
|
|
1252
|
+
]
|
|
1253
|
+
},
|
|
1254
|
+
"GraphNode": {
|
|
1255
|
+
"description": "Mirrors entity-api's GraphNode (see entity-api openapi.yml).",
|
|
1256
|
+
"type": "object",
|
|
1257
|
+
"properties": {
|
|
1258
|
+
"id": {
|
|
1259
|
+
"type": "string",
|
|
1260
|
+
"description": "Unique identifier for this node in the graph definition.",
|
|
1261
|
+
"example": "contact"
|
|
1262
|
+
},
|
|
1263
|
+
"schema": {
|
|
1264
|
+
"type": "string",
|
|
1265
|
+
"description": "Entity schema slug for this node.",
|
|
1266
|
+
"example": "contact"
|
|
1267
|
+
},
|
|
1268
|
+
"cardinality": {
|
|
1269
|
+
"type": "string",
|
|
1270
|
+
"enum": [
|
|
1271
|
+
"one",
|
|
1272
|
+
"many"
|
|
1273
|
+
],
|
|
1274
|
+
"description": "\"one\": this node resolves to a single entity. \"many\" (default if unset): this node\nresolves to an array of entities.\n"
|
|
1275
|
+
},
|
|
1276
|
+
"fields": {
|
|
1277
|
+
"type": "array",
|
|
1278
|
+
"description": "Optional entity fields to include in the hydrated response for this node.",
|
|
1279
|
+
"items": {
|
|
1280
|
+
"type": "string"
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
"filter": {
|
|
1284
|
+
"type": "array",
|
|
1285
|
+
"description": "Narrows this node's traversal results to entities matching every filter (AND semantics).\nUseful for disambiguating among multiple entities reachable via the same graph edge.\n",
|
|
1286
|
+
"items": {
|
|
1287
|
+
"$ref": "#/components/schemas/GraphNodeFilter"
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
"optional": {
|
|
1291
|
+
"type": "boolean",
|
|
1292
|
+
"description": "Only meaningful for a node expected to resolve to a single entity (the seed node, or\n\"cardinality: one\"). When true, finding zero matching entities is not an error - the\nmapping proceeds without this node's data instead of failing. Finding more than one\nmatch still fails regardless of this flag; ambiguity is never silently accepted.\n"
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
"required": [
|
|
1296
|
+
"id",
|
|
1297
|
+
"schema"
|
|
1298
|
+
]
|
|
1299
|
+
},
|
|
1300
|
+
"GraphNodeFilter": {
|
|
1301
|
+
"description": "Mirrors entity-api's GraphNodeFilter (see entity-api openapi.yml).",
|
|
1302
|
+
"type": "object",
|
|
1303
|
+
"properties": {
|
|
1304
|
+
"attribute": {
|
|
1305
|
+
"type": "string",
|
|
1306
|
+
"description": "Entity attribute name to match against.",
|
|
1307
|
+
"example": "order_number"
|
|
1308
|
+
},
|
|
1309
|
+
"value": {
|
|
1310
|
+
"description": "Literal value the attribute must exactly equal. Supports `{{handlebars}}` placeholders\nresolved against sourceContext when given as a string.\n",
|
|
1311
|
+
"oneOf": [
|
|
1312
|
+
{
|
|
1313
|
+
"type": "string",
|
|
1314
|
+
"nullable": true
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
"type": "number"
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"type": "boolean"
|
|
1321
|
+
}
|
|
1322
|
+
],
|
|
1323
|
+
"example": "{{contract.origin_order}}"
|
|
1324
|
+
}
|
|
1325
|
+
},
|
|
1326
|
+
"required": [
|
|
1327
|
+
"attribute",
|
|
1328
|
+
"value"
|
|
1329
|
+
]
|
|
1330
|
+
},
|
|
1331
|
+
"GraphEdge": {
|
|
1332
|
+
"description": "Mirrors entity-api's GraphEdge (see entity-api openapi.yml).",
|
|
1333
|
+
"type": "object",
|
|
1334
|
+
"properties": {
|
|
1335
|
+
"from": {
|
|
1336
|
+
"type": "string",
|
|
1337
|
+
"description": "Source node ID.",
|
|
1338
|
+
"example": "contact"
|
|
1339
|
+
},
|
|
1340
|
+
"to": {
|
|
1341
|
+
"type": "string",
|
|
1342
|
+
"description": "Target node ID.",
|
|
1343
|
+
"example": "order"
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
"required": [
|
|
1347
|
+
"from",
|
|
1348
|
+
"to"
|
|
1349
|
+
]
|
|
1350
|
+
},
|
|
1351
|
+
"MappingAttributeV2": {
|
|
1352
|
+
"type": "object",
|
|
1353
|
+
"properties": {
|
|
1354
|
+
"target": {
|
|
1355
|
+
"type": "string",
|
|
1356
|
+
"description": "Target JSON path for the attribute to set"
|
|
1357
|
+
},
|
|
1358
|
+
"operation": {
|
|
1359
|
+
"$ref": "#/components/schemas/OperationNode"
|
|
1360
|
+
},
|
|
1361
|
+
"origin": {
|
|
1362
|
+
"$ref": "#/components/schemas/AttributeOrigin"
|
|
1363
|
+
}
|
|
1364
|
+
},
|
|
1365
|
+
"required": [
|
|
1366
|
+
"target",
|
|
1367
|
+
"operation"
|
|
1368
|
+
],
|
|
1369
|
+
"example": {
|
|
1370
|
+
"target": "_tags",
|
|
1371
|
+
"operation": {
|
|
1372
|
+
"_append": [
|
|
1373
|
+
"new",
|
|
1374
|
+
"tags"
|
|
1375
|
+
],
|
|
1376
|
+
"_uniq": true
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
"AttributeOrigin": {
|
|
1381
|
+
"type": "string",
|
|
1382
|
+
"description": "Origin of an attribute.",
|
|
1383
|
+
"enum": [
|
|
1384
|
+
"system_recommendation",
|
|
1385
|
+
"user_manually",
|
|
1386
|
+
"entity_updating_system_recommendation"
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1389
|
+
"OperationNode": {
|
|
1390
|
+
"description": "Mapping operation nodes are either primitive values or operation node objects",
|
|
1391
|
+
"oneOf": [
|
|
1392
|
+
{
|
|
1393
|
+
"$ref": "#/components/schemas/OperationObjectNode"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"$ref": "#/components/schemas/PrimitiveJSONValue"
|
|
1397
|
+
}
|
|
1398
|
+
]
|
|
1399
|
+
},
|
|
1400
|
+
"OperationObjectNode": {
|
|
1401
|
+
"type": "object",
|
|
1402
|
+
"properties": {
|
|
1403
|
+
"_set": {
|
|
1404
|
+
"$ref": "#/components/schemas/PrimitiveJSONValue"
|
|
1405
|
+
},
|
|
1406
|
+
"_append": {
|
|
1407
|
+
"description": "Append to array",
|
|
1408
|
+
"items": {
|
|
1409
|
+
"$ref": "#/components/schemas/PrimitiveJSONValue"
|
|
1410
|
+
}
|
|
1411
|
+
},
|
|
1412
|
+
"_prepend": {
|
|
1413
|
+
"description": "Prepend to an array",
|
|
1414
|
+
"items": {
|
|
1415
|
+
"$ref": "#/components/schemas/OperationNode"
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
"_uniq": {
|
|
1419
|
+
"description": "Unique array",
|
|
1420
|
+
"oneOf": [
|
|
1421
|
+
{
|
|
1422
|
+
"type": "boolean",
|
|
1423
|
+
"example": true
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
"type": "array",
|
|
1427
|
+
"description": "Unique key consisting of object keys",
|
|
1428
|
+
"example": [
|
|
1429
|
+
"email"
|
|
1430
|
+
],
|
|
1431
|
+
"items": {
|
|
1432
|
+
"type": "string"
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
]
|
|
1436
|
+
},
|
|
1437
|
+
"_retain_old_values": {
|
|
1438
|
+
"description": "Merge strategy when _uniq is defined",
|
|
1439
|
+
"type": "boolean",
|
|
1440
|
+
"example": true
|
|
1441
|
+
},
|
|
1442
|
+
"_copy": {
|
|
1443
|
+
"description": "Copy JSONPath value from source entity context",
|
|
1444
|
+
"type": "string",
|
|
1445
|
+
"example": "contact.first_name"
|
|
1446
|
+
},
|
|
1447
|
+
"_template": {
|
|
1448
|
+
"description": "Define handlebars template to output a string",
|
|
1449
|
+
"type": "string",
|
|
1450
|
+
"example": "{{contact.first_name}} {{contact.last_name}}"
|
|
1451
|
+
},
|
|
1452
|
+
"_random": {
|
|
1453
|
+
"description": "Generate random ids / numbers",
|
|
1454
|
+
"$ref": "#/components/schemas/RandomOperation"
|
|
1455
|
+
},
|
|
1456
|
+
"_each": {
|
|
1457
|
+
"description": "Iterate over a source array. Use with _as and _map.\nThe value is a path to resolve from the source entity context.\nExample: \"submission.meterReadings\"\n",
|
|
1458
|
+
"type": "string",
|
|
1459
|
+
"example": "submission.meterReadings"
|
|
1460
|
+
},
|
|
1461
|
+
"_as": {
|
|
1462
|
+
"description": "Name for the current iteration item in _each.\nAccessed as $<name> in _copy paths within _map.\nExample: \"reading\" (accessed as $reading)\n",
|
|
1463
|
+
"type": "string",
|
|
1464
|
+
"example": "reading"
|
|
1465
|
+
},
|
|
1466
|
+
"_map": {
|
|
1467
|
+
"description": "Operation to evaluate per _each iteration item.\nCan be any OperationNode, typically an object with _copy\nreferences to the $<_as name> alias.\n",
|
|
1468
|
+
"$ref": "#/components/schemas/OperationNode"
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
"additionalProperties": true
|
|
1472
|
+
},
|
|
1473
|
+
"PrimitiveJSONValue": {
|
|
1474
|
+
"description": "Represents any primitive JSON value",
|
|
1475
|
+
"anyOf": [
|
|
1476
|
+
{
|
|
1477
|
+
"type": "string"
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"type": "boolean"
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"type": "number"
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
"type": "object",
|
|
1487
|
+
"additionalProperties": true
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"type": "array"
|
|
1491
|
+
}
|
|
1492
|
+
]
|
|
1493
|
+
},
|
|
1494
|
+
"RandomOperation": {
|
|
1495
|
+
"oneOf": [
|
|
1496
|
+
{
|
|
1497
|
+
"type": "object",
|
|
1498
|
+
"properties": {
|
|
1499
|
+
"type": {
|
|
1500
|
+
"type": "string",
|
|
1501
|
+
"enum": [
|
|
1502
|
+
"uuid",
|
|
1503
|
+
"nanoid"
|
|
1504
|
+
]
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
"required": [
|
|
1508
|
+
"type"
|
|
1509
|
+
]
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"type": "object",
|
|
1513
|
+
"properties": {
|
|
1514
|
+
"type": {
|
|
1515
|
+
"type": "string",
|
|
1516
|
+
"enum": [
|
|
1517
|
+
"number"
|
|
1518
|
+
]
|
|
1519
|
+
},
|
|
1520
|
+
"min": {
|
|
1521
|
+
"type": "number",
|
|
1522
|
+
"default": 0
|
|
1523
|
+
},
|
|
1524
|
+
"max": {
|
|
1525
|
+
"type": "number",
|
|
1526
|
+
"default": 1
|
|
1527
|
+
}
|
|
1528
|
+
},
|
|
1529
|
+
"required": [
|
|
1530
|
+
"type"
|
|
1531
|
+
]
|
|
1532
|
+
}
|
|
1533
|
+
]
|
|
1534
|
+
},
|
|
1535
|
+
"MappingAttribute": {
|
|
1536
|
+
"anyOf": [
|
|
1537
|
+
{
|
|
1538
|
+
"$ref": "#/components/schemas/SetValueMapper"
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"$ref": "#/components/schemas/CopyValueMapper"
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"$ref": "#/components/schemas/AppendValueMapper"
|
|
1545
|
+
}
|
|
1546
|
+
]
|
|
1547
|
+
},
|
|
1548
|
+
"MappingAttributeMode": {
|
|
1549
|
+
"type": "string",
|
|
1550
|
+
"enum": [
|
|
1551
|
+
"copy_if_exists",
|
|
1552
|
+
"append_if_exists",
|
|
1553
|
+
"set_value"
|
|
1554
|
+
],
|
|
1555
|
+
"description": "- copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used together with value property.\n"
|
|
1556
|
+
},
|
|
1557
|
+
"SetValueMapper": {
|
|
1558
|
+
"type": "object",
|
|
1559
|
+
"deprecated": true,
|
|
1560
|
+
"properties": {
|
|
1561
|
+
"mode": {
|
|
1562
|
+
"$ref": "#/components/schemas/MappingAttributeMode"
|
|
1563
|
+
},
|
|
1564
|
+
"target": {
|
|
1565
|
+
"type": "string",
|
|
1566
|
+
"description": "JSON like target path for the attribute. Eg. last_name"
|
|
1567
|
+
},
|
|
1568
|
+
"value": {
|
|
1569
|
+
"description": "Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\n"
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
"required": [
|
|
1573
|
+
"mode",
|
|
1574
|
+
"target",
|
|
1575
|
+
"value"
|
|
1576
|
+
]
|
|
1577
|
+
},
|
|
1578
|
+
"CopyValueMapper": {
|
|
1579
|
+
"type": "object",
|
|
1580
|
+
"deprecated": true,
|
|
1581
|
+
"properties": {
|
|
1582
|
+
"mode": {
|
|
1583
|
+
"$ref": "#/components/schemas/MappingAttributeMode"
|
|
1584
|
+
},
|
|
1585
|
+
"target": {
|
|
1586
|
+
"type": "string",
|
|
1587
|
+
"description": "JSON like target path for the attribute. Eg. last_name"
|
|
1588
|
+
},
|
|
1589
|
+
"source": {
|
|
1590
|
+
"type": "string",
|
|
1591
|
+
"description": "JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price\n"
|
|
1592
|
+
}
|
|
1593
|
+
},
|
|
1594
|
+
"required": [
|
|
1595
|
+
"mode",
|
|
1596
|
+
"target",
|
|
1597
|
+
"source"
|
|
1598
|
+
]
|
|
1599
|
+
},
|
|
1600
|
+
"AppendValueMapper": {
|
|
1601
|
+
"type": "object",
|
|
1602
|
+
"deprecated": true,
|
|
1603
|
+
"properties": {
|
|
1604
|
+
"mode": {
|
|
1605
|
+
"$ref": "#/components/schemas/MappingAttributeMode"
|
|
1606
|
+
},
|
|
1607
|
+
"target": {
|
|
1608
|
+
"type": "string",
|
|
1609
|
+
"description": "JSON like target path for the attribute. Eg. last_name"
|
|
1610
|
+
},
|
|
1611
|
+
"source": {
|
|
1612
|
+
"type": "string",
|
|
1613
|
+
"description": "JSON source path for the value to be extracted from the main entity. Eg: steps[1].['Product Info'].price\n"
|
|
1614
|
+
},
|
|
1615
|
+
"value_json": {
|
|
1616
|
+
"type": "string",
|
|
1617
|
+
"description": "To be provided only when mapping json objects into a target attribute. Eg array of addresses.\n"
|
|
1618
|
+
},
|
|
1619
|
+
"target_unique": {
|
|
1620
|
+
"type": "array",
|
|
1621
|
+
"items": {
|
|
1622
|
+
"type": "string"
|
|
1623
|
+
},
|
|
1624
|
+
"description": "Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\n"
|
|
1625
|
+
}
|
|
1626
|
+
},
|
|
1627
|
+
"required": [
|
|
1628
|
+
"mode",
|
|
1629
|
+
"target",
|
|
1630
|
+
"value_json"
|
|
1631
|
+
]
|
|
1632
|
+
},
|
|
1633
|
+
"MappingHistoryResp": {
|
|
1634
|
+
"type": "object",
|
|
1635
|
+
"properties": {
|
|
1636
|
+
"results": {
|
|
1637
|
+
"type": "array",
|
|
1638
|
+
"items": {
|
|
1639
|
+
"$ref": "#/components/schemas/MappingHistoryEntry"
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1643
|
+
"required": [
|
|
1644
|
+
"results"
|
|
1645
|
+
]
|
|
1646
|
+
},
|
|
1647
|
+
"MappingHistoryEntry": {
|
|
1648
|
+
"type": "object",
|
|
1649
|
+
"properties": {
|
|
1650
|
+
"id": {
|
|
1651
|
+
"type": "string",
|
|
1652
|
+
"example": "70542580-2b38-4bfc-af8d-bb90102f9f47"
|
|
1653
|
+
},
|
|
1654
|
+
"timestamp": {
|
|
1655
|
+
"type": "string",
|
|
1656
|
+
"format": "ISO datetime"
|
|
1657
|
+
},
|
|
1658
|
+
"source_entity_snapshot": {
|
|
1659
|
+
"$ref": "#/components/schemas/Entity"
|
|
1660
|
+
},
|
|
1661
|
+
"mapped_entities_snapshot": {
|
|
1662
|
+
"type": "array",
|
|
1663
|
+
"items": {
|
|
1664
|
+
"$ref": "#/components/schemas/Entity"
|
|
1665
|
+
}
|
|
1666
|
+
},
|
|
1667
|
+
"target_configs_snapshot": {
|
|
1668
|
+
"type": "array",
|
|
1669
|
+
"items": {
|
|
1670
|
+
"$ref": "#/components/schemas/TargetConfig"
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1674
|
+
"required": [
|
|
1675
|
+
"id",
|
|
1676
|
+
"timestamp",
|
|
1677
|
+
"source_entity_snapshot",
|
|
1678
|
+
"target_configs_snapshot",
|
|
1679
|
+
"mapped_entities_snapshot"
|
|
1680
|
+
]
|
|
1681
|
+
},
|
|
1682
|
+
"MappingSource": {
|
|
1683
|
+
"type": "object",
|
|
1684
|
+
"properties": {
|
|
1685
|
+
"key": {
|
|
1686
|
+
"type": "string",
|
|
1687
|
+
"description": "Key aiming to identify source"
|
|
1688
|
+
},
|
|
1689
|
+
"sub_properties": {
|
|
1690
|
+
"description": "Each item describes a property under the main source and a possibly, a default value for its target attribute",
|
|
1691
|
+
"type": "array",
|
|
1692
|
+
"items": {
|
|
1693
|
+
"$ref": "#/components/schemas/MappingSourceProperty"
|
|
1694
|
+
}
|
|
1695
|
+
},
|
|
1696
|
+
"source_type": {
|
|
1697
|
+
"type": "string",
|
|
1698
|
+
"description": "Data Structure type of source"
|
|
1699
|
+
},
|
|
1700
|
+
"group": {
|
|
1701
|
+
"type": "string",
|
|
1702
|
+
"description": "A group this source belongs to. Used for grouping sources in the UI"
|
|
1703
|
+
},
|
|
1704
|
+
"possible_target_types": {
|
|
1705
|
+
"type": "array",
|
|
1706
|
+
"items": {
|
|
1707
|
+
"$ref": "#/components/schemas/MappingSourceTargetType"
|
|
1708
|
+
},
|
|
1709
|
+
"description": "Data Structure Type of the underlaying output value"
|
|
1710
|
+
},
|
|
1711
|
+
"initial_relation": {
|
|
1712
|
+
"description": "Initial value of a relation to be added",
|
|
1713
|
+
"$ref": "#/components/schemas/RelationAttribute"
|
|
1714
|
+
},
|
|
1715
|
+
"title": {
|
|
1716
|
+
"type": "string",
|
|
1717
|
+
"description": "Human readable name of the Source"
|
|
1718
|
+
},
|
|
1719
|
+
"sub_title": {
|
|
1720
|
+
"type": "string",
|
|
1721
|
+
"description": "Human readable type of the source"
|
|
1722
|
+
},
|
|
1723
|
+
"repeatable": {
|
|
1724
|
+
"type": "boolean",
|
|
1725
|
+
"description": "Whether the source (block or attribute) is a repeatable, aka holds a list of values"
|
|
1726
|
+
},
|
|
1727
|
+
"target_settings": {
|
|
1728
|
+
"type": "object",
|
|
1729
|
+
"properties": {
|
|
1730
|
+
"allowed_ui_actions": {
|
|
1731
|
+
"type": "array",
|
|
1732
|
+
"items": {
|
|
1733
|
+
"type": "string",
|
|
1734
|
+
"enum": [
|
|
1735
|
+
"schema-select",
|
|
1736
|
+
"attribute-select",
|
|
1737
|
+
"target-delete",
|
|
1738
|
+
"target-add",
|
|
1739
|
+
"target"
|
|
1740
|
+
]
|
|
1741
|
+
},
|
|
1742
|
+
"description": "Describes which actions the user can perform on each target, if specified. If not specified, all actions are allowed"
|
|
1743
|
+
},
|
|
1744
|
+
"locked": {
|
|
1745
|
+
"type": "string",
|
|
1746
|
+
"enum": [
|
|
1747
|
+
"each",
|
|
1748
|
+
"first",
|
|
1749
|
+
"system_recommendation"
|
|
1750
|
+
],
|
|
1751
|
+
"description": "Whether its a read-only ui or not. Can be each target, or only the first. Overwrites uiActions"
|
|
1752
|
+
},
|
|
1753
|
+
"isSingleTarget": {
|
|
1754
|
+
"type": "boolean",
|
|
1755
|
+
"description": "Whether all source mappings flow into a single attribute (e.g. address)"
|
|
1756
|
+
},
|
|
1757
|
+
"visibility": {
|
|
1758
|
+
"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",
|
|
1759
|
+
"type": "object",
|
|
1760
|
+
"properties": {
|
|
1761
|
+
"mode": {
|
|
1762
|
+
"type": "string",
|
|
1763
|
+
"enum": [
|
|
1764
|
+
"hide",
|
|
1765
|
+
"show",
|
|
1766
|
+
"message"
|
|
1767
|
+
]
|
|
1768
|
+
},
|
|
1769
|
+
"if": {
|
|
1770
|
+
"type": "object",
|
|
1771
|
+
"additionalProperties": {
|
|
1772
|
+
"type": "string"
|
|
1773
|
+
}
|
|
1774
|
+
},
|
|
1775
|
+
"message": {
|
|
1776
|
+
"type": "string"
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1779
|
+
"required": [
|
|
1780
|
+
"mode",
|
|
1781
|
+
"if"
|
|
1782
|
+
]
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
},
|
|
1787
|
+
"required": [
|
|
1788
|
+
"key",
|
|
1789
|
+
"title",
|
|
1790
|
+
"source_type"
|
|
1791
|
+
]
|
|
1792
|
+
},
|
|
1793
|
+
"MappingSourceProperty": {
|
|
1794
|
+
"type": "object",
|
|
1795
|
+
"properties": {
|
|
1796
|
+
"value": {
|
|
1797
|
+
"type": "string"
|
|
1798
|
+
},
|
|
1799
|
+
"label": {
|
|
1800
|
+
"type": "string"
|
|
1801
|
+
},
|
|
1802
|
+
"initial_target_value": {
|
|
1803
|
+
"type": "string"
|
|
1804
|
+
},
|
|
1805
|
+
"possible_target_types": {
|
|
1806
|
+
"type": "array",
|
|
1807
|
+
"items": {
|
|
1808
|
+
"$ref": "#/components/schemas/MappingSourceTargetType"
|
|
1809
|
+
},
|
|
1810
|
+
"description": "Data Structure Type of the underlaying output value"
|
|
1811
|
+
},
|
|
1812
|
+
"raw": {
|
|
1813
|
+
"type": "boolean",
|
|
1814
|
+
"description": "Whether the raw value should be used, or whether the value is enriched by a path"
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
"required": [
|
|
1818
|
+
"value",
|
|
1819
|
+
"label"
|
|
1820
|
+
]
|
|
1821
|
+
},
|
|
1822
|
+
"MappingSourceTargetType": {
|
|
1823
|
+
"type": "string",
|
|
1824
|
+
"enum": [
|
|
1825
|
+
"string",
|
|
1826
|
+
"date",
|
|
1827
|
+
"datetime",
|
|
1828
|
+
"boolean",
|
|
1829
|
+
"number",
|
|
1830
|
+
"image",
|
|
1831
|
+
"file",
|
|
1832
|
+
"address",
|
|
1833
|
+
"email",
|
|
1834
|
+
"phone",
|
|
1835
|
+
"select",
|
|
1836
|
+
"multiselect",
|
|
1837
|
+
"payment",
|
|
1838
|
+
"link",
|
|
1839
|
+
"currency",
|
|
1840
|
+
"sequence",
|
|
1841
|
+
"relation",
|
|
1842
|
+
"array"
|
|
1843
|
+
]
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
"servers": [
|
|
1848
|
+
{
|
|
1849
|
+
"url": "https://entity-mapping.sls.epilot.io"
|
|
1850
|
+
}
|
|
1851
|
+
]
|
|
1852
|
+
}
|