@riocrypto/common-server 1.0.2486 → 1.0.2487
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/build/index.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ export * from "./models/axe-slack-thread";
|
|
|
95
95
|
export * from "./models/axe-telegram-thread";
|
|
96
96
|
export * from "./models/auth-activity-slack-thread";
|
|
97
97
|
export * from "./models/twap-session";
|
|
98
|
+
export * from "./models/bulk-bank-payout";
|
|
99
|
+
export * from "./models/bulk-crypto-payout";
|
|
98
100
|
export * from "./clients/axios-with-logging";
|
|
99
101
|
export * from "./clients/slack-client";
|
|
100
102
|
export * from "./clients/fireblocks-client";
|
package/build/index.js
CHANGED
|
@@ -111,6 +111,8 @@ __exportStar(require("./models/axe-slack-thread"), exports);
|
|
|
111
111
|
__exportStar(require("./models/axe-telegram-thread"), exports);
|
|
112
112
|
__exportStar(require("./models/auth-activity-slack-thread"), exports);
|
|
113
113
|
__exportStar(require("./models/twap-session"), exports);
|
|
114
|
+
__exportStar(require("./models/bulk-bank-payout"), exports);
|
|
115
|
+
__exportStar(require("./models/bulk-crypto-payout"), exports);
|
|
114
116
|
__exportStar(require("./clients/axios-with-logging"), exports);
|
|
115
117
|
__exportStar(require("./clients/slack-client"), exports);
|
|
116
118
|
__exportStar(require("./clients/fireblocks-client"), exports);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Country, Fiat, BulkBankPayoutStatus } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface BulkBankPayoutAttrs {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
userId: string;
|
|
6
|
+
orderIds: string[];
|
|
7
|
+
amount: number;
|
|
8
|
+
fiat: Fiat;
|
|
9
|
+
country: Country;
|
|
10
|
+
payoutBankAccountId?: string;
|
|
11
|
+
bankName?: string;
|
|
12
|
+
reference?: string;
|
|
13
|
+
accountNumber?: string;
|
|
14
|
+
CLABE?: string;
|
|
15
|
+
RUC?: string;
|
|
16
|
+
RFC?: string;
|
|
17
|
+
CCI?: string;
|
|
18
|
+
status: BulkBankPayoutStatus;
|
|
19
|
+
}
|
|
20
|
+
interface BulkBankPayoutDoc extends Document {
|
|
21
|
+
id: string;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
userId: string;
|
|
24
|
+
orderIds: string[];
|
|
25
|
+
amount: number;
|
|
26
|
+
fiat: Fiat;
|
|
27
|
+
country: Country;
|
|
28
|
+
payoutBankAccountId?: string;
|
|
29
|
+
bankName?: string;
|
|
30
|
+
reference?: string;
|
|
31
|
+
accountNumber?: string;
|
|
32
|
+
CLABE?: string;
|
|
33
|
+
RUC?: string;
|
|
34
|
+
RFC?: string;
|
|
35
|
+
CCI?: string;
|
|
36
|
+
status: BulkBankPayoutStatus;
|
|
37
|
+
}
|
|
38
|
+
interface BulkBankPayoutModel extends Model<BulkBankPayoutDoc> {
|
|
39
|
+
build(attrs: BulkBankPayoutAttrs): BulkBankPayoutDoc;
|
|
40
|
+
}
|
|
41
|
+
declare const buildBulkBankPayout: (mongoose: Mongoose) => BulkBankPayoutModel;
|
|
42
|
+
export { buildBulkBankPayout, BulkBankPayoutDoc, BulkBankPayoutAttrs };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildBulkBankPayout = void 0;
|
|
4
|
+
const buildBulkBankPayout = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.BulkBankPayout) {
|
|
7
|
+
return mongoose.model("BulkBankPayout");
|
|
8
|
+
}
|
|
9
|
+
const BulkBankPayoutSchema = new mongoose.Schema({
|
|
10
|
+
createdAt: {
|
|
11
|
+
type: Date,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
userId: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
orderIds: {
|
|
19
|
+
type: [String],
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
amount: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
fiat: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
country: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
payoutBankAccountId: {
|
|
35
|
+
type: String,
|
|
36
|
+
},
|
|
37
|
+
bankName: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
reference: {
|
|
41
|
+
type: String,
|
|
42
|
+
},
|
|
43
|
+
accountNumber: {
|
|
44
|
+
type: String,
|
|
45
|
+
},
|
|
46
|
+
CLABE: {
|
|
47
|
+
type: String,
|
|
48
|
+
},
|
|
49
|
+
RUC: {
|
|
50
|
+
type: String,
|
|
51
|
+
},
|
|
52
|
+
RFC: {
|
|
53
|
+
type: String,
|
|
54
|
+
},
|
|
55
|
+
CCI: {
|
|
56
|
+
type: String,
|
|
57
|
+
},
|
|
58
|
+
status: {
|
|
59
|
+
type: String,
|
|
60
|
+
required: true,
|
|
61
|
+
},
|
|
62
|
+
}, {
|
|
63
|
+
toJSON: {
|
|
64
|
+
transform(doc, ret) {
|
|
65
|
+
ret.id = ret._id.valueOf();
|
|
66
|
+
delete ret._id;
|
|
67
|
+
delete ret.__v;
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
BulkBankPayoutSchema.statics.build = (attrs) => {
|
|
72
|
+
return new BulkBankPayout(attrs);
|
|
73
|
+
};
|
|
74
|
+
const BulkBankPayout = mongoose.model("BulkBankPayout", BulkBankPayoutSchema);
|
|
75
|
+
return BulkBankPayout;
|
|
76
|
+
};
|
|
77
|
+
exports.buildBulkBankPayout = buildBulkBankPayout;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Country, Crypto, BulkCryptoPayoutStatus } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface BulkCryptoPayoutAttrs {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
userId: string;
|
|
6
|
+
orderIds: string[];
|
|
7
|
+
amount: number;
|
|
8
|
+
crypto: Crypto;
|
|
9
|
+
country: Country;
|
|
10
|
+
payoutAddressId?: string;
|
|
11
|
+
blockchainAddress?: string;
|
|
12
|
+
status: BulkCryptoPayoutStatus;
|
|
13
|
+
}
|
|
14
|
+
interface BulkCryptoPayoutDoc extends Document {
|
|
15
|
+
id: string;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
userId: string;
|
|
18
|
+
orderIds: string[];
|
|
19
|
+
amount: number;
|
|
20
|
+
crypto: Crypto;
|
|
21
|
+
country: Country;
|
|
22
|
+
payoutAddressId?: string;
|
|
23
|
+
blockchainAddress?: string;
|
|
24
|
+
status: BulkCryptoPayoutStatus;
|
|
25
|
+
}
|
|
26
|
+
interface BulkCryptoPayoutModel extends Model<BulkCryptoPayoutDoc> {
|
|
27
|
+
build(attrs: BulkCryptoPayoutAttrs): BulkCryptoPayoutDoc;
|
|
28
|
+
}
|
|
29
|
+
declare const buildBulkCryptoPayout: (mongoose: Mongoose) => BulkCryptoPayoutModel;
|
|
30
|
+
export { buildBulkCryptoPayout, BulkCryptoPayoutDoc, BulkCryptoPayoutAttrs };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildBulkCryptoPayout = void 0;
|
|
4
|
+
const buildBulkCryptoPayout = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.BulkCryptoPayout) {
|
|
7
|
+
return mongoose.model("BulkCryptoPayout");
|
|
8
|
+
}
|
|
9
|
+
const BulkCryptoPayoutSchema = new mongoose.Schema({
|
|
10
|
+
createdAt: {
|
|
11
|
+
type: Date,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
userId: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
orderIds: {
|
|
19
|
+
type: [String],
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
amount: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
crypto: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
country: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
payoutAddressId: {
|
|
35
|
+
type: String,
|
|
36
|
+
},
|
|
37
|
+
blockchainAddress: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
status: {
|
|
41
|
+
type: String,
|
|
42
|
+
required: true,
|
|
43
|
+
},
|
|
44
|
+
}, {
|
|
45
|
+
toJSON: {
|
|
46
|
+
transform(doc, ret) {
|
|
47
|
+
ret.id = ret._id.valueOf();
|
|
48
|
+
delete ret._id;
|
|
49
|
+
delete ret.__v;
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
BulkCryptoPayoutSchema.statics.build = (attrs) => {
|
|
54
|
+
return new BulkCryptoPayout(attrs);
|
|
55
|
+
};
|
|
56
|
+
const BulkCryptoPayout = mongoose.model("BulkCryptoPayout", BulkCryptoPayoutSchema);
|
|
57
|
+
return BulkCryptoPayout;
|
|
58
|
+
};
|
|
59
|
+
exports.buildBulkCryptoPayout = buildBulkCryptoPayout;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2487",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/secret-manager": "^5.3.0",
|
|
29
29
|
"@google-cloud/storage": "^6.9.5",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.7.0",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.2253",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|