squarefi-bff-api-module 1.36.45 → 1.36.46
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.
package/dist/api/frontend.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare const frontend: {
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
subAccounts: {
|
|
33
|
+
getAll: (params?: API.Frontend.Issuing.SubAccounts.List.Request) => Promise<API.Frontend.Issuing.SubAccounts.List.Response>;
|
|
34
|
+
getById: ({ sub_account_id, }: API.Frontend.Issuing.SubAccounts.Get.Request) => Promise<API.Frontend.Issuing.SubAccounts.Get.Response>;
|
|
33
35
|
deposit: ({ sub_account_id, ...data }: API.Frontend.Issuing.SubAccounts.Deposit.Request) => Promise<API.Frontend.Issuing.SubAccounts.Deposit.Response>;
|
|
34
36
|
withdraw: ({ sub_account_id, ...data }: API.Frontend.Issuing.SubAccounts.Withdraw.Request) => Promise<API.Frontend.Issuing.SubAccounts.Withdraw.Response>;
|
|
35
37
|
};
|
package/dist/api/frontend.js
CHANGED
|
@@ -80,6 +80,11 @@ export const frontend = {
|
|
|
80
80
|
},
|
|
81
81
|
},
|
|
82
82
|
subAccounts: {
|
|
83
|
+
// Local-first list (`fiat_accounts` + computed balances + the program embed with its
|
|
84
|
+
// cardholder KYC bar). `ids` (comma-separated) makes it a targeted read of specific
|
|
85
|
+
// sub-accounts — prefer that over `getById`, whose shape varies with the vendor.
|
|
86
|
+
getAll: (params = {}) => apiClientV1Frontend.getRequest('/frontend/issuing/sub-accounts', { params }),
|
|
87
|
+
getById: ({ sub_account_id, }) => apiClientV1Frontend.getRequest(`/frontend/issuing/sub-accounts/${sub_account_id}`),
|
|
83
88
|
deposit: ({ sub_account_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/sub-accounts/${sub_account_id}/deposit`, { data }),
|
|
84
89
|
// Concurrent withdrawals on the same sub-account are rejected with `409`. The currency is
|
|
85
90
|
// taken from the sub-account, so only the amount is needed.
|
|
@@ -3129,6 +3129,10 @@ export interface paths {
|
|
|
3129
3129
|
wallet_id?: string;
|
|
3130
3130
|
/** @description Filter sub-accounts by program ID */
|
|
3131
3131
|
program_id?: string;
|
|
3132
|
+
/** @description Comma-separated sub-account ids to fetch (targeted read through the list shape) */
|
|
3133
|
+
ids?: string;
|
|
3134
|
+
/** @description Filter sub-accounts by type */
|
|
3135
|
+
type?: "balance" | "prepaid";
|
|
3132
3136
|
/** @description Filter sub-accounts by status */
|
|
3133
3137
|
status?: "ACTIVE" | "INACTIVE" | "SUSPENDED";
|
|
3134
3138
|
/** @description Number of items to skip */
|
|
@@ -691,18 +691,39 @@ export declare namespace API {
|
|
|
691
691
|
};
|
|
692
692
|
};
|
|
693
693
|
export namespace SubAccounts {
|
|
694
|
-
|
|
694
|
+
type SubAccountsRoot = pathsV1Frontend['/frontend/issuing/sub-accounts'];
|
|
695
|
+
type SubAccountRoot = pathsV1Frontend['/frontend/issuing/sub-accounts/{sub_account_id}'];
|
|
696
|
+
export namespace List {
|
|
697
|
+
/** `ids` is comma-separated — a targeted read of specific sub-accounts through the list shape. */
|
|
698
|
+
type Request = NonNullable<SubAccountsRoot['get']['parameters']['query']>;
|
|
699
|
+
type Response = SubAccountsRoot['get']['responses']['200']['content']['application/json'];
|
|
700
|
+
/**
|
|
701
|
+
* A `fiat_accounts` row enriched with computed balances, currency and the program embed.
|
|
702
|
+
* `issuing_program.cardholder_requirements` carries the program's cardholder KYC bar even
|
|
703
|
+
* when the program is hidden from the caller's config listing (rail visibility, group
|
|
704
|
+
* whitelist) — the sub-account payload is the one place it can always be read from.
|
|
705
|
+
*/
|
|
706
|
+
type SubAccount = NonNullable<Response['data']>[number];
|
|
707
|
+
}
|
|
708
|
+
export namespace Get {
|
|
709
|
+
type Request = {
|
|
710
|
+
sub_account_id: string;
|
|
711
|
+
};
|
|
712
|
+
type Response = SubAccountRoot['get']['responses']['200']['content']['application/json'];
|
|
713
|
+
}
|
|
714
|
+
export namespace Deposit {
|
|
695
715
|
type Request = {
|
|
696
716
|
sub_account_id: string;
|
|
697
717
|
} & SubAccountDepositRoot['post']['requestBody']['content']['application/json'];
|
|
698
718
|
type Response = WithOrderStatus<SubAccountDepositRoot['post']['responses']['200']['content']['application/json']>;
|
|
699
719
|
}
|
|
700
|
-
namespace Withdraw {
|
|
720
|
+
export namespace Withdraw {
|
|
701
721
|
type Request = {
|
|
702
722
|
sub_account_id: string;
|
|
703
723
|
} & SubAccountWithdrawRoot['post']['requestBody']['content']['application/json'];
|
|
704
724
|
type Response = WithOrderStatus<SubAccountWithdrawRoot['post']['responses']['200']['content']['application/json']>;
|
|
705
725
|
}
|
|
726
|
+
export {};
|
|
706
727
|
}
|
|
707
728
|
export namespace Cards {
|
|
708
729
|
namespace List {
|