@riocrypto/common-server 1.0.2932 → 1.0.2933

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,9 +1,17 @@
1
1
  import { Fiat, Side, Crypto, ExternalTradeType, ExternalTradingProvider, ExternalTradeStatus, ExternalTradeAmountType, EmarketsSettlementType, LmaxOrderType, LmaxSide, LmaxTimeInForce } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document, HydratedDocument } from "mongoose";
3
+ interface ExternalTradeImportMeta {
4
+ fileName?: string;
5
+ importedBy?: string;
6
+ importedAt: Date;
7
+ providerOrderIdIsSynthetic?: boolean;
8
+ sourceRow?: Record<string, string>;
9
+ }
3
10
  interface ExternalTradeAttrs {
4
11
  createdAt: Date;
5
12
  providerOrderId?: string;
6
13
  tradeKey?: string;
14
+ valueDate?: string;
7
15
  type: ExternalTradeType;
8
16
  side: Side;
9
17
  provider: ExternalTradingProvider;
@@ -72,11 +80,13 @@ interface ExternalTradeAttrs {
72
80
  externalTradingAlgorithmId?: string;
73
81
  arbitrageSessionId?: string;
74
82
  isImported?: boolean;
83
+ importMeta?: ExternalTradeImportMeta;
75
84
  }
76
85
  interface ExternalTradeDoc extends Document {
77
86
  createdAt: Date;
78
87
  providerOrderId?: string;
79
88
  tradeKey?: string;
89
+ valueDate?: string;
80
90
  type: ExternalTradeType;
81
91
  side: Side;
82
92
  amountType: ExternalTradeAmountType;
@@ -146,9 +156,10 @@ interface ExternalTradeDoc extends Document {
146
156
  externalTradingAlgorithmId?: string;
147
157
  arbitrageSessionId?: string;
148
158
  isImported?: boolean;
159
+ importMeta?: ExternalTradeImportMeta;
149
160
  }
150
161
  interface ExternalTradeModel extends Model<ExternalTradeDoc> {
151
162
  build(attrs: ExternalTradeAttrs): HydratedDocument<ExternalTradeDoc>;
152
163
  }
153
164
  declare const buildExternalTrade: (mongoose: Mongoose) => ExternalTradeModel;
154
- export { buildExternalTrade, ExternalTradeDoc, ExternalTradeAttrs };
165
+ export { buildExternalTrade, ExternalTradeDoc, ExternalTradeAttrs, ExternalTradeImportMeta, };
@@ -17,6 +17,9 @@ const buildExternalTrade = (mongoose) => {
17
17
  tradeKey: {
18
18
  type: String,
19
19
  },
20
+ valueDate: {
21
+ type: String,
22
+ },
20
23
  requestedAmountType: {
21
24
  type: String,
22
25
  required: true,
@@ -90,6 +93,9 @@ const buildExternalTrade = (mongoose) => {
90
93
  type: Boolean,
91
94
  default: false,
92
95
  },
96
+ importMeta: {
97
+ type: Object,
98
+ },
93
99
  }, {
94
100
  toJSON: {
95
101
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2932",
3
+ "version": "1.0.2933",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",