@riocrypto/common-server 1.0.2413 → 1.0.2415
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/models/bank-account.d.ts +2 -2
- package/build/models/bank-account.js +1 -1
- package/build/models/crypto-address.d.ts +2 -2
- package/build/models/crypto-address.js +1 -1
- package/build/models/payout-advance-transaction.d.ts +9 -9
- package/build/models/payout-advance-transaction.js +11 -11
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ interface BankAccountAttrs {
|
|
|
14
14
|
notes?: string;
|
|
15
15
|
advancedVerificationStatus?: BankAccountVerificationStatus;
|
|
16
16
|
bridgeExternalAccountId?: string;
|
|
17
|
-
|
|
17
|
+
availablePayoutAdvancesAmount?: number;
|
|
18
18
|
email?: string;
|
|
19
19
|
isBitsoBankAccount?: boolean;
|
|
20
20
|
}
|
|
@@ -32,7 +32,7 @@ interface BankAccountDoc extends Document {
|
|
|
32
32
|
notes?: string;
|
|
33
33
|
advancedVerificationStatus?: BankAccountVerificationStatus;
|
|
34
34
|
bridgeExternalAccountId?: string;
|
|
35
|
-
|
|
35
|
+
availablePayoutAdvancesAmount?: number;
|
|
36
36
|
email?: string;
|
|
37
37
|
isBitsoBankAccount?: boolean;
|
|
38
38
|
}
|
|
@@ -11,7 +11,7 @@ interface CryptoAddressAttrs {
|
|
|
11
11
|
advancedVerificationStatus?: AddressVerificationStatus;
|
|
12
12
|
fireblocksExternalWalletId?: string;
|
|
13
13
|
isFireblocksWhitelisted?: boolean;
|
|
14
|
-
|
|
14
|
+
availablePayoutAdvancesAmount?: number;
|
|
15
15
|
}
|
|
16
16
|
interface CryptoAddressDoc extends mongoose.Document {
|
|
17
17
|
createdAt: Date;
|
|
@@ -24,7 +24,7 @@ interface CryptoAddressDoc extends mongoose.Document {
|
|
|
24
24
|
advancedVerificationStatus?: AddressVerificationStatus;
|
|
25
25
|
fireblocksExternalWalletId?: string;
|
|
26
26
|
isFireblocksWhitelisted?: boolean;
|
|
27
|
-
|
|
27
|
+
availablePayoutAdvancesAmount?: number;
|
|
28
28
|
}
|
|
29
29
|
interface CryptoAddressModel extends mongoose.Model<CryptoAddressDoc> {
|
|
30
30
|
build(attrs: CryptoAddressAttrs): CryptoAddressDoc;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Fiat, Crypto } from "@riocrypto/common";
|
|
2
|
-
import {
|
|
2
|
+
import { PayoutAdvancesTransactionType } from "@riocrypto/common";
|
|
3
3
|
import mongoose from "mongoose";
|
|
4
|
-
interface
|
|
4
|
+
interface PayoutAdvancesTransactionAttrs {
|
|
5
5
|
createdAt: Date;
|
|
6
6
|
userId: string;
|
|
7
|
-
type:
|
|
7
|
+
type: PayoutAdvancesTransactionType;
|
|
8
8
|
amount: number;
|
|
9
9
|
currency: Fiat | Crypto;
|
|
10
10
|
bankAccountId?: string;
|
|
@@ -18,10 +18,10 @@ interface PayoutAdvanceTransactionAttrs {
|
|
|
18
18
|
reference?: string;
|
|
19
19
|
CEPLink?: string;
|
|
20
20
|
}
|
|
21
|
-
interface
|
|
21
|
+
interface PayoutAdvancesTransactionDoc extends mongoose.Document {
|
|
22
22
|
createdAt: Date;
|
|
23
23
|
userId: string;
|
|
24
|
-
type:
|
|
24
|
+
type: PayoutAdvancesTransactionType;
|
|
25
25
|
amount: number;
|
|
26
26
|
currency: Fiat | Crypto;
|
|
27
27
|
bankAccountId?: string;
|
|
@@ -35,8 +35,8 @@ interface PayoutAdvanceTransactionDoc extends mongoose.Document {
|
|
|
35
35
|
reference?: string;
|
|
36
36
|
CEPLink?: string;
|
|
37
37
|
}
|
|
38
|
-
interface
|
|
39
|
-
build(attrs:
|
|
38
|
+
interface PayoutAdvancesTransactionModel extends mongoose.Model<PayoutAdvancesTransactionDoc> {
|
|
39
|
+
build(attrs: PayoutAdvancesTransactionAttrs): PayoutAdvancesTransactionDoc;
|
|
40
40
|
}
|
|
41
|
-
declare const
|
|
42
|
-
export {
|
|
41
|
+
declare const buildPayoutAdvancesTransaction: (mongoose: typeof mongoose) => PayoutAdvancesTransactionModel;
|
|
42
|
+
export { buildPayoutAdvancesTransaction, PayoutAdvancesTransactionDoc, PayoutAdvancesTransactionAttrs, };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.buildPayoutAdvancesTransaction = void 0;
|
|
4
4
|
const common_1 = require("@riocrypto/common");
|
|
5
|
-
const
|
|
5
|
+
const buildPayoutAdvancesTransaction = (mongoose) => {
|
|
6
6
|
// if model is already defined, return it
|
|
7
|
-
if (mongoose.models.
|
|
8
|
-
return mongoose.model("
|
|
7
|
+
if (mongoose.models.PayoutAdvancesTransaction) {
|
|
8
|
+
return mongoose.model("PayoutAdvancesTransaction");
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const PayoutAdvancesTransactionSchema = new mongoose.Schema({
|
|
11
11
|
createdAt: {
|
|
12
12
|
type: Date,
|
|
13
13
|
},
|
|
@@ -16,7 +16,7 @@ const buildPayoutAdvanceTransaction = (mongoose) => {
|
|
|
16
16
|
},
|
|
17
17
|
type: {
|
|
18
18
|
type: String,
|
|
19
|
-
enum: Object.values(common_1.
|
|
19
|
+
enum: Object.values(common_1.PayoutAdvancesTransactionType),
|
|
20
20
|
},
|
|
21
21
|
amount: {
|
|
22
22
|
type: Number,
|
|
@@ -63,10 +63,10 @@ const buildPayoutAdvanceTransaction = (mongoose) => {
|
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
|
-
|
|
67
|
-
return new
|
|
66
|
+
PayoutAdvancesTransactionSchema.statics.build = (attrs) => {
|
|
67
|
+
return new PayoutAdvancesTransaction(attrs);
|
|
68
68
|
};
|
|
69
|
-
const
|
|
70
|
-
return
|
|
69
|
+
const PayoutAdvancesTransaction = mongoose.model("PayoutAdvancesTransaction", PayoutAdvancesTransactionSchema);
|
|
70
|
+
return PayoutAdvancesTransaction;
|
|
71
71
|
};
|
|
72
|
-
exports.
|
|
72
|
+
exports.buildPayoutAdvancesTransaction = buildPayoutAdvancesTransaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2415",
|
|
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.2158",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|