@riocrypto/common-server 1.0.2470 → 1.0.2472

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
@@ -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;
@@ -53,7 +53,7 @@ interface OrderAttrs {
53
53
  payoutBankAccountId?: string;
54
54
  bulkCryptoPaymentId?: string;
55
55
  bulkBankPaymentId?: string;
56
- rioPayoutFireblocksVaultId: string;
56
+ rioPayoutFireblocksVaultId?: string;
57
57
  binancePayment?: {
58
58
  binanceTransactionId: string;
59
59
  amount: number;
@@ -181,7 +181,7 @@ interface OrderDoc extends Document {
181
181
  netPrice: number;
182
182
  requestedNetPrice?: number;
183
183
  payoutAddressId?: string;
184
- rioPayoutFireblocksVaultId: string;
184
+ rioPayoutFireblocksVaultId?: string;
185
185
  payoutBankAccountId?: string;
186
186
  bulkCryptoPaymentId?: string;
187
187
  bulkBankPaymentId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2470",
3
+ "version": "1.0.2472",
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.2232",
31
+ "@riocrypto/common": "^1.0.2243",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",