squarefi-bff-api-module 1.36.31 → 1.36.33
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/bank-data.d.ts +4 -1
- package/dist/api/bank-data.js +4 -6
- package/dist/api/frontend.d.ts +10 -0
- package/dist/api/frontend.js +17 -1
- package/dist/api/orders.d.ts +0 -1
- package/dist/api/orders.js +0 -1
- package/dist/api/types/autogen/apiV1External.types.d.ts +288 -244
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +1132 -847
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +104 -1062
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +88 -225
- package/dist/api/types/autogen/apiV2.types.d.ts +382 -86
- package/dist/api/types/types.d.ts +61 -5
- package/dist/api/user.d.ts +4 -0
- package/dist/api/user.js +10 -0
- package/dist/constants.d.ts +7 -0
- package/dist/constants.js +8 -0
- package/dist/utils/apiClientFactory.js +11 -1
- package/dist/utils/tokensFactory.d.ts +10 -0
- package/dist/utils/tokensFactory.js +25 -0
- package/package.json +1 -1
package/dist/api/bank-data.d.ts
CHANGED
package/dist/api/bank-data.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
+
import { apiClientV1Frontend } from '../utils/apiClientFactory';
|
|
1
2
|
export const bankData = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// apiClientV2.getRequest<API.BankData.GetBankDataByAccountNumber.Response>(`/bank-data`, {
|
|
6
|
-
// params,
|
|
7
|
-
// }),
|
|
3
|
+
getByCode: (params) => apiClientV1Frontend.getRequest('/frontend/bank-data', {
|
|
4
|
+
params,
|
|
5
|
+
}),
|
|
8
6
|
};
|
package/dist/api/frontend.d.ts
CHANGED
|
@@ -8,4 +8,14 @@ export declare const frontend: {
|
|
|
8
8
|
revoke: (key_id: string) => Promise<API.Frontend.Access.Keys.Revoke.Response>;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
+
issuing: {
|
|
12
|
+
cards: {
|
|
13
|
+
deposit: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Deposit.Request) => Promise<API.Frontend.Issuing.Cards.Deposit.Response>;
|
|
14
|
+
withdraw: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Withdraw.Request) => Promise<API.Frontend.Issuing.Cards.Withdraw.Response>;
|
|
15
|
+
};
|
|
16
|
+
subAccounts: {
|
|
17
|
+
deposit: ({ sub_account_id, ...data }: API.Frontend.Issuing.SubAccounts.Deposit.Request) => Promise<API.Frontend.Issuing.SubAccounts.Deposit.Response>;
|
|
18
|
+
withdraw: ({ sub_account_id, ...data }: API.Frontend.Issuing.SubAccounts.Withdraw.Request) => Promise<API.Frontend.Issuing.SubAccounts.Withdraw.Response>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
11
21
|
};
|
package/dist/api/frontend.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { apiClientV1 } from '../utils/apiClientFactory';
|
|
1
|
+
import { apiClientV1, apiClientV1Frontend } from '../utils/apiClientFactory';
|
|
2
2
|
export const frontend = {
|
|
3
3
|
access: {
|
|
4
4
|
keys: {
|
|
@@ -8,4 +8,20 @@ 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.*`.
|
|
15
|
+
issuing: {
|
|
16
|
+
cards: {
|
|
17
|
+
deposit: ({ card_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/cards/${card_id}/deposit`, { data }),
|
|
18
|
+
withdraw: ({ card_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/cards/${card_id}/withdraw`, { data }),
|
|
19
|
+
},
|
|
20
|
+
subAccounts: {
|
|
21
|
+
deposit: ({ sub_account_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/sub-accounts/${sub_account_id}/deposit`, { data }),
|
|
22
|
+
// Concurrent withdrawals on the same sub-account are rejected with `409`. The currency is
|
|
23
|
+
// taken from the sub-account, so only the amount is needed.
|
|
24
|
+
withdraw: ({ sub_account_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/sub-accounts/${sub_account_id}/withdraw`, { data }),
|
|
25
|
+
},
|
|
26
|
+
},
|
|
11
27
|
};
|
package/dist/api/orders.d.ts
CHANGED
|
@@ -65,7 +65,6 @@ export declare const orders: {
|
|
|
65
65
|
swift: (data: API.Orders.Frontend.Create.Withdrawal.Swift.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Swift.Response>;
|
|
66
66
|
chaps: (data: API.Orders.Frontend.Create.Withdrawal.Chaps.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Chaps.Response>;
|
|
67
67
|
fps: (data: API.Orders.Frontend.Create.Withdrawal.Fps.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Fps.Response>;
|
|
68
|
-
card: (data: API.Orders.Frontend.Create.Withdrawal.Card.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Card.Response>;
|
|
69
68
|
};
|
|
70
69
|
exchange: (data: API.Orders.Frontend.Create.Exchange.Request) => Promise<API.Orders.Frontend.Create.Exchange.Response>;
|
|
71
70
|
};
|
package/dist/api/orders.js
CHANGED
|
@@ -111,7 +111,6 @@ export const orders = {
|
|
|
111
111
|
swift: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/swift', { data }),
|
|
112
112
|
chaps: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/chaps', { data }),
|
|
113
113
|
fps: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/fps', { data }),
|
|
114
|
-
card: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/card', { data }),
|
|
115
114
|
},
|
|
116
115
|
exchange: (data) => apiClientV1Frontend.postRequest('/frontend/orders/exchange', {
|
|
117
116
|
data,
|