@riocrypto/common-server 1.0.2469 → 1.0.2471
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.
|
@@ -55,7 +55,7 @@ declare class ClusterClient {
|
|
|
55
55
|
checkBankPayment(orderId: string): Promise<void>;
|
|
56
56
|
checkCryptoPayment(orderId: string): Promise<void>;
|
|
57
57
|
createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
|
|
58
|
-
createAuthWithoutRegistration({ phoneNumber, firstName, lastName, role, permissions, telegramUsername, telegramUserId, slackUsername, }: {
|
|
58
|
+
createAuthWithoutRegistration({ phoneNumber, firstName, lastName, role, permissions, telegramUsername, telegramUserId, slackUsername, email, }: {
|
|
59
59
|
phoneNumber: string;
|
|
60
60
|
firstName: string;
|
|
61
61
|
lastName: string;
|
|
@@ -64,6 +64,7 @@ declare class ClusterClient {
|
|
|
64
64
|
telegramUsername?: string;
|
|
65
65
|
telegramUserId?: string;
|
|
66
66
|
slackUsername?: string;
|
|
67
|
+
email: string;
|
|
67
68
|
}): Promise<Auth>;
|
|
68
69
|
getLiquidityAvailable(): Promise<{
|
|
69
70
|
buy: number;
|
|
@@ -229,13 +229,14 @@ class ClusterClient {
|
|
|
229
229
|
return response.data;
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
|
-
createAuthWithoutRegistration({ phoneNumber, firstName, lastName, role, permissions, telegramUsername, telegramUserId, slackUsername, }) {
|
|
232
|
+
createAuthWithoutRegistration({ phoneNumber, firstName, lastName, role, permissions, telegramUsername, telegramUserId, slackUsername, email, }) {
|
|
233
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
234
234
|
const response = yield this.axios.post(`${this.baseUrl}/api/auth/unregistered`, {
|
|
235
235
|
phoneNumber,
|
|
236
236
|
firstName,
|
|
237
237
|
lastName,
|
|
238
238
|
role,
|
|
239
|
+
email,
|
|
239
240
|
permissions,
|
|
240
241
|
telegram: {
|
|
241
242
|
username: telegramUsername,
|
package/build/index.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ export * from "./models/order-update-request";
|
|
|
95
95
|
export * from "./models/axe";
|
|
96
96
|
export * from "./models/liquidity-reservation";
|
|
97
97
|
export * from "./models/axe-slack-thread";
|
|
98
|
+
export * from "./models/auth-activity-slack-thread";
|
|
98
99
|
export * from "./clients/axios-with-logging";
|
|
99
100
|
export * from "./clients/slack-client";
|
|
100
101
|
export * from "./clients/fireblocks-client";
|
package/build/index.js
CHANGED
|
@@ -111,6 +111,7 @@ __exportStar(require("./models/order-update-request"), exports);
|
|
|
111
111
|
__exportStar(require("./models/axe"), exports);
|
|
112
112
|
__exportStar(require("./models/liquidity-reservation"), exports);
|
|
113
113
|
__exportStar(require("./models/axe-slack-thread"), exports);
|
|
114
|
+
__exportStar(require("./models/auth-activity-slack-thread"), exports);
|
|
114
115
|
__exportStar(require("./clients/axios-with-logging"), exports);
|
|
115
116
|
__exportStar(require("./clients/slack-client"), exports);
|
|
116
117
|
__exportStar(require("./clients/fireblocks-client"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
interface AuthActivitySlackThreadAttrs {
|
|
3
|
+
createdAt: Date;
|
|
4
|
+
authId: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
messageTs?: string;
|
|
7
|
+
channel: string;
|
|
8
|
+
}
|
|
9
|
+
interface AuthActivitySlackThreadDoc extends mongoose.Document {
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
authId: string;
|
|
12
|
+
userId: string;
|
|
13
|
+
messageTs?: string;
|
|
14
|
+
channel: string;
|
|
15
|
+
}
|
|
16
|
+
interface AuthActivitySlackThreadModel extends mongoose.Model<AuthActivitySlackThreadDoc> {
|
|
17
|
+
build(attrs: AuthActivitySlackThreadAttrs): AuthActivitySlackThreadDoc;
|
|
18
|
+
}
|
|
19
|
+
declare const buildAuthActivitySlackThread: (mongoose: typeof mongoose) => AuthActivitySlackThreadModel;
|
|
20
|
+
export { buildAuthActivitySlackThread, AuthActivitySlackThreadDoc, AuthActivitySlackThreadAttrs, };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildAuthActivitySlackThread = void 0;
|
|
4
|
+
const buildAuthActivitySlackThread = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.AuthActivitySlackThread) {
|
|
7
|
+
return mongoose.model("AuthActivitySlackThread");
|
|
8
|
+
}
|
|
9
|
+
const AuthActivitySlackThreadSchema = new mongoose.Schema({
|
|
10
|
+
createdAt: {
|
|
11
|
+
type: mongoose.Schema.Types.Date,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
authId: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
userId: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
messageTs: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: false,
|
|
25
|
+
},
|
|
26
|
+
channel: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
}, {
|
|
31
|
+
toJSON: {
|
|
32
|
+
transform(doc, ret) {
|
|
33
|
+
ret.id = ret._id;
|
|
34
|
+
delete ret._id;
|
|
35
|
+
delete ret.__v;
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
AuthActivitySlackThreadSchema.index({ authId: 1, userId: 1 }, { unique: true });
|
|
40
|
+
AuthActivitySlackThreadSchema.statics.build = (attrs) => {
|
|
41
|
+
return new AuthActivitySlackThread(attrs);
|
|
42
|
+
};
|
|
43
|
+
const AuthActivitySlackThread = mongoose.model("AuthActivitySlackThread", AuthActivitySlackThreadSchema);
|
|
44
|
+
return AuthActivitySlackThread;
|
|
45
|
+
};
|
|
46
|
+
exports.buildAuthActivitySlackThread = buildAuthActivitySlackThread;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2471",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/secret-manager": "^5.3.0",
|
|
29
29
|
"@google-cloud/storage": "^6.9.5",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.7.0",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.2241",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|