squarefi-bff-api-module 1.36.34 → 1.36.36

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.
@@ -10,6 +10,7 @@ export declare const frontend: {
10
10
  };
11
11
  issuing: {
12
12
  cards: {
13
+ list: ({ status, ...params }?: API.Frontend.Issuing.Cards.List.Request) => Promise<API.Frontend.Issuing.Cards.List.Response>;
13
14
  deposit: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Deposit.Request) => Promise<API.Frontend.Issuing.Cards.Deposit.Response>;
14
15
  withdraw: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Withdraw.Request) => Promise<API.Frontend.Issuing.Cards.Withdraw.Response>;
15
16
  };
@@ -8,12 +8,18 @@ export const frontend = {
8
8
  revoke: (key_id) => apiClientV1.deleteRequest(`/frontend/access/keys/${key_id}`),
9
9
  },
10
10
  },
11
- // Card money movement. Both card-level methods are thin wrappers the backend resolves to the
12
- // card's sub-account, so they share the sub-account order types, validation and program routing.
13
- // All four require the ADMIN role on the owning wallet — the card's wallet for `cards.*`, the
14
- // sub-account's wallet for `subAccounts.*`.
11
+ // Card money movement (`deposit` / `withdraw`). Both card-level methods are thin wrappers the
12
+ // backend resolves to the card's sub-account, so they share the sub-account order types,
13
+ // validation and program routing. All four require the ADMIN role on the owning wallet — the
14
+ // card's wallet for `cards.*`, the sub-account's wallet for `subAccounts.*`.
15
15
  issuing: {
16
16
  cards: {
17
+ // `status` is a comma-separated list on the wire (`status=ACTIVE,FROZEN`). The spec types it as
18
+ // an array, which axios would default-serialize to `status[]=ACTIVE&status[]=FROZEN` — a form
19
+ // the endpoint does not parse — so join it here and keep the array in the public type.
20
+ list: ({ status, ...params } = {}) => apiClientV1Frontend.getRequest('/frontend/issuing/cards', {
21
+ params: status?.length ? { ...params, status: status.join(',') } : params,
22
+ }),
17
23
  deposit: ({ card_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/cards/${card_id}/deposit`, { data }),
18
24
  withdraw: ({ card_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/cards/${card_id}/withdraw`, { data }),
19
25
  },