@takeshape/schema 8.16.0 → 8.20.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 (117) hide show
  1. package/es/enum.js +1 -1
  2. package/es/get-is-leaf.js +5 -5
  3. package/es/layers/type-utils.js +2 -2
  4. package/es/migration.js +59 -1
  5. package/es/project-schema/index.js +1 -0
  6. package/es/project-schema/v3.10.0.js +1 -0
  7. package/es/refs.js +19 -19
  8. package/es/schema-util.js +7 -7
  9. package/es/schemas/index.js +15 -15
  10. package/es/schemas/index.ts +26 -25
  11. package/es/schemas/project-schema/v3.10.0.json +2091 -0
  12. package/es/schemas/project-schema/v4.0.0.json +8 -6
  13. package/es/schemas/project-schema.json +2 -1
  14. package/es/types/types.js +1 -1
  15. package/es/types/utils.js +20 -19
  16. package/es/util/detect-cycles.js +1 -1
  17. package/es/validate.js +10 -7
  18. package/examples/latest/blog-schema.json +32 -32
  19. package/examples/latest/brewery-schema.json +53 -53
  20. package/examples/latest/complex-project-schema.json +3278 -3278
  21. package/examples/latest/fabric-ecommerce.json +130 -130
  22. package/examples/latest/frank-and-fred-schema.json +15588 -15588
  23. package/examples/latest/massive-schema.json +5836 -5836
  24. package/examples/latest/mill-components-schema.json +876 -876
  25. package/examples/latest/pet-oneof-array.json +77 -77
  26. package/examples/latest/post-schema.json +23 -23
  27. package/examples/latest/pruned-shopify-product-schema.json +19 -19
  28. package/examples/latest/real-world-schema.json +166 -166
  29. package/examples/latest/recursive-repeater-schema.json +14 -14
  30. package/examples/latest/recursive-schema.json +14 -14
  31. package/examples/latest/rick-and-morty-ast.json +1875 -1896
  32. package/examples/latest/rick-and-morty-graphql.json +1093 -1093
  33. package/examples/latest/rick-and-morty-rest.json +20 -20
  34. package/examples/latest/schema-with-repeater-draftjs.json +9 -9
  35. package/examples/latest/shape-books-v3_2_0.json +218 -218
  36. package/examples/latest/shape-books.json +218 -218
  37. package/examples/latest/shopify-lookbook.json +147 -147
  38. package/examples/latest/shopify-store-with-widget.json +10420 -10420
  39. package/examples/latest/stripe-starter-resolved.json +1018 -1018
  40. package/examples/latest/user-schema-no-required.json +19 -19
  41. package/examples/latest/user-schema-with-defaults.json +20 -20
  42. package/examples/source/rick-and-morty-ast.json +0 -21
  43. package/lib/content-schema-transform.d.ts +13 -13
  44. package/lib/content-schema-transform.d.ts.map +1 -1
  45. package/lib/enum.d.ts +2 -2
  46. package/lib/enum.d.ts.map +1 -1
  47. package/lib/enum.js +2 -2
  48. package/lib/get-is-leaf.d.ts +2 -2
  49. package/lib/get-is-leaf.d.ts.map +1 -1
  50. package/lib/get-is-leaf.js +5 -5
  51. package/lib/layers/type-utils.js +1 -1
  52. package/lib/migration.d.ts +6 -5
  53. package/lib/migration.d.ts.map +1 -1
  54. package/lib/migration.js +60 -0
  55. package/lib/project-schema/index.d.ts +3 -1
  56. package/lib/project-schema/index.d.ts.map +1 -1
  57. package/lib/project-schema/index.js +25 -12
  58. package/lib/project-schema/latest.d.ts +260 -238
  59. package/lib/project-schema/latest.d.ts.map +1 -1
  60. package/lib/project-schema/v1.0.0.d.ts +14 -7
  61. package/lib/project-schema/v1.0.0.d.ts.map +1 -1
  62. package/lib/project-schema/v3.0.0.d.ts +24 -25
  63. package/lib/project-schema/v3.0.0.d.ts.map +1 -1
  64. package/lib/project-schema/v3.1.0.d.ts +42 -43
  65. package/lib/project-schema/v3.1.0.d.ts.map +1 -1
  66. package/lib/project-schema/v3.10.0.d.ts +1202 -0
  67. package/lib/project-schema/v3.10.0.d.ts.map +1 -0
  68. package/lib/project-schema/v3.10.0.js +5 -0
  69. package/lib/project-schema/v3.2.0.d.ts +42 -43
  70. package/lib/project-schema/v3.2.0.d.ts.map +1 -1
  71. package/lib/project-schema/v3.3.0.d.ts +42 -43
  72. package/lib/project-schema/v3.3.0.d.ts.map +1 -1
  73. package/lib/project-schema/v3.4.0.d.ts +42 -43
  74. package/lib/project-schema/v3.4.0.d.ts.map +1 -1
  75. package/lib/project-schema/v3.5.0.d.ts +42 -43
  76. package/lib/project-schema/v3.5.0.d.ts.map +1 -1
  77. package/lib/project-schema/v3.5.1.d.ts +42 -43
  78. package/lib/project-schema/v3.5.1.d.ts.map +1 -1
  79. package/lib/project-schema/v3.6.0.d.ts +42 -43
  80. package/lib/project-schema/v3.6.0.d.ts.map +1 -1
  81. package/lib/project-schema/v3.7.0.d.ts +42 -43
  82. package/lib/project-schema/v3.7.0.d.ts.map +1 -1
  83. package/lib/project-schema/v3.8.0.d.ts +42 -43
  84. package/lib/project-schema/v3.8.0.d.ts.map +1 -1
  85. package/lib/project-schema/v3.9.0.d.ts +42 -43
  86. package/lib/project-schema/v3.9.0.d.ts.map +1 -1
  87. package/lib/project-schema/v4.0.0.d.ts +54 -52
  88. package/lib/project-schema/v4.0.0.d.ts.map +1 -1
  89. package/lib/refs.d.ts +8 -8
  90. package/lib/refs.d.ts.map +1 -1
  91. package/lib/refs.js +19 -19
  92. package/lib/schema-util.d.ts +23 -23
  93. package/lib/schema-util.d.ts.map +1 -1
  94. package/lib/schema-util.js +7 -7
  95. package/lib/schemas/index.d.ts +3421 -3420
  96. package/lib/schemas/index.d.ts.map +1 -1
  97. package/lib/schemas/index.js +26 -30
  98. package/lib/schemas/index.ts +26 -25
  99. package/lib/schemas/project-schema/v3.10.0.json +2091 -0
  100. package/lib/schemas/project-schema/v4.0.0.json +8 -6
  101. package/lib/schemas/project-schema.json +2 -1
  102. package/lib/types/types.d.ts +8 -7
  103. package/lib/types/types.d.ts.map +1 -1
  104. package/lib/types/types.js +1 -1
  105. package/lib/types/utils.d.ts +9 -8
  106. package/lib/types/utils.d.ts.map +1 -1
  107. package/lib/types/utils.js +25 -23
  108. package/lib/unions.d.ts +8 -8
  109. package/lib/unions.d.ts.map +1 -1
  110. package/lib/util/detect-cycles.d.ts +2 -2
  111. package/lib/util/detect-cycles.d.ts.map +1 -1
  112. package/lib/util/detect-cycles.js +1 -1
  113. package/lib/validate.d.ts.map +1 -1
  114. package/lib/validate.js +9 -6
  115. package/lib/workflows.d.ts +2 -2
  116. package/lib/workflows.d.ts.map +1 -1
  117. package/package.json +5 -5
@@ -8,7 +8,82 @@
8
8
  "locales": [
9
9
  "en-us"
10
10
  ],
11
- "schemaVersion": "3.9.0",
11
+ "workflows": {},
12
+ "forms": {
13
+ "Mall": {
14
+ "default": {
15
+ "properties": {
16
+ "shops": {
17
+ "widget": "repeater"
18
+ }
19
+ },
20
+ "order": [
21
+ "shops"
22
+ ]
23
+ }
24
+ },
25
+ "PetStore": {
26
+ "default": {
27
+ "properties": {
28
+ "animals": {
29
+ "widget": "repeater"
30
+ }
31
+ },
32
+ "order": [
33
+ "animals"
34
+ ]
35
+ }
36
+ },
37
+ "Dog": {
38
+ "default": {
39
+ "properties": {
40
+ "name": {
41
+ "widget": "singleLineText"
42
+ },
43
+ "rank": {
44
+ "widget": "singleLineText"
45
+ },
46
+ "isBestFriend": {
47
+ "widget": "checkbox"
48
+ }
49
+ },
50
+ "order": [
51
+ "name",
52
+ "rank",
53
+ "isBestFriend"
54
+ ]
55
+ }
56
+ },
57
+ "Cat": {
58
+ "default": {
59
+ "properties": {
60
+ "name": {
61
+ "widget": "singleLineText"
62
+ },
63
+ "breed": {
64
+ "widget": "singleLineText"
65
+ }
66
+ },
67
+ "order": [
68
+ "name",
69
+ "breed"
70
+ ]
71
+ }
72
+ },
73
+ "PetHouse": {
74
+ "default": {
75
+ "properties": {
76
+ "occupant": {
77
+ "widget": "object"
78
+ }
79
+ },
80
+ "order": [
81
+ "occupant"
82
+ ]
83
+ }
84
+ }
85
+ },
86
+ "dataKey": "supersecret",
12
87
  "queries": {
13
88
  "getMall": {
14
89
  "shape": "Mall",
@@ -329,80 +404,5 @@
329
404
  }
330
405
  }
331
406
  },
332
- "workflows": {},
333
- "forms": {
334
- "Mall": {
335
- "default": {
336
- "properties": {
337
- "shops": {
338
- "widget": "repeater"
339
- }
340
- },
341
- "order": [
342
- "shops"
343
- ]
344
- }
345
- },
346
- "PetStore": {
347
- "default": {
348
- "properties": {
349
- "animals": {
350
- "widget": "repeater"
351
- }
352
- },
353
- "order": [
354
- "animals"
355
- ]
356
- }
357
- },
358
- "Dog": {
359
- "default": {
360
- "properties": {
361
- "name": {
362
- "widget": "singleLineText"
363
- },
364
- "rank": {
365
- "widget": "singleLineText"
366
- },
367
- "isBestFriend": {
368
- "widget": "checkbox"
369
- }
370
- },
371
- "order": [
372
- "name",
373
- "rank",
374
- "isBestFriend"
375
- ]
376
- }
377
- },
378
- "Cat": {
379
- "default": {
380
- "properties": {
381
- "name": {
382
- "widget": "singleLineText"
383
- },
384
- "breed": {
385
- "widget": "singleLineText"
386
- }
387
- },
388
- "order": [
389
- "name",
390
- "breed"
391
- ]
392
- }
393
- },
394
- "PetHouse": {
395
- "default": {
396
- "properties": {
397
- "occupant": {
398
- "widget": "object"
399
- }
400
- },
401
- "order": [
402
- "occupant"
403
- ]
404
- }
405
- }
406
- },
407
- "dataKey": "supersecret"
407
+ "schemaVersion": "3.10.0"
408
408
  }
@@ -10,6 +10,28 @@
10
10
  "apiVersion": "2",
11
11
  "author": "<userId>",
12
12
  "workflows": {},
13
+ "created": "2016-06-21T15:16:19.051Z",
14
+ "updated": "2016-06-21T15:16:19.051Z",
15
+ "forms": {
16
+ "Post": {
17
+ "default": {
18
+ "order": [
19
+ "title",
20
+ "body",
21
+ "rating",
22
+ "tags"
23
+ ]
24
+ }
25
+ },
26
+ "Tag": {
27
+ "default": {
28
+ "order": [
29
+ "name"
30
+ ]
31
+ }
32
+ }
33
+ },
34
+ "dataKey": "supersecret",
13
35
  "queries": {
14
36
  "getPost": {
15
37
  "shape": "Post",
@@ -134,9 +156,6 @@
134
156
  "args": "DeleteArgs<Tag>"
135
157
  }
136
158
  },
137
- "schemaVersion": "3.9.0",
138
- "created": "2016-06-21T15:16:19.051Z",
139
- "updated": "2016-06-21T15:16:19.051Z",
140
159
  "shapes": {
141
160
  "Post": {
142
161
  "id": "postContentTypeId",
@@ -201,24 +220,5 @@
201
220
  }
202
221
  }
203
222
  },
204
- "forms": {
205
- "Post": {
206
- "default": {
207
- "order": [
208
- "title",
209
- "body",
210
- "rating",
211
- "tags"
212
- ]
213
- }
214
- },
215
- "Tag": {
216
- "default": {
217
- "order": [
218
- "name"
219
- ]
220
- }
221
- }
222
- },
223
- "dataKey": "supersecret"
223
+ "schemaVersion": "3.10.0"
224
224
  }
@@ -8,7 +8,24 @@
8
8
  "locales": [
9
9
  "en-us"
10
10
  ],
11
- "schemaVersion": "3.9.0",
11
+ "workflows": {},
12
+ "forms": {},
13
+ "services": {
14
+ "shopify:takeshape-io-shop": {
15
+ "title": "Shopify Lookbook",
16
+ "id": "shopify:takeshape-io-shop",
17
+ "provider": "shopify",
18
+ "namespace": "Shopify",
19
+ "serviceType": "graphql",
20
+ "authenticationType": "oauth2Bearer",
21
+ "options": {
22
+ "shop": "andrews-takeshape-store",
23
+ "endpoint": "https://andrews-takeshape-store.myshopify.com/admin/api/2020-07/graphql.json"
24
+ },
25
+ "authentication": "secret"
26
+ }
27
+ },
28
+ "dataKey": "secret",
12
29
  "queries": {
13
30
  "Shopify_products": {
14
31
  "resolver": {
@@ -9404,22 +9421,5 @@
9404
9421
  }
9405
9422
  }
9406
9423
  },
9407
- "workflows": {},
9408
- "forms": {},
9409
- "services": {
9410
- "shopify:takeshape-io-shop": {
9411
- "title": "Shopify Lookbook",
9412
- "id": "shopify:takeshape-io-shop",
9413
- "provider": "shopify",
9414
- "namespace": "Shopify",
9415
- "serviceType": "graphql",
9416
- "authenticationType": "oauth2Bearer",
9417
- "options": {
9418
- "shop": "andrews-takeshape-store",
9419
- "endpoint": "https://andrews-takeshape-store.myshopify.com/admin/api/2020-07/graphql.json"
9420
- },
9421
- "authentication": "secret"
9422
- }
9423
- },
9424
- "dataKey": "secret"
9424
+ "schemaVersion": "3.10.0"
9425
9425
  }
@@ -9,6 +9,171 @@
9
9
  "en-us"
10
10
  ],
11
11
  "workflows": {},
12
+ "created": "2016-06-21T15:16:19.051Z",
13
+ "updated": "2016-06-21T15:16:19.051Z",
14
+ "forms": {
15
+ "Beer": {
16
+ "default": {
17
+ "properties": {
18
+ "name": {
19
+ "widget": "singleLineText"
20
+ },
21
+ "publishDate": {
22
+ "widget": "datetime"
23
+ },
24
+ "about": {
25
+ "widget": "wysiwygText"
26
+ },
27
+ "image": {
28
+ "widget": "image"
29
+ },
30
+ "similarBeers": {
31
+ "widget": "relationship"
32
+ },
33
+ "dropdown": {
34
+ "widget": "dropdown"
35
+ }
36
+ },
37
+ "order": [
38
+ "name",
39
+ "image",
40
+ "publishDate",
41
+ "about",
42
+ "similarBeers",
43
+ "dropdown"
44
+ ]
45
+ }
46
+ },
47
+ "Post": {
48
+ "default": {
49
+ "properties": {
50
+ "relatedBeer": {
51
+ "widget": "relationship"
52
+ },
53
+ "body": {
54
+ "properties": {
55
+ "image": {
56
+ "widget": "image"
57
+ },
58
+ "text": {
59
+ "widget": "markdownText"
60
+ }
61
+ },
62
+ "widget": "repeater",
63
+ "order": [
64
+ "image",
65
+ "text"
66
+ ]
67
+ },
68
+ "title": {
69
+ "widget": "singleLineText"
70
+ },
71
+ "content": {
72
+ "widget": "wysiwygText"
73
+ },
74
+ "dropdown": {
75
+ "widget": "dropdown"
76
+ }
77
+ },
78
+ "order": [
79
+ "title",
80
+ "content",
81
+ "dropdown",
82
+ "relatedBeer",
83
+ "body"
84
+ ]
85
+ }
86
+ },
87
+ "Homepage": {
88
+ "default": {
89
+ "properties": {
90
+ "relationship": {
91
+ "widget": "relationship"
92
+ },
93
+ "heading": {
94
+ "widget": "singleLineText"
95
+ }
96
+ },
97
+ "order": [
98
+ "heading",
99
+ "relationship"
100
+ ]
101
+ }
102
+ },
103
+ "Asset": {
104
+ "default": {
105
+ "order": [
106
+ "title",
107
+ "description",
108
+ "caption",
109
+ "credit"
110
+ ],
111
+ "properties": {
112
+ "title": {
113
+ "widget": "singleLineText"
114
+ },
115
+ "description": {
116
+ "widget": "paragraphText"
117
+ },
118
+ "caption": {
119
+ "widget": "wysiwygSingleLineText"
120
+ },
121
+ "credit": {
122
+ "widget": "wysiwygSingleLineText"
123
+ }
124
+ }
125
+ }
126
+ },
127
+ "TsStaticSite": {
128
+ "default": {
129
+ "order": [
130
+ "title",
131
+ "provider",
132
+ "destination",
133
+ "idKey",
134
+ "secretKey",
135
+ "environmentVariables"
136
+ ],
137
+ "properties": {
138
+ "title": {
139
+ "widget": "singleLineText"
140
+ },
141
+ "provider": {
142
+ "widget": "dropdown"
143
+ },
144
+ "destination": {
145
+ "widget": "singleLineText",
146
+ "instructions": "Deployment Bucket or FTP Host"
147
+ },
148
+ "idKey": {
149
+ "widget": "singleLineText",
150
+ "instructions": "AWS Access Key ID or Google Cloud Storage Client Email or FTP Username"
151
+ },
152
+ "secretKey": {
153
+ "widget": "sensitiveField",
154
+ "instructions": "AWS Secret Access Key or Google Cloud Storage Private Key or FTP Password",
155
+ "multiline": true
156
+ },
157
+ "environmentVariables": {
158
+ "widget": "repeater",
159
+ "order": [
160
+ "name",
161
+ "value"
162
+ ],
163
+ "properties": {
164
+ "name": {
165
+ "widget": "singleLineText"
166
+ },
167
+ "value": {
168
+ "widget": "singleLineText"
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "dataKey": "supersecret",
12
177
  "queries": {
13
178
  "getBeer": {
14
179
  "shape": "Beer",
@@ -273,9 +438,6 @@
273
438
  "args": "DeleteArgs<TsStaticSite>"
274
439
  }
275
440
  },
276
- "schemaVersion": "3.9.0",
277
- "created": "2016-06-21T15:16:19.051Z",
278
- "updated": "2016-06-21T15:16:19.051Z",
279
441
  "shapes": {
280
442
  "Beer": {
281
443
  "id": "ry9SoTEGl",
@@ -828,167 +990,5 @@
828
990
  }
829
991
  }
830
992
  },
831
- "forms": {
832
- "Beer": {
833
- "default": {
834
- "properties": {
835
- "name": {
836
- "widget": "singleLineText"
837
- },
838
- "publishDate": {
839
- "widget": "datetime"
840
- },
841
- "about": {
842
- "widget": "wysiwygText"
843
- },
844
- "image": {
845
- "widget": "image"
846
- },
847
- "similarBeers": {
848
- "widget": "relationship"
849
- },
850
- "dropdown": {
851
- "widget": "dropdown"
852
- }
853
- },
854
- "order": [
855
- "name",
856
- "image",
857
- "publishDate",
858
- "about",
859
- "similarBeers",
860
- "dropdown"
861
- ]
862
- }
863
- },
864
- "Post": {
865
- "default": {
866
- "properties": {
867
- "relatedBeer": {
868
- "widget": "relationship"
869
- },
870
- "body": {
871
- "properties": {
872
- "image": {
873
- "widget": "image"
874
- },
875
- "text": {
876
- "widget": "markdownText"
877
- }
878
- },
879
- "widget": "repeater",
880
- "order": [
881
- "image",
882
- "text"
883
- ]
884
- },
885
- "title": {
886
- "widget": "singleLineText"
887
- },
888
- "content": {
889
- "widget": "wysiwygText"
890
- },
891
- "dropdown": {
892
- "widget": "dropdown"
893
- }
894
- },
895
- "order": [
896
- "title",
897
- "content",
898
- "dropdown",
899
- "relatedBeer",
900
- "body"
901
- ]
902
- }
903
- },
904
- "Homepage": {
905
- "default": {
906
- "properties": {
907
- "relationship": {
908
- "widget": "relationship"
909
- },
910
- "heading": {
911
- "widget": "singleLineText"
912
- }
913
- },
914
- "order": [
915
- "heading",
916
- "relationship"
917
- ]
918
- }
919
- },
920
- "Asset": {
921
- "default": {
922
- "order": [
923
- "title",
924
- "description",
925
- "caption",
926
- "credit"
927
- ],
928
- "properties": {
929
- "title": {
930
- "widget": "singleLineText"
931
- },
932
- "description": {
933
- "widget": "paragraphText"
934
- },
935
- "caption": {
936
- "widget": "wysiwygSingleLineText"
937
- },
938
- "credit": {
939
- "widget": "wysiwygSingleLineText"
940
- }
941
- }
942
- }
943
- },
944
- "TsStaticSite": {
945
- "default": {
946
- "order": [
947
- "title",
948
- "provider",
949
- "destination",
950
- "idKey",
951
- "secretKey",
952
- "environmentVariables"
953
- ],
954
- "properties": {
955
- "title": {
956
- "widget": "singleLineText"
957
- },
958
- "provider": {
959
- "widget": "dropdown"
960
- },
961
- "destination": {
962
- "widget": "singleLineText",
963
- "instructions": "Deployment Bucket or FTP Host"
964
- },
965
- "idKey": {
966
- "widget": "singleLineText",
967
- "instructions": "AWS Access Key ID or Google Cloud Storage Client Email or FTP Username"
968
- },
969
- "secretKey": {
970
- "widget": "sensitiveField",
971
- "instructions": "AWS Secret Access Key or Google Cloud Storage Private Key or FTP Password",
972
- "multiline": true
973
- },
974
- "environmentVariables": {
975
- "widget": "repeater",
976
- "order": [
977
- "name",
978
- "value"
979
- ],
980
- "properties": {
981
- "name": {
982
- "widget": "singleLineText"
983
- },
984
- "value": {
985
- "widget": "singleLineText"
986
- }
987
- }
988
- }
989
- }
990
- }
991
- }
992
- },
993
- "dataKey": "supersecret"
993
+ "schemaVersion": "3.10.0"
994
994
  }
@@ -9,6 +9,19 @@
9
9
  "en-us"
10
10
  ],
11
11
  "workflows": {},
12
+ "created": "2016-06-21T15:16:19.051Z",
13
+ "updated": "2016-06-21T15:16:19.051Z",
14
+ "forms": {
15
+ "Post": {
16
+ "default": {
17
+ "order": [
18
+ "title",
19
+ "repeater"
20
+ ]
21
+ }
22
+ }
23
+ },
24
+ "dataKey": "supersecret",
12
25
  "queries": {
13
26
  "getPost": {
14
27
  "shape": "Post",
@@ -73,9 +86,6 @@
73
86
  "args": "DeleteArgs<Post>"
74
87
  }
75
88
  },
76
- "schemaVersion": "3.9.0",
77
- "created": "2016-06-21T15:16:19.051Z",
78
- "updated": "2016-06-21T15:16:19.051Z",
79
89
  "shapes": {
80
90
  "Post": {
81
91
  "id": "<postContentTypeId>",
@@ -128,15 +138,5 @@
128
138
  }
129
139
  }
130
140
  },
131
- "forms": {
132
- "Post": {
133
- "default": {
134
- "order": [
135
- "title",
136
- "repeater"
137
- ]
138
- }
139
- }
140
- },
141
- "dataKey": "supersecret"
141
+ "schemaVersion": "3.10.0"
142
142
  }