@tsed/schema 8.5.0-beta.2 → 8.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/schema.umd.min.js +1 -1
- package/lib/browser/schema.umd.min.js.map +1 -1
- package/lib/esm/components/default/schemaMapper.js +4 -1
- package/lib/esm/components/default/schemaMapper.js.map +1 -1
- package/lib/esm/decorators/common/default.js.map +1 -1
- package/lib/esm/decorators/operations/acceptMime.js +3 -3
- package/lib/esm/domain/JsonSchema.js.map +1 -1
- package/lib/types/decorators/common/default.d.ts +1 -1
- package/lib/types/decorators/operations/acceptMime.d.ts +1 -1
- package/lib/types/domain/JsonSchema.d.ts +1 -1
- package/package.json +13 -17
- package/src/components/default/schemaMapper.ts +5 -1
- package/src/decorators/common/default.spec.ts +20 -0
- package/src/decorators/common/default.ts +1 -1
- package/src/decorators/operations/acceptMime.spec.ts +31 -2
- package/src/decorators/operations/acceptMime.ts +3 -3
- package/src/domain/JsonSchema.ts +1 -1
- package/webpack.config.cjs +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.umd.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,cAAeA,QAAQ,gBACvD,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,cAAe,aAAc,eAAgBJ,GAC3B,iBAAZC,QACdA,QAAQ,gBAAkBD,EAAQG,QAAQ,eAAgBA,QAAQ,cAAeA,QAAQ,gBAEzFJ,EAAK,gBAAkBC,EAAQD,EAAK,eAAgBA,EAAK,cAAeA,EAAK,eAC9E,CATD,CASGO,MAAM,CAACC,EAAkCC,EAAkCC,2CCP9EP,EAAOD,QAAU,EAAjB,aCAA,MAAMS,EAAY,QACZC,EAAe,KAAKD,KAMpBE,EAAc,MAGdC,EAAgB,MAEhBC,EAAQ,OACRC,EAA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OgB,QAAUhB,EAAS0S,GAAmB1S,GAC3D,IAAKsB,EAAM0yB,YAAa,CACpB,MAAMjc,EAASjF,GAAmBxR,GAClCA,EAAM0yB,YAAc,IAAIl1B,IACxBiZ,EAAO3b,SAASgX,IACZA,EAAarN,SAAS3J,SAASiX,IACtB/R,EAAM0yB,YAAYx0B,IAAI6T,EAAUpS,cACjCK,EAAM0yB,YAAY90B,IAAImU,EAAUpS,YAAaoS,EACjD,GACF,GAEV,CACA,OAAO/R,EAAM0yB,WACjB,CAIO,SAASC,GAAcj0B,EAAQxR,EAAU,CAAC,GAC7C,MAAMupB,EAASgc,GAAoB/zB,GAC7BlR,EAAM,IAAIgQ,IAShB,OARAiZ,EAAO3b,SAAQ,CAACkF,EAAOlE,MACd5O,EAAQ8qB,kBACLN,GAAY1X,EAAMqB,WAAYnU,IAItCM,EAAIoQ,IAAI9B,EAAKkE,EAAM,IAEhBxS,CACX","sources":["webpack://@tsed/schema/webpack/universalModuleDefinition","webpack://@tsed/schema/../../../node_modules/picomatch-browser/index.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/constants.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/parse.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/picomatch.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/scan.js","webpack://@tsed/schema/../../../node_modules/picomatch-browser/lib/utils.js","webpack://@tsed/schema/../../../node_modules/statuses/index.js","webpack://@tsed/schema/external umd \"@tsed/core\"","webpack://@tsed/schema/external umd \"@tsed/hooks\"","webpack://@tsed/schema/external umd \"change-case\"","webpack://@tsed/schema/webpack/bootstrap","webpack://@tsed/schema/webpack/runtime/compat get default export","webpack://@tsed/schema/webpack/runtime/define property getters","webpack://@tsed/schema/webpack/runtime/hasOwnProperty shorthand","webpack://@tsed/schema/webpack/runtime/make namespace object","webpack://@tsed/schema/./src/constants/OperationVerbs.ts","webpack://@tsed/schema/./src/registries/JsonSchemaMapperContainer.ts","webpack://@tsed/schema/./src/utils/buildPath.ts","webpack://@tsed/schema/../../../node_modules/tslib/tslib.es6.mjs","webpack://@tsed/schema/./src/domain/JsonEntityStore.ts","webpack://@tsed/schema/./src/decorators/config/jsonEntityComponent.ts","webpack://@tsed/schema/./src/registries/enumRegistries.ts","webpack://@tsed/schema/./src/utils/getComputedType.ts","webpack://@tsed/schema/./src/utils/getJsonType.ts","webpack://@tsed/schema/./src/utils/serializeEnumValues.ts","webpack://@tsed/schema/./src/utils/toJsonRegex.ts","webpack://@tsed/schema/./src/domain/JsonDiscriminator.ts","webpack://@tsed/schema/./src/domain/JsonSchema.ts","webpack://@tsed/schema/./src/domain/JsonClassStore.ts","webpack://@tsed/schema/./src/utils/isSuccessStatus.ts","webpack://@tsed/schema/./src/domain/JsonMap.ts","webpack://@tsed/schema/./src/utils/mapHeaders.ts","webpack://@tsed/schema/./src/utils/toJsonMapCollection.ts","webpack://@tsed/schema/./src/domain/JsonMedia.ts","webpack://@tsed/schema/./src/domain/JsonResponse.ts","webpack://@tsed/schema/./src/domain/JsonOperation.ts","webpack://@tsed/schema/./src/domain/JsonMethodStore.ts","webpack://@tsed/schema/./src/domain/JsonParameterTypes.ts","webpack://@tsed/schema/./src/domain/JsonParameter.ts","webpack://@tsed/schema/./src/domain/JsonParameterStore.ts","webpack://@tsed/schema/./src/domain/JsonPropertyStore.ts","webpack://@tsed/schema/./src/utils/getJsonEntityStore.ts","webpack://@tsed/schema/./src/domain/JsonOperationPathsMap.ts","webpack://@tsed/schema/./src/utils/getInheritedStores.ts","webpack://@tsed/schema/./src/utils/getOperationsStores.ts","webpack://@tsed/schema/./src/utils/removeHiddenOperation.ts","webpack://@tsed/schema/./src/components/async-api/channelsMapper.ts","webpack://@tsed/schema/./src/domain/SpecTypes.ts","webpack://@tsed/schema/./src/utils/somethingOf.ts","webpack://@tsed/schema/./src/components/async-api/messageMapper.ts","webpack://@tsed/schema/./src/utils/generics.ts","webpack://@tsed/schema/./src/components/async-api/payloadMapper.ts","webpack://@tsed/schema/./src/components/async-api/responseMapper.ts","webpack://@tsed/schema/./src/components/async-api/generate.ts","webpack://@tsed/schema/./src/domain/JsonLazyRef.ts","webpack://@tsed/schema/./src/utils/ref.ts","webpack://@tsed/schema/./src/components/default/anyMapper.ts","webpack://@tsed/schema/./src/components/default/classMapper.ts","webpack://@tsed/schema/./src/components/default/discriminatorMappingMapper.ts","webpack://@tsed/schema/./src/components/default/enumsMapper.ts","webpack://@tsed/schema/./src/components/default/genericsMapper.ts","webpack://@tsed/schema/./src/components/default/inheritedClassMapper.ts","webpack://@tsed/schema/./src/components/default/itemMapper.ts","webpack://@tsed/schema/./src/components/default/lazyRefMapper.ts","webpack://@tsed/schema/./src/components/default/mapMapper.ts","webpack://@tsed/schema/./src/constants/jsonSchemaProperties.ts","webpack://@tsed/schema/./src/components/default/nullableMapper.ts","webpack://@tsed/schema/./src/hooks/alterIgnore.ts","webpack://@tsed/schema/./src/components/default/objectMapper.ts","webpack://@tsed/schema/./src/components/default/ofMapper.ts","webpack://@tsed/schema/./src/components/default/propertiesMapper.ts","webpack://@tsed/schema/./src/hooks/alterRequiredGroups.ts","webpack://@tsed/schema/./src/components/default/requiredMapper.ts","webpack://@tsed/schema/./src/domain/JsonAliasMap.ts","webpack://@tsed/schema/./src/hooks/alterOneOf.ts","webpack://@tsed/schema/./src/components/default/schemaMapper.ts","webpack://@tsed/schema/./src/components/open-spec/enumsMapper.ts","webpack://@tsed/schema/./src/components/open-spec/generate.ts","webpack://@tsed/schema/./src/components/open-spec/nullableMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInFilesMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInParameterMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInParametersMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInQueryMapper.ts","webpack://@tsed/schema/./src/components/open-spec/discriminatorMappingMapper.ts","webpack://@tsed/schema/./src/constants/httpStatusMessages.ts","webpack://@tsed/schema/./src/components/open-spec/operationMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationMediaMapper.ts","webpack://@tsed/schema/./src/domain/JsonRequestBody.ts","webpack://@tsed/schema/./src/components/open-spec/operationRequestBodyMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationResponseMapper.ts","webpack://@tsed/schema/./src/utils/concatParameters.ts","webpack://@tsed/schema/./src/utils/getJsonPathParameters.ts","webpack://@tsed/schema/./src/utils/operationIdFormatter.ts","webpack://@tsed/schema/./src/components/open-spec/pathsMapper.ts","webpack://@tsed/schema/./src/decorators/common/jsonEntityFn.ts","webpack://@tsed/schema/./src/decorators/class/children.ts","webpack://@tsed/schema/./src/decorators/class/discriminatorValue.ts","webpack://@tsed/schema/./src/decorators/collections/collectionOf.ts","webpack://@tsed/schema/./src/decorators/collections/collectionContains.ts","webpack://@tsed/schema/./src/utils/withErrorMsg.ts","webpack://@tsed/schema/./src/decorators/collections/maxItems.ts","webpack://@tsed/schema/./src/decorators/collections/maxProperties.ts","webpack://@tsed/schema/./src/decorators/collections/minItems.ts","webpack://@tsed/schema/./src/decorators/collections/minProperties.ts","webpack://@tsed/schema/./src/decorators/collections/uniqueItems.ts","webpack://@tsed/schema/./src/decorators/common/additionalProperties.ts","webpack://@tsed/schema/./src/decorators/common/allOf.ts","webpack://@tsed/schema/./src/decorators/common/property.ts","webpack://@tsed/schema/./src/decorators/common/allow.ts","webpack://@tsed/schema/./src/decorators/common/any.ts","webpack://@tsed/schema/./src/decorators/common/anyOf.ts","webpack://@tsed/schema/./src/decorators/common/const.ts","webpack://@tsed/schema/./src/decorators/common/customKey.ts","webpack://@tsed/schema/./src/decorators/common/default.ts","webpack://@tsed/schema/./src/decorators/common/errorMsg.ts","webpack://@tsed/schema/./src/decorators/common/defaultMsg.ts","webpack://@tsed/schema/./src/decorators/common/description.ts","webpack://@tsed/schema/./src/decorators/common/discriminatorKey.ts","webpack://@tsed/schema/./src/decorators/common/enum.ts","webpack://@tsed/schema/./src/decorators/common/example.ts","webpack://@tsed/schema/./src/decorators/common/examples.ts","webpack://@tsed/schema/./src/decorators/common/maximum.ts","webpack://@tsed/schema/./src/decorators/common/exclusiveMaximum.ts","webpack://@tsed/schema/./src/decorators/common/minimum.ts","webpack://@tsed/schema/./src/decorators/common/exclusiveMinimum.ts","webpack://@tsed/schema/./src/domain/JsonFormatTypes.ts","webpack://@tsed/schema/./src/decorators/common/format.ts","webpack://@tsed/schema/./src/decorators/common/forwardGroups.ts","webpack://@tsed/schema/./src/utils/matchGroups.ts","webpack://@tsed/schema/./src/decorators/common/groups.ts","webpack://@tsed/schema/./src/decorators/common/hidden.ts","webpack://@tsed/schema/./src/decorators/common/ignore.ts","webpack://@tsed/schema/./src/decorators/common/integer.ts","webpack://@tsed/schema/./src/decorators/common/labelledAs.ts","webpack://@tsed/schema/./src/decorators/common/maxLength.ts","webpack://@tsed/schema/./src/decorators/common/minLength.ts","webpack://@tsed/schema/./src/decorators/common/multipleOf.ts","webpack://@tsed/schema/./src/decorators/common/name.ts","webpack://@tsed/schema/./src/decorators/common/nullable.ts","webpack://@tsed/schema/./src/decorators/common/oneOf.ts","webpack://@tsed/schema/./src/decorators/common/optional.ts","webpack://@tsed/schema/./src/decorators/common/pattern.ts","webpack://@tsed/schema/./src/decorators/common/readOnly.ts","webpack://@tsed/schema/./src/decorators/common/schema.ts","webpack://@tsed/schema/./src/decorators/common/recordOf.ts","webpack://@tsed/schema/./src/decorators/common/required.ts","webpack://@tsed/schema/./src/decorators/common/requiredGroups.ts","webpack://@tsed/schema/./src/decorators/common/title.ts","webpack://@tsed/schema/./src/decorators/common/typeError.ts","webpack://@tsed/schema/./src/decorators/common/writeOnly.ts","webpack://@tsed/schema/./src/fn/from.ts","webpack://@tsed/schema/./src/fn/string.ts","webpack://@tsed/schema/./src/decorators/generics/genericOf.ts","webpack://@tsed/schema/./src/decorators/generics/generics.ts","webpack://@tsed/schema/./src/decorators/operations/produces.ts","webpack://@tsed/schema/./src/decorators/operations/acceptMime.ts","webpack://@tsed/schema/./src/decorators/operations/consumes.ts","webpack://@tsed/schema/./src/domain/DecoratorContext.ts","webpack://@tsed/schema/./src/utils/defineStatusModel.ts","webpack://@tsed/schema/./src/decorators/operations/returns.ts","webpack://@tsed/schema/./src/decorators/operations/contentType.ts","webpack://@tsed/schema/./src/decorators/operations/deprecated.ts","webpack://@tsed/schema/./src/decorators/operations/header.ts","webpack://@tsed/schema/./src/decorators/operations/in.ts","webpack://@tsed/schema/./src/decorators/operations/inFile.ts","webpack://@tsed/schema/./src/decorators/operations/location.ts","webpack://@tsed/schema/./src/utils/mapOperationOptions.ts","webpack://@tsed/schema/./src/decorators/operations/operation.ts","webpack://@tsed/schema/./src/decorators/operations/operationId.ts","webpack://@tsed/schema/./src/decorators/operations/operationPath.ts","webpack://@tsed/schema/./src/decorators/operations/partial.ts","webpack://@tsed/schema/./src/decorators/operations/path.ts","webpack://@tsed/schema/./src/decorators/operations/publish.ts","webpack://@tsed/schema/./src/decorators/operations/redirect.ts","webpack://@tsed/schema/./src/decorators/operations/route.ts","webpack://@tsed/schema/./src/decorators/operations/security.ts","webpack://@tsed/schema/./src/decorators/operations/status.ts","webpack://@tsed/schema/./src/decorators/operations/subscribe.ts","webpack://@tsed/schema/./src/decorators/operations/summary.ts","webpack://@tsed/schema/./src/decorators/operations/tags.ts","webpack://@tsed/schema/./src/decorators/operations/view.ts","webpack://@tsed/schema/./src/utils/concatPath.ts","webpack://@tsed/schema/./src/domain/JsonOperationRoute.ts","webpack://@tsed/schema/./src/fn/allOf.ts","webpack://@tsed/schema/./src/fn/any.ts","webpack://@tsed/schema/./src/fn/anyOf.ts","webpack://@tsed/schema/./src/fn/boolean.ts","webpack://@tsed/schema/./src/fn/collection.ts","webpack://@tsed/schema/./src/fn/date.ts","webpack://@tsed/schema/./src/fn/email.ts","webpack://@tsed/schema/./src/fn/enums.ts","webpack://@tsed/schema/./src/fn/integer.ts","webpack://@tsed/schema/./src/fn/lazyRef.ts","webpack://@tsed/schema/./src/fn/number.ts","webpack://@tsed/schema/./src/fn/object.ts","webpack://@tsed/schema/./src/fn/oneOf.ts","webpack://@tsed/schema/./src/fn/uri.ts","webpack://@tsed/schema/./src/fn/url.ts","webpack://@tsed/schema/./src/utils/mergeSpec.ts","webpack://@tsed/schema/./src/utils/getSpec.ts","webpack://@tsed/schema/./src/utils/getSpecType.ts","webpack://@tsed/schema/./src/utils/mapOpenSpecInfo.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec2.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec3.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec.ts","webpack://@tsed/schema/./src/utils/transformToOS2.ts","webpack://@tsed/schema/./src/utils/generateSpec.ts","webpack://@tsed/schema/./src/utils/getJsonSchema.ts","webpack://@tsed/schema/./src/utils/getOperationsRoutes.ts","webpack://@tsed/schema/./src/utils/getPropertiesStores.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"change-case\"), require(\"@tsed/core\"), require(\"@tsed/hooks\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"change-case\", \"@tsed/core\", \"@tsed/hooks\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@tsed/schema\"] = factory(require(\"change-case\"), require(\"@tsed/core\"), require(\"@tsed/hooks\"));\n\telse\n\t\troot[\"@tsed/schema\"] = factory(root[\"change-case\"], root[\"@tsed/core\"], root[\"@tsed/hooks\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__579__, __WEBPACK_EXTERNAL_MODULE__414__, __WEBPACK_EXTERNAL_MODULE__171__) => {\nreturn ","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","'use strict';\n\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\nconst SEP = '/';\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR,\n SEP\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,\n SEP: '\\\\'\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(opts.windows);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = (opts) => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index];\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.prev.type === 'bos' && eos()) {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance() || '';\n } else {\n value += advance() || '';\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(opts.windows);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = (opts) => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = opts.windows;\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(utils.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return parsed.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${parsed.output})${append}`;\n if (parsed && parsed.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = parsed;\n }\n\n return regex;\n};\n\npicomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n const opts = options || {};\n let parsed = { negated: false, fastpaths: true };\n let prefix = '';\n let output;\n\n if (input.startsWith('./')) {\n input = input.slice(2);\n prefix = parsed.prefix = './';\n }\n\n if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n output = parse.fastpaths(input, options);\n }\n\n if (output === undefined) {\n parsed = parse(input, options);\n parsed.prefix = prefix + (parsed.prefix || '');\n } else {\n parsed.output = output;\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n }\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n\nexports.basename = (path, { windows } = {}) => {\n if (windows) {\n return path.replace(/[\\\\/]$/, '').replace(/.*[\\\\/]/, '');\n } else {\n return path.replace(/\\/$/, '').replace(/.*\\//, '');\n }\n};\n","/*!\n * statuses\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2016 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar codes = require('./codes.json')\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = status\n\n// status code to message map\nstatus.message = codes\n\n// status message (lower-case) to code map\nstatus.code = createMessageToStatusCodeMap(codes)\n\n// array of status codes\nstatus.codes = createStatusCodeList(codes)\n\n// status codes for redirects\nstatus.redirect = {\n 300: true,\n 301: true,\n 302: true,\n 303: true,\n 305: true,\n 307: true,\n 308: true\n}\n\n// status codes for empty bodies\nstatus.empty = {\n 204: true,\n 205: true,\n 304: true\n}\n\n// status codes for when you should retry the request\nstatus.retry = {\n 502: true,\n 503: true,\n 504: true\n}\n\n/**\n * Create a map of message to status code.\n * @private\n */\n\nfunction createMessageToStatusCodeMap (codes) {\n var map = {}\n\n Object.keys(codes).forEach(function forEachCode (code) {\n var message = codes[code]\n var status = Number(code)\n\n // populate map\n map[message.toLowerCase()] = status\n })\n\n return map\n}\n\n/**\n * Create a list of all status codes.\n * @private\n */\n\nfunction createStatusCodeList (codes) {\n return Object.keys(codes).map(function mapCode (code) {\n return Number(code)\n })\n}\n\n/**\n * Get the status code for given message.\n * @private\n */\n\nfunction getStatusCode (message) {\n var msg = message.toLowerCase()\n\n if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {\n throw new Error('invalid status message: \"' + message + '\"')\n }\n\n return status.code[msg]\n}\n\n/**\n * Get the status message for given code.\n * @private\n */\n\nfunction getStatusMessage (code) {\n if (!Object.prototype.hasOwnProperty.call(status.message, code)) {\n throw new Error('invalid status code: ' + code)\n }\n\n return status.message[code]\n}\n\n/**\n * Get the status code.\n *\n * Given a number, this will throw if it is not a known status\n * code, otherwise the code will be returned. Given a string,\n * the string will be parsed for a number and return the code\n * if valid, otherwise will lookup the code assuming this is\n * the status message.\n *\n * @param {string|number} code\n * @returns {number}\n * @public\n */\n\nfunction status (code) {\n if (typeof code === 'number') {\n return getStatusMessage(code)\n }\n\n if (typeof code !== 'string') {\n throw new TypeError('code must be a number or string')\n }\n\n // '403'\n var n = parseInt(code, 10)\n if (!isNaN(n)) {\n return getStatusMessage(n)\n }\n\n return getStatusCode(code)\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__414__;","module.exports = __WEBPACK_EXTERNAL_MODULE__171__;","module.exports = __WEBPACK_EXTERNAL_MODULE__579__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export var OperationVerbs;\n(function (OperationVerbs) {\n OperationVerbs[\"ALL\"] = \"ALL\";\n OperationVerbs[\"GET\"] = \"GET\";\n OperationVerbs[\"POST\"] = \"POST\";\n OperationVerbs[\"PUT\"] = \"PUT\";\n OperationVerbs[\"PATCH\"] = \"PATCH\";\n OperationVerbs[\"HEAD\"] = \"HEAD\";\n OperationVerbs[\"DELETE\"] = \"DELETE\";\n OperationVerbs[\"OPTIONS\"] = \"OPTIONS\";\n OperationVerbs[\"TRACE\"] = \"TRACE\";\n OperationVerbs[\"PUBLISH\"] = \"PUBLISH\";\n OperationVerbs[\"SUBSCRIBE\"] = \"SUBSCRIBE\";\n OperationVerbs[\"CUSTOM\"] = \"CUSTOM\";\n})(OperationVerbs || (OperationVerbs = {}));\nexport const OPERATION_HTTP_VERBS = [\n OperationVerbs.ALL,\n OperationVerbs.GET,\n OperationVerbs.POST,\n OperationVerbs.PUT,\n OperationVerbs.PATCH,\n OperationVerbs.HEAD,\n OperationVerbs.DELETE,\n OperationVerbs.OPTIONS,\n OperationVerbs.TRACE,\n OperationVerbs.CUSTOM\n];\nexport const OPERATION_WS_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];\n","/**\n * @ignore\n */\nconst JsonSchemaMappersContainer = new Map();\n/**\n * @ignore\n */\nexport function registerJsonSchemaMapper(type, mapper, spec) {\n return JsonSchemaMappersContainer.set(spec ? `${spec}:${type}` : type, mapper);\n}\n/**\n * @ignore\n */\nexport function getJsonSchemaMapper(type, options) {\n const mapper = JsonSchemaMappersContainer.get(`${options?.specType}:${type}`) || JsonSchemaMappersContainer.get(type);\n if (mapper) {\n return mapper;\n }\n // istanbul ignore next\n throw new Error(`JsonSchema ${type} mapper doesn't exists`);\n}\n/**\n * @ignore\n */\nexport function execMapper(type, args, options, parent) {\n return getJsonSchemaMapper(type, options)(...args, options, parent);\n}\nexport function hasMapper(type) {\n return JsonSchemaMappersContainer.has(type);\n}\nexport function execOneOfMapper(types, options) {\n return (types.find((type) => JsonSchemaMappersContainer.has(`${options?.specType}:${type}`)) ||\n types.find((type) => JsonSchemaMappersContainer.has(type)));\n}\n","/**\n * Return a sanitized path\n * @param path\n * @ignore\n */\nexport function buildPath(path) {\n return path.split(\"/\").filter(Boolean).join(\"/\");\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { ancestorsOf, classOf, decoratorTypeOf, descriptorOf, isArrayOrArrayClass, isArrowFn, isClass, isClassObject, isCollection, isDate, isObject, isPlainObject, isPrimitiveOrPrimitiveClass, nameOf, prototypeOf, Store } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const JsonEntitiesContainer = new Map();\nexport class JsonEntityStore {\n constructor(options) {\n this.isStore = true;\n const { target, propertyKey, descriptor, index, decoratorType } = options;\n this.target = target;\n this.propertyKey = propertyKey;\n this.propertyName = String(propertyKey);\n this.descriptor = descriptor;\n this.index = index;\n this.decoratorType = decoratorType;\n this.token = target;\n this.store = options.store;\n this.parent = this;\n }\n /**\n * Return the class name of the entity.\n * @returns {string}\n */\n get targetName() {\n return nameOf(this.token);\n }\n get isCollection() {\n return !!this.collectionType;\n }\n get isArray() {\n return isArrayOrArrayClass(this.collectionType);\n }\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor);\n }\n get isPrimitive() {\n return isPrimitiveOrPrimitiveClass(this._type);\n }\n get isDate() {\n return isDate(this.computedType);\n }\n get isObject() {\n return isObject(this.computedType);\n }\n get isClass() {\n return isClass(this.computedType);\n }\n /**\n * Return the JsonSchema\n */\n get schema() {\n return this._schema;\n }\n get nestedGenerics() {\n return this.schema.nestedGenerics;\n }\n set nestedGenerics(nestedGenerics) {\n this.schema.nestedGenerics = nestedGenerics;\n }\n get type() {\n return this._type;\n }\n /**\n * Get original type without transformation\n * @param value\n */\n set type(value) {\n this._type = value;\n this.build();\n }\n /**\n * Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to\n * get the right type.\n */\n get computedType() {\n return this.itemSchema.getComputedType();\n }\n get itemSchema() {\n return this.isCollection ? this.schema.itemSchema() : this.schema;\n }\n get parentSchema() {\n return this.parent.schema;\n }\n get isDiscriminatorChild() {\n return this.schema.isDiscriminator && this.discriminatorAncestor?.schema.discriminator().base !== this.target;\n }\n static from(...args) {\n if (args[0].isStore) {\n return args[0];\n }\n const target = args[0];\n if (args.length > 1) {\n args[0] = prototypeOf(args[0]);\n }\n const store = Store.from(...args);\n if (!store.has(\"JsonEntityStore\")) {\n const decoratorType = decoratorTypeOf(args);\n const entityStore = JsonEntitiesContainer.get(decoratorType);\n const jsonSchemaStore = new entityStore({\n store,\n decoratorType,\n target: classOf(target),\n propertyKey: args[1],\n index: typeof args[2] === \"number\" ? args[2] : undefined,\n descriptor: typeof args[2] === \"object\" ? args[2] : undefined\n });\n jsonSchemaStore.build();\n store.set(\"JsonEntityStore\", jsonSchemaStore);\n }\n return store.get(\"JsonEntityStore\");\n }\n static fromMethod(target, propertyKey) {\n return this.from(target, propertyKey, descriptorOf(target, propertyKey));\n }\n static get(target, propertyKey, descriptor) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n isGetterOnly() {\n return isObject(this.descriptor) && !this.descriptor.value && this.descriptor.get && !this.descriptor.set;\n }\n get(key, defaultValue) {\n return this.store.get(key, defaultValue);\n }\n set(key, value) {\n return this.store.set(key, value);\n }\n toString() {\n return [this.targetName, this.propertyName, this.index].filter((o) => o !== undefined).join(\":\");\n }\n buildType(type) {\n if (isCollection(type)) {\n this.collectionType = type;\n }\n else {\n this._type = type;\n // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)\n if (this._type && isPlainObject(this._type)) {\n this._type = String;\n }\n }\n }\n getBestType() {\n return this.itemSchema.hasDiscriminator\n ? this.itemSchema.discriminator().base\n : isClassObject(this.type)\n ? this.itemSchema.getTarget()\n : isArrowFn(this.type)\n ? this.type()\n : this.type;\n }\n}\n","import { JsonEntitiesContainer } from \"../../domain/JsonEntityStore.js\";\n/**\n * Declare a new JsonEntityStore class for a specific decorator type.\n *\n * @ignore\n * @param type\n * @decorator\n */\nexport function JsonEntityComponent(type) {\n return (target) => {\n JsonEntitiesContainer.set(type, target);\n };\n}\n","export const enumsRegistry = new Map();\n","import { classOf, isArrowFn, isClass, isClassObject, isCollection, isDate, isPrimitiveOrPrimitiveClass, isPromise, isSymbol } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport function getComputedType(target) {\n if (isPromise(target) || target === Function) {\n return Object;\n }\n if (isClass(target) ||\n isSymbol(target) ||\n isPrimitiveOrPrimitiveClass(target) ||\n isClassObject(target) ||\n isDate(target) ||\n isCollection(target)) {\n return classOf(target);\n }\n if (isArrowFn(target)) {\n return target();\n }\n return target;\n}\n","import { isArray, isBuffer, isDate, isPrimitiveOrPrimitiveClass, primitiveOf } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const JSON_TYPES = [\"string\", \"number\", \"integer\", \"boolean\", \"object\", \"array\", \"null\", \"any\"];\nexport function getJsonType(value) {\n if (value === null) {\n return \"null\";\n }\n if (isPrimitiveOrPrimitiveClass(value)) {\n if (JSON_TYPES.indexOf(value) > -1) {\n return value;\n }\n if (typeof value === \"string\") {\n if (value === \"file\") {\n return \"file\";\n }\n return \"generic\";\n }\n return primitiveOf(value);\n }\n if (value === Array) {\n return \"array\";\n }\n if (isArray(value)) {\n return value.map(getJsonType);\n }\n if (value === Set) {\n return \"array\";\n }\n if (isDate(value) || isBuffer(value)) {\n return \"string\";\n }\n return \"object\";\n}\n","import { isObject, uniq } from \"@tsed/core\";\nexport const serializeEnum = (enumValue) => {\n if (isObject(enumValue) && enumValue !== null) {\n return Object.entries(enumValue).reduce((acc, [key, value]) => {\n if (isNaN(+key)) {\n return acc.concat(value);\n }\n return acc;\n }, []);\n }\n return enumValue;\n};\nexport function serializeEnumValues(enumValues) {\n const values = enumValues.reduce((acc, value) => acc.concat(serializeEnum(value)), []);\n const getValue = (value) => {\n return value === null ? \"null\" : typeof value;\n };\n const types = values.reduce((set, value) => set.add(getValue(value)), new Set());\n return { values: uniq(values), types };\n}\n","/**\n * @ignore\n * @param pattern\n */\nexport function toJsonRegex(pattern) {\n return String(pattern).replace(/^(\\/)(.*)(\\/)$/, \"$2\");\n}\n","import { cleanObject } from \"@tsed/core\";\nexport class Discriminator {\n constructor({ base, propertyName, types, values } = {}) {\n this.values = new Map();\n this.types = new Map();\n Object.assign(this, cleanObject({\n base,\n propertyName,\n types: types ? new Map(types) : undefined,\n values: values ? new Map(values) : undefined\n }));\n }\n add(type, values) {\n values.forEach((value) => {\n this.values.set(value, type);\n });\n this.types.set(type, values);\n return this;\n }\n getType(discriminatorValue) {\n return this.values.get(discriminatorValue) || this.base;\n }\n getValues(type) {\n return this.types.get(type);\n }\n getDefaultValue(type) {\n const values = this.types.get(type);\n return values ? values[0] : undefined;\n }\n children() {\n return [...new Set([...this.types.keys()])];\n }\n}\n","import { ancestorsOf, classOf, isArray, isClass, isFunction, isObject, isPrimitiveClass, nameOf, uniq } from \"@tsed/core\";\nimport { Hooks } from \"@tsed/hooks\";\nimport { enumsRegistry } from \"../registries/enumRegistries.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getComputedType } from \"../utils/getComputedType.js\";\nimport { getJsonType } from \"../utils/getJsonType.js\";\nimport { serializeEnumValues } from \"../utils/serializeEnumValues.js\";\nimport { toJsonRegex } from \"../utils/toJsonRegex.js\";\nimport { Discriminator } from \"./JsonDiscriminator.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nfunction mapProperties(properties) {\n // istanbul ignore next\n if (properties instanceof JsonSchema) {\n return properties;\n }\n return Object.entries(properties).reduce((properties, [key, schema]) => {\n properties[toJsonRegex(key)] = mapToJsonSchema(schema);\n return properties;\n }, {});\n}\nfunction mapToJsonSchema(item) {\n if (isArray(item)) {\n return item.map(mapToJsonSchema);\n }\n if (item.isStore || item.$isJsonDocument || item.isLazyRef) {\n return item;\n }\n if (classOf(item) !== Object && isClass(item)) {\n return JsonEntityStore.from(item).schema;\n }\n if (isObject(item)) {\n return JsonSchema.from(item);\n }\n if (isPrimitiveClass(item)) {\n return JsonSchema.from({ type: item });\n }\n return item;\n}\nexport class JsonSchema extends Map {\n #nullable;\n #discriminator;\n #genericLabels;\n #nestedGenerics;\n #alias;\n #itemSchema;\n #target;\n #isGeneric;\n #isCollection;\n #ref;\n constructor(obj = {}) {\n super();\n this.$kind = \"schema\";\n this.$isJsonDocument = true;\n this.$hooks = new Hooks();\n this.$required = new Set();\n this.$allow = [];\n this.$forwardGroups = false;\n this.$ignore = false;\n this.isDiscriminatorKey = false;\n this.isDiscriminator = false;\n this.#nullable = false;\n this.#discriminator = null;\n this.#nestedGenerics = [];\n this.#alias = new Map();\n this.#isGeneric = false;\n this.#isCollection = false;\n this.#ref = false;\n if (obj) {\n this.assign(obj);\n }\n }\n get alias() {\n return this.#alias;\n }\n get nestedGenerics() {\n return this.#nestedGenerics;\n }\n set nestedGenerics(value) {\n this.#nestedGenerics = value;\n }\n get genericLabels() {\n return this.#genericLabels;\n }\n set genericLabels(value) {\n this.#genericLabels = value;\n }\n get isClass() {\n return isClass(this.class) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this.#target);\n }\n /**\n * Current schema is a collection\n */\n get isCollection() {\n return this.#isCollection;\n }\n /**\n * Current schema is a generic\n */\n get isGeneric() {\n return this.#isGeneric;\n }\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.#target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor).schema;\n }\n /**\n * Current schema has generics items\n */\n get hasGenerics() {\n return !!(this.nestedGenerics && this.nestedGenerics.length);\n }\n get genericType() {\n return this.get(\"$ref\");\n }\n get class() {\n return this.getComputedType();\n }\n get canRef() {\n return this.#ref;\n }\n get isNullable() {\n return this.#nullable;\n }\n get isReadOnly() {\n return this.get(\"readOnly\");\n }\n get isWriteOnly() {\n return this.get(\"writeOnly\");\n }\n get hasDiscriminator() {\n return !!this.#discriminator;\n }\n static from(obj = {}) {\n return new JsonSchema(obj);\n }\n nullable(value) {\n this.#nullable = value;\n }\n itemSchema(obj = {}) {\n this.#itemSchema = this.#itemSchema || mapToJsonSchema(obj);\n this.#itemSchema.assign(obj);\n return this.#itemSchema;\n }\n getAliasOf(property) {\n return this.#alias.get(property);\n }\n addAlias(property, alias) {\n this.#alias.set(property, alias);\n this.#alias.set(alias, property);\n return this;\n }\n removeAlias(property) {\n const alias = this.#alias.get(property);\n alias && this.#alias.delete(alias);\n this.#alias.delete(property);\n return this;\n }\n $id($id) {\n super.set(\"$id\", $id);\n return this;\n }\n $ref($ref) {\n super.set(\"$ref\", $ref);\n return this;\n }\n $schema($schema) {\n super.set(\"$schema\", $schema);\n return this;\n }\n /**\n * Create a ref and use name to sharing schema\n * @param name\n */\n label(name) {\n this.#ref = true;\n super.set(\"name\", name);\n return this;\n }\n name(name) {\n super.set(\"name\", name);\n return this;\n }\n ignore(cb) {\n if (typeof cb !== \"boolean\") {\n this.$hooks.on(\"ignore\", cb);\n }\n this.$ignore = cb;\n return this;\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(value) {\n super.set(\"default\", value);\n return this;\n }\n /**\n * More readible 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(value) {\n super.set(\"const\", value);\n return this;\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(description) {\n super.set(\"description\", description);\n return this;\n }\n discriminator() {\n this.isDiscriminator = true;\n return (this.#discriminator =\n this.#discriminator ||\n new Discriminator({\n base: this.#target\n }));\n }\n discriminatorKey(propertyName) {\n this.discriminator().propertyName = propertyName;\n this.isDiscriminator = true;\n return this;\n }\n discriminatorValue(...values) {\n const discriminator = this.discriminatorAncestor.discriminator();\n discriminator.add(this.#target, values);\n this.isDiscriminator = true;\n const properties = this.get(\"properties\");\n const schema = properties[discriminator.propertyName] ||\n new JsonSchema({\n type: \"string\"\n });\n if (values.length === 1) {\n schema.const(values[0]);\n schema.examples([values[0]]);\n }\n else {\n schema.enum(...values);\n schema.examples(values);\n }\n properties[discriminator.propertyName] = schema;\n this.set(\"properties\", properties);\n return this;\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(additionalItems) {\n super.set(\"additionalItems\", mapToJsonSchema(additionalItems));\n return this;\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(contains) {\n super.set(\"contains\", mapToJsonSchema(contains));\n return this;\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(examples) {\n super.set(\"examples\", examples);\n return this;\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 example(...examples) {\n return this.examples(examples);\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(items) {\n super.set(\"items\", (this.#itemSchema = mapToJsonSchema(items)));\n return this;\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(maxItems) {\n super.set(\"maxItems\", maxItems);\n return this;\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(minItems) {\n super.set(\"minItems\", minItems);\n return this;\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(uniqueItems) {\n super.set(\"uniqueItems\", uniqueItems);\n return this;\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(maxProperties) {\n super.set(\"maxProperties\", maxProperties);\n return this;\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(minProperties) {\n super.set(\"minProperties\", minProperties);\n return this;\n }\n allow(...allow) {\n if ([].concat(this.getJsonType()).includes(\"string\") && !this.has(\"minLength\")) {\n this.minLength(1);\n }\n allow.forEach((value) => {\n switch (value) {\n case \"\":\n this.set(\"minLength\", undefined);\n break;\n case null:\n this.any(...[\"null\"].concat(this.getJsonType(), this.$allow.map((v) => typeof v)));\n break;\n }\n });\n this.$allow.push(...allow);\n return this;\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(required = true) {\n if (isArray(required)) {\n this.$required.clear();\n required.forEach((value) => this.$required.add(value));\n }\n else {\n const schema = this.clone();\n schema.$selfRequired = required;\n if ([].concat(schema.getJsonType()).includes(\"string\")) {\n schema.minLength(1);\n }\n return schema;\n }\n return this;\n }\n addRequired(property) {\n this.$required.add(property);\n return this;\n }\n removeRequired(property) {\n this.$required.delete(property);\n return this;\n }\n isRequired(property) {\n return this.$required.has(property);\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(properties) {\n super.set(\"properties\", mapProperties(properties));\n return this;\n }\n addProperty(key, schema) {\n const properties = this.get(\"properties\") || {};\n properties[key] = schema;\n super.set(\"properties\", mapProperties(properties));\n return this;\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(patternProperties) {\n super.set(\"patternProperties\", mapProperties(patternProperties));\n return this;\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(additionalProperties) {\n super.set(\"additionalProperties\", mapToJsonSchema(additionalProperties));\n return this;\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 * @alias additionalProperties\n * @param unknown\n */\n unknown(unknown = true) {\n return this.additionalProperties(unknown);\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(dependencies) {\n super.set(\"dependencies\", mapProperties(dependencies));\n return this;\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(propertyNames) {\n super.set(\"propertyNames\", mapToJsonSchema(propertyNames));\n return this;\n }\n enum(enumValue, ...enumValues) {\n if (enumsRegistry.has(enumValue)) {\n return this.enum(enumsRegistry.get(enumValue));\n }\n if (enumValue instanceof JsonSchema) {\n if (enumValue.getName()) {\n super.set(\"enum\", enumValue);\n }\n else {\n super.set(\"enum\", enumValue.get(\"enum\")).any(...enumValue.get(\"enum\").map((value) => typeof value));\n }\n }\n else {\n const { values, types } = serializeEnumValues([enumValue, enumValues].flat());\n super.set(\"enum\", values).any(...types);\n }\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1\n */\n definitions(definitions) {\n super.set(\"definitions\", mapProperties(definitions));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\n allOf(allOf) {\n this.setManyOf(\"allOf\", allOf);\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\n anyOf(anyOf) {\n this.setManyOf(\"anyOf\", anyOf);\n return this;\n }\n /*\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\n oneOf(oneOf) {\n this.setManyOf(\"oneOf\", oneOf);\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29\n */\n not(not) {\n super.set(\"not\", mapToJsonSchema(not));\n return this;\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(multipleOf) {\n super.set(\"multipleOf\", multipleOf);\n return this;\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(maximum) {\n super.set(\"maximum\", maximum);\n return this;\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(exclusiveMaximum) {\n super.set(\"exclusiveMaximum\", exclusiveMaximum);\n return this;\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(minimum) {\n super.set(\"minimum\", minimum);\n return this;\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(exclusiveMinimum) {\n super.set(\"exclusiveMinimum\", exclusiveMinimum);\n return this;\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(maxLength) {\n super.set(\"maxLength\", maxLength);\n return this;\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(minLength) {\n super.set(\"minLength\", minLength);\n return this;\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(pattern) {\n super.set(\"pattern\", toJsonRegex(pattern));\n return this;\n }\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8\n */\n format(format) {\n super.set(\"format\", format);\n return this;\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(type) {\n switch (type) {\n case \"map\":\n case Map:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"additionalProperties\")) {\n super.set(\"additionalProperties\", this.itemSchema({}));\n }\n break;\n case \"array\":\n case Array:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n case \"set\":\n case Set:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n this.uniqueItems(true);\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n case \"integer\":\n this.integer();\n break;\n case \"number\":\n case \"string\":\n case \"boolean\":\n case \"object\":\n case Object:\n case Date:\n case Boolean:\n case Number:\n case String:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n break;\n default:\n if (isClass(type) || isFunction(type)) {\n super.set(\"type\", undefined);\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n }\n else {\n const jsonType = getJsonType(type);\n if (jsonType === \"generic\") {\n this.#isGeneric = true;\n super.set(\"$ref\", type);\n }\n else {\n super.set(\"type\", jsonType);\n }\n }\n }\n return this;\n }\n any(...types) {\n types = types.length ? types : [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"];\n types = uniq(types).map((o) => {\n return isClass(o) ? o : { type: getJsonType(o) };\n });\n if (types.length > 1) {\n this.anyOf(types);\n }\n else {\n this.type(types[0]?.type || types[0]);\n }\n return this;\n }\n integer() {\n super.set(\"type\", \"integer\");\n super.set(\"multipleOf\", 1.0);\n return this;\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(title) {\n super.set(\"title\", title);\n return this;\n }\n readOnly(readOnly) {\n super.set(\"readOnly\", readOnly);\n return this;\n }\n writeOnly(readOnly) {\n super.set(\"writeOnly\", readOnly);\n return this;\n }\n customKey(key, value) {\n super.set(`#${key}`, value);\n return this;\n }\n toObject(options) {\n return this.toJSON(options);\n }\n toJSON(options) {\n return execMapper(\"schema\", [this], options);\n }\n assign(obj = {}) {\n const entries = obj instanceof JsonSchema ? [...obj.entries()] : Object.entries(obj);\n entries.forEach(([key, value]) => {\n this.set(key, value);\n });\n if (obj instanceof JsonSchema) {\n this.$selfRequired = obj.$selfRequired;\n this.$allow.push(...obj.$allow);\n obj.$required.forEach((key) => {\n this.$required.add(key);\n });\n this.#discriminator = this.#discriminator ? new Discriminator(this.#discriminator) : null;\n this.isDiscriminator = obj.isDiscriminator;\n this.isDiscriminatorKey = obj.isDiscriminatorKey;\n this.#ref = obj.#ref;\n this.#alias = new Map(this.#alias.entries());\n obj.#genericLabels && (this.#genericLabels = [...obj.#genericLabels]);\n this.#nestedGenerics = obj.#nestedGenerics.map((item) => [...item]);\n this.#target = obj.#target;\n this.#isGeneric = obj.#isGeneric;\n this.#isCollection = obj.#isCollection;\n this.#ref = obj.#ref;\n this.#nullable = obj.#nullable;\n super.set(\"type\", obj.get(\"type\"));\n }\n return this;\n }\n set(key, value) {\n if (key in this) {\n isFunction(this[key]) && this[key](value);\n }\n else {\n super.set(key, value);\n }\n return this;\n }\n /**\n * Return the itemSchema computed type.\n * If the type is a function used for recursive model,\n * the function will be called to get the right type.\n */\n getComputedType() {\n return getComputedType(this.#target);\n }\n getComputedItemType() {\n return this.#itemSchema ? this.#itemSchema.getComputedType() : this.getComputedType();\n }\n /**\n * Return the Json type as string\n */\n getJsonType() {\n if (this.get(\"anyOf\")) {\n return this.get(\"anyOf\").map((o) => {\n return o.getJsonType();\n });\n }\n return this.get(\"type\") || getJsonType(this.getComputedType());\n }\n getTarget() {\n return this.#target;\n }\n /**\n * Get the symbolic name of the entity\n */\n getName() {\n return this.get(\"name\") || (isClass(this.#target) ? nameOf(classOf(this.getComputedType())) : \"\");\n }\n clone() {\n return new JsonSchema(this);\n }\n setManyOf(keyword, value) {\n let resolved = value\n .filter((o) => {\n if (o?.type === \"null\") {\n this.nullable(true);\n return false;\n }\n return true;\n })\n .map(mapToJsonSchema);\n if (resolved.length === 1 && !(value[0] instanceof JsonSchema) && !this.isNullable) {\n if (!resolved[0].hasDiscriminator) {\n return this.type(value[0]);\n }\n const children = resolved[0].discriminator().children();\n if (!children.length) {\n return this.type(value[0]);\n }\n resolved = children.map(mapToJsonSchema);\n }\n super.set(keyword, resolved);\n const jsonSchema = resolved[0];\n if (jsonSchema.isDiscriminator) {\n const discriminator = jsonSchema.discriminatorAncestor.discriminator();\n const { propertyName } = discriminator;\n super.set(\"discriminator\", {\n propertyName,\n mapping: resolved.reduce((acc, schema) => {\n discriminator.types.get(schema.getTarget())?.forEach((key) => {\n acc[key] = schema;\n });\n return acc;\n }, {})\n });\n this.isDiscriminator = true;\n this.#discriminator = discriminator;\n }\n }\n}\n","import { __decorate } from \"tslib\";\nimport { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonClassStore = class JsonClassStore extends JsonEntityStore {\n constructor() {\n super(...arguments);\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n this.children = new Map();\n }\n get path() {\n return this.store.get(\"path\", \"/\");\n }\n set path(path) {\n this.store.set(\"path\", path);\n }\n build() {\n if (!this._type) {\n this.buildType(this.target);\n }\n this._type = this._type || Object;\n this._schema = JsonSchema.from({\n type: this.type\n });\n }\n};\nJsonClassStore = __decorate([\n JsonEntityComponent(DecoratorTypes.CLASS)\n], JsonClassStore);\nexport { JsonClassStore };\n","export const isSuccessStatus = (code) => Number(code) && 200 <= Number(code) && Number(code) < 300;\nexport const isRedirectionStatus = (code) => Number(code) && 300 <= Number(code) && Number(code) < 400;\n","import { isFunction } from \"@tsed/core\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nexport class JsonMap extends Map {\n constructor(obj = {}) {\n super();\n this.$kind = \"map\";\n this.$isJsonDocument = true;\n this.assign(obj);\n }\n assign(obj = {}) {\n Object.entries(obj).forEach(([key, value]) => {\n if (isFunction(this[key])) {\n this[key](value);\n }\n else {\n this.set(key, value);\n }\n });\n return this;\n }\n toJSON(options) {\n return execMapper(\"map\", [this], options);\n }\n}\n","import { cleanObject } from \"@tsed/core\";\n/**\n * Map input header to a standard open spec header\n * @param headers\n * @ignore\n */\nexport function mapHeaders(headers) {\n return Object.keys(headers).reduce((newHeaders, key) => {\n const value = headers[key];\n let type = typeof value;\n let options = {\n example: value\n };\n if (type === \"object\") {\n options = value;\n options.example = options.value === undefined ? options.example : options.value;\n delete options.value;\n type = typeof options.example;\n }\n options.type = options.type || type;\n newHeaders[key] = cleanObject(options);\n return newHeaders;\n }, {});\n}\n","import { JsonMap } from \"../domain/JsonMap.js\";\n/**\n * @ignore\n */\nexport function toJsonMapCollection(content, klass = JsonMap) {\n return Object.entries(content).reduce((content, [key, value]) => {\n content.set(key, new klass(value));\n return content;\n }, new JsonMap());\n}\n","import { JsonMap } from \"./JsonMap.js\";\nexport class JsonMedia extends JsonMap {\n constructor() {\n super(...arguments);\n this.$kind = \"operationMedia\";\n this.groups = [];\n }\n schema(schema) {\n this.set(\"schema\", schema);\n return this;\n }\n examples(examples) {\n this.set(\"examples\", examples);\n return this;\n }\n}\n","import { mapHeaders } from \"../utils/mapHeaders.js\";\nimport { toJsonMapCollection } from \"../utils/toJsonMapCollection.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { JsonMedia } from \"./JsonMedia.js\";\nexport class JsonResponse extends JsonMap {\n constructor(obj = {}) {\n super(obj);\n this.$kind = \"operationResponse\";\n this.content(obj.content || {});\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n headers(headers) {\n this.set(\"headers\", mapHeaders(headers));\n return this;\n }\n content(content) {\n this.set(\"content\", toJsonMapCollection(content, JsonMedia));\n return this;\n }\n getContent() {\n return this.get(\"content\");\n }\n getMedia(mediaType, create = true) {\n create && this.addMedia(mediaType);\n return this.getContent()?.get(mediaType);\n }\n addMedia(mediaType) {\n const content = this.get(\"content\");\n if (!content.has(mediaType)) {\n content.set(mediaType, new JsonMedia());\n }\n return this;\n }\n isBinary() {\n return this.getContent().has(\"application/octet-stream\");\n }\n}\n","import { deepMerge, uniq, uniqBy } from \"@tsed/core\";\nimport { isRedirectionStatus, isSuccessStatus } from \"../utils/isSuccessStatus.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { JsonResponse } from \"./JsonResponse.js\";\nexport class JsonMethodPath extends JsonMap {\n constructor(method, path) {\n super();\n this.method = method;\n this.path = path;\n }\n summary(summary) {\n super.set(\"summary\", summary);\n return this;\n }\n description(description) {\n super.set(\"description\", description);\n return this;\n }\n}\nexport class JsonOperation extends JsonMap {\n #status;\n #redirection;\n constructor(obj = {}) {\n super({ parameters: [], responses: new JsonMap(), ...obj });\n this.$kind = \"operation\";\n this.operationPaths = new Map();\n this.#redirection = false;\n }\n get response() {\n return this.getResponses().get(this.getStatus().toString());\n }\n get status() {\n return this.#status;\n }\n tags(tags) {\n super.set(\"tags\", tags);\n return this;\n }\n addTags(tags) {\n tags = uniqBy([...(this.get(\"tags\") || []), ...tags], \"name\");\n return this.tags(tags);\n }\n summary(summary) {\n super.set(\"summary\", summary);\n return this;\n }\n operationId(operationId) {\n this.set(\"operationId\", operationId);\n return this;\n }\n responses(responses) {\n this.set(\"responses\", responses);\n return this;\n }\n defaultStatus(status) {\n this.#status = status;\n return this;\n }\n getStatus() {\n return this.#status || 200;\n }\n setRedirection(status = 302) {\n this.#redirection = true;\n this.#status = status;\n return this;\n }\n isRedirection(status) {\n if (this.#redirection) {\n if (status) {\n return isRedirectionStatus(status);\n }\n }\n return this.#redirection;\n }\n addResponse(statusCode, response) {\n if ((isSuccessStatus(statusCode) || isRedirectionStatus(statusCode)) && !this.#status) {\n const res = this.getResponseOf(200);\n this.getResponses().set(statusCode.toString(), res).delete(\"200\");\n this.defaultStatus(Number(statusCode));\n }\n const currentCode = statusCode === \"default\" ? this.getStatus().toString() : statusCode.toString();\n const currentResponse = this.getResponses().get(currentCode);\n if (!currentResponse) {\n response.status = Number(currentCode);\n this.getResponses().set(currentCode, response);\n }\n else {\n response.forEach((value, key) => {\n if (![\"content\"].includes(key)) {\n currentResponse.set(key, deepMerge(currentResponse.get(key), value));\n }\n });\n currentResponse.status = Number(currentCode);\n }\n return this;\n }\n getResponses() {\n return this.get(\"responses\");\n }\n getResponseOf(status) {\n return (status === \"default\" ? this.response : this.getResponses().get(String(status))) || new JsonResponse();\n }\n ensureResponseOf(status) {\n this.addResponse(status, this.getResponseOf(status));\n return this.getResponseOf(status);\n }\n getHeadersOf(status) {\n return this.getResponseOf(status).get(\"headers\") || {};\n }\n getContentTypeOf(status) {\n return [...this.getResponseOf(status).get(\"content\").keys()].slice(-1)[0];\n }\n security(security) {\n this.set(\"security\", security);\n return this;\n }\n addSecurityScopes(name, scopes) {\n const security = this.get(\"security\") || {};\n security[name] = uniq([...(security[name] || []), ...scopes]);\n return this.security(security);\n }\n description(description) {\n super.set(\"description\", description);\n return this;\n }\n deprecated(deprecated) {\n super.set(\"deprecated\", deprecated);\n return this;\n }\n parameters(parameters) {\n super.set(\"parameters\", parameters);\n return this;\n }\n addParameter(index, parameter) {\n if (index === -1) {\n index = this.get(\"parameters\").length;\n }\n this.get(\"parameters\")[index] = parameter;\n }\n consumes(consumes) {\n super.set(\"consumes\", consumes);\n return this;\n }\n produces(produces) {\n super.set(\"produces\", produces);\n return this;\n }\n addProduce(produce) {\n const produces = uniq([].concat(this.get(\"produces\"), produce)).filter(Boolean);\n this.set(\"produces\", produces);\n }\n addOperationPath(method, path) {\n const operationPath = new JsonMethodPath(method, path);\n this.operationPaths.set(String(method) + String(path), operationPath);\n return operationPath;\n }\n getAllowedOperationPath(allowedVerbs) {\n if (!allowedVerbs) {\n return [...this.operationPaths.values()];\n }\n return [...this.operationPaths.values()].filter(({ method }) => method && allowedVerbs.includes(method.toUpperCase()));\n }\n}\n","import { __decorate, __metadata } from \"tslib\";\nimport { DecoratorTypes, deepMerge, descriptorOf, isCollection, isFunction, isPromise, Metadata, prototypeOf, Store } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonOperation } from \"./JsonOperation.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonMethodStore = class JsonMethodStore extends JsonEntityStore {\n constructor(options) {\n super({\n store: Store.fromMethod(options.target, options.propertyKey),\n descriptor: descriptorOf(options.target, options.propertyKey),\n ...options\n });\n this.parent = JsonEntityStore.from(this.target);\n this.middlewares = [];\n this.beforeMiddlewares = [];\n this.afterMiddlewares = [];\n /**\n * Ref to JsonOperation when the decorated object is a method.\n */\n this.operation = new JsonOperation();\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n this.children = new Map();\n const { beforeMiddlewares = [], middlewares = [], afterMiddlewares = [] } = options;\n this.after(afterMiddlewares);\n this.before(beforeMiddlewares);\n this.use(middlewares);\n }\n get params() {\n return this.parameters;\n }\n get view() {\n return this.store.get(\"view\");\n }\n set view(view) {\n this.store.set(\"view\", view);\n }\n get acceptMimes() {\n return this.store.get(\"acceptMimes\", []);\n }\n set acceptMimes(mimes) {\n this.store.set(\"acceptMimes\", mimes);\n }\n get parameters() {\n return [...this.children.values()];\n }\n get operationPaths() {\n return this.operation.operationPaths;\n }\n /**\n * Get an endpoint.\n * @param target\n * @param propertyKey\n * @param descriptor\n */\n static get(target, propertyKey, descriptor) {\n descriptor = descriptor || descriptorOf(prototypeOf(target), propertyKey);\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n getResponseOptions(status, { contentType = \"application/json\", includes } = {}) {\n const media = this.operation.getResponseOf(status).getMedia(contentType, false);\n if (media && media.has(\"schema\")) {\n const schema = media.get(\"schema\");\n let groups = media.groups;\n if (includes && media.allowedGroups?.size) {\n groups = [...(groups || []), ...includes.filter((include) => media.allowedGroups.has(include))];\n }\n return { type: schema.getComputedItemType(), groups };\n }\n return { type: this.type };\n }\n /**\n * Append middlewares to the beforeMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n before(args) {\n this.beforeMiddlewares = this.beforeMiddlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Append middlewares to the afterMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n after(args) {\n this.afterMiddlewares = this.afterMiddlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Store all arguments collected via Annotation.\n * @param args\n */\n use(args) {\n this.middlewares = this.middlewares.concat(args).filter(isFunction);\n return this;\n }\n /**\n * Find the value at the controller level. Let this value be extended or overridden by the endpoint itself.\n *\n * @param key\n * @returns {any}\n */\n get(key) {\n const ctrlValue = Store.from(this.target).get(key);\n return deepMerge(ctrlValue, this.store.get(key));\n }\n getParamTypes() {\n return [...this.children.values()].reduce((obj, item) => ({\n ...obj,\n [item.paramType]: true\n }), {});\n }\n build() {\n if (!this._type) {\n let type = Metadata.getReturnType(this.target, this.propertyKey);\n type = isPromise(type) ? undefined : type;\n this.buildType(type);\n }\n this._type = this._type || Object;\n this.parent.children.set(this.propertyName, this);\n if (isCollection(this._type)) {\n this.collectionType = this._type;\n // @ts-ignore\n delete this._type;\n }\n this._schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n if (this.collectionType) {\n this._schema.itemSchema(this.type);\n }\n this.parent.schema.addProperty(this.propertyName, this.schema);\n }\n};\nJsonMethodStore = __decorate([\n JsonEntityComponent(DecoratorTypes.METHOD),\n __metadata(\"design:paramtypes\", [Object])\n], JsonMethodStore);\nexport { JsonMethodStore };\nexport const EndpointMetadata = JsonMethodStore;\n","export var JsonParameterTypes;\n(function (JsonParameterTypes) {\n JsonParameterTypes[\"BODY\"] = \"body\";\n JsonParameterTypes[\"PATH\"] = \"path\";\n JsonParameterTypes[\"QUERY\"] = \"query\";\n JsonParameterTypes[\"HEADER\"] = \"header\";\n JsonParameterTypes[\"COOKIES\"] = \"cookie\";\n JsonParameterTypes[\"FILES\"] = \"files\";\n})(JsonParameterTypes || (JsonParameterTypes = {}));\n/**\n * @ignore\n */\nexport function formatParameterType(type) {\n return String(type).toLowerCase().replace(\"raw_\", \"\").replace(\"cookies\", \"cookie\");\n}\n/**\n * @ignore\n */\nexport function isParameterType(type) {\n return Object.values(JsonParameterTypes).includes(formatParameterType(type));\n}\n","import { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nimport { formatParameterType } from \"./JsonParameterTypes.js\";\nexport class JsonParameter extends JsonMap {\n constructor() {\n super(...arguments);\n this.$kind = \"operationInParameter\";\n this.nestedGenerics = [];\n }\n getName() {\n const name = this.get(\"name\");\n if (this.get(\"in\") === \"files\") {\n return name.split(\".\")[0];\n }\n return name;\n }\n name(name) {\n this.set(\"name\", name);\n return this;\n }\n examples(examples) {\n super.set(\"examples\", examples);\n return this;\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n in(inType, expression = \"\") {\n this.set(\"in\", formatParameterType(inType));\n this.expression = expression;\n return this;\n }\n required(required) {\n this.set(\"required\", required);\n return this;\n }\n schema(schema) {\n this.$schema = schema;\n return this;\n }\n toJSON(options) {\n return execMapper(\"operationInParameter\", [this], options);\n }\n}\n","import { __decorate, __metadata } from \"tslib\";\nimport { ancestorsOf, DecoratorTypes, isClass, isCollection, isMethodDescriptor, Metadata, prototypeOf } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonParameter } from \"./JsonParameter.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonParameterStore = class JsonParameterStore extends JsonEntityStore {\n constructor(options) {\n super(options);\n /**\n * Ref to JsonParameter when the decorated object is a parameter.\n */\n this.parameter = new JsonParameter();\n this.parent = JsonEntityStore.fromMethod(this.target, this.propertyKey);\n this.pipes = options.pipes || [];\n this.paramType = options.paramType || this.paramType;\n this.expression = options.expression || this.expression;\n this.dataPath = options.dataPath || this.dataPath;\n }\n get nestedGenerics() {\n return this.parameter.nestedGenerics;\n }\n set nestedGenerics(nestedGenerics) {\n this.parameter.nestedGenerics = nestedGenerics;\n }\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required() {\n return !!this.parameter.get(\"required\");\n }\n set required(value) {\n this.parameter.required(value);\n }\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n static getParams(target, propertyKey) {\n const params = [];\n const klass = ancestorsOf(target)\n .reverse()\n .find((target) => {\n return isMethodDescriptor(target, propertyKey) && JsonEntityStore.fromMethod(target, propertyKey).children.size;\n });\n if (klass) {\n JsonEntityStore.fromMethod(klass, propertyKey).children.forEach((param, index) => {\n params[+index] = param;\n });\n return params;\n }\n return [];\n }\n static get(target, propertyKey, index) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, index);\n }\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value) {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n getSchema(type) {\n if (isCollection(type) || !isClass(type)) {\n return JsonSchema.from({\n type\n });\n }\n return JsonEntityStore.from(type).schema;\n }\n build() {\n if (!this._type) {\n const type = Metadata.getParamTypes(prototypeOf(this.target), this.propertyKey)[this.index];\n this.buildType(type);\n }\n this._type = this._type || Object;\n if (!this._schema) {\n this.parent.children.set(this.index, this);\n this._schema = this.getSchema(this.collectionType || this.type);\n this.parameter.schema(this._schema);\n if (this.collectionType) {\n this._schema.itemSchema(this.getSchema(this.type));\n }\n this.parent.operation.addParameter(this.index, this.parameter);\n }\n }\n};\nJsonParameterStore = __decorate([\n JsonEntityComponent(DecoratorTypes.PARAM),\n __metadata(\"design:paramtypes\", [Object])\n], JsonParameterStore);\nexport { JsonParameterStore };\nexport const ParamMetadata = JsonParameterStore;\n","import { __decorate } from \"tslib\";\nimport { DecoratorTypes, Metadata, prototypeOf } from \"@tsed/core\";\nimport { JsonEntityComponent } from \"../decorators/config/jsonEntityComponent.js\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\nimport { JsonSchema } from \"./JsonSchema.js\";\nlet JsonPropertyStore = class JsonPropertyStore extends JsonEntityStore {\n constructor() {\n super(...arguments);\n this.parent = JsonEntityStore.from(this.target);\n }\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required() {\n return this.parent.schema.isRequired(this.propertyKey);\n }\n /**\n * Change the state of the required data.\n * @param value\n */\n set required(value) {\n if (value) {\n this.parent.schema.addRequired(this.propertyKey);\n }\n else {\n this.parent.schema.removeRequired(this.propertyKey);\n }\n }\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n discriminatorKey() {\n this.parent.schema.discriminatorKey(String(this.propertyKey));\n this.itemSchema.isDiscriminatorKey = true;\n return this;\n }\n isDiscriminatorKey() {\n return this.itemSchema.isDiscriminatorKey;\n }\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value) {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n build() {\n if (!this._type) {\n this.buildType(Metadata.getType(prototypeOf(this.target), this.propertyKey));\n }\n this._type = this._type || Object;\n const properties = this.parent.schema.get(\"properties\");\n let schema = properties[this.propertyName];\n if (!schema) {\n this.parent.children.set(this.propertyName, this);\n schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n if (this.collectionType) {\n schema.itemSchema(this.type);\n }\n }\n this.parent.schema.addProperty(this.propertyName, schema);\n this._schema = schema;\n }\n static get(target, propertyKey) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey);\n }\n};\nJsonPropertyStore = __decorate([\n JsonEntityComponent(DecoratorTypes.PROP)\n], JsonPropertyStore);\nexport { JsonPropertyStore };\nexport const PropertyMetadata = JsonPropertyStore;\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { JsonClassStore } from \"../domain/JsonClassStore.js\";\nimport { JsonEntitiesContainer, JsonEntityStore } from \"../domain/JsonEntityStore.js\";\nimport { JsonMethodStore } from \"../domain/JsonMethodStore.js\";\nimport { JsonParameterStore } from \"../domain/JsonParameterStore.js\";\nimport { JsonPropertyStore } from \"../domain/JsonPropertyStore.js\";\nJsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore);\nJsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore);\nJsonEntitiesContainer.set(DecoratorTypes.PARAM, JsonParameterStore);\nJsonEntitiesContainer.set(DecoratorTypes.METHOD, JsonMethodStore);\nexport function getJsonEntityStore(...args) {\n return JsonEntityStore.from(...args);\n}\n","export class JsonOperationPathsMap extends Map {\n constructor() {\n super(...arguments);\n this.$kind = \"operationPaths\";\n this.$isJsonDocument = true;\n this.getKey = (method, path) => `${method}-${path}`;\n }\n setOperationPath(operationPath) {\n // if (operationPath.method !== OperationVerbs.CUSTOM) {\n const key = this.getKey(operationPath.method, operationPath.path);\n this.set(key, operationPath);\n // }\n }\n}\n","import { ancestorsOf } from \"@tsed/core\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * Return store and his inherited stores\n * @param target\n * @ignore\n */\nexport function getInheritedStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$inherited) {\n store.$inherited = ancestorsOf(store.target)\n .reverse()\n .reduce((context, model) => {\n return context.set(model, getJsonEntityStore(model));\n }, new Map());\n }\n return store.$inherited;\n}\n","import { JsonMethodStore } from \"../domain/JsonMethodStore.js\";\nimport { JsonOperationPathsMap } from \"../domain/JsonOperationPathsMap.js\";\nimport { getInheritedStores } from \"./getInheritedStores.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * @ignore\n */\nexport function getOperationsStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$operations) {\n const operationPaths = new JsonOperationPathsMap();\n store.$operations = new Map();\n getInheritedStores(store).forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (propStore instanceof JsonMethodStore && !store.$operations.has(propStore.propertyKey)) {\n store.$operations.set(propStore.propertyKey, propStore);\n }\n });\n });\n store.$operations.forEach((store) => {\n store.operation.operationPaths.forEach((operationPath) => {\n operationPaths.setOperationPath(operationPath);\n });\n });\n operationPaths.clear();\n }\n return store.$operations;\n}\n","export function removeHiddenOperation(operationStore) {\n return !operationStore.store.get(\"hidden\");\n}\n","import { camelCase } from \"change-case\";\nimport { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { buildPath } from \"../../utils/buildPath.js\";\nimport { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\nimport { getOperationsStores } from \"../../utils/getOperationsStores.js\";\nimport { removeHiddenOperation } from \"../../utils/removeHiddenOperation.js\";\nconst ALLOWED_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];\nfunction pushToChannels(options) {\n return (channels, { operationPath, operationStore }) => {\n const path = options.ctrlRootPath || \"/\";\n const method = operationPath.method.toLowerCase();\n const operationId = camelCase(`${method.toLowerCase()} ${operationStore.parent.schema.getName()}`);\n const message = execMapper(\"message\", [operationStore, operationPath], options);\n return {\n ...channels,\n [path]: {\n ...channels[path],\n [method]: {\n ...channels[path]?.[method],\n operationId,\n message: {\n oneOf: [...(channels[path]?.[method]?.message?.oneOf || []), message]\n }\n }\n }\n };\n };\n}\nfunction expandOperationPaths(options) {\n return (operationStore) => {\n const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);\n if (operationPaths.length === 0) {\n return [];\n }\n return operationPaths.map((operationPath) => {\n return {\n operationPath,\n operationStore\n };\n });\n };\n}\nexport function channelsMapper(model, { channels, rootPath, ...options }) {\n const store = getJsonEntityStore(model);\n const ctrlPath = store.path;\n const ctrlRootPath = buildPath(rootPath + ctrlPath);\n options = {\n ...options,\n ctrlRootPath\n };\n return [...getOperationsStores(model).values()]\n .filter(removeHiddenOperation)\n .flatMap(expandOperationPaths(options))\n .reduce(pushToChannels(options), channels);\n}\nregisterJsonSchemaMapper(\"channels\", channelsMapper);\n","export var SpecTypes;\n(function (SpecTypes) {\n SpecTypes[\"JSON\"] = \"jsonschema\";\n SpecTypes[\"SWAGGER\"] = \"swagger2\";\n SpecTypes[\"OPENAPI\"] = \"openapi3\";\n SpecTypes[\"ASYNCAPI\"] = \"asyncapi2\";\n})(SpecTypes || (SpecTypes = {}));\n","export function makeOf(key, schemes) {\n if (schemes.length) {\n if (schemes.length === 1) {\n return schemes[0];\n }\n else {\n return { [key]: schemes };\n }\n }\n return null;\n}\n","import { cleanObject, getValue } from \"@tsed/core\";\nimport { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nexport function messageMapper(jsonOperationStore, operationPath, { tags = [], defaultTags = [], ...options } = {}) {\n const { path: event, method } = operationPath;\n const messageKey = String(event);\n let message = getValue(options.components, \"messages.\" + event, cleanObject({\n description: jsonOperationStore.operation.get(\"description\"),\n summary: jsonOperationStore.operation.get(\"summary\")\n }));\n if (method.toUpperCase() === OperationVerbs.PUBLISH) {\n const payload = execMapper(\"payload\", [jsonOperationStore, operationPath], options);\n if (payload) {\n message.payload = payload;\n }\n const responses = jsonOperationStore.operation\n .getAllowedOperationPath([OperationVerbs.SUBSCRIBE])\n .map((operationPath) => {\n return execMapper(\"message\", [jsonOperationStore, operationPath], options);\n })\n .filter(Boolean);\n const responsesSchema = makeOf(\"oneOf\", responses);\n if (responsesSchema) {\n message[\"x-response\"] = responsesSchema;\n }\n }\n else {\n const response = execMapper(\"response\", [jsonOperationStore, operationPath], options);\n if (response) {\n message[\"x-response\"] = response;\n }\n }\n options.components.messages = options.components.messages || {};\n options.components.messages[messageKey] = message;\n return { $ref: `#/components/messages/${messageKey}` };\n}\nregisterJsonSchemaMapper(\"message\", messageMapper, SpecTypes.ASYNCAPI);\n","/**\n * @ignore\n * @param genericLabels\n * @param genericTypes\n */\nexport function getGenericsMap(genericLabels, genericTypes) {\n return genericLabels.reduce((map, item, index) => map.set(item, genericTypes[index]), new Map());\n}\n/**\n * @ignore\n * @param options\n */\nexport function mapGenericsOptions(options) {\n if (options.genericLabels && options.genericTypes) {\n const { genericLabels, genericTypes, ...ops } = options;\n return {\n ...ops,\n generics: getGenericsMap(genericLabels, genericTypes)\n };\n }\n return options;\n}\n/**\n * @ignore\n * @param value\n */\nexport function popGenerics(value) {\n const [genericTypes, ...out] = value.nestedGenerics;\n return {\n genericTypes,\n nestedGenerics: out\n };\n}\n","import { setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { isParameterType, JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nfunction mapOptions(parameter, options = {}) {\n return {\n ...options,\n groups: parameter.groups,\n groupsName: parameter.groupsName\n };\n}\nfunction getParameters(jsonOperation, options) {\n return jsonOperation.get(\"parameters\").filter((parameter) => isParameterType(parameter.get(\"in\")));\n}\nexport function payloadMapper(jsonOperationStore, operationPath, options) {\n const parameters = getParameters(jsonOperationStore.operation, options);\n const payloadName = pascalCase([operationPath.path, operationPath.method, \"Payload\"].join(\" \"));\n setValue(options, `components.schemas.${payloadName}`, {});\n const allOf = parameters\n .map((parameter) => {\n const opts = mapOptions(parameter, options);\n const jsonSchema = execMapper(\"item\", [parameter.$schema], {\n ...opts,\n ...popGenerics(parameter)\n });\n switch (parameter.get(\"in\")) {\n case JsonParameterTypes.BODY:\n return jsonSchema;\n case JsonParameterTypes.QUERY:\n case JsonParameterTypes.PATH:\n case JsonParameterTypes.HEADER:\n return {\n type: \"object\",\n properties: {\n [parameter.get(\"name\")]: jsonSchema\n }\n };\n }\n return jsonSchema;\n }, {})\n .filter(Boolean);\n return makeOf(\"allOf\", allOf);\n}\nregisterJsonSchemaMapper(\"payload\", payloadMapper, SpecTypes.ASYNCAPI);\n","import { setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { makeOf } from \"../../utils/somethingOf.js\";\nexport function responsePayloadMapper(jsonOperationStore, operationPath, options) {\n const responses = jsonOperationStore.operation.getResponses();\n const statuses = [];\n const statusesTexts = [];\n const successSchemes = [];\n const errorSchemes = [];\n [...responses.entries()].forEach(([status, jsonResponse]) => {\n const response = execMapper(\"map\", [jsonResponse], options);\n statuses.push(+status);\n statusesTexts.push(response.description);\n if (+status !== 204) {\n const { content } = response;\n const schema = content[Object.keys(content)[0]];\n if (+status >= 200 && +status < 400) {\n successSchemes.push(schema);\n }\n else {\n successSchemes.push(schema);\n }\n }\n });\n const responsePayloadName = pascalCase([operationPath.path, operationPath.method, \"Response\"].join(\" \"));\n const responsePayload = {\n type: \"object\",\n properties: {\n status: {\n type: \"number\",\n enum: statuses\n },\n statusText: {\n type: \"string\",\n enum: statusesTexts\n }\n },\n required: [\"status\"]\n };\n const dataSchema = makeOf(\"oneOf\", successSchemes);\n if (dataSchema) {\n setValue(responsePayload, \"properties.data\", dataSchema);\n }\n const errorSchema = makeOf(\"oneOf\", errorSchemes);\n if (errorSchemes.length) {\n setValue(responsePayload, \"properties.error\", errorSchema);\n }\n setValue(options, `components.schemas.${responsePayloadName}`, responsePayload);\n return { $ref: `#/components/schemas/${responsePayloadName}` };\n}\nregisterJsonSchemaMapper(\"response\", responsePayloadMapper, SpecTypes.ASYNCAPI);\n","import { uniqBy } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction generate(model, options) {\n const specJson = {\n channels: execMapper(\"channels\", [model], options)\n };\n specJson.tags = uniqBy(options.tags, \"name\");\n if (options.components?.schemas && Object.keys(options.components.schemas).length) {\n specJson.components = {\n ...options.components,\n schemas: options.components.schemas\n };\n }\n return specJson;\n}\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.ASYNCAPI);\n","import { nameOf } from \"@tsed/core\";\nimport { getJsonEntityStore } from \"../utils/getJsonEntityStore.js\";\nexport class JsonLazyRef {\n constructor(getType) {\n this.getType = getType;\n this.isLazyRef = true;\n }\n get target() {\n return this.getType();\n }\n get schema() {\n return getJsonEntityStore(this.getType()).schema;\n }\n get name() {\n return nameOf(this.getType());\n }\n}\n","import { cleanObject, setValue } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\n/**\n * ignore\n * @param options\n */\nfunction getHost(options) {\n const { host = `#/${[SpecTypes.OPENAPI, SpecTypes.ASYNCAPI].includes(options.specType) ? \"components/schemas\" : \"definitions\"}` } = options;\n return host;\n}\n/**\n * @ignore\n */\nexport function createRefName(name, options) {\n if (options.groups && options.groups.length) {\n return pascalCase(`${name} ${options.groupsName || options.groups.join(\" \")}`);\n }\n return name;\n}\n/**\n * @ignore\n */\nexport function createRef(name, schema, options) {\n const host = getHost(options);\n const ref = {\n $ref: `${host}/${name}`\n };\n const readOnly = schema.isReadOnly;\n const writeOnly = schema.isWriteOnly;\n return cleanObject({\n readOnly: readOnly ? true : undefined,\n writeOnly: writeOnly ? true : undefined,\n ...(readOnly || writeOnly\n ? {\n anyOf: [ref]\n }\n : ref)\n });\n}\n/**\n * @ignore\n */\nexport function toRef(value, schema, options) {\n const name = createRefName(value.getName(), options);\n if (schema) {\n setValue(options, `components.schemas.${name}`, schema);\n }\n return createRef(name, value, options);\n}\n","import { JsonLazyRef } from \"../../domain/JsonLazyRef.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { execMapper, execOneOfMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\nimport { toRef } from \"../../utils/ref.js\";\nexport function anyMapper(input, options = {}) {\n if (typeof input !== \"object\" || input === null) {\n return input;\n }\n if (input instanceof JsonLazyRef) {\n return execMapper(\"lazyRef\", [input], options);\n }\n if (input instanceof JsonSchema && input.get(\"enum\") instanceof JsonSchema) {\n const enumSchema = input.get(\"enum\");\n return toRef(enumSchema, enumSchema.toJSON(options), options);\n }\n if (input.$kind && input.$isJsonDocument) {\n const kind = execOneOfMapper([input.$kind, \"map\"], options);\n const schema = execMapper(kind, [input], mapGenericsOptions(options));\n return input.canRef ? toRef(input, schema, options) : schema;\n }\n return execMapper(\"object\", [input], options);\n}\nregisterJsonSchemaMapper(\"any\", anyMapper);\n","import { getValue, setValue } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions, popGenerics } from \"../../utils/generics.js\";\nimport { createRef, createRefName } from \"../../utils/ref.js\";\nexport function classMapper(value, options) {\n const store = JsonEntityStore.from(value.class);\n const name = createRefName(store.schema.getName() || value.getName(), options);\n if (value.hasGenerics) {\n // Inline generic\n const { type, properties, additionalProperties, items, ...props } = value.toJSON(options);\n const schema = {\n ...execMapper(\"any\", [store.schema], {\n ...options,\n ...popGenerics(value),\n root: false\n }),\n ...props\n };\n if (schema.title) {\n const name = createRefName(schema.title, options);\n setValue(options.components, `schemas.${name}`, schema);\n delete schema.title;\n return createRef(name, value, options);\n }\n return schema;\n }\n if (!getValue(options, `components.schemas.${name}`)) {\n // avoid infinite calls\n setValue(options, `components.schemas.${name}`, {});\n options.components.schemas[name] = execMapper(\"any\", [store.schema], mapGenericsOptions({\n ...options,\n root: false\n }));\n }\n return createRef(name, value, options);\n}\nregisterJsonSchemaMapper(\"class\", classMapper);\n","import { isString } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { toRef } from \"../../utils/ref.js\";\nexport function discriminatorMappingMapper(obj, _, options) {\n if (obj.discriminator?.mapping) {\n const entries = Object.entries(obj.discriminator.mapping);\n const newMapping = {};\n for (const [key, value] of entries) {\n newMapping[key] = isString(value) ? value : toRef(value, null, options).$ref;\n }\n obj.discriminator.mapping = newMapping;\n }\n return obj;\n}\nfunction defaultDiscriminatorMappingMapper(obj) {\n if (obj.discriminator?.mapping) {\n delete obj.discriminator.mapping;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"discriminatorMapping\", defaultDiscriminatorMappingMapper);\n","import { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function enumsMapper(obj, schema, options) {\n if (options.inlineEnums && obj.enum?.$isJsonDocument) {\n obj.enum = obj.enum.toJSON().enum;\n }\n if (obj.enum) {\n obj.type = obj.type === \"object\" || obj.type === undefined ? \"string\" : obj.type;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"enums\", enumsMapper);\n","import { isClass, isPrimitiveClass } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nimport { getJsonType } from \"../../utils/getJsonType.js\";\n/**\n * @ignore\n */\nexport function genericsMapper(obj, options) {\n const { generics } = options;\n if (generics && obj.$ref) {\n if (generics.has(obj.$ref)) {\n let type = generics.get(obj.$ref);\n if (isPrimitiveClass(type)) {\n return {\n type: getJsonType(type)\n };\n }\n if (type === Date) {\n return {\n type: \"string\",\n format: \"date-time\"\n };\n }\n if (type.toJSON) {\n return type.toJSON({\n ...options,\n generics: undefined\n });\n }\n if (type === Object) {\n return {\n type: \"object\"\n };\n }\n if (isClass(type)) {\n const model = {\n class: type\n };\n if (options.nestedGenerics.length === 0) {\n return execMapper(\"class\", [model], {\n ...options,\n generics: undefined\n });\n }\n const store = JsonEntityStore.from(model.class);\n return execMapper(\"schema\", [store.schema], {\n ...options,\n ...popGenerics(options),\n root: false\n });\n }\n }\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"generics\", genericsMapper);\n","import { classOf, deepMerge } from \"@tsed/core\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { getInheritedStores } from \"../../utils/getInheritedStores.js\";\nfunction alterMerge(_, obj) {\n if (obj?.type && obj?.$ref) {\n const { $ref, ...schema } = obj;\n obj = {\n allOf: [\n {\n $ref\n },\n schema\n ]\n };\n }\n return obj;\n}\n/**\n * @ignore\n */\nexport function inheritedClassMapper(obj, { target, ...options }) {\n const stores = Array.from(getInheritedStores(target).entries()).filter(([model]) => classOf(model) !== classOf(target));\n if (stores.length) {\n const schema = stores.reduce((obj, [, store]) => {\n return deepMerge(obj, execMapper(\"schema\", [store.schema], options), { alter: alterMerge });\n }, {});\n return deepMerge(schema, obj, { alter: alterMerge });\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"inheritedClass\", inheritedClassMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function itemMapper(value, options) {\n return value && value.isClass ? execMapper(\"class\", [value], options) : execMapper(\"any\", [value], options);\n}\nregisterJsonSchemaMapper(\"item\", itemMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\nimport { createRef, toRef } from \"../../utils/ref.js\";\nexport function lazyRefMapper(jsonLazyRef, options) {\n const name = jsonLazyRef.name;\n if (options.$refs?.find((t) => t === jsonLazyRef.target)) {\n return createRef(name, jsonLazyRef.schema, options);\n }\n options.$refs = [...(options.$refs || []), jsonLazyRef.target];\n const schema = jsonLazyRef.getType() && execMapper(\"schema\", [jsonLazyRef.schema], mapGenericsOptions(options));\n return toRef(jsonLazyRef.schema, schema, options);\n}\nregisterJsonSchemaMapper(\"lazyRef\", lazyRefMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { mapGenericsOptions } from \"../../utils/generics.js\";\n/**\n * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.\n * @param input\n * @param ignore\n * @param options\n * @ignore\n */\nexport function mapMapper(input, { ignore = [], ...options } = {}) {\n options = mapGenericsOptions(options);\n return Array.from(input.entries()).reduce((obj, [key, value]) => {\n if (ignore.includes(key)) {\n return obj;\n }\n obj[key] = execMapper(\"item\", [value], options);\n return obj;\n }, {});\n}\nregisterJsonSchemaMapper(\"map\", mapMapper);\n","export const MANY_OF_PROPERTIES = [\"oneOf\", \"allOf\", \"anyOf\"];\nexport const STRING_PROPERTIES = [\"minLength\", \"maxLength\", \"pattern\", \"format\"];\nexport const BOOLEAN_PROPERTIES = [];\nexport const NUMBER_PROPERTIES = [\"minimum\", \"maximum\", \"exclusiveMinimum\", \"exclusiveMaximum\", \"multipleOf\"];\nexport const ARRAY_PROPERTIES = [\"maxItems\", \"minItems\", \"uniqueItems\", \"items\", \"contains\", \"maxContains\", \"minContains\"];\nexport const OBJECT_PROPERTIES = [\n \"maxItems\",\n \"minItems\",\n \"uniqueItems\",\n \"items\",\n \"contains\",\n \"maxContains\",\n \"minContains\",\n \"patternProperties\",\n \"dependencies\"\n];\nexport const COMMON_PROPERTIES = [\"const\", \"enum\"];\n","import { cleanObject } from \"@tsed/core\";\nimport { MANY_OF_PROPERTIES } from \"../../constants/jsonSchemaProperties.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function nullableMapper(obj, schema) {\n if (!schema?.isNullable) {\n return obj;\n }\n if (!obj.discriminator) {\n if (obj.$ref) {\n obj = cleanObject({\n ...obj,\n $ref: undefined,\n anyOf: [\n { type: \"null\" },\n {\n $ref: obj.$ref\n }\n ]\n });\n }\n else {\n MANY_OF_PROPERTIES.some((keyword) => {\n if (obj[keyword]) {\n obj[keyword] = obj[keyword].filter((item) => item.type !== \"null\");\n if (obj[keyword].length === 1) {\n const base = obj[keyword];\n obj = cleanObject({\n ...obj,\n ...base[0],\n [keyword]: undefined,\n type: [\"null\", Number.isInteger(obj.multipleOf) ? \"integer\" : base[0].type]\n });\n }\n else {\n obj[keyword] = [{ type: \"null\" }].concat(obj[keyword]).map((item) => {\n if (Number.isInteger(item.multipleOf)) {\n item.type = \"integer\";\n }\n return item;\n });\n delete obj.type;\n }\n }\n });\n }\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"nullable\", nullableMapper);\n","import { isBoolean } from \"@tsed/core\";\n/**\n * @ignore\n * @param schema\n * @param options\n */\nexport function alterIgnore(schema, options) {\n if (isBoolean(schema.$ignore) && schema.$ignore) {\n return true;\n }\n let result = schema?.$hooks?.alter(\"ignore\", false, [options]);\n if (result) {\n return result;\n }\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"groups\", false, [options.groups]);\n }\n return result;\n}\n","import { isArray } from \"@tsed/core\";\nimport { alterIgnore } from \"../../hooks/alterIgnore.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\n/**\n * Serialize Any object to a json schema\n * @param input\n * @param options\n * @ignore\n */\nexport function objectMapper(input, options) {\n const { specType, operationIdFormatter, root, components, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx } = options;\n return Object.entries(input).reduce((obj, [key, value]) => {\n if (options.withIgnoredProps !== false && !alterIgnore(value, ctx)) {\n const opts = {\n ...options,\n groups: input?.$forwardGroups || value?.$forwardGroups ? options.groups : undefined\n };\n // remove groups to avoid bad schema generation over children models\n obj[key] = execMapper(\"item\", [value], opts);\n obj[key] = execMapper(\"nullable\", [obj[key], value], opts);\n }\n return obj;\n }, isArray(input) ? [] : {});\n}\nregisterJsonSchemaMapper(\"object\", objectMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function ofMapper(input, options, parent) {\n return input.map((value) => {\n return execMapper(\"item\", [value], {\n ...options,\n genericLabels: parent.genericLabels\n });\n });\n}\nregisterJsonSchemaMapper(\"anyOf\", ofMapper);\nregisterJsonSchemaMapper(\"allOf\", ofMapper);\nregisterJsonSchemaMapper(\"oneOf\", ofMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function propertiesMapper(input, options, parent) {\n if (input.isClass) {\n return execMapper(\"class\", [input], options);\n }\n return execMapper(\"any\", [input], {\n ...options,\n genericLabels: parent.genericLabels\n });\n}\nregisterJsonSchemaMapper(\"properties\", propertiesMapper);\nregisterJsonSchemaMapper(\"items\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"propertyNames\", propertiesMapper);\nregisterJsonSchemaMapper(\"contains\", propertiesMapper);\nregisterJsonSchemaMapper(\"dependencies\", propertiesMapper);\nregisterJsonSchemaMapper(\"patternProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalItems\", propertiesMapper);\nregisterJsonSchemaMapper(\"not\", propertiesMapper);\nregisterJsonSchemaMapper(\"definitions\", propertiesMapper);\n","/**\n * @ignore\n */\nexport function alterRequiredGroups(required, schema, options) {\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"requiredGroups\", required, [options.groups]);\n }\n return required;\n}\n","import { uniq } from \"@tsed/core\";\nimport { alterRequiredGroups } from \"../../hooks/alterRequiredGroups.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction mapRequiredProps(obj, schema, options = {}) {\n const { useAlias } = options;\n const props = Object.keys(obj.properties || {});\n return (keys, key) => {\n const aliasedKey = useAlias ? schema.alias.get(key) || key : key;\n if (props.includes(aliasedKey)) {\n return keys.concat(aliasedKey);\n }\n return keys;\n };\n}\nfunction extractRequiredProps(obj, schema, options) {\n let required = obj.required || [];\n required = [...required, ...schema.$required];\n if (schema.get(\"properties\")) {\n required = Object.entries(schema.get(\"properties\")).reduce((required, [key, prop]) => {\n if (prop && prop.$selfRequired !== undefined) {\n return prop.$selfRequired ? required.concat(key) : required.filter((k) => k === key);\n }\n return required;\n }, required);\n }\n return alterRequiredGroups(uniq(required), schema, options);\n}\nexport function requiredMapper(obj, schema, options) {\n if (options.groups && options.groups.includes(\"partial\")) {\n if (obj.discriminator) {\n return {\n ...obj,\n required: [obj.discriminator.propertyName]\n };\n }\n return obj;\n }\n let required = extractRequiredProps(obj, schema, options);\n required = uniq(required).reduce(mapRequiredProps(obj, schema, options), []);\n if (obj.discriminator) {\n required.push(obj.discriminator.propertyName);\n }\n if (required.length) {\n obj.required = required;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"required\", requiredMapper);\n","/**\n * @ignore\n */\nexport function mapAliasedProperties(value, alias) {\n return Object.entries(value).reduce((properties, [key, value]) => {\n key = alias.get(key) || key;\n properties[key] = value;\n return properties;\n }, {});\n}\n","import { isBoolean, isNumber, isString } from \"@tsed/core\";\nimport { ARRAY_PROPERTIES, BOOLEAN_PROPERTIES, COMMON_PROPERTIES, MANY_OF_PROPERTIES, NUMBER_PROPERTIES, OBJECT_PROPERTIES, STRING_PROPERTIES } from \"../constants/jsonSchemaProperties.js\";\nfunction findManyOf(obj) {\n return MANY_OF_PROPERTIES.find((keyword) => obj[keyword]);\n}\nconst RULES = {\n string: { properties: STRING_PROPERTIES, is: isString },\n number: { properties: NUMBER_PROPERTIES, is: isNumber },\n boolean: { properties: BOOLEAN_PROPERTIES, is: isBoolean },\n array: { properties: ARRAY_PROPERTIES, is: () => false },\n object: { properties: OBJECT_PROPERTIES, is: () => false }\n};\nfunction pickProperties(type, obj, item) {\n const rule = RULES[type];\n rule?.properties.concat(COMMON_PROPERTIES).forEach((keyword) => {\n if (obj[keyword] !== undefined) {\n if (COMMON_PROPERTIES.includes(keyword)) {\n item[keyword] = obj[keyword].filter(rule.is);\n }\n else {\n item[keyword] = obj[keyword];\n delete obj[keyword];\n }\n }\n });\n}\nexport function alterOneOf(obj, schema, options) {\n const kind = findManyOf(obj);\n if (kind) {\n obj[kind].forEach((item) => {\n pickProperties(item.type, obj, item);\n });\n MANY_OF_PROPERTIES.forEach((keyword) => {\n if (obj[keyword] && options.groups !== false && schema.$hooks.has(keyword)) {\n obj = { ...obj, [keyword]: schema.$hooks.alter(keyword, obj[keyword], [options.groups]) };\n }\n });\n delete obj.const;\n delete obj.enum;\n if (!(obj.items || obj.properties)) {\n delete obj.type;\n }\n }\n return obj;\n}\n","import { getValue, isObject } from \"@tsed/core\";\nimport { mapAliasedProperties } from \"../../domain/JsonAliasMap.js\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { alterOneOf } from \"../../hooks/alterOneOf.js\";\nimport { execMapper, hasMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\n/**\n * @ignore\n */\nconst IGNORES = [\"name\", \"$required\", \"$hooks\", \"_nestedGenerics\", SpecTypes.OPENAPI, SpecTypes.SWAGGER, SpecTypes.JSON];\n/**\n * @ignore\n */\nconst IGNORES_OPENSPEC = [];\n/**\n * @ignore\n */\nfunction isEmptyProperties(key, value) {\n return typeof value === \"object\" && [\"items\", \"properties\", \"additionalProperties\"].includes(key) && Object.keys(value).length === 0;\n}\n/**\n * @ignore\n */\nfunction shouldMapAlias(key, value, useAlias) {\n return typeof value === \"object\" && useAlias && [\"properties\", \"additionalProperties\"].includes(key);\n}\n/**\n * @ignore\n */\nfunction shouldSkipKey(key, { specType = SpecTypes.JSON, customKeys = false }) {\n return (IGNORES.includes(key) ||\n (key.startsWith(\"#\") && (customKeys === false || specType !== SpecTypes.JSON)) ||\n (specType !== SpecTypes.JSON && IGNORES_OPENSPEC.includes(key)));\n}\nfunction isExample(key, value, options) {\n return key === \"examples\" && isObject(value) && [SpecTypes.OPENAPI, SpecTypes.ASYNCAPI].includes(options.specType);\n}\nfunction mapOptions(options) {\n let addDef = false;\n if (!options) {\n addDef = true;\n options = { components: { schemas: {} }, inlineEnums: true };\n }\n const { useAlias = true, components = { schemas: {} } } = options;\n options = {\n ...options,\n useAlias,\n components\n };\n return {\n addDef,\n options\n };\n}\nfunction mapKeys(schema, options) {\n const { useAlias } = options;\n return [...schema.keys()]\n .filter((key) => !shouldSkipKey(key, options))\n .reduce((item, key) => {\n let value = schema.get(key);\n key = key.replace(/^#/, \"\");\n if (key === \"type\") {\n item[key] = schema.getJsonType();\n return item;\n }\n if (isExample(key, value, options)) {\n key = \"example\";\n value = Object.values(value)[0];\n }\n if (value && typeof value === \"object\" && hasMapper(key)) {\n value = execMapper(key, [value], options, schema);\n if (isEmptyProperties(key, value)) {\n return item;\n }\n if (shouldMapAlias(key, value, useAlias)) {\n value = mapAliasedProperties(value, schema.alias);\n }\n }\n item[key] = value;\n return item;\n }, {});\n}\nfunction serializeSchema(schema, options) {\n let obj = mapKeys(schema, options);\n if (schema.isClass) {\n obj = execMapper(\"inheritedClass\", [obj], {\n ...options,\n root: false,\n target: schema.getComputedType()\n });\n }\n obj = execMapper(\"generics\", [obj], {\n ...options,\n root: false\n });\n if (schema.has(options.specType)) {\n obj = {\n ...obj,\n ...schema.get(options.specType).toJSON(options)\n };\n }\n obj = execMapper(\"required\", [obj, schema], options);\n obj = execMapper(\"nullable\", [obj, schema], options);\n obj = alterOneOf(obj, schema, options);\n obj = execMapper(\"enums\", [obj, schema], options);\n obj = execMapper(\"discriminatorMapping\", [obj, schema], options);\n return obj;\n}\nexport function schemaMapper(schema, opts) {\n const { options, addDef } = mapOptions(opts);\n const obj = serializeSchema(schema, options);\n if (addDef && Object.keys(getValue(options, \"components.schemas\", {})).length) {\n obj.definitions = options.components.schemas;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"schema\", schemaMapper);\n","import { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { enumsMapper } from \"../default/enumsMapper.js\";\nexport function wrapEnumsMapper(obj, schema, options) {\n obj = enumsMapper(obj, schema, options);\n if (obj.const) {\n obj.enum = [obj.const];\n delete obj.const;\n }\n return obj;\n}\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.SWAGGER);\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.ASYNCAPI);\n","import { getValue, uniqBy } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction generate(model, options) {\n options = {\n ...options,\n specType: SpecTypes.OPENAPI\n };\n const specJson = {\n paths: execMapper(\"paths\", [model], options)\n };\n specJson.tags = uniqBy(options.tags, \"name\");\n if (Object.keys(getValue(options, \"components.schemas\", {})).length) {\n specJson.components = {\n schemas: options.components.schemas\n };\n }\n return specJson;\n}\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.SWAGGER);\n","import { cleanObject } from \"@tsed/core\";\nimport { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function nullableMapperOpenApi(obj, schema) {\n if (!schema?.isNullable) {\n return obj;\n }\n if (obj.$ref) {\n return cleanObject({\n ...obj,\n ...(obj.$ref && {\n anyOf: [\n {\n $ref: obj.$ref\n }\n ],\n type: undefined\n }),\n nullable: true,\n $ref: undefined\n });\n }\n return cleanObject({\n ...obj,\n ...(obj.anyOf?.length === 1\n ? {\n ...obj.anyOf[0],\n anyOf: undefined,\n type: Number.isInteger(obj.multipleOf) ? \"integer\" : obj.anyOf[0]?.type\n }\n : {\n type: obj.anyOf?.length > 1 ? undefined : obj.type,\n anyOf: obj.anyOf?.map((item) => {\n if (Number.isInteger(item.multipleOf)) {\n item.type = \"integer\";\n }\n return item;\n })\n }),\n nullable: true\n });\n}\nregisterJsonSchemaMapper(\"nullable\", nullableMapperOpenApi, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"nullable\", nullableMapperOpenApi, SpecTypes.SWAGGER);\n","import { cleanObject } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationInFilesMapper(parameter, { jsonSchema }) {\n const schema = {\n type: \"string\",\n format: \"binary\",\n oneOf: undefined\n };\n if (jsonSchema.type === \"array\") {\n jsonSchema.items = cleanObject({\n ...jsonSchema.items,\n ...schema\n });\n parameter.schema = jsonSchema;\n return parameter;\n }\n parameter.schema = cleanObject({\n ...jsonSchema,\n ...schema\n });\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInFiles\", operationInFilesMapper);\n","import { camelCase } from \"change-case\";\nimport { JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { execMapper, hasMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { popGenerics } from \"../../utils/generics.js\";\nfunction mapOptions(parameter, options = {}) {\n return {\n ...options,\n groups: parameter.groups,\n groupsName: parameter.groupsName\n };\n}\nexport function operationInParameterMapper(jsonParameter, opts) {\n const options = mapOptions(jsonParameter, opts);\n const schemas = { ...(options.components?.schemas || {}) };\n const { type, schema, ...parameter } = execMapper(\"map\", [jsonParameter], options);\n const jsonSchema = execMapper(\"item\", [jsonParameter.$schema], {\n ...options,\n ...popGenerics(jsonParameter)\n });\n parameter.required = parameter.required || jsonParameter.get(\"in\") === JsonParameterTypes.PATH;\n const paramOpts = {\n ...options,\n jsonSchema,\n jsonParameter,\n oldSchemas: schemas\n };\n const mapperName = camelCase(`operationIn ${jsonParameter.get(\"in\")}`);\n if (hasMapper(mapperName)) {\n return execMapper(mapperName, [parameter], paramOpts);\n }\n parameter.schema = jsonSchema;\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInParameter\", operationInParameterMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationInParametersMapper(parameters, options) {\n return parameters.flatMap((parameter) => execMapper(\"operationInParameter\", [parameter], options)).filter(Boolean);\n}\nregisterJsonSchemaMapper(\"operationInParameters\", operationInParametersMapper);\n","import { cleanObject } from \"@tsed/core\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { createRefName } from \"../../utils/ref.js\";\nfunction buildExamples(property, examples) {\n if (!examples) {\n return undefined;\n }\n let hasKey = false;\n const newExamples = Object.entries(examples).reduce((acc, [key, { value, description, ...props }]) => {\n if (value[property] === undefined) {\n return acc;\n }\n hasKey = true;\n return {\n ...acc,\n [key]: {\n ...props,\n value: value[property],\n description\n }\n };\n }, {});\n return hasKey ? newExamples : undefined;\n}\nfunction inlineReference(parameter, { jsonParameter, ...options }) {\n const name = createRefName(jsonParameter.$schema.getName(), options);\n const schema = options.components?.schemas?.[name];\n if (schema && !options.oldSchemas?.[name]) {\n delete options.components.schemas[jsonParameter.$schema.getName()];\n }\n return Object.entries(schema?.properties || {}).reduce((params, [key, { description, ...prop }]) => {\n return [\n ...params,\n cleanObject({\n ...parameter,\n name: key,\n required: (schema?.required || []).includes(key),\n description,\n schema: prop,\n style: prop.$ref ? \"deepObject\" : undefined,\n examples: buildExamples(key, parameter.examples)\n })\n ];\n }, []);\n}\nexport function operationInQueryMapper(parameter, { jsonSchema, jsonParameters, ...options }) {\n if (jsonSchema.$ref) {\n if (!parameter.name) {\n return inlineReference(parameter, options);\n }\n parameter.style = \"deepObject\";\n }\n parameter.schema = jsonSchema;\n return parameter;\n}\nregisterJsonSchemaMapper(\"operationInQuery\", operationInQueryMapper);\n","import { SpecTypes } from \"../../domain/SpecTypes.js\";\nimport { registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { discriminatorMappingMapper } from \"../default/discriminatorMappingMapper.js\";\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.SWAGGER);\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.ASYNCAPI);\n","import { constantCase } from \"change-case\";\nimport statuses from \"statuses\";\nexport const HTTP_STATUS_MESSAGES = statuses.codes.reduce((map, code) => {\n const message = String(statuses(code));\n return {\n ...map,\n [String(code)]: { label: message, code: constantCase(message) }\n };\n}, {});\nHTTP_STATUS_MESSAGES[\"200\"].label = \"Success\";\nHTTP_STATUS_MESSAGES[\"200\"].code = \"SUCCESS\";\nexport function getStatusConstant(status) {\n return HTTP_STATUS_MESSAGES[status]?.code;\n}\nexport function getStatusMessage(status) {\n return HTTP_STATUS_MESSAGES[status]?.label;\n}\n","import { getStatusMessage } from \"../../constants/httpStatusMessages.js\";\nimport { isParameterType, JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction extractParameters(jsonOperation, options) {\n return jsonOperation\n .get(\"parameters\")\n .filter((parameter) => isParameterType(parameter.get(\"in\")))\n .reduce((inputs, parameter) => {\n const [parameters, bodyParameters] = inputs;\n if ([JsonParameterTypes.BODY, JsonParameterTypes.FILES].includes(parameter.get(\"in\"))) {\n return [parameters, [...bodyParameters, parameter]];\n }\n return [[...parameters, parameter], bodyParameters];\n }, [[], []]);\n}\nexport function operationMapper(jsonOperation, { tags = [], defaultTags = [], ...options } = {}) {\n const { consumes, produces, ...operation } = execMapper(\"map\", [jsonOperation], { ...options, ignore: [\"parameters\"] });\n if (operation.security) {\n operation.security = [].concat(operation.security);\n }\n if (jsonOperation.get(\"responses\").size === 0) {\n operation.responses = {\n \"200\": {\n description: getStatusMessage(200)\n }\n };\n }\n const parametersOptions = {\n ...options,\n consumes: jsonOperation.get(\"consumes\")?.length ? jsonOperation.get(\"consumes\") : [\"application/json\"]\n };\n const [parameters, bodyParameters] = extractParameters(jsonOperation, parametersOptions);\n operation.parameters = execMapper(\"operationInParameters\", [parameters], options);\n if (bodyParameters.length) {\n operation.requestBody = execMapper(\"operationRequestBody\", [bodyParameters], parametersOptions);\n }\n const operationTags = operation.tags?.length ? operation.tags : defaultTags;\n if (operationTags.length) {\n operation.tags = operationTags.map(({ name }) => name);\n }\n tags.push(...operationTags);\n return operation;\n}\nregisterJsonSchemaMapper(\"operation\", operationMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationMediaMapper(jsonMedia, options) {\n let groups = [...(jsonMedia.groups || [])];\n return execMapper(\"map\", [jsonMedia], { ...options, groups, groupsName: jsonMedia.groupsName });\n}\nregisterJsonSchemaMapper(\"operationMedia\", operationMediaMapper);\n","import { toJsonMapCollection } from \"../utils/toJsonMapCollection.js\";\nimport { JsonMap } from \"./JsonMap.js\";\nexport class JsonRequestBody extends JsonMap {\n constructor(obj = {}) {\n super(obj);\n this.$kind = \"operationRequestBody\";\n this.content(obj.content || {});\n }\n description(description) {\n this.set(\"description\", description);\n return this;\n }\n content(content) {\n this.set(\"content\", toJsonMapCollection(content));\n return this;\n }\n addContent(mediaType, schema, examples) {\n const content = this.get(\"content\");\n const mediaContent = new JsonMap();\n mediaContent.set(\"schema\", schema);\n examples && mediaContent.set(\"examples\", examples);\n content.set(mediaType, mediaContent);\n return this;\n }\n required(required) {\n this.set(\"required\", required);\n return this;\n }\n}\n","import { JsonRequestBody } from \"../../domain/JsonRequestBody.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nfunction buildSchemaFromBodyParameters(parameters, options) {\n let schema = new JsonSchema();\n const props = {};\n const refs = [];\n let propsLength = 0;\n const hasFile = parameters.some((param) => param.get(\"in\") === \"files\");\n parameters.forEach((parameter) => {\n const name = parameter.getName();\n [...parameter.entries()]\n .filter(([key]) => ![\"in\", \"name\"].includes(key))\n .forEach(([key, value]) => {\n if (props[key] === undefined) {\n props[key] = value;\n }\n });\n const jsonParameter = execMapper(\"operationInParameter\", [parameter], options);\n if (name) {\n const propSchema = {\n ...(jsonParameter.schema || {\n type: jsonParameter.type\n })\n };\n if (hasFile && jsonParameter.description) {\n propSchema.description = jsonParameter.description;\n }\n schema.addProperty(name, propSchema);\n if (parameter.get(\"required\")) {\n schema.addRequired(name);\n }\n propsLength++;\n }\n else {\n refs.push(jsonParameter);\n }\n });\n if (!propsLength) {\n if (refs.length === 1) {\n return refs[0];\n }\n }\n schema.type(\"object\");\n if (props.description && hasFile) {\n delete props.description;\n }\n return {\n schema: schema.toJSON(options),\n required: false,\n ...props\n };\n}\nexport function operationRequestBodyMapper(bodyParameters, { consumes, ...options }) {\n const { schema, examples, in: _, ...props } = buildSchemaFromBodyParameters(bodyParameters, options);\n const requestBody = new JsonRequestBody(props);\n consumes.forEach((consume) => {\n requestBody.addContent(consume, schema, examples);\n });\n return execMapper(\"map\", [requestBody], options);\n}\nregisterJsonSchemaMapper(\"operationRequestBody\", operationRequestBodyMapper);\n","import { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nexport function operationResponseMapper(jsonResponse, options = {}) {\n const response = execMapper(\"map\", [jsonResponse], options);\n if (jsonResponse.status === 204) {\n delete response.content;\n }\n if (response.headers) {\n Object.entries(response.headers).forEach(([key, { type, ...props }]) => {\n response.headers[key] = {\n ...props,\n schema: {\n type\n }\n };\n });\n }\n return response;\n}\nregisterJsonSchemaMapper(\"operationResponse\", operationResponseMapper);\n","/**\n * @ignore\n */\nexport function concatParameters(parameters, operation) {\n return parameters\n .map((param) => {\n const f = operation.parameters.find((p) => p.in === param.in && p.name === param.name);\n return f || param;\n })\n .concat(...operation.parameters.filter((param) => param.in !== \"path\"));\n}\n","/**\n * @ignore\n */\nfunction getVariable(subpath) {\n const [prefix, right] = subpath.split(\"=\");\n const splited = (right || prefix).split(\".\");\n const name = splited.splice(0, 1)[0];\n return {\n prefix: right && prefix ? `${prefix}=` : \"\",\n name,\n postfix: splited.length ? `.${splited.join(\".\")}` : \"\"\n };\n}\nfunction parseUrl(key) {\n let inCapture = 0;\n return key\n .split(\"\")\n .filter((c) => {\n if (c === \"(\") {\n inCapture++;\n }\n const result = inCapture === 0;\n if (c === \")\") {\n inCapture--;\n }\n return result;\n })\n .join(\"\")\n .split(\"/\")\n .filter((o) => !!o);\n}\n/**\n * @ignore\n */\nexport function getJsonPathParameters(base, path = \"\") {\n if (path instanceof RegExp) {\n path = path.toString().replace(/^\\//g, \"\").replace(/\\/$/g, \"\").replace(/\\\\/g, \"\");\n }\n const params = [];\n const paths = [];\n let isOptional = false;\n let current = \"\";\n parseUrl(`${base}${path}`).map((key) => {\n const subpath = key.replace(\":\", \"\").replace(\"?\", \"\");\n if (key.includes(\":\")) {\n const optional = key.includes(\"?\");\n // Append previous config\n if (optional && !isOptional) {\n isOptional = true;\n paths.push({\n path: current,\n parameters: [].concat(params)\n });\n }\n const { prefix, name, postfix } = getVariable(subpath);\n current += `/${prefix}{${name}}${postfix}`;\n params.push({\n in: \"path\",\n name,\n type: \"string\",\n required: true\n });\n if (optional && isOptional) {\n paths.push({\n path: current,\n parameters: [].concat(params)\n });\n }\n }\n else {\n current += `/${key}`;\n }\n });\n return paths.length\n ? paths\n : [\n {\n path: current,\n parameters: [].concat(params)\n }\n ];\n}\n","import { camelCase } from \"change-case\";\nconst DEFAULT_PATTERN = \"%c.%m\";\n/**\n * @ignore\n */\nexport function operationIdFormatter(pattern = \"\") {\n const OPERATION_IDS = new Map();\n const transform = (name, propertyKey) => {\n const str = (pattern || DEFAULT_PATTERN).replace(/%c/, name).replace(/%m/, propertyKey);\n return pattern === \"\" ? camelCase(str) : str;\n };\n return (name, propertyKey, path = \"\") => {\n const operationId = transform(name, propertyKey);\n const operationKey = name + propertyKey;\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n return operationId;\n }\n // try with paths\n const result = path.match(/{(\\w+)}/gi);\n if (result) {\n const operationKey = name + propertyKey + result[0];\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n return camelCase(`${operationId} By ${result}`);\n }\n }\n const id = OPERATION_IDS.get(operationKey) + 1;\n OPERATION_IDS.set(operationKey, id);\n return `${operationId}_${id}`;\n };\n}\nexport function getOperationId(path, { store, operationIdFormatter }) {\n return operationIdFormatter(store.parent.schema.get(\"name\") || store.parent.targetName, store.propertyName, path);\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { execMapper, registerJsonSchemaMapper } from \"../../registries/JsonSchemaMapperContainer.js\";\nimport { buildPath } from \"../../utils/buildPath.js\";\nimport { concatParameters } from \"../../utils/concatParameters.js\";\nimport { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\nimport { getJsonPathParameters } from \"../../utils/getJsonPathParameters.js\";\nimport { getOperationsStores } from \"../../utils/getOperationsStores.js\";\nimport { getOperationId } from \"../../utils/operationIdFormatter.js\";\nimport { removeHiddenOperation } from \"../../utils/removeHiddenOperation.js\";\nconst ALLOWED_VERBS = [\n OperationVerbs.ALL,\n OperationVerbs.GET,\n OperationVerbs.POST,\n OperationVerbs.PUT,\n OperationVerbs.PATCH,\n OperationVerbs.HEAD,\n OperationVerbs.OPTIONS,\n OperationVerbs.DELETE,\n OperationVerbs.TRACE\n];\nfunction pushToPath(paths, { path, method, operation }) {\n return {\n ...paths,\n [path]: {\n ...paths[path],\n [method.toLowerCase()]: operation\n }\n };\n}\nfunction mapOperationInPathParameters(options) {\n return ({ operationPath, operation, operationStore }) => {\n const { path, method } = operationPath;\n return getJsonPathParameters(options.ctrlRootPath, path).map(({ path, parameters }) => {\n path = path ? path : \"/\";\n parameters = concatParameters(parameters.map(({ type, ...param }) => {\n return {\n ...param,\n schema: {\n type\n }\n };\n }), operation);\n return {\n operation: {\n ...operation,\n ...operationPath.toJSON(options),\n parameters,\n operationId: operation.operationId ||\n getOperationId(path, {\n ...options,\n store: operationStore\n })\n },\n method,\n path\n };\n });\n };\n}\nfunction mapOperation(options) {\n return (operationStore) => {\n const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);\n if (operationPaths.length === 0) {\n return [];\n }\n const operation = execMapper(\"operation\", [operationStore.operation], options);\n return operationPaths.map((operationPath) => {\n return {\n operationPath,\n operation,\n operationStore\n };\n });\n };\n}\nexport function pathsMapper(model, { paths, rootPath, ...options }) {\n const store = getJsonEntityStore(model);\n const ctrlPath = store.path;\n const ctrlRootPath = buildPath(rootPath + ctrlPath);\n options = {\n ...options,\n ctrlRootPath\n };\n return [...getOperationsStores(model).values()]\n .filter(removeHiddenOperation)\n .filter((operationStore) => operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS).length > 0)\n .flatMap(mapOperation(options))\n .flatMap(mapOperationInPathParameters(options))\n .reduce(pushToPath, paths);\n}\nregisterJsonSchemaMapper(\"paths\", pathsMapper);\n","import { getJsonEntityStore } from \"../../utils/getJsonEntityStore.js\";\n/**\n * Decorator util to compose another decorator. See @@Description@@ decorator implementation for more details.\n *\n * ## Usage\n *\n * ```typescript\n * export function Description(description: any) {\n * return JsonEntityFn((entity: JsonEntityStore, args: DecoratorParameters) => {\n * entity.itemSchema.description(description)\n * });\n * }\n * ```\n *\n * @param fn\n * @decorator\n * @utils\n * @model\n */\nexport function JsonEntityFn(fn) {\n return (...parameters) => {\n const result = fn(getJsonEntityStore(...parameters), parameters);\n if (typeof result === \"function\") {\n result(...parameters);\n }\n };\n}\n","import { Store } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add Children class to compose routes\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param children\n */\nexport function Children(...children) {\n return JsonEntityFn((store) => {\n store.store.set(\"childrenControllers\", children);\n children.forEach((childToken) => {\n Store.from(childToken).set(\"parentController\", store.token);\n });\n });\n}\n","import { snakeCase } from \"change-case\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Declare a Discriminator value on a child class.\n *\n * ```ts\n * export class Event {\n * @DiscriminatorKey() // declare this property a discriminator key\n * type: string;\n *\n * @Property()\n * value: string;\n * }\n *\n * @DiscriminatorValue(\"page_view\")\n * export class PageView extends Event {\n * @Required()\n * url: string;\n * }\n *\n * @DiscriminatorValue(\"action\")\n * export class Action extends Event {\n * @Required()\n * event: string;\n * }\n *\n * @DiscriminatorValue()\n * export class CustomAction extends Event {\n * @Required()\n * event: string;\n *\n * @Property()\n * meta: string;\n * }\n * ```\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param value\n * @param values\n */\nexport function DiscriminatorValue(value, ...values) {\n return JsonEntityFn((store) => {\n value = value || snakeCase(store.targetName);\n if (store.discriminatorAncestor) {\n store.schema.discriminatorValue(value, ...values);\n }\n });\n}\n","import { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n * ::: warning\n * You mustn't use the `type Type = string | number` as parameters Type.\n *\n * This example doesn't work:\n *\n * ```typescript\n * type Type = \"string\" | \"number\"\n * class Model {\n * @CollectionOf(Type)\n * property: Type[];\n * }\n * ```\n * :::\n *\n * @param {Type<any>} type\n * @param collectionType\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionOf(type, collectionType) {\n if (!type) {\n throw new Error(\"A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.\");\n }\n const schema = {};\n let contains = false;\n const decorator = (...args) => {\n const store = JsonEntityStore.from(...args);\n if (collectionType) {\n store.collectionType = collectionType;\n store.schema.type(collectionType);\n }\n store.type = type;\n store.itemSchema.type(type);\n store.schema.assign(schema);\n if (store.isArray && contains) {\n store.schema.set(\"contains\", store.schema.get(\"items\"));\n store.schema.delete(\"items\");\n }\n };\n decorator.MinItems = (minItems) => {\n schema.minItems = minItems;\n return decorator;\n };\n decorator.MaxItems = (maxItems) => {\n schema.maxItems = maxItems;\n return decorator;\n };\n decorator.MinProperties = (minProperties) => {\n schema.minProperties = minProperties;\n return decorator;\n };\n decorator.MaxProperties = (maxProperties) => {\n schema.maxProperties = maxProperties;\n return decorator;\n };\n decorator.Contains = () => {\n contains = true;\n return decorator;\n };\n decorator.UniqueItems = (uniqueItems = true) => {\n schema.uniqueItems = uniqueItems;\n return decorator;\n };\n return decorator;\n}\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function ArrayOf(type) {\n return CollectionOf(type, Array);\n}\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function MapOf(type) {\n return CollectionOf(type, Map);\n}\n","import { CollectionOf } from \"./collectionOf.js\";\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n *\n * ```typescript\n * class Model {\n * @CollectionContains(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n *\n * @param {Type<any>} type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionContains(type) {\n return CollectionOf(type).Contains();\n}\n","import { deepMerge, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../decorators/common/jsonEntityFn.js\";\nexport function withErrorMsg(errorKey, originalDecorator) {\n const schema = {};\n return ((...decoratorOptions) => {\n const decorator = useDecorators(originalDecorator(...decoratorOptions));\n decorator.Error = (message) => {\n schema.message = message;\n return useDecorators(decorator, schema.message &&\n JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n if (errorKey === \"required\") {\n store.parentSchema.customKey(\"errorMessage\", deepMerge(errorMessage, {\n [errorKey]: {\n [store.propertyName]: message\n }\n }));\n }\n else {\n store.itemSchema.customKey(\"errorMessage\", deepMerge(errorMessage, {\n [errorKey]: message\n }));\n }\n }));\n };\n return decorator;\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n *\n * :: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MaxItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maxItems\": 10\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MaxItems = withErrorMsg(\"maxItems\", (maxItems) => {\n if (maxItems < 0) {\n throw new Error(\"The value of maxItems MUST be a non-negative integer.\");\n }\n return JsonEntityFn((storedJson) => {\n storedJson.schema.maxItems(maxItems);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\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 *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MaxProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"maxProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MaxProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"maxProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MaxProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} maxProperties The maximum properties allowed on the given object\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MaxProperties = withErrorMsg(\"maxProperties\", (maxProperties) => {\n if (maxProperties < 0) {\n throw new Error(\"The value of maxProperties MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MinItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"minItems\": 10,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MinItems = withErrorMsg(\"minItems\", (minItems) => {\n if (minItems < 0) {\n throw new Error(\"The value of minItems MUST be a non-negative integer.\");\n }\n return JsonEntityFn((storedJson) => {\n storedJson.schema.minItems(minItems);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MinProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"minProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MinProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"minProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MinProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} minProperties The minimum properties allowed on the object.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MinProperties = withErrorMsg(\"minProperties\", (minProperties) => {\n if (minProperties < 0) {\n throw new Error(\"The value of minProperties MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.\n *\n * ::: warning\n * For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @UniqueItems() // default true\n * property: number[];\n * }\n * ```\n *\n * * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @UniqueItems()\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"uniqueItems\": true,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {boolean} uniqueItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const UniqueItems = withErrorMsg(\"uniqueItems\", (uniqueItems = true) => {\n return JsonEntityFn((store) => {\n store.schema.uniqueItems(uniqueItems);\n });\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Accept unknown properties on the deserialized model.\n *\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function AdditionalProperties(schema) {\n return JsonEntityFn((entity, parameters) => {\n entity.itemSchema.additionalProperties(schema);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param allOf\n */\nexport function AllOf(...allOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.allOf(allOf);\n });\n}\n","import { isArrowFn, isClass } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Declare a new property on a model.\n *\n * @param type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Property(type) {\n return JsonEntityFn((store) => {\n if (type) {\n if (isClass(type) || isArrowFn(type)) {\n store.type = type;\n }\n store.itemSchema.type(type);\n }\n });\n}\n","import { DecoratorTypes, isClass, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nimport { Property } from \"./property.js\";\n/**\n * Add allowed values when the property or parameters is required.\n *\n * #### Example on parameter:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Allow(\"\") @BodyParams(\"field\") field: string) {}\n * ```\n * > Required will throw a BadRequest when the given value is `null` or `undefined` but not for an empty string.\n *\n * #### Example on model:\n *\n * ```typescript\n * class Model {\n * @Allow(\"\")\n * field: string;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Allow(...values) {\n const model = values.find((item) => isClass(item));\n return useDecorators(model && Property(model), JsonEntityFn((store, args) => {\n if (store.decoratorType === DecoratorTypes.PARAM) {\n store.required = true;\n }\n if (store.decoratorType === DecoratorTypes.PROP) {\n store.parentSchema.addRequired(store.propertyName);\n }\n store.schema.allow(...values);\n }));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the type of the array items.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Any()\n * property: any;\n *\n * @Any(String, Number, Boolean)\n * property: string | number | boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"]\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Any(...types) {\n return JsonEntityFn((store) => {\n store.itemSchema.any(...types);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * ::: warning\n * AnyOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param anyOf\n */\nexport function AnyOf(...anyOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.anyOf(anyOf);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The const keyword is used to restrict a value to a fixed value.\n *\n * ::: warning\n * For v6 user, use @@Const@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With a string\n *\n * ```typescript\n * class Model {\n * @Const(\"value1\")\n * property: \"value1\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"const\": \"value1\"\n * }\n * }\n * }\n * ```\n * * ### With a boolean\n *\n * ```typescript\n * class Model {\n * @Const(true)\n * property: boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"boolean\",\n * \"const\": true\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean } constValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Const(constValue) {\n return JsonEntityFn((store) => {\n store.itemSchema.const(constValue);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set a custom key on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKey(key, value) {\n return JsonEntityFn((store) => {\n store.itemSchema.customKey(key, value);\n });\n}\n/**\n * Set a group of custom keys on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKeys(obj) {\n return JsonEntityFn((store) => {\n Object.entries(obj).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n });\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * There are no restrictions placed on the value of this keyword.\n *\n * ::: warning\n * For v6 user, use @@Default@@ from @tsed/schema instead of @tsed/platform-http.\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 *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Default(\"10\")\n * property: string = \"10\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"default\": \"10\"\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} defaultValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Default(defaultValue) {\n return JsonEntityFn((store) => {\n store.itemSchema.default(defaultValue);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add an error message to the property.\n * @decorator\n * @ajv\n */\nexport function ErrorMsg(obj) {\n return JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n store.parentSchema.customKey(\"errorMessage\", { ...errorMessage, ...obj });\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { ErrorMsg } from \"./errorMsg.js\";\n/**\n * Set default error message.\n *\n * ## Example\n *\n * ```typescript\n * @DefaultMsg(\"foo should be a string\")\n * class Model {\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": \"number\"\n * }\n * \"errorMessage\": {\n * \"_\": \"foo should be a string\"\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function DefaultMsg(message) {\n return useDecorators(ErrorMsg({ _: message }));\n}\n","import { decoratorTypeOf, DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add a description to the class, method or property\n *\n * ## Examples\n * ### On class\n *\n * ```typescript\n * @Description(\"description\")\n * class Model {\n *\n * }\n * ```\n *\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Description(\"description\")\n * async method() {}\n * }\n * ```\n *\n * ### On parameter\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * async method(@Description(\"description\") @PathParam(\"id\") id: string) {}\n * }\n * ```\n *\n * ### On property\n *\n * ```typescript\n * class Model {\n * @Description(\"description\")\n * id: string;\n * }\n * ```\n *\n * @param {string} description\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @methodDecorator\n * @propertyDecorator\n * @parameterDecorator\n */\nexport function Description(description) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.PROP:\n case DecoratorTypes.CLASS:\n store.schema.description(description);\n break;\n case DecoratorTypes.PARAM:\n store.parameter.description(description);\n break;\n case DecoratorTypes.METHOD:\n store.operation?.description(description);\n break;\n }\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nimport { Property } from \"./property.js\";\nexport function DiscriminatorKey() {\n return useDecorators(Property(), JsonEntityFn((store) => {\n store.discriminatorKey();\n }));\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\nfunction EnumFn(enumValue, ...enumValues) {\n return JsonEntityFn((store) => {\n store.itemSchema.enum(enumValue, ...enumValues);\n });\n}\n/**\n * The enum keyword is used to restrict a value to a fixed set of values.\n * It must be an array with at least one element, where each element is unique.\n *\n * Elements in the array might be of any value, including null.\n *\n * ::: warning\n * For v6 user, use @@Enum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: \"value1\" | \"value2\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: (\"value1\" | \"value2\")[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * }\n * ```\n *\n * ### With Typescript Enum\n *\n * ```typescript\n * enum SomeEnum {\n * ENUM_1 = \"enum1\",\n * ENUM_2 = \"enum2\"\n * }\n *\n * class Model {\n * @Enum(SomeEnum)\n * property: SomeEnum;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"enum1\", \"enum2\"]\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} enumValue\n * @param enumValues\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Enum = withErrorMsg(\"enum\", EnumFn);\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add an example metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Example(...examples) {\n return JsonEntityFn((store) => {\n store.schema.examples(examples);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add a examples metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Examples(examples) {\n return JsonEntityFn((store) => {\n store.parameter.examples(examples);\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Maximum = withErrorMsg(\"maximum\", (maximum, exclusive = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMaximum(maximum) : store.itemSchema.maximum(maximum);\n });\n});\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Max = Maximum;\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Maximum } from \"./maximum.js\";\n/**\n * The value of `exclusiveMaximum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) `exclusiveMaximum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMaximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param maximum\n * @param {boolean} exclusiveMaximum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMaximum = withErrorMsg(\"exclusiveMaximum\", (maximum, exclusiveMaximum = true) => {\n return Maximum(maximum, exclusiveMaximum);\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@Minimum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minimum The minimum value allowed\n * @param {boolean} exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Minimum = withErrorMsg(\"minimum\", (minimum, exclusive = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMinimum(minimum) : store.itemSchema.minimum(minimum);\n });\n});\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @alias Minimum\n * @param minimum The minimum value allowed\n * @param exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Min = Minimum;\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Minimum } from \"./minimum.js\";\n/**\n * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) `exclusiveMinimum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMinimum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param minimum\n * @param {boolean} exclusiveMinimum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMinimum = withErrorMsg(\"exclusiveMinimum\", (minimum, exclusiveMinimum = true) => {\n return Minimum(minimum, exclusiveMinimum);\n});\n","export var JsonFormatTypes;\n(function (JsonFormatTypes) {\n JsonFormatTypes[\"DATE_TIME\"] = \"date-time\";\n JsonFormatTypes[\"DATE\"] = \"date\";\n JsonFormatTypes[\"TIME\"] = \"time\";\n JsonFormatTypes[\"EMAIL\"] = \"email\";\n JsonFormatTypes[\"HOSTNAME\"] = \"hostname\";\n JsonFormatTypes[\"IPV4\"] = \"ipv4\";\n JsonFormatTypes[\"IPV6\"] = \"ipv6\";\n JsonFormatTypes[\"URI\"] = \"uri\";\n JsonFormatTypes[\"URL\"] = \"url\";\n JsonFormatTypes[\"URI_REF\"] = \"uri-reference\";\n JsonFormatTypes[\"URI_TEMPLATE\"] = \"uri-template\";\n JsonFormatTypes[\"JSON_POINTER\"] = \"json-pointer\";\n JsonFormatTypes[\"RELATIVE_JSON_POINTER\"] = \"relative-json-pointer\";\n JsonFormatTypes[\"UUID\"] = \"uuid\";\n JsonFormatTypes[\"REGEX\"] = \"regex\";\n})(JsonFormatTypes || (JsonFormatTypes = {}));\n","import { JsonFormatTypes } from \"../../domain/JsonFormatTypes.js\";\nimport { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The following formats are supported for string validation with `format` keyword:\n *\n * - **date**: full-date according to [RFC3339](https://json-schema.org/latest/json-schema-validation.html#RFC3339).\n * - **time**: time with optional time-zone.\n * - **date-time**: date-time from the same source (time-zone is mandatory).\n * - **uri**: full uri with optional protocol.\n * - **email**: email address.\n * - **hostname**: host name according to [RFC1034](https://tools.ietf.org/html/rfc1034#section-3.1).\n * - **ipv4**: IP address v4.\n * - **ipv6**: IP address v6.\n * - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.\n *\n * ::: warning\n * For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} format\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Format = withErrorMsg(\"format\", (format) => {\n return JsonEntityFn((store) => {\n store.itemSchema.format(format);\n });\n});\n/**\n * Apply an email validation on property.\n *\n * ::: warning\n * For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Email()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Email()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @schema\n * @swagger\n * @input\n * @ajv-errors\n */\nexport const Email = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.EMAIL);\n});\n/**\n * Apply a date-time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).\n * @ajv-errors\n */\nexport const DateTime = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE_TIME);\n});\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Time()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Time()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const DateFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE);\n});\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const TimeFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.TIME);\n});\n/**\n * Apply a uri validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Uri = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URI);\n});\n/**\n * Apply a url validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Url()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Url()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Url = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URL);\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Allow to forward group on specific property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ForwardGroups(bool = true) {\n return JsonEntityFn((entity) => {\n entity.schema.$forwardGroups = bool;\n });\n}\n","import picomatch from \"picomatch\";\nfunction micromatch(list, patterns) {\n patterns = [].concat(patterns);\n list = [].concat(list);\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n let onResult = (state) => {\n items.add(state.output);\n };\n for (let i = 0; i < patterns.length; i++) {\n let isMatch = picomatch(String(patterns[i]), { onResult }, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n if (negated) {\n negatives++;\n }\n for (let item of list) {\n let matched = isMatch(item, true);\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match)\n continue;\n if (negated) {\n omit.add(matched.output);\n }\n else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n let result = negatives === patterns.length ? [...items] : [...keep];\n return !!result.filter((item) => !omit.has(item)).length;\n}\n/**\n * @ignore\n */\nexport function matchGroups(groups, compareWith = []) {\n const groupsExcludes = groups.filter((group) => group.startsWith(\"!\")).map((group) => group.replace(\"!\", \"\"));\n const groupsIncludes = groups.filter((group) => !group.startsWith(\"!\"));\n if (groupsExcludes.length) {\n if (compareWith.length && micromatch(groupsExcludes, compareWith)) {\n return true;\n }\n }\n if (groupsIncludes.length) {\n return !micromatch(groups.filter((group) => !group.startsWith(\"!\")), compareWith);\n }\n return false;\n}\n","import { DecoratorTypes, isArray } from \"@tsed/core\";\nimport { matchGroups } from \"../../utils/matchGroups.js\";\nimport { CustomKey } from \"./customKey.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * @ignore\n */\nfunction groupsClass(groups, entity) {\n const entries = Object.entries(groups[0]);\n entity.children.forEach((propEntity) => {\n const groups = entries.filter(([, props]) => props.includes(propEntity.propertyName)).map(([key]) => key);\n const decorator = Groups(...groups);\n decorator(propEntity.target, propEntity.propertyKey);\n });\n}\nexport function Groups(...groups) {\n return JsonEntityFn((entity) => {\n switch (entity.decoratorType) {\n case DecoratorTypes.CLASS:\n groupsClass(groups, entity);\n break;\n case DecoratorTypes.PROP:\n CustomKey(\"x-groups\", groups)(entity.target, entity.propertyKey);\n entity.schema.$hooks.on(\"groups\", (prev, givenGroups) => {\n if (!prev) {\n if (matchGroups(groups, givenGroups)) {\n return true;\n }\n }\n return prev;\n });\n break;\n case DecoratorTypes.PARAM:\n let groupsName = \"\";\n if (groups.length == 2 && isArray(groups[1])) {\n groupsName = groups[0];\n groups = groups[1];\n }\n entity.parameter.groups = groups;\n entity.parameter.groupsName = groupsName;\n break;\n }\n });\n}\n","import { StoreSet } from \"@tsed/core\";\n/**\n * Disable documentation for the class and his endpoint.\n *\n * ````typescript\n * @Controller('/')\n * export class Ctrl {\n *\n * @Get('/')\n * @Hidden()\n * hiddenRoute(){\n *\n * }\n * }\n *\n * @Controller('/')\n * @Hidden()\n * export class Ctrl {\n * @Get('/')\n * hiddenRoute() {\n *\n * }\n * @Get('/2')\n * hiddenRoute2() {\n *\n * }\n * }\n * ```\n *\n * @decorator\n * @ignore\n */\nexport function Hidden() {\n return StoreSet(\"hidden\", true);\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.\n *\n * ::: warning\n * Swagger will not generate documentation for the ignored property.\n * :::\n *\n * ```typescript\n * class User {\n * @Ignore()\n * _id: string;\n *\n * @Property()\n * firstName: string;\n *\n * @Property()\n * lastName: string;\n *\n * @Ignore((value, ctx) => !ctx.endpoint)\n * password: string;\n * }\n * ```\n *\n * The controller:\n * ```typescript\n * import {Controller, BodyParams} from \"@tsed/platform-http\";\n * import {Post} from \"@tsed/schema\";\n * import {Person} from \"../models/Person.js\";\n *\n * @Controller(\"/\")\n * export class UsersCtrl {\n * @Get(\"/\")\n * get(): User {\n * const user = new User();\n * user._id = \"12345\";\n * user.firstName = \"John\";\n * user.lastName = \"Doe\";\n * user.password = \"secretpassword\";\n * return\n * }\n * }\n * ```\n *\n * The expected json object:\n *\n * ```json\n * {\n * \"firstName\": \"John\",\n * \"lastName\": \"Doe\"\n * }\n * ```\n * @param cb Callback to know if the property must be ignored\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @deprecated Since v7. Use @Groups decorator instead of and enable `jsonMapper.strictGroups` in your configuration.\n */\nexport function Ignore(cb = true) {\n return JsonEntityFn((store) => {\n store.schema.ignore(cb);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set integer type.\n *\n * ::: warning\n * For v6 user, use @@Integer@@ from @tsed/schema instead of @@Integer@@ from @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * ```\n *\n * ### With array of multiple types\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Integer() {\n return JsonEntityFn((store) => {\n store.itemSchema.type(\"integer\");\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Use label to create ref on the current decorated property.\n *\n * ### Example\n *\n * ```ts\n * class Model {\n * // For single property\n * @LabelledAs(\"UserSchema\")\n * name: string;\n *\n * // For collection\n * @LabelledAs(\"UserCollectionSchema\", \"collection\")\n * users: User[];\n * }\n * ```\n *\n * @param label The name of the label\n * @param includeCollection Add the label to the collection. By default, the label is added to the item of the collection it the property is a collection.\n * @returns PropertyDecorator\n *\n * @decorator\n */\nexport function LabelledAs(label, includeCollection = false) {\n return JsonEntityFn((entity) => {\n if (includeCollection) {\n entity.schema.label(label);\n }\n else {\n entity.itemSchema.label(label);\n }\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of maxLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MaxLength@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxLength The maximum length allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MaxLength = withErrorMsg(\"maxLength\", (maxLength) => {\n if (maxLength < 0) {\n throw new Error(\"The value of maxLength MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.maxLength(maxLength);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n *\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of minLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinLength@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"minLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minLength\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MinLength = withErrorMsg(\"minLength\", (minLength) => {\n if (minLength < 0) {\n throw new Error(\"The value of minLength MUST be a non-negative integer.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.minLength(minLength);\n });\n});\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n *\n * ::: warning\n * The value of `multipleOf` MUST be a number, strictly greater than 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MultipleOf@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MultipleOf(2)\n * property: Number;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(number)\n * @MultipleOf(2)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} multipleOf The multiple value allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MultipleOf = withErrorMsg(\"multipleOf\", (multipleOf) => {\n if (multipleOf <= 0) {\n throw new Error(\"The value of multipleOf MUST be a number, strictly greater than 0.\");\n }\n return JsonEntityFn((store) => {\n store.itemSchema.multipleOf(multipleOf);\n });\n});\n","import { decoratorTypeOf, DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add a name metadata on the decorated element.\n *\n * ## Examples\n * ### On parameters\n *\n * ```typescript\n * async myMethod(@Name(\"nameOf\") @PathParams(\"id\") id: string): Promise<Model> {\n *\n * }\n * ```\n *\n * ### On parameters\n *\n * ```typescript\n * @Name(\"AliasName\")\n * @Controller(\"/\")\n * class ModelCtrl {\n *\n * }\n * ```\n *\n * @param name\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @operation\n */\nexport function Name(name) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.CLASS:\n store.schema.name(name);\n break;\n case DecoratorTypes.PARAM:\n store.parameter.name(name);\n break;\n default:\n store.parent.schema.addAlias(args[1], name);\n }\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { Any } from \"./any.js\";\nimport { Property } from \"./property.js\";\n/**\n * Set field as nullable.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Nullable(Date)\n * property: Date | null;\n *\n * @Nullable(String, Number, Boolean)\n * property: string | number | boolean | null;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Nullable(type, ...types) {\n types = [type, ...types];\n return useDecorators(types.length === 1 && Property(types[0]), Any(null, ...types));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * ::: warning\n * OneOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param oneOf\n */\nexport function OneOf(...oneOf) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.oneOf(oneOf);\n entity.type = Object;\n });\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add optional annotation on Property or Parameter.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Optional() {\n return JsonEntityFn((store) => {\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n store.required = false;\n break;\n case DecoratorTypes.PROP:\n store.parentSchema.removeRequired(store.propertyName);\n break;\n }\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * The pattern and Pattern Properties keywords use regular expressions to express constraints.\n * The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.\n *\n * ::: warning\n * For v6 user, use @@Pattern@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * A single unicode character (other than the special characters below) matches itself.\n *\n * * `^`: Matches only at the beginning of the string.\n * * `$`: Matches only at the end of the string.\n * * `(...)`: Group a series of regular expressions into a single regular expression.\n * * `|`: Matches either the regular expression preceding or following the | symbol.\n * * `[abc]`: Matches any of the characters inside the square brackets.\n * * `[a-z]`: Matches the range of characters.\n * * `[^abc]`: Matches any character not listed.\n * * `[^a-z]`: Matches any character outside of the range.\n * * `+`: Matches one or more repetitions of the preceding regular expression.\n * * `*`: Matches zero or more repetitions of the preceding regular expression.\n * * `?`: Matches zero or one repetitions of the preceding regular expression.\n * * `+?`, *?`, ??`: The `*`, `+`, and `?` qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn’t desired and you want to match as few characters as possible.\n * * `{x}`: Match exactly x occurrences of the preceding regular expression.\n * * `{x,y}`: Match at least x and at most y occurrences of the preceding regular expression.\n * * `{x,}`: Match x occurrences or more of the preceding regular expression.\n * * `{x}?`, {x,y}?, {x,}?`: Lazy versions of the above expressions.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Pattern(\"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\")\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(string)\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} pattern\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Pattern = withErrorMsg(\"pattern\", (pattern) => {\n return JsonEntityFn((store) => {\n store.itemSchema.pattern(pattern);\n });\n});\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the property as readOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function ReadOnly(readOnly = true) {\n return JsonEntityFn((store) => {\n store.itemSchema.readOnly(readOnly);\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Write data formatted to JsonSchema.\n *\n * ## Example\n *\n * ```typescript\n * @Schema({title: \"test\"})\n * class Model {\n * @Schema({formatMinimum: \"1987-10-24\"})\n * @Format(\"date\")\n * birthDate: Date\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"title\": \"test\",\n * \"properties\": {\n * \"birthdate\": {\n * \"type\": \"string\",\n * \"format\": \"date\",\n * \"formatMinimum\": \"1987-10-24\"\n * }\n * }\n * }\n * ```\n *\n * @param partialSchema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Schema(partialSchema) {\n return JsonEntityFn((entity) => {\n entity.schema.assign(partialSchema);\n });\n}\n/**\n * Apply specific schema depending on the spec version\n * @param specType\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function For(specType, schema) {\n return JsonEntityFn((entity) => {\n entity.schema.set(specType, schema);\n });\n}\n","import { Schema } from \"./schema.js\";\n/**\n * Constructs a json schema object type whose property keys are keys and whose property values are type.\n *\n * ## Example\n *\n * ```typescript\n * type keys = 'one' | 'two';\n *\n * class Part {\n * prop: string;\n * }\n *\n * type Parts = Record<keys, Part>;\n *\n * class Test {\n * @RecordOf(Part, 'one', 'two')\n * parts: Parts;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"one\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * \"two\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * },\n * }\n * ```\n *\n * @param model\n * @param keys\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function RecordOf(model, ...keys) {\n return Schema({\n properties: {\n ...keys.reduce((initial, key) => {\n return {\n ...initial,\n [key]: model\n };\n }, {})\n }\n });\n}\n","import { withErrorMsg } from \"../../utils/withErrorMsg.js\";\nimport { Allow } from \"./allow.js\";\nimport { Optional } from \"./optional.js\";\n/**\n * Add required annotation on Property or Parameter.\n *\n * The @@Required@@ decorator can be used on two cases.\n *\n * To decorate a parameters:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Required() @BodyParams(\"field\") field: string) {}\n * ```\n *\n * To decorate a model:\n *\n * ```typescript\n * class Model {\n * @Required()\n * field: string;\n * }\n * ```\n *\n * ::: tip\n * Required will throw a BadRequest when the given value is `null`, an empty string or `undefined`.\n * :::\n *\n * ### Allow values\n *\n * In some case, you didn't want trigger a BadRequest when the value is an empty string for example.\n * The decorator `@Allow()`, allow you to configure a value list for which there will be no exception.\n *\n * ```typescript\n * class Model {\n * @Allow(\"\") // add automatically required flag\n * field: string;\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Required = withErrorMsg(\"required\", (required = true, ...allowedRequiredValues) => {\n return required ? Allow(...allowedRequiredValues) : Optional();\n});\n","import { matchGroups } from \"../../utils/matchGroups.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Apply groups validation strategy for required property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function RequiredGroups(...groups) {\n return JsonEntityFn((entity) => {\n entity.parent.schema.$hooks.on(\"requiredGroups\", (required, givenGroups) => {\n if (matchGroups(groups, givenGroups)) {\n return required.filter((key) => key !== entity.propertyKey);\n }\n return required;\n });\n });\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Add title metadata on the decorated element.\n *\n * ::: warning\n * For v6 user, use @@Title@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Title(\"title\")\n * id: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"id\": {\n * \"type\": \"string\",\n * \"title\": \"title\"\n * }\n * }\n * }\n * ```\n *\n * @param {string} title\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Title(title) {\n return JsonEntityFn((entity) => {\n entity.schema.title(title);\n });\n}\n","import { useDecorators } from \"@tsed/core\";\nimport { ErrorMsg } from \"./errorMsg.js\";\nimport { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Create a new custom formats validator\n * @param name\n * @param options\n * @decorator\n * @ajv\n */\nexport function TypeError(msg) {\n return JsonEntityFn(() => useDecorators(ErrorMsg({ type: msg })));\n}\n","import { JsonEntityFn } from \"./jsonEntityFn.js\";\n/**\n * Set the property as WriteOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function WriteOnly(writeOnly = true) {\n return JsonEntityFn((store) => {\n store.itemSchema.writeOnly(writeOnly);\n });\n}\n","import { isClass } from \"@tsed/core\";\nimport { JsonSchema } from \"../domain/JsonSchema.js\";\nimport { getJsonEntityStore } from \"../utils/getJsonEntityStore.js\";\n/**\n * Create a new model from the given type.\n *\n * ```typescript\n * from(String)\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function from(type = Object) {\n if (isClass(type)) {\n const { schema } = getJsonEntityStore(type);\n schema.properties = function properties(obj) {\n Object.entries(obj).forEach(([propertyKey, propSchema]) => {\n getJsonEntityStore(type.prototype, propertyKey).schema.assign(propSchema);\n });\n return this;\n };\n return schema;\n }\n return JsonSchema.from({ type });\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new string model.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function string() {\n return from(String);\n}\n","import { isObject } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { string } from \"../../fn/string.js\";\n/**\n * @ignore\n */\nfunction isEnum(type) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n/**\n * Set the types of a Generic class.\n *\n * ## Example\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * class Payload {\n * @GenericOf(Product)\n * products: Paginated<Product>;\n * }\n * ```\n *\n * ## Example with nested generics\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * @Generics(\"D\")\n * class Submission<D> {\n * @Property()\n * _id: string;\n *\n * @Property(\"D\")\n * data: D;\n * }\n *\n * class Payload {\n * @GenericOf(Submissions).Nested(Product)\n * submissions: Paginated<Submission<Product>>;\n * }\n * ```\n *\n * @param {Type<any>[]} generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function GenericOf(...generics) {\n const nestedGenerics = [\n generics.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n })\n ];\n const decorator = (...args) => {\n const store = JsonEntityStore.from(...args);\n store.nestedGenerics = nestedGenerics;\n };\n decorator.Nested = (...generics) => {\n nestedGenerics.push(generics);\n return decorator;\n };\n return decorator;\n}\n","import { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\n/**\n * Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema.\n *\n * See @@GenericOf@@ decorator for more details.\n *\n * @param generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function Generics(...generics) {\n return (target) => {\n const storedSchema = JsonEntityStore.from(target);\n storedSchema.schema.genericLabels = generics;\n };\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add produces metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Produces(\"text/html\")\n * id: string;\n * }\n * ```\n *\n * ::: warning\n * For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).\n * :::\n *\n * @param produces\n * @decorator\n * @swagger\n * @methodDecorator\n * @classDecorator\n * @operation\n * @response\n */\nexport function Produces(...produces) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.produces(produces);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Produces(...produces));\n break;\n default:\n throw new UnsupportedDecoratorType(Produces, args);\n }\n });\n}\n","import { StoreSet, useDecorators } from \"@tsed/core\";\nimport { Produces } from \"./produces.js\";\n/**\n * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.\n *\n * ```typescript\n * @Controller('/mypath')\n * export class MyCtrl {\n *\n * @Get('/')\n * @AcceptMime('application/json')\n * public getResource(){}\n * }\n * ```\n *\n * @param mimes\n * @decorator\n * @operation\n * @response\n */\nexport function AcceptMime(...mimes) {\n return useDecorators(Produces(...mimes), StoreSet(\"acceptMimes\", mimes));\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add consumes metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n * class Model {\n * @Consumes(\"application/x-www-form-urlencoded\")\n * id: string;\n * }\n * ```\n *\n * @param consumes\n * @decorator\n * @swagger\n * @classDecorator\n * @operation\n */\nexport function Consumes(...consumes) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.consumes(consumes);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Consumes(...consumes));\n break;\n default:\n throw new UnsupportedDecoratorType(Consumes, args);\n }\n });\n}\n","import { DecoratorTypes } from \"@tsed/core\";\nimport { pascalCase } from \"change-case\";\nimport { JsonEntityStore } from \"./JsonEntityStore.js\";\n/**\n * @ignore\n */\nexport class DecoratorContext extends Map {\n constructor(opts = {}) {\n super();\n this.actions = [];\n Object.entries(opts).forEach(([key, value]) => {\n this.set(key, value);\n });\n }\n addAction(cb) {\n this.actions.push(cb);\n return this;\n }\n build() {\n const decorator = (...args) => this.bind(args, decorator);\n const wrap = (cb) => {\n return (...args) => {\n cb(...args);\n return decorator;\n };\n };\n const wrapKey = (key) => {\n return wrap((...values) => {\n key in this ? this[key](...values) : this.set(key, values[0]);\n });\n };\n this.methods.forEach((name) => {\n decorator[pascalCase(name)] = wrapKey(name);\n });\n return decorator;\n }\n toObject() {\n return [...this.entries()].reduce((obj, [key, value]) => {\n return {\n ...obj,\n [key]: value\n };\n }, {});\n }\n getMergedKey(key, defaultValue) {\n let value = this.get(key) || defaultValue;\n if (!value) {\n return;\n }\n if (this.decoratorType === DecoratorTypes.CLASS) {\n value = {\n ...value,\n ...(defaultValue || {})\n };\n }\n return {\n ...(defaultValue || {}),\n ...value\n };\n }\n bind(args, decorator) {\n this.entity = JsonEntityStore.from(...args);\n this.beforeInit();\n this.onInit(args, decorator);\n this.afterInit();\n }\n onInit(args, decorator) {\n this.forEach((value, key) => {\n this.onMapKey(key, value);\n });\n }\n onMapKey(key, value) {\n this.entity.set(key, value);\n }\n runActions() {\n this.actions.forEach((action) => {\n action(this);\n });\n return this;\n }\n beforeInit() { }\n afterInit() { }\n}\n","const statusesModel = new Map();\nexport function defineStatusModel(status, model) {\n statusesModel.set(status, model);\n}\nexport function getStatusModel(status) {\n return statusesModel.get(status);\n}\n","import { decorateMethodsOf, decoratorTypeOf, DecoratorTypes, isArray, isCollection, isObject, isPlainObject, isPrimitiveOrPrimitiveClass, isString } from \"@tsed/core\";\nimport { getStatusMessage } from \"../../constants/httpStatusMessages.js\";\nimport { DecoratorContext } from \"../../domain/DecoratorContext.js\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { JsonParameter } from \"../../domain/JsonParameter.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\nimport { string } from \"../../fn/string.js\";\nimport { getStatusModel } from \"../../utils/defineStatusModel.js\";\nimport { isSuccessStatus } from \"../../utils/isSuccessStatus.js\";\nimport { mapHeaders } from \"../../utils/mapHeaders.js\";\n/**\n * @ignore\n */\nfunction isEnum(type) {\n return isObject(type) && !(\"toJSON\" in type);\n}\nfunction mapGenerics(types) {\n return types.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n });\n}\n/**\n * @ignore\n */\nclass ReturnDecoratorContext extends DecoratorContext {\n constructor({ status, model }) {\n super();\n this.methods = [\n \"contentType\",\n \"description\",\n \"examples\",\n \"type\",\n \"status\",\n \"of\",\n \"ofInteger\",\n \"oneOf\",\n \"allOf\",\n \"anyOf\",\n \"nested\",\n \"header\",\n \"headers\",\n \"schema\",\n \"title\",\n \"groups\",\n \"allowedGroups\",\n \"location\",\n \"binary\"\n ];\n this.model(model);\n this.status(status);\n }\n type(model) {\n return this.model(model);\n }\n model(model) {\n model && this.set(\"model\", model);\n return this;\n }\n status(status) {\n this.set(\"status\", status);\n if (status && getStatusMessage(status) && !this.get(\"description\")) {\n this.set(\"description\", getStatusMessage(status));\n if (!this.get(\"model\")) {\n this.model(getStatusModel(+status));\n }\n }\n return this;\n }\n headers(headers) {\n this.set(\"headers\", {\n ...(this.get(\"headers\") || {}),\n ...mapHeaders(headers)\n });\n return this;\n }\n header(key, value) {\n if (value === undefined && isString(key)) {\n return this.headers({ [key]: { type: \"string\" } });\n }\n return this.headers({ [key]: value });\n }\n location(path, meta = {}) {\n this.headers({\n Location: {\n ...meta,\n value: path\n }\n });\n return this;\n }\n groups(...groups) {\n if (groups.length === 2 && isArray(groups[1])) {\n this.set(\"groupsName\", groups[0]);\n this.set(\"groups\", groups[1]);\n }\n else {\n this.set(\"groups\", groups);\n }\n return this;\n }\n allowedGroups(...allowedGroups) {\n this.set(\"allowedGroups\", new Set(allowedGroups));\n return this;\n }\n nested(...generics) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.checkCollection(model);\n this.addAction((ctx) => {\n this.get(\"schema\").nestedGenerics.push(mapGenerics(generics));\n });\n return this;\n }\n of(...types) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.addAction(() => {\n const schema = this.get(\"schema\");\n if (isCollection(model)) {\n schema?.itemSchema({ type: types[0] });\n }\n else {\n schema?.nestedGenerics.push(mapGenerics(types));\n }\n });\n return this;\n }\n ofInteger() {\n return this.of(\"integer\");\n }\n oneOf(...types) {\n return this.manyOf(\"oneOf\", types);\n }\n allOf(...types) {\n return this.manyOf(\"allOf\", types);\n }\n anyOf(...types) {\n return this.manyOf(\"anyOf\", types);\n }\n schema(partial) {\n this.addAction(() => {\n const schema = this.get(\"schema\");\n schema.assign(partial);\n });\n return this;\n }\n examples(examples) {\n this.set(\"examples\", isString(examples) ? [examples] : examples);\n return this;\n }\n title(title) {\n return this.schema({ title });\n }\n binary() {\n this.type(String);\n this.set(\"contentType\", \"application/octet-stream\");\n this.schema({ format: \"binary\" });\n return this;\n }\n checkPrimitive(model) {\n if (isPrimitiveOrPrimitiveClass(model)) {\n throw new Error(\"Returns.Of cannot be used with the following primitive classes: String, Number, Boolean\");\n }\n }\n checkCollection(model) {\n if (isCollection(model)) {\n throw new Error(\"Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean\");\n }\n }\n getContentType() {\n const model = this.get(\"model\");\n let contentType = this.get(\"contentType\");\n if ((model && !isPlainObject(model) && !isPrimitiveOrPrimitiveClass(model)) || this.hasOfTypes) {\n contentType = contentType || \"application/json\";\n }\n return contentType;\n }\n getStatus() {\n return this.get(\"status\") || \"default\";\n }\n onInit(args, decorator) {\n const type = decoratorTypeOf(args);\n switch (type) {\n case DecoratorTypes.METHOD:\n this.entity = JsonEntityStore.from(...args);\n if (this.entity.operation) {\n this.map();\n }\n break;\n case DecoratorTypes.CLASS:\n this.decoratorType = DecoratorTypes.CLASS;\n decorateMethodsOf(args[0], decorator);\n break;\n }\n }\n map() {\n const model = this.get(\"model\");\n const { entity, decoratorType } = this;\n const operation = this.entity.operation;\n const currentStatus = this.getStatus();\n const response = operation.ensureResponseOf(currentStatus);\n const contentType = this.getContentType();\n let { description = response.get(\"description\") } = this.toObject();\n if (description) {\n description = decoratorType === DecoratorTypes.CLASS ? response.get(\"description\") || description : description;\n response.description(description);\n }\n const headers = this.getMergedKey(\"headers\", response.get(\"headers\"));\n if (headers) {\n response.headers(headers);\n }\n this.mapMedia(response);\n if (isSuccessStatus(this.get(\"status\")) || currentStatus === \"default\") {\n if (model) {\n entity.type = model;\n }\n }\n // additional info for OS2\n contentType && operation.addProduce(contentType);\n // run additional actions\n return this.runActions();\n }\n mapMedia(response) {\n const contentType = this.getContentType();\n const model = this.get(\"model\");\n const media = response.getMedia(contentType || \"*/*\");\n const schema = media.get(\"schema\") || new JsonSchema({ type: model });\n const groups = this.get(\"groups\");\n const groupsName = this.get(\"groupsName\");\n const allowedGroups = this.get(\"allowedGroups\");\n const operation = this.entity.operation;\n if (model) {\n if (isArray(model)) {\n schema.oneOf(model.map((type) => ({ type })));\n }\n else {\n schema.type(model);\n }\n }\n this.set(\"schema\", schema);\n media.schema(schema);\n media.groups = groups;\n media.groupsName = groupsName;\n if (allowedGroups) {\n media.allowedGroups = allowedGroups;\n const jsonParameter = new JsonParameter();\n jsonParameter.in(\"query\").name(\"includes\");\n jsonParameter.schema(JsonSchema.from({\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...allowedGroups]\n }\n }));\n operation.addParameter(-1, jsonParameter);\n }\n const examples = this.get(\"examples\");\n if (examples) {\n media.examples(examples);\n }\n return media;\n }\n manyOf(kind, types) {\n const model = this.get(\"model\");\n this.hasOfTypes = true;\n this.addAction(() => {\n const schema = this.get(\"schema\");\n if (isCollection(model)) {\n schema.type(model || Object);\n schema.itemSchema().set(kind, types);\n }\n else {\n schema.set(kind, types);\n }\n });\n return this;\n }\n}\nexport function Returns(status, model) {\n const context = new ReturnDecoratorContext({\n status,\n model\n });\n return context.build();\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type.\n * If type contains the “/” character, then it sets the `Content-Type` to type.\n *\n * ```typescript\n * @ContentType('.html'); // => 'text/html'\n * @ContentType('html'); // => 'text/html'\n * @ContentType('json'); // => 'application/json'\n * @ContentType('application/json'); // => 'application/json'\n * @ContentType('png'); // => image/png\n * private myMethod() {}\n * ```\n *\n * @param type\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function ContentType(type) {\n return Returns().ContentType(type);\n}\n","import { decorateMethodsOf, decoratorTypeOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add deprecated metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n *\n * @Deprecated()\n * class MyCtrl {\n * @Deprecated()\n * @Get(\"/\")\n * method(){\n * }\n * }\n * ```\n *\n * @param deprecated\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Deprecated(deprecated = true) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.METHOD:\n store.operation.deprecated(deprecated);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Deprecated(deprecated));\n break;\n case DecoratorTypes.PARAM:\n store.parameter.set(\"deprecated\", deprecated);\n break;\n case DecoratorTypes.PROP:\n store.schema.set(\"deprecated\", deprecated);\n break;\n default:\n throw new UnsupportedDecoratorType(Deprecated, args);\n }\n });\n}\n","import { isString } from \"@tsed/core\";\nimport { Returns } from \"./returns.js\";\n/**\n * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.\n *\n * ```typescript\n * @Header('Content-Type', 'text/plain');\n * private myMethod() {}\n *\n * @Status(204)\n * @Header({\n * \"Content-Type\": \"text/plain\",\n * \"Content-Length\": 123,\n * \"ETag\": {\n * \"value\": \"12345\",\n * \"description\": \"header description\"\n * }\n * })\n * private myMethod() {}\n * ```\n *\n * This example will produce the swagger responses object:\n *\n * ```json\n * {\n * \"responses\": {\n * \"204\": {\n * \"description\": \"Description\",\n * \"headers\": {\n * \"Content-Type\": {\n * \"type\": \"string\"\n * },\n * \"Content-Length\": {\n * \"type\": \"number\"\n * },\n * \"ETag\": {\n * \"type\": \"string\",\n * \"description\": \"header description\"\n * }\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @response\n */\nexport function Header(headers, value) {\n if (value !== undefined) {\n headers = { [headers]: value };\n }\n if (value === undefined && isString(headers)) {\n headers = { [headers]: { type: \"string\" } };\n }\n return Returns().Headers(headers);\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityStore } from \"../../domain/JsonEntityStore.js\";\nimport { JsonParameter } from \"../../domain/JsonParameter.js\";\nimport { JsonSchema } from \"../../domain/JsonSchema.js\";\n/**\n * Add a input parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Get(\"/\")\n * @In(\"header\").Type(String).Name(\"Authorization\").Required()\n * method() {\n * }\n * }\n * ```\n * :::\n *\n * @param inType\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n */\nexport function In(inType) {\n const jsonParameter = new JsonParameter();\n const schema = {};\n const decorator = (target, propertyKey, index) => {\n const store = JsonEntityStore.from(target, propertyKey, index);\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n store.parameter.in(inType);\n break;\n case DecoratorTypes.METHOD:\n jsonParameter.in(inType);\n store.operation.addParameter(-1, jsonParameter);\n jsonParameter.schema(JsonSchema.from(schema));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(target, decorator);\n break;\n default:\n throw new UnsupportedDecoratorType(In, [target, propertyKey, index]);\n }\n };\n decorator.Type = (type) => {\n schema.type = type;\n return decorator;\n };\n decorator.Name = (name) => {\n jsonParameter.name(name);\n return decorator;\n };\n decorator.Description = (description) => {\n jsonParameter.description(description);\n return decorator;\n };\n decorator.Required = (required = true) => {\n jsonParameter.required(required);\n return decorator;\n };\n decorator.Pattern = (pattern) => {\n return decorator.Schema({ pattern: pattern.toString() });\n };\n decorator.Schema = (_schema) => {\n Object.assign(schema, _schema.toJSON ? _schema.toJSON() : _schema);\n return decorator;\n };\n return decorator;\n}\n","import { Metadata, useDecorators, useMethodDecorators } from \"@tsed/core\";\nimport { JsonParameterTypes } from \"../../domain/JsonParameterTypes.js\";\nimport { Name } from \"../common/name.js\";\nimport { Consumes } from \"./consumes.js\";\nimport { In } from \"./in.js\";\nimport { Returns } from \"./returns.js\";\n/**\n * Add a input file parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Post(\"/\")\n * method(@InFile(\"file1\") file: any) {\n * }\n * }\n * ```\n * :::\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n * @param name\n */\nexport function InFile(name) {\n return (...args) => {\n const [target, propertyKey, index] = args;\n const multiple = Metadata.getParamTypes(target, propertyKey)[index] === Array;\n name = (typeof name === \"object\" ? undefined : name);\n const expression = [name, !multiple && \"0\"].filter(Boolean).join(\".\");\n const decorators = useDecorators(In(JsonParameterTypes.FILES), Name(expression), useMethodDecorators(Returns(400).Description(`<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1`), Consumes(\"multipart/form-data\")));\n decorators(...args);\n };\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Sets the response Location HTTP header to the specified path parameter.\n *\n * ```typescript\n * @Location('/foo/bar', {description: 'Location to the next step'})\n * @Location('http://example.com')\n * @Location('back')\n * private myMethod() {\n *\n * }\n * ```\n *\n * A path value of “back” has a special meaning, it refers to the URL specified in the `Referer` header of the request. If the `Referer` header was not specified, it refers to “/”.\n *\n * @param location\n * @param meta\n * @returns {Function}\n * @decorator\n * @operation\n */\nexport function Location(location, meta) {\n return Returns().Location(location, meta);\n}\n","import { OperationVerbs } from \"../constants/OperationVerbs.js\";\nconst ALLOWED_VERBS = new Set([\n ...Object.keys(OperationVerbs)\n .filter((v) => v !== OperationVerbs.CUSTOM)\n .map((v) => v.toLowerCase())\n]);\nexport function mapOperationOptions(args) {\n let method = undefined;\n let path = undefined;\n const handlers = args.filter((arg) => {\n if (typeof arg === \"string\" && ALLOWED_VERBS.has(arg.toLowerCase())) {\n method = arg.toLocaleUpperCase();\n return false;\n }\n if (typeof arg === \"string\" || arg instanceof RegExp) {\n path = arg || \"/\";\n return false;\n }\n return !!arg;\n });\n return {\n path,\n method,\n use: handlers\n };\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { DecoratorContext } from \"../../domain/DecoratorContext.js\";\nimport { mapOperationOptions } from \"../../utils/mapOperationOptions.js\";\nclass OperationDecoratorContext extends DecoratorContext {\n constructor() {\n super(...arguments);\n this.methods = [\"name\", \"description\", \"summary\", \"method\", \"id\", \"use\", \"useAfter\", \"useBefore\"];\n }\n beforeInit() {\n const path = this.get(\"path\");\n const method = OperationVerbs[this.get(\"method\")] || OperationVerbs.CUSTOM;\n if (path) {\n this.operationPath = this.entity.operation.addOperationPath(method, path);\n }\n }\n onMapKey(key, value) {\n switch (key) {\n case \"name\":\n case \"id\":\n this.entity.operation.operationId(value);\n return;\n case \"summary\":\n this.operationPath?.summary(value);\n this.entity.operation.summary(value);\n return;\n case \"description\":\n this.operationPath?.description(value);\n this.entity.operation.description(value);\n return;\n case \"use\":\n this.entity.use(value);\n return;\n case \"useAfter\":\n this.entity.after(value);\n return;\n case \"useBefore\":\n this.entity.before(value);\n return;\n }\n return super.onMapKey(key, value);\n }\n}\nexport function Operation(...args) {\n const routeOptions = mapOperationOptions(args);\n const context = new OperationDecoratorContext(routeOptions);\n return context.build();\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Set a swagger operationId explicitly.\n *\n * @param operationId\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationId(operationId) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationId, args);\n }\n store.operation.operationId(operationId);\n });\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Declare new Operation with his path and http method.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application.\n *\n * Use these decorators instead:\n *\n * <ApiList query=\"status.includes('decorator') && status.includes('httpMethod')\" />\n *\n * :::\n *\n * @param method\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationPath(method, path = \"/\") {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationPath, args);\n }\n store.operation.addOperationPath(method.toUpperCase(), path);\n });\n}\n","import { Groups } from \"../common/groups.js\";\n/**\n * Apply Partial group strategy on the input model\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Partial() {\n return Groups(\"partial\");\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Set class path to expose all endpoints\n *\n * ::: warning\n * Don't use this decorator to change the path if you develop your application with Ts.ED.\n * :::\n *\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Path(path) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.CLASS) {\n throw new UnsupportedDecoratorType(Path, args);\n }\n store.path = path;\n });\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\nexport function Publish(event) {\n return Operation(OperationVerbs.PUBLISH, event);\n}\n","import { isNumber, isString, useDecorators } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nimport { Returns } from \"./returns.js\";\nexport function Redirect(...args) {\n const { status, url, meta } = args.reduce((options, value) => {\n if (isNumber(value)) {\n options.status = value;\n return options;\n }\n if (isString(value)) {\n options.url = value;\n return options;\n }\n options.meta = value;\n return options;\n }, { status: 302, url: \"\", meta: {} });\n return useDecorators(Returns(status).Location(url, meta), JsonEntityFn((entity) => {\n entity.operation?.setRedirection(status);\n }));\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function All(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.ALL, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Get(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.GET, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Post(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.POST, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Put(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.PUT, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Delete(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.DELETE, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Head(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.HEAD, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Patch(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.PATCH, path].concat(args));\n}\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Options(path = \"/\", ...args) {\n return Operation(...[OperationVerbs.OPTIONS, path].concat(args));\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nexport function Security(nameOrSecurity, ...scopes) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n if (Array.isArray(nameOrSecurity)) {\n store.operation.security(nameOrSecurity);\n }\n else {\n store.operation.addSecurityScopes(nameOrSecurity, scopes);\n }\n break;\n case DecoratorTypes.CLASS:\n if (Array.isArray(nameOrSecurity)) {\n decorateMethodsOf(args[0], Security(nameOrSecurity));\n }\n else {\n decorateMethodsOf(args[0], Security(nameOrSecurity, ...scopes));\n }\n break;\n default:\n throw new UnsupportedDecoratorType(Security, args);\n }\n });\n}\n","import { Returns } from \"./returns.js\";\n/**\n * Add responses documentation for a specific status code.\n *\n * ## Usage\n *\n * Ts.ED v6 API introducing the chaining decorator concept.\n * Now a decorator like Returns can be used with another decorators like Description.\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @Status(404, String).Description(\"Not Found\")\n * @Status(200, Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ::: tip\n * TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know\n * what chained decorators are available under Returns decorator.\n * :::\n *\n * This example will produce this documentation in swagger:\n *\n * ```json\n * {\n * \"responses\": {\n * \"404\": {\n * \"description\": \"Description\",\n * \"schema\": {\"type\": \"string\"}\n * },\n * \"2OO\": {\n * \"description\": \"Description\",\n * \"schema\": {\"$ref\": \"...\"}\n * }\n * }\n * }\n * ```\n *\n * ### Declaring a generic model\n *\n * Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to\n * declare explicitly the generic models with the decorators.\n *\n * One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.\n *\n * Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:\n *\n * ```typescript\n * @Generics(\"T\")\n * class Pagination<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n * ```\n *\n * Now, we need a model to be used with the generic Pagination model:\n *\n * ```typescript\n * class Product {\n * @Property()\n * id: string;\n *\n * @Property()\n * title: string;\n * }\n * ```\n *\n * Finally, we can use our models on a method as following:\n *\n * ```typescript\n * class Controller {\n * @OperationPath(\"POST\", \"/\")\n * @Status(200, Pagination).Of(Product).Description(\"description\")\n * async method(): Promise<Pagination<Product> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * ### Declaring a nested generics models <Badge text=\"6+\"/>\n *\n * It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:\n *\n * ```typescript\n * import {Post, Generics, Property, Returns} from \"@tsed/schema\";\n *\n * class Controller {\n * @Post(\"/\")\n * @Status(200, Pagination).Of(Submission).Nested(Product).Description(\"description\")\n * async method(): Promise<Pagination<Submission<Product>> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * And here is the Submission model:\n *\n * ```typescript\n * import {Generics, Property} from \"@tsed/schema\";\n *\n * @Generics(\"T\")\n * class Submission<T> {\n * @Property()\n * _id: string;\n * @Property(\"T\")\n * data: T;\n * }\n * ```\n *\n * @param status\n * @param model\n * @decorator\n * @swagger\n * @schema\n * @response\n * @operation\n */\nexport function Status(status, model) {\n return Returns(status, model);\n}\n","import { OperationVerbs } from \"../../constants/OperationVerbs.js\";\nimport { Operation } from \"./operation.js\";\nexport function Subscribe(event) {\n return Operation(OperationVerbs.SUBSCRIBE, event);\n}\n","import { DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\n/**\n * Add summary metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Summary(\"summary\")\n * id: string;\n * }\n * ```\n *\n * @param summary\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Summary(summary) {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(Summary, args);\n }\n store.operation.summary(summary);\n });\n}\n","import { decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType } from \"@tsed/core\";\nimport { JsonEntityFn } from \"../common/jsonEntityFn.js\";\nfunction mapTags(tags) {\n return tags.map((tag) => {\n if (typeof tag === \"string\") {\n return {\n name: tag\n };\n }\n return tag;\n });\n}\n/**\n * Add metadata tags to the decorated element (class or method).\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Tags(\"api\")\n * get() {}\n * }\n * ```\n * ### On Class\n *\n * ```typescript\n * @Controller(\"/\")\n * @Tags(\"api\")\n * class MyController {\n * get() {}\n * }\n * ```\n *\n * @param tags\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Tags(...tags) {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation.addTags(mapTags(tags));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Tags(...tags));\n break;\n default:\n throw new UnsupportedDecoratorType(Tags, args);\n }\n });\n}\n","import { StoreSet } from \"@tsed/core\";\n/**\n * Use a view and sends the rendered HTML string to the client. Optional parameter:\n *\n * * viewOptions, an object whose properties define local variables for the view.\n *\n * The view argument is a string that is the file path of the view file to render.\n * This can be an absolute path, or a path relative to the views setting.\n * If the path does not contain a file extension, then the view engine setting determines the file extension.\n * If the path does contain a file extension, then Express will load the module for the specified template engine (via require())\n * and render it using the loaded module’s __express function.\n *\n * For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).\n *\n * > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,\n * and as so for security reasons should not contain input from the end-user.\n *\n * @param path Relative path to the view file.\n * @param options Additional options\n * @decorator\n * @operation\n * @response\n */\nexport function View(path, options) {\n return StoreSet(\"view\", { path, options });\n}\n","export function concatPath(basePath, path) {\n if (basePath instanceof RegExp || path instanceof RegExp) {\n if (!basePath) {\n return path;\n }\n if (!path) {\n return basePath;\n }\n const r1 = basePath instanceof RegExp ? basePath : new RegExp(basePath, \"gi\");\n const r2 = path instanceof RegExp ? path : new RegExp(path, \"gi\");\n return new RegExp(r1.source + r2.source, (r1.global ? \"g\" : \"\") + (r1.ignoreCase ? \"i\" : \"\") + (r1.multiline ? \"m\" : \"\"));\n }\n if (basePath && path && basePath.endsWith(\"/\") && path.startsWith(\"/\")) {\n path = path.slice(1);\n }\n const result = (basePath || \"\") + (path || \"\");\n return result.endsWith(\"/\") && result.length > 1 ? result.slice(0, -1) : result;\n}\n","import { concatPath } from \"../utils/concatPath.js\";\nexport class JsonOperationRoute {\n constructor(options) {\n Object.assign(this, options);\n this.paramsTypes = this.endpoint.getParamTypes();\n }\n get url() {\n return this.fullPath;\n }\n get path() {\n return this.operationPath?.path;\n }\n get fullPath() {\n return concatPath(this.basePath, this.path);\n }\n get method() {\n return this.operationPath?.method || \"USE\";\n }\n get name() {\n return `${this.endpoint.targetName}.${this.methodClassName}()`;\n }\n get className() {\n return this.endpoint.targetName;\n }\n get methodClassName() {\n return this.propertyKey;\n }\n get parameters() {\n return this.endpoint.parameters;\n }\n get propertyKey() {\n return String(this.endpoint.propertyKey);\n }\n get propertyName() {\n return this.endpoint.propertyName;\n }\n get store() {\n return this.endpoint.store;\n }\n get operation() {\n return this.endpoint.operation;\n }\n get operationId() {\n return this.operation.get(\"operationId\") || this.endpoint.propertyKey;\n }\n has(key) {\n return this.paramsTypes[key];\n }\n}\n","import { from } from \"./from.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\nexport function allOf(...allOf) {\n return from().allOf(allOf);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function any(...types) {\n return from().any(...types);\n}\n","import { from } from \"./from.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\nexport function anyOf(...anyOf) {\n return from().anyOf(anyOf);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new boolean model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function boolean() {\n return from(Boolean);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"array\"\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function array() {\n return from(Array);\n}\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"additionalProperties\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function map() {\n return from(Map).unknown(true);\n}\n/**\n * Declare a new array model with `uniqueItems: true`.\n *\n * ```json\n * {\n * \"type\": \"array\",\n * \"uniqueItems\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function set() {\n return from(Array).uniqueItems(true);\n}\n","import { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { from } from \"./from.js\";\n/**\n * Declare a new string model with `format: date`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function date() {\n return from(Date).format(JsonFormatTypes.DATE);\n}\n/**\n * Declare a new string model with `format: datetime`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function datetime() {\n return from(Date).format(JsonFormatTypes.DATE_TIME);\n}\n/**\n * Declare a new string model with `format: time`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function time() {\n return from(Date).format(JsonFormatTypes.TIME);\n}\n","import { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { from } from \"./from.js\";\n/**\n * Declare a new string model with `format: email`.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * ### Example\n *\n * ```typescript\n * const schema = email();\n * // Results in: { type: \"string\", format: \"email\" }\n * ```\n */\nexport function email() {\n return from(String).format(JsonFormatTypes.EMAIL);\n}\n","import { enumsRegistry } from \"../registries/enumRegistries.js\";\nimport { string } from \"./string.js\";\nexport function enums(e) {\n const schema = string().enum(e);\n enumsRegistry.set(e, schema);\n return schema;\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new integer model.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * @returns {JsonSchema} A schema configured for integer values\n * @function\n */\nexport function integer() {\n return from(Number).integer();\n}\n","import { JsonEntityStore } from \"../domain/JsonEntityStore.js\";\nimport { JsonLazyRef } from \"../domain/JsonLazyRef.js\";\n/**\n * Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.\n */\nexport function lazyRef(cb) {\n try {\n // solve issue with a self referenced model\n if (cb()) {\n // type is already accessible\n return JsonEntityStore.from(cb()).schema;\n }\n }\n catch (er) { }\n return new JsonLazyRef(cb);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new number model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function number() {\n return from(Number);\n}\n","import { from } from \"./from.js\";\n/**\n * Declare a new object model.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * ### Example\n *\n * ```typescript\n * const userSchema = object({\n * name: string(),\n * age: number()\n * });\n * ```\n *\n * @param properties - An object containing property definitions where each value is a JsonSchema\n * @returns {JsonSchema} A new object model with the specified properties\n */\nexport function object(properties = {}) {\n return from(Object).properties(properties);\n}\n","import { from } from \"./from.js\";\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\nexport function oneOf(...oneOf) {\n return from().oneOf(oneOf);\n}\n","import { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { from } from \"./from.js\";\n/**\n * Declare a new string model with `format: uri`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function uri() {\n return from(String).format(JsonFormatTypes.URI);\n}\n","import { JsonFormatTypes } from \"../domain/JsonFormatTypes.js\";\nimport { from } from \"./from.js\";\n/**\n * Declare a new string model with `format: url`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function url() {\n return from(String).format(JsonFormatTypes.URL);\n}\n","import { deepMerge, mergeReducerBuilder } from \"@tsed/core\";\n/**\n * @ignore\n */\nexport const schemesReducer = mergeReducerBuilder((current, value) => {\n if (current.type && current.type && current.type === value.type && value.type === \"array\") {\n return JSON.stringify(current.items) === JSON.stringify(value.items);\n }\n return (current.type && current.type === value.type) || (current.$ref && current.$ref === value.$ref);\n});\n/**\n * @ignore\n */\nexport const parameters = mergeReducerBuilder((current, value) => current.in === value.in && current.name === value.name);\n/**\n * @ignore\n */\nexport const security = mergeReducerBuilder((current, value) => {\n return !!Object.keys(value).find((key) => !!current[key]);\n});\n/**\n * @ignore\n */\nexport const tagsReducer = mergeReducerBuilder((current, value) => current.name === value.name);\n/**\n * @ignore\n */\nconst SPEC_REDUCERS = {\n security,\n parameters,\n oneOf: schemesReducer,\n anyOf: schemesReducer,\n allOf: schemesReducer,\n tags: tagsReducer\n};\n/**\n * Merge two spec\n * @param spec\n * @param input\n */\nexport function mergeSpec(spec, input) {\n return deepMerge(spec, input, {\n reducers: SPEC_REDUCERS,\n cleanUndefinedProps: true\n });\n}\n","import { cleanObject, isArray } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\nimport { operationIdFormatter } from \"./operationIdFormatter.js\";\n/**\n * @ignore\n */\nconst caches = new Map();\n/**\n * @ignore\n */\nfunction get(model, options, cb) {\n if (!caches.has(model)) {\n caches.set(model, new Map());\n }\n const cache = caches.get(model);\n const key = JSON.stringify(options);\n if (!cache.has(key)) {\n cache.set(key, cb());\n }\n return cache.get(key);\n}\nfunction generate(model, options) {\n const store = getJsonEntityStore(model);\n const { rootPath = \"/\" } = options;\n options = {\n ...options,\n rootPath,\n defaultTags: [\n cleanObject({\n name: store.schema.getName(),\n description: store.schema.get(\"description\")\n })\n ]\n };\n return execMapper(\"generate\", [store], options);\n}\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model, options = {}) {\n options = {\n specType: SpecTypes.OPENAPI,\n ...options,\n tags: [],\n paths: {},\n channels: {},\n components: {},\n operationIdFormatter: options.operationIdFormatter || operationIdFormatter(options.operationIdPattern),\n root: false\n };\n if (isArray(model)) {\n let finalSpec = {};\n options = {\n ...options,\n append(spec) {\n finalSpec = mergeSpec(finalSpec, spec);\n }\n };\n model.forEach(({ token, ...opts }) => {\n const spec = getSpec(token, {\n ...options,\n ...opts\n });\n options.append(spec);\n });\n return finalSpec;\n }\n return get(model, options, () => generate(model, options));\n}\n","import { SpecTypes } from \"../domain/SpecTypes.js\";\n/**\n * @ignore\n * @param version\n */\nexport function getSpecType(version) {\n return version.startsWith(\"3.\") ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n/**\n * @ignore\n * @param spec\n */\nexport function getSpecTypeFromSpec(spec) {\n return \"openapi\" in spec ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n","import { cleanObject } from \"@tsed/core\";\n/**\n * @ignore\n * @param info\n */\nexport function mapOpenSpecInfo(info) {\n const { title, description, version, termsOfService, contact, license } = info;\n return cleanObject({\n version,\n title,\n description,\n termsOfService,\n contact,\n license\n });\n}\n","import { getValue, uniq } from \"@tsed/core\";\nimport { mapOpenSpecInfo } from \"./mapOpenSpecInfo.js\";\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n * @param acceptMimes\n */\nexport function mapOpenSpec2(spec, { version, specVersion, acceptMimes = [\"application/json\"] }) {\n const { paths, security, tags, host, basePath, schemes, consumes = [], produces = [\"application/json\"], definitions, parameters, responses, securityDefinitions, externalDocs } = spec;\n return {\n swagger: specVersion,\n consumes: uniq([...acceptMimes, ...consumes]),\n produces: uniq([...produces]),\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n paths,\n host,\n basePath,\n schemes,\n definitions,\n parameters,\n responses,\n security,\n securityDefinitions,\n tags,\n externalDocs\n };\n}\n","import { getValue } from \"@tsed/core\";\nimport { mapOpenSpecInfo } from \"./mapOpenSpecInfo.js\";\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n */\nexport function mapOpenSpec3(spec, { specVersion }) {\n const { servers, paths, components, security, tags, externalDocs } = spec;\n return {\n openapi: specVersion,\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n servers,\n paths,\n components,\n security,\n tags,\n externalDocs\n };\n}\n","import { getValue, setValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { getSpecType } from \"./getSpecType.js\";\nimport { mapOpenSpec2 } from \"./mapOpenSpec2.js\";\nimport { mapOpenSpec3 } from \"./mapOpenSpec3.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\n/**\n * @ignore\n * @param spec\n * @param fileSpec\n * @param version\n * @param acceptMimes\n * @param specVersion\n */\nexport function mapOpenSpec(spec, { fileSpec, acceptMimes, specVersion, version }) {\n specVersion = specVersion || getValue(spec, \"openapi\", getValue(spec, \"swagger\", \"2.0\"));\n const options = {\n specVersion,\n acceptMimes\n };\n switch (getSpecType(specVersion)) {\n case SpecTypes.OPENAPI:\n spec = mapOpenSpec3(spec, options);\n fileSpec = fileSpec ? mapOpenSpec3(fileSpec, options) : fileSpec;\n break;\n default:\n case SpecTypes.SWAGGER:\n spec = mapOpenSpec2(spec, options);\n fileSpec = fileSpec ? mapOpenSpec2(fileSpec, options) : fileSpec;\n break;\n }\n spec = mergeSpec(spec, fileSpec);\n setValue(spec, \"info.title\", getValue(spec, \"info.title\", \"Api documentation\"));\n setValue(spec, \"info.version\", getValue(spec, \"info.version\", version));\n return spec;\n}\n","\"use strict\";\nimport { cleanObject } from \"@tsed/core\";\nconst HTTP_METHODS = [\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\", \"trace\"];\nconst SCHEMA_PROPERTIES = [\n \"format\",\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"minLength\",\n \"maxLength\",\n \"multipleOf\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"minProperties\",\n \"maxProperties\",\n \"additionalProperties\",\n \"pattern\",\n \"enum\",\n \"default\"\n];\nconst ARRAY_PROPERTIES = [\"type\", \"items\"];\nconst APPLICATION_JSON_REGEX = /^(application\\/json|[^;\\/ \\t]+\\/[^;\\/ \\t]+[+]json)[ \\t]*(;.*)?$/;\nconst SUPPORTED_MIME_TYPES = {\n APPLICATION_X_WWW_URLENCODED: \"application/x-www-form-urlencoded\",\n MULTIPART_FORM_DATA: \"multipart/form-data\"\n};\nfunction fixRef(ref) {\n return ref.replace(\"#/components/schemas/\", \"#/definitions/\").replace(\"#/components/\", \"#/x-components/\");\n}\nfunction fixRefs(obj) {\n if (Array.isArray(obj)) {\n obj.forEach(fixRefs);\n }\n else if (typeof obj === \"object\") {\n for (let key in obj) {\n if (key === \"$ref\") {\n obj.$ref = fixRef(obj.$ref);\n }\n else {\n fixRefs(obj[key]);\n }\n }\n }\n}\nfunction isJsonMimeType(type) {\n return new RegExp(APPLICATION_JSON_REGEX, \"i\").test(type);\n}\nfunction getSupportedMimeTypes(content) {\n const MIME_VALUES = Object.keys(SUPPORTED_MIME_TYPES).map((key) => {\n return SUPPORTED_MIME_TYPES[key];\n });\n return Object.keys(content).filter((key) => {\n return MIME_VALUES.indexOf(key) > -1 || isJsonMimeType(key);\n });\n}\nexport function transformSecurity(securitySchemes) {\n function map(security) {\n const { scheme, type, name, bearerFormat, flows, ...props } = security;\n switch (type) {\n case \"http\":\n if (scheme === \"basic\") {\n return {\n ...props,\n type: scheme\n };\n }\n if (scheme === \"bearer\") {\n return {\n ...props,\n type: \"apiKey\",\n name: \"Authorization\",\n in: \"header\"\n };\n }\n break;\n case \"oauth2\":\n const flowName = Object.keys(flows)[0];\n const flow = flows[flowName];\n let flowType = flowName;\n if (flowType === \"clientCredentials\") {\n flowType = \"application\";\n }\n else if (flowType === \"authorizationCode\") {\n flowType = \"accessCode\";\n }\n return {\n type,\n flow: flowType,\n authorizationUrl: flow.authorizationUrl,\n tokenUrl: flow.tokenUrl,\n scopes: flow.scopes\n };\n }\n }\n return Object.entries(securitySchemes).reduce((securityDefinitions, [key, security]) => {\n const securityDefinition = map(security);\n if (securityDefinition) {\n securityDefinitions[key] = securityDefinition;\n }\n return securityDefinitions;\n }, {});\n}\nexport function transformInformation(server) {\n let serverUrl = server.url;\n const variables = server[\"variables\"] || {};\n for (const variable in variables) {\n const variableObject = variables[variable] || {};\n if (variableObject[\"default\"]) {\n const re = RegExp(`{${variable}}`, \"g\");\n serverUrl = serverUrl.replace(re, variableObject[\"default\"]);\n }\n }\n const url = new URL(serverUrl);\n return {\n host: url.host ? url.host : undefined,\n basePath: url.pathname,\n schemes: url.protocol !== null ? [url.protocol.substring(0, url.protocol.length - 1)] : undefined\n };\n}\nexport class Converter {\n constructor(spec) {\n this.spec = JSON.parse(JSON.stringify(spec));\n }\n convertInfos() {\n const server = this.spec.servers && this.spec.servers[0];\n if (server) {\n return transformInformation(server);\n }\n return {};\n }\n resolveReference(base, obj, shouldClone) {\n if (!obj || !obj.$ref) {\n return obj;\n }\n const ref = obj.$ref;\n if (ref.startsWith(\"#\")) {\n const keys = ref.split(\"/\").map((k) => k.replace(/~1/g, \"/\").replace(/~0/g, \"~\"));\n keys.shift();\n let cur = base;\n keys.forEach((k) => {\n cur = cur[k];\n });\n return shouldClone ? JSON.parse(JSON.stringify(cur)) : cur;\n }\n }\n convert() {\n const spec = {\n swagger: \"2.0\",\n ...this.convertInfos(),\n paths: this.spec.paths ? this.convertOperations(this.spec.paths, this.spec) : undefined\n };\n if (this.spec.components) {\n this.convertSchemas();\n this.convertSecurityDefinitions();\n this.spec[\"x-components\"] = this.spec.components;\n delete this.spec.components;\n fixRefs(this.spec);\n }\n delete this.spec.servers;\n delete this.spec.openapi;\n delete this.spec[\"x-components\"];\n return cleanObject({\n ...spec,\n ...this.spec\n });\n }\n convertOperations(paths, spec) {\n return Object.entries(paths).reduce((paths, [path, operation]) => {\n const pathObject = (paths[path] = this.resolveReference({ ...spec, paths }, operation, true));\n this.convertParameters(pathObject); // converts common parameters\n Object.keys(pathObject).forEach((method) => {\n if (HTTP_METHODS.indexOf(method) >= 0) {\n const operation = (pathObject[method] = this.resolveReference({ ...spec, paths }, pathObject[method], true));\n this.convertOperationParameters(operation);\n this.convertResponses(operation);\n }\n });\n return paths;\n }, paths);\n }\n convertOperationParameters(operation) {\n let content, contentKey, mediaRanges, mediaTypes;\n operation.parameters = operation.parameters || [];\n if (operation.requestBody) {\n let param = this.resolveReference(this.spec, operation.requestBody, true);\n // fixing external $ref in body\n if (operation.requestBody.content) {\n const type = getSupportedMimeTypes(operation.requestBody.content)[0];\n const structuredObj = { content: {} };\n const data = operation.requestBody.content[type];\n if (data && data.schema && data.schema.$ref && !data.schema.$ref.startsWith(\"#\")) {\n param = this.resolveReference(this.spec, data.schema, true);\n structuredObj[\"content\"][`${type}`] = { schema: param };\n param = structuredObj;\n }\n }\n param.name = \"body\";\n content = param.content;\n if (content && Object.keys(content).length) {\n mediaRanges = Object.keys(content).filter((mediaRange) => mediaRange.indexOf(\"/\") > 0);\n mediaTypes = mediaRanges.filter((range) => range.indexOf(\"*\") < 0);\n contentKey = getSupportedMimeTypes(content)[0];\n delete param.content;\n if ([SUPPORTED_MIME_TYPES.APPLICATION_X_WWW_URLENCODED, SUPPORTED_MIME_TYPES.MULTIPART_FORM_DATA].includes(contentKey)) {\n operation.consumes = mediaTypes;\n param.in = \"formData\";\n param.schema = content[contentKey].schema;\n param.schema = this.resolveReference(this.spec, param.schema, true);\n if (param.schema.type === \"object\" && param.schema.properties) {\n const required = param.schema.required || [];\n Object.keys(param.schema.properties).forEach((name) => {\n const schema = param.schema.properties[name];\n // readOnly properties should not be sent in requests\n if (!schema.readOnly) {\n const formDataParam = {\n name,\n in: \"formData\",\n schema\n };\n if (required.indexOf(name) >= 0) {\n formDataParam.required = true;\n }\n operation.parameters?.push(formDataParam);\n }\n });\n }\n else {\n operation.parameters.push(param);\n }\n }\n else if (contentKey) {\n operation.consumes = mediaTypes;\n param.in = \"body\";\n param.schema = content[contentKey].schema;\n operation.parameters.push(param);\n }\n else if (mediaRanges) {\n operation.consumes = mediaTypes || [\"application/octet-stream\"];\n param.in = \"body\";\n param.name = param.name || \"file\";\n delete param.type;\n param.schema = content[mediaRanges[0]].schema || {\n type: \"string\",\n format: \"binary\"\n };\n operation.parameters.push(param);\n }\n if (param.schema) {\n this.convertSchema(param.schema, \"request\");\n }\n }\n delete operation.requestBody;\n }\n this.convertParameters(operation);\n }\n convertParameters(obj) {\n if (obj.parameters === undefined) {\n return;\n }\n obj.parameters = obj.parameters || [];\n (obj.parameters || []).forEach((param, i) => {\n param = obj.parameters[i] = this.resolveReference(this.spec, param, false);\n if (param.in !== \"body\") {\n this.copySchemaProperties(param, SCHEMA_PROPERTIES);\n this.copySchemaProperties(param, ARRAY_PROPERTIES);\n this.copySchemaXProperties(param);\n if (!param.description) {\n const schema = this.resolveReference(this.spec, param.schema, false);\n if (!!schema && schema.description) {\n param.description = schema.description;\n }\n }\n if (param.example !== undefined) {\n param[\"x-example\"] = param.example;\n }\n delete param.schema;\n delete param.allowReserved;\n delete param.example;\n }\n if (param.type === \"array\") {\n let style = param.style || (param.in === \"query\" || param.in === \"cookie\" ? \"form\" : \"simple\");\n switch (style) {\n case \"matrix\":\n param.collectionFormat = param.explode ? undefined : \"csv\";\n break;\n case \"label\":\n param.collectionFormat = undefined;\n break;\n case \"simple\":\n param.collectionFormat = \"csv\";\n break;\n case \"spaceDelimited\":\n param.collectionFormat = \"ssv\";\n break;\n case \"pipeDelimited\":\n param.collectionFormat = \"pipes\";\n break;\n case \"deepOpbject\":\n param.collectionFormat = \"multi\";\n break;\n case \"form\":\n param.collectionFormat = param.explode === false ? \"csv\" : \"multi\";\n break;\n }\n }\n delete param.style;\n delete param.explode;\n });\n }\n copySchemaProperties(obj, props) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n props.forEach((prop) => {\n const value = schema[prop];\n if (prop === \"additionalProperties\" && typeof value === \"boolean\") {\n return;\n }\n if (value !== undefined) {\n obj[prop] = value;\n }\n });\n }\n copySchemaXProperties(obj) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n Object.keys(schema).forEach((propName) => {\n if (Reflect.hasOwnProperty.call(schema, propName) && !Reflect.hasOwnProperty.call(obj, propName) && propName.startsWith(\"x-\")) {\n obj[propName] = schema[propName];\n }\n });\n }\n convertResponses(operation) {\n // var anySchema, code, content, jsonSchema, mediaRange, mediaType, response, resolved, headers\n Object.keys(operation.responses || {}).forEach((code) => {\n const response = (operation.responses[code] = this.resolveReference(this.spec, operation.responses[code], true));\n if (response.content) {\n let anySchema = null;\n let jsonSchema = null;\n Object.keys(response.content).forEach((mediaRange) => {\n // produces and examples only allow media types, not ranges\n // use application/octet-stream as a catch-all type\n const mediaType = mediaRange.indexOf(\"*\") < 0 ? mediaRange : \"application/octet-stream\";\n if (!operation.produces) {\n operation.produces = [mediaType];\n }\n else if (operation.produces.indexOf(mediaType) < 0) {\n operation.produces.push(mediaType);\n }\n const content = response.content[mediaRange];\n anySchema = anySchema || content.schema;\n if (!jsonSchema && isJsonMimeType(mediaType)) {\n jsonSchema = content.schema;\n }\n if (content.example) {\n response.examples = response.examples || {};\n response.examples[mediaType] = content.example;\n }\n });\n if (anySchema) {\n response.schema = jsonSchema || anySchema;\n const resolved = this.resolveReference(this.spec, response.schema, true);\n if (resolved && response.schema.$ref && !response.schema.$ref.startsWith(\"#\")) {\n response.schema = resolved;\n }\n this.convertSchema(response.schema, \"response\");\n }\n }\n Object.keys(response.headers || {}).forEach((header) => {\n // Always resolve headers when converting to v2.\n const resolved = this.resolveReference(this.spec, response.headers[header], true);\n // Headers should be converted like parameters.\n if (resolved.schema) {\n resolved.type = resolved.schema.type;\n resolved.format = resolved.schema.format;\n delete resolved.schema;\n }\n response.headers[header] = resolved;\n });\n delete response.content;\n });\n }\n convertSchema(def, operationDirection) {\n if (def.oneOf) {\n delete def.oneOf;\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n if (def.anyOf) {\n delete def.anyOf;\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n if (def.allOf) {\n for (const i in def.allOf) {\n this.convertSchema(def.allOf[i], operationDirection);\n }\n }\n if (def.discriminator) {\n if (def.discriminator.mapping) {\n this.convertDiscriminatorMapping(def.discriminator.mapping);\n }\n def.discriminator = def.discriminator.propertyName;\n }\n switch (def.type) {\n case \"object\":\n if (def.properties) {\n Object.keys(def.properties).forEach((propName) => {\n if (def.properties[propName].writeOnly === true && operationDirection === \"response\") {\n delete def.properties[propName];\n }\n else {\n this.convertSchema(def.properties[propName], operationDirection);\n delete def.properties[propName].writeOnly;\n }\n });\n }\n break;\n case \"array\":\n if (def.items) {\n this.convertSchema(def.items, operationDirection);\n }\n }\n if (def.nullable) {\n def[\"x-nullable\"] = true;\n delete def.nullable;\n }\n // OpenAPI 3 has boolean \"deprecated\" on Schema, OpenAPI 2 does not\n // Convert to x-deprecated for Autorest (and perhaps others)\n if (def[\"deprecated\"] !== undefined) {\n // Move to x-deprecated, unless it is already defined\n if (def[\"x-deprecated\"] === undefined) {\n def[\"x-deprecated\"] = def.deprecated;\n }\n delete def.deprecated;\n }\n }\n convertSchemas() {\n this.spec.definitions = this.spec.components.schemas;\n Object.keys(this.spec.definitions || {}).forEach((defName) => {\n this.convertSchema(this.spec.definitions[defName]);\n });\n delete this.spec.components.schemas;\n }\n convertDiscriminatorMapping(mapping) {\n Object.keys(mapping).forEach((payload) => {\n const schemaNameOrRef = mapping[payload];\n if (typeof schemaNameOrRef !== \"string\") {\n console.warn(`Ignoring ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n return;\n }\n // payload may be a schema name or JSON Reference string.\n // OAS3 spec limits schema names to ^[a-zA-Z0-9._-]+$\n // Note: Valid schema name could be JSON file name without extension.\n // Prefer schema name, with file name as fallback.\n let schema;\n if (/^[a-zA-Z0-9._-]+$/.test(schemaNameOrRef)) {\n try {\n schema = this.resolveReference(this.spec, { $ref: `#/components/schemas/${schemaNameOrRef}` }, false);\n }\n catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} as schema name in discriminator.mapping: ${err}`);\n }\n }\n // schemaNameRef is not a schema name. Try to resolve as JSON Ref.\n if (!schema) {\n try {\n schema = this.resolveReference(this.spec, { $ref: schemaNameOrRef }, false);\n }\n catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} in discriminator.mapping: ${err}`);\n }\n }\n if (schema) {\n // Swagger Codegen + OpenAPI Generator extension\n // https://github.com/swagger-api/swagger-codegen/pull/4252\n schema[\"x-discriminator-value\"] = payload;\n // AutoRest extension\n // https://github.com/Azure/autorest/pull/474\n schema[\"x-ms-discriminator-value\"] = payload;\n }\n else {\n console.warn(`Unable to resolve ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n }\n });\n }\n convertSecurityDefinitions() {\n if (this.spec.components.securitySchemes) {\n this.spec.securityDefinitions = transformSecurity(this.spec.components.securitySchemes);\n delete this.spec.components.securitySchemes;\n }\n }\n}\nexport function transformToOS2(spec) {\n return new Converter(spec).convert();\n}\n","import { getValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { getSpec } from \"./getSpec.js\";\nimport { getSpecTypeFromSpec } from \"./getSpecType.js\";\nimport { mapOpenSpec } from \"./mapOpenSpec.js\";\nimport { mergeSpec } from \"./mergeSpec.js\";\nimport { transformToOS2 } from \"./transformToOS2.js\";\n/**\n * Generate OpenAPI spec from multiple sources (models, files, conf)\n * @param tokens\n * @param options\n */\nexport function generateSpec({ tokens, ...options }) {\n const { version = \"1.0.0\", acceptMimes, fileSpec = {}, specVersion } = options;\n const defaultSpec = mapOpenSpec(getValue(options, \"spec\", {}), {\n fileSpec,\n version,\n specVersion,\n acceptMimes\n });\n const specType = getSpecTypeFromSpec(defaultSpec);\n let controllersSpec = getSpec(tokens, options);\n const spec = mergeSpec(defaultSpec, controllersSpec);\n if (options.sortPaths) {\n spec.paths = Object.fromEntries(Object.entries(spec.paths).sort(([k1], [k2]) => {\n return k1.localeCompare(k2);\n }));\n }\n if (specType === SpecTypes.SWAGGER) {\n return transformToOS2(spec);\n }\n return spec;\n}\n","import \"../components/index.js\";\nimport { getValue } from \"@tsed/core\";\nimport { SpecTypes } from \"../domain/SpecTypes.js\";\nimport { execMapper } from \"../registries/JsonSchemaMapperContainer.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * @ignore\n */\nconst CACHE_KEY = \"$cache:schemes\";\n/**\n * @ignore\n */\nfunction getKey(options) {\n return JSON.stringify(options);\n}\n/**\n * @ignore\n */\nfunction get(entity, options) {\n const cache = entity.store.get(CACHE_KEY) || new Map();\n const key = getKey(options);\n if (!cache.has(key)) {\n const schema = execMapper(\"schema\", [entity.schema], options);\n if (Object.keys(getValue(options, \"components.schemas\", {})).length) {\n schema.definitions = options.components.schemas;\n }\n cache.set(key, schema);\n }\n entity.store.set(CACHE_KEY, cache);\n return cache.get(key);\n}\nexport function getJsonSchema(model, options = {}) {\n const entity = getJsonEntityStore(model);\n const specType = options.specType || SpecTypes.JSON;\n options = {\n endpoint: true,\n groups: [],\n inlineEnums: specType === SpecTypes.JSON,\n ...options,\n specType,\n components: {\n schemas: {}\n }\n };\n if (entity.decoratorType === \"parameter\") {\n options = {\n ...options,\n genericTypes: entity.nestedGenerics[0],\n nestedGenerics: entity.nestedGenerics,\n groups: entity.parameter?.groups\n };\n }\n return get(entity, options);\n}\n","import { JsonOperationRoute } from \"../domain/JsonOperationRoute.js\";\nimport { concatPath } from \"./concatPath.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\nimport { getOperationsStores } from \"./getOperationsStores.js\";\nexport function getOperationsRoutes(token, options = {}) {\n const store = token.isStore ? token : getJsonEntityStore(token);\n const basePath = concatPath(options.basePath, store.path);\n let operationsRoutes = [];\n if (options.withChildren) {\n const children = store.get(\"childrenControllers\", []);\n operationsRoutes = children.reduce((operationsRoutes, token) => {\n return operationsRoutes.concat(getOperationsRoutes(token, {\n ...options,\n basePath\n }));\n }, operationsRoutes);\n }\n return [...getOperationsStores(token).values()].reduce((routes, endpoint) => {\n const { operation } = endpoint;\n if (operation) {\n operation.getAllowedOperationPath(options.allowedVerbs).forEach((operationPath) => {\n routes.push(new JsonOperationRoute({\n basePath,\n token,\n endpoint,\n operationPath\n }));\n });\n }\n return routes;\n }, operationsRoutes);\n}\n","import { alterIgnore } from \"../hooks/alterIgnore.js\";\nimport { getInheritedStores } from \"./getInheritedStores.js\";\nimport { getJsonEntityStore } from \"./getJsonEntityStore.js\";\n/**\n * Return the list of properties including properties from inherited classes\n * @param target\n * @ignore\n */\nexport function getPropertiesStores(target) {\n const store = target.isStore ? target : getJsonEntityStore(target);\n if (!store.$properties) {\n const stores = getInheritedStores(store);\n store.$properties = new Map();\n stores.forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (!store.$properties.has(propStore.propertyKey)) {\n store.$properties.set(propStore.propertyKey, propStore);\n }\n });\n });\n }\n return store.$properties;\n}\n/**\n * @ignore\n */\nexport function getProperties(target, options = {}) {\n const stores = getPropertiesStores(target);\n const map = new Map();\n stores.forEach((store, key) => {\n if (!options.withIgnoredProps) {\n if (alterIgnore(store.itemSchema, options)) {\n return;\n }\n }\n map.set(key, store);\n });\n return map;\n}\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__579__","__WEBPACK_EXTERNAL_MODULE__414__","__WEBPACK_EXTERNAL_MODULE__171__","WIN_SLASH","WIN_NO_SLASH","DOT_LITERAL","SLASH_LITERAL","QMARK","END_ANCHOR","START_ANCHOR","DOTS_SLASH","POSIX_CHARS","PLUS_LITERAL","QMARK_LITERAL","ONE_CHAR","NO_DOT","NO_DOTS","NO_DOT_SLASH","NO_DOTS_SLASH","QMARK_NO_DOT","STAR","SEP","WINDOWS_CHARS","MAX_LENGTH","POSIX_REGEX_SOURCE","alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit","REGEX_BACKSLASH","REGEX_NON_SPECIAL_CHARS","REGEX_SPECIAL_CHARS","REGEX_SPECIAL_CHARS_BACKREF","REGEX_SPECIAL_CHARS_GLOBAL","REGEX_REMOVE_BACKSLASH","REPLACEMENTS","CHAR_0","CHAR_9","CHAR_UPPERCASE_A","CHAR_LOWERCASE_A","CHAR_UPPERCASE_Z","CHAR_LOWERCASE_Z","CHAR_LEFT_PARENTHESES","CHAR_RIGHT_PARENTHESES","CHAR_ASTERISK","CHAR_AMPERSAND","CHAR_AT","CHAR_BACKWARD_SLASH","CHAR_CARRIAGE_RETURN","CHAR_CIRCUMFLEX_ACCENT","CHAR_COLON","CHAR_COMMA","CHAR_DOT","CHAR_DOUBLE_QUOTE","CHAR_EQUAL","CHAR_EXCLAMATION_MARK","CHAR_FORM_FEED","CHAR_FORWARD_SLASH","CHAR_GRAVE_ACCENT","CHAR_HASH","CHAR_HYPHEN_MINUS","CHAR_LEFT_ANGLE_BRACKET","CHAR_LEFT_CURLY_BRACE","CHAR_LEFT_SQUARE_BRACKET","CHAR_LINE_FEED","CHAR_NO_BREAK_SPACE","CHAR_PERCENT","CHAR_PLUS","CHAR_QUESTION_MARK","CHAR_RIGHT_ANGLE_BRACKET","CHAR_RIGHT_CURLY_BRACE","CHAR_RIGHT_SQUARE_BRACKET","CHAR_SEMICOLON","CHAR_SINGLE_QUOTE","CHAR_SPACE","CHAR_TAB","CHAR_UNDERSCORE","CHAR_VERTICAL_LINE","CHAR_ZERO_WIDTH_NOBREAK_SPACE","extglobChars","chars","type","open","close","globChars","win32","constants","utils","expandRange","args","options","sort","value","join","RegExp","ex","map","v","escapeRegex","syntaxError","char","parse","input","TypeError","opts","max","maxLength","Math","min","len","length","SyntaxError","bos","output","prepend","tokens","capture","PLATFORM_CHARS","windows","EXTGLOB_CHARS","globstar","dot","nodot","qmarkNoDot","star","bash","noext","noextglob","state","index","start","consumed","prefix","backtrack","negated","brackets","braces","parens","quotes","removePrefix","extglobs","stack","prev","eos","peek","n","advance","remaining","slice","consume","num","append","token","negate","count","increment","push","decrement","pop","tok","isBrace","isExtglob","extglob","inner","extglobOpen","conditions","extglobClose","extglobStar","includes","test","negatedExtglob","fastpaths","backslashes","replace","m","esc","first","rest","repeat","unescape","contains","wrapOutput","next","match","exec","slashes","posix","idx","lastIndexOf","pre","indexOf","keepQuotes","strictBrackets","nobracket","prevValue","literalBrackets","hasRegexChars","escaped","nobrace","outputIndex","tokensIndex","brace","dots","arr","range","i","unshift","comma","out","toks","t","supportsLookbehinds","Error","nonegate","regex","noglobstar","prior","before","isStart","afterStar","after","strictSlashes","end","escapeLast","suffix","slashDot","create","str","source","scan","picomatch","glob","returnState","Array","isArray","fns","arrayMatcher","isMatch","isState","val","compileRe","makeRe","isIgnored","ignore","ignoreOpts","onMatch","onResult","matcher","returnObject","result","onIgnore","format","toPosixSlashes","matchBase","basename","Boolean","patterns","pattern","p","parsed","returnOutput","toRegex","startsWith","undefined","flags","nocase","err","debug","isPathSeparator","code","depth","isPrefix","isGlobstar","Infinity","scanToEnd","parts","lastIndex","isBracket","isGlob","braceEscaped","finished","charCodeAt","noparen","base","removeBackslashes","maxDepth","prevIndex","isObject","isRegexChar","segs","process","version","split","Number","lastIdx","path","codes","getStatusMessage","Object","prototype","hasOwnProperty","call","status","message","parseInt","isNaN","msg","toLowerCase","getStatusCode","keys","forEach","createMessageToStatusCodeMap","createStatusCodeList","redirect","empty","retry","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","obj","prop","r","Symbol","toStringTag","OperationVerbs","OPERATION_HTTP_VERBS","ALL","GET","POST","PUT","PATCH","HEAD","DELETE","OPTIONS","TRACE","CUSTOM","OPERATION_WS_VERBS","PUBLISH","SUBSCRIBE","JsonSchemaMappersContainer","Map","registerJsonSchemaMapper","mapper","spec","set","getJsonSchemaMapper","specType","execMapper","parent","hasMapper","has","execOneOfMapper","types","find","buildPath","filter","__decorate","decorators","target","desc","c","arguments","getOwnPropertyDescriptor","Reflect","decorate","__metadata","metadataKey","metadataValue","metadata","SuppressedError","JsonEntitiesContainer","JsonEntityStore","constructor","this","isStore","propertyKey","descriptor","decoratorType","propertyName","String","store","targetName","nameOf","isCollection","collectionType","isArrayOrArrayClass","discriminatorAncestor","ancestor","ancestorsOf","from","schema","isDiscriminator","isPrimitive","isPrimitiveOrPrimitiveClass","_type","isDate","computedType","isClass","_schema","nestedGenerics","build","itemSchema","getComputedType","parentSchema","isDiscriminatorChild","discriminator","prototypeOf","Store","decoratorTypeOf","jsonSchemaStore","classOf","fromMethod","descriptorOf","isGetterOnly","defaultValue","toString","buildType","isPlainObject","getBestType","hasDiscriminator","isClassObject","getTarget","isArrowFn","JsonEntityComponent","enumsRegistry","isPromise","Function","isSymbol","JSON_TYPES","getJsonType","primitiveOf","Set","isBuffer","serializeEnum","enumValue","entries","reduce","acc","concat","serializeEnumValues","enumValues","values","add","getValue","uniq","toJsonRegex","Discriminator","assign","cleanObject","getType","discriminatorValue","getValues","getDefaultValue","children","mapProperties","properties","JsonSchema","mapToJsonSchema","item","$isJsonDocument","isLazyRef","isPrimitiveClass","super","$kind","$hooks","Hooks","$required","$allow","$forwardGroups","$ignore","isDiscriminatorKey","alias","genericLabels","class","Date","isGeneric","hasGenerics","genericType","canRef","isNullable","isReadOnly","isWriteOnly","nullable","getAliasOf","property","addAlias","removeAlias","delete","$id","$ref","$schema","label","name","cb","on","description","discriminatorKey","const","examples","enum","additionalItems","example","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","allow","minLength","any","required","clone","$selfRequired","clear","addRequired","removeRequired","isRequired","addProperty","patternProperties","additionalProperties","unknown","dependencies","propertyNames","getName","flat","definitions","allOf","setManyOf","anyOf","oneOf","not","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","integer","isFunction","jsonType","title","readOnly","writeOnly","customKey","toObject","toJSON","getComputedItemType","keyword","resolved","jsonSchema","mapping","JsonClassStore","DecoratorTypes","CLASS","isSuccessStatus","isRedirectionStatus","JsonMap","mapHeaders","headers","newHeaders","toJsonMapCollection","content","klass","JsonMedia","groups","JsonResponse","getContent","getMedia","mediaType","addMedia","isBinary","JsonMethodPath","method","summary","JsonOperation","parameters","responses","operationPaths","response","getResponses","getStatus","tags","addTags","uniqBy","operationId","defaultStatus","setRedirection","isRedirection","addResponse","statusCode","res","getResponseOf","currentCode","currentResponse","deepMerge","ensureResponseOf","getHeadersOf","getContentTypeOf","security","addSecurityScopes","scopes","deprecated","addParameter","parameter","consumes","produces","addProduce","produce","addOperationPath","operationPath","getAllowedOperationPath","allowedVerbs","toUpperCase","JsonMethodStore","middlewares","beforeMiddlewares","afterMiddlewares","operation","use","params","view","acceptMimes","mimes","getResponseOptions","contentType","media","allowedGroups","size","include","ctrlValue","getParamTypes","paramType","Metadata","getReturnType","METHOD","EndpointMetadata","JsonParameterTypes","formatParameterType","isParameterType","JsonParameter","inType","expression","JsonParameterStore","pipes","dataPath","allowedRequiredValues","getParams","reverse","isMethodDescriptor","param","getSchema","PARAM","ParamMetadata","JsonPropertyStore","PROP","PropertyMetadata","getJsonEntityStore","JsonOperationPathsMap","getKey","setOperationPath","getInheritedStores","$inherited","context","model","getOperationsStores","$operations","currentStore","propStore","removeHiddenOperation","operationStore","ALLOWED_VERBS","channelsMapper","channels","rootPath","ctrlRootPath","flatMap","camelCase","pushToChannels","SpecTypes","makeOf","schemes","messageMapper","jsonOperationStore","defaultTags","event","messageKey","components","payload","responsesSchema","messages","getGenericsMap","genericTypes","mapGenericsOptions","ops","generics","popGenerics","payloadMapper","payloadName","pascalCase","setValue","groupsName","mapOptions","BODY","QUERY","PATH","HEADER","responsePayloadMapper","statuses","statusesTexts","successSchemes","errorSchemes","jsonResponse","responsePayloadName","responsePayload","statusText","dataSchema","errorSchema","specJson","schemas","ASYNCAPI","JsonLazyRef","createRefName","createRef","host","OPENAPI","getHost","ref","toRef","anyMapper","enumSchema","classMapper","props","discriminatorMappingMapper","_","newMapping","isString","enumsMapper","inlineEnums","genericsMapper","alterMerge","inheritedClassMapper","stores","alter","itemMapper","lazyRefMapper","jsonLazyRef","$refs","mapMapper","MANY_OF_PROPERTIES","STRING_PROPERTIES","BOOLEAN_PROPERTIES","NUMBER_PROPERTIES","ARRAY_PROPERTIES","OBJECT_PROPERTIES","COMMON_PROPERTIES","nullableMapper","some","isInteger","alterIgnore","isBoolean","objectMapper","operationIdFormatter","useAlias","ctx","withIgnoredProps","ofMapper","propertiesMapper","alterRequiredGroups","requiredMapper","k","extractRequiredProps","aliasedKey","mapRequiredProps","mapAliasedProperties","RULES","string","is","number","isNumber","boolean","array","object","alterOneOf","kind","findManyOf","rule","pickProperties","IGNORES","SWAGGER","JSON","IGNORES_OPENSPEC","schemaMapper","addDef","customKeys","shouldSkipKey","isExample","isEmptyProperties","shouldMapAlias","mapKeys","serializeSchema","wrapEnumsMapper","paths","nullableMapperOpenApi","operationInFilesMapper","operationInParameterMapper","jsonParameter","paramOpts","oldSchemas","mapperName","operationInParametersMapper","buildExamples","hasKey","newExamples","operationInQueryMapper","jsonParameters","style","inlineReference","HTTP_STATUS_MESSAGES","constantCase","getStatusConstant","operationMapper","jsonOperation","parametersOptions","bodyParameters","inputs","FILES","extractParameters","requestBody","operationTags","operationMediaMapper","jsonMedia","JsonRequestBody","addContent","mediaContent","operationRequestBodyMapper","in","refs","propsLength","hasFile","propSchema","buildSchemaFromBodyParameters","operationResponseMapper","concatParameters","getJsonPathParameters","isOptional","current","inCapture","parseUrl","subpath","optional","postfix","right","splited","splice","getVariable","DEFAULT_PATTERN","OPERATION_IDS","transform","operationKey","id","getOperationId","pushToPath","pathsMapper","mapOperation","mapOperationInPathParameters","JsonEntityFn","fn","Children","childToken","DiscriminatorValue","snakeCase","CollectionOf","decorator","MinItems","MaxItems","MinProperties","MaxProperties","Contains","UniqueItems","ArrayOf","MapOf","CollectionContains","withErrorMsg","errorKey","originalDecorator","decoratorOptions","useDecorators","errorMessage","storedJson","AdditionalProperties","entity","AllOf","Property","Allow","Any","AnyOf","Const","constValue","CustomKey","CustomKeys","Default","default","ErrorMsg","DefaultMsg","Description","DiscriminatorKey","Enum","Example","Examples","Maximum","exclusive","Max","ExclusiveMaximum","Minimum","Min","ExclusiveMinimum","JsonFormatTypes","Format","Email","EMAIL","DateTime","DATE_TIME","DateFormat","DATE","TimeFormat","TIME","Uri","URI","Url","URL","ForwardGroups","bool","micromatch","list","omit","keep","negatives","matched","matchGroups","compareWith","groupsExcludes","group","groupsIncludes","Groups","propEntity","groupsClass","givenGroups","Hidden","StoreSet","Ignore","Integer","LabelledAs","includeCollection","MaxLength","MinLength","MultipleOf","Name","Nullable","OneOf","Optional","Pattern","ReadOnly","Schema","partialSchema","For","RecordOf","initial","Required","RequiredGroups","Title","WriteOnly","GenericOf","isEnum","Nested","Generics","Produces","decorateMethodsOf","UnsupportedDecoratorType","AcceptMime","Consumes","DecoratorContext","actions","addAction","bind","wrapKey","methods","getMergedKey","beforeInit","onInit","afterInit","onMapKey","runActions","action","statusesModel","defineStatusModel","getStatusModel","mapGenerics","ReturnDecoratorContext","header","location","meta","Location","nested","checkPrimitive","checkCollection","of","ofInteger","manyOf","partial","binary","getContentType","hasOfTypes","currentStatus","mapMedia","Returns","ContentType","Deprecated","Header","Headers","In","Type","InFile","multiple","useMethodDecorators","mapOperationOptions","handlers","arg","toLocaleUpperCase","OperationDecoratorContext","Operation","routeOptions","OperationId","OperationPath","Partial","Path","Publish","Redirect","url","All","Get","Post","Put","Delete","Head","Patch","Options","Security","nameOrSecurity","Status","Subscribe","Summary","Tags","tag","mapTags","View","concatPath","basePath","r1","r2","global","ignoreCase","multiline","endsWith","JsonOperationRoute","paramsTypes","endpoint","fullPath","methodClassName","className","date","datetime","time","email","enums","e","lazyRef","er","uri","schemesReducer","mergeReducerBuilder","stringify","tagsReducer","SPEC_REDUCERS","mergeSpec","reducers","cleanUndefinedProps","caches","getSpec","operationIdPattern","finalSpec","cache","getSpecType","getSpecTypeFromSpec","mapOpenSpecInfo","info","termsOfService","contact","license","mapOpenSpec2","specVersion","securityDefinitions","externalDocs","swagger","mapOpenSpec3","servers","openapi","mapOpenSpec","fileSpec","HTTP_METHODS","SCHEMA_PROPERTIES","APPLICATION_JSON_REGEX","SUPPORTED_MIME_TYPES","APPLICATION_X_WWW_URLENCODED","MULTIPART_FORM_DATA","fixRefs","isJsonMimeType","getSupportedMimeTypes","MIME_VALUES","transformSecurity","securitySchemes","securityDefinition","scheme","bearerFormat","flows","flowName","flow","flowType","authorizationUrl","tokenUrl","transformInformation","server","serverUrl","variables","variable","variableObject","re","pathname","protocol","substring","Converter","convertInfos","resolveReference","shouldClone","shift","cur","convert","convertOperations","convertSchemas","convertSecurityDefinitions","pathObject","convertParameters","convertOperationParameters","convertResponses","contentKey","mediaRanges","mediaTypes","structuredObj","data","mediaRange","formDataParam","convertSchema","copySchemaProperties","copySchemaXProperties","allowReserved","collectionFormat","explode","propName","anySchema","def","operationDirection","convertDiscriminatorMapping","defName","schemaNameOrRef","console","warn","transformToOS2","generateSpec","defaultSpec","sortPaths","fromEntries","k1","k2","localeCompare","CACHE_KEY","getJsonSchema","getOperationsRoutes","operationsRoutes","withChildren","routes","getPropertiesStores","$properties","getProperties"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"schema.umd.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAAgBA,QAAQ,cAAeA,QAAQ,gBACvD,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,cAAe,aAAc,eAAgBJ,GAC3B,iBAAZC,QACdA,QAAQ,gBAAkBD,EAAQG,QAAQ,eAAgBA,QAAQ,cAAeA,QAAQ,gBAEzFJ,EAAK,gBAAkBC,EAAQD,EAAK,eAAgBA,EAAK,cAAeA,EAAK,eAC9E,CATD,CASGO,MAAM,CAACC,EAAkCC,EAAkCC,4CCP9E,MAAMC,EAAO,EAAQ,KACfC,EAAQ,EAAQ,KAEtB,SAASC,EAAUC,EAAMC,EAASC,GAAc,GAO9C,OALID,GAAgC,OAApBA,EAAQE,cAAwCC,IAApBH,EAAQE,UAElDF,EAAU,IAAKA,EAASE,QAASL,EAAMO,cAGlCR,EAAKG,EAAMC,EAASC,EAC7B,CAEAI,OAAOC,OAAOR,EAAWF,GACzBR,EAAOD,QAAUW,WCdjB,MAAMS,EAAY,QACZC,EAAe,KAAKD,KAMpBE,EAAc,MAGdC,EAAgB,MAEhBC,EAAQ,OACRC,EAAa,MAAMF,OACnBG,EAAe,QAAQH,KACvBI,EAAa,GAAGL,SAAmBG,IASnCG,EAAc,CAClBN,cACAO,aAlBmB,MAmBnBC,cAlBoB,MAmBpBP,gB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5H,KAC9D,MAAM,UAAC/b,GAAa+b,EAepB,OAbI/b,GACFA,EAAUP,wBAAwBrnB,EAAQsnB,cAAczT,SAASuT,IAC/DmkB,EAAOhhC,KACL,IAAIk5B,GAA2B,CAC7BP,WACA/4B,QACAw5B,WACAvc,kBAEH,IAIEmkB,CAAM,GACZF,EACL,CC1CO,SAASG,GACd9zB,GAEA,MAAMsB,EAAwBtB,EAAOe,QAAUf,EAASwS,GAAmBxS,GAE3E,IAAKsB,EAAMyyB,YAAa,CACtB,MAAMlc,EAASjF,GAAmBtR,GAClCA,EAAMyyB,YAAc,IAAIj1B,IAExB+Y,EAAO1b,SAAS+W,IACdA,EAAapN,SAAS3J,SAASgX,IACxB7R,EAAMyyB,YAAYv0B,IAAI2T,EAAUnS,cACnCM,EAAMyyB,YAAY70B,IAAIiU,EAAUnS,YAAamS,EAC/C,GACA,GAEN,CAEA,OAAO7R,EAAMyyB,WACf,CAeO,SAASC,GACdh0B,EACA1X,EAAgC,CAAC,GAEjC,MAAMuvB,EAASic,GAAuB9zB,GAChC9Q,EAAwC,IAAI4P,IAYlD,OAVA+Y,EAAO1b,SAAQ,CAACmF,EAAOlE,MAChB9U,EAAQ8wB,kBACPN,GAAYxX,EAAMqB,WAAYra,IAKpC4G,EAAIgQ,IAAI9B,EAAKkE,EAAM,IAGdpS,CACT","sources":["webpack://@tsed/schema/webpack/universalModuleDefinition","webpack://@tsed/schema/../../../node_modules/picomatch/index.js","webpack://@tsed/schema/../../../node_modules/picomatch/lib/constants.js","webpack://@tsed/schema/../../../node_modules/picomatch/lib/parse.js","webpack://@tsed/schema/../../../node_modules/picomatch/lib/picomatch.js","webpack://@tsed/schema/../../../node_modules/picomatch/lib/scan.js","webpack://@tsed/schema/../../../node_modules/picomatch/lib/utils.js","webpack://@tsed/schema/../../../node_modules/statuses/index.js","webpack://@tsed/schema/external umd \"@tsed/core\"","webpack://@tsed/schema/external umd \"@tsed/hooks\"","webpack://@tsed/schema/external umd \"change-case\"","webpack://@tsed/schema/webpack/bootstrap","webpack://@tsed/schema/webpack/runtime/compat get default export","webpack://@tsed/schema/webpack/runtime/define property getters","webpack://@tsed/schema/webpack/runtime/hasOwnProperty shorthand","webpack://@tsed/schema/webpack/runtime/make namespace object","webpack://@tsed/schema/./src/constants/OperationVerbs.ts","webpack://@tsed/schema/./src/registries/JsonSchemaMapperContainer.ts","webpack://@tsed/schema/./src/utils/buildPath.ts","webpack://@tsed/schema/../../../node_modules/tslib/tslib.es6.mjs","webpack://@tsed/schema/./src/domain/JsonEntityStore.ts","webpack://@tsed/schema/./src/decorators/config/jsonEntityComponent.ts","webpack://@tsed/schema/./src/registries/enumRegistries.ts","webpack://@tsed/schema/./src/utils/getComputedType.ts","webpack://@tsed/schema/./src/utils/getJsonType.ts","webpack://@tsed/schema/./src/utils/serializeEnumValues.ts","webpack://@tsed/schema/./src/utils/toJsonRegex.ts","webpack://@tsed/schema/./src/domain/JsonDiscriminator.ts","webpack://@tsed/schema/./src/domain/JsonSchema.ts","webpack://@tsed/schema/./src/domain/JsonClassStore.ts","webpack://@tsed/schema/./src/utils/isSuccessStatus.ts","webpack://@tsed/schema/./src/domain/JsonMap.ts","webpack://@tsed/schema/./src/utils/mapHeaders.ts","webpack://@tsed/schema/./src/utils/toJsonMapCollection.ts","webpack://@tsed/schema/./src/domain/JsonMedia.ts","webpack://@tsed/schema/./src/domain/JsonResponse.ts","webpack://@tsed/schema/./src/domain/JsonOperation.ts","webpack://@tsed/schema/./src/domain/JsonMethodStore.ts","webpack://@tsed/schema/./src/domain/JsonParameterTypes.ts","webpack://@tsed/schema/./src/domain/JsonParameter.ts","webpack://@tsed/schema/./src/domain/JsonParameterStore.ts","webpack://@tsed/schema/./src/domain/JsonPropertyStore.ts","webpack://@tsed/schema/./src/utils/getJsonEntityStore.ts","webpack://@tsed/schema/./src/domain/JsonOperationPathsMap.ts","webpack://@tsed/schema/./src/utils/getInheritedStores.ts","webpack://@tsed/schema/./src/utils/getOperationsStores.ts","webpack://@tsed/schema/./src/utils/removeHiddenOperation.ts","webpack://@tsed/schema/./src/components/async-api/channelsMapper.ts","webpack://@tsed/schema/./src/domain/SpecTypes.ts","webpack://@tsed/schema/./src/utils/somethingOf.ts","webpack://@tsed/schema/./src/components/async-api/messageMapper.ts","webpack://@tsed/schema/./src/utils/generics.ts","webpack://@tsed/schema/./src/components/async-api/payloadMapper.ts","webpack://@tsed/schema/./src/components/async-api/responseMapper.ts","webpack://@tsed/schema/./src/components/async-api/generate.ts","webpack://@tsed/schema/./src/domain/JsonLazyRef.ts","webpack://@tsed/schema/./src/utils/ref.ts","webpack://@tsed/schema/./src/components/default/anyMapper.ts","webpack://@tsed/schema/./src/components/default/classMapper.ts","webpack://@tsed/schema/./src/components/default/discriminatorMappingMapper.ts","webpack://@tsed/schema/./src/components/default/enumsMapper.ts","webpack://@tsed/schema/./src/components/default/genericsMapper.ts","webpack://@tsed/schema/./src/components/default/inheritedClassMapper.ts","webpack://@tsed/schema/./src/components/default/itemMapper.ts","webpack://@tsed/schema/./src/components/default/lazyRefMapper.ts","webpack://@tsed/schema/./src/components/default/mapMapper.ts","webpack://@tsed/schema/./src/constants/jsonSchemaProperties.ts","webpack://@tsed/schema/./src/components/default/nullableMapper.ts","webpack://@tsed/schema/./src/hooks/alterIgnore.ts","webpack://@tsed/schema/./src/components/default/objectMapper.ts","webpack://@tsed/schema/./src/components/default/ofMapper.ts","webpack://@tsed/schema/./src/components/default/propertiesMapper.ts","webpack://@tsed/schema/./src/hooks/alterRequiredGroups.ts","webpack://@tsed/schema/./src/components/default/requiredMapper.ts","webpack://@tsed/schema/./src/domain/JsonAliasMap.ts","webpack://@tsed/schema/./src/hooks/alterOneOf.ts","webpack://@tsed/schema/./src/components/default/schemaMapper.ts","webpack://@tsed/schema/./src/components/open-spec/enumsMapper.ts","webpack://@tsed/schema/./src/components/open-spec/generate.ts","webpack://@tsed/schema/./src/components/open-spec/nullableMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInFilesMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInParameterMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInParametersMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationInQueryMapper.ts","webpack://@tsed/schema/./src/components/open-spec/discriminatorMappingMapper.ts","webpack://@tsed/schema/./src/constants/httpStatusMessages.ts","webpack://@tsed/schema/./src/components/open-spec/operationMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationMediaMapper.ts","webpack://@tsed/schema/./src/domain/JsonRequestBody.ts","webpack://@tsed/schema/./src/components/open-spec/operationRequestBodyMapper.ts","webpack://@tsed/schema/./src/components/open-spec/operationResponseMapper.ts","webpack://@tsed/schema/./src/utils/concatParameters.ts","webpack://@tsed/schema/./src/utils/getJsonPathParameters.ts","webpack://@tsed/schema/./src/utils/operationIdFormatter.ts","webpack://@tsed/schema/./src/components/open-spec/pathsMapper.ts","webpack://@tsed/schema/./src/decorators/common/jsonEntityFn.ts","webpack://@tsed/schema/./src/decorators/class/children.ts","webpack://@tsed/schema/./src/decorators/class/discriminatorValue.ts","webpack://@tsed/schema/./src/decorators/collections/collectionOf.ts","webpack://@tsed/schema/./src/decorators/collections/collectionContains.ts","webpack://@tsed/schema/./src/utils/withErrorMsg.ts","webpack://@tsed/schema/./src/decorators/collections/maxItems.ts","webpack://@tsed/schema/./src/decorators/collections/maxProperties.ts","webpack://@tsed/schema/./src/decorators/collections/minItems.ts","webpack://@tsed/schema/./src/decorators/collections/minProperties.ts","webpack://@tsed/schema/./src/decorators/collections/uniqueItems.ts","webpack://@tsed/schema/./src/decorators/common/additionalProperties.ts","webpack://@tsed/schema/./src/decorators/common/allOf.ts","webpack://@tsed/schema/./src/decorators/common/property.ts","webpack://@tsed/schema/./src/decorators/common/allow.ts","webpack://@tsed/schema/./src/decorators/common/any.ts","webpack://@tsed/schema/./src/decorators/common/anyOf.ts","webpack://@tsed/schema/./src/decorators/common/const.ts","webpack://@tsed/schema/./src/decorators/common/customKey.ts","webpack://@tsed/schema/./src/decorators/common/default.ts","webpack://@tsed/schema/./src/decorators/common/errorMsg.ts","webpack://@tsed/schema/./src/decorators/common/defaultMsg.ts","webpack://@tsed/schema/./src/decorators/common/description.ts","webpack://@tsed/schema/./src/decorators/common/discriminatorKey.ts","webpack://@tsed/schema/./src/decorators/common/enum.ts","webpack://@tsed/schema/./src/decorators/common/example.ts","webpack://@tsed/schema/./src/decorators/common/examples.ts","webpack://@tsed/schema/./src/decorators/common/maximum.ts","webpack://@tsed/schema/./src/decorators/common/exclusiveMaximum.ts","webpack://@tsed/schema/./src/decorators/common/minimum.ts","webpack://@tsed/schema/./src/decorators/common/exclusiveMinimum.ts","webpack://@tsed/schema/./src/domain/JsonFormatTypes.ts","webpack://@tsed/schema/./src/decorators/common/format.ts","webpack://@tsed/schema/./src/decorators/common/forwardGroups.ts","webpack://@tsed/schema/./src/utils/matchGroups.ts","webpack://@tsed/schema/./src/decorators/common/groups.ts","webpack://@tsed/schema/./src/decorators/common/hidden.ts","webpack://@tsed/schema/./src/decorators/common/ignore.ts","webpack://@tsed/schema/./src/decorators/common/integer.ts","webpack://@tsed/schema/./src/decorators/common/labelledAs.ts","webpack://@tsed/schema/./src/decorators/common/maxLength.ts","webpack://@tsed/schema/./src/decorators/common/minLength.ts","webpack://@tsed/schema/./src/decorators/common/multipleOf.ts","webpack://@tsed/schema/./src/decorators/common/name.ts","webpack://@tsed/schema/./src/decorators/common/nullable.ts","webpack://@tsed/schema/./src/decorators/common/oneOf.ts","webpack://@tsed/schema/./src/decorators/common/optional.ts","webpack://@tsed/schema/./src/decorators/common/pattern.ts","webpack://@tsed/schema/./src/decorators/common/readOnly.ts","webpack://@tsed/schema/./src/decorators/common/schema.ts","webpack://@tsed/schema/./src/decorators/common/recordOf.ts","webpack://@tsed/schema/./src/decorators/common/required.ts","webpack://@tsed/schema/./src/decorators/common/requiredGroups.ts","webpack://@tsed/schema/./src/decorators/common/title.ts","webpack://@tsed/schema/./src/decorators/common/typeError.ts","webpack://@tsed/schema/./src/decorators/common/writeOnly.ts","webpack://@tsed/schema/./src/fn/from.ts","webpack://@tsed/schema/./src/fn/string.ts","webpack://@tsed/schema/./src/decorators/generics/genericOf.ts","webpack://@tsed/schema/./src/decorators/generics/generics.ts","webpack://@tsed/schema/./src/decorators/operations/consumes.ts","webpack://@tsed/schema/./src/decorators/operations/acceptMime.ts","webpack://@tsed/schema/./src/domain/DecoratorContext.ts","webpack://@tsed/schema/./src/utils/defineStatusModel.ts","webpack://@tsed/schema/./src/decorators/operations/returns.ts","webpack://@tsed/schema/./src/decorators/operations/contentType.ts","webpack://@tsed/schema/./src/decorators/operations/deprecated.ts","webpack://@tsed/schema/./src/decorators/operations/header.ts","webpack://@tsed/schema/./src/decorators/operations/in.ts","webpack://@tsed/schema/./src/decorators/operations/inFile.ts","webpack://@tsed/schema/./src/decorators/operations/location.ts","webpack://@tsed/schema/./src/utils/mapOperationOptions.ts","webpack://@tsed/schema/./src/decorators/operations/operation.ts","webpack://@tsed/schema/./src/decorators/operations/operationId.ts","webpack://@tsed/schema/./src/decorators/operations/operationPath.ts","webpack://@tsed/schema/./src/decorators/operations/partial.ts","webpack://@tsed/schema/./src/decorators/operations/path.ts","webpack://@tsed/schema/./src/decorators/operations/produces.ts","webpack://@tsed/schema/./src/decorators/operations/publish.ts","webpack://@tsed/schema/./src/decorators/operations/redirect.ts","webpack://@tsed/schema/./src/decorators/operations/route.ts","webpack://@tsed/schema/./src/decorators/operations/security.ts","webpack://@tsed/schema/./src/decorators/operations/status.ts","webpack://@tsed/schema/./src/decorators/operations/subscribe.ts","webpack://@tsed/schema/./src/decorators/operations/summary.ts","webpack://@tsed/schema/./src/decorators/operations/tags.ts","webpack://@tsed/schema/./src/decorators/operations/view.ts","webpack://@tsed/schema/./src/utils/concatPath.ts","webpack://@tsed/schema/./src/domain/JsonOperationRoute.ts","webpack://@tsed/schema/./src/fn/allOf.ts","webpack://@tsed/schema/./src/fn/any.ts","webpack://@tsed/schema/./src/fn/anyOf.ts","webpack://@tsed/schema/./src/fn/boolean.ts","webpack://@tsed/schema/./src/fn/collection.ts","webpack://@tsed/schema/./src/fn/date.ts","webpack://@tsed/schema/./src/fn/email.ts","webpack://@tsed/schema/./src/fn/enums.ts","webpack://@tsed/schema/./src/fn/integer.ts","webpack://@tsed/schema/./src/fn/lazyRef.ts","webpack://@tsed/schema/./src/fn/number.ts","webpack://@tsed/schema/./src/fn/object.ts","webpack://@tsed/schema/./src/fn/oneOf.ts","webpack://@tsed/schema/./src/fn/uri.ts","webpack://@tsed/schema/./src/fn/url.ts","webpack://@tsed/schema/./src/utils/mergeSpec.ts","webpack://@tsed/schema/./src/utils/getSpec.ts","webpack://@tsed/schema/./src/utils/getSpecType.ts","webpack://@tsed/schema/./src/utils/mapOpenSpecInfo.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec2.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec3.ts","webpack://@tsed/schema/./src/utils/mapOpenSpec.ts","webpack://@tsed/schema/./src/utils/transformToOS2.ts","webpack://@tsed/schema/./src/utils/generateSpec.ts","webpack://@tsed/schema/./src/utils/getJsonSchema.ts","webpack://@tsed/schema/./src/utils/getOperationsRoutes.ts","webpack://@tsed/schema/./src/utils/getPropertiesStores.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"change-case\"), require(\"@tsed/core\"), require(\"@tsed/hooks\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"change-case\", \"@tsed/core\", \"@tsed/hooks\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@tsed/schema\"] = factory(require(\"change-case\"), require(\"@tsed/core\"), require(\"@tsed/hooks\"));\n\telse\n\t\troot[\"@tsed/schema\"] = factory(root[\"change-case\"], root[\"@tsed/core\"], root[\"@tsed/hooks\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__579__, __WEBPACK_EXTERNAL_MODULE__414__, __WEBPACK_EXTERNAL_MODULE__171__) => {\nreturn ","'use strict';\n\nconst pico = require('./lib/picomatch');\nconst utils = require('./lib/utils');\n\nfunction picomatch(glob, options, returnState = false) {\n // default to os.platform()\n if (options && (options.windows === null || options.windows === undefined)) {\n // don't mutate the original options object\n options = { ...options, windows: utils.isWindows() };\n }\n\n return pico(glob, options, returnState);\n}\n\nObject.assign(picomatch, pico);\nmodule.exports = picomatch;\n","'use strict';\n\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\nconst SEP = '/';\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR,\n SEP\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,\n SEP: '\\\\'\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(opts.windows);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.output = (prev.output || prev.value) + tok.value;\n prev.value += tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(opts.windows);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = opts.windows;\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(utils.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","/*global navigator*/\n'use strict';\n\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.isWindows = () => {\n if (typeof navigator !== 'undefined' && navigator.platform) {\n const platform = navigator.platform.toLowerCase();\n return platform === 'win32' || platform === 'windows';\n }\n\n if (typeof process !== 'undefined' && process.platform) {\n return process.platform === 'win32';\n }\n\n return false;\n};\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n\nexports.basename = (path, { windows } = {}) => {\n const segs = path.split(windows ? /[\\\\/]/ : '/');\n const last = segs[segs.length - 1];\n\n if (last === '') {\n return segs[segs.length - 2];\n }\n\n return last;\n};\n","/*!\n * statuses\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2016 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar codes = require('./codes.json')\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = status\n\n// status code to message map\nstatus.message = codes\n\n// status message (lower-case) to code map\nstatus.code = createMessageToStatusCodeMap(codes)\n\n// array of status codes\nstatus.codes = createStatusCodeList(codes)\n\n// status codes for redirects\nstatus.redirect = {\n 300: true,\n 301: true,\n 302: true,\n 303: true,\n 305: true,\n 307: true,\n 308: true\n}\n\n// status codes for empty bodies\nstatus.empty = {\n 204: true,\n 205: true,\n 304: true\n}\n\n// status codes for when you should retry the request\nstatus.retry = {\n 502: true,\n 503: true,\n 504: true\n}\n\n/**\n * Create a map of message to status code.\n * @private\n */\n\nfunction createMessageToStatusCodeMap (codes) {\n var map = {}\n\n Object.keys(codes).forEach(function forEachCode (code) {\n var message = codes[code]\n var status = Number(code)\n\n // populate map\n map[message.toLowerCase()] = status\n })\n\n return map\n}\n\n/**\n * Create a list of all status codes.\n * @private\n */\n\nfunction createStatusCodeList (codes) {\n return Object.keys(codes).map(function mapCode (code) {\n return Number(code)\n })\n}\n\n/**\n * Get the status code for given message.\n * @private\n */\n\nfunction getStatusCode (message) {\n var msg = message.toLowerCase()\n\n if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {\n throw new Error('invalid status message: \"' + message + '\"')\n }\n\n return status.code[msg]\n}\n\n/**\n * Get the status message for given code.\n * @private\n */\n\nfunction getStatusMessage (code) {\n if (!Object.prototype.hasOwnProperty.call(status.message, code)) {\n throw new Error('invalid status code: ' + code)\n }\n\n return status.message[code]\n}\n\n/**\n * Get the status code.\n *\n * Given a number, this will throw if it is not a known status\n * code, otherwise the code will be returned. Given a string,\n * the string will be parsed for a number and return the code\n * if valid, otherwise will lookup the code assuming this is\n * the status message.\n *\n * @param {string|number} code\n * @returns {number}\n * @public\n */\n\nfunction status (code) {\n if (typeof code === 'number') {\n return getStatusMessage(code)\n }\n\n if (typeof code !== 'string') {\n throw new TypeError('code must be a number or string')\n }\n\n // '403'\n var n = parseInt(code, 10)\n if (!isNaN(n)) {\n return getStatusMessage(n)\n }\n\n return getStatusCode(code)\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__414__;","module.exports = __WEBPACK_EXTERNAL_MODULE__171__;","module.exports = __WEBPACK_EXTERNAL_MODULE__579__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export enum OperationVerbs {\n ALL = \"ALL\", // special key\n GET = \"GET\",\n POST = \"POST\",\n PUT = \"PUT\",\n PATCH = \"PATCH\",\n HEAD = \"HEAD\",\n DELETE = \"DELETE\",\n OPTIONS = \"OPTIONS\",\n TRACE = \"TRACE\",\n PUBLISH = \"PUBLISH\",\n SUBSCRIBE = \"SUBSCRIBE\",\n CUSTOM = \"CUSTOM\"\n}\n\nexport const OPERATION_HTTP_VERBS = [\n OperationVerbs.ALL,\n OperationVerbs.GET,\n OperationVerbs.POST,\n OperationVerbs.PUT,\n OperationVerbs.PATCH,\n OperationVerbs.HEAD,\n OperationVerbs.DELETE,\n OperationVerbs.OPTIONS,\n OperationVerbs.TRACE,\n OperationVerbs.CUSTOM\n];\n\nexport const OPERATION_WS_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];\n","import {SpecTypes} from \"../domain/SpecTypes.js\";\n\n/**\n * @ignore\n */\nexport interface JsonSchemaMapper {\n (...args: any[]): any;\n}\n\n/**\n * @ignore\n */\nconst JsonSchemaMappersContainer: Map<string, JsonSchemaMapper> = new Map();\n\n/**\n * @ignore\n */\nexport function registerJsonSchemaMapper(type: string, mapper: JsonSchemaMapper, spec?: SpecTypes) {\n return JsonSchemaMappersContainer.set(spec ? `${spec}:${type}` : type, mapper);\n}\n\n/**\n * @ignore\n */\nexport function getJsonSchemaMapper(type: string, options: any): JsonSchemaMapper {\n const mapper = JsonSchemaMappersContainer.get(`${options?.specType}:${type}`)! || JsonSchemaMappersContainer.get(type)!;\n\n if (mapper) {\n return mapper;\n }\n\n // istanbul ignore next\n throw new Error(`JsonSchema ${type} mapper doesn't exists`);\n}\n\n/**\n * @ignore\n */\nexport function execMapper(type: string, args: any[], options: any, parent?: any): any {\n return getJsonSchemaMapper(type, options)(...args, options, parent);\n}\n\nexport function hasMapper(type: string) {\n return JsonSchemaMappersContainer.has(type);\n}\n\nexport function execOneOfMapper(types: string[], options: any): string {\n return (\n types.find((type) => JsonSchemaMappersContainer.has(`${options?.specType}:${type}`)) ||\n types.find((type) => JsonSchemaMappersContainer.has(type))!\n );\n}\n","/**\n * Return a sanitized path\n * @param path\n * @ignore\n */\nexport function buildPath(path: string) {\n return path.split(\"/\").filter(Boolean).join(\"/\");\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import {\n ancestorsOf,\n classOf,\n decoratorTypeOf,\n DecoratorTypes,\n descriptorOf,\n isArrayOrArrayClass,\n isArrowFn,\n isClass,\n isClassObject,\n isCollection,\n isDate,\n isObject,\n isPlainObject,\n isPrimitiveOrPrimitiveClass,\n nameOf,\n prototypeOf,\n Store,\n Type\n} from \"@tsed/core\";\n\nimport type {JsonClassStore} from \"./JsonClassStore.js\";\nimport type {JsonMethodStore} from \"./JsonMethodStore.js\";\nimport type {JsonParameterStore} from \"./JsonParameterStore.js\";\nimport type {JsonPropertyStore} from \"./JsonPropertyStore.js\";\nimport type {JsonSchema} from \"./JsonSchema.js\";\n\n/**\n * @ignore\n */\nexport const JsonEntitiesContainer = new Map<DecoratorTypes, Type<JsonEntityStore>>();\n\nexport interface JsonEntityStoreOptions {\n decoratorType: DecoratorTypes;\n target: Type<any>;\n propertyKey?: string | symbol;\n index?: number;\n descriptor?: any;\n type?: Type<any>;\n collectionType?: Type<any>;\n beforeMiddlewares?: Function[];\n middlewares?: Function[];\n afterMiddlewares?: Function[];\n\n [key: string]: any;\n}\n\nexport abstract class JsonEntityStore implements JsonEntityStoreOptions {\n /**\n * Original property key decorated by the decorator\n */\n readonly propertyKey: string | symbol;\n /**\n * Alias of the property\n */\n readonly propertyName: string;\n /**\n * Parameter index\n */\n readonly index: number;\n /**\n * Method's descriptor\n */\n readonly descriptor: PropertyDescriptor;\n /**\n * Decorator type used to declare the JsonSchemaStore.\n */\n readonly decoratorType: DecoratorTypes;\n /**\n * Type of the collection (Array, Map, Set, etc...)\n */\n public collectionType: Type<any>;\n public token: Type<any>;\n readonly store: Store;\n readonly isStore = true;\n readonly parent: JsonEntityStore;\n readonly target: Type<any>;\n /**\n *\n */\n protected _type: Type<any>;\n /**\n * Ref to JsonSchema\n */\n protected _schema: JsonSchema;\n\n [key: string]: any;\n\n constructor(options: JsonEntityStoreOptions) {\n const {target, propertyKey, descriptor, index, decoratorType} = options;\n this.target = target;\n this.propertyKey = propertyKey!;\n this.propertyName = String(propertyKey);\n this.descriptor = descriptor;\n this.index = index!;\n this.decoratorType = decoratorType;\n this.token = target;\n this.store = options.store;\n this.parent = this;\n }\n\n /**\n * Return the class name of the entity.\n * @returns {string}\n */\n get targetName(): string {\n return nameOf(this.token);\n }\n\n get isCollection(): boolean {\n return !!this.collectionType;\n }\n\n get isArray() {\n return isArrayOrArrayClass(this.collectionType);\n }\n\n get discriminatorAncestor(): JsonEntityStore | undefined {\n const ancestors = ancestorsOf(this.target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor);\n }\n\n get isPrimitive() {\n return isPrimitiveOrPrimitiveClass(this._type);\n }\n\n get isDate() {\n return isDate(this.computedType);\n }\n\n get isObject() {\n return isObject(this.computedType);\n }\n\n get isClass() {\n return isClass(this.computedType);\n }\n\n /**\n * Return the JsonSchema\n */\n get schema(): JsonSchema {\n return this._schema;\n }\n\n get nestedGenerics(): Type<any>[][] {\n return this.schema.nestedGenerics;\n }\n\n set nestedGenerics(nestedGenerics: Type<any>[][]) {\n this.schema.nestedGenerics = nestedGenerics;\n }\n\n get type(): Type<any> | any {\n return this._type;\n }\n\n /**\n * Get original type without transformation\n * @param value\n */\n set type(value: Type<any> | any) {\n this._type = value;\n this.build();\n }\n\n /**\n * Return the itemSchema computed type. if the type is a function used for recursive model, the function will be called to\n * get the right type.\n */\n get computedType() {\n return this.itemSchema.getComputedType();\n }\n\n get itemSchema(): JsonSchema {\n return this.isCollection ? this.schema.itemSchema() : this.schema;\n }\n\n get parentSchema(): JsonSchema {\n return this.parent.schema;\n }\n\n get isDiscriminatorChild() {\n return this.schema.isDiscriminator && this.discriminatorAncestor?.schema.discriminator().base !== this.target;\n }\n\n static from<T extends JsonClassStore = JsonClassStore>(target: Type<any>): T;\n\n static from<T extends JsonPropertyStore = JsonPropertyStore>(target: Type<any> | any, propertyKey: string | symbol): T;\n\n static from<T extends JsonParameterStore = JsonParameterStore>(target: Type<any> | any, propertyKey: string | symbol, index: number): T;\n\n static from<T extends JsonMethodStore = JsonMethodStore>(\n target: Type<any> | any,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor\n ): T;\n\n static from<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T;\n\n static from<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T {\n if (args[0].isStore) {\n return args[0] as T;\n }\n\n const target = args[0];\n\n if (args.length > 1) {\n args[0] = prototypeOf(args[0]);\n }\n\n const store = Store.from(...args);\n\n if (!store.has(\"JsonEntityStore\")) {\n const decoratorType = decoratorTypeOf(args);\n const entityStore = JsonEntitiesContainer.get(decoratorType)!;\n\n const jsonSchemaStore = new entityStore({\n store,\n decoratorType,\n target: classOf(target),\n propertyKey: args[1],\n index: typeof args[2] === \"number\" ? args[2] : undefined,\n descriptor: typeof args[2] === \"object\" ? args[2] : undefined\n });\n\n jsonSchemaStore.build();\n\n store.set(\"JsonEntityStore\", jsonSchemaStore);\n }\n\n return store.get<T>(\"JsonEntityStore\")!;\n }\n\n static fromMethod<T extends JsonMethodStore = JsonMethodStore>(target: any, propertyKey: string | symbol) {\n return this.from<T>(target, propertyKey, descriptorOf(target, propertyKey));\n }\n\n static get(target: Type<any>, propertyKey: string | symbol, descriptor?: any) {\n return JsonEntityStore.from(prototypeOf(target), propertyKey, descriptor);\n }\n\n isGetterOnly() {\n return isObject(this.descriptor) && !this.descriptor.value && this.descriptor.get && !this.descriptor.set;\n }\n\n get<T = any>(key: string, defaultValue?: any) {\n return this.store.get<T>(key, defaultValue);\n }\n\n set(key: string, value?: any) {\n return this.store.set(key, value);\n }\n\n toString() {\n return [this.targetName, this.propertyName, this.index].filter((o) => o !== undefined).join(\":\");\n }\n\n protected abstract build(): void;\n\n protected buildType(type: any) {\n if (isCollection(type)) {\n this.collectionType = type;\n } else {\n this._type = type;\n\n // issue #1534: Enum metadata stored as plain object instead of String (see: https://github.com/tsedio/tsed/issues/1534)\n if (this._type && isPlainObject(this._type)) {\n this._type = String;\n }\n }\n }\n\n getBestType() {\n return this.itemSchema.hasDiscriminator\n ? this.itemSchema.discriminator().base\n : isClassObject(this.type)\n ? this.itemSchema.getTarget()\n : isArrowFn(this.type)\n ? this.type()\n : this.type;\n }\n}\n","import {DecoratorTypes, Type} from \"@tsed/core\";\n\nimport {JsonEntitiesContainer, JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\n\n/**\n * Declare a new JsonEntityStore class for a specific decorator type.\n *\n * @ignore\n * @param type\n * @decorator\n */\nexport function JsonEntityComponent(type: DecoratorTypes) {\n return (target: Type<JsonEntityStore>) => {\n JsonEntitiesContainer.set(type, target);\n };\n}\n","import {JsonSchema} from \"../domain/JsonSchema.js\";\n\nexport const enumsRegistry = new Map<any, JsonSchema>();\n","import {\n classOf,\n isArrowFn,\n isClass,\n isClassObject,\n isCollection,\n isDate,\n isFunction,\n isPrimitiveOrPrimitiveClass,\n isPromise,\n isSymbol,\n Type\n} from \"@tsed/core\";\n\n/**\n * @ignore\n */\nexport function getComputedType(target: any): Type<any> {\n if (isPromise(target) || target === Function) {\n return Object;\n }\n\n if (\n isClass(target) ||\n isSymbol(target) ||\n isPrimitiveOrPrimitiveClass(target) ||\n isClassObject(target) ||\n isDate(target) ||\n isCollection(target)\n ) {\n return classOf(target);\n }\n\n if (isArrowFn(target)) {\n return (target as any)();\n }\n\n return target;\n}\n","import {isArray, isBuffer, isDate, isPrimitiveOrPrimitiveClass, primitiveOf} from \"@tsed/core\";\n\n/**\n * @ignore\n */\nexport const JSON_TYPES = [\"string\", \"number\", \"integer\", \"boolean\", \"object\", \"array\", \"null\", \"any\"];\n\nexport function getJsonType(value: any): string {\n if (value === null) {\n return \"null\";\n }\n\n if (isPrimitiveOrPrimitiveClass(value)) {\n if (JSON_TYPES.indexOf(value as string) > -1) {\n return value;\n }\n\n if (typeof value === \"string\") {\n if (value === \"file\") {\n return \"file\";\n }\n\n return \"generic\";\n }\n\n return primitiveOf(value);\n }\n\n if (value === Array) {\n return \"array\";\n }\n\n if (isArray(value)) {\n return value.map(getJsonType) as any;\n }\n\n if (value === Set) {\n return \"array\";\n }\n\n if (isDate(value) || isBuffer(value)) {\n return \"string\";\n }\n\n return \"object\";\n}\n","import {isObject, uniq} from \"@tsed/core\";\n\nexport const serializeEnum = (enumValue: any) => {\n if (isObject(enumValue) && enumValue !== null) {\n return Object.entries(enumValue).reduce((acc: any, [key, value]: any) => {\n if (isNaN(+key)) {\n return acc.concat(value);\n }\n\n return acc;\n }, []);\n }\n\n return enumValue;\n};\n\nexport function serializeEnumValues(enumValues: any[]) {\n const values = enumValues.reduce((acc, value) => acc.concat(serializeEnum(value)), []);\n\n const getValue = (value: any) => {\n return value === null ? \"null\" : typeof value;\n };\n\n const types = values.reduce((set: Set<any>, value: any) => set.add(getValue(value)), new Set());\n\n return {values: uniq(values), types};\n}\n","/**\n * @ignore\n * @param pattern\n */\nexport function toJsonRegex(pattern: string | RegExp) {\n return String(pattern).replace(/^(\\/)(.*)(\\/)$/, \"$2\");\n}\n","import {cleanObject, Type} from \"@tsed/core\";\n\nexport class Discriminator {\n propertyName: string;\n base: Type<any>;\n values: Map<string, Type> = new Map();\n types: Map<Type, string[]> = new Map();\n\n constructor({\n base,\n propertyName,\n types,\n values\n }: Partial<{base: Type<any>; propertyName: string; values: Map<string, Type<any>>; types: Map<Type, string[]>}> = {}) {\n Object.assign(\n this,\n cleanObject({\n base,\n propertyName,\n types: types ? new Map(types) : undefined,\n values: values ? new Map(values) : undefined\n })\n );\n }\n\n add(type: Type<string>, values: string[]) {\n values.forEach((value) => {\n this.values.set(value, type);\n });\n\n this.types.set(type, values);\n\n return this;\n }\n\n getType(discriminatorValue: string): Type<any> {\n return this.values.get(discriminatorValue) || this.base;\n }\n\n getValues(type: Type) {\n return this.types.get(type);\n }\n\n getDefaultValue(type: Type<any>) {\n const values = this.types.get(type);\n return values ? values[0] : undefined;\n }\n\n children() {\n return [...new Set([...this.types.keys()])];\n }\n}\n","import {ancestorsOf, classOf, isArray, isClass, isFunction, isObject, isPrimitiveClass, nameOf, Type, uniq, ValueOf} from \"@tsed/core\";\nimport {Hooks} from \"@tsed/hooks\";\nimport type {JSONSchema6, JSONSchema6Definition, JSONSchema6Type, JSONSchema6TypeName, JSONSchema6Version} from \"json-schema\";\n\nimport {IgnoreCallback} from \"../interfaces/IgnoreCallback.js\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\nimport {enumsRegistry} from \"../registries/enumRegistries.js\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer.js\";\nimport {NestedGenerics} from \"../utils/generics.js\";\nimport {getComputedType} from \"../utils/getComputedType.js\";\nimport {getJsonType} from \"../utils/getJsonType.js\";\nimport {serializeEnumValues} from \"../utils/serializeEnumValues.js\";\nimport {toJsonRegex} from \"../utils/toJsonRegex.js\";\nimport {AliasMap, AliasType} from \"./JsonAliasMap.js\";\nimport {Discriminator} from \"./JsonDiscriminator.js\";\nimport {JsonEntityStore} from \"./JsonEntityStore.js\";\nimport {JsonFormatTypes} from \"./JsonFormatTypes.js\";\nimport {JsonLazyRef} from \"./JsonLazyRef.js\";\n\nexport interface JsonSchemaObject extends JSONSchema6, Record<string, any> {\n type: (any | JSONSchema6TypeName) | (any | JSONSchema6TypeName)[];\n additionalProperties?: boolean | JSONSchema6 | any;\n propertyNames?: boolean | JSONSchema6 | any;\n items?: (any | JSONSchema6Definition) | (any | JSONSchema6Definition)[];\n}\n\nexport type AnyJsonSchema = Partial<JsonSchemaObject> | JsonSchema | JsonLazyRef | any;\n\nfunction mapProperties(properties: Record<string, any>) {\n // istanbul ignore next\n if (properties instanceof JsonSchema) {\n return properties;\n }\n\n return Object.entries(properties).reduce<any>((properties, [key, schema]) => {\n properties[toJsonRegex(key)] = mapToJsonSchema(schema);\n\n return properties;\n }, {});\n}\n\nfunction mapToJsonSchema(item: any): any {\n if (isArray(item)) {\n return (item as any[]).map(mapToJsonSchema);\n }\n\n if (item.isStore || item.$isJsonDocument || item.isLazyRef) {\n return item;\n }\n\n if (classOf(item) !== Object && isClass(item)) {\n return JsonEntityStore.from(item).schema;\n }\n\n if (isObject(item)) {\n return JsonSchema.from(item as any);\n }\n\n if (isPrimitiveClass(item)) {\n return JsonSchema.from({type: item});\n }\n\n return item;\n}\n\nexport class JsonSchema extends Map<string, any> implements NestedGenerics {\n readonly $kind: string = \"schema\";\n readonly $isJsonDocument = true;\n readonly $hooks = new Hooks();\n readonly $required: Set<string> = new Set();\n readonly $allow: any[] = [];\n public $selfRequired: boolean;\n public $forwardGroups: boolean = false;\n public $ignore: boolean | IgnoreCallback = false;\n\n public isDiscriminatorKey = false;\n public isDiscriminator = false;\n\n #nullable: boolean = false;\n #discriminator: null | Discriminator = null;\n #genericLabels: string[];\n #nestedGenerics: Type<any>[][] = [];\n #alias: AliasMap = new Map();\n #itemSchema: JsonSchema;\n #target: Type<any>;\n #isGeneric: boolean = false;\n #isCollection: boolean = false;\n #ref: boolean = false;\n\n constructor(obj: JsonSchema | Partial<JsonSchemaObject> = {}) {\n super();\n\n if (obj) {\n this.assign(obj);\n }\n }\n\n get alias() {\n return this.#alias;\n }\n\n get nestedGenerics(): any[] {\n return this.#nestedGenerics;\n }\n\n set nestedGenerics(value: any[]) {\n this.#nestedGenerics = value;\n }\n\n get genericLabels(): string[] {\n return this.#genericLabels;\n }\n\n set genericLabels(value: string[]) {\n this.#genericLabels = value;\n }\n\n get isClass() {\n return isClass(this.class) && ![Map, Array, Set, Object, Date, Boolean, Number, String].includes(this.#target as any);\n }\n\n /**\n * Current schema is a collection\n */\n get isCollection() {\n return this.#isCollection;\n }\n\n /**\n * Current schema is a generic\n */\n get isGeneric() {\n return this.#isGeneric;\n }\n\n get discriminatorAncestor() {\n const ancestors = ancestorsOf(this.#target);\n const ancestor = ancestors.find((ancestor) => JsonEntityStore.from(ancestor).schema.isDiscriminator);\n return ancestor && JsonEntityStore.from(ancestor).schema;\n }\n\n /**\n * Current schema has generics items\n */\n get hasGenerics(): boolean {\n return !!(this.nestedGenerics && this.nestedGenerics.length);\n }\n\n get genericType(): string {\n return this.get(\"$ref\");\n }\n\n get class() {\n return this.getComputedType();\n }\n\n get canRef(): boolean {\n return this.#ref;\n }\n\n get isNullable(): boolean {\n return this.#nullable;\n }\n\n get isReadOnly() {\n return this.get(\"readOnly\");\n }\n\n get isWriteOnly() {\n return this.get(\"writeOnly\");\n }\n\n get hasDiscriminator() {\n return !!this.#discriminator;\n }\n\n static from(obj: Partial<JsonSchemaObject> = {}) {\n return new JsonSchema(obj);\n }\n\n nullable(value: boolean) {\n this.#nullable = value;\n }\n\n itemSchema(obj: AnyJsonSchema = {}) {\n this.#itemSchema = this.#itemSchema || mapToJsonSchema(obj);\n this.#itemSchema.assign(obj);\n\n return this.#itemSchema;\n }\n\n getAliasOf(property: AliasType) {\n return this.#alias.get(property as any);\n }\n\n addAlias(property: AliasType, alias: AliasType) {\n this.#alias.set(property, alias);\n this.#alias.set(alias, property);\n\n return this;\n }\n\n removeAlias(property: AliasType) {\n const alias = this.#alias.get(property);\n alias && this.#alias.delete(alias);\n this.#alias.delete(property);\n\n return this;\n }\n\n $id($id: string) {\n super.set(\"$id\", $id);\n\n return this;\n }\n\n $ref($ref: string) {\n super.set(\"$ref\", $ref);\n\n return this;\n }\n\n $schema($schema: JSONSchema6Version) {\n super.set(\"$schema\", $schema);\n\n return this;\n }\n\n /**\n * Create a ref and use name to sharing schema\n * @param name\n */\n label(name: string) {\n this.#ref = true;\n\n super.set(\"name\", name);\n\n return this;\n }\n\n name(name: string) {\n super.set(\"name\", name);\n\n return this;\n }\n\n ignore(cb: boolean | IgnoreCallback) {\n if (typeof cb !== \"boolean\") {\n this.$hooks.on(\"ignore\", cb);\n }\n\n this.$ignore = cb;\n\n return this;\n }\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(value: JSONSchema6Type | undefined | (() => JSONSchema6Type)) {\n super.set(\"default\", value);\n\n return this;\n }\n\n /**\n * More readible 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(value: JSONSchema6Type) {\n super.set(\"const\", value);\n\n return this;\n }\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(description: string) {\n super.set(\"description\", description);\n\n return this;\n }\n\n discriminator() {\n this.isDiscriminator = true;\n return (this.#discriminator =\n this.#discriminator ||\n new Discriminator({\n base: this.#target\n }));\n }\n\n discriminatorKey(propertyName: string) {\n this.discriminator().propertyName = propertyName;\n this.isDiscriminator = true;\n\n return this;\n }\n\n discriminatorValue(...values: string[]) {\n const discriminator = this.discriminatorAncestor.discriminator();\n discriminator.add(this.#target, values);\n\n this.isDiscriminator = true;\n\n const properties = this.get(\"properties\");\n const schema: JsonSchema =\n properties[discriminator.propertyName] ||\n new JsonSchema({\n type: \"string\"\n });\n\n if (values.length === 1) {\n schema.const(values[0]);\n schema.examples([values[0]]);\n } else {\n schema.enum(...values);\n schema.examples(values);\n }\n\n properties[discriminator.propertyName] = schema;\n\n this.set(\"properties\", properties);\n\n return this;\n }\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(additionalItems: boolean | AnyJsonSchema) {\n super.set(\"additionalItems\", mapToJsonSchema(additionalItems));\n\n return this;\n }\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(contains: JSONSchema6Definition) {\n super.set(\"contains\", mapToJsonSchema(contains));\n\n return this;\n }\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(examples: JSONSchema6Type[]) {\n super.set(\"examples\", examples);\n\n return this;\n }\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 example(...examples: JSONSchema6Type[]) {\n return this.examples(examples);\n }\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(items: AnyJsonSchema | AnyJsonSchema[]) {\n super.set(\"items\", (this.#itemSchema = mapToJsonSchema(items)));\n\n return this;\n }\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(maxItems: number) {\n super.set(\"maxItems\", maxItems);\n\n return this;\n }\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(minItems: number) {\n super.set(\"minItems\", minItems);\n\n return this;\n }\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(uniqueItems: boolean) {\n super.set(\"uniqueItems\", uniqueItems);\n\n return this;\n }\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(maxProperties: number) {\n super.set(\"maxProperties\", maxProperties);\n\n return this;\n }\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(minProperties: number) {\n super.set(\"minProperties\", minProperties);\n\n return this;\n }\n\n allow(...allow: any[]) {\n if (([] as string[]).concat(this.getJsonType()).includes(\"string\") && !this.has(\"minLength\")) {\n this.minLength(1);\n }\n\n allow.forEach((value) => {\n switch (value) {\n case \"\":\n this.set(\"minLength\", undefined);\n break;\n case null:\n this.any(\n ...[\"null\"].concat(\n this.getJsonType(),\n this.$allow.map((v) => typeof v)\n )\n );\n break;\n }\n });\n\n this.$allow.push(...allow);\n\n return this;\n }\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(required: boolean | string[] = true) {\n if (isArray(required)) {\n this.$required.clear();\n\n required.forEach((value: any) => this.$required.add(value));\n } else {\n const schema = this.clone();\n schema.$selfRequired = required;\n\n if (([] as string[]).concat(schema.getJsonType()).includes(\"string\")) {\n schema.minLength(1);\n }\n\n return schema;\n }\n\n return this;\n }\n\n addRequired(property: string) {\n this.$required.add(property);\n\n return this;\n }\n\n removeRequired(property: string) {\n this.$required.delete(property);\n\n return this;\n }\n\n isRequired(property: string): boolean {\n return this.$required.has(property);\n }\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(properties: AnyJsonSchema | Record<string, AnyJsonSchema>) {\n super.set(\"properties\", mapProperties(properties));\n\n return this;\n }\n\n addProperty(key: string, schema: AnyJsonSchema) {\n const properties = this.get(\"properties\") || {};\n\n properties[key] = schema;\n\n super.set(\"properties\", mapProperties(properties));\n\n return this;\n }\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(patternProperties: Record<string, AnyJsonSchema>) {\n super.set(\"patternProperties\", mapProperties(patternProperties));\n\n return this;\n }\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(additionalProperties: boolean | AnyJsonSchema) {\n super.set(\"additionalProperties\", mapToJsonSchema(additionalProperties));\n\n return this;\n }\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 * @alias additionalProperties\n * @param unknown\n */\n unknown(unknown: boolean = true) {\n return this.additionalProperties(unknown);\n }\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(dependencies: {[p: string]: JSONSchema6Definition | JsonSchema | string[]}) {\n super.set(\"dependencies\", mapProperties(dependencies));\n\n return this;\n }\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(propertyNames: JSONSchema6Definition | JsonSchema) {\n super.set(\"propertyNames\", mapToJsonSchema(propertyNames));\n\n return this;\n }\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(...enumValues: any[]): this;\n enum(enumSchema: JsonSchema): this;\n enum(enumValue: any | any[] | JsonSchema, ...enumValues: any[]): this {\n if (enumsRegistry.has(enumValue)) {\n return this.enum(enumsRegistry.get(enumValue));\n }\n\n if (enumValue instanceof JsonSchema) {\n if (enumValue.getName()) {\n super.set(\"enum\", enumValue);\n } else {\n super.set(\"enum\", enumValue.get(\"enum\")).any(...enumValue.get(\"enum\").map((value: any) => typeof value));\n }\n } else {\n const {values, types} = serializeEnumValues([enumValue, enumValues].flat());\n\n super.set(\"enum\", values).any(...types);\n }\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-7.1\n */\n definitions(definitions: Record<string, AnyJsonSchema>) {\n super.set(\"definitions\", mapProperties(definitions));\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\n allOf(allOf: AnyJsonSchema[]) {\n this.setManyOf(\"allOf\", allOf);\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\n anyOf(anyOf: AnyJsonSchema[]) {\n this.setManyOf(\"anyOf\", anyOf);\n\n return this;\n }\n\n /*\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\n oneOf(oneOf: AnyJsonSchema[]) {\n this.setManyOf(\"oneOf\", oneOf);\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.29\n */\n not(not: AnyJsonSchema) {\n super.set(\"not\", mapToJsonSchema(not));\n\n return this;\n }\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(multipleOf: number): this {\n super.set(\"multipleOf\", multipleOf);\n\n return this;\n }\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(maximum: number): this {\n super.set(\"maximum\", maximum);\n\n return this;\n }\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(exclusiveMaximum: number): this {\n super.set(\"exclusiveMaximum\", exclusiveMaximum);\n\n return this;\n }\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(minimum: number): this {\n super.set(\"minimum\", minimum);\n\n return this;\n }\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(exclusiveMinimum: number): this {\n super.set(\"exclusiveMinimum\", exclusiveMinimum);\n\n return this;\n }\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(maxLength: number): this {\n super.set(\"maxLength\", maxLength);\n\n return this;\n }\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(minLength: number): this {\n super.set(\"minLength\", minLength);\n\n return this;\n }\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(pattern: string | RegExp): this {\n super.set(\"pattern\", toJsonRegex(pattern));\n\n return this;\n }\n\n /**\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-8\n */\n format(format: JsonFormatTypes | ValueOf<JsonFormatTypes>): this {\n super.set(\"format\", format);\n\n return this;\n }\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(type: any | JSONSchema6TypeName | JSONSchema6TypeName[]): this {\n switch (type) {\n case \"map\":\n case Map:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n if (!this.has(\"additionalProperties\")) {\n super.set(\"additionalProperties\", this.itemSchema({}));\n }\n break;\n\n case \"array\":\n case Array:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n\n case \"set\":\n case Set:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n this.#isCollection = true;\n this.uniqueItems(true);\n\n if (!this.has(\"items\")) {\n super.set(\"items\", this.itemSchema({}));\n }\n break;\n\n case \"integer\":\n this.integer();\n break;\n\n case \"number\":\n case \"string\":\n case \"boolean\":\n case \"object\":\n case Object:\n case Date:\n case Boolean:\n case Number:\n case String:\n super.set(\"type\", getJsonType(type));\n this.#target = type;\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n break;\n\n default:\n if (isClass(type) || isFunction(type)) {\n super.set(\"type\", undefined);\n this.#target = type;\n\n if (!this.has(\"properties\")) {\n super.set(\"properties\", {});\n }\n } else {\n const jsonType = getJsonType(type);\n if (jsonType === \"generic\") {\n this.#isGeneric = true;\n super.set(\"$ref\", type);\n } else {\n super.set(\"type\", jsonType);\n }\n }\n }\n\n return this;\n }\n\n any(...types: any[]) {\n types = types.length ? types : [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"];\n\n types = uniq(types).map((o) => {\n return isClass(o) ? o : {type: getJsonType(o)};\n });\n\n if (types.length > 1) {\n this.anyOf(types);\n } else {\n this.type(types[0]?.type || types[0]);\n }\n\n return this;\n }\n\n integer() {\n super.set(\"type\", \"integer\");\n super.set(\"multipleOf\", 1.0);\n\n return this;\n }\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(title: string): this {\n super.set(\"title\", title);\n\n return this;\n }\n\n readOnly(readOnly: boolean): this {\n super.set(\"readOnly\", readOnly);\n\n return this;\n }\n\n writeOnly(readOnly: boolean): this {\n super.set(\"writeOnly\", readOnly);\n\n return this;\n }\n\n customKey(key: string, value: any) {\n super.set(`#${key}`, value);\n\n return this;\n }\n\n toObject(options?: JsonSchemaOptions) {\n return this.toJSON(options);\n }\n\n toJSON(options?: JsonSchemaOptions) {\n return execMapper(\"schema\", [this], options);\n }\n\n assign(obj: JsonSchema | Partial<JsonSchemaObject> = {}) {\n const entries = obj instanceof JsonSchema ? [...obj.entries()] : Object.entries(obj);\n entries.forEach(([key, value]) => {\n this.set(key, value);\n });\n\n if (obj instanceof JsonSchema) {\n this.$selfRequired = obj.$selfRequired;\n this.$allow.push(...obj.$allow);\n\n obj.$required.forEach((key) => {\n this.$required.add(key);\n });\n\n this.#discriminator = this.#discriminator ? new Discriminator(this.#discriminator) : null;\n this.isDiscriminator = obj.isDiscriminator;\n this.isDiscriminatorKey = obj.isDiscriminatorKey;\n this.#ref = obj.#ref;\n\n this.#alias = new Map(this.#alias.entries());\n obj.#genericLabels && (this.#genericLabels = [...obj.#genericLabels]);\n this.#nestedGenerics = obj.#nestedGenerics.map((item) => [...item]);\n this.#target = obj.#target;\n this.#isGeneric = obj.#isGeneric;\n this.#isCollection = obj.#isCollection;\n this.#ref = obj.#ref;\n this.#nullable = obj.#nullable;\n\n super.set(\"type\", obj.get(\"type\"));\n }\n\n return this;\n }\n\n set(key: string, value: any): this {\n if (key in this) {\n isFunction((this as any)[key]) && (this as any)[key](value);\n } else {\n super.set(key, value);\n }\n\n return this;\n }\n\n /**\n * Return the itemSchema computed type.\n * If the type is a function used for recursive model,\n * the function will be called to get the right type.\n */\n getComputedType(): any {\n return getComputedType(this.#target);\n }\n\n getComputedItemType(): any {\n return this.#itemSchema ? this.#itemSchema.getComputedType() : this.getComputedType();\n }\n\n /**\n * Return the Json type as string\n */\n getJsonType(): string | string[] {\n if (this.get(\"anyOf\")) {\n return this.get(\"anyOf\").map((o: JsonSchema) => {\n return o.getJsonType();\n });\n }\n\n return this.get(\"type\") || getJsonType(this.getComputedType());\n }\n\n getTarget() {\n return this.#target;\n }\n\n /**\n * Get the symbolic name of the entity\n */\n getName() {\n return this.get(\"name\") || (isClass(this.#target) ? nameOf(classOf(this.getComputedType())) : \"\");\n }\n\n clone() {\n return new JsonSchema(this);\n }\n\n protected setManyOf(keyword: \"oneOf\" | \"anyOf\" | \"allOf\", value: AnyJsonSchema[]) {\n let resolved = value\n .filter((o) => {\n if (o?.type === \"null\") {\n this.nullable(true);\n return false;\n }\n return true;\n })\n .map(mapToJsonSchema);\n\n if (resolved.length === 1 && !(value[0] instanceof JsonSchema) && !this.isNullable) {\n if (!resolved[0].hasDiscriminator) {\n return this.type(value[0]);\n }\n\n const children = resolved[0].discriminator().children();\n\n if (!children.length) {\n return this.type(value[0]);\n }\n\n resolved = children.map(mapToJsonSchema);\n }\n\n super.set(keyword, resolved);\n\n const jsonSchema: JsonSchema = resolved[0];\n\n if (jsonSchema.isDiscriminator) {\n const discriminator = jsonSchema.discriminatorAncestor.discriminator();\n const {propertyName} = discriminator;\n\n super.set(\"discriminator\", {\n propertyName,\n mapping: resolved.reduce((acc, schema: JsonSchema) => {\n discriminator.types.get(schema.getTarget())?.forEach((key: string) => {\n acc[key] = schema;\n });\n\n return acc;\n }, {})\n });\n\n this.isDiscriminator = true;\n this.#discriminator = discriminator;\n }\n }\n}\n","import {DecoratorTypes} from \"@tsed/core\";\n\nimport {JsonEntityComponent} from \"../decorators/config/jsonEntityComponent.js\";\nimport {JsonEntityStore, JsonEntityStoreOptions} from \"./JsonEntityStore.js\";\nimport type {JsonMethodStore} from \"./JsonMethodStore.js\";\nimport type {JsonPropertyStore} from \"./JsonPropertyStore.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\n@JsonEntityComponent(DecoratorTypes.CLASS)\nexport class JsonClassStore extends JsonEntityStore {\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n readonly children: Map<string | number, JsonMethodStore | JsonPropertyStore> = new Map();\n\n get path() {\n return this.store.get(\"path\", \"/\");\n }\n\n set path(path: string) {\n this.store.set(\"path\", path);\n }\n\n protected build() {\n if (!this._type) {\n this.buildType(this.target);\n }\n\n this._type = this._type || Object;\n\n this._schema = JsonSchema.from({\n type: this.type\n });\n }\n}\n","export const isSuccessStatus = (code: string | number | undefined) => Number(code) && 200 <= Number(code) && Number(code) < 300;\nexport const isRedirectionStatus = (code: string | number | undefined) => Number(code) && 300 <= Number(code) && Number(code) < 400;\n","import {isFunction} from \"@tsed/core\";\n\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer.js\";\n\nexport class JsonMap<T> extends Map<string, any> {\n [key: string]: any;\n\n $kind: string = \"map\";\n readonly $isJsonDocument = true;\n\n constructor(obj: Partial<T> = {}) {\n super();\n\n this.assign(obj);\n }\n\n assign(obj: Partial<T> & any = {}) {\n Object.entries(obj).forEach(([key, value]) => {\n if (isFunction(this[key])) {\n this[key](value);\n } else {\n this.set(key, value);\n }\n });\n\n return this;\n }\n\n toJSON(options?: JsonSchemaOptions) {\n return execMapper(\"map\", [this], options);\n }\n}\n","import {cleanObject} from \"@tsed/core\";\n\nimport {JsonHeader, JsonHeaders} from \"../interfaces/JsonOpenSpec.js\";\n\n/**\n * Map input header to a standard open spec header\n * @param headers\n * @ignore\n */\nexport function mapHeaders(headers: JsonHeaders): {[key: string]: JsonHeader} {\n return Object.keys(headers).reduce((newHeaders: {[key: string]: JsonHeader}, key: string) => {\n const value: any = headers[key];\n\n let type = typeof value;\n\n let options: any = {\n example: value\n };\n\n if (type === \"object\") {\n options = value;\n options.example = options.value === undefined ? options.example : options.value;\n delete options.value;\n type = typeof options.example;\n }\n\n options.type = options.type || type;\n\n newHeaders[key] = cleanObject(options);\n\n return newHeaders;\n }, {});\n}\n","import {JsonMap} from \"../domain/JsonMap.js\";\n\n/**\n * @ignore\n */\nexport function toJsonMapCollection(content: {[key: string]: any}, klass = JsonMap) {\n return Object.entries(content).reduce((content, [key, value]) => {\n content.set(key, new klass(value));\n\n return content;\n }, new JsonMap<any>());\n}\n","import {OS3MediaType} from \"@tsed/openspec\";\n\nimport {JsonMap} from \"./JsonMap.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\nexport class JsonMedia extends JsonMap<OS3MediaType<JsonSchema>> {\n $kind: string = \"operationMedia\";\n\n groups: string[] = [];\n groupsName: string;\n allowedGroups?: Set<string>;\n\n schema(schema: JsonSchema) {\n this.set(\"schema\", schema);\n\n return this;\n }\n\n examples(examples: any) {\n this.set(\"examples\", examples);\n\n return this;\n }\n}\n","import {OS3MediaType, OS3Response} from \"@tsed/openspec\";\n\nimport {JsonHeader} from \"../interfaces/JsonOpenSpec.js\";\nimport {mapHeaders} from \"../utils/mapHeaders.js\";\nimport {toJsonMapCollection} from \"../utils/toJsonMapCollection.js\";\nimport {JsonMap} from \"./JsonMap.js\";\nimport {JsonMedia} from \"./JsonMedia.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\nexport type JsonResponseOptions = OS3Response<JsonSchema, string | JsonHeader>;\n\nexport class JsonResponse extends JsonMap<JsonResponseOptions> {\n $kind: string = \"operationResponse\";\n\n status: number;\n\n constructor(obj: Partial<JsonResponseOptions> = {}) {\n super(obj);\n\n this.content(obj.content || ({} as any));\n }\n\n description(description: string): this {\n this.set(\"description\", description);\n\n return this;\n }\n\n headers(headers: Record<string, string | JsonHeader>): this {\n this.set(\"headers\", mapHeaders(headers));\n\n return this;\n }\n\n content(content: Record<string, OS3MediaType<JsonSchema>>) {\n this.set(\"content\", toJsonMapCollection(content, JsonMedia));\n\n return this;\n }\n\n getContent(): JsonMap<JsonMedia> {\n return this.get(\"content\")!;\n }\n\n getMedia(mediaType: string, create = true): JsonMedia {\n create && this.addMedia(mediaType);\n\n return this.getContent()?.get(mediaType) as any;\n }\n\n addMedia(mediaType: string) {\n const content = this.get(\"content\");\n\n if (!content.has(mediaType)) {\n content.set(mediaType, new JsonMedia());\n }\n\n return this;\n }\n\n isBinary() {\n return this.getContent().has(\"application/octet-stream\");\n }\n}\n","import {deepMerge, uniq, uniqBy} from \"@tsed/core\";\nimport {OpenSpecSecurity, OpenSpecTag, OS3Operation} from \"@tsed/openspec\";\n\nimport {JsonHeader} from \"../interfaces/JsonOpenSpec.js\";\nimport {isRedirectionStatus, isSuccessStatus} from \"../utils/isSuccessStatus.js\";\nimport {JsonMap} from \"./JsonMap.js\";\nimport {JsonParameter} from \"./JsonParameter.js\";\nimport {JsonResponse} from \"./JsonResponse.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\nexport class JsonMethodPath extends JsonMap<any> {\n constructor(\n public method: string,\n public path: string | RegExp\n ) {\n super();\n }\n\n summary(summary: string): this {\n super.set(\"summary\", summary);\n\n return this;\n }\n\n description(description: string): this {\n super.set(\"description\", description);\n\n return this;\n }\n}\n\nexport interface JsonOperationOptions extends OS3Operation<JsonSchema, JsonParameter, JsonMap<JsonResponse>> {\n consumes: string[];\n produces: string[];\n}\n\nexport class JsonOperation extends JsonMap<JsonOperationOptions> {\n $kind: string = \"operation\";\n\n readonly operationPaths: Map<string, JsonMethodPath> = new Map();\n\n #status: number;\n #redirection: boolean = false;\n\n constructor(obj: Partial<JsonOperationOptions> = {}) {\n super({parameters: [], responses: new JsonMap(), ...obj});\n }\n\n get response(): JsonResponse | undefined {\n return this.getResponses().get(this.getStatus().toString());\n }\n\n get status() {\n return this.#status;\n }\n\n tags(tags: OpenSpecTag[]): this {\n super.set(\"tags\", tags);\n\n return this;\n }\n\n addTags(tags: OpenSpecTag[]) {\n tags = uniqBy([...(this.get(\"tags\") || []), ...tags], \"name\");\n\n return this.tags(tags);\n }\n\n summary(summary: string): this {\n super.set(\"summary\", summary);\n\n return this;\n }\n\n operationId(operationId: string): this {\n this.set(\"operationId\", operationId);\n\n return this;\n }\n\n responses(responses: JsonMap<any>): this {\n this.set(\"responses\", responses);\n\n return this;\n }\n\n defaultStatus(status: number) {\n this.#status = status;\n\n return this;\n }\n\n getStatus() {\n return this.#status || 200;\n }\n\n setRedirection(status = 302) {\n this.#redirection = true;\n this.#status = status;\n return this;\n }\n\n isRedirection(status?: number) {\n if (this.#redirection) {\n if (status) {\n return isRedirectionStatus(status);\n }\n }\n\n return this.#redirection;\n }\n\n addResponse(statusCode: string | number, response: JsonResponse) {\n if ((isSuccessStatus(statusCode) || isRedirectionStatus(statusCode)) && !this.#status) {\n const res = this.getResponseOf(200);\n\n this.getResponses().set(statusCode.toString(), res).delete(\"200\");\n\n this.defaultStatus(Number(statusCode));\n }\n\n const currentCode = statusCode === \"default\" ? this.getStatus().toString() : statusCode.toString();\n const currentResponse = this.getResponses().get(currentCode);\n\n if (!currentResponse) {\n response.status = Number(currentCode);\n this.getResponses().set(currentCode, response);\n } else {\n response.forEach((value, key) => {\n if (![\"content\"].includes(key)) {\n currentResponse.set(key, deepMerge(currentResponse.get(key), value));\n }\n });\n currentResponse.status = Number(currentCode);\n }\n\n return this;\n }\n\n getResponses() {\n return this.get(\"responses\") as JsonMap<JsonResponse>;\n }\n\n getResponseOf(status: number | string): JsonResponse {\n return (status === \"default\" ? this.response : this.getResponses().get(String(status))) || new JsonResponse();\n }\n\n ensureResponseOf(status: number | string): JsonResponse {\n this.addResponse(status, this.getResponseOf(status));\n return this.getResponseOf(status);\n }\n\n getHeadersOf(status: number): Record<string, JsonHeader & {example: string}> {\n return this.getResponseOf(status).get(\"headers\") || {};\n }\n\n getContentTypeOf(status: number): any {\n return [...this.getResponseOf(status).get(\"content\").keys()].slice(-1)[0];\n }\n\n security(security: OpenSpecSecurity): this {\n this.set(\"security\", security);\n\n return this;\n }\n\n addSecurityScopes(name: string, scopes: string[]) {\n const security = this.get(\"security\") || {};\n security[name] = uniq([...(security[name] || []), ...scopes]);\n\n return this.security(security);\n }\n\n description(description: string): this {\n super.set(\"description\", description);\n\n return this;\n }\n\n deprecated(deprecated: boolean): this {\n super.set(\"deprecated\", deprecated);\n\n return this;\n }\n\n parameters(parameters: JsonParameter[]): this {\n super.set(\"parameters\", parameters);\n\n return this;\n }\n\n addParameter(index: number, parameter: JsonParameter) {\n if (index === -1) {\n index = this.get(\"parameters\").length;\n }\n this.get(\"parameters\")[index] = parameter;\n }\n\n consumes(consumes: string[]): this {\n super.set(\"consumes\", consumes);\n\n return this;\n }\n\n produces(produces: string[]): this {\n super.set(\"produces\", produces);\n\n return this;\n }\n\n addProduce(produce: string) {\n const produces = uniq([].concat(this.get(\"produces\"), produce as never)).filter(Boolean);\n\n this.set(\"produces\", produces);\n }\n\n addOperationPath(method: string, path: string | RegExp) {\n const operationPath = new JsonMethodPath(method, path);\n this.operationPaths.set(String(method) + String(path), operationPath);\n\n return operationPath;\n }\n\n getAllowedOperationPath(allowedVerbs?: string[]) {\n if (!allowedVerbs) {\n return [...this.operationPaths.values()];\n }\n\n return [...this.operationPaths.values()].filter(({method}) => method && allowedVerbs.includes(method.toUpperCase()));\n }\n}\n","import {DecoratorTypes, deepMerge, descriptorOf, isCollection, isFunction, isPromise, Metadata, prototypeOf, Store, Type} from \"@tsed/core\";\n\nimport {JsonEntityComponent} from \"../decorators/config/jsonEntityComponent.js\";\nimport type {JsonClassStore} from \"./JsonClassStore.js\";\nimport {JsonEntityStore, JsonEntityStoreOptions} from \"./JsonEntityStore.js\";\nimport {JsonOperation} from \"./JsonOperation.js\";\nimport type {JsonParameterStore} from \"./JsonParameterStore.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\nexport interface JsonViewOptions {\n path: string;\n options: any;\n}\n\nexport interface JsonRedirectOptions {\n status: number | undefined;\n url: string;\n}\n\n@JsonEntityComponent(DecoratorTypes.METHOD)\nexport class JsonMethodStore extends JsonEntityStore {\n readonly parent: JsonClassStore = JsonEntityStore.from(this.target);\n public middlewares: any[] = [];\n public beforeMiddlewares: any[] = [];\n public afterMiddlewares: any[] = [];\n /**\n * Ref to JsonOperation when the decorated object is a method.\n */\n readonly operation: JsonOperation = new JsonOperation();\n /**\n * List of children JsonEntityStore (properties or methods or params)\n */\n readonly children: Map<string | number, JsonParameterStore> = new Map();\n\n constructor(options: JsonEntityStoreOptions) {\n super({\n store: Store.fromMethod(options.target, options.propertyKey!),\n descriptor: descriptorOf(options.target, options.propertyKey!),\n ...options\n });\n\n const {beforeMiddlewares = [], middlewares = [], afterMiddlewares = []} = options;\n\n this.after(afterMiddlewares);\n this.before(beforeMiddlewares);\n this.use(middlewares);\n }\n\n get params(): JsonParameterStore[] {\n return this.parameters;\n }\n\n get view(): JsonViewOptions {\n return this.store.get(\"view\") as JsonViewOptions;\n }\n\n set view(view: JsonViewOptions) {\n this.store.set(\"view\", view);\n }\n\n get acceptMimes(): string[] {\n return this.store.get<string[]>(\"acceptMimes\", []);\n }\n\n set acceptMimes(mimes: string[]) {\n this.store.set(\"acceptMimes\", mimes);\n }\n\n get parameters(): JsonParameterStore[] {\n return [...this.children.values()] as JsonParameterStore[];\n }\n\n get operationPaths() {\n return this.operation.operationPaths;\n }\n\n /**\n * Get an endpoint.\n * @param target\n * @param propertyKey\n * @param descriptor\n */\n static get(target: Type<any>, propertyKey: string | symbol, descriptor?: PropertyDescriptor): JsonMethodStore {\n descriptor = descriptor || descriptorOf(prototypeOf(target), propertyKey);\n\n return JsonEntityStore.from<JsonMethodStore>(prototypeOf(target), propertyKey, descriptor);\n }\n\n getResponseOptions(\n status: number,\n {contentType = \"application/json\", includes}: {contentType?: string; includes?: string[]} = {}\n ): undefined | any {\n const media = this.operation.getResponseOf(status).getMedia(contentType, false);\n\n if (media && media.has(\"schema\")) {\n const schema = media.get(\"schema\") as JsonSchema;\n let groups = media.groups;\n\n if (includes && media.allowedGroups?.size) {\n groups = [...(groups || []), ...includes.filter((include) => media.allowedGroups!.has(include))];\n }\n\n return {type: schema.getComputedItemType(), groups};\n }\n\n return {type: this.type};\n }\n\n /**\n * Append middlewares to the beforeMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n public before(args: Function[]): this {\n this.beforeMiddlewares = this.beforeMiddlewares.concat(args).filter(isFunction);\n\n return this;\n }\n\n /**\n * Append middlewares to the afterMiddlewares list.\n * @param args\n * @returns {EndpointMetadata}\n */\n public after(args: Function[]): this {\n this.afterMiddlewares = this.afterMiddlewares.concat(args).filter(isFunction);\n\n return this;\n }\n\n /**\n * Store all arguments collected via Annotation.\n * @param args\n */\n public use(args: Function[]) {\n this.middlewares = this.middlewares.concat(args).filter(isFunction);\n\n return this;\n }\n\n /**\n * Find the value at the controller level. Let this value be extended or overridden by the endpoint itself.\n *\n * @param key\n * @returns {any}\n */\n public get<T = any>(key: any): T {\n const ctrlValue = Store.from(this.target).get(key);\n\n return deepMerge<T>(ctrlValue, this.store.get(key));\n }\n\n public getParamTypes(): Record<string, boolean> {\n return [...this.children.values()].reduce(\n (obj, item) => ({\n ...obj,\n [item.paramType]: true\n }),\n {}\n );\n }\n\n protected build() {\n if (!this._type) {\n let type: any = Metadata.getReturnType(this.target, this.propertyKey);\n type = isPromise(type) ? undefined : type;\n\n this.buildType(type);\n }\n\n this._type = this._type || Object;\n\n this.parent.children.set(this.propertyName, this);\n\n if (isCollection(this._type)) {\n this.collectionType = this._type;\n // @ts-ignore\n delete this._type;\n }\n\n this._schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n\n if (this.collectionType) {\n this._schema.itemSchema(this.type);\n }\n\n this.parent.schema.addProperty(this.propertyName, this.schema);\n }\n}\n\n/**\n * EndpointMetadata contains metadata about a controller and his method.\n * Each annotation (@Get, @Body...) attached to a method are stored into endpoint.\n * EndpointMetadata convert this metadata to an array which contain arguments to call an Express method.\n *\n * Example :\n *```typescript\n * @Controller(\"/my-path\")\n * provide MyClass {\n *\n * @Get(\"/\")\n * @Authenticated()\n * public myMethod(){}\n * }\n *```\n *\n * @alias JsonMethodStore\n */\nexport type EndpointMetadata = JsonMethodStore;\nexport const EndpointMetadata = JsonMethodStore;\n","export enum JsonParameterTypes {\n BODY = \"body\",\n PATH = \"path\",\n QUERY = \"query\",\n HEADER = \"header\",\n COOKIES = \"cookie\",\n FILES = \"files\"\n}\n/**\n * @ignore\n */\nexport function formatParameterType(type: any): any {\n return String(type).toLowerCase().replace(\"raw_\", \"\").replace(\"cookies\", \"cookie\");\n}\n/**\n * @ignore\n */\nexport function isParameterType(type: string) {\n return Object.values(JsonParameterTypes).includes(formatParameterType(type) as any);\n}\n","import {Type} from \"@tsed/core\";\nimport {OpenSpecHash, OpenSpecRef, OS3Example, OS3Parameter} from \"@tsed/openspec\";\n\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer.js\";\nimport {NestedGenerics} from \"../utils/generics.js\";\nimport {JsonMap} from \"./JsonMap.js\";\nimport {formatParameterType} from \"./JsonParameterTypes.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\nexport class JsonParameter extends JsonMap<OS3Parameter<JsonSchema>> implements NestedGenerics {\n $kind = \"operationInParameter\";\n\n nestedGenerics: Type<any>[][] = [];\n groups: string[];\n groupsName: string;\n $schema: JsonSchema;\n expression: string;\n\n getName() {\n const name = this.get(\"name\");\n\n if (this.get(\"in\") === \"files\") {\n return name.split(\".\")[0];\n }\n\n return name;\n }\n\n name(name: string): this {\n this.set(\"name\", name);\n\n return this;\n }\n\n examples(examples: OpenSpecHash<OS3Example | OpenSpecRef>) {\n super.set(\"examples\", examples);\n\n return this;\n }\n\n description(description: string): this {\n this.set(\"description\", description);\n\n return this;\n }\n\n in(inType: string, expression: string | any = \"\"): this {\n this.set(\"in\", formatParameterType(inType));\n this.expression = expression;\n\n return this;\n }\n\n required(required: boolean): this {\n this.set(\"required\", required);\n\n return this;\n }\n\n schema(schema: JsonSchema): this {\n this.$schema = schema;\n\n return this;\n }\n\n toJSON(options?: JsonSchemaOptions) {\n return execMapper(\"operationInParameter\", [this], options);\n }\n}\n","import {ancestorsOf, DecoratorTypes, isClass, isCollection, isMethodDescriptor, Metadata, prototypeOf, Type} from \"@tsed/core\";\n\nimport {JsonEntityComponent} from \"../decorators/config/jsonEntityComponent.js\";\nimport {JsonEntityStore, JsonEntityStoreOptions} from \"./JsonEntityStore.js\";\nimport type {JsonMethodStore} from \"./JsonMethodStore.js\";\nimport {JsonParameter} from \"./JsonParameter.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\nexport interface JsonParameterStoreOptions extends JsonEntityStoreOptions {\n dataPath?: string;\n paramType?: string;\n expression?: string;\n}\n\nexport interface PipeMethods<T = any, R = any> {\n transform(value: T, metadata: JsonParameterStore): R;\n}\n\n@JsonEntityComponent(DecoratorTypes.PARAM)\nexport class JsonParameterStore extends JsonEntityStore {\n public paramType: string;\n public expression: string;\n public dataPath: string;\n /**\n * Define pipes can be called by the framework to transform input parameter\n */\n public pipes: Type<PipeMethods>[];\n /**\n * Ref to JsonParameter when the decorated object is a parameter.\n */\n readonly parameter: JsonParameter = new JsonParameter();\n readonly parent: JsonMethodStore = JsonEntityStore.fromMethod(this.target, this.propertyKey);\n\n constructor(options: JsonParameterStoreOptions) {\n super(options);\n this.pipes = options.pipes || [];\n this.paramType = options.paramType || this.paramType;\n this.expression = options.expression || this.expression;\n this.dataPath = options.dataPath || this.dataPath;\n }\n\n get nestedGenerics(): Type<any>[][] {\n return this.parameter.nestedGenerics;\n }\n\n set nestedGenerics(nestedGenerics: Type<any>[][]) {\n this.parameter.nestedGenerics = nestedGenerics;\n }\n\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required(): boolean {\n return !!this.parameter.get(\"required\");\n }\n\n set required(value: boolean) {\n this.parameter.required(value);\n }\n\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n\n static getParams<T extends JsonParameterStore = JsonParameterStore>(target: Type<any>, propertyKey: string | symbol): T[] {\n const params: T[] = [];\n\n const klass = ancestorsOf(target)\n .reverse()\n .find((target) => {\n return isMethodDescriptor(target, propertyKey) && JsonEntityStore.fromMethod(target, propertyKey).children.size;\n });\n\n if (klass) {\n JsonEntityStore.fromMethod(klass, propertyKey).children.forEach((param: T, index) => {\n params[+index] = param;\n });\n\n return params;\n }\n\n return [];\n }\n\n static get(target: Type<any>, propertyKey: string | symbol, index: number) {\n return JsonEntityStore.from<JsonParameterStore>(prototypeOf(target), propertyKey, index);\n }\n\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value: any): boolean {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n\n protected getSchema(type: any) {\n if (isCollection(type) || !isClass(type)) {\n return JsonSchema.from({\n type\n });\n }\n\n return JsonEntityStore.from(type).schema;\n }\n\n protected build() {\n if (!this._type) {\n const type: any = Metadata.getParamTypes(prototypeOf(this.target), this.propertyKey)[this.index!];\n\n this.buildType(type);\n }\n\n this._type = this._type || Object;\n\n if (!this._schema) {\n this.parent.children.set(this.index!, this);\n\n this._schema = this.getSchema(this.collectionType || this.type);\n\n this.parameter.schema(this._schema);\n\n if (this.collectionType) {\n this._schema.itemSchema(this.getSchema(this.type));\n }\n\n this.parent.operation.addParameter(this.index as number, this.parameter);\n }\n }\n}\n\n/**\n * @alias JsonParameterStore\n */\nexport type ParamMetadata = JsonParameterStore;\nexport const ParamMetadata = JsonParameterStore;\n","import {DecoratorTypes, Metadata, prototypeOf, Type} from \"@tsed/core\";\n\nimport {JsonEntityComponent} from \"../decorators/config/jsonEntityComponent.js\";\nimport type {JsonClassStore} from \"./JsonClassStore.js\";\nimport {JsonEntityStore} from \"./JsonEntityStore.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\n@JsonEntityComponent(DecoratorTypes.PROP)\nexport class JsonPropertyStore extends JsonEntityStore {\n readonly parent: JsonClassStore = JsonEntityStore.from(this.target);\n\n /**\n * Return the required state.\n * @returns {boolean}\n */\n get required(): boolean {\n return this.parent.schema.isRequired(this.propertyKey as string);\n }\n\n /**\n * Change the state of the required data.\n * @param value\n */\n set required(value: boolean) {\n if (value) {\n this.parent.schema.addRequired(this.propertyKey as string);\n } else {\n this.parent.schema.removeRequired(this.propertyKey as string);\n }\n }\n\n get allowedRequiredValues() {\n return this.schema.$allow;\n }\n\n discriminatorKey() {\n this.parent.schema.discriminatorKey(String(this.propertyKey));\n this.itemSchema.isDiscriminatorKey = true;\n return this;\n }\n\n isDiscriminatorKey() {\n return this.itemSchema.isDiscriminatorKey;\n }\n\n /**\n * Check precondition between value, required and allowedRequiredValues to know if the entity is required.\n * @param value\n * @returns {boolean}\n */\n isRequired(value: any): boolean {\n return this.required && [undefined, null, \"\"].includes(value) && !this.allowedRequiredValues.includes(value);\n }\n\n protected build() {\n if (!this._type) {\n this.buildType(Metadata.getType(prototypeOf(this.target), this.propertyKey));\n }\n\n this._type = this._type || Object;\n\n const properties = this.parent.schema.get(\"properties\");\n\n let schema: JsonSchema = properties[this.propertyName];\n\n if (!schema) {\n this.parent.children.set(this.propertyName, this);\n\n schema = JsonSchema.from({\n type: this.collectionType || this.type\n });\n\n if (this.collectionType) {\n schema.itemSchema(this.type);\n }\n }\n\n this.parent.schema.addProperty(this.propertyName, schema);\n\n this._schema = schema;\n }\n\n static get(target: Type<any>, propertyKey: string | symbol) {\n return JsonEntityStore.from<JsonPropertyStore>(prototypeOf(target), propertyKey);\n }\n}\n\n/**\n * @alias JsonPropertyStore\n */\nexport type PropertyMetadata = JsonPropertyStore;\nexport const PropertyMetadata = JsonPropertyStore;\n","import {DecoratorTypes, Type} from \"@tsed/core\";\n\nimport {JsonClassStore} from \"../domain/JsonClassStore.js\";\nimport {JsonEntitiesContainer, JsonEntityStore} from \"../domain/JsonEntityStore.js\";\nimport {JsonMethodStore} from \"../domain/JsonMethodStore.js\";\nimport {JsonParameterStore} from \"../domain/JsonParameterStore.js\";\nimport {JsonPropertyStore} from \"../domain/JsonPropertyStore.js\";\n\nJsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore);\nJsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore);\nJsonEntitiesContainer.set(DecoratorTypes.PARAM, JsonParameterStore);\nJsonEntitiesContainer.set(DecoratorTypes.METHOD, JsonMethodStore);\n\n/**\n * Get entity store from decorator args\n * @param target\n */\nexport function getJsonEntityStore<T extends JsonClassStore = JsonClassStore>(target: Type<any>): T;\nexport function getJsonEntityStore<T extends JsonPropertyStore = JsonPropertyStore>(\n target: Type<any> | any,\n propertyKey: string | symbol\n): T;\nexport function getJsonEntityStore<T extends JsonParameterStore = JsonParameterStore>(\n target: Type<any> | any,\n propertyKey: string | symbol,\n index: number\n): T;\nexport function getJsonEntityStore<T extends JsonMethodStore = JsonMethodStore>(\n target: Type<any> | any,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor\n): T;\nexport function getJsonEntityStore<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T;\nexport function getJsonEntityStore<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T {\n return JsonEntityStore.from<T>(...args);\n}\n","import {OperationVerbs} from \"../constants/OperationVerbs.js\";\nimport {JsonMethodPath} from \"./JsonOperation.js\";\n\nexport class JsonOperationPathsMap extends Map<string, JsonMethodPath> {\n $kind: string = \"operationPaths\";\n readonly $isJsonDocument = true;\n\n setOperationPath(operationPath: JsonMethodPath) {\n // if (operationPath.method !== OperationVerbs.CUSTOM) {\n const key = this.getKey(operationPath.method, operationPath.path);\n this.set(key, operationPath);\n // }\n }\n\n protected getKey = (method: string, path: any) => `${method}-${path}`;\n}\n","import {ancestorsOf, Type} from \"@tsed/core\";\n\nimport type {JsonClassStore} from \"../domain/JsonClassStore.js\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore.js\";\n\n/**\n * Return store and his inherited stores\n * @param target\n * @ignore\n */\nexport function getInheritedStores(target: Type<any> | any): Map<Type<any>, JsonClassStore> {\n const store: JsonClassStore = target.isStore ? target : getJsonEntityStore<JsonClassStore>(target);\n\n if (!store.$inherited) {\n store.$inherited = ancestorsOf(store.target)\n .reverse()\n .reduce((context, model) => {\n return context.set(model, getJsonEntityStore(model));\n }, new Map());\n }\n\n return store.$inherited;\n}\n","import {Type} from \"@tsed/core\";\n\nimport type {JsonClassStore} from \"../domain/JsonClassStore.js\";\nimport {JsonMethodStore} from \"../domain/JsonMethodStore.js\";\nimport {JsonOperationPathsMap} from \"../domain/JsonOperationPathsMap.js\";\nimport {getInheritedStores} from \"./getInheritedStores.js\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore.js\";\n\n/**\n * @ignore\n */\nexport function getOperationsStores<T extends JsonMethodStore = JsonMethodStore>(target: Type<any> | any): Map<string, T> {\n const store: JsonClassStore = target.isStore ? target : getJsonEntityStore(target);\n\n if (!store.$operations) {\n const operationPaths = new JsonOperationPathsMap();\n store.$operations = new Map<string, T>();\n\n getInheritedStores(store).forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (propStore instanceof JsonMethodStore && !store.$operations.has(propStore.propertyKey)) {\n store.$operations.set(propStore.propertyKey, propStore);\n }\n });\n });\n\n store.$operations.forEach((store: JsonMethodStore) => {\n store.operation.operationPaths.forEach((operationPath) => {\n operationPaths.setOperationPath(operationPath);\n });\n });\n\n operationPaths.clear();\n }\n\n return store.$operations;\n}\n","import {JsonMethodStore} from \"../domain/JsonMethodStore.js\";\n\nexport function removeHiddenOperation(operationStore: JsonMethodStore) {\n return !operationStore.store.get(\"hidden\");\n}\n","import {camelCase} from \"change-case\";\n\nimport {OperationVerbs} from \"../../constants/OperationVerbs.js\";\nimport {JsonMethodStore} from \"../../domain/JsonMethodStore.js\";\nimport {JsonMethodPath} from \"../../domain/JsonOperation.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {buildPath} from \"../../utils/buildPath.js\";\nimport {getJsonEntityStore} from \"../../utils/getJsonEntityStore.js\";\nimport {getOperationsStores} from \"../../utils/getOperationsStores.js\";\nimport {removeHiddenOperation} from \"../../utils/removeHiddenOperation.js\";\n\nconst ALLOWED_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE];\n\nfunction pushToChannels(options: JsonSchemaOptions) {\n return (\n channels: any,\n {\n operationPath,\n operationStore\n }: {\n operationPath: JsonMethodPath;\n operationStore: JsonMethodStore;\n }\n ) => {\n const path = options.ctrlRootPath || \"/\";\n const method = operationPath.method.toLowerCase();\n const operationId = camelCase(`${method.toLowerCase()} ${operationStore.parent.schema.getName()}`);\n\n const message = execMapper(\"message\", [operationStore, operationPath], options);\n\n return {\n ...channels,\n [path]: {\n ...(channels as any)[path],\n [method]: {\n ...(channels as any)[path]?.[method],\n operationId,\n message: {\n oneOf: [...((channels as any)[path]?.[method]?.message?.oneOf || []), message]\n }\n }\n }\n };\n };\n}\n\nfunction expandOperationPaths(options: JsonSchemaOptions) {\n return (operationStore: JsonMethodStore) => {\n const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);\n\n if (operationPaths.length === 0) {\n return [];\n }\n\n return operationPaths.map((operationPath) => {\n return {\n operationPath,\n operationStore\n };\n });\n };\n}\n\nexport function channelsMapper(model: any, {channels, rootPath, ...options}: JsonSchemaOptions) {\n const store = getJsonEntityStore(model);\n const ctrlPath = store.path;\n const ctrlRootPath = buildPath(rootPath + ctrlPath);\n\n options = {\n ...options,\n ctrlRootPath\n };\n\n return [...getOperationsStores(model).values()]\n .filter(removeHiddenOperation)\n .flatMap(expandOperationPaths(options))\n .reduce(pushToChannels(options), channels);\n}\n\nregisterJsonSchemaMapper(\"channels\", channelsMapper);\n","export enum SpecTypes {\n JSON = \"jsonschema\",\n SWAGGER = \"swagger2\",\n OPENAPI = \"openapi3\",\n ASYNCAPI = \"asyncapi2\"\n}\n","export function makeOf(key: string, schemes: unknown[]) {\n if (schemes.length) {\n if (schemes.length === 1) {\n return schemes[0];\n } else {\n return {[key]: schemes};\n }\n }\n\n return null;\n}\n","import {cleanObject, getValue} from \"@tsed/core\";\n\nimport {OperationVerbs} from \"../../constants/OperationVerbs.js\";\nimport {JsonMethodStore} from \"../../domain/JsonMethodStore.js\";\nimport {JsonMethodPath} from \"../../domain/JsonOperation.js\";\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {makeOf} from \"../../utils/somethingOf.js\";\n\nexport function messageMapper(\n jsonOperationStore: JsonMethodStore,\n operationPath: JsonMethodPath,\n {tags = [], defaultTags = [], ...options}: JsonSchemaOptions = {}\n) {\n const {path: event, method} = operationPath;\n\n const messageKey = String(event);\n\n let message: any = getValue(\n options.components,\n \"messages.\" + event,\n cleanObject({\n description: jsonOperationStore.operation.get(\"description\"),\n summary: jsonOperationStore.operation.get(\"summary\")\n })\n );\n\n if (method.toUpperCase() === OperationVerbs.PUBLISH) {\n const payload = execMapper(\"payload\", [jsonOperationStore, operationPath], options);\n\n if (payload) {\n message.payload = payload;\n }\n\n const responses = jsonOperationStore.operation\n .getAllowedOperationPath([OperationVerbs.SUBSCRIBE])\n .map((operationPath) => {\n return execMapper(\"message\", [jsonOperationStore, operationPath], options);\n })\n .filter(Boolean);\n\n const responsesSchema = makeOf(\"oneOf\", responses);\n\n if (responsesSchema) {\n message[\"x-response\"] = responsesSchema;\n }\n } else {\n const response = execMapper(\"response\", [jsonOperationStore, operationPath], options);\n\n if (response) {\n message[\"x-response\"] = response;\n }\n }\n\n options.components!.messages = options.components!.messages || {};\n options.components!.messages[messageKey] = message;\n\n return {$ref: `#/components/messages/${messageKey}`};\n}\n\nregisterJsonSchemaMapper(\"message\", messageMapper, SpecTypes.ASYNCAPI);\n","import {Type} from \"@tsed/core\";\n\nimport {JsonSchema} from \"../domain/JsonSchema.js\";\n\nexport type GenericValue = Type<any> | JsonSchema | any;\n\n/**\n * @ignore\n */\nexport type GenericsMap = Map<string, GenericValue>;\n\n/**\n * @ignore\n */\nexport interface GenericTypes {\n genericTypes: Type<any>[];\n\n [key: string]: any;\n}\n\n/**\n * @ignore\n */\nexport interface GenericLabels {\n genericLabels: string[];\n\n [key: string]: any;\n}\n\n/**\n * @ignore\n */\nexport interface NestedGenerics {\n nestedGenerics: GenericValue[][];\n\n [key: string]: any;\n}\n\n/**\n * @ignore\n */\nexport interface GenericsContext extends GenericTypes, GenericLabels, NestedGenerics {\n generics: GenericsMap;\n}\n\n/**\n * @ignore\n * @param genericLabels\n * @param genericTypes\n */\nexport function getGenericsMap(genericLabels: string[], genericTypes: GenericValue[]): GenericsMap {\n return genericLabels.reduce((map: Map<string, any>, item: string, index: number) => map.set(item, genericTypes[index]), new Map());\n}\n\n/**\n * @ignore\n * @param options\n */\nexport function mapGenericsOptions(options: Partial<GenericTypes & GenericLabels>) {\n if (options.genericLabels && options.genericTypes) {\n const {genericLabels, genericTypes, ...ops} = options;\n\n return {\n ...ops,\n generics: getGenericsMap(genericLabels, genericTypes)\n };\n }\n\n return options;\n}\n\n/**\n * @ignore\n * @param value\n */\nexport function popGenerics(value: NestedGenerics): NestedGenerics & GenericTypes {\n const [genericTypes, ...out] = value.nestedGenerics;\n\n return {\n genericTypes,\n nestedGenerics: out\n };\n}\n","import {setValue} from \"@tsed/core\";\nimport {pascalCase} from \"change-case\";\n\nimport {JsonMethodStore} from \"../../domain/JsonMethodStore.js\";\nimport {JsonMethodPath, JsonOperation} from \"../../domain/JsonOperation.js\";\nimport {JsonParameter} from \"../../domain/JsonParameter.js\";\nimport {isParameterType, JsonParameterTypes} from \"../../domain/JsonParameterTypes.js\";\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {popGenerics} from \"../../utils/generics.js\";\nimport {makeOf} from \"../../utils/somethingOf.js\";\n\nfunction mapOptions(parameter: JsonParameter, options: JsonSchemaOptions = {}) {\n return {\n ...options,\n groups: parameter.groups,\n groupsName: parameter.groupsName\n };\n}\n\nfunction getParameters(jsonOperation: JsonOperation, options: JsonSchemaOptions): JsonParameter[] {\n return jsonOperation.get(\"parameters\").filter((parameter: JsonParameter) => isParameterType(parameter.get(\"in\")));\n}\n\nexport function payloadMapper(jsonOperationStore: JsonMethodStore, operationPath: JsonMethodPath, options: JsonSchemaOptions) {\n const parameters = getParameters(jsonOperationStore.operation, options);\n const payloadName = pascalCase([operationPath.path, operationPath.method, \"Payload\"].join(\" \"));\n\n setValue(options, `components.schemas.${payloadName}`, {});\n\n const allOf = parameters\n .map((parameter) => {\n const opts = mapOptions(parameter, options);\n const jsonSchema = execMapper(\"item\", [parameter.$schema], {\n ...opts,\n ...popGenerics(parameter)\n });\n\n switch (parameter.get(\"in\")) {\n case JsonParameterTypes.BODY:\n return jsonSchema;\n case JsonParameterTypes.QUERY:\n case JsonParameterTypes.PATH:\n case JsonParameterTypes.HEADER:\n return {\n type: \"object\",\n properties: {\n [parameter.get(\"name\")]: jsonSchema\n }\n };\n }\n\n return jsonSchema;\n }, {})\n .filter(Boolean);\n\n return makeOf(\"allOf\", allOf);\n}\n\nregisterJsonSchemaMapper(\"payload\", payloadMapper, SpecTypes.ASYNCAPI);\n","import {setValue} from \"@tsed/core\";\nimport {pascalCase} from \"change-case\";\n\nimport {JsonMethodStore} from \"../../domain/JsonMethodStore.js\";\nimport {JsonMethodPath} from \"../../domain/JsonOperation.js\";\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {makeOf} from \"../../utils/somethingOf.js\";\n\nexport function responsePayloadMapper(jsonOperationStore: JsonMethodStore, operationPath: JsonMethodPath, options: JsonSchemaOptions) {\n const responses = jsonOperationStore.operation.getResponses();\n const statuses: number[] = [];\n const statusesTexts: string[] = [];\n const successSchemes: unknown[] = [];\n const errorSchemes: unknown[] = [];\n\n [...responses.entries()].forEach(([status, jsonResponse]) => {\n const response = execMapper(\"map\", [jsonResponse], options);\n\n statuses.push(+status);\n\n statusesTexts.push(response.description);\n\n if (+status !== 204) {\n const {content} = response;\n const schema = content[Object.keys(content)[0]];\n\n if (+status >= 200 && +status < 400) {\n successSchemes.push(schema);\n } else {\n successSchemes.push(schema);\n }\n }\n });\n\n const responsePayloadName = pascalCase([operationPath.path, operationPath.method, \"Response\"].join(\" \"));\n const responsePayload = {\n type: \"object\",\n properties: {\n status: {\n type: \"number\",\n enum: statuses\n },\n statusText: {\n type: \"string\",\n enum: statusesTexts\n }\n },\n required: [\"status\"]\n };\n\n const dataSchema = makeOf(\"oneOf\", successSchemes);\n\n if (dataSchema) {\n setValue(responsePayload, \"properties.data\", dataSchema);\n }\n\n const errorSchema = makeOf(\"oneOf\", errorSchemes);\n\n if (errorSchemes.length) {\n setValue(responsePayload, \"properties.error\", errorSchema);\n }\n\n setValue(options, `components.schemas.${responsePayloadName}`, responsePayload);\n\n return {$ref: `#/components/schemas/${responsePayloadName}`};\n}\n\nregisterJsonSchemaMapper(\"response\", responsePayloadMapper, SpecTypes.ASYNCAPI);\n","import {getValue, Type, uniqBy} from \"@tsed/core\";\n\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {SpecSerializerOptions} from \"../../utils/getSpec.js\";\n\nfunction generate(model: Type<any>, options: SpecSerializerOptions) {\n const specJson: any = {\n channels: execMapper(\"channels\", [model], options)\n };\n\n specJson.tags = uniqBy(options.tags, \"name\");\n\n if (options.components?.schemas && Object.keys(options.components.schemas).length) {\n specJson.components = {\n ...options.components,\n schemas: options.components.schemas\n };\n }\n\n return specJson;\n}\n\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.ASYNCAPI);\n","import {nameOf, Type} from \"@tsed/core\";\n\nimport {getJsonEntityStore} from \"../utils/getJsonEntityStore.js\";\n\nexport class JsonLazyRef {\n readonly isLazyRef = true;\n\n constructor(readonly getType: () => Type<any>) {}\n\n get target() {\n return this.getType();\n }\n\n get schema() {\n return getJsonEntityStore(this.getType()).schema;\n }\n\n get name() {\n return nameOf(this.getType());\n }\n}\n","import {cleanObject, setValue} from \"@tsed/core\";\nimport {pascalCase} from \"change-case\";\n\nimport type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {SpecTypes} from \"../domain/SpecTypes.js\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\n\n/**\n * ignore\n * @param options\n */\nfunction getHost(options: JsonSchemaOptions) {\n const {host = `#/${[SpecTypes.OPENAPI, SpecTypes.ASYNCAPI].includes(options.specType!) ? \"components/schemas\" : \"definitions\"}`} =\n options;\n\n return host;\n}\n\n/**\n * @ignore\n */\nexport function createRefName(name: string, options: JsonSchemaOptions) {\n if (options.groups && options.groups.length) {\n return pascalCase(`${name} ${options.groupsName || options.groups.join(\" \")}`);\n }\n\n return name;\n}\n\n/**\n * @ignore\n */\nexport function createRef(name: string, schema: JsonSchema, options: JsonSchemaOptions) {\n const host = getHost(options);\n const ref = {\n $ref: `${host}/${name}`\n };\n\n const readOnly = schema.isReadOnly;\n const writeOnly = schema.isWriteOnly;\n\n return cleanObject({\n readOnly: readOnly ? true : undefined,\n writeOnly: writeOnly ? true : undefined,\n ...(readOnly || writeOnly\n ? {\n anyOf: [ref]\n }\n : ref)\n });\n}\n\n/**\n * @ignore\n */\nexport function toRef(value: JsonSchema, schema: unknown | undefined, options: JsonSchemaOptions) {\n const name = createRefName(value.getName(), options);\n\n if (schema) {\n setValue(options, `components.schemas.${name}`, schema);\n }\n\n return createRef(name, value, options);\n}\n","import {JsonLazyRef} from \"../../domain/JsonLazyRef.js\";\nimport {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, execOneOfMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {mapGenericsOptions} from \"../../utils/generics.js\";\nimport {toRef} from \"../../utils/ref.js\";\n\nexport function anyMapper(input: any, options: JsonSchemaOptions = {}): any {\n if (typeof input !== \"object\" || input === null) {\n return input;\n }\n\n if (input instanceof JsonLazyRef) {\n return execMapper(\"lazyRef\", [input], options);\n }\n\n if (input instanceof JsonSchema && input.get(\"enum\") instanceof JsonSchema) {\n const enumSchema: JsonSchema = input.get(\"enum\");\n\n return toRef(enumSchema, enumSchema.toJSON(options), options);\n }\n\n if (input.$kind && input.$isJsonDocument) {\n const kind = execOneOfMapper([input.$kind, \"map\"], options);\n const schema = execMapper(kind, [input], mapGenericsOptions(options));\n\n return input.canRef ? toRef(input, schema, options) : schema;\n }\n\n return execMapper(\"object\", [input], options);\n}\n\nregisterJsonSchemaMapper(\"any\", anyMapper);\n","import {getValue, setValue} from \"@tsed/core\";\n\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {mapGenericsOptions, popGenerics} from \"../../utils/generics.js\";\nimport {createRef, createRefName} from \"../../utils/ref.js\";\n\nexport function classMapper(value: JsonSchema, options: JsonSchemaOptions) {\n const store = JsonEntityStore.from(value.class);\n const name = createRefName(store.schema.getName() || value.getName(), options);\n\n if (value.hasGenerics) {\n // Inline generic\n const {type, properties, additionalProperties, items, ...props} = value.toJSON(options);\n const schema = {\n ...execMapper(\"any\", [store.schema], {\n ...options,\n ...popGenerics(value),\n root: false\n }),\n ...props\n };\n\n if (schema.title) {\n const name = createRefName(schema.title, options);\n setValue(options.components, `schemas.${name}`, schema);\n\n delete schema.title;\n\n return createRef(name, value, options);\n }\n\n return schema;\n }\n\n if (!getValue(options, `components.schemas.${name}`)) {\n // avoid infinite calls\n setValue(options, `components.schemas.${name}`, {});\n\n options.components!.schemas[name] = execMapper(\n \"any\",\n [store.schema],\n mapGenericsOptions({\n ...options,\n root: false\n })\n );\n }\n\n return createRef(name, value, options);\n}\n\nregisterJsonSchemaMapper(\"class\", classMapper);\n","import {isString} from \"@tsed/core\";\n\nimport {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport type {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {toRef} from \"../../utils/ref.js\";\n\ninterface SchemaWithDiscriminator {\n discriminator?: {mapping?: Record<string, JsonSchema | string>};\n}\n\nexport function discriminatorMappingMapper(obj: SchemaWithDiscriminator, _: JsonSchema, options: JsonSchemaOptions) {\n if (obj.discriminator?.mapping) {\n const entries = Object.entries(obj.discriminator.mapping);\n const newMapping: Record<string, string> = {};\n\n for (const [key, value] of entries) {\n newMapping[key] = isString(value) ? value : toRef(value, null, options).$ref;\n }\n\n obj.discriminator.mapping = newMapping;\n }\n\n return obj;\n}\n\nfunction defaultDiscriminatorMappingMapper(obj: SchemaWithDiscriminator) {\n if (obj.discriminator?.mapping) {\n delete obj.discriminator.mapping;\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"discriminatorMapping\", defaultDiscriminatorMappingMapper);\n","import {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function enumsMapper(obj: any, schema: JsonSchema, options: JsonSchemaOptions) {\n if (options.inlineEnums && obj.enum?.$isJsonDocument) {\n obj.enum = obj.enum.toJSON().enum;\n }\n\n if (obj.enum) {\n obj.type = obj.type === \"object\" || obj.type === undefined ? \"string\" : obj.type;\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"enums\", enumsMapper);\n","import {isClass, isPrimitiveClass} from \"@tsed/core\";\n\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {GenericsContext, popGenerics} from \"../../utils/generics.js\";\nimport {getJsonType} from \"../../utils/getJsonType.js\";\n\n/**\n * @ignore\n */\nexport function genericsMapper(obj: any, options: GenericsContext) {\n const {generics} = options;\n\n if (generics && obj.$ref) {\n if (generics.has(obj.$ref)) {\n let type = generics.get(obj.$ref);\n\n if (isPrimitiveClass(type)) {\n return {\n type: getJsonType(type)\n };\n }\n\n if (type === Date) {\n return {\n type: \"string\",\n format: \"date-time\"\n };\n }\n\n if (type.toJSON) {\n return type.toJSON({\n ...options,\n generics: undefined\n });\n }\n\n if (type === Object) {\n return {\n type: \"object\"\n };\n }\n\n if (isClass(type)) {\n const model = {\n class: type\n };\n\n if (options.nestedGenerics.length === 0) {\n return execMapper(\"class\", [model as any], {\n ...options,\n generics: undefined\n });\n }\n\n const store = JsonEntityStore.from(model.class);\n\n return execMapper(\"schema\", [store.schema], {\n ...options,\n ...popGenerics(options),\n root: false\n });\n }\n }\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"generics\", genericsMapper);\n","import {classOf, deepMerge} from \"@tsed/core\";\n\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {getInheritedStores} from \"../../utils/getInheritedStores.js\";\n\nfunction alterMerge(_: string, obj: any) {\n if (obj?.type && obj?.$ref) {\n const {$ref, ...schema} = obj;\n\n obj = {\n allOf: [\n {\n $ref\n },\n schema\n ]\n };\n }\n\n return obj;\n}\n\n/**\n * @ignore\n */\nexport function inheritedClassMapper(obj: any, {target, ...options}: JsonSchemaOptions) {\n const stores = Array.from(getInheritedStores(target).entries()).filter(([model]) => classOf(model) !== classOf(target));\n\n if (stores.length) {\n const schema = stores.reduce((obj, [, store]) => {\n return deepMerge(obj, execMapper(\"schema\", [store.schema], options), {alter: alterMerge});\n }, {});\n\n return deepMerge(schema, obj, {alter: alterMerge});\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"inheritedClass\", inheritedClassMapper);\n","import {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function itemMapper(value: any, options: JsonSchemaOptions) {\n return value && value.isClass ? execMapper(\"class\", [value], options) : execMapper(\"any\", [value], options);\n}\n\nregisterJsonSchemaMapper(\"item\", itemMapper);\n","import {JsonLazyRef} from \"../../domain/JsonLazyRef.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {mapGenericsOptions} from \"../../utils/generics.js\";\nimport {createRef, toRef} from \"../../utils/ref.js\";\n\nexport function lazyRefMapper(jsonLazyRef: JsonLazyRef, options: JsonSchemaOptions) {\n const name = jsonLazyRef.name;\n\n if (options.$refs?.find((t: any) => t === jsonLazyRef.target)) {\n return createRef(name, jsonLazyRef.schema, options);\n }\n\n options.$refs = [...(options.$refs || []), jsonLazyRef.target];\n\n const schema = jsonLazyRef.getType() && execMapper(\"schema\", [jsonLazyRef.schema], mapGenericsOptions(options));\n\n return toRef(jsonLazyRef.schema, schema, options);\n}\n\nregisterJsonSchemaMapper(\"lazyRef\", lazyRefMapper);\n","import {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {mapGenericsOptions} from \"../../utils/generics.js\";\n\n/**\n * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.\n * @param input\n * @param ignore\n * @param options\n * @ignore\n */\nexport function mapMapper(input: Map<string, any>, {ignore = [], ...options}: JsonSchemaOptions = {}): any {\n options = mapGenericsOptions(options);\n\n return Array.from(input.entries()).reduce((obj: any, [key, value]) => {\n if (ignore.includes(key)) {\n return obj;\n }\n\n obj[key] = execMapper(\"item\", [value], options);\n return obj;\n }, {});\n}\n\nregisterJsonSchemaMapper(\"map\", mapMapper);\n","export const MANY_OF_PROPERTIES = [\"oneOf\", \"allOf\", \"anyOf\"];\nexport const STRING_PROPERTIES = [\"minLength\", \"maxLength\", \"pattern\", \"format\"];\nexport const BOOLEAN_PROPERTIES = [];\nexport const NUMBER_PROPERTIES = [\"minimum\", \"maximum\", \"exclusiveMinimum\", \"exclusiveMaximum\", \"multipleOf\"];\nexport const ARRAY_PROPERTIES = [\"maxItems\", \"minItems\", \"uniqueItems\", \"items\", \"contains\", \"maxContains\", \"minContains\"];\nexport const OBJECT_PROPERTIES = [\n \"maxItems\",\n \"minItems\",\n \"uniqueItems\",\n \"items\",\n \"contains\",\n \"maxContains\",\n \"minContains\",\n \"patternProperties\",\n \"dependencies\"\n];\nexport const COMMON_PROPERTIES = [\"const\", \"enum\"];\n","import {cleanObject} from \"@tsed/core\";\n\nimport {MANY_OF_PROPERTIES} from \"../../constants/jsonSchemaProperties.js\";\nimport type {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function nullableMapper(obj: any, schema: JsonSchema | null) {\n if (!schema?.isNullable) {\n return obj;\n }\n\n if (!obj.discriminator) {\n if (obj.$ref) {\n obj = cleanObject({\n ...obj,\n $ref: undefined,\n anyOf: [\n {type: \"null\"},\n {\n $ref: obj.$ref\n }\n ]\n });\n } else {\n MANY_OF_PROPERTIES.some((keyword: string) => {\n if (obj[keyword]) {\n obj[keyword] = obj[keyword].filter((item: any) => item.type !== \"null\");\n\n if (obj[keyword].length === 1) {\n const base = obj[keyword];\n\n obj = cleanObject({\n ...obj,\n ...base[0],\n [keyword]: undefined,\n type: [\"null\", Number.isInteger(obj.multipleOf) ? \"integer\" : base[0].type]\n });\n } else {\n obj[keyword] = [{type: \"null\"}].concat(obj[keyword]).map((item: any) => {\n if (Number.isInteger(item.multipleOf)) {\n item.type = \"integer\";\n }\n return item;\n });\n delete obj.type;\n }\n }\n });\n }\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"nullable\", nullableMapper);\n","import {isBoolean} from \"@tsed/core\";\nimport type {Hooks} from \"@tsed/hooks\";\n\n/**\n * @ignore\n * @param schema\n * @param options\n */\nexport function alterIgnore(schema: {$hooks: Hooks; $ignore: boolean | Function}, options: any) {\n if (isBoolean(schema.$ignore) && schema.$ignore) {\n return true;\n }\n\n let result = schema?.$hooks?.alter(\"ignore\", false, [options]);\n\n if (result) {\n return result;\n }\n\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"groups\", false, [options.groups]);\n }\n\n return result;\n}\n","import {isArray} from \"@tsed/core\";\n\nimport {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {alterIgnore} from \"../../hooks/alterIgnore.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\n/**\n * Serialize Any object to a json schema\n * @param input\n * @param options\n * @ignore\n */\nexport function objectMapper(input: any, options: JsonSchemaOptions) {\n const {specType, operationIdFormatter, root, components, genericTypes, nestedGenerics, useAlias, genericLabels, ...ctx} = options;\n\n return Object.entries(input).reduce<any>(\n (obj, [key, value]: [string, any | JsonSchema]) => {\n if (options.withIgnoredProps !== false && !alterIgnore(value, ctx)) {\n const opts = {\n ...options,\n groups: input?.$forwardGroups || value?.$forwardGroups ? options.groups : undefined\n };\n\n // remove groups to avoid bad schema generation over children models\n obj[key] = execMapper(\"item\", [value], opts);\n obj[key] = execMapper(\"nullable\", [obj[key], value], opts);\n }\n\n return obj;\n },\n isArray(input) ? [] : {}\n );\n}\n\nregisterJsonSchemaMapper(\"object\", objectMapper);\n","import type {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport type {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function ofMapper(input: (any | JsonSchema)[], options: JsonSchemaOptions, parent: JsonSchema) {\n return input.map((value: any | JsonSchema) => {\n return execMapper(\"item\", [value], {\n ...options,\n genericLabels: parent.genericLabels\n });\n });\n}\n\nregisterJsonSchemaMapper(\"anyOf\", ofMapper);\nregisterJsonSchemaMapper(\"allOf\", ofMapper);\nregisterJsonSchemaMapper(\"oneOf\", ofMapper);\n","import type {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport type {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function propertiesMapper(input: any | JsonSchema, options: JsonSchemaOptions, parent: JsonSchema) {\n if (input.isClass) {\n return execMapper(\"class\", [input], options);\n }\n\n return execMapper(\"any\", [input], {\n ...options,\n genericLabels: parent.genericLabels\n });\n}\n\nregisterJsonSchemaMapper(\"properties\", propertiesMapper);\nregisterJsonSchemaMapper(\"items\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"propertyNames\", propertiesMapper);\nregisterJsonSchemaMapper(\"contains\", propertiesMapper);\nregisterJsonSchemaMapper(\"dependencies\", propertiesMapper);\nregisterJsonSchemaMapper(\"patternProperties\", propertiesMapper);\nregisterJsonSchemaMapper(\"additionalItems\", propertiesMapper);\nregisterJsonSchemaMapper(\"not\", propertiesMapper);\nregisterJsonSchemaMapper(\"definitions\", propertiesMapper);\n","import type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\n/**\n * @ignore\n */\nexport function alterRequiredGroups(required: string[], schema: JsonSchema, options: JsonSchemaOptions): string[] {\n if (options.groups !== false) {\n return schema?.$hooks?.alter(\"requiredGroups\", required, [options.groups]);\n }\n\n return required;\n}\n","import {uniq} from \"@tsed/core\";\n\nimport type {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {alterRequiredGroups} from \"../../hooks/alterRequiredGroups.js\";\nimport type {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {createRef, createRefName, toRef} from \"../../utils/ref.js\";\n\nfunction mapRequiredProps(obj: any, schema: JsonSchema, options: JsonSchemaOptions = {}) {\n const {useAlias} = options;\n const props = Object.keys(obj.properties || {});\n\n return (keys: string[], key: string) => {\n const aliasedKey = useAlias ? (schema.alias.get(key) as string) || key : key;\n\n if (props.includes(aliasedKey)) {\n return keys.concat(aliasedKey);\n }\n\n return keys;\n };\n}\n\nfunction extractRequiredProps(obj: any, schema: JsonSchema, options: JsonSchemaOptions): string[] {\n let required: string[] = obj.required || [];\n\n required = [...required, ...schema.$required];\n\n if (schema.get(\"properties\")) {\n required = Object.entries(schema.get(\"properties\")).reduce((required, [key, prop]: [string, any]) => {\n if (prop && prop.$selfRequired !== undefined) {\n return prop.$selfRequired ? required.concat(key) : required.filter((k) => k === key);\n }\n\n return required;\n }, required);\n }\n\n return alterRequiredGroups(uniq(required), schema, options);\n}\n\nexport function requiredMapper(obj: any, schema: JsonSchema, options: JsonSchemaOptions) {\n if (options.groups && options.groups.includes(\"partial\")) {\n if (obj.discriminator) {\n return {\n ...obj,\n required: [obj.discriminator.propertyName]\n };\n }\n\n return obj;\n }\n\n let required = extractRequiredProps(obj, schema, options);\n\n required = uniq(required).reduce(mapRequiredProps(obj, schema, options), []);\n\n if (obj.discriminator) {\n required.push(obj.discriminator.propertyName);\n }\n\n if (required.length) {\n obj.required = required;\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"required\", requiredMapper);\n","/**\n * @ignore\n */\nexport type AliasType = string | number | symbol;\n/**\n * @ignore\n */\nexport type AliasMap = Map<AliasType, AliasType>;\n/**\n * @ignore\n */\nexport function mapAliasedProperties(value: any, alias: AliasMap) {\n return Object.entries(value).reduce<any>((properties, [key, value]) => {\n key = (alias.get(key) as string) || key;\n properties[key] = value;\n\n return properties;\n }, {});\n}\n","import {isArray, isBoolean, isNumber, isObject, isString} from \"@tsed/core\";\nimport type {JSONSchema6} from \"json-schema\";\nimport {filter} from \"rxjs\";\n\nimport {\n ARRAY_PROPERTIES,\n BOOLEAN_PROPERTIES,\n COMMON_PROPERTIES,\n MANY_OF_PROPERTIES,\n NUMBER_PROPERTIES,\n OBJECT_PROPERTIES,\n STRING_PROPERTIES\n} from \"../constants/jsonSchemaProperties.js\";\nimport type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport type {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\n\nfunction findManyOf(obj: any) {\n return MANY_OF_PROPERTIES.find((keyword) => obj[keyword]);\n}\n\nconst RULES: {[index: string]: {properties: string[]; is: (value: any) => boolean}} = {\n string: {properties: STRING_PROPERTIES, is: isString},\n number: {properties: NUMBER_PROPERTIES, is: isNumber},\n boolean: {properties: BOOLEAN_PROPERTIES, is: isBoolean},\n array: {properties: ARRAY_PROPERTIES, is: () => false},\n object: {properties: OBJECT_PROPERTIES, is: () => false}\n};\n\nfunction pickProperties(type: string, obj: JSONSchema6 & Record<string, never>, item: Record<string, never>) {\n const rule = RULES[type];\n\n rule?.properties.concat(COMMON_PROPERTIES).forEach((keyword) => {\n if (obj[keyword] !== undefined) {\n if (COMMON_PROPERTIES.includes(keyword)) {\n item[keyword] = (obj[keyword] as never[]).filter(rule.is) as never;\n } else {\n item[keyword] = obj[keyword] as never;\n delete obj[keyword];\n }\n }\n });\n}\n\nexport function alterOneOf(obj: any, schema: JsonSchema, options: JsonSchemaOptions) {\n const kind = findManyOf(obj);\n\n if (kind) {\n obj[kind].forEach((item: {type: string} & Record<string, never>) => {\n pickProperties(item.type as string, obj, item);\n });\n\n MANY_OF_PROPERTIES.forEach((keyword) => {\n if (obj[keyword] && options.groups !== false && schema.$hooks.has(keyword)) {\n obj = {...obj, [keyword]: schema.$hooks.alter(keyword, obj[keyword], [options.groups])};\n }\n });\n\n delete obj.const;\n delete obj.enum;\n\n if (!(obj.items || obj.properties)) {\n delete obj.type;\n }\n }\n\n return obj;\n}\n","import {getValue, isFunction, isObject} from \"@tsed/core\";\n\nimport {mapAliasedProperties} from \"../../domain/JsonAliasMap.js\";\nimport {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {alterOneOf} from \"../../hooks/alterOneOf.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, hasMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\n/**\n * @ignore\n */\nconst IGNORES = [\"name\", \"$required\", \"$hooks\", \"_nestedGenerics\", SpecTypes.OPENAPI, SpecTypes.SWAGGER, SpecTypes.JSON];\n/**\n * @ignore\n */\nconst IGNORES_OPENSPEC: string[] = [];\n\n/**\n * @ignore\n */\nfunction isEmptyProperties(key: string, value: any) {\n return typeof value === \"object\" && [\"items\", \"properties\", \"additionalProperties\"].includes(key) && Object.keys(value).length === 0;\n}\n\n/**\n * @ignore\n */\nfunction shouldMapAlias(key: string, value: any, useAlias: boolean) {\n return typeof value === \"object\" && useAlias && [\"properties\", \"additionalProperties\"].includes(key);\n}\n\n/**\n * @ignore\n */\nfunction shouldSkipKey(key: string, {specType = SpecTypes.JSON, customKeys = false}: JsonSchemaOptions) {\n return (\n IGNORES.includes(key) ||\n (key.startsWith(\"#\") && (customKeys === false || specType !== SpecTypes.JSON)) ||\n (specType !== SpecTypes.JSON && IGNORES_OPENSPEC.includes(key))\n );\n}\n\nfunction isExample(key: string, value: any, options: JsonSchemaOptions) {\n return key === \"examples\" && isObject(value) && [SpecTypes.OPENAPI, SpecTypes.ASYNCAPI].includes(options.specType!)!;\n}\n\nfunction mapOptions(options: JsonSchemaOptions) {\n let addDef = false;\n\n if (!options) {\n addDef = true;\n options = {components: {schemas: {}}, inlineEnums: true};\n }\n\n const {useAlias = true, components = {schemas: {}}} = options;\n options = {\n ...options,\n useAlias,\n components\n };\n\n return {\n addDef,\n options\n };\n}\n\nfunction mapKeys(schema: JsonSchema, options: JsonSchemaOptions) {\n const {useAlias} = options;\n\n return [...schema.keys()]\n .filter((key) => !shouldSkipKey(key, options))\n .reduce((item: any, key) => {\n let value = schema.get(key);\n\n key = key.replace(/^#/, \"\");\n\n if (key === \"type\") {\n item[key] = schema.getJsonType();\n return item;\n }\n\n if (isExample(key, value, options)) {\n key = \"example\";\n value = Object.values(value)[0];\n }\n\n if (value && typeof value === \"object\" && hasMapper(key)) {\n value = execMapper(key, [value], options, schema);\n\n if (isEmptyProperties(key, value)) {\n return item;\n }\n\n if (shouldMapAlias(key, value, useAlias!)) {\n value = mapAliasedProperties(value, schema.alias);\n }\n }\n\n item[key] = value;\n\n return item;\n }, {});\n}\n\nfunction serializeSchema(schema: JsonSchema, options: JsonSchemaOptions) {\n let obj: any = mapKeys(schema, options);\n\n if (schema.isClass) {\n obj = execMapper(\"inheritedClass\", [obj], {\n ...options,\n root: false,\n target: schema.getComputedType()\n });\n }\n\n obj = execMapper(\"generics\", [obj], {\n ...options,\n root: false\n } as any);\n\n if (schema.has(options.specType as string)) {\n obj = {\n ...obj,\n ...schema.get(options.specType as string).toJSON(options)\n };\n }\n\n if (isFunction(obj.default)) {\n obj.default = obj.default();\n }\n\n obj = execMapper(\"required\", [obj, schema], options);\n obj = execMapper(\"nullable\", [obj, schema], options);\n obj = alterOneOf(obj, schema, options);\n obj = execMapper(\"enums\", [obj, schema], options);\n obj = execMapper(\"discriminatorMapping\", [obj, schema], options);\n\n return obj;\n}\n\nexport function schemaMapper(schema: JsonSchema, opts: JsonSchemaOptions): any {\n const {options, addDef} = mapOptions(opts);\n\n const obj = serializeSchema(schema, options);\n\n if (addDef && Object.keys(getValue(options, \"components.schemas\", {})).length) {\n obj.definitions = options.components!.schemas;\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"schema\", schemaMapper);\n","import {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {enumsMapper} from \"../default/enumsMapper.js\";\n\nexport function wrapEnumsMapper(obj: any, schema: JsonSchema, options: JsonSchemaOptions) {\n obj = enumsMapper(obj, schema, options);\n\n if (obj.const) {\n obj.enum = [obj.const];\n delete obj.const;\n }\n\n return obj;\n}\n\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.SWAGGER);\nregisterJsonSchemaMapper(\"enums\", wrapEnumsMapper, SpecTypes.ASYNCAPI);\n","import {getValue, Type, uniqBy} from \"@tsed/core\";\n\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {SpecSerializerOptions} from \"../../utils/getSpec.js\";\n\nfunction generate(model: Type<any>, options: SpecSerializerOptions) {\n options = {\n ...options,\n specType: SpecTypes.OPENAPI\n };\n\n const specJson: any = {\n paths: execMapper(\"paths\", [model], options)\n };\n\n specJson.tags = uniqBy(options.tags, \"name\");\n\n if (Object.keys(getValue(options, \"components.schemas\", {})).length) {\n specJson.components = {\n schemas: options.components!.schemas\n };\n }\n\n return specJson;\n}\n\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"generate\", generate, SpecTypes.SWAGGER);\n","import {cleanObject} from \"@tsed/core\";\n\nimport type {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function nullableMapperOpenApi(obj: any, schema: JsonSchema | null) {\n if (!schema?.isNullable) {\n return obj;\n }\n\n if (obj.$ref) {\n return cleanObject({\n ...obj,\n ...(obj.$ref && {\n anyOf: [\n {\n $ref: obj.$ref\n }\n ],\n type: undefined\n }),\n nullable: true,\n $ref: undefined\n });\n }\n\n return cleanObject({\n ...obj,\n ...(obj.anyOf?.length === 1\n ? {\n ...obj.anyOf[0],\n anyOf: undefined,\n type: Number.isInteger(obj.multipleOf) ? \"integer\" : obj.anyOf[0]?.type\n }\n : {\n type: obj.anyOf?.length > 1 ? undefined : obj.type,\n anyOf: obj.anyOf?.map((item: any) => {\n if (Number.isInteger(item.multipleOf)) {\n item.type = \"integer\";\n }\n\n return item;\n })\n }),\n nullable: true\n });\n}\n\nregisterJsonSchemaMapper(\"nullable\", nullableMapperOpenApi, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"nullable\", nullableMapperOpenApi, SpecTypes.SWAGGER);\n","import {cleanObject} from \"@tsed/core\";\n\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport type {JsonParameterOptions} from \"./operationInParameterMapper.js\";\n\nexport function operationInFilesMapper(parameter: any, {jsonSchema}: JsonParameterOptions) {\n const schema = {\n type: \"string\",\n format: \"binary\",\n oneOf: undefined\n };\n\n if (jsonSchema.type === \"array\") {\n jsonSchema.items = cleanObject({\n ...(jsonSchema.items as Object),\n ...schema\n });\n\n parameter.schema = jsonSchema;\n\n return parameter;\n }\n\n parameter.schema = cleanObject({\n ...jsonSchema,\n ...schema\n });\n\n return parameter;\n}\n\nregisterJsonSchemaMapper(\"operationInFiles\", operationInFilesMapper);\n","import {OS3Schema} from \"@tsed/openspec\";\nimport {camelCase} from \"change-case\";\nimport type {JSONSchema6} from \"json-schema\";\n\nimport {JsonParameter} from \"../../domain/JsonParameter.js\";\nimport {JsonParameterTypes} from \"../../domain/JsonParameterTypes.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, hasMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {popGenerics} from \"../../utils/generics.js\";\n\nexport type JsonParameterOptions = JsonSchemaOptions & {\n jsonParameter: JsonParameter;\n jsonSchema: JSONSchema6;\n oldSchemas: Record<string, OS3Schema>;\n};\n\nfunction mapOptions(parameter: JsonParameter, options: JsonSchemaOptions = {}) {\n return {\n ...options,\n groups: parameter.groups,\n groupsName: parameter.groupsName\n };\n}\n\nexport function operationInParameterMapper(jsonParameter: JsonParameter, opts?: JsonSchemaOptions) {\n const options = mapOptions(jsonParameter, opts);\n const schemas = {...(options.components?.schemas || {})};\n\n const {type, schema, ...parameter} = execMapper(\"map\", [jsonParameter], options);\n\n const jsonSchema = execMapper(\"item\", [jsonParameter.$schema], {\n ...options,\n ...popGenerics(jsonParameter)\n });\n\n parameter.required = parameter.required || jsonParameter.get(\"in\") === JsonParameterTypes.PATH;\n\n const paramOpts = {\n ...options,\n jsonSchema,\n jsonParameter,\n oldSchemas: schemas\n };\n\n const mapperName = camelCase(`operationIn ${jsonParameter.get(\"in\")}`);\n\n if (hasMapper(mapperName)) {\n return execMapper(mapperName, [parameter], paramOpts);\n }\n\n parameter.schema = jsonSchema;\n\n return parameter;\n}\n\nregisterJsonSchemaMapper(\"operationInParameter\", operationInParameterMapper);\n","import {JsonParameter} from \"../../domain/JsonParameter.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function operationInParametersMapper(parameters: JsonParameter[], options: JsonSchemaOptions) {\n return parameters.flatMap((parameter) => execMapper(\"operationInParameter\", [parameter], options)).filter(Boolean);\n}\n\nregisterJsonSchemaMapper(\"operationInParameters\", operationInParametersMapper);\n","import {cleanObject} from \"@tsed/core\";\nimport {OS3Example} from \"@tsed/openspec\";\n\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {createRefName} from \"../../utils/ref.js\";\nimport type {JsonParameterOptions} from \"./operationInParameterMapper.js\";\n\nfunction buildExamples(property: string, examples?: Record<string, OS3Example>) {\n if (!examples) {\n return undefined;\n }\n\n let hasKey = false;\n\n const newExamples = Object.entries(examples).reduce((acc, [key, {value, description, ...props}]) => {\n if (value[property] === undefined) {\n return acc;\n }\n\n hasKey = true;\n\n return {\n ...acc,\n [key]: {\n ...props,\n value: value[property],\n description\n }\n };\n }, {});\n\n return hasKey ? newExamples : undefined;\n}\n\nfunction inlineReference(parameter: any, {jsonParameter, ...options}: JsonSchemaOptions) {\n const name = createRefName(jsonParameter.$schema.getName(), options);\n const schema = options.components?.schemas?.[name];\n\n if (schema && !options.oldSchemas?.[name]) {\n delete options.components!.schemas![jsonParameter.$schema.getName()];\n }\n\n return Object.entries(schema?.properties || {}).reduce((params, [key, {description, ...prop}]: [string, any]) => {\n return [\n ...params,\n cleanObject({\n ...parameter,\n name: key,\n required: (schema?.required || []).includes(key),\n description,\n schema: prop,\n style: prop.$ref ? \"deepObject\" : undefined,\n examples: buildExamples(key, parameter.examples)\n })\n ];\n }, []);\n}\n\nexport function operationInQueryMapper(parameter: any, {jsonSchema, jsonParameters, ...options}: JsonParameterOptions) {\n if (jsonSchema.$ref) {\n if (!parameter.name) {\n return inlineReference(parameter, options);\n }\n\n parameter.style = \"deepObject\";\n }\n\n parameter.schema = jsonSchema;\n\n return parameter;\n}\n\nregisterJsonSchemaMapper(\"operationInQuery\", operationInQueryMapper);\n","import {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {discriminatorMappingMapper} from \"../default/discriminatorMappingMapper.js\";\n\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.OPENAPI);\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.SWAGGER);\nregisterJsonSchemaMapper(\"discriminatorMapping\", discriminatorMappingMapper, SpecTypes.ASYNCAPI);\n","import {constantCase} from \"change-case\";\nimport statuses from \"statuses\";\n\nexport const HTTP_STATUS_MESSAGES = statuses.codes.reduce((map: Record<string, {label: string; code: string}>, code: number) => {\n const message: string = String(statuses(code));\n return {\n ...map,\n [String(code)]: {label: message, code: constantCase(message)}\n };\n}, {});\n\nHTTP_STATUS_MESSAGES[\"200\"].label = \"Success\";\nHTTP_STATUS_MESSAGES[\"200\"].code = \"SUCCESS\";\n\nexport function getStatusConstant(status: number | string) {\n return (HTTP_STATUS_MESSAGES as any)[status]?.code;\n}\n\nexport function getStatusMessage(status: number | string) {\n return (HTTP_STATUS_MESSAGES as any)[status]?.label;\n}\n","import {getStatusMessage} from \"../../constants/httpStatusMessages.js\";\nimport {JsonOperation} from \"../../domain/JsonOperation.js\";\nimport {JsonParameter} from \"../../domain/JsonParameter.js\";\nimport {isParameterType, JsonParameterTypes} from \"../../domain/JsonParameterTypes.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nfunction extractParameters(jsonOperation: JsonOperation, options: JsonSchemaOptions) {\n return jsonOperation\n .get(\"parameters\")\n .filter((parameter: JsonParameter) => isParameterType(parameter.get(\"in\")))\n .reduce(\n (inputs: [any[], JsonParameter[]], parameter: JsonParameter) => {\n const [parameters, bodyParameters] = inputs;\n\n if ([JsonParameterTypes.BODY, JsonParameterTypes.FILES].includes(parameter.get(\"in\"))) {\n return [parameters, [...bodyParameters, parameter]];\n }\n\n return [[...parameters, parameter], bodyParameters];\n },\n [[], []]\n );\n}\n\nexport function operationMapper(jsonOperation: JsonOperation, {tags = [], defaultTags = [], ...options}: JsonSchemaOptions = {}) {\n const {consumes, produces, ...operation} = execMapper(\"map\", [jsonOperation], {...options, ignore: [\"parameters\"]});\n\n if (operation.security) {\n operation.security = [].concat(operation.security);\n }\n\n if (jsonOperation.get(\"responses\").size === 0) {\n operation.responses = {\n \"200\": {\n description: getStatusMessage(200)\n }\n };\n }\n\n const parametersOptions = {\n ...options,\n consumes: jsonOperation.get(\"consumes\")?.length ? jsonOperation.get(\"consumes\") : [\"application/json\"]\n };\n\n const [parameters, bodyParameters] = extractParameters(jsonOperation, parametersOptions);\n\n operation.parameters = execMapper(\"operationInParameters\", [parameters], options);\n\n if (bodyParameters.length) {\n operation.requestBody = execMapper(\"operationRequestBody\", [bodyParameters], parametersOptions);\n }\n\n const operationTags = operation.tags?.length ? operation.tags : defaultTags;\n\n if (operationTags.length) {\n operation.tags = operationTags.map(({name}: any) => name);\n }\n\n tags.push(...operationTags);\n\n return operation;\n}\n\nregisterJsonSchemaMapper(\"operation\", operationMapper);\n","import {JsonMedia} from \"../../domain/JsonMedia.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function operationMediaMapper(jsonMedia: JsonMedia, options: JsonSchemaOptions) {\n let groups = [...(jsonMedia.groups || [])];\n\n return execMapper(\"map\", [jsonMedia], {...options, groups, groupsName: jsonMedia.groupsName});\n}\n\nregisterJsonSchemaMapper(\"operationMedia\", operationMediaMapper);\n","import {OpenSpecHash, OS3MediaType, OS3RequestBody} from \"@tsed/openspec\";\n\nimport {toJsonMapCollection} from \"../utils/toJsonMapCollection.js\";\nimport {JsonMap} from \"./JsonMap.js\";\nimport {JsonSchema} from \"./JsonSchema.js\";\n\nexport type JsonRequestBodyOptions = OS3RequestBody<JsonSchema>;\n\nexport class JsonRequestBody extends JsonMap<JsonRequestBodyOptions> {\n $kind = \"operationRequestBody\";\n\n constructor(obj: Partial<JsonRequestBodyOptions> = {}) {\n super(obj);\n\n this.content(obj.content || ({} as any));\n }\n\n description(description: string): this {\n this.set(\"description\", description);\n\n return this;\n }\n\n content(content: OpenSpecHash<OS3MediaType<JsonSchema>>) {\n this.set(\"content\", toJsonMapCollection(content));\n\n return this;\n }\n\n addContent(mediaType: string, schema: JsonSchema, examples?: any) {\n const content = this.get(\"content\");\n const mediaContent = new JsonMap();\n\n mediaContent.set(\"schema\", schema);\n examples && mediaContent.set(\"examples\", examples);\n\n content.set(mediaType, mediaContent);\n\n return this;\n }\n\n required(required: boolean): this {\n this.set(\"required\", required);\n\n return this;\n }\n}\n","import {JsonParameter} from \"../../domain/JsonParameter.js\";\nimport {JsonRequestBody} from \"../../domain/JsonRequestBody.js\";\nimport {JsonSchema} from \"../../domain/JsonSchema.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nfunction buildSchemaFromBodyParameters(parameters: JsonParameter[], options: JsonSchemaOptions) {\n let schema = new JsonSchema();\n const props: any = {};\n const refs: JsonSchema[] = [];\n let propsLength = 0;\n\n const hasFile = parameters.some((param) => param.get(\"in\") === \"files\");\n\n parameters.forEach((parameter) => {\n const name = parameter.getName();\n\n [...parameter.entries()]\n .filter(([key]) => ![\"in\", \"name\"].includes(key))\n .forEach(([key, value]) => {\n if (props[key] === undefined) {\n props[key] = value;\n }\n });\n\n const jsonParameter = execMapper(\"operationInParameter\", [parameter], options);\n\n if (name) {\n const propSchema = {\n ...(jsonParameter.schema || {\n type: jsonParameter.type\n })\n };\n\n if (hasFile && jsonParameter.description) {\n propSchema.description = jsonParameter.description;\n }\n\n schema.addProperty(name, propSchema);\n\n if (parameter.get(\"required\")) {\n schema.addRequired(name);\n }\n\n propsLength++;\n } else {\n refs.push(jsonParameter);\n }\n });\n\n if (!propsLength) {\n if (refs.length === 1) {\n return refs[0];\n }\n }\n\n schema.type(\"object\");\n\n if (props.description && hasFile) {\n delete props.description;\n }\n\n return {\n schema: schema.toJSON(options),\n required: false,\n ...props\n };\n}\n\nexport function operationRequestBodyMapper(bodyParameters: JsonParameter[], {consumes, ...options}: JsonSchemaOptions) {\n const {schema, examples, in: _, ...props} = buildSchemaFromBodyParameters(bodyParameters, options);\n\n const requestBody = new JsonRequestBody(props);\n\n consumes.forEach((consume: string) => {\n requestBody.addContent(consume, schema, examples);\n });\n\n return execMapper(\"map\", [requestBody], options);\n}\n\nregisterJsonSchemaMapper(\"operationRequestBody\", operationRequestBodyMapper);\n","import {JsonResponse} from \"../../domain/JsonResponse.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\n\nexport function operationResponseMapper(jsonResponse: JsonResponse, options: JsonSchemaOptions = {}) {\n const response = execMapper(\"map\", [jsonResponse], options);\n\n if (jsonResponse.status === 204) {\n delete response.content;\n }\n\n if (response.headers) {\n Object.entries(response.headers).forEach(([key, {type, ...props}]: [string, any]) => {\n response.headers[key] = {\n ...props,\n schema: {\n type\n }\n };\n });\n }\n\n return response;\n}\n\nregisterJsonSchemaMapper(\"operationResponse\", operationResponseMapper);\n","/**\n * @ignore\n */\nexport function concatParameters(parameters: any[], operation: any) {\n return parameters\n .map((param) => {\n const f = operation.parameters.find((p: any) => p.in === param.in && p.name === param.name);\n\n return f || param;\n })\n .concat(...operation.parameters.filter((param: any) => param.in !== \"path\"));\n}\n","/**\n * @ignore\n */\nfunction getVariable(subpath: string) {\n const [prefix, right] = subpath.split(\"=\");\n const splited = (right || prefix).split(\".\");\n const name = splited.splice(0, 1)[0];\n\n return {\n prefix: right && prefix ? `${prefix}=` : \"\",\n name,\n postfix: splited.length ? `.${splited.join(\".\")}` : \"\"\n };\n}\n\nfunction parseUrl(key: string) {\n let inCapture = 0;\n\n return key\n .split(\"\")\n .filter((c) => {\n if (c === \"(\") {\n inCapture++;\n }\n\n const result = inCapture === 0;\n\n if (c === \")\") {\n inCapture--;\n }\n\n return result;\n })\n .join(\"\")\n .split(\"/\")\n .filter((o) => !!o);\n}\n\n/**\n * @ignore\n */\nexport function getJsonPathParameters(base: string, path: string | RegExp | (string | RegExp)[] = \"\"): {path: string; parameters: any[]}[] {\n if (path instanceof RegExp) {\n path = path.toString().replace(/^\\//g, \"\").replace(/\\/$/g, \"\").replace(/\\\\/g, \"\");\n }\n\n const params: any[] = [];\n const paths: any[] = [];\n let isOptional = false;\n let current = \"\";\n\n parseUrl(`${base}${path}`).map((key) => {\n const subpath = key.replace(\":\", \"\").replace(\"?\", \"\");\n\n if (key.includes(\":\")) {\n const optional = key.includes(\"?\");\n\n // Append previous config\n if (optional && !isOptional) {\n isOptional = true;\n\n paths.push({\n path: current,\n parameters: [].concat(params as any)\n });\n }\n\n const {prefix, name, postfix} = getVariable(subpath);\n current += `/${prefix}{${name}}${postfix}`;\n\n params.push({\n in: \"path\",\n name,\n type: \"string\",\n required: true\n });\n\n if (optional && isOptional) {\n paths.push({\n path: current,\n parameters: [].concat(params as any)\n });\n }\n } else {\n current += `/${key}`;\n }\n });\n\n return paths.length\n ? paths\n : [\n {\n path: current,\n parameters: [].concat(params as any)\n }\n ];\n}\n","import {camelCase} from \"change-case\";\n\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\n\nconst DEFAULT_PATTERN = \"%c.%m\";\n\n/**\n * @ignore\n */\nexport function operationIdFormatter(pattern: string = \"\") {\n const OPERATION_IDS = new Map<string, number>();\n\n const transform = (name: string, propertyKey: string) => {\n const str = (pattern || DEFAULT_PATTERN).replace(/%c/, name).replace(/%m/, propertyKey);\n return pattern === \"\" ? camelCase(str) : str;\n };\n\n return (name: string, propertyKey: string, path: string = \"\") => {\n const operationId = transform(name, propertyKey);\n const operationKey = name + propertyKey;\n\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n\n return operationId;\n }\n\n // try with paths\n const result = path.match(/{(\\w+)}/gi);\n if (result) {\n const operationKey = name + propertyKey + result[0];\n\n if (!OPERATION_IDS.has(operationKey)) {\n OPERATION_IDS.set(operationKey, 0);\n\n return camelCase(`${operationId} By ${result}`);\n }\n }\n\n const id = OPERATION_IDS.get(operationKey)! + 1;\n OPERATION_IDS.set(operationKey, id);\n\n return `${operationId}_${id}`;\n };\n}\n\nexport function getOperationId(path: string, {store, operationIdFormatter}: JsonSchemaOptions) {\n return operationIdFormatter!(store.parent.schema.get(\"name\") || store.parent.targetName, store.propertyName, path);\n}\n","import {OS3Operation, OS3Paths} from \"@tsed/openspec\";\n\nimport {OperationVerbs} from \"../../constants/OperationVerbs.js\";\nimport {JsonMethodStore} from \"../../domain/JsonMethodStore.js\";\nimport {JsonMethodPath} from \"../../domain/JsonOperation.js\";\nimport {JsonSchemaOptions} from \"../../interfaces/JsonSchemaOptions.js\";\nimport {execMapper, registerJsonSchemaMapper} from \"../../registries/JsonSchemaMapperContainer.js\";\nimport {buildPath} from \"../../utils/buildPath.js\";\nimport {concatParameters} from \"../../utils/concatParameters.js\";\nimport {getJsonEntityStore} from \"../../utils/getJsonEntityStore.js\";\nimport {getJsonPathParameters} from \"../../utils/getJsonPathParameters.js\";\nimport {getOperationsStores} from \"../../utils/getOperationsStores.js\";\nimport {getOperationId} from \"../../utils/operationIdFormatter.js\";\nimport {removeHiddenOperation} from \"../../utils/removeHiddenOperation.js\";\n\nconst ALLOWED_VERBS = [\n OperationVerbs.ALL,\n OperationVerbs.GET,\n OperationVerbs.POST,\n OperationVerbs.PUT,\n OperationVerbs.PATCH,\n OperationVerbs.HEAD,\n OperationVerbs.OPTIONS,\n OperationVerbs.DELETE,\n OperationVerbs.TRACE\n];\n\nfunction pushToPath(\n paths: OS3Paths,\n {\n path,\n method,\n operation\n }: {\n method: string;\n path: string;\n operation: OS3Operation;\n }\n) {\n return {\n ...paths,\n [path]: {\n ...(paths as any)[path],\n [method.toLowerCase()]: operation\n }\n };\n}\n\nfunction mapOperationInPathParameters(options: JsonSchemaOptions) {\n return ({\n operationPath,\n operation,\n operationStore\n }: {\n operationPath: JsonMethodPath;\n operation: OS3Operation;\n operationStore: JsonMethodStore;\n }) => {\n const {path, method} = operationPath;\n\n return getJsonPathParameters(options.ctrlRootPath, path).map(({path, parameters}) => {\n path = path ? path : \"/\";\n\n parameters = concatParameters(\n parameters.map(({type, ...param}) => {\n return {\n ...param,\n schema: {\n type\n }\n };\n }),\n operation\n );\n\n return {\n operation: {\n ...operation,\n ...operationPath.toJSON(options),\n parameters,\n operationId:\n operation.operationId ||\n getOperationId(path, {\n ...options,\n store: operationStore\n })\n },\n method,\n path\n };\n });\n };\n}\n\nfunction mapOperation(options: JsonSchemaOptions) {\n return (operationStore: JsonMethodStore) => {\n const operationPaths = operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS);\n\n if (operationPaths.length === 0) {\n return [];\n }\n\n const operation = execMapper(\"operation\", [operationStore.operation], options);\n\n return operationPaths.map((operationPath) => {\n return {\n operationPath,\n operation,\n operationStore\n };\n });\n };\n}\n\nexport function pathsMapper(model: any, {paths, rootPath, ...options}: JsonSchemaOptions) {\n const store = getJsonEntityStore(model);\n const ctrlPath = store.path;\n const ctrlRootPath = buildPath(rootPath + ctrlPath);\n\n options = {\n ...options,\n ctrlRootPath\n };\n\n return [...getOperationsStores(model).values()]\n .filter(removeHiddenOperation)\n .filter((operationStore) => operationStore.operation.getAllowedOperationPath(ALLOWED_VERBS).length > 0)\n .flatMap(mapOperation(options))\n .flatMap(mapOperationInPathParameters(options))\n .reduce(pushToPath, paths);\n}\n\nregisterJsonSchemaMapper(\"paths\", pathsMapper);\n","import {DecoratorParameters} from \"@tsed/core\";\n\nimport type {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {getJsonEntityStore} from \"../../utils/getJsonEntityStore.js\";\n\n/**\n * Decorator util to compose another decorator. See @@Description@@ decorator implementation for more details.\n *\n * ## Usage\n *\n * ```typescript\n * export function Description(description: any) {\n * return JsonEntityFn((entity: JsonEntityStore, args: DecoratorParameters) => {\n * entity.itemSchema.description(description)\n * });\n * }\n * ```\n *\n * @param fn\n * @decorator\n * @utils\n * @model\n */\nexport function JsonEntityFn<T extends JsonEntityStore = JsonEntityStore>(\n fn: (entity: T, parameters: DecoratorParameters) => any\n): (...args: any[]) => any {\n return (...parameters: DecoratorParameters) => {\n const result: any = fn(getJsonEntityStore<T>(...parameters) as T, parameters);\n if (typeof result === \"function\") {\n result(...parameters);\n }\n };\n}\n","import {Store, Type} from \"@tsed/core\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Add Children class to compose routes\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param children\n */\nexport function Children(...children: Type<any>[]): ClassDecorator {\n return JsonEntityFn((store) => {\n store.store.set(\"childrenControllers\", children);\n\n children.forEach((childToken) => {\n Store.from(childToken).set(\"parentController\", store.token);\n });\n });\n}\n","import {snakeCase} from \"change-case\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Declare a Discriminator value on a child class.\n *\n * ```ts\n * export class Event {\n * @DiscriminatorKey() // declare this property a discriminator key\n * type: string;\n *\n * @Property()\n * value: string;\n * }\n *\n * @DiscriminatorValue(\"page_view\")\n * export class PageView extends Event {\n * @Required()\n * url: string;\n * }\n *\n * @DiscriminatorValue(\"action\")\n * export class Action extends Event {\n * @Required()\n * event: string;\n * }\n *\n * @DiscriminatorValue()\n * export class CustomAction extends Event {\n * @Required()\n * event: string;\n *\n * @Property()\n * meta: string;\n * }\n * ```\n *\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @param value\n * @param values\n */\nexport function DiscriminatorValue(value?: string, ...values: string[]): ClassDecorator {\n return JsonEntityFn((store) => {\n value = value || snakeCase(store.targetName);\n if (store.discriminatorAncestor) {\n store.schema.discriminatorValue(value, ...values);\n }\n });\n}\n","import {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\n\nexport interface ArrayOfChainedDecorators {\n (...args: any): any;\n\n /**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n */\n MinItems(minItems: number): this;\n\n /**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n */\n MaxItems(maxItems: number): this;\n\n /**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n */\n Contains(): this;\n\n /**\n * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.\n */\n UniqueItems(uniqueItems?: boolean): this;\n}\n\nexport interface MapOfChainedDecorators {\n (...args: any): any;\n\n /**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n */\n MinProperties(minProperties: number): this;\n\n /**\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 *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n */\n MaxProperties(maxProperties: number): this;\n}\n\nexport interface CollectionOfChainedDecorators extends MapOfChainedDecorators, ArrayOfChainedDecorators {}\n\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n * ::: warning\n * You mustn't use the `type Type = string | number` as parameters Type.\n *\n * This example doesn't work:\n *\n * ```typescript\n * type Type = \"string\" | \"number\"\n * class Model {\n * @CollectionOf(Type)\n * property: Type[];\n * }\n * ```\n * :::\n *\n * @param {Type<any>} type\n * @param collectionType\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionOf(type: any, collectionType?: any): CollectionOfChainedDecorators {\n if (!type) {\n throw new Error(\n \"A type is required on `@CollectionOf(type)` decorator. Please give a type or wrap it inside an arrow function if you have a circular reference.\"\n );\n }\n\n const schema: any = {};\n let contains: boolean = false;\n\n const decorator = (...args: any) => {\n const store = JsonEntityStore.from(...args);\n\n if (collectionType) {\n store.collectionType = collectionType;\n store.schema.type(collectionType);\n }\n\n store.type = type;\n store.itemSchema.type(type);\n\n store.schema.assign(schema);\n\n if (store.isArray && contains) {\n store.schema.set(\"contains\", store.schema.get(\"items\"));\n store.schema.delete(\"items\");\n }\n };\n\n decorator.MinItems = (minItems: number) => {\n schema.minItems = minItems;\n\n return decorator;\n };\n\n decorator.MaxItems = (maxItems: number) => {\n schema.maxItems = maxItems;\n\n return decorator;\n };\n decorator.MinProperties = (minProperties: number) => {\n schema.minProperties = minProperties;\n\n return decorator;\n };\n\n decorator.MaxProperties = (maxProperties: number) => {\n schema.maxProperties = maxProperties;\n\n return decorator;\n };\n\n decorator.Contains = () => {\n contains = true;\n\n return decorator;\n };\n\n decorator.UniqueItems = (uniqueItems = true) => {\n schema.uniqueItems = uniqueItems;\n\n return decorator;\n };\n\n return decorator;\n}\n\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function ArrayOf(type: any): ArrayOfChainedDecorators {\n return CollectionOf(type, Array);\n}\n\n/**\n * Alias of @@GenericOf@@ decorator.\n * @param type\n * @decorator\n */\nexport function MapOf(type: any): MapOfChainedDecorators {\n return CollectionOf(type, Map);\n}\n","import {CollectionOf} from \"./collectionOf.js\";\n\n/**\n * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...\n *\n * The array instance will be valid against \"contains\" if at least one of its elements is valid against the given schema.\n *\n * ```typescript\n * class Model {\n * @CollectionContains(String).MinLength(0).MaxLength(0)\n * property: string[];\n * }\n * ```\n *\n * @param {Type<any>} type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n */\nexport function CollectionContains(type: any) {\n return CollectionOf(type).Contains();\n}\n","import {deepMerge, useDecorators} from \"@tsed/core\";\n\nimport {JsonEntityFn} from \"../decorators/common/jsonEntityFn.js\";\n\nexport interface ErrorChainedMethods<T> {\n <T>(target: Object, propertyKey?: string | symbol | undefined, descriptor?: TypedPropertyDescriptor<T> | number): any;\n\n Error(msg: string): this;\n}\n\nexport type ErrorChainedDecorator<Decorator extends (...args: any[]) => any> = (\n ...args: Parameters<Decorator>\n) => ErrorChainedMethods<Decorator>;\n\nexport function withErrorMsg<Decorator extends (...args: any[]) => any>(\n errorKey: string,\n originalDecorator: Decorator\n): ErrorChainedDecorator<Decorator> {\n const schema: any = {};\n\n return ((...decoratorOptions: any[]) => {\n const decorator = useDecorators(originalDecorator(...decoratorOptions));\n (decorator as any).Error = (message: string) => {\n schema.message = message;\n\n return useDecorators(\n decorator,\n schema.message &&\n JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n\n if (errorKey === \"required\") {\n store.parentSchema.customKey(\n \"errorMessage\",\n deepMerge(errorMessage, {\n [errorKey]: {\n [store.propertyName]: message\n }\n })\n );\n } else {\n store.itemSchema.customKey(\n \"errorMessage\",\n deepMerge(errorMessage, {\n [errorKey]: message\n })\n );\n }\n })\n );\n };\n\n return decorator;\n }) as any;\n}\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * The value `maxItems` MUST be a non-negative integer.\n *\n * An array instance is valid against `maxItems` if its size is less than, or equal to, the value of this keyword.\n *\n * :: warning\n * The value `maxItems` MUST be a non-negative integer.\n * :::\n *\n * :: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MaxItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maxItems\": 10\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MaxItems = withErrorMsg(\"maxItems\", (maxItems: number) => {\n if (maxItems < 0) {\n throw new Error(\"The value of maxItems MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((storedJson) => {\n storedJson.schema.maxItems(maxItems);\n });\n});\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\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 *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@MaxProperties@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MaxProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"maxProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MaxProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"maxProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MaxProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} maxProperties The maximum properties allowed on the given object\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MaxProperties = withErrorMsg(\"maxProperties\", (maxProperties: number) => {\n if (maxProperties < 0) {\n throw new Error(\"The value of maxProperties MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.maxProperties(maxProperties) : store.itemSchema.maxProperties(maxProperties);\n });\n});\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value `minItems` MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @MinItems(10)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"minItems\": 10,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MinItems = withErrorMsg(\"minItems\", (minItems: number) => {\n if (minItems < 0) {\n throw new Error(\"The value of minItems MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((storedJson) => {\n storedJson.schema.minItems(minItems);\n });\n});\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.\n *\n * ::: warning\n * The value of this keyword MUST be a non-negative integer.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinProperties@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### On prop\n * ```typescript\n * class Model {\n * @MinProperties(10)\n * property: any;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"any\",\n * \"minProperties\": 10\n * }\n * }\n * }\n * ```\n *\n * ### On class\n *\n * ```typescript\n * @MinProperties(10)\n * class Model {\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"minProperties\": 10\n * }\n * ```\n *\n * ### On Parameter\n *\n * ```typescript\n *\n * class Model {\n * method(@Any() @MinProperties(10) obj: any){}\n * }\n * ```\n *\n * @param {number} minProperties The minimum properties allowed on the object.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const MinProperties = withErrorMsg(\"minProperties\", (minProperties: number) => {\n if (minProperties < 0) {\n throw new Error(\"The value of minProperties MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.isCollection ? store.schema.minProperties(minProperties) : store.itemSchema.minProperties(minProperties);\n });\n});\n","import {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique.\n *\n * ::: warning\n * For v6 user, use @@UniqueItems@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @UniqueItems() // default true\n * property: number[];\n * }\n * ```\n *\n * * ```typescript\n * class Model {\n * @CollectionOf(String)\n * @UniqueItems()\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"uniqueItems\": true,\n * \"items\": {\n * \"type\": \"string\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {boolean} uniqueItems\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @collections\n * @ajv-errors\n */\nexport const UniqueItems = withErrorMsg(\"uniqueItems\", (uniqueItems: boolean = true) => {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.uniqueItems(uniqueItems);\n });\n});\n","import {AnyJsonSchema} from \"../../domain/JsonSchema.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Accept unknown properties on the deserialized model.\n *\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function AdditionalProperties(schema: boolean | AnyJsonSchema) {\n return JsonEntityFn((entity, parameters) => {\n entity.itemSchema.additionalProperties(schema);\n });\n}\n","import {AnyJsonSchema} from \"../../domain/JsonSchema.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param allOf\n */\nexport function AllOf(...allOf: AnyJsonSchema[]) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.allOf(allOf);\n });\n}\n","import {isArrowFn, isClass} from \"@tsed/core\";\n\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Declare a new property on a model.\n *\n * @param type\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Property(type?: any) {\n return JsonEntityFn((store) => {\n if (type) {\n if (isClass(type) || isArrowFn(type)) {\n store.type = type;\n }\n store.itemSchema.type(type);\n }\n });\n}\n","import {DecoratorTypes, isClass, useDecorators} from \"@tsed/core\";\n\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\nimport {Property} from \"./property.js\";\n\n/**\n * Add allowed values when the property or parameters is required.\n *\n * #### Example on parameter:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Allow(\"\") @BodyParams(\"field\") field: string) {}\n * ```\n * > Required will throw a BadRequest when the given value is `null` or `undefined` but not for an empty string.\n *\n * #### Example on model:\n *\n * ```typescript\n * class Model {\n * @Allow(\"\")\n * field: string;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Allow(...values: any[]) {\n const model = values.find((item) => isClass(item));\n return useDecorators(\n model && Property(model),\n JsonEntityFn((store, args) => {\n if (store.decoratorType === DecoratorTypes.PARAM) {\n (store as JsonParameterStore).required = true;\n }\n\n if (store.decoratorType === DecoratorTypes.PROP) {\n store.parentSchema.addRequired(store.propertyName);\n }\n\n store.schema.allow(...values);\n })\n );\n}\n","import {Type} from \"@tsed/core\";\nimport type {JSONSchema6TypeName} from \"json-schema\";\n\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Set the type of the array items.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Any()\n * property: any;\n *\n * @Any(String, Number, Boolean)\n * property: string | number | boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": [\"integer\", \"number\", \"string\", \"boolean\", \"array\", \"object\", \"null\"]\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Any(...types: (JSONSchema6TypeName | Type<any> | any)[]) {\n return JsonEntityFn((store) => {\n store.itemSchema.any(...types);\n });\n}\n","import {AnyJsonSchema} from \"../../domain/JsonSchema.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * ::: warning\n * AnyOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param anyOf\n */\nexport function AnyOf(...anyOf: AnyJsonSchema[]) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.anyOf(anyOf);\n });\n}\n","import type {JSONSchema6Type} from \"json-schema\";\n\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * The const keyword is used to restrict a value to a fixed value.\n *\n * ::: warning\n * For v6 user, use @@Const@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With a string\n *\n * ```typescript\n * class Model {\n * @Const(\"value1\")\n * property: \"value1\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"const\": \"value1\"\n * }\n * }\n * }\n * ```\n * * ### With a boolean\n *\n * ```typescript\n * class Model {\n * @Const(true)\n * property: boolean;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"boolean\",\n * \"const\": true\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean } constValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function Const(constValue: JSONSchema6Type | any) {\n return JsonEntityFn((store) => {\n store.itemSchema.const(constValue);\n });\n}\n","import {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Set a custom key on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKey(key: string, value: any) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.customKey(key, value);\n });\n}\n/**\n * Set a group of custom keys on JsonSchema that is not a part of the official spec.\n *\n * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function CustomKeys(obj: Record<string, any>) {\n return JsonEntityFn((store: JsonEntityStore) => {\n Object.entries(obj).forEach(([key, value]) => {\n store.itemSchema.customKey(key, value);\n });\n });\n}\n","import type {JSONSchema6Type} from \"json-schema\";\n\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * There are no restrictions placed on the value of this keyword.\n *\n * ::: warning\n * For v6 user, use @@Default@@ from @tsed/schema instead of @tsed/platform-http.\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 *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Default(\"10\")\n * property: string = \"10\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"default\": \"10\"\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} defaultValue\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Default(defaultValue: JSONSchema6Type | undefined | (() => JSONSchema6Type)) {\n return JsonEntityFn((store) => {\n store.itemSchema.default(defaultValue);\n });\n}\n","import {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Add an error message to the property.\n * @decorator\n * @ajv\n */\nexport function ErrorMsg(obj: Record<string, string>) {\n return JsonEntityFn((store) => {\n // since errorMessage is a custom key, it is prefixed with a # to avoid conflict with JSON Schema keywords\n const errorMessage = store.parentSchema.get(\"#errorMessage\") || {};\n store.parentSchema.customKey(\"errorMessage\", {...errorMessage, ...obj});\n });\n}\n","import {useDecorators} from \"@tsed/core\";\n\nimport {ErrorMsg} from \"./errorMsg.js\";\n\n/**\n * Set default error message.\n *\n * ## Example\n *\n * ```typescript\n * @DefaultMsg(\"foo should be a string\")\n * class Model {\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": \"number\"\n * }\n * \"errorMessage\": {\n * \"_\": \"foo should be a string\"\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n */\nexport function DefaultMsg(message: string): ClassDecorator {\n return useDecorators(ErrorMsg({_: message}));\n}\n","import {DecoratorParameters, decoratorTypeOf, DecoratorTypes} from \"@tsed/core\";\n\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport type {JsonMethodStore} from \"../../domain/JsonMethodStore.js\";\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Add a description to the class, method or property\n *\n * ## Examples\n * ### On class\n *\n * ```typescript\n * @Description(\"description\")\n * class Model {\n *\n * }\n * ```\n *\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Description(\"description\")\n * async method() {}\n * }\n * ```\n *\n * ### On parameter\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * async method(@Description(\"description\") @PathParam(\"id\") id: string) {}\n * }\n * ```\n *\n * ### On property\n *\n * ```typescript\n * class Model {\n * @Description(\"description\")\n * id: string;\n * }\n * ```\n *\n * @param {string} description\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @methodDecorator\n * @propertyDecorator\n * @parameterDecorator\n */\nexport function Description(description: any) {\n return JsonEntityFn((store: JsonEntityStore, args: DecoratorParameters) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.PROP:\n case DecoratorTypes.CLASS:\n store.schema.description(description);\n break;\n\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).parameter.description(description);\n break;\n\n case DecoratorTypes.METHOD:\n (store as JsonMethodStore).operation?.description(description);\n break;\n }\n });\n}\n","import {useDecorators} from \"@tsed/core\";\n\nimport {JsonPropertyStore} from \"../../domain/JsonPropertyStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\nimport {Property} from \"./property.js\";\n\nexport function DiscriminatorKey(): PropertyDecorator {\n return useDecorators(\n Property(),\n JsonEntityFn((store: JsonPropertyStore) => {\n store.discriminatorKey();\n })\n );\n}\n","import type {JSONSchema6Type} from \"json-schema\";\n\nimport {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\nfunction EnumFn(...enumValues: (JSONSchema6Type | any)[]): Function;\nfunction EnumFn(enumValue: JSONSchema6Type | any, ...enumValues: JSONSchema6Type[]) {\n return JsonEntityFn((store) => {\n store.itemSchema.enum(enumValue, ...enumValues);\n });\n}\n\n/**\n * The enum keyword is used to restrict a value to a fixed set of values.\n * It must be an array with at least one element, where each element is unique.\n *\n * Elements in the array might be of any value, including null.\n *\n * ::: warning\n * For v6 user, use @@Enum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: \"value1\" | \"value2\";\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Enum(\"value1\", \"value2\")\n * property: (\"value1\" | \"value2\")[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"enum\": [\"value1\", \"value2\"]\n * }\n * }\n * }\n * }\n * ```\n *\n * ### With Typescript Enum\n *\n * ```typescript\n * enum SomeEnum {\n * ENUM_1 = \"enum1\",\n * ENUM_2 = \"enum2\"\n * }\n *\n * class Model {\n * @Enum(SomeEnum)\n * property: SomeEnum;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"enum\": [\"enum1\", \"enum2\"]\n * }\n * }\n * }\n * ```\n *\n * @param {string | number | boolean | {}} enumValue\n * @param enumValues\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\n\nexport const Enum = withErrorMsg(\"enum\", EnumFn);\n","import {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Add an example metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Example(...examples: any[]): Function {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.schema.examples(examples);\n });\n}\n","import {OpenSpecHash, OpenSpecRef, OS3Example} from \"@tsed/openspec\";\n\nimport {JsonParameterStore} from \"../../domain/JsonParameterStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Add a examples metadata on the decorated element.\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @methodDecorator\n * @classDecorator\n */\nexport function Examples(examples: OpenSpecHash<OS3Example | OpenSpecRef>): ParameterDecorator {\n return JsonEntityFn((store: JsonParameterStore) => {\n store.parameter!.examples(examples);\n });\n}\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Maximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Maximum = withErrorMsg(\"maximum\", (maximum: number, exclusive: boolean = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMaximum(maximum) : store.itemSchema.maximum(maximum);\n });\n});\n/**\n * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.\n *\n * ::: warning\n * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Max(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"maximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maximum The maximum value allowed\n * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Max = Maximum;\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {Maximum} from \"./maximum.js\";\n\n/**\n * The value of `exclusiveMaximum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) `exclusiveMaximum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMaximum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMaximum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMaximum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param maximum\n * @param {boolean} exclusiveMaximum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMaximum = withErrorMsg(\"exclusiveMaximum\", (maximum: number, exclusiveMaximum: boolean = true) => {\n return Maximum(maximum, exclusiveMaximum);\n});\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ::: warning\n * This decorator will be removed in v7.\n * For v6 user, use @@Minimum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Minimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minimum The minimum value allowed\n * @param {boolean} exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Minimum = withErrorMsg(\"minimum\", (minimum: number, exclusive: boolean = false) => {\n return JsonEntityFn((store) => {\n exclusive ? store.itemSchema.exclusiveMinimum(minimum) : store.itemSchema.minimum(minimum);\n });\n});\n\n/**\n * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Min(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"minimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @alias Minimum\n * @param minimum The minimum value allowed\n * @param exclusive\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Min = Minimum;\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {Minimum} from \"./minimum.js\";\n\n/**\n * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance.\n *\n * If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) `exclusiveMinimum`.\n *\n * ::: warning\n * For v6 user, use @@ExclusiveMinimum@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @ExclusiveMinimum(10)\n * @CollectionOf(Number)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"exclusiveMinimum\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param minimum\n * @param {boolean} exclusiveMinimum\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const ExclusiveMinimum = withErrorMsg(\"exclusiveMinimum\", (minimum: number, exclusiveMinimum: boolean = true) => {\n return Minimum(minimum, exclusiveMinimum);\n});\n","export enum JsonFormatTypes {\n DATE_TIME = \"date-time\",\n DATE = \"date\",\n TIME = \"time\",\n EMAIL = \"email\",\n HOSTNAME = \"hostname\",\n IPV4 = \"ipv4\",\n IPV6 = \"ipv6\",\n URI = \"uri\",\n URL = \"url\",\n URI_REF = \"uri-reference\",\n URI_TEMPLATE = \"uri-template\",\n JSON_POINTER = \"json-pointer\",\n RELATIVE_JSON_POINTER = \"relative-json-pointer\",\n UUID = \"uuid\",\n REGEX = \"regex\"\n}\n","import {ValueOf} from \"@tsed/core\";\n\nimport {JsonFormatTypes} from \"../../domain/JsonFormatTypes.js\";\nimport {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * The following formats are supported for string validation with `format` keyword:\n *\n * - **date**: full-date according to [RFC3339](https://json-schema.org/latest/json-schema-validation.html#RFC3339).\n * - **time**: time with optional time-zone.\n * - **date-time**: date-time from the same source (time-zone is mandatory).\n * - **uri**: full uri with optional protocol.\n * - **email**: email address.\n * - **hostname**: host name according to [RFC1034](https://tools.ietf.org/html/rfc1034#section-3.1).\n * - **ipv4**: IP address v4.\n * - **ipv6**: IP address v6.\n * - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.\n *\n * ::: warning\n * For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Format(\"email\")\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} format\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Format = withErrorMsg(\"format\", (format: JsonFormatTypes | ValueOf<JsonFormatTypes>) => {\n return JsonEntityFn((store) => {\n store.itemSchema.format(format);\n });\n});\n\n/**\n * Apply an email validation on property.\n *\n * ::: warning\n * For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Email()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Email()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"email\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @schema\n * @swagger\n * @input\n * @ajv-errors\n */\nexport const Email = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.EMAIL);\n});\n\n/**\n * Apply a date-time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @DateTime()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"date-time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).\n * @ajv-errors\n */\nexport const DateTime = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE_TIME);\n});\n\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Time()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Time()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const DateFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.DATE);\n});\n\n/**\n * Apply a time validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @TimeFormat()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"time\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const TimeFormat = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.TIME);\n});\n\n/**\n * Apply a uri validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Uri()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"uri\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Uri = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URI);\n});\n\n/**\n * Apply a url validation on property.\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Url()\n * property: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @Url()\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"format\": \"url\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n * @ajv-errors\n */\nexport const Url = withErrorMsg(\"format\", () => {\n return Format(JsonFormatTypes.URL);\n});\n","import {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Allow to forward group on specific property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function ForwardGroups(bool = true): PropertyDecorator {\n return JsonEntityFn((entity) => {\n entity.schema.$forwardGroups = bool;\n });\n}\n","import picomatch from \"picomatch\";\n\nfunction micromatch(list: string[], patterns: string[]) {\n patterns = ([] as string[]).concat(patterns);\n list = ([] as string[]).concat(list);\n\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n\n let onResult = (state: any) => {\n items.add(state.output);\n };\n\n for (let i = 0; i < patterns.length; i++) {\n let isMatch: any = picomatch(String(patterns[i]), {onResult}, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n\n if (negated) {\n negatives++;\n }\n\n for (let item of list) {\n let matched = isMatch(item, true);\n\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match) continue;\n\n if (negated) {\n omit.add(matched.output);\n } else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n\n let result = negatives === patterns.length ? [...items] : [...keep];\n return !!result.filter((item) => !omit.has(item)).length;\n}\n\n/**\n * @ignore\n */\nexport function matchGroups(groups: string[], compareWith: string[] = []) {\n const groupsExcludes = groups.filter((group) => group.startsWith(\"!\")).map((group) => group.replace(\"!\", \"\"));\n const groupsIncludes = groups.filter((group) => !group.startsWith(\"!\"));\n\n if (groupsExcludes.length) {\n if (compareWith.length && micromatch(groupsExcludes, compareWith)) {\n return true;\n }\n }\n\n if (groupsIncludes.length) {\n return !micromatch(\n groups.filter((group) => !group.startsWith(\"!\")),\n compareWith\n );\n }\n\n return false;\n}\n","import {DecoratorTypes, isArray} from \"@tsed/core\";\n\nimport type {JsonClassStore} from \"../../domain/JsonClassStore.js\";\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore.js\";\nimport {matchGroups} from \"../../utils/matchGroups.js\";\nimport {CustomKey} from \"./customKey.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * @ignore\n */\nfunction groupsClass(groups: any, entity: JsonClassStore) {\n const entries: [string, string[]][] = Object.entries(groups[0]);\n\n entity.children.forEach((propEntity) => {\n const groups = entries.filter(([, props]) => props.includes(propEntity.propertyName)).map(([key]) => key);\n const decorator: any = Groups(...groups);\n\n decorator(propEntity.target, propEntity.propertyKey);\n });\n}\n\n/**\n * Apply groups validation strategy\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Groups<T>(groupsDefinition: Record<string, (keyof T)[]>): ClassDecorator;\nexport function Groups<T>(groupName: string, groups: string[]): ParameterDecorator;\nexport function Groups(...groups: string[]): Function;\nexport function Groups(...groups: any): any {\n return JsonEntityFn((entity) => {\n switch (entity.decoratorType) {\n case DecoratorTypes.CLASS:\n groupsClass(groups, entity as JsonClassStore);\n break;\n case DecoratorTypes.PROP:\n CustomKey(\"x-groups\", groups)(entity.target, entity.propertyKey);\n entity.schema.$hooks.on(\"groups\", (prev: boolean, givenGroups: string[]) => {\n if (!prev) {\n if (matchGroups(groups, givenGroups)) {\n return true;\n }\n }\n\n return prev;\n });\n break;\n case DecoratorTypes.PARAM:\n let groupsName = \"\";\n\n if (groups.length == 2 && isArray(groups[1])) {\n groupsName = groups[0];\n groups = groups[1];\n }\n\n (entity as JsonParameterStore).parameter.groups = groups;\n (entity as JsonParameterStore).parameter.groupsName = groupsName;\n break;\n }\n });\n}\n","import {StoreSet} from \"@tsed/core\";\n\n/**\n * Disable documentation for the class and his endpoint.\n *\n * ````typescript\n * @Controller('/')\n * export class Ctrl {\n *\n * @Get('/')\n * @Hidden()\n * hiddenRoute(){\n *\n * }\n * }\n *\n * @Controller('/')\n * @Hidden()\n * export class Ctrl {\n * @Get('/')\n * hiddenRoute() {\n *\n * }\n * @Get('/2')\n * hiddenRoute2() {\n *\n * }\n * }\n * ```\n *\n * @decorator\n * @ignore\n */\nexport function Hidden() {\n return StoreSet(\"hidden\", true);\n}\n","import {IgnoreCallback} from \"../../interfaces/IgnoreCallback.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript.\n *\n * ::: warning\n * Swagger will not generate documentation for the ignored property.\n * :::\n *\n * ```typescript\n * class User {\n * @Ignore()\n * _id: string;\n *\n * @Property()\n * firstName: string;\n *\n * @Property()\n * lastName: string;\n *\n * @Ignore((value, ctx) => !ctx.endpoint)\n * password: string;\n * }\n * ```\n *\n * The controller:\n * ```typescript\n * import {Controller, BodyParams} from \"@tsed/platform-http\";\n * import {Post} from \"@tsed/schema\";\n * import {Person} from \"../models/Person.js\";\n *\n * @Controller(\"/\")\n * export class UsersCtrl {\n * @Get(\"/\")\n * get(): User {\n * const user = new User();\n * user._id = \"12345\";\n * user.firstName = \"John\";\n * user.lastName = \"Doe\";\n * user.password = \"secretpassword\";\n * return\n * }\n * }\n * ```\n *\n * The expected json object:\n *\n * ```json\n * {\n * \"firstName\": \"John\",\n * \"lastName\": \"Doe\"\n * }\n * ```\n * @param cb Callback to know if the property must be ignored\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @deprecated Since v7. Use @Groups decorator instead of and enable `jsonMapper.strictGroups` in your configuration.\n */\nexport function Ignore(cb: boolean | IgnoreCallback = true) {\n return JsonEntityFn((store) => {\n store.schema.ignore(cb);\n });\n}\n","import type {JSONSchema6} from \"json-schema\";\n\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Set integer type.\n *\n * ::: warning\n * For v6 user, use @@Integer@@ from @tsed/schema instead of @@Integer@@ from @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * ```\n *\n * ### With array of multiple types\n *\n * ```typescript\n * class Model {\n * @Integer()\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"integer\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Integer() {\n return JsonEntityFn((store) => {\n store.itemSchema.type(\"integer\");\n });\n}\n","import {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Use label to create ref on the current decorated property.\n *\n * ### Example\n *\n * ```ts\n * class Model {\n * // For single property\n * @LabelledAs(\"UserSchema\")\n * name: string;\n *\n * // For collection\n * @LabelledAs(\"UserCollectionSchema\", \"collection\")\n * users: User[];\n * }\n * ```\n *\n * @param label The name of the label\n * @param includeCollection Add the label to the collection. By default, the label is added to the item of the collection it the property is a collection.\n * @returns PropertyDecorator\n *\n * @decorator\n */\nexport function LabelledAs(label: string, includeCollection: false | \"collection\" = false): PropertyDecorator {\n return JsonEntityFn((entity) => {\n if (includeCollection) {\n entity.schema.label(label);\n } else {\n entity.itemSchema.label(label);\n }\n });\n}\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of maxLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MaxLength@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MaxLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} maxLength The maximum length allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MaxLength = withErrorMsg(\"maxLength\", (maxLength: number) => {\n if (maxLength < 0) {\n throw new Error(\"The value of maxLength MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.itemSchema.maxLength(maxLength);\n });\n});\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n *\n * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.\n *\n * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).\n *\n * ::: warning\n * The value of minLength MUST be a non-negative integer.\n * :::\n *\n * ::: tip\n * Omitting this keyword has the same behavior as a value of 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MinLength@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * property: number;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"maxLength\": 10\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @MinLength(10)\n * @CollectionOf(String)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"minLength\": 10\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} minLength\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MinLength = withErrorMsg(\"minLength\", (minLength: number) => {\n if (minLength < 0) {\n throw new Error(\"The value of minLength MUST be a non-negative integer.\");\n }\n\n return JsonEntityFn((store) => {\n store.itemSchema.minLength(minLength);\n });\n});\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * A numeric instance is valid only if division by this keyword's value results in an integer.\n *\n * ::: warning\n * The value of `multipleOf` MUST be a number, strictly greater than 0.\n * :::\n *\n * ::: warning\n * For v6 user, use @@MultipleOf@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @MultipleOf(2)\n * property: Number;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(number)\n * @MultipleOf(2)\n * property: number[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"number\",\n * \"multipleOf\": 2\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {number} multipleOf The multiple value allowed\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const MultipleOf = withErrorMsg(\"multipleOf\", (multipleOf: number) => {\n if (multipleOf <= 0) {\n throw new Error(\"The value of multipleOf MUST be a number, strictly greater than 0.\");\n }\n\n return JsonEntityFn((store) => {\n store.itemSchema.multipleOf(multipleOf);\n });\n});\n","import {DecoratorParameters, decoratorTypeOf, DecoratorTypes} from \"@tsed/core\";\n\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Add a name metadata on the decorated element.\n *\n * ## Examples\n * ### On parameters\n *\n * ```typescript\n * async myMethod(@Name(\"nameOf\") @PathParams(\"id\") id: string): Promise<Model> {\n *\n * }\n * ```\n *\n * ### On parameters\n *\n * ```typescript\n * @Name(\"AliasName\")\n * @Controller(\"/\")\n * class ModelCtrl {\n *\n * }\n * ```\n *\n * @param name\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @classDecorator\n * @operation\n */\nexport function Name(name: any) {\n return JsonEntityFn((store: JsonEntityStore, args: DecoratorParameters) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.CLASS:\n store.schema.name(name);\n break;\n case DecoratorTypes.PARAM:\n store.parameter!.name(name);\n break;\n default:\n store.parent.schema.addAlias(args[1], name);\n }\n });\n}\n","import {Type, useDecorators} from \"@tsed/core\";\nimport type {JSONSchema6TypeName} from \"json-schema\";\n\nimport {Any} from \"./any.js\";\nimport {Property} from \"./property.js\";\n\n/**\n * Set field as nullable.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Nullable(Date)\n * property: Date | null;\n *\n * @Nullable(String, Number, Boolean)\n * property: string | number | boolean | null;\n * }\n * ```\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Nullable(type: JSONSchema6TypeName | Type<any> | any, ...types: (JSONSchema6TypeName | Type<any> | any)[]) {\n types = [type, ...types];\n return useDecorators(types.length === 1 && Property(types[0]), Any(null, ...types));\n}\n","import {AnyJsonSchema} from \"../../domain/JsonSchema.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * ::: warning\n * OneOf isn't supported by OS2\n * :::\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n * @param oneOf\n */\nexport function OneOf(...oneOf: AnyJsonSchema[]) {\n return JsonEntityFn((entity) => {\n entity.itemSchema.oneOf(oneOf);\n entity.type = Object;\n });\n}\n","import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport type {JsonParameterStore} from \"../../domain/JsonParameterStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Add optional annotation on Property or Parameter.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Optional() {\n return JsonEntityFn((store) => {\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).required = false;\n break;\n case DecoratorTypes.PROP:\n store.parentSchema.removeRequired(store.propertyName);\n break;\n }\n });\n}\n","import {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * The pattern and Pattern Properties keywords use regular expressions to express constraints.\n * The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.\n *\n * ::: warning\n * For v6 user, use @@Pattern@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * A single unicode character (other than the special characters below) matches itself.\n *\n * * `^`: Matches only at the beginning of the string.\n * * `$`: Matches only at the end of the string.\n * * `(...)`: Group a series of regular expressions into a single regular expression.\n * * `|`: Matches either the regular expression preceding or following the | symbol.\n * * `[abc]`: Matches any of the characters inside the square brackets.\n * * `[a-z]`: Matches the range of characters.\n * * `[^abc]`: Matches any character not listed.\n * * `[^a-z]`: Matches any character outside of the range.\n * * `+`: Matches one or more repetitions of the preceding regular expression.\n * * `*`: Matches zero or more repetitions of the preceding regular expression.\n * * `?`: Matches zero or one repetitions of the preceding regular expression.\n * * `+?`, *?`, ??`: The `*`, `+`, and `?` qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn’t desired and you want to match as few characters as possible.\n * * `{x}`: Match exactly x occurrences of the preceding regular expression.\n * * `{x,y}`: Match at least x and at most y occurrences of the preceding regular expression.\n * * `{x,}`: Match x occurrences or more of the preceding regular expression.\n * * `{x}?`, {x,y}?, {x,}?`: Lazy versions of the above expressions.\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Pattern(\"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\")\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ### With primitive type\n *\n * ```typescript\n * class Model {\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string;\n * }\n * ```\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * ```\n *\n * ### With array type\n *\n * ```typescript\n * class Model {\n * @CollectionOf(string)\n * @Pattern(/^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$/)\n * property: string[];\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"property\": {\n * \"type\": \"array\",\n * \"items\": {\n * \"type\": \"string\",\n * \"pattern\": \"^(\\\\([0-9]{3}\\\\))?[0-9]{3}-[0-9]{4}$\"\n * }\n * }\n * }\n * }\n * ```\n *\n * @param {string} pattern\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @ajv-errors\n */\nexport const Pattern = withErrorMsg(\"pattern\", (pattern: string | RegExp) => {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.pattern(pattern);\n });\n});\n","import {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n/**\n * Set the property as readOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function ReadOnly(readOnly: boolean = true) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.readOnly(readOnly);\n });\n}\n","import {JsonSchema, JsonSchemaObject} from \"../../domain/JsonSchema.js\";\nimport {SpecTypes} from \"../../domain/SpecTypes.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Write data formatted to JsonSchema.\n *\n * ## Example\n *\n * ```typescript\n * @Schema({title: \"test\"})\n * class Model {\n * @Schema({formatMinimum: \"1987-10-24\"})\n * @Format(\"date\")\n * birthDate: Date\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"title\": \"test\",\n * \"properties\": {\n * \"birthdate\": {\n * \"type\": \"string\",\n * \"format\": \"date\",\n * \"formatMinimum\": \"1987-10-24\"\n * }\n * }\n * }\n * ```\n *\n * @param partialSchema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Schema(partialSchema: Partial<JsonSchemaObject> | JsonSchema) {\n return JsonEntityFn((entity) => {\n entity.schema.assign(partialSchema);\n });\n}\n\n/**\n * Apply specific schema depending on the spec version\n * @param specType\n * @param schema\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function For(specType: SpecTypes, schema: any) {\n return JsonEntityFn((entity) => {\n entity.schema.set(specType, schema);\n });\n}\n","import {Schema} from \"./schema.js\";\n\n/**\n * Constructs a json schema object type whose property keys are keys and whose property values are type.\n *\n * ## Example\n *\n * ```typescript\n * type keys = 'one' | 'two';\n *\n * class Part {\n * prop: string;\n * }\n *\n * type Parts = Record<keys, Part>;\n *\n * class Test {\n * @RecordOf(Part, 'one', 'two')\n * parts: Parts;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"one\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * \"two\": {\n * \"$ref\": \"#/components/schemas/Part\"\n * },\n * },\n * }\n * ```\n *\n * @param model\n * @param keys\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function RecordOf(model: any, ...keys: string[]) {\n return Schema({\n properties: {\n ...keys.reduce((initial, key) => {\n return {\n ...initial,\n [key]: model\n };\n }, {})\n }\n });\n}\n","import {withErrorMsg} from \"../../utils/withErrorMsg.js\";\nimport {Allow} from \"./allow.js\";\nimport {Optional} from \"./optional.js\";\n\n/**\n * Add required annotation on Property or Parameter.\n *\n * The @@Required@@ decorator can be used on two cases.\n *\n * To decorate a parameters:\n *\n * ```typescript\n * @Post(\"/\")\n * async method(@Required() @BodyParams(\"field\") field: string) {}\n * ```\n *\n * To decorate a model:\n *\n * ```typescript\n * class Model {\n * @Required()\n * field: string;\n * }\n * ```\n *\n * ::: tip\n * Required will throw a BadRequest when the given value is `null`, an empty string or `undefined`.\n * :::\n *\n * ### Allow values\n *\n * In some case, you didn't want trigger a BadRequest when the value is an empty string for example.\n * The decorator `@Allow()`, allow you to configure a value list for which there will be no exception.\n *\n * ```typescript\n * class Model {\n * @Allow(\"\") // add automatically required flag\n * field: string;\n * }\n * ```\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport const Required = withErrorMsg(\"required\", (required: boolean = true, ...allowedRequiredValues: any[]) => {\n return required ? Allow(...allowedRequiredValues) : Optional();\n});\n","import {matchGroups} from \"../../utils/matchGroups.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Apply groups validation strategy for required property.\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function RequiredGroups(...groups: string[]): PropertyDecorator {\n return JsonEntityFn((entity) => {\n entity.parent.schema.$hooks.on(\"requiredGroups\", (required: string[], givenGroups: string[]) => {\n if (matchGroups(groups, givenGroups)) {\n return required.filter((key: string) => key !== entity.propertyKey);\n }\n\n return required;\n });\n });\n}\n","import {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Add title metadata on the decorated element.\n *\n * ::: warning\n * For v6 user, use @@Title@@ from @tsed/schema instead of @tsed/platform-http.\n * :::\n *\n * ## Example\n *\n * ```typescript\n * class Model {\n * @Title(\"title\")\n * id: string;\n * }\n * ```\n *\n * Will produce:\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"properties\": {\n * \"id\": {\n * \"type\": \"string\",\n * \"title\": \"title\"\n * }\n * }\n * }\n * ```\n *\n * @param {string} title\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @classDecorator\n * @input\n */\nexport function Title(title: string) {\n return JsonEntityFn((entity) => {\n entity.schema.title(title);\n });\n}\n","import {useDecorators} from \"@tsed/core\";\n\nimport {ErrorMsg} from \"./errorMsg.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n\n/**\n * Create a new custom formats validator\n * @param name\n * @param options\n * @decorator\n * @ajv\n */\nexport function TypeError(msg: string): ClassDecorator {\n return JsonEntityFn(() => useDecorators(ErrorMsg({type: msg})));\n}\n","import {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {JsonEntityFn} from \"./jsonEntityFn.js\";\n/**\n * Set the property as WriteOnly.\n *\n * @returns {Function}\n * @decorator\n * @validation\n * @property\n * @parameter\n * @schema\n */\nexport function WriteOnly(writeOnly: boolean = true) {\n return JsonEntityFn((store: JsonEntityStore) => {\n store.itemSchema.writeOnly(writeOnly);\n });\n}\n","import {isClass, Type} from \"@tsed/core\";\n\nimport {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {getJsonEntityStore} from \"../utils/getJsonEntityStore.js\";\n\n/**\n * Create a new model from the given type.\n *\n * ```typescript\n * from(String)\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function from(type: Type<any> = Object) {\n if (isClass(type)) {\n const {schema} = getJsonEntityStore(type);\n\n schema.properties = function properties(obj: {[key: string]: JsonSchema}) {\n Object.entries(obj).forEach(([propertyKey, propSchema]) => {\n getJsonEntityStore(type.prototype, propertyKey).schema.assign(propSchema);\n });\n\n return this;\n };\n\n return schema;\n }\n\n return JsonSchema.from({type});\n}\n","import type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a new string model.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function string(): JsonSchema {\n return from(String);\n}\n","import {isObject, Type} from \"@tsed/core\";\n\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {string} from \"../../fn/string.js\";\nimport {GenericValue} from \"../../utils/generics.js\";\n\n/**\n * @ignore\n */\nfunction isEnum(type: any) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n\nexport interface GenericOfChainedDecorators {\n (...args: any): any;\n\n /**\n * Declare a nested generic models\n * @param generics\n */\n Nested(...generics: GenericValue[]): this;\n}\n\n/**\n * Set the types of a Generic class.\n *\n * ## Example\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * class Payload {\n * @GenericOf(Product)\n * products: Paginated<Product>;\n * }\n * ```\n *\n * ## Example with nested generics\n *\n * ```typescript\n * class Product {\n * @Property()\n * label: string;\n * }\n *\n * @Generics(\"T\")\n * class Paginated<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n *\n * @Generics(\"D\")\n * class Submission<D> {\n * @Property()\n * _id: string;\n *\n * @Property(\"D\")\n * data: D;\n * }\n *\n * class Payload {\n * @GenericOf(Submissions).Nested(Product)\n * submissions: Paginated<Submission<Product>>;\n * }\n * ```\n *\n * @param {Type<any>[]} generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function GenericOf(...generics: GenericValue[]): GenericOfChainedDecorators {\n const nestedGenerics: GenericValue[][] = [\n generics.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n })\n ];\n\n const decorator = (...args: any) => {\n const store = JsonEntityStore.from(...args);\n store.nestedGenerics = nestedGenerics;\n };\n\n decorator.Nested = (...generics: any) => {\n nestedGenerics.push(generics);\n\n return decorator;\n };\n\n return decorator;\n}\n","import {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\n\n/**\n * Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema.\n *\n * See @@GenericOf@@ decorator for more details.\n *\n * @param generics\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n * @generics\n */\nexport function Generics(...generics: string[]): ClassDecorator {\n return (target: any) => {\n const storedSchema = JsonEntityStore.from(target);\n\n storedSchema.schema.genericLabels = generics;\n };\n}\n","import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Add consumes metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n * class Model {\n * @Consumes(\"application/x-www-form-urlencoded\")\n * id: string;\n * }\n * ```\n *\n * @param consumes\n * @decorator\n * @swagger\n * @classDecorator\n * @operation\n */\nexport function Consumes(...consumes: string[]): ClassDecorator & MethodDecorator {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation!.consumes(consumes);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Consumes(...consumes));\n break;\n\n default:\n throw new UnsupportedDecoratorType(Consumes, args);\n }\n });\n}\n","import {StoreSet, useDecorators} from \"@tsed/core\";\n\nimport {Consumes} from \"./consumes.js\";\n\n/**\n * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.\n *\n * ```typescript\n * @Controller('/mypath')\n * export class MyCtrl {\n *\n * @Get('/')\n * @AcceptMime('application/x-www-form-urlencoded')\n * public getResource(){}\n * }\n * ```\n *\n * @param mimes\n * @decorator\n * @operation\n * @response\n */\nexport function AcceptMime(...mimes: string[]): ClassDecorator & MethodDecorator {\n return useDecorators(Consumes(...mimes), StoreSet(\"acceptMimes\", mimes));\n}\n","import {DecoratorParameters, DecoratorTypes} from \"@tsed/core\";\nimport {pascalCase} from \"change-case\";\n\nimport {JsonEntityStore} from \"./JsonEntityStore.js\";\n\n/**\n * @ignore\n */\nexport interface DecoratorActionHandler {\n (ctx: Map<string, any>): void;\n}\n\n/**\n * @ignore\n */\nexport abstract class DecoratorContext<T = any> extends Map<string, any> {\n readonly methods: string[];\n protected decoratorType: DecoratorTypes;\n protected entity: JsonEntityStore;\n protected actions: DecoratorActionHandler[] = [];\n\n constructor(opts: any = {}) {\n super();\n\n Object.entries(opts).forEach(([key, value]) => {\n this.set(key, value);\n });\n }\n\n addAction(cb: DecoratorActionHandler) {\n this.actions.push(cb);\n return this;\n }\n\n build(): T {\n const decorator: any = (...args: DecoratorParameters) => this.bind(args, decorator);\n\n const wrap = (cb: any) => {\n return (...args: any[]) => {\n cb(...args);\n return decorator;\n };\n };\n\n const wrapKey = (key: string) => {\n return wrap((...values: any[]) => {\n key in this ? (this as any)[key](...values) : this.set(key, values[0]);\n });\n };\n\n this.methods.forEach((name) => {\n decorator[pascalCase(name)] = wrapKey(name);\n });\n\n return decorator as unknown as T;\n }\n\n toObject(): any {\n return [...this.entries()].reduce((obj, [key, value]) => {\n return {\n ...obj,\n [key]: value\n };\n }, {});\n }\n\n getMergedKey(key: string, defaultValue: any) {\n let value = this.get(key) || defaultValue;\n\n if (!value) {\n return;\n }\n\n if (this.decoratorType === DecoratorTypes.CLASS) {\n value = {\n ...value,\n ...(defaultValue || {})\n };\n }\n\n return {\n ...(defaultValue || {}),\n ...value\n };\n }\n\n protected bind(args: DecoratorParameters, decorator: any) {\n this.entity = JsonEntityStore.from(...args);\n\n this.beforeInit();\n this.onInit(args, decorator);\n this.afterInit();\n }\n\n protected onInit(args: DecoratorParameters, decorator: any): void {\n this.forEach((value, key) => {\n this.onMapKey(key, value);\n });\n }\n\n protected onMapKey(key: string, value: any): void {\n this.entity.set(key, value);\n }\n\n protected runActions() {\n this.actions.forEach((action: any) => {\n action(this);\n });\n\n return this;\n }\n\n protected beforeInit() {}\n\n protected afterInit() {}\n}\n","import {Type} from \"@tsed/core\";\n\nconst statusesModel: Map<number, Type<any>> = new Map();\n\nexport function defineStatusModel(status: number, model: Type<any>) {\n statusesModel.set(status, model);\n}\n\nexport function getStatusModel(status: number) {\n return statusesModel.get(status);\n}\n","import {\n decorateMethodsOf,\n decoratorTypeOf,\n DecoratorTypes,\n isArray,\n isCollection,\n isObject,\n isPlainObject,\n isPrimitiveOrPrimitiveClass,\n isString,\n Type\n} from \"@tsed/core\";\nimport {OS3Example} from \"@tsed/openspec\";\n\nimport {getStatusMessage} from \"../../constants/httpStatusMessages.js\";\nimport {DecoratorContext} from \"../../domain/DecoratorContext.js\";\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {JsonParameter} from \"../../domain/JsonParameter.js\";\nimport {JsonResponse} from \"../../domain/JsonResponse.js\";\nimport {JsonSchema, JsonSchemaObject} from \"../../domain/JsonSchema.js\";\nimport {string} from \"../../fn/string.js\";\nimport {JsonHeader, JsonHeaders} from \"../../interfaces/JsonOpenSpec.js\";\nimport {getStatusModel} from \"../../utils/defineStatusModel.js\";\nimport {GenericValue} from \"../../utils/generics.js\";\nimport {isSuccessStatus} from \"../../utils/isSuccessStatus.js\";\nimport {mapHeaders} from \"../../utils/mapHeaders.js\";\n\nexport interface ReturnsChainedDecorators {\n <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;\n\n (target: Function): void;\n\n /**\n * Set a Content-Type for the current response\n * @param value\n * @constructor\n */\n ContentType(value: string): this;\n\n /**\n * Add a description\n * @param description\n */\n Description(description: string): this;\n\n /**\n * Add examples\n * @param examples\n */\n Examples(examples: Record<string, OS3Example>): this;\n\n Examples(examples: Record<string, any>): this;\n\n Examples(examples: any): this;\n\n /**\n * Change the model type\n * @param type\n */\n Type(type: Type<any> | any): this;\n\n /**\n * Change the status\n * @param status\n * @constructor\n */\n Status(status: string | number): this;\n\n /**\n * Add the nested types\n * @param types\n */\n Of(...types: GenericValue[]): this;\n\n /**\n * For the integer type\n */\n OfInteger(): this;\n\n /**\n * Add the nested types\n * @param types\n */\n OneOf(...types: GenericValue[]): this;\n\n /**\n * Add the nested types\n * @param types\n */\n AllOf(...types: GenericValue[]): this;\n\n /**\n * Add the nested types\n * @param types\n */\n AnyOf(...types: GenericValue[]): this;\n\n /**\n * Declare a nested generic models\n * @param generics\n */\n Nested(...generics: GenericValue[]): this;\n\n /**\n * Add header.\n * @param key\n * @param value\n */\n Header(key: string, value?: number | string | (JsonHeader & {value?: string | number | boolean})): this;\n\n /**\n * Add headers\n */\n Headers(headers: JsonHeaders): this;\n\n /**\n * Add location hea\n */\n Location(location: string, meta?: JsonHeader): this;\n\n /**\n * Assign partial schema\n * @param schema\n */\n Schema(schema: Partial<JsonSchemaObject> | JsonSchema): this;\n\n /**\n * Add an inline title for the return model.\n * @param title\n */\n Title(title: string): this;\n\n /**\n * Use group to filter model\n * @param groups\n */\n Groups(...groups: string[]): this;\n\n Groups(groupName: string, groups: string[]): this;\n\n /**\n * Add a list of allowed groups to filter dynamically fields. Listed groups can be used by the consumer to change\n * the mapped response.\n * @param allowedGroups\n */\n AllowedGroups(...allowedGroups: string[]): this;\n\n /**\n * Apply the application/octet-stream and binary format on Open API documentation\n */\n Binary(): this;\n\n [key: string]: any;\n}\n\n/**\n * @ignore\n */\nfunction isEnum(type: any) {\n return isObject(type) && !(\"toJSON\" in type);\n}\n\nfunction mapGenerics(types: GenericValue[]) {\n return types.map((type) => {\n if (isEnum(type)) {\n return string().enum(Object.values(type));\n }\n return type;\n });\n}\n\n/**\n * @ignore\n */\nclass ReturnDecoratorContext extends DecoratorContext<ReturnsChainedDecorators> {\n readonly methods: string[] = [\n \"contentType\",\n \"description\",\n \"examples\",\n \"type\",\n \"status\",\n \"of\",\n \"ofInteger\",\n \"oneOf\",\n \"allOf\",\n \"anyOf\",\n \"nested\",\n \"header\",\n \"headers\",\n \"schema\",\n \"title\",\n \"groups\",\n \"allowedGroups\",\n \"location\",\n \"binary\"\n ];\n\n private hasOfTypes: boolean;\n\n constructor({status, model}: any) {\n super();\n\n this.model(model);\n this.status(status);\n }\n\n type(model: any) {\n return this.model(model);\n }\n\n model(model: any) {\n model && this.set(\"model\", model);\n return this;\n }\n\n status(status: number | string) {\n this.set(\"status\", status);\n\n if (status && getStatusMessage(status) && !this.get(\"description\")) {\n this.set(\"description\", getStatusMessage(status));\n\n if (!this.get(\"model\")) {\n this.model(getStatusModel(+status));\n }\n }\n\n return this;\n }\n\n headers(headers: JsonHeaders) {\n this.set(\"headers\", {\n ...(this.get(\"headers\") || {}),\n ...mapHeaders(headers)\n });\n\n return this;\n }\n\n header(key: string, value?: string | JsonHeader) {\n if (value === undefined && isString(key)) {\n return this.headers({[key]: {type: \"string\"}});\n }\n\n return this.headers({[key]: value!});\n }\n\n location(path: string, meta: JsonHeaders = {}) {\n this.headers({\n Location: {\n ...meta,\n value: path\n }\n });\n\n return this;\n }\n\n groups(groupName: string, groups: string[]): this;\n groups(...groups: string[]): this;\n groups(...groups: string[] | [string, string[]]) {\n if (groups.length === 2 && isArray(groups[1])) {\n this.set(\"groupsName\", groups[0]);\n this.set(\"groups\", groups[1]);\n } else {\n this.set(\"groups\", groups);\n }\n\n return this;\n }\n\n allowedGroups(...allowedGroups: string[]) {\n this.set(\"allowedGroups\", new Set(allowedGroups));\n return this;\n }\n\n nested(...generics: GenericValue[]) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n this.checkCollection(model);\n\n this.addAction((ctx) => {\n (this.get(\"schema\") as JsonSchema).nestedGenerics.push(mapGenerics(generics));\n });\n\n return this;\n }\n\n of(...types: (Type<any> | any)[]) {\n const model = this.get(\"model\");\n this.checkPrimitive(model);\n\n this.addAction(() => {\n const schema = this.get(\"schema\") as JsonSchema;\n\n if (isCollection(model)) {\n schema?.itemSchema({type: types[0]});\n } else {\n schema?.nestedGenerics.push(mapGenerics(types));\n }\n });\n\n return this;\n }\n\n ofInteger() {\n return this.of(\"integer\");\n }\n\n oneOf(...types: (Type<any> | any)[]) {\n return this.manyOf(\"oneOf\", types);\n }\n\n allOf(...types: (Type<any> | any)[]) {\n return this.manyOf(\"allOf\", types);\n }\n\n anyOf(...types: (Type<any> | any)[]) {\n return this.manyOf(\"anyOf\", types);\n }\n\n schema(partial: Partial<JsonSchemaObject> | JsonSchema) {\n this.addAction(() => {\n const schema = this.get(\"schema\") as JsonSchema;\n\n schema!.assign(partial);\n });\n\n return this;\n }\n\n examples(examples: any) {\n this.set(\"examples\", isString(examples) ? [examples] : examples);\n return this;\n }\n\n title(title: string) {\n return this.schema({title});\n }\n\n binary() {\n this.type(String);\n this.set(\"contentType\", \"application/octet-stream\");\n this.schema({format: \"binary\"});\n\n return this;\n }\n\n protected checkPrimitive(model: any) {\n if (isPrimitiveOrPrimitiveClass(model)) {\n throw new Error(\"Returns.Of cannot be used with the following primitive classes: String, Number, Boolean\");\n }\n }\n\n protected checkCollection(model: any) {\n if (isCollection(model)) {\n throw new Error(\"Returns.Nested cannot be used with the following classes: Map, Set, Array, String, Number, Boolean\");\n }\n }\n\n protected getContentType() {\n const model = this.get(\"model\");\n let contentType = this.get(\"contentType\");\n\n if ((model && !isPlainObject(model) && !isPrimitiveOrPrimitiveClass(model)) || this.hasOfTypes) {\n contentType = contentType || \"application/json\";\n }\n\n return contentType;\n }\n\n protected getStatus() {\n return this.get(\"status\") || \"default\";\n }\n\n protected onInit(args: any[], decorator: any) {\n const type = decoratorTypeOf(args);\n switch (type) {\n case DecoratorTypes.METHOD:\n this.entity = JsonEntityStore.from(...args);\n if (this.entity.operation) {\n this.map();\n }\n break;\n case DecoratorTypes.CLASS:\n this.decoratorType = DecoratorTypes.CLASS;\n decorateMethodsOf(args[0], decorator);\n break;\n }\n }\n\n protected map() {\n const model = this.get(\"model\");\n const {entity, decoratorType} = this;\n const operation = this.entity.operation!;\n const currentStatus = this.getStatus();\n const response = operation.ensureResponseOf(currentStatus);\n const contentType = this.getContentType();\n\n let {description = response.get(\"description\")} = this.toObject();\n\n if (description) {\n description = decoratorType === DecoratorTypes.CLASS ? response.get(\"description\") || description : description;\n response.description(description);\n }\n\n const headers = this.getMergedKey(\"headers\", response.get(\"headers\"));\n\n if (headers) {\n response.headers(headers);\n }\n\n this.mapMedia(response);\n\n if (isSuccessStatus(this.get(\"status\")) || currentStatus === \"default\") {\n if (model) {\n entity.type = model;\n }\n }\n\n // additional info for OS2\n contentType && operation.addProduce(contentType);\n\n // run additional actions\n return this.runActions();\n }\n\n protected mapMedia(response: JsonResponse) {\n const contentType = this.getContentType();\n const model = this.get(\"model\");\n const media = response.getMedia(contentType || \"*/*\");\n const schema = media.get(\"schema\") || new JsonSchema({type: model});\n const groups = this.get(\"groups\");\n const groupsName = this.get(\"groupsName\");\n const allowedGroups = this.get(\"allowedGroups\");\n const operation = this.entity.operation!;\n\n if (model) {\n if (isArray(model)) {\n schema.oneOf(model.map((type) => ({type})));\n } else {\n schema.type(model);\n }\n }\n\n this.set(\"schema\", schema);\n\n media.schema(schema);\n\n media.groups = groups;\n media.groupsName = groupsName;\n\n if (allowedGroups) {\n media.allowedGroups = allowedGroups;\n\n const jsonParameter = new JsonParameter();\n jsonParameter.in(\"query\").name(\"includes\");\n jsonParameter.schema(\n JsonSchema.from({\n type: \"array\",\n items: {\n type: \"string\",\n enum: [...allowedGroups]\n }\n })\n );\n\n operation.addParameter(-1, jsonParameter);\n }\n\n const examples = this.get(\"examples\");\n\n if (examples) {\n media.examples(examples);\n }\n\n return media;\n }\n\n private manyOf(kind: string, types: any[]) {\n const model = this.get(\"model\");\n this.hasOfTypes = true;\n\n this.addAction(() => {\n const schema = this.get(\"schema\") as JsonSchema;\n\n if (isCollection(model)) {\n schema.type(model || Object);\n\n schema.itemSchema().set(kind, types);\n } else {\n schema.set(kind, types);\n }\n });\n\n return this;\n }\n}\n\n/**\n * Add responses documentation for a specific status code.\n *\n * ## Usage\n *\n * Ts.ED v5/v6 API introducing the chaining decorator concept. Now a decorator like Returns can be used with another decorators like Description.\n *\n * ::: warning\n * v5 has a basic support of the chaining decorator to facilitate the migration to v6!\n * :::\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @Returns(404, String).Description(\"Not Found\")\n * @Returns(200, Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ::: tip\n * TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know\n * what chained decorators are available under Returns decorator.\n * :::\n *\n * This example will produce this documentation in swagger:\n *\n * ```json\n * {\n * \"responses\": {\n * \"404\": {\n * \"description\": \"Description\",\n * \"schema\": {\"type\": \"string\"}\n * },\n * \"2OO\": {\n * \"description\": \"Description\",\n * \"schema\": {\"$ref\": \"...\"}\n * }\n * }\n * }\n * ```\n *\n * ## Declaring an Array\n *\n * Use chained decorators to declare an array with model as following:\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/models\")\n * class ModelCtrl {\n * @Get(\"/\")\n * @Returns(200, Array).Of(Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {\n * }\n * }\n * ```\n *\n * Deprecated version:\n *\n * ```typescript\n * import {ReturnsArray} from \"@tsed/platform-http\";\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @ReturnsArray(200, Model) // deprecated\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ### Declaring a generic model <Badge text=\"6+\"/>\n *\n * Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to\n * declare explicitly the generic models with the decorators.\n *\n * One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.\n *\n * Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:\n *\n * ```typescript\n * @Generics(\"T\")\n * class Pagination<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n * ```\n *\n * Now, we need a model to be used with the generic Pagination model:\n *\n * ```typescript\n * class Product {\n * @Property()\n * id: string;\n *\n * @Property()\n * title: string;\n * }\n * ```\n *\n * Finally, we can use our models on a method as following:\n *\n * ```typescript\n * class Controller {\n * @OperationPath(\"POST\", \"/\")\n * @Returns(200, Pagination).Of(Product).Description(\"description\")\n * async method(): Promise<Pagination<Product> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * ### Declaring a nested generics models <Badge text=\"6+\"/>\n *\n * It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:\n *\n * ```typescript\n * import {Post, Generics, Property, Returns} from \"@tsed/schema\";\n *\n * class Controller {\n * @Post(\"/\")\n * @Returns(200, Pagination).Of(Submission).Nested(Product).Description(\"description\")\n * async method(): Promise<Pagination<Submission<Product>> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * And here is the Submission model:\n *\n * ```typescript\n * import {Generics, Property} from \"@tsed/schema\";\n *\n * @Generics(\"T\")\n * class Submission<T> {\n * @Property()\n * _id: string;\n * @Property(\"T\")\n * data: T;\n * }\n * ```\n *\n * @param status\n * @param model\n * @decorator\n * @swagger\n * @schema\n * @response\n * @operation\n */\nexport function Returns(status?: string | number, model?: Type<any> | Type<any>[]): ReturnsChainedDecorators;\nexport function Returns(status?: string | number, model?: Type<any> | Type<any>[] | any): ReturnsChainedDecorators {\n const context = new ReturnDecoratorContext({\n status,\n model\n });\n\n return context.build();\n}\n","import {Returns} from \"./returns.js\";\n\n/**\n * Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type.\n * If type contains the “/” character, then it sets the `Content-Type` to type.\n *\n * ```typescript\n * @ContentType('.html'); // => 'text/html'\n * @ContentType('html'); // => 'text/html'\n * @ContentType('json'); // => 'application/json'\n * @ContentType('application/json'); // => 'application/json'\n * @ContentType('png'); // => image/png\n * private myMethod() {}\n * ```\n *\n * @param type\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function ContentType(type: string) {\n return Returns().ContentType(type);\n}\n","import {decorateMethodsOf, decoratorTypeOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport {JsonParameterStore} from \"../../domain/JsonParameterStore.js\";\nimport {JsonPropertyStore} from \"../../domain/JsonPropertyStore.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Add deprecated metadata on the decorated element.\n *\n * ## Examples\n *\n * ```typescript\n *\n * @Deprecated()\n * class MyCtrl {\n * @Deprecated()\n * @Get(\"/\")\n * method(){\n * }\n * }\n * ```\n *\n * @param deprecated\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Deprecated(deprecated: boolean = true) {\n return JsonEntityFn((store, args) => {\n switch (decoratorTypeOf(args)) {\n case DecoratorTypes.METHOD:\n store.operation!.deprecated(deprecated);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Deprecated(deprecated));\n break;\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).parameter.set(\"deprecated\", deprecated);\n break;\n case DecoratorTypes.PROP:\n (store as JsonPropertyStore).schema.set(\"deprecated\", deprecated);\n break;\n\n default:\n throw new UnsupportedDecoratorType(Deprecated, args);\n }\n });\n}\n","import {isString} from \"@tsed/core\";\n\nimport {JsonHeader, JsonHeaders} from \"../../interfaces/JsonOpenSpec.js\";\nimport {Returns} from \"./returns.js\";\n\n/**\n * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter.\n *\n * ```typescript\n * @Header('Content-Type', 'text/plain');\n * private myMethod() {}\n *\n * @Status(204)\n * @Header({\n * \"Content-Type\": \"text/plain\",\n * \"Content-Length\": 123,\n * \"ETag\": {\n * \"value\": \"12345\",\n * \"description\": \"header description\"\n * }\n * })\n * private myMethod() {}\n * ```\n *\n * This example will produce the swagger responses object:\n *\n * ```json\n * {\n * \"responses\": {\n * \"204\": {\n * \"description\": \"Description\",\n * \"headers\": {\n * \"Content-Type\": {\n * \"type\": \"string\"\n * },\n * \"Content-Length\": {\n * \"type\": \"number\"\n * },\n * \"ETag\": {\n * \"type\": \"string\",\n * \"description\": \"header description\"\n * }\n * }\n * }\n * }\n * }\n * ```\n *\n * @decorator\n * @operation\n * @response\n */\nexport function Header(headers: string | number | JsonHeaders, value?: string | number | JsonHeader) {\n if (value !== undefined) {\n headers = {[headers as string]: value};\n }\n if (value === undefined && isString(headers)) {\n headers = {[headers as string]: {type: \"string\"}};\n }\n\n return Returns().Headers(headers as JsonHeaders);\n}\n","import {decorateMethodsOf, DecoratorTypes, Type, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport {JsonEntityStore} from \"../../domain/JsonEntityStore.js\";\nimport {JsonMethodStore} from \"../../domain/JsonMethodStore.js\";\nimport {JsonParameter} from \"../../domain/JsonParameter.js\";\nimport {JsonParameterStore} from \"../../domain/JsonParameterStore.js\";\nimport {JsonParameterTypes} from \"../../domain/JsonParameterTypes.js\";\nimport {JsonSchema, JsonSchemaObject} from \"../../domain/JsonSchema.js\";\n\nexport interface InChainedDecorators {\n <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;\n\n (target: Object, propertyKey: string | symbol, parameterIndex: number): void;\n\n (target: Function): void;\n\n /**\n * Type of this in parameter\n * @param type\n */\n Type(type: Type<any>): this;\n\n /**\n *\n * @param name\n */\n Name(name: string): this;\n\n /**\n *\n * @param description\n */\n Description(description: string): this;\n\n /**\n *\n * @param required\n */\n Required(required?: boolean): this;\n\n /**\n * Add pattern constraint. Only available for OPENAPI.\n * @param pattern\n */\n Pattern(pattern: string | RegExp): this;\n\n /**\n * Add custom schema.\n * @param schema\n */\n Schema(schema: Partial<JsonSchemaObject | JsonSchema>): this;\n}\n\n/**\n * Add a input parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Get(\"/\")\n * @In(\"header\").Type(String).Name(\"Authorization\").Required()\n * method() {\n * }\n * }\n * ```\n * :::\n *\n * @param inType\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n */\nexport function In(inType: JsonParameterTypes | string): InChainedDecorators {\n const jsonParameter = new JsonParameter();\n const schema: any = {};\n\n const decorator = (target: any, propertyKey?: string | symbol, index?: PropertyDescriptor | number) => {\n const store = JsonEntityStore.from(target, propertyKey, index);\n\n switch (store.decoratorType) {\n case DecoratorTypes.PARAM:\n (store as JsonParameterStore).parameter.in(inType);\n break;\n case DecoratorTypes.METHOD:\n jsonParameter.in(inType);\n (store as JsonMethodStore).operation.addParameter(-1, jsonParameter);\n\n jsonParameter.schema(JsonSchema.from(schema));\n break;\n\n case DecoratorTypes.CLASS:\n decorateMethodsOf(target, decorator);\n break;\n\n default:\n throw new UnsupportedDecoratorType(In, [target, propertyKey, index]);\n }\n };\n\n decorator.Type = (type: Type<any>) => {\n schema.type = type;\n\n return decorator;\n };\n\n decorator.Name = (name: string) => {\n jsonParameter.name(name);\n\n return decorator;\n };\n\n decorator.Description = (description: string) => {\n jsonParameter.description(description);\n\n return decorator;\n };\n\n decorator.Required = (required: boolean = true) => {\n jsonParameter.required(required);\n\n return decorator;\n };\n\n decorator.Pattern = (pattern: string | RegExp) => {\n return decorator.Schema({pattern: pattern.toString()});\n };\n\n decorator.Schema = (_schema: any) => {\n Object.assign(schema, _schema.toJSON ? _schema.toJSON() : _schema);\n\n return decorator;\n };\n\n return decorator;\n}\n","import {DecoratorParameters, Metadata, useDecorators, useMethodDecorators} from \"@tsed/core\";\n\nimport {JsonParameterTypes} from \"../../domain/JsonParameterTypes.js\";\nimport {Name} from \"../common/name.js\";\nimport {Consumes} from \"./consumes.js\";\nimport {In} from \"./in.js\";\nimport {Returns} from \"./returns.js\";\n\n/**\n * Add a input file parameter.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application to decorate parameters. Use @@BodyParams@@, @@PathParams@@, etc... instead.\n * But you can use this decorator on Method, to add extra in parameters like Authorization header.\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Post(\"/\")\n * method(@InFile(\"file1\") file: any) {\n * }\n * }\n * ```\n * :::\n *\n * @decorator\n * @swagger\n * @schema\n * @input\n * @operation\n * @param name\n */\nexport function InFile(name: string): ParameterDecorator {\n return (...args: DecoratorParameters): void => {\n const [target, propertyKey, index] = args;\n const multiple = Metadata.getParamTypes(target, propertyKey)[index as number] === Array;\n\n name = (typeof name === \"object\" ? undefined : name)!;\n\n const expression = [name, !multiple && \"0\"].filter(Boolean).join(\".\");\n\n const decorators = useDecorators(\n In(JsonParameterTypes.FILES),\n Name(expression),\n useMethodDecorators(\n Returns(400).Description(\n `<File too long | Too many parts | Too many files | Field name too long | Field value too long | Too many fields | Unexpected field> [fieldName] Example: File too long file1`\n ),\n Consumes(\"multipart/form-data\")\n )\n );\n\n decorators(...args);\n };\n}\n","import {JsonHeader} from \"../../interfaces/JsonOpenSpec.js\";\nimport {Returns} from \"./returns.js\";\n\n/**\n * Sets the response Location HTTP header to the specified path parameter.\n *\n * ```typescript\n * @Location('/foo/bar', {description: 'Location to the next step'})\n * @Location('http://example.com')\n * @Location('back')\n * private myMethod() {\n *\n * }\n * ```\n *\n * A path value of “back” has a special meaning, it refers to the URL specified in the `Referer` header of the request. If the `Referer` header was not specified, it refers to “/”.\n *\n * @param location\n * @param meta\n * @returns {Function}\n * @decorator\n * @operation\n */\nexport function Location(location: string, meta?: JsonHeader) {\n return Returns().Location(location, meta);\n}\n","import {OperationVerbs} from \"../constants/OperationVerbs.js\";\n\nconst ALLOWED_VERBS = new Set([\n ...Object.keys(OperationVerbs)\n .filter((v) => v !== OperationVerbs.CUSTOM)\n .map((v) => v.toLowerCase())\n]);\n\nexport function mapOperationOptions(args: any[]) {\n let method: string | undefined = undefined;\n let path: string | RegExp | undefined = undefined;\n\n const handlers = args.filter((arg: any) => {\n if (typeof arg === \"string\" && ALLOWED_VERBS.has(arg.toLowerCase())) {\n method = arg.toLocaleUpperCase();\n\n return false;\n }\n\n if (typeof arg === \"string\" || arg instanceof RegExp) {\n path = arg || \"/\";\n\n return false;\n }\n\n return !!arg;\n });\n\n return {\n path,\n method,\n use: handlers\n };\n}\n","import {OperationVerbs} from \"../../constants/OperationVerbs.js\";\nimport {DecoratorContext} from \"../../domain/DecoratorContext.js\";\nimport {JsonMethodStore} from \"../../domain/JsonMethodStore.js\";\nimport {JsonMethodPath, type JsonOperation} from \"../../domain/JsonOperation.js\";\nimport {mapOperationOptions} from \"../../utils/mapOperationOptions.js\";\n\nexport interface RouteChainedDecorators {\n <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;\n\n /**\n * @param string\n * @constructor\n */\n Path(string: string): this;\n\n /**\n * Set the operation method\n * @param method\n */\n Method(method: OperationVerbs | string): this;\n\n /**\n * Set the operation id\n * @param id\n */\n Id(id: string): this;\n\n /**\n * Set the operation id\n * @param name\n */\n Name(name: string): this;\n\n /**\n *\n * @param description\n */\n Description(description: string): this;\n\n /**\n * Summary\n * @constructor\n * @param Summary\n */\n Summary(Summary: string): this;\n\n Use(...args: any[]): this;\n\n UseAfter(...args: any[]): this;\n\n UseBefore(...args: any[]): this;\n}\n\nclass OperationDecoratorContext extends DecoratorContext<RouteChainedDecorators> {\n readonly methods: string[] = [\"name\", \"description\", \"summary\", \"method\", \"id\", \"use\", \"useAfter\", \"useBefore\"];\n protected declare entity: JsonMethodStore;\n protected operationPath: JsonMethodPath;\n\n protected beforeInit() {\n const path: string = this.get(\"path\");\n const method: string = OperationVerbs[this.get(\"method\") as OperationVerbs] || OperationVerbs.CUSTOM;\n\n if (path) {\n this.operationPath = this.entity.operation.addOperationPath(method, path);\n }\n }\n\n protected onMapKey(key: string, value: any) {\n switch (key) {\n case \"name\":\n case \"id\":\n this.entity.operation.operationId(value);\n return;\n case \"summary\":\n this.operationPath?.summary(value);\n this.entity.operation.summary(value);\n return;\n case \"description\":\n this.operationPath?.description(value);\n this.entity.operation.description(value);\n\n return;\n case \"use\":\n this.entity.use(value);\n return;\n case \"useAfter\":\n this.entity.after(value);\n return;\n case \"useBefore\":\n this.entity.before(value);\n return;\n }\n\n return super.onMapKey(key, value);\n }\n}\n\n/**\n * Describe a new route with a method and path.\n *\n * ```typescript\n * @Controller('/')\n * export class Ctrl {\n *\n * @Route('GET', '/')\n * get() { }\n * }\n *\n * ```\n *\n * @returns {Function}\n * @param method\n * @param path\n * @param args\n * @decorator\n * @operation\n */\nexport function Operation(method: string, path: string, ...args: any[]): RouteChainedDecorators;\nexport function Operation(...args: any[]): RouteChainedDecorators;\nexport function Operation(...args: any[]): RouteChainedDecorators {\n const routeOptions = mapOperationOptions(args);\n\n const context = new OperationDecoratorContext(routeOptions);\n\n return context.build();\n}\n","import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Set a swagger operationId explicitly.\n *\n * @param operationId\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationId(operationId: string): MethodDecorator {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationId, args);\n }\n\n store.operation!.operationId(operationId);\n });\n}\n","import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport {OperationVerbs} from \"../../constants/OperationVerbs.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Declare new Operation with his path and http method.\n *\n * ::: warning\n * Don't use decorator with Ts.ED application.\n *\n * Use these decorators instead:\n *\n * <ApiList query=\"status.includes('decorator') && status.includes('httpMethod')\" />\n *\n * :::\n *\n * @param method\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function OperationPath(method: OperationVerbs | string, path: string | RegExp = \"/\") {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(OperationPath, args);\n }\n\n store.operation!.addOperationPath(method.toUpperCase(), path);\n });\n}\n","import {Groups} from \"../common/groups.js\";\n\n/**\n * Apply Partial group strategy on the input model\n *\n * @decorator\n * @validation\n * @swagger\n * @schema\n * @input\n */\nexport function Partial(): ParameterDecorator {\n return Groups(\"partial\") as any;\n}\n","import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Set class path to expose all endpoints\n *\n * ::: warning\n * Don't use this decorator to change the path if you develop your application with Ts.ED.\n * :::\n *\n * @param path\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Path(path: string): ClassDecorator {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.CLASS) {\n throw new UnsupportedDecoratorType(Path, args);\n }\n\n store.path = path;\n });\n}\n","import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Add produces metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Produces(\"text/html\")\n * id: string;\n * }\n * ```\n *\n * ::: warning\n * For openspec v3 prefer `@Returns().ContentType()` usage (see @@Returns@@).\n * :::\n *\n * @param produces\n * @decorator\n * @swagger\n * @methodDecorator\n * @classDecorator\n * @operation\n * @response\n */\nexport function Produces(...produces: string[]): ClassDecorator & MethodDecorator {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation!.produces(produces);\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Produces(...produces));\n break;\n\n default:\n throw new UnsupportedDecoratorType(Produces, args);\n }\n });\n}\n","import {OperationVerbs} from \"../../constants/OperationVerbs.js\";\nimport {Operation} from \"./operation.js\";\n\nexport function Publish(event: string) {\n return Operation(OperationVerbs.PUBLISH, event);\n}\n","import {isNumber, isString, useDecorators} from \"@tsed/core\";\n\nimport {JsonHeader} from \"../../interfaces/JsonOpenSpec.js\";\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\nimport {Returns} from \"./returns.js\";\n\n/**\n * Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code . If not specified, status defaults to “302 “Found”.\n *\n * ```typescript\n * @Redirect('/foo/bar')\n * @Redirect(301, 'http://example.com').Type(Model)\n * private myMethod() {}\n * ```\n * Redirects can be a fully-qualified URL for redirecting to a different site:\n *\n * ```typescript\n * @Redirect('http://google.com');\n * private myMethod() {}\n * ```\n *\n * Redirects can be relative to the root of the host name. For example, if the application is on http://example.com/admin/post/new, the following would redirect to the URL http://example.com/admin:\n *\n * ```typescript\n * @Redirect('/admin');\n * ```\n * Redirects can be relative to the current URL. For example, from http://example.com/blog/admin/ (notice the trailing slash), the following would redirect to the URL http://example.com/blog/admin/post/new.\n *\n * ```typescript\n * @Redirect('post/new');\n * ```\n *\n * Redirecting to post/new from http://example.com/blog/admin (no trailing slash), will redirect to http://example.com/blog/post/new.\n *\n * If you found the above behavior confusing, think of path segments as directories (with trailing slashes) and files, it will start to make sense.\n *\n * Path-relative redirects are also possible. If you were on http://example.com/admin/post/new, the following would redirect to http//example.com/admin/post:\n *\n * ```typescript\n * @Redirect('..');\n * ``\n *\n * A back redirection redirects the request back to the referer, defaulting to / when the referer is missing.\n *\n * ```typescript\n * @Redirect('back');\n * ```\n *\n * @param url\n * @param meta\n * @decorator\n * @operation\n * @response\n * @headers\n */\nexport function Redirect(url: string, meta?: JsonHeader): MethodDecorator;\nexport function Redirect(status: number, url: string, meta?: JsonHeader): MethodDecorator;\nexport function Redirect(...args: any[]): MethodDecorator {\n const {status, url, meta} = args.reduce(\n (options: any, value: any) => {\n if (isNumber(value)) {\n options.status = value;\n return options;\n }\n\n if (isString(value)) {\n options.url = value;\n return options;\n }\n\n options.meta = value;\n return options;\n },\n {status: 302, url: \"\", meta: {}}\n );\n return useDecorators(\n Returns(status).Location(url, meta),\n JsonEntityFn((entity) => {\n entity.operation?.setRedirection(status);\n })\n );\n}\n","import {OperationVerbs} from \"../../constants/OperationVerbs.js\";\nimport {Operation} from \"./operation.js\";\n\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function All(path: string | RegExp | unknown = \"/\", ...args: unknown[]) {\n return Operation(...[OperationVerbs.ALL, path].concat(args));\n}\n\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Get(path: string | RegExp | unknown = \"/\", ...args: unknown[]) {\n return Operation(...[OperationVerbs.GET, path].concat(args));\n}\n\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Post(path: string | RegExp | unknown = \"/\", ...args: unknown[]) {\n return Operation(...[OperationVerbs.POST, path].concat(args));\n}\n\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Put(path: string | RegExp | unknown = \"/\", ...args: unknown[]) {\n return Operation(...[OperationVerbs.PUT, path].concat(args));\n}\n\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Delete(path: string | RegExp | unknown = \"/\", ...args: unknown[]) {\n return Operation(...[OperationVerbs.DELETE, path].concat(args));\n}\n\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Head(path: string | RegExp | unknown = \"/\", ...args: unknown[]) {\n return Operation(...[OperationVerbs.HEAD, path].concat(args));\n}\n\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Patch(path: string | RegExp | any = \"/\", ...args: any[]) {\n return Operation(...[OperationVerbs.PATCH, path].concat(args));\n}\n\n/**\n * This method is just like the `router.METHOD()` methods, except that it matches all HTTP methods (verbs).\n *\n * This method is extremely useful for mapping “global” logic for specific path prefixes or arbitrary matches.\n * For example, if you placed the following route at the top of all other route definitions, it would require that\n * all routes from that point on would require authentication, and automatically load a user.\n * Keep in mind that these callbacks do not have to act as end points; loadUser can perform a task, then call next()\n * to continue matching subsequent routes.\n * @param path\n * @param args\n * @returns {Function}\n * @decorator\n * @operation\n * @httpMethod\n */\nexport function Options(path: string | RegExp | unknown = \"/\", ...args: unknown[]) {\n return Operation(...[OperationVerbs.OPTIONS, path].concat(args));\n}\n","import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {OpenSpecSecurity} from \"@tsed/openspec\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Add security metadata on the decorated method.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Security(\"write:calendars\")\n * async method() {}\n * }\n * ```\n *\n * @param name\n * @param scopes\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Security(name: string, ...scopes: string[]): ClassDecorator & MethodDecorator;\n/**\n * Add security metadata on the decorated method.\n *\n * You can use it to add multiple authentication types.\n * See <https://swagger.io/docs/specification/authentication/#multiple>.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class ModelCtrl {\n * @Security([{ \"A\": [\"scope-1\"] }, { \"B\": [], \"C\": [\"scope-2\", \"scope-3\"]}])\n * async method() {}\n * }\n * ```\n * this will add the following security metadata\n * ```yaml\n * security: # A OR (B AND C)\n * - A: [\"scope-1\"]\n * - B: []\n * C: [\"scope-2\", \"scope-3\"]\n * ```\n *\n * @param security\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Security(security: OpenSpecSecurity): ClassDecorator & MethodDecorator;\nexport function Security(nameOrSecurity: string | OpenSpecSecurity, ...scopes: string[]): ClassDecorator & MethodDecorator {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n if (Array.isArray(nameOrSecurity)) {\n store.operation!.security(nameOrSecurity);\n } else {\n store.operation!.addSecurityScopes(nameOrSecurity, scopes);\n }\n break;\n case DecoratorTypes.CLASS:\n if (Array.isArray(nameOrSecurity)) {\n decorateMethodsOf(args[0], Security(nameOrSecurity));\n } else {\n decorateMethodsOf(args[0], Security(nameOrSecurity, ...scopes));\n }\n break;\n\n default:\n throw new UnsupportedDecoratorType(Security, args);\n }\n });\n}\n","import {Type} from \"@tsed/core\";\n\nimport {Returns, ReturnsChainedDecorators} from \"./returns.js\";\n\n/**\n * Add responses documentation for a specific status code.\n *\n * ## Usage\n *\n * Ts.ED v6 API introducing the chaining decorator concept.\n * Now a decorator like Returns can be used with another decorators like Description.\n *\n * ```typescript\n * import {Returns} from \"@tsed/schema\";\n *\n * @Controller(\"/\")\n * class MyController {\n * @Status(404, String).Description(\"Not Found\")\n * @Status(200, Model).Description(\"Success\")\n * async myMethod(): Promise<Model> {}\n * }\n * ```\n *\n * ::: tip\n * TypeScript and your IDE will discover automatically the chained decorators. But for more details you can look on @@ReturnsChainedDecorators@@ interface, to know\n * what chained decorators are available under Returns decorator.\n * :::\n *\n * This example will produce this documentation in swagger:\n *\n * ```json\n * {\n * \"responses\": {\n * \"404\": {\n * \"description\": \"Description\",\n * \"schema\": {\"type\": \"string\"}\n * },\n * \"2OO\": {\n * \"description\": \"Description\",\n * \"schema\": {\"$ref\": \"...\"}\n * }\n * }\n * }\n * ```\n *\n * ### Declaring a generic model\n *\n * Sometime, it might be useful to use generic models. TypeScript doesn't store the generic type in the metadata. This is why we need to\n * declare explicitly the generic models with the decorators.\n *\n * One of the generic's usage, can be a paginated list. With Returns decorator it's now possible to declare generic type and generate the appropriate OpenSpec documentation.\n *\n * Starting with the pagination model, by using @@Generics@@ and @@CollectionOf@@:\n *\n * ```typescript\n * @Generics(\"T\")\n * class Pagination<T> {\n * @CollectionOf(\"T\")\n * data: T[];\n *\n * @Property()\n * totalCount: number;\n * }\n * ```\n *\n * Now, we need a model to be used with the generic Pagination model:\n *\n * ```typescript\n * class Product {\n * @Property()\n * id: string;\n *\n * @Property()\n * title: string;\n * }\n * ```\n *\n * Finally, we can use our models on a method as following:\n *\n * ```typescript\n * class Controller {\n * @OperationPath(\"POST\", \"/\")\n * @Status(200, Pagination).Of(Product).Description(\"description\")\n * async method(): Promise<Pagination<Product> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * ### Declaring a nested generics models <Badge text=\"6+\"/>\n *\n * It's also possible to declare a nested generics models in order to have this type `Pagination<Submission<Product>>`:\n *\n * ```typescript\n * import {Post, Generics, Property, Returns} from \"@tsed/schema\";\n *\n * class Controller {\n * @Post(\"/\")\n * @Status(200, Pagination).Of(Submission).Nested(Product).Description(\"description\")\n * async method(): Promise<Pagination<Submission<Product>> | null> {\n * return null;\n * }\n * }\n * ```\n *\n * And here is the Submission model:\n *\n * ```typescript\n * import {Generics, Property} from \"@tsed/schema\";\n *\n * @Generics(\"T\")\n * class Submission<T> {\n * @Property()\n * _id: string;\n * @Property(\"T\")\n * data: T;\n * }\n * ```\n *\n * @param status\n * @param model\n * @decorator\n * @swagger\n * @schema\n * @response\n * @operation\n */\nexport function Status(status: string | number, model?: Type<any> | any): ReturnsChainedDecorators {\n return Returns(status, model);\n}\n","import {OperationVerbs} from \"../../constants/OperationVerbs.js\";\nimport {Operation} from \"./operation.js\";\n\nexport function Subscribe(event: string) {\n return Operation(OperationVerbs.SUBSCRIBE, event);\n}\n","import {DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\n/**\n * Add summary metadata on the decorated element.\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * class Model {\n * @Summary(\"summary\")\n * id: string;\n * }\n * ```\n *\n * @param summary\n * @decorator\n * @swagger\n * @schema\n * @operation\n */\nexport function Summary(summary: string): MethodDecorator {\n return JsonEntityFn((store, args) => {\n if (store.decoratorType !== DecoratorTypes.METHOD) {\n throw new UnsupportedDecoratorType(Summary, args);\n }\n\n store.operation!.summary(summary);\n });\n}\n","import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from \"@tsed/core\";\nimport {OpenSpecTag} from \"@tsed/openspec\";\n\nimport {JsonEntityFn} from \"../common/jsonEntityFn.js\";\n\nfunction mapTags(tags: (string | OpenSpecTag)[]) {\n return tags.map((tag) => {\n if (typeof tag === \"string\") {\n return {\n name: tag\n };\n }\n\n return tag;\n });\n}\n\n/**\n * Add metadata tags to the decorated element (class or method).\n *\n * ## Examples\n * ### On method\n *\n * ```typescript\n * @Controller(\"/\")\n * class MyController {\n * @Tags(\"api\")\n * get() {}\n * }\n * ```\n * ### On Class\n *\n * ```typescript\n * @Controller(\"/\")\n * @Tags(\"api\")\n * class MyController {\n * get() {}\n * }\n * ```\n *\n * @param tags\n * @decorator\n * @swagger\n * @schema\n * @classDecorator\n * @operation\n */\nexport function Tags(...tags: (string | OpenSpecTag)[]): ClassDecorator & MethodDecorator {\n return JsonEntityFn((store, args) => {\n switch (store.decoratorType) {\n case DecoratorTypes.METHOD:\n store.operation!.addTags(mapTags(tags));\n break;\n case DecoratorTypes.CLASS:\n decorateMethodsOf(args[0], Tags(...tags));\n break;\n\n default:\n throw new UnsupportedDecoratorType(Tags, args);\n }\n });\n}\n","import {StoreSet} from \"@tsed/core\";\n\n/**\n * Use a view and sends the rendered HTML string to the client. Optional parameter:\n *\n * * viewOptions, an object whose properties define local variables for the view.\n *\n * The view argument is a string that is the file path of the view file to render.\n * This can be an absolute path, or a path relative to the views setting.\n * If the path does not contain a file extension, then the view engine setting determines the file extension.\n * If the path does contain a file extension, then Express will load the module for the specified template engine (via require())\n * and render it using the loaded module’s __express function.\n *\n * For more information, see [Using template engines with Express](http://expressjs.com/guide/using-template-engines.html).\n *\n * > NOTE: The view argument performs file system operations like reading a file from disk and evaluating Node.js modules,\n * and as so for security reasons should not contain input from the end-user.\n *\n * @param path Relative path to the view file.\n * @param options Additional options\n * @decorator\n * @operation\n * @response\n */\nexport function View(path: string, options?: Object): MethodDecorator {\n return StoreSet(\"view\", {path, options}) as any;\n}\n","export function concatPath(basePath: string | undefined | RegExp, path: string | undefined | RegExp): any {\n if (basePath instanceof RegExp || path instanceof RegExp) {\n if (!basePath) {\n return path;\n }\n\n if (!path) {\n return basePath;\n }\n\n const r1 = basePath instanceof RegExp ? basePath : new RegExp(basePath, \"gi\");\n const r2 = path instanceof RegExp ? path : new RegExp(path, \"gi\");\n\n return new RegExp(r1.source + r2.source, (r1.global ? \"g\" : \"\") + (r1.ignoreCase ? \"i\" : \"\") + (r1.multiline ? \"m\" : \"\"));\n }\n\n if (basePath && path && basePath.endsWith(\"/\") && path.startsWith(\"/\")) {\n path = path.slice(1);\n }\n\n const result = (basePath || \"\") + (path || \"\");\n\n return result.endsWith(\"/\") && result.length > 1 ? result.slice(0, -1) : result;\n}\n","import {Type} from \"@tsed/core\";\n\nimport {concatPath} from \"../utils/concatPath.js\";\nimport {JsonMethodStore} from \"./JsonMethodStore.js\";\nimport {JsonMethodPath, JsonOperation} from \"./JsonOperation.js\";\n\nexport class JsonOperationRoute<Entity extends JsonMethodStore = JsonMethodStore> {\n readonly token: Type<any>;\n readonly endpoint: Entity;\n readonly operationPath?: JsonMethodPath;\n readonly basePath?: string;\n readonly paramsTypes: Record<string, boolean>;\n\n constructor(options: Partial<JsonOperationRoute>) {\n Object.assign(this, options);\n\n this.paramsTypes = this.endpoint.getParamTypes();\n }\n\n get url() {\n return this.fullPath;\n }\n\n get path() {\n return this.operationPath?.path;\n }\n\n get fullPath() {\n return concatPath(this.basePath, this.path as any);\n }\n\n get method() {\n return this.operationPath?.method || \"USE\";\n }\n\n get name() {\n return `${this.endpoint.targetName}.${this.methodClassName}()`;\n }\n\n get className() {\n return this.endpoint.targetName;\n }\n\n get methodClassName() {\n return this.propertyKey;\n }\n\n get parameters() {\n return this.endpoint.parameters;\n }\n\n get propertyKey() {\n return String(this.endpoint.propertyKey);\n }\n\n get propertyName() {\n return this.endpoint.propertyName;\n }\n\n get store() {\n return this.endpoint.store;\n }\n\n get operation(): JsonOperation {\n return this.endpoint.operation as JsonOperation;\n }\n\n get operationId() {\n return this.operation.get(\"operationId\") || this.endpoint.propertyKey;\n }\n\n has(key: string) {\n return this.paramsTypes[key];\n }\n}\n","import type {AnyJsonSchema, JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26\n */\nexport function allOf(...allOf: AnyJsonSchema[]): JsonSchema {\n return from().allOf(allOf);\n}\n","import type {AnyJsonSchema, JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function any(...types: AnyJsonSchema[]): JsonSchema {\n return from().any(...types);\n}\n","import type {AnyJsonSchema, JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27\n */\nexport function anyOf(...anyOf: AnyJsonSchema[]): JsonSchema {\n return from().anyOf(anyOf);\n}\n","import type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a new boolean model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function boolean(): JsonSchema {\n return from(Boolean);\n}\n","import type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"array\"\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function array(): JsonSchema {\n return from(Array);\n}\n\n/**\n * Declare a new object model with `additionalProperties: true`.\n *\n * ```json\n * {\n * \"type\": \"object\",\n * \"additionalProperties\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function map(): JsonSchema {\n return from(Map).unknown(true);\n}\n\n/**\n * Declare a new array model with `uniqueItems: true`.\n *\n * ```json\n * {\n * \"type\": \"array\",\n * \"uniqueItems\": true\n * }\n * ```\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function set(): JsonSchema {\n return from(Array).uniqueItems(true);\n}\n","import {JsonFormatTypes} from \"../domain/JsonFormatTypes.js\";\nimport type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a new string model with `format: date`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function date(): JsonSchema {\n return from(Date).format(JsonFormatTypes.DATE);\n}\n\n/**\n * Declare a new string model with `format: datetime`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function datetime(): JsonSchema {\n return from(Date).format(JsonFormatTypes.DATE_TIME);\n}\n\n/**\n * Declare a new string model with `format: time`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function time(): JsonSchema {\n return from(Date).format(JsonFormatTypes.TIME);\n}\n","import {JsonFormatTypes} from \"../domain/JsonFormatTypes.js\";\nimport type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a new string model with `format: email`.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * ### Example\n *\n * ```typescript\n * const schema = email();\n * // Results in: { type: \"string\", format: \"email\" }\n * ```\n */\nexport function email(): JsonSchema {\n return from(String).format(JsonFormatTypes.EMAIL);\n}\n","import {enumsRegistry} from \"../registries/enumRegistries.js\";\nimport {string} from \"./string.js\";\n\nexport function enums(e: Record<string, any>) {\n const schema = string().enum(e);\n enumsRegistry.set(e, schema);\n\n return schema;\n}\n","import type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n/**\n * Declare a new integer model.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * @returns {JsonSchema} A schema configured for integer values\n * @function\n */\nexport function integer(): JsonSchema {\n return from(Number).integer();\n}\n","import type {Type} from \"@tsed/core\";\n\nimport {JsonEntityStore} from \"../domain/JsonEntityStore.js\";\nimport {JsonLazyRef} from \"../domain/JsonLazyRef.js\";\n\n/**\n * Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.\n */\nexport function lazyRef(cb: () => Type<any>) {\n try {\n // solve issue with a self referenced model\n if (cb()) {\n // type is already accessible\n return JsonEntityStore.from(cb()).schema as any;\n }\n } catch (er) {}\n\n return new JsonLazyRef(cb);\n}\n","import {from} from \"./from.js\";\n\n/**\n * Declare a new number model.\n *\n * * See @@JsonSchema@@ to discover available methods.\n */\nexport function number() {\n return from(Number);\n}\n","import {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a new object model.\n *\n * See @@JsonSchema@@ to discover available methods.\n *\n * ### Example\n *\n * ```typescript\n * const userSchema = object({\n * name: string(),\n * age: number()\n * });\n * ```\n *\n * @param properties - An object containing property definitions where each value is a JsonSchema\n * @returns {JsonSchema} A new object model with the specified properties\n */\nexport function object(properties: {[key: string]: JsonSchema} = {}): JsonSchema {\n return from(Object).properties(properties);\n}\n","import type {AnyJsonSchema, JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28\n */\nexport function oneOf(...oneOf: AnyJsonSchema[]): JsonSchema {\n return from().oneOf(oneOf);\n}\n","import {JsonFormatTypes} from \"../domain/JsonFormatTypes.js\";\nimport type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a new string model with `format: uri`.\n *\n * * See @@JsonSchema@@ to discover available methods.\n *\n * @schemaFunctional\n */\nexport function uri(): JsonSchema {\n return from(String).format(JsonFormatTypes.URI);\n}\n","import {JsonFormatTypes} from \"../domain/JsonFormatTypes.js\";\nimport type {JsonSchema} from \"../domain/JsonSchema.js\";\nimport {from} from \"./from.js\";\n\n/**\n * Declare a new string model with `format: url`.\n *\n * See @@JsonSchema@@ to discover available methods.\n */\nexport function url(): JsonSchema {\n return from(String).format(JsonFormatTypes.URL);\n}\n","import {deepMerge, mergeReducerBuilder} from \"@tsed/core\";\nimport {OpenSpec2, OpenSpec3} from \"@tsed/openspec\";\n\n/**\n * @ignore\n */\nexport const schemesReducer = mergeReducerBuilder((current, value) => {\n if (current.type && current.type && current.type === value.type && value.type === \"array\") {\n return JSON.stringify(current.items) === JSON.stringify(value.items);\n }\n\n return (current.type && current.type === value.type) || (current.$ref && current.$ref === value.$ref);\n});\n\n/**\n * @ignore\n */\nexport const parameters = mergeReducerBuilder((current, value) => current.in === value.in && current.name === value.name);\n\n/**\n * @ignore\n */\nexport const security = mergeReducerBuilder((current, value) => {\n return !!Object.keys(value).find((key) => !!current[key]);\n});\n\n/**\n * @ignore\n */\nexport const tagsReducer = mergeReducerBuilder((current, value) => current.name === value.name);\n\n/**\n * @ignore\n */\nconst SPEC_REDUCERS = {\n security,\n parameters,\n oneOf: schemesReducer,\n anyOf: schemesReducer,\n allOf: schemesReducer,\n tags: tagsReducer\n};\n\n/**\n * Merge two spec\n * @param spec\n * @param input\n */\nexport function mergeSpec<Spec = OpenSpec2 | OpenSpec3>(spec: Partial<Spec>, input: Partial<Spec>): Partial<Spec> {\n return deepMerge(spec, input, {\n reducers: SPEC_REDUCERS,\n cleanUndefinedProps: true\n });\n}\n","import {cleanObject, isArray, Type, uniqBy} from \"@tsed/core\";\nimport {OpenSpec3} from \"@tsed/openspec\";\n\nimport {SpecTypes} from \"../domain/SpecTypes.js\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer.js\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore.js\";\nimport {mergeSpec} from \"./mergeSpec.js\";\nimport {operationIdFormatter} from \"./operationIdFormatter.js\";\n\nexport type JsonTokenOptions = ({token: Type<any>} & Partial<SpecSerializerOptions>)[];\n\nexport interface SpecSerializerOptions extends JsonSchemaOptions {\n /**\n * Paths\n */\n paths?: Record<string, any>;\n /**\n * Channels\n */\n channels?: Record<string, any>;\n /**\n * Root path. This paths will be added to all generated paths Object.\n */\n rootPath?: string;\n /**\n * A function to generate the operationId.\n */\n operationIdFormatter?: (name: string, propertyKey: string, path: string) => string;\n /**\n * A pattern to generate the operationId.\n */\n operationIdPattern?: string;\n}\n\n/**\n * @ignore\n */\nconst caches: Map<Type<any>, Map<string, any>> = new Map();\n\n/**\n * @ignore\n */\nfunction get(model: Type<any>, options: any, cb: any) {\n if (!caches.has(model)) {\n caches.set(model, new Map());\n }\n\n const cache = caches.get(model)!;\n const key = JSON.stringify(options);\n\n if (!cache.has(key)) {\n cache.set(key, cb());\n }\n\n return cache.get(key);\n}\n\nfunction generate(model: Type<any>, options: SpecSerializerOptions) {\n const store = getJsonEntityStore(model);\n const {rootPath = \"/\"} = options;\n\n options = {\n ...options,\n rootPath,\n defaultTags: [\n cleanObject({\n name: store.schema.getName(),\n description: store.schema.get(\"description\")\n })\n ]\n };\n\n return execMapper(\"generate\", [store], options);\n}\n\n/**\n * Return the swagger or open spec for the given class.\n * @param model\n * @param options\n */\nexport function getSpec(model: Type<any> | JsonTokenOptions, options: SpecSerializerOptions = {}): Partial<OpenSpec3> {\n options = {\n specType: SpecTypes.OPENAPI,\n ...options,\n tags: [],\n paths: {},\n channels: {},\n components: {},\n operationIdFormatter: options.operationIdFormatter || operationIdFormatter(options.operationIdPattern),\n root: false\n };\n\n if (isArray(model)) {\n let finalSpec: any = {};\n\n options = {\n ...options,\n append(spec: any) {\n finalSpec = mergeSpec(finalSpec, spec);\n }\n };\n\n model.forEach(({token, ...opts}) => {\n const spec = getSpec(token, {\n ...options,\n ...opts\n });\n\n options.append(spec);\n });\n\n return finalSpec;\n }\n\n return get(model, options, () => generate(model, options));\n}\n","import {OpenSpec2, OpenSpec3} from \"@tsed/openspec\";\n\nimport {SpecTypes} from \"../domain/SpecTypes.js\";\n\n/**\n * @ignore\n * @param version\n */\nexport function getSpecType(version: string) {\n return version.startsWith(\"3.\") ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n\n/**\n * @ignore\n * @param spec\n */\nexport function getSpecTypeFromSpec(spec: Partial<OpenSpec2 | OpenSpec3>) {\n return \"openapi\" in spec ? SpecTypes.OPENAPI : SpecTypes.SWAGGER;\n}\n","import {cleanObject} from \"@tsed/core\";\nimport {OpenSpecInfo} from \"@tsed/openspec\";\n\n/**\n * @ignore\n * @param info\n */\nexport function mapOpenSpecInfo(info: Partial<OpenSpecInfo>): OpenSpecInfo {\n const {title, description, version, termsOfService, contact, license} = info;\n\n return cleanObject({\n version,\n title,\n description,\n termsOfService,\n contact,\n license\n });\n}\n","import {getValue, uniq} from \"@tsed/core\";\nimport {OpenSpec2} from \"@tsed/openspec\";\n\nimport {mapOpenSpecInfo} from \"./mapOpenSpecInfo.js\";\n\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n * @param acceptMimes\n */\nexport function mapOpenSpec2(\n spec: Partial<OpenSpec2>,\n {version, specVersion, acceptMimes = [\"application/json\"]}: any\n): Partial<OpenSpec2> {\n const {\n paths,\n security,\n tags,\n host,\n basePath,\n schemes,\n consumes = [],\n produces = [\"application/json\"],\n definitions,\n parameters,\n responses,\n securityDefinitions,\n externalDocs\n } = spec;\n\n return {\n swagger: specVersion,\n consumes: uniq([...acceptMimes, ...consumes]),\n produces: uniq<string>([...produces]),\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n paths,\n host,\n basePath,\n schemes,\n definitions,\n parameters,\n responses,\n security,\n securityDefinitions,\n tags,\n externalDocs\n };\n}\n","import {getValue} from \"@tsed/core\";\nimport {OpenSpec3} from \"@tsed/openspec\";\n\nimport {mapOpenSpecInfo} from \"./mapOpenSpecInfo.js\";\n\n/**\n * @ignore\n * @param spec\n * @param version\n * @param specVersion\n */\nexport function mapOpenSpec3(spec: any, {specVersion}: any): Partial<OpenSpec3> {\n const {servers, paths, components, security, tags, externalDocs} = spec;\n\n return {\n openapi: specVersion,\n info: mapOpenSpecInfo(getValue(spec, \"info\", {})),\n servers,\n paths,\n components,\n security,\n tags,\n externalDocs\n };\n}\n","import {getValue, setValue} from \"@tsed/core\";\nimport {OpenSpec2, OpenSpec3, OpenSpecVersions} from \"@tsed/openspec\";\n\nimport {SpecTypes} from \"../domain/SpecTypes.js\";\nimport {getSpecType} from \"./getSpecType.js\";\nimport {mapOpenSpec2} from \"./mapOpenSpec2.js\";\nimport {mapOpenSpec3} from \"./mapOpenSpec3.js\";\nimport {mergeSpec} from \"./mergeSpec.js\";\n\n/**\n * @ignore\n * @param spec\n * @param fileSpec\n * @param version\n * @param acceptMimes\n * @param specVersion\n */\nexport function mapOpenSpec(spec: any, {fileSpec, acceptMimes, specVersion, version}: any): Partial<OpenSpec2 | OpenSpec3> {\n specVersion = specVersion || getValue<OpenSpecVersions>(spec, \"openapi\", getValue(spec, \"swagger\", \"2.0\"));\n\n const options = {\n specVersion,\n acceptMimes\n };\n\n switch (getSpecType(specVersion)) {\n case SpecTypes.OPENAPI:\n spec = mapOpenSpec3(spec, options);\n fileSpec = fileSpec ? mapOpenSpec3(fileSpec, options) : fileSpec;\n break;\n default:\n case SpecTypes.SWAGGER:\n spec = mapOpenSpec2(spec, options);\n fileSpec = fileSpec ? mapOpenSpec2(fileSpec, options) : fileSpec;\n break;\n }\n\n spec = mergeSpec(spec, fileSpec);\n\n setValue(spec, \"info.title\", getValue(spec, \"info.title\", \"Api documentation\"));\n setValue(spec, \"info.version\", getValue(spec, \"info.version\", version));\n\n return spec;\n}\n","\"use strict\";\nimport {cleanObject} from \"@tsed/core\";\nimport {OpenSpec2, OpenSpec3, type OS2Security, OS3Operation} from \"@tsed/openspec\";\n\nconst HTTP_METHODS = [\"get\", \"put\", \"post\", \"delete\", \"options\", \"head\", \"patch\", \"trace\"];\nconst SCHEMA_PROPERTIES = [\n \"format\",\n \"minimum\",\n \"maximum\",\n \"exclusiveMinimum\",\n \"exclusiveMaximum\",\n \"minLength\",\n \"maxLength\",\n \"multipleOf\",\n \"minItems\",\n \"maxItems\",\n \"uniqueItems\",\n \"minProperties\",\n \"maxProperties\",\n \"additionalProperties\",\n \"pattern\",\n \"enum\",\n \"default\"\n];\nconst ARRAY_PROPERTIES = [\"type\", \"items\"];\n\nconst APPLICATION_JSON_REGEX = /^(application\\/json|[^;\\/ \\t]+\\/[^;\\/ \\t]+[+]json)[ \\t]*(;.*)?$/;\nconst SUPPORTED_MIME_TYPES: Record<string, any> = {\n APPLICATION_X_WWW_URLENCODED: \"application/x-www-form-urlencoded\",\n MULTIPART_FORM_DATA: \"multipart/form-data\"\n};\n\nfunction fixRef(ref: string) {\n return ref.replace(\"#/components/schemas/\", \"#/definitions/\").replace(\"#/components/\", \"#/x-components/\");\n}\n\nfunction fixRefs(obj: any) {\n if (Array.isArray(obj)) {\n obj.forEach(fixRefs);\n } else if (typeof obj === \"object\") {\n for (let key in obj) {\n if (key === \"$ref\") {\n obj.$ref = fixRef(obj.$ref);\n } else {\n fixRefs(obj[key]);\n }\n }\n }\n}\n\nfunction isJsonMimeType(type: string) {\n return new RegExp(APPLICATION_JSON_REGEX, \"i\").test(type);\n}\n\nfunction getSupportedMimeTypes(content: any) {\n const MIME_VALUES = Object.keys(SUPPORTED_MIME_TYPES).map((key) => {\n return SUPPORTED_MIME_TYPES[key];\n });\n return Object.keys(content).filter((key) => {\n return MIME_VALUES.indexOf(key) > -1 || isJsonMimeType(key);\n });\n}\n\nexport function transformSecurity(securitySchemes: any) {\n function map(security: any): OS2Security | undefined {\n const {scheme, type, name, bearerFormat, flows, ...props} = security;\n\n switch (type) {\n case \"http\":\n if (scheme === \"basic\") {\n return {\n ...props,\n type: scheme\n };\n }\n\n if (scheme === \"bearer\") {\n return {\n ...props,\n type: \"apiKey\",\n name: \"Authorization\",\n in: \"header\"\n };\n }\n break;\n case \"oauth2\":\n const flowName = Object.keys(flows)[0];\n const flow = flows[flowName];\n let flowType = flowName;\n\n if (flowType === \"clientCredentials\") {\n flowType = \"application\";\n } else if (flowType === \"authorizationCode\") {\n flowType = \"accessCode\";\n }\n\n return {\n type,\n flow: flowType as never,\n authorizationUrl: flow.authorizationUrl,\n tokenUrl: flow.tokenUrl,\n scopes: flow.scopes\n };\n }\n }\n\n return Object.entries(securitySchemes).reduce(\n (securityDefinitions, [key, security]) => {\n const securityDefinition = map(security);\n\n if (securityDefinition) {\n securityDefinitions[key] = securityDefinition;\n }\n\n return securityDefinitions;\n },\n {} as Record<string, OS2Security>\n );\n}\n\nexport function transformInformation(server: any) {\n let serverUrl = server.url;\n\n const variables = server[\"variables\"] || {};\n\n for (const variable in variables) {\n const variableObject = variables[variable] || {};\n if (variableObject[\"default\"]) {\n const re = RegExp(`{${variable}}`, \"g\");\n serverUrl = serverUrl.replace(re, variableObject[\"default\"]);\n }\n }\n\n const url = new URL(serverUrl);\n\n return {\n host: url.host ? url.host : undefined,\n basePath: url.pathname,\n schemes: url.protocol !== null ? [url.protocol.substring(0, url.protocol.length - 1)] : undefined\n };\n}\n\nexport class Converter {\n private spec: any;\n\n constructor(spec: Partial<OpenSpec3>) {\n this.spec = JSON.parse(JSON.stringify(spec));\n }\n\n convertInfos() {\n const server = this.spec.servers && this.spec.servers[0];\n\n if (server) {\n return transformInformation(server);\n }\n\n return {};\n }\n\n resolveReference(base: any, obj: any, shouldClone: boolean) {\n if (!obj || !obj.$ref) {\n return obj;\n }\n\n const ref: string = obj.$ref;\n\n if (ref.startsWith(\"#\")) {\n const keys = ref.split(\"/\").map((k) => k.replace(/~1/g, \"/\").replace(/~0/g, \"~\"));\n keys.shift();\n\n let cur = base;\n keys.forEach((k) => {\n cur = cur[k];\n });\n\n return shouldClone ? JSON.parse(JSON.stringify(cur)) : cur;\n }\n }\n\n convert() {\n const spec = {\n swagger: \"2.0\",\n ...this.convertInfos(),\n paths: this.spec.paths ? this.convertOperations(this.spec.paths, this.spec) : undefined\n };\n\n if (this.spec.components) {\n this.convertSchemas();\n this.convertSecurityDefinitions();\n\n this.spec[\"x-components\"] = this.spec.components;\n delete this.spec.components;\n\n fixRefs(this.spec);\n }\n\n delete this.spec.servers;\n delete this.spec.openapi;\n delete this.spec[\"x-components\"];\n\n return cleanObject({\n ...spec,\n ...this.spec\n });\n }\n\n convertOperations(paths: any, spec: any) {\n return Object.entries(paths).reduce((paths, [path, operation]) => {\n const pathObject = (paths[path] = this.resolveReference({...spec, paths}, operation, true));\n\n this.convertParameters(pathObject); // converts common parameters\n\n Object.keys(pathObject).forEach((method) => {\n if (HTTP_METHODS.indexOf(method) >= 0) {\n const operation = (pathObject[method] = this.resolveReference({...spec, paths}, pathObject[method], true));\n\n this.convertOperationParameters(operation);\n this.convertResponses(operation);\n }\n });\n\n return paths;\n }, paths);\n }\n\n convertOperationParameters(operation: OS3Operation) {\n let content, contentKey, mediaRanges, mediaTypes;\n operation.parameters = operation.parameters || [];\n\n if (operation.requestBody) {\n let param = this.resolveReference(this.spec, operation.requestBody, true);\n\n // fixing external $ref in body\n if (operation.requestBody.content) {\n const type = getSupportedMimeTypes(operation.requestBody.content)[0];\n const structuredObj: any = {content: {}};\n const data = operation.requestBody.content[type];\n\n if (data && data.schema && data.schema.$ref && !data.schema.$ref.startsWith(\"#\")) {\n param = this.resolveReference(this.spec, data.schema, true);\n structuredObj[\"content\"][`${type}`] = {schema: param};\n param = structuredObj;\n }\n }\n\n param.name = \"body\";\n content = param.content;\n\n if (content && Object.keys(content).length) {\n mediaRanges = Object.keys(content).filter((mediaRange) => mediaRange.indexOf(\"/\") > 0);\n mediaTypes = mediaRanges.filter((range) => range.indexOf(\"*\") < 0);\n contentKey = getSupportedMimeTypes(content)[0];\n\n delete param.content;\n\n if ([SUPPORTED_MIME_TYPES.APPLICATION_X_WWW_URLENCODED, SUPPORTED_MIME_TYPES.MULTIPART_FORM_DATA].includes(contentKey)) {\n (operation as any).consumes = mediaTypes;\n\n param.in = \"formData\";\n param.schema = content[contentKey].schema;\n param.schema = this.resolveReference(this.spec, param.schema, true);\n\n if (param.schema.type === \"object\" && param.schema.properties) {\n const required = param.schema.required || [];\n\n Object.keys(param.schema.properties).forEach((name) => {\n const schema = param.schema.properties[name];\n\n // readOnly properties should not be sent in requests\n if (!schema.readOnly) {\n const formDataParam: any = {\n name,\n in: \"formData\",\n schema\n };\n if (required.indexOf(name) >= 0) {\n formDataParam.required = true;\n }\n\n operation.parameters?.push(formDataParam);\n }\n });\n } else {\n operation.parameters.push(param);\n }\n } else if (contentKey) {\n (operation as any).consumes = mediaTypes;\n param.in = \"body\";\n param.schema = content[contentKey].schema;\n operation.parameters.push(param);\n } else if (mediaRanges) {\n (operation as any).consumes = mediaTypes || [\"application/octet-stream\"];\n param.in = \"body\";\n param.name = param.name || \"file\";\n delete param.type;\n\n param.schema = content[mediaRanges[0]].schema || {\n type: \"string\",\n format: \"binary\"\n };\n\n operation.parameters.push(param);\n }\n\n if (param.schema) {\n this.convertSchema(param.schema, \"request\");\n }\n }\n\n delete operation.requestBody;\n }\n this.convertParameters(operation);\n }\n\n convertParameters(obj: any) {\n if (obj.parameters === undefined) {\n return;\n }\n\n obj.parameters = obj.parameters || [];\n\n (obj.parameters || []).forEach((param: any, i: number) => {\n param = obj.parameters[i] = this.resolveReference(this.spec, param, false);\n\n if (param.in !== \"body\") {\n this.copySchemaProperties(param, SCHEMA_PROPERTIES);\n this.copySchemaProperties(param, ARRAY_PROPERTIES);\n this.copySchemaXProperties(param);\n\n if (!param.description) {\n const schema = this.resolveReference(this.spec, param.schema, false);\n if (!!schema && schema.description) {\n param.description = schema.description;\n }\n }\n\n if (param.example !== undefined) {\n param[\"x-example\"] = param.example;\n }\n\n delete param.schema;\n delete param.allowReserved;\n delete param.example;\n }\n\n if (param.type === \"array\") {\n let style = param.style || (param.in === \"query\" || param.in === \"cookie\" ? \"form\" : \"simple\");\n\n switch (style) {\n case \"matrix\":\n param.collectionFormat = param.explode ? undefined : \"csv\";\n break;\n case \"label\":\n param.collectionFormat = undefined;\n break;\n case \"simple\":\n param.collectionFormat = \"csv\";\n break;\n case \"spaceDelimited\":\n param.collectionFormat = \"ssv\";\n break;\n case \"pipeDelimited\":\n param.collectionFormat = \"pipes\";\n break;\n case \"deepOpbject\":\n param.collectionFormat = \"multi\";\n break;\n case \"form\":\n param.collectionFormat = param.explode === false ? \"csv\" : \"multi\";\n break;\n }\n }\n\n delete param.style;\n delete param.explode;\n });\n }\n\n copySchemaProperties(obj: any, props: any[]) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n\n if (!schema) {\n return;\n }\n\n props.forEach((prop) => {\n const value = schema[prop];\n\n if (prop === \"additionalProperties\" && typeof value === \"boolean\") {\n return;\n }\n\n if (value !== undefined) {\n obj[prop] = value;\n }\n });\n }\n\n copySchemaXProperties(obj: Record<string, any>) {\n let schema = this.resolveReference(this.spec, obj.schema, true);\n if (!schema) {\n return;\n }\n\n Object.keys(schema).forEach((propName) => {\n if (Reflect.hasOwnProperty.call(schema, propName) && !Reflect.hasOwnProperty.call(obj, propName) && propName.startsWith(\"x-\")) {\n obj[propName] = schema[propName];\n }\n });\n }\n\n convertResponses(operation: Record<string, any>) {\n // var anySchema, code, content, jsonSchema, mediaRange, mediaType, response, resolved, headers\n\n Object.keys(operation.responses || {}).forEach((code) => {\n const response = (operation.responses[code] = this.resolveReference(this.spec, operation.responses[code], true));\n\n if (response.content) {\n let anySchema: any = null;\n let jsonSchema: any = null;\n\n Object.keys(response.content).forEach((mediaRange) => {\n // produces and examples only allow media types, not ranges\n // use application/octet-stream as a catch-all type\n const mediaType = mediaRange.indexOf(\"*\") < 0 ? mediaRange : \"application/octet-stream\";\n\n if (!operation.produces) {\n operation.produces = [mediaType];\n } else if (operation.produces.indexOf(mediaType) < 0) {\n operation.produces.push(mediaType);\n }\n\n const content = response.content[mediaRange];\n anySchema = anySchema || content.schema;\n\n if (!jsonSchema && isJsonMimeType(mediaType)) {\n jsonSchema = content.schema;\n }\n\n if (content.example) {\n response.examples = response.examples || {};\n response.examples[mediaType] = content.example;\n }\n });\n\n if (anySchema) {\n response.schema = jsonSchema || anySchema;\n const resolved = this.resolveReference(this.spec, response.schema, true);\n\n if (resolved && response.schema.$ref && !response.schema.$ref.startsWith(\"#\")) {\n response.schema = resolved;\n }\n\n this.convertSchema(response.schema, \"response\");\n }\n }\n\n Object.keys(response.headers || {}).forEach((header) => {\n // Always resolve headers when converting to v2.\n const resolved = this.resolveReference(this.spec, response.headers[header], true);\n\n // Headers should be converted like parameters.\n if (resolved.schema) {\n resolved.type = resolved.schema.type;\n resolved.format = resolved.schema.format;\n delete resolved.schema;\n }\n\n response.headers[header] = resolved;\n });\n\n delete response.content;\n });\n }\n\n convertSchema(def: any, operationDirection?: any) {\n if (def.oneOf) {\n delete def.oneOf;\n\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n\n if (def.anyOf) {\n delete def.anyOf;\n\n if (def.discriminator) {\n delete def.discriminator;\n }\n }\n\n if (def.allOf) {\n for (const i in def.allOf) {\n this.convertSchema(def.allOf[i], operationDirection);\n }\n }\n\n if (def.discriminator) {\n if (def.discriminator.mapping) {\n this.convertDiscriminatorMapping(def.discriminator.mapping);\n }\n\n def.discriminator = def.discriminator.propertyName;\n }\n\n switch (def.type) {\n case \"object\":\n if (def.properties) {\n Object.keys(def.properties).forEach((propName) => {\n if (def.properties[propName].writeOnly === true && operationDirection === \"response\") {\n delete def.properties[propName];\n } else {\n this.convertSchema(def.properties[propName], operationDirection);\n delete def.properties[propName].writeOnly;\n }\n });\n }\n break;\n case \"array\":\n if (def.items) {\n this.convertSchema(def.items, operationDirection);\n }\n }\n\n if (def.nullable) {\n def[\"x-nullable\"] = true;\n delete def.nullable;\n }\n\n // OpenAPI 3 has boolean \"deprecated\" on Schema, OpenAPI 2 does not\n // Convert to x-deprecated for Autorest (and perhaps others)\n if (def[\"deprecated\"] !== undefined) {\n // Move to x-deprecated, unless it is already defined\n if (def[\"x-deprecated\"] === undefined) {\n def[\"x-deprecated\"] = def.deprecated;\n }\n delete def.deprecated;\n }\n }\n\n convertSchemas() {\n this.spec.definitions = this.spec.components.schemas;\n\n Object.keys(this.spec.definitions || {}).forEach((defName) => {\n this.convertSchema(this.spec.definitions[defName]);\n });\n\n delete this.spec.components.schemas;\n }\n\n convertDiscriminatorMapping(mapping: any) {\n Object.keys(mapping).forEach((payload) => {\n const schemaNameOrRef = mapping[payload];\n\n if (typeof schemaNameOrRef !== \"string\") {\n console.warn(`Ignoring ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n return;\n }\n\n // payload may be a schema name or JSON Reference string.\n // OAS3 spec limits schema names to ^[a-zA-Z0-9._-]+$\n // Note: Valid schema name could be JSON file name without extension.\n // Prefer schema name, with file name as fallback.\n let schema;\n if (/^[a-zA-Z0-9._-]+$/.test(schemaNameOrRef)) {\n try {\n schema = this.resolveReference(this.spec, {$ref: `#/components/schemas/${schemaNameOrRef}`}, false);\n } catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} as schema name in discriminator.mapping: ${err}`);\n }\n }\n\n // schemaNameRef is not a schema name. Try to resolve as JSON Ref.\n if (!schema) {\n try {\n schema = this.resolveReference(this.spec, {$ref: schemaNameOrRef}, false);\n } catch (err) {\n console.debug(`Error resolving ${schemaNameOrRef} for ${payload} in discriminator.mapping: ${err}`);\n }\n }\n\n if (schema) {\n // Swagger Codegen + OpenAPI Generator extension\n // https://github.com/swagger-api/swagger-codegen/pull/4252\n schema[\"x-discriminator-value\"] = payload;\n\n // AutoRest extension\n // https://github.com/Azure/autorest/pull/474\n schema[\"x-ms-discriminator-value\"] = payload;\n } else {\n console.warn(`Unable to resolve ${schemaNameOrRef} for ${payload} in discriminator.mapping.`);\n }\n });\n }\n\n convertSecurityDefinitions() {\n if (this.spec.components.securitySchemes) {\n this.spec.securityDefinitions = transformSecurity(this.spec.components.securitySchemes);\n delete this.spec.components.securitySchemes;\n }\n }\n}\n\nexport function transformToOS2(spec: any): Partial<OpenSpec2> {\n return new Converter(spec).convert();\n}\n","import {getValue} from \"@tsed/core\";\nimport {OpenSpec2, OpenSpec3} from \"@tsed/openspec\";\n\nimport {SpecTypes} from \"../domain/SpecTypes.js\";\nimport {getSpec, JsonTokenOptions, SpecSerializerOptions} from \"./getSpec.js\";\nimport {getSpecTypeFromSpec} from \"./getSpecType.js\";\nimport {mapOpenSpec} from \"./mapOpenSpec.js\";\nimport {mergeSpec} from \"./mergeSpec.js\";\nimport {transformToOS2} from \"./transformToOS2.js\";\n\nexport interface GenerateSpecOptions extends Omit<SpecSerializerOptions, \"specType\"> {\n tokens: JsonTokenOptions;\n version?: string;\n acceptMimes?: string;\n specVersion?: string;\n spec?: any;\n fileSpec?: any;\n sortPaths?: boolean;\n}\n\n/**\n * Generate OpenAPI spec from multiple sources (models, files, conf)\n * @param tokens\n * @param options\n */\nexport function generateSpec({tokens, ...options}: GenerateSpecOptions): OpenSpec2 | OpenSpec3 {\n const {version = \"1.0.0\", acceptMimes, fileSpec = {}, specVersion} = options;\n\n const defaultSpec = mapOpenSpec(getValue(options, \"spec\", {}), {\n fileSpec,\n version,\n specVersion,\n acceptMimes\n });\n\n const specType = getSpecTypeFromSpec(defaultSpec);\n\n let controllersSpec: any = getSpec(tokens, options);\n const spec = mergeSpec(defaultSpec, controllersSpec) as OpenSpec2 | OpenSpec3;\n\n if (options.sortPaths) {\n spec.paths = Object.fromEntries(\n Object.entries(spec.paths!).sort(([k1], [k2]) => {\n return k1.localeCompare(k2);\n })\n );\n }\n\n if (specType === SpecTypes.SWAGGER) {\n return transformToOS2(spec) as any;\n }\n\n return spec;\n}\n","import \"../components/index.js\";\n\nimport {getValue, Type} from \"@tsed/core\";\n\nimport type {JsonEntityStore} from \"../domain/JsonEntityStore.js\";\nimport {SpecTypes} from \"../domain/SpecTypes.js\";\nimport {JsonSchemaOptions} from \"../interfaces/JsonSchemaOptions.js\";\nimport {execMapper} from \"../registries/JsonSchemaMapperContainer.js\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore.js\";\n\n/**\n * @ignore\n */\nconst CACHE_KEY = \"$cache:schemes\";\n\n/**\n * @ignore\n */\nfunction getKey(options: any) {\n return JSON.stringify(options);\n}\n\n/**\n * @ignore\n */\nfunction get(entity: JsonEntityStore, options: any) {\n const cache: Map<string, any> = entity.store.get(CACHE_KEY) || new Map();\n const key = getKey(options);\n\n if (!cache.has(key)) {\n const schema = execMapper(\"schema\", [entity.schema], options);\n\n if (Object.keys(getValue(options, \"components.schemas\", {})).length) {\n schema.definitions = options.components.schemas;\n }\n\n cache.set(key, schema);\n }\n\n entity.store.set(CACHE_KEY, cache);\n\n return cache.get(key);\n}\n\nexport function getJsonSchema(model: Type<any> | any, options: JsonSchemaOptions = {}) {\n const entity = getJsonEntityStore(model);\n const specType = options.specType || SpecTypes.JSON;\n options = {\n endpoint: true,\n groups: [],\n inlineEnums: specType === SpecTypes.JSON,\n ...options,\n specType,\n components: {\n schemas: {}\n }\n };\n\n if (entity.decoratorType === \"parameter\") {\n options = {\n ...options,\n genericTypes: entity.nestedGenerics[0],\n nestedGenerics: entity.nestedGenerics,\n groups: entity.parameter?.groups\n };\n }\n\n return get(entity, options);\n}\n","import {Type} from \"@tsed/core\";\n\nimport {OperationVerbs} from \"../constants/OperationVerbs.js\";\nimport {JsonEntityStore} from \"../domain/JsonEntityStore.js\";\nimport {JsonMethodStore} from \"../domain/JsonMethodStore.js\";\nimport {JsonOperationRoute} from \"../domain/JsonOperationRoute.js\";\nimport {concatPath} from \"./concatPath.js\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore.js\";\nimport {getOperationsStores} from \"./getOperationsStores.js\";\n\nexport interface GetOperationsRoutesOptions {\n withChildren?: boolean;\n basePath?: string;\n allowedVerbs?: OperationVerbs[];\n}\n\nexport function getOperationsRoutes<Entity extends JsonMethodStore = JsonMethodStore>(\n token: Type<any> | any,\n options: GetOperationsRoutesOptions = {}\n): JsonOperationRoute<Entity>[] {\n const store: JsonEntityStore = token.isStore ? token : getJsonEntityStore(token);\n const basePath = concatPath(options.basePath, store.path);\n let operationsRoutes: JsonOperationRoute<Entity>[] = [];\n\n if (options.withChildren) {\n const children = store.get<Type[]>(\"childrenControllers\", []);\n\n operationsRoutes = children.reduce((operationsRoutes, token) => {\n return operationsRoutes.concat(\n getOperationsRoutes(token, {\n ...options,\n basePath\n })\n );\n }, operationsRoutes);\n }\n\n return [...getOperationsStores(token).values()].reduce((routes, endpoint) => {\n const {operation} = endpoint;\n\n if (operation) {\n operation.getAllowedOperationPath(options.allowedVerbs).forEach((operationPath) => {\n routes.push(\n new JsonOperationRoute<Entity>({\n basePath,\n token,\n endpoint,\n operationPath\n })\n );\n });\n }\n\n return routes;\n }, operationsRoutes);\n}\n","import {isBoolean, Type} from \"@tsed/core\";\n\nimport type {JsonClassStore} from \"../domain/JsonClassStore.js\";\nimport type {JsonPropertyStore} from \"../domain/JsonPropertyStore.js\";\nimport {alterIgnore} from \"../hooks/alterIgnore.js\";\nimport {getInheritedStores} from \"./getInheritedStores.js\";\nimport {getJsonEntityStore} from \"./getJsonEntityStore.js\";\n\n/**\n * Return the list of properties including properties from inherited classes\n * @param target\n * @ignore\n */\nexport function getPropertiesStores<T extends JsonPropertyStore = JsonPropertyStore>(\n target: Type<any> | any\n): Map<string | symbol | number, T> {\n const store: JsonClassStore = target.isStore ? target : getJsonEntityStore(target);\n\n if (!store.$properties) {\n const stores = getInheritedStores(store);\n store.$properties = new Map();\n\n stores.forEach((currentStore) => {\n currentStore.children.forEach((propStore) => {\n if (!store.$properties.has(propStore.propertyKey)) {\n store.$properties.set(propStore.propertyKey, propStore);\n }\n });\n });\n }\n\n return store.$properties;\n}\n\n/**\n * @ignore\n */\nexport interface GetPropertiesOptions {\n withIgnoredProps?: boolean;\n groups?: string[] | false;\n\n [type: string]: any;\n}\n\n/**\n * @ignore\n */\nexport function getProperties<T extends JsonPropertyStore = JsonPropertyStore>(\n target: Type<any> | any,\n options: GetPropertiesOptions = {}\n) {\n const stores = getPropertiesStores<T>(target);\n const map: Map<string | symbol | number, T> = new Map();\n\n stores.forEach((store, key) => {\n if (!options.withIgnoredProps) {\n if (alterIgnore(store.itemSchema, options)) {\n return;\n }\n }\n\n map.set(key, store);\n });\n\n return map;\n}\n"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__579__","__WEBPACK_EXTERNAL_MODULE__414__","__WEBPACK_EXTERNAL_MODULE__171__","pico","utils","picomatch","glob","options","returnState","windows","undefined","isWindows","Object","assign","WIN_SLASH","WIN_NO_SLASH","DOT_LITERAL","SLASH_LITERAL","QMARK","END_ANCHOR","START_ANCHOR","DOTS_SLASH","POSIX_CHARS","PLUS_LITERAL","QMARK_LITERAL","ONE_CHAR","NO_DOT","NO_DOTS","NO_DOT_SLASH","NO_DOTS_SLASH","QMARK_NO_DOT","STAR","SEP","WINDOWS_CHARS","MAX_LENGTH","POSIX_REGEX_SOURCE","alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit","REGEX_BACKSLASH","REGEX_NON_SPECIAL_CHARS","REGEX_SPECIAL_CHARS","REGEX_SPECIAL_CHARS_BACKREF","REGEX_SPECIAL_CHARS_GLOBAL","REGEX_REMOVE_BACKSLASH","REPLACEMENTS","CHAR_0","CHAR_9","CHAR_UPPERCASE_A","CHAR_LOWERCASE_A","CHAR_UPPERCASE_Z","CHAR_LOWERCASE_Z","CHAR_LEFT_PARENTHESES","CHAR_RIGHT_PARENTHESES","CHAR_ASTERISK","CHAR_AMPERSAND","CHAR_AT","CHAR_BACKWARD_SLASH","CHAR_CARRIAGE_RETURN","CHAR_CIRCUMFLEX_ACCENT","CHAR_COLON","CHAR_COMMA","CHAR_DOT","CHAR_DOUBLE_QUOTE","CHAR_EQUAL","CHAR_EXCLAMATION_MARK","CHAR_FORM_FEED","CHAR_FORWARD_SLASH","CHAR_GRAVE_ACCENT","CHAR_HASH","CHAR_HYPHEN_MINUS","CHAR_LEFT_ANGLE_BRACKET","CHAR_LEFT_CURLY_BRACE","CHAR_LEFT_SQUARE_BRACKET","CHAR_LINE_FEED","CHAR_NO_BREAK_SPACE","CHAR_PERCENT","CHAR_PLUS","CHAR_QUESTION_MARK","CHAR_RIGHT_ANGLE_BRACKET","CHAR_RIGHT_CURLY_BRACE","CHAR_RIGHT_SQUARE_BRACKET","CHAR_SEMICOLON","CHAR_SINGLE_QUOTE","CHAR_SPACE","CHAR_TAB","CHAR_UNDERSCORE","CHAR_VERTICAL_LINE","CHAR_ZERO_WIDTH_NOBREAK_SPACE","extglobChars","chars","type","open","close","globChars","win32","constants","expandRange","args","sort","value","join","RegExp","ex","map","v","escapeRegex","syntaxError","char","parse","input","TypeError","opts","max","maxLength","Math","min","len","length","SyntaxError","bos","output","prepend","tokens","capture","PLATFORM_CHARS","EXTGLOB_CHARS","globstar","dot","nodot","qmarkNoDot","star","bash","noext","noextglob","state","index","start","consumed","prefix","backtrack","negated","brackets","braces","parens","quotes","removePrefix","extglobs","stack","prev","eos","peek","n","advance","remaining","slice","consume","num","append","token","negate","count","increment","push","decrement","pop","tok","isBrace","isExtglob","extglob","inner","extglobOpen","conditions","extglobClose","rest","extglobStar","includes","test","expression","fastpaths","negatedExtglob","backslashes","replace","m","esc","first","repeat","unescape","contains","wrapOutput","next","match","exec","slashes","posix","idx","lastIndexOf","pre","indexOf","keepQuotes","strictBrackets","nobracket","prevValue","literalBrackets","hasRegexChars","escaped","nobrace","outputIndex","tokensIndex","brace","dots","arr","range","i","unshift","comma","out","toks","t","nonegate","regex","noglobstar","prior","before","isStart","afterStar","after","strictSlashes","end","escapeLast","suffix","slashDot","create","str","source","scan","Array","isArray","fns","arrayMatcher","isMatch","isState","val","compileRe","makeRe","isIgnored","ignore","ignoreOpts","onMatch","onResult","matcher","returnObject","result","onIgnore","format","toPosixSlashes","matchBase","basename","Boolean","patterns","pattern","p","returnOutput","toRegex","parsed","flags","nocase","err","debug","isPathSeparator","code","depth","isPrefix","isGlobstar","Infinity","scanToEnd","parts","lastIndex","isBracket","isGlob","braceEscaped","finished","charCodeAt","noparen","base","removeBackslashes","maxDepth","prevIndex","isObject","isRegexChar","navigator","platform","toLowerCase","process","lastIdx","startsWith","path","segs","split","last","codes","getStatusMessage","prototype","hasOwnProperty","call","status","message","Error","parseInt","isNaN","msg","getStatusCode","keys","forEach","Number","createMessageToStatusCodeMap","createStatusCodeList","redirect","empty","retry","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","obj","prop","r","Symbol","toStringTag","OperationVerbs","OPERATION_HTTP_VERBS","ALL","GET","POST","PUT","PATCH","HEAD","DELETE","OPTIONS","TRACE","CUSTOM","OPERATION_WS_VERBS","PUBLISH","SUBSCRIBE","JsonSchemaMappersContainer","Map","registerJsonSchemaMapper","mapper","spec","set","getJsonSchemaMapper","specType","execMapper","parent","hasMapper","has","execOneOfMapper","types","find","buildPath","filter","__decorate","decorators","target","desc","c","arguments","getOwnPropertyDescriptor","Reflect","decorate","__metadata","metadataKey","metadataValue","metadata","SuppressedError","JsonEntitiesContainer","JsonEntityStore","constructor","isStore","propertyKey","descriptor","decoratorType","this","propertyName","String","store","targetName","nameOf","isCollection","collectionType","isArrayOrArrayClass","discriminatorAncestor","ancestor","ancestorsOf","from","schema","isDiscriminator","isPrimitive","isPrimitiveOrPrimitiveClass","_type","isDate","computedType","isClass","_schema","nestedGenerics","build","itemSchema","getComputedType","parentSchema","isDiscriminatorChild","discriminator","prototypeOf","Store","decoratorTypeOf","jsonSchemaStore","classOf","fromMethod","descriptorOf","isGetterOnly","defaultValue","toString","buildType","isPlainObject","getBestType","hasDiscriminator","isClassObject","getTarget","isArrowFn","JsonEntityComponent","enumsRegistry","isPromise","Function","isSymbol","JSON_TYPES","getJsonType","primitiveOf","Set","isBuffer","serializeEnum","enumValue","entries","reduce","acc","concat","serializeEnumValues","enumValues","values","add","getValue","uniq","toJsonRegex","Discriminator","cleanObject","getType","discriminatorValue","getValues","getDefaultValue","children","mapProperties","properties","JsonSchema","mapToJsonSchema","item","$isJsonDocument","isLazyRef","isPrimitiveClass","super","$kind","$hooks","Hooks","$required","$allow","$forwardGroups","$ignore","isDiscriminatorKey","alias","genericLabels","class","Date","isGeneric","hasGenerics","genericType","canRef","isNullable","isReadOnly","isWriteOnly","nullable","getAliasOf","property","addAlias","removeAlias","delete","$id","$ref","$schema","label","name","cb","on","description","discriminatorKey","const","examples","enum","additionalItems","example","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","allow","minLength","any","required","clone","$selfRequired","clear","addRequired","removeRequired","isRequired","addProperty","patternProperties","additionalProperties","unknown","dependencies","propertyNames","getName","flat","definitions","allOf","setManyOf","anyOf","oneOf","not","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","integer","isFunction","jsonType","title","readOnly","writeOnly","customKey","toObject","toJSON","getComputedItemType","keyword","resolved","jsonSchema","mapping","JsonClassStore","DecoratorTypes","CLASS","isSuccessStatus","isRedirectionStatus","JsonMap","mapHeaders","headers","newHeaders","toJsonMapCollection","content","klass","JsonMedia","groups","JsonResponse","getContent","getMedia","mediaType","addMedia","isBinary","JsonMethodPath","method","summary","JsonOperation","parameters","responses","operationPaths","response","getResponses","getStatus","tags","addTags","uniqBy","operationId","defaultStatus","setRedirection","isRedirection","addResponse","statusCode","res","getResponseOf","currentCode","currentResponse","deepMerge","ensureResponseOf","getHeadersOf","getContentTypeOf","security","addSecurityScopes","scopes","deprecated","addParameter","parameter","consumes","produces","addProduce","produce","addOperationPath","operationPath","getAllowedOperationPath","allowedVerbs","toUpperCase","JsonMethodStore","middlewares","beforeMiddlewares","afterMiddlewares","operation","use","params","view","acceptMimes","mimes","getResponseOptions","contentType","media","allowedGroups","size","include","ctrlValue","getParamTypes","paramType","Metadata","getReturnType","METHOD","EndpointMetadata","JsonParameterTypes","formatParameterType","isParameterType","JsonParameter","inType","JsonParameterStore","pipes","dataPath","allowedRequiredValues","getParams","reverse","isMethodDescriptor","param","getSchema","PARAM","ParamMetadata","JsonPropertyStore","PROP","PropertyMetadata","getJsonEntityStore","JsonOperationPathsMap","getKey","setOperationPath","getInheritedStores","$inherited","context","model","getOperationsStores","$operations","currentStore","propStore","removeHiddenOperation","operationStore","ALLOWED_VERBS","channelsMapper","channels","rootPath","ctrlRootPath","flatMap","camelCase","pushToChannels","SpecTypes","makeOf","schemes","messageMapper","jsonOperationStore","defaultTags","event","messageKey","components","payload","responsesSchema","messages","getGenericsMap","genericTypes","mapGenericsOptions","ops","generics","popGenerics","payloadMapper","payloadName","pascalCase","setValue","groupsName","mapOptions","BODY","QUERY","PATH","HEADER","responsePayloadMapper","statuses","statusesTexts","successSchemes","errorSchemes","jsonResponse","responsePayloadName","responsePayload","statusText","dataSchema","errorSchema","specJson","schemas","ASYNCAPI","JsonLazyRef","createRefName","createRef","host","OPENAPI","getHost","ref","toRef","anyMapper","enumSchema","classMapper","props","discriminatorMappingMapper","_","newMapping","isString","enumsMapper","inlineEnums","genericsMapper","alterMerge","inheritedClassMapper","stores","alter","itemMapper","lazyRefMapper","jsonLazyRef","$refs","mapMapper","MANY_OF_PROPERTIES","STRING_PROPERTIES","BOOLEAN_PROPERTIES","NUMBER_PROPERTIES","ARRAY_PROPERTIES","OBJECT_PROPERTIES","COMMON_PROPERTIES","nullableMapper","some","isInteger","alterIgnore","isBoolean","objectMapper","operationIdFormatter","useAlias","ctx","withIgnoredProps","ofMapper","propertiesMapper","alterRequiredGroups","requiredMapper","k","extractRequiredProps","aliasedKey","mapRequiredProps","mapAliasedProperties","RULES","string","is","number","isNumber","boolean","array","object","alterOneOf","kind","findManyOf","rule","pickProperties","IGNORES","SWAGGER","JSON","IGNORES_OPENSPEC","schemaMapper","addDef","customKeys","shouldSkipKey","isExample","isEmptyProperties","shouldMapAlias","mapKeys","default","serializeSchema","wrapEnumsMapper","paths","nullableMapperOpenApi","operationInFilesMapper","operationInParameterMapper","jsonParameter","paramOpts","oldSchemas","mapperName","operationInParametersMapper","buildExamples","hasKey","newExamples","operationInQueryMapper","jsonParameters","style","inlineReference","HTTP_STATUS_MESSAGES","constantCase","getStatusConstant","operationMapper","jsonOperation","parametersOptions","bodyParameters","inputs","FILES","extractParameters","requestBody","operationTags","operationMediaMapper","jsonMedia","JsonRequestBody","addContent","mediaContent","operationRequestBodyMapper","in","refs","propsLength","hasFile","propSchema","buildSchemaFromBodyParameters","operationResponseMapper","concatParameters","getJsonPathParameters","isOptional","current","inCapture","parseUrl","subpath","optional","postfix","right","splited","splice","getVariable","DEFAULT_PATTERN","OPERATION_IDS","transform","operationKey","id","getOperationId","pushToPath","pathsMapper","mapOperation","mapOperationInPathParameters","JsonEntityFn","fn","Children","childToken","DiscriminatorValue","snakeCase","CollectionOf","decorator","MinItems","MaxItems","MinProperties","MaxProperties","Contains","UniqueItems","ArrayOf","MapOf","CollectionContains","withErrorMsg","errorKey","originalDecorator","decoratorOptions","useDecorators","errorMessage","storedJson","AdditionalProperties","entity","AllOf","Property","Allow","Any","AnyOf","Const","constValue","CustomKey","CustomKeys","Default","ErrorMsg","DefaultMsg","Description","DiscriminatorKey","Enum","Example","Examples","Maximum","exclusive","Max","ExclusiveMaximum","Minimum","Min","ExclusiveMinimum","JsonFormatTypes","Format","Email","EMAIL","DateTime","DATE_TIME","DateFormat","DATE","TimeFormat","TIME","Uri","URI","Url","URL","ForwardGroups","bool","micromatch","list","omit","keep","negatives","matched","matchGroups","compareWith","groupsExcludes","group","groupsIncludes","Groups","propEntity","groupsClass","givenGroups","Hidden","StoreSet","Ignore","Integer","LabelledAs","includeCollection","MaxLength","MinLength","MultipleOf","Name","Nullable","OneOf","Optional","Pattern","ReadOnly","Schema","partialSchema","For","RecordOf","initial","Required","RequiredGroups","Title","WriteOnly","GenericOf","isEnum","Nested","Generics","Consumes","decorateMethodsOf","UnsupportedDecoratorType","AcceptMime","DecoratorContext","actions","addAction","bind","wrapKey","methods","getMergedKey","beforeInit","onInit","afterInit","onMapKey","runActions","action","statusesModel","defineStatusModel","getStatusModel","mapGenerics","ReturnDecoratorContext","header","location","meta","Location","nested","checkPrimitive","checkCollection","of","ofInteger","manyOf","partial","binary","getContentType","hasOfTypes","currentStatus","mapMedia","Returns","ContentType","Deprecated","Header","Headers","In","Type","InFile","multiple","useMethodDecorators","mapOperationOptions","handlers","arg","toLocaleUpperCase","OperationDecoratorContext","Operation","routeOptions","OperationId","OperationPath","Partial","Path","Produces","Publish","Redirect","url","All","Get","Post","Put","Delete","Head","Patch","Options","Security","nameOrSecurity","Status","Subscribe","Summary","Tags","tag","mapTags","View","concatPath","basePath","r1","r2","global","ignoreCase","multiline","endsWith","JsonOperationRoute","paramsTypes","endpoint","fullPath","methodClassName","className","date","datetime","time","email","enums","e","lazyRef","er","uri","schemesReducer","mergeReducerBuilder","stringify","tagsReducer","SPEC_REDUCERS","mergeSpec","reducers","cleanUndefinedProps","caches","getSpec","operationIdPattern","finalSpec","cache","getSpecType","version","getSpecTypeFromSpec","mapOpenSpecInfo","info","termsOfService","contact","license","mapOpenSpec2","specVersion","securityDefinitions","externalDocs","swagger","mapOpenSpec3","servers","openapi","mapOpenSpec","fileSpec","HTTP_METHODS","SCHEMA_PROPERTIES","APPLICATION_JSON_REGEX","SUPPORTED_MIME_TYPES","APPLICATION_X_WWW_URLENCODED","MULTIPART_FORM_DATA","fixRefs","isJsonMimeType","getSupportedMimeTypes","MIME_VALUES","transformSecurity","securitySchemes","securityDefinition","scheme","bearerFormat","flows","flowName","flow","flowType","authorizationUrl","tokenUrl","transformInformation","server","serverUrl","variables","variable","variableObject","re","pathname","protocol","substring","Converter","convertInfos","resolveReference","shouldClone","shift","cur","convert","convertOperations","convertSchemas","convertSecurityDefinitions","pathObject","convertParameters","convertOperationParameters","convertResponses","contentKey","mediaRanges","mediaTypes","structuredObj","data","mediaRange","formDataParam","convertSchema","copySchemaProperties","copySchemaXProperties","allowReserved","collectionFormat","explode","propName","anySchema","def","operationDirection","convertDiscriminatorMapping","defName","schemaNameOrRef","console","warn","transformToOS2","generateSpec","defaultSpec","sortPaths","fromEntries","k1","k2","localeCompare","CACHE_KEY","getJsonSchema","getOperationsRoutes","operationsRoutes","withChildren","routes","getPropertiesStores","$properties","getProperties"],"sourceRoot":""}
|