@takeshape/schema 8.17.1 → 8.21.1

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 +11 -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 +6 -5
  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 +11 -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 +5 -4
  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,152 @@
8
8
  "locales": [
9
9
  "en-us"
10
10
  ],
11
- "schemaVersion": "3.9.0",
11
+ "workflows": {},
12
+ "forms": {
13
+ "Product": {
14
+ "default": {
15
+ "properties": {
16
+ "name": {
17
+ "widget": "singleLineText"
18
+ },
19
+ "takeshapeIoShop": {
20
+ "properties": {
21
+ "descriptionHtml": {
22
+ "widget": "serviceObjectProperty",
23
+ "provider": "shopify"
24
+ },
25
+ "handle": {
26
+ "widget": "serviceObjectProperty",
27
+ "provider": "shopify"
28
+ },
29
+ "redirectNewHandle": {
30
+ "widget": "serviceObjectProperty",
31
+ "provider": "shopify"
32
+ },
33
+ "productType": {
34
+ "widget": "serviceObjectProperty",
35
+ "provider": "shopify"
36
+ },
37
+ "tags": {
38
+ "widget": "serviceObjectProperty",
39
+ "provider": "shopify"
40
+ },
41
+ "templateSuffix": {
42
+ "widget": "serviceObjectProperty",
43
+ "provider": "shopify"
44
+ },
45
+ "giftCard": {
46
+ "widget": "serviceObjectProperty",
47
+ "provider": "shopify"
48
+ },
49
+ "giftCardTemplateSuffix": {
50
+ "widget": "serviceObjectProperty",
51
+ "provider": "shopify"
52
+ },
53
+ "title": {
54
+ "widget": "serviceObjectProperty",
55
+ "provider": "shopify"
56
+ },
57
+ "vendor": {
58
+ "widget": "serviceObjectProperty",
59
+ "provider": "shopify"
60
+ },
61
+ "bodyHtml": {
62
+ "widget": "serviceObjectProperty",
63
+ "provider": "shopify"
64
+ },
65
+ "images": {
66
+ "widget": "shopifyProductImages",
67
+ "provider": "shopify"
68
+ },
69
+ "publishedAt": {
70
+ "widget": "serviceObjectProperty",
71
+ "provider": "shopify"
72
+ },
73
+ "variants": {
74
+ "widget": "shopifyRelationshipSummary",
75
+ "provider": "shopify"
76
+ }
77
+ },
78
+ "widget": "shopify",
79
+ "wrapper": "shopifyServiceWrapper",
80
+ "order": [
81
+ "title",
82
+ "handle",
83
+ "descriptionHtml",
84
+ "bodyHtml",
85
+ "tags",
86
+ "vendor",
87
+ "publishedAt",
88
+ "variants",
89
+ "images",
90
+ "redirectNewHandle",
91
+ "productType",
92
+ "templateSuffix",
93
+ "giftCard",
94
+ "giftCardTemplateSuffix"
95
+ ]
96
+ },
97
+ "takeshapeIoShopId": {
98
+ "instructions": "Format: gid://shopify/Product/1111111111111",
99
+ "label": "product ID",
100
+ "widget": "serviceObjectId",
101
+ "provider": "shopify",
102
+ "serviceObjectType": "product",
103
+ "service": "takeshape-io-shop"
104
+ }
105
+ },
106
+ "order": [
107
+ "name",
108
+ "takeshapeIoShopId",
109
+ "takeshapeIoShop"
110
+ ]
111
+ }
112
+ },
113
+ "Look": {
114
+ "default": {
115
+ "properties": {
116
+ "name": {
117
+ "widget": "singleLineText"
118
+ },
119
+ "photo": {
120
+ "widget": "image"
121
+ },
122
+ "text": {
123
+ "widget": "wysiwygText"
124
+ },
125
+ "products": {
126
+ "widget": "relationship"
127
+ }
128
+ },
129
+ "order": [
130
+ "name",
131
+ "photo",
132
+ "text",
133
+ "products"
134
+ ]
135
+ }
136
+ }
137
+ },
138
+ "services": {
139
+ "shopify:takeshape-io-shop": {
140
+ "title": "Shopify Lookbook",
141
+ "id": "shopify:takeshape-io-shop",
142
+ "provider": "shopify",
143
+ "namespace": "Shopify",
144
+ "serviceType": "graphql",
145
+ "authenticationType": "oauth2Bearer",
146
+ "options": {
147
+ "type": "graphql",
148
+ "namespace": "Shopify",
149
+ "shop": "takeshape-io-shop",
150
+ "authHeader": "X-Shopify-Access-Token",
151
+ "endpoint": "https://takeshape-io-shop.myshopify.com/admin/api/2020-07/graphql.json",
152
+ "name": "Shopify Lookbook"
153
+ }
154
+ }
155
+ },
156
+ "dataKey": "AQIDAHhcZWXOdlBglkxBhI23ElO/clC/kuw5ynjXDSqJgfTz8gF9PtUhhmj99Nwuy3NTUSw0AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMyc4d40JF8HULr2wWAgEQgDs9q/z7QObGJa+nOpS1GDYB9HYK9EcHEiZjhiGhQyAhxZLvqEwQj7+1Zn1LHykh3NJE1BQLQqF8AlQkkQ==",
12
157
  "queries": {
13
158
  "getProduct": {
14
159
  "shape": "Product",
@@ -1031,150 +1176,5 @@
1031
1176
  }
1032
1177
  }
1033
1178
  },
1034
- "workflows": {},
1035
- "forms": {
1036
- "Product": {
1037
- "default": {
1038
- "properties": {
1039
- "name": {
1040
- "widget": "singleLineText"
1041
- },
1042
- "takeshapeIoShop": {
1043
- "properties": {
1044
- "descriptionHtml": {
1045
- "widget": "serviceObjectProperty",
1046
- "provider": "shopify"
1047
- },
1048
- "handle": {
1049
- "widget": "serviceObjectProperty",
1050
- "provider": "shopify"
1051
- },
1052
- "redirectNewHandle": {
1053
- "widget": "serviceObjectProperty",
1054
- "provider": "shopify"
1055
- },
1056
- "productType": {
1057
- "widget": "serviceObjectProperty",
1058
- "provider": "shopify"
1059
- },
1060
- "tags": {
1061
- "widget": "serviceObjectProperty",
1062
- "provider": "shopify"
1063
- },
1064
- "templateSuffix": {
1065
- "widget": "serviceObjectProperty",
1066
- "provider": "shopify"
1067
- },
1068
- "giftCard": {
1069
- "widget": "serviceObjectProperty",
1070
- "provider": "shopify"
1071
- },
1072
- "giftCardTemplateSuffix": {
1073
- "widget": "serviceObjectProperty",
1074
- "provider": "shopify"
1075
- },
1076
- "title": {
1077
- "widget": "serviceObjectProperty",
1078
- "provider": "shopify"
1079
- },
1080
- "vendor": {
1081
- "widget": "serviceObjectProperty",
1082
- "provider": "shopify"
1083
- },
1084
- "bodyHtml": {
1085
- "widget": "serviceObjectProperty",
1086
- "provider": "shopify"
1087
- },
1088
- "images": {
1089
- "widget": "shopifyProductImages",
1090
- "provider": "shopify"
1091
- },
1092
- "publishedAt": {
1093
- "widget": "serviceObjectProperty",
1094
- "provider": "shopify"
1095
- },
1096
- "variants": {
1097
- "widget": "shopifyRelationshipSummary",
1098
- "provider": "shopify"
1099
- }
1100
- },
1101
- "widget": "shopify",
1102
- "wrapper": "shopifyServiceWrapper",
1103
- "order": [
1104
- "title",
1105
- "handle",
1106
- "descriptionHtml",
1107
- "bodyHtml",
1108
- "tags",
1109
- "vendor",
1110
- "publishedAt",
1111
- "variants",
1112
- "images",
1113
- "redirectNewHandle",
1114
- "productType",
1115
- "templateSuffix",
1116
- "giftCard",
1117
- "giftCardTemplateSuffix"
1118
- ]
1119
- },
1120
- "takeshapeIoShopId": {
1121
- "instructions": "Format: gid://shopify/Product/1111111111111",
1122
- "label": "product ID",
1123
- "widget": "serviceObjectId",
1124
- "provider": "shopify",
1125
- "serviceObjectType": "product",
1126
- "service": "takeshape-io-shop"
1127
- }
1128
- },
1129
- "order": [
1130
- "name",
1131
- "takeshapeIoShopId",
1132
- "takeshapeIoShop"
1133
- ]
1134
- }
1135
- },
1136
- "Look": {
1137
- "default": {
1138
- "properties": {
1139
- "name": {
1140
- "widget": "singleLineText"
1141
- },
1142
- "photo": {
1143
- "widget": "image"
1144
- },
1145
- "text": {
1146
- "widget": "wysiwygText"
1147
- },
1148
- "products": {
1149
- "widget": "relationship"
1150
- }
1151
- },
1152
- "order": [
1153
- "name",
1154
- "photo",
1155
- "text",
1156
- "products"
1157
- ]
1158
- }
1159
- }
1160
- },
1161
- "services": {
1162
- "shopify:takeshape-io-shop": {
1163
- "title": "Shopify Lookbook",
1164
- "id": "shopify:takeshape-io-shop",
1165
- "provider": "shopify",
1166
- "namespace": "Shopify",
1167
- "serviceType": "graphql",
1168
- "authenticationType": "oauth2Bearer",
1169
- "options": {
1170
- "type": "graphql",
1171
- "namespace": "Shopify",
1172
- "shop": "takeshape-io-shop",
1173
- "authHeader": "X-Shopify-Access-Token",
1174
- "endpoint": "https://takeshape-io-shop.myshopify.com/admin/api/2020-07/graphql.json",
1175
- "name": "Shopify Lookbook"
1176
- }
1177
- }
1178
- },
1179
- "dataKey": "AQIDAHhcZWXOdlBglkxBhI23ElO/clC/kuw5ynjXDSqJgfTz8gF9PtUhhmj99Nwuy3NTUSw0AAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMyc4d40JF8HULr2wWAgEQgDs9q/z7QObGJa+nOpS1GDYB9HYK9EcHEiZjhiGhQyAhxZLvqEwQj7+1Zn1LHykh3NJE1BQLQqF8AlQkkQ=="
1179
+ "schemaVersion": "3.10.0"
1180
1180
  }