@takeshape/schema 11.59.0 → 11.59.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 (34) hide show
  1. package/dist/__tests__/content-schema-transform.test.js +1 -1
  2. package/dist/__tests__/flatten-templates.test.js +2 -2
  3. package/dist/__tests__/get-is-leaf.test.js +1 -1
  4. package/dist/__tests__/refs.test.js +1 -1
  5. package/dist/__tests__/schema-transform.test.js +2 -2
  6. package/dist/__tests__/schema-util.test.js +7 -7
  7. package/dist/__tests__/unions.test.js +1 -1
  8. package/dist/__tests__/validate.test.js +2 -2
  9. package/dist/__tests__/workflows.test.js +1 -1
  10. package/dist/create-input-schema.js +1 -1
  11. package/dist/index.d.ts +30 -30
  12. package/dist/index.js +28 -28
  13. package/dist/models/__tests__/project-schema.test.js +1 -1
  14. package/dist/models/__tests__/query.test.js +1 -1
  15. package/dist/models/__tests__/service.test.js +1 -1
  16. package/dist/models/__tests__/shape.test.js +1 -1
  17. package/dist/template-shapes/__tests__/index.test.js +1 -1
  18. package/dist/template-shapes/__tests__/where.test.js +2 -2
  19. package/dist/template-shapes/templates.d.ts +1 -1
  20. package/dist/types/index.d.ts +1 -1
  21. package/dist/types/utils.d.ts +2 -2
  22. package/dist/util/__tests__/api-indexing.test.js +1 -1
  23. package/dist/util/__tests__/detect-cycles.test.js +1 -1
  24. package/dist/util/__tests__/find-shape-at-path.test.js +1 -1
  25. package/dist/util/__tests__/get-return-shape.test.js +1 -1
  26. package/dist/util/__tests__/has-args.test.js +1 -1
  27. package/dist/util/__tests__/patch-schema.test.js +1 -1
  28. package/dist/util/__tests__/shapes.test.js +1 -1
  29. package/dist/util/ai-tools.d.ts +1 -1
  30. package/examples/latest/layers/rick-and-morty-layer.json +11 -32
  31. package/examples/latest/layers/shopify-layer-2023-01.json +2206 -8637
  32. package/examples/latest/layers/shopify-storefront-2023-04.json +402 -1712
  33. package/examples/latest/layers/wordpress-2024-01.json +688 -2743
  34. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
- import shapeBooksJson from '@/examples/latest/shape-books.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import shapeBooksJson from '@/examples/latest/shape-books.json';
3
3
  import { getContentTransform, getPropertyInfo } from "../content-schema-transform.js";
4
4
  import { createInputSchema } from "../create-input-schema.js";
5
5
  import { createMockSchema } from "../mocks.js";
@@ -1,7 +1,7 @@
1
- import betzinoJson from '@/examples/latest/betzino.json';
2
- import shapeBooksSchemaJson from '@/examples/latest/shape-books.json';
3
1
  import { DEFAULT_ENTITLEMENTS } from '@takeshape/util';
4
2
  import { expect, test } from 'vitest';
3
+ import betzinoJson from '@/examples/latest/betzino.json';
4
+ import shapeBooksSchemaJson from '@/examples/latest/shape-books.json';
5
5
  import { flattenTemplates } from "../flatten-templates.js";
6
6
  import { applyDefaultsToSchema, getAllRefs } from "../schema-util.js";
7
7
  import { validateSchema } from "../validate/validate.js";
@@ -1,7 +1,7 @@
1
+ import { expect, test } from 'vitest';
1
2
  import petOneOfSchemaJson from '@/examples/latest/pet-oneof-array.json';
2
3
  import shapeBooksSchemaJson from '@/examples/latest/shape-books.json';
3
4
  import userSchemaJson from '@/examples/latest/user-schema-with-defaults.json';
4
- import { expect, test } from 'vitest';
5
5
  import { getIsLeaf } from "../get-is-leaf.js";
6
6
  import { applyDefaultsToSchema } from "../schema-util.js";
7
7
  const userSchema = applyDefaultsToSchema(userSchemaJson);
@@ -1,7 +1,7 @@
1
+ import { describe, expect, it, test } from 'vitest';
1
2
  import shapeBooksSchema from '@/examples/latest/shape-books.json';
2
3
  import shopifyStoreJson from '@/examples/latest/shopify-store-with-widget.json';
3
4
  import valvolineSchema from '@/examples/latest/valvoline-ai-demo.json';
4
- import { describe, expect, it, test } from 'vitest';
5
5
  import { createMockSchema, createMockSchemaWithDefaults } from "../mocks.js";
6
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";
7
7
  import { createShape } from "../schema-util.js";
@@ -1,7 +1,7 @@
1
- import petSchemaJson from '@/examples/latest/pet-oneof-array.json';
2
- import shopifySchema from '@/examples/latest/shopify-store-with-widget.json';
3
1
  import { DEFAULT_ENTITLEMENTS, deepClone } from '@takeshape/util';
4
2
  import { describe, expect, test } from 'vitest';
3
+ import petSchemaJson from '@/examples/latest/pet-oneof-array.json';
4
+ import shopifySchema from '@/examples/latest/shopify-store-with-widget.json';
5
5
  import { removePropertiesTransform, unwrapOneOfObjects, wrapOneOfObjects } from "../schema-transform.js";
6
6
  import { applyDefaultsToSchema } from "../schema-util.js";
7
7
  import { validateSchema } from "../validate/validate.js";
@@ -1,9 +1,3 @@
1
- import massiveSchemaJson from '@/examples/latest/massive-schema.json';
2
- import postSchemaJson from '@/examples/latest/post-schema.json';
3
- import shopifySchema202207 from '@/examples/latest/shopify-product-2022-07.json';
4
- import shopifyStoreJson from '@/examples/latest/shopify-store-with-widget.json';
5
- import stripeStarterResolvedJson from '@/examples/latest/stripe-starter-resolved.json';
6
- import shopifyLayer202301 from '@/examples/source/layers/shopify-layer-2023-01.json';
7
1
  import { deepClone } from '@takeshape/util';
8
2
  import cloneDeep from 'lodash/cloneDeep.js';
9
3
  import get from 'lodash/get.js';
@@ -11,9 +5,15 @@ import keyBy from 'lodash/keyBy.js';
11
5
  import pick from 'lodash/pick.js';
12
6
  import pickBy from 'lodash/pickBy.js';
13
7
  import { describe, expect, it, test, vi } from 'vitest';
8
+ import massiveSchemaJson from '@/examples/latest/massive-schema.json';
9
+ import postSchemaJson from '@/examples/latest/post-schema.json';
10
+ import shopifySchema202207 from '@/examples/latest/shopify-product-2022-07.json';
11
+ import shopifyStoreJson from '@/examples/latest/shopify-store-with-widget.json';
12
+ import stripeStarterResolvedJson from '@/examples/latest/stripe-starter-resolved.json';
13
+ import shopifyLayer202301 from '@/examples/source/layers/shopify-layer-2023-01.json';
14
14
  import { createMockSchema } from "../mocks.js";
15
15
  import { dereferenceObjectSchema } from "../refs.js";
16
- import { BuiltInPropertiesProfile, applyBuiltinPropertiesToShape, applyDefaultsToSchema, createSchemaPropertyAccessor, createSchemaPropertyList, emptySchema, ensureMutationByShape, ensureQueryByShape, filterGraphQLServiceMap, getAllNamespaceShapes, getAllRefs, getAllRefsInShapes, getArgsShapeSchema, getBuiltInPropertyNames, getBuiltinsUsed, getDefaultMutationName, getModelBuiltInProperties, getNamespacedShapeNameList, getQueriesShape, getRelevantShapes, getServiceIdFieldName, getShapeByRef, getShapeDependencies, getShapesById, isBuiltInPropertyName, isBuiltinMutation, isBuiltinQuery, isBuiltinShape, isBuiltinType, pathBetween, projectSchemaToJSONSchema, schemaMatchesShapeName, shapeHasArrayPropOfShape, shapeToPropertySchema, visitSchemaProperties } from "../schema-util.js";
16
+ import { applyBuiltinPropertiesToShape, applyDefaultsToSchema, BuiltInPropertiesProfile, createSchemaPropertyAccessor, createSchemaPropertyList, emptySchema, ensureMutationByShape, ensureQueryByShape, filterGraphQLServiceMap, getAllNamespaceShapes, getAllRefs, getAllRefsInShapes, getArgsShapeSchema, getBuiltInPropertyNames, getBuiltinsUsed, getDefaultMutationName, getModelBuiltInProperties, getNamespacedShapeNameList, getQueriesShape, getRelevantShapes, getServiceIdFieldName, getShapeByRef, getShapeDependencies, getShapesById, isBuiltInPropertyName, isBuiltinMutation, isBuiltinQuery, isBuiltinShape, isBuiltinType, pathBetween, projectSchemaToJSONSchema, schemaMatchesShapeName, shapeHasArrayPropOfShape, shapeToPropertySchema, visitSchemaProperties } from "../schema-util.js";
17
17
  import { getServiceInfo } from "../services/services.js";
18
18
  import { isModelShape, isObjectSchema } from "../types/index.js";
19
19
  import { getShapeById } from "../util/shapes.js";
@@ -1,5 +1,5 @@
1
- import petSchemaJson from '@/examples/latest/pet-oneof-array.json';
2
1
  import { expect, test } from 'vitest';
2
+ import petSchemaJson from '@/examples/latest/pet-oneof-array.json';
3
3
  import { applyDefaultsToSchema } from "../schema-util.js";
4
4
  import { createUnwrapTransform, oneOfToObject } from "../unions.js";
5
5
  const petSchema = applyDefaultsToSchema(petSchemaJson);
@@ -1,11 +1,11 @@
1
- import rickAndMortyLayer from '@/examples/latest/layers/rick-and-morty-layer.json';
2
- import shopifyLayer from '@/examples/latest/layers/shopify-layer-2023-01.json';
3
1
  import { assert, DEFAULT_ENTITLEMENTS, deepClone } from '@takeshape/util';
4
2
  import get from 'lodash/get.js';
5
3
  import omit from 'lodash/omit.js';
6
4
  import set from 'lodash/set.js';
7
5
  import shortid from 'shortid';
8
6
  import { describe, expect, it, test } from 'vitest';
7
+ import rickAndMortyLayer from '@/examples/latest/layers/rick-and-morty-layer.json';
8
+ import shopifyLayer from '@/examples/latest/layers/shopify-layer-2023-01.json';
9
9
  import agentSchemaJson from '../../examples/latest/agent-schema.json';
10
10
  import shapeBooksLatestJson from '../../examples/latest/shape-books.json';
11
11
  import shopifySchemaWithInterfacesJson from '../../examples/latest/shopify-product-2022-07.json';
@@ -1,5 +1,5 @@
1
- import postSchemaJson from '@/examples/latest/post-schema.json';
2
1
  import { expect, test } from 'vitest';
2
+ import postSchemaJson from '@/examples/latest/post-schema.json';
3
3
  import { applyDefaultsToSchema } from "../schema-util.js";
4
4
  import { defaultWorkflow, findWorkflowStep, getLiveStepKeys, getStatusField, getWorkflow, getWorkflowStepKeys, statusFallback } from "../workflows.js";
5
5
  const postSchema = applyDefaultsToSchema(postSchemaJson);
@@ -1,4 +1,4 @@
1
- import { REMOVE, deepCloneWith, isIterableObject } from '@takeshape/util';
1
+ import { deepCloneWith, isIterableObject, REMOVE } from '@takeshape/util';
2
2
  import defaults from 'lodash/fp/defaults.js';
3
3
  const inputSchemaCache = new Map();
4
4
  function getInputSchemaCache(options) {
package/dist/index.d.ts CHANGED
@@ -1,48 +1,48 @@
1
- export type { RoleImport, Condition, Statement, AccessPolicyDocument, ApiKey, UserPermission, Role, RoleInput, User } from './auth-schemas.ts';
2
- export type { ProjectSchemaUpdate } from './migration/types.ts';
1
+ export * from './agents.ts';
2
+ export * from './api-version.ts';
3
+ export type { AccessPolicyDocument, ApiKey, Condition, Role, RoleImport, RoleInput, Statement, User, UserPermission } from './auth-schemas.ts';
4
+ export * from './builtin-schema.ts';
5
+ export * from './constants.ts';
3
6
  export * from './content-schema-transform.ts';
7
+ export * from './create-input-schema.ts';
8
+ export * from './enum.ts';
9
+ export * from './flatten-templates.ts';
4
10
  export * from './get-is-leaf.ts';
5
- export * from './project-schema/index.ts';
6
- export * from './project-schema/migrate.ts';
7
- export * from './schema-util.ts';
8
- export * from './template-shapes/index.ts';
9
- export * from './taxonomies.ts';
10
- export * from './workflows.ts';
11
- export * from './api-version.ts';
11
+ export * from './interfaces.ts';
12
12
  export * from './migration/index.ts';
13
- export * from './validate/validate.ts';
14
- export * from './validate/errors.ts';
15
- export * from './builtin-schema.ts';
16
- export * from './versions.ts';
13
+ export type { ProjectSchemaUpdate } from './migration/types.ts';
17
14
  export * from './mocks.ts';
18
- export * from './scalars.ts';
19
- export * from './refs.ts';
20
- export * from './unions.ts';
21
- export * from './enum.ts';
22
15
  export * from './patterns.ts';
23
- export * from './types/transforms.ts';
24
- export * from './types/types.ts';
25
- export * from './types/utils.ts';
26
- export * from './flatten-templates.ts';
16
+ export * from './project-schema/index.ts';
17
+ export * from './project-schema/migrate.ts';
18
+ export * from './refs.ts';
27
19
  export * from './relationships.ts';
28
- export * from './create-input-schema.ts';
20
+ export * from './runtime-schema.ts';
21
+ export * from './scalars.ts';
29
22
  export * from './schema-transform.ts';
30
- export * from './interfaces.ts';
31
- export * from './agents.ts';
23
+ export * from './schema-util.ts';
24
+ export * from './service-dependencies.ts';
32
25
  export * from './services/services.ts';
33
- export * from './services/util.ts';
34
26
  export * from './services/types.ts';
35
- export * from './util/api-indexing.ts';
36
- export * from './util/form-config.ts';
27
+ export * from './services/util.ts';
28
+ export * from './taxonomies.ts';
29
+ export * from './template-shapes/index.ts';
30
+ export * from './types/transforms.ts';
31
+ export * from './types/types.ts';
32
+ export * from './types/utils.ts';
33
+ export * from './unions.ts';
37
34
  export * from './util/ai-tools.ts';
35
+ export * from './util/api-indexing.ts';
38
36
  export * from './util/detect-cycles.ts';
39
37
  export * from './util/find-shape-at-path.ts';
38
+ export * from './util/form-config.ts';
40
39
  export * from './util/get-conflicting-properties.ts';
41
40
  export * from './util/get-return-shape.ts';
42
41
  export * from './util/has-arg.ts';
43
42
  export * from './util/merge.ts';
44
43
  export * from './util/patch-schema.ts';
45
44
  export * from './util/shapes.ts';
46
- export * from './constants.ts';
47
- export * from './runtime-schema.ts';
48
- export * from './service-dependencies.ts';
45
+ export * from './validate/errors.ts';
46
+ export * from './validate/validate.ts';
47
+ export * from './versions.ts';
48
+ export * from './workflows.ts';
package/dist/index.js CHANGED
@@ -1,46 +1,46 @@
1
+ export * from "./agents.js";
2
+ export * from "./api-version.js";
3
+ export * from "./builtin-schema.js";
4
+ export * from "./constants.js";
1
5
  export * from "./content-schema-transform.js";
6
+ export * from "./create-input-schema.js";
7
+ export * from "./enum.js";
8
+ export * from "./flatten-templates.js";
2
9
  export * from "./get-is-leaf.js";
3
- export * from "./project-schema/index.js";
4
- export * from "./project-schema/migrate.js";
5
- export * from "./schema-util.js";
6
- export * from "./template-shapes/index.js";
7
- export * from "./taxonomies.js";
8
- export * from "./workflows.js";
9
- export * from "./api-version.js";
10
+ export * from "./interfaces.js";
10
11
  export * from "./migration/index.js";
11
- export * from "./validate/validate.js";
12
- export * from "./validate/errors.js";
13
- export * from "./builtin-schema.js";
14
- export * from "./versions.js";
15
12
  export * from "./mocks.js";
16
- export * from "./scalars.js";
17
- export * from "./refs.js";
18
- export * from "./unions.js";
19
- export * from "./enum.js";
20
13
  export * from "./patterns.js";
21
- export * from "./types/transforms.js";
22
- export * from "./types/types.js";
23
- export * from "./types/utils.js";
24
- export * from "./flatten-templates.js";
14
+ export * from "./project-schema/index.js";
15
+ export * from "./project-schema/migrate.js";
16
+ export * from "./refs.js";
25
17
  export * from "./relationships.js";
26
- export * from "./create-input-schema.js";
18
+ export * from "./runtime-schema.js";
19
+ export * from "./scalars.js";
27
20
  export * from "./schema-transform.js";
28
- export * from "./interfaces.js";
29
- export * from "./agents.js";
21
+ export * from "./schema-util.js";
22
+ export * from "./service-dependencies.js";
30
23
  export * from "./services/services.js";
31
- export * from "./services/util.js";
32
24
  export * from "./services/types.js";
33
- export * from "./util/api-indexing.js";
34
- export * from "./util/form-config.js";
25
+ export * from "./services/util.js";
26
+ export * from "./taxonomies.js";
27
+ export * from "./template-shapes/index.js";
28
+ export * from "./types/transforms.js";
29
+ export * from "./types/types.js";
30
+ export * from "./types/utils.js";
31
+ export * from "./unions.js";
35
32
  export * from "./util/ai-tools.js";
33
+ export * from "./util/api-indexing.js";
36
34
  export * from "./util/detect-cycles.js";
37
35
  export * from "./util/find-shape-at-path.js";
36
+ export * from "./util/form-config.js";
38
37
  export * from "./util/get-conflicting-properties.js";
39
38
  export * from "./util/get-return-shape.js";
40
39
  export * from "./util/has-arg.js";
41
40
  export * from "./util/merge.js";
42
41
  export * from "./util/patch-schema.js";
43
42
  export * from "./util/shapes.js";
44
- export * from "./constants.js";
45
- export * from "./runtime-schema.js";
46
- export * from "./service-dependencies.js";
43
+ export * from "./validate/errors.js";
44
+ export * from "./validate/validate.js";
45
+ export * from "./versions.js";
46
+ export * from "./workflows.js";
@@ -1,5 +1,5 @@
1
- import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
3
3
  import { ProjectSchema } from "../project-schema.js";
4
4
  import { QueryModel } from "../query.js";
5
5
  import { ServiceConfig } from "../service.js";
@@ -1,5 +1,5 @@
1
- import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
3
3
  import { ProjectSchema } from "../project-schema.js";
4
4
  import { QueryModel } from "../query.js";
5
5
  const projectSchema = shopifySchemaJson;
@@ -1,5 +1,5 @@
1
- import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
3
3
  import { ProjectSchema } from "../project-schema.js";
4
4
  import { ServiceConfig } from "../service.js";
5
5
  const projectSchema = shopifySchemaJson;
@@ -1,5 +1,5 @@
1
- import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
3
3
  import { ProjectSchema } from "../project-schema.js";
4
4
  import { ShapeModel } from "../shape.js";
5
5
  const projectSchema = shopifySchemaJson;
@@ -1,5 +1,5 @@
1
- import blogSchema from '@/examples/latest/blog-schema.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import blogSchema from '@/examples/latest/blog-schema.json';
3
3
  import { isValidTemplate, resolveTemplate } from "../index.js";
4
4
  describe('resolveTemplate', () => {
5
5
  test('success', () => {
@@ -1,7 +1,7 @@
1
- import massiveSchemaJson from '@/examples/latest/massive-schema.json';
2
- import millSchemaJson from '@/examples/latest/mill-components-schema.json';
3
1
  import { DEFAULT_ENTITLEMENTS } from '@takeshape/util';
4
2
  import { expect, test } from 'vitest';
3
+ import massiveSchemaJson from '@/examples/latest/massive-schema.json';
4
+ import millSchemaJson from '@/examples/latest/mill-components-schema.json';
5
5
  import { createMockSchema } from "../../mocks.js";
6
6
  import { isEqualRelationship } from "../../relationships.js";
7
7
  import { applyDefaultsToSchema } from "../../schema-util.js";
@@ -1,6 +1,6 @@
1
1
  import type { ObjectSchema, PropertySchema, ShapeJSON } from '../project-schema/index.ts';
2
- import { TemplateVerbs } from './types.ts';
3
2
  import type { ResolvedTemplate, TemplateContext } from './types.ts';
3
+ import { TemplateVerbs } from './types.ts';
4
4
  export declare const TSGetArgs: (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
5
5
  export declare const TSGetSingletonArgs: (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
6
6
  export declare const TSListArgs: (context: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
@@ -1,3 +1,3 @@
1
+ export type * from './transforms.ts';
1
2
  export * from './types.ts';
2
3
  export * from './utils.ts';
3
- export type * from './transforms.ts';
@@ -1,7 +1,7 @@
1
1
  import type { Maybe } from '@takeshape/util';
2
- import type { AIGenerateTextResolver, AIResolverName, AgentExecution, AgentExecutionChat, AgentExecutionGenerate, AllOfSchema, AnyServiceConfig, AwsLambdaResolver, BasicAuthentication, BasicResolver, BearerAuthentication, ComposeResolver, CustomAuthentication, DirectiveConfig, DirectiveMappingArray, DirectiveMappingMap, ExtendsSchema, GoogleAuthentication, GraphqlResolver, OAuth2Authentication, OAuth2BearerAuthentication, ObjectSchema, OneOfSchema, ParameterOp, ParameterOpMapping, ParameterOpNested, ParameterOpOp, ParameterOpValue, ParameterSerializeContentOptions, ParameterSerializeOptions, ParameterSerializeStyleOptions, ParameterSerializeStyleOptionsForPathParams, ParameterSerializeStyleOptionsForSearchParams, ProjectSchemaJSON, PropertySchema, RefSchema, RefSchemaLegacy, Resolver, RestResolver, ReturnShape, ReturnShapeArraySchema, SearchParamsAuthentication, ServiceAuthentication, ServiceResolver, ShapeJSON, ShapeMap, ShapeSchemaEnum, ShapedbResolver, TakeshapeResolver, UtilResolver } from '../project-schema/index.ts';
3
- import { ArgsType, RefType } from './types.ts';
2
+ import type { AgentExecution, AgentExecutionChat, AgentExecutionGenerate, AIGenerateTextResolver, AIResolverName, AllOfSchema, AnyServiceConfig, AwsLambdaResolver, BasicAuthentication, BasicResolver, BearerAuthentication, ComposeResolver, CustomAuthentication, DirectiveConfig, DirectiveMappingArray, DirectiveMappingMap, ExtendsSchema, GoogleAuthentication, GraphqlResolver, OAuth2Authentication, OAuth2BearerAuthentication, ObjectSchema, OneOfSchema, ParameterOp, ParameterOpMapping, ParameterOpNested, ParameterOpOp, ParameterOpValue, ParameterSerializeContentOptions, ParameterSerializeOptions, ParameterSerializeStyleOptions, ParameterSerializeStyleOptionsForPathParams, ParameterSerializeStyleOptionsForSearchParams, ProjectSchemaJSON, PropertySchema, RefSchema, RefSchemaLegacy, Resolver, RestResolver, ReturnShape, ReturnShapeArraySchema, SearchParamsAuthentication, ServiceAuthentication, ServiceResolver, ShapedbResolver, ShapeJSON, ShapeMap, ShapeSchemaEnum, TakeshapeResolver, UtilResolver } from '../project-schema/index.ts';
4
3
  import type { CachedShape, EncryptedServiceConfig, GraphQLServiceConfig, LatestProjectSchemaWithServices, MeshShape, OpenAPIServiceConfig, PropertySchemaWithRelationship, RESTServiceConfig, SchemaWithArgs, SchemaWithRef, ServiceConfigWithCustomAuthentication, ServiceConfigWithOAuth2Authentication, ShopifyServiceConfig } from './types.ts';
4
+ import { ArgsType, RefType } from './types.ts';
5
5
  /** Resolver Type Utils **/
6
6
  /**
7
7
  * Only tests that the shape is right, not that the name is correct. That's a job for the validator.
@@ -1,5 +1,5 @@
1
- import shopifySchemaJson from '@/examples/latest/shopify-product-2023-04.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import shopifySchemaJson from '@/examples/latest/shopify-product-2023-04.json';
3
3
  import { getListQueryIndexConfigs, serviceHasIndexedShapes } from "../api-indexing.js";
4
4
  function mockShopifySchemaWithIndexing(shape) {
5
5
  return {
@@ -1,5 +1,5 @@
1
- import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
2
1
  import { expect, test } from 'vitest';
2
+ import shopifySchemaJson from '@/examples/latest/shopify-store-with-widget.json';
3
3
  import { createMockSchema } from "../../mocks.js";
4
4
  import { hasCycle } from "../detect-cycles.js";
5
5
  const shopifySchema = shopifySchemaJson;
@@ -1,6 +1,6 @@
1
+ import { describe, expect, test } from 'vitest';
1
2
  import shopifySchema from '@/examples/latest/pruned-shopify-product-schema.json';
2
3
  import shapeBooksSchemaJson from '@/examples/latest/shape-books.json';
3
- import { describe, expect, test } from 'vitest';
4
4
  import { flattenTemplates } from "../../flatten-templates.js";
5
5
  import { applyDefaultsToSchema } from "../../schema-util.js";
6
6
  import { findSchemaAtPath, findShapeAtPath } from "../find-shape-at-path.js";
@@ -1,5 +1,5 @@
1
- import shopifySchema from '@/examples/latest/pruned-shopify-product-schema.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import shopifySchema from '@/examples/latest/pruned-shopify-product-schema.json';
3
3
  import { getReturnShape } from "../get-return-shape.js";
4
4
  describe('getReturnShape', () => {
5
5
  test('query', () => {
@@ -1,5 +1,5 @@
1
- import shopifySchema from '@/examples/latest/pruned-shopify-product-schema.json';
2
1
  import { describe, expect, test } from 'vitest';
2
+ import shopifySchema from '@/examples/latest/pruned-shopify-product-schema.json';
3
3
  import { createMockSchema } from "../../mocks.js";
4
4
  import { createShape } from "../../schema-util.js";
5
5
  import { hasArg } from "../has-arg.js";
@@ -1,7 +1,7 @@
1
- import shopifyStoreJson from '@/examples/latest/shopify-store-with-widget.json';
2
1
  import omit from 'lodash/omit.js';
3
2
  import set from 'lodash/set.js';
4
3
  import { describe, expect, test } from 'vitest';
4
+ import shopifyStoreJson from '@/examples/latest/shopify-store-with-widget.json';
5
5
  import { applyDefaultsToSchema } from "../../schema-util.js";
6
6
  import { patchSchema } from "../patch-schema.js";
7
7
  const shopifyStoreSchema = applyDefaultsToSchema(shopifyStoreJson);
@@ -1,6 +1,6 @@
1
- import postSchemaJson from '@/examples/latest/post-schema.json';
2
1
  import { deepClone } from '@takeshape/util';
3
2
  import { describe, expect, test } from 'vitest';
3
+ import postSchemaJson from '@/examples/latest/post-schema.json';
4
4
  import { ensureShape, ensureShapeById } from "../shapes.js";
5
5
  function getPostSchema() {
6
6
  return deepClone(postSchemaJson);
@@ -1,3 +1,3 @@
1
- import type { AIToolConfig, AgentToolConfig } from '../project-schema/latest.ts';
1
+ import type { AgentToolConfig, AIToolConfig } from '../project-schema/latest.ts';
2
2
  export declare function getToolRef(tool: Pick<AIToolConfig, 'ref'> | string): string;
3
3
  export declare function normalizeToolConfig(tool: AIToolConfig | AgentToolConfig | string): AIToolConfig | AgentToolConfig;
@@ -68,9 +68,7 @@
68
68
  "description": "Time at which the character was created in the database."
69
69
  }
70
70
  },
71
- "required": [
72
- "episode"
73
- ]
71
+ "required": ["episode"]
74
72
  }
75
73
  },
76
74
  "Rick_Location": {
@@ -116,9 +114,7 @@
116
114
  "description": "Time at which the location was created in the database."
117
115
  }
118
116
  },
119
- "required": [
120
- "residents"
121
- ]
117
+ "required": ["residents"]
122
118
  }
123
119
  },
124
120
  "Rick_Episode": {
@@ -164,9 +160,7 @@
164
160
  "description": "Time at which the episode was created in the database."
165
161
  }
166
162
  },
167
- "required": [
168
- "characters"
169
- ]
163
+ "required": ["characters"]
170
164
  }
171
165
  },
172
166
  "Rick_FilterCharacter": {
@@ -361,10 +355,7 @@
361
355
  "id": "Rick_CacheControlScope",
362
356
  "description": "",
363
357
  "schema": {
364
- "enum": [
365
- "PUBLIC",
366
- "PRIVATE"
367
- ]
358
+ "enum": ["PUBLIC", "PRIVATE"]
368
359
  }
369
360
  }
370
361
  },
@@ -383,9 +374,7 @@
383
374
  "@tag": "id"
384
375
  }
385
376
  },
386
- "required": [
387
- "id"
388
- ]
377
+ "required": ["id"]
389
378
  },
390
379
  "shape": "Rick_Character"
391
380
  },
@@ -425,9 +414,7 @@
425
414
  }
426
415
  }
427
416
  },
428
- "required": [
429
- "ids"
430
- ]
417
+ "required": ["ids"]
431
418
  },
432
419
  "shape": {
433
420
  "type": "array",
@@ -450,9 +437,7 @@
450
437
  "@tag": "id"
451
438
  }
452
439
  },
453
- "required": [
454
- "id"
455
- ]
440
+ "required": ["id"]
456
441
  },
457
442
  "shape": "Rick_Location"
458
443
  },
@@ -492,9 +477,7 @@
492
477
  }
493
478
  }
494
479
  },
495
- "required": [
496
- "ids"
497
- ]
480
+ "required": ["ids"]
498
481
  },
499
482
  "shape": {
500
483
  "type": "array",
@@ -517,9 +500,7 @@
517
500
  "@tag": "id"
518
501
  }
519
502
  },
520
- "required": [
521
- "id"
522
- ]
503
+ "required": ["id"]
523
504
  },
524
505
  "shape": "Rick_Episode"
525
506
  },
@@ -559,9 +540,7 @@
559
540
  }
560
541
  }
561
542
  },
562
- "required": [
563
- "ids"
564
- ]
543
+ "required": ["ids"]
565
544
  },
566
545
  "shape": {
567
546
  "type": "array",
@@ -573,4 +552,4 @@
573
552
  },
574
553
  "mutations": {},
575
554
  "schemaVersion": "3.52.0"
576
- }
555
+ }