@takeshape/schema 10.24.13 → 10.26.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 (77) hide show
  1. package/dist/migration/index.d.ts +1 -0
  2. package/dist/migration/index.d.ts.map +1 -1
  3. package/dist/migration/index.js +3 -1
  4. package/dist/migration/to/v3.42.0.d.ts +5 -0
  5. package/dist/migration/to/v3.42.0.d.ts.map +1 -0
  6. package/dist/migration/to/v3.42.0.js +16 -0
  7. package/dist/project-schema/index.d.ts +4 -1
  8. package/dist/project-schema/index.d.ts.map +1 -1
  9. package/dist/project-schema/index.js +17 -3
  10. package/dist/project-schema/latest.d.ts +5 -1
  11. package/dist/project-schema/latest.d.ts.map +1 -1
  12. package/dist/project-schema/migrate.d.ts.map +1 -1
  13. package/dist/project-schema/migrate.js +3 -0
  14. package/dist/project-schema/v3.42.0.d.ts +1535 -0
  15. package/dist/project-schema/v3.42.0.d.ts.map +1 -0
  16. package/dist/project-schema/v3.42.0.js +5 -0
  17. package/dist/schemas/index.d.ts +2 -2
  18. package/dist/schemas/index.d.ts.map +1 -1
  19. package/dist/schemas/index.js +5 -4
  20. package/dist/schemas/index.ts +4 -2
  21. package/dist/schemas/project-schema/latest.json +7 -2
  22. package/dist/schemas/project-schema/v3.42.0.json +3227 -0
  23. package/dist/schemas/project-schema.json +3 -0
  24. package/es/migration/index.js +3 -1
  25. package/es/migration/to/v3.42.0.js +10 -0
  26. package/es/project-schema/index.js +3 -1
  27. package/es/project-schema/migrate.js +4 -1
  28. package/es/project-schema/v3.42.0.js +1 -0
  29. package/es/schemas/index.js +4 -3
  30. package/es/schemas/index.ts +4 -2
  31. package/es/schemas/project-schema/latest.json +7 -2
  32. package/es/schemas/project-schema/v3.42.0.json +3227 -0
  33. package/es/schemas/project-schema.json +3 -0
  34. package/examples/latest/all-fields-shapes-inline.json +1 -1
  35. package/examples/latest/all-fields-shapes.json +1 -1
  36. package/examples/latest/betzino.json +1 -1
  37. package/examples/latest/blog-schema.json +1 -1
  38. package/examples/latest/brewery-schema.json +1 -1
  39. package/examples/latest/clear-cache-schema.json +1 -1
  40. package/examples/latest/complex-project-schema.json +1 -1
  41. package/examples/latest/complex-schema.json +1 -1
  42. package/examples/latest/edit-schema.json +1 -1
  43. package/examples/latest/fabric-ecommerce.json +1 -1
  44. package/examples/latest/frank-and-fred-schema.json +1 -1
  45. package/examples/latest/klirr-schema.json +1 -1
  46. package/examples/latest/massive-schema.json +1 -1
  47. package/examples/latest/mill-components-schema.json +1 -1
  48. package/examples/latest/nested-shape-arrays.json +1 -1
  49. package/examples/latest/one-earth.json +1 -1
  50. package/examples/latest/pet-oneof-array.json +1 -1
  51. package/examples/latest/post-schema.json +1 -1
  52. package/examples/latest/pruned-shopify-product-schema.json +1 -1
  53. package/examples/latest/real-world-schema.json +1 -1
  54. package/examples/latest/recursive-repeater-schema.json +1 -1
  55. package/examples/latest/recursive-schema.json +1 -1
  56. package/examples/latest/rick-and-morty-ast.json +1 -1
  57. package/examples/latest/rick-and-morty-graphql.json +1 -1
  58. package/examples/latest/rick-and-morty-rest.json +1 -1
  59. package/examples/latest/rick-and-morty-with-indexing.json +100 -27
  60. package/examples/latest/schema-where-filter.json +1 -1
  61. package/examples/latest/schema-with-repeater-draftjs.json +1 -1
  62. package/examples/latest/schema-with-rick-and-morty.json +1 -1
  63. package/examples/latest/shape-books-v3_2_0.json +1 -1
  64. package/examples/latest/shape-books.json +1 -1
  65. package/examples/latest/shape-editor-schema-edited.json +1 -1
  66. package/examples/latest/shape-editor-schema-initial.json +1 -1
  67. package/examples/latest/shapedb-crud-every-prop-type.json +1 -1
  68. package/examples/latest/shopify-lookbook.json +1 -1
  69. package/examples/latest/shopify-product-2022-07.json +1 -1
  70. package/examples/latest/shopify-product-2023-04.json +1 -1
  71. package/examples/latest/shopify-store-with-widget.json +1 -1
  72. package/examples/latest/stripe-product-runtime-schema.json +1 -1
  73. package/examples/latest/stripe-starter-resolved.json +1 -1
  74. package/examples/latest/user-schema-no-required.json +1 -1
  75. package/examples/latest/user-schema-with-defaults.json +1 -1
  76. package/examples/latest/vector-search-schema.json +169 -41
  77. package/package.json +5 -5
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "projectId": "projectId",
3
3
  "defaultLocale": "en-us",
4
- "locales": ["en-us"],
4
+ "locales": [
5
+ "en-us"
6
+ ],
5
7
  "queries": {
6
8
  "getIndexedBooksBookList": {
7
9
  "shape": "books:BookPaginatedList",
@@ -30,7 +32,10 @@
30
32
  "encoding_format": "float"
31
33
  }
32
34
  },
33
- {"path": "input.input", "mapping": "$args.text"}
35
+ {
36
+ "path": "input.input",
37
+ "mapping": "$args.text"
38
+ }
34
39
  ]
35
40
  },
36
41
  "results": {
@@ -48,12 +53,18 @@
48
53
  "service": "takeshape",
49
54
  "args": {
50
55
  "ops": [
51
- {"path": "vector.name", "value": "vector"},
56
+ {
57
+ "path": "vector.name",
58
+ "value": "vector"
59
+ },
52
60
  {
53
61
  "path": "vector.value",
54
62
  "mapping": "$resolvers.createEmbedding.vector"
55
63
  },
56
- {"path": "size", "mapping": "$args.size"}
64
+ {
65
+ "path": "size",
66
+ "mapping": "$args.size"
67
+ }
57
68
  ]
58
69
  }
59
70
  }
@@ -61,8 +72,17 @@
61
72
  },
62
73
  "args": {
63
74
  "type": "object",
64
- "properties": {"text": {"type": "string"}, "size": {"type": "integer"}},
65
- "required": ["text"]
75
+ "properties": {
76
+ "text": {
77
+ "type": "string"
78
+ },
79
+ "size": {
80
+ "type": "integer"
81
+ }
82
+ },
83
+ "required": [
84
+ "text"
85
+ ]
66
86
  }
67
87
  },
68
88
  "chat": {
@@ -73,15 +93,28 @@
73
93
  "name": "delegate",
74
94
  "id": "getRelatedBookList",
75
95
  "to": "Query.getRelatedBookList",
76
- "options": {"selectionSet": "{ items {title bodyHtml} }"},
96
+ "options": {
97
+ "selectionSet": "{ items {title bodyHtml} }"
98
+ },
77
99
  "args": {
78
100
  "ops": [
79
- {"path": "text", "mapping": "$args.text"},
80
- {"path": "size", "value": 1}
101
+ {
102
+ "path": "text",
103
+ "mapping": "$args.text"
104
+ },
105
+ {
106
+ "path": "size",
107
+ "value": 1
108
+ }
81
109
  ]
82
110
  },
83
111
  "results": {
84
- "ops": [{"path": "$", "mapping": "$currentResolver.items[0]"}]
112
+ "ops": [
113
+ {
114
+ "path": "$",
115
+ "mapping": "$currentResolver.items[0]"
116
+ }
117
+ ]
85
118
  }
86
119
  },
87
120
  {
@@ -101,7 +134,10 @@
101
134
  "role": "system",
102
135
  "content": "You are a helpful assistant."
103
136
  },
104
- {"role": "user", "content": ""}
137
+ {
138
+ "role": "user",
139
+ "content": ""
140
+ }
105
141
  ]
106
142
  }
107
143
  },
@@ -141,8 +177,14 @@
141
177
  },
142
178
  "args": {
143
179
  "type": "object",
144
- "properties": {"text": {"type": "string"}},
145
- "required": ["text"]
180
+ "properties": {
181
+ "text": {
182
+ "type": "string"
183
+ }
184
+ },
185
+ "required": [
186
+ "text"
187
+ ]
146
188
  }
147
189
  },
148
190
  "Books_getBookList": {
@@ -154,7 +196,9 @@
154
196
  "args": {
155
197
  "type": "object",
156
198
  "properties": {
157
- "terms": {"type": "string"},
199
+ "terms": {
200
+ "type": "string"
201
+ },
158
202
  "from": {
159
203
  "type": "integer",
160
204
  "description": "The offset from the first result you want to fetch."
@@ -169,11 +213,18 @@
169
213
  },
170
214
  "sort": {
171
215
  "type": "array",
172
- "items": {"@ref": "books:TSSearchSortInput"},
216
+ "items": {
217
+ "@ref": "books:TSSearchSortInput"
218
+ },
173
219
  "description": "An list of fields to sort by."
174
220
  },
175
- "locale": {"type": "string"},
176
- "enableLocaleFallback": {"type": "boolean", "default": true},
221
+ "locale": {
222
+ "type": "string"
223
+ },
224
+ "enableLocaleFallback": {
225
+ "type": "boolean",
226
+ "default": true
227
+ },
177
228
  "onlyEnabled": {
178
229
  "type": "boolean",
179
230
  "description": "Filter out content that is not enabled. Defaults to true.",
@@ -196,18 +247,38 @@
196
247
  "service": "openai",
197
248
  "path": "/embeddings",
198
249
  "body": {
199
- "ops": [{"path": "$", "mapping": "$args.input"}],
200
- "serialize": {"content": {"contentType": "application/json"}}
250
+ "ops": [
251
+ {
252
+ "path": "$",
253
+ "mapping": "$args.input"
254
+ }
255
+ ],
256
+ "serialize": {
257
+ "content": {
258
+ "contentType": "application/json"
259
+ }
260
+ }
201
261
  },
202
262
  "headers": {
203
- "ops": [{"path": "content-type", "value": "application/json"}]
263
+ "ops": [
264
+ {
265
+ "path": "content-type",
266
+ "value": "application/json"
267
+ }
268
+ ]
204
269
  }
205
270
  },
206
271
  "description": "Creates an embedding vector representing the input text.",
207
272
  "args": {
208
273
  "type": "object",
209
- "properties": {"input": {"@ref": "openai:CreateEmbeddingInput"}},
210
- "required": ["input"]
274
+ "properties": {
275
+ "input": {
276
+ "@ref": "openai:CreateEmbeddingInput"
277
+ }
278
+ },
279
+ "required": [
280
+ "input"
281
+ ]
211
282
  }
212
283
  },
213
284
  "OpenAI_createChatCompletion": {
@@ -217,18 +288,38 @@
217
288
  "service": "openai",
218
289
  "path": "/chat/completions",
219
290
  "body": {
220
- "ops": [{"path": "$", "mapping": "$args.input"}],
221
- "serialize": {"content": {"contentType": "application/json"}}
291
+ "ops": [
292
+ {
293
+ "path": "$",
294
+ "mapping": "$args.input"
295
+ }
296
+ ],
297
+ "serialize": {
298
+ "content": {
299
+ "contentType": "application/json"
300
+ }
301
+ }
222
302
  },
223
303
  "headers": {
224
- "ops": [{"path": "content-type", "value": "application/json"}]
304
+ "ops": [
305
+ {
306
+ "path": "content-type",
307
+ "value": "application/json"
308
+ }
309
+ ]
225
310
  }
226
311
  },
227
312
  "description": "Creates a model response for the given chat conversation.",
228
313
  "args": {
229
314
  "type": "object",
230
- "properties": {"input": {"@ref": "openai:CreateChatCompletionInput"}},
231
- "required": ["input"]
315
+ "properties": {
316
+ "input": {
317
+ "@ref": "openai:CreateChatCompletionInput"
318
+ }
319
+ },
320
+ "required": [
321
+ "input"
322
+ ]
232
323
  }
233
324
  }
234
325
  },
@@ -239,26 +330,44 @@
239
330
  "title": "Books Book",
240
331
  "cache": {
241
332
  "enabled": true,
242
- "triggers": [{"type": "schedule", "loader": "list", "interval": 1440}],
243
- "fragment": {"maxDepth": 2}
333
+ "triggers": [
334
+ {
335
+ "type": "schedule",
336
+ "loader": "list",
337
+ "interval": 1440
338
+ }
339
+ ],
340
+ "fragment": {
341
+ "maxDepth": 2
342
+ }
343
+ },
344
+ "loaders": {
345
+ "list": {
346
+ "query": "books:Query.getBookList"
347
+ }
244
348
  },
245
- "loaders": {"list": {"query": "books:Query.getBookList"}},
246
349
  "schema": {
247
350
  "extends": [
248
- {"@ref": "books:Book"},
351
+ {
352
+ "@ref": "books:Book"
353
+ },
249
354
  {
250
355
  "type": "object",
251
356
  "properties": {
252
357
  "vector": {
253
358
  "type": "array",
254
- "items": {"type": "number"},
359
+ "items": {
360
+ "type": "number"
361
+ },
255
362
  "title": "Vector",
256
363
  "@tag": "vector",
257
364
  "@dependencies": "{title bodyHtml}",
258
365
  "@resolver": {
259
366
  "name": "delegate",
260
367
  "to": "openai:Mutation.createEmbedding",
261
- "options": {"selectionSet": "{ data { embedding } }"},
368
+ "options": {
369
+ "selectionSet": "{ data { embedding } }"
370
+ },
262
371
  "args": {
263
372
  "ops": [
264
373
  {
@@ -273,9 +382,19 @@
273
382
  "mapping": [
274
383
  [
275
384
  "get",
276
- {"path": ["$source.title", "$source.bodyHtml"]}
385
+ {
386
+ "path": [
387
+ "$source.title",
388
+ "$source.bodyHtml"
389
+ ]
390
+ }
277
391
  ],
278
- ["format", {"template": "%s %s"}]
392
+ [
393
+ "format",
394
+ {
395
+ "template": "%s %s"
396
+ }
397
+ ]
279
398
  ]
280
399
  }
281
400
  ]
@@ -301,14 +420,21 @@
301
420
  "Books_Book": {
302
421
  "default": {
303
422
  "properties": {
304
- "content": {"widget": "singleLineText"},
305
- "vector": {"widget": "singleLineText"}
423
+ "content": {
424
+ "widget": "singleLineText"
425
+ },
426
+ "vector": {
427
+ "widget": "singleLineText"
428
+ }
306
429
  },
307
- "order": ["content", "vector"]
430
+ "order": [
431
+ "content",
432
+ "vector"
433
+ ]
308
434
  }
309
435
  }
310
436
  },
311
- "schemaVersion": "3.41.0",
437
+ "schemaVersion": "3.42.0",
312
438
  "apiVersion": "2",
313
439
  "services": {
314
440
  "openai": {
@@ -336,7 +462,9 @@
336
462
  "endpoint": "https://api.takeshape.io/project/18f690a1-3977-4dc9-a888-bee3293b12e2/production/graphql",
337
463
  "introspectedAt": "2024-04-16T02:55:23.258Z"
338
464
  },
339
- "healthCheck": {"checkName": "graphqlIntrospection"}
465
+ "healthCheck": {
466
+ "checkName": "graphqlIntrospection"
467
+ }
340
468
  }
341
469
  }
342
- }
470
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/schema",
3
- "version": "10.24.13",
3
+ "version": "10.26.2",
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/json-schema": "10.24.13",
32
- "@takeshape/errors": "10.24.13",
33
- "@takeshape/util": "10.24.13"
31
+ "@takeshape/errors": "10.26.2",
32
+ "@takeshape/json-schema": "10.26.2",
33
+ "@takeshape/util": "10.26.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@takeshape/json-schema-to-typescript": "^11.0.0",
@@ -46,7 +46,7 @@
46
46
  "meow": "^9.0.0",
47
47
  "p-map": "^5.0.0",
48
48
  "shortid": "^2.2.15",
49
- "@takeshape/infra": "10.24.13"
49
+ "@takeshape/infra": "10.26.2"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=18"