@riocrypto/common-server 1.0.1474 → 1.0.1475
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-code";
|
|
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-code"), 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 TemporaryVerificationCodeAttrs {
|
|
3
|
+
phoneNumber: string;
|
|
4
|
+
code: string;
|
|
5
|
+
}
|
|
6
|
+
interface TemporaryVerificationCodeDoc extends Document {
|
|
7
|
+
phoneNumber: string;
|
|
8
|
+
code: string;
|
|
9
|
+
}
|
|
10
|
+
interface TemporaryVerificationCodeModel extends Model<TemporaryVerificationCodeDoc> {
|
|
11
|
+
build(attrs: TemporaryVerificationCodeAttrs): TemporaryVerificationCodeDoc;
|
|
12
|
+
}
|
|
13
|
+
declare const buildTemporaryVerificationCode: (mongoose: Mongoose) => TemporaryVerificationCodeModel;
|
|
14
|
+
export { buildTemporaryVerificationCode, TemporaryVerificationCodeDoc };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildTemporaryVerificationCode = void 0;
|
|
4
|
+
const buildTemporaryVerificationCode = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.TemporaryVerificationCode) {
|
|
7
|
+
return mongoose.model("TemporaryVerificationCode");
|
|
8
|
+
}
|
|
9
|
+
const TemporaryVerificationCodeSchema = 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
|
+
TemporaryVerificationCodeSchema.statics.build = (attrs) => {
|
|
29
|
+
return new TemporaryVerificationCode(attrs);
|
|
30
|
+
};
|
|
31
|
+
const TemporaryVerificationCode = mongoose.model("TemporaryVerificationCode", TemporaryVerificationCodeSchema);
|
|
32
|
+
return TemporaryVerificationCode;
|
|
33
|
+
};
|
|
34
|
+
exports.buildTemporaryVerificationCode = buildTemporaryVerificationCode;
|