@riocrypto/common-server 1.0.1474 → 1.0.1477
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
|
@@ -44,6 +44,7 @@ export * from "./models/circle-payout";
|
|
|
44
44
|
export * from "./models/market-data";
|
|
45
45
|
export * from "./models/telegram-session";
|
|
46
46
|
export * from "./models/ubo";
|
|
47
|
+
export * from "./models/temporary-verification";
|
|
47
48
|
export * from "./clients/bitstamp-client";
|
|
48
49
|
export * from "./clients/ccxt-client";
|
|
49
50
|
export * from "./clients/slack-client";
|
package/build/index.js
CHANGED
|
@@ -60,6 +60,7 @@ __exportStar(require("./models/circle-payout"), exports);
|
|
|
60
60
|
__exportStar(require("./models/market-data"), exports);
|
|
61
61
|
__exportStar(require("./models/telegram-session"), exports);
|
|
62
62
|
__exportStar(require("./models/ubo"), exports);
|
|
63
|
+
__exportStar(require("./models/temporary-verification"), exports);
|
|
63
64
|
__exportStar(require("./clients/bitstamp-client"), exports);
|
|
64
65
|
__exportStar(require("./clients/ccxt-client"), exports);
|
|
65
66
|
__exportStar(require("./clients/slack-client"), exports);
|
package/build/models/auth.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ interface AuthAttrs {
|
|
|
8
8
|
previousPasswords?: string[];
|
|
9
9
|
apiKeys?: APIKey[];
|
|
10
10
|
isDisabled?: boolean;
|
|
11
|
-
temporarySMSVerificationCode?: string;
|
|
12
11
|
authenticator?: {
|
|
13
12
|
secret?: string;
|
|
14
13
|
verified?: boolean;
|
|
@@ -26,7 +25,6 @@ interface AuthDoc extends Document {
|
|
|
26
25
|
previousPasswords?: string[];
|
|
27
26
|
apiKeys?: APIKey[];
|
|
28
27
|
isDisabled?: boolean;
|
|
29
|
-
temporarySMSVerificationCode?: string;
|
|
30
28
|
authenticator?: {
|
|
31
29
|
secret?: string;
|
|
32
30
|
verified?: boolean;
|
package/build/models/auth.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
2
|
+
interface TemporaryVerificationAttrs {
|
|
3
|
+
phoneNumber: string;
|
|
4
|
+
code: string;
|
|
5
|
+
}
|
|
6
|
+
interface TemporaryVerificationDoc extends Document {
|
|
7
|
+
phoneNumber: string;
|
|
8
|
+
code: string;
|
|
9
|
+
}
|
|
10
|
+
interface TemporaryVerificationModel extends Model<TemporaryVerificationDoc> {
|
|
11
|
+
build(attrs: TemporaryVerificationAttrs): TemporaryVerificationDoc;
|
|
12
|
+
}
|
|
13
|
+
declare const buildTemporaryVerification: (mongoose: Mongoose) => TemporaryVerificationModel;
|
|
14
|
+
export { buildTemporaryVerification, TemporaryVerificationDoc };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildTemporaryVerification = void 0;
|
|
4
|
+
const buildTemporaryVerification = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.TemporaryVerification) {
|
|
7
|
+
return mongoose.model("TemporaryVerification");
|
|
8
|
+
}
|
|
9
|
+
const TemporaryVerificationSchema = new mongoose.Schema({
|
|
10
|
+
phoneNumber: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
code: {
|
|
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
|
+
delete ret.code;
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
TemporaryVerificationSchema.statics.build = (attrs) => {
|
|
29
|
+
return new TemporaryVerification(attrs);
|
|
30
|
+
};
|
|
31
|
+
const TemporaryVerification = mongoose.model("TemporaryVerification", TemporaryVerificationSchema);
|
|
32
|
+
return TemporaryVerification;
|
|
33
|
+
};
|
|
34
|
+
exports.buildTemporaryVerification = buildTemporaryVerification;
|