ovi-kit 1.5.2 → 1.8.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.
package/dist/index.d.ts CHANGED
@@ -36,6 +36,7 @@ export { CustomHttpService } from './shared/modules/http/http.service';
36
36
  export { RedisModule } from './shared/modules/redis/redis.module';
37
37
  export { CustomHttpModule } from './shared/modules/http/http.module';
38
38
  export { SharedModule } from './shared.module';
39
+ export { BullMqModule } from './shared/modules/bull-mq/bull-mq.module';
39
40
  export type { MethodInfo } from './shared/types/method-info';
40
41
  export type { MetaData } from './shared/types/meta-data';
41
42
  export type { GeneralConfig } from './shared/types/config';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INTERNAL_SERVER_ERROR = exports.RpcErrorCode = exports.CustomRpcException = exports.WEEKDAYS = exports.SharedModule = exports.CustomHttpModule = exports.RedisModule = exports.CustomHttpService = exports.RedisService = exports.IsCardType = exports.CustomDate = exports.API_META_KEY = exports.ApiMeta = exports.BaseEntity = exports.getTitle = exports.createRandomPassword = exports.getFiveMinutesLater = exports.uuid = exports.PasswordVo = exports.OtpResponseDto = exports.ConfirmResponseDto = exports.SessionSecretResponseDto = exports.UserMinimalDataResponseDto = exports.GetByIdsDto = exports.CheckUserDto = exports.LoginDto = exports.BaseDto = exports.BaseResponseDto = exports.GetByIdDto = exports.GetByNameDto = exports.MetaDataDto = exports.PaginationResponseDto = exports.PaginationDto = exports.DeleteUserDto = exports.ForgotPasswordDto = exports.UserConfirmDto = exports.RevokeSessionDto = exports.ResetPasswordDto = exports.ResendOtpDto = exports.RecoveryPasswordDto = exports.MetaDto = void 0;
3
+ exports.INTERNAL_SERVER_ERROR = exports.RpcErrorCode = exports.CustomRpcException = exports.WEEKDAYS = exports.BullMqModule = exports.SharedModule = exports.CustomHttpModule = exports.RedisModule = exports.CustomHttpService = exports.RedisService = exports.IsCardType = exports.CustomDate = exports.API_META_KEY = exports.ApiMeta = exports.BaseEntity = exports.getTitle = exports.createRandomPassword = exports.getFiveMinutesLater = exports.uuid = exports.PasswordVo = exports.OtpResponseDto = exports.ConfirmResponseDto = exports.SessionSecretResponseDto = exports.UserMinimalDataResponseDto = exports.GetByIdsDto = exports.CheckUserDto = exports.LoginDto = exports.BaseDto = exports.BaseResponseDto = exports.GetByIdDto = exports.GetByNameDto = exports.MetaDataDto = exports.PaginationResponseDto = exports.PaginationDto = exports.DeleteUserDto = exports.ForgotPasswordDto = exports.UserConfirmDto = exports.RevokeSessionDto = exports.ResetPasswordDto = exports.ResendOtpDto = exports.RecoveryPasswordDto = exports.MetaDto = void 0;
4
4
  var meta_data_dto_1 = require("./shared/dto/meta-data.dto");
5
5
  Object.defineProperty(exports, "MetaDto", { enumerable: true, get: function () { return meta_data_dto_1.MetaDto; } });
6
6
  var recovery_password_dto_1 = require("./shared/dto/recovery-password.dto");
@@ -75,6 +75,8 @@ var http_module_1 = require("./shared/modules/http/http.module");
75
75
  Object.defineProperty(exports, "CustomHttpModule", { enumerable: true, get: function () { return http_module_1.CustomHttpModule; } });
76
76
  var shared_module_1 = require("./shared.module");
77
77
  Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
78
+ var bull_mq_module_1 = require("./shared/modules/bull-mq/bull-mq.module");
79
+ Object.defineProperty(exports, "BullMqModule", { enumerable: true, get: function () { return bull_mq_module_1.BullMqModule; } });
78
80
  var weekdays_1 = require("./shared/arrays/weekdays");
79
81
  Object.defineProperty(exports, "WEEKDAYS", { enumerable: true, get: function () { return weekdays_1.WEEKDAYS; } });
80
82
  var custom_rpc_exception_1 = require("./shared/exceptions/custom-rpc.exception");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,4DAAqD;AAA5C,wGAAA,OAAO,OAAA;AAChB,4EAAyE;AAAhE,4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A,WAAW,OAAA;AACpB,oGAA4F;AAAnF,+IAAA,0BAA0B,OAAA;AACnC,sEAA2E;AAAlE,8HAAA,wBAAwB,OAAA;AACjC,0FAA+E;AAAtE,kIAAA,kBAAkB,OAAA;AAC3B,8FAA6E;AAApE,gIAAA,cAAc,OAAA;AAGvB,4DAA6D;AAApD,sGAAA,UAAU,OAAA;AAGnB,4CAA2C;AAAlC,4FAAA,IAAI,OAAA;AACb,gFAA4E;AAAnE,6HAAA,mBAAmB,OAAA;AAC5B,gFAA6E;AAApE,8HAAA,oBAAoB,OAAA;AAC7B,sDAAoD;AAA3C,qGAAA,QAAQ,OAAA;AAGjB,6DAA2D;AAAlD,yGAAA,UAAU,OAAA;AAGnB,6EAAiE;AAAxD,6GAAA,OAAO,OAAA;AAChB,6EAAsE;AAA7D,kHAAA,YAAY,OAAA;AAErB,+DAA6D;AAApD,yGAAA,UAAU,OAAA;AACnB,iDAAsD;AAA7C,kGAAA,UAAU,OAAA;AAGnB,sEAAoE;AAA3D,6GAAA,YAAY,OAAA;AACrB,mEAAuE;AAA9D,iHAAA,iBAAiB,OAAA;AAG1B,oEAAkE;AAAzD,2GAAA,WAAW,OAAA;AACpB,iEAAqE;AAA5D,+GAAA,gBAAgB,OAAA;AACzB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,0EAAuE;AAA9D,8GAAA,YAAY,OAAA;AA6BrB,qDAAoD;AAA3C,oGAAA,QAAQ,OAAA;AAGjB,iFAA8E;AAArE,0HAAA,kBAAkB,OAAA;AAG3B,kEAA8D;AAArD,+GAAA,YAAY,OAAA;AAGrB,gGAAwF;AAA/E,qIAAA,qBAAqB,OAAA"}
@@ -0,0 +1,5 @@
1
+ import { DynamicModule } from '@nestjs/common';
2
+ export declare class BullMqModule {
3
+ static forRootAsync(): DynamicModule;
4
+ static registerQueue(queueName: string): DynamicModule;
5
+ }
@@ -0,0 +1,52 @@
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 BullMqModule_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.BullMqModule = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const bullmq_1 = require("@nestjs/bullmq");
13
+ const config_1 = require("@nestjs/config");
14
+ let BullMqModule = BullMqModule_1 = class BullMqModule {
15
+ static forRootAsync() {
16
+ return {
17
+ module: BullMqModule_1,
18
+ imports: [
19
+ config_1.ConfigModule,
20
+ bullmq_1.BullModule.forRootAsync({
21
+ imports: [config_1.ConfigModule],
22
+ useFactory: (configService) => ({
23
+ connection: {
24
+ host: configService.get('REDIS_HOST', 'localhost'),
25
+ port: configService.get('REDIS_PORT', 6379),
26
+ password: configService.get('REDIS_PASSWORD'),
27
+ db: configService.get('REDIS_BULLMQ_DB', 1),
28
+ },
29
+ defaultJobOptions: {
30
+ removeOnComplete: { age: 3600 * 24 * 7 },
31
+ removeOnFail: { count: 1000 },
32
+ attempts: 5,
33
+ backoff: { type: 'exponential', delay: 1000 },
34
+ },
35
+ }),
36
+ inject: [config_1.ConfigService],
37
+ }),
38
+ ],
39
+ global: true,
40
+ };
41
+ }
42
+ static registerQueue(queueName) {
43
+ return bullmq_1.BullModule.registerQueue({
44
+ name: queueName,
45
+ });
46
+ }
47
+ };
48
+ exports.BullMqModule = BullMqModule;
49
+ exports.BullMqModule = BullMqModule = BullMqModule_1 = __decorate([
50
+ (0, common_1.Module)({})
51
+ ], BullMqModule);
52
+ //# sourceMappingURL=bull-mq.module.js.map
@@ -0,0 +1 @@
1
+ {"version":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