@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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.takeshape.io/project-schema#",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"apiVersion": "1",
|
|
5
|
+
"author": "<userId>",
|
|
6
|
+
"projectId": "project-id",
|
|
7
|
+
"locales": ["en-us"],
|
|
8
|
+
"defaultLocale": "en-us",
|
|
9
|
+
"workflows": {},
|
|
10
|
+
"queries": {
|
|
11
|
+
"getUser": {
|
|
12
|
+
"shape": "User",
|
|
13
|
+
"resolver": {
|
|
14
|
+
"name": "takeshape:get",
|
|
15
|
+
"service": "takeshape:local",
|
|
16
|
+
"options": {
|
|
17
|
+
"model": "User"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"description": "Get a User by ID",
|
|
21
|
+
"args": "TSGetArgs<User>"
|
|
22
|
+
},
|
|
23
|
+
"getUserList": {
|
|
24
|
+
"shape": "PaginatedList<User>",
|
|
25
|
+
"resolver": {
|
|
26
|
+
"name": "takeshape:list",
|
|
27
|
+
"service": "takeshape:local",
|
|
28
|
+
"options": {
|
|
29
|
+
"model": "User"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"description": "Returns a list User in natural order.",
|
|
33
|
+
"args": "TSListArgs<User>"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"mutations": {
|
|
37
|
+
"updateUser": {
|
|
38
|
+
"shape": "UpdateResult<User>",
|
|
39
|
+
"resolver": {
|
|
40
|
+
"name": "takeshape:update",
|
|
41
|
+
"service": "takeshape:local",
|
|
42
|
+
"options": {
|
|
43
|
+
"model": "User"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"description": "Update User",
|
|
47
|
+
"args": "UpdateArgs<User>"
|
|
48
|
+
},
|
|
49
|
+
"createUser": {
|
|
50
|
+
"shape": "CreateResult<User>",
|
|
51
|
+
"resolver": {
|
|
52
|
+
"name": "takeshape:create",
|
|
53
|
+
"service": "takeshape:local",
|
|
54
|
+
"options": {
|
|
55
|
+
"model": "User"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"description": "Create User",
|
|
59
|
+
"args": "CreateArgs<User>"
|
|
60
|
+
},
|
|
61
|
+
"duplicateUser": {
|
|
62
|
+
"shape": "DuplicateResult<User>",
|
|
63
|
+
"resolver": {
|
|
64
|
+
"name": "takeshape:duplicate",
|
|
65
|
+
"service": "takeshape:local",
|
|
66
|
+
"options": {
|
|
67
|
+
"model": "User"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"description": "Duplicate User",
|
|
71
|
+
"args": "DuplicateArgs<User>"
|
|
72
|
+
},
|
|
73
|
+
"deleteUser": {
|
|
74
|
+
"shape": "DeleteResult<User>",
|
|
75
|
+
"resolver": {
|
|
76
|
+
"name": "takeshape:delete",
|
|
77
|
+
"service": "takeshape:local",
|
|
78
|
+
"options": {
|
|
79
|
+
"model": "User"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"description": "Delete User",
|
|
83
|
+
"args": "DeleteArgs<User>"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"schemaVersion": "3.2.0",
|
|
87
|
+
"created": "2016-06-21T15:16:19.051Z",
|
|
88
|
+
"updated": "2016-06-21T15:16:19.051Z",
|
|
89
|
+
"shapes": {
|
|
90
|
+
"User": {
|
|
91
|
+
"id": "<userContentTypeId>",
|
|
92
|
+
"name": "User",
|
|
93
|
+
"title": "User",
|
|
94
|
+
"model": {
|
|
95
|
+
"type": "multiple"
|
|
96
|
+
},
|
|
97
|
+
"schema": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"firstName": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"@mapping": "takeshape:local:User.firstNameId"
|
|
103
|
+
},
|
|
104
|
+
"lastName": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"@mapping": "takeshape:local:User.lastNameId"
|
|
107
|
+
},
|
|
108
|
+
"username": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"default": "dude",
|
|
111
|
+
"maxLength": 16,
|
|
112
|
+
"minLength": 3,
|
|
113
|
+
"pattern": "^[a-z0-9_-]+$",
|
|
114
|
+
"@mapping": "takeshape:local:User.usernameId"
|
|
115
|
+
},
|
|
116
|
+
"email": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"format": "email",
|
|
119
|
+
"@mapping": "takeshape:local:User.emailId"
|
|
120
|
+
},
|
|
121
|
+
"password": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"@sensitive": true,
|
|
124
|
+
"maxLength": 16,
|
|
125
|
+
"minLength": 3,
|
|
126
|
+
"@mapping": "takeshape:local:User.passwordId"
|
|
127
|
+
},
|
|
128
|
+
"roles": {
|
|
129
|
+
"type": "array",
|
|
130
|
+
"items": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
"@mapping": "takeshape:local:User.rolesId"
|
|
134
|
+
},
|
|
135
|
+
"locations": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": {
|
|
138
|
+
"$ref": "#/shapes/UserLocations/schema"
|
|
139
|
+
},
|
|
140
|
+
"@mapping": "takeshape:local:User.locationsId"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": []
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"UserLocations": {
|
|
147
|
+
"id": "locationsId",
|
|
148
|
+
"name": "UserLocations",
|
|
149
|
+
"title": "User Locations",
|
|
150
|
+
"schema": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"properties": {
|
|
153
|
+
"lat": {
|
|
154
|
+
"type": "number",
|
|
155
|
+
"default": 40.694598,
|
|
156
|
+
"@mapping": "takeshape:local:UserLocations.latId"
|
|
157
|
+
},
|
|
158
|
+
"lon": {
|
|
159
|
+
"type": "number",
|
|
160
|
+
"default": 73.983119,
|
|
161
|
+
"@mapping": "takeshape:local:UserLocations.lonId"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"forms": {
|
|
168
|
+
"User": {
|
|
169
|
+
"default": {
|
|
170
|
+
"order": ["firstName", "lastName", "username", "email", "password", "roles", "locations"]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.takeshape.io/project-schema#",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"author": "<userId>",
|
|
5
|
+
"projectId": "project-id",
|
|
6
|
+
"locales": ["en-us"],
|
|
7
|
+
"defaultLocale": "en-us",
|
|
8
|
+
"apiVersion": "1",
|
|
9
|
+
"workflows": {},
|
|
10
|
+
"queries": {
|
|
11
|
+
"getUser": {
|
|
12
|
+
"shape": "User",
|
|
13
|
+
"resolver": {
|
|
14
|
+
"name": "takeshape:get",
|
|
15
|
+
"service": "takeshape:local",
|
|
16
|
+
"options": {
|
|
17
|
+
"model": "User"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"description": "Get a User by ID",
|
|
21
|
+
"args": "TSGetArgs<User>"
|
|
22
|
+
},
|
|
23
|
+
"getUserList": {
|
|
24
|
+
"shape": "PaginatedList<User>",
|
|
25
|
+
"resolver": {
|
|
26
|
+
"name": "takeshape:list",
|
|
27
|
+
"service": "takeshape:local",
|
|
28
|
+
"options": {
|
|
29
|
+
"model": "User"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"description": "Returns a list User in natural order.",
|
|
33
|
+
"args": "TSListArgs<User>"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"mutations": {
|
|
37
|
+
"updateUser": {
|
|
38
|
+
"shape": "UpdateResult<User>",
|
|
39
|
+
"resolver": {
|
|
40
|
+
"name": "takeshape:update",
|
|
41
|
+
"service": "takeshape:local",
|
|
42
|
+
"options": {
|
|
43
|
+
"model": "User"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"description": "Update User",
|
|
47
|
+
"args": "UpdateArgs<User>"
|
|
48
|
+
},
|
|
49
|
+
"createUser": {
|
|
50
|
+
"shape": "CreateResult<User>",
|
|
51
|
+
"resolver": {
|
|
52
|
+
"name": "takeshape:create",
|
|
53
|
+
"service": "takeshape:local",
|
|
54
|
+
"options": {
|
|
55
|
+
"model": "User"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"description": "Create User",
|
|
59
|
+
"args": "CreateArgs<User>"
|
|
60
|
+
},
|
|
61
|
+
"duplicateUser": {
|
|
62
|
+
"shape": "DuplicateResult<User>",
|
|
63
|
+
"resolver": {
|
|
64
|
+
"name": "takeshape:duplicate",
|
|
65
|
+
"service": "takeshape:local",
|
|
66
|
+
"options": {
|
|
67
|
+
"model": "User"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"description": "Duplicate User",
|
|
71
|
+
"args": "DuplicateArgs<User>"
|
|
72
|
+
},
|
|
73
|
+
"deleteUser": {
|
|
74
|
+
"shape": "DeleteResult<User>",
|
|
75
|
+
"resolver": {
|
|
76
|
+
"name": "takeshape:delete",
|
|
77
|
+
"service": "takeshape:local",
|
|
78
|
+
"options": {
|
|
79
|
+
"model": "User"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"description": "Delete User",
|
|
83
|
+
"args": "DeleteArgs<User>"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"schemaVersion": "3.2.0",
|
|
87
|
+
"created": "2016-06-21T15:16:19.051Z",
|
|
88
|
+
"updated": "2016-06-21T15:16:19.051Z",
|
|
89
|
+
"shapes": {
|
|
90
|
+
"User": {
|
|
91
|
+
"id": "<userContentTypeId>",
|
|
92
|
+
"name": "User",
|
|
93
|
+
"title": "User",
|
|
94
|
+
"model": {
|
|
95
|
+
"type": "multiple"
|
|
96
|
+
},
|
|
97
|
+
"schema": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"firstName": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"@l10n": true,
|
|
103
|
+
"@mapping": "takeshape:local:User.firstNameId"
|
|
104
|
+
},
|
|
105
|
+
"lastName": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"@l10n": true,
|
|
108
|
+
"@mapping": "takeshape:local:User.lastNameId"
|
|
109
|
+
},
|
|
110
|
+
"age": {
|
|
111
|
+
"type": "number",
|
|
112
|
+
"@mapping": "takeshape:local:User.ageId"
|
|
113
|
+
},
|
|
114
|
+
"username": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"default": "dude",
|
|
117
|
+
"maxLength": 16,
|
|
118
|
+
"minLength": 3,
|
|
119
|
+
"pattern": "^[a-z0-9_-]+$",
|
|
120
|
+
"@mapping": "takeshape:local:User.usernameId"
|
|
121
|
+
},
|
|
122
|
+
"email": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"@l10n": false,
|
|
125
|
+
"format": "email",
|
|
126
|
+
"@mapping": "takeshape:local:User.emailId"
|
|
127
|
+
},
|
|
128
|
+
"password": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"@sensitive": true,
|
|
131
|
+
"maxLength": 16,
|
|
132
|
+
"minLength": 3,
|
|
133
|
+
"@mapping": "takeshape:local:User.passwordId"
|
|
134
|
+
},
|
|
135
|
+
"roles": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"@l10n": true,
|
|
138
|
+
"items": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"@mapping": "takeshape:local:User.rolesId"
|
|
142
|
+
},
|
|
143
|
+
"locations": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"@l10n": true,
|
|
146
|
+
"@syncLocaleStructure": true,
|
|
147
|
+
"items": {
|
|
148
|
+
"$ref": "#/shapes/UserLocations/schema"
|
|
149
|
+
},
|
|
150
|
+
"@mapping": "takeshape:local:User.locationsId"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"required": ["firstName", "lastName", "username", "email", "password", "roles", "locations"]
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"UserLocations": {
|
|
157
|
+
"id": "locationsId",
|
|
158
|
+
"name": "UserLocations",
|
|
159
|
+
"title": "User Locations",
|
|
160
|
+
"schema": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"properties": {
|
|
163
|
+
"lat": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"default": "40.694598",
|
|
166
|
+
"@l10n": true,
|
|
167
|
+
"@mapping": "takeshape:local:UserLocations.latId"
|
|
168
|
+
},
|
|
169
|
+
"lon": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"default": "73.983119",
|
|
172
|
+
"@l10n": true,
|
|
173
|
+
"@mapping": "takeshape:local:UserLocations.lonId"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": ["lat", "lon"]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"forms": {
|
|
181
|
+
"User": {
|
|
182
|
+
"default": {
|
|
183
|
+
"order": ["firstName", "lastName", "age", "username", "email", "password", "roles", "locations"]
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|