@riocrypto/common-server 1.0.1776 → 1.0.1778

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.
@@ -6,7 +6,7 @@ const buildCCXTOrder = (mongoose) => {
6
6
  if (mongoose.models.CCXTOrder) {
7
7
  return mongoose.model("CCXTOrder");
8
8
  }
9
- const CCXTOrderSchema = new mongoose.Schema({
9
+ const CCXTGenericOrderSchema = new mongoose.Schema({
10
10
  orderId: {
11
11
  type: String,
12
12
  required: true,
@@ -28,10 +28,10 @@ const buildCCXTOrder = (mongoose) => {
28
28
  },
29
29
  },
30
30
  });
31
- CCXTOrderSchema.statics.build = (attrs) => {
31
+ CCXTGenericOrderSchema.statics.build = (attrs) => {
32
32
  return new CCXTOrder(attrs);
33
33
  };
34
- const CCXTOrder = mongoose.model("CCXTOrder", CCXTOrderSchema);
34
+ const CCXTOrder = mongoose.model("CCXTOrder", CCXTGenericOrderSchema);
35
35
  return CCXTOrder;
36
36
  };
37
37
  exports.buildCCXTOrder = buildCCXTOrder;
@@ -17,6 +17,7 @@ interface ChainedQuoteAttrs {
17
17
  price: number;
18
18
  createdAt: Date;
19
19
  brokerId?: string;
20
+ netPrice?: number;
20
21
  }
21
22
  interface ChainedQuoteDoc extends Document {
22
23
  originUserId: string;
@@ -35,6 +36,7 @@ interface ChainedQuoteDoc extends Document {
35
36
  price: number;
36
37
  createdAt: Date;
37
38
  brokerId?: string;
39
+ netPrice?: number;
38
40
  }
39
41
  interface ChainedQuoteModel extends Model<ChainedQuoteDoc> {
40
42
  build(attrs: ChainedQuoteAttrs): ChainedQuoteDoc;
@@ -78,6 +78,9 @@ const buildChainedQuote = (mongoose) => {
78
78
  type: mongoose.Schema.Types.Date,
79
79
  required: true,
80
80
  },
81
+ netPrice: {
82
+ type: Number,
83
+ },
81
84
  }, {
82
85
  toJSON: {
83
86
  transform(doc, ret) {
@@ -42,6 +42,7 @@ interface OrderAttrs {
42
42
  exchangeRateOrders?: ExchangeRateOrder[];
43
43
  autoFXDisabled?: boolean;
44
44
  USBankTransferMethod?: "wire" | "ach_push";
45
+ isAfterHours?: boolean;
45
46
  }
46
47
  interface OrderDoc extends Document {
47
48
  quoteId: string;
@@ -85,6 +86,7 @@ interface OrderDoc extends Document {
85
86
  exchangeRateOrders?: ExchangeRateOrder[];
86
87
  autoFXDisabled?: boolean;
87
88
  USBankTransferMethod?: "wire" | "ach_push";
89
+ isAfterHours?: boolean;
88
90
  }
89
91
  interface OrderModel extends Model<OrderDoc> {
90
92
  build(attrs: OrderAttrs): OrderDoc;
@@ -175,6 +175,9 @@ const buildOrder = (mongoose) => {
175
175
  USBankTransferMethod: {
176
176
  type: String,
177
177
  },
178
+ isAfterHours: {
179
+ type: Boolean,
180
+ },
178
181
  exchangeRateOrders: [
179
182
  {
180
183
  amount: {
@@ -29,6 +29,8 @@ interface QuoteAttrs {
29
29
  markup?: number;
30
30
  USBankTransferMethod?: "wire" | "ach_push";
31
31
  isBid?: boolean;
32
+ isAfterHours?: boolean;
33
+ netPrice?: number;
32
34
  }
33
35
  interface QuoteDoc extends Document {
34
36
  userId: string;
@@ -59,6 +61,8 @@ interface QuoteDoc extends Document {
59
61
  markup?: number;
60
62
  USBankTransferMethod?: "wire" | "ach_push";
61
63
  isBid?: boolean;
64
+ isAfterHours?: boolean;
65
+ netPrice?: number;
62
66
  }
63
67
  interface QuoteModel extends Model<QuoteDoc> {
64
68
  build(attrs: QuoteAttrs): QuoteDoc;
@@ -58,6 +58,9 @@ const buildQuote = (mongoose) => {
58
58
  depositAddress: {
59
59
  type: String,
60
60
  },
61
+ isAfterHours: {
62
+ type: Boolean,
63
+ },
61
64
  fees: {
62
65
  processingFeeFiat: {
63
66
  type: Number,
@@ -120,6 +123,9 @@ const buildQuote = (mongoose) => {
120
123
  USBankTransferMethod: {
121
124
  type: String,
122
125
  },
126
+ netPrice: {
127
+ type: Number,
128
+ },
123
129
  }, {
124
130
  toJSON: {
125
131
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1776",
3
+ "version": "1.0.1778",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@google-cloud/secret-manager": "^5.3.0",
27
27
  "@google-cloud/storage": "^6.9.5",
28
28
  "@hyperdx/node-opentelemetry": "^0.4.2",
29
- "@riocrypto/common": "^1.0.1572",
29
+ "@riocrypto/common": "^1.0.1573",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^1.6.0",
32
32
  "crypto-js": "^4.2.0",