@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,25 @@
8
8
  "locales": [
9
9
  "en-us"
10
10
  ],
11
- "schemaVersion": "3.9.0",
11
+ "workflows": {},
12
+ "forms": {},
13
+ "services": {
14
+ "rick-n-morty": {
15
+ "title": "Rick N Morty",
16
+ "id": "rick-n-morty",
17
+ "provider": "generic",
18
+ "namespace": "RickNMorty",
19
+ "serviceType": "rest",
20
+ "authenticationType": "none",
21
+ "options": {
22
+ "authType": "none",
23
+ "name": "Rick N Morty",
24
+ "endpoint": "https://rickandmortyapi.com/api",
25
+ "type": "rest"
26
+ }
27
+ }
28
+ },
29
+ "dataKey": "AQIDAHhcZWXOdlBglkxBhI23ElO/clC/kuw5ynjXDSqJgfTz8gGs0V9U9qOKlqicZ9d2p+45AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMzl46lhOMi4RGP3AkAgEQgDu0SsBk84UIM55pydDDKcz5L8EL02u/rhULFBliykTWhkSIv+EuqiaLVaqA7qVGJP84HpuPd+ZFORY/lw==",
12
30
  "queries": {
13
31
  "getCharacter": {
14
32
  "shape": "Rnm_Character",
@@ -78,23 +96,5 @@
78
96
  }
79
97
  }
80
98
  },
81
- "workflows": {},
82
- "forms": {},
83
- "services": {
84
- "rick-n-morty": {
85
- "title": "Rick N Morty",
86
- "id": "rick-n-morty",
87
- "provider": "generic",
88
- "namespace": "RickNMorty",
89
- "serviceType": "rest",
90
- "authenticationType": "none",
91
- "options": {
92
- "authType": "none",
93
- "name": "Rick N Morty",
94
- "endpoint": "https://rickandmortyapi.com/api",
95
- "type": "rest"
96
- }
97
- }
98
- },
99
- "dataKey": "AQIDAHhcZWXOdlBglkxBhI23ElO/clC/kuw5ynjXDSqJgfTz8gGs0V9U9qOKlqicZ9d2p+45AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMzl46lhOMi4RGP3AkAgEQgDu0SsBk84UIM55pydDDKcz5L8EL02u/rhULFBliykTWhkSIv+EuqiaLVaqA7qVGJP84HpuPd+ZFORY/lw=="
99
+ "schemaVersion": "3.10.0"
100
100
  }
@@ -9,6 +9,14 @@
9
9
  "version": 1,
10
10
  "apiVersion": "2",
11
11
  "author": "<userId>",
12
+ "created": "2020-08-20T14:41:46.114Z",
13
+ "updated": "2020-08-20T14:41:46.114Z",
14
+ "forms": {
15
+ "Post": {
16
+ "default": {}
17
+ }
18
+ },
19
+ "dataKey": "supersecret",
12
20
  "queries": {
13
21
  "getPost": {
14
22
  "shape": "Post",
@@ -73,9 +81,6 @@
73
81
  "args": "DeleteArgs<Post>"
74
82
  }
75
83
  },
76
- "schemaVersion": "3.9.0",
77
- "created": "2020-08-20T14:41:46.114Z",
78
- "updated": "2020-08-20T14:41:46.114Z",
79
84
  "shapes": {
80
85
  "Post": {
81
86
  "id": "post-id",
@@ -372,10 +377,5 @@
372
377
  }
373
378
  }
374
379
  },
375
- "forms": {
376
- "Post": {
377
- "default": {}
378
- }
379
- },
380
- "dataKey": "supersecret"
380
+ "schemaVersion": "3.10.0"
381
381
  }
@@ -7,6 +7,223 @@
7
7
  "en-us"
8
8
  ],
9
9
  "workflows": {},
10
+ "created": "2017-07-13T19:16:10.801Z",
11
+ "updated": "2018-09-08T20:16:45.814Z",
12
+ "forms": {
13
+ "Genre": {
14
+ "default": {
15
+ "properties": {
16
+ "title": {
17
+ "widget": "singleLineText"
18
+ }
19
+ },
20
+ "order": [
21
+ "title"
22
+ ]
23
+ }
24
+ },
25
+ "Tag": {
26
+ "default": {
27
+ "properties": {
28
+ "name": {
29
+ "widget": "singleLineText"
30
+ }
31
+ },
32
+ "order": [
33
+ "name"
34
+ ]
35
+ }
36
+ },
37
+ "Post": {
38
+ "default": {
39
+ "properties": {
40
+ "body": {
41
+ "widget": "wysiwygText"
42
+ },
43
+ "featureImage": {
44
+ "widget": "image"
45
+ },
46
+ "title": {
47
+ "widget": "singleLineText"
48
+ },
49
+ "author": {
50
+ "widget": "relationship"
51
+ },
52
+ "deck": {
53
+ "widget": "paragraphText"
54
+ },
55
+ "tags": {
56
+ "widget": "relationship"
57
+ }
58
+ },
59
+ "order": [
60
+ "title",
61
+ "deck",
62
+ "tags",
63
+ "author",
64
+ "featureImage",
65
+ "body"
66
+ ]
67
+ }
68
+ },
69
+ "Author": {
70
+ "default": {
71
+ "properties": {
72
+ "name": {
73
+ "widget": "singleLineText"
74
+ },
75
+ "photo": {
76
+ "widget": "image"
77
+ },
78
+ "biography": {
79
+ "widget": "wysiwygText"
80
+ }
81
+ },
82
+ "order": [
83
+ "name",
84
+ "photo",
85
+ "biography"
86
+ ]
87
+ }
88
+ },
89
+ "Homepage": {
90
+ "default": {
91
+ "properties": {
92
+ "title": {
93
+ "widget": "singleLineText"
94
+ },
95
+ "featuredBook": {
96
+ "widget": "relationship"
97
+ },
98
+ "hero": {
99
+ "properties": {
100
+ "image": {
101
+ "widget": "image"
102
+ },
103
+ "featuredPost": {
104
+ "widget": "relationship"
105
+ }
106
+ },
107
+ "widget": "object",
108
+ "order": [
109
+ "image",
110
+ "featuredPost"
111
+ ]
112
+ }
113
+ },
114
+ "order": [
115
+ "title",
116
+ "hero",
117
+ "featuredBook"
118
+ ]
119
+ }
120
+ },
121
+ "SiteSettings": {
122
+ "default": {
123
+ "properties": {
124
+ "siteTitle": {
125
+ "widget": "singleLineText"
126
+ }
127
+ },
128
+ "order": [
129
+ "siteTitle"
130
+ ]
131
+ }
132
+ },
133
+ "Asset": {
134
+ "default": {
135
+ "properties": {
136
+ "path": {
137
+ "disabled": true,
138
+ "widget": "singleLineText"
139
+ },
140
+ "filename": {
141
+ "disabled": true,
142
+ "widget": "singleLineText"
143
+ },
144
+ "description": {
145
+ "disabled": true,
146
+ "widget": "paragraphText"
147
+ },
148
+ "caption": {
149
+ "disabled": true,
150
+ "widget": "wysiwygSingleLineText"
151
+ },
152
+ "uploadStatus": {
153
+ "disabled": true,
154
+ "widget": "singleLineText"
155
+ },
156
+ "mimeType": {
157
+ "disabled": true,
158
+ "widget": "singleLineText"
159
+ },
160
+ "title": {
161
+ "disabled": true,
162
+ "widget": "singleLineText"
163
+ },
164
+ "authorTag": {
165
+ "widget": "relationship"
166
+ },
167
+ "credit": {
168
+ "disabled": true,
169
+ "widget": "wysiwygSingleLineText"
170
+ }
171
+ },
172
+ "order": [
173
+ "title",
174
+ "authorTag",
175
+ "description",
176
+ "caption",
177
+ "credit",
178
+ "filename",
179
+ "path",
180
+ "mimeType",
181
+ "uploadStatus"
182
+ ]
183
+ }
184
+ },
185
+ "Book": {
186
+ "default": {
187
+ "properties": {
188
+ "author": {
189
+ "widget": "relationship"
190
+ },
191
+ "coverImage": {
192
+ "widget": "image"
193
+ },
194
+ "genre": {
195
+ "widget": "relationship"
196
+ },
197
+ "publishDate": {
198
+ "widget": "datetime"
199
+ },
200
+ "totalPages": {
201
+ "widget": "number"
202
+ },
203
+ "title": {
204
+ "widget": "singleLineText"
205
+ },
206
+ "type": {
207
+ "widget": "dropdown"
208
+ },
209
+ "body": {
210
+ "widget": "wysiwygText"
211
+ }
212
+ },
213
+ "order": [
214
+ "title",
215
+ "genre",
216
+ "publishDate",
217
+ "coverImage",
218
+ "author",
219
+ "totalPages",
220
+ "type",
221
+ "body"
222
+ ]
223
+ }
224
+ }
225
+ },
226
+ "dataKey": "supersecret",
10
227
  "queries": {
11
228
  "getGenre": {
12
229
  "shape": "Genre",
@@ -451,9 +668,6 @@
451
668
  "args": "DeleteArgs<Book>"
452
669
  }
453
670
  },
454
- "schemaVersion": "3.9.0",
455
- "created": "2017-07-13T19:16:10.801Z",
456
- "updated": "2018-09-08T20:16:45.814Z",
457
671
  "shapes": {
458
672
  "Genre": {
459
673
  "id": "rJ9bZzk-m",
@@ -863,219 +1077,5 @@
863
1077
  }
864
1078
  }
865
1079
  },
866
- "forms": {
867
- "Genre": {
868
- "default": {
869
- "properties": {
870
- "title": {
871
- "widget": "singleLineText"
872
- }
873
- },
874
- "order": [
875
- "title"
876
- ]
877
- }
878
- },
879
- "Tag": {
880
- "default": {
881
- "properties": {
882
- "name": {
883
- "widget": "singleLineText"
884
- }
885
- },
886
- "order": [
887
- "name"
888
- ]
889
- }
890
- },
891
- "Post": {
892
- "default": {
893
- "properties": {
894
- "body": {
895
- "widget": "wysiwygText"
896
- },
897
- "featureImage": {
898
- "widget": "image"
899
- },
900
- "title": {
901
- "widget": "singleLineText"
902
- },
903
- "author": {
904
- "widget": "relationship"
905
- },
906
- "deck": {
907
- "widget": "paragraphText"
908
- },
909
- "tags": {
910
- "widget": "relationship"
911
- }
912
- },
913
- "order": [
914
- "title",
915
- "deck",
916
- "tags",
917
- "author",
918
- "featureImage",
919
- "body"
920
- ]
921
- }
922
- },
923
- "Author": {
924
- "default": {
925
- "properties": {
926
- "name": {
927
- "widget": "singleLineText"
928
- },
929
- "photo": {
930
- "widget": "image"
931
- },
932
- "biography": {
933
- "widget": "wysiwygText"
934
- }
935
- },
936
- "order": [
937
- "name",
938
- "photo",
939
- "biography"
940
- ]
941
- }
942
- },
943
- "Homepage": {
944
- "default": {
945
- "properties": {
946
- "title": {
947
- "widget": "singleLineText"
948
- },
949
- "featuredBook": {
950
- "widget": "relationship"
951
- },
952
- "hero": {
953
- "properties": {
954
- "image": {
955
- "widget": "image"
956
- },
957
- "featuredPost": {
958
- "widget": "relationship"
959
- }
960
- },
961
- "widget": "object",
962
- "order": [
963
- "image",
964
- "featuredPost"
965
- ]
966
- }
967
- },
968
- "order": [
969
- "title",
970
- "hero",
971
- "featuredBook"
972
- ]
973
- }
974
- },
975
- "SiteSettings": {
976
- "default": {
977
- "properties": {
978
- "siteTitle": {
979
- "widget": "singleLineText"
980
- }
981
- },
982
- "order": [
983
- "siteTitle"
984
- ]
985
- }
986
- },
987
- "Asset": {
988
- "default": {
989
- "properties": {
990
- "path": {
991
- "disabled": true,
992
- "widget": "singleLineText"
993
- },
994
- "filename": {
995
- "disabled": true,
996
- "widget": "singleLineText"
997
- },
998
- "description": {
999
- "disabled": true,
1000
- "widget": "paragraphText"
1001
- },
1002
- "caption": {
1003
- "disabled": true,
1004
- "widget": "wysiwygSingleLineText"
1005
- },
1006
- "uploadStatus": {
1007
- "disabled": true,
1008
- "widget": "singleLineText"
1009
- },
1010
- "mimeType": {
1011
- "disabled": true,
1012
- "widget": "singleLineText"
1013
- },
1014
- "title": {
1015
- "disabled": true,
1016
- "widget": "singleLineText"
1017
- },
1018
- "authorTag": {
1019
- "widget": "relationship"
1020
- },
1021
- "credit": {
1022
- "disabled": true,
1023
- "widget": "wysiwygSingleLineText"
1024
- }
1025
- },
1026
- "order": [
1027
- "title",
1028
- "authorTag",
1029
- "description",
1030
- "caption",
1031
- "credit",
1032
- "filename",
1033
- "path",
1034
- "mimeType",
1035
- "uploadStatus"
1036
- ]
1037
- }
1038
- },
1039
- "Book": {
1040
- "default": {
1041
- "properties": {
1042
- "author": {
1043
- "widget": "relationship"
1044
- },
1045
- "coverImage": {
1046
- "widget": "image"
1047
- },
1048
- "genre": {
1049
- "widget": "relationship"
1050
- },
1051
- "publishDate": {
1052
- "widget": "datetime"
1053
- },
1054
- "totalPages": {
1055
- "widget": "number"
1056
- },
1057
- "title": {
1058
- "widget": "singleLineText"
1059
- },
1060
- "type": {
1061
- "widget": "dropdown"
1062
- },
1063
- "body": {
1064
- "widget": "wysiwygText"
1065
- }
1066
- },
1067
- "order": [
1068
- "title",
1069
- "genre",
1070
- "publishDate",
1071
- "coverImage",
1072
- "author",
1073
- "totalPages",
1074
- "type",
1075
- "body"
1076
- ]
1077
- }
1078
- }
1079
- },
1080
- "dataKey": "supersecret"
1080
+ "schemaVersion": "3.10.0"
1081
1081
  }