squarefi-bff-api-module 1.36.70 → 1.36.71

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.
@@ -62,6 +62,14 @@ export declare const frontend: {
62
62
  };
63
63
  };
64
64
  };
65
+ virtualAccounts: {
66
+ getAll: ({ wallet_id, ...params }: API.Frontend.VirtualAccounts.List.Request) => Promise<API.Frontend.VirtualAccounts.List.Response>;
67
+ getById: ({ id, ...params }: API.Frontend.VirtualAccounts.Get.Request) => Promise<API.Frontend.VirtualAccounts.Get.Response>;
68
+ create: ({ wallet_id, ...data }: API.Frontend.VirtualAccounts.Create.Request) => Promise<API.Frontend.VirtualAccounts.Create.Response>;
69
+ programs: {
70
+ getAll: ({ wallet_id, ...params }: API.Frontend.VirtualAccounts.Programs.List.Request) => Promise<API.Frontend.VirtualAccounts.Programs.List.Response>;
71
+ };
72
+ };
65
73
  reference: {
66
74
  exchangeRates: {
67
75
  list: (params?: API.Frontend.Reference.ExchangeRates.List.Request) => Promise<API.Frontend.Reference.ExchangeRates.List.Response>;
@@ -131,6 +131,18 @@ export const frontend = {
131
131
  },
132
132
  },
133
133
  },
134
+ // Frontend twin of `virtualAccounts.*` (legacy `/virtual_account`). On a KYC tenant reads need the wallet's KYC
135
+ // APPROVED or HOLD and `create` needs APPROVED — otherwise `403 KYC_REQUIREMENTS_NOT_MET`.
136
+ virtualAccounts: {
137
+ getAll: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/virtual-accounts/wallet/${wallet_id}`, { params }),
138
+ getById: ({ id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/virtual-accounts/${id}`, {
139
+ params,
140
+ }),
141
+ create: ({ wallet_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/virtual-accounts/wallet/${wallet_id}`, { data }),
142
+ programs: {
143
+ getAll: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/virtual-accounts/programs/wallet/${wallet_id}`, { params }),
144
+ },
145
+ },
134
146
  reference: {
135
147
  // Frontend twin of `exchange.byOrderType.*` (legacy `GET /exchange/`): the same tenant pairs, but paged in
136
148
  // memory — 50 per page by default, 500 at most, in no particular order — and behind the bearer session.
@@ -751,6 +751,56 @@ export declare namespace API {
751
751
  }
752
752
  }
753
753
  }
754
+ namespace VirtualAccounts {
755
+ type WalletAccountsRoot = pathsV1Frontend['/frontend/virtual-accounts/wallet/{wallet_id}'];
756
+ type AccountRoot = pathsV1Frontend['/frontend/virtual-accounts/{id}'];
757
+ type WalletProgramsRoot = pathsV1Frontend['/frontend/virtual-accounts/programs/wallet/{wallet_id}'];
758
+ type Pagination = componentsV1Frontend['schemas']['PaginationResponse'];
759
+ export namespace List {
760
+ type Request = WalletAccountsRoot['get']['parameters']['path'] & NonNullable<WalletAccountsRoot['get']['parameters']['query']>;
761
+ type Response = {
762
+ success: boolean;
763
+ data: API.VirtualAccounts.VirtualAccount.VirtualAccountListItem[];
764
+ pagination: Pagination;
765
+ };
766
+ }
767
+ export namespace Create {
768
+ type Request = WalletAccountsRoot['post']['parameters']['path'] & WalletAccountsRoot['post']['requestBody']['content']['application/json'];
769
+ interface PendingActivation {
770
+ status: 'pending';
771
+ vendor_account_id?: string;
772
+ vendor_status?: string;
773
+ account_id?: string;
774
+ message?: string;
775
+ }
776
+ type Response = {
777
+ success: boolean;
778
+ data: API.VirtualAccounts.Create.Response | PendingActivation;
779
+ message: string;
780
+ };
781
+ }
782
+ export namespace Get {
783
+ type Request = AccountRoot['get']['parameters']['path'] & NonNullable<AccountRoot['get']['parameters']['query']>;
784
+ type Response = {
785
+ success: boolean;
786
+ data: API.VirtualAccounts.VirtualAccount.VirtualAccountDetailItem;
787
+ };
788
+ }
789
+ export namespace Programs {
790
+ namespace List {
791
+ type Request = WalletProgramsRoot['get']['parameters']['path'] & NonNullable<WalletProgramsRoot['get']['parameters']['query']>;
792
+ type Response = {
793
+ success: boolean;
794
+ data: API.VirtualAccounts.Programs.Program[];
795
+ pagination: Pagination;
796
+ meta: {
797
+ total_count: number;
798
+ };
799
+ };
800
+ }
801
+ }
802
+ export {};
803
+ }
754
804
  namespace Reference {
755
805
  namespace ExchangeRates {
756
806
  type ExchangeRatesRoot = pathsV1Frontend['/frontend/reference/exchange_rates'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.70",
3
+ "version": "1.36.71",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",