@riocrypto/common-server 1.0.1157 → 1.0.1159

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.
@@ -1,7 +1,8 @@
1
1
  import { Country, Fees, Fiat, Crypto, OrderStatus, Processor } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface ChainedOrderAttrs {
4
- userId: string;
4
+ originUserId: string;
5
+ destinationUserId: string;
5
6
  chainedQuoteId: string;
6
7
  crypto: Crypto;
7
8
  originFiat: Fiat;
@@ -20,9 +21,11 @@ interface ChainedOrderAttrs {
20
21
  netPrice: number;
21
22
  createdAt: Date;
22
23
  brokerId?: string;
24
+ notes?: string;
23
25
  }
24
26
  interface ChainedOrderDoc extends Document {
25
- userId: string;
27
+ originUserId: string;
28
+ destinationUserId: string;
26
29
  chainedQuoteId: string;
27
30
  crypto: Crypto;
28
31
  originFiat: Fiat;
@@ -41,6 +44,7 @@ interface ChainedOrderDoc extends Document {
41
44
  netPrice: number;
42
45
  createdAt: Date;
43
46
  brokerId?: string;
47
+ notes?: string;
44
48
  }
45
49
  interface ChainedOrderModel extends Model<ChainedOrderDoc> {
46
50
  build(attrs: ChainedOrderAttrs): ChainedOrderDoc;
@@ -7,7 +7,11 @@ const buildChainedOrder = (mongoose) => {
7
7
  return mongoose.model("ChainedOrder");
8
8
  }
9
9
  const ChainedOrderSchema = new mongoose.Schema({
10
- userId: {
10
+ originUserId: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ destinationUserId: {
11
15
  type: String,
12
16
  required: true,
13
17
  },
@@ -88,6 +92,9 @@ const buildChainedOrder = (mongoose) => {
88
92
  brokerId: {
89
93
  type: String,
90
94
  },
95
+ notes: {
96
+ type: String,
97
+ },
91
98
  createdAt: {
92
99
  type: mongoose.Schema.Types.Date,
93
100
  required: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1157",
3
+ "version": "1.0.1159",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@aws-sdk/client-s3": "^3.297.0",
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
- "@riocrypto/common": "^1.0.1014",
29
+ "@riocrypto/common": "^1.0.1017",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^0.27.2",
32
32
  "ccxt": "^3.0.30",