@riocrypto/common-server 1.0.2410 → 1.0.2411
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,10 +1,10 @@
|
|
|
1
1
|
import { Fiat, Crypto } from "@riocrypto/common";
|
|
2
|
-
import {
|
|
2
|
+
import { PayoutAdvanceTransactionType } from "@riocrypto/common";
|
|
3
3
|
import mongoose from "mongoose";
|
|
4
|
-
interface
|
|
4
|
+
interface PayoutAdvanceTransactionAttrs {
|
|
5
5
|
createdAt: Date;
|
|
6
6
|
userId: string;
|
|
7
|
-
type:
|
|
7
|
+
type: PayoutAdvanceTransactionType;
|
|
8
8
|
amount: number;
|
|
9
9
|
currency: Fiat | Crypto;
|
|
10
10
|
bankAccountId?: string;
|
|
@@ -18,10 +18,10 @@ interface PreSettlementTransactionAttrs {
|
|
|
18
18
|
reference?: string;
|
|
19
19
|
CEPLink?: string;
|
|
20
20
|
}
|
|
21
|
-
interface
|
|
21
|
+
interface PayoutAdvanceTransactionDoc extends mongoose.Document {
|
|
22
22
|
createdAt: Date;
|
|
23
23
|
userId: string;
|
|
24
|
-
type:
|
|
24
|
+
type: PayoutAdvanceTransactionType;
|
|
25
25
|
amount: number;
|
|
26
26
|
currency: Fiat | Crypto;
|
|
27
27
|
bankAccountId?: string;
|
|
@@ -35,8 +35,8 @@ interface PreSettlementTransactionDoc extends mongoose.Document {
|
|
|
35
35
|
reference?: string;
|
|
36
36
|
CEPLink?: string;
|
|
37
37
|
}
|
|
38
|
-
interface
|
|
39
|
-
build(attrs:
|
|
38
|
+
interface PayoutAdvanceTransactionModel extends mongoose.Model<PayoutAdvanceTransactionDoc> {
|
|
39
|
+
build(attrs: PayoutAdvanceTransactionAttrs): PayoutAdvanceTransactionDoc;
|
|
40
40
|
}
|
|
41
|
-
declare const
|
|
42
|
-
export {
|
|
41
|
+
declare const buildPayoutAdvanceTransaction: (mongoose: typeof mongoose) => PayoutAdvanceTransactionModel;
|
|
42
|
+
export { buildPayoutAdvanceTransaction, PayoutAdvanceTransactionDoc, PayoutAdvanceTransactionAttrs, };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.buildPayoutAdvanceTransaction = void 0;
|
|
4
4
|
const common_1 = require("@riocrypto/common");
|
|
5
|
-
const
|
|
5
|
+
const buildPayoutAdvanceTransaction = (mongoose) => {
|
|
6
6
|
// if model is already defined, return it
|
|
7
|
-
if (mongoose.models.
|
|
8
|
-
return mongoose.model("
|
|
7
|
+
if (mongoose.models.PayoutAdvanceTransaction) {
|
|
8
|
+
return mongoose.model("PayoutAdvanceTransaction");
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const PayoutAdvanceTransactionSchema = new mongoose.Schema({
|
|
11
11
|
createdAt: {
|
|
12
12
|
type: Date,
|
|
13
13
|
},
|
|
@@ -16,7 +16,7 @@ const buildPreSettlementTransaction = (mongoose) => {
|
|
|
16
16
|
},
|
|
17
17
|
type: {
|
|
18
18
|
type: String,
|
|
19
|
-
enum: Object.values(common_1.
|
|
19
|
+
enum: Object.values(common_1.PayoutAdvanceTransactionType),
|
|
20
20
|
},
|
|
21
21
|
amount: {
|
|
22
22
|
type: Number,
|
|
@@ -63,10 +63,10 @@ const buildPreSettlementTransaction = (mongoose) => {
|
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
|
-
|
|
67
|
-
return new
|
|
66
|
+
PayoutAdvanceTransactionSchema.statics.build = (attrs) => {
|
|
67
|
+
return new PayoutAdvanceTransaction(attrs);
|
|
68
68
|
};
|
|
69
|
-
const
|
|
70
|
-
return
|
|
69
|
+
const PayoutAdvanceTransaction = mongoose.model("PayoutAdvanceTransaction", PayoutAdvanceTransactionSchema);
|
|
70
|
+
return PayoutAdvanceTransaction;
|
|
71
71
|
};
|
|
72
|
-
exports.
|
|
72
|
+
exports.buildPayoutAdvanceTransaction = buildPayoutAdvanceTransaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2411",
|
|
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.2149",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|