@riocrypto/common-server 1.0.880 → 1.0.882
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
|
@@ -31,6 +31,7 @@ export * from "./models/bank-account";
|
|
|
31
31
|
export * from "./models/quote";
|
|
32
32
|
export * from "./models/bridge-customer";
|
|
33
33
|
export * from "./models/bridge-transfer";
|
|
34
|
+
export * from "./models/bridge-external-account";
|
|
34
35
|
export * from "./clients/bitstamp-client";
|
|
35
36
|
export * from "./clients/ccxt-client";
|
|
36
37
|
export * from "./clients/kushki-client";
|
package/build/index.js
CHANGED
|
@@ -47,6 +47,7 @@ __exportStar(require("./models/bank-account"), exports);
|
|
|
47
47
|
__exportStar(require("./models/quote"), exports);
|
|
48
48
|
__exportStar(require("./models/bridge-customer"), exports);
|
|
49
49
|
__exportStar(require("./models/bridge-transfer"), exports);
|
|
50
|
+
__exportStar(require("./models/bridge-external-account"), exports);
|
|
50
51
|
__exportStar(require("./clients/bitstamp-client"), exports);
|
|
51
52
|
__exportStar(require("./clients/ccxt-client"), exports);
|
|
52
53
|
__exportStar(require("./clients/kushki-client"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
2
|
+
interface BridgeExternalAccountAttrs {
|
|
3
|
+
userId: string;
|
|
4
|
+
bridgeExternalAccountId: string;
|
|
5
|
+
}
|
|
6
|
+
interface BridgeExternalAccountModel extends Model<BridgeExternalAccountDoc> {
|
|
7
|
+
build(attrs: BridgeExternalAccountAttrs): BridgeExternalAccountDoc;
|
|
8
|
+
}
|
|
9
|
+
interface BridgeExternalAccountDoc extends Document {
|
|
10
|
+
_id: string;
|
|
11
|
+
userId: string;
|
|
12
|
+
bridgeExternalAccountId: string;
|
|
13
|
+
}
|
|
14
|
+
declare const buildBridgeExternalAccount: (mongoose: Mongoose) => BridgeExternalAccountModel;
|
|
15
|
+
export { buildBridgeExternalAccount, BridgeExternalAccountDoc };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildBridgeExternalAccount = void 0;
|
|
4
|
+
const buildBridgeExternalAccount = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.BridgeExternalAccount) {
|
|
7
|
+
return mongoose.model("BridgeExternalAccount");
|
|
8
|
+
}
|
|
9
|
+
const bridgeExternalAccountSchema = new mongoose.Schema({
|
|
10
|
+
userId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
bridgeExternalAccountId: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
}, {
|
|
19
|
+
toJSON: {
|
|
20
|
+
transform(doc, ret) {
|
|
21
|
+
ret.id = ret._id.valueOf();
|
|
22
|
+
delete ret._id;
|
|
23
|
+
delete ret.__v;
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
bridgeExternalAccountSchema.statics.build = (attrs) => {
|
|
28
|
+
return new BridgeExternalAccount(attrs);
|
|
29
|
+
};
|
|
30
|
+
const BridgeExternalAccount = mongoose.model("BridgeExternalAccount", bridgeExternalAccountSchema);
|
|
31
|
+
return BridgeExternalAccount;
|
|
32
|
+
};
|
|
33
|
+
exports.buildBridgeExternalAccount = buildBridgeExternalAccount;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.882",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
25
25
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
26
26
|
"@google-cloud/storage": "^6.9.5",
|
|
27
|
-
"@riocrypto/common": "^1.0.
|
|
27
|
+
"@riocrypto/common": "^1.0.757",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|