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