@spritz-finance/service-client 0.2.40 → 0.2.42

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,6 +1,6 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import { CheckbookCardResponse } from './liabilitiesServiceClient';
3
- import { AccountProvider, AccountSyncStatus, BankAccount, Bill, BillType, PayableAccountInstitution, PayableAccountOriginator, PayableAccountType, VirtualCard } from './lib/graphClient/generated';
3
+ import { AccountProvider, AccountSyncStatus, BankAccount, Bill, BillType, PayableAccountInstitution as GraphInstitution, PayableAccountOriginator, PayableAccountType, VirtualCard } from './lib/graphClient/generated';
4
4
  export { PayableAccountOriginator, AccountSyncStatus, } from './lib/graphClient/generated';
5
5
  export declare enum BankAccountSubType {
6
6
  Business = "BUSINESS",
@@ -63,6 +63,9 @@ export declare type PayableAccount = BankAcountModel | VirtualCardModel | BillMo
63
63
  export declare type PayableAccountBankAccount = BankAcountModel;
64
64
  export declare type PayableAccountVirtualCard = VirtualCardModel;
65
65
  export declare type PayableAccountBill = BillModel;
66
+ export declare type PayableAccountInstitution = GraphInstitution & {
67
+ identificationNumber: string;
68
+ };
66
69
  export declare class PayableAccountsServiceClient {
67
70
  client: AxiosInstance;
68
71
  constructor();
@@ -73,6 +76,7 @@ export declare class PayableAccountsServiceClient {
73
76
  renameAccount(accountId: string, name: String): Promise<BillModel | BankAcountModel | VirtualCardModel>;
74
77
  getAccounts(accountIds: string[]): Promise<PayableAccount[]>;
75
78
  getAccountInstitutions(institutionIds: string[]): Promise<PayableAccountInstitution[]>;
79
+ getAccountInstitution(institutionId: string): Promise<PayableAccountInstitution>;
76
80
  createFromCheckbook(input: CheckbookAccountInput): Promise<BankAcountModel>;
77
81
  createCardFromCheckbook(input: CheckbookCardResponse): Promise<VirtualCardModel>;
78
82
  getVirtualCardDetails(accountId: string): Promise<VirtualCardDetails>;
@@ -53,6 +53,11 @@ class PayableAccountsServiceClient {
53
53
  .get(`/account-institutions?institutionIds=${institutionIds.join(',')}`)
54
54
  .then((res) => res.data);
55
55
  }
56
+ async getAccountInstitution(institutionId) {
57
+ return this.client
58
+ .get(`/account-institution/id/${institutionId}`)
59
+ .then((res) => res.data);
60
+ }
56
61
  async createFromCheckbook(input) {
57
62
  return this.client
58
63
  .post(`/create-from-checkbook`, input)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.2.40",
3
+ "version": "0.2.42",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",