@mastra/schema-compat 1.3.11-alpha.0 → 1.3.11-alpha.1

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 (88) hide show
  1. package/dist/_types/@internal_ai-sdk-v4/dist/index.d.ts +1 -1
  2. package/dist/_types/@internal_ai-sdk-v4/package.json +1 -0
  3. package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +1 -1
  4. package/dist/_types/@internal_ai-sdk-v5/package.json +1 -0
  5. package/dist/_types/@internal_ai-v6/dist/index.d.ts +1 -1
  6. package/dist/_types/@internal_ai-v6/package.json +1 -0
  7. package/dist/_types/@standard-schema_spec/package.json +1 -0
  8. package/dist/_types/@types_json-schema/package.json +1 -0
  9. package/dist/_types/ajv/dist/ajv.d.ts +18 -0
  10. package/dist/_types/ajv/dist/compile/codegen/code.d.ts +40 -0
  11. package/dist/_types/ajv/dist/compile/codegen/index.d.ts +79 -0
  12. package/dist/_types/ajv/dist/compile/codegen/scope.d.ts +79 -0
  13. package/dist/_types/ajv/dist/compile/errors.d.ts +13 -0
  14. package/dist/_types/ajv/dist/compile/index.d.ts +80 -0
  15. package/dist/_types/ajv/dist/compile/ref_error.d.ts +6 -0
  16. package/dist/_types/ajv/dist/compile/resolve.d.ts +12 -0
  17. package/dist/_types/ajv/dist/compile/rules.d.ts +28 -0
  18. package/dist/_types/ajv/dist/compile/util.d.ts +40 -0
  19. package/dist/_types/ajv/dist/compile/validate/dataType.d.ts +17 -0
  20. package/dist/_types/ajv/dist/compile/validate/index.d.ts +42 -0
  21. package/dist/_types/ajv/dist/compile/validate/subschema.d.ts +47 -0
  22. package/dist/_types/ajv/dist/core.d.ts +174 -0
  23. package/dist/_types/ajv/dist/runtime/validation_error.d.ts +7 -0
  24. package/dist/_types/ajv/dist/types/index.d.ts +183 -0
  25. package/dist/_types/ajv/dist/types/json-schema.d.ts +125 -0
  26. package/dist/_types/ajv/dist/types/jtd-schema.d.ts +174 -0
  27. package/dist/_types/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
  28. package/dist/_types/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
  29. package/dist/_types/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
  30. package/dist/_types/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
  31. package/dist/_types/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
  32. package/dist/_types/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
  33. package/dist/_types/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
  34. package/dist/_types/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
  35. package/dist/_types/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
  36. package/dist/_types/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
  37. package/dist/_types/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
  38. package/dist/_types/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
  39. package/dist/_types/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
  40. package/dist/_types/ajv/dist/vocabularies/errors.d.ts +9 -0
  41. package/dist/_types/ajv/dist/vocabularies/format/format.d.ts +8 -0
  42. package/dist/_types/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
  43. package/dist/_types/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
  44. package/dist/_types/ajv/dist/vocabularies/validation/const.d.ts +6 -0
  45. package/dist/_types/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
  46. package/dist/_types/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
  47. package/dist/_types/ajv/dist/vocabularies/validation/index.d.ts +16 -0
  48. package/dist/_types/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
  49. package/dist/_types/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
  50. package/dist/_types/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
  51. package/dist/_types/ajv/dist/vocabularies/validation/required.d.ts +8 -0
  52. package/dist/_types/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
  53. package/dist/_types/ajv/package.json +1 -0
  54. package/dist/_types/fast-uri/package.json +1 -0
  55. package/dist/_types/fast-uri/types/index.d.ts +60 -0
  56. package/dist/index.cjs +2 -1
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.js +2 -1
  59. package/dist/index.js.map +1 -1
  60. package/dist/json-schema/utils.d.ts +1 -1
  61. package/dist/{json-schema-C7Uhaeop.cjs → json-schema-8xkiEZVb.cjs} +3 -3
  62. package/dist/{json-schema-C7Uhaeop.cjs.map → json-schema-8xkiEZVb.cjs.map} +1 -1
  63. package/dist/{json-schema-BKit3LVN.js → json-schema-DaHLYDhg.js} +3 -3
  64. package/dist/{json-schema-BKit3LVN.js.map → json-schema-DaHLYDhg.js.map} +1 -1
  65. package/dist/json-schema.d.ts +3 -3
  66. package/dist/provider-compats/anthropic.d.ts +2 -2
  67. package/dist/provider-compats/deepseek.d.ts +2 -2
  68. package/dist/provider-compats/google.d.ts +1 -1
  69. package/dist/provider-compats/google.d.ts.map +1 -1
  70. package/dist/provider-compats/meta.d.ts +2 -2
  71. package/dist/provider-compats/openai.d.ts +1 -1
  72. package/dist/{schema-D_ikovK6.js → schema-BwlBcZRB.js} +2 -2
  73. package/dist/{schema-D_ikovK6.js.map → schema-BwlBcZRB.js.map} +1 -1
  74. package/dist/{schema-5p36X0wR.cjs → schema-D35TsNfD.cjs} +2 -2
  75. package/dist/{schema-5p36X0wR.cjs.map → schema-D35TsNfD.cjs.map} +1 -1
  76. package/dist/schema.cjs +1 -1
  77. package/dist/schema.js +1 -1
  78. package/dist/schema.types.d.ts +4 -4
  79. package/dist/standard-schema/adapters/ai-sdk.d.ts +2 -2
  80. package/dist/standard-schema/adapters/json-schema.cjs +1 -1
  81. package/dist/standard-schema/adapters/json-schema.d.ts +2 -2
  82. package/dist/standard-schema/adapters/json-schema.d.ts.map +1 -1
  83. package/dist/standard-schema/adapters/json-schema.js +1 -1
  84. package/dist/standard-schema/adapters/zod-v4.d.ts +1 -1
  85. package/dist/standard-schema/standard-schema.d.ts +2 -2
  86. package/dist/standard-schema/standard-schema.types.d.ts +1 -1
  87. package/dist/zod-to-json.d.ts +1 -1
  88. package/package.json +3 -3
@@ -0,0 +1,4 @@
1
+ import type { CodeKeywordDefinition, ErrorNoParams, AnySchema } from "../../types";
2
+ export type AnyOfError = ErrorNoParams<"anyOf", AnySchema[]>;
3
+ declare const def: CodeKeywordDefinition;
4
+ export default def;
@@ -0,0 +1,7 @@
1
+ import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
2
+ export type ContainsError = ErrorObject<"contains", {
3
+ minContains: number;
4
+ maxContains?: number;
5
+ }, AnySchema>;
6
+ declare const def: CodeKeywordDefinition;
7
+ export default def;
@@ -0,0 +1,21 @@
1
+ import type { CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition, SchemaMap, AnySchema } from "../../types";
2
+ import type { KeywordCxt } from "../../compile/validate";
3
+ export type PropertyDependencies = {
4
+ [K in string]?: string[];
5
+ };
6
+ export interface DependenciesErrorParams {
7
+ property: string;
8
+ missingProperty: string;
9
+ depsCount: number;
10
+ deps: string;
11
+ }
12
+ export type DependenciesError = ErrorObject<"dependencies", DependenciesErrorParams, {
13
+ [K in string]?: string[] | AnySchema;
14
+ }>;
15
+ export declare const error: KeywordErrorDefinition;
16
+ declare const def: CodeKeywordDefinition;
17
+ export declare function validatePropertyDeps(cxt: KeywordCxt, propertyDeps?: {
18
+ [K in string]?: string[];
19
+ }): void;
20
+ export declare function validateSchemaDeps(cxt: KeywordCxt, schemaDeps?: SchemaMap): void;
21
+ export default def;
@@ -0,0 +1,6 @@
1
+ import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
2
+ export type IfKeywordError = ErrorObject<"if", {
3
+ failingKeyword: string;
4
+ }, AnySchema>;
5
+ declare const def: CodeKeywordDefinition;
6
+ export default def;
@@ -0,0 +1,13 @@
1
+ import type { ErrorNoParams, Vocabulary } from "../../types";
2
+ import { AdditionalItemsError } from "./additionalItems";
3
+ import { ItemsError } from "./items2020";
4
+ import { ContainsError } from "./contains";
5
+ import { DependenciesError } from "./dependencies";
6
+ import { PropertyNamesError } from "./propertyNames";
7
+ import { AdditionalPropertiesError } from "./additionalProperties";
8
+ import { NotKeywordError } from "./not";
9
+ import { AnyOfError } from "./anyOf";
10
+ import { OneOfError } from "./oneOf";
11
+ import { IfKeywordError } from "./if";
12
+ export default function getApplicator(draft2020?: boolean): Vocabulary;
13
+ export type ApplicatorKeywordError = ErrorNoParams<"false schema"> | AdditionalItemsError | ItemsError | ContainsError | AdditionalPropertiesError | DependenciesError | IfKeywordError | AnyOfError | OneOfError | NotKeywordError | PropertyNamesError;
@@ -0,0 +1,6 @@
1
+ import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
2
+ export type ItemsError = ErrorObject<"items", {
3
+ limit: number;
4
+ }, AnySchema>;
5
+ declare const def: CodeKeywordDefinition;
6
+ export default def;
@@ -0,0 +1,4 @@
1
+ import type { CodeKeywordDefinition, ErrorNoParams, AnySchema } from "../../types";
2
+ export type NotKeywordError = ErrorNoParams<"not", AnySchema>;
3
+ declare const def: CodeKeywordDefinition;
4
+ export default def;
@@ -0,0 +1,6 @@
1
+ import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
2
+ export type OneOfError = ErrorObject<"oneOf", {
3
+ passingSchemas: [number, number] | null;
4
+ }, AnySchema[]>;
5
+ declare const def: CodeKeywordDefinition;
6
+ export default def;
@@ -0,0 +1,6 @@
1
+ import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
2
+ export type PropertyNamesError = ErrorObject<"propertyNames", {
3
+ propertyName: string;
4
+ }, AnySchema>;
5
+ declare const def: CodeKeywordDefinition;
6
+ export default def;
@@ -0,0 +1,5 @@
1
+ import type { CodeKeywordDefinition } from "../../types";
2
+ import { DiscrError, DiscrErrorObj } from "../discriminator/types";
3
+ export type DiscriminatorError = DiscrErrorObj<DiscrError.Tag> | DiscrErrorObj<DiscrError.Mapping>;
4
+ declare const def: CodeKeywordDefinition;
5
+ export default def;
@@ -0,0 +1,10 @@
1
+ import type { ErrorObject } from "../../types";
2
+ export declare enum DiscrError {
3
+ Tag = "tag",
4
+ Mapping = "mapping"
5
+ }
6
+ export type DiscrErrorObj<E extends DiscrError> = ErrorObject<"discriminator", {
7
+ error: E;
8
+ tag: string;
9
+ tagValue: unknown;
10
+ }, string>;
@@ -0,0 +1,9 @@
1
+ import type { TypeError } from "../compile/validate/dataType";
2
+ import type { ApplicatorKeywordError } from "./applicator";
3
+ import type { ValidationKeywordError } from "./validation";
4
+ import type { FormatError } from "./format/format";
5
+ import type { UnevaluatedPropertiesError } from "./unevaluated/unevaluatedProperties";
6
+ import type { UnevaluatedItemsError } from "./unevaluated/unevaluatedItems";
7
+ import type { DependentRequiredError } from "./validation/dependentRequired";
8
+ import type { DiscriminatorError } from "./discriminator";
9
+ export type DefinedError = TypeError | ApplicatorKeywordError | ValidationKeywordError | FormatError | UnevaluatedPropertiesError | UnevaluatedItemsError | DependentRequiredError | DiscriminatorError;
@@ -0,0 +1,8 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ export type FormatError = ErrorObject<"format", {
3
+ format: string;
4
+ }, string | {
5
+ $data: string;
6
+ }>;
7
+ declare const def: CodeKeywordDefinition;
8
+ export default def;
@@ -0,0 +1,6 @@
1
+ import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
2
+ export type UnevaluatedItemsError = ErrorObject<"unevaluatedItems", {
3
+ limit: number;
4
+ }, AnySchema>;
5
+ declare const def: CodeKeywordDefinition;
6
+ export default def;
@@ -0,0 +1,6 @@
1
+ import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types";
2
+ export type UnevaluatedPropertiesError = ErrorObject<"unevaluatedProperties", {
3
+ unevaluatedProperty: string;
4
+ }, AnySchema>;
5
+ declare const def: CodeKeywordDefinition;
6
+ export default def;
@@ -0,0 +1,6 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ export type ConstError = ErrorObject<"const", {
3
+ allowedValue: any;
4
+ }>;
5
+ declare const def: CodeKeywordDefinition;
6
+ export default def;
@@ -0,0 +1,5 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ import { DependenciesErrorParams, PropertyDependencies } from "../applicator/dependencies";
3
+ export type DependentRequiredError = ErrorObject<"dependentRequired", DependenciesErrorParams, PropertyDependencies>;
4
+ declare const def: CodeKeywordDefinition;
5
+ export default def;
@@ -0,0 +1,8 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ export type EnumError = ErrorObject<"enum", {
3
+ allowedValues: any[];
4
+ }, any[] | {
5
+ $data: string;
6
+ }>;
7
+ declare const def: CodeKeywordDefinition;
8
+ export default def;
@@ -0,0 +1,16 @@
1
+ import type { ErrorObject, Vocabulary } from "../../types";
2
+ import { LimitNumberError } from "./limitNumber";
3
+ import { MultipleOfError } from "./multipleOf";
4
+ import { PatternError } from "./pattern";
5
+ import { RequiredError } from "./required";
6
+ import { UniqueItemsError } from "./uniqueItems";
7
+ import { ConstError } from "./const";
8
+ import { EnumError } from "./enum";
9
+ declare const validation: Vocabulary;
10
+ export default validation;
11
+ type LimitError = ErrorObject<"maxItems" | "minItems" | "minProperties" | "maxProperties" | "minLength" | "maxLength", {
12
+ limit: number;
13
+ }, number | {
14
+ $data: string;
15
+ }>;
16
+ export type ValidationKeywordError = LimitError | LimitNumberError | MultipleOfError | PatternError | RequiredError | UniqueItemsError | ConstError | EnumError;
@@ -0,0 +1,11 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ type Kwd = "maximum" | "minimum" | "exclusiveMaximum" | "exclusiveMinimum";
3
+ type Comparison = "<=" | ">=" | "<" | ">";
4
+ export type LimitNumberError = ErrorObject<Kwd, {
5
+ limit: number;
6
+ comparison: Comparison;
7
+ }, number | {
8
+ $data: string;
9
+ }>;
10
+ declare const def: CodeKeywordDefinition;
11
+ export default def;
@@ -0,0 +1,8 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ export type MultipleOfError = ErrorObject<"multipleOf", {
3
+ multipleOf: number;
4
+ }, number | {
5
+ $data: string;
6
+ }>;
7
+ declare const def: CodeKeywordDefinition;
8
+ export default def;
@@ -0,0 +1,8 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ export type PatternError = ErrorObject<"pattern", {
3
+ pattern: string;
4
+ }, string | {
5
+ $data: string;
6
+ }>;
7
+ declare const def: CodeKeywordDefinition;
8
+ export default def;
@@ -0,0 +1,8 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ export type RequiredError = ErrorObject<"required", {
3
+ missingProperty: string;
4
+ }, string[] | {
5
+ $data: string;
6
+ }>;
7
+ declare const def: CodeKeywordDefinition;
8
+ export default def;
@@ -0,0 +1,9 @@
1
+ import type { CodeKeywordDefinition, ErrorObject } from "../../types";
2
+ export type UniqueItemsError = ErrorObject<"uniqueItems", {
3
+ i: number;
4
+ j: number;
5
+ }, boolean | {
6
+ $data: string;
7
+ }>;
8
+ declare const def: CodeKeywordDefinition;
9
+ export default def;
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,60 @@
1
+ type FastUri = typeof fastUri
2
+
3
+ declare namespace fastUri {
4
+ export interface URIComponent {
5
+ scheme?: string;
6
+ userinfo?: string;
7
+ host?: string;
8
+ port?: number | string;
9
+ path?: string;
10
+ query?: string;
11
+ fragment?: string;
12
+ reference?: string;
13
+ nid?: string;
14
+ nss?: string;
15
+ resourceName?: string;
16
+ secure?: boolean;
17
+ uuid?: string;
18
+ error?: string;
19
+ }
20
+ export interface Options {
21
+ scheme?: string;
22
+ reference?: string;
23
+ unicodeSupport?: boolean;
24
+ domainHost?: boolean;
25
+ absolutePath?: boolean;
26
+ tolerant?: boolean;
27
+ skipEscape?: boolean;
28
+ nid?: string;
29
+ }
30
+
31
+ /**
32
+ * @deprecated Use Options instead
33
+ */
34
+ export type options = Options
35
+ /**
36
+ * @deprecated Use URIComponent instead
37
+ */
38
+ export type URIComponents = URIComponent
39
+
40
+ export function normalize (uri: string, opts?: Options): string
41
+ export function normalize (uri: URIComponent, opts?: Options): URIComponent
42
+ export function normalize (uri: any, opts?: Options): any
43
+
44
+ export function resolve (baseURI: string, relativeURI: string, options?: Options): string
45
+
46
+ export function resolveComponent (base: URIComponent, relative: URIComponent, options?: Options, skipNormalization?: boolean): URIComponent
47
+
48
+ export function parse (uri: string, opts?: Options): URIComponent
49
+
50
+ export function serialize (component: URIComponent, opts?: Options): string
51
+
52
+ export function equal (uriA: string, uriB: string): boolean
53
+
54
+ export function resolve (base: string, path: string): string
55
+
56
+ export const fastUri: FastUri
57
+ export { fastUri as default }
58
+ }
59
+
60
+ export = fastUri
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_json_schema_traverse$1 = require("./json-schema-traverse-DbuWNYgg.cjs");
3
3
  const require_zod_to_json = require("./zod-to-json.cjs");
4
- const require_schema = require("./schema-5p36X0wR.cjs");
4
+ const require_schema = require("./schema-D35TsNfD.cjs");
5
5
  let zod_v3 = require("zod/v3");
6
6
  let zod = require("zod");
7
7
  let zod_from_json_schema = require("zod-from-json-schema");
@@ -6058,6 +6058,7 @@ var GoogleSchemaCompatLayer = class extends SchemaCompatLayer {
6058
6058
  return "jsonSchema7";
6059
6059
  }
6060
6060
  shouldApply() {
6061
+ if (this.getModel().modelId.includes("claude")) return false;
6061
6062
  return this.getModel().provider.includes("google") || this.getModel().modelId.includes("gemini-") || this.getModel().modelId.includes("google");
6062
6063
  }
6063
6064
  processZodType(value) {