{"version":3,"file":"definitions-B0Cl_CQD.cjs","sources":["../src/private/data_types.ts"],"sourcesContent":["/*\n|--------------------------------------------------------------------------\n| Column Data Types\n|--------------------------------------------------------------------------\n|\n| Classes which are used to define the data types of columns in\n| Lucid models that have been extended with the Resourceful mixin.\n|\n| Based on OpenAPI 3.0 Specifications found at:\n| https://swagger.io/docs/specification/v3_0/data-models/data-types/\n*/\n\nimport { E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS } from '@nhtio/lucid-resourceful/errors'\nimport {\n  ResourcefulStringTypeSchema,\n  ResourcefulDateTypeSchema,\n  ResourcefulDateTimeTypeSchema,\n  ResourcefulBinaryTypeSchema,\n  ResourcefulNumberTypeSchema,\n  ResourcefulIntegerTypeSchema,\n  ResourcefulBigintTypeSchema,\n  ResourcefulUnsignedIntegerTypeSchema,\n  ResourcefulBooleanTypeSchema,\n  ResourcefulObjectTypeSchema,\n  ResourcefulArrayTypeSchema,\n} from './data_type_schemas'\nimport type { ObjectSchema } from '@nhtio/validation'\n\n/**\n * Base interface for all Resourceful data type options.\n * Includes common modifier properties that apply to all data types.\n */\nexport interface BaseInterface {\n  /** Whether the value can be null */\n  nullable?: boolean\n  /** Whether the property is read-only (not included in create/update operations) */\n  readOnly?: boolean\n  /** Whether the property is write-only (not included in response serialization) */\n  writeOnly?: boolean\n}\n\n/**\n * Base type constraint for abstract constructor functions used in data type generation.\n */\nexport type BaseClass = abstract new (...args: any[]) => any\n\n/**\n * A hybrid type that represents a constructor function which can be called both with and without the `new` keyword.\n * This type enables creating data type classes that work as both constructors and factory functions.\n *\n * @typeParam ClassConstructorOptions - The interface defining the constructor options for the class\n * @typeParam C - The abstract constructor type constraint\n */\nexport type CallableNewable<\n  ClassConstructorOptions extends BaseInterface,\n  C extends BaseClass = BaseClass,\n> = {\n  readonly schema: ObjectSchema<ClassConstructorOptions>\n  new (...args: ConstructorParameters<C>): InstanceType<C>\n} & { (...args: ConstructorParameters<C>): InstanceType<C> } & { prototype: InstanceType<C> }\n\nconst generateResourcefulDataTypeClass = <\n  ClassConstructorOptions extends BaseInterface,\n  C extends BaseClass = BaseClass,\n>(\n  name: string,\n  type: string,\n  resolver: () => ObjectSchema<ClassConstructorOptions>,\n  staticDefinitions: { [key: string]: any } = {}\n): CallableNewable<ClassConstructorOptions, C> => {\n  const schema = resolver()\n  const Base = class {\n    declare static readonly schema: ObjectSchema<ClassConstructorOptions>\n    constructor(options: Partial<ClassConstructorOptions> = {}) {\n      const { error, value } = schema.validate(options, {\n        abortEarly: false,\n        convert: true,\n        allowUnknown: false,\n      })\n      if (error) {\n        throw new E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS(name, error)\n      }\n      Object.defineProperty(this, 'type', {\n        value: type,\n        writable: false,\n        enumerable: true,\n        configurable: false,\n      })\n      Object.entries(value).forEach(([key, val]) => {\n        Object.defineProperty(this, key, {\n          value: val,\n          writable: false,\n          enumerable: true,\n          configurable: false,\n        })\n      })\n      Object.entries(staticDefinitions).forEach(([key, val]) => {\n        Object.defineProperty(this, key, {\n          value: val,\n          writable: false,\n          enumerable: true,\n          configurable: false,\n        })\n      })\n    }\n\n    get [Symbol.toStringTag]() {\n      return JSON.stringify(this)\n    }\n\n    toString(): string {\n      return JSON.stringify(this)\n    }\n\n    // toObject(): { [key: string]: any } {\n    //   const ret: { [key: string]: any } = {\n    //     type,\n    //   }\n    //   for (const key of Object.getOwnPropertyNames(this)) {\n    //     if (key !== 'constructor' && key !== 'toString' && key !== 'toObject') {\n    //       ret[key] = (this as any)[key]\n    //     }\n    //   }\n    //   Object.entries(staticDefinitions).forEach(([key, val]) => {\n    //     ret[key] = val\n    //   })\n    //   return ret\n    // }\n  } as unknown as C\n  Object.defineProperty(Base, 'name', {\n    value: name,\n    writable: false,\n    enumerable: false,\n    configurable: false,\n  })\n  Object.defineProperty(Base, 'schema', {\n    value: schema,\n    writable: false,\n    enumerable: false,\n    configurable: false,\n  })\n  const Fn: any = function (this: any, ...args: any[]) {\n    if (!new.target) {\n      return new (Fn as any)(...args)\n    }\n    return new (Base as any)(...args)\n  }\n  Fn.prototype = Object.create(Base.prototype)\n  Fn.prototype.constructor = Fn\n  for (const key of Object.getOwnPropertyNames(Base)) {\n    if (key !== 'prototype' && key !== 'name' && key !== 'length') {\n      Object.defineProperty(Fn, key, Object.getOwnPropertyDescriptor(Base, key)!)\n    }\n  }\n  return Fn as CallableNewable<ClassConstructorOptions, C>\n}\n\n/**\n * Supported string formats for ResourcefulStringType, excluding OpenAPI reserved formats.\n * These formats provide additional validation and documentation for string fields.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport const ResourcefulStringFormat = ['password' as 'password', 'byte' as 'byte']\n\n/**\n * Union type of supported string formats for ResourcefulStringType.\n * Used to provide type safety when specifying string field formats.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport type ResourcefulStringFormat = (typeof ResourcefulStringFormat)[number]\n\n/**\n * ResourcefulStringJoiFormat represents a collection of predefined validation formats for strings.\n * It is used to specify constraints or patterns that a string should adhere to during validation.\n * This type is typically employed in conjunction with validation libraries like Joi.\n */\nexport type ResourcefulStringJoiFormat =\n  | 'alphanum'\n  | 'email'\n  | 'uppercase'\n  | 'lowercase'\n  | 'creditCard'\n  | 'dataUri'\n  | 'domain'\n  | 'uuid'\n  | 'guid'\n  | 'hex'\n  | 'hostname'\n  | 'ip'\n  | 'duration'\n  | 'uri'\n  | 'fqdn'\n\nexport type ResourcefulEnumObject<T> = {\n  value: T\n  title?: string\n  i18n?: boolean\n}\n\nexport type ResourcefulEnum<T> = T[] | ResourcefulEnumObject<T>[]\n\n/**\n * Configuration options for ResourcefulStringType instances.\n * Defines validation rules and constraints for string-based fields in OpenAPI schemas.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport interface ResourcefulStringTypeOptions extends BaseInterface {\n  /** Minimum length constraint for the string value */\n  minLength: number\n  /** Maximum length constraint for the string value */\n  maxLength: number\n  /** Regular expression pattern that the string value must match */\n  pattern?: string\n  /** String format specification, excluding OpenAPI reserved formats like date, date-time, and binary */\n  format?:\n    | ResourcefulStringFormat\n    | Exclude<string, 'date' | 'date-time' | 'password' | 'byte' | 'binary'>\n    | ResourcefulStringJoiFormat\n  /** Array of allowed string values for enumeration validation */\n  enum?: ResourcefulEnum<string>\n}\n\n/**\n * Callable constructor for creating validated string type instances.\n * Supports both constructor and function call patterns for flexible usage.\n *\n * @example\n * ```typescript\n * const stringType = new ResourcefulStringType({ minLength: 1, maxLength: 100 })\n * const stringType2 = ResourcefulStringType({ pattern: '^[a-zA-Z]+$' })\n * ```\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport const ResourcefulStringType = generateResourcefulDataTypeClass<ResourcefulStringTypeOptions>(\n  'ResourcefulStringType',\n  'string',\n  ResourcefulStringTypeSchema\n)\n\n/**\n * Instance type for ResourcefulStringType with validated properties.\n * Represents a string data type with validation constraints as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport interface ResourcefulStringType extends ResourcefulStringTypeOptions {\n  type: 'string'\n}\n\n/**\n * Configuration options for ResourcefulDateType instances.\n * Represents date-only values formatted as ISO 8601 date strings.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport interface ResourcefulDateTypeOptions extends BaseInterface {\n  autoCreate?: boolean\n  autoUpdate?: boolean\n}\n\n/**\n * Callable constructor for creating validated date type instances.\n * Automatically sets the OpenAPI format to 'date' for ISO 8601 date strings.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport const ResourcefulDateType = generateResourcefulDataTypeClass<ResourcefulDateTypeOptions>(\n  'ResourcefulDateType',\n  'string',\n  ResourcefulDateTypeSchema,\n  { format: 'date' }\n)\n\n/**\n * Instance type for ResourcefulDateType with validated properties.\n * Represents a date-only value formatted as ISO 8601 date string as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport interface ResourcefulDateType extends ResourcefulDateTypeOptions {\n  type: 'string'\n  format: 'date'\n}\n\n/**\n * Configuration options for ResourcefulDateTimeType instances.\n * Represents date-time values formatted as ISO 8601 date-time strings.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport interface ResourcefulDateTimeTypeOptions extends BaseInterface {\n  autoCreate?: boolean\n  autoUpdate?: boolean\n}\n\n/**\n * Callable constructor for creating validated date-time type instances.\n * Automatically sets the OpenAPI format to 'date-time' for ISO 8601 date-time strings.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport const ResourcefulDateTimeType =\n  generateResourcefulDataTypeClass<ResourcefulDateTimeTypeOptions>(\n    'ResourcefulDateTimeType',\n    'string',\n    ResourcefulDateTimeTypeSchema,\n    { format: 'date-time' }\n  )\n\n/**\n * Instance type for ResourcefulDateTimeType with validated properties.\n * Represents a date-time value formatted as ISO 8601 date-time string as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport interface ResourcefulDateTimeType extends ResourcefulDateTimeTypeOptions {\n  type: 'string'\n  format: 'date-time'\n}\n\n/**\n * Configuration options for ResourcefulBinaryType instances.\n * Defines constraints for binary data represented as base64-encoded strings.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport interface ResourcefulBinaryTypeOptions extends BaseInterface {\n  /** Minimum length constraint for the base64-encoded binary data */\n  minLength: number\n  /** Maximum length constraint for the base64-encoded binary data */\n  maxLength: number\n}\n\n/**\n * Callable constructor for creating validated binary type instances.\n * Automatically sets the OpenAPI format to 'binary' for base64-encoded binary data.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport const ResourcefulBinaryType = generateResourcefulDataTypeClass<ResourcefulBinaryTypeOptions>(\n  'ResourcefulBinaryType',\n  'string',\n  ResourcefulBinaryTypeSchema,\n  { format: 'binary' }\n)\n\n/**\n * Instance type for ResourcefulBinaryType with validated properties.\n * Represents binary data as base64-encoded string as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#string | OpenAPI 3.0 String Type}\n */\nexport interface ResourcefulBinaryType extends ResourcefulBinaryTypeOptions {\n  type: 'string'\n  format: 'binary'\n}\n\n/**\n * Supported number formats for ResourcefulNumberType, following OpenAPI 3.0 specification.\n * These formats provide additional precision and validation for numeric fields.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Number Type}\n */\nexport const ResourcefulNumberFormat = ['float' as 'float', 'double' as 'double']\n\n/**\n * Union type of supported number formats for ResourcefulNumberType.\n * Used to provide type safety when specifying numeric field formats.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Number Type}\n */\nexport type ResourcefulNumberFormat = (typeof ResourcefulNumberFormat)[number]\n\n/**\n * Configuration options for ResourcefulNumberType instances.\n * Defines validation rules and constraints for numeric fields in OpenAPI schemas.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Number Type}\n */\nexport interface ResourcefulNumberTypeOptions extends BaseInterface {\n  /** Minimum value constraint for the number */\n  minimum: number\n  /** Whether the minimum value is exclusive (value must be greater than minimum) */\n  exclusiveMinimum: boolean\n  /** Maximum value constraint for the number */\n  maximum: number\n  /** Whether the maximum value is exclusive (value must be less than maximum) */\n  exclusiveMaximum: boolean\n  /** Number format specification for precision (float or double) */\n  format: ResourcefulNumberFormat\n  /** Value must be a multiple of this number */\n  multipleOf: number\n}\n\n/**\n * Callable constructor for creating validated number type instances.\n * Supports floating-point numbers with configurable precision and range constraints.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Number Type}\n */\nexport const ResourcefulNumberType = generateResourcefulDataTypeClass<ResourcefulNumberTypeOptions>(\n  'ResourcefulNumberType',\n  'number',\n  ResourcefulNumberTypeSchema\n)\n\n/**\n * Instance type for ResourcefulNumberType with validated properties.\n * Represents floating-point numbers as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Number Type}\n */\nexport interface ResourcefulNumberType extends ResourcefulNumberTypeOptions {\n  type: 'number'\n}\n\n/**\n * Configuration options for ResourcefulIntegerType instances.\n * Defines validation rules and constraints for 32-bit integer fields in OpenAPI schemas.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport interface ResourcefulIntegerTypeOptions extends BaseInterface {\n  /** Minimum value constraint for the integer */\n  minimum: number\n  /** Whether the minimum value is exclusive (value must be greater than minimum) */\n  exclusiveMinimum: boolean\n  /** Maximum value constraint for the integer */\n  maximum: number\n  /** Whether the maximum value is exclusive (value must be less than maximum) */\n  exclusiveMaximum: boolean\n  /** Value must be a multiple of this number */\n  multipleOf: number\n}\n\n/**\n * Callable constructor for creating validated integer type instances.\n * Automatically sets the OpenAPI format to 'int32' for 32-bit signed integers.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport const ResourcefulIntegerType =\n  generateResourcefulDataTypeClass<ResourcefulIntegerTypeOptions>(\n    'ResourcefulIntegerType',\n    'integer',\n    ResourcefulIntegerTypeSchema,\n    { format: 'int32' }\n  )\n\n/**\n * Instance type for ResourcefulIntegerType with validated properties.\n * Represents 32-bit signed integers as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport interface ResourcefulIntegerType extends ResourcefulIntegerTypeOptions {\n  type: 'integer'\n  format: 'int32'\n}\n\n/**\n * Configuration options for ResourcefulBigintType instances.\n * Defines validation rules and constraints for 64-bit integer fields in OpenAPI schemas.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport interface ResourcefulBigintTypeOptions extends BaseInterface {\n  /** Minimum value constraint for the 64-bit integer */\n  minimum: bigint\n  /** Whether the minimum value is exclusive (value must be greater than minimum) */\n  exclusiveMinimum: boolean\n  /** Maximum value constraint for the 64-bit integer */\n  maximum: bigint\n  /** Whether the maximum value is exclusive (value must be less than maximum) */\n  exclusiveMaximum: boolean\n  /** Value must be a multiple of this number */\n  multipleOf: bigint\n}\n\n/**\n * Callable constructor for creating validated bigint type instances.\n * Automatically sets the OpenAPI format to 'int64' for 64-bit signed integers.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport const ResourcefulBigintType = generateResourcefulDataTypeClass<ResourcefulBigintTypeOptions>(\n  'ResourcefulBigintType',\n  'integer',\n  ResourcefulBigintTypeSchema,\n  { format: 'int64' }\n)\n\n/**\n * Instance type for ResourcefulBigintType with validated properties.\n * Represents 64-bit signed integers as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport interface ResourcefulBigintType extends ResourcefulBigintTypeOptions {\n  type: 'integer'\n  format: 'int64'\n}\n\n/**\n * Configuration options for ResourcefulUnsignedIntegerType instances.\n * Defines validation rules and constraints for unsigned integer fields in OpenAPI schemas.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport interface ResourcefulUnsignedIntegerTypeOptions extends BaseInterface {\n  /** Minimum value constraint for the unsigned integer */\n  minimum: number\n  /** Whether the minimum value is exclusive (value must be greater than minimum) */\n  exclusiveMinimum: boolean\n  /** Maximum value constraint for the unsigned integer */\n  maximum: number\n  /** Whether the maximum value is exclusive (value must be less than maximum) */\n  exclusiveMaximum: boolean\n  /** Value must be a multiple of this number */\n  multipleOf: number\n}\n\n/**\n * Callable constructor for creating validated unsigned integer type instances.\n * Represents unsigned integers without a specific OpenAPI format constraint.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport const ResourcefulUnsignedIntegerType =\n  generateResourcefulDataTypeClass<ResourcefulUnsignedIntegerTypeOptions>(\n    'ResourcefulUnsignedIntegerType',\n    'integer',\n    ResourcefulUnsignedIntegerTypeSchema\n  )\n\n/**\n * Instance type for ResourcefulUnsignedIntegerType with validated properties.\n * Represents unsigned integers as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#numbers | OpenAPI 3.0 Integer Type}\n */\nexport interface ResourcefulUnsignedIntegerType extends ResourcefulUnsignedIntegerTypeOptions {\n  type: 'integer'\n  format: never\n}\n\n/**\n * Configuration options for ResourcefulBooleanType instances.\n * Currently has no specific configuration options as boolean types are straightforward.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#boolean | OpenAPI 3.0 Boolean Type}\n */\nexport interface ResourcefulBooleanTypeOptions extends BaseInterface {}\n\n/**\n * Callable constructor for creating validated boolean type instances.\n * Represents simple true/false values in OpenAPI schemas.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#boolean | OpenAPI 3.0 Boolean Type}\n */\nexport const ResourcefulBooleanType =\n  generateResourcefulDataTypeClass<ResourcefulBooleanTypeOptions>(\n    'ResourcefulBooleanType',\n    'boolean',\n    ResourcefulBooleanTypeSchema\n  )\n\n/**\n * Instance type for ResourcefulBooleanType with validated properties.\n * Represents boolean true/false values as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#boolean | OpenAPI 3.0 Boolean Type}\n */\nexport interface ResourcefulBooleanType extends ResourcefulBooleanTypeOptions {\n  type: 'boolean'\n}\n\n/**\n * Configuration options for ResourcefulObjectType instances.\n * Defines complex object schemas with typed properties and validation rules.\n * Supports advanced OpenAPI features like oneOf, allOf, anyOf, and not operators.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#object | OpenAPI 3.0 Object Type}\n */\nexport interface ResourcefulObjectTypeOptions extends BaseInterface {\n  /** Object properties definition supporting direct data types and composition patterns */\n  properties: {\n    [key: string]:\n      | ResourcefulDataType\n      | { oneOf: Array<ResourcefulDataType> }\n      | { allOf: Array<ResourcefulDataType> }\n      | { anyOf: Array<ResourcefulDataType> }\n      | { not: Array<ResourcefulDataType> }\n  }\n  /** Array of property names that are required for object validation */\n  required?: string[]\n  /** Whether additional properties beyond those defined are allowed, or direct data type for additional properties */\n  additionalProperties?: boolean | ResourcefulDataType\n  /** Minimum number of properties required in the object */\n  minProperties?: number\n  /** Maximum number of properties allowed in the object */\n  maxProperties?: number\n}\n\n/**\n * Callable constructor for creating validated object type instances.\n * Supports complex nested object schemas with property validation and constraints.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#object | OpenAPI 3.0 Object Type}\n */\nexport const ResourcefulObjectType = generateResourcefulDataTypeClass<ResourcefulObjectTypeOptions>(\n  'ResourcefulObjectType',\n  'object',\n  ResourcefulObjectTypeSchema\n)\n\n/**\n * Instance type for ResourcefulObjectType with validated properties.\n * Represents complex object schemas with typed properties as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#object | OpenAPI 3.0 Object Type}\n */\nexport interface ResourcefulObjectType extends ResourcefulObjectTypeOptions {\n  type: 'object'\n}\n\n/**\n * Configuration options for ResourcefulArrayType instances.\n * Defines array schemas with typed items and validation constraints.\n * Supports complex item types including nested objects and arrays.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#array | OpenAPI 3.0 Array Type}\n */\nexport interface ResourcefulArrayTypeOptions extends BaseInterface {\n  /** Type specification for array items, supporting all resourceful data types and composition patterns */\n  items:\n    | ResourcefulDataType\n    | { oneOf: Array<ResourcefulDataType> }\n    | { allOf: Array<ResourcefulDataType> }\n    | { anyOf: Array<ResourcefulDataType> }\n    | { not: Array<ResourcefulDataType> }\n  /** Minimum number of items required in the array */\n  minItems?: number\n  /** Maximum number of items allowed in the array */\n  maxItems?: number\n  /** Whether all items in the array must be unique */\n  uniqueItems?: boolean\n}\n\n/**\n * Callable constructor for creating validated array type instances.\n * Supports arrays with typed items and validation constraints like minimum/maximum length.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#array | OpenAPI 3.0 Array Type}\n */\nexport const ResourcefulArrayType = generateResourcefulDataTypeClass<ResourcefulArrayTypeOptions>(\n  'ResourcefulArrayType',\n  'array',\n  ResourcefulArrayTypeSchema\n)\n\n/**\n * Instance type for ResourcefulArrayType with validated properties.\n * Represents arrays with typed items and validation constraints as defined in the OpenAPI 3.0 specification.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/#array | OpenAPI 3.0 Array Type}\n */\nexport interface ResourcefulArrayType extends ResourcefulArrayTypeOptions {\n  type: 'array'\n}\n\n/**\n * Union type representing all available resourceful data types.\n * Provides a comprehensive type for working with any resourceful data type instance.\n *\n * @see {@link https://swagger.io/docs/specification/v3_0/data-models/data-types/ | OpenAPI 3.0 Data Types}\n */\nexport type ResourcefulDataType =\n  | ResourcefulStringType\n  | ResourcefulDateType\n  | ResourcefulDateTimeType\n  | ResourcefulBinaryType\n  | ResourcefulNumberType\n  | ResourcefulIntegerType\n  | ResourcefulBigintType\n  | ResourcefulUnsignedIntegerType\n  | ResourcefulBooleanType\n  | ResourcefulObjectType\n  | ResourcefulArrayType\n"],"names":["E_INVALID_RESOURCEFUL_DATA_TYPE_OPTIONS","ResourcefulStringTypeSchema","ResourcefulDateTypeSchema","ResourcefulDateTimeTypeSchema","ResourcefulBinaryTypeSchema","ResourcefulNumberTypeSchema","ResourcefulIntegerTypeSchema","ResourcefulBigintTypeSchema","ResourcefulUnsignedIntegerTypeSchema","ResourcefulBooleanTypeSchema","ResourcefulObjectTypeSchema","ResourcefulArrayTypeSchema"],"mappings":";;;AA6DA,MAAM,mCAAmC,CAIvC,MACA,MACA,UACA,oBAA4C,CAAA,MACI;AAChD,QAAM,SAAS,SAAA;AACf,QAAM,OAAO,MAAM;AAAA,IAEjB,YAAY,UAA4C,IAAI;AAC1D,YAAM,EAAE,OAAO,MAAA,IAAU,OAAO,SAAS,SAAS;AAAA,QAChD,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,cAAc;AAAA,MAAA,CACf;AACD,UAAI,OAAO;AACT,cAAM,IAAIA,OAAAA,wCAAwC,MAAM,KAAK;AAAA,MAC/D;AACA,aAAO,eAAe,MAAM,QAAQ;AAAA,QAClC,OAAO;AAAA,QACP,UAAU;AAAA,QACV,YAAY;AAAA,QACZ,cAAc;AAAA,MAAA,CACf;AACD,aAAO,QAAQ,KAAK,EAAE,QAAQ,CAAC,CAAC,KAAK,GAAG,MAAM;AAC5C,eAAO,eAAe,MAAM,KAAK;AAAA,UAC/B,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,cAAc;AAAA,QAAA,CACf;AAAA,MACH,CAAC;AACD,aAAO,QAAQ,iBAAiB,EAAE,QAAQ,CAAC,CAAC,KAAK,GAAG,MAAM;AACxD,eAAO,eAAe,MAAM,KAAK;AAAA,UAC/B,OAAO;AAAA,UACP,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,cAAc;AAAA,QAAA,CACf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