@merkaly/api 0.2.2-12 → 0.2.2-13

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 (141) hide show
  1. package/package.json +1 -1
  2. package/.output/abstract/app.controller.d.ts +0 -11
  3. package/.output/abstract/app.controller.d.ts.map +0 -1
  4. package/.output/abstract/app.controller.js +0 -22
  5. package/.output/abstract/app.controller.js.map +0 -1
  6. package/.output/abstract/app.entity.d.ts +0 -9
  7. package/.output/abstract/app.entity.d.ts.map +0 -1
  8. package/.output/abstract/app.entity.js +0 -28
  9. package/.output/abstract/app.entity.js.map +0 -1
  10. package/.output/abstract/app.exception.d.ts +0 -11
  11. package/.output/abstract/app.exception.d.ts.map +0 -1
  12. package/.output/abstract/app.exception.js +0 -37
  13. package/.output/abstract/app.exception.js.map +0 -1
  14. package/.output/abstract/app.repository.d.ts +0 -20
  15. package/.output/abstract/app.repository.d.ts.map +0 -1
  16. package/.output/abstract/app.repository.js +0 -73
  17. package/.output/abstract/app.repository.js.map +0 -1
  18. package/.output/abstract/app.router.d.ts +0 -6
  19. package/.output/abstract/app.router.d.ts.map +0 -1
  20. package/.output/abstract/app.router.js +0 -8
  21. package/.output/abstract/app.router.js.map +0 -1
  22. package/.output/configs/app.controller.d.ts +0 -11
  23. package/.output/configs/app.controller.d.ts.map +0 -1
  24. package/.output/configs/app.controller.js +0 -22
  25. package/.output/configs/app.controller.js.map +0 -1
  26. package/.output/configs/app.entity.d.ts +0 -9
  27. package/.output/configs/app.entity.d.ts.map +0 -1
  28. package/.output/configs/app.entity.js +0 -28
  29. package/.output/configs/app.entity.js.map +0 -1
  30. package/.output/configs/app.exception.d.ts +0 -11
  31. package/.output/configs/app.exception.d.ts.map +0 -1
  32. package/.output/configs/app.exception.js +0 -37
  33. package/.output/configs/app.exception.js.map +0 -1
  34. package/.output/configs/app.repository.d.ts +0 -20
  35. package/.output/configs/app.repository.d.ts.map +0 -1
  36. package/.output/configs/app.repository.js +0 -73
  37. package/.output/configs/app.repository.js.map +0 -1
  38. package/.output/configs/app.router.d.ts +0 -6
  39. package/.output/configs/app.router.d.ts.map +0 -1
  40. package/.output/configs/app.router.js +0 -8
  41. package/.output/configs/app.router.js.map +0 -1
  42. package/.output/decorators/organization.decorator.d.ts +0 -2
  43. package/.output/decorators/organization.decorator.d.ts.map +0 -1
  44. package/.output/decorators/organization.decorator.js +0 -10
  45. package/.output/decorators/organization.decorator.js.map +0 -1
  46. package/.output/globals/global.controller.d.ts +0 -20
  47. package/.output/globals/global.controller.d.ts.map +0 -1
  48. package/.output/globals/global.controller.js +0 -76
  49. package/.output/globals/global.controller.js.map +0 -1
  50. package/.output/interceptors/logger.interceptor.d.ts +0 -9
  51. package/.output/interceptors/logger.interceptor.d.ts.map +0 -1
  52. package/.output/interceptors/logger.interceptor.js +0 -54
  53. package/.output/interceptors/logger.interceptor.js.map +0 -1
  54. package/.output/modules/app.module.d.ts +0 -12
  55. package/.output/modules/app.module.d.ts.map +0 -1
  56. package/.output/modules/app.module.js +0 -37
  57. package/.output/modules/app.module.js.map +0 -1
  58. package/.output/modules/auth/auth.controller.d.ts +0 -7
  59. package/.output/modules/auth/auth.controller.d.ts.map +0 -1
  60. package/.output/modules/auth/auth.controller.js +0 -31
  61. package/.output/modules/auth/auth.controller.js.map +0 -1
  62. package/.output/modules/auth/connections/connection.controller.d.ts +0 -8
  63. package/.output/modules/auth/connections/connection.controller.d.ts.map +0 -1
  64. package/.output/modules/auth/connections/connection.controller.js +0 -30
  65. package/.output/modules/auth/connections/connection.controller.js.map +0 -1
  66. package/.output/modules/auth/connections/connection.module.d.ts +0 -8
  67. package/.output/modules/auth/connections/connection.module.d.ts.map +0 -1
  68. package/.output/modules/auth/connections/connection.module.js +0 -22
  69. package/.output/modules/auth/connections/connection.module.js.map +0 -1
  70. package/.output/modules/auth/connections/connection.validator.d.ts +0 -10
  71. package/.output/modules/auth/connections/connection.validator.d.ts.map +0 -1
  72. package/.output/modules/auth/connections/connection.validator.js +0 -24
  73. package/.output/modules/auth/connections/connection.validator.js.map +0 -1
  74. package/.output/modules/auth/members/member.controller.d.ts +0 -8
  75. package/.output/modules/auth/members/member.controller.d.ts.map +0 -1
  76. package/.output/modules/auth/members/member.controller.js +0 -30
  77. package/.output/modules/auth/members/member.controller.js.map +0 -1
  78. package/.output/modules/auth/members/member.module.d.ts +0 -8
  79. package/.output/modules/auth/members/member.module.d.ts.map +0 -1
  80. package/.output/modules/auth/members/member.module.js +0 -22
  81. package/.output/modules/auth/members/member.module.js.map +0 -1
  82. package/.output/modules/auth/members/member.validator.d.ts +0 -4
  83. package/.output/modules/auth/members/member.validator.d.ts.map +0 -1
  84. package/.output/modules/auth/members/member.validator.js +0 -4
  85. package/.output/modules/auth/members/member.validator.js.map +0 -1
  86. package/.output/modules/auth/organizations/organization.controller.d.ts +0 -16
  87. package/.output/modules/auth/organizations/organization.controller.d.ts.map +0 -1
  88. package/.output/modules/auth/organizations/organization.controller.js +0 -101
  89. package/.output/modules/auth/organizations/organization.controller.js.map +0 -1
  90. package/.output/modules/auth/organizations/organization.module.d.ts +0 -9
  91. package/.output/modules/auth/organizations/organization.module.d.ts.map +0 -1
  92. package/.output/modules/auth/organizations/organization.module.js +0 -24
  93. package/.output/modules/auth/organizations/organization.module.js.map +0 -1
  94. package/.output/modules/auth/organizations/organization.repository.d.ts +0 -9
  95. package/.output/modules/auth/organizations/organization.repository.d.ts.map +0 -1
  96. package/.output/modules/auth/organizations/organization.repository.js +0 -42
  97. package/.output/modules/auth/organizations/organization.repository.js.map +0 -1
  98. package/.output/modules/auth/organizations/organization.validator.d.ts +0 -7
  99. package/.output/modules/auth/organizations/organization.validator.d.ts.map +0 -1
  100. package/.output/modules/auth/organizations/organization.validator.js +0 -22
  101. package/.output/modules/auth/organizations/organization.validator.js.map +0 -1
  102. package/.output/modules/health/health.controller.d.ts +0 -8
  103. package/.output/modules/health/health.controller.d.ts.map +0 -1
  104. package/.output/modules/health/health.controller.js +0 -29
  105. package/.output/modules/health/health.controller.js.map +0 -1
  106. package/.output/modules/health/health.module.d.ts +0 -9
  107. package/.output/modules/health/health.module.d.ts.map +0 -1
  108. package/.output/modules/health/health.module.js +0 -24
  109. package/.output/modules/health/health.module.js.map +0 -1
  110. package/.output/modules/health.module.d.ts +0 -3
  111. package/.output/modules/health.module.d.ts.map +0 -1
  112. package/.output/modules/health.module.js +0 -14
  113. package/.output/modules/health.module.js.map +0 -1
  114. package/.output/modules/settings/organization/organization.entity.d.ts +0 -10
  115. package/.output/modules/settings/organization/organization.entity.d.ts.map +0 -1
  116. package/.output/modules/settings/organization/organization.entity.js +0 -11
  117. package/.output/modules/settings/organization/organization.entity.js.map +0 -1
  118. package/.output/modules/settings/organizations/organization.controller.d.ts +0 -16
  119. package/.output/modules/settings/organizations/organization.controller.d.ts.map +0 -1
  120. package/.output/modules/settings/organizations/organization.controller.js +0 -101
  121. package/.output/modules/settings/organizations/organization.controller.js.map +0 -1
  122. package/.output/modules/settings/organizations/organization.module.d.ts +0 -9
  123. package/.output/modules/settings/organizations/organization.module.d.ts.map +0 -1
  124. package/.output/modules/settings/organizations/organization.module.js +0 -24
  125. package/.output/modules/settings/organizations/organization.module.js.map +0 -1
  126. package/.output/modules/settings/organizations/organization.repository.d.ts +0 -9
  127. package/.output/modules/settings/organizations/organization.repository.d.ts.map +0 -1
  128. package/.output/modules/settings/organizations/organization.repository.js +0 -42
  129. package/.output/modules/settings/organizations/organization.repository.js.map +0 -1
  130. package/.output/modules/settings/organizations/organization.validator.d.ts +0 -7
  131. package/.output/modules/settings/organizations/organization.validator.d.ts.map +0 -1
  132. package/.output/modules/settings/organizations/organization.validator.js +0 -22
  133. package/.output/modules/settings/organizations/organization.validator.js.map +0 -1
  134. package/.output/providers/mongo.provider.d.ts +0 -20
  135. package/.output/providers/mongo.provider.d.ts.map +0 -1
  136. package/.output/providers/mongo.provider.js +0 -41
  137. package/.output/providers/mongo.provider.js.map +0 -1
  138. package/.output/providers/schema.provider.d.ts +0 -12
  139. package/.output/providers/schema.provider.d.ts.map +0 -1
  140. package/.output/providers/schema.provider.js +0 -33
  141. package/.output/providers/schema.provider.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.2.2-12",
3
+ "version": "0.2.2-13",
4
4
  "description": "NestJS Backend ApiRest Service",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +0,0 @@
1
- import { AbstractRepository } from '../abstract/abstract.repository';
2
- import { AppEntity } from './app.entity';
3
- export declare abstract class AppController<E extends AppEntity> {
4
- protected abstract readonly $repository: AbstractRepository<E>;
5
- protected find?(...params: any): Promise<E[]>;
6
- protected read?(id: string): Promise<E>;
7
- protected create?(validator: unknown, ...params: any): Promise<E>;
8
- protected update?(id: string, validator: unknown): Promise<E>;
9
- protected delete?(id: string): Promise<void>;
10
- }
11
- //# sourceMappingURL=app.controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.controller.d.ts","sourceRoot":"","sources":["../../src/abstract/app.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,8BAAsB,aAAa,CAAC,CAAC,SAAS,SAAS;IACrD,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAE/D,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAI7C,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAIvC,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC;IAIjE,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAI7D,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7C"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppController = void 0;
4
- class AppController {
5
- find(...params) {
6
- return this.$repository.find();
7
- }
8
- read(id) {
9
- return this.$repository.read(id);
10
- }
11
- create(validator, ...params) {
12
- return this.$repository.create(validator);
13
- }
14
- update(id, validator) {
15
- return this.$repository.update(id, validator);
16
- }
17
- delete(id) {
18
- return this.$repository.delete(id);
19
- }
20
- }
21
- exports.AppController = AppController;
22
- //# sourceMappingURL=app.controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../src/abstract/app.controller.ts"],"names":[],"mappings":";;;AAGA,MAAsB,aAAa;IAGvB,IAAI,CAAE,GAAG,MAAW;QAC5B,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAES,IAAI,CAAE,EAAU;QACxB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAES,MAAM,CAAE,SAAkB,EAAE,GAAG,MAAW;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAES,MAAM,CAAE,EAAU,EAAE,SAAkB;QAC9C,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;IAChD,CAAC;IAES,MAAM,CAAE,EAAU;QAC1B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;CACF;AAtBD,sCAsBC"}
@@ -1,9 +0,0 @@
1
- import { Document } from 'mongoose';
2
- export declare abstract class AppEntity extends Document {
3
- static $index: string;
4
- readonly _id = "";
5
- readonly createdAt?: Date;
6
- readonly updatedAt?: Date;
7
- readonly deletedAt?: Date;
8
- }
9
- //# sourceMappingURL=app.entity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.entity.d.ts","sourceRoot":"","sources":["../../src/abstract/app.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAyB,MAAM,UAAU,CAAC;AAE3D,8BAAsB,SAAU,SAAQ,QAAQ;IAC9C,OAAc,MAAM,EAAE,MAAM,CAAC;IAE7B,SAAyB,GAAG,MAAM;IAElC,SACgB,SAAS,CAAC,EAAE,IAAI,CAAQ;IAExC,SACgB,SAAS,CAAC,EAAE,IAAI,CAAQ;IAExC,SACgB,SAAS,CAAC,EAAE,IAAI,CAAQ;CACzC"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppEntity = void 0;
4
- const mongoose_1 = require("@nestjs/mongoose");
5
- const mongoose_2 = require("mongoose");
6
- class AppEntity extends mongoose_2.Document {
7
- constructor() {
8
- super(...arguments);
9
- this._id = '';
10
- this.createdAt = null;
11
- this.updatedAt = null;
12
- this.deletedAt = null;
13
- }
14
- }
15
- __decorate([
16
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
17
- __metadata("design:type", Date)
18
- ], AppEntity.prototype, "createdAt", void 0);
19
- __decorate([
20
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
21
- __metadata("design:type", Date)
22
- ], AppEntity.prototype, "updatedAt", void 0);
23
- __decorate([
24
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
25
- __metadata("design:type", Date)
26
- ], AppEntity.prototype, "deletedAt", void 0);
27
- exports.AppEntity = AppEntity;
28
- //# sourceMappingURL=app.entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.entity.js","sourceRoot":"","sources":["../../src/abstract/app.entity.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uCAA2D;AAE3D,MAAsB,SAAU,SAAQ,mBAAQ;IAAhD;;QAG2B,QAAG,GAAG,EAAE,CAAC;QAGlB,cAAS,GAAU,IAAI,CAAC;QAGxB,cAAS,GAAU,IAAI,CAAC;QAGxB,cAAS,GAAU,IAAI,CAAC;IAC1C,CAAC;CAAA;AAPC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;8BACX,IAAI;4CAAQ;AAGxC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;8BACX,IAAI;4CAAQ;AAGxC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;8BACX,IAAI;4CAAQ;AAZ1C,8BAaC"}
@@ -1,11 +0,0 @@
1
- import { ArgumentsHost, ExceptionFilter, HttpException, Logger } from '@nestjs/common';
2
- import { Request, Response } from 'express';
3
- export declare abstract class AppException implements ExceptionFilter {
4
- protected request: Request;
5
- protected response: Response;
6
- protected host: ArgumentsHost;
7
- protected logger: Logger;
8
- catch(exception: HttpException, host: ArgumentsHost): Response<any, Record<string, any>>;
9
- protected abstract handleError(exception: HttpException): HttpException;
10
- }
11
- //# sourceMappingURL=app.exception.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.exception.d.ts","sourceRoot":"","sources":["../../src/abstract/app.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAgC,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACrH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5C,8BAAsB,YAAa,YAAW,eAAe;IAC3D,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7B,SAAS,CAAC,IAAI,EAAE,aAAa,CAAC;IAC9B,SAAS,CAAC,MAAM,SAAgB;IAEzB,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa;IAkC1D,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,GAAG,aAAa;CACxE"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppException = void 0;
4
- const common_1 = require("@nestjs/common");
5
- class AppException {
6
- constructor() {
7
- this.logger = new common_1.Logger();
8
- }
9
- catch(exception, host) {
10
- this.host = host;
11
- const ctx = this.host.switchToHttp();
12
- this.response = ctx.getResponse();
13
- this.request = ctx.getRequest();
14
- this.logger.error(exception);
15
- const handledError = this.handleError(exception);
16
- if (handledError instanceof common_1.HttpException) {
17
- const { message: trace } = exception.getResponse();
18
- this.response.statusMessage = handledError.name
19
- .slice(0, -9)
20
- .replace(/([A-Z])/g, ' $1')
21
- .trim();
22
- return this.response
23
- .status(handledError.getStatus())
24
- .json({
25
- statusCode: handledError.getStatus(),
26
- message: handledError.message,
27
- error: this.response.statusMessage,
28
- trace: trace,
29
- });
30
- }
31
- return this.response
32
- .status(500)
33
- .json(new common_1.InternalServerErrorException(handledError));
34
- }
35
- }
36
- exports.AppException = AppException;
37
- //# sourceMappingURL=app.exception.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.exception.js","sourceRoot":"","sources":["../../src/abstract/app.exception.ts"],"names":[],"mappings":";;;AAAA,2CAAqH;AAGrH,MAAsB,YAAY;IAAlC;QAIY,WAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAqClC,CAAC;IAnCQ,KAAK,CAAC,SAAwB,EAAE,IAAmB;QACxD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QAErC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAY,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,UAAU,EAAW,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAE7B,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAEjD,IAAI,YAAY,YAAY,sBAAa,EAAE;YACzC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC,WAAW,EAAS,CAAC;YAE1D,IAAI,CAAC,QAAQ,CAAC,aAAa,GAAG,YAAY,CAAC,IAAI;iBAC5C,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;iBACZ,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;iBAC1B,IAAI,EAAE,CAAC;YAEV,OAAO,IAAI,CAAC,QAAQ;iBACjB,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC;iBAChC,IAAI,CAAC;gBACJ,UAAU,EAAE,YAAY,CAAC,SAAS,EAAE;gBACpC,OAAO,EAAE,YAAY,CAAC,OAAO;gBAC7B,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa;gBAClC,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;SACN;QAED,OAAO,IAAI,CAAC,QAAQ;aACjB,MAAM,CAAC,GAAG,CAAC;aACX,IAAI,CAAC,IAAI,qCAA4B,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1D,CAAC;CAGF;AAzCD,oCAyCC"}
@@ -1,20 +0,0 @@
1
- import { Request } from 'express';
2
- import { Model, UpdateQuery } from 'mongoose';
3
- import { DecodedUser } from '../decorators/user.decorator';
4
- import { AppEntity } from '../configs/app.entity';
5
- export declare abstract class AbstractRepository<E extends AppEntity> {
6
- abstract readonly $model: Model<E>;
7
- protected readonly $request: Request;
8
- protected get $user(): DecodedUser | undefined;
9
- find(...params: unknown[]): Promise<E[]>;
10
- create(...params: any[]): Promise<E>;
11
- read(id: string): Promise<E>;
12
- update(id: string, ...params: unknown[]): Promise<E>;
13
- delete(id: string): Promise<void>;
14
- protected $find(): Promise<E[]>;
15
- protected $read(id: string): Promise<E>;
16
- protected $create(model: Partial<E>): Promise<E>;
17
- protected $update(id: string, query: UpdateQuery<E>): Promise<E>;
18
- protected $delete(id: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=app.repository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.repository.d.ts","sourceRoot":"","sources":["../../src/abstract/app.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,8BAAsB,kBAAkB,CAAC,CAAC,SAAS,SAAS;IAC1D,kBAAyB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAG1C,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAErC,SAAS,KAAK,KAAK,IAAI,WAAW,GAAG,SAAS,CAE7C;IAEY,IAAI,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAIxC,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE;IAYvB,IAAI,CAAC,EAAE,EAAE,MAAM;IAIf,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE;IAMvC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;cAI9B,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC;cAIrB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;cAI7B,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;cAItC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;cAKtD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnD"}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AbstractRepository = void 0;
4
- const common_1 = require("@nestjs/common");
5
- const core_1 = require("@nestjs/core");
6
- class AbstractRepository {
7
- get $user() {
8
- var _a;
9
- return (_a = this.$request) === null || _a === void 0 ? void 0 : _a.user;
10
- }
11
- find(...params) {
12
- return __awaiter(this, void 0, void 0, function* () {
13
- return this.$find();
14
- });
15
- }
16
- create(...params) {
17
- return __awaiter(this, void 0, void 0, function* () {
18
- const entity = new this.$model();
19
- const [validator] = params;
20
- for (const key in validator) {
21
- entity[key] = validator[key];
22
- }
23
- return this.$create(entity);
24
- });
25
- }
26
- read(id) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- return this.$read(id);
29
- });
30
- }
31
- update(id, ...params) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- const entity = yield this.$model.findById(id, params);
34
- return this.$update(id, { $set: entity });
35
- });
36
- }
37
- delete(id) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- return this.$delete(id);
40
- });
41
- }
42
- $find() {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- return this.$model.find();
45
- });
46
- }
47
- $read(id) {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- return this.$model.findById(id);
50
- });
51
- }
52
- $create(model) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- return this.$model.create(model);
55
- });
56
- }
57
- $update(id, query) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- return this.$model.findByIdAndUpdate(id, query);
60
- });
61
- }
62
- $delete(id) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- return this.$model.findByIdAndDelete(id);
65
- });
66
- }
67
- }
68
- __decorate([
69
- (0, common_1.Inject)(core_1.REQUEST),
70
- __metadata("design:type", Object)
71
- ], AbstractRepository.prototype, "$request", void 0);
72
- exports.AbstractRepository = AbstractRepository;
73
- //# sourceMappingURL=app.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.repository.js","sourceRoot":"","sources":["../../src/abstract/app.repository.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,uCAAuC;AAMvC,MAAsB,kBAAkB;IAMtC,IAAc,KAAK;;QACjB,OAAO,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,CAAC;IAC7B,CAAC;IAEY,IAAI,CAAC,GAAG,MAAiB;;YACpC,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;QACtB,CAAC;KAAA;IAEY,MAAM,CAAC,GAAG,MAAa;;YAClC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAEjC,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;YAE3B,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;gBAC3B,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;aAC9B;YAED,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;KAAA;IAEY,IAAI,CAAC,EAAU;;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACxB,CAAC;KAAA;IAEY,MAAM,CAAC,EAAU,EAAE,GAAG,MAAiB;;YAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAI,EAAE,EAAE,MAAM,CAAC,CAAC;YAEzD,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5C,CAAC;KAAA;IAEY,MAAM,CAAC,EAAU;;YAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC;KAAA;IAEe,KAAK;;YACnB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAK,CAAC;QAC/B,CAAC;KAAA;IAEe,KAAK,CAAC,EAAU;;YAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAClC,CAAC;KAAA;IAEe,OAAO,CAAC,KAAiB;;YACvC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;KAAA;IAEe,OAAO,CAAC,EAAU,EAAE,KAAqB;;YAEvD,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC;KAAA;IAEe,OAAO,CAAC,EAAU;;YAChC,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;KAAA;CACF;AAxDC;IADC,IAAA,eAAM,EAAC,cAAO,CAAC;;oDACqB;AAJvC,gDA4DC"}
@@ -1,6 +0,0 @@
1
- export declare class AppRouter {
2
- static readonly path: string;
3
- static readonly module: typeof AppRouter;
4
- static readonly children?: any[];
5
- }
6
- //# sourceMappingURL=app.router.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.router.d.ts","sourceRoot":"","sources":["../../src/abstract/app.router.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IACpB,gBAAuB,IAAI,EAAE,MAAM,CAAC;IAEpC,gBAAuB,MAAM,EAAE,OAAO,SAAS,CAAC;IAEhD,gBAAuB,QAAQ,CAAC,QAAM;CACvC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppRouter = void 0;
4
- class AppRouter {
5
- }
6
- exports.AppRouter = AppRouter;
7
- AppRouter.children = [];
8
- //# sourceMappingURL=app.router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.router.js","sourceRoot":"","sources":["../../src/abstract/app.router.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;;AAAtB,8BAMC;AADwB,kBAAQ,GAAI,EAAE,CAAC"}
@@ -1,11 +0,0 @@
1
- import { AbstractRepository } from '../abstract/abstract.repository';
2
- import { AppEntity } from './app.entity';
3
- export declare abstract class AppController<E extends AppEntity> {
4
- protected abstract readonly $repository: AbstractRepository<E>;
5
- protected find?(...params: any): Promise<E[]>;
6
- protected read?(id: string): Promise<E>;
7
- protected create?(validator: unknown, ...params: any): Promise<E>;
8
- protected update?(id: string, validator: unknown): Promise<E>;
9
- protected delete?(id: string): Promise<void>;
10
- }
11
- //# sourceMappingURL=app.controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.controller.d.ts","sourceRoot":"","sources":["../../src/configs/app.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,8BAAsB,aAAa,CAAC,CAAC,SAAS,SAAS;IACrD,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAE/D,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAI7C,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAIvC,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC;IAIjE,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAI7D,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7C"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppController = void 0;
4
- class AppController {
5
- find(...params) {
6
- return this.$repository.find();
7
- }
8
- read(id) {
9
- return this.$repository.read(id);
10
- }
11
- create(validator, ...params) {
12
- return this.$repository.create(validator);
13
- }
14
- update(id, validator) {
15
- return this.$repository.update(id, validator);
16
- }
17
- delete(id) {
18
- return this.$repository.delete(id);
19
- }
20
- }
21
- exports.AppController = AppController;
22
- //# sourceMappingURL=app.controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../src/configs/app.controller.ts"],"names":[],"mappings":";;;AAGA,MAAsB,aAAa;IAGvB,IAAI,CAAE,GAAG,MAAW;QAC5B,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAES,IAAI,CAAE,EAAU;QACxB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAES,MAAM,CAAE,SAAkB,EAAE,GAAG,MAAW;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC;IAES,MAAM,CAAE,EAAU,EAAE,SAAkB;QAC9C,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;IAChD,CAAC;IAES,MAAM,CAAE,EAAU;QAC1B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC;CACF;AAtBD,sCAsBC"}
@@ -1,9 +0,0 @@
1
- import { Document } from 'mongoose';
2
- export declare abstract class AppEntity extends Document {
3
- static $index: string;
4
- readonly _id = "";
5
- readonly createdAt?: Date;
6
- readonly updatedAt?: Date;
7
- readonly deletedAt?: Date;
8
- }
9
- //# sourceMappingURL=app.entity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.entity.d.ts","sourceRoot":"","sources":["../../src/configs/app.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAyB,MAAM,UAAU,CAAC;AAE3D,8BAAsB,SAAU,SAAQ,QAAQ;IAC9C,OAAc,MAAM,EAAE,MAAM,CAAC;IAE7B,SAAyB,GAAG,MAAM;IAElC,SACgB,SAAS,CAAC,EAAE,IAAI,CAAQ;IAExC,SACgB,SAAS,CAAC,EAAE,IAAI,CAAQ;IAExC,SACgB,SAAS,CAAC,EAAE,IAAI,CAAQ;CACzC"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppEntity = void 0;
4
- const mongoose_1 = require("@nestjs/mongoose");
5
- const mongoose_2 = require("mongoose");
6
- class AppEntity extends mongoose_2.Document {
7
- constructor() {
8
- super(...arguments);
9
- this._id = '';
10
- this.createdAt = null;
11
- this.updatedAt = null;
12
- this.deletedAt = null;
13
- }
14
- }
15
- __decorate([
16
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
17
- __metadata("design:type", Date)
18
- ], AppEntity.prototype, "createdAt", void 0);
19
- __decorate([
20
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
21
- __metadata("design:type", Date)
22
- ], AppEntity.prototype, "updatedAt", void 0);
23
- __decorate([
24
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
25
- __metadata("design:type", Date)
26
- ], AppEntity.prototype, "deletedAt", void 0);
27
- exports.AppEntity = AppEntity;
28
- //# sourceMappingURL=app.entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.entity.js","sourceRoot":"","sources":["../../src/configs/app.entity.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uCAA2D;AAE3D,MAAsB,SAAU,SAAQ,mBAAQ;IAAhD;;QAG2B,QAAG,GAAG,EAAE,CAAC;QAGlB,cAAS,GAAU,IAAI,CAAC;QAGxB,cAAS,GAAU,IAAI,CAAC;QAGxB,cAAS,GAAU,IAAI,CAAC;IAC1C,CAAC;CAAA;AAPC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;8BACX,IAAI;4CAAQ;AAGxC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;8BACX,IAAI;4CAAQ;AAGxC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;8BACX,IAAI;4CAAQ;AAZ1C,8BAaC"}
@@ -1,11 +0,0 @@
1
- import { ArgumentsHost, ExceptionFilter, HttpException, Logger } from '@nestjs/common';
2
- import { Request, Response } from 'express';
3
- export declare abstract class AppException implements ExceptionFilter {
4
- protected request: Request;
5
- protected response: Response;
6
- protected host: ArgumentsHost;
7
- protected logger: Logger;
8
- catch(exception: HttpException, host: ArgumentsHost): Response<any, Record<string, any>>;
9
- protected abstract handleError(exception: HttpException): HttpException;
10
- }
11
- //# sourceMappingURL=app.exception.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.exception.d.ts","sourceRoot":"","sources":["../../src/configs/app.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAgC,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACrH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5C,8BAAsB,YAAa,YAAW,eAAe;IAC3D,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7B,SAAS,CAAC,IAAI,EAAE,aAAa,CAAC;IAC9B,SAAS,CAAC,MAAM,SAAgB;IAEzB,KAAK,CAAC,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa;IAkC1D,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,GAAG,aAAa;CACxE"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppException = void 0;
4
- const common_1 = require("@nestjs/common");
5
- class AppException {
6
- constructor() {
7
- this.logger = new common_1.Logger();
8
- }
9
- catch(exception, host) {
10
- this.host = host;
11
- const ctx = this.host.switchToHttp();
12
- this.response = ctx.getResponse();
13
- this.request = ctx.getRequest();
14
- this.logger.error(exception);
15
- const handledError = this.handleError(exception);
16
- if (handledError instanceof common_1.HttpException) {
17
- const { message: trace } = exception.getResponse();
18
- this.response.statusMessage = handledError.name
19
- .slice(0, -9)
20
- .replace(/([A-Z])/g, ' $1')
21
- .trim();
22
- return this.response
23
- .status(handledError.getStatus())
24
- .json({
25
- statusCode: handledError.getStatus(),
26
- message: handledError.message,
27
- error: this.response.statusMessage,
28
- trace: trace,
29
- });
30
- }
31
- return this.response
32
- .status(500)
33
- .json(new common_1.InternalServerErrorException(handledError));
34
- }
35
- }
36
- exports.AppException = AppException;
37
- //# sourceMappingURL=app.exception.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.exception.js","sourceRoot":"","sources":["../../src/configs/app.exception.ts"],"names":[],"mappings":";;;AAAA,2CAAqH;AAGrH,MAAsB,YAAY;IAAlC;QAIY,WAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAqClC,CAAC;IAnCQ,KAAK,CAAC,SAAwB,EAAE,IAAmB;QACxD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAEjB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QAErC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAY,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,UAAU,EAAW,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAE7B,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAEjD,IAAI,YAAY,YAAY,sBAAa,EAAE;YACzC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC,WAAW,EAAS,CAAC;YAE1D,IAAI,CAAC,QAAQ,CAAC,aAAa,GAAG,YAAY,CAAC,IAAI;iBAC5C,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;iBACZ,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC;iBAC1B,IAAI,EAAE,CAAC;YAEV,OAAO,IAAI,CAAC,QAAQ;iBACjB,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC;iBAChC,IAAI,CAAC;gBACJ,UAAU,EAAE,YAAY,CAAC,SAAS,EAAE;gBACpC,OAAO,EAAE,YAAY,CAAC,OAAO;gBAC7B,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,aAAa;gBAClC,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;SACN;QAED,OAAO,IAAI,CAAC,QAAQ;aACjB,MAAM,CAAC,GAAG,CAAC;aACX,IAAI,CAAC,IAAI,qCAA4B,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1D,CAAC;CAGF;AAzCD,oCAyCC"}
@@ -1,20 +0,0 @@
1
- import { Request } from 'express';
2
- import { Model, UpdateQuery } from 'mongoose';
3
- import { DecodedUser } from '../decorators/user.decorator';
4
- import { AppEntity } from './app.entity';
5
- export declare abstract class AppRepository<E extends AppEntity> {
6
- abstract readonly $model: Model<E>;
7
- protected readonly $request: Request;
8
- protected get $user(): DecodedUser | undefined;
9
- find(...params: unknown[]): Promise<E[]>;
10
- create(...params: any[]): Promise<E>;
11
- read(id: string): Promise<E>;
12
- update(id: string, ...params: unknown[]): Promise<E>;
13
- delete(id: string): Promise<void>;
14
- protected $find(): Promise<E[]>;
15
- protected $read(id: string): Promise<E>;
16
- protected $create(model: Partial<E>): Promise<E>;
17
- protected $update(id: string, query: UpdateQuery<E>): Promise<E>;
18
- protected $delete(id: string): Promise<void>;
19
- }
20
- //# sourceMappingURL=app.repository.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.repository.d.ts","sourceRoot":"","sources":["../../src/configs/app.repository.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,8BAAsB,aAAa,CAAC,CAAC,SAAS,SAAS;IACrD,kBAAyB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAG1C,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAErC,SAAS,KAAK,KAAK,IAAI,WAAW,GAAG,SAAS,CAE7C;IAEY,IAAI,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAIxC,MAAM,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE;IAYvB,IAAI,CAAC,EAAE,EAAE,MAAM;IAIf,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE;IAMvC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;cAI9B,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC;cAIrB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;cAI7B,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;cAItC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;cAKtD,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnD"}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppRepository = void 0;
4
- const common_1 = require("@nestjs/common");
5
- const core_1 = require("@nestjs/core");
6
- class AppRepository {
7
- get $user() {
8
- var _a;
9
- return (_a = this.$request) === null || _a === void 0 ? void 0 : _a.user;
10
- }
11
- find(...params) {
12
- return __awaiter(this, void 0, void 0, function* () {
13
- return this.$find();
14
- });
15
- }
16
- create(...params) {
17
- return __awaiter(this, void 0, void 0, function* () {
18
- const entity = new this.$model();
19
- const [validator] = params;
20
- for (const key in validator) {
21
- entity[key] = validator[key];
22
- }
23
- return this.$create(entity);
24
- });
25
- }
26
- read(id) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- return this.$read(id);
29
- });
30
- }
31
- update(id, ...params) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- const entity = yield this.$model.findById(id, params);
34
- return this.$update(id, { $set: entity });
35
- });
36
- }
37
- delete(id) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- return this.$delete(id);
40
- });
41
- }
42
- $find() {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- return this.$model.find();
45
- });
46
- }
47
- $read(id) {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- return this.$model.findById(id);
50
- });
51
- }
52
- $create(model) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- return this.$model.create(model);
55
- });
56
- }
57
- $update(id, query) {
58
- return __awaiter(this, void 0, void 0, function* () {
59
- return this.$model.findByIdAndUpdate(id, query);
60
- });
61
- }
62
- $delete(id) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- return this.$model.findByIdAndDelete(id);
65
- });
66
- }
67
- }
68
- __decorate([
69
- (0, common_1.Inject)(core_1.REQUEST),
70
- __metadata("design:type", Object)
71
- ], AppRepository.prototype, "$request", void 0);
72
- exports.AppRepository = AppRepository;
73
- //# sourceMappingURL=app.repository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.repository.js","sourceRoot":"","sources":["../../src/configs/app.repository.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,uCAAuC;AAMvC,MAAsB,aAAa;IAMjC,IAAc,KAAK;;QACjB,OAAO,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,CAAC;IAC7B,CAAC;IAEY,IAAI,CAAC,GAAG,MAAiB;;YACpC,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;QACtB,CAAC;KAAA;IAEY,MAAM,CAAC,GAAG,MAAa;;YAClC,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAEjC,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;YAE3B,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;gBAC3B,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;aAC9B;YAED,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;KAAA;IAEY,IAAI,CAAC,EAAU;;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACxB,CAAC;KAAA;IAEY,MAAM,CAAC,EAAU,EAAE,GAAG,MAAiB;;YAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAI,EAAE,EAAE,MAAM,CAAC,CAAC;YAEzD,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5C,CAAC;KAAA;IAEY,MAAM,CAAC,EAAU;;YAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC;KAAA;IAEe,KAAK;;YACnB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAK,CAAC;QAC/B,CAAC;KAAA;IAEe,KAAK,CAAC,EAAU;;YAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAClC,CAAC;KAAA;IAEe,OAAO,CAAC,KAAiB;;YACvC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;KAAA;IAEe,OAAO,CAAC,EAAU,EAAE,KAAqB;;YAEvD,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC;KAAA;IAEe,OAAO,CAAC,EAAU;;YAChC,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC;KAAA;CACF;AAxDC;IADC,IAAA,eAAM,EAAC,cAAO,CAAC;;+CACqB;AAJvC,sCA4DC"}
@@ -1,6 +0,0 @@
1
- export declare class AppRouter {
2
- static readonly path: string;
3
- static readonly module: typeof AppRouter;
4
- static readonly children?: any[];
5
- }
6
- //# sourceMappingURL=app.router.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.router.d.ts","sourceRoot":"","sources":["../../src/configs/app.router.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IACpB,gBAAuB,IAAI,EAAE,MAAM,CAAC;IAEpC,gBAAuB,MAAM,EAAE,OAAO,SAAS,CAAC;IAEhD,gBAAuB,QAAQ,CAAC,QAAM;CACvC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppRouter = void 0;
4
- class AppRouter {
5
- }
6
- exports.AppRouter = AppRouter;
7
- AppRouter.children = [];
8
- //# sourceMappingURL=app.router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.router.js","sourceRoot":"","sources":["../../src/configs/app.router.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;;AAAtB,8BAMC;AADwB,kBAAQ,GAAI,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const GetOrganization: (...dataOrPipes: (import("@nestjs/common").PipeTransform<any, any> | import("@nestjs/common").Type<import("@nestjs/common").PipeTransform<any, any>>)[]) => ParameterDecorator;
2
- //# sourceMappingURL=organization.decorator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"organization.decorator.d.ts","sourceRoot":"","sources":["../../src/decorators/organization.decorator.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,gLAK1B,CAAC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetOrganization = void 0;
4
- const common_1 = require("@nestjs/common");
5
- exports.GetOrganization = (0, common_1.createParamDecorator)((key, ctx) => {
6
- const request = ctx.switchToHttp().getRequest();
7
- const { organization } = request.headers;
8
- return organization;
9
- });
10
- //# sourceMappingURL=organization.decorator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"organization.decorator.js","sourceRoot":"","sources":["../../src/decorators/organization.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAwE;AAG3D,QAAA,eAAe,GAAG,IAAA,6BAAoB,EAAC,CAAC,GAAU,EAAE,GAAqB,EAAU,EAAE;IAChG,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,UAAU,EAAW,CAAC;IACzD,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAEzC,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC,CAAC"}
@@ -1,20 +0,0 @@
1
- import { SessionData } from 'express-session';
2
- import { Auth0Service } from '../services/auth0.service';
3
- export declare class GlobalController {
4
- private readonly $connection;
5
- readonly $auth0: Auth0Service;
6
- private readonly $health;
7
- private readonly $mongodb;
8
- private readonly $axios;
9
- private readonly $memory;
10
- health(): Promise<import("@nestjs/terminus").HealthCheckResult>;
11
- main(session: SessionData): Promise<{
12
- hostname: string;
13
- version: string;
14
- totalmem: number;
15
- freemem: number;
16
- platform: NodeJS.Platform;
17
- uptime: number;
18
- }>;
19
- }
20
- //# sourceMappingURL=global.controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global.controller.d.ts","sourceRoot":"","sources":["../../src/globals/global.controller.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,qBACa,gBAAgB;IACP,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IAC7D,SAA0B,MAAM,EAAE,YAAY,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IACnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAK1D,MAAM;IAUO,IAAI,CAAY,OAAO,EAAE,WAAW;;;;;;;;CAYlD"}