@duvdu-v1/duvdu 1.1.277 → 1.1.278

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.
@@ -1,2 +1 @@
1
- declare const bullRedis: Promise<import("ioredis/built/Redis").default>;
2
- export { bullRedis };
1
+ export declare const getBullRedis: () => Promise<import("ioredis/built/Redis").default>;
@@ -1,8 +1,17 @@
1
1
  "use strict";
2
2
  // // bullmq-redis.ts
3
3
  // import IORedis from 'ioredis';
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
4
13
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.bullRedis = void 0;
14
+ exports.getBullRedis = void 0;
6
15
  // const bullRedis = new IORedis({
7
16
  // host: process.env.REDIS_HOST?.split('://')[1]?.split(':')[0] || 'localhost',
8
17
  // port: parseInt(process.env.REDIS_HOST?.split(':').pop() || '6379'),
@@ -17,6 +26,8 @@ exports.bullRedis = void 0;
17
26
  // export { bullRedis };
18
27
  // bullmq-redis.ts
19
28
  const redis_connection_1 = require("./redis-connection");
20
- // Use the existing Redis client from redis-connection.ts
21
- const bullRedis = (0, redis_connection_1.getRedisClient)();
22
- exports.bullRedis = bullRedis;
29
+ // Create a function that returns the Redis client for BullMQ
30
+ const getBullRedis = () => __awaiter(void 0, void 0, void 0, function* () {
31
+ return yield (0, redis_connection_1.getRedisClient)();
32
+ });
33
+ exports.getBullRedis = getBullRedis;
@@ -36,6 +36,7 @@ export interface ITransaction {
36
36
  status: string;
37
37
  timeStamp: Date;
38
38
  model: string;
39
+ isSubscription: boolean;
39
40
  }
40
41
  export declare const Transaction: import("mongoose").Model<ITransaction, {}, {}, {}, import("mongoose").Document<unknown, {}, ITransaction> & ITransaction & {
41
42
  _id: Types.ObjectId;
@@ -17,4 +17,5 @@ exports.Transaction = (0, mongoose_1.model)(model_names_1.MODELS.transaction, ne
17
17
  status: { type: String, default: TransactionStatus.PENDING },
18
18
  timeStamp: { type: Date, default: Date.now },
19
19
  model: { type: String, default: null },
20
+ isSubscription: { type: Boolean, default: false },
20
21
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.277",
3
+ "version": "1.1.278",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [