@riocrypto/common-server 1.0.2193 → 1.0.2194

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
@@ -83,6 +83,8 @@ export * from "./models/CEP";
83
83
  export * from "./models/fx-sub-trade";
84
84
  export * from "./models/external-trade";
85
85
  export * from "./models/external-trading-algorithm";
86
+ export * from "./models/auth-dashboard-settings";
87
+ export * from "./models/admin-auth-dashboard-settings";
86
88
  export * from "./clients/axios-with-logging";
87
89
  export * from "./clients/slack-client";
88
90
  export * from "./clients/fireblocks-client";
package/build/index.js CHANGED
@@ -99,6 +99,8 @@ __exportStar(require("./models/CEP"), exports);
99
99
  __exportStar(require("./models/fx-sub-trade"), exports);
100
100
  __exportStar(require("./models/external-trade"), exports);
101
101
  __exportStar(require("./models/external-trading-algorithm"), exports);
102
+ __exportStar(require("./models/auth-dashboard-settings"), exports);
103
+ __exportStar(require("./models/admin-auth-dashboard-settings"), exports);
102
104
  __exportStar(require("./clients/axios-with-logging"), exports);
103
105
  __exportStar(require("./clients/slack-client"), exports);
104
106
  __exportStar(require("./clients/fireblocks-client"), exports);
@@ -0,0 +1,14 @@
1
+ import mongoose from "mongoose";
2
+ interface AdminAuthDashboardSettingsAttrs {
3
+ adminAuthId: string;
4
+ hideBackgroundAnimation?: boolean;
5
+ }
6
+ interface AdminAuthDashboardSettingsDoc extends mongoose.Document {
7
+ adminAuthId: string;
8
+ hideBackgroundAnimation?: boolean;
9
+ }
10
+ interface AdminAuthDashboardSettingsModel extends mongoose.Model<AdminAuthDashboardSettingsDoc> {
11
+ build(attrs: AdminAuthDashboardSettingsAttrs): AdminAuthDashboardSettingsDoc;
12
+ }
13
+ declare const buildAdminAuthDashboardSettings: (mongoose: typeof mongoose) => AdminAuthDashboardSettingsModel;
14
+ export { buildAdminAuthDashboardSettings, AdminAuthDashboardSettingsModel, AdminAuthDashboardSettingsAttrs, };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildAdminAuthDashboardSettings = void 0;
4
+ const buildAdminAuthDashboardSettings = (mongoose) => {
5
+ // if model is already defined, return it
6
+ if (mongoose.models.AdminAuthDashboardSettings) {
7
+ return mongoose.model("AdminAuthDashboardSettings");
8
+ }
9
+ const AdminAuthDashboardSettingsSchema = new mongoose.Schema({
10
+ adminAuthId: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ hideBackgroundAnimation: {
15
+ type: Boolean,
16
+ },
17
+ }, {
18
+ toJSON: {
19
+ transform(doc, ret) {
20
+ ret.id = ret._id;
21
+ delete ret._id;
22
+ delete ret.__v;
23
+ },
24
+ },
25
+ });
26
+ AdminAuthDashboardSettingsSchema.statics.build = (attrs) => {
27
+ return new AdminAuthDashboardSettings(attrs);
28
+ };
29
+ const AdminAuthDashboardSettings = mongoose.model("AdminAuthDashboardSettings", AdminAuthDashboardSettingsSchema);
30
+ return AdminAuthDashboardSettings;
31
+ };
32
+ exports.buildAdminAuthDashboardSettings = buildAdminAuthDashboardSettings;
@@ -0,0 +1,14 @@
1
+ import mongoose from "mongoose";
2
+ interface AuthDashboardSettingsAttrs {
3
+ authId: string;
4
+ hideBackgroundAnimation?: boolean;
5
+ }
6
+ interface AuthDashboardSettingsDoc extends mongoose.Document {
7
+ authId: string;
8
+ hideBackgroundAnimation?: boolean;
9
+ }
10
+ interface AuthDashboardSettingsModel extends mongoose.Model<AuthDashboardSettingsDoc> {
11
+ build(attrs: AuthDashboardSettingsAttrs): AuthDashboardSettingsDoc;
12
+ }
13
+ declare const buildAuthDashboardSettings: (mongoose: typeof mongoose) => AuthDashboardSettingsModel;
14
+ export { buildAuthDashboardSettings, AuthDashboardSettingsModel, AuthDashboardSettingsAttrs, };
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildAuthDashboardSettings = void 0;
4
+ const buildAuthDashboardSettings = (mongoose) => {
5
+ // if model is already defined, return it
6
+ if (mongoose.models.AuthDashboardSettings) {
7
+ return mongoose.model("AuthDashboardSettings");
8
+ }
9
+ const AuthDashboardSettingsSchema = new mongoose.Schema({
10
+ authId: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ hideBackgroundAnimation: {
15
+ type: Boolean,
16
+ },
17
+ }, {
18
+ toJSON: {
19
+ transform(doc, ret) {
20
+ ret.id = ret._id;
21
+ delete ret._id;
22
+ delete ret.__v;
23
+ },
24
+ },
25
+ });
26
+ AuthDashboardSettingsSchema.statics.build = (attrs) => {
27
+ return new AuthDashboardSettings(attrs);
28
+ };
29
+ const AuthDashboardSettings = mongoose.model("AuthDashboardSettings", AuthDashboardSettingsSchema);
30
+ return AuthDashboardSettings;
31
+ };
32
+ exports.buildAuthDashboardSettings = buildAuthDashboardSettings;
@@ -2,7 +2,6 @@ import { Blockchain, SettlementTime, Side, TradingMarket } from "@riocrypto/comm
2
2
  import mongoose from "mongoose";
3
3
  interface DashboardSettingsAttrs {
4
4
  userId: string;
5
- hideBackgroundAnimation?: boolean;
6
5
  previousTrade?: {
7
6
  market: TradingMarket;
8
7
  side: Side;
@@ -24,7 +23,6 @@ interface DashboardSettingsAttrs {
24
23
  }
25
24
  interface DashboardSettingsDoc extends mongoose.Document {
26
25
  userId: string;
27
- hideBackgroundAnimation?: boolean;
28
26
  previousTrade?: {
29
27
  market: TradingMarket;
30
28
  side: Side;
@@ -11,9 +11,6 @@ const buildDashboardSettings = (mongoose) => {
11
11
  type: String,
12
12
  required: true,
13
13
  },
14
- hideBackgroundAnimation: {
15
- type: Boolean,
16
- },
17
14
  previousTrade: {
18
15
  type: Object,
19
16
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2193",
3
+ "version": "1.0.2194",
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.1931",
31
+ "@riocrypto/common": "^1.0.1932",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",