@riocrypto/common-server 1.0.1620 → 1.0.1622
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.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BankAccountVerificationStatus } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface BankAccountVerificationAttrs {
|
|
4
|
+
bankAccountId: string;
|
|
5
|
+
status: BankAccountVerificationStatus;
|
|
6
|
+
amount: number;
|
|
7
|
+
}
|
|
8
|
+
interface BankAccountVerificationModel extends Model<BankAccountVerificationDoc> {
|
|
9
|
+
build(attrs: BankAccountVerificationAttrs): BankAccountVerificationDoc;
|
|
10
|
+
}
|
|
11
|
+
interface BankAccountVerificationDoc extends Document {
|
|
12
|
+
_id: string;
|
|
13
|
+
bankAccountId: string;
|
|
14
|
+
status: BankAccountVerificationStatus;
|
|
15
|
+
amount: number;
|
|
16
|
+
}
|
|
17
|
+
declare const buildBankAccountVerification: (mongoose: Mongoose) => BankAccountVerificationModel;
|
|
18
|
+
export { buildBankAccountVerification, BankAccountVerificationDoc, BankAccountVerificationAttrs, };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildBankAccountVerification = void 0;
|
|
4
|
+
const buildBankAccountVerification = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.BankAccountVerification) {
|
|
7
|
+
return mongoose.model("BankAccountVerification");
|
|
8
|
+
}
|
|
9
|
+
const BankAccountVerificationSchema = new mongoose.Schema({
|
|
10
|
+
bankAccountId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
status: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
amount: {
|
|
19
|
+
type: Number,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
}, {
|
|
23
|
+
toJSON: {
|
|
24
|
+
transform(doc, ret) {
|
|
25
|
+
ret.id = ret._id.valueOf();
|
|
26
|
+
delete ret._id;
|
|
27
|
+
delete ret.__v;
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
BankAccountVerificationSchema.statics.build = (attrs) => {
|
|
32
|
+
return new BankAccountVerification(attrs);
|
|
33
|
+
};
|
|
34
|
+
const BankAccountVerification = mongoose.model("BankAccountVerification", BankAccountVerificationSchema);
|
|
35
|
+
return BankAccountVerification;
|
|
36
|
+
};
|
|
37
|
+
exports.buildBankAccountVerification = buildBankAccountVerification;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Crypto } from "@riocrypto/common";
|
|
2
2
|
import mongoose from "mongoose";
|
|
3
3
|
interface CryptoAddressAttrs {
|
|
4
4
|
userId: string;
|
|
@@ -8,10 +8,6 @@ interface CryptoAddressAttrs {
|
|
|
8
8
|
userApproved: boolean;
|
|
9
9
|
lastChecked: Date;
|
|
10
10
|
label?: string;
|
|
11
|
-
verification?: {
|
|
12
|
-
id: string;
|
|
13
|
-
status?: AddressVerificationStatus;
|
|
14
|
-
};
|
|
15
11
|
}
|
|
16
12
|
interface CryptoAddressDoc extends mongoose.Document {
|
|
17
13
|
userId: string;
|
|
@@ -21,10 +17,6 @@ interface CryptoAddressDoc extends mongoose.Document {
|
|
|
21
17
|
userApproved: boolean;
|
|
22
18
|
lastChecked: Date;
|
|
23
19
|
label?: string;
|
|
24
|
-
verification?: {
|
|
25
|
-
id: string;
|
|
26
|
-
status?: AddressVerificationStatus;
|
|
27
|
-
};
|
|
28
20
|
}
|
|
29
21
|
interface CryptoAddressModel extends mongoose.Model<CryptoAddressDoc> {
|
|
30
22
|
build(attrs: CryptoAddressAttrs): CryptoAddressDoc;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1622",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
29
|
"@google-cloud/vision": "^4.0.2",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.4.2",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.1455",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.6.0",
|
|
34
34
|
"ccxt": "^3.0.30",
|