@takeshape/schema 11.70.3 → 11.71.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.
- package/dist/__tests__/refs.test.js +62 -1
- package/dist/migration/index.d.ts +1 -0
- package/dist/migration/index.js +3 -1
- package/dist/migration/to/v3.54.0.d.ts +4 -0
- package/dist/migration/to/v3.54.0.js +10 -0
- package/dist/project-schema/index.d.ts +4 -1
- package/dist/project-schema/index.js +2 -1
- package/dist/project-schema/latest.d.ts +27 -8
- package/dist/project-schema/migrate.js +4 -1
- package/dist/project-schema/v3.54.0.d.ts +2322 -0
- package/dist/project-schema/v3.54.0.js +7 -0
- package/dist/refs.d.ts +10 -0
- package/dist/refs.js +26 -1
- package/dist/resolvers/ai/__tests__/rag-query.test.d.ts +1 -0
- package/dist/resolvers/ai/__tests__/rag-query.test.js +49 -0
- package/dist/resolvers/ai/rag-query.d.ts +49 -0
- package/dist/resolvers/ai/rag-query.js +40 -0
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.js +4 -2
- package/dist/schemas/project-schema/latest.json +38 -2
- package/dist/schemas/project-schema/v3.54.0.json +3512 -0
- package/dist/schemas/project-schema.json +3 -0
- package/dist/util/has-arg.d.ts +3 -2
- package/dist/util/has-arg.js +14 -2
- package/examples/latest/agent-schema.json +1 -1
- package/examples/latest/all-fields-shapes-inline.json +1 -1
- package/examples/latest/all-fields-shapes.json +1 -1
- package/examples/latest/betzino.json +1 -1
- package/examples/latest/blog-schema.json +1 -1
- package/examples/latest/brewery-schema.json +1 -1
- package/examples/latest/clear-cache-schema.json +1 -1
- package/examples/latest/complex-project-schema.json +1 -1
- package/examples/latest/complex-schema.json +1 -1
- package/examples/latest/edit-schema.json +1 -1
- package/examples/latest/fabric-ecommerce.json +1 -1
- package/examples/latest/frank-and-fred-schema.json +1 -1
- package/examples/latest/klirr-schema.json +1 -1
- package/examples/latest/layers/rick-and-morty-layer.json +1 -1
- package/examples/latest/layers/shopify-layer-2023-01.json +1 -1
- package/examples/latest/layers/shopify-storefront-2023-04.json +1 -1
- package/examples/latest/layers/wordpress-2024-01.json +1 -1
- package/examples/latest/massive-schema.json +1 -1
- package/examples/latest/mill-components-schema.json +1 -1
- package/examples/latest/nested-shape-arrays.json +1 -1
- package/examples/latest/one-earth.json +1 -1
- package/examples/latest/pet-oneof-array.json +1 -1
- package/examples/latest/post-schema.json +1 -1
- package/examples/latest/pruned-shopify-product-schema.json +1 -1
- package/examples/latest/rag-example.json +4 -39
- package/examples/latest/real-world-schema.json +1 -1
- package/examples/latest/recursive-repeater-schema.json +1 -1
- package/examples/latest/recursive-schema.json +1 -1
- package/examples/latest/rick-and-morty-ast.json +1 -1
- package/examples/latest/rick-and-morty-graphql.json +1 -1
- package/examples/latest/rick-and-morty-rest.json +1 -1
- package/examples/latest/rick-and-morty-user-schema.json +53 -16
- package/examples/latest/rick-and-morty-with-indexing.json +1 -1
- package/examples/latest/schema-where-filter.json +1 -1
- package/examples/latest/schema-with-repeater-draftjs.json +1 -1
- package/examples/latest/schema-with-rick-and-morty.json +1 -1
- package/examples/latest/shape-books-v3_2_0.json +1 -1
- package/examples/latest/shape-books.json +1 -1
- package/examples/latest/shape-editor-schema-edited.json +1 -1
- package/examples/latest/shape-editor-schema-initial.json +1 -1
- package/examples/latest/shapedb-crud-every-prop-type.json +1 -1
- package/examples/latest/shopify-lookbook.json +1 -1
- package/examples/latest/shopify-product-2022-07.json +1 -1
- package/examples/latest/shopify-product-2023-04.json +1 -1
- package/examples/latest/shopify-store-with-widget.json +1 -1
- package/examples/latest/stripe-product-runtime-schema.json +1 -1
- package/examples/latest/stripe-starter-resolved.json +1 -1
- package/examples/latest/user-schema-no-required.json +1 -1
- package/examples/latest/user-schema-with-defaults.json +1 -1
- package/examples/latest/valvoline-ai-demo.json +1 -1
- package/examples/latest/vector-search-schema.json +1 -1
- package/examples/source/rag-example.json +3 -38
- package/package.json +8 -5
|
@@ -3,7 +3,7 @@ import shapeBooksSchema from '@/examples/latest/shape-books.json';
|
|
|
3
3
|
import shopifyStoreJson from '@/examples/latest/shopify-store-with-widget.json';
|
|
4
4
|
import valvolineSchema from '@/examples/latest/valvoline-ai-demo.json';
|
|
5
5
|
import { createMockSchema, createMockSchemaWithDefaults } from "../mocks.js";
|
|
6
|
-
import { $refToAtRef, anyRefToShapeSchemaPath, createGetNamespace, createTemplateShapeName, dereferenceSchema, getAllPropertyRefs, getOneOfRefs, getRefShapeName, hasRef, hasRefProperty, hasResolvableRef, normalizeLocalRefString, normalizeRefExpression, normalizeRefs, parsePropertyRef, parseReturnShape, parseTemplateShape, propertyRefItemToArgsPath, propertyRefItemToResolverPath, propertyRefToArgs, propertyRefToShapeRef, refExpressionToRefItem, refExpressionToShape, refSchemaToPath, returnShapeToSchema, serializePropertyRef, untemplate } from "../refs.js";
|
|
6
|
+
import { $refToAtRef, anyRefToShapeSchemaPath, createGetNamespace, createTemplateShapeName, dereferenceSchema, getAllPropertyRefs, getOneOfRefs, getReferencedShapeProperty, getRefShapeName, hasRef, hasRefProperty, hasResolvableRef, normalizeLocalRefString, normalizeRefExpression, normalizeRefs, parsePropertyRef, parseReturnShape, parseTemplateShape, propertyRefItemToArgsPath, propertyRefItemToResolverPath, propertyRefToArgs, propertyRefToShapeRef, refExpressionToRefItem, refExpressionToShape, refSchemaToPath, returnShapeToSchema, serializePropertyRef, untemplate } from "../refs.js";
|
|
7
7
|
import { createShape } from "../schema-util.js";
|
|
8
8
|
const schema = shopifyStoreJson.shapes.Product.schema;
|
|
9
9
|
test('getRefShapeName', () => {
|
|
@@ -750,3 +750,64 @@ describe('getOneOfRefs', () => {
|
|
|
750
750
|
]);
|
|
751
751
|
});
|
|
752
752
|
});
|
|
753
|
+
describe('getReferencedShapeProperty', () => {
|
|
754
|
+
const projectSchema = createMockSchema('projectId', {
|
|
755
|
+
services: {
|
|
756
|
+
rick: {
|
|
757
|
+
id: 'rick',
|
|
758
|
+
title: 'Rick and Morty',
|
|
759
|
+
namespace: 'Rick',
|
|
760
|
+
provider: 'graphql',
|
|
761
|
+
serviceType: 'graphql',
|
|
762
|
+
authenticationType: 'none'
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
shapes: {
|
|
766
|
+
Rick_Blah: createShape('Rick_Blah', {
|
|
767
|
+
extends: [
|
|
768
|
+
{
|
|
769
|
+
'@ref': 'rick:Character'
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
type: 'object',
|
|
773
|
+
properties: {
|
|
774
|
+
vector: {
|
|
775
|
+
type: 'array',
|
|
776
|
+
items: {
|
|
777
|
+
type: 'number'
|
|
778
|
+
},
|
|
779
|
+
title: 'Vector'
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
]
|
|
784
|
+
}),
|
|
785
|
+
Foo: createShape('Foo', {
|
|
786
|
+
type: 'object',
|
|
787
|
+
properties: {
|
|
788
|
+
character: { type: 'string' }
|
|
789
|
+
}
|
|
790
|
+
})
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
test('returns undefined when no shape found', () => {
|
|
794
|
+
expect(getReferencedShapeProperty(projectSchema, { shapeName: 'bogus', propertyName: 'bar', serviceId: 'rick' })).toBe(undefined);
|
|
795
|
+
});
|
|
796
|
+
test('returns undefined when no property found', () => {
|
|
797
|
+
expect(getReferencedShapeProperty(projectSchema, { shapeName: 'Foo', propertyName: 'bar', serviceId: 'rick' })).toBe(undefined);
|
|
798
|
+
});
|
|
799
|
+
test('returns shape property - serviceId and extends', () => {
|
|
800
|
+
expect(getReferencedShapeProperty(projectSchema, { shapeName: 'Blah', propertyName: 'vector', serviceId: 'rick' })).toEqual({
|
|
801
|
+
type: 'array',
|
|
802
|
+
items: {
|
|
803
|
+
type: 'number'
|
|
804
|
+
},
|
|
805
|
+
title: 'Vector'
|
|
806
|
+
});
|
|
807
|
+
});
|
|
808
|
+
test('returns shape property - simple', () => {
|
|
809
|
+
expect(getReferencedShapeProperty(projectSchema, { shapeName: 'Foo', propertyName: 'character', serviceId: 'local' })).toEqual({
|
|
810
|
+
type: 'string'
|
|
811
|
+
});
|
|
812
|
+
});
|
|
813
|
+
});
|
|
@@ -60,6 +60,7 @@ export declare const migrateTo: {
|
|
|
60
60
|
'v3.51.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_50_0, import("../index.ts").ProjectSchemaJSONV3_51_0>;
|
|
61
61
|
'v3.52.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_51_0, import("../index.ts").ProjectSchemaJSONV3_52_0>;
|
|
62
62
|
'v3.53.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_52_0, import("../index.ts").ProjectSchemaJSONV3_53_0>;
|
|
63
|
+
'v3.54.0': import("./types.ts").MigrateFunction<import("../index.ts").ProjectSchemaJSONV3_53_0, import("../index.ts").ProjectSchemaJSONV3_54_0>;
|
|
63
64
|
};
|
|
64
65
|
export * from './utils.ts';
|
|
65
66
|
export declare const listTypePrefix = "PaginatedList";
|
package/dist/migration/index.js
CHANGED
|
@@ -59,6 +59,7 @@ import migrateToV3_50_0 from "./to/v3.50.0.js";
|
|
|
59
59
|
import migrateToV3_51_0 from "./to/v3.51.0.js";
|
|
60
60
|
import migrateToV3_52_0 from "./to/v3.52.0.js";
|
|
61
61
|
import migrateToV3_53_0 from "./to/v3.53.0.js";
|
|
62
|
+
import migrateToV3_54_0 from "./to/v3.54.0.js";
|
|
62
63
|
export const migrateTo = {
|
|
63
64
|
'v3.0.0': migrateToV3_0_0,
|
|
64
65
|
'v3.1.0': migrateToV3_1_0,
|
|
@@ -120,7 +121,8 @@ export const migrateTo = {
|
|
|
120
121
|
'v3.50.0': migrateToV3_50_0,
|
|
121
122
|
'v3.51.0': migrateToV3_51_0,
|
|
122
123
|
'v3.52.0': migrateToV3_52_0,
|
|
123
|
-
'v3.53.0': migrateToV3_53_0
|
|
124
|
+
'v3.53.0': migrateToV3_53_0,
|
|
125
|
+
'v3.54.0': migrateToV3_54_0
|
|
124
126
|
};
|
|
125
127
|
export * from "./utils.js";
|
|
126
128
|
export const listTypePrefix = 'PaginatedList';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProjectSchemaJSONV3_53_0, ProjectSchemaJSONV3_54_0 } from '../../project-schema/index.ts';
|
|
2
|
+
import type { MigrateFunction } from '../types.ts';
|
|
3
|
+
declare const migrate: MigrateFunction<ProjectSchemaJSONV3_53_0, ProjectSchemaJSONV3_54_0>;
|
|
4
|
+
export default migrate;
|
|
@@ -61,6 +61,7 @@ export type * from './v3.50.0.ts';
|
|
|
61
61
|
export type * from './v3.51.0.ts';
|
|
62
62
|
export type * from './v3.52.0.ts';
|
|
63
63
|
export type * from './v3.53.0.ts';
|
|
64
|
+
export type * from './v3.54.0.ts';
|
|
64
65
|
export type * from './v4.0.0.ts';
|
|
65
66
|
import { ProjectSchemaJSONV1_0_0 } from './v1.0.0.ts';
|
|
66
67
|
import { ProjectSchemaJSONV3_0_0 } from './v3.0.0.ts';
|
|
@@ -124,9 +125,10 @@ import { ProjectSchemaJSONV3_50_0 } from './v3.50.0.ts';
|
|
|
124
125
|
import { ProjectSchemaJSONV3_51_0 } from './v3.51.0.ts';
|
|
125
126
|
import { ProjectSchemaJSONV3_52_0 } from './v3.52.0.ts';
|
|
126
127
|
import { ProjectSchemaJSONV3_53_0 } from './v3.53.0.ts';
|
|
128
|
+
import { ProjectSchemaJSONV3_54_0 } from './v3.54.0.ts';
|
|
127
129
|
import { ProjectSchemaJSONV4_0_0 } from './v4.0.0.ts';
|
|
128
130
|
import { ProjectSchemaJSON } from './latest.ts';
|
|
129
|
-
export type AnyProjectSchemaJSON = ProjectSchemaJSONV1_0_0 | ProjectSchemaJSONV3_0_0 | ProjectSchemaJSONV3_1_0 | ProjectSchemaJSONV3_2_0 | ProjectSchemaJSONV3_3_0 | ProjectSchemaJSONV3_4_0 | ProjectSchemaJSONV3_5_0 | ProjectSchemaJSONV3_5_1 | ProjectSchemaJSONV3_6_0 | ProjectSchemaJSONV3_7_0 | ProjectSchemaJSONV3_8_0 | ProjectSchemaJSONV3_9_0 | ProjectSchemaJSONV3_10_0 | ProjectSchemaJSONV3_11_0 | ProjectSchemaJSONV3_12_0 | ProjectSchemaJSONV3_12_1 | ProjectSchemaJSONV3_12_2 | ProjectSchemaJSONV3_12_3 | ProjectSchemaJSONV3_13_0 | ProjectSchemaJSONV3_14_0 | ProjectSchemaJSONV3_15_0 | ProjectSchemaJSONV3_16_0 | ProjectSchemaJSONV3_17_0 | ProjectSchemaJSONV3_17_1 | ProjectSchemaJSONV3_18_0 | ProjectSchemaJSONV3_18_1 | ProjectSchemaJSONV3_18_2 | ProjectSchemaJSONV3_19_0 | ProjectSchemaJSONV3_20_0 | ProjectSchemaJSONV3_21_0 | ProjectSchemaJSONV3_22_0 | ProjectSchemaJSONV3_23_0 | ProjectSchemaJSONV3_24_0 | ProjectSchemaJSONV3_25_0 | ProjectSchemaJSONV3_26_0 | ProjectSchemaJSONV3_27_0 | ProjectSchemaJSONV3_28_0 | ProjectSchemaJSONV3_29_0 | ProjectSchemaJSONV3_30_0 | ProjectSchemaJSONV3_31_0 | ProjectSchemaJSONV3_32_0 | ProjectSchemaJSONV3_33_0 | ProjectSchemaJSONV3_34_0 | ProjectSchemaJSONV3_35_0 | ProjectSchemaJSONV3_36_0 | ProjectSchemaJSONV3_37_0 | ProjectSchemaJSONV3_38_0 | ProjectSchemaJSONV3_39_0 | ProjectSchemaJSONV3_40_0 | ProjectSchemaJSONV3_41_0 | ProjectSchemaJSONV3_42_0 | ProjectSchemaJSONV3_43_0 | ProjectSchemaJSONV3_44_0 | ProjectSchemaJSONV3_45_0 | ProjectSchemaJSONV3_46_0 | ProjectSchemaJSONV3_47_0 | ProjectSchemaJSONV3_48_0 | ProjectSchemaJSONV3_49_0 | ProjectSchemaJSONV3_50_0 | ProjectSchemaJSONV3_51_0 | ProjectSchemaJSONV3_52_0 | ProjectSchemaJSONV3_53_0 | ProjectSchemaJSONV4_0_0 | ProjectSchemaJSON;
|
|
131
|
+
export type AnyProjectSchemaJSON = ProjectSchemaJSONV1_0_0 | ProjectSchemaJSONV3_0_0 | ProjectSchemaJSONV3_1_0 | ProjectSchemaJSONV3_2_0 | ProjectSchemaJSONV3_3_0 | ProjectSchemaJSONV3_4_0 | ProjectSchemaJSONV3_5_0 | ProjectSchemaJSONV3_5_1 | ProjectSchemaJSONV3_6_0 | ProjectSchemaJSONV3_7_0 | ProjectSchemaJSONV3_8_0 | ProjectSchemaJSONV3_9_0 | ProjectSchemaJSONV3_10_0 | ProjectSchemaJSONV3_11_0 | ProjectSchemaJSONV3_12_0 | ProjectSchemaJSONV3_12_1 | ProjectSchemaJSONV3_12_2 | ProjectSchemaJSONV3_12_3 | ProjectSchemaJSONV3_13_0 | ProjectSchemaJSONV3_14_0 | ProjectSchemaJSONV3_15_0 | ProjectSchemaJSONV3_16_0 | ProjectSchemaJSONV3_17_0 | ProjectSchemaJSONV3_17_1 | ProjectSchemaJSONV3_18_0 | ProjectSchemaJSONV3_18_1 | ProjectSchemaJSONV3_18_2 | ProjectSchemaJSONV3_19_0 | ProjectSchemaJSONV3_20_0 | ProjectSchemaJSONV3_21_0 | ProjectSchemaJSONV3_22_0 | ProjectSchemaJSONV3_23_0 | ProjectSchemaJSONV3_24_0 | ProjectSchemaJSONV3_25_0 | ProjectSchemaJSONV3_26_0 | ProjectSchemaJSONV3_27_0 | ProjectSchemaJSONV3_28_0 | ProjectSchemaJSONV3_29_0 | ProjectSchemaJSONV3_30_0 | ProjectSchemaJSONV3_31_0 | ProjectSchemaJSONV3_32_0 | ProjectSchemaJSONV3_33_0 | ProjectSchemaJSONV3_34_0 | ProjectSchemaJSONV3_35_0 | ProjectSchemaJSONV3_36_0 | ProjectSchemaJSONV3_37_0 | ProjectSchemaJSONV3_38_0 | ProjectSchemaJSONV3_39_0 | ProjectSchemaJSONV3_40_0 | ProjectSchemaJSONV3_41_0 | ProjectSchemaJSONV3_42_0 | ProjectSchemaJSONV3_43_0 | ProjectSchemaJSONV3_44_0 | ProjectSchemaJSONV3_45_0 | ProjectSchemaJSONV3_46_0 | ProjectSchemaJSONV3_47_0 | ProjectSchemaJSONV3_48_0 | ProjectSchemaJSONV3_49_0 | ProjectSchemaJSONV3_50_0 | ProjectSchemaJSONV3_51_0 | ProjectSchemaJSONV3_52_0 | ProjectSchemaJSONV3_53_0 | ProjectSchemaJSONV3_54_0 | ProjectSchemaJSONV4_0_0 | ProjectSchemaJSON;
|
|
130
132
|
export declare const isProjectSchemaJSONV1_0_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV1_0_0;
|
|
131
133
|
export declare const isProjectSchemaJSONV3_0_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_0_0;
|
|
132
134
|
export declare const isProjectSchemaJSONV3_1_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_1_0;
|
|
@@ -189,5 +191,6 @@ export declare const isProjectSchemaJSONV3_50_0: (projectSchema: AnyProjectSchem
|
|
|
189
191
|
export declare const isProjectSchemaJSONV3_51_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_51_0;
|
|
190
192
|
export declare const isProjectSchemaJSONV3_52_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_52_0;
|
|
191
193
|
export declare const isProjectSchemaJSONV3_53_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_53_0;
|
|
194
|
+
export declare const isProjectSchemaJSONV3_54_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV3_54_0;
|
|
192
195
|
export declare const isLatestProjectSchemaJSON: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSON;
|
|
193
196
|
export declare const isProjectSchemaJSONV4_0_0: (projectSchema: AnyProjectSchemaJSON) => projectSchema is ProjectSchemaJSONV4_0_0;
|
|
@@ -73,5 +73,6 @@ export const isProjectSchemaJSONV3_50_0 = createVersionPredicate('3.50.0');
|
|
|
73
73
|
export const isProjectSchemaJSONV3_51_0 = createVersionPredicate('3.51.0');
|
|
74
74
|
export const isProjectSchemaJSONV3_52_0 = createVersionPredicate('3.52.0');
|
|
75
75
|
export const isProjectSchemaJSONV3_53_0 = createVersionPredicate('3.53.0');
|
|
76
|
-
export const
|
|
76
|
+
export const isProjectSchemaJSONV3_54_0 = createVersionPredicate('3.54.0');
|
|
77
|
+
export const isLatestProjectSchemaJSON = createVersionPredicate('3.54.0');
|
|
77
78
|
export const isProjectSchemaJSONV4_0_0 = createVersionPredicate('4.0.0');
|
|
@@ -74,7 +74,7 @@ export type Resolver = BasicResolver | ComposeResolver;
|
|
|
74
74
|
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
75
75
|
* via the `definition` "basicResolver".
|
|
76
76
|
*/
|
|
77
|
-
export type BasicResolver = UtilResolver | DelegateResolver | TakeshapeResolver | ShapedbResolver | ShapedbResolverShapeNameNotRequired | GraphqlResolver | RestResolver | AwsLambdaResolver | SalsifyResolver | SyndigoResolver | FunctionResolver | AIGenerateTextResolver | AIGeneratePropertyResolver | AIEmbeddingResolver | AIParseFileResolver | ChunkResolver | AIRunAgentResolver | AIInspectAgentResolver;
|
|
77
|
+
export type BasicResolver = UtilResolver | DelegateResolver | TakeshapeResolver | ShapedbResolver | ShapedbResolverShapeNameNotRequired | GraphqlResolver | RestResolver | AwsLambdaResolver | SalsifyResolver | SyndigoResolver | FunctionResolver | AIGenerateTextResolver | AIGeneratePropertyResolver | AIEmbeddingResolver | AIEmbeddingSearchResolver | AIParseFileResolver | ChunkResolver | AIRunAgentResolver | AIInspectAgentResolver;
|
|
78
78
|
/**
|
|
79
79
|
* Name of the resolver function.
|
|
80
80
|
*/
|
|
@@ -228,7 +228,11 @@ export type AIResolverName2 = 'ai:createEmbedding';
|
|
|
228
228
|
/**
|
|
229
229
|
* Name of the resolver function.
|
|
230
230
|
*/
|
|
231
|
-
export type AIResolverName3 = 'ai:
|
|
231
|
+
export type AIResolverName3 = 'ai:embeddingSearch';
|
|
232
|
+
/**
|
|
233
|
+
* Name of the resolver function.
|
|
234
|
+
*/
|
|
235
|
+
export type AIResolverName4 = 'ai:parseFile';
|
|
232
236
|
/**
|
|
233
237
|
* Name of the resolver function.
|
|
234
238
|
*/
|
|
@@ -241,11 +245,11 @@ export type UtilChunkResolverOptions = UtilChunkResolverOptionsCharacterCount |
|
|
|
241
245
|
/**
|
|
242
246
|
* Name of the resolver function.
|
|
243
247
|
*/
|
|
244
|
-
export type
|
|
248
|
+
export type AIResolverName5 = 'ai:runAgent';
|
|
245
249
|
/**
|
|
246
250
|
* Name of the resolver function.
|
|
247
251
|
*/
|
|
248
|
-
export type
|
|
252
|
+
export type AIResolverName6 = 'ai:inspectAgentSession';
|
|
249
253
|
/**
|
|
250
254
|
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
251
255
|
* via the `definition` "dependencies".
|
|
@@ -593,7 +597,7 @@ export interface ProjectSchemaJSON {
|
|
|
593
597
|
/**
|
|
594
598
|
* The version of the schema format your project is using. We increase the version as we make breaking changes to the schema format.
|
|
595
599
|
*/
|
|
596
|
-
schemaVersion: '3.
|
|
600
|
+
schemaVersion: '3.54.0';
|
|
597
601
|
/**
|
|
598
602
|
* The ID of the TakeShape project this schema belongs to.
|
|
599
603
|
*/
|
|
@@ -1378,6 +1382,21 @@ export interface AIEmbeddingResolverOptions {
|
|
|
1378
1382
|
useDependencies?: boolean;
|
|
1379
1383
|
[k: string]: any;
|
|
1380
1384
|
}
|
|
1385
|
+
/**
|
|
1386
|
+
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
1387
|
+
* via the `definition` "aiEmbeddingSearchResolver".
|
|
1388
|
+
*/
|
|
1389
|
+
export interface AIEmbeddingSearchResolver {
|
|
1390
|
+
if?: string;
|
|
1391
|
+
id?: string;
|
|
1392
|
+
name: AIResolverName3;
|
|
1393
|
+
/**
|
|
1394
|
+
* A vector property ref to use for the query.
|
|
1395
|
+
*/
|
|
1396
|
+
vectorProperty: string;
|
|
1397
|
+
args?: ParameterConfigForJson;
|
|
1398
|
+
results?: ParameterConfigForJson;
|
|
1399
|
+
}
|
|
1381
1400
|
/**
|
|
1382
1401
|
* This interface was referenced by `ProjectSchemaJSON`'s JSON-Schema
|
|
1383
1402
|
* via the `definition` "aiParseFileResolver".
|
|
@@ -1385,7 +1404,7 @@ export interface AIEmbeddingResolverOptions {
|
|
|
1385
1404
|
export interface AIParseFileResolver {
|
|
1386
1405
|
if?: string;
|
|
1387
1406
|
id?: string;
|
|
1388
|
-
name:
|
|
1407
|
+
name: AIResolverName4;
|
|
1389
1408
|
/**
|
|
1390
1409
|
* Configuration for a service to use with this resolver.
|
|
1391
1410
|
*/
|
|
@@ -1468,12 +1487,12 @@ export interface UtilChunkResolverOptionsSemantic {
|
|
|
1468
1487
|
}
|
|
1469
1488
|
export interface AIRunAgentResolver {
|
|
1470
1489
|
id?: string;
|
|
1471
|
-
name:
|
|
1490
|
+
name: AIResolverName5;
|
|
1472
1491
|
agentName: string;
|
|
1473
1492
|
}
|
|
1474
1493
|
export interface AIInspectAgentResolver {
|
|
1475
1494
|
id?: string;
|
|
1476
|
-
name:
|
|
1495
|
+
name: AIResolverName6;
|
|
1477
1496
|
agentName: string;
|
|
1478
1497
|
}
|
|
1479
1498
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { migrateTo } from "../migration/index.js";
|
|
2
|
-
import { isProjectSchemaJSONV1_0_0, isProjectSchemaJSONV3_0_0, isProjectSchemaJSONV3_1_0, isProjectSchemaJSONV3_2_0, isProjectSchemaJSONV3_3_0, isProjectSchemaJSONV3_4_0, isProjectSchemaJSONV3_5_0, isProjectSchemaJSONV3_5_1, isProjectSchemaJSONV3_6_0, isProjectSchemaJSONV3_7_0, isProjectSchemaJSONV3_8_0, isProjectSchemaJSONV3_9_0, isProjectSchemaJSONV3_10_0, isProjectSchemaJSONV3_11_0, isProjectSchemaJSONV3_12_0, isProjectSchemaJSONV3_12_1, isProjectSchemaJSONV3_12_2, isProjectSchemaJSONV3_12_3, isProjectSchemaJSONV3_13_0, isProjectSchemaJSONV3_14_0, isProjectSchemaJSONV3_15_0, isProjectSchemaJSONV3_16_0, isProjectSchemaJSONV3_17_0, isProjectSchemaJSONV3_17_1, isProjectSchemaJSONV3_18_0, isProjectSchemaJSONV3_18_1, isProjectSchemaJSONV3_18_2, isProjectSchemaJSONV3_19_0, isProjectSchemaJSONV3_20_0, isProjectSchemaJSONV3_21_0, isProjectSchemaJSONV3_22_0, isProjectSchemaJSONV3_23_0, isProjectSchemaJSONV3_24_0, isProjectSchemaJSONV3_25_0, isProjectSchemaJSONV3_26_0, isProjectSchemaJSONV3_27_0, isProjectSchemaJSONV3_28_0, isProjectSchemaJSONV3_29_0, isProjectSchemaJSONV3_30_0, isProjectSchemaJSONV3_31_0, isProjectSchemaJSONV3_32_0, isProjectSchemaJSONV3_33_0, isProjectSchemaJSONV3_34_0, isProjectSchemaJSONV3_35_0, isProjectSchemaJSONV3_36_0, isProjectSchemaJSONV3_37_0, isProjectSchemaJSONV3_38_0, isProjectSchemaJSONV3_39_0, isProjectSchemaJSONV3_40_0, isProjectSchemaJSONV3_41_0, isProjectSchemaJSONV3_42_0, isProjectSchemaJSONV3_43_0, isProjectSchemaJSONV3_44_0, isProjectSchemaJSONV3_45_0, isProjectSchemaJSONV3_46_0, isProjectSchemaJSONV3_47_0, isProjectSchemaJSONV3_48_0, isProjectSchemaJSONV3_49_0, isProjectSchemaJSONV3_50_0, isProjectSchemaJSONV3_51_0, isProjectSchemaJSONV3_52_0, isProjectSchemaJSONV4_0_0, isLatestProjectSchemaJSON } from "./index.js";
|
|
2
|
+
import { isProjectSchemaJSONV1_0_0, isProjectSchemaJSONV3_0_0, isProjectSchemaJSONV3_1_0, isProjectSchemaJSONV3_2_0, isProjectSchemaJSONV3_3_0, isProjectSchemaJSONV3_4_0, isProjectSchemaJSONV3_5_0, isProjectSchemaJSONV3_5_1, isProjectSchemaJSONV3_6_0, isProjectSchemaJSONV3_7_0, isProjectSchemaJSONV3_8_0, isProjectSchemaJSONV3_9_0, isProjectSchemaJSONV3_10_0, isProjectSchemaJSONV3_11_0, isProjectSchemaJSONV3_12_0, isProjectSchemaJSONV3_12_1, isProjectSchemaJSONV3_12_2, isProjectSchemaJSONV3_12_3, isProjectSchemaJSONV3_13_0, isProjectSchemaJSONV3_14_0, isProjectSchemaJSONV3_15_0, isProjectSchemaJSONV3_16_0, isProjectSchemaJSONV3_17_0, isProjectSchemaJSONV3_17_1, isProjectSchemaJSONV3_18_0, isProjectSchemaJSONV3_18_1, isProjectSchemaJSONV3_18_2, isProjectSchemaJSONV3_19_0, isProjectSchemaJSONV3_20_0, isProjectSchemaJSONV3_21_0, isProjectSchemaJSONV3_22_0, isProjectSchemaJSONV3_23_0, isProjectSchemaJSONV3_24_0, isProjectSchemaJSONV3_25_0, isProjectSchemaJSONV3_26_0, isProjectSchemaJSONV3_27_0, isProjectSchemaJSONV3_28_0, isProjectSchemaJSONV3_29_0, isProjectSchemaJSONV3_30_0, isProjectSchemaJSONV3_31_0, isProjectSchemaJSONV3_32_0, isProjectSchemaJSONV3_33_0, isProjectSchemaJSONV3_34_0, isProjectSchemaJSONV3_35_0, isProjectSchemaJSONV3_36_0, isProjectSchemaJSONV3_37_0, isProjectSchemaJSONV3_38_0, isProjectSchemaJSONV3_39_0, isProjectSchemaJSONV3_40_0, isProjectSchemaJSONV3_41_0, isProjectSchemaJSONV3_42_0, isProjectSchemaJSONV3_43_0, isProjectSchemaJSONV3_44_0, isProjectSchemaJSONV3_45_0, isProjectSchemaJSONV3_46_0, isProjectSchemaJSONV3_47_0, isProjectSchemaJSONV3_48_0, isProjectSchemaJSONV3_49_0, isProjectSchemaJSONV3_50_0, isProjectSchemaJSONV3_51_0, isProjectSchemaJSONV3_52_0, isProjectSchemaJSONV3_53_0, isProjectSchemaJSONV4_0_0, isLatestProjectSchemaJSON } from "./index.js";
|
|
3
3
|
export async function migrateToLatestProjectSchema(context, projectSchema) {
|
|
4
4
|
if (isLatestProjectSchemaJSON(projectSchema)) {
|
|
5
5
|
return projectSchema;
|
|
@@ -187,6 +187,9 @@ export async function migrateToLatestProjectSchema(context, projectSchema) {
|
|
|
187
187
|
if (isProjectSchemaJSONV3_52_0(projectSchema)) {
|
|
188
188
|
projectSchema = await migrateTo['v3.53.0'](context, projectSchema);
|
|
189
189
|
}
|
|
190
|
+
if (isProjectSchemaJSONV3_53_0(projectSchema)) {
|
|
191
|
+
projectSchema = await migrateTo['v3.54.0'](context, projectSchema);
|
|
192
|
+
}
|
|
190
193
|
if (isProjectSchemaJSONV4_0_0(projectSchema)) {
|
|
191
194
|
throw new Error('You are using an unreleased schema version. Migration is not possible');
|
|
192
195
|
}
|