@riocrypto/common-server 1.0.1358 → 1.0.1360

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.
@@ -8,6 +8,7 @@ declare class ClusterClient {
8
8
  getQuote(userId: string, side: Side, country: Country, fiat: Fiat, crypto: Crypto, amountFiat?: number, amountCrypto?: number): Promise<Quote>;
9
9
  getCryptoAddresses(userId: string, crypto: Crypto): Promise<CryptoAddress[]>;
10
10
  createOrder(quoteId: string, cryptoAddress?: string, notes?: string): Promise<Order>;
11
+ confirmPayment(orderId: string): Promise<void>;
11
12
  createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
12
13
  getBalance(asset: Crypto | Fiat): Promise<number>;
13
14
  getTransactionLimits(userId: string): Promise<{
@@ -117,6 +117,17 @@ class ClusterClient {
117
117
  return response.data;
118
118
  });
119
119
  }
120
+ confirmPayment(orderId) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ yield this.axios.post(`${this.baseUrl}/api/payments/bank/check`, {
123
+ orderId,
124
+ }, {
125
+ headers: {
126
+ "x-cluster-api-key": this.clusterApiKey,
127
+ },
128
+ });
129
+ });
130
+ }
120
131
  createBitsoBankAccount(userId) {
121
132
  return __awaiter(this, void 0, void 0, function* () {
122
133
  const response = yield this.axios.post(`${this.baseUrl}/api/bank/accounts/bitso`, {
@@ -24,11 +24,14 @@ interface UserAttrs {
24
24
  cosignerGroupId?: string;
25
25
  legalRepresentative?: string;
26
26
  cpf?: string;
27
+ CPF?: string;
27
28
  language?: Language;
28
29
  attributes?: UserAttribute[];
29
30
  brokerId?: string;
30
31
  curp?: string;
31
32
  ruc?: string;
33
+ CURP?: string;
34
+ RUC?: string;
32
35
  economicActivity?: string;
33
36
  platformFeeRanges?: {
34
37
  MX?: {
@@ -59,6 +62,7 @@ interface UserAttrs {
59
62
  authorizedPhoneNumbers?: string[];
60
63
  notificationUrl?: string;
61
64
  rfc?: string;
65
+ RFC?: string;
62
66
  countriesToInvoice?: Country[];
63
67
  mexicoFiscalRegimenCode?: number;
64
68
  mexicoFiscalName?: string;
@@ -94,6 +98,9 @@ interface UserDoc extends Document {
94
98
  cpf?: string;
95
99
  curp?: string;
96
100
  ruc?: string;
101
+ CPF?: string;
102
+ CURP?: string;
103
+ RUC?: string;
97
104
  economicActivity?: string;
98
105
  birthday?: Date;
99
106
  language?: Language;
@@ -129,6 +136,7 @@ interface UserDoc extends Document {
129
136
  authorizedPhoneNumbers?: string[];
130
137
  notificationUrl?: string;
131
138
  rfc?: string;
139
+ RFC?: string;
132
140
  mexicoFiscalRegimenCode?: number;
133
141
  mexicoFiscalName?: string;
134
142
  taxId?: string;
@@ -87,6 +87,12 @@ const buildUser = (mongoose) => {
87
87
  curp: {
88
88
  type: String,
89
89
  },
90
+ CPF: {
91
+ type: String,
92
+ },
93
+ CURP: {
94
+ type: String,
95
+ },
90
96
  economicActivity: {
91
97
  type: String,
92
98
  },
@@ -311,6 +317,12 @@ const buildUser = (mongoose) => {
311
317
  ruc: {
312
318
  type: String,
313
319
  },
320
+ RFC: {
321
+ type: String,
322
+ },
323
+ RUC: {
324
+ type: String,
325
+ },
314
326
  mexicoFiscalRegimenCode: {
315
327
  type: Number,
316
328
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1358",
3
+ "version": "1.0.1360",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
29
  "@google-cloud/vision": "^4.0.2",
30
- "@riocrypto/common": "^1.0.1195",
30
+ "@riocrypto/common": "^1.0.1200",
31
31
  "@types/express": "^4.17.13",
32
32
  "axios": "^0.27.2",
33
33
  "ccxt": "^3.0.30",