@riocrypto/common-server 1.0.2563 → 1.0.2565

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, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, Pay
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface OrderAttrs {
4
4
  quoteId: string;
5
+ clientReferenceId?: string;
5
6
  type: OrderType;
6
7
  userId: string;
7
8
  crypto: Crypto;
@@ -137,6 +138,7 @@ interface OrderAttrs {
137
138
  }
138
139
  interface OrderDoc extends Document {
139
140
  quoteId: string;
141
+ clientReferenceId?: string;
140
142
  type: OrderType;
141
143
  userId: string;
142
144
  status: OrderStatus;
@@ -11,6 +11,9 @@ const buildOrder = (mongoose) => {
11
11
  quoteId: {
12
12
  type: String,
13
13
  },
14
+ clientReferenceId: {
15
+ type: String,
16
+ },
14
17
  type: {
15
18
  type: String,
16
19
  },
@@ -119,27 +119,6 @@ interface UserAttrs {
119
119
  };
120
120
  };
121
121
  };
122
- marketConfig?: {
123
- [key in Fiat]?: {
124
- isAfterHours?: boolean;
125
- afterHoursEndsAt?: string;
126
- afterHoursExchangeRateMarkup?: number;
127
- buyOrderGeneralExchangeRateMarkup?: number;
128
- sellOrderGeneralExchangeRateMarkup?: number;
129
- };
130
- };
131
- marketConfigHistory?: Array<{
132
- timestamp: Date;
133
- marketConfig: {
134
- [key in Fiat]?: {
135
- isAfterHours?: boolean;
136
- afterHoursEndsAt?: string;
137
- afterHoursExchangeRateMarkup?: number;
138
- buyOrderGeneralExchangeRateMarkup?: number;
139
- sellOrderGeneralExchangeRateMarkup?: number;
140
- };
141
- };
142
- }>;
143
122
  }
144
123
  interface UserModel extends Model<UserDoc> {
145
124
  build(attrs: UserAttrs): UserDoc;
@@ -293,27 +272,6 @@ interface UserDoc extends Document {
293
272
  };
294
273
  };
295
274
  };
296
- marketConfig?: {
297
- [key in Fiat]?: {
298
- isAfterHours?: boolean;
299
- afterHoursEndsAt?: string;
300
- afterHoursExchangeRateMarkup?: number;
301
- buyOrderGeneralExchangeRateMarkup?: number;
302
- sellOrderGeneralExchangeRateMarkup?: number;
303
- };
304
- };
305
- marketConfigHistory?: Array<{
306
- timestamp: Date;
307
- marketConfig: {
308
- [key in Fiat]?: {
309
- isAfterHours?: boolean;
310
- afterHoursEndsAt?: string;
311
- afterHoursExchangeRateMarkup?: number;
312
- buyOrderGeneralExchangeRateMarkup?: number;
313
- sellOrderGeneralExchangeRateMarkup?: number;
314
- };
315
- };
316
- }>;
317
275
  }
318
276
  declare const buildUser: (mongoose: Mongoose) => UserModel;
319
277
  export { buildUser, UserDoc, UserAttrs };
@@ -352,21 +352,6 @@ const buildUser = (mongoose) => {
352
352
  TWAP: {
353
353
  type: Object,
354
354
  },
355
- marketConfig: {
356
- type: Object,
357
- },
358
- marketConfigHistory: [
359
- {
360
- timestamp: {
361
- type: Date,
362
- required: true,
363
- },
364
- marketConfig: {
365
- type: Object,
366
- required: true,
367
- },
368
- },
369
- ],
370
355
  }, {
371
356
  toJSON: {
372
357
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2563",
3
+ "version": "1.0.2565",
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.2358",
31
+ "@riocrypto/common": "^1.0.2361",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",