@nest-omni/core 3.1.1-9 → 3.1.2-0

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 (310) hide show
  1. package/.hygen/new/crud/controller.ejs.t +82 -0
  2. package/.hygen/new/crud/create.dto.ejs.t +12 -0
  3. package/.hygen/new/crud/entity.ejs.t +26 -0
  4. package/.hygen/new/crud/get.dto.ejs.t +19 -0
  5. package/.hygen/new/crud/index-dto.ejs.t +29 -0
  6. package/.hygen/new/crud/index-response.dto.ejs.t +18 -0
  7. package/.hygen/new/crud/module.ejs.t +32 -0
  8. package/.hygen/new/crud/prompt.js +89 -0
  9. package/.hygen/new/crud/service.ejs.t +76 -0
  10. package/.hygen/new/crud/update.dto.ejs.t +11 -0
  11. package/.hygen/new/module/controller.ejs.t +93 -0
  12. package/.hygen/new/module/create-command.ejs.t +90 -0
  13. package/.hygen/new/module/create.dto.ejs.t +11 -0
  14. package/.hygen/new/module/dto.ejs.t +24 -0
  15. package/.hygen/new/module/entity.ejs.t +33 -0
  16. package/.hygen/new/module/get-query.ejs.t +57 -0
  17. package/.hygen/new/module/module.ejs.t +44 -0
  18. package/.hygen/new/module/not-found.exception.ejs.t +18 -0
  19. package/.hygen/new/module/page-options.dto.ejs.t +12 -0
  20. package/.hygen/new/module/prompt.js +104 -0
  21. package/.hygen/new/module/repository.ejs.t +16 -0
  22. package/.hygen/new/module/service.ejs.t +139 -0
  23. package/.hygen/new/module/translation-dto.ejs.t +27 -0
  24. package/.hygen/new/module/translation-entity.ejs.t +40 -0
  25. package/.hygen/new/module/translation-repository.ejs.t +16 -0
  26. package/.hygen/new/module/update.dto.ejs.t +10 -0
  27. package/.hygen.js +116 -0
  28. package/cache/cache-metrics.service.d.ts +83 -0
  29. package/cache/cache-metrics.service.js +298 -0
  30. package/cache/cache-serialization.service.d.ts +22 -0
  31. package/cache/cache-serialization.service.js +122 -0
  32. package/cache/cache.constants.d.ts +2 -0
  33. package/cache/cache.constants.js +5 -0
  34. package/cache/cache.health.d.ts +35 -0
  35. package/cache/cache.health.js +193 -0
  36. package/cache/cache.module.d.ts +26 -0
  37. package/cache/cache.module.js +155 -0
  38. package/cache/cache.service.d.ts +37 -0
  39. package/cache/cache.service.js +308 -0
  40. package/cache/cache.warmup.service.d.ts +34 -0
  41. package/cache/cache.warmup.service.js +199 -0
  42. package/cache/decorators/cache-evict.decorator.d.ts +2 -0
  43. package/cache/decorators/cache-evict.decorator.js +72 -0
  44. package/cache/decorators/cache-put.decorator.d.ts +2 -0
  45. package/cache/decorators/cache-put.decorator.js +48 -0
  46. package/cache/decorators/cacheable.decorator.d.ts +4 -0
  47. package/cache/decorators/cacheable.decorator.js +68 -0
  48. package/cache/decorators/index.d.ts +3 -0
  49. package/cache/decorators/index.js +11 -0
  50. package/cache/dependencies/callback.dependency.d.ts +11 -0
  51. package/cache/dependencies/callback.dependency.js +92 -0
  52. package/cache/dependencies/chain.dependency.d.ts +20 -0
  53. package/cache/dependencies/chain.dependency.js +113 -0
  54. package/cache/dependencies/db.dependency.d.ts +15 -0
  55. package/cache/dependencies/db.dependency.js +71 -0
  56. package/cache/dependencies/file.dependency.d.ts +17 -0
  57. package/cache/dependencies/file.dependency.js +63 -0
  58. package/cache/dependencies/index.d.ts +6 -0
  59. package/cache/dependencies/index.js +22 -0
  60. package/cache/dependencies/tag.dependency.d.ts +16 -0
  61. package/cache/dependencies/tag.dependency.js +75 -0
  62. package/cache/dependencies/time.dependency.d.ts +19 -0
  63. package/cache/dependencies/time.dependency.js +71 -0
  64. package/cache/examples/basic-usage.d.ts +58 -0
  65. package/cache/examples/basic-usage.js +379 -0
  66. package/cache/index.d.ts +15 -0
  67. package/cache/index.js +44 -0
  68. package/cache/interfaces/cache-dependency.interface.d.ts +11 -0
  69. package/cache/interfaces/cache-dependency.interface.js +2 -0
  70. package/cache/interfaces/cache-options.interface.d.ts +32 -0
  71. package/cache/interfaces/cache-options.interface.js +9 -0
  72. package/cache/interfaces/cache-provider.interface.d.ts +28 -0
  73. package/cache/interfaces/cache-provider.interface.js +2 -0
  74. package/cache/interfaces/index.d.ts +3 -0
  75. package/cache/interfaces/index.js +19 -0
  76. package/cache/providers/base-cache.provider.d.ts +16 -0
  77. package/cache/providers/base-cache.provider.js +32 -0
  78. package/cache/providers/cls-cache.provider.d.ts +16 -0
  79. package/cache/providers/cls-cache.provider.js +140 -0
  80. package/cache/providers/index.d.ts +4 -0
  81. package/cache/providers/index.js +23 -0
  82. package/cache/providers/memory-cache.provider.d.ts +26 -0
  83. package/cache/providers/memory-cache.provider.js +171 -0
  84. package/cache/providers/redis-cache.provider.d.ts +23 -0
  85. package/cache/providers/redis-cache.provider.js +215 -0
  86. package/cache/utils/dependency-manager.util.d.ts +15 -0
  87. package/cache/utils/dependency-manager.util.js +141 -0
  88. package/cache/utils/index.d.ts +2 -0
  89. package/cache/utils/index.js +18 -0
  90. package/cache/utils/key-generator.util.d.ts +13 -0
  91. package/cache/utils/key-generator.util.js +74 -0
  92. package/common/abstract.entity.d.ts +20 -0
  93. package/common/abstract.entity.js +81 -0
  94. package/common/boilerplate.polyfill.d.ts +50 -0
  95. package/common/boilerplate.polyfill.js +152 -0
  96. package/common/dto/abstract.dto.d.ts +13 -0
  97. package/common/dto/abstract.dto.js +59 -0
  98. package/common/dto/bulk-id.dto.d.ts +3 -0
  99. package/common/dto/bulk-id.dto.js +27 -0
  100. package/common/dto/create-translation.dto.d.ts +5 -0
  101. package/common/dto/create-translation.dto.js +25 -0
  102. package/common/dto/dto-container.d.ts +9 -0
  103. package/common/dto/dto-container.js +59 -0
  104. package/common/dto/dto-decorators.d.ts +18 -0
  105. package/common/dto/dto-decorators.js +59 -0
  106. package/common/dto/dto-extensions.d.ts +12 -0
  107. package/common/dto/dto-extensions.js +63 -0
  108. package/common/dto/dto-service-accessor.d.ts +7 -0
  109. package/common/dto/dto-service-accessor.js +49 -0
  110. package/common/dto/dto-transformer.d.ts +11 -0
  111. package/common/dto/dto-transformer.js +49 -0
  112. package/common/dto/index.d.ts +12 -0
  113. package/common/dto/index.js +28 -0
  114. package/common/dto/page-meta.dto.d.ts +15 -0
  115. package/common/dto/page-meta.dto.js +48 -0
  116. package/common/dto/page-options.dto.d.ts +5 -0
  117. package/common/dto/page-options.dto.js +40 -0
  118. package/common/dto/page.dto.d.ts +11 -0
  119. package/common/dto/page.dto.js +53 -0
  120. package/common/examples/paginate-and-map.example.d.ts +14 -0
  121. package/common/examples/paginate-and-map.example.js +158 -0
  122. package/common/index.d.ts +6 -0
  123. package/common/index.js +22 -0
  124. package/common/snake-naming.strategy.d.ts +11 -0
  125. package/common/snake-naming.strategy.js +37 -0
  126. package/common/types.d.ts +9 -0
  127. package/common/types.js +2 -0
  128. package/common/utils.d.ts +3 -0
  129. package/common/utils.js +24 -0
  130. package/constants/index.d.ts +2 -0
  131. package/constants/index.js +18 -0
  132. package/constants/language-code.d.ts +5 -0
  133. package/constants/language-code.js +9 -0
  134. package/constants/order.d.ts +4 -0
  135. package/constants/order.js +8 -0
  136. package/decorators/api-page-ok-response.decorator.d.ts +5 -0
  137. package/decorators/api-page-ok-response.decorator.js +24 -0
  138. package/decorators/api-paginated-response.decorator.d.ts +2 -0
  139. package/decorators/api-paginated-response.decorator.js +9 -0
  140. package/decorators/auth-user.decorator.d.ts +1 -0
  141. package/decorators/auth-user.decorator.js +14 -0
  142. package/decorators/controller.decorator.d.ts +1 -0
  143. package/decorators/controller.decorator.js +10 -0
  144. package/decorators/examples/validation-decorators.example.d.ts +69 -0
  145. package/decorators/examples/validation-decorators.example.js +331 -0
  146. package/decorators/field.decorators.d.ts +79 -0
  147. package/decorators/field.decorators.js +499 -0
  148. package/decorators/http.decorators.d.ts +3 -0
  149. package/decorators/http.decorators.js +7 -0
  150. package/decorators/index.d.ts +14 -0
  151. package/decorators/index.js +30 -0
  152. package/decorators/operation.decorator.d.ts +1 -0
  153. package/decorators/operation.decorator.js +6 -0
  154. package/decorators/paginated-response.decorator.d.ts +11 -0
  155. package/decorators/paginated-response.decorator.js +60 -0
  156. package/decorators/property.decorators.d.ts +15 -0
  157. package/decorators/property.decorators.js +31 -0
  158. package/decorators/public-route.decorator.d.ts +3 -0
  159. package/decorators/public-route.decorator.js +7 -0
  160. package/decorators/swagger.schema.d.ts +5 -0
  161. package/decorators/swagger.schema.js +78 -0
  162. package/decorators/timestamp-column.decorator.d.ts +1 -0
  163. package/decorators/timestamp-column.decorator.js +27 -0
  164. package/decorators/transform.decorators.d.ts +8 -0
  165. package/decorators/transform.decorators.js +100 -0
  166. package/decorators/translate.decorator.d.ts +5 -0
  167. package/decorators/translate.decorator.js +17 -0
  168. package/decorators/use-dto.decorator.d.ts +4 -0
  169. package/decorators/use-dto.decorator.js +8 -0
  170. package/decorators/user-check.decorator.d.ts +6 -0
  171. package/decorators/user-check.decorator.js +21 -0
  172. package/decorators/user.decorator.d.ts +12 -0
  173. package/decorators/user.decorator.js +44 -0
  174. package/decorators/user_auth.decorator.d.ts +1 -0
  175. package/decorators/user_auth.decorator.js +15 -0
  176. package/decorators/validator.decorators.d.ts +18 -0
  177. package/decorators/validator.decorators.js +193 -0
  178. package/exceptions/file-not-image.exception.d.ts +4 -0
  179. package/exceptions/file-not-image.exception.js +10 -0
  180. package/exceptions/index.d.ts +2 -0
  181. package/exceptions/index.js +18 -0
  182. package/exceptions/page-type.exception.d.ts +4 -0
  183. package/exceptions/page-type.exception.js +10 -0
  184. package/exceptions/user-not-found.exception.d.ts +4 -0
  185. package/exceptions/user-not-found.exception.js +10 -0
  186. package/filters/bad-request.filter.d.ts +5 -0
  187. package/filters/bad-request.filter.js +71 -0
  188. package/filters/constraint-errors.d.ts +1 -0
  189. package/filters/constraint-errors.js +6 -0
  190. package/filters/index.d.ts +3 -0
  191. package/filters/index.js +19 -0
  192. package/filters/query-failed.filter.d.ts +10 -0
  193. package/filters/query-failed.filter.js +42 -0
  194. package/health-checker/health-checker.controller.d.ts +13 -0
  195. package/health-checker/health-checker.controller.js +69 -0
  196. package/health-checker/health-checker.module.d.ts +2 -0
  197. package/health-checker/health-checker.module.js +24 -0
  198. package/health-checker/index.d.ts +2 -0
  199. package/health-checker/index.js +18 -0
  200. package/helpers/common.helper.d.ts +3 -0
  201. package/helpers/common.helper.js +36 -0
  202. package/helpers/date.helper.d.ts +10 -0
  203. package/helpers/date.helper.js +57 -0
  204. package/helpers/index.d.ts +2 -0
  205. package/helpers/index.js +18 -0
  206. package/i18n/en_US/validation.json +44 -0
  207. package/i18n/zh_CN/validation.json +44 -0
  208. package/index.d.ts +18 -0
  209. package/index.js +3 -0
  210. package/interceptors/index.d.ts +2 -0
  211. package/interceptors/index.js +18 -0
  212. package/interceptors/language-interceptor.service.d.ts +6 -0
  213. package/interceptors/language-interceptor.service.js +29 -0
  214. package/interceptors/translation-interceptor.service.d.ts +5 -0
  215. package/interceptors/translation-interceptor.service.js +34 -0
  216. package/interfaces/IApiFile.d.ts +4 -0
  217. package/interfaces/IApiFile.js +2 -0
  218. package/interfaces/IFile.d.ts +8 -0
  219. package/interfaces/IFile.js +2 -0
  220. package/interfaces/ITranslationDecoratorInterface.d.ts +3 -0
  221. package/interfaces/ITranslationDecoratorInterface.js +2 -0
  222. package/interfaces/index.d.ts +3 -0
  223. package/interfaces/index.js +19 -0
  224. package/interfaces/response.d.ts +25 -0
  225. package/interfaces/response.js +2 -0
  226. package/middlewares/index.d.ts +4 -0
  227. package/middlewares/index.js +20 -0
  228. package/middlewares/omni-auth.middleware.d.ts +1 -0
  229. package/middlewares/omni-auth.middleware.js +13 -0
  230. package/middlewares/powerby.middleware.d.ts +1 -0
  231. package/middlewares/powerby.middleware.js +10 -0
  232. package/middlewares/request-id.middleware.d.ts +7 -0
  233. package/middlewares/request-id.middleware.js +22 -0
  234. package/middlewares/xml.middleware.d.ts +4 -0
  235. package/middlewares/xml.middleware.js +24 -0
  236. package/package.json +41 -116
  237. package/providers/context.provider.d.ts +34 -0
  238. package/providers/context.provider.js +80 -0
  239. package/providers/generator.provider.d.ts +9 -0
  240. package/providers/generator.provider.js +50 -0
  241. package/providers/index.d.ts +2 -0
  242. package/providers/index.js +18 -0
  243. package/redis-lock/examples/lock-strategy.examples.d.ts +73 -0
  244. package/redis-lock/examples/lock-strategy.examples.js +387 -0
  245. package/redis-lock/index.d.ts +4 -0
  246. package/redis-lock/index.js +16 -0
  247. package/redis-lock/redis-lock.decorator.d.ts +12 -0
  248. package/redis-lock/redis-lock.decorator.js +125 -0
  249. package/redis-lock/redis-lock.module.d.ts +23 -0
  250. package/redis-lock/redis-lock.module.js +117 -0
  251. package/redis-lock/redis-lock.service.d.ts +66 -0
  252. package/redis-lock/redis-lock.service.js +413 -0
  253. package/setup/bootstrap.setup.d.ts +2 -0
  254. package/setup/bootstrap.setup.js +184 -0
  255. package/setup/index.d.ts +4 -0
  256. package/setup/index.js +20 -0
  257. package/setup/mode.setup.d.ts +12 -0
  258. package/setup/mode.setup.js +60 -0
  259. package/setup/schedule.decorator.d.ts +23 -0
  260. package/setup/schedule.decorator.js +233 -0
  261. package/setup/worker.decorator.d.ts +14 -0
  262. package/setup/worker.decorator.js +130 -0
  263. package/shared/index.d.ts +2 -0
  264. package/shared/index.js +18 -0
  265. package/shared/serviceRegistryModule.d.ts +2 -0
  266. package/shared/serviceRegistryModule.js +170 -0
  267. package/shared/services/api-config.service.d.ts +54 -0
  268. package/shared/services/api-config.service.js +287 -0
  269. package/shared/services/generator.service.d.ts +4 -0
  270. package/shared/services/generator.service.js +23 -0
  271. package/shared/services/index.d.ts +4 -0
  272. package/shared/services/index.js +20 -0
  273. package/shared/services/translation.service.d.ts +9 -0
  274. package/shared/services/translation.service.js +70 -0
  275. package/shared/services/validator.service.d.ts +3 -0
  276. package/shared/services/validator.service.js +20 -0
  277. package/validator-json/decorators.d.ts +6 -0
  278. package/validator-json/decorators.js +22 -0
  279. package/validator-json/default.d.ts +6 -0
  280. package/validator-json/default.js +138 -0
  281. package/validator-json/defaultConverters.d.ts +8 -0
  282. package/validator-json/defaultConverters.js +376 -0
  283. package/validator-json/index.d.ts +4 -0
  284. package/validator-json/index.js +20 -0
  285. package/validator-json/options.d.ts +11 -0
  286. package/validator-json/options.js +10 -0
  287. package/validators/file-mimetype.validator.d.ts +13 -0
  288. package/validators/file-mimetype.validator.js +21 -0
  289. package/validators/index.d.ts +6 -0
  290. package/validators/index.js +22 -0
  291. package/validators/is-exists.validator.d.ts +18 -0
  292. package/validators/is-exists.validator.js +60 -0
  293. package/validators/is-unique.validator.d.ts +17 -0
  294. package/validators/is-unique.validator.js +91 -0
  295. package/validators/phone-country-code.validator.d.ts +2 -0
  296. package/validators/phone-country-code.validator.js +29 -0
  297. package/validators/same-as.validator.d.ts +2 -0
  298. package/validators/same-as.validator.js +24 -0
  299. package/validators/skip-empty.validator.d.ts +1 -0
  300. package/validators/skip-empty.validator.js +17 -0
  301. package/vault/index.d.ts +4 -0
  302. package/vault/index.js +20 -0
  303. package/vault/interfaces/vault-options.interface.d.ts +22 -0
  304. package/vault/interfaces/vault-options.interface.js +2 -0
  305. package/vault/vault-config.loader.d.ts +13 -0
  306. package/vault/vault-config.loader.js +246 -0
  307. package/vault/vault-config.service.d.ts +18 -0
  308. package/vault/vault-config.service.js +174 -0
  309. package/vault/vault.module.d.ts +2 -0
  310. package/vault/vault.module.js +21 -0
@@ -0,0 +1,499 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NumberField = NumberField;
4
+ exports.NumberFieldOptional = NumberFieldOptional;
5
+ exports.StringField = StringField;
6
+ exports.StringFieldOptional = StringFieldOptional;
7
+ exports.PasswordField = PasswordField;
8
+ exports.PasswordFieldOptional = PasswordFieldOptional;
9
+ exports.BooleanField = BooleanField;
10
+ exports.BooleanFieldOptional = BooleanFieldOptional;
11
+ exports.TranslationsField = TranslationsField;
12
+ exports.TranslationsFieldOptional = TranslationsFieldOptional;
13
+ exports.TmpKeyField = TmpKeyField;
14
+ exports.TmpKeyFieldOptional = TmpKeyFieldOptional;
15
+ exports.getEnumDescription = getEnumDescription;
16
+ exports.EnumField = EnumField;
17
+ exports.ClassField = ClassField;
18
+ exports.EnumFieldOptional = EnumFieldOptional;
19
+ exports.ClassFieldOptional = ClassFieldOptional;
20
+ exports.EmailField = EmailField;
21
+ exports.EmailFieldOptional = EmailFieldOptional;
22
+ exports.PhoneField = PhoneField;
23
+ exports.PhoneFieldOptional = PhoneFieldOptional;
24
+ exports.UUIDField = UUIDField;
25
+ exports.UUIDFieldOptional = UUIDFieldOptional;
26
+ exports.URLField = URLField;
27
+ exports.URLFieldOptional = URLFieldOptional;
28
+ exports.FQDNField = FQDNField;
29
+ exports.FQDNFieldOptional = FQDNFieldOptional;
30
+ exports.DateField = DateField;
31
+ exports.DateFieldOptional = DateFieldOptional;
32
+ exports.IpFieldOptional = IpFieldOptional;
33
+ exports.IpField = IpField;
34
+ exports.ObjectField = ObjectField;
35
+ exports.ObjectFieldOptional = ObjectFieldOptional;
36
+ exports.TimeZoneField = TimeZoneField;
37
+ exports.TimeZoneFieldOptional = TimeZoneFieldOptional;
38
+ exports.LocaleField = LocaleField;
39
+ exports.LocaleFieldOptional = LocaleFieldOptional;
40
+ const common_1 = require("@nestjs/common");
41
+ const swagger_1 = require("@nestjs/swagger");
42
+ const nestjs_i18n_1 = require("nestjs-i18n");
43
+ const class_transformer_1 = require("class-transformer");
44
+ const class_validator_1 = require("class-validator");
45
+ const constants_1 = require("../constants");
46
+ const property_decorators_1 = require("./property.decorators");
47
+ const transform_decorators_1 = require("./transform.decorators");
48
+ const validator_decorators_1 = require("./validator.decorators");
49
+ function NumberField(options = {}) {
50
+ const decorators = [(0, class_transformer_1.Type)(() => Number)];
51
+ if (options.nullable) {
52
+ decorators.push((0, validator_decorators_1.IsNullable)({
53
+ each: options.each,
54
+ }));
55
+ }
56
+ else {
57
+ decorators.push((0, class_validator_1.NotEquals)(null, {
58
+ each: options.each,
59
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.NOT_EQUALS'),
60
+ }));
61
+ }
62
+ if (options.swagger !== false) {
63
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: Number }, options)));
64
+ }
65
+ if (options.each) {
66
+ decorators.push((0, transform_decorators_1.ToArray)());
67
+ }
68
+ if (options.int) {
69
+ decorators.push((0, class_validator_1.IsInt)({
70
+ each: options.each,
71
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_INT'),
72
+ }));
73
+ }
74
+ else {
75
+ decorators.push((0, class_validator_1.IsNumber)({}, {
76
+ each: options.each,
77
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_NUMBER'),
78
+ }));
79
+ }
80
+ if (typeof options.min === 'number') {
81
+ decorators.push((0, class_validator_1.Min)(options.min, {
82
+ each: options.each,
83
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.MIN'),
84
+ }));
85
+ }
86
+ if (typeof options.max === 'number') {
87
+ decorators.push((0, class_validator_1.Max)(options.max, {
88
+ each: options.each,
89
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.MAX'),
90
+ }));
91
+ }
92
+ if (options.isPositive) {
93
+ decorators.push((0, class_validator_1.IsPositive)({
94
+ each: options.each,
95
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_POSITIVE'),
96
+ }));
97
+ }
98
+ return (0, common_1.applyDecorators)(...decorators);
99
+ }
100
+ function NumberFieldOptional(options = {}) {
101
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), NumberField(Object.assign({ required: false }, options)));
102
+ }
103
+ function StringField(options = {}) {
104
+ var _a;
105
+ const decorators = [
106
+ (0, class_transformer_1.Type)(() => String),
107
+ (0, class_validator_1.IsString)({
108
+ each: options.each,
109
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_STRING'),
110
+ }),
111
+ ];
112
+ if (options.nullable) {
113
+ decorators.push((0, validator_decorators_1.IsNullable)({ each: options.each }));
114
+ }
115
+ else {
116
+ decorators.push((0, class_validator_1.NotEquals)(null, {
117
+ each: options.each,
118
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.NOT_EQUALS'),
119
+ }));
120
+ }
121
+ if (options.swagger !== false) {
122
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign(Object.assign({ type: String }, options), { isArray: options.each })));
123
+ }
124
+ const minLength = (_a = options.minLength) !== null && _a !== void 0 ? _a : 1;
125
+ decorators.push((0, class_validator_1.MinLength)(minLength, {
126
+ each: options.each,
127
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.MIN_LENGTH'),
128
+ }));
129
+ if (options.maxLength) {
130
+ decorators.push((0, class_validator_1.MaxLength)(options.maxLength, {
131
+ each: options.each,
132
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.MAX_LENGTH'),
133
+ }));
134
+ }
135
+ if (options.toLowerCase) {
136
+ decorators.push((0, transform_decorators_1.ToLowerCase)());
137
+ }
138
+ if (options.toUpperCase) {
139
+ decorators.push((0, transform_decorators_1.ToUpperCase)());
140
+ }
141
+ return (0, common_1.applyDecorators)(...decorators);
142
+ }
143
+ function StringFieldOptional(options = {}) {
144
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), StringField(Object.assign({ required: false }, options)));
145
+ }
146
+ function PasswordField(options = {}) {
147
+ const decorators = [
148
+ StringField(Object.assign(Object.assign({}, options), { minLength: 6 })),
149
+ ];
150
+ if (options.nullable) {
151
+ decorators.push((0, validator_decorators_1.IsNullable)());
152
+ }
153
+ else {
154
+ decorators.push((0, class_validator_1.NotEquals)(null));
155
+ }
156
+ return (0, common_1.applyDecorators)(...decorators);
157
+ }
158
+ function PasswordFieldOptional(options = {}) {
159
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), PasswordField(Object.assign({ required: false }, options)));
160
+ }
161
+ function BooleanField(options = {}) {
162
+ const decorators = [
163
+ (0, transform_decorators_1.ToBoolean)(),
164
+ (0, class_validator_1.IsBoolean)({ message: 'validation.INVALID_BOOLEAN' }),
165
+ ];
166
+ if (options.nullable) {
167
+ decorators.push((0, validator_decorators_1.IsNullable)());
168
+ }
169
+ else {
170
+ decorators.push((0, class_validator_1.NotEquals)(null));
171
+ }
172
+ if (options.swagger !== false) {
173
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: Boolean }, options)));
174
+ }
175
+ return (0, common_1.applyDecorators)(...decorators);
176
+ }
177
+ function BooleanFieldOptional(options = {}) {
178
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), BooleanField(Object.assign({ required: false }, options)));
179
+ }
180
+ function TranslationsField(options) {
181
+ const decorators = [
182
+ (0, class_validator_1.ArrayMinSize)(constants_1.supportedLanguageCount),
183
+ (0, class_validator_1.ArrayMaxSize)(constants_1.supportedLanguageCount),
184
+ (0, class_validator_1.ValidateNested)({
185
+ each: true,
186
+ }),
187
+ (0, class_transformer_1.Type)(() => options.type),
188
+ ];
189
+ if (options.nullable) {
190
+ decorators.push((0, validator_decorators_1.IsNullable)());
191
+ }
192
+ else {
193
+ decorators.push((0, class_validator_1.NotEquals)(null));
194
+ }
195
+ if (options.swagger !== false) {
196
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ isArray: true }, options)));
197
+ }
198
+ return (0, common_1.applyDecorators)(...decorators);
199
+ }
200
+ function TranslationsFieldOptional(options) {
201
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), TranslationsField(Object.assign({ required: false }, options)));
202
+ }
203
+ function TmpKeyField(options = {}) {
204
+ const decorators = [
205
+ StringField(options),
206
+ (0, validator_decorators_1.IsTmpKey)({ each: options.each }),
207
+ ];
208
+ if (options.nullable) {
209
+ decorators.push((0, validator_decorators_1.IsNullable)());
210
+ }
211
+ else {
212
+ decorators.push((0, class_validator_1.NotEquals)(null));
213
+ }
214
+ if (options.swagger !== false) {
215
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign(Object.assign({ type: String }, options), { isArray: options.each })));
216
+ }
217
+ return (0, common_1.applyDecorators)(...decorators);
218
+ }
219
+ function TmpKeyFieldOptional(options = {}) {
220
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), TmpKeyField(Object.assign({ required: false }, options)));
221
+ }
222
+ function getEnumDescription(enumType) {
223
+ const keys = Object.keys(enumType).filter((k) => typeof enumType[k] === 'number');
224
+ return keys.map((k) => `${enumType[k]}: ${k}`).join(', ');
225
+ }
226
+ function EnumField(getEnum, options = {}) {
227
+ const enumValue = getEnum();
228
+ const decorators = [
229
+ (0, class_validator_1.IsEnum)(enumValue, {
230
+ each: options.each,
231
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_ENUM'),
232
+ }),
233
+ ];
234
+ if (options.nullable) {
235
+ decorators.push((0, validator_decorators_1.IsNullable)());
236
+ }
237
+ else {
238
+ decorators.push((0, class_validator_1.NotEquals)(null));
239
+ }
240
+ if (options.each) {
241
+ decorators.push((0, transform_decorators_1.ToArray)());
242
+ }
243
+ if (options.swagger !== false) {
244
+ decorators.push((0, property_decorators_1.ApiEnumProperty)(getEnum, Object.assign(Object.assign({}, options), { isArray: options.each })));
245
+ }
246
+ return (0, common_1.applyDecorators)(...decorators);
247
+ }
248
+ function ClassField(getClass, options = {}) {
249
+ const classValue = getClass();
250
+ if (!classValue) {
251
+ throw new Error('ClassField: recursive class definition');
252
+ }
253
+ const decorators = [
254
+ (0, class_transformer_1.Type)(() => classValue),
255
+ (0, class_validator_1.ValidateNested)({ each: options.each }),
256
+ ];
257
+ if (options.required !== false) {
258
+ decorators.push((0, class_validator_1.IsDefined)());
259
+ }
260
+ if (options.nullable) {
261
+ decorators.push((0, validator_decorators_1.IsNullable)());
262
+ }
263
+ else {
264
+ decorators.push((0, class_validator_1.NotEquals)(null));
265
+ }
266
+ if (options.swagger !== false) {
267
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: () => classValue, isArray: options.each }, options)));
268
+ }
269
+ if (options.each) {
270
+ decorators.push((0, transform_decorators_1.ToArray)());
271
+ }
272
+ return (0, common_1.applyDecorators)(...decorators);
273
+ }
274
+ function EnumFieldOptional(getEnum, options = {}) {
275
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), EnumField(getEnum, Object.assign({ required: false }, options)));
276
+ }
277
+ function ClassFieldOptional(getClass, options = {}) {
278
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), ClassField(getClass, Object.assign({ required: false }, options)));
279
+ }
280
+ function EmailField(options = {}) {
281
+ var _a;
282
+ const decorators = [
283
+ (0, class_validator_1.IsEmail)(options.emailOptions, Object.assign({ message: (_a = options.message) !== null && _a !== void 0 ? _a : (0, nestjs_i18n_1.i18nValidationMessage)('validation.INVALID_EMAIL') }, options)),
284
+ StringField(Object.assign({ toLowerCase: true }, options)),
285
+ ];
286
+ if (options.nullable) {
287
+ decorators.push((0, validator_decorators_1.IsNullable)());
288
+ }
289
+ else {
290
+ decorators.push((0, class_validator_1.NotEquals)(null));
291
+ }
292
+ if (options.swagger !== false) {
293
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: String }, options)));
294
+ }
295
+ return (0, common_1.applyDecorators)(...decorators);
296
+ }
297
+ function EmailFieldOptional(options = {}) {
298
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), EmailField(Object.assign({ required: false }, options)));
299
+ }
300
+ function PhoneField(options = {}) {
301
+ const decorators = [(0, validator_decorators_1.IsPhoneNumber)(), (0, transform_decorators_1.PhoneNumberSerializer)()];
302
+ if (options.nullable) {
303
+ decorators.push((0, validator_decorators_1.IsNullable)());
304
+ }
305
+ else {
306
+ decorators.push((0, class_validator_1.NotEquals)(null));
307
+ }
308
+ if (options.swagger !== false) {
309
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: String }, options)));
310
+ }
311
+ return (0, common_1.applyDecorators)(...decorators);
312
+ }
313
+ function PhoneFieldOptional(options = {}) {
314
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), PhoneField(Object.assign({ required: false }, options)));
315
+ }
316
+ function UUIDField(options = {}) {
317
+ const decorators = [
318
+ (0, class_transformer_1.Type)(() => String),
319
+ (0, class_validator_1.IsUUID)('4', {
320
+ each: options.each,
321
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_UUID'),
322
+ }),
323
+ ];
324
+ if (options.nullable) {
325
+ decorators.push((0, validator_decorators_1.IsNullable)({ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_NULLABLE') }));
326
+ }
327
+ else {
328
+ decorators.push((0, class_validator_1.NotEquals)(null));
329
+ }
330
+ if (options.swagger !== false) {
331
+ decorators.push((0, property_decorators_1.ApiUUIDProperty)(options));
332
+ }
333
+ if (options.each) {
334
+ decorators.push((0, transform_decorators_1.ToArray)());
335
+ }
336
+ return (0, common_1.applyDecorators)(...decorators);
337
+ }
338
+ function UUIDFieldOptional(options = {}) {
339
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), UUIDField(Object.assign({ required: false }, options)));
340
+ }
341
+ function URLField(options = {}) {
342
+ const decorators = [StringField(Object.assign({}, options))];
343
+ if (options.simpleUrl) {
344
+ decorators.push((0, validator_decorators_1.IsHttpUrl)({
345
+ each: options.each,
346
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_URL'),
347
+ }));
348
+ }
349
+ else {
350
+ decorators.push((0, class_validator_1.IsUrl)(options.urlOptions, {
351
+ each: options.each,
352
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_URL'),
353
+ }));
354
+ }
355
+ if (options.nullable) {
356
+ decorators.push((0, validator_decorators_1.IsNullable)({ each: options.each }));
357
+ }
358
+ else {
359
+ decorators.push((0, class_validator_1.NotEquals)(null, { each: options.each }));
360
+ }
361
+ return (0, common_1.applyDecorators)(...decorators);
362
+ }
363
+ function URLFieldOptional(options = {}) {
364
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), URLField(Object.assign({ required: false }, options)));
365
+ }
366
+ function FQDNField(options = {}) {
367
+ const decorators = [
368
+ (0, class_validator_1.IsFQDN)(options, {
369
+ each: options.each,
370
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_FQDN'),
371
+ }),
372
+ StringField(Object.assign({ toLowerCase: true }, options)),
373
+ ];
374
+ if (options.nullable) {
375
+ decorators.push((0, validator_decorators_1.IsNullable)({ each: options.each }));
376
+ }
377
+ else {
378
+ decorators.push((0, class_validator_1.NotEquals)(null, { each: options.each }));
379
+ }
380
+ return (0, common_1.applyDecorators)(...decorators);
381
+ }
382
+ function FQDNFieldOptional(options = {}) {
383
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), FQDNField(Object.assign({ required: false }, options)));
384
+ }
385
+ function DateField(options = {}) {
386
+ var _a;
387
+ const decorators = [
388
+ (0, class_transformer_1.Type)(() => Date),
389
+ (0, class_validator_1.IsDate)({ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_DATE') }),
390
+ ];
391
+ if (options.nullable) {
392
+ decorators.push((0, validator_decorators_1.IsNullable)());
393
+ }
394
+ else {
395
+ decorators.push((0, class_validator_1.NotEquals)(null));
396
+ }
397
+ if (options.minDate) {
398
+ decorators.push((0, class_validator_1.MinDate)(options.minDate, {
399
+ each: options.each,
400
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.MIN_DATE'),
401
+ }));
402
+ }
403
+ if (options.maxDate) {
404
+ decorators.push((0, class_validator_1.MaxDate)(options.maxDate, {
405
+ each: options.each,
406
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.MAX_DATE'),
407
+ }));
408
+ }
409
+ if (options.swagger !== false) {
410
+ const swaggerOptions = Object.assign({ type: Date, example: (_a = options.example) !== null && _a !== void 0 ? _a : new Date() }, options);
411
+ decorators.push((0, swagger_1.ApiProperty)(swaggerOptions));
412
+ }
413
+ return (0, common_1.applyDecorators)(...decorators);
414
+ }
415
+ function DateFieldOptional(options = {}) {
416
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), DateField(Object.assign(Object.assign({}, options), { required: false })));
417
+ }
418
+ function IpFieldOptional(options = {}) {
419
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), IpField(Object.assign({ required: false }, options)));
420
+ }
421
+ function IpField(options) {
422
+ const decorators = [
423
+ (0, class_validator_1.IsIP)(options.version || 4, {
424
+ each: options.each,
425
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_IP'),
426
+ }),
427
+ StringField(Object.assign({ toLowerCase: true }, options)),
428
+ ];
429
+ if (options.nullable) {
430
+ decorators.push((0, validator_decorators_1.IsNullable)({ each: options.each }));
431
+ }
432
+ else {
433
+ decorators.push((0, class_validator_1.NotEquals)(null, { each: options.each }));
434
+ }
435
+ return (0, common_1.applyDecorators)(...decorators);
436
+ }
437
+ function ObjectField(options = {}) {
438
+ const decorators = [
439
+ (0, class_transformer_1.Type)(() => Object),
440
+ (0, class_validator_1.IsObject)({
441
+ each: options.each,
442
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_OBJECT'),
443
+ }),
444
+ ];
445
+ if (options.nullable) {
446
+ decorators.push((0, validator_decorators_1.IsNullable)({ each: options.each }));
447
+ }
448
+ else {
449
+ decorators.push((0, class_validator_1.NotEquals)(null, { each: options.each }));
450
+ }
451
+ if (options.swagger !== false) {
452
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: 'object', isArray: options.each }, options)));
453
+ }
454
+ return (0, common_1.applyDecorators)(...decorators);
455
+ }
456
+ function ObjectFieldOptional(options = {}) {
457
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), ObjectField(Object.assign({ required: false }, options)));
458
+ }
459
+ function TimeZoneField(options = {}) {
460
+ const decorators = [
461
+ StringField(Object.assign({}, options)),
462
+ (0, class_validator_1.IsTimeZone)({
463
+ each: options.each,
464
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_TIME_ZONE'),
465
+ }),
466
+ ];
467
+ if (options.nullable) {
468
+ decorators.push((0, validator_decorators_1.IsNullable)({ each: options.each }));
469
+ }
470
+ else {
471
+ decorators.push((0, class_validator_1.NotEquals)(null, { each: options.each }));
472
+ }
473
+ return (0, common_1.applyDecorators)(...decorators);
474
+ }
475
+ function TimeZoneFieldOptional(options = {}) {
476
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), TimeZoneField(Object.assign({ required: false }, options)));
477
+ }
478
+ function LocaleField(options = {}) {
479
+ const decorators = [
480
+ StringField(Object.assign({}, options)),
481
+ (0, class_validator_1.IsLocale)({
482
+ each: options.each,
483
+ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_LOCALE'),
484
+ }),
485
+ ];
486
+ if (options.nullable) {
487
+ decorators.push((0, validator_decorators_1.IsNullable)({ each: options.each }));
488
+ }
489
+ else {
490
+ decorators.push((0, class_validator_1.NotEquals)(null, { each: options.each }));
491
+ }
492
+ if (options.swagger !== false) {
493
+ decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: String }, options)));
494
+ }
495
+ return (0, common_1.applyDecorators)(...decorators);
496
+ }
497
+ function LocaleFieldOptional(options = {}) {
498
+ return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), LocaleField(Object.assign({ required: false }, options)));
499
+ }
@@ -0,0 +1,3 @@
1
+ import type { PipeTransform } from '@nestjs/common';
2
+ import type { Type } from '@nestjs/common/interfaces';
3
+ export declare function UUIDParam(property: string, ...pipes: Array<Type<PipeTransform> | PipeTransform>): ParameterDecorator;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UUIDParam = UUIDParam;
4
+ const common_1 = require("@nestjs/common");
5
+ function UUIDParam(property, ...pipes) {
6
+ return (0, common_1.Param)(property, new common_1.ParseUUIDPipe({ version: '4' }), ...pipes);
7
+ }
@@ -0,0 +1,14 @@
1
+ export * from './api-page-ok-response.decorator';
2
+ export * from './auth-user.decorator';
3
+ export * from './field.decorators';
4
+ export * from './http.decorators';
5
+ export * from './property.decorators';
6
+ export * from './public-route.decorator';
7
+ export * from './swagger.schema';
8
+ export * from './transform.decorators';
9
+ export * from './translate.decorator';
10
+ export * from './use-dto.decorator';
11
+ export * from './validator.decorators';
12
+ export * from './controller.decorator';
13
+ export * from './api-paginated-response.decorator';
14
+ export * from './paginated-response.decorator';
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api-page-ok-response.decorator"), exports);
18
+ __exportStar(require("./auth-user.decorator"), exports);
19
+ __exportStar(require("./field.decorators"), exports);
20
+ __exportStar(require("./http.decorators"), exports);
21
+ __exportStar(require("./property.decorators"), exports);
22
+ __exportStar(require("./public-route.decorator"), exports);
23
+ __exportStar(require("./swagger.schema"), exports);
24
+ __exportStar(require("./transform.decorators"), exports);
25
+ __exportStar(require("./translate.decorator"), exports);
26
+ __exportStar(require("./use-dto.decorator"), exports);
27
+ __exportStar(require("./validator.decorators"), exports);
28
+ __exportStar(require("./controller.decorator"), exports);
29
+ __exportStar(require("./api-paginated-response.decorator"), exports);
30
+ __exportStar(require("./paginated-response.decorator"), exports);
@@ -0,0 +1 @@
1
+ export declare const OperationLog: (operation: string) => import("@nestjs/common").CustomDecorator<string>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OperationLog = void 0;
4
+ const common_1 = require("@nestjs/common");
5
+ const OperationLog = (operation) => (0, common_1.SetMetadata)('operation-log', operation);
6
+ exports.OperationLog = OperationLog;
@@ -0,0 +1,11 @@
1
+ export declare function createPaginatedResponseDto<T extends new (...args: any[]) => any>(entityClass: T): {
2
+ new (): {
3
+ data: InstanceType<T>[];
4
+ count?: number;
5
+ total?: number;
6
+ page?: number;
7
+ pageCount?: number;
8
+ hasPreviousPage?: boolean;
9
+ hasNextPage?: boolean;
10
+ };
11
+ };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.createPaginatedResponseDto = createPaginatedResponseDto;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_transformer_1 = require("class-transformer");
15
+ function createPaginatedResponseDto(entityClass) {
16
+ const entityName = entityClass.name.replace('Dto', '');
17
+ class PaginatedResponse {
18
+ }
19
+ __decorate([
20
+ (0, swagger_1.ApiProperty)({
21
+ type: entityClass,
22
+ isArray: true,
23
+ description: `${entityName} data`,
24
+ }),
25
+ (0, class_transformer_1.Type)(() => entityClass),
26
+ __metadata("design:type", Array)
27
+ ], PaginatedResponse.prototype, "data", void 0);
28
+ __decorate([
29
+ (0, swagger_1.ApiPropertyOptional)({
30
+ example: 10,
31
+ description: 'Number of items in current page',
32
+ }),
33
+ __metadata("design:type", Number)
34
+ ], PaginatedResponse.prototype, "count", void 0);
35
+ __decorate([
36
+ (0, swagger_1.ApiPropertyOptional)({ example: 100, description: 'Total number of items' }),
37
+ __metadata("design:type", Number)
38
+ ], PaginatedResponse.prototype, "total", void 0);
39
+ __decorate([
40
+ (0, swagger_1.ApiPropertyOptional)({ example: 1, description: 'Current page number' }),
41
+ __metadata("design:type", Number)
42
+ ], PaginatedResponse.prototype, "page", void 0);
43
+ __decorate([
44
+ (0, swagger_1.ApiPropertyOptional)({ example: 10, description: 'Total number of pages' }),
45
+ __metadata("design:type", Number)
46
+ ], PaginatedResponse.prototype, "pageCount", void 0);
47
+ __decorate([
48
+ (0, swagger_1.ApiPropertyOptional)({ example: false, description: 'Has previous page' }),
49
+ __metadata("design:type", Boolean)
50
+ ], PaginatedResponse.prototype, "hasPreviousPage", void 0);
51
+ __decorate([
52
+ (0, swagger_1.ApiPropertyOptional)({ example: true, description: 'Has next page' }),
53
+ __metadata("design:type", Boolean)
54
+ ], PaginatedResponse.prototype, "hasNextPage", void 0);
55
+ Object.defineProperty(PaginatedResponse, 'name', {
56
+ value: `${entityName}PaginatedResponseDto`,
57
+ writable: false,
58
+ });
59
+ return PaginatedResponse;
60
+ }
@@ -0,0 +1,15 @@
1
+ import type { ApiPropertyOptions } from '@nestjs/swagger';
2
+ export declare function ApiBooleanProperty(options?: Omit<ApiPropertyOptions, 'type'>): PropertyDecorator;
3
+ export declare function ApiBooleanPropertyOptional(options?: Omit<ApiPropertyOptions, 'type' | 'required'>): PropertyDecorator;
4
+ export declare function ApiUUIDProperty(options?: Omit<ApiPropertyOptions, 'type' | 'format'> & Partial<{
5
+ each: boolean;
6
+ }>): PropertyDecorator;
7
+ export declare function ApiUUIDPropertyOptional(options?: Omit<ApiPropertyOptions, 'type' | 'format' | 'required'> & Partial<{
8
+ each: boolean;
9
+ }>): PropertyDecorator;
10
+ export declare function ApiEnumProperty<TEnum>(getEnum: () => TEnum, options?: Omit<ApiPropertyOptions, 'type'> & {
11
+ each?: boolean;
12
+ }): PropertyDecorator;
13
+ export declare function ApiEnumPropertyOptional<TEnum>(getEnum: () => TEnum, options?: Omit<ApiPropertyOptions, 'type' | 'required'> & {
14
+ each?: boolean;
15
+ }): PropertyDecorator;