@riocrypto/common-server 1.0.1689 → 1.0.1691
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
|
@@ -59,6 +59,7 @@ export * from "./models/bank-account-verification";
|
|
|
59
59
|
export * from "./models/coincover-transaction";
|
|
60
60
|
export * from "./models/coinbase-order";
|
|
61
61
|
export * from "./models/multipart-liquidity-order";
|
|
62
|
+
export * from "./models/onboarding";
|
|
62
63
|
export * from "./clients/axios-with-logging";
|
|
63
64
|
export * from "./clients/slack-client";
|
|
64
65
|
export * from "./clients/fireblocks-client";
|
package/build/index.js
CHANGED
|
@@ -75,6 +75,7 @@ __exportStar(require("./models/bank-account-verification"), exports);
|
|
|
75
75
|
__exportStar(require("./models/coincover-transaction"), exports);
|
|
76
76
|
__exportStar(require("./models/coinbase-order"), exports);
|
|
77
77
|
__exportStar(require("./models/multipart-liquidity-order"), exports);
|
|
78
|
+
__exportStar(require("./models/onboarding"), exports);
|
|
78
79
|
__exportStar(require("./clients/axios-with-logging"), exports);
|
|
79
80
|
__exportStar(require("./clients/slack-client"), exports);
|
|
80
81
|
__exportStar(require("./clients/fireblocks-client"), exports);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Crypto } from "@riocrypto/common";
|
|
1
2
|
import mongoose from "mongoose";
|
|
2
3
|
interface FireblocksVaultAttrs {
|
|
3
4
|
userId: string;
|
|
@@ -6,7 +7,10 @@ interface FireblocksVaultAttrs {
|
|
|
6
7
|
depositAddresses?: {
|
|
7
8
|
[key: string]: string;
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
+
activeOrders?: {
|
|
11
|
+
orderId: string;
|
|
12
|
+
crypto: Crypto;
|
|
13
|
+
}[];
|
|
10
14
|
}
|
|
11
15
|
interface FireblocksVaultDoc extends mongoose.Document {
|
|
12
16
|
userId: string;
|
|
@@ -15,7 +19,10 @@ interface FireblocksVaultDoc extends mongoose.Document {
|
|
|
15
19
|
depositAddresses?: {
|
|
16
20
|
[key: string]: string;
|
|
17
21
|
};
|
|
18
|
-
|
|
22
|
+
activeOrders?: {
|
|
23
|
+
orderId: string;
|
|
24
|
+
crypto: Crypto;
|
|
25
|
+
}[];
|
|
19
26
|
}
|
|
20
27
|
interface FireblocksVaultModel extends mongoose.Model<FireblocksVaultDoc> {
|
|
21
28
|
build(attrs: FireblocksVaultAttrs): FireblocksVaultDoc;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
interface OnboardingAttrs {
|
|
3
|
+
brokerId?: string;
|
|
4
|
+
authId?: string;
|
|
5
|
+
aiPriseId: string;
|
|
6
|
+
status: "approved" | "declined" | "pending" | "review" | "error";
|
|
7
|
+
}
|
|
8
|
+
interface OnboardingDoc extends mongoose.Document {
|
|
9
|
+
brokerId?: string;
|
|
10
|
+
authId?: string;
|
|
11
|
+
aiPriseId: string;
|
|
12
|
+
status: "approved" | "declined" | "pending" | "review" | "error";
|
|
13
|
+
}
|
|
14
|
+
interface OnboardingModel extends mongoose.Model<OnboardingDoc> {
|
|
15
|
+
build(attrs: OnboardingAttrs): OnboardingDoc;
|
|
16
|
+
}
|
|
17
|
+
declare const buildOnboarding: (mongoose: typeof mongoose) => OnboardingModel;
|
|
18
|
+
export { buildOnboarding, OnboardingDoc, OnboardingAttrs };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildOnboarding = void 0;
|
|
4
|
+
const buildOnboarding = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.Onboarding) {
|
|
7
|
+
return mongoose.model("Onboarding");
|
|
8
|
+
}
|
|
9
|
+
const OnboardingSchema = new mongoose.Schema({
|
|
10
|
+
brokerId: {
|
|
11
|
+
type: String,
|
|
12
|
+
},
|
|
13
|
+
authId: {
|
|
14
|
+
type: String,
|
|
15
|
+
},
|
|
16
|
+
aiPriseId: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
result: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: true,
|
|
23
|
+
},
|
|
24
|
+
}, {
|
|
25
|
+
toJSON: {
|
|
26
|
+
transform(doc, ret) {
|
|
27
|
+
ret.id = ret._id;
|
|
28
|
+
delete ret._id;
|
|
29
|
+
delete ret.__v;
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
OnboardingSchema.statics.build = (attrs) => {
|
|
34
|
+
return new Onboarding(attrs);
|
|
35
|
+
};
|
|
36
|
+
const Onboarding = mongoose.model("Onboarding", OnboardingSchema);
|
|
37
|
+
return Onboarding;
|
|
38
|
+
};
|
|
39
|
+
exports.buildOnboarding = buildOnboarding;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1691",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@google-cloud/secret-manager": "^5.3.0",
|
|
27
27
|
"@google-cloud/storage": "^6.9.5",
|
|
28
28
|
"@hyperdx/node-opentelemetry": "^0.4.2",
|
|
29
|
-
"@riocrypto/common": "^1.0.
|
|
29
|
+
"@riocrypto/common": "^1.0.1485",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^1.6.0",
|
|
32
32
|
"crypto-js": "^4.2.0",
|