@spritz-finance/service-client 0.2.73 → 0.2.75

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.
@@ -12,6 +12,7 @@ export declare enum UnblockUserStatus {
12
12
  export type CreateUnblockAccountInput = {
13
13
  otp: string;
14
14
  userId: string;
15
+ accountId: string;
15
16
  name: string;
16
17
  accountDetails: {
17
18
  sortCode?: string;
@@ -54,6 +55,33 @@ export type UnblockAccount = {
54
55
  country: string;
55
56
  };
56
57
  };
58
+ export type UnblockPayment = {
59
+ id: string;
60
+ _id: string;
61
+ paymentId: string;
62
+ externalId: UnblockUserStatus;
63
+ userId: string;
64
+ accountId: string;
65
+ subType: string;
66
+ status: string;
67
+ amountCrypto: number;
68
+ transactionHash: string;
69
+ targetAmount: number;
70
+ inputCurrency: string;
71
+ targetCurrency: string;
72
+ targetCurrencyRate: number;
73
+ targetFee: number;
74
+ amountUSD: number;
75
+ usdExchangeRate: number;
76
+ currencyCrypto: string;
77
+ fees: number;
78
+ externalTargetFeeAmount: number;
79
+ internalTargetFeeAmount: number;
80
+ internalFeeAmountUSD: number;
81
+ sendingAddress: number;
82
+ remoteBankAccountUuid: number;
83
+ chain: string;
84
+ };
57
85
  export type UnblockUser = {
58
86
  id: string;
59
87
  _id: string;
@@ -75,4 +103,5 @@ export declare class UnblockServiceClient {
75
103
  }>;
76
104
  createUnblockAccount(input: CreateUnblockAccountInput): Promise<UnblockAccount>;
77
105
  createUnblockUser(input: CreateUnblockUserInput): Promise<UnblockAccount>;
106
+ getUnblockPayment(externalPaymentId: string): Promise<UnblockPayment>;
78
107
  }
@@ -35,5 +35,10 @@ class UnblockServiceClient {
35
35
  .post(`/user`, input)
36
36
  .then((res) => res.data);
37
37
  }
38
+ async getUnblockPayment(externalPaymentId) {
39
+ return this.client
40
+ .get(`/payment/id/${externalPaymentId}`)
41
+ .then((res) => res.data);
42
+ }
38
43
  }
39
44
  exports.UnblockServiceClient = UnblockServiceClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.2.73",
3
+ "version": "0.2.75",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",