@duvdu-v1/duvdu 1.1.343 → 1.1.345

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.
@@ -26,7 +26,8 @@ import { Types } from 'mongoose';
26
26
  export declare enum FundedTransactionStatus {
27
27
  PENDING = "pending",
28
28
  SUCCESS = "success",
29
- FAILED = "failed"
29
+ FAILED = "failed",
30
+ CANCELED = "canceled"
30
31
  }
31
32
  export interface IFundedTransaction {
32
33
  user: Types.ObjectId;
@@ -37,6 +38,7 @@ export interface IFundedTransaction {
37
38
  withdrawMethod: Types.ObjectId;
38
39
  contract: Types.ObjectId;
39
40
  ticketNumber: string;
41
+ completedAt: Date;
40
42
  }
41
43
  export declare const FundedTransaction: import("mongoose").Model<IFundedTransaction, {}, {}, {}, import("mongoose").Document<unknown, {}, IFundedTransaction> & IFundedTransaction & {
42
44
  _id: Types.ObjectId;
@@ -8,6 +8,7 @@ var FundedTransactionStatus;
8
8
  FundedTransactionStatus["PENDING"] = "pending";
9
9
  FundedTransactionStatus["SUCCESS"] = "success";
10
10
  FundedTransactionStatus["FAILED"] = "failed";
11
+ FundedTransactionStatus["CANCELED"] = "canceled";
11
12
  })(FundedTransactionStatus || (exports.FundedTransactionStatus = FundedTransactionStatus = {}));
12
13
  const generateFundedTransactionTicketNumber = () => {
13
14
  const random = Math.floor(100000 + Math.random() * 900000); // 6-digit random number
@@ -22,4 +23,5 @@ exports.FundedTransaction = (0, mongoose_1.model)(model_names_1.MODELS.fundedTra
22
23
  status: { type: String, default: FundedTransactionStatus.PENDING },
23
24
  withdrawMethod: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.withdrawMethod },
24
25
  ticketNumber: { type: String, default: generateFundedTransactionTicketNumber, unique: true, sparse: true },
26
+ completedAt: { type: Date, default: null },
25
27
  }, { timestamps: true, collection: model_names_1.MODELS.fundedTransaction }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.343",
3
+ "version": "1.1.345",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [