@riocrypto/common-server 1.0.2281 → 1.0.2282

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.
@@ -117,6 +117,10 @@ interface OrderAttrs {
117
117
  feeCurrency?: Crypto | Fiat;
118
118
  sentAt: Date;
119
119
  }[];
120
+ informationalFees?: {
121
+ serviceFeeFiat?: number;
122
+ serviceFeeFiatTax?: number;
123
+ };
120
124
  }
121
125
  interface OrderDoc extends Document {
122
126
  quoteId: string;
@@ -234,6 +238,10 @@ interface OrderDoc extends Document {
234
238
  payoutTransferLimit?: number;
235
239
  paymentReceivedAt?: Date;
236
240
  version: number;
241
+ informationalFees?: {
242
+ serviceFeeFiat?: number;
243
+ serviceFeeFiatTax?: number;
244
+ };
237
245
  }
238
246
  interface OrderModel extends Model<OrderDoc> {
239
247
  build(attrs: OrderAttrs): OrderDoc;
@@ -308,6 +308,14 @@ const buildOrder = (mongoose) => {
308
308
  type: Object,
309
309
  },
310
310
  ],
311
+ informationalFees: {
312
+ serviceFeeFiat: {
313
+ type: Number,
314
+ },
315
+ serviceFeeFiatTax: {
316
+ type: Number,
317
+ },
318
+ },
311
319
  }, {
312
320
  toJSON: {
313
321
  transform(doc, ret) {
@@ -1,4 +1,4 @@
1
- import { Fiat, FXProvider } from "@riocrypto/common";
1
+ import { Country, Fiat, FXProvider, Side } from "@riocrypto/common";
2
2
  import mongoose from "mongoose";
3
3
  interface RioSettingsAttrs {
4
4
  platformFee: number;
@@ -31,6 +31,11 @@ interface RioSettingsAttrs {
31
31
  sellOrderAutomaticFXTradeLimit: {
32
32
  [key in Fiat]: number;
33
33
  };
34
+ defaultServiceFee: {
35
+ [key in Country]?: {
36
+ [key in Side]?: number;
37
+ };
38
+ };
34
39
  additionalBuyOrderLiquidityUSD?: number;
35
40
  additionalSellOrderLiquidityUSD?: number;
36
41
  previousDayUSDMXNConversionRate?: number;
@@ -79,6 +84,11 @@ interface RioSettingsDoc extends mongoose.Document {
79
84
  additionalBuyOrderLiquidityUSD?: number;
80
85
  additionalSellOrderLiquidityUSD?: number;
81
86
  previousDayUSDMXNConversionRate?: number;
87
+ defaultServiceFee: {
88
+ [key in Country]?: {
89
+ [key in Side]?: number;
90
+ };
91
+ };
82
92
  fxProviders: {
83
93
  [key in FXProvider]: {
84
94
  enabled: boolean;
@@ -56,6 +56,9 @@ const buildRioSettings = (mongoose) => {
56
56
  fxExecutionThreshold: {
57
57
  type: Number,
58
58
  },
59
+ defaultServiceFee: {
60
+ type: Object,
61
+ },
59
62
  }, {
60
63
  toJSON: {
61
64
  transform(doc, ret) {
@@ -1,4 +1,4 @@
1
- import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, RiskTier, ImmigrationStatus, Country, Fiat } from "@riocrypto/common";
1
+ import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, RiskTier, ImmigrationStatus, Country, Fiat, Side } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface UserAttrs {
4
4
  createdAt: Date;
@@ -124,6 +124,11 @@ interface UserAttrs {
124
124
  };
125
125
  };
126
126
  attioRecordId?: string;
127
+ serviceFee?: {
128
+ [country in Country]?: {
129
+ [side in Side]?: number;
130
+ };
131
+ };
127
132
  }
128
133
  interface UserModel extends Model<UserDoc> {
129
134
  build(attrs: UserAttrs): UserDoc;
@@ -253,6 +258,11 @@ interface UserDoc extends Document {
253
258
  };
254
259
  };
255
260
  };
261
+ serviceFee?: {
262
+ [country in Country]?: {
263
+ [side in Side]?: number;
264
+ };
265
+ };
256
266
  }
257
267
  declare const buildUser: (mongoose: Mongoose) => UserModel;
258
268
  export { buildUser, UserDoc, UserAttrs };
@@ -271,7 +271,12 @@ const buildUser = (mongoose) => {
271
271
  referrerId: {
272
272
  type: String,
273
273
  },
274
- onboarding: Object,
274
+ serviceFee: {
275
+ type: Object,
276
+ },
277
+ onboarding: {
278
+ type: Object,
279
+ },
275
280
  invoicing: {
276
281
  MX: {
277
282
  shouldInvoice: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2281",
3
+ "version": "1.0.2282",
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.1996",
31
+ "@riocrypto/common": "^1.0.1999",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",