@tsed/schema 6.102.4 → 6.102.8-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/lib/cjs/constants/httpStatusMessages.js +12 -96
  2. package/lib/cjs/constants/httpStatusMessages.js.map +1 -1
  3. package/lib/cjs/package.json +3 -0
  4. package/lib/esm/components/anyMapper.js +4 -4
  5. package/lib/esm/components/classMapper.js +4 -4
  6. package/lib/esm/components/genericsMapper.js +4 -4
  7. package/lib/esm/components/index.js +11 -11
  8. package/lib/esm/components/inheritedClassMapper.js +2 -2
  9. package/lib/esm/components/itemMapper.js +1 -1
  10. package/lib/esm/components/lazyRefMapper.js +3 -3
  11. package/lib/esm/components/mapMapper.js +2 -2
  12. package/lib/esm/components/objectMapper.js +3 -3
  13. package/lib/esm/components/ofMapper.js +1 -1
  14. package/lib/esm/components/propertiesMapper.js +1 -1
  15. package/lib/esm/components/schemaMapper.js +6 -6
  16. package/lib/esm/constants/httpStatusMessages.js +11 -96
  17. package/lib/esm/constants/httpStatusMessages.js.map +1 -1
  18. package/lib/esm/decorators/class/children.js +1 -1
  19. package/lib/esm/decorators/collections/collectionContains.js +1 -1
  20. package/lib/esm/decorators/collections/collectionOf.js +1 -1
  21. package/lib/esm/decorators/collections/maxItems.js +1 -1
  22. package/lib/esm/decorators/collections/maxProperties.js +1 -1
  23. package/lib/esm/decorators/collections/minItems.js +1 -1
  24. package/lib/esm/decorators/collections/minProperties.js +1 -1
  25. package/lib/esm/decorators/collections/uniqueItems.js +1 -1
  26. package/lib/esm/decorators/common/additionalProperties.js +1 -1
  27. package/lib/esm/decorators/common/allOf.js +1 -1
  28. package/lib/esm/decorators/common/allow.js +2 -2
  29. package/lib/esm/decorators/common/any.js +1 -1
  30. package/lib/esm/decorators/common/anyOf.js +1 -1
  31. package/lib/esm/decorators/common/const.js +1 -1
  32. package/lib/esm/decorators/common/customKey.js +1 -1
  33. package/lib/esm/decorators/common/default.js +1 -1
  34. package/lib/esm/decorators/common/description.js +1 -1
  35. package/lib/esm/decorators/common/enum.js +1 -1
  36. package/lib/esm/decorators/common/example.js +1 -1
  37. package/lib/esm/decorators/common/examples.js +1 -1
  38. package/lib/esm/decorators/common/exclusiveMaximum.js +1 -1
  39. package/lib/esm/decorators/common/exclusiveMinimum.js +1 -1
  40. package/lib/esm/decorators/common/format.js +2 -2
  41. package/lib/esm/decorators/common/forwardGroups.js +1 -1
  42. package/lib/esm/decorators/common/groups.js +2 -2
  43. package/lib/esm/decorators/common/ignore.js +1 -1
  44. package/lib/esm/decorators/common/integer.js +1 -1
  45. package/lib/esm/decorators/common/jsonEntityFn.js +1 -1
  46. package/lib/esm/decorators/common/maxLength.js +1 -1
  47. package/lib/esm/decorators/common/maximum.js +1 -1
  48. package/lib/esm/decorators/common/minLength.js +1 -1
  49. package/lib/esm/decorators/common/minimum.js +1 -1
  50. package/lib/esm/decorators/common/multipleOf.js +1 -1
  51. package/lib/esm/decorators/common/name.js +1 -1
  52. package/lib/esm/decorators/common/nullable.js +2 -2
  53. package/lib/esm/decorators/common/oneOf.js +1 -1
  54. package/lib/esm/decorators/common/optional.js +1 -1
  55. package/lib/esm/decorators/common/pattern.js +1 -1
  56. package/lib/esm/decorators/common/property.js +1 -1
  57. package/lib/esm/decorators/common/readOnly.js +1 -1
  58. package/lib/esm/decorators/common/required.js +2 -2
  59. package/lib/esm/decorators/common/requiredGroups.js +2 -2
  60. package/lib/esm/decorators/common/schema.js +1 -1
  61. package/lib/esm/decorators/common/title.js +1 -1
  62. package/lib/esm/decorators/common/writeOnly.js +1 -1
  63. package/lib/esm/decorators/config/jsonEntityComponent.js +1 -1
  64. package/lib/esm/decorators/generics/genericOf.js +2 -2
  65. package/lib/esm/decorators/generics/generics.js +1 -1
  66. package/lib/esm/decorators/index.js +70 -70
  67. package/lib/esm/decorators/operations/acceptMime.js +1 -1
  68. package/lib/esm/decorators/operations/consumes.js +1 -1
  69. package/lib/esm/decorators/operations/contentType.js +1 -1
  70. package/lib/esm/decorators/operations/deprecated.js +1 -1
  71. package/lib/esm/decorators/operations/header.js +1 -1
  72. package/lib/esm/decorators/operations/in.js +1 -1
  73. package/lib/esm/decorators/operations/inFile.js +5 -5
  74. package/lib/esm/decorators/operations/location.js +1 -1
  75. package/lib/esm/decorators/operations/operationId.js +1 -1
  76. package/lib/esm/decorators/operations/operationPath.js +1 -1
  77. package/lib/esm/decorators/operations/partial.js +1 -1
  78. package/lib/esm/decorators/operations/path.js +1 -1
  79. package/lib/esm/decorators/operations/produces.js +1 -1
  80. package/lib/esm/decorators/operations/redirect.js +2 -2
  81. package/lib/esm/decorators/operations/returns.js +8 -8
  82. package/lib/esm/decorators/operations/route.js +3 -3
  83. package/lib/esm/decorators/operations/security.js +1 -1
  84. package/lib/esm/decorators/operations/status.js +1 -1
  85. package/lib/esm/decorators/operations/summary.js +1 -1
  86. package/lib/esm/decorators/operations/tags.js +1 -1
  87. package/lib/esm/domain/DecoratorContext.js +1 -1
  88. package/lib/esm/domain/JsonClassStore.js +3 -3
  89. package/lib/esm/domain/JsonLazyRef.js +2 -2
  90. package/lib/esm/domain/JsonMap.js +1 -1
  91. package/lib/esm/domain/JsonMethodStore.js +4 -4
  92. package/lib/esm/domain/JsonOperation.js +8 -8
  93. package/lib/esm/domain/JsonOperationPathsMap.js +1 -1
  94. package/lib/esm/domain/JsonOperationRoute.js +1 -1
  95. package/lib/esm/domain/JsonParameter.js +6 -6
  96. package/lib/esm/domain/JsonParameterStore.js +4 -4
  97. package/lib/esm/domain/JsonPropertyStore.js +3 -3
  98. package/lib/esm/domain/JsonRequestBody.js +2 -2
  99. package/lib/esm/domain/JsonResponse.js +4 -4
  100. package/lib/esm/domain/JsonSchema.js +6 -6
  101. package/lib/esm/domain/index.js +16 -16
  102. package/lib/esm/index.js +20 -20
  103. package/lib/esm/interfaces/index.js +4 -4
  104. package/lib/esm/package.json +3 -0
  105. package/lib/esm/utils/from.js +4 -4
  106. package/lib/esm/utils/getInheritedStores.js +1 -1
  107. package/lib/esm/utils/getJsonEntityStore.js +5 -5
  108. package/lib/esm/utils/getJsonSchema.js +4 -4
  109. package/lib/esm/utils/getOperationsRoutes.js +3 -3
  110. package/lib/esm/utils/getOperationsStores.js +4 -4
  111. package/lib/esm/utils/getPropertiesStores.js +3 -3
  112. package/lib/esm/utils/getRequiredProperties.js +1 -1
  113. package/lib/esm/utils/getSpec.js +6 -6
  114. package/lib/esm/utils/mapNullableType.js +1 -1
  115. package/lib/esm/utils/mapRouteOptions.js +1 -1
  116. package/lib/esm/utils/mergeOperation.js +3 -3
  117. package/lib/esm/utils/ref.js +1 -1
  118. package/lib/esm/utils/toJsonMapCollection.js +1 -1
  119. package/lib/types/constants/httpStatusMessages.d.ts +2 -263
  120. package/package.json +16 -5
@@ -1,102 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getStatusMessage = exports.getStatusConstant = exports.HTTP_STATUS_MESSAGES = void 0;
4
- exports.HTTP_STATUS_MESSAGES = {
5
- "100": { label: "Continue", code: "CONTINUE" },
6
- "101": { label: "Switching Protocols", code: "SWITCHING_PROTOCOLS" },
7
- "102": { label: "Processing", code: "PROCESSING" },
8
- "103": { label: "Early Hints", code: "EARLY_HINTS" },
9
- "200": { label: "Success", code: "SUCCESS" },
10
- "201": { label: "Created", code: "CREATED" },
11
- "202": { label: "Accepted", code: "ACCEPTED" },
12
- "203": {
13
- label: "Non-Authoritative Information",
14
- code: "NON_AUTHORITATIVE_INFORMATION"
15
- },
16
- "204": { label: "No Content", code: "NO_CONTENT" },
17
- "205": { label: "Reset Content", code: "RESET_CONTENT" },
18
- "206": { label: "Partial Content", code: "PARTIAL_CONTENT" },
19
- "207": { label: "Multi-Status", code: "MULTI_STATUS" },
20
- "208": { label: "Already Reported", code: "ALREADY_REPORTED" },
21
- "226": { label: "IM Used", code: "IM_USED" },
22
- "300": { label: "Multiple Choices", code: "MULTIPLE_CHOICES" },
23
- "301": { label: "Moved Permanently", code: "MOVED_PERMANENTLY" },
24
- "302": { label: "Found", code: "FOUND" },
25
- "303": { label: "See Other", code: "SEE_OTHER" },
26
- "304": { label: "Not Modified", code: "NOT_MODIFIED" },
27
- "305": { label: "Use Proxy", code: "USE_PROXY" },
28
- "306": { label: "(Unused)", code: "UNUSED" },
29
- "307": { label: "Temporary Redirect", code: "TEMPORARY_REDIRECT" },
30
- "308": { label: "Permanent Redirect", code: "PERMANENT_REDIRECT" },
31
- "310": { label: "Too Many Redirects", code: "TOO_MANY_REDIRECTS" },
32
- "400": { label: "Bad Request", code: "BAD_REQUEST" },
33
- "401": { label: "Unauthorized", code: "UNAUTHORIZED" },
34
- "402": { label: "Payment Required", code: "PAYMENT_REQUIRED" },
35
- "403": { label: "Forbidden", code: "FORBIDDEN" },
36
- "404": { label: "Not Found", code: "NOT_FOUND" },
37
- "405": { label: "Method Not Allowed", code: "METHOD_NOT_ALLOWED" },
38
- "406": { label: "Not Acceptable", code: "NOT_ACCEPTABLE" },
39
- "407": {
40
- label: "Proxy Authentication Required",
41
- code: "PROXY_AUTHENTICATION_REQUIRED"
42
- },
43
- "408": { label: "Request Timeout", code: "REQUEST_TIMEOUT" },
44
- "409": { label: "Conflict", code: "CONFLICT" },
45
- "410": { label: "Gone", code: "GONE" },
46
- "411": { label: "Length Required", code: "LENGTH_REQUIRED" },
47
- "412": { label: "Precondition Failed", code: "PRECONDITION_FAILED" },
48
- "413": {
49
- label: "Request Entity Too Large",
50
- code: "REQUEST_ENTITY_TOO_LARGE"
51
- },
52
- "414": { label: "Request URI Too Long", code: "REQUEST_URI_TOO_LONG" },
53
- "415": { label: "Unsupported Media Type", code: "UNSUPPORTED_MEDIA_TYPE" },
54
- "416": {
55
- label: "Request Range Unsatisfiable",
56
- code: "REQUEST_RANGE_UNSATISFIABLE"
57
- },
58
- "417": { label: "Expectation Failed", code: "EXPECTATION_FAILED" },
59
- "418": { label: "I'm a Teapot", code: "I_M_A_TEAPOT" },
60
- "421": { label: "Misdirected Request", code: "MISDIRECTED_REQUEST" },
61
- "422": { label: "Unprocessable Entity", code: "UNPROCESSABLE_ENTITY" },
62
- "423": { label: "Locked", code: "LOCKED" },
63
- "424": { label: "Failed Dependency", code: "FAILED_DEPENDENCY" },
64
- "425": { label: "Too Early", code: "TOO_EARLY" },
65
- "426": { label: "Upgrade Required", code: "UPGRADE_REQUIRED" },
66
- "427": { label: "Unassigned", code: "UNASSIGNED" },
67
- "428": { label: "Precondition Required", code: "PRECONDITION_REQUIRED" },
68
- "429": { label: "Too Many Requests", code: "TOO_MANY_REQUESTS" },
69
- "430": { label: "Unassigned", code: "UNASSIGNED" },
70
- "431": {
71
- label: "Request Header Fields Too Large",
72
- code: "REQUEST_HEADER_FIELDS_TOO_LARGE"
73
- },
74
- "451": {
75
- label: "Unavailable For Legal Reasons",
76
- code: "UNAVAILABLE_FOR_LEGAL_REASONS"
77
- },
78
- "500": { label: "Internal Server Error", code: "INTERNAL_SERVER_ERROR" },
79
- "501": { label: "Not Implemented", code: "NOT_IMPLEMENTED" },
80
- "502": { label: "Bad Gateway", code: "BAD_GATEWAY" },
81
- "503": { label: "Service Unavailable", code: "SERVICE_UNAVAILABLE" },
82
- "504": { label: "Gateway Timeout", code: "GATEWAY_TIMEOUT" },
83
- "505": {
84
- label: "HTTP Version Not Supported",
85
- code: "HTTP_VERSION_NOT_SUPPORTED"
86
- },
87
- "506": { label: "Variant Also Negotiates", code: "VARIANT_ALSO_NEGOTIATES" },
88
- "507": { label: "Insufficient Storage", code: "INSUFFICIENT_STORAGE" },
89
- "508": { label: "Loop Detected", code: "LOOP_DETECTED" },
90
- "509": {
91
- label: "Bandwidth Limit Exceeded",
92
- code: "BANDWIDTH_LIMIT_EXCEEDED"
93
- },
94
- "510": { label: "Not Extended", code: "NOT_EXTENDED" },
95
- "511": {
96
- label: "Network Authentication Required",
97
- code: "NETWORK_AUTHENTICATION_REQUIRED"
98
- }
99
- };
4
+ const tslib_1 = require("tslib");
5
+ const statuses_1 = (0, tslib_1.__importDefault)(require("statuses"));
6
+ const change_case_1 = require("change-case");
7
+ exports.HTTP_STATUS_MESSAGES = statuses_1.default.codes.reduce((map, code) => {
8
+ const message = String((0, statuses_1.default)(code));
9
+ return {
10
+ ...map,
11
+ [String(code)]: { label: message, code: (0, change_case_1.constantCase)(message) }
12
+ };
13
+ }, {});
14
+ exports.HTTP_STATUS_MESSAGES["200"].label = "Success";
15
+ exports.HTTP_STATUS_MESSAGES["200"].code = "SUCCESS";
100
16
  function getStatusConstant(status) {
101
17
  var _a;
102
18
  return (_a = exports.HTTP_STATUS_MESSAGES[status]) === null || _a === void 0 ? void 0 : _a.code;
@@ -1 +1 @@
1
- {"version":3,"file":"httpStatusMessages.js","sourceRoot":"","sources":["../../../src/constants/httpStatusMessages.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC,KAAK,EAAE,EAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAC;IAC5C,KAAK,EAAE,EAAC,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,qBAAqB,EAAC;IAClE,KAAK,EAAE,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAC;IAChD,KAAK,EAAE,EAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAC;IAClD,KAAK,EAAE,EAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAC;IAC1C,KAAK,EAAE,EAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAC;IAC1C,KAAK,EAAE,EAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAC;IAC5C,KAAK,EAAE;QACL,KAAK,EAAE,+BAA+B;QACtC,IAAI,EAAE,+BAA+B;KACtC;IACD,KAAK,EAAE,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAC;IAChD,KAAK,EAAE,EAAC,KAAK,EA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BAAqB,EAAE,IAAI,EAAE,qBAAqB,EAAC;IAClE,KAAK,EAAE,EAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,iBAAiB,EAAC;IAC1D,KAAK,EAAE;QACL,KAAK,EAAE,4BAA4B;QACnC,IAAI,EAAE,4BAA4B;KACnC;IACD,KAAK,EAAE,EAAC,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,yBAAyB,EAAC;IAC1E,KAAK,EAAE,EAAC,KAAK,EAAE,sBAAsB,EAAE,IAAI,EAAE,sBAAsB,EAAC;IACpE,KAAK,EAAE,EAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,eAAe,EAAC;IACtD,KAAK,EAAE;QACL,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,0BAA0B;KACjC;IACD,KAAK,EAAE,EAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAC;IACpD,KAAK,EAAE;QACL,KAAK,EAAE,iCAAiC;QACxC,IAAI,EAAE,iCAAiC;KACxC;CACF,CAAC;AAEF,SAAgB,iBAAiB,CAAC,MAAuB;;IACvD,OAAO,MAAC,4BAA4B,CAAC,MAAM,CAAC,0CAAE,IAAI,CAAC;AACrD,CAAC;AAFD,8CAEC;AAED,SAAgB,gBAAgB,CAAC,MAAuB;;IACtD,OAAO,MAAC,4BAA4B,CAAC,MAAM,CAAC,0CAAE,KAAK,CAAC;AACtD,CAAC;AAFD,4CAEC","sourcesContent":["export const HTTP_STATUS_MESSAGES = {\n \"100\": {label: \"Continue\", code: \"CONTINUE\"},\n \"101\": {label: \"Switching Protocols\", code: \"SWITCHING_PROTOCOLS\"},\n \"102\": {label: \"Processing\", code: \"PROCESSING\"},\n \"103\": {label: \"Early Hints\", code: \"EARLY_HINTS\"},\n \"200\": {label: \"Success\", code: \"SUCCESS\"},\n \"201\": {label: \"Created\", code: \"CREATED\"},\n \"202\": {label: \"Accepted\", code: \"ACCEPTED\"},\n \"203\": {\n label: \"Non-Authoritative Information\",\n code: \"NON_AUTHORITATIVE_INFORMATION\"\n },\n \"204\": {label: \"No Content\", code: \"NO_CONTENT\"},\n \"205\": {label: \"Reset Content\", code: \"RESET_CONTENT\"},\n \"206\": {label: \"Partial Content\", code: \"PARTIAL_CONTENT\"},\n \"207\": {label: \"Multi-Status\", code: \"MULTI_STATUS\"},\n \"208\": {label: \"Already Reported\", code: \"ALREADY_REPORTED\"},\n \"226\": {label: \"IM Used\", code: \"IM_USED\"},\n \"300\": {label: \"Multiple Choices\", code: \"MULTIPLE_CHOICES\"},\n \"301\": {label: \"Moved Permanently\", code: \"MOVED_PERMANENTLY\"},\n \"302\": {label: \"Found\", code: \"FOUND\"},\n \"303\": {label: \"See Other\", code: \"SEE_OTHER\"},\n \"304\": {label: \"Not Modified\", code: \"NOT_MODIFIED\"},\n \"305\": {label: \"Use Proxy\", code: \"USE_PROXY\"},\n \"306\": {label: \"(Unused)\", code: \"UNUSED\"},\n \"307\": {label: \"Temporary Redirect\", code: \"TEMPORARY_REDIRECT\"},\n \"308\": {label: \"Permanent Redirect\", code: \"PERMANENT_REDIRECT\"},\n \"310\": {label: \"Too Many Redirects\", code: \"TOO_MANY_REDIRECTS\"},\n \"400\": {label: \"Bad Request\", code: \"BAD_REQUEST\"},\n \"401\": {label: \"Unauthorized\", code: \"UNAUTHORIZED\"},\n \"402\": {label: \"Payment Required\", code: \"PAYMENT_REQUIRED\"},\n \"403\": {label: \"Forbidden\", code: \"FORBIDDEN\"},\n \"404\": {label: \"Not Found\", code: \"NOT_FOUND\"},\n \"405\": {label: \"Method Not Allowed\", code: \"METHOD_NOT_ALLOWED\"},\n \"406\": {label: \"Not Acceptable\", code: \"NOT_ACCEPTABLE\"},\n \"407\": {\n label: \"Proxy Authentication Required\",\n code: \"PROXY_AUTHENTICATION_REQUIRED\"\n },\n \"408\": {label: \"Request Timeout\", code: \"REQUEST_TIMEOUT\"},\n \"409\": {label: \"Conflict\", code: \"CONFLICT\"},\n \"410\": {label: \"Gone\", code: \"GONE\"},\n \"411\": {label: \"Length Required\", code: \"LENGTH_REQUIRED\"},\n \"412\": {label: \"Precondition Failed\", code: \"PRECONDITION_FAILED\"},\n \"413\": {\n label: \"Request Entity Too Large\",\n code: \"REQUEST_ENTITY_TOO_LARGE\"\n },\n \"414\": {label: \"Request URI Too Long\", code: \"REQUEST_URI_TOO_LONG\"},\n \"415\": {label: \"Unsupported Media Type\", code: \"UNSUPPORTED_MEDIA_TYPE\"},\n \"416\": {\n label: \"Request Range Unsatisfiable\",\n code: \"REQUEST_RANGE_UNSATISFIABLE\"\n },\n \"417\": {label: \"Expectation Failed\", code: \"EXPECTATION_FAILED\"},\n \"418\": {label: \"I'm a Teapot\", code: \"I_M_A_TEAPOT\"},\n \"421\": {label: \"Misdirected Request\", code: \"MISDIRECTED_REQUEST\"},\n \"422\": {label: \"Unprocessable Entity\", code: \"UNPROCESSABLE_ENTITY\"},\n \"423\": {label: \"Locked\", code: \"LOCKED\"},\n \"424\": {label: \"Failed Dependency\", code: \"FAILED_DEPENDENCY\"},\n \"425\": {label: \"Too Early\", code: \"TOO_EARLY\"},\n \"426\": {label: \"Upgrade Required\", code: \"UPGRADE_REQUIRED\"},\n \"427\": {label: \"Unassigned\", code: \"UNASSIGNED\"},\n \"428\": {label: \"Precondition Required\", code: \"PRECONDITION_REQUIRED\"},\n \"429\": {label: \"Too Many Requests\", code: \"TOO_MANY_REQUESTS\"},\n \"430\": {label: \"Unassigned\", code: \"UNASSIGNED\"},\n \"431\": {\n label: \"Request Header Fields Too Large\",\n code: \"REQUEST_HEADER_FIELDS_TOO_LARGE\"\n },\n \"451\": {\n label: \"Unavailable For Legal Reasons\",\n code: \"UNAVAILABLE_FOR_LEGAL_REASONS\"\n },\n \"500\": {label: \"Internal Server Error\", code: \"INTERNAL_SERVER_ERROR\"},\n \"501\": {label: \"Not Implemented\", code: \"NOT_IMPLEMENTED\"},\n \"502\": {label: \"Bad Gateway\", code: \"BAD_GATEWAY\"},\n \"503\": {label: \"Service Unavailable\", code: \"SERVICE_UNAVAILABLE\"},\n \"504\": {label: \"Gateway Timeout\", code: \"GATEWAY_TIMEOUT\"},\n \"505\": {\n label: \"HTTP Version Not Supported\",\n code: \"HTTP_VERSION_NOT_SUPPORTED\"\n },\n \"506\": {label: \"Variant Also Negotiates\", code: \"VARIANT_ALSO_NEGOTIATES\"},\n \"507\": {label: \"Insufficient Storage\", code: \"INSUFFICIENT_STORAGE\"},\n \"508\": {label: \"Loop Detected\", code: \"LOOP_DETECTED\"},\n \"509\": {\n label: \"Bandwidth Limit Exceeded\",\n code: \"BANDWIDTH_LIMIT_EXCEEDED\"\n },\n \"510\": {label: \"Not Extended\", code: \"NOT_EXTENDED\"},\n \"511\": {\n label: \"Network Authentication Required\",\n code: \"NETWORK_AUTHENTICATION_REQUIRED\"\n }\n};\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"]}
1
+ {"version":3,"file":"httpStatusMessages.js","sourceRoot":"","sources":["../../../src/constants/httpStatusMessages.ts"],"names":[],"mappings":";;;;AAAA,qEAAgC;AAChC,6CAAyC;AAE5B,QAAA,oBAAoB,GAAG,kBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAkD,EAAE,IAAY,EAAE,EAAE;IAC7H,MAAM,OAAO,GAAW,MAAM,CAAC,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,OAAO;QACL,GAAG,GAAG;QACN,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAA,0BAAY,EAAC,OAAO,CAAC,EAAC;KAC9D,CAAC;AACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AAEP,4BAAoB,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC;AAC9C,4BAAoB,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC;AAE7C,SAAgB,iBAAiB,CAAC,MAAuB;;IACvD,OAAO,MAAC,4BAA4B,CAAC,MAAM,CAAC,0CAAE,IAAI,CAAC;AACrD,CAAC;AAFD,8CAEC;AAED,SAAgB,gBAAgB,CAAC,MAAuB;;IACtD,OAAO,MAAC,4BAA4B,CAAC,MAAM,CAAC,0CAAE,KAAK,CAAC;AACtD,CAAC;AAFD,4CAEC","sourcesContent":["import statuses from \"statuses\";\nimport {constantCase} from \"change-case\";\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"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -1,7 +1,7 @@
1
- import { JsonLazyRef } from "../domain/JsonLazyRef";
2
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
3
- import { mapGenericsOptions } from "../utils/generics";
4
- import { toRef } from "../utils/ref";
1
+ import { JsonLazyRef } from "../domain/JsonLazyRef.js";
2
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
3
+ import { mapGenericsOptions } from "../utils/generics.js";
4
+ import { toRef } from "../utils/ref.js";
5
5
  export function anyMapper(input, options = {}) {
6
6
  if (typeof input !== "object" || input === null) {
7
7
  return input;
@@ -1,7 +1,7 @@
1
- import { JsonEntityStore } from "../domain/JsonEntityStore";
2
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
3
- import { mapGenericsOptions, popGenerics } from "../utils/generics";
4
- import { createRef, createRefName } from "../utils/ref";
1
+ import { JsonEntityStore } from "../domain/JsonEntityStore.js";
2
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
3
+ import { mapGenericsOptions, popGenerics } from "../utils/generics.js";
4
+ import { createRef, createRefName } from "../utils/ref.js";
5
5
  export function classMapper(value, options) {
6
6
  const store = JsonEntityStore.from(value.class);
7
7
  const name = createRefName(store.schema.getName() || value.getName(), options);
@@ -1,8 +1,8 @@
1
1
  import { isClass, isPrimitiveClass } from "@tsed/core";
2
- import { JsonEntityStore } from "../domain/JsonEntityStore";
3
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
4
- import { popGenerics } from "../utils/generics";
5
- import { getJsonType } from "../utils/getJsonType";
2
+ import { JsonEntityStore } from "../domain/JsonEntityStore.js";
3
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
4
+ import { popGenerics } from "../utils/generics.js";
5
+ import { getJsonType } from "../utils/getJsonType.js";
6
6
  /**
7
7
  * @ignore
8
8
  */
@@ -1,12 +1,12 @@
1
- export * from "./anyMapper";
2
- export * from "./classMapper";
3
- export * from "./genericsMapper";
4
- export * from "./inheritedClassMapper";
5
- export * from "./itemMapper";
6
- export * from "./lazyRefMapper";
7
- export * from "./mapMapper";
8
- export * from "./objectMapper";
9
- export * from "./schemaMapper";
10
- export * from "./ofMapper";
11
- export * from "./propertiesMapper";
1
+ export * from "./anyMapper.js";
2
+ export * from "./classMapper.js";
3
+ export * from "./genericsMapper.js";
4
+ export * from "./inheritedClassMapper.js";
5
+ export * from "./itemMapper.js";
6
+ export * from "./lazyRefMapper.js";
7
+ export * from "./mapMapper.js";
8
+ export * from "./objectMapper.js";
9
+ export * from "./schemaMapper.js";
10
+ export * from "./ofMapper.js";
11
+ export * from "./propertiesMapper.js";
12
12
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  import { classOf, deepMerge } from "@tsed/core";
2
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
3
- import { getInheritedStores } from "../utils/getInheritedStores";
2
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
3
+ import { getInheritedStores } from "../utils/getInheritedStores.js";
4
4
  /**
5
5
  * @ignore
6
6
  */
@@ -1,4 +1,4 @@
1
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
1
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
2
2
  export function itemMapper(value, options) {
3
3
  return value && value.isClass ? execMapper("class", value, options) : execMapper("any", value, options);
4
4
  }
@@ -1,6 +1,6 @@
1
- import { registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
2
- import { mapGenericsOptions } from "../utils/generics";
3
- import { createRef, toRef } from "../utils/ref";
1
+ import { registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
2
+ import { mapGenericsOptions } from "../utils/generics.js";
3
+ import { createRef, toRef } from "../utils/ref.js";
4
4
  export function lazyRefMapper(input, options) {
5
5
  var _a;
6
6
  const name = input.name;
@@ -1,5 +1,5 @@
1
- import { mapGenericsOptions } from "../utils/generics";
2
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
1
+ import { mapGenericsOptions } from "../utils/generics.js";
2
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
3
3
  /**
4
4
  * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter.
5
5
  * @param input
@@ -1,7 +1,7 @@
1
1
  import { isArray } from "@tsed/core";
2
- import { alterIgnore } from "../hooks/alterIgnore";
3
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
4
- import { mapNullableType } from "../utils/mapNullableType";
2
+ import { alterIgnore } from "../hooks/alterIgnore.js";
3
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
4
+ import { mapNullableType } from "../utils/mapNullableType.js";
5
5
  /**
6
6
  * Serialize Any object to a json schema
7
7
  * @param input
@@ -1,4 +1,4 @@
1
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
1
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
2
2
  export function ofMapper(input, options, parent) {
3
3
  return input.map((value) => {
4
4
  return execMapper("item", value, {
@@ -1,4 +1,4 @@
1
- import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
1
+ import { execMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
2
2
  export function propertiesMapper(input, options, parent) {
3
3
  if (input.isClass) {
4
4
  return execMapper("class", input, options);
@@ -1,10 +1,10 @@
1
1
  import { isObject } from "@tsed/core";
2
- import { mapAliasedProperties } from "../domain/JsonAliasMap";
3
- import { SpecTypes } from "../domain/SpecTypes";
4
- import { execMapper, hasMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer";
5
- import { getRequiredProperties } from "../utils/getRequiredProperties";
6
- import { alterOneOf } from "../hooks/alterOneOf";
7
- import { mapNullableType } from "../utils/mapNullableType";
2
+ import { mapAliasedProperties } from "../domain/JsonAliasMap.js";
3
+ import { SpecTypes } from "../domain/SpecTypes.js";
4
+ import { execMapper, hasMapper, registerJsonSchemaMapper } from "../registries/JsonSchemaMapperContainer.js";
5
+ import { getRequiredProperties } from "../utils/getRequiredProperties.js";
6
+ import { alterOneOf } from "../hooks/alterOneOf.js";
7
+ import { mapNullableType } from "../utils/mapNullableType.js";
8
8
  /**
9
9
  * @ignore
10
10
  */
@@ -1,99 +1,14 @@
1
- export const HTTP_STATUS_MESSAGES = {
2
- "100": { label: "Continue", code: "CONTINUE" },
3
- "101": { label: "Switching Protocols", code: "SWITCHING_PROTOCOLS" },
4
- "102": { label: "Processing", code: "PROCESSING" },
5
- "103": { label: "Early Hints", code: "EARLY_HINTS" },
6
- "200": { label: "Success", code: "SUCCESS" },
7
- "201": { label: "Created", code: "CREATED" },
8
- "202": { label: "Accepted", code: "ACCEPTED" },
9
- "203": {
10
- label: "Non-Authoritative Information",
11
- code: "NON_AUTHORITATIVE_INFORMATION"
12
- },
13
- "204": { label: "No Content", code: "NO_CONTENT" },
14
- "205": { label: "Reset Content", code: "RESET_CONTENT" },
15
- "206": { label: "Partial Content", code: "PARTIAL_CONTENT" },
16
- "207": { label: "Multi-Status", code: "MULTI_STATUS" },
17
- "208": { label: "Already Reported", code: "ALREADY_REPORTED" },
18
- "226": { label: "IM Used", code: "IM_USED" },
19
- "300": { label: "Multiple Choices", code: "MULTIPLE_CHOICES" },
20
- "301": { label: "Moved Permanently", code: "MOVED_PERMANENTLY" },
21
- "302": { label: "Found", code: "FOUND" },
22
- "303": { label: "See Other", code: "SEE_OTHER" },
23
- "304": { label: "Not Modified", code: "NOT_MODIFIED" },
24
- "305": { label: "Use Proxy", code: "USE_PROXY" },
25
- "306": { label: "(Unused)", code: "UNUSED" },
26
- "307": { label: "Temporary Redirect", code: "TEMPORARY_REDIRECT" },
27
- "308": { label: "Permanent Redirect", code: "PERMANENT_REDIRECT" },
28
- "310": { label: "Too Many Redirects", code: "TOO_MANY_REDIRECTS" },
29
- "400": { label: "Bad Request", code: "BAD_REQUEST" },
30
- "401": { label: "Unauthorized", code: "UNAUTHORIZED" },
31
- "402": { label: "Payment Required", code: "PAYMENT_REQUIRED" },
32
- "403": { label: "Forbidden", code: "FORBIDDEN" },
33
- "404": { label: "Not Found", code: "NOT_FOUND" },
34
- "405": { label: "Method Not Allowed", code: "METHOD_NOT_ALLOWED" },
35
- "406": { label: "Not Acceptable", code: "NOT_ACCEPTABLE" },
36
- "407": {
37
- label: "Proxy Authentication Required",
38
- code: "PROXY_AUTHENTICATION_REQUIRED"
39
- },
40
- "408": { label: "Request Timeout", code: "REQUEST_TIMEOUT" },
41
- "409": { label: "Conflict", code: "CONFLICT" },
42
- "410": { label: "Gone", code: "GONE" },
43
- "411": { label: "Length Required", code: "LENGTH_REQUIRED" },
44
- "412": { label: "Precondition Failed", code: "PRECONDITION_FAILED" },
45
- "413": {
46
- label: "Request Entity Too Large",
47
- code: "REQUEST_ENTITY_TOO_LARGE"
48
- },
49
- "414": { label: "Request URI Too Long", code: "REQUEST_URI_TOO_LONG" },
50
- "415": { label: "Unsupported Media Type", code: "UNSUPPORTED_MEDIA_TYPE" },
51
- "416": {
52
- label: "Request Range Unsatisfiable",
53
- code: "REQUEST_RANGE_UNSATISFIABLE"
54
- },
55
- "417": { label: "Expectation Failed", code: "EXPECTATION_FAILED" },
56
- "418": { label: "I'm a Teapot", code: "I_M_A_TEAPOT" },
57
- "421": { label: "Misdirected Request", code: "MISDIRECTED_REQUEST" },
58
- "422": { label: "Unprocessable Entity", code: "UNPROCESSABLE_ENTITY" },
59
- "423": { label: "Locked", code: "LOCKED" },
60
- "424": { label: "Failed Dependency", code: "FAILED_DEPENDENCY" },
61
- "425": { label: "Too Early", code: "TOO_EARLY" },
62
- "426": { label: "Upgrade Required", code: "UPGRADE_REQUIRED" },
63
- "427": { label: "Unassigned", code: "UNASSIGNED" },
64
- "428": { label: "Precondition Required", code: "PRECONDITION_REQUIRED" },
65
- "429": { label: "Too Many Requests", code: "TOO_MANY_REQUESTS" },
66
- "430": { label: "Unassigned", code: "UNASSIGNED" },
67
- "431": {
68
- label: "Request Header Fields Too Large",
69
- code: "REQUEST_HEADER_FIELDS_TOO_LARGE"
70
- },
71
- "451": {
72
- label: "Unavailable For Legal Reasons",
73
- code: "UNAVAILABLE_FOR_LEGAL_REASONS"
74
- },
75
- "500": { label: "Internal Server Error", code: "INTERNAL_SERVER_ERROR" },
76
- "501": { label: "Not Implemented", code: "NOT_IMPLEMENTED" },
77
- "502": { label: "Bad Gateway", code: "BAD_GATEWAY" },
78
- "503": { label: "Service Unavailable", code: "SERVICE_UNAVAILABLE" },
79
- "504": { label: "Gateway Timeout", code: "GATEWAY_TIMEOUT" },
80
- "505": {
81
- label: "HTTP Version Not Supported",
82
- code: "HTTP_VERSION_NOT_SUPPORTED"
83
- },
84
- "506": { label: "Variant Also Negotiates", code: "VARIANT_ALSO_NEGOTIATES" },
85
- "507": { label: "Insufficient Storage", code: "INSUFFICIENT_STORAGE" },
86
- "508": { label: "Loop Detected", code: "LOOP_DETECTED" },
87
- "509": {
88
- label: "Bandwidth Limit Exceeded",
89
- code: "BANDWIDTH_LIMIT_EXCEEDED"
90
- },
91
- "510": { label: "Not Extended", code: "NOT_EXTENDED" },
92
- "511": {
93
- label: "Network Authentication Required",
94
- code: "NETWORK_AUTHENTICATION_REQUIRED"
95
- }
96
- };
1
+ import statuses from "statuses";
2
+ import { constantCase } from "change-case";
3
+ export const HTTP_STATUS_MESSAGES = statuses.codes.reduce((map, code) => {
4
+ const message = String(statuses(code));
5
+ return {
6
+ ...map,
7
+ [String(code)]: { label: message, code: constantCase(message) }
8
+ };
9
+ }, {});
10
+ HTTP_STATUS_MESSAGES["200"].label = "Success";
11
+ HTTP_STATUS_MESSAGES["200"].code = "SUCCESS";
97
12
  export function getStatusConstant(status) {
98
13
  var _a;
99
14
  return (_a = HTTP_STATUS_MESSAGES[status]) === null || _a === void 0 ? void 0 : _a.code;
@@ -1 +1 @@
1
- {"version":3,"file":"httpStatusMessages.js","sourceRoot":"","sources":["../../../src/constants/httpStatusMessages.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,EAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAC;IAC5C,KAAK,EAAE,EAAC,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,qBAAqB,EAAC;IAClE,KAAK,EAAE,EAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAC;IAChD,KAAK,EAAE,EAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EA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BAA4B,CAAC,MAAM,CAAC,0CAAE,KAAK,CAAC;AACtD,CAAC","sourcesContent":["export const HTTP_STATUS_MESSAGES = {\n \"100\": {label: \"Continue\", code: \"CONTINUE\"},\n \"101\": {label: \"Switching Protocols\", code: \"SWITCHING_PROTOCOLS\"},\n \"102\": {label: \"Processing\", code: \"PROCESSING\"},\n \"103\": {label: \"Early Hints\", code: \"EARLY_HINTS\"},\n \"200\": {label: \"Success\", code: \"SUCCESS\"},\n \"201\": {label: \"Created\", code: \"CREATED\"},\n \"202\": {label: \"Accepted\", code: \"ACCEPTED\"},\n \"203\": {\n label: \"Non-Authoritative Information\",\n code: \"NON_AUTHORITATIVE_INFORMATION\"\n },\n \"204\": {label: \"No Content\", code: \"NO_CONTENT\"},\n \"205\": {label: \"Reset Content\", code: \"RESET_CONTENT\"},\n \"206\": {label: \"Partial Content\", code: \"PARTIAL_CONTENT\"},\n \"207\": {label: \"Multi-Status\", code: \"MULTI_STATUS\"},\n \"208\": {label: \"Already Reported\", code: \"ALREADY_REPORTED\"},\n \"226\": {label: \"IM Used\", code: \"IM_USED\"},\n \"300\": {label: \"Multiple Choices\", code: \"MULTIPLE_CHOICES\"},\n \"301\": {label: \"Moved Permanently\", code: \"MOVED_PERMANENTLY\"},\n \"302\": {label: \"Found\", code: \"FOUND\"},\n \"303\": {label: \"See Other\", code: \"SEE_OTHER\"},\n \"304\": {label: \"Not Modified\", code: \"NOT_MODIFIED\"},\n \"305\": {label: \"Use Proxy\", code: \"USE_PROXY\"},\n \"306\": {label: \"(Unused)\", code: \"UNUSED\"},\n \"307\": {label: \"Temporary Redirect\", code: \"TEMPORARY_REDIRECT\"},\n \"308\": {label: \"Permanent Redirect\", code: \"PERMANENT_REDIRECT\"},\n \"310\": {label: \"Too Many Redirects\", code: \"TOO_MANY_REDIRECTS\"},\n \"400\": {label: \"Bad Request\", code: \"BAD_REQUEST\"},\n \"401\": {label: \"Unauthorized\", code: \"UNAUTHORIZED\"},\n \"402\": {label: \"Payment Required\", code: \"PAYMENT_REQUIRED\"},\n \"403\": {label: \"Forbidden\", code: \"FORBIDDEN\"},\n \"404\": {label: \"Not Found\", code: \"NOT_FOUND\"},\n \"405\": {label: \"Method Not Allowed\", code: \"METHOD_NOT_ALLOWED\"},\n \"406\": {label: \"Not Acceptable\", code: \"NOT_ACCEPTABLE\"},\n \"407\": {\n label: \"Proxy Authentication Required\",\n code: \"PROXY_AUTHENTICATION_REQUIRED\"\n },\n \"408\": {label: \"Request Timeout\", code: \"REQUEST_TIMEOUT\"},\n \"409\": {label: \"Conflict\", code: \"CONFLICT\"},\n \"410\": {label: \"Gone\", code: \"GONE\"},\n \"411\": {label: \"Length Required\", code: \"LENGTH_REQUIRED\"},\n \"412\": {label: \"Precondition Failed\", code: \"PRECONDITION_FAILED\"},\n \"413\": {\n label: \"Request Entity Too Large\",\n code: \"REQUEST_ENTITY_TOO_LARGE\"\n },\n \"414\": {label: \"Request URI Too Long\", code: \"REQUEST_URI_TOO_LONG\"},\n \"415\": {label: \"Unsupported Media Type\", code: \"UNSUPPORTED_MEDIA_TYPE\"},\n \"416\": {\n label: \"Request Range Unsatisfiable\",\n code: \"REQUEST_RANGE_UNSATISFIABLE\"\n },\n \"417\": {label: \"Expectation Failed\", code: \"EXPECTATION_FAILED\"},\n \"418\": {label: \"I'm a Teapot\", code: \"I_M_A_TEAPOT\"},\n \"421\": {label: \"Misdirected Request\", code: \"MISDIRECTED_REQUEST\"},\n \"422\": {label: \"Unprocessable Entity\", code: \"UNPROCESSABLE_ENTITY\"},\n \"423\": {label: \"Locked\", code: \"LOCKED\"},\n \"424\": {label: \"Failed Dependency\", code: \"FAILED_DEPENDENCY\"},\n \"425\": {label: \"Too Early\", code: \"TOO_EARLY\"},\n \"426\": {label: \"Upgrade Required\", code: \"UPGRADE_REQUIRED\"},\n \"427\": {label: \"Unassigned\", code: \"UNASSIGNED\"},\n \"428\": {label: \"Precondition Required\", code: \"PRECONDITION_REQUIRED\"},\n \"429\": {label: \"Too Many Requests\", code: \"TOO_MANY_REQUESTS\"},\n \"430\": {label: \"Unassigned\", code: \"UNASSIGNED\"},\n \"431\": {\n label: \"Request Header Fields Too Large\",\n code: \"REQUEST_HEADER_FIELDS_TOO_LARGE\"\n },\n \"451\": {\n label: \"Unavailable For Legal Reasons\",\n code: \"UNAVAILABLE_FOR_LEGAL_REASONS\"\n },\n \"500\": {label: \"Internal Server Error\", code: \"INTERNAL_SERVER_ERROR\"},\n \"501\": {label: \"Not Implemented\", code: \"NOT_IMPLEMENTED\"},\n \"502\": {label: \"Bad Gateway\", code: \"BAD_GATEWAY\"},\n \"503\": {label: \"Service Unavailable\", code: \"SERVICE_UNAVAILABLE\"},\n \"504\": {label: \"Gateway Timeout\", code: \"GATEWAY_TIMEOUT\"},\n \"505\": {\n label: \"HTTP Version Not Supported\",\n code: \"HTTP_VERSION_NOT_SUPPORTED\"\n },\n \"506\": {label: \"Variant Also Negotiates\", code: \"VARIANT_ALSO_NEGOTIATES\"},\n \"507\": {label: \"Insufficient Storage\", code: \"INSUFFICIENT_STORAGE\"},\n \"508\": {label: \"Loop Detected\", code: \"LOOP_DETECTED\"},\n \"509\": {\n label: \"Bandwidth Limit Exceeded\",\n code: \"BANDWIDTH_LIMIT_EXCEEDED\"\n },\n \"510\": {label: \"Not Extended\", code: \"NOT_EXTENDED\"},\n \"511\": {\n label: \"Network Authentication Required\",\n code: \"NETWORK_AUTHENTICATION_REQUIRED\"\n }\n};\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"]}
1
+ {"version":3,"file":"httpStatusMessages.js","sourceRoot":"","sources":["../../../src/constants/httpStatusMessages.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAkD,EAAE,IAAY,EAAE,EAAE;IAC7H,MAAM,OAAO,GAAW,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,OAAO;QACL,GAAG,GAAG;QACN,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,CAAC,OAAO,CAAC,EAAC;KAC9D,CAAC;AACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AAEP,oBAAoB,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC;AAC9C,oBAAoB,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC;AAE7C,MAAM,UAAU,iBAAiB,CAAC,MAAuB;;IACvD,OAAO,MAAC,oBAA4B,CAAC,MAAM,CAAC,0CAAE,IAAI,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAuB;;IACtD,OAAO,MAAC,oBAA4B,CAAC,MAAM,CAAC,0CAAE,KAAK,CAAC;AACtD,CAAC","sourcesContent":["import statuses from \"statuses\";\nimport {constantCase} from \"change-case\";\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"]}
@@ -1,5 +1,5 @@
1
1
  import { Store } from "@tsed/core";
2
- import { JsonEntityFn } from "../common/jsonEntityFn";
2
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
3
3
  /**
4
4
  * Add Children class to compose routes
5
5
  *
@@ -1,4 +1,4 @@
1
- import { CollectionOf } from "./collectionOf";
1
+ import { CollectionOf } from "./collectionOf.js";
2
2
  /**
3
3
  * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityStore } from "../../domain/JsonEntityStore";
1
+ import { JsonEntityStore } from "../../domain/JsonEntityStore.js";
2
2
  /**
3
3
  * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc...
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "../common/jsonEntityFn";
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
2
  /**
3
3
  * The value `maxItems` MUST be a non-negative integer.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "../common/jsonEntityFn";
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
2
  /**
3
3
  * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "../common/jsonEntityFn";
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
2
  /**
3
3
  * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "../common/jsonEntityFn";
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
2
  /**
3
3
  * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "../common/jsonEntityFn";
1
+ import { JsonEntityFn } from "../common/jsonEntityFn.js";
2
2
  /**
3
3
  * 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.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * Accept unknown properties on the deserialized model.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
4
4
  *
@@ -1,6 +1,6 @@
1
1
  import { DecoratorTypes, isClass, useDecorators } from "@tsed/core";
2
- import { JsonEntityFn } from "./jsonEntityFn";
3
- import { Property } from "./property";
2
+ import { JsonEntityFn } from "./jsonEntityFn.js";
3
+ import { Property } from "./property.js";
4
4
  /**
5
5
  * Add allowed values when the property or parameters is required.
6
6
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * Set the type of the array items.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * The const keyword is used to restrict a value to a fixed value.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * Set a custom key on JsonSchema that is not a part of the official spec.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * There are no restrictions placed on the value of this keyword.
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import { decoratorTypeOf, DecoratorTypes } from "@tsed/core";
2
- import { JsonEntityFn } from "./jsonEntityFn";
2
+ import { JsonEntityFn } from "./jsonEntityFn.js";
3
3
  /**
4
4
  * Add a description to the class, method or property
5
5
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  export function Enum(enumValue, ...enumValues) {
3
3
  return JsonEntityFn((store) => {
4
4
  store.itemSchema.enum(enumValue, ...enumValues);
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * Add a example metadata on the decorated element.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { JsonEntityFn } from "./jsonEntityFn";
1
+ import { JsonEntityFn } from "./jsonEntityFn.js";
2
2
  /**
3
3
  * Add a examples metadata on the decorated element.
4
4
  *