@riocrypto/common-server 1.0.2388 → 1.0.2390

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,4 +1,4 @@
1
- import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, PaymentSettlementType, PayoutSettlementType } from "@riocrypto/common";
1
+ import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, FutureSettlementType } from "@riocrypto/common";
2
2
  declare class ClusterClient {
3
3
  private baseUrl;
4
4
  private clusterApiKey;
@@ -10,7 +10,7 @@ declare class ClusterClient {
10
10
  newAmountCrypto?: number;
11
11
  useSamePrice?: boolean;
12
12
  }): Promise<Quote>;
13
- createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, paymentSettlementType, payoutSettlementType, netPrice, price, ignoreLiquidityError, }: {
13
+ createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, futureSettlementType, netPrice, price, ignoreLiquidityError, }: {
14
14
  userId: string;
15
15
  side: Side;
16
16
  country: Country;
@@ -19,8 +19,8 @@ declare class ClusterClient {
19
19
  amountFiat?: number;
20
20
  amountCrypto?: number;
21
21
  USBankTransferMethod?: "ach_push" | "wire";
22
- paymentSettlementType?: PaymentSettlementType;
23
- payoutSettlementType?: PayoutSettlementType;
22
+ deferredPaymentType?: DeferredPaymentType;
23
+ futureSettlementType?: FutureSettlementType;
24
24
  netPrice?: number;
25
25
  price?: number;
26
26
  ignoreLiquidityError?: boolean;
@@ -74,7 +74,7 @@ class ClusterClient {
74
74
  return response.data.quote;
75
75
  });
76
76
  }
77
- createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, paymentSettlementType, payoutSettlementType, netPrice, price, ignoreLiquidityError, }) {
77
+ createQuote({ userId, side, country, fiat, crypto, amountFiat, amountCrypto, USBankTransferMethod, deferredPaymentType, futureSettlementType, netPrice, price, ignoreLiquidityError, }) {
78
78
  return __awaiter(this, void 0, void 0, function* () {
79
79
  const response = yield this.axios.post(`${this.baseUrl}/api/quotes`, {
80
80
  userId,
@@ -85,8 +85,8 @@ class ClusterClient {
85
85
  amountCrypto,
86
86
  country,
87
87
  USBankTransferMethod,
88
- paymentSettlementType,
89
- payoutSettlementType,
88
+ deferredPaymentType,
89
+ futureSettlementType,
90
90
  netPrice,
91
91
  price,
92
92
  ignoreLiquidityError,
@@ -1,4 +1,4 @@
1
- import { Blockchain, PaymentSettlementType, PayoutSettlementType, Side, TradingMarket } from "@riocrypto/common";
1
+ import { Blockchain, DeferredPaymentType, FutureSettlementType, Side, TradingMarket } from "@riocrypto/common";
2
2
  import mongoose from "mongoose";
3
3
  interface DashboardSettingsAttrs {
4
4
  userId: string;
@@ -15,8 +15,8 @@ interface DashboardSettingsAttrs {
15
15
  destinationBankAccountId?: string;
16
16
  destinationWalletId?: string;
17
17
  originWalletId?: string;
18
- paymentSettlementType?: PaymentSettlementType;
19
- payoutSettlementType?: PayoutSettlementType;
18
+ deferredPaymentType?: DeferredPaymentType;
19
+ futureSettlementType?: FutureSettlementType;
20
20
  originUSBankTransferMethod?: "ach_push" | "wire";
21
21
  destinationUSBankTransferMethod?: "ach_push" | "wire";
22
22
  };
@@ -37,8 +37,8 @@ interface DashboardSettingsDoc extends mongoose.Document {
37
37
  destinationBankAccountId?: string;
38
38
  destinationWalletId?: string;
39
39
  originWalletId?: string;
40
- paymentSettlementType?: PaymentSettlementType;
41
- payoutSettlementType?: PayoutSettlementType;
40
+ deferredPaymentType?: DeferredPaymentType;
41
+ futureSettlementType?: FutureSettlementType;
42
42
  originUSBankTransferMethod?: "ach_push" | "wire";
43
43
  destinationUSBankTransferMethod?: "ach_push" | "wire";
44
44
  };
@@ -1,4 +1,4 @@
1
- import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute, PaymentSettlementType, PayoutSettlementType } from "@riocrypto/common";
1
+ import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, OrderAttribute, DeferredPaymentType, FutureSettlementType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface OrderAttrs {
4
4
  quoteId: string;
@@ -56,8 +56,8 @@ interface OrderAttrs {
56
56
  amount: number;
57
57
  };
58
58
  attributes?: OrderAttribute[];
59
- paymentSettlementType: PaymentSettlementType;
60
- payoutSettlementType: PayoutSettlementType;
59
+ deferredPaymentType: DeferredPaymentType;
60
+ futureSettlementType: FutureSettlementType;
61
61
  destinationOfFunds?: {
62
62
  blockchainAddress?: string;
63
63
  accountHolderName?: string;
@@ -182,8 +182,8 @@ interface OrderDoc extends Document {
182
182
  amount: number;
183
183
  };
184
184
  attributes?: OrderAttribute[];
185
- paymentSettlementType: PaymentSettlementType;
186
- payoutSettlementType: PayoutSettlementType;
185
+ deferredPaymentType: DeferredPaymentType;
186
+ futureSettlementType: FutureSettlementType;
187
187
  destinationOfFunds?: {
188
188
  blockchainAddress?: string;
189
189
  accountHolderName?: string;
@@ -238,10 +238,10 @@ const buildOrder = (mongoose) => {
238
238
  type: Number,
239
239
  },
240
240
  },
241
- paymentSettlementType: {
241
+ deferredPaymentType: {
242
242
  type: String,
243
243
  },
244
- payoutSettlementType: {
244
+ futureSettlementType: {
245
245
  type: String,
246
246
  },
247
247
  attributes: [
@@ -1,4 +1,4 @@
1
- import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto, PaymentSettlementType, PayoutSettlementType } from "@riocrypto/common";
1
+ import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto, DeferredPaymentType, FutureSettlementType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface QuoteAttrs {
4
4
  userId: string;
@@ -34,8 +34,8 @@ interface QuoteAttrs {
34
34
  netPrice: number;
35
35
  requestedNetPrice?: number;
36
36
  paymentDueDate: Date;
37
- paymentSettlementType: PaymentSettlementType;
38
- payoutSettlementType: PayoutSettlementType;
37
+ deferredPaymentType: DeferredPaymentType;
38
+ futureSettlementType: FutureSettlementType;
39
39
  }
40
40
  interface QuoteDoc extends Document {
41
41
  userId: string;
@@ -71,8 +71,8 @@ interface QuoteDoc extends Document {
71
71
  netPrice: number;
72
72
  requestedNetPrice?: number;
73
73
  paymentDueDate: Date;
74
- paymentSettlementType: PaymentSettlementType;
75
- payoutSettlementType: PayoutSettlementType;
74
+ deferredPaymentType: DeferredPaymentType;
75
+ futureSettlementType: FutureSettlementType;
76
76
  }
77
77
  interface QuoteModel extends Model<QuoteDoc> {
78
78
  build(attrs: QuoteAttrs): QuoteDoc;
@@ -135,10 +135,10 @@ const buildQuote = (mongoose) => {
135
135
  paymentDueDate: {
136
136
  type: mongoose.Schema.Types.Date,
137
137
  },
138
- paymentSettlementType: {
138
+ deferredPaymentType: {
139
139
  type: String,
140
140
  },
141
- payoutSettlementType: {
141
+ futureSettlementType: {
142
142
  type: String,
143
143
  },
144
144
  }, {
@@ -1,4 +1,4 @@
1
- import { Country, Fiat, Side, Crypto, PayoutSettlementType, PaymentSettlementType } from "@riocrypto/common";
1
+ import { Country, Fiat, Side, Crypto, FutureSettlementType, DeferredPaymentType } from "@riocrypto/common";
2
2
  import mongoose from "mongoose";
3
3
  interface TelegramSessionAttrs {
4
4
  createdAt: Date;
@@ -18,8 +18,8 @@ interface TelegramSessionAttrs {
18
18
  country?: Country;
19
19
  quoteMode?: "fiat" | "crypto";
20
20
  USBankTransferMethod?: "ach_push" | "wire";
21
- paymentSettlementType?: PaymentSettlementType;
22
- payoutSettlementType?: PayoutSettlementType;
21
+ deferredPaymentType?: DeferredPaymentType;
22
+ futureSettlementType?: FutureSettlementType;
23
23
  };
24
24
  quoteId?: string;
25
25
  orderId?: string;
@@ -44,8 +44,8 @@ interface TelegramSessionDoc extends mongoose.Document {
44
44
  country?: Country;
45
45
  quoteMode?: "fiat" | "crypto";
46
46
  USBankTransferMethod?: "ach_push" | "wire";
47
- paymentSettlementType?: PaymentSettlementType;
48
- payoutSettlementType?: PayoutSettlementType;
47
+ deferredPaymentType?: DeferredPaymentType;
48
+ futureSettlementType?: FutureSettlementType;
49
49
  };
50
50
  quoteId?: string;
51
51
  orderId?: string;
@@ -63,10 +63,10 @@ const buildTelegramSession = (mongoose) => {
63
63
  quoteMode: {
64
64
  type: String,
65
65
  },
66
- paymentSettlementType: {
66
+ deferredPaymentType: {
67
67
  type: String,
68
68
  },
69
- payoutSettlementType: {
69
+ futureSettlementType: {
70
70
  type: String,
71
71
  },
72
72
  },
@@ -1,4 +1,4 @@
1
- import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, Country, Fiat, Side, Crypto, PayoutSettlementType, PaymentSettlementType } from "@riocrypto/common";
1
+ import { OnboardingStatus, PlatformFeeRange, UserAttribute, UserType, CountryOfOrigin, Country, Fiat, Side, Crypto, FutureSettlementType, DeferredPaymentType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface UserAttrs {
4
4
  createdAt: Date;
@@ -139,50 +139,50 @@ interface UserDoc extends Document {
139
139
  buy?: PlatformFeeRange[];
140
140
  sell?: PlatformFeeRange[];
141
141
  deferredPaymentFee?: {
142
- [paymentSettlementType in PaymentSettlementType]: number;
142
+ [deferredPaymentType in DeferredPaymentType]: number;
143
143
  };
144
144
  futureSettlementFee?: {
145
- [payoutSettlementType in PayoutSettlementType]: number;
145
+ [futureSettlementType in FutureSettlementType]: number;
146
146
  };
147
147
  };
148
148
  PE?: {
149
149
  buy?: PlatformFeeRange[];
150
150
  sell?: PlatformFeeRange[];
151
151
  deferredPaymentFee?: {
152
- [paymentSettlementType in PaymentSettlementType]: number;
152
+ [deferredPaymentType in DeferredPaymentType]: number;
153
153
  };
154
154
  futureSettlementFee?: {
155
- [payoutSettlementType in PayoutSettlementType]: number;
155
+ [futureSettlementType in FutureSettlementType]: number;
156
156
  };
157
157
  };
158
158
  CO?: {
159
159
  buy?: PlatformFeeRange[];
160
160
  sell?: PlatformFeeRange[];
161
161
  deferredPaymentFee?: {
162
- [paymentSettlementType in PaymentSettlementType]: number;
162
+ [deferredPaymentType in DeferredPaymentType]: number;
163
163
  };
164
164
  futureSettlementFee?: {
165
- [payoutSettlementType in PayoutSettlementType]: number;
165
+ [futureSettlementType in FutureSettlementType]: number;
166
166
  };
167
167
  };
168
168
  BR?: {
169
169
  buy?: PlatformFeeRange[];
170
170
  sell?: PlatformFeeRange[];
171
171
  deferredPaymentFee?: {
172
- [paymentSettlementType in PaymentSettlementType]: number;
172
+ [deferredPaymentType in DeferredPaymentType]: number;
173
173
  };
174
174
  futureSettlementFee?: {
175
- [payoutSettlementType in PayoutSettlementType]: number;
175
+ [futureSettlementType in FutureSettlementType]: number;
176
176
  };
177
177
  };
178
178
  US?: {
179
179
  buy?: PlatformFeeRange[];
180
180
  sell?: PlatformFeeRange[];
181
181
  deferredPaymentFee?: {
182
- [paymentSettlementType in PaymentSettlementType]: number;
182
+ [deferredPaymentType in DeferredPaymentType]: number;
183
183
  };
184
184
  futureSettlementFee?: {
185
- [payoutSettlementType in PayoutSettlementType]: number;
185
+ [futureSettlementType in FutureSettlementType]: number;
186
186
  };
187
187
  };
188
188
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2388",
3
+ "version": "1.0.2390",
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.2114",
31
+ "@riocrypto/common": "^1.0.2117",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",