squarefi-bff-api-module 1.32.18 → 1.32.20

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.
@@ -1795,7 +1795,9 @@ export declare namespace API {
1795
1795
  wallet_id: string;
1796
1796
  va_programs_id: string;
1797
1797
  }
1798
- type Response = API.VirtualAccounts.VirtualAccount.VirtualAccountDetailItem;
1798
+ type Response = {
1799
+ id: string;
1800
+ };
1799
1801
  }
1800
1802
  namespace GetByUuid {
1801
1803
  interface Request {
@@ -2090,14 +2092,26 @@ export declare namespace API {
2090
2092
  type Response = WalletChain;
2091
2093
  }
2092
2094
  }
2093
- interface Wallet {
2094
- uuid: string;
2095
- type: WalletType | string;
2096
- created_at: string;
2097
- fiat_total: number;
2098
- crypto_total: number;
2099
- total_amount: number;
2100
- balance: WalletBalance;
2095
+ namespace Wallet {
2096
+ interface Wallet {
2097
+ uuid: string;
2098
+ type: WalletType | string;
2099
+ created_at: string;
2100
+ fiat_total: number;
2101
+ crypto_total: number;
2102
+ total_amount: number;
2103
+ balance: WalletBalance;
2104
+ }
2105
+ namespace Create {
2106
+ interface Request {
2107
+ type: WalletType;
2108
+ }
2109
+ type Response = operations['WalletsController_create']['responses']['200']['content']['application/json'];
2110
+ }
2111
+ namespace GetByUuid {
2112
+ type Request = operations['WalletsController_view']['parameters']['path'];
2113
+ type Response = operations['WalletsController_view']['responses']['200']['content']['application/json'];
2114
+ }
2101
2115
  }
2102
2116
  namespace WalletsList {
2103
2117
  interface WalletsListItem {
@@ -1,6 +1,6 @@
1
1
  import { API } from './types/types';
2
2
  export declare const virtualAccounts: {
3
- create: (data: API.VirtualAccounts.Create.Request) => Promise<API.VirtualAccounts.VirtualAccount.VirtualAccountDetailItem>;
3
+ create: (data: API.VirtualAccounts.Create.Request) => Promise<API.VirtualAccounts.Create.Response>;
4
4
  getAll: ({ wallet_uuid, ...params }: API.VirtualAccounts.GetAll.Request) => Promise<API.VirtualAccounts.GetAll.Response>;
5
5
  getByUuid: ({ uuid }: API.VirtualAccounts.GetByUuid.Request) => Promise<API.VirtualAccounts.VirtualAccount.VirtualAccountDetailItem>;
6
6
  programs: {
@@ -1,9 +1,8 @@
1
1
  import { API } from './types/types';
2
- import { WalletTypeValues } from '../constants';
3
2
  export declare const wallets: {
4
- create: (type: WalletTypeValues) => Promise<void>;
3
+ create: (data: API.Wallets.Wallet.Create.Request) => Promise<API.Wallets.Wallet.Create.Response>;
5
4
  getAll: (params?: API.Wallets.WalletsList.Request) => Promise<API.Wallets.WalletsList.Response>;
6
- getByUuid: (uuid: string) => Promise<API.Wallets.Wallet>;
5
+ getByUuid: ({ wallet_id }: API.Wallets.Wallet.GetByUuid.Request) => Promise<API.Wallets.Wallet.GetByUuid.Response>;
7
6
  addresses: {
8
7
  create: (data: API.Wallets.WalletChain.Create.Request) => Promise<API.Wallets.WalletChain.Create.Response>;
9
8
  get: {
@@ -1,9 +1,9 @@
1
1
  import { apiClientV2 } from '../utils/apiClientFactory';
2
2
  import { defaultPaginationParams } from '../constants';
3
3
  export const wallets = {
4
- create: (type) => apiClientV2.postRequest('/wallets', { data: { type } }),
4
+ create: (data) => apiClientV2.postRequest('/wallets', { data }),
5
5
  getAll: (params) => apiClientV2.getRequest('/wallets', { params }),
6
- getByUuid: (uuid) => apiClientV2.getRequest(`/wallets/${uuid}`),
6
+ getByUuid: ({ wallet_id }) => apiClientV2.getRequest(`/wallets/${wallet_id}`),
7
7
  addresses: {
8
8
  create: (data) => {
9
9
  const { wallet_uuid, chain, label } = data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.32.18",
3
+ "version": "1.32.20",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",