@takeshape/schema 7.194.0
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.
- package/README.md +5 -0
- package/es/api-version.js +21 -0
- package/es/auth-schemas.js +0 -0
- package/es/builtin-schema.js +590 -0
- package/es/content-schema-transform.js +192 -0
- package/es/entitlements.js +0 -0
- package/es/enum.js +11 -0
- package/es/get-is-leaf.js +58 -0
- package/es/index.js +25 -0
- package/es/migration.js +413 -0
- package/es/mocks.js +47 -0
- package/es/patterns.js +0 -0
- package/es/project-schema/index.js +10 -0
- package/es/project-schema/v1.0.0.js +0 -0
- package/es/project-schema/v3.0.0.js +0 -0
- package/es/project-schema/v3.1.0.js +0 -0
- package/es/project-schema/v3.2.0.js +0 -0
- package/es/project-schema/v3.3.0.js +0 -0
- package/es/project-schema/v3.4.0.js +0 -0
- package/es/project-schema/v3.5.0.js +0 -0
- package/es/project-schema/v3.5.1.js +0 -0
- package/es/project-schema/v3.6.0.js +0 -0
- package/es/refs.js +301 -0
- package/es/resolvers.js +2 -0
- package/es/scalars.js +4 -0
- package/es/schema-util.js +1197 -0
- package/es/schemas/auth-schemas.json +313 -0
- package/es/schemas/project-schema/meta-schema-v1.0.0.json +209 -0
- package/es/schemas/project-schema/meta-schema-v3.0.0.json +609 -0
- package/es/schemas/project-schema/meta-schema-v3.1.0.json +609 -0
- package/es/schemas/project-schema/meta-schema-v3.2.0.json +613 -0
- package/es/schemas/project-schema/meta-schema-v3.3.0.json +613 -0
- package/es/schemas/project-schema/meta-schema-v3.4.0.json +613 -0
- package/es/schemas/project-schema/meta-schema-v3.5.0.json +627 -0
- package/es/schemas/project-schema/meta-schema-v3.5.1.json +630 -0
- package/es/schemas/project-schema/meta-schema-v3.6.0.json +633 -0
- package/es/schemas/project-schema/v1.0.0.json +321 -0
- package/es/schemas/project-schema/v3.0.0.json +411 -0
- package/es/schemas/project-schema/v3.1.0.json +569 -0
- package/es/schemas/project-schema/v3.2.0.json +577 -0
- package/es/schemas/project-schema/v3.3.0.json +578 -0
- package/es/schemas/project-schema/v3.4.0.json +568 -0
- package/es/schemas/project-schema/v3.5.0.json +568 -0
- package/es/schemas/project-schema/v3.5.1.json +568 -0
- package/es/schemas/project-schema/v3.6.0.json +584 -0
- package/es/schemas/project-schema.json +16 -0
- package/es/schemas/user-schema.json +58 -0
- package/es/services.js +379 -0
- package/es/taxonomies.js +55 -0
- package/es/template-shapes.js +79 -0
- package/es/types.js +202 -0
- package/es/unions.js +137 -0
- package/es/user-schema.js +0 -0
- package/es/util/detect-cycles.js +54 -0
- package/es/util/index.js +1 -0
- package/es/validate.js +764 -0
- package/es/versions.js +4 -0
- package/es/workflows.js +69 -0
- package/examples/.pnpm-debug.log +20 -0
- package/examples/v1_0_0/beer-schema.json +125 -0
- package/examples/v1_0_0/blog-schema.json +192 -0
- package/examples/v1_0_0/brewery-schema.json +232 -0
- package/examples/v1_0_0/complex-project-schema.json +3197 -0
- package/examples/v1_0_0/error-schema.json +275 -0
- package/examples/v1_0_0/frank-and-fred-schema.json +21387 -0
- package/examples/v1_0_0/massive-schema.json +6930 -0
- package/examples/v1_0_0/post-schema.json +83 -0
- package/examples/v1_0_0/real-world-schema.json +797 -0
- package/examples/v1_0_0/recursive-repeater-schema.json +69 -0
- package/examples/v1_0_0/recursive-schema.json +79 -0
- package/examples/v1_0_0/schema-with-repeater-draftjs.json +292 -0
- package/examples/v1_0_0/shape-books.json +797 -0
- package/examples/v1_0_0/user-schema-no-required.json +84 -0
- package/examples/v1_0_0/user-schema-with-defaults.json +105 -0
- package/examples/v1_0_0/user-schema-with-obj-prop.json +92 -0
- package/examples/v1_0_0/user-schema.json +87 -0
- package/examples/v3_0_0/rick-and-morty-rest.json +62 -0
- package/examples/v3_0_0/shopify-lookbook.json +1172 -0
- package/examples/v3_0_0/shopify-store-with-widget.json +11323 -0
- package/examples/v3_2_0/blog-schema.json +378 -0
- package/examples/v3_2_0/brewery-schema.json +385 -0
- package/examples/v3_2_0/complex-project-schema.json +3748 -0
- package/examples/v3_2_0/frank-and-fred-schema.json +19217 -0
- package/examples/v3_2_0/massive-schema.json +6676 -0
- package/examples/v3_2_0/pet-oneof-array.json +323 -0
- package/examples/v3_2_0/post-schema.json +265 -0
- package/examples/v3_2_0/real-world-schema.json +970 -0
- package/examples/v3_2_0/recursive-repeater-schema.json +144 -0
- package/examples/v3_2_0/recursive-schema.json +151 -0
- package/examples/v3_2_0/rick-and-morty-rest.json +65 -0
- package/examples/v3_2_0/schema-with-repeater-draftjs.json +381 -0
- package/examples/v3_2_0/shape-books.json +1044 -0
- package/examples/v3_2_0/shopify-store-with-widget.json +11016 -0
- package/examples/v3_2_0/user-schema-no-required.json +174 -0
- package/examples/v3_2_0/user-schema-with-defaults.json +187 -0
- package/examples/v3_3_0/blog-schema.json +405 -0
- package/examples/v3_3_0/brewery-schema.json +406 -0
- package/examples/v3_3_0/complex-project-schema.json +4076 -0
- package/examples/v3_3_0/frank-and-fred-schema.json +20913 -0
- package/examples/v3_3_0/massive-schema.json +7309 -0
- package/examples/v3_3_0/pet-oneof-array.json +380 -0
- package/examples/v3_3_0/post-schema.json +248 -0
- package/examples/v3_3_0/real-world-schema.json +1046 -0
- package/examples/v3_3_0/recursive-repeater-schema.json +154 -0
- package/examples/v3_3_0/recursive-schema.json +161 -0
- package/examples/v3_3_0/rick-and-morty-rest.json +101 -0
- package/examples/v3_3_0/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_3_0/shape-books.json +1121 -0
- package/examples/v3_3_0/shopify-lookbook.json +1196 -0
- package/examples/v3_3_0/shopify-store-with-widget.json +11320 -0
- package/examples/v3_3_0/user-schema-no-required.json +185 -0
- package/examples/v3_3_0/user-schema-with-defaults.json +210 -0
- package/examples/v3_4_0/blog-schema.json +405 -0
- package/examples/v3_4_0/brewery-schema.json +406 -0
- package/examples/v3_4_0/complex-project-schema.json +4076 -0
- package/examples/v3_4_0/frank-and-fred-schema.json +20913 -0
- package/examples/v3_4_0/massive-schema.json +7309 -0
- package/examples/v3_4_0/pet-oneof-array.json +420 -0
- package/examples/v3_4_0/post-schema.json +248 -0
- package/examples/v3_4_0/real-world-schema.json +1046 -0
- package/examples/v3_4_0/recursive-repeater-schema.json +154 -0
- package/examples/v3_4_0/recursive-schema.json +161 -0
- package/examples/v3_4_0/rick-and-morty-rest.json +101 -0
- package/examples/v3_4_0/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_4_0/shape-books.json +1121 -0
- package/examples/v3_4_0/shopify-lookbook.json +1196 -0
- package/examples/v3_4_0/shopify-store-with-widget.json +11323 -0
- package/examples/v3_4_0/user-schema-no-required.json +185 -0
- package/examples/v3_4_0/user-schema-with-defaults.json +210 -0
- package/examples/v3_5_0/blog-schema.json +405 -0
- package/examples/v3_5_0/brewery-schema.json +406 -0
- package/examples/v3_5_0/complex-project-schema.json +4076 -0
- package/examples/v3_5_0/frank-and-fred-schema.json +20913 -0
- package/examples/v3_5_0/massive-schema.json +7309 -0
- package/examples/v3_5_0/pet-oneof-array.json +420 -0
- package/examples/v3_5_0/post-schema.json +248 -0
- package/examples/v3_5_0/real-world-schema.json +1046 -0
- package/examples/v3_5_0/recursive-repeater-schema.json +154 -0
- package/examples/v3_5_0/recursive-schema.json +161 -0
- package/examples/v3_5_0/rick-and-morty-rest.json +101 -0
- package/examples/v3_5_0/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_5_0/shape-books.json +1121 -0
- package/examples/v3_5_0/shopify-lookbook.json +1196 -0
- package/examples/v3_5_0/shopify-store-with-widget.json +12271 -0
- package/examples/v3_5_0/user-schema-no-required.json +185 -0
- package/examples/v3_5_0/user-schema-with-defaults.json +210 -0
- package/examples/v3_5_1/blog-schema.json +405 -0
- package/examples/v3_5_1/brewery-schema.json +406 -0
- package/examples/v3_5_1/complex-project-schema.json +4076 -0
- package/examples/v3_5_1/frank-and-fred-schema.json +20913 -0
- package/examples/v3_5_1/massive-schema.json +7309 -0
- package/examples/v3_5_1/pet-oneof-array.json +420 -0
- package/examples/v3_5_1/post-schema.json +248 -0
- package/examples/v3_5_1/real-world-schema.json +1046 -0
- package/examples/v3_5_1/recursive-repeater-schema.json +154 -0
- package/examples/v3_5_1/recursive-schema.json +161 -0
- package/examples/v3_5_1/rick-and-morty-rest.json +101 -0
- package/examples/v3_5_1/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_5_1/shape-books.json +1121 -0
- package/examples/v3_5_1/shopify-lookbook.json +1196 -0
- package/examples/v3_5_1/shopify-store-with-widget.json +12271 -0
- package/examples/v3_5_1/stripe-starter-resolved.json +21419 -0
- package/examples/v3_5_1/user-schema-no-required.json +185 -0
- package/examples/v3_5_1/user-schema-with-defaults.json +210 -0
- package/examples/v3_6_0/blog-schema.json +405 -0
- package/examples/v3_6_0/brewery-schema.json +406 -0
- package/examples/v3_6_0/complex-project-schema.json +4076 -0
- package/examples/v3_6_0/frank-and-fred-schema.json +20913 -0
- package/examples/v3_6_0/massive-schema.json +7309 -0
- package/examples/v3_6_0/pet-oneof-array.json +420 -0
- package/examples/v3_6_0/post-schema.json +248 -0
- package/examples/v3_6_0/real-world-schema.json +1046 -0
- package/examples/v3_6_0/recursive-repeater-schema.json +154 -0
- package/examples/v3_6_0/recursive-schema.json +161 -0
- package/examples/v3_6_0/rick-and-morty-rest.json +101 -0
- package/examples/v3_6_0/schema-with-repeater-draftjs.json +393 -0
- package/examples/v3_6_0/shape-books.json +1121 -0
- package/examples/v3_6_0/shopify-lookbook.json +1196 -0
- package/examples/v3_6_0/shopify-store-with-widget.json +12271 -0
- package/examples/v3_6_0/stripe-starter-resolved.json +21419 -0
- package/examples/v3_6_0/user-schema-no-required.json +185 -0
- package/examples/v3_6_0/user-schema-with-defaults.json +210 -0
- package/lib/api-version.d.ts +6 -0
- package/lib/api-version.d.ts.map +1 -0
- package/lib/api-version.js +36 -0
- package/lib/auth-schemas.d.ts +105 -0
- package/lib/auth-schemas.d.ts.map +1 -0
- package/lib/auth-schemas.js +1 -0
- package/lib/builtin-schema.d.ts +8 -0
- package/lib/builtin-schema.d.ts.map +1 -0
- package/lib/builtin-schema.js +606 -0
- package/lib/content-schema-transform.d.ts +41 -0
- package/lib/content-schema-transform.d.ts.map +1 -0
- package/lib/content-schema-transform.js +217 -0
- package/lib/entitlements.d.ts +1 -0
- package/lib/entitlements.d.ts.map +1 -0
- package/lib/entitlements.js +1 -0
- package/lib/enum.d.ts +3 -0
- package/lib/enum.d.ts.map +1 -0
- package/lib/enum.js +18 -0
- package/lib/get-is-leaf.d.ts +4 -0
- package/lib/get-is-leaf.d.ts.map +1 -0
- package/lib/get-is-leaf.js +68 -0
- package/lib/index.d.ts +27 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +359 -0
- package/lib/migration.d.ts +55 -0
- package/lib/migration.d.ts.map +1 -0
- package/lib/migration.js +463 -0
- package/lib/mocks.d.ts +13 -0
- package/lib/mocks.d.ts.map +1 -0
- package/lib/mocks.js +61 -0
- package/lib/patterns.d.ts +13 -0
- package/lib/patterns.d.ts.map +1 -0
- package/lib/patterns.js +1 -0
- package/lib/project-schema/index.d.ts +21 -0
- package/lib/project-schema/index.d.ts.map +1 -0
- package/lib/project-schema/index.js +122 -0
- package/lib/project-schema/v1.0.0.d.ts +293 -0
- package/lib/project-schema/v1.0.0.d.ts.map +1 -0
- package/lib/project-schema/v1.0.0.js +1 -0
- package/lib/project-schema/v3.0.0.d.ts +480 -0
- package/lib/project-schema/v3.0.0.d.ts.map +1 -0
- package/lib/project-schema/v3.0.0.js +1 -0
- package/lib/project-schema/v3.1.0.d.ts +623 -0
- package/lib/project-schema/v3.1.0.d.ts.map +1 -0
- package/lib/project-schema/v3.1.0.js +1 -0
- package/lib/project-schema/v3.2.0.d.ts +634 -0
- package/lib/project-schema/v3.2.0.d.ts.map +1 -0
- package/lib/project-schema/v3.2.0.js +1 -0
- package/lib/project-schema/v3.3.0.d.ts +634 -0
- package/lib/project-schema/v3.3.0.d.ts.map +1 -0
- package/lib/project-schema/v3.3.0.js +1 -0
- package/lib/project-schema/v3.4.0.d.ts +626 -0
- package/lib/project-schema/v3.4.0.d.ts.map +1 -0
- package/lib/project-schema/v3.4.0.js +1 -0
- package/lib/project-schema/v3.5.0.d.ts +651 -0
- package/lib/project-schema/v3.5.0.d.ts.map +1 -0
- package/lib/project-schema/v3.5.0.js +1 -0
- package/lib/project-schema/v3.5.1.d.ts +651 -0
- package/lib/project-schema/v3.5.1.d.ts.map +1 -0
- package/lib/project-schema/v3.5.1.js +1 -0
- package/lib/project-schema/v3.6.0.d.ts +660 -0
- package/lib/project-schema/v3.6.0.d.ts.map +1 -0
- package/lib/project-schema/v3.6.0.js +1 -0
- package/lib/refs.d.ts +122 -0
- package/lib/refs.d.ts.map +1 -0
- package/lib/refs.js +359 -0
- package/lib/resolvers.d.ts +4 -0
- package/lib/resolvers.d.ts.map +1 -0
- package/lib/resolvers.js +10 -0
- package/lib/scalars.d.ts +3 -0
- package/lib/scalars.d.ts.map +1 -0
- package/lib/scalars.js +13 -0
- package/lib/schema-util.d.ts +201 -0
- package/lib/schema-util.d.ts.map +1 -0
- package/lib/schema-util.js +1353 -0
- package/lib/schemas/auth-schemas.json +313 -0
- package/lib/schemas/project-schema/meta-schema-v1.0.0.json +209 -0
- package/lib/schemas/project-schema/meta-schema-v3.0.0.json +609 -0
- package/lib/schemas/project-schema/meta-schema-v3.1.0.json +609 -0
- package/lib/schemas/project-schema/meta-schema-v3.2.0.json +613 -0
- package/lib/schemas/project-schema/meta-schema-v3.3.0.json +613 -0
- package/lib/schemas/project-schema/meta-schema-v3.4.0.json +613 -0
- package/lib/schemas/project-schema/meta-schema-v3.5.0.json +627 -0
- package/lib/schemas/project-schema/meta-schema-v3.5.1.json +630 -0
- package/lib/schemas/project-schema/meta-schema-v3.6.0.json +633 -0
- package/lib/schemas/project-schema/v1.0.0.json +321 -0
- package/lib/schemas/project-schema/v3.0.0.json +411 -0
- package/lib/schemas/project-schema/v3.1.0.json +569 -0
- package/lib/schemas/project-schema/v3.2.0.json +577 -0
- package/lib/schemas/project-schema/v3.3.0.json +578 -0
- package/lib/schemas/project-schema/v3.4.0.json +568 -0
- package/lib/schemas/project-schema/v3.5.0.json +568 -0
- package/lib/schemas/project-schema/v3.5.1.json +568 -0
- package/lib/schemas/project-schema/v3.6.0.json +584 -0
- package/lib/schemas/project-schema.json +16 -0
- package/lib/schemas/user-schema.json +58 -0
- package/lib/services.d.ts +71 -0
- package/lib/services.d.ts.map +1 -0
- package/lib/services.js +413 -0
- package/lib/taxonomies.d.ts +16 -0
- package/lib/taxonomies.d.ts.map +1 -0
- package/lib/taxonomies.js +69 -0
- package/lib/template-shapes.d.ts +32 -0
- package/lib/template-shapes.d.ts.map +1 -0
- package/lib/template-shapes.js +100 -0
- package/lib/types.d.ts +187 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +289 -0
- package/lib/unions.d.ts +29 -0
- package/lib/unions.d.ts.map +1 -0
- package/lib/unions.js +167 -0
- package/lib/user-schema.d.ts +39 -0
- package/lib/user-schema.d.ts.map +1 -0
- package/lib/user-schema.js +1 -0
- package/lib/util/detect-cycles.d.ts +6 -0
- package/lib/util/detect-cycles.d.ts.map +1 -0
- package/lib/util/detect-cycles.js +61 -0
- package/lib/util/index.d.ts +2 -0
- package/lib/util/index.d.ts.map +1 -0
- package/lib/util/index.js +18 -0
- package/lib/validate.d.ts +49 -0
- package/lib/validate.d.ts.map +1 -0
- package/lib/validate.js +823 -0
- package/lib/versions.d.ts +5 -0
- package/lib/versions.d.ts.map +1 -0
- package/lib/versions.js +14 -0
- package/lib/workflows.d.ts +15 -0
- package/lib/workflows.d.ts.map +1 -0
- package/lib/workflows.js +92 -0
- package/package.json +65 -0
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import gte from 'semver/functions/gte';
|
|
2
|
+
import coerce from 'semver/functions/coerce';
|
|
3
|
+
export const createVersionPredicate = (featureVersion, comparison) => {
|
|
4
|
+
const coercedFeatureVersion = coerce(featureVersion);
|
|
5
|
+
|
|
6
|
+
if (!coercedFeatureVersion) {
|
|
7
|
+
throw new Error(`Could not create predicate version "${featureVersion}" is not valid`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return apiVersion => {
|
|
11
|
+
const coercedApiVersion = coerce(apiVersion);
|
|
12
|
+
|
|
13
|
+
if (!coercedApiVersion) {
|
|
14
|
+
throw new Error(`Version "${apiVersion}" is not valid and could not be coerced`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return comparison(coercedApiVersion, coercedFeatureVersion);
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export const workflowsEnabled = createVersionPredicate('2.0.0', gte);
|
|
21
|
+
export const whereClauseEnabled = createVersionPredicate('2.0.0', gte);
|
|
File without changes
|
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
export function isAsset(content) {
|
|
2
|
+
return content._contentTypeId === 'ASSET' || content._shapeId === 'ASSET';
|
|
3
|
+
}
|
|
4
|
+
const ASSET_PATH = 'Hk6FQuz5';
|
|
5
|
+
export function getAssetS3Path(content) {
|
|
6
|
+
return content[ASSET_PATH];
|
|
7
|
+
}
|
|
8
|
+
export function setAssetS3Path(content, path) {
|
|
9
|
+
content[ASSET_PATH] = path;
|
|
10
|
+
}
|
|
11
|
+
export const builtInShapes = {
|
|
12
|
+
TSRelationship: {
|
|
13
|
+
id: 'TSRelationship',
|
|
14
|
+
name: 'TSRelationship',
|
|
15
|
+
title: 'Relationship',
|
|
16
|
+
schema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
shapeId: {
|
|
20
|
+
type: 'string'
|
|
21
|
+
},
|
|
22
|
+
shapeName: {
|
|
23
|
+
type: 'string'
|
|
24
|
+
},
|
|
25
|
+
contentTypeId: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
'@deprecationReason': 'Use shapeId instead'
|
|
28
|
+
},
|
|
29
|
+
id: {
|
|
30
|
+
type: 'string'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
required: ['id']
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
TSColorHsl: {
|
|
37
|
+
id: 'TSColorHsl',
|
|
38
|
+
name: 'TSColorHsl',
|
|
39
|
+
title: 'Color Hsl',
|
|
40
|
+
schema: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
properties: {
|
|
43
|
+
h: {
|
|
44
|
+
type: 'number'
|
|
45
|
+
},
|
|
46
|
+
a: {
|
|
47
|
+
type: 'number'
|
|
48
|
+
},
|
|
49
|
+
s: {
|
|
50
|
+
type: 'number'
|
|
51
|
+
},
|
|
52
|
+
l: {
|
|
53
|
+
type: 'number'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
TSColorHsv: {
|
|
59
|
+
id: 'TSColorHsv',
|
|
60
|
+
name: 'TSColorHsv',
|
|
61
|
+
title: 'Color Hsv',
|
|
62
|
+
schema: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
h: {
|
|
66
|
+
type: 'number'
|
|
67
|
+
},
|
|
68
|
+
a: {
|
|
69
|
+
type: 'number'
|
|
70
|
+
},
|
|
71
|
+
s: {
|
|
72
|
+
type: 'number'
|
|
73
|
+
},
|
|
74
|
+
v: {
|
|
75
|
+
type: 'number'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
TSColorRgb: {
|
|
81
|
+
id: 'TSColorRgb',
|
|
82
|
+
name: 'TSColorRgb',
|
|
83
|
+
title: 'Color Rgb',
|
|
84
|
+
schema: {
|
|
85
|
+
type: 'object',
|
|
86
|
+
properties: {
|
|
87
|
+
a: {
|
|
88
|
+
type: 'number'
|
|
89
|
+
},
|
|
90
|
+
b: {
|
|
91
|
+
type: 'number'
|
|
92
|
+
},
|
|
93
|
+
r: {
|
|
94
|
+
type: 'number'
|
|
95
|
+
},
|
|
96
|
+
g: {
|
|
97
|
+
type: 'number'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
TSColor: {
|
|
103
|
+
id: 'TSColor',
|
|
104
|
+
name: 'TSColor',
|
|
105
|
+
title: 'Color',
|
|
106
|
+
schema: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties: {
|
|
109
|
+
hex: {
|
|
110
|
+
type: 'string'
|
|
111
|
+
},
|
|
112
|
+
hsl: {
|
|
113
|
+
$ref: '#/shapes/TSColorHsl/schema'
|
|
114
|
+
},
|
|
115
|
+
hsv: {
|
|
116
|
+
$ref: '#/shapes/TSColorHsv/schema'
|
|
117
|
+
},
|
|
118
|
+
rgb: {
|
|
119
|
+
$ref: '#/shapes/TSColorRgb/schema'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
Asset: {
|
|
125
|
+
id: 'ASSET',
|
|
126
|
+
name: 'Asset',
|
|
127
|
+
title: 'Asset',
|
|
128
|
+
model: {
|
|
129
|
+
type: 'multiple'
|
|
130
|
+
},
|
|
131
|
+
schema: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
properties: {
|
|
134
|
+
title: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
title: 'Title',
|
|
137
|
+
'@mapping': 'takeshape:local:Asset.By5tQOMc'
|
|
138
|
+
},
|
|
139
|
+
description: {
|
|
140
|
+
type: 'string',
|
|
141
|
+
title: 'Description',
|
|
142
|
+
'@mapping': 'takeshape:local:Asset.B1Zsra3fx'
|
|
143
|
+
},
|
|
144
|
+
filename: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
title: 'Filename',
|
|
147
|
+
'@l10n': false,
|
|
148
|
+
minLength: 1,
|
|
149
|
+
'@mapping': 'takeshape:local:Asset.H1oYQOM9'
|
|
150
|
+
},
|
|
151
|
+
caption: {
|
|
152
|
+
type: 'object',
|
|
153
|
+
title: 'Caption',
|
|
154
|
+
'@mapping': 'takeshape:local:Asset.SyWVsd98x',
|
|
155
|
+
'@tag': 'draftjs'
|
|
156
|
+
},
|
|
157
|
+
credit: {
|
|
158
|
+
type: 'object',
|
|
159
|
+
title: 'Credit',
|
|
160
|
+
'@mapping': 'takeshape:local:Asset.Skn_i_5Ll',
|
|
161
|
+
'@tag': 'draftjs'
|
|
162
|
+
},
|
|
163
|
+
path: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
title: 'Path',
|
|
166
|
+
'@l10n': false,
|
|
167
|
+
minLength: 1,
|
|
168
|
+
'@mapping': 'takeshape:local:Asset.Hk6FQuz5'
|
|
169
|
+
},
|
|
170
|
+
mimeType: {
|
|
171
|
+
type: 'string',
|
|
172
|
+
title: 'MIME type',
|
|
173
|
+
'@l10n': false,
|
|
174
|
+
'@mapping': 'takeshape:local:Asset.SyCYX_Gq'
|
|
175
|
+
},
|
|
176
|
+
sourceUrl: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
title: 'Source URL',
|
|
179
|
+
'@l10n': false,
|
|
180
|
+
'@mapping': 'takeshape:local:Asset.SJXSidnXE'
|
|
181
|
+
},
|
|
182
|
+
uploadStatus: {
|
|
183
|
+
type: 'string',
|
|
184
|
+
title: 'Upload status',
|
|
185
|
+
'@l10n': false,
|
|
186
|
+
'@mapping': 'takeshape:local:Asset.ByeAYXdG9'
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
required: ['filename', 'path']
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
TsStaticSite: {
|
|
193
|
+
id: 'SITE',
|
|
194
|
+
name: 'TsStaticSite',
|
|
195
|
+
title: 'Static Site',
|
|
196
|
+
model: {
|
|
197
|
+
type: 'multiple'
|
|
198
|
+
},
|
|
199
|
+
schema: {
|
|
200
|
+
type: 'object',
|
|
201
|
+
properties: {
|
|
202
|
+
title: {
|
|
203
|
+
type: 'string',
|
|
204
|
+
title: 'Title',
|
|
205
|
+
'@l10n': false,
|
|
206
|
+
minLength: 1,
|
|
207
|
+
'@mapping': 'takeshape:local:TsStaticSite.Ski9jLuXg'
|
|
208
|
+
},
|
|
209
|
+
baseUrl: {
|
|
210
|
+
type: 'string',
|
|
211
|
+
title: 'Base URL',
|
|
212
|
+
'@l10n': false,
|
|
213
|
+
minLength: 1,
|
|
214
|
+
'@mapping': 'takeshape:local:TsStaticSite.Bk3tNmrfE'
|
|
215
|
+
},
|
|
216
|
+
provider: {
|
|
217
|
+
type: 'string',
|
|
218
|
+
default: 's3',
|
|
219
|
+
title: 'Provider',
|
|
220
|
+
'@l10n': false,
|
|
221
|
+
oneOf: [{
|
|
222
|
+
enum: ['s3'],
|
|
223
|
+
title: 'S3'
|
|
224
|
+
}, {
|
|
225
|
+
enum: ['gcs'],
|
|
226
|
+
title: 'Google Cloud Storage'
|
|
227
|
+
}, {
|
|
228
|
+
enum: ['ftp'],
|
|
229
|
+
title: 'FTP Client'
|
|
230
|
+
}, {
|
|
231
|
+
enum: ['azure'],
|
|
232
|
+
title: 'Azure Storage Account'
|
|
233
|
+
}, {
|
|
234
|
+
enum: ['netlify'],
|
|
235
|
+
title: 'Netlify'
|
|
236
|
+
}, {
|
|
237
|
+
enum: ['vercel'],
|
|
238
|
+
title: 'Vercel'
|
|
239
|
+
}],
|
|
240
|
+
'@mapping': 'takeshape:local:TsStaticSite.SkwbT2hqe'
|
|
241
|
+
},
|
|
242
|
+
idKey: {
|
|
243
|
+
type: 'string',
|
|
244
|
+
title: 'Id Key',
|
|
245
|
+
'@l10n': false,
|
|
246
|
+
minLength: 1,
|
|
247
|
+
'@mapping': 'takeshape:local:TsStaticSite.SyRhi8_me'
|
|
248
|
+
},
|
|
249
|
+
secretKey: {
|
|
250
|
+
type: 'string',
|
|
251
|
+
title: 'Secret Key',
|
|
252
|
+
'@l10n': false,
|
|
253
|
+
'@sensitive': true,
|
|
254
|
+
minLength: 1,
|
|
255
|
+
'@mapping': 'takeshape:local:TsStaticSite.BkIajLdXl'
|
|
256
|
+
},
|
|
257
|
+
destination: {
|
|
258
|
+
type: 'string',
|
|
259
|
+
title: 'Destination',
|
|
260
|
+
'@l10n': false,
|
|
261
|
+
minLength: 1,
|
|
262
|
+
'@mapping': 'takeshape:local:TsStaticSite.Hk6TsIdXl'
|
|
263
|
+
},
|
|
264
|
+
privateAcl: {
|
|
265
|
+
type: 'boolean',
|
|
266
|
+
title: 'Private ACL',
|
|
267
|
+
'@l10n': false,
|
|
268
|
+
'@mapping': 'takeshape:local:TsStaticSite.ByFe48wWU'
|
|
269
|
+
},
|
|
270
|
+
environmentVariables: {
|
|
271
|
+
type: 'array',
|
|
272
|
+
title: 'Environment Variables',
|
|
273
|
+
'@l10n': false,
|
|
274
|
+
items: {
|
|
275
|
+
$ref: '#/shapes/TsStaticSiteEnvironmentVariables/schema'
|
|
276
|
+
},
|
|
277
|
+
'@mapping': 'takeshape:local:TsStaticSite.9fj4UiNxY'
|
|
278
|
+
},
|
|
279
|
+
triggers: {
|
|
280
|
+
type: 'array',
|
|
281
|
+
title: 'Publish Triggers',
|
|
282
|
+
'@l10n': false,
|
|
283
|
+
items: {
|
|
284
|
+
$ref: '#/shapes/TsStaticSiteTriggers/schema'
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
templateHash: {
|
|
288
|
+
type: 'string',
|
|
289
|
+
title: 'Template Hash',
|
|
290
|
+
'@l10n': false,
|
|
291
|
+
'@mapping': 'takeshape:local:TsStaticSite.S1QA3GYI8'
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
required: ['title', 'provider', 'destination']
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
TsStaticSiteEnvironmentVariables: {
|
|
298
|
+
id: '9fj4UiNxY',
|
|
299
|
+
name: 'TsStaticSiteEnvironmentVariables',
|
|
300
|
+
title: 'Static Site EnvironmentVariables',
|
|
301
|
+
schema: {
|
|
302
|
+
type: 'object',
|
|
303
|
+
properties: {
|
|
304
|
+
name: {
|
|
305
|
+
type: 'string',
|
|
306
|
+
title: 'Name',
|
|
307
|
+
'@mapping': 'takeshape:local:TsStaticSite.J8sbHgfdI'
|
|
308
|
+
},
|
|
309
|
+
value: {
|
|
310
|
+
type: 'string',
|
|
311
|
+
title: 'Value',
|
|
312
|
+
'@mapping': 'takeshape:local:TsStaticSite.ndhh88DvG'
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
TsStaticSiteTriggers: {
|
|
318
|
+
id: 'TsStaticSiteTriggers',
|
|
319
|
+
name: 'TsStaticSiteTriggers',
|
|
320
|
+
title: 'Static Site Triggers',
|
|
321
|
+
schema: {
|
|
322
|
+
type: 'object',
|
|
323
|
+
properties: {
|
|
324
|
+
contentTypeId: {
|
|
325
|
+
type: 'string',
|
|
326
|
+
title: 'Content Type'
|
|
327
|
+
},
|
|
328
|
+
status: {
|
|
329
|
+
type: 'string',
|
|
330
|
+
title: 'Workflow Status'
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
export const builtInForms = {
|
|
337
|
+
Asset: {
|
|
338
|
+
default: {
|
|
339
|
+
order: ['title', 'description', 'caption', 'credit', 'filename', 'path', 'mimeType', 'sourceUrl', 'uploadStatus'],
|
|
340
|
+
properties: {
|
|
341
|
+
title: {
|
|
342
|
+
widget: 'singleLineText',
|
|
343
|
+
disabled: true
|
|
344
|
+
},
|
|
345
|
+
description: {
|
|
346
|
+
widget: 'paragraphText',
|
|
347
|
+
disabled: true
|
|
348
|
+
},
|
|
349
|
+
caption: {
|
|
350
|
+
widget: 'wysiwygSingleLineText',
|
|
351
|
+
disabled: true
|
|
352
|
+
},
|
|
353
|
+
credit: {
|
|
354
|
+
widget: 'wysiwygSingleLineText',
|
|
355
|
+
disabled: true
|
|
356
|
+
},
|
|
357
|
+
filename: {
|
|
358
|
+
widget: 'singleLineText',
|
|
359
|
+
disabled: true
|
|
360
|
+
},
|
|
361
|
+
path: {
|
|
362
|
+
widget: 'singleLineText',
|
|
363
|
+
disabled: true
|
|
364
|
+
},
|
|
365
|
+
mimeType: {
|
|
366
|
+
widget: 'singleLineText',
|
|
367
|
+
disabled: true
|
|
368
|
+
},
|
|
369
|
+
sourceUrl: {
|
|
370
|
+
widget: 'singleLineText',
|
|
371
|
+
disabled: true
|
|
372
|
+
},
|
|
373
|
+
uploadStatus: {
|
|
374
|
+
widget: 'singleLineText',
|
|
375
|
+
disabled: true
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
TsStaticSite: {
|
|
381
|
+
default: {
|
|
382
|
+
order: ['title', 'provider', 'destination', 'idKey', 'secretKey', 'environmentVariables'],
|
|
383
|
+
properties: {
|
|
384
|
+
title: {
|
|
385
|
+
widget: 'singleLineText',
|
|
386
|
+
disabled: true
|
|
387
|
+
},
|
|
388
|
+
provider: {
|
|
389
|
+
widget: 'dropdown',
|
|
390
|
+
disabled: true
|
|
391
|
+
},
|
|
392
|
+
destination: {
|
|
393
|
+
widget: 'singleLineText',
|
|
394
|
+
instructions: 'Deployment Bucket or FTP Host',
|
|
395
|
+
disabled: true
|
|
396
|
+
},
|
|
397
|
+
idKey: {
|
|
398
|
+
widget: 'singleLineText',
|
|
399
|
+
instructions: 'AWS Access Key ID or Google Cloud Storage Client Email or FTP Username',
|
|
400
|
+
disabled: true
|
|
401
|
+
},
|
|
402
|
+
secretKey: {
|
|
403
|
+
widget: 'sensitiveField',
|
|
404
|
+
instructions: 'AWS Secret Access Key or Google Cloud Storage Private Key or FTP Password',
|
|
405
|
+
multiline: true,
|
|
406
|
+
disabled: true
|
|
407
|
+
},
|
|
408
|
+
environmentVariables: {
|
|
409
|
+
widget: 'repeater',
|
|
410
|
+
order: ['name', 'value'],
|
|
411
|
+
disabled: true,
|
|
412
|
+
properties: {
|
|
413
|
+
name: {
|
|
414
|
+
widget: 'singleLineText',
|
|
415
|
+
disabled: true
|
|
416
|
+
},
|
|
417
|
+
value: {
|
|
418
|
+
widget: 'singleLineText',
|
|
419
|
+
disabled: true
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
generalHeader: {
|
|
426
|
+
order: ['title', 'provider', 'baseUrl'],
|
|
427
|
+
properties: {
|
|
428
|
+
title: {
|
|
429
|
+
widget: 'singleLineText',
|
|
430
|
+
disabled: true
|
|
431
|
+
},
|
|
432
|
+
provider: {
|
|
433
|
+
widget: 'dropdown',
|
|
434
|
+
disabled: true
|
|
435
|
+
},
|
|
436
|
+
baseUrl: {
|
|
437
|
+
widget: 'singleLineText',
|
|
438
|
+
disabled: true
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
generalFooter: {
|
|
443
|
+
order: ['environmentVariables', 'triggers'],
|
|
444
|
+
properties: {
|
|
445
|
+
environmentVariables: {
|
|
446
|
+
widget: 'repeater',
|
|
447
|
+
order: ['name', 'value'],
|
|
448
|
+
disabled: true,
|
|
449
|
+
properties: {
|
|
450
|
+
name: {
|
|
451
|
+
widget: 'singleLineText',
|
|
452
|
+
disabled: true
|
|
453
|
+
},
|
|
454
|
+
value: {
|
|
455
|
+
widget: 'singleLineText',
|
|
456
|
+
disabled: true
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
triggers: {
|
|
461
|
+
widget: 'repeater',
|
|
462
|
+
order: ['contentTypeId', 'status'],
|
|
463
|
+
disabled: true,
|
|
464
|
+
preview: 'siteTriggerPreview',
|
|
465
|
+
properties: {
|
|
466
|
+
contentTypeId: {
|
|
467
|
+
widget: 'dropdown',
|
|
468
|
+
disabled: true
|
|
469
|
+
},
|
|
470
|
+
status: {
|
|
471
|
+
widget: 'dropdown',
|
|
472
|
+
disabled: true
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
s3: {
|
|
479
|
+
order: ['destination', 'idKey', 'secretKey', 'privateAcl'],
|
|
480
|
+
properties: {
|
|
481
|
+
destination: {
|
|
482
|
+
widget: 'singleLineText',
|
|
483
|
+
instructions: 'Deployment Bucket Name',
|
|
484
|
+
disabled: true
|
|
485
|
+
},
|
|
486
|
+
idKey: {
|
|
487
|
+
widget: 'singleLineText',
|
|
488
|
+
instructions: 'AWS Access Key ID',
|
|
489
|
+
disabled: true
|
|
490
|
+
},
|
|
491
|
+
secretKey: {
|
|
492
|
+
widget: 'sensitiveField',
|
|
493
|
+
instructions: 'AWS Secret Access Key',
|
|
494
|
+
multiline: true,
|
|
495
|
+
disabled: true
|
|
496
|
+
},
|
|
497
|
+
privateAcl: {
|
|
498
|
+
widget: 'checkbox',
|
|
499
|
+
instructions: 'Disable public access to deployed files. This is useful when fronting S3 with CloudFront or with "Block All Public Access"',
|
|
500
|
+
disabled: true
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
gcs: {
|
|
505
|
+
order: ['destination', 'idKey', 'secretKey', 'privateAcl'],
|
|
506
|
+
properties: {
|
|
507
|
+
destination: {
|
|
508
|
+
widget: 'singleLineText',
|
|
509
|
+
instructions: 'Deployment Bucket Name',
|
|
510
|
+
disabled: true
|
|
511
|
+
},
|
|
512
|
+
idKey: {
|
|
513
|
+
widget: 'singleLineText',
|
|
514
|
+
instructions: 'Google Cloud Storage Client Email',
|
|
515
|
+
disabled: true
|
|
516
|
+
},
|
|
517
|
+
secretKey: {
|
|
518
|
+
widget: 'sensitiveField',
|
|
519
|
+
instructions: 'Google Cloud Storage Private Key',
|
|
520
|
+
multiline: true,
|
|
521
|
+
disabled: true
|
|
522
|
+
},
|
|
523
|
+
privateAcl: {
|
|
524
|
+
widget: 'checkbox',
|
|
525
|
+
instructions: 'Disable public access to deployed files.',
|
|
526
|
+
disabled: true
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
ftp: {
|
|
531
|
+
order: ['destination', 'idKey', 'secretKey'],
|
|
532
|
+
properties: {
|
|
533
|
+
destination: {
|
|
534
|
+
widget: 'singleLineText',
|
|
535
|
+
instructions: 'FTP Host',
|
|
536
|
+
disabled: true
|
|
537
|
+
},
|
|
538
|
+
idKey: {
|
|
539
|
+
widget: 'singleLineText',
|
|
540
|
+
instructions: 'FTP Username',
|
|
541
|
+
disabled: true
|
|
542
|
+
},
|
|
543
|
+
secretKey: {
|
|
544
|
+
widget: 'sensitiveField',
|
|
545
|
+
instructions: 'FTP Password',
|
|
546
|
+
multiline: true,
|
|
547
|
+
disabled: true
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
azure: {
|
|
552
|
+
order: ['destination', 'secretKey'],
|
|
553
|
+
properties: {
|
|
554
|
+
destination: {
|
|
555
|
+
widget: 'singleLineText',
|
|
556
|
+
instructions: 'Storage Account Name',
|
|
557
|
+
disabled: true
|
|
558
|
+
},
|
|
559
|
+
secretKey: {
|
|
560
|
+
widget: 'sensitiveField',
|
|
561
|
+
instructions: 'Access key',
|
|
562
|
+
multiline: true,
|
|
563
|
+
disabled: true
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
netlify: {
|
|
568
|
+
order: ['destination'],
|
|
569
|
+
properties: {
|
|
570
|
+
destination: {
|
|
571
|
+
widget: 'publishTargets',
|
|
572
|
+
itemTemplate: 'siteDropdownItem',
|
|
573
|
+
instructions: 'Choose existing or create a new site.',
|
|
574
|
+
disabled: true
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
vercel: {
|
|
579
|
+
order: ['destination'],
|
|
580
|
+
properties: {
|
|
581
|
+
destination: {
|
|
582
|
+
widget: 'publishTargets',
|
|
583
|
+
itemTemplate: 'siteDropdownItem',
|
|
584
|
+
instructions: 'Choose existing or create a new project.',
|
|
585
|
+
disabled: true
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
};
|