@riocrypto/common-server 1.0.2465 → 1.0.2467
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.
|
@@ -2,6 +2,7 @@ import { Country, Fiat, Side, Crypto, TwoWaySettlementType, DeferredPaymentType
|
|
|
2
2
|
import mongoose from "mongoose";
|
|
3
3
|
interface TelegramSessionAttrs {
|
|
4
4
|
createdAt: Date;
|
|
5
|
+
userId?: string;
|
|
5
6
|
telegramUsername?: string;
|
|
6
7
|
telegramUserId?: number;
|
|
7
8
|
telegramChatId: number;
|
|
@@ -29,6 +30,7 @@ interface TelegramSessionAttrs {
|
|
|
29
30
|
}
|
|
30
31
|
interface TelegramSessionDoc extends mongoose.Document {
|
|
31
32
|
createdAt: Date;
|
|
33
|
+
userId?: string;
|
|
32
34
|
telegramUsername?: string;
|
|
33
35
|
telegramUserId?: number;
|
|
34
36
|
telegramChatId: number;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Mongoose, Model, Document } from "mongoose";
|
|
2
2
|
interface WebhookRegistrationAttrs {
|
|
3
|
+
createdAt: Date;
|
|
3
4
|
userId: string;
|
|
4
5
|
brokerId?: string;
|
|
5
6
|
type: "users" | "orders" | "bank-accounts";
|
|
6
7
|
url: string;
|
|
7
8
|
encryptedSharedSecret: string;
|
|
9
|
+
retryOnFailure?: boolean;
|
|
8
10
|
}
|
|
9
11
|
interface WebhookRegistrationDoc extends Document {
|
|
12
|
+
createdAt: Date;
|
|
10
13
|
userId: string;
|
|
11
14
|
brokerId?: string;
|
|
12
15
|
type: "users" | "orders" | "bank-accounts";
|
|
13
16
|
url: string;
|
|
14
17
|
encryptedSharedSecret: string;
|
|
18
|
+
retryOnFailure?: boolean;
|
|
15
19
|
}
|
|
16
20
|
interface WebhookRegistrationModel extends Model<WebhookRegistrationDoc> {
|
|
17
21
|
build(attrs: WebhookRegistrationAttrs): WebhookRegistrationDoc;
|
|
@@ -7,6 +7,10 @@ const buildWebhookRegistration = (mongoose) => {
|
|
|
7
7
|
return mongoose.model("WebhookRegistration");
|
|
8
8
|
}
|
|
9
9
|
const WebhookRegistrationSchema = new mongoose.Schema({
|
|
10
|
+
createdAt: {
|
|
11
|
+
type: Date,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
10
14
|
userId: {
|
|
11
15
|
type: String,
|
|
12
16
|
required: true,
|
|
@@ -26,6 +30,9 @@ const buildWebhookRegistration = (mongoose) => {
|
|
|
26
30
|
type: String,
|
|
27
31
|
required: true,
|
|
28
32
|
},
|
|
33
|
+
retryOnFailure: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
},
|
|
29
36
|
}, {
|
|
30
37
|
toJSON: {
|
|
31
38
|
transform(doc, ret) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2467",
|
|
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.2230",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|