squarefi-bff-api-module 1.36.46 → 1.36.47

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.
@@ -13,6 +13,19 @@ export declare const frontend: {
13
13
  list: ({ status, ...params }?: API.Frontend.Issuing.Cards.List.Request) => Promise<API.Frontend.Issuing.Cards.List.Response>;
14
14
  deposit: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Deposit.Request) => Promise<API.Frontend.Issuing.Cards.Deposit.Response>;
15
15
  withdraw: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Withdraw.Request) => Promise<API.Frontend.Issuing.Cards.Withdraw.Response>;
16
+ getById: ({ card_id, }: API.Frontend.Issuing.Cards.Get.Request) => Promise<API.Frontend.Issuing.Cards.Get.Response>;
17
+ /** Rename (and other editable card fields). */
18
+ update: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Update.Request) => Promise<API.Frontend.Issuing.Cards.Update.Response>;
19
+ /** Terminal, unlike freeze — a closed card cannot be reopened. */
20
+ close: ({ card_id, }: API.Frontend.Issuing.Cards.Close.Request) => Promise<API.Frontend.Issuing.Cards.Close.Response>;
21
+ freeze: ({ card_id, }: API.Frontend.Issuing.Cards.Freeze.Request) => Promise<API.Frontend.Issuing.Cards.Freeze.Response>;
22
+ unfreeze: ({ card_id, }: API.Frontend.Issuing.Cards.Unfreeze.Request) => Promise<API.Frontend.Issuing.Cards.Unfreeze.Response>;
23
+ limits: {
24
+ update: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Limits.Request) => Promise<API.Frontend.Issuing.Cards.Limits.Response>;
25
+ };
26
+ /** Card PAN/CVV, encrypted for the caller's key. */
27
+ sensitive: ({ card_id, }: API.Frontend.Issuing.Cards.Sensitive.Request) => Promise<API.Frontend.Issuing.Cards.Sensitive.Response>;
28
+ transactions: ({ card_id, ...params }: API.Frontend.Issuing.Cards.Transactions.Request) => Promise<API.Frontend.Issuing.Cards.Transactions.Response>;
16
29
  create: (data: API.Frontend.Issuing.Cards.Create.Request) => Promise<API.Frontend.Issuing.Cards.Create.Response>;
17
30
  };
18
31
  cardholders: {
@@ -32,6 +45,8 @@ export declare const frontend: {
32
45
  subAccounts: {
33
46
  getAll: (params?: API.Frontend.Issuing.SubAccounts.List.Request) => Promise<API.Frontend.Issuing.SubAccounts.List.Response>;
34
47
  getById: ({ sub_account_id, }: API.Frontend.Issuing.SubAccounts.Get.Request) => Promise<API.Frontend.Issuing.SubAccounts.Get.Response>;
48
+ create: (data: API.Frontend.Issuing.SubAccounts.Create.Request) => Promise<API.Frontend.Issuing.SubAccounts.Create.Response>;
49
+ transactions: ({ sub_account_id, ...params }: API.Frontend.Issuing.SubAccounts.Transactions.Request) => Promise<API.Frontend.Issuing.SubAccounts.Transactions.Response>;
35
50
  deposit: ({ sub_account_id, ...data }: API.Frontend.Issuing.SubAccounts.Deposit.Request) => Promise<API.Frontend.Issuing.SubAccounts.Deposit.Response>;
36
51
  withdraw: ({ sub_account_id, ...data }: API.Frontend.Issuing.SubAccounts.Withdraw.Request) => Promise<API.Frontend.Issuing.SubAccounts.Withdraw.Response>;
37
52
  };
@@ -29,6 +29,19 @@ export const frontend = {
29
29
  // first through `cardholders.*` — an unlinked user gets `400 CARDHOLDER_NOT_LINKED`).
30
30
  // Issuing fee / initial top-up follow the group tariff; pass `currency_id` (and optionally
31
31
  // `initial_topup`) whenever the tariff carries money.
32
+ getById: ({ card_id, }) => apiClientV1Frontend.getRequest(`/frontend/issuing/cards/${card_id}`),
33
+ /** Rename (and other editable card fields). */
34
+ update: ({ card_id, ...data }) => apiClientV1Frontend.patchRequest(`/frontend/issuing/cards/${card_id}`, { data }),
35
+ /** Terminal, unlike freeze — a closed card cannot be reopened. */
36
+ close: ({ card_id, }) => apiClientV1Frontend.deleteRequest(`/frontend/issuing/cards/${card_id}`),
37
+ freeze: ({ card_id, }) => apiClientV1Frontend.putRequest(`/frontend/issuing/cards/${card_id}/freeze`),
38
+ unfreeze: ({ card_id, }) => apiClientV1Frontend.putRequest(`/frontend/issuing/cards/${card_id}/unfreeze`),
39
+ limits: {
40
+ update: ({ card_id, ...data }) => apiClientV1Frontend.putRequest(`/frontend/issuing/cards/${card_id}/limits`, { data }),
41
+ },
42
+ /** Card PAN/CVV, encrypted for the caller's key. */
43
+ sensitive: ({ card_id, }) => apiClientV1Frontend.getRequest(`/frontend/issuing/cards/${card_id}/sensitive`),
44
+ transactions: ({ card_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/issuing/cards/${card_id}/transactions`, { params }),
32
45
  create: (data) => apiClientV1Frontend.postRequest('/frontend/issuing/cards', {
33
46
  data,
34
47
  }),
@@ -85,6 +98,8 @@ export const frontend = {
85
98
  // sub-accounts — prefer that over `getById`, whose shape varies with the vendor.
86
99
  getAll: (params = {}) => apiClientV1Frontend.getRequest('/frontend/issuing/sub-accounts', { params }),
87
100
  getById: ({ sub_account_id, }) => apiClientV1Frontend.getRequest(`/frontend/issuing/sub-accounts/${sub_account_id}`),
101
+ create: (data) => apiClientV1Frontend.postRequest('/frontend/issuing/sub-accounts', { data }),
102
+ transactions: ({ sub_account_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/issuing/sub-accounts/${sub_account_id}/transactions`, { params }),
88
103
  deposit: ({ sub_account_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/sub-accounts/${sub_account_id}/deposit`, { data }),
89
104
  // Concurrent withdrawals on the same sub-account are rejected with `409`. The currency is
90
105
  // taken from the sub-account, so only the amount is needed.
@@ -672,6 +672,13 @@ export declare namespace API {
672
672
  }
673
673
  namespace Issuing {
674
674
  type CardsRoot = pathsV1Frontend['/frontend/issuing/cards'];
675
+ type CardRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}'];
676
+ type CardFreezeRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/freeze'];
677
+ type CardUnfreezeRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/unfreeze'];
678
+ type CardLimitsRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/limits'];
679
+ type CardSensitiveRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/sensitive'];
680
+ type CardTransactionsRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/transactions'];
681
+ type SubAccountTransactionsRoot = pathsV1Frontend['/frontend/issuing/sub-accounts/{sub_account_id}/transactions'];
675
682
  type CardDepositRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/deposit'];
676
683
  type CardWithdrawRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/withdraw'];
677
684
  type SubAccountDepositRoot = pathsV1Frontend['/frontend/issuing/sub-accounts/{sub_account_id}/deposit'];
@@ -711,6 +718,17 @@ export declare namespace API {
711
718
  };
712
719
  type Response = SubAccountRoot['get']['responses']['200']['content']['application/json'];
713
720
  }
721
+ export namespace Create {
722
+ type Request = SubAccountsRoot['post']['requestBody']['content']['application/json'];
723
+ type Response = SubAccountsRoot['post']['responses']['201']['content']['application/json'];
724
+ }
725
+ export namespace Transactions {
726
+ type Request = {
727
+ sub_account_id: string;
728
+ } & NonNullable<SubAccountTransactionsRoot['get']['parameters']['query']>;
729
+ type Response = SubAccountTransactionsRoot['get']['responses']['200']['content']['application/json'];
730
+ type Transaction = NonNullable<Response['data']>[number];
731
+ }
714
732
  export namespace Deposit {
715
733
  type Request = {
716
734
  sub_account_id: string;
@@ -731,6 +749,59 @@ export declare namespace API {
731
749
  type Response = CardsRoot['get']['responses']['200']['content']['application/json'];
732
750
  type Card = NonNullable<Response['data']>[number];
733
751
  }
752
+ namespace Get {
753
+ type Request = {
754
+ card_id: string;
755
+ };
756
+ type Response = CardRoot['get']['responses']['200']['content']['application/json'];
757
+ type Card = NonNullable<Response['data']>;
758
+ }
759
+ /** Rename (and other editable card fields). */
760
+ namespace Update {
761
+ type Request = {
762
+ card_id: string;
763
+ } & CardRoot['patch']['requestBody']['content']['application/json'];
764
+ type Response = CardRoot['patch']['responses']['200']['content']['application/json'];
765
+ }
766
+ /** Close the card — terminal, unlike freeze. */
767
+ namespace Close {
768
+ type Request = {
769
+ card_id: string;
770
+ };
771
+ type Response = CardRoot['delete']['responses']['200']['content']['application/json'];
772
+ }
773
+ namespace Freeze {
774
+ type Request = {
775
+ card_id: string;
776
+ };
777
+ type Response = CardFreezeRoot['put']['responses']['200']['content']['application/json'];
778
+ }
779
+ namespace Unfreeze {
780
+ type Request = {
781
+ card_id: string;
782
+ };
783
+ type Response = CardUnfreezeRoot['put']['responses']['200']['content']['application/json'];
784
+ }
785
+ namespace Limits {
786
+ type Request = {
787
+ card_id: string;
788
+ } & CardLimitsRoot['put']['requestBody']['content']['application/json'];
789
+ type Response = CardLimitsRoot['put']['responses']['200']['content']['application/json'];
790
+ }
791
+ /** Card PAN/CVV, encrypted for the caller's key. */
792
+ namespace Sensitive {
793
+ type Request = {
794
+ card_id: string;
795
+ };
796
+ type Response = CardSensitiveRoot['get']['responses']['200']['content']['application/json'];
797
+ }
798
+ namespace Transactions {
799
+ type Request = {
800
+ card_id: string;
801
+ } & NonNullable<CardTransactionsRoot['get']['parameters']['query']>;
802
+ type Response = CardTransactionsRoot['get']['responses']['200']['content']['application/json'];
803
+ type Transaction = NonNullable<Response['data']>[number];
804
+ }
734
805
  namespace Create {
735
806
  type Request = Omit<CardsRoot['post']['requestBody']['content']['application/json'], 'cardholder_id'> & {
736
807
  cardholder_id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.46",
3
+ "version": "1.36.47",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",