UNPKG

@nexo-labs/payload-taxonomies

Version:
1 lines 31.2 kB
{"version":3,"file":"index.d.mts","names":["JSONSchema4TypeName","JSONSchema4Type","JSONSchema4Object","JSONSchema4Array","Array","JSONSchema4Version","JSONSchema4","JSONSchema6TypeName","JSONSchema6Type","JSONSchema6Object","JSONSchema6Array","JSONSchema6Version","JSONSchema6Definition","JSONSchema6","JSONSchema7TypeName","JSONSchema7Type","JSONSchema7Object","JSONSchema7Array","JSONSchema7Version","JSONSchema7Definition","JSONSchema7","ValidationResult","ValidationError","validate","checkPropertyChange","mustBeValid"],"sources":["../src/taxonomiesRelationshipFields.ts","../../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts","../src/taxonomy.ts"],"sourcesContent":["// ==================================================================================================\n// JSON Schema Draft 04\n// ==================================================================================================\n\n/**\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1\n */\nexport type JSONSchema4TypeName =\n | \"string\" //\n | \"number\"\n | \"integer\"\n | \"boolean\"\n | \"object\"\n | \"array\"\n | \"null\"\n | \"any\";\n\n/**\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5\n */\nexport type JSONSchema4Type =\n | string //\n | number\n | boolean\n | JSONSchema4Object\n | JSONSchema4Array\n | null;\n\n// Workaround for infinite type recursion\nexport interface JSONSchema4Object {\n [key: string]: JSONSchema4Type;\n}\n\n// Workaround for infinite type recursion\n// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540\nexport interface JSONSchema4Array extends Array<JSONSchema4Type> {}\n\n/**\n * Meta schema\n *\n * Recommended values:\n * - 'http://json-schema.org/schema#'\n * - 'http://json-schema.org/hyper-schema#'\n * - 'http://json-schema.org/draft-04/schema#'\n * - 'http://json-schema.org/draft-04/hyper-schema#'\n * - 'http://json-schema.org/draft-03/schema#'\n * - 'http://json-schema.org/draft-03/hyper-schema#'\n *\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5\n */\nexport type JSONSchema4Version = string;\n\n/**\n * JSON Schema V4\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-04\n */\nexport interface JSONSchema4 {\n id?: string | undefined;\n $ref?: string | undefined;\n $schema?: JSONSchema4Version | undefined;\n\n /**\n * This attribute is a string that provides a short description of the\n * instance property.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21\n */\n title?: string | undefined;\n\n /**\n * This attribute is a string that provides a full description of the of\n * purpose the instance property.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22\n */\n description?: string | undefined;\n\n default?: JSONSchema4Type | undefined;\n multipleOf?: number | undefined;\n maximum?: number | undefined;\n exclusiveMaximum?: boolean | undefined;\n minimum?: number | undefined;\n exclusiveMinimum?: boolean | undefined;\n maxLength?: number | undefined;\n minLength?: number | undefined;\n pattern?: string | undefined;\n\n /**\n * May only be defined when \"items\" is defined, and is a tuple of JSONSchemas.\n *\n * This provides a definition for additional items in an array instance\n * when tuple definitions of the items is provided. This can be false\n * to indicate additional items in the array are not allowed, or it can\n * be a schema that defines the schema of the additional items.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6\n */\n additionalItems?: boolean | JSONSchema4 | undefined;\n\n /**\n * This attribute defines the allowed items in an instance array, and\n * MUST be a schema or an array of schemas. The default value is an\n * empty schema which allows any value for items in the instance array.\n *\n * When this attribute value is a schema and the instance value is an\n * array, then all the items in the array MUST be valid according to the\n * schema.\n *\n * When this attribute value is an array of schemas and the instance\n * value is an array, each position in the instance array MUST conform\n * to the schema in the corresponding position for this array. This\n * called tuple typing. When tuple typing is used, additional items are\n * allowed, disallowed, or constrained by the \"additionalItems\"\n * (Section 5.6) attribute using the same rules as\n * \"additionalProperties\" (Section 5.4) for objects.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5\n */\n items?: JSONSchema4 | JSONSchema4[] | undefined;\n\n maxItems?: number | undefined;\n minItems?: number | undefined;\n uniqueItems?: boolean | undefined;\n maxProperties?: number | undefined;\n minProperties?: number | undefined;\n\n /**\n * This attribute indicates if the instance must have a value, and not\n * be undefined. This is false by default, making the instance\n * optional.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7\n */\n required?: boolean | string[] | undefined;\n\n /**\n * This attribute defines a schema for all properties that are not\n * explicitly defined in an object type definition. If specified, the\n * value MUST be a schema or a boolean. If false is provided, no\n * additional properties are allowed beyond the properties defined in\n * the schema. The default value is an empty schema which allows any\n * value for additional properties.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4\n */\n additionalProperties?: boolean | JSONSchema4 | undefined;\n\n definitions?: {\n [k: string]: JSONSchema4;\n } | undefined;\n\n /**\n * This attribute is an object with property definitions that define the\n * valid values of instance object property values. When the instance\n * value is an object, the property values of the instance object MUST\n * conform to the property definitions in this object. In this object,\n * each property definition's value MUST be a schema, and the property's\n * name MUST be the name of the instance property that it defines. The\n * instance property value MUST be valid according to the schema from\n * the property definition. Properties are considered unordered, the\n * order of the instance properties MAY be in any order.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2\n */\n properties?: {\n [k: string]: JSONSchema4;\n } | undefined;\n\n /**\n * This attribute is an object that defines the schema for a set of\n * property names of an object instance. The name of each property of\n * this attribute's object is a regular expression pattern in the ECMA\n * 262/Perl 5 format, while the value is a schema. If the pattern\n * matches the name of a property on the instance object, the value of\n * the instance's property MUST be valid against the pattern name's\n * schema value.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3\n */\n patternProperties?: {\n [k: string]: JSONSchema4;\n } | undefined;\n dependencies?: {\n [k: string]: JSONSchema4 | string[];\n } | undefined;\n\n /**\n * This provides an enumeration of all possible values that are valid\n * for the instance property. This MUST be an array, and each item in\n * the array represents a possible value for the instance value. If\n * this attribute is defined, the instance value MUST be one of the\n * values in the array in order for the schema to be valid.\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19\n */\n enum?: JSONSchema4Type[] | undefined;\n\n /**\n * A single type, or a union of simple types\n */\n type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;\n\n allOf?: JSONSchema4[] | undefined;\n anyOf?: JSONSchema4[] | undefined;\n oneOf?: JSONSchema4[] | undefined;\n not?: JSONSchema4 | undefined;\n\n /**\n * The value of this property MUST be another schema which will provide\n * a base schema which the current schema will inherit from. The\n * inheritance rules are such that any instance that is valid according\n * to the current schema MUST be valid according to the referenced\n * schema. This MAY also be an array, in which case, the instance MUST\n * be valid for all the schemas in the array. A schema that extends\n * another schema MAY define additional attributes, constrain existing\n * attributes, or add other constraints.\n *\n * Conceptually, the behavior of extends can be seen as validating an\n * instance against all constraints in the extending schema as well as\n * the extended schema(s).\n *\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26\n */\n extends?: string | string[] | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6\n */\n [k: string]: any;\n\n format?: string | undefined;\n}\n\n// ==================================================================================================\n// JSON Schema Draft 06\n// ==================================================================================================\n\nexport type JSONSchema6TypeName =\n | \"string\" //\n | \"number\"\n | \"integer\"\n | \"boolean\"\n | \"object\"\n | \"array\"\n | \"null\"\n | \"any\";\n\nexport type JSONSchema6Type =\n | string //\n | number\n | boolean\n | JSONSchema6Object\n | JSONSchema6Array\n | null;\n\n// Workaround for infinite type recursion\nexport interface JSONSchema6Object {\n [key: string]: JSONSchema6Type;\n}\n\n// Workaround for infinite type recursion\n// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540\nexport interface JSONSchema6Array extends Array<JSONSchema6Type> {}\n\n/**\n * Meta schema\n *\n * Recommended values:\n * - 'http://json-schema.org/schema#'\n * - 'http://json-schema.org/hyper-schema#'\n * - 'http://json-schema.org/draft-06/schema#'\n * - 'http://json-schema.org/draft-06/hyper-schema#'\n *\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5\n */\nexport type JSONSchema6Version = string;\n\n/**\n * JSON Schema V6\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01\n */\nexport type JSONSchema6Definition = JSONSchema6 | boolean;\nexport interface JSONSchema6 {\n $id?: string | undefined;\n $ref?: string | undefined;\n $schema?: JSONSchema6Version | undefined;\n\n /**\n * Must be strictly greater than 0.\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.1\n */\n multipleOf?: number | undefined;\n\n /**\n * Representing an inclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is less than or exactly equal to \"maximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.2\n */\n maximum?: number | undefined;\n\n /**\n * Representing an exclusive upper limit for a numeric instance.\n * This keyword validates only if the instance is strictly less than (not equal to) to \"exclusiveMaximum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.3\n */\n exclusiveMaximum?: number | undefined;\n\n /**\n * Representing an inclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is greater than or exactly equal to \"minimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.4\n */\n minimum?: number | undefined;\n\n /**\n * Representing an exclusive lower limit for a numeric instance.\n * This keyword validates only if the instance is strictly greater than (not equal to) to \"exclusiveMinimum\".\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.5\n */\n exclusiveMinimum?: number | undefined;\n\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.6\n */\n maxLength?: number | undefined;\n\n /**\n * Must be a non-negative integer.\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.7\n */\n minLength?: number | undefined;\n\n /**\n * Should be a valid regular expression, according to the ECMA 262 regular expression dialect.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.8\n */\n pattern?: string | undefined;\n\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.9\n */\n items?: JSONSchema6Definition | JSONSchema6Definition[] | undefined;\n\n /**\n * This keyword determines how child instances validate for arrays, and does not directly validate the immediate instance itself.\n * If \"items\" is an array of schemas, validation succeeds if every instance element\n * at a position greater than the size of \"items\" validates against \"additionalItems\".\n * Otherwise, \"additionalItems\" MUST be ignored, as the \"items\" schema\n * (possibly the default value of an empty schema) is applied to all elements.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.10\n */\n additionalItems?: JSONSchema6Definition | undefined;\n\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.11\n */\n maxItems?: number | undefined;\n\n /**\n * Must be a non-negative integer.\n * An array instance is valid against \"maxItems\" if its size is greater than, or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.12\n */\n minItems?: number | undefined;\n\n /**\n * If this keyword has boolean value false, the instance validates successfully.\n * If it has boolean value true, the instance validates successfully if all of its elements are unique.\n * Omitting this keyword has the same behavior as a value of false.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.13\n */\n uniqueItems?: boolean | undefined;\n\n /**\n * An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.14\n */\n contains?: JSONSchema6Definition | undefined;\n\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is less than, or equal to, the value of this keyword.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.15\n */\n maxProperties?: number | undefined;\n\n /**\n * Must be a non-negative integer.\n * An object instance is valid against \"maxProperties\" if its number of properties is greater than,\n * or equal to, the value of this keyword.\n * Omitting this keyword has the same behavior as a value of 0.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.16\n */\n minProperties?: number | undefined;\n\n /**\n * Elements of this array must be unique.\n * An object instance is valid against this keyword if every item in the array is the name of a property in the instance.\n * Omitting this keyword has the same behavior as an empty array.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.17\n */\n required?: string[] | undefined;\n\n /**\n * This keyword determines how child instances validate for objects, and does not directly validate the immediate instance itself.\n * Validation succeeds if, for each name that appears in both the instance and as a name within this keyword's value,\n * the child instance for that name successfully validates against the corresponding schema.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.18\n */\n properties?: {\n [k: string]: JSONSchema6Definition;\n } | undefined;\n\n /**\n * This attribute is an object that defines the schema for a set of property names of an object instance.\n * The name of each property of this attribute's object is a regular expression pattern in the ECMA 262, while the value is a schema.\n * If the pattern matches the name of a property on the instance object, the value of the instance's property\n * MUST be valid against the pattern name's schema value.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.19\n */\n patternProperties?: {\n [k: string]: JSONSchema6Definition;\n } | undefined;\n\n /**\n * This attribute defines a schema for all properties that are not explicitly defined in an object type definition.\n * If specified, the value MUST be a schema or a boolean.\n * If false is provided, no additional properties are allowed beyond the properties defined in the schema.\n * The default value is an empty schema which allows any value for additional properties.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.20\n */\n additionalProperties?: JSONSchema6Definition | undefined;\n\n /**\n * This keyword specifies rules that are evaluated if the instance is an object and contains a certain property.\n * Each property specifies a dependency.\n * If the dependency value is an array, each element in the array must be unique.\n * Omitting this keyword has the same behavior as an empty object.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.21\n */\n dependencies?: {\n [k: string]: JSONSchema6Definition | string[];\n } | undefined;\n\n /**\n * Takes a schema which validates the names of all properties rather than their values.\n * Note the property name that the schema is testing will always be a string.\n * Omitting this keyword has the same behavior as an empty schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.22\n */\n propertyNames?: JSONSchema6Definition | undefined;\n\n /**\n * This provides an enumeration of all possible values that are valid\n * for the instance property. This MUST be an array, and each item in\n * the array represents a possible value for the instance value. If\n * this attribute is defined, the instance value MUST be one of the\n * values in the array in order for the schema to be valid.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.23\n */\n enum?: JSONSchema6Type[] | undefined;\n\n /**\n * More readable form of a one-element \"enum\"\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.24\n */\n const?: JSONSchema6Type | undefined;\n\n /**\n * A single type, or a union of simple types\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.25\n */\n type?: JSONSchema6TypeName | JSONSchema6TypeName[] | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\n allOf?: JSONSchema6Definition[] | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\n anyOf?: JSONSchema6Definition[] | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\n oneOf?: JSONSchema6Definition[] | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29\n */\n not?: JSONSchema6Definition | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1\n */\n definitions?: {\n [k: string]: JSONSchema6Definition;\n } | undefined;\n\n /**\n * This attribute is a string that provides a short description of the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n title?: string | undefined;\n\n /**\n * This attribute is a string that provides a full description of the of purpose the instance property.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.2\n */\n description?: string | undefined;\n\n /**\n * This keyword can be used to supply a default JSON value associated with a particular schema.\n * It is RECOMMENDED that a default value be valid against the associated schema.\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.3\n */\n default?: JSONSchema6Type | undefined;\n\n /**\n * Array of examples with no validation effect the value of \"default\" is usable as an example without repeating it under this keyword\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.4\n */\n examples?: JSONSchema6Type[] | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8\n */\n format?: string | undefined;\n}\n\n// ==================================================================================================\n// JSON Schema Draft 07\n// ==================================================================================================\n// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01\n// --------------------------------------------------------------------------------------------------\n\n/**\n * Primitive type\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1\n */\nexport type JSONSchema7TypeName =\n | \"string\" //\n | \"number\"\n | \"integer\"\n | \"boolean\"\n | \"object\"\n | \"array\"\n | \"null\";\n\n/**\n * Primitive type\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1\n */\nexport type JSONSchema7Type =\n | string //\n | number\n | boolean\n | JSONSchema7Object\n | JSONSchema7Array\n | null;\n\n// Workaround for infinite type recursion\nexport interface JSONSchema7Object {\n [key: string]: JSONSchema7Type;\n}\n\n// Workaround for infinite type recursion\n// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540\nexport interface JSONSchema7Array extends Array<JSONSchema7Type> {}\n\n/**\n * Meta schema\n *\n * Recommended values:\n * - 'http://json-schema.org/schema#'\n * - 'http://json-schema.org/hyper-schema#'\n * - 'http://json-schema.org/draft-07/schema#'\n * - 'http://json-schema.org/draft-07/hyper-schema#'\n *\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5\n */\nexport type JSONSchema7Version = string;\n\n/**\n * JSON Schema v7\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01\n */\nexport type JSONSchema7Definition = JSONSchema7 | boolean;\nexport interface JSONSchema7 {\n $id?: string | undefined;\n $ref?: string | undefined;\n $schema?: JSONSchema7Version | undefined;\n $comment?: string | undefined;\n\n /**\n * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4\n * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A\n */\n $defs?: {\n [key: string]: JSONSchema7Definition;\n } | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1\n */\n type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;\n enum?: JSONSchema7Type[] | undefined;\n const?: JSONSchema7Type | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2\n */\n multipleOf?: number | undefined;\n maximum?: number | undefined;\n exclusiveMaximum?: number | undefined;\n minimum?: number | undefined;\n exclusiveMinimum?: number | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3\n */\n maxLength?: number | undefined;\n minLength?: number | undefined;\n pattern?: string | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4\n */\n items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;\n additionalItems?: JSONSchema7Definition | undefined;\n maxItems?: number | undefined;\n minItems?: number | undefined;\n uniqueItems?: boolean | undefined;\n contains?: JSONSchema7Definition | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5\n */\n maxProperties?: number | undefined;\n minProperties?: number | undefined;\n required?: string[] | undefined;\n properties?: {\n [key: string]: JSONSchema7Definition;\n } | undefined;\n patternProperties?: {\n [key: string]: JSONSchema7Definition;\n } | undefined;\n additionalProperties?: JSONSchema7Definition | undefined;\n dependencies?: {\n [key: string]: JSONSchema7Definition | string[];\n } | undefined;\n propertyNames?: JSONSchema7Definition | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6\n */\n if?: JSONSchema7Definition | undefined;\n then?: JSONSchema7Definition | undefined;\n else?: JSONSchema7Definition | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7\n */\n allOf?: JSONSchema7Definition[] | undefined;\n anyOf?: JSONSchema7Definition[] | undefined;\n oneOf?: JSONSchema7Definition[] | undefined;\n not?: JSONSchema7Definition | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7\n */\n format?: string | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8\n */\n contentMediaType?: string | undefined;\n contentEncoding?: string | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9\n */\n definitions?: {\n [key: string]: JSONSchema7Definition;\n } | undefined;\n\n /**\n * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10\n */\n title?: string | undefined;\n description?: string | undefined;\n default?: JSONSchema7Type | undefined;\n readOnly?: boolean | undefined;\n writeOnly?: boolean | undefined;\n examples?: JSONSchema7Type | undefined;\n}\n\nexport interface ValidationResult {\n valid: boolean;\n errors: ValidationError[];\n}\n\nexport interface ValidationError {\n property: string;\n message: string;\n}\n\n/**\n * To use the validator call JSONSchema.validate with an instance object and an optional schema object.\n * If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),\n * that schema will be used to validate and the schema parameter is not necessary (if both exist,\n * both validations will occur).\n */\nexport function validate(instance: {}, schema: JSONSchema4 | JSONSchema6 | JSONSchema7): ValidationResult;\n\n/**\n * The checkPropertyChange method will check to see if an value can legally be in property with the given schema\n * This is slightly different than the validate method in that it will fail if the schema is readonly and it will\n * not check for self-validation, it is assumed that the passed in value is already internally valid.\n */\nexport function checkPropertyChange(\n value: any,\n schema: JSONSchema4 | JSONSchema6 | JSONSchema7,\n property: string,\n): ValidationResult;\n\n/**\n * This checks to ensure that the result is valid and will throw an appropriate error message if it is not.\n */\nexport function mustBeValid(result: ValidationResult): void;\n"],"x_google_ignoreList":[1],"mappings":";;;;UAGU,mCAAA;;;EAAA,aAAA,CAAA,EAGQ,aAHR;EAQG,YAAA,CAAA,EAJI,YAIJ;;;cAAA,oCAAoC,wCAAwC;;;;;;;AAXxB;AAWjE;;KCJYA,mBAAAA;EAAAA,QAAAA,GAaAC,SAAAA,GASKC,SAAAA,GAMAC,QAAAA,GAeLE,OAAAA,GAMKC,MAAAA,GAGHD,KAAAA;;;;AAsFuBC,KA7HzBL,eAAAA,GAgISK,MAAAA,CAAAA;AAAAA,EAiBAA,MAAAA,GAeAA,OAAAA,GA5JfJ,iBA+JeI,GA9JfH,gBA0KKF,GAKAD,IAAAA;;AAGCM,UA9KKJ,iBAAAA,CA8KLI;EACAA,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EA9KOL,eA8KPK;;;;UAzKKH,gBAAAA,SAAyBC,MAAMH;;;;;AC3BhD;;;;;;;;;KD0CYI,kBAAAA;;;;;UAMKC,WAAAA;;;YAGHD;;;;;;;;;;;;;;;;;YAkBAJ;;;;;;;;;;;;;;;;;;;;8BAoBkBK;;;;;;;;;;;;;;;;;;;;;UAqBpBA,cAAcA;;;;;;;;;;;;;;;;;;;;;;;;;;mCA2BWA;;iBAGhBA;;;;;;;;;;;;;;;;;iBAiBAA;;;;;;;;;;;;;;;iBAeAA;;;iBAGAA;;;;;;;;;;;;SAYVL;;;;;SAKAD,sBAAsBA;UAErBM;UACAA;UACAA;QACFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCzML,wBAAA;4BACuB;IFFlB,UAAA,EEE6C,WFF7C;EAQG,CAAA,EAAA,GEN4D,WFM5D,CAAA;;cEHA,+BAA+B,QAAQ,oBAAoB,6BAA6B"}