@takeshape/schema 8.263.4 → 8.264.2

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.
Files changed (81) hide show
  1. package/dist/migration/index.d.ts +1 -0
  2. package/dist/migration/index.d.ts.map +1 -1
  3. package/dist/migration/index.js +4 -1
  4. package/dist/migration/to/v3.25.0.d.ts +5 -0
  5. package/dist/migration/to/v3.25.0.d.ts.map +1 -0
  6. package/dist/migration/to/v3.25.0.js +22 -0
  7. package/dist/mocks.d.ts +2 -2
  8. package/dist/mocks.js +4 -4
  9. package/dist/project-schema/index.d.ts +4 -1
  10. package/dist/project-schema/index.d.ts.map +1 -1
  11. package/dist/project-schema/index.js +20 -3
  12. package/dist/project-schema/latest.d.ts +1 -2
  13. package/dist/project-schema/latest.d.ts.map +1 -1
  14. package/dist/project-schema/migrate.d.ts.map +1 -1
  15. package/dist/project-schema/migrate.js +4 -0
  16. package/dist/project-schema/v3.25.0.d.ts +1364 -0
  17. package/dist/project-schema/v3.25.0.d.ts.map +1 -0
  18. package/dist/project-schema/v3.25.0.js +5 -0
  19. package/dist/schema-util.d.ts +1 -1
  20. package/dist/schema-util.d.ts.map +1 -1
  21. package/dist/schema-util.js +2 -3
  22. package/dist/schemas/index.d.ts +2 -2
  23. package/dist/schemas/index.d.ts.map +1 -1
  24. package/dist/schemas/index.js +6 -4
  25. package/dist/schemas/index.ts +4 -2
  26. package/dist/schemas/project-schema/latest.json +3 -7
  27. package/dist/schemas/project-schema/v3.25.0.json +2903 -0
  28. package/dist/schemas/project-schema.json +3 -0
  29. package/dist/types/types.d.ts +4 -5
  30. package/dist/types/types.d.ts.map +1 -1
  31. package/dist/types/types.js +2 -2
  32. package/dist/types/utils.d.ts.map +1 -1
  33. package/dist/types/utils.js +3 -1
  34. package/dist/util/merge.d.ts.map +1 -1
  35. package/dist/util/merge.js +1 -1
  36. package/es/migration/index.js +3 -1
  37. package/es/migration/to/v3.25.0.js +14 -0
  38. package/es/mocks.js +4 -4
  39. package/es/project-schema/index.js +3 -1
  40. package/es/project-schema/migrate.js +5 -1
  41. package/es/project-schema/v3.25.0.js +1 -0
  42. package/es/schema-util.js +2 -3
  43. package/es/schemas/index.js +4 -3
  44. package/es/schemas/index.ts +4 -2
  45. package/es/schemas/project-schema/latest.json +3 -7
  46. package/es/schemas/project-schema/v3.25.0.json +2903 -0
  47. package/es/schemas/project-schema.json +3 -0
  48. package/es/types/types.js +2 -2
  49. package/es/types/utils.js +2 -1
  50. package/es/util/merge.js +1 -1
  51. package/examples/latest/betzino.json +1 -2
  52. package/examples/latest/blog-schema.json +1 -2
  53. package/examples/latest/brewery-schema.json +1 -2
  54. package/examples/latest/complex-project-schema.json +1 -2
  55. package/examples/latest/complex-schema.json +1 -2
  56. package/examples/latest/fabric-ecommerce.json +1 -2
  57. package/examples/latest/frank-and-fred-schema.json +1 -2
  58. package/examples/latest/klirr-schema.json +1 -2
  59. package/examples/latest/massive-schema.json +1 -2
  60. package/examples/latest/mill-components-schema.json +1 -2
  61. package/examples/latest/one-earth.json +1 -2
  62. package/examples/latest/pet-oneof-array.json +1 -2
  63. package/examples/latest/post-schema.json +1 -2
  64. package/examples/latest/pruned-shopify-product-schema.json +1 -2
  65. package/examples/latest/real-world-schema.json +1 -2
  66. package/examples/latest/recursive-repeater-schema.json +1 -2
  67. package/examples/latest/recursive-schema.json +1 -2
  68. package/examples/latest/rick-and-morty-ast.json +1 -2
  69. package/examples/latest/rick-and-morty-graphql.json +1 -2
  70. package/examples/latest/rick-and-morty-rest.json +1 -2
  71. package/examples/latest/schema-with-repeater-draftjs.json +1 -2
  72. package/examples/latest/shape-books-v3_2_0.json +1 -2
  73. package/examples/latest/shape-books.json +1 -2
  74. package/examples/latest/shopify-lookbook.json +1 -2
  75. package/examples/latest/shopify-product-2022-07.json +1 -2
  76. package/examples/latest/shopify-store-with-widget.json +1 -2
  77. package/examples/latest/stripe-product-runtime-schema.json +1 -2
  78. package/examples/latest/stripe-starter-resolved.json +1 -2
  79. package/examples/latest/user-schema-no-required.json +1 -2
  80. package/examples/latest/user-schema-with-defaults.json +1 -2
  81. package/package.json +4 -4
@@ -0,0 +1,2903 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://schema.takeshape.io/project-schema/v3.25.0#",
4
+ "title": "Project Schema",
5
+ "definitions": {
6
+ "schemaArray": {
7
+ "title": "Schema Array",
8
+ "type": "array",
9
+ "minItems": 1,
10
+ "items": {
11
+ "$ref": "#/definitions/propertySchema"
12
+ }
13
+ },
14
+ "nonNegativeInteger": {
15
+ "title": "Non Negative Integer",
16
+ "type": "integer",
17
+ "minimum": 0
18
+ },
19
+ "nonNegativeIntegerDefault0": {
20
+ "title": "Non Negative Integer Default 0",
21
+ "allOf": [
22
+ {
23
+ "$ref": "#/definitions/nonNegativeInteger"
24
+ },
25
+ {
26
+ "default": 0
27
+ }
28
+ ]
29
+ },
30
+ "simpleTypes": {
31
+ "title": "Simple Types",
32
+ "enum": [
33
+ "array",
34
+ "boolean",
35
+ "integer",
36
+ "null",
37
+ "number",
38
+ "object",
39
+ "string"
40
+ ]
41
+ },
42
+ "stringArray": {
43
+ "title": "String Array",
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string"
47
+ },
48
+ "uniqueItems": true,
49
+ "default": []
50
+ },
51
+ "backreference": {
52
+ "title": "Back Reference",
53
+ "description": "A configuration object for a reverse reference in a relationship.",
54
+ "type": "object",
55
+ "properties": {
56
+ "enabled": {
57
+ "type": "boolean"
58
+ },
59
+ "name": {
60
+ "type": "string",
61
+ "pattern": "^[_a-zA-Z][_a-zA-Z0-9]*$"
62
+ }
63
+ },
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "enabled"
67
+ ]
68
+ },
69
+ "mappingString": {
70
+ "title": "Mapping String",
71
+ "type": "string",
72
+ "pattern": "^[\\w-]+(?::[\\w-]+)+(?:\\.[\\w-]+)+$"
73
+ },
74
+ "fieldMapping": {
75
+ "title": "Field Mapping",
76
+ "oneOf": [
77
+ {
78
+ "$ref": "#/definitions/mappingString"
79
+ },
80
+ {
81
+ "type": "array",
82
+ "items": {
83
+ "$ref": "#/definitions/mappingString"
84
+ }
85
+ }
86
+ ]
87
+ },
88
+ "refSchema": {
89
+ "title": "Ref Schema",
90
+ "type": "object",
91
+ "properties": {
92
+ "@ref": {
93
+ "$ref": "#/definitions/ref"
94
+ }
95
+ },
96
+ "required": [
97
+ "@ref"
98
+ ]
99
+ },
100
+ "refSchemaLegacy": {
101
+ "title": "Ref Schema Legacy",
102
+ "type": "object",
103
+ "properties": {
104
+ "$ref": {
105
+ "$ref": "#/definitions/ref"
106
+ }
107
+ },
108
+ "required": [
109
+ "$ref"
110
+ ]
111
+ },
112
+ "shapeSchemaEnum": {
113
+ "title": "Shape Schema Enum",
114
+ "type": "object",
115
+ "properties": {
116
+ "enum": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "string"
120
+ },
121
+ "minItems": 1
122
+ }
123
+ },
124
+ "additionalProperties": false,
125
+ "required": [
126
+ "enum"
127
+ ]
128
+ },
129
+ "objectSchema": {
130
+ "title": "Object Schema",
131
+ "type": "object",
132
+ "allOf": [
133
+ {
134
+ "$ref": "#/definitions/propertySchema"
135
+ },
136
+ {
137
+ "properties": {
138
+ "type": {
139
+ "type": "string",
140
+ "const": "object"
141
+ },
142
+ "properties": {
143
+ "type": "object",
144
+ "additionalProperties": {
145
+ "$ref": "#/definitions/propertySchema"
146
+ }
147
+ }
148
+ },
149
+ "required": [
150
+ "type",
151
+ "properties"
152
+ ]
153
+ }
154
+ ]
155
+ },
156
+ "returnShapeArraySchema": {
157
+ "title": "Return Shape Array Schema",
158
+ "type": "object",
159
+ "allOf": [
160
+ {
161
+ "$ref": "#/definitions/propertySchema"
162
+ },
163
+ {
164
+ "properties": {
165
+ "type": {
166
+ "type": "string",
167
+ "const": "array"
168
+ },
169
+ "items": {
170
+ "oneOf": [
171
+ {
172
+ "$ref": "#/definitions/refSchema"
173
+ },
174
+ {
175
+ "type": "object",
176
+ "properties": {
177
+ "type": {
178
+ "enum": [
179
+ "boolean",
180
+ "integer",
181
+ "number",
182
+ "string"
183
+ ]
184
+ }
185
+ },
186
+ "required": [
187
+ "type"
188
+ ]
189
+ }
190
+ ]
191
+ }
192
+ },
193
+ "required": [
194
+ "type",
195
+ "items"
196
+ ]
197
+ }
198
+ ]
199
+ },
200
+ "objectOrRefArray": {
201
+ "title": "ObjectOrRefArray",
202
+ "type": "array",
203
+ "items": {
204
+ "oneOf": [
205
+ {
206
+ "$ref": "#/definitions/refSchema"
207
+ },
208
+ {
209
+ "$ref": "#/definitions/refSchemaLegacy"
210
+ },
211
+ {
212
+ "$ref": "#/definitions/objectSchema"
213
+ }
214
+ ],
215
+ "unevaluatedProperties": true
216
+ }
217
+ },
218
+ "shapeSchemaAllOf": {
219
+ "title": "Shape Schema All Of",
220
+ "type": "object",
221
+ "properties": {
222
+ "allOf": {
223
+ "$ref": "#/definitions/objectOrRefArray"
224
+ }
225
+ },
226
+ "required": [
227
+ "allOf"
228
+ ],
229
+ "additionalProperties": false
230
+ },
231
+ "allOfSchema": {
232
+ "title": "AllOfSchema",
233
+ "allOf": [
234
+ {
235
+ "$ref": "#/definitions/propertySchema"
236
+ },
237
+ {
238
+ "type": "object",
239
+ "properties": {
240
+ "allOf": {
241
+ "$ref": "#/definitions/objectOrRefArray"
242
+ }
243
+ },
244
+ "required": [
245
+ "allOf"
246
+ ]
247
+ }
248
+ ]
249
+ },
250
+ "shapeSchemaExtends": {
251
+ "title": "ShapeSchemaExtends",
252
+ "type": "object",
253
+ "properties": {
254
+ "extends": {
255
+ "$ref": "#/definitions/objectOrRefArray"
256
+ }
257
+ },
258
+ "required": [
259
+ "extends"
260
+ ],
261
+ "additionalProperties": false
262
+ },
263
+ "extendsSchema": {
264
+ "title": "ExtendsSchema",
265
+ "allOf": [
266
+ {
267
+ "$ref": "#/definitions/propertySchema"
268
+ },
269
+ {
270
+ "type": "object",
271
+ "properties": {
272
+ "extends": {
273
+ "$ref": "#/definitions/objectOrRefArray"
274
+ }
275
+ },
276
+ "required": [
277
+ "extends"
278
+ ]
279
+ }
280
+ ]
281
+ },
282
+ "shapeSchemaOneOf": {
283
+ "title": "Shape Schema One Of",
284
+ "type": "object",
285
+ "properties": {
286
+ "oneOf": {
287
+ "$ref": "#/definitions/objectOrRefArray"
288
+ }
289
+ },
290
+ "required": [
291
+ "oneOf"
292
+ ],
293
+ "additionalProperties": false
294
+ },
295
+ "oneOfSchema": {
296
+ "title": "OneOfSchema",
297
+ "allOf": [
298
+ {
299
+ "$ref": "#/definitions/propertySchema"
300
+ },
301
+ {
302
+ "type": "object",
303
+ "properties": {
304
+ "oneOf": {
305
+ "$ref": "#/definitions/objectOrRefArray"
306
+ }
307
+ },
308
+ "required": [
309
+ "oneOf"
310
+ ],
311
+ "additionalProperties": false
312
+ }
313
+ ]
314
+ },
315
+ "shapeSchema": {
316
+ "title": "Shape Schema",
317
+ "type": "object",
318
+ "oneOf": [
319
+ {
320
+ "$ref": "#/definitions/shapeSchemaAllOf"
321
+ },
322
+ {
323
+ "$ref": "#/definitions/shapeSchemaExtends"
324
+ },
325
+ {
326
+ "$ref": "#/definitions/shapeSchemaOneOf"
327
+ },
328
+ {
329
+ "$ref": "#/definitions/shapeSchemaEnum"
330
+ },
331
+ {
332
+ "$ref": "#/definitions/objectSchema"
333
+ }
334
+ ]
335
+ },
336
+ "queryMap": {
337
+ "title": "Query Map",
338
+ "type": "object",
339
+ "patternProperties": {
340
+ "[0-9A-Za-z_-]+": {
341
+ "$ref": "#/definitions/query"
342
+ }
343
+ }
344
+ },
345
+ "args": {
346
+ "title": "Args",
347
+ "oneOf": [
348
+ {
349
+ "type": "string"
350
+ },
351
+ {
352
+ "$ref": "#/definitions/objectSchema"
353
+ }
354
+ ]
355
+ },
356
+ "returnShape": {
357
+ "title": "Return Shape",
358
+ "oneOf": [
359
+ {
360
+ "type": "string"
361
+ },
362
+ {
363
+ "$ref": "#/definitions/returnShapeArraySchema"
364
+ }
365
+ ]
366
+ },
367
+ "directiveConfigItem": {
368
+ "title": "Directive Config Item",
369
+ "description": "A tuple with a string directive name, and options to pass to the directive",
370
+ "type": "array",
371
+ "items": [
372
+ {
373
+ "title": "Directive Name",
374
+ "type": "string"
375
+ },
376
+ {
377
+ "title": "Directive Options",
378
+ "type": "object",
379
+ "propertyNames": {
380
+ "pattern": "[0-9A-Za-z_-]+"
381
+ }
382
+ }
383
+ ]
384
+ },
385
+ "parameterSerializeStyleOptions": {
386
+ "title": "Parameter Serialize Style Options",
387
+ "description": "All possible options for the more specific ParameterSerializeStyleOptions types.",
388
+ "type": "object",
389
+ "properties": {
390
+ "style": {
391
+ "type": "string",
392
+ "enum": [
393
+ "simple",
394
+ "label",
395
+ "matrix",
396
+ "form",
397
+ "spaceDelimited",
398
+ "pipeDelimited",
399
+ "deepObject",
400
+ "none"
401
+ ]
402
+ },
403
+ "explode": {
404
+ "type": "boolean"
405
+ },
406
+ "allowEmptyValue": {
407
+ "type": "boolean"
408
+ },
409
+ "allowReserved": {
410
+ "description": "The allowReserved keyword specifies whether the reserved characters :/?#[]@!$&'()*+,;= in parameter values are allowed to be sent as they are.",
411
+ "type": "boolean"
412
+ },
413
+ "skipEncoding": {
414
+ "type": "boolean"
415
+ }
416
+ },
417
+ "required": [
418
+ "style"
419
+ ],
420
+ "additionalProperties": false
421
+ },
422
+ "parameterSerializeStyleOptionsForPathParams": {
423
+ "title": "Parameter Serialize Style Options For Path Params",
424
+ "description": "Options to be passed to the serialization routine.",
425
+ "type": "object",
426
+ "properties": {
427
+ "style": {
428
+ "type": "string",
429
+ "enum": [
430
+ "simple",
431
+ "label",
432
+ "matrix",
433
+ "none"
434
+ ]
435
+ },
436
+ "explode": {
437
+ "type": "boolean"
438
+ },
439
+ "allowEmptyValue": {
440
+ "type": "boolean"
441
+ },
442
+ "allowReserved": {
443
+ "description": "The allowReserved keyword specifies whether the reserved characters :/?#[]@!$&'()*+,;= in parameter values are allowed to be sent as they are.",
444
+ "type": "boolean"
445
+ },
446
+ "skipEncoding": {
447
+ "type": "boolean"
448
+ }
449
+ },
450
+ "required": [
451
+ "style"
452
+ ],
453
+ "additionalProperties": false
454
+ },
455
+ "parameterSerializeStyleOptionsForSearchParams": {
456
+ "title": "Parameter Serialize Style Options For Search Params",
457
+ "description": "Options to be passed to the serialization routine.",
458
+ "type": "object",
459
+ "properties": {
460
+ "style": {
461
+ "type": "string",
462
+ "enum": [
463
+ "form",
464
+ "spaceDelimited",
465
+ "pipeDelimited",
466
+ "deepObject",
467
+ "none"
468
+ ]
469
+ },
470
+ "explode": {
471
+ "type": "boolean"
472
+ },
473
+ "allowEmptyValue": {
474
+ "type": "boolean"
475
+ },
476
+ "allowReserved": {
477
+ "description": "The allowReserved keyword specifies whether the reserved characters :/?#[]@!$&'()*+,;= in parameter values are allowed to be sent as they are.",
478
+ "type": "boolean"
479
+ },
480
+ "skipEncoding": {
481
+ "type": "boolean"
482
+ }
483
+ },
484
+ "required": [
485
+ "style"
486
+ ],
487
+ "additionalProperties": false
488
+ },
489
+ "parameterSerializeStyleOptionsForHeaders": {
490
+ "title": "Parameter Serialize Style Options For Headers",
491
+ "description": "Options to be passed to the serialization routine.",
492
+ "type": "object",
493
+ "properties": {
494
+ "style": {
495
+ "type": "string",
496
+ "enum": [
497
+ "simple",
498
+ "none"
499
+ ]
500
+ },
501
+ "explode": {
502
+ "type": "boolean"
503
+ }
504
+ },
505
+ "required": [
506
+ "style"
507
+ ],
508
+ "additionalProperties": false
509
+ },
510
+ "parameterSerializeContentOptions": {
511
+ "title": "Parameter Serialize Content Options",
512
+ "description": "Options to be passed to the serialization routine.",
513
+ "type": "object",
514
+ "properties": {
515
+ "contentType": {
516
+ "type": "string"
517
+ },
518
+ "allowReserved": {
519
+ "description": "The allowReserved keyword specifies whether the reserved characters :/?#[]@!$&'()*+,;= in parameter values are allowed to be sent as they are.",
520
+ "type": "boolean"
521
+ },
522
+ "skipEncoding": {
523
+ "type": "boolean"
524
+ },
525
+ "options": {
526
+ "description": "Options to be passed directly to the content serializer library. Valid options depend upon your contentType.",
527
+ "type": "object"
528
+ }
529
+ },
530
+ "required": [
531
+ "contentType"
532
+ ],
533
+ "additionalProperties": false
534
+ },
535
+ "parameterSerializeOptions": {
536
+ "title": "Parameter Serialize Options",
537
+ "description": "Options to be passed to the serialization routine.",
538
+ "type": "object",
539
+ "oneOf": [
540
+ {
541
+ "$ref": "#/definitions/parameterSerializeStyleOptions"
542
+ },
543
+ {
544
+ "$ref": "#/definitions/parameterSerializeContentOptions"
545
+ }
546
+ ]
547
+ },
548
+ "parameterSerializeConfig": {
549
+ "title": "Parameter Serialize Config",
550
+ "description": "All possible options for the more specific ParameterSerializeConfig types.",
551
+ "type": "object",
552
+ "properties": {
553
+ "content": {
554
+ "$ref": "#/definitions/parameterSerializeContentOptions"
555
+ },
556
+ "defaults": {
557
+ "$ref": "#/definitions/parameterSerializeOptions"
558
+ },
559
+ "paths": {
560
+ "type": "object",
561
+ "patternProperties": {
562
+ "^[^\\n\\r]*$": {
563
+ "$ref": "#/definitions/parameterSerializeOptions"
564
+ }
565
+ }
566
+ }
567
+ },
568
+ "additionalProperties": false
569
+ },
570
+ "parameterSerializeConfigForBody": {
571
+ "title": "Parameter Serialize Config For Body",
572
+ "description": "Top-level paths to use serialization options for.",
573
+ "type": "object",
574
+ "properties": {
575
+ "content": {
576
+ "$ref": "#/definitions/parameterSerializeContentOptions"
577
+ }
578
+ },
579
+ "additionalProperties": false
580
+ },
581
+ "parameterSerializeConfigForPathParams": {
582
+ "title": "Parameter Serialize Config For Path Params",
583
+ "description": "Top-level paths to use path params serialization options for.",
584
+ "type": "object",
585
+ "properties": {
586
+ "template": {
587
+ "description": "For generating the path using tokens frpm the ParameterOps, e.g., '/products/{productId}'",
588
+ "type": "string"
589
+ },
590
+ "defaults": {
591
+ "oneOf": [
592
+ {
593
+ "$ref": "#/definitions/parameterSerializeStyleOptionsForPathParams"
594
+ },
595
+ {
596
+ "$ref": "#/definitions/parameterSerializeContentOptions"
597
+ }
598
+ ]
599
+ },
600
+ "paths": {
601
+ "type": "object",
602
+ "patternProperties": {
603
+ "^[^\\n\\r]*$": {
604
+ "oneOf": [
605
+ {
606
+ "$ref": "#/definitions/parameterSerializeStyleOptionsForPathParams"
607
+ },
608
+ {
609
+ "$ref": "#/definitions/parameterSerializeContentOptions"
610
+ }
611
+ ]
612
+ }
613
+ }
614
+ }
615
+ },
616
+ "required": [
617
+ "template"
618
+ ],
619
+ "additionalProperties": false
620
+ },
621
+ "parameterSerializeConfigForSearchParams": {
622
+ "title": "Parameter Serialize Config For Search Params",
623
+ "description": "Top-level paths to use search params serialization options for.",
624
+ "type": "object",
625
+ "properties": {
626
+ "defaults": {
627
+ "oneOf": [
628
+ {
629
+ "$ref": "#/definitions/parameterSerializeStyleOptionsForSearchParams"
630
+ },
631
+ {
632
+ "$ref": "#/definitions/parameterSerializeContentOptions"
633
+ }
634
+ ]
635
+ },
636
+ "paths": {
637
+ "type": "object",
638
+ "patternProperties": {
639
+ "^[^\\n\\r]*$": {
640
+ "oneOf": [
641
+ {
642
+ "$ref": "#/definitions/parameterSerializeStyleOptionsForSearchParams"
643
+ },
644
+ {
645
+ "$ref": "#/definitions/parameterSerializeContentOptions"
646
+ }
647
+ ]
648
+ }
649
+ }
650
+ }
651
+ },
652
+ "additionalProperties": false
653
+ },
654
+ "parameterSerializeConfigForHeaders": {
655
+ "title": "Parameter Serialize Config For Headers",
656
+ "description": "Top-level paths to use headers serialization options for.",
657
+ "type": "object",
658
+ "properties": {
659
+ "defaults": {
660
+ "oneOf": [
661
+ {
662
+ "$ref": "#/definitions/parameterSerializeStyleOptionsForHeaders"
663
+ },
664
+ {
665
+ "$ref": "#/definitions/parameterSerializeContentOptions"
666
+ }
667
+ ]
668
+ },
669
+ "paths": {
670
+ "type": "object",
671
+ "patternProperties": {
672
+ "^[^\\n\\r]*$": {
673
+ "oneOf": [
674
+ {
675
+ "$ref": "#/definitions/parameterSerializeStyleOptionsForHeaders"
676
+ },
677
+ {
678
+ "$ref": "#/definitions/parameterSerializeContentOptions"
679
+ }
680
+ ]
681
+ }
682
+ }
683
+ }
684
+ },
685
+ "additionalProperties": false
686
+ },
687
+ "parameterOpNested": {
688
+ "title": "Parameter Op Nested",
689
+ "description": "An object describing an operation to generate a parameter, using a nested OpList.",
690
+ "type": "object",
691
+ "properties": {
692
+ "path": {
693
+ "description": "A path to the parameter for this operation.",
694
+ "type": "string",
695
+ "minLength": 1,
696
+ "pattern": "^[^\\n\\r]*$"
697
+ },
698
+ "op": {
699
+ "description": "A mode for this parameter's operation.",
700
+ "type": "string",
701
+ "enum": [
702
+ "set",
703
+ "concat",
704
+ "extend",
705
+ "remove"
706
+ ]
707
+ },
708
+ "ops": {
709
+ "description": "A nested op list.",
710
+ "$ref": "#/definitions/parameterOpList"
711
+ }
712
+ },
713
+ "required": [
714
+ "path",
715
+ "ops"
716
+ ],
717
+ "additionalProperties": false
718
+ },
719
+ "parameterOpValue": {
720
+ "title": "Parameter Op Value",
721
+ "description": "An object describing an operation to generate a parameter using a value.",
722
+ "type": "object",
723
+ "properties": {
724
+ "path": {
725
+ "description": "A path to the parameter for this operation.",
726
+ "type": "string",
727
+ "minLength": 1,
728
+ "pattern": "^[^\\n\\r]*$"
729
+ },
730
+ "op": {
731
+ "description": "A mode for this parameter's operation.",
732
+ "type": "string",
733
+ "enum": [
734
+ "set",
735
+ "concat",
736
+ "extend",
737
+ "remove"
738
+ ]
739
+ },
740
+ "value": {
741
+ "description": "A value to set directly at this path.",
742
+ "type": [
743
+ "number",
744
+ "string",
745
+ "boolean",
746
+ "object",
747
+ "array",
748
+ "null"
749
+ ]
750
+ }
751
+ },
752
+ "required": [
753
+ "path",
754
+ "value"
755
+ ],
756
+ "additionalProperties": false
757
+ },
758
+ "parameterOpMapping": {
759
+ "title": "Parameter Op Mapping",
760
+ "description": "An object describing an operation to generate a parameter using a mapping.",
761
+ "type": "object",
762
+ "properties": {
763
+ "path": {
764
+ "description": "A path to the parameter for this operation.",
765
+ "type": "string",
766
+ "minLength": 1,
767
+ "pattern": "^[^\\n\\r]*$"
768
+ },
769
+ "op": {
770
+ "description": "A mode for this parameter's operation.",
771
+ "type": "string",
772
+ "enum": [
773
+ "set",
774
+ "concat",
775
+ "extend",
776
+ "remove"
777
+ ]
778
+ },
779
+ "mapping": {
780
+ "description": "Either a valid JSONPath or a directive pipeline to evaluate against the query context.",
781
+ "oneOf": [
782
+ {
783
+ "type": "string",
784
+ "minLength": 1
785
+ },
786
+ {
787
+ "$ref": "#/definitions/directiveConfig"
788
+ }
789
+ ]
790
+ }
791
+ },
792
+ "required": [
793
+ "path",
794
+ "mapping"
795
+ ],
796
+ "additionalProperties": false
797
+ },
798
+ "parameterOpOp": {
799
+ "title": "Parameter Op Op",
800
+ "description": "An object describing an operation to generate a parameter using a mapping.",
801
+ "type": "object",
802
+ "properties": {
803
+ "path": {
804
+ "description": "A path to the parameter for this operation.",
805
+ "type": "string",
806
+ "minLength": 1,
807
+ "pattern": "^[^\\n\\r]*$"
808
+ },
809
+ "op": {
810
+ "description": "A mode for this parameter's operation.",
811
+ "type": "string",
812
+ "enum": [
813
+ "set",
814
+ "concat",
815
+ "extend",
816
+ "remove"
817
+ ]
818
+ }
819
+ },
820
+ "required": [
821
+ "path",
822
+ "op"
823
+ ],
824
+ "additionalProperties": false
825
+ },
826
+ "parameterOp": {
827
+ "title": "Parameter Op",
828
+ "description": "An object describing an operation to generate a parameter.",
829
+ "oneOf": [
830
+ {
831
+ "$ref": "#/definitions/parameterOpNested"
832
+ },
833
+ {
834
+ "$ref": "#/definitions/parameterOpValue"
835
+ },
836
+ {
837
+ "$ref": "#/definitions/parameterOpMapping"
838
+ },
839
+ {
840
+ "$ref": "#/definitions/parameterOpOp"
841
+ }
842
+ ]
843
+ },
844
+ "parameterOpList": {
845
+ "title": "Parameter Op List",
846
+ "type": "array",
847
+ "items": {
848
+ "$ref": "#/definitions/parameterOp"
849
+ },
850
+ "minItems": 1
851
+ },
852
+ "parameterConfig": {
853
+ "title": "Parameter Config",
854
+ "description": "All possible options for the more specific ParameterConfig types.",
855
+ "type": "object",
856
+ "properties": {
857
+ "ops": {
858
+ "$ref": "#/definitions/parameterOpList"
859
+ },
860
+ "serialize": {
861
+ "$ref": "#/definitions/parameterSerializeConfig"
862
+ }
863
+ },
864
+ "required": [
865
+ "ops"
866
+ ],
867
+ "additionalProperties": false
868
+ },
869
+ "parameterConfigForBody": {
870
+ "title": "Parameter Config For Body",
871
+ "type": "object",
872
+ "properties": {
873
+ "ops": {
874
+ "$ref": "#/definitions/parameterOpList"
875
+ },
876
+ "serialize": {
877
+ "$ref": "#/definitions/parameterSerializeConfigForBody"
878
+ }
879
+ },
880
+ "required": [
881
+ "ops"
882
+ ],
883
+ "additionalProperties": false
884
+ },
885
+ "parameterConfigForPathParams": {
886
+ "title": "Parameter Config For Path Params",
887
+ "type": "object",
888
+ "properties": {
889
+ "ops": {
890
+ "$ref": "#/definitions/parameterOpList"
891
+ },
892
+ "serialize": {
893
+ "$ref": "#/definitions/parameterSerializeConfigForPathParams"
894
+ }
895
+ },
896
+ "required": [
897
+ "ops",
898
+ "serialize"
899
+ ],
900
+ "additionalProperties": false
901
+ },
902
+ "parameterConfigForAwsLambda": {
903
+ "title": "ParameterConfigForAwsLambda",
904
+ "type": "object",
905
+ "properties": {
906
+ "ops": {
907
+ "$ref": "#/definitions/parameterOpList"
908
+ },
909
+ "serialize": {
910
+ "$ref": "#/definitions/parameterSerializeConfigForPathParams"
911
+ }
912
+ },
913
+ "required": [
914
+ "ops",
915
+ "serialize"
916
+ ],
917
+ "additionalProperties": false
918
+ },
919
+ "parameterConfigForSearchParams": {
920
+ "title": "Parameter Config For Search Params",
921
+ "type": "object",
922
+ "properties": {
923
+ "ops": {
924
+ "$ref": "#/definitions/parameterOpList"
925
+ },
926
+ "serialize": {
927
+ "$ref": "#/definitions/parameterSerializeConfigForSearchParams"
928
+ }
929
+ },
930
+ "required": [
931
+ "ops"
932
+ ],
933
+ "additionalProperties": false
934
+ },
935
+ "parameterConfigForHeaders": {
936
+ "title": "Parameter Config For Headers",
937
+ "type": "object",
938
+ "properties": {
939
+ "ops": {
940
+ "$ref": "#/definitions/parameterOpList"
941
+ },
942
+ "serialize": {
943
+ "$ref": "#/definitions/parameterSerializeConfigForHeaders"
944
+ }
945
+ },
946
+ "required": [
947
+ "ops"
948
+ ],
949
+ "additionalProperties": false
950
+ },
951
+ "parameterConfigForJson": {
952
+ "title": "Parameter Config For Json",
953
+ "type": "object",
954
+ "properties": {
955
+ "ops": {
956
+ "$ref": "#/definitions/parameterOpList"
957
+ }
958
+ },
959
+ "required": [
960
+ "ops"
961
+ ],
962
+ "additionalProperties": false
963
+ },
964
+ "directiveConfig": {
965
+ "title": "Directive Config",
966
+ "description": "An array of individual directive config items to process in order",
967
+ "type": "array",
968
+ "items": {
969
+ "$ref": "#/definitions/directiveConfigItem"
970
+ },
971
+ "minItems": 1
972
+ },
973
+ "directiveMappingMap": {
974
+ "title": "Directive Mapping Map",
975
+ "description": "An map of object keys / key paths to directive configs",
976
+ "type": "object",
977
+ "patternProperties": {
978
+ "[0-9A-Za-z_-]+": {
979
+ "$ref": "#/definitions/directiveConfig"
980
+ }
981
+ }
982
+ },
983
+ "directiveMappingArrayItem": {
984
+ "title": "Directive Mapping Array Item",
985
+ "description": "A tuple with a string key and a directive config to evaluate",
986
+ "type": "array",
987
+ "items": [
988
+ {
989
+ "type": "string"
990
+ },
991
+ {
992
+ "$ref": "#/definitions/directiveConfig"
993
+ }
994
+ ]
995
+ },
996
+ "directiveMappingArray": {
997
+ "title": "Directive Mapping Array",
998
+ "description": "An array of key / value or directive config tuples",
999
+ "type": "array",
1000
+ "items": {
1001
+ "$ref": "#/definitions/directiveMappingArrayItem"
1002
+ }
1003
+ },
1004
+ "basicResolver": {
1005
+ "title": "BasicResolver",
1006
+ "description": "A single resolver, can be composed with the ComposeResolver.",
1007
+ "discriminator": {
1008
+ "propertyName": "name"
1009
+ },
1010
+ "oneOf": [
1011
+ {
1012
+ "$ref": "#/definitions/utilResolver"
1013
+ },
1014
+ {
1015
+ "$ref": "#/definitions/delegateResolver"
1016
+ },
1017
+ {
1018
+ "$ref": "#/definitions/takeshapeResolver"
1019
+ },
1020
+ {
1021
+ "$ref": "#/definitions/internalTakeshapeResolver"
1022
+ },
1023
+ {
1024
+ "$ref": "#/definitions/graphqlResolver"
1025
+ },
1026
+ {
1027
+ "$ref": "#/definitions/restResolver"
1028
+ },
1029
+ {
1030
+ "$ref": "#/definitions/awsLambdaResolver"
1031
+ }
1032
+ ]
1033
+ },
1034
+ "serviceResolver": {
1035
+ "title": "ServiceResolver",
1036
+ "description": "A resolver which references a specific service",
1037
+ "discriminator": {
1038
+ "propertyName": "name"
1039
+ },
1040
+ "oneOf": [
1041
+ {
1042
+ "$ref": "#/definitions/utilResolver"
1043
+ },
1044
+ {
1045
+ "$ref": "#/definitions/takeshapeResolver"
1046
+ },
1047
+ {
1048
+ "$ref": "#/definitions/internalTakeshapeResolver"
1049
+ },
1050
+ {
1051
+ "$ref": "#/definitions/graphqlResolver"
1052
+ },
1053
+ {
1054
+ "$ref": "#/definitions/restResolver"
1055
+ },
1056
+ {
1057
+ "$ref": "#/definitions/awsLambdaResolver"
1058
+ }
1059
+ ]
1060
+ },
1061
+ "argsMapping": {
1062
+ "title": "ArgsMapping",
1063
+ "description": "Maps a query's input args to the input expected by the service's endpoint.",
1064
+ "oneOf": [
1065
+ {
1066
+ "$ref": "#/definitions/directiveMappingMap"
1067
+ },
1068
+ {
1069
+ "$ref": "#/definitions/directiveConfig"
1070
+ }
1071
+ ]
1072
+ },
1073
+ "searchParamsMapping": {
1074
+ "title": "SearchParamsMapping",
1075
+ "description": "Set or evaluate directives to generate searchParams for the service endpoint.",
1076
+ "$ref": "#/definitions/directiveMappingArray"
1077
+ },
1078
+ "resultsMapping": {
1079
+ "title": "ResultsMapping",
1080
+ "description": "Maps a service endpoint's response results to the expected shape of the query's response.",
1081
+ "oneOf": [
1082
+ {
1083
+ "$ref": "#/definitions/directiveMappingMap"
1084
+ },
1085
+ {
1086
+ "$ref": "#/definitions/directiveConfig"
1087
+ }
1088
+ ]
1089
+ },
1090
+ "utilResolver": {
1091
+ "title": "UtilResolver",
1092
+ "type": "object",
1093
+ "properties": {
1094
+ "if": {
1095
+ "type": "string"
1096
+ },
1097
+ "id": {
1098
+ "type": "string",
1099
+ "pattern": "^(?=[a-zA-Z])[-_a-zA-Z0-9]+$"
1100
+ },
1101
+ "name": {
1102
+ "title": "UtilResolverName",
1103
+ "type": "string",
1104
+ "description": "Name of the resolver function.",
1105
+ "enum": [
1106
+ "debug:noop",
1107
+ "util:wrap"
1108
+ ]
1109
+ },
1110
+ "service": {
1111
+ "type": "string",
1112
+ "description": "Configuration for a service to use with this resolver."
1113
+ },
1114
+ "options": {
1115
+ "title": "UtilResolverOptions",
1116
+ "type": "object",
1117
+ "additionalProperties": true
1118
+ },
1119
+ "args": {
1120
+ "description": "Mapping and serialization configuration for args.",
1121
+ "$ref": "#/definitions/parameterConfigForJson"
1122
+ },
1123
+ "results": {
1124
+ "description": "Mapping configuration for the results of this resolver step.",
1125
+ "$ref": "#/definitions/parameterConfigForJson"
1126
+ },
1127
+ "argsMapping": {
1128
+ "$ref": "#/definitions/argsMapping"
1129
+ },
1130
+ "resultsMapping": {
1131
+ "$ref": "#/definitions/resultsMapping"
1132
+ }
1133
+ },
1134
+ "required": [
1135
+ "name",
1136
+ "service"
1137
+ ],
1138
+ "additionalProperties": false
1139
+ },
1140
+ "delegateResolver": {
1141
+ "title": "DelegateResolver",
1142
+ "type": "object",
1143
+ "properties": {
1144
+ "if": {
1145
+ "type": "string"
1146
+ },
1147
+ "id": {
1148
+ "type": "string",
1149
+ "pattern": "^(?=[a-zA-Z])[-_a-zA-Z0-9]+$"
1150
+ },
1151
+ "name": {
1152
+ "title": "Delegate Resolver Name",
1153
+ "type": "string",
1154
+ "description": "Name of the resolver function.",
1155
+ "enum": [
1156
+ "delegate"
1157
+ ]
1158
+ },
1159
+ "options": {
1160
+ "title": "DelegateResolverOptions",
1161
+ "type": "object",
1162
+ "additionalProperties": true
1163
+ },
1164
+ "argsMapping": {
1165
+ "$ref": "#/definitions/argsMapping"
1166
+ },
1167
+ "resultsMapping": {
1168
+ "$ref": "#/definitions/resultsMapping"
1169
+ },
1170
+ "to": {
1171
+ "description": "A ref to a query/mutation/property to delegate to.",
1172
+ "type": "string",
1173
+ "minLength": 1
1174
+ },
1175
+ "args": {
1176
+ "description": "Mapping and serialization configuration for args.",
1177
+ "$ref": "#/definitions/parameterConfigForJson"
1178
+ },
1179
+ "results": {
1180
+ "description": "Mapping configuration for the results of this resolver step.",
1181
+ "$ref": "#/definitions/parameterConfigForJson"
1182
+ }
1183
+ },
1184
+ "required": [
1185
+ "name",
1186
+ "to"
1187
+ ],
1188
+ "additionalProperties": false
1189
+ },
1190
+ "takeshapeResolver": {
1191
+ "title": "TakeshapeResolver",
1192
+ "type": "object",
1193
+ "properties": {
1194
+ "if": {
1195
+ "type": "string"
1196
+ },
1197
+ "id": {
1198
+ "type": "string",
1199
+ "pattern": "^(?=[a-zA-Z])[-_a-zA-Z0-9]+$"
1200
+ },
1201
+ "name": {
1202
+ "title": "TakeshapeResolverName",
1203
+ "type": "string",
1204
+ "description": "Name of the resolver function.",
1205
+ "enum": [
1206
+ "takeshape:get",
1207
+ "takeshape:create",
1208
+ "takeshape:update",
1209
+ "takeshape:delete",
1210
+ "takeshape:duplicate",
1211
+ "takeshape:find",
1212
+ "takeshape:queryApiIndex"
1213
+ ]
1214
+ },
1215
+ "service": {
1216
+ "type": "string",
1217
+ "description": "Internal service identifier.",
1218
+ "enum": [
1219
+ "takeshape:local"
1220
+ ]
1221
+ },
1222
+ "options": {
1223
+ "title": "TakeshapeResolverOptions",
1224
+ "type": "object",
1225
+ "additionalProperties": true
1226
+ },
1227
+ "argsMapping": {
1228
+ "$ref": "#/definitions/argsMapping"
1229
+ },
1230
+ "resultsMapping": {
1231
+ "$ref": "#/definitions/resultsMapping"
1232
+ },
1233
+ "shapeName": {
1234
+ "description": "A Shape name for the resolver to use.",
1235
+ "type": "string",
1236
+ "minLength": 1
1237
+ },
1238
+ "args": {
1239
+ "description": "Mapping and serialization configuration for args.",
1240
+ "$ref": "#/definitions/parameterConfigForJson"
1241
+ },
1242
+ "results": {
1243
+ "description": "Mapping configuration for the results of this resolver step.",
1244
+ "$ref": "#/definitions/parameterConfigForJson"
1245
+ }
1246
+ },
1247
+ "required": [
1248
+ "name",
1249
+ "service",
1250
+ "shapeName"
1251
+ ],
1252
+ "additionalProperties": false
1253
+ },
1254
+ "internalTakeshapeResolver": {
1255
+ "title": "InternalTakeshapeResolver",
1256
+ "type": "object",
1257
+ "properties": {
1258
+ "if": {
1259
+ "type": "string"
1260
+ },
1261
+ "id": {
1262
+ "type": "string",
1263
+ "pattern": "^(?=[a-zA-Z])[-_a-zA-Z0-9]+$"
1264
+ },
1265
+ "name": {
1266
+ "title": "InternalTakeshapeResolverName",
1267
+ "type": "string",
1268
+ "description": "Name of the resolver function.",
1269
+ "enum": [
1270
+ "takeshape:getRelated",
1271
+ "takeshape:getUser",
1272
+ "takeshape:taxonomySuggest",
1273
+ "takeshape:list",
1274
+ "takeshape:search"
1275
+ ]
1276
+ },
1277
+ "service": {
1278
+ "type": "string",
1279
+ "description": "Internal service identifier.",
1280
+ "enum": [
1281
+ "takeshape:local"
1282
+ ]
1283
+ },
1284
+ "options": {
1285
+ "title": "TakeshapeResolverOptions",
1286
+ "type": "object",
1287
+ "additionalProperties": true
1288
+ },
1289
+ "shapeName": {
1290
+ "description": "An optional Shape name for the resolver.",
1291
+ "type": "string",
1292
+ "minLength": 1
1293
+ },
1294
+ "args": {
1295
+ "description": "Mapping and serialization configuration for args.",
1296
+ "$ref": "#/definitions/parameterConfigForJson"
1297
+ },
1298
+ "results": {
1299
+ "description": "Mapping configuration for the results of this resolver step.",
1300
+ "$ref": "#/definitions/parameterConfigForJson"
1301
+ },
1302
+ "argsMapping": {
1303
+ "$ref": "#/definitions/argsMapping"
1304
+ },
1305
+ "resultsMapping": {
1306
+ "$ref": "#/definitions/resultsMapping"
1307
+ }
1308
+ },
1309
+ "required": [
1310
+ "name",
1311
+ "service"
1312
+ ],
1313
+ "additionalProperties": false
1314
+ },
1315
+ "graphqlResolver": {
1316
+ "title": "GraphqlResolver",
1317
+ "type": "object",
1318
+ "properties": {
1319
+ "if": {
1320
+ "type": "string"
1321
+ },
1322
+ "id": {
1323
+ "type": "string",
1324
+ "pattern": "^(?=[a-zA-Z])[-_a-zA-Z0-9]+$"
1325
+ },
1326
+ "name": {
1327
+ "title": "GraphqlResolverName",
1328
+ "type": "string",
1329
+ "description": "Name of the resolver function.",
1330
+ "enum": [
1331
+ "graphql:query",
1332
+ "graphql:mutation"
1333
+ ]
1334
+ },
1335
+ "service": {
1336
+ "type": "string",
1337
+ "description": "Configuration for a service to use with this resolver."
1338
+ },
1339
+ "argsMapping": {
1340
+ "$ref": "#/definitions/argsMapping"
1341
+ },
1342
+ "resultsMapping": {
1343
+ "$ref": "#/definitions/resultsMapping"
1344
+ },
1345
+ "options": {
1346
+ "title": "GraphqlResolverOptions",
1347
+ "type": "object",
1348
+ "properties": {
1349
+ "selectionSet": {
1350
+ "type": "string"
1351
+ },
1352
+ "unboxParentSelectionSet": {
1353
+ "type": "boolean"
1354
+ },
1355
+ "ignoreErrors": {
1356
+ "type": "boolean"
1357
+ },
1358
+ "skipWhenMissingArgs": {
1359
+ "type": "boolean"
1360
+ },
1361
+ "ttl": {
1362
+ "type": "number"
1363
+ },
1364
+ "timeout": {
1365
+ "type": "number"
1366
+ },
1367
+ "retry": {
1368
+ "oneOf": [
1369
+ {
1370
+ "type": "number"
1371
+ },
1372
+ {
1373
+ "type": "object"
1374
+ }
1375
+ ]
1376
+ }
1377
+ },
1378
+ "additionalProperties": true
1379
+ },
1380
+ "fieldName": {
1381
+ "description": "A fieldname to use in queries.",
1382
+ "type": "string"
1383
+ },
1384
+ "headers": {
1385
+ "description": "Mapping and serialization configuration for headers.",
1386
+ "$ref": "#/definitions/parameterConfigForHeaders"
1387
+ },
1388
+ "searchParams": {
1389
+ "description": "Mapping and serialization configuration for searchParams.",
1390
+ "$ref": "#/definitions/parameterConfigForSearchParams"
1391
+ },
1392
+ "args": {
1393
+ "description": "Mapping and serialization configuration for args.",
1394
+ "$ref": "#/definitions/parameterConfigForJson"
1395
+ },
1396
+ "results": {
1397
+ "description": "Mapping configuration for the results of this resolver step.",
1398
+ "$ref": "#/definitions/parameterConfigForJson"
1399
+ }
1400
+ },
1401
+ "required": [
1402
+ "name",
1403
+ "service",
1404
+ "fieldName"
1405
+ ],
1406
+ "additionalProperties": false
1407
+ },
1408
+ "restResolver": {
1409
+ "title": "RestResolver",
1410
+ "type": "object",
1411
+ "properties": {
1412
+ "if": {
1413
+ "type": "string"
1414
+ },
1415
+ "id": {
1416
+ "type": "string",
1417
+ "pattern": "^(?=[a-zA-Z])[-_a-zA-Z0-9]+$"
1418
+ },
1419
+ "name": {
1420
+ "title": "RestResolverName",
1421
+ "type": "string",
1422
+ "description": "Name of the resolver function.",
1423
+ "enum": [
1424
+ "rest:get",
1425
+ "rest:head",
1426
+ "rest:post",
1427
+ "rest:put",
1428
+ "rest:patch",
1429
+ "rest:delete"
1430
+ ]
1431
+ },
1432
+ "service": {
1433
+ "type": "string",
1434
+ "description": "Configuration for a service to use with this resolver."
1435
+ },
1436
+ "argsMapping": {
1437
+ "$ref": "#/definitions/argsMapping"
1438
+ },
1439
+ "searchParamsMapping": {
1440
+ "$ref": "#/definitions/searchParamsMapping"
1441
+ },
1442
+ "resultsMapping": {
1443
+ "$ref": "#/definitions/resultsMapping"
1444
+ },
1445
+ "options": {
1446
+ "title": "RestResolverOptions",
1447
+ "type": "object",
1448
+ "properties": {
1449
+ "trailingSlash": {
1450
+ "type": "boolean"
1451
+ },
1452
+ "ttl": {
1453
+ "type": "number"
1454
+ },
1455
+ "timeout": {
1456
+ "type": "number"
1457
+ },
1458
+ "retry": {
1459
+ "oneOf": [
1460
+ {
1461
+ "type": "number"
1462
+ },
1463
+ {
1464
+ "type": "object"
1465
+ }
1466
+ ]
1467
+ }
1468
+ },
1469
+ "additionalProperties": true
1470
+ },
1471
+ "body": {
1472
+ "description": "Mapping and serialization configuration for a request body.",
1473
+ "$ref": "#/definitions/parameterConfigForBody"
1474
+ },
1475
+ "form": {
1476
+ "description": "Mapping and serialization configuration for form data.",
1477
+ "$ref": "#/definitions/parameterConfigForSearchParams"
1478
+ },
1479
+ "headers": {
1480
+ "description": "Mapping and serialization configuration for headers.",
1481
+ "$ref": "#/definitions/parameterConfigForHeaders"
1482
+ },
1483
+ "json": {
1484
+ "description": "Mapping and serialization configuration for a json request body.",
1485
+ "$ref": "#/definitions/parameterConfigForJson"
1486
+ },
1487
+ "path": {
1488
+ "description": "Mapping and serialization configuration for the path, or a simple string.",
1489
+ "oneOf": [
1490
+ {
1491
+ "$ref": "#/definitions/parameterConfigForPathParams"
1492
+ },
1493
+ {
1494
+ "type": "string"
1495
+ }
1496
+ ]
1497
+ },
1498
+ "searchParams": {
1499
+ "description": "Mapping and serialization configuration for searchParams.",
1500
+ "$ref": "#/definitions/parameterConfigForSearchParams"
1501
+ },
1502
+ "args": {
1503
+ "description": "Mapping and serialization configuration for args.",
1504
+ "$ref": "#/definitions/parameterConfigForJson"
1505
+ },
1506
+ "results": {
1507
+ "description": "Mapping configuration for the results of this resolver step.",
1508
+ "$ref": "#/definitions/parameterConfigForJson"
1509
+ }
1510
+ },
1511
+ "required": [
1512
+ "name",
1513
+ "service",
1514
+ "path"
1515
+ ],
1516
+ "additionalProperties": false
1517
+ },
1518
+ "awsLambdaResolver": {
1519
+ "title": "AwsLambdaResolver",
1520
+ "type": "object",
1521
+ "properties": {
1522
+ "if": {
1523
+ "type": "string"
1524
+ },
1525
+ "id": {
1526
+ "type": "string",
1527
+ "pattern": "^(?=[a-zA-Z])[-_a-zA-Z0-9]+$"
1528
+ },
1529
+ "name": {
1530
+ "title": "AwsLambdaResolverName",
1531
+ "type": "string",
1532
+ "description": "Name of the resolver function.",
1533
+ "enum": [
1534
+ "awsLambda:invoke"
1535
+ ]
1536
+ },
1537
+ "service": {
1538
+ "type": "string",
1539
+ "description": "Configuration for a service to use with this resolver."
1540
+ },
1541
+ "options": {
1542
+ "title": "AwsLambdaResolverOptions",
1543
+ "type": "object",
1544
+ "additionalProperties": true
1545
+ },
1546
+ "payload": {
1547
+ "description": "Mapping configuration the Payload.",
1548
+ "$ref": "#/definitions/parameterConfigForJson"
1549
+ },
1550
+ "functionName": {
1551
+ "description": "Mapping configuration for the FunctionName.",
1552
+ "oneOf": [
1553
+ {
1554
+ "type": "string"
1555
+ },
1556
+ {
1557
+ "$ref": "#/definitions/parameterConfigForAwsLambda"
1558
+ }
1559
+ ]
1560
+ },
1561
+ "clientContext": {
1562
+ "description": "Mapping configuration for the ClientContext.",
1563
+ "$ref": "#/definitions/parameterConfigForJson"
1564
+ },
1565
+ "args": {
1566
+ "description": "Mapping and serialization configuration for args.",
1567
+ "$ref": "#/definitions/parameterConfigForJson"
1568
+ },
1569
+ "results": {
1570
+ "description": "Mapping configuration for the results of this resolver step.",
1571
+ "$ref": "#/definitions/parameterConfigForJson"
1572
+ },
1573
+ "argsMapping": {
1574
+ "$ref": "#/definitions/argsMapping"
1575
+ },
1576
+ "searchParamsMapping": {
1577
+ "description": "Set or evaluate directives to generate searchParams for the service endpoint.",
1578
+ "$ref": "#/definitions/searchParamsMapping"
1579
+ },
1580
+ "resultsMapping": {
1581
+ "$ref": "#/definitions/resultsMapping"
1582
+ }
1583
+ },
1584
+ "required": [
1585
+ "name",
1586
+ "service",
1587
+ "functionName"
1588
+ ],
1589
+ "additionalProperties": false
1590
+ },
1591
+ "composeResolver": {
1592
+ "title": "ComposeResolver",
1593
+ "type": "object",
1594
+ "properties": {
1595
+ "compose": {
1596
+ "type": "array",
1597
+ "items": {
1598
+ "$ref": "#/definitions/basicResolver"
1599
+ }
1600
+ },
1601
+ "resultsMapping": {
1602
+ "oneOf": [
1603
+ {
1604
+ "$ref": "#/definitions/directiveMappingMap"
1605
+ },
1606
+ {
1607
+ "$ref": "#/definitions/directiveConfig"
1608
+ }
1609
+ ]
1610
+ },
1611
+ "results": {
1612
+ "description": "Mapping configuration for final query results.",
1613
+ "$ref": "#/definitions/parameterConfigForJson"
1614
+ }
1615
+ },
1616
+ "required": [
1617
+ "compose"
1618
+ ],
1619
+ "additionalProperties": false
1620
+ },
1621
+ "resolver": {
1622
+ "title": "Resolver",
1623
+ "oneOf": [
1624
+ {
1625
+ "$ref": "#/definitions/basicResolver"
1626
+ },
1627
+ {
1628
+ "$ref": "#/definitions/composeResolver"
1629
+ }
1630
+ ]
1631
+ },
1632
+ "ref": {
1633
+ "title": "Ref",
1634
+ "type": "string"
1635
+ },
1636
+ "query": {
1637
+ "title": "Query",
1638
+ "type": "object",
1639
+ "properties": {
1640
+ "args": {
1641
+ "description": "The args field specifies the name of a Shape for the input arguments required by your resolver.",
1642
+ "$ref": "#/definitions/args"
1643
+ },
1644
+ "resolver": {
1645
+ "description": "Configures the resolver for your query or mutation.",
1646
+ "$ref": "#/definitions/resolver"
1647
+ },
1648
+ "shape": {
1649
+ "$ref": "#/definitions/returnShape",
1650
+ "description": "Specifies which shape is returned by the query or mutation. The shape can refer to a shape in the schema's \"shapes\" object or a shape that's available on a service schema."
1651
+ },
1652
+ "description": {
1653
+ "type": "string",
1654
+ "description": "Provides more detail about what the query or mutation is for. This will be displayed in the automatically-generated GraphQL API docs."
1655
+ }
1656
+ },
1657
+ "required": [
1658
+ "resolver",
1659
+ "shape"
1660
+ ],
1661
+ "additionalProperties": false
1662
+ },
1663
+ "propertySchema": {
1664
+ "title": "PropertySchema",
1665
+ "type": "object",
1666
+ "properties": {
1667
+ "$ref": {
1668
+ "type": "string",
1669
+ "format": "uri-reference"
1670
+ },
1671
+ "title": {
1672
+ "type": "string"
1673
+ },
1674
+ "description": {
1675
+ "type": "string"
1676
+ },
1677
+ "default": {},
1678
+ "readOnly": {
1679
+ "type": "boolean",
1680
+ "default": false
1681
+ },
1682
+ "multipleOf": {
1683
+ "type": "number",
1684
+ "exclusiveMinimum": 0
1685
+ },
1686
+ "maximum": {
1687
+ "type": "number"
1688
+ },
1689
+ "exclusiveMaximum": {
1690
+ "type": "number"
1691
+ },
1692
+ "minimum": {
1693
+ "type": "number"
1694
+ },
1695
+ "exclusiveMinimum": {
1696
+ "type": "number"
1697
+ },
1698
+ "maxLength": {
1699
+ "$ref": "#/definitions/nonNegativeInteger"
1700
+ },
1701
+ "minLength": {
1702
+ "$ref": "#/definitions/nonNegativeIntegerDefault0"
1703
+ },
1704
+ "pattern": {
1705
+ "type": "string",
1706
+ "format": "regex"
1707
+ },
1708
+ "additionalItems": {
1709
+ "$ref": "#/definitions/propertySchema"
1710
+ },
1711
+ "items": {
1712
+ "$ref": "#/definitions/propertySchema"
1713
+ },
1714
+ "maxItems": {
1715
+ "$ref": "#/definitions/nonNegativeInteger"
1716
+ },
1717
+ "minItems": {
1718
+ "$ref": "#/definitions/nonNegativeIntegerDefault0"
1719
+ },
1720
+ "uniqueItems": {
1721
+ "type": "boolean",
1722
+ "default": false
1723
+ },
1724
+ "contains": {
1725
+ "$ref": "#/definitions/propertySchema"
1726
+ },
1727
+ "maxProperties": {
1728
+ "$ref": "#/definitions/nonNegativeInteger"
1729
+ },
1730
+ "minProperties": {
1731
+ "$ref": "#/definitions/nonNegativeIntegerDefault0"
1732
+ },
1733
+ "required": {
1734
+ "$ref": "#/definitions/stringArray"
1735
+ },
1736
+ "additionalProperties": {
1737
+ "oneOf": [
1738
+ {
1739
+ "$ref": "#/definitions/propertySchema"
1740
+ },
1741
+ {
1742
+ "enum": [
1743
+ false
1744
+ ]
1745
+ }
1746
+ ]
1747
+ },
1748
+ "definitions": {
1749
+ "type": "object",
1750
+ "additionalProperties": {
1751
+ "$ref": "#/definitions/propertySchema"
1752
+ },
1753
+ "default": {}
1754
+ },
1755
+ "properties": {
1756
+ "type": "object",
1757
+ "additionalProperties": {
1758
+ "$ref": "#/definitions/propertySchema"
1759
+ },
1760
+ "default": {}
1761
+ },
1762
+ "const": {},
1763
+ "enum": {
1764
+ "type": "array",
1765
+ "minItems": 1,
1766
+ "uniqueItems": true
1767
+ },
1768
+ "type": {
1769
+ "anyOf": [
1770
+ {
1771
+ "$ref": "#/definitions/simpleTypes"
1772
+ },
1773
+ {
1774
+ "type": "array",
1775
+ "items": {
1776
+ "$ref": "#/definitions/simpleTypes"
1777
+ },
1778
+ "minItems": 1,
1779
+ "uniqueItems": true
1780
+ }
1781
+ ]
1782
+ },
1783
+ "format": {
1784
+ "type": "string"
1785
+ },
1786
+ "contentMediaType": {
1787
+ "type": "string"
1788
+ },
1789
+ "contentEncoding": {
1790
+ "type": "string"
1791
+ },
1792
+ "allOf": {
1793
+ "$ref": "#/definitions/schemaArray"
1794
+ },
1795
+ "discriminator": {
1796
+ "type": "object",
1797
+ "properties": {
1798
+ "propertyName": {
1799
+ "type": "string"
1800
+ }
1801
+ }
1802
+ },
1803
+ "oneOf": {
1804
+ "$ref": "#/definitions/schemaArray"
1805
+ },
1806
+ "extends": {
1807
+ "$ref": "#/definitions/objectOrRefArray"
1808
+ },
1809
+ "@backreference": {
1810
+ "$ref": "#/definitions/backreference"
1811
+ },
1812
+ "@input": {
1813
+ "description": "A PropertySchema providing an alternative shape for a GraphQL input type.",
1814
+ "$ref": "#/definitions/propertySchema"
1815
+ },
1816
+ "@output": {
1817
+ "description": "A PropertySchema which is original output.",
1818
+ "$ref": "#/definitions/propertySchema"
1819
+ },
1820
+ "@syncLocaleStructure": {
1821
+ "type": "boolean"
1822
+ },
1823
+ "@sensitive": {
1824
+ "type": "boolean"
1825
+ },
1826
+ "@draftjs": {
1827
+ "type": "boolean"
1828
+ },
1829
+ "@l10n": {
1830
+ "type": "boolean"
1831
+ },
1832
+ "@key": {
1833
+ "type": "string",
1834
+ "pattern": "^[-_a-zA-Z0-9]+$"
1835
+ },
1836
+ "@workflow": {
1837
+ "type": "string"
1838
+ },
1839
+ "@mapping": {
1840
+ "$ref": "#/definitions/fieldMapping"
1841
+ },
1842
+ "@tag": {
1843
+ "type": "string"
1844
+ },
1845
+ "@tags": {
1846
+ "type": "array",
1847
+ "items": {
1848
+ "type": "string"
1849
+ }
1850
+ },
1851
+ "@deprecationReason": {
1852
+ "type": "string"
1853
+ },
1854
+ "@args": {
1855
+ "$ref": "#/definitions/args"
1856
+ },
1857
+ "@resolver": {
1858
+ "$ref": "#/definitions/resolver"
1859
+ },
1860
+ "@ref": {
1861
+ "$ref": "#/definitions/ref"
1862
+ },
1863
+ "@derivedFrom": {
1864
+ "type": "string"
1865
+ }
1866
+ },
1867
+ "additionalProperties": false
1868
+ },
1869
+ "shape": {
1870
+ "title": "Shape",
1871
+ "description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
1872
+ "type": "object",
1873
+ "properties": {
1874
+ "name": {
1875
+ "type": "string",
1876
+ "pattern": "^[_a-zA-Z][_a-zA-Z0-9]*$",
1877
+ "description": "The Pascal-cased human-readable id for a Shape. This value should match the shape's key in the shapes object. This value is used in @ref and @mapping annotations"
1878
+ },
1879
+ "id": {
1880
+ "type": "string",
1881
+ "pattern": "[0-9A-Za-z_-]+",
1882
+ "description": "The machine-readable id for a Shape which should never change. When using TakeShape's built-in database to store Shape data, this value is used database as a stable \"table name\" and changing it will result in orphaning that data."
1883
+ },
1884
+ "title": {
1885
+ "type": "string",
1886
+ "description": "The human-readable name for a Shape for use in a UI."
1887
+ },
1888
+ "description": {
1889
+ "type": "string"
1890
+ },
1891
+ "type": {
1892
+ "enum": [
1893
+ "interface",
1894
+ "input",
1895
+ "output"
1896
+ ]
1897
+ },
1898
+ "interfaces": {
1899
+ "type": "array",
1900
+ "items": {
1901
+ "type": "string"
1902
+ }
1903
+ },
1904
+ "model": {
1905
+ "description": "Specifying a model type allows Shape data to be stored in TakeShape's built-in database",
1906
+ "type": "object",
1907
+ "properties": {
1908
+ "type": {
1909
+ "title": "Model Type",
1910
+ "type": "string",
1911
+ "enum": [
1912
+ "single",
1913
+ "multiple",
1914
+ "taxonomy"
1915
+ ]
1916
+ }
1917
+ },
1918
+ "required": [
1919
+ "type"
1920
+ ],
1921
+ "additionalProperties": false
1922
+ },
1923
+ "workflow": {
1924
+ "type": "string"
1925
+ },
1926
+ "schema": {
1927
+ "$ref": "#/definitions/shapeSchema"
1928
+ }
1929
+ },
1930
+ "required": [
1931
+ "name",
1932
+ "title",
1933
+ "id",
1934
+ "schema"
1935
+ ],
1936
+ "additionalProperties": false
1937
+ },
1938
+ "shapeWithObjectSchema": {
1939
+ "title": "Shape With Object Schema",
1940
+ "type": "object",
1941
+ "allOf": [
1942
+ {
1943
+ "$ref": "#/definitions/shape"
1944
+ },
1945
+ {
1946
+ "type": "object",
1947
+ "properties": {
1948
+ "schema": {
1949
+ "$ref": "#/definitions/objectSchema"
1950
+ }
1951
+ },
1952
+ "required": [
1953
+ "schema"
1954
+ ],
1955
+ "additionalProperties": false
1956
+ }
1957
+ ]
1958
+ },
1959
+ "shapeMap": {
1960
+ "title": "Shape Map",
1961
+ "type": "object",
1962
+ "patternProperties": {
1963
+ "[0-9A-Za-z_-]+": {
1964
+ "$ref": "#/definitions/shape"
1965
+ }
1966
+ }
1967
+ },
1968
+ "formMap": {
1969
+ "title": "Form Map",
1970
+ "type": "object",
1971
+ "patternProperties": {
1972
+ "[0-9A-Za-z_-]+": {
1973
+ "$ref": "#/definitions/formsConfig"
1974
+ }
1975
+ }
1976
+ },
1977
+ "indexedShapeMap": {
1978
+ "title": "Indexed Shape Map",
1979
+ "type": "object",
1980
+ "patternProperties": {
1981
+ "[0-9A-Za-z_-]+": {
1982
+ "$ref": "#/definitions/indexedShapeConfig"
1983
+ }
1984
+ }
1985
+ },
1986
+ "indexedShapeConfig": {
1987
+ "title": "Indexed Shape Config",
1988
+ "type": "object",
1989
+ "properties": {
1990
+ "idField": {
1991
+ "type": "string"
1992
+ },
1993
+ "searchSummaryField": {
1994
+ "type": "string"
1995
+ },
1996
+ "query": {
1997
+ "$ref": "#/definitions/indexedShapeQueryConfig"
1998
+ },
1999
+ "queries": {
2000
+ "$ref": "#/definitions/indexedShapeQueriesConfig"
2001
+ },
2002
+ "triggers": {
2003
+ "type": "array",
2004
+ "items": {
2005
+ "$ref": "#/definitions/indexedShapeTriggersConfig"
2006
+ }
2007
+ }
2008
+ },
2009
+ "additionalProperties": false,
2010
+ "required": [
2011
+ "queries",
2012
+ "triggers"
2013
+ ]
2014
+ },
2015
+ "indexedShapeQueriesConfig": {
2016
+ "title": "Indexed Shape Queries Config",
2017
+ "type": "object",
2018
+ "properties": {
2019
+ "list": {
2020
+ "$ref": "#/definitions/indexedShapeListQueryConfig"
2021
+ },
2022
+ "get": {
2023
+ "$ref": "#/definitions/indexedShapeGetQueryConfig"
2024
+ }
2025
+ },
2026
+ "additionalProperties": false
2027
+ },
2028
+ "indexedShapeQueryConfig": {
2029
+ "title": "Indexed Shape Query Config",
2030
+ "type": "object",
2031
+ "properties": {
2032
+ "ignoreFields": {
2033
+ "type": "array",
2034
+ "items": {
2035
+ "type": "string"
2036
+ }
2037
+ },
2038
+ "maxDepth": {
2039
+ "type": "number"
2040
+ },
2041
+ "selectionSet": {
2042
+ "type": "string"
2043
+ }
2044
+ },
2045
+ "additionalProperties": false
2046
+ },
2047
+ "indexedShapeListQueryConfig": {
2048
+ "title": "Indexed Shape List Query Config",
2049
+ "type": "object",
2050
+ "properties": {
2051
+ "name": {
2052
+ "type": "string"
2053
+ },
2054
+ "pagination": {
2055
+ "$ref": "#/definitions/paginationConfig"
2056
+ }
2057
+ },
2058
+ "additionalProperties": false,
2059
+ "required": [
2060
+ "name"
2061
+ ]
2062
+ },
2063
+ "indexedShapeGetQueryConfig": {
2064
+ "title": "Indexed Shape Get Query Config",
2065
+ "type": "object",
2066
+ "properties": {
2067
+ "name": {
2068
+ "type": "string"
2069
+ },
2070
+ "idArg": {
2071
+ "type": "string"
2072
+ }
2073
+ },
2074
+ "additionalProperties": false,
2075
+ "required": [
2076
+ "name"
2077
+ ]
2078
+ },
2079
+ "paginationConfig": {
2080
+ "title": "Pagination Config",
2081
+ "oneOf": [
2082
+ {
2083
+ "$ref": "#/definitions/paginationCursorConfig"
2084
+ },
2085
+ {
2086
+ "$ref": "#/definitions/paginationPageConfig"
2087
+ },
2088
+ {
2089
+ "$ref": "#/definitions/paginationOffsetConfig"
2090
+ }
2091
+ ]
2092
+ },
2093
+ "paginationCursorConfig": {
2094
+ "title": "Pagination Cursor Config",
2095
+ "type": "object",
2096
+ "properties": {
2097
+ "type": {
2098
+ "type": "string",
2099
+ "enum": [
2100
+ "cursor"
2101
+ ]
2102
+ },
2103
+ "cursorArg": {
2104
+ "type": "string"
2105
+ },
2106
+ "cursorPath": {
2107
+ "type": "string"
2108
+ },
2109
+ "pageSize": {
2110
+ "type": "number"
2111
+ },
2112
+ "pageSizeArg": {
2113
+ "type": "string"
2114
+ },
2115
+ "hasMorePath": {
2116
+ "type": "string"
2117
+ },
2118
+ "itemsToIndexPath": {
2119
+ "type": "string"
2120
+ }
2121
+ },
2122
+ "additionalProperties": false,
2123
+ "required": [
2124
+ "type",
2125
+ "cursorArg",
2126
+ "cursorPath",
2127
+ "pageSizeArg",
2128
+ "hasMorePath",
2129
+ "itemsToIndexPath"
2130
+ ]
2131
+ },
2132
+ "paginationPageConfig": {
2133
+ "title": "Pagination Page Config",
2134
+ "type": "object",
2135
+ "properties": {
2136
+ "type": {
2137
+ "type": "string",
2138
+ "enum": [
2139
+ "page"
2140
+ ]
2141
+ },
2142
+ "pageArg": {
2143
+ "type": "string"
2144
+ },
2145
+ "pageSize": {
2146
+ "type": "number"
2147
+ },
2148
+ "pageSizeArg": {
2149
+ "type": "string"
2150
+ },
2151
+ "itemsToIndexPath": {
2152
+ "type": "string"
2153
+ },
2154
+ "pageTotalPath": {
2155
+ "type": "string"
2156
+ }
2157
+ },
2158
+ "additionalProperties": false,
2159
+ "required": [
2160
+ "type",
2161
+ "pageArg",
2162
+ "itemsToIndexPath",
2163
+ "pageTotalPath"
2164
+ ]
2165
+ },
2166
+ "paginationOffsetConfig": {
2167
+ "title": "Pagination Offset Config",
2168
+ "type": "object",
2169
+ "properties": {
2170
+ "type": {
2171
+ "type": "string",
2172
+ "enum": [
2173
+ "offset"
2174
+ ]
2175
+ },
2176
+ "offsetArg": {
2177
+ "type": "string"
2178
+ },
2179
+ "pageSize": {
2180
+ "type": "number"
2181
+ },
2182
+ "pageSizeArg": {
2183
+ "type": "string"
2184
+ },
2185
+ "itemsToIndexPath": {
2186
+ "type": "string"
2187
+ },
2188
+ "itemTotalPath": {
2189
+ "type": "string"
2190
+ }
2191
+ },
2192
+ "additionalProperties": false,
2193
+ "required": [
2194
+ "type",
2195
+ "offsetArg",
2196
+ "itemsToIndexPath",
2197
+ "itemTotalPath"
2198
+ ]
2199
+ },
2200
+ "indexedShapeTriggersConfig": {
2201
+ "title": "Indexed Shape Triggers Config",
2202
+ "oneOf": [
2203
+ {
2204
+ "$ref": "#/definitions/indexedShapeScheduleTriggerConfig"
2205
+ },
2206
+ {
2207
+ "$ref": "#/definitions/indexedShapeWebhookTriggerConfig"
2208
+ }
2209
+ ]
2210
+ },
2211
+ "indexedShapeScheduleTriggerConfig": {
2212
+ "title": "Indexed Shape Schedule Trigger Config",
2213
+ "type": "object",
2214
+ "properties": {
2215
+ "type": {
2216
+ "type": "string",
2217
+ "enum": [
2218
+ "schedule"
2219
+ ]
2220
+ },
2221
+ "query": {
2222
+ "enum": [
2223
+ "get",
2224
+ "list"
2225
+ ]
2226
+ },
2227
+ "interval": {
2228
+ "type": "number"
2229
+ }
2230
+ },
2231
+ "additionalProperties": false,
2232
+ "required": [
2233
+ "type",
2234
+ "query",
2235
+ "interval"
2236
+ ]
2237
+ },
2238
+ "indexedShapeWebhookTriggerConfig": {
2239
+ "title": "Indexed Shape Webhook Trigger Config",
2240
+ "type": "object",
2241
+ "properties": {
2242
+ "type": {
2243
+ "type": "string",
2244
+ "enum": [
2245
+ "webhook"
2246
+ ]
2247
+ },
2248
+ "query": {
2249
+ "enum": [
2250
+ "get",
2251
+ "list"
2252
+ ]
2253
+ },
2254
+ "service": {
2255
+ "type": "string"
2256
+ },
2257
+ "events": {
2258
+ "type": "array",
2259
+ "items": {
2260
+ "type": "string"
2261
+ }
2262
+ }
2263
+ },
2264
+ "additionalProperties": false,
2265
+ "required": [
2266
+ "type",
2267
+ "query",
2268
+ "service",
2269
+ "events"
2270
+ ]
2271
+ },
2272
+ "formScalarConfig": {
2273
+ "title": "Form Scalar Config",
2274
+ "type": "object",
2275
+ "properties": {
2276
+ "widget": {
2277
+ "type": "string"
2278
+ }
2279
+ },
2280
+ "additionalProperties": false,
2281
+ "required": [
2282
+ "widget"
2283
+ ]
2284
+ },
2285
+ "formObjectConfig": {
2286
+ "title": "Form Object Config",
2287
+ "type": "object",
2288
+ "properties": {
2289
+ "widget": {
2290
+ "type": "string"
2291
+ },
2292
+ "order": {
2293
+ "type": "array",
2294
+ "items": {
2295
+ "type": "string"
2296
+ }
2297
+ },
2298
+ "properties": {
2299
+ "patternProperties": {
2300
+ "[0-9A-Za-z_-]+": {
2301
+ "$ref": "#/definitions/formConfig"
2302
+ }
2303
+ }
2304
+ }
2305
+ },
2306
+ "additionalProperties": false
2307
+ },
2308
+ "formArrayConfig": {
2309
+ "title": "Form Array Config",
2310
+ "type": "object",
2311
+ "properties": {
2312
+ "widget": {
2313
+ "type": "string"
2314
+ },
2315
+ "items": {
2316
+ "$ref": "#/definitions/formConfig"
2317
+ }
2318
+ },
2319
+ "additionalProperties": false,
2320
+ "required": [
2321
+ "widget",
2322
+ "items"
2323
+ ]
2324
+ },
2325
+ "customAuthentication": {
2326
+ "title": "Custom Authentication",
2327
+ "description": "For use with a custom auth handler on a service provider.",
2328
+ "type": "object",
2329
+ "properties": {
2330
+ "type": {
2331
+ "type": "string",
2332
+ "enum": [
2333
+ "custom"
2334
+ ]
2335
+ }
2336
+ },
2337
+ "additionalProperties": true,
2338
+ "required": [
2339
+ "type"
2340
+ ]
2341
+ },
2342
+ "searchParamsAuthentication": {
2343
+ "title": "Search Params Authentication",
2344
+ "type": "object",
2345
+ "properties": {
2346
+ "type": {
2347
+ "type": "string",
2348
+ "enum": [
2349
+ "searchParams"
2350
+ ]
2351
+ },
2352
+ "params": {
2353
+ "type": "array",
2354
+ "items": {
2355
+ "properties": {
2356
+ "name": {
2357
+ "type": "string"
2358
+ },
2359
+ "value": {
2360
+ "type": "string"
2361
+ }
2362
+ },
2363
+ "required": [
2364
+ "name",
2365
+ "value"
2366
+ ],
2367
+ "additionalProperties": false
2368
+ }
2369
+ }
2370
+ },
2371
+ "additionalProperties": false,
2372
+ "required": [
2373
+ "type",
2374
+ "params"
2375
+ ]
2376
+ },
2377
+ "bearerAuthentication": {
2378
+ "title": "Bearer Authentication",
2379
+ "type": "object",
2380
+ "properties": {
2381
+ "type": {
2382
+ "type": "string",
2383
+ "enum": [
2384
+ "bearer"
2385
+ ]
2386
+ },
2387
+ "token": {
2388
+ "type": "string"
2389
+ },
2390
+ "prefix": {
2391
+ "type": "string"
2392
+ },
2393
+ "header": {
2394
+ "type": "string"
2395
+ }
2396
+ },
2397
+ "additionalProperties": false,
2398
+ "required": [
2399
+ "type",
2400
+ "token"
2401
+ ]
2402
+ },
2403
+ "oauth2BearerAuthentication": {
2404
+ "title": "OAuth 2 Bearer Authentication",
2405
+ "type": "object",
2406
+ "properties": {
2407
+ "type": {
2408
+ "type": "string",
2409
+ "enum": [
2410
+ "oauth2Bearer"
2411
+ ]
2412
+ },
2413
+ "token": {
2414
+ "type": "string"
2415
+ },
2416
+ "prefix": {
2417
+ "type": "string"
2418
+ },
2419
+ "header": {
2420
+ "type": "string"
2421
+ },
2422
+ "scope": {
2423
+ "type": "string"
2424
+ },
2425
+ "expiresAt": {
2426
+ "type": "string"
2427
+ }
2428
+ },
2429
+ "additionalProperties": false,
2430
+ "required": [
2431
+ "type",
2432
+ "token"
2433
+ ]
2434
+ },
2435
+ "basicAuthentication": {
2436
+ "title": "Basic Authentication",
2437
+ "type": "object",
2438
+ "properties": {
2439
+ "type": {
2440
+ "type": "string",
2441
+ "enum": [
2442
+ "basic"
2443
+ ]
2444
+ },
2445
+ "username": {
2446
+ "type": "string"
2447
+ },
2448
+ "password": {
2449
+ "type": "string"
2450
+ },
2451
+ "useIso8859": {
2452
+ "type": "boolean"
2453
+ }
2454
+ },
2455
+ "additionalProperties": false,
2456
+ "required": [
2457
+ "type",
2458
+ "username",
2459
+ "password"
2460
+ ]
2461
+ },
2462
+ "oauth2Authentication": {
2463
+ "title": "OAuth 2 Authentication",
2464
+ "type": "object",
2465
+ "properties": {
2466
+ "type": {
2467
+ "type": "string",
2468
+ "enum": [
2469
+ "oauth2"
2470
+ ]
2471
+ },
2472
+ "grantType": {
2473
+ "type": "string",
2474
+ "enum": [
2475
+ "authorizationCode",
2476
+ "clientCredentials"
2477
+ ]
2478
+ },
2479
+ "authorizationUrl": {
2480
+ "type": "string"
2481
+ },
2482
+ "accessTokenUrl": {
2483
+ "type": "string"
2484
+ },
2485
+ "clientId": {
2486
+ "type": "string"
2487
+ },
2488
+ "clientSecret": {
2489
+ "type": "string"
2490
+ },
2491
+ "scope": {
2492
+ "type": "string"
2493
+ },
2494
+ "usePkce": {
2495
+ "type": "boolean"
2496
+ },
2497
+ "redirectUrl": {
2498
+ "type": "string"
2499
+ },
2500
+ "headerPrefix": {
2501
+ "type": "string"
2502
+ },
2503
+ "audience": {
2504
+ "type": "string"
2505
+ },
2506
+ "resource": {
2507
+ "type": "string"
2508
+ }
2509
+ },
2510
+ "additionalProperties": false,
2511
+ "required": [
2512
+ "type",
2513
+ "grantType",
2514
+ "clientId"
2515
+ ]
2516
+ },
2517
+ "awsAuthentication": {
2518
+ "title": "AWS Authentication",
2519
+ "type": "object",
2520
+ "properties": {
2521
+ "type": {
2522
+ "type": "string",
2523
+ "enum": [
2524
+ "aws"
2525
+ ]
2526
+ },
2527
+ "awsAccessKeyId": {
2528
+ "type": "string"
2529
+ },
2530
+ "awsSecretAccessKey": {
2531
+ "type": "string"
2532
+ }
2533
+ },
2534
+ "additionalProperties": false,
2535
+ "required": [
2536
+ "type",
2537
+ "awsAccessKeyId",
2538
+ "awsSecretAccessKey"
2539
+ ]
2540
+ },
2541
+ "serviceAuthentication": {
2542
+ "title": "Service Authentication",
2543
+ "oneOf": [
2544
+ {
2545
+ "$ref": "#/definitions/oauth2Authentication"
2546
+ },
2547
+ {
2548
+ "$ref": "#/definitions/oauth2BearerAuthentication"
2549
+ },
2550
+ {
2551
+ "$ref": "#/definitions/bearerAuthentication"
2552
+ },
2553
+ {
2554
+ "$ref": "#/definitions/basicAuthentication"
2555
+ },
2556
+ {
2557
+ "$ref": "#/definitions/searchParamsAuthentication"
2558
+ },
2559
+ {
2560
+ "$ref": "#/definitions/awsAuthentication"
2561
+ },
2562
+ {
2563
+ "$ref": "#/definitions/customAuthentication"
2564
+ }
2565
+ ]
2566
+ },
2567
+ "serviceType": {
2568
+ "title": "Service Type",
2569
+ "description": "The general type of this service, specifying how and where it will be utilized.",
2570
+ "type": "string",
2571
+ "enum": [
2572
+ "deployment",
2573
+ "authentication",
2574
+ "takeshape",
2575
+ "rest",
2576
+ "graphql",
2577
+ "openapi",
2578
+ "aws",
2579
+ "unknown"
2580
+ ]
2581
+ },
2582
+ "serviceConfig": {
2583
+ "title": "Service Config",
2584
+ "type": "object",
2585
+ "properties": {
2586
+ "id": {
2587
+ "type": "string",
2588
+ "description": "Machine-readable identifier, should typically be the same as the property name on the services object."
2589
+ },
2590
+ "title": {
2591
+ "type": "string",
2592
+ "description": "Human-readable name for this service."
2593
+ },
2594
+ "provider": {
2595
+ "description": "The service provider id.",
2596
+ "type": "string"
2597
+ },
2598
+ "namespace": {
2599
+ "type": "string",
2600
+ "description": "A namespace to use for the imported types tied to this service."
2601
+ },
2602
+ "serviceType": {
2603
+ "$ref": "#/definitions/serviceType"
2604
+ },
2605
+ "authenticationType": {
2606
+ "type": "string",
2607
+ "enum": [
2608
+ "oauth2",
2609
+ "basic",
2610
+ "bearer",
2611
+ "searchParams",
2612
+ "oauth2Bearer",
2613
+ "custom",
2614
+ "aws",
2615
+ "none",
2616
+ "unknown"
2617
+ ]
2618
+ },
2619
+ "authentication": {
2620
+ "$ref": "#/definitions/serviceAuthentication"
2621
+ },
2622
+ "webhookId": {
2623
+ "type": "string"
2624
+ },
2625
+ "options": {
2626
+ "type": "object",
2627
+ "description": "Configuration options passed to and handled by the provider."
2628
+ }
2629
+ },
2630
+ "required": [
2631
+ "id",
2632
+ "title",
2633
+ "provider",
2634
+ "serviceType",
2635
+ "authenticationType"
2636
+ ],
2637
+ "additionalProperties": false
2638
+ },
2639
+ "storedServiceConfig": {
2640
+ "title": "Stored Service Config",
2641
+ "type": "object",
2642
+ "properties": {
2643
+ "id": {
2644
+ "type": "string",
2645
+ "description": "Machine-readable identifier, should typically be the same as the property name on the services object."
2646
+ },
2647
+ "title": {
2648
+ "type": "string",
2649
+ "description": "Human-readable name for this service."
2650
+ },
2651
+ "provider": {
2652
+ "type": "string",
2653
+ "description": "The service provider id."
2654
+ },
2655
+ "namespace": {
2656
+ "type": "string",
2657
+ "description": "A namespace to use for the imported types tied to this service."
2658
+ },
2659
+ "serviceType": {
2660
+ "$ref": "#/definitions/serviceType"
2661
+ },
2662
+ "authenticationType": {
2663
+ "type": "string",
2664
+ "enum": [
2665
+ "oauth2",
2666
+ "basic",
2667
+ "bearer",
2668
+ "searchParams",
2669
+ "oauth2Bearer",
2670
+ "custom",
2671
+ "aws",
2672
+ "none",
2673
+ "unknown"
2674
+ ]
2675
+ },
2676
+ "authentication": {
2677
+ "type": "string"
2678
+ },
2679
+ "webhookId": {
2680
+ "type": "string"
2681
+ },
2682
+ "options": {
2683
+ "type": "object",
2684
+ "description": "Configuration options passed to and handled by the provider."
2685
+ }
2686
+ },
2687
+ "required": [
2688
+ "id",
2689
+ "title",
2690
+ "provider",
2691
+ "serviceType",
2692
+ "authenticationType"
2693
+ ],
2694
+ "additionalProperties": false
2695
+ },
2696
+ "anyServiceConfig": {
2697
+ "title": "Any Service Config",
2698
+ "oneOf": [
2699
+ {
2700
+ "$ref": "#/definitions/storedServiceConfig"
2701
+ },
2702
+ {
2703
+ "$ref": "#/definitions/serviceConfig"
2704
+ }
2705
+ ]
2706
+ },
2707
+ "storedServiceMap": {
2708
+ "title": "Stored Service Map",
2709
+ "type": "object",
2710
+ "patternProperties": {
2711
+ "[0-9A-Za-z_-]+": {
2712
+ "$ref": "#/definitions/storedServiceConfig"
2713
+ }
2714
+ }
2715
+ },
2716
+ "workflowStep": {
2717
+ "title": "Workflow Step",
2718
+ "type": "object",
2719
+ "properties": {
2720
+ "name": {
2721
+ "type": "string",
2722
+ "title": "Name",
2723
+ "pattern": "^[_a-zA-Z][_a-zA-Z0-9]*$",
2724
+ "description": "machine-readable slug"
2725
+ },
2726
+ "title": {
2727
+ "title": "Title",
2728
+ "type": "string",
2729
+ "description": "Human-readable id for use in the UI"
2730
+ },
2731
+ "description": {
2732
+ "title": "Description",
2733
+ "type": "string"
2734
+ },
2735
+ "color": {
2736
+ "title": "Color",
2737
+ "type": "string",
2738
+ "description": "Hex color code"
2739
+ },
2740
+ "live": {
2741
+ "title": "Live",
2742
+ "type": "boolean",
2743
+ "description": "Value to indicate whether items in the state should be returned in list queries"
2744
+ },
2745
+ "key": {
2746
+ "title": "Key",
2747
+ "type": "string",
2748
+ "description": "machine-readable id"
2749
+ }
2750
+ },
2751
+ "required": [
2752
+ "name",
2753
+ "title",
2754
+ "color",
2755
+ "live",
2756
+ "key"
2757
+ ],
2758
+ "additionalProperties": false
2759
+ },
2760
+ "workflow": {
2761
+ "title": "Workflow",
2762
+ "type": "object",
2763
+ "properties": {
2764
+ "name": {
2765
+ "type": "string",
2766
+ "pattern": "^[_a-zA-Z][_a-zA-Z0-9]*$",
2767
+ "description": "machine-readable id"
2768
+ },
2769
+ "title": {
2770
+ "type": "string",
2771
+ "title": "Workflow Name",
2772
+ "minLength": 1,
2773
+ "description": "Human-readable id for use in the UI"
2774
+ },
2775
+ "steps": {
2776
+ "type": "array",
2777
+ "title": "Steps",
2778
+ "items": {
2779
+ "$ref": "#/definitions/workflowStep"
2780
+ },
2781
+ "minItems": 1
2782
+ }
2783
+ },
2784
+ "required": [
2785
+ "name",
2786
+ "title",
2787
+ "steps"
2788
+ ]
2789
+ },
2790
+ "workflowMap": {
2791
+ "title": "Workflow Map",
2792
+ "type": "object",
2793
+ "patternProperties": {
2794
+ "[0-9A-Za-z_-]+": {
2795
+ "$ref": "#/definitions/workflow"
2796
+ }
2797
+ }
2798
+ },
2799
+ "formConfig": {
2800
+ "title": "Form Config",
2801
+ "type": "object"
2802
+ },
2803
+ "formsConfig": {
2804
+ "title": "Forms Config",
2805
+ "type": "object",
2806
+ "properties": {
2807
+ "default": {
2808
+ "$ref": "#/definitions/formConfig"
2809
+ }
2810
+ },
2811
+ "patternProperties": {
2812
+ "[0-9A-Za-z_-]+": {
2813
+ "$ref": "#/definitions/formConfig"
2814
+ }
2815
+ },
2816
+ "required": [
2817
+ "default"
2818
+ ]
2819
+ }
2820
+ },
2821
+ "properties": {
2822
+ "$schema": {
2823
+ "type": "string"
2824
+ },
2825
+ "apiVersion": {
2826
+ "type": "string",
2827
+ "description": "The version of the TakeShape API your project is using. We increase the version as we make breaking changes to the API endpoints."
2828
+ },
2829
+ "schemaVersion": {
2830
+ "type": "string",
2831
+ "enum": [
2832
+ "3.25.0"
2833
+ ],
2834
+ "description": "The version of the schema format your project is using. We increase the version as we make breaking changes to the schema format."
2835
+ },
2836
+ "projectId": {
2837
+ "type": "string",
2838
+ "description": "The ID of the TakeShape project this schema belongs to."
2839
+ },
2840
+ "author": {
2841
+ "type": "string",
2842
+ "description": "The ID of the TakeShape user who created the schema."
2843
+ },
2844
+ "deactivated": {
2845
+ "type": "number"
2846
+ },
2847
+ "defaultLocale": {
2848
+ "type": "string",
2849
+ "minLength": 1,
2850
+ "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{2,3})?$",
2851
+ "description": "The locale that should be preferred when creating new Shape items. This must be an entry in the locales array."
2852
+ },
2853
+ "locales": {
2854
+ "type": "array",
2855
+ "minItems": 1,
2856
+ "items": {
2857
+ "type": "string",
2858
+ "minLength": 1,
2859
+ "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{2,3})?$"
2860
+ }
2861
+ },
2862
+ "queries": {
2863
+ "$ref": "#/definitions/queryMap",
2864
+ "description": "Queries map directly to queries your project's GraphQL API"
2865
+ },
2866
+ "mutations": {
2867
+ "$ref": "#/definitions/queryMap",
2868
+ "description": "Mutations map directly to mutations your project's GraphQL API"
2869
+ },
2870
+ "shapes": {
2871
+ "$ref": "#/definitions/shapeMap",
2872
+ "description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services."
2873
+ },
2874
+ "indexedShapes": {
2875
+ "$ref": "#/definitions/indexedShapeMap",
2876
+ "description": "Experimental shape indexing configuration if you are curious about learning more message @asprouse in the TakeShape Slack"
2877
+ },
2878
+ "forms": {
2879
+ "$ref": "#/definitions/formMap",
2880
+ "description": "Forms define a visual interface for editing Shapes in the TakeShape UI."
2881
+ },
2882
+ "workflows": {
2883
+ "$ref": "#/definitions/workflowMap",
2884
+ "description": "Workflows describe the status of a shape item. Every schema starts with a default workflow with two steps, Disabled and Enabled"
2885
+ },
2886
+ "services": {
2887
+ "$ref": "#/definitions/storedServiceMap",
2888
+ "description": "By connecting new Services to your project schema, you can add shapes, queries, and mutations from 3rd party sources to your API in TakeShape. This allows you to mesh together exactly the API you need to interact with all of the services your app or business depends upon. Services use an encrypted configuration to keep auth tokens secret. For this reason, services can only be added to a schema through the web client or through the Admin API."
2889
+ }
2890
+ },
2891
+ "additionalProperties": false,
2892
+ "required": [
2893
+ "projectId",
2894
+ "apiVersion",
2895
+ "schemaVersion",
2896
+ "defaultLocale",
2897
+ "locales",
2898
+ "shapes",
2899
+ "queries",
2900
+ "mutations",
2901
+ "workflows"
2902
+ ]
2903
+ }