@riocrypto/common-server 1.0.1240 → 1.0.1243

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.
@@ -4,7 +4,7 @@ interface BankPayoutAttrs {
4
4
  orderId: string;
5
5
  bankAccountId: string;
6
6
  originBank: Processor;
7
- status: "created" | "processing" | "complete" | "failed" | "cancelled";
7
+ status: "initialized" | "processing" | "complete" | "failed" | "cancelled";
8
8
  transferDetails?: {
9
9
  speiTrackingNumber?: string;
10
10
  reference?: string;
@@ -14,7 +14,7 @@ interface BankPayoutDoc extends Document {
14
14
  orderId: string;
15
15
  bankAccountId: string;
16
16
  originBank: Processor;
17
- status: "created" | "processing" | "complete" | "failed" | "cancelled";
17
+ status: "initialized" | "processing" | "complete" | "failed" | "cancelled";
18
18
  transferDetails?: {
19
19
  speiTrackingNumber?: string;
20
20
  reference?: string;
@@ -0,0 +1,18 @@
1
+ import { Mongoose, Model, Document } from "mongoose";
2
+ interface BitsoMXNWithdrawalAttrs {
3
+ createdAt: Date;
4
+ orderId: string;
5
+ bitsoWithdrawalId: string;
6
+ status: "processing" | "complete" | "failed";
7
+ }
8
+ interface BitsoMXNWithdrawalDoc extends Document {
9
+ createdAt: Date;
10
+ orderId: string;
11
+ bitsoWithdrawalId: string;
12
+ status: "processing" | "complete" | "failed";
13
+ }
14
+ interface BitsoMXNWithdrawalModel extends Model<BitsoMXNWithdrawalDoc> {
15
+ build(attrs: BitsoMXNWithdrawalAttrs): BitsoMXNWithdrawalDoc;
16
+ }
17
+ declare const buildBitsoMXNWithdrawal: (mongoose: Mongoose) => BitsoMXNWithdrawalModel;
18
+ export { buildBitsoMXNWithdrawal, BitsoMXNWithdrawalDoc };
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildBitsoMXNWithdrawal = void 0;
4
+ const buildBitsoMXNWithdrawal = (mongoose) => {
5
+ // if model is already defined, return it
6
+ if (mongoose.models.BitsoMXNWithdrawal) {
7
+ return mongoose.model("BitsoMXNWithdrawal");
8
+ }
9
+ const BitsoMXNWithdrawalSchema = new mongoose.Schema({
10
+ orderId: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ createdAt: {
15
+ type: mongoose.Schema.Types.Date,
16
+ required: true,
17
+ },
18
+ bitsoWithdrawalId: {
19
+ type: String,
20
+ required: true,
21
+ },
22
+ status: {
23
+ type: String,
24
+ required: true,
25
+ },
26
+ }, {
27
+ toJSON: {
28
+ transform(doc, ret) {
29
+ ret.id = ret._id.valueOf();
30
+ delete ret._id;
31
+ delete ret.__v;
32
+ },
33
+ },
34
+ });
35
+ BitsoMXNWithdrawalSchema.statics.build = (attrs) => {
36
+ return new BitsoMXNWithdrawal(attrs);
37
+ };
38
+ const BitsoMXNWithdrawal = mongoose.model("BitsoMXNWithdrawal", BitsoMXNWithdrawalSchema);
39
+ return BitsoMXNWithdrawal;
40
+ };
41
+ exports.buildBitsoMXNWithdrawal = buildBitsoMXNWithdrawal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1240",
3
+ "version": "1.0.1243",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
29
  "@google-cloud/vision": "^4.0.2",
30
- "@riocrypto/common": "^1.0.1124",
30
+ "@riocrypto/common": "^1.0.1133",
31
31
  "@types/express": "^4.17.13",
32
32
  "axios": "^0.27.2",
33
33
  "ccxt": "^3.0.30",