@solid-nestjs/common 0.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 (145) hide show
  1. package/dist/decorators/current-context.decorator.d.ts +2 -0
  2. package/dist/decorators/current-context.decorator.d.ts.map +1 -0
  3. package/dist/decorators/current-context.decorator.js +9 -0
  4. package/dist/decorators/current-context.decorator.js.map +1 -0
  5. package/dist/decorators/ignore-arg.decorator.d.ts +2 -0
  6. package/dist/decorators/ignore-arg.decorator.d.ts.map +1 -0
  7. package/dist/decorators/ignore-arg.decorator.js +8 -0
  8. package/dist/decorators/ignore-arg.decorator.js.map +1 -0
  9. package/dist/decorators/index.d.ts +4 -0
  10. package/dist/decorators/index.d.ts.map +1 -0
  11. package/dist/decorators/index.js +20 -0
  12. package/dist/decorators/index.js.map +1 -0
  13. package/dist/decorators/wrapped.decorator.d.ts +2 -0
  14. package/dist/decorators/wrapped.decorator.d.ts.map +1 -0
  15. package/dist/decorators/wrapped.decorator.js +20 -0
  16. package/dist/decorators/wrapped.decorator.js.map +1 -0
  17. package/dist/enums/index.d.ts +3 -0
  18. package/dist/enums/index.d.ts.map +1 -0
  19. package/dist/enums/index.js +19 -0
  20. package/dist/enums/index.js.map +1 -0
  21. package/dist/enums/order-by-type.enum.d.ts +5 -0
  22. package/dist/enums/order-by-type.enum.d.ts.map +1 -0
  23. package/dist/enums/order-by-type.enum.js +9 -0
  24. package/dist/enums/order-by-type.enum.js.map +1 -0
  25. package/dist/enums/standard-actions.enum.d.ts +6 -0
  26. package/dist/enums/standard-actions.enum.d.ts.map +1 -0
  27. package/dist/enums/standard-actions.enum.js +10 -0
  28. package/dist/enums/standard-actions.enum.js.map +1 -0
  29. package/dist/helpers/index.d.ts +4 -0
  30. package/dist/helpers/index.d.ts.map +1 -0
  31. package/dist/helpers/index.js +20 -0
  32. package/dist/helpers/index.js.map +1 -0
  33. package/dist/helpers/pagination.helper.d.ts +6 -0
  34. package/dist/helpers/pagination.helper.d.ts.map +1 -0
  35. package/dist/helpers/pagination.helper.js +11 -0
  36. package/dist/helpers/pagination.helper.js.map +1 -0
  37. package/dist/helpers/pipe-transform.helper.d.ts +6 -0
  38. package/dist/helpers/pipe-transform.helper.d.ts.map +1 -0
  39. package/dist/helpers/pipe-transform.helper.js +20 -0
  40. package/dist/helpers/pipe-transform.helper.js.map +1 -0
  41. package/dist/helpers/types.helper.d.ts +4 -0
  42. package/dist/helpers/types.helper.d.ts.map +1 -0
  43. package/dist/helpers/types.helper.js +17 -0
  44. package/dist/helpers/types.helper.js.map +1 -0
  45. package/dist/index.d.ts +8 -0
  46. package/dist/index.d.ts.map +1 -0
  47. package/dist/index.js +24 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/interfaces/index.d.ts +4 -0
  50. package/dist/interfaces/index.d.ts.map +1 -0
  51. package/dist/interfaces/index.js +20 -0
  52. package/dist/interfaces/index.js.map +1 -0
  53. package/dist/interfaces/misc/audit-service.interface.d.ts +6 -0
  54. package/dist/interfaces/misc/audit-service.interface.d.ts.map +1 -0
  55. package/dist/interfaces/misc/audit-service.interface.js +5 -0
  56. package/dist/interfaces/misc/audit-service.interface.js.map +1 -0
  57. package/dist/interfaces/misc/context.interface.d.ts +3 -0
  58. package/dist/interfaces/misc/context.interface.d.ts.map +1 -0
  59. package/dist/interfaces/misc/context.interface.js +3 -0
  60. package/dist/interfaces/misc/context.interface.js.map +1 -0
  61. package/dist/interfaces/misc/entity.interface.d.ts +5 -0
  62. package/dist/interfaces/misc/entity.interface.d.ts.map +1 -0
  63. package/dist/interfaces/misc/entity.interface.js +3 -0
  64. package/dist/interfaces/misc/entity.interface.js.map +1 -0
  65. package/dist/interfaces/misc/filters.interfaces.d.ts +36 -0
  66. package/dist/interfaces/misc/filters.interfaces.d.ts.map +1 -0
  67. package/dist/interfaces/misc/filters.interfaces.js +3 -0
  68. package/dist/interfaces/misc/filters.interfaces.js.map +1 -0
  69. package/dist/interfaces/misc/find-args.interface.d.ts +8 -0
  70. package/dist/interfaces/misc/find-args.interface.d.ts.map +1 -0
  71. package/dist/interfaces/misc/find-args.interface.js +3 -0
  72. package/dist/interfaces/misc/find-args.interface.js.map +1 -0
  73. package/dist/interfaces/misc/index.d.ts +8 -0
  74. package/dist/interfaces/misc/index.d.ts.map +1 -0
  75. package/dist/interfaces/misc/index.js +24 -0
  76. package/dist/interfaces/misc/index.js.map +1 -0
  77. package/dist/interfaces/misc/pagination-request.interface.d.ts +7 -0
  78. package/dist/interfaces/misc/pagination-request.interface.d.ts.map +1 -0
  79. package/dist/interfaces/misc/pagination-request.interface.js +3 -0
  80. package/dist/interfaces/misc/pagination-request.interface.js.map +1 -0
  81. package/dist/interfaces/misc/pagination-result.interface.d.ts +10 -0
  82. package/dist/interfaces/misc/pagination-result.interface.d.ts.map +1 -0
  83. package/dist/interfaces/misc/pagination-result.interface.js +3 -0
  84. package/dist/interfaces/misc/pagination-result.interface.js.map +1 -0
  85. package/dist/interfaces/services/crud-service.interface.d.ts +12 -0
  86. package/dist/interfaces/services/crud-service.interface.d.ts.map +1 -0
  87. package/dist/interfaces/services/crud-service.interface.js +3 -0
  88. package/dist/interfaces/services/crud-service.interface.js.map +1 -0
  89. package/dist/interfaces/services/data-service.interface.d.ts +15 -0
  90. package/dist/interfaces/services/data-service.interface.d.ts.map +1 -0
  91. package/dist/interfaces/services/data-service.interface.js +3 -0
  92. package/dist/interfaces/services/data-service.interface.js.map +1 -0
  93. package/dist/interfaces/services/index.d.ts +3 -0
  94. package/dist/interfaces/services/index.d.ts.map +1 -0
  95. package/dist/interfaces/services/index.js +19 -0
  96. package/dist/interfaces/services/index.js.map +1 -0
  97. package/dist/interfaces/structures/entity-provider-structure.interface.d.ts +13 -0
  98. package/dist/interfaces/structures/entity-provider-structure.interface.d.ts.map +1 -0
  99. package/dist/interfaces/structures/entity-provider-structure.interface.js +15 -0
  100. package/dist/interfaces/structures/entity-provider-structure.interface.js.map +1 -0
  101. package/dist/interfaces/structures/index.d.ts +2 -0
  102. package/dist/interfaces/structures/index.d.ts.map +1 -0
  103. package/dist/interfaces/structures/index.js +18 -0
  104. package/dist/interfaces/structures/index.js.map +1 -0
  105. package/dist/pipes/index.d.ts +2 -0
  106. package/dist/pipes/index.d.ts.map +1 -0
  107. package/dist/pipes/index.js +18 -0
  108. package/dist/pipes/index.js.map +1 -0
  109. package/dist/pipes/query-transform.pipe.d.ts +5 -0
  110. package/dist/pipes/query-transform.pipe.d.ts.map +1 -0
  111. package/dist/pipes/query-transform.pipe.js +36 -0
  112. package/dist/pipes/query-transform.pipe.js.map +1 -0
  113. package/dist/types/boolean.type.d.ts +4 -0
  114. package/dist/types/boolean.type.d.ts.map +1 -0
  115. package/dist/types/boolean.type.js +3 -0
  116. package/dist/types/boolean.type.js.map +1 -0
  117. package/dist/types/constructor.type.d.ts +3 -0
  118. package/dist/types/constructor.type.d.ts.map +1 -0
  119. package/dist/types/constructor.type.js +3 -0
  120. package/dist/types/constructor.type.js.map +1 -0
  121. package/dist/types/deep-partial.type.d.ts +4 -0
  122. package/dist/types/deep-partial.type.d.ts.map +1 -0
  123. package/dist/types/deep-partial.type.js +3 -0
  124. package/dist/types/deep-partial.type.js.map +1 -0
  125. package/dist/types/find-args.type.d.ts +14 -0
  126. package/dist/types/find-args.type.d.ts.map +1 -0
  127. package/dist/types/find-args.type.js +3 -0
  128. package/dist/types/find-args.type.js.map +1 -0
  129. package/dist/types/index.d.ts +5 -0
  130. package/dist/types/index.d.ts.map +1 -0
  131. package/dist/types/index.js +21 -0
  132. package/dist/types/index.js.map +1 -0
  133. package/dist/utils/decorators.utils.d.ts +3 -0
  134. package/dist/utils/decorators.utils.d.ts.map +1 -0
  135. package/dist/utils/decorators.utils.js +16 -0
  136. package/dist/utils/decorators.utils.js.map +1 -0
  137. package/dist/utils/http-status.utils.d.ts +3 -0
  138. package/dist/utils/http-status.utils.d.ts.map +1 -0
  139. package/dist/utils/http-status.utils.js +19 -0
  140. package/dist/utils/http-status.utils.js.map +1 -0
  141. package/dist/utils/index.d.ts +3 -0
  142. package/dist/utils/index.d.ts.map +1 -0
  143. package/dist/utils/index.js +19 -0
  144. package/dist/utils/index.js.map +1 -0
  145. package/package.json +39 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination-request.interface.js","sourceRoot":"","sources":["../../../src/interfaces/misc/pagination-request.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface PaginationResult {
2
+ total: number;
3
+ count: number;
4
+ limit?: number;
5
+ page: number;
6
+ pageCount: number;
7
+ hasNextPage: boolean;
8
+ hasPreviousPage: boolean;
9
+ }
10
+ //# sourceMappingURL=pagination-result.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination-result.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/misc/pagination-result.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pagination-result.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination-result.interface.js","sourceRoot":"","sources":["../../../src/interfaces/misc/pagination-result.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import { DeepPartial } from '../../types';
2
+ import { Context, IdTypeFrom, Entity } from "../misc";
3
+ import { DataService } from "./data-service.interface";
4
+ export interface CudService<IdType extends IdTypeFrom<EntityType>, EntityType extends Entity<unknown>, CreateInputType extends DeepPartial<EntityType>, UpdateInputType extends DeepPartial<EntityType>, ContextType extends Context = Context> {
5
+ create(context: ContextType, createInput: CreateInputType): Promise<EntityType>;
6
+ update(context: ContextType, id: IdType, updateInput: UpdateInputType): Promise<EntityType>;
7
+ remove(context: ContextType, id: IdType): Promise<EntityType>;
8
+ hardRemove(context: ContextType, id: IdType): Promise<EntityType>;
9
+ }
10
+ export interface CrudService<IdType extends IdTypeFrom<EntityType>, EntityType extends Entity<unknown>, CreateInputType extends DeepPartial<EntityType>, UpdateInputType extends DeepPartial<EntityType>, ContextType extends Context = Context> extends DataService<IdType, EntityType, ContextType>, CudService<IdType, EntityType, CreateInputType, UpdateInputType, ContextType> {
11
+ }
12
+ //# sourceMappingURL=crud-service.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crud-service.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/services/crud-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAoCvD,MAAM,WAAW,UAAU,CACnB,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAClC,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,WAAW,SAAS,OAAO,GAAG,OAAO;IAGjC,MAAM,CACF,OAAO,EAAC,WAAW,EACnB,WAAW,EAAE,eAAe,GACzB,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3B,MAAM,CACF,OAAO,EAAC,WAAW,EACnB,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,eAAe,GACzB,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3B,MAAM,CACF,OAAO,EAAC,WAAW,EACnB,EAAE,EAAE,MAAM,GACP,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3B,UAAU,CACN,OAAO,EAAC,WAAW,EACnB,EAAE,EAAE,MAAM,GACP,OAAO,CAAC,UAAU,CAAC,CAAC;CAE9B;AAeT,MAAM,WAAW,WAAW,CACpB,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAClC,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,eAAe,SAAS,WAAW,CAAC,UAAU,CAAC,EAC/C,WAAW,SAAS,OAAO,GAAG,OAAO,CACnC,SAAQ,WAAW,CAAC,MAAM,EAAC,UAAU,EAAC,WAAW,CAAC,EACxC,UAAU,CAAC,MAAM,EAAC,UAAU,EAAC,eAAe,EAAC,eAAe,EAAC,WAAW,CAAC;CAGpF"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=crud-service.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crud-service.interface.js","sourceRoot":"","sources":["../../../src/interfaces/services/crud-service.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { BooleanType, NotNullableIf, If } from '../../types';
2
+ import { Context, IdTypeFrom, Entity, FindArgs, PaginationResult } from '../misc';
3
+ import { Where } from '../../types/find-args.type';
4
+ export interface DataService<IdType extends IdTypeFrom<EntityType>, EntityType extends Entity<unknown>, ContextType extends Context = Context> {
5
+ findAll<TBool extends BooleanType = false>(context: ContextType, args?: FindArgs<EntityType>, withPagination?: TBool): Promise<If<TBool, {
6
+ data: EntityType[];
7
+ pagination: PaginationResult;
8
+ }, EntityType[]>>;
9
+ pagination(context: ContextType, args?: FindArgs<EntityType>): Promise<PaginationResult>;
10
+ findOne<TBool extends BooleanType = false>(context: ContextType, id: IdType, orFail?: TBool): Promise<NotNullableIf<TBool, EntityType>>;
11
+ findOneBy<TBool extends BooleanType = false>(context: ContextType, where: Where<EntityType>, orFail?: TBool): Promise<NotNullableIf<TBool, EntityType>>;
12
+ runInTransaction<ReturnType>(context: ContextType, fn: (context: ContextType) => Promise<ReturnType>): Promise<ReturnType>;
13
+ audit(context: ContextType, action: string, objectId?: IdType, valueBefore?: object, valueAfter?: object): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=data-service.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-service.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/services/data-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAG,QAAQ,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAqBnD,MAAM,WAAW,WAAW,CAC1B,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAClC,WAAW,SAAS,OAAO,GAAG,OAAO;IAGrC,OAAO,CAAC,KAAK,SAAS,WAAW,GAAG,KAAK,EACvC,OAAO,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC3B,cAAc,CAAC,EAAC,KAAK,GACpB,OAAO,CAAE,EAAE,CAAC,KAAK,EAAC;QAAE,IAAI,EAAC,UAAU,EAAE,CAAC;QAAC,UAAU,EAAC,gBAAgB,CAAA;KAAE,EAAC,UAAU,EAAE,CAAC,CAAE,CAAC;IAExF,UAAU,CACR,OAAO,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7B,OAAO,CAAC,KAAK,SAAS,WAAW,GAAG,KAAK,EACvC,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,KAAK,GACb,OAAO,CAAC,aAAa,CAAC,KAAK,EAAC,UAAU,CAAC,CAAC,CAAC;IAE5C,SAAS,CAAC,KAAK,SAAS,WAAW,GAAG,KAAK,EACzC,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,EACxB,MAAM,CAAC,EAAE,KAAK,GACb,OAAO,CAAC,aAAa,CAAC,KAAK,EAAC,UAAU,CAAC,CAAC,CAAC;IAE5C,gBAAgB,CAAC,UAAU,EACzB,OAAO,EAAE,WAAW,EACpB,EAAE,EAAC,CAAC,OAAO,EAAC,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,GAC/C,OAAO,CAAC,UAAU,CAAC,CAAC;IAEtB,KAAK,CACH,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data-service.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-service.interface.js","sourceRoot":"","sources":["../../../src/interfaces/services/data-service.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './data-service.interface';
2
+ export * from './crud-service.interface';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,19 @@
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("./data-service.interface"), exports);
18
+ __exportStar(require("./crud-service.interface"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,2DAAyC"}
@@ -0,0 +1,13 @@
1
+ import { PipeTransform, Type } from "@nestjs/common";
2
+ import { Constructable } from "../../types";
3
+ import { Entity, IdTypeFrom } from "../misc";
4
+ export interface IdStructure<IdType> {
5
+ type: Constructable<IdType>;
6
+ pipeTransforms?: Type<PipeTransform>[];
7
+ }
8
+ export interface EntityProviderStructure<IdType extends IdTypeFrom<EntityType>, EntityType extends Entity<unknown>> {
9
+ entityType: Constructable<EntityType>;
10
+ entityId?: IdStructure<IdType>;
11
+ }
12
+ export declare function fillEntityId<IdType extends IdTypeFrom<EntityType>, EntityType extends Entity<unknown>>(entityProvider: EntityProviderStructure<IdType, EntityType>): void;
13
+ //# sourceMappingURL=entity-provider-structure.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-provider-structure.interface.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/entity-provider-structure.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,WAAW,WAAW,CAAC,MAAM;IAE/B,IAAI,EAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC3B,cAAc,CAAC,EAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAA;CACxC;AAED,MAAM,WAAW,uBAAuB,CACZ,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC;IAE1D,UAAU,EAAC,aAAa,CAAC,UAAU,CAAC,CAAA;IACpC,QAAQ,CAAC,EAAC,WAAW,CAAC,MAAM,CAAC,CAAC;CACjC;AAED,wBAAgB,YAAY,CACJ,MAAM,SAAS,UAAU,CAAC,UAAU,CAAC,EACrC,UAAU,SAAS,MAAM,CAAC,OAAO,CAAC,EAChC,cAAc,EAAC,uBAAuB,CAAC,MAAM,EAAC,UAAU,CAAC,QAYlF"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillEntityId = fillEntityId;
4
+ const helpers_1 = require("../../helpers");
5
+ function fillEntityId(entityProvider) {
6
+ if (entityProvider.entityId)
7
+ return;
8
+ const idType = (0, helpers_1.getPropertyType)(entityProvider.entityType, "id");
9
+ const idPipeTransform = (0, helpers_1.getPipeTransformForType)(idType);
10
+ entityProvider.entityId = {
11
+ type: idType,
12
+ pipeTransforms: (idPipeTransform) ? [idPipeTransform] : []
13
+ };
14
+ }
15
+ //# sourceMappingURL=entity-provider-structure.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-provider-structure.interface.js","sourceRoot":"","sources":["../../../src/interfaces/structures/entity-provider-structure.interface.ts"],"names":[],"mappings":";;AAmBA,oCAeC;AAjCD,2CAAyE;AAkBzE,SAAgB,YAAY,CAGF,cAAyD;IAE/E,IAAG,cAAc,CAAC,QAAQ;QACtB,OAAO;IAEX,MAAM,MAAM,GAAG,IAAA,yBAAe,EAAC,cAAc,CAAC,UAAU,EAAC,IAAI,CAAC,CAAC;IAC/D,MAAM,eAAe,GAAG,IAAA,iCAAuB,EAAC,MAAM,CAAC,CAAC;IAExD,cAAc,CAAC,QAAQ,GAAG;QACtB,IAAI,EAAC,MAAM;QACX,cAAc,EAAC,CAAC,eAAe,CAAC,CAAA,CAAC,CAAA,CAAC,eAAe,CAAC,CAAA,CAAC,CAAA,EAAE;KACxD,CAAC;AACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './entity-provider-structure.interface';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/interfaces/structures/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
@@ -0,0 +1,18 @@
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("./entity-provider-structure.interface"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/structures/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAAsD"}
@@ -0,0 +1,2 @@
1
+ export * from './query-transform.pipe';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pipes/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,18 @@
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("./query-transform.pipe"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pipes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC"}
@@ -0,0 +1,5 @@
1
+ import { PipeTransform, ArgumentMetadata } from '@nestjs/common';
2
+ export declare class QueryTransformPipe implements PipeTransform {
3
+ transform(value: any, metadata: ArgumentMetadata): any;
4
+ }
5
+ //# sourceMappingURL=query-transform.pipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-transform.pipe.d.ts","sourceRoot":"","sources":["../../src/pipes/query-transform.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAqB7E,qBACa,kBAAmB,YAAW,aAAa;IAEtD,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,gBAAgB;CAmBjD"}
@@ -0,0 +1,36 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.QueryTransformPipe = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ let QueryTransformPipe = class QueryTransformPipe {
12
+ transform(value, metadata) {
13
+ if (!value)
14
+ return value;
15
+ const transformed = {};
16
+ for (const [key, val] of Object.entries(value)) {
17
+ try {
18
+ transformed[key] = typeof val === 'string' ? JSON.parse(val) : val;
19
+ }
20
+ catch (e) {
21
+ if (typeof val === 'string' && !isNaN(Number(val))) {
22
+ transformed[key] = Number(val);
23
+ }
24
+ else {
25
+ transformed[key] = val;
26
+ }
27
+ }
28
+ }
29
+ return transformed;
30
+ }
31
+ };
32
+ exports.QueryTransformPipe = QueryTransformPipe;
33
+ exports.QueryTransformPipe = QueryTransformPipe = __decorate([
34
+ (0, common_1.Injectable)()
35
+ ], QueryTransformPipe);
36
+ //# sourceMappingURL=query-transform.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-transform.pipe.js","sourceRoot":"","sources":["../../src/pipes/query-transform.pipe.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA6E;AAsBtE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,SAAS,CAAC,KAAU,EAAE,QAA0B;QAC9C,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAEzB,MAAM,WAAW,GAAG,EAAE,CAAC;QAEvB,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7C,IAAI,CAAC;gBACH,WAAW,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YACrE,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBAEb,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;oBACjD,WAAW,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;gBACjC,CAAC;qBAAM,CAAC;oBACN,WAAW,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;gBACzB,CAAC;YACH,CAAC;QACL,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;CACF,CAAA;AArBY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CAqB9B"}
@@ -0,0 +1,4 @@
1
+ export type BooleanType = true | false;
2
+ export type NotNullableIf<TBool extends BooleanType = false, TType = any> = TBool extends true ? TType : TType | null;
3
+ export type If<TBool extends BooleanType = false, TType1 = any, TType2 = any> = TBool extends true ? TType1 : TType2;
4
+ //# sourceMappingURL=boolean.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boolean.type.d.ts","sourceRoot":"","sources":["../../src/types/boolean.type.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,KAAK,CAAC;AASvC,MAAM,MAAM,aAAa,CAAC,KAAK,SAAS,WAAW,GAAG,KAAK,EAAE,KAAK,GAAG,GAAG,IAAI,KAAK,SAAS,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;AAUtH,MAAM,MAAM,EAAE,CAAC,KAAK,SAAS,WAAW,GAAG,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,KAAK,SAAS,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=boolean.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boolean.type.js","sourceRoot":"","sources":["../../src/types/boolean.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export type Constructor = (new (...args: any[]) => any);
2
+ export type Constructable<Type = object> = new (...args: any[]) => Type;
3
+ //# sourceMappingURL=constructor.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constructor.type.d.ts","sourceRoot":"","sources":["../../src/types/constructor.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAC;AAcxD,MAAM,MAAM,aAAa,CAAC,IAAI,GAAG,MAAM,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=constructor.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constructor.type.js","sourceRoot":"","sources":["../../src/types/constructor.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type DeepPartial<T> = T | (T extends Array<infer U> ? DeepPartial<U>[] : T extends Map<infer K, infer V> ? Map<DeepPartial<K>, DeepPartial<V>> : T extends Set<infer M> ? Set<DeepPartial<M>> : T extends object ? {
2
+ [K in keyof T]?: DeepPartial<T[K]>;
3
+ } : T);
4
+ //# sourceMappingURL=deep-partial.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deep-partial.type.d.ts","sourceRoot":"","sources":["../../src/types/deep-partial.type.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,GAAG;KACrN,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACrC,GAAG,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=deep-partial.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deep-partial.type.js","sourceRoot":"","sources":["../../src/types/deep-partial.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { StringFilter, NumberFilter, DateFilter } from './../interfaces/misc/filters.interfaces';
2
+ type WhereField<T> = T extends string ? string | string[] | StringFilter : T extends number ? number | number[] | NumberFilter : T extends Date ? Date | Date[] | DateFilter : T extends boolean ? boolean : Where<T>;
3
+ export type Where<T> = {
4
+ [K in keyof T]?: WhereField<T[K]>;
5
+ } & {
6
+ _and?: Where<T> | Where<T>[];
7
+ _or?: Where<T> | Where<T>[];
8
+ };
9
+ type OrderByField<T> = T extends string ? string : T extends number ? number : T extends Date ? Date : T extends boolean ? boolean : OrderBy<T>;
10
+ export type OrderBy<T> = {
11
+ [K in keyof T]?: OrderByField<T[K]>;
12
+ };
13
+ export {};
14
+ //# sourceMappingURL=find-args.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-args.type.d.ts","sourceRoot":"","sources":["../../src/types/find-args.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAA;AAehG,KAAK,UAAU,CAAC,CAAC,IACb,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,YAAY,GACnD,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,YAAY,GACnD,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,GAAG,UAAU,GAC3C,CAAC,SAAS,OAAO,GAAG,OAAO,GAC3B,KAAK,CAAC,CAAC,CAAC,CAAC;AAab,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;KAClB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACpC,GAAG;IACA,IAAI,CAAC,EAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAE;IAC7B,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;CAC/B,CAAC;AAaF,KAAK,YAAY,CAAC,CAAC,IACf,CAAC,SAAS,MAAM,GAAG,MAAM,GACzB,CAAC,SAAS,MAAM,GAAG,MAAM,GACzB,CAAC,SAAS,IAAI,GAAG,IAAI,GACrB,CAAC,SAAS,OAAO,GAAG,OAAO,GAC3B,OAAO,CAAC,CAAC,CAAC,CAAC;AAQf,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=find-args.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-args.type.js","sourceRoot":"","sources":["../../src/types/find-args.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export * from './constructor.type';
2
+ export * from './boolean.type';
3
+ export * from './deep-partial.type';
4
+ export * from './find-args.type';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,21 @@
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("./constructor.type"), exports);
18
+ __exportStar(require("./boolean.type"), exports);
19
+ __exportStar(require("./deep-partial.type"), exports);
20
+ __exportStar(require("./find-args.type"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,iDAA+B;AAC/B,sDAAmC;AACnC,mDAAgC"}
@@ -0,0 +1,3 @@
1
+ export declare function applyMethodDecorators(decorators: (() => MethodDecorator)[]): <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
2
+ export declare function applyClassDecorators(decorators: (() => ClassDecorator)[]): <TFunction extends Function, Y>(target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor<Y>) => void;
3
+ //# sourceMappingURL=decorators.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.utils.d.ts","sourceRoot":"","sources":["../../src/utils/decorators.utils.ts"],"names":[],"mappings":"AAQA,wBAAgB,qBAAqB,CAAC,UAAU,EAAC,CAAC,MAAM,eAAe,CAAC,EAAE,+IAMzE;AASD,wBAAgB,oBAAoB,CAAC,UAAU,EAAC,CAAC,MAAM,cAAc,CAAC,EAAE,+IAMvE"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyMethodDecorators = applyMethodDecorators;
4
+ exports.applyClassDecorators = applyClassDecorators;
5
+ const common_1 = require("@nestjs/common");
6
+ function applyMethodDecorators(decorators) {
7
+ if (!decorators)
8
+ return (0, common_1.applyDecorators)();
9
+ return (0, common_1.applyDecorators)(...(decorators?.map((decorator) => decorator())));
10
+ }
11
+ function applyClassDecorators(decorators) {
12
+ if (!decorators)
13
+ return (0, common_1.applyDecorators)();
14
+ return (0, common_1.applyDecorators)(...(decorators?.map((decorator) => decorator())));
15
+ }
16
+ //# sourceMappingURL=decorators.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.utils.js","sourceRoot":"","sources":["../../src/utils/decorators.utils.ts"],"names":[],"mappings":";;AAQA,sDAMC;AASD,oDAMC;AA7BD,2CAAiD;AAQjD,SAAgB,qBAAqB,CAAC,UAAoC;IAEtE,IAAG,CAAC,UAAU;QACV,OAAO,IAAA,wBAAe,GAAE,CAAC;IAE7B,OAAO,IAAA,wBAAe,EAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7E,CAAC;AASD,SAAgB,oBAAoB,CAAC,UAAmC;IAEpE,IAAG,CAAC,UAAU;QACV,OAAO,IAAA,wBAAe,GAAE,CAAC;IAE7B,OAAO,IAAA,wBAAe,EAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { HttpStatus } from "@nestjs/common";
2
+ export declare function getHttpStatusDescription(status: HttpStatus): string;
3
+ //# sourceMappingURL=http-status.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-status.utils.d.ts","sourceRoot":"","sources":["../../src/utils/http-status.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAoB5C,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAOnE"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getHttpStatusDescription = getHttpStatusDescription;
4
+ const common_1 = require("@nestjs/common");
5
+ const httpStatusDescriptions = new Map();
6
+ function formatStatusDescription(status) {
7
+ return common_1.HttpStatus[status]
8
+ .toLowerCase()
9
+ .replace(/_/g, ' ')
10
+ .replace(/\b\w/g, l => l.toUpperCase());
11
+ }
12
+ function getHttpStatusDescription(status) {
13
+ if (!httpStatusDescriptions.has(status)) {
14
+ const description = formatStatusDescription(status);
15
+ httpStatusDescriptions.set(status, description);
16
+ }
17
+ return httpStatusDescriptions.get(status) || 'Unknown Status';
18
+ }
19
+ //# sourceMappingURL=http-status.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-status.utils.js","sourceRoot":"","sources":["../../src/utils/http-status.utils.ts"],"names":[],"mappings":";;AAoBA,4DAOC;AA3BD,2CAA4C;AAE5C,MAAM,sBAAsB,GAA4B,IAAI,GAAG,EAAsB,CAAC;AAEtF,SAAS,uBAAuB,CAAC,MAAkB;IAC/C,OAAO,mBAAU,CAAC,MAAM,CAAC;SACpB,WAAW,EAAE;SACb,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;SAClB,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAChD,CAAC;AAWD,SAAgB,wBAAwB,CAAC,MAAkB;IACvD,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,WAAW,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,sBAAsB,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,sBAAsB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC;AAClE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './decorators.utils';
2
+ export * from './http-status.utils';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,19 @@
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("./decorators.utils"), exports);
18
+ __exportStar(require("./http-status.utils"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,sDAAmC"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@solid-nestjs/common",
3
+ "version": "0.2.0",
4
+ "description": "solid-nestjs common utilities",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist/**/*"
9
+ ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/solid-nestjs/framework"
13
+ },
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "build:watch": "tsc -w"
17
+ },
18
+ "keywords": [
19
+ "typescript",
20
+ "nest",
21
+ "nestjs",
22
+ "backend",
23
+ "frameworks"
24
+ ],
25
+ "author": {
26
+ "name": "Andres De la Ossa",
27
+ "email": "adelaossa0129@gmail.com"
28
+ },
29
+ "license": "MIT",
30
+ "peerDependencies": {
31
+ "@nestjs/core": "^11.0.1",
32
+ "@nestjs/common": "^11.0.1"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^22.14.1",
36
+ "tsconfig.json": "^1.0.11",
37
+ "typescript": "^5.8.3"
38
+ }
39
+ }