@riocrypto/common-server 1.0.2446 → 1.0.2447
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
|
@@ -94,6 +94,7 @@ export * from "./models/custom-rate-limit";
|
|
|
94
94
|
export * from "./models/order-update-request";
|
|
95
95
|
export * from "./models/axe";
|
|
96
96
|
export * from "./models/liquidity-reservation";
|
|
97
|
+
export * from "./models/axe-slack-thread";
|
|
97
98
|
export * from "./clients/axios-with-logging";
|
|
98
99
|
export * from "./clients/slack-client";
|
|
99
100
|
export * from "./clients/fireblocks-client";
|
package/build/index.js
CHANGED
|
@@ -110,6 +110,7 @@ __exportStar(require("./models/custom-rate-limit"), exports);
|
|
|
110
110
|
__exportStar(require("./models/order-update-request"), exports);
|
|
111
111
|
__exportStar(require("./models/axe"), exports);
|
|
112
112
|
__exportStar(require("./models/liquidity-reservation"), exports);
|
|
113
|
+
__exportStar(require("./models/axe-slack-thread"), exports);
|
|
113
114
|
__exportStar(require("./clients/axios-with-logging"), exports);
|
|
114
115
|
__exportStar(require("./clients/slack-client"), exports);
|
|
115
116
|
__exportStar(require("./clients/fireblocks-client"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
interface AxeSlackThreadAttrs {
|
|
3
|
+
createdAt: Date;
|
|
4
|
+
axeId: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
messageTs: string;
|
|
7
|
+
channel: string;
|
|
8
|
+
}
|
|
9
|
+
interface AxeSlackThreadDoc extends mongoose.Document {
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
axeId: string;
|
|
12
|
+
userId: string;
|
|
13
|
+
messageTs: string;
|
|
14
|
+
channel: string;
|
|
15
|
+
}
|
|
16
|
+
interface AxeSlackThreadModel extends mongoose.Model<AxeSlackThreadDoc> {
|
|
17
|
+
build(attrs: AxeSlackThreadAttrs): AxeSlackThreadDoc;
|
|
18
|
+
}
|
|
19
|
+
declare const buildAxeSlackThread: (mongoose: typeof mongoose) => AxeSlackThreadModel;
|
|
20
|
+
export { buildAxeSlackThread, AxeSlackThreadDoc, AxeSlackThreadAttrs };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildAxeSlackThread = void 0;
|
|
4
|
+
const buildAxeSlackThread = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.AxeSlackThread) {
|
|
7
|
+
return mongoose.model("AxeSlackThread");
|
|
8
|
+
}
|
|
9
|
+
const AxeSlackThreadSchema = new mongoose.Schema({
|
|
10
|
+
createdAt: {
|
|
11
|
+
type: mongoose.Schema.Types.Date,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
axeId: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
userId: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
messageTs: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true,
|
|
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
|
+
AxeSlackThreadSchema.index({ axeId: 1, userId: 1 }, { unique: true });
|
|
40
|
+
AxeSlackThreadSchema.statics.build = (attrs) => {
|
|
41
|
+
return new AxeSlackThread(attrs);
|
|
42
|
+
};
|
|
43
|
+
const AxeSlackThread = mongoose.model("AxeSlackThread", AxeSlackThreadSchema);
|
|
44
|
+
return AxeSlackThread;
|
|
45
|
+
};
|
|
46
|
+
exports.buildAxeSlackThread = buildAxeSlackThread;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2447",
|
|
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.2210",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|