@riocrypto/common-server 1.0.2718 → 1.0.2720

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.
@@ -58,7 +58,9 @@ declare class ClusterClient {
58
58
  twoWaySettlementDateOffset?: number;
59
59
  }): Promise<Order>;
60
60
  checkBankPayment(orderId: string): Promise<void>;
61
+ confirmBankPayment(orderId: string, amountFiat: number): Promise<void>;
61
62
  checkCryptoPayment(orderId: string): Promise<void>;
63
+ confirmCryptoPayment(orderId: string, amountCrypto: number): Promise<void>;
62
64
  createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
63
65
  createAuthWithoutRegistration({ phoneNumber, firstName, lastName, role, permissions, telegramUsername, telegramUserId, slackUsername, email, authMethod, }: {
64
66
  phoneNumber?: string;
@@ -170,6 +170,18 @@ class ClusterClient {
170
170
  });
171
171
  });
172
172
  }
173
+ confirmBankPayment(orderId, amountFiat) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ yield this.axios.post(`${this.baseUrl}/api/payments/bank/confirm`, {
176
+ orderId,
177
+ amountFiat,
178
+ }, {
179
+ headers: {
180
+ "x-cluster-api-key": this.clusterApiKey,
181
+ },
182
+ });
183
+ });
184
+ }
173
185
  checkCryptoPayment(orderId) {
174
186
  return __awaiter(this, void 0, void 0, function* () {
175
187
  yield this.axios.post(`${this.baseUrl}/api/payments/crypto/check`, {
@@ -181,6 +193,18 @@ class ClusterClient {
181
193
  });
182
194
  });
183
195
  }
196
+ confirmCryptoPayment(orderId, amountCrypto) {
197
+ return __awaiter(this, void 0, void 0, function* () {
198
+ yield this.axios.post(`${this.baseUrl}/api/payments/crypto/confirm`, {
199
+ orderId,
200
+ amountCrypto,
201
+ }, {
202
+ headers: {
203
+ "x-cluster-api-key": this.clusterApiKey,
204
+ },
205
+ });
206
+ });
207
+ }
184
208
  createBitsoBankAccount(userId) {
185
209
  return __awaiter(this, void 0, void 0, function* () {
186
210
  const response = yield this.axios.post(`${this.baseUrl}/api/bank/accounts/bitso`, {
@@ -1,7 +1,7 @@
1
1
  import { IndicativeQuotePageQuoteConfig } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface IndicativeQuotePageAttrs {
4
- userId: string;
4
+ userId?: string;
5
5
  quotes: IndicativeQuotePageQuoteConfig[];
6
6
  allowedIPs: string[];
7
7
  createdBy: string;
@@ -13,7 +13,7 @@ interface IndicativeQuotePageModel extends Model<IndicativeQuotePageDoc> {
13
13
  }
14
14
  interface IndicativeQuotePageDoc extends Document {
15
15
  _id: string;
16
- userId: string;
16
+ userId?: string;
17
17
  quotes: IndicativeQuotePageQuoteConfig[];
18
18
  allowedIPs: string[];
19
19
  createdBy: string;
@@ -7,6 +7,10 @@ const buildIndicativeQuotePage = (mongoose) => {
7
7
  return mongoose.model("IndicativeQuotePage");
8
8
  }
9
9
  const QuoteConfigSchema = new mongoose.Schema({
10
+ userId: {
11
+ type: String,
12
+ required: true,
13
+ },
10
14
  side: {
11
15
  type: String,
12
16
  required: true,
@@ -52,7 +56,6 @@ const buildIndicativeQuotePage = (mongoose) => {
52
56
  const IndicativeQuotePageSchema = new mongoose.Schema({
53
57
  userId: {
54
58
  type: String,
55
- required: true,
56
59
  },
57
60
  quotes: {
58
61
  type: [QuoteConfigSchema],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2718",
3
+ "version": "1.0.2720",
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.2515",
31
+ "@riocrypto/common": "^1.0.2516",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",