@nexo-labs/payload-taxonomies 1.6.14 → 1.6.16

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.
@@ -0,0 +1,6 @@
1
+ //#region src/constants.ts
2
+ const COLLECTION_SLUG_TAXONOMY = "taxonomy";
3
+
4
+ //#endregion
5
+ export { COLLECTION_SLUG_TAXONOMY as t };
6
+ //# sourceMappingURL=constants-ahxpHht8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-ahxpHht8.mjs","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const COLLECTION_SLUG_TAXONOMY = \"taxonomy\" as const;\n"],"mappings":";AAAA,MAAa,2BAA2B"}
@@ -0,0 +1,5 @@
1
+ //#region src/constants.d.ts
2
+ declare const COLLECTION_SLUG_TAXONOMY: "taxonomy";
3
+ //#endregion
4
+ export { COLLECTION_SLUG_TAXONOMY as t };
5
+ //# sourceMappingURL=constants-kRdUz1Qx.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-kRdUz1Qx.d.mts","names":[],"sources":["../src/constants.ts"],"sourcesContent":[],"mappings":";cAAa"}
@@ -0,0 +1,2 @@
1
+ import { t as COLLECTION_SLUG_TAXONOMY } from "./constants-kRdUz1Qx.mjs";
2
+ export { COLLECTION_SLUG_TAXONOMY };
@@ -0,0 +1,3 @@
1
+ import { t as COLLECTION_SLUG_TAXONOMY } from "./constants-ahxpHht8.mjs";
2
+
3
+ export { COLLECTION_SLUG_TAXONOMY };
package/dist/index.d.mts CHANGED
@@ -1,13 +1,11 @@
1
+ import { t as COLLECTION_SLUG_TAXONOMY } from "./constants-kRdUz1Qx.mjs";
1
2
  import { CollectionConfig, DefaultValue, Field, FilterOptions } from "payload";
2
3
 
3
- //#region src/constants.d.ts
4
- declare const COLLECTION_SLUG_TAXONOMY: "taxonomy";
5
- //#endregion
6
4
  //#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
5
+
7
6
  // ==================================================================================================
8
7
  // JSON Schema Draft 04
9
8
  // ==================================================================================================
10
-
11
9
  /**
12
10
  * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
13
11
  */
@@ -1 +1 @@
1
- {"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/constants.ts","../../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts","../src/taxonomy.ts","../src/taxonomiesRelationshipFields.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":";;;cAAa;;;;;;;;;;ACODA,KAAAA,mBAAAA,GAaAC,QAAAA,CAAAA;AAAAA,EASKC,QAAAA,GAMAC,SAAAA,GAeLE,SAAAA,GAMKC,QAAAA,GAGHD,OAAAA,GAkBAJ,MAAAA,GAoBkBK,KAAAA;;;;AAoEXA,KAjJTL,eAAAA,GAgKSK,MAAAA,CAAAA;AAAAA,EAGAA,MAAAA,GAYVL,OAAAA,GA3KLC,iBAgLKF,GA/KLG,gBA+K2BH,GAErBM,IAAAA;;AAGFA,UAhLOJ,iBAAAA,CAgLPI;EAAW,CAAA,GAAA,EAAA,MAAA,CAAA,EA/KFL,eA+KE;;;AC5MsC;AAIlC,UD8BRE,gBAAAA,SAAyBC,KC9BjB,CD8BuBH,eC9BvB,CAAA,CAAA,CAAA;;;AAIzB;;;;;;;;;ACT6D;AAW7D;KFuCYI,kBAAAA;;;;;UAMKC,WAAAA;;;YAGHD;;;;;;;;;;;;;;;;;YAkBAJ;;;;;;;;;;;;;;;;;;;;8BAoBkBK;;;;;;;;;;;;;;;;;;;;;UAqBpBA,cAAcA;;;;;;;;;;;;;;;;;;;;;;;;;;mCA2BWA;;iBAGhBA;;;;;;;;;;;;;;;;;iBAiBAA;;;;;;;;;;;;;;;iBAeAA;;;iBAGAA;;;;;;;;;;;;SAYVL;;;;;SAKAD,sBAAsBA;UAErBM;UACAA;UACAA;QACFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KC1ML,wBAAA;EFHQ,uBAAA,CAAA,EEIe,KFJ+B,CAAA,CAAA,IAAA,EAAA;gBEKlC;QAAkB;;ADE/BN,cCEC,oBDFkB,EAAA,CAAA,MAAA,ECGrB,ODHqB,CCGb,gBDHa,CAAA,GCGO,wBDHP,EAAA,GCI1B,gBDJ0B;;;UEJrB,mCAAA;;EHHG,KAAA,CAAA,EAAA,MAAA;kBGMK;iBACD;;AFAjB;AAaYC,cETC,yBFaPC,EAAAA,CAAAA,KACgB,CAAhBC,EEd2C,mCFc3B,EAAA,GEdmE,KFcnE"}
1
+ {"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":["../../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts","../src/taxonomy.ts","../src/taxonomiesRelationshipFields.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":[0],"mappings":";;;;;;;;AAOA;AAaA;AASA;AAMiBG,KA5BLH,mBAAAA,GA2CAK,QAAAA,CAAAA;AAAAA,EAMKC,QAAAA,GAGHD,SAAAA,GAkBAJ,SAAAA,GAoBkBK,QAAAA,GAqBpBA,OAAAA,GAAcA,MAAAA,GA2BWA,KAAAA;;;;AAkD1BL,KA/KCA,eAAAA,GAoLDD,MAAAA,CAAAA;AAAAA,EAAsBA,MAAAA,GAErBM,OAAAA,GAlLNJ,iBAmLMI,GAlLNH,gBAmLMG,GACFA,IAAAA;;UAhLOJ,iBAAAA;iBACED;AC7BwC;;;AAG1B,UD+BhBE,gBAAAA,SAAyBC,KC/BT,CD+BeH,eC/Bf,CAAA,CAAA,CAAA;;;;;;;;;ACJ4B;AAW7D;;;;KFuCYI,kBAAAA;;;;;UAMKC,WAAAA;;;YAGHD;;;;;;;;;;;;;;;;;YAkBAJ;;;;;;;;;;;;;;;;;;;;8BAoBkBK;;;;;;;;;;;;;;;;;;;;;UAqBpBA,cAAcA;;;;;;;;;;;;;;;;;;;;;;;;;;mCA2BWA;;iBAGhBA;;;;;;;;;;;;;;;;;iBAiBAA;;;;;;;;;;;;;;;iBAeAA;;;iBAGAA;;;;;;;;;;;;SAYVL;;;;;SAKAD,sBAAsBA;UAErBM;UACAA;UACAA;QACFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KC1ML,wBAAA;4BACuB;IDGhBN,UAAAA,ECFa,WDEM;EAanBC,CAAAA,EAAAA,GCf+B,WDe/BA,CAAe;AAS3B,CAAA;AAMiBE,cC1BJ,oBD0BmCF,EAAAA,CAAAA,MAAAA,ECzBtC,ODyBqC,CCzB7B,gBDyB6B,CAAA,GCzBT,wBDyBS,EAAA,GCxB1C,gBDwB0C;;;UEhCrC,mCAAA;;;EFIED,aAAAA,CAAAA,EEDM,aFCa;EAanBC,YAAAA,CAAAA,EEbK,YFaU;EASVC,QAAAA,CAAAA,EAAAA,OAAAA;AAMjB;AAeYG,cEvCC,yBFuCiB,EAAA,CAAA,KAAA,CAAA,EEvCmB,mCFuCnB,EAAA,GEvC2D,KFuC3D"}
package/dist/index.mjs CHANGED
@@ -1,9 +1,6 @@
1
+ import { t as COLLECTION_SLUG_TAXONOMY } from "./constants-ahxpHht8.mjs";
1
2
  import { slugField } from "payload";
2
3
 
3
- //#region src/constants.ts
4
- const COLLECTION_SLUG_TAXONOMY = "taxonomy";
5
-
6
- //#endregion
7
4
  //#region src/taxonomy.ts
8
5
  const taxonomiesCollection = ({ payloadTypescriptSchema, ...config }) => ({
9
6
  ...config,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["taxonomiesCollection: (\n config: Partial<CollectionConfig> & TaxonomyTypescriptSchema\n) => CollectionConfig","buildTaxonomyRelationship: (field?: BuildTaxonomyRelationshipFieldProps) => Field"],"sources":["../src/constants.ts","../src/taxonomy.ts","../src/taxonomiesRelationshipFields.ts"],"sourcesContent":["export const COLLECTION_SLUG_TAXONOMY = \"taxonomy\" as const;\n","import { JSONSchema4 } from \"json-schema\";\nimport { slugField, type CollectionConfig } from \"payload\";\nimport { COLLECTION_SLUG_TAXONOMY } from \"./constants.js\";\ntype TaxonomyTypescriptSchema = {\n payloadTypescriptSchema?: Array<\n (args: { jsonSchema: JSONSchema4 }) => JSONSchema4\n >;\n};\n\nexport const taxonomiesCollection: (\n config: Partial<CollectionConfig> & TaxonomyTypescriptSchema\n) => CollectionConfig = ({ payloadTypescriptSchema, ...config }) => ({\n ...config,\n slug: COLLECTION_SLUG_TAXONOMY,\n labels: {\n singular: \"Taxonomia\",\n plural: \"Taxonomias\",\n ...config.labels,\n },\n admin: {\n useAsTitle: \"name\",\n group: \"Contenido\",\n defaultColumns: [\"name\", \"parent\", \"payload\"],\n ...config.admin,\n },\n fields: [\n {\n name: \"name\",\n label: \"Nombre\",\n type: \"text\",\n localized: true,\n required: true,\n },\n slugField({useAsSlug: 'name'}),\n {\n name: \"payload\",\n label: \"Payload Adicional\",\n type: \"json\",\n required: false,\n typescriptSchema: payloadTypescriptSchema,\n admin: {\n description: \"Metadata: types, permissions, selectable, etc.\",\n },\n },\n ...(config.fields ?? []),\n ],\n});\n","import { DefaultValue, Field, FilterOptions } from \"payload\";\nimport { COLLECTION_SLUG_TAXONOMY } from \"./constants.js\";\n\ninterface BuildTaxonomyRelationshipFieldProps {\n name?: string\n label?: string\n filterOptions?: FilterOptions\n defaultValue?: DefaultValue\n required?: boolean\n}\n\nexport const buildTaxonomyRelationship: (field?: BuildTaxonomyRelationshipFieldProps) => Field = (field) => ({\n name: field?.name ?? \"categories\",\n label: field?.label ?? \"Categorías\",\n type: \"relationship\",\n defaultValue: field?.defaultValue ?? [],\n filterOptions: field?.filterOptions,\n required: field?.required ?? false,\n hasMany: true,\n relationTo: COLLECTION_SLUG_TAXONOMY,\n});\n"],"mappings":";;;AAAA,MAAa,2BAA2B;;;;ACSxC,MAAaA,wBAEY,EAAE,yBAAyB,GAAG,cAAc;CACnE,GAAG;CACH,MAAM;CACN,QAAQ;EACN,UAAU;EACV,QAAQ;EACR,GAAG,OAAO;EACX;CACD,OAAO;EACL,YAAY;EACZ,OAAO;EACP,gBAAgB;GAAC;GAAQ;GAAU;GAAU;EAC7C,GAAG,OAAO;EACX;CACD,QAAQ;EACN;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,WAAW;GACX,UAAU;GACX;EACD,UAAU,EAAC,WAAW,QAAO,CAAC;EAC9B;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,UAAU;GACV,kBAAkB;GAClB,OAAO,EACL,aAAa,kDACd;GACF;EACD,GAAI,OAAO,UAAU,EAAE;EACxB;CACF;;;;ACnCD,MAAaC,6BAAqF,WAAW;CAC3G,MAAM,OAAO,QAAQ;CACrB,OAAO,OAAO,SAAS;CACvB,MAAM;CACN,cAAc,OAAO,gBAAgB,EAAE;CACvC,eAAe,OAAO;CACtB,UAAU,OAAO,YAAY;CAC7B,SAAS;CACT,YAAY;CACb"}
1
+ {"version":3,"file":"index.mjs","names":["taxonomiesCollection: (\n config: Partial<CollectionConfig> & TaxonomyTypescriptSchema\n) => CollectionConfig","buildTaxonomyRelationship: (field?: BuildTaxonomyRelationshipFieldProps) => Field"],"sources":["../src/taxonomy.ts","../src/taxonomiesRelationshipFields.ts"],"sourcesContent":["import { JSONSchema4 } from \"json-schema\";\nimport { slugField, type CollectionConfig } from \"payload\";\nimport { COLLECTION_SLUG_TAXONOMY } from \"./constants.js\";\ntype TaxonomyTypescriptSchema = {\n payloadTypescriptSchema?: Array<\n (args: { jsonSchema: JSONSchema4 }) => JSONSchema4\n >;\n};\n\nexport const taxonomiesCollection: (\n config: Partial<CollectionConfig> & TaxonomyTypescriptSchema\n) => CollectionConfig = ({ payloadTypescriptSchema, ...config }) => ({\n ...config,\n slug: COLLECTION_SLUG_TAXONOMY,\n labels: {\n singular: \"Taxonomia\",\n plural: \"Taxonomias\",\n ...config.labels,\n },\n admin: {\n useAsTitle: \"name\",\n group: \"Contenido\",\n defaultColumns: [\"name\", \"parent\", \"payload\"],\n ...config.admin,\n },\n fields: [\n {\n name: \"name\",\n label: \"Nombre\",\n type: \"text\",\n localized: true,\n required: true,\n },\n slugField({useAsSlug: 'name'}),\n {\n name: \"payload\",\n label: \"Payload Adicional\",\n type: \"json\",\n required: false,\n typescriptSchema: payloadTypescriptSchema,\n admin: {\n description: \"Metadata: types, permissions, selectable, etc.\",\n },\n },\n ...(config.fields ?? []),\n ],\n});\n","import { DefaultValue, Field, FilterOptions } from \"payload\";\nimport { COLLECTION_SLUG_TAXONOMY } from \"./constants.js\";\n\ninterface BuildTaxonomyRelationshipFieldProps {\n name?: string\n label?: string\n filterOptions?: FilterOptions\n defaultValue?: DefaultValue\n required?: boolean\n}\n\nexport const buildTaxonomyRelationship: (field?: BuildTaxonomyRelationshipFieldProps) => Field = (field) => ({\n name: field?.name ?? \"categories\",\n label: field?.label ?? \"Categorías\",\n type: \"relationship\",\n defaultValue: field?.defaultValue ?? [],\n filterOptions: field?.filterOptions,\n required: field?.required ?? false,\n hasMany: true,\n relationTo: COLLECTION_SLUG_TAXONOMY,\n});\n"],"mappings":";;;;AASA,MAAaA,wBAEY,EAAE,yBAAyB,GAAG,cAAc;CACnE,GAAG;CACH,MAAM;CACN,QAAQ;EACN,UAAU;EACV,QAAQ;EACR,GAAG,OAAO;EACX;CACD,OAAO;EACL,YAAY;EACZ,OAAO;EACP,gBAAgB;GAAC;GAAQ;GAAU;GAAU;EAC7C,GAAG,OAAO;EACX;CACD,QAAQ;EACN;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,WAAW;GACX,UAAU;GACX;EACD,UAAU,EAAC,WAAW,QAAO,CAAC;EAC9B;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,UAAU;GACV,kBAAkB;GAClB,OAAO,EACL,aAAa,kDACd;GACF;EACD,GAAI,OAAO,UAAU,EAAE;EACxB;CACF;;;;ACnCD,MAAaC,6BAAqF,WAAW;CAC3G,MAAM,OAAO,QAAQ;CACrB,OAAO,OAAO,SAAS;CACvB,MAAM;CACN,cAAc,OAAO,gBAAgB,EAAE;CACvC,eAAe,OAAO;CACtB,UAAU,OAAO,YAAY;CAC7B,SAAS;CACT,YAAY;CACb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexo-labs/payload-taxonomies",
3
- "version": "1.6.14",
3
+ "version": "1.6.16",
4
4
  "description": "Taxonomies for Payload CMS",
5
5
  "keywords": [
6
6
  "payload-cms",