@spritz-finance/service-client 0.2.53 → 0.2.55

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.
@@ -200,6 +200,7 @@ export declare class LiabilitiesServiceClient {
200
200
  getVirtualCardTransactions(cardExternalId: string, userId: string): Promise<CardTransaction[]>;
201
201
  canUserMakeTestPayment(userId: string): Promise<boolean>;
202
202
  createDirectPayment(args: CreateDirectPaymentArgs): Promise<DirectPayment>;
203
+ validateDirectPayment(args: CreateDirectPaymentArgs): Promise<DirectPayment>;
203
204
  getValidPaymentsForAccount(accountId: string): Promise<Payment[]>;
204
205
  }
205
206
  export {};
@@ -87,6 +87,14 @@ class LiabilitiesServiceClient {
87
87
  .post(`/direct-payments`, args)
88
88
  .then((res) => res.data);
89
89
  }
90
+ async validateDirectPayment(args) {
91
+ return this.client
92
+ .post(`/direct-payments`, {
93
+ ...args,
94
+ validateOnly: true,
95
+ })
96
+ .then((res) => res.data);
97
+ }
90
98
  async getValidPaymentsForAccount(accountId) {
91
99
  return this.client
92
100
  .get(`/payments/valid-payments/account/${accountId}`)
@@ -1,9 +1,13 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  declare type VerificationModuleStatus = 'UNAVAILABLE' | 'UNINITIALIZED' | 'RETRY' | 'INITIALIZED' | 'ACTIVE' | 'FAILED' | 'DISABLED';
3
- declare type PayableType = {
3
+ declare type BankAccountPayableType = {
4
+ type: string;
5
+ };
6
+ declare type BillPayableType = {
4
7
  country: string;
8
+ };
9
+ declare type VCCPayableType = {
5
10
  type: string;
6
- provider: string;
7
11
  };
8
12
  export declare type Verification = {
9
13
  id: string;
@@ -31,15 +35,15 @@ export declare type Verification = {
31
35
  };
32
36
  bankAccount: {
33
37
  status: VerificationModuleStatus;
34
- payableTypes: PayableType[];
38
+ payableTypes: BankAccountPayableType[];
35
39
  };
36
40
  bills: {
37
41
  status: VerificationModuleStatus;
38
- payableTypes: PayableType[];
42
+ payableTypes: BillPayableType[];
39
43
  };
40
44
  virtualCard: {
41
45
  status: VerificationModuleStatus;
42
- availableCardTypes: PayableType[];
46
+ availableCardTypes: VCCPayableType[];
43
47
  };
44
48
  };
45
49
  declare type User = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.2.53",
3
+ "version": "0.2.55",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",