@takeshape/schema 10.11.6 → 10.12.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/dist/refs.d.ts CHANGED
@@ -104,6 +104,7 @@ export type ParsedName = {
104
104
  */
105
105
  export declare function parseName(context: ServicesContext, name: string): ParsedName;
106
106
  export declare function shapeToRefItem(context: ServicesContext, shape: ShapeJSON): RefItem;
107
+ export declare function shapeToRefString(context: ServicesContext, shape: ShapeJSON): string;
107
108
  /**
108
109
  * Given a property schema and project schema, finds a `@ref` or `$ref` and
109
110
  * returns a `RefItem` suitable for loading a referenced schema...
@@ -1 +1 @@
1
- {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../src/refs.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,KAAK,EAA4C,MAAM,iBAAiB,CAAC;AAoBtF,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,GAAG,EACH,iBAAiB,EACjB,IAAI,EACJ,SAAS,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;AAClE,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;AAEnF;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;CACzB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B;;GAEG;A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s.js CHANGED
@@ -55,6 +55,7 @@ exports.refToRefItem = refToRefItem;
55
55
  exports.returnShapeToSchema = returnShapeToSchema;
56
56
  exports.serializePropertyRef = serializePropertyRef;
57
57
  exports.shapeToRefItem = shapeToRefItem;
58
+ exports.shapeToRefString = shapeToRefString;
58
59
  exports.splitAtRef = splitAtRef;
59
60
  exports.untemplate = void 0;
60
61
  var _util = require("@takeshape/util");
@@ -304,6 +305,9 @@ function shapeNameToRefItem(context, shapeName, template) {
304
305
  function shapeToRefItem(context, shape) {
305
306
  return shapeNameToRefItem(context, shape.name);
306
307
  }
308
+ function shapeToRefString(context, shape) {
309
+ return refItemToAtRef(shapeNameToRefItem(context, shape.name));
310
+ }
307
311
 
308
312
  /**
309
313
  * Given a property schema and project schema, finds a `@ref` or `$ref` and
package/es/refs.js CHANGED
@@ -244,6 +244,9 @@ function shapeNameToRefItem(context, shapeName, template) {
244
244
  export function shapeToRefItem(context, shape) {
245
245
  return shapeNameToRefItem(context, shape.name);
246
246
  }
247
+ export function shapeToRefString(context, shape) {
248
+ return refItemToAtRef(shapeNameToRefItem(context, shape.name));
249
+ }
247
250
 
248
251
  /**
249
252
  * Given a property schema and project schema, finds a `@ref` or `$ref` and
@@ -0,0 +1,206 @@
1
+ {
2
+ "projectId": "projectId",
3
+ "defaultLocale": "en-us",
4
+ "locales": ["en-us"],
5
+ "queries": {
6
+ "getTestShape": {
7
+ "shape": "TestShape",
8
+ "resolver": {
9
+ "name": "shapedb:get",
10
+ "service": "shapedb",
11
+ "shapeName": "TestShape"
12
+ },
13
+ "description": "Get a TestShape by ID",
14
+ "args": "TSGetArgs<TestShape>"
15
+ },
16
+ "getTestShapeList": {
17
+ "shape": "PaginatedList<TestShape>",
18
+ "resolver": {
19
+ "name": "shapedb:list",
20
+ "service": "shapedb",
21
+ "shapeName": "TestShape"
22
+ },
23
+ "description": "Returns a list TestShape in natural order.",
24
+ "args": "TSListArgs<TestShape>"
25
+ }
26
+ },
27
+ "mutations": {
28
+ "updateTestShape": {
29
+ "shape": "UpdateResult<TestShape>",
30
+ "resolver": {
31
+ "name": "shapedb:update",
32
+ "service": "shapedb",
33
+ "shapeName": "TestShape"
34
+ },
35
+ "description": "Update TestShape",
36
+ "args": "UpdateArgs<TestShape>"
37
+ },
38
+ "createTestShape": {
39
+ "shape": "CreateResult<TestShape>",
40
+ "resolver": {
41
+ "name": "shapedb:create",
42
+ "service": "shapedb",
43
+ "shapeName": "TestShape"
44
+ },
45
+ "description": "Create TestShape",
46
+ "args": "CreateArgs<TestShape>"
47
+ },
48
+ "duplicateTestShape": {
49
+ "shape": "DuplicateResult<TestShape>",
50
+ "resolver": {
51
+ "name": "shapedb:duplicate",
52
+ "service": "shapedb",
53
+ "shapeName": "TestShape"
54
+ },
55
+ "description": "Duplicate TestShape",
56
+ "args": "DuplicateArgs<TestShape>"
57
+ },
58
+ "deleteTestShape": {
59
+ "shape": "DeleteResult<TestShape>",
60
+ "resolver": {
61
+ "name": "shapedb:delete",
62
+ "service": "shapedb",
63
+ "shapeName": "TestShape"
64
+ },
65
+ "description": "Delete TestShape",
66
+ "args": "DeleteArgs<TestShape>"
67
+ }
68
+ },
69
+ "shapes": {
70
+ "TestShape": {
71
+ "id": "AEWxH9hft",
72
+ "name": "TestShape",
73
+ "title": "Test Shape",
74
+ "model": {"type": "multiple"},
75
+ "schema": {
76
+ "type": "object",
77
+ "properties": {
78
+ "string": {
79
+ "@mapping": "shapedb:TestShape.LEPRnc8H7",
80
+ "type": "string",
81
+ "title": "String"
82
+ },
83
+ "stringArray": {
84
+ "@mapping": "shapedb:TestShape.3l2ngVBo4",
85
+ "type": "array",
86
+ "items": {
87
+ "type": "string",
88
+ "oneOf": [
89
+ {"title": "Option 1", "enum": ["option1"]},
90
+ {"title": "Option 2", "enum": ["option2"]}
91
+ ]
92
+ },
93
+ "title": "String Array"
94
+ },
95
+ "number": {
96
+ "@mapping": "shapedb:TestShape.GUsBChF8K",
97
+ "type": "number",
98
+ "title": "Number"
99
+ },
100
+ "numberArray": {
101
+ "@mapping": "shapedb:TestShape.czQJmTfHb",
102
+ "type": "array",
103
+ "items": {
104
+ "type": "number",
105
+ "oneOf": [
106
+ {"title": "Option 1", "enum": [1]},
107
+ {"title": "Option 2", "enum": [2]}
108
+ ]
109
+ },
110
+ "title": "Number Array"
111
+ },
112
+ "boolean": {
113
+ "default": false,
114
+ "@mapping": "shapedb:TestShape.lou_v8PPn",
115
+ "type": "boolean",
116
+ "title": "Boolean"
117
+ },
118
+ "booleanArray": {
119
+ "@mapping": "shapedb:TestShape.qMlGOI0yH",
120
+ "type": "array",
121
+ "items": {
122
+ "type": "boolean",
123
+ "oneOf": [
124
+ {"title": "Option 1", "enum": [true]},
125
+ {"title": "Option 2", "enum": [false]}
126
+ ]
127
+ },
128
+ "title": "Boolean Array"
129
+ },
130
+ "object": {
131
+ "title": "Object",
132
+ "@mapping": "shapedb:TestShape.bkGLM37Vh",
133
+ "@ref": "local:TSColor"
134
+ },
135
+ "objectArray": {
136
+ "title": "Object Array",
137
+ "@mapping": "shapedb:TestShape.V7Yd1AMmc",
138
+ "type": "array",
139
+ "items": {"@ref": "local:TSColor"}
140
+ },
141
+ "asset": {
142
+ "title": "Asset",
143
+ "@args": "TSRelationshipArgs",
144
+ "@resolver": {
145
+ "name": "shapedb:getRelated",
146
+ "service": "shapedb",
147
+ "options": {"nullable": true}
148
+ },
149
+ "@ref": "local:Asset",
150
+ "@input": {"@ref": "local:TSRelationship"},
151
+ "@mapping": "shapedb:TestShape.O6R84g-I7"
152
+ },
153
+ "assetArray": {
154
+ "title": "Asset Array",
155
+ "@args": "TSRelationshipArgs",
156
+ "@resolver": {
157
+ "name": "shapedb:getRelated",
158
+ "service": "shapedb",
159
+ "options": {"nullable": true}
160
+ },
161
+ "type": "array",
162
+ "items": {"@ref": "local:Asset"},
163
+ "@input": {
164
+ "type": "array",
165
+ "items": {"@ref": "local:TSRelationship"}
166
+ },
167
+ "@mapping": "shapedb:TestShape.bkfNY1o8B"
168
+ }
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "workflows": {},
174
+ "forms": {
175
+ "TestShape": {
176
+ "default": {
177
+ "properties": {
178
+ "string": {"widget": "singleLineText"},
179
+ "stringArray": {"widget": "checkboxes"},
180
+ "number": {"widget": "number"},
181
+ "numberArray": {"widget": "numberCheckboxes"},
182
+ "boolean": {"widget": "checkbox"},
183
+ "booleanArray": {"widget": "booleanCheckboxes"},
184
+ "object": {"widget": "color"},
185
+ "objectArray": {"items": {"widget": "color"}},
186
+ "asset": {"widget": "image"},
187
+ "assetArray": {"items": {"widget": "image"}}
188
+ },
189
+ "order": [
190
+ "string",
191
+ "stringArray",
192
+ "number",
193
+ "numberArray",
194
+ "boolean",
195
+ "booleanArray",
196
+ "object",
197
+ "objectArray",
198
+ "asset",
199
+ "assetArray"
200
+ ]
201
+ }
202
+ }
203
+ },
204
+ "schemaVersion": "3.39.0",
205
+ "apiVersion": "2"
206
+ }
@@ -0,0 +1,206 @@
1
+ {
2
+ "projectId": "projectId",
3
+ "defaultLocale": "en-us",
4
+ "locales": ["en-us"],
5
+ "queries": {
6
+ "getTestShape": {
7
+ "shape": "TestShape",
8
+ "resolver": {
9
+ "name": "shapedb:get",
10
+ "service": "shapedb",
11
+ "shapeName": "TestShape"
12
+ },
13
+ "description": "Get a TestShape by ID",
14
+ "args": "TSGetArgs<TestShape>"
15
+ },
16
+ "getTestShapeList": {
17
+ "shape": "PaginatedList<TestShape>",
18
+ "resolver": {
19
+ "name": "shapedb:list",
20
+ "service": "shapedb",
21
+ "shapeName": "TestShape"
22
+ },
23
+ "description": "Returns a list TestShape in natural order.",
24
+ "args": "TSListArgs<TestShape>"
25
+ }
26
+ },
27
+ "mutations": {
28
+ "updateTestShape": {
29
+ "shape": "UpdateResult<TestShape>",
30
+ "resolver": {
31
+ "name": "shapedb:update",
32
+ "service": "shapedb",
33
+ "shapeName": "TestShape"
34
+ },
35
+ "description": "Update TestShape",
36
+ "args": "UpdateArgs<TestShape>"
37
+ },
38
+ "createTestShape": {
39
+ "shape": "CreateResult<TestShape>",
40
+ "resolver": {
41
+ "name": "shapedb:create",
42
+ "service": "shapedb",
43
+ "shapeName": "TestShape"
44
+ },
45
+ "description": "Create TestShape",
46
+ "args": "CreateArgs<TestShape>"
47
+ },
48
+ "duplicateTestShape": {
49
+ "shape": "DuplicateResult<TestShape>",
50
+ "resolver": {
51
+ "name": "shapedb:duplicate",
52
+ "service": "shapedb",
53
+ "shapeName": "TestShape"
54
+ },
55
+ "description": "Duplicate TestShape",
56
+ "args": "DuplicateArgs<TestShape>"
57
+ },
58
+ "deleteTestShape": {
59
+ "shape": "DeleteResult<TestShape>",
60
+ "resolver": {
61
+ "name": "shapedb:delete",
62
+ "service": "shapedb",
63
+ "shapeName": "TestShape"
64
+ },
65
+ "description": "Delete TestShape",
66
+ "args": "DeleteArgs<TestShape>"
67
+ }
68
+ },
69
+ "shapes": {
70
+ "TestShape": {
71
+ "id": "AEWxH9hft",
72
+ "name": "TestShape",
73
+ "title": "Test Shape",
74
+ "model": {"type": "multiple"},
75
+ "schema": {
76
+ "type": "object",
77
+ "properties": {
78
+ "string": {
79
+ "@mapping": "shapedb:TestShape.LEPRnc8H7",
80
+ "type": "string",
81
+ "title": "String"
82
+ },
83
+ "stringArray": {
84
+ "@mapping": "shapedb:TestShape.3l2ngVBo4",
85
+ "type": "array",
86
+ "items": {
87
+ "type": "string",
88
+ "oneOf": [
89
+ {"title": "Option 1", "enum": ["option1"]},
90
+ {"title": "Option 2", "enum": ["option2"]}
91
+ ]
92
+ },
93
+ "title": "String Array"
94
+ },
95
+ "number": {
96
+ "@mapping": "shapedb:TestShape.GUsBChF8K",
97
+ "type": "number",
98
+ "title": "Number"
99
+ },
100
+ "numberArray": {
101
+ "@mapping": "shapedb:TestShape.czQJmTfHb",
102
+ "type": "array",
103
+ "items": {
104
+ "type": "number",
105
+ "oneOf": [
106
+ {"title": "Option 1", "enum": [1]},
107
+ {"title": "Option 2", "enum": [2]}
108
+ ]
109
+ },
110
+ "title": "Number Array"
111
+ },
112
+ "boolean": {
113
+ "default": false,
114
+ "@mapping": "shapedb:TestShape.lou_v8PPn",
115
+ "type": "boolean",
116
+ "title": "Boolean"
117
+ },
118
+ "booleanArray": {
119
+ "@mapping": "shapedb:TestShape.qMlGOI0yH",
120
+ "type": "array",
121
+ "items": {
122
+ "type": "boolean",
123
+ "oneOf": [
124
+ {"title": "Option 1", "enum": [true]},
125
+ {"title": "Option 2", "enum": [false]}
126
+ ]
127
+ },
128
+ "title": "Boolean Array"
129
+ },
130
+ "object": {
131
+ "title": "Object",
132
+ "@mapping": "shapedb:TestShape.bkGLM37Vh",
133
+ "@ref": "local:TSColor"
134
+ },
135
+ "objectArray": {
136
+ "title": "Object Array",
137
+ "@mapping": "shapedb:TestShape.V7Yd1AMmc",
138
+ "type": "array",
139
+ "items": {"@ref": "local:TSColor"}
140
+ },
141
+ "asset": {
142
+ "title": "Asset",
143
+ "@args": "TSRelationshipArgs",
144
+ "@resolver": {
145
+ "name": "shapedb:getRelated",
146
+ "service": "shapedb",
147
+ "options": {"nullable": true}
148
+ },
149
+ "@ref": "local:Asset",
150
+ "@input": {"@ref": "local:TSRelationship"},
151
+ "@mapping": "shapedb:TestShape.O6R84g-I7"
152
+ },
153
+ "assetArray": {
154
+ "title": "Asset Array",
155
+ "@args": "TSRelationshipArgs",
156
+ "@resolver": {
157
+ "name": "shapedb:getRelated",
158
+ "service": "shapedb",
159
+ "options": {"nullable": true}
160
+ },
161
+ "type": "array",
162
+ "items": {"@ref": "local:Asset"},
163
+ "@input": {
164
+ "type": "array",
165
+ "items": {"@ref": "local:TSRelationship"}
166
+ },
167
+ "@mapping": "shapedb:TestShape.bkfNY1o8B"
168
+ }
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "workflows": {},
174
+ "forms": {
175
+ "TestShape": {
176
+ "default": {
177
+ "properties": {
178
+ "string": {"widget": "singleLineText"},
179
+ "stringArray": {"widget": "checkboxes"},
180
+ "number": {"widget": "number"},
181
+ "numberArray": {"widget": "numberCheckboxes"},
182
+ "boolean": {"widget": "checkbox"},
183
+ "booleanArray": {"widget": "booleanCheckboxes"},
184
+ "object": {"widget": "color"},
185
+ "objectArray": {"items": {"widget": "color"}},
186
+ "asset": {"widget": "image"},
187
+ "assetArray": {"items": {"widget": "image"}}
188
+ },
189
+ "order": [
190
+ "string",
191
+ "stringArray",
192
+ "number",
193
+ "numberArray",
194
+ "boolean",
195
+ "booleanArray",
196
+ "object",
197
+ "objectArray",
198
+ "asset",
199
+ "assetArray"
200
+ ]
201
+ }
202
+ }
203
+ },
204
+ "schemaVersion": "3.39.0",
205
+ "apiVersion": "2"
206
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/schema",
3
- "version": "10.11.6",
3
+ "version": "10.12.0",
4
4
  "description": "TakeShape Schema",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -28,9 +28,9 @@
28
28
  "p-reduce": "^2.1.0",
29
29
  "semver": "^7.3.2",
30
30
  "tiny-invariant": "^1.2.0",
31
- "@takeshape/errors": "10.11.6",
32
- "@takeshape/json-schema": "10.11.6",
33
- "@takeshape/util": "10.11.6"
31
+ "@takeshape/errors": "10.12.0",
32
+ "@takeshape/json-schema": "10.12.0",
33
+ "@takeshape/util": "10.12.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@takeshape/json-schema-to-typescript": "^11.0.0",
@@ -46,8 +46,8 @@
46
46
  "meow": "^9.0.0",
47
47
  "p-map": "^5.0.0",
48
48
  "shortid": "^2.2.15",
49
- "@takeshape/typescript-jest-junit-reporter": "10.11.6",
50
- "@takeshape/infra": "10.11.6"
49
+ "@takeshape/typescript-jest-junit-reporter": "10.12.0",
50
+ "@takeshape/infra": "10.12.0"
51
51
  },
52
52
  "engines": {
53
53
  "node": ">=18"