This repository was archived by the owner on Apr 22, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinitial_mappings_schema.yaml
More file actions
525 lines (524 loc) · 19.9 KB
/
Copy pathinitial_mappings_schema.yaml
File metadata and controls
525 lines (524 loc) · 19.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
$defs:
airdrop-recipe-blueprint-shards-create-request:
description: Create a fresh recipe blueprint shard.
properties:
devrev_leaf_type:
$ref: '#/$defs/airdrop-recipe-dev-rev-leaf-type'
stock_field_mappings:
additionalProperties:
$ref: '#/$defs/airdrop-recipe-set-field-mapping'
description: |
Mapping for DevRev stock fields, keyed by IDs of said stock fields.
type: object
required:
- devrev_leaf_type
title: airdrop-recipe-blueprint-shards-create-request
type: object
airdrop-recipe-create-possible-custom-object-mapping:
properties:
forward:
description: |
Whether the mapping can be used in the sync_to_devrev direction.
type: boolean
reverse:
description: |
Whether the mapping can be used in the sync_from_devrev direction.
type: boolean
shard:
$ref: '#/$defs/airdrop-recipe-create-possible-custom-object-mapping-shard'
required:
- forward
- reverse
title: airdrop-recipe-create-possible-custom-object-mapping
type: object
airdrop-recipe-create-possible-custom-object-mapping-shard:
discriminator:
mapping:
create_shard: '#/$defs/airdrop-recipe-blueprint-shards-create-request'
propertyName: mode
oneOf:
- $ref: '#/$defs/airdrop-recipe-blueprint-shards-create-request'
properties:
mode:
$ref: '#/$defs/airdrop-recipe-create-possible-custom-object-mapping-shard-mode'
required:
- mode
title: airdrop-recipe-create-possible-custom-object-mapping-shard
type: object
airdrop-recipe-create-possible-custom-object-mapping-shard-mode:
description: |
You can either create a fresh shard to use for this mapping, assign an
existing one.
enum:
- create_shard
type: string
airdrop-recipe-create-possible-record-type-mapping:
properties:
devrev_leaf_type:
format: text
type: string
forward:
description: |
Whether the mapping can be used in the sync_to_devrev direction.
type: boolean
reverse:
description: |
Whether the mapping can be used in the sync_from_devrev direction.
type: boolean
shard:
$ref: '#/$defs/airdrop-recipe-create-possible-record-type-mapping-shard'
required:
- devrev_leaf_type
- forward
- reverse
title: airdrop-recipe-create-possible-record-type-mapping
type: object
airdrop-recipe-create-possible-record-type-mapping-shard:
discriminator:
mapping:
create_shard: '#/$defs/airdrop-recipe-blueprint-shards-create-request'
propertyName: mode
oneOf:
- $ref: '#/$defs/airdrop-recipe-blueprint-shards-create-request'
properties:
mode:
$ref: '#/$defs/airdrop-recipe-create-possible-record-type-mapping-shard-mode'
required:
- mode
title: airdrop-recipe-create-possible-record-type-mapping-shard
type: object
airdrop-recipe-create-possible-record-type-mapping-shard-mode:
description: |
You can either create a fresh shard to use for this mapping, assign an
existing one.
enum:
- create_shard
type: string
airdrop-recipe-create-possible-record-type-mappings:
properties:
default_mapping:
$ref: '#/$defs/airdrop-recipe-dev-rev-leaf-type'
mapping_as_custom_object:
$ref: '#/$defs/airdrop-recipe-create-possible-custom-object-mapping'
possible_record_type_mappings:
description: |
Stock DevRev types to which the external type might be mapped.
items:
$ref: '#/$defs/airdrop-recipe-create-possible-record-type-mapping'
type: array
required:
- default_mapping
title: airdrop-recipe-create-possible-record-type-mappings
type: object
airdrop-recipe-custom-stage:
properties:
is_deprecated:
type: boolean
ordinal:
format: int32
type: integer
stage_name:
format: text
type: string
transition_to:
items:
format: text
type: string
type: array
required:
- is_deprecated
- ordinal
- stage_name
- transition_to
title: airdrop-recipe-custom-stage
type: object
airdrop-recipe-dev-rev-leaf-type:
properties:
object_category:
$ref: '#/$defs/airdrop-recipe-dev-rev-leaf-type-dev-rev-leaf-type-category'
object_type:
description: |
The object type in DevRev. DON ID for stock leaf types and the
final DON component for custom object DONs.
format: text
type: string
required:
- object_type
title: airdrop-recipe-dev-rev-leaf-type
type: object
airdrop-recipe-dev-rev-leaf-type-dev-rev-leaf-type-category:
enum:
- custom
- fresh_custom
- stock
- synthetic
type: string
airdrop-recipe-fallback:
properties:
type:
$ref: '#/$defs/airdrop-recipe-fallback-type'
value:
description: |
The fallback used for required DevRev fields in case no value is
provided.
required:
- type
- value
title: airdrop-recipe-fallback
type: object
airdrop-recipe-fallback-type:
enum:
- bool
- date
- enum
- float
- int
- rich_text
- text
- timestamp
type: string
airdrop-recipe-filter-typed-reference:
properties:
allowed_types:
description: |
A list of all DevRev leaf types for which the external value will
be used directly, the rest will be filtered out.
items:
$ref: '#/$defs/airdrop-recipe-dev-rev-leaf-type'
type: array
is_collection:
description: Whether the field is a collection.
type: boolean
required:
- allowed_types
title: airdrop-recipe-filter-typed-reference
type: object
airdrop-recipe-fixed-bool:
description: Use a fixed boolean value.
properties:
bool:
type: boolean
required:
- bool
title: airdrop-recipe-fixed-bool
type: object
airdrop-recipe-fixed-string:
description: Use a fixed string value.
properties:
enum:
format: text
type: string
required:
- enum
title: airdrop-recipe-fixed-string
type: object
airdrop-recipe-make-authorization-target:
additionalProperties: false
title: airdrop-recipe-make-authorization-target
type: object
airdrop-recipe-make-custom-links:
properties:
reverse_stock_types:
additionalProperties:
format: text
type: string
description: |
Mapping between DevRev link types and external link types.
type: object
required:
- reverse_stock_types
title: airdrop-recipe-make-custom-links
type: object
airdrop-recipe-make-custom-stages:
description: Construct a stage diagram out of this field.
properties:
stages:
additionalProperties:
$ref: '#/$defs/airdrop-recipe-custom-stage'
description: Data about the stages used in the diagram.
type: object
required:
- stages
title: airdrop-recipe-make-custom-stages
type: object
airdrop-recipe-map-enum:
description: |
Construct a DevRev field by mapping each enum value from the external
system to a DevRev enum value.
properties:
forward:
additionalProperties:
$ref: '#/$defs/airdrop-recipe-mapping-target-value'
description: |
Mapping of external enum values (indexed by their key) to DevRev
enum values.
type: object
forward_default:
description: |
The key of an external value with which to replace any that is not
found in the values map.
format: text
type: string
is_array:
description: |
Whether the field is an array of enums both externally and in
DevRev.
type: boolean
reverse:
additionalProperties:
$ref: '#/$defs/airdrop-recipe-mapping-target-value'
description: |
Mapping of DevRev enum values (indexed by their key) to external
enum values.
type: object
title: airdrop-recipe-map-enum
type: object
airdrop-recipe-map-roles:
description: |
Construct a DevRev field by mapping each enum value from the external
system to a DevRev enum value.
properties:
forward:
additionalProperties:
format: text
type: string
description: |
Mapping of external roles to DevRev roles for the forward
transformation.
type: object
forward_default:
description: |
The key of an external value with which to replace any that is not
found in the values map.
format: text
type: string
is_array:
description: Whether the field is an array of roles.
type: boolean
title: airdrop-recipe-map-roles
type: object
airdrop-recipe-mapping-target-value:
properties:
value:
format: text
type: string
required:
- value
title: airdrop-recipe-mapping-target-value
type: object
airdrop-recipe-set-field-mapping:
description: |
Details of the mapping of a DevRev field. It is always constructed
using a transformation method, which can either use a
primary_external_field, multiple secondary_external_fields, both or
neither.
properties:
fallback:
$ref: '#/$defs/airdrop-recipe-fallback'
forward:
description: |
True if this mapping is used in initial and sync_to_devrev runs.
type: boolean
primary_external_field:
description: |
The primary external field from which this field is mapped, if any.
format: text
type: string
reverse:
description: |
True if this mapping is used in sync_from_devrev runs. Either
forward or reverse, or both have to be selected.
type: boolean
transformation_method_for_set:
$ref: '#/$defs/airdrop-recipe-set-field-mapping-transformation-method'
required:
- forward
- reverse
title: airdrop-recipe-set-field-mapping
type: object
airdrop-recipe-set-field-mapping-transformation-method:
discriminator:
mapping:
filter_typed_reference: '#/$defs/airdrop-recipe-filter-typed-reference'
make_authorization_target: '#/$defs/airdrop-recipe-make-authorization-target'
make_custom_links: '#/$defs/airdrop-recipe-make-custom-links'
make_custom_stages: '#/$defs/airdrop-recipe-make-custom-stages'
make_struct: '#/$defs/airdrop-recipe-set-make-struct'
map_enum: '#/$defs/airdrop-recipe-map-enum'
map_roles: '#/$defs/airdrop-recipe-map-roles'
use_as_array_value: '#/$defs/airdrop-recipe-use-as-array-value'
use_devrev_record: '#/$defs/airdrop-recipe-use-dev-rev-record'
use_directly: '#/$defs/airdrop-recipe-use-directly'
use_first_non_null: '#/$defs/airdrop-recipe-set-use-first-non-null'
use_fixed_value: '#/$defs/airdrop-recipe-use-fixed-value'
use_rich_text: '#/$defs/airdrop-recipe-use-rich-text'
propertyName: transformation_method
oneOf:
- $ref: '#/$defs/airdrop-recipe-filter-typed-reference'
- $ref: '#/$defs/airdrop-recipe-make-authorization-target'
- $ref: '#/$defs/airdrop-recipe-make-custom-links'
- $ref: '#/$defs/airdrop-recipe-make-custom-stages'
- $ref: '#/$defs/airdrop-recipe-map-enum'
- $ref: '#/$defs/airdrop-recipe-map-roles'
- $ref: '#/$defs/airdrop-recipe-set-make-struct'
- $ref: '#/$defs/airdrop-recipe-set-use-first-non-null'
- $ref: '#/$defs/airdrop-recipe-use-as-array-value'
- $ref: '#/$defs/airdrop-recipe-use-dev-rev-record'
- $ref: '#/$defs/airdrop-recipe-use-directly'
- $ref: '#/$defs/airdrop-recipe-use-fixed-value'
- $ref: '#/$defs/airdrop-recipe-use-rich-text'
properties:
transformation_method:
$ref: '#/$defs/airdrop-recipe-set-field-mapping-transformation-method-transformation-method'
required:
- transformation_method
title: airdrop-recipe-set-field-mapping-transformation-method
type: object
airdrop-recipe-set-field-mapping-transformation-method-transformation-method:
description: |
The transformation method used to transform the value for this field.
enum:
- filter_typed_reference
- make_authorization_target
- make_custom_links
- make_custom_stages
- make_struct
- map_enum
- map_roles
- use_as_array_value
- use_devrev_record
- use_directly
- use_first_non_null
- use_fixed_value
- use_raw_jq
- use_rich_text
type: string
airdrop-recipe-set-make-struct:
properties:
field_mappings:
additionalProperties:
$ref: '#/$defs/airdrop-recipe-set-field-mapping'
description: |
A map of the fields inside a struct to their selected mapping
option.
type: object
required:
- field_mappings
title: airdrop-recipe-set-make-struct
type: object
airdrop-recipe-set-use-first-non-null:
properties:
alternatives:
description: |
A list of field mappings where the first one that doesn't produce
null will be used.
items:
$ref: '#/$defs/airdrop-recipe-set-use-first-non-null-alternative'
type: array
required:
- alternatives
title: airdrop-recipe-set-use-first-non-null
type: object
airdrop-recipe-set-use-first-non-null-alternative:
properties:
field_mapping:
$ref: '#/$defs/airdrop-recipe-set-field-mapping'
is_default_in_reverse:
description: |
Whether this field mapping should be used as the default in
reverse.
type: boolean
required:
- field_mapping
- is_default_in_reverse
title: airdrop-recipe-set-use-first-non-null-alternative
type: object
airdrop-recipe-use-as-array-value:
additionalProperties: false
description: |
Use the external value wrapped in an array as the single element.
title: airdrop-recipe-use-as-array-value
type: object
airdrop-recipe-use-dev-rev-record:
description: Use a fixed reference to an existing record in DevRev.
properties:
id:
description: |
The ID of the existing DevRev record to fill in the field.
format: id
type: string
is_array:
description: Whether the field is an array of references.
type: boolean
leaf_type:
$ref: '#/$defs/airdrop-recipe-dev-rev-leaf-type'
title: airdrop-recipe-use-dev-rev-record
type: object
airdrop-recipe-use-directly:
additionalProperties: false
description: Use the external value directly without any change.
title: airdrop-recipe-use-directly
type: object
airdrop-recipe-use-fixed-value:
description: |
User can choose between a fixed boolean and a fixed enum value.
discriminator:
mapping:
bool: '#/$defs/airdrop-recipe-fixed-bool'
enum_value: '#/$defs/airdrop-recipe-fixed-string'
none: '#/$defs/empty'
propertyName: value
oneOf:
- $ref: '#/$defs/airdrop-recipe-fixed-bool'
- $ref: '#/$defs/airdrop-recipe-fixed-string'
- $ref: '#/$defs/empty'
properties:
value:
$ref: '#/$defs/airdrop-recipe-use-fixed-value-value'
title: airdrop-recipe-use-fixed-value
type: object
airdrop-recipe-use-fixed-value-value:
description: Pick between a fixed boolean and a fixed DevRev enum.
enum:
- bool
- enum_value
- none
type: string
airdrop-recipe-use-rich-text:
additionalProperties: false
description: Make a rich text field.
title: airdrop-recipe-use-rich-text
type: object
empty:
additionalProperties: false
title: empty
type: object
$schema: https://json-schema.org/draft/2020-12/schema
properties:
additional_mappings:
properties:
record_type_category_mappings:
additionalProperties:
$ref: '#/$defs/airdrop-recipe-create-possible-record-type-mappings'
description: |
Possible mappings of record type categories to DevRev object types.
type: object
record_type_mappings:
additionalProperties:
$ref: '#/$defs/airdrop-recipe-create-possible-record-type-mappings'
description: |
Possible mappings of external record types to DevRev object types.
type: object
type: object
devrev_metadata_version:
description: |
The version of the DevRev metadata on which the offered options are
based.
format: int64
type: integer
format_version:
description: The format version of initial domain mapping.
format: text
type: string
title: airdrop-recipe-initial-domain-mappings-install-request
type: object