mollie-api-typescript 0.2.8 → 0.3.0
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/README.md +10 -4
- package/bin/mcp-server.js +1461 -666
- package/bin/mcp-server.js.map +32 -13
- package/dist/commonjs/funcs/balanceTransfersCreate.d.ts +22 -0
- package/dist/commonjs/funcs/balanceTransfersCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/balanceTransfersCreate.js +139 -0
- package/dist/commonjs/funcs/balanceTransfersCreate.js.map +1 -0
- package/dist/commonjs/funcs/balanceTransfersGet.d.ts +19 -0
- package/dist/commonjs/funcs/balanceTransfersGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/balanceTransfersGet.js +142 -0
- package/dist/commonjs/funcs/balanceTransfersGet.js.map +1 -0
- package/dist/commonjs/funcs/balanceTransfersList.d.ts +18 -0
- package/dist/commonjs/funcs/balanceTransfersList.d.ts.map +1 -0
- package/dist/commonjs/funcs/balanceTransfersList.js +139 -0
- package/dist/commonjs/funcs/balanceTransfersList.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/url.js +1 -1
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +7 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/balanceTransfersCreate.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersCreate.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersCreate.js +68 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersCreate.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersGet.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersGet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersGet.js +64 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersGet.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersList.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersList.js +65 -0
- package/dist/commonjs/mcp-server/tools/balanceTransfersList.js.map +1 -0
- package/dist/commonjs/models/balancetransfercategory.d.ts +52 -0
- package/dist/commonjs/models/balancetransfercategory.d.ts.map +1 -0
- package/dist/commonjs/models/balancetransfercategory.js +69 -0
- package/dist/commonjs/models/balancetransfercategory.js.map +1 -0
- package/dist/commonjs/models/balancetransfercategoryresponse.d.ts +34 -0
- package/dist/commonjs/models/balancetransfercategoryresponse.d.ts.map +1 -0
- package/dist/commonjs/models/balancetransfercategoryresponse.js +77 -0
- package/dist/commonjs/models/balancetransfercategoryresponse.js.map +1 -0
- package/dist/commonjs/models/balancetransferpartytype.d.ts +31 -0
- package/dist/commonjs/models/balancetransferpartytype.d.ts.map +1 -0
- package/dist/commonjs/models/balancetransferpartytype.js +62 -0
- package/dist/commonjs/models/balancetransferpartytype.js.map +1 -0
- package/dist/commonjs/models/balancetransferpartytyperesponse.d.ts +27 -0
- package/dist/commonjs/models/balancetransferpartytyperesponse.d.ts.map +1 -0
- package/dist/commonjs/models/balancetransferpartytyperesponse.js +70 -0
- package/dist/commonjs/models/balancetransferpartytyperesponse.js.map +1 -0
- package/dist/commonjs/models/balancetransferstatus.d.ts +29 -0
- package/dist/commonjs/models/balancetransferstatus.d.ts.map +1 -0
- package/dist/commonjs/models/balancetransferstatus.js +72 -0
- package/dist/commonjs/models/balancetransferstatus.js.map +1 -0
- package/dist/commonjs/models/balancetransferstatusreasonresponse.d.ts +35 -0
- package/dist/commonjs/models/balancetransferstatusreasonresponse.d.ts.map +1 -0
- package/dist/commonjs/models/balancetransferstatusreasonresponse.js +78 -0
- package/dist/commonjs/models/balancetransferstatusreasonresponse.js.map +1 -0
- package/dist/commonjs/models/createwebhook.d.ts +5 -0
- package/dist/commonjs/models/createwebhook.d.ts.map +1 -1
- package/dist/commonjs/models/createwebhook.js +2 -0
- package/dist/commonjs/models/createwebhook.js.map +1 -1
- package/dist/commonjs/models/entitybalancetransfer.d.ts +68 -0
- package/dist/commonjs/models/entitybalancetransfer.d.ts.map +1 -0
- package/dist/commonjs/models/entitybalancetransfer.js +84 -0
- package/dist/commonjs/models/entitybalancetransfer.js.map +1 -0
- package/dist/commonjs/models/entitybalancetransferparty.d.ts +43 -0
- package/dist/commonjs/models/entitybalancetransferparty.d.ts.map +1 -0
- package/dist/commonjs/models/entitybalancetransferparty.js +74 -0
- package/dist/commonjs/models/entitybalancetransferparty.js.map +1 -0
- package/dist/commonjs/models/entitybalancetransferpartyresponse.d.ts +43 -0
- package/dist/commonjs/models/entitybalancetransferpartyresponse.d.ts.map +1 -0
- package/dist/commonjs/models/entitybalancetransferpartyresponse.js +74 -0
- package/dist/commonjs/models/entitybalancetransferpartyresponse.js.map +1 -0
- package/dist/commonjs/models/entitybalancetransferresponse.d.ts +129 -0
- package/dist/commonjs/models/entitybalancetransferresponse.d.ts.map +1 -0
- package/dist/commonjs/models/entitybalancetransferresponse.js +126 -0
- package/dist/commonjs/models/entitybalancetransferresponse.js.map +1 -0
- package/dist/commonjs/models/entitysalesinvoice.d.ts +4 -2
- package/dist/commonjs/models/entitysalesinvoice.d.ts.map +1 -1
- package/dist/commonjs/models/entitysalesinvoice.js.map +1 -1
- package/dist/commonjs/models/entitysalesinvoiceresponse.d.ts +4 -2
- package/dist/commonjs/models/entitysalesinvoiceresponse.d.ts.map +1 -1
- package/dist/commonjs/models/entitysalesinvoiceresponse.js.map +1 -1
- package/dist/commonjs/models/entitywebhook.d.ts +5 -0
- package/dist/commonjs/models/entitywebhook.d.ts.map +1 -1
- package/dist/commonjs/models/entitywebhook.js +2 -0
- package/dist/commonjs/models/entitywebhook.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +10 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +10 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/operations/createconnectbalancetransfer.d.ts +35 -0
- package/dist/commonjs/models/operations/createconnectbalancetransfer.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createconnectbalancetransfer.js +84 -0
- package/dist/commonjs/models/operations/createconnectbalancetransfer.js.map +1 -0
- package/dist/commonjs/models/operations/getconnectbalancetransfer.d.ts +48 -0
- package/dist/commonjs/models/operations/getconnectbalancetransfer.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getconnectbalancetransfer.js +82 -0
- package/dist/commonjs/models/operations/getconnectbalancetransfer.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listconnectbalancetransfers.d.ts +140 -0
- package/dist/commonjs/models/operations/listconnectbalancetransfers.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listconnectbalancetransfers.js +163 -0
- package/dist/commonjs/models/operations/listconnectbalancetransfers.js.map +1 -0
- package/dist/commonjs/sdk/balancetransfers.d.ts +30 -0
- package/dist/commonjs/sdk/balancetransfers.d.ts.map +1 -0
- package/dist/commonjs/sdk/balancetransfers.js +45 -0
- package/dist/commonjs/sdk/balancetransfers.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/balanceTransfersCreate.d.ts +22 -0
- package/dist/esm/funcs/balanceTransfersCreate.d.ts.map +1 -0
- package/dist/esm/funcs/balanceTransfersCreate.js +103 -0
- package/dist/esm/funcs/balanceTransfersCreate.js.map +1 -0
- package/dist/esm/funcs/balanceTransfersGet.d.ts +19 -0
- package/dist/esm/funcs/balanceTransfersGet.d.ts.map +1 -0
- package/dist/esm/funcs/balanceTransfersGet.js +106 -0
- package/dist/esm/funcs/balanceTransfersGet.js.map +1 -0
- package/dist/esm/funcs/balanceTransfersList.d.ts +18 -0
- package/dist/esm/funcs/balanceTransfersList.d.ts.map +1 -0
- package/dist/esm/funcs/balanceTransfersList.js +103 -0
- package/dist/esm/funcs/balanceTransfersList.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/url.js +1 -1
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +7 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/balanceTransfersCreate.d.ts +8 -0
- package/dist/esm/mcp-server/tools/balanceTransfersCreate.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/balanceTransfersCreate.js +32 -0
- package/dist/esm/mcp-server/tools/balanceTransfersCreate.js.map +1 -0
- package/dist/esm/mcp-server/tools/balanceTransfersGet.d.ts +8 -0
- package/dist/esm/mcp-server/tools/balanceTransfersGet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/balanceTransfersGet.js +28 -0
- package/dist/esm/mcp-server/tools/balanceTransfersGet.js.map +1 -0
- package/dist/esm/mcp-server/tools/balanceTransfersList.d.ts +8 -0
- package/dist/esm/mcp-server/tools/balanceTransfersList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/balanceTransfersList.js +29 -0
- package/dist/esm/mcp-server/tools/balanceTransfersList.js.map +1 -0
- package/dist/esm/models/balancetransfercategory.d.ts +52 -0
- package/dist/esm/models/balancetransfercategory.d.ts.map +1 -0
- package/dist/esm/models/balancetransfercategory.js +33 -0
- package/dist/esm/models/balancetransfercategory.js.map +1 -0
- package/dist/esm/models/balancetransfercategoryresponse.d.ts +34 -0
- package/dist/esm/models/balancetransfercategoryresponse.d.ts.map +1 -0
- package/dist/esm/models/balancetransfercategoryresponse.js +41 -0
- package/dist/esm/models/balancetransfercategoryresponse.js.map +1 -0
- package/dist/esm/models/balancetransferpartytype.d.ts +31 -0
- package/dist/esm/models/balancetransferpartytype.d.ts.map +1 -0
- package/dist/esm/models/balancetransferpartytype.js +26 -0
- package/dist/esm/models/balancetransferpartytype.js.map +1 -0
- package/dist/esm/models/balancetransferpartytyperesponse.d.ts +27 -0
- package/dist/esm/models/balancetransferpartytyperesponse.d.ts.map +1 -0
- package/dist/esm/models/balancetransferpartytyperesponse.js +34 -0
- package/dist/esm/models/balancetransferpartytyperesponse.js.map +1 -0
- package/dist/esm/models/balancetransferstatus.d.ts +29 -0
- package/dist/esm/models/balancetransferstatus.d.ts.map +1 -0
- package/dist/esm/models/balancetransferstatus.js +36 -0
- package/dist/esm/models/balancetransferstatus.js.map +1 -0
- package/dist/esm/models/balancetransferstatusreasonresponse.d.ts +35 -0
- package/dist/esm/models/balancetransferstatusreasonresponse.d.ts.map +1 -0
- package/dist/esm/models/balancetransferstatusreasonresponse.js +42 -0
- package/dist/esm/models/balancetransferstatusreasonresponse.js.map +1 -0
- package/dist/esm/models/createwebhook.d.ts +5 -0
- package/dist/esm/models/createwebhook.d.ts.map +1 -1
- package/dist/esm/models/createwebhook.js +2 -0
- package/dist/esm/models/createwebhook.js.map +1 -1
- package/dist/esm/models/entitybalancetransfer.d.ts +68 -0
- package/dist/esm/models/entitybalancetransfer.d.ts.map +1 -0
- package/dist/esm/models/entitybalancetransfer.js +46 -0
- package/dist/esm/models/entitybalancetransfer.js.map +1 -0
- package/dist/esm/models/entitybalancetransferparty.d.ts +43 -0
- package/dist/esm/models/entitybalancetransferparty.d.ts.map +1 -0
- package/dist/esm/models/entitybalancetransferparty.js +36 -0
- package/dist/esm/models/entitybalancetransferparty.js.map +1 -0
- package/dist/esm/models/entitybalancetransferpartyresponse.d.ts +43 -0
- package/dist/esm/models/entitybalancetransferpartyresponse.d.ts.map +1 -0
- package/dist/esm/models/entitybalancetransferpartyresponse.js +36 -0
- package/dist/esm/models/entitybalancetransferpartyresponse.js.map +1 -0
- package/dist/esm/models/entitybalancetransferresponse.d.ts +129 -0
- package/dist/esm/models/entitybalancetransferresponse.d.ts.map +1 -0
- package/dist/esm/models/entitybalancetransferresponse.js +86 -0
- package/dist/esm/models/entitybalancetransferresponse.js.map +1 -0
- package/dist/esm/models/entitysalesinvoice.d.ts +4 -2
- package/dist/esm/models/entitysalesinvoice.d.ts.map +1 -1
- package/dist/esm/models/entitysalesinvoice.js.map +1 -1
- package/dist/esm/models/entitysalesinvoiceresponse.d.ts +4 -2
- package/dist/esm/models/entitysalesinvoiceresponse.d.ts.map +1 -1
- package/dist/esm/models/entitysalesinvoiceresponse.js.map +1 -1
- package/dist/esm/models/entitywebhook.d.ts +5 -0
- package/dist/esm/models/entitywebhook.d.ts.map +1 -1
- package/dist/esm/models/entitywebhook.js +2 -0
- package/dist/esm/models/entitywebhook.js.map +1 -1
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +10 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/operations/createconnectbalancetransfer.d.ts +35 -0
- package/dist/esm/models/operations/createconnectbalancetransfer.d.ts.map +1 -0
- package/dist/esm/models/operations/createconnectbalancetransfer.js +46 -0
- package/dist/esm/models/operations/createconnectbalancetransfer.js.map +1 -0
- package/dist/esm/models/operations/getconnectbalancetransfer.d.ts +48 -0
- package/dist/esm/models/operations/getconnectbalancetransfer.d.ts.map +1 -0
- package/dist/esm/models/operations/getconnectbalancetransfer.js +44 -0
- package/dist/esm/models/operations/getconnectbalancetransfer.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listconnectbalancetransfers.d.ts +140 -0
- package/dist/esm/models/operations/listconnectbalancetransfers.d.ts.map +1 -0
- package/dist/esm/models/operations/listconnectbalancetransfers.js +121 -0
- package/dist/esm/models/operations/listconnectbalancetransfers.js.map +1 -0
- package/dist/esm/sdk/balancetransfers.d.ts +30 -0
- package/dist/esm/sdk/balancetransfers.d.ts.map +1 -0
- package/dist/esm/sdk/balancetransfers.js +41 -0
- package/dist/esm/sdk/balancetransfers.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/balancetransfers/README.md +297 -0
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/balanceTransfersCreate.ts +195 -0
- package/src/funcs/balanceTransfersGet.ts +200 -0
- package/src/funcs/balanceTransfersList.ts +196 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/url.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -1
- package/src/mcp-server/tools/balanceTransfersCreate.ts +41 -0
- package/src/mcp-server/tools/balanceTransfersGet.ts +37 -0
- package/src/mcp-server/tools/balanceTransfersList.ts +38 -0
- package/src/models/balancetransfercategory.ts +47 -0
- package/src/models/balancetransfercategoryresponse.ts +62 -0
- package/src/models/balancetransferpartytype.ts +40 -0
- package/src/models/balancetransferpartytyperesponse.ts +55 -0
- package/src/models/balancetransferstatus.ts +55 -0
- package/src/models/balancetransferstatusreasonresponse.ts +65 -0
- package/src/models/createwebhook.ts +7 -0
- package/src/models/entitybalancetransfer.ts +131 -0
- package/src/models/entitybalancetransferparty.ts +88 -0
- package/src/models/entitybalancetransferpartyresponse.ts +92 -0
- package/src/models/entitybalancetransferresponse.ts +263 -0
- package/src/models/entitysalesinvoice.ts +4 -2
- package/src/models/entitysalesinvoiceresponse.ts +4 -2
- package/src/models/entitywebhook.ts +7 -0
- package/src/models/index.ts +10 -0
- package/src/models/operations/createconnectbalancetransfer.ts +91 -0
- package/src/models/operations/getconnectbalancetransfer.ts +100 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/listconnectbalancetransfers.ts +302 -0
- package/src/sdk/balancetransfers.ts +67 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { balanceTransfersGet } from "../../funcs/balanceTransfersGet.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetConnectBalanceTransferRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$balanceTransfersGet: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "balance-transfers-get",
|
|
15
|
+
description: `Get a Connect balance transfer
|
|
16
|
+
|
|
17
|
+
Retrieve a single Connect balance transfer object by its ID.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await balanceTransfersGet(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { balanceTransfersList } from "../../funcs/balanceTransfersList.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListConnectBalanceTransfersRequest$inboundSchema
|
|
11
|
+
.optional(),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const tool$balanceTransfersList: ToolDefinition<typeof args> = {
|
|
15
|
+
name: "balance-transfers-list",
|
|
16
|
+
description: `List all Connect balance transfers
|
|
17
|
+
|
|
18
|
+
Returns a paginated list of balance transfers associated with your organization. These may be a balance transfer that was received or sent from your balance, or a balance transfer that you initiated on behalf of your clients. If no balance transfers are available, the resulting array will be empty. This request should never throw an error.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await balanceTransfersList(
|
|
22
|
+
client,
|
|
23
|
+
args.request,
|
|
24
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
+
).$inspect();
|
|
26
|
+
|
|
27
|
+
if (!result.ok) {
|
|
28
|
+
return {
|
|
29
|
+
content: [{ type: "text", text: result.error.message }],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = result.value;
|
|
35
|
+
|
|
36
|
+
return formatResult(value, apiCall);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The type of the transfer. Different fees may apply to different types of transfers.
|
|
10
|
+
*/
|
|
11
|
+
export const BalanceTransferCategory = {
|
|
12
|
+
InvoiceCollection: "invoice_collection",
|
|
13
|
+
Purchase: "purchase",
|
|
14
|
+
Chargeback: "chargeback",
|
|
15
|
+
Refund: "refund",
|
|
16
|
+
ServicePenalty: "service_penalty",
|
|
17
|
+
DiscountCompensation: "discount_compensation",
|
|
18
|
+
ManualCorrection: "manual_correction",
|
|
19
|
+
Fee: "fee",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* The type of the transfer. Different fees may apply to different types of transfers.
|
|
23
|
+
*/
|
|
24
|
+
export type BalanceTransferCategory = ClosedEnum<
|
|
25
|
+
typeof BalanceTransferCategory
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const BalanceTransferCategory$inboundSchema: z.ZodNativeEnum<
|
|
30
|
+
typeof BalanceTransferCategory
|
|
31
|
+
> = z.nativeEnum(BalanceTransferCategory);
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const BalanceTransferCategory$outboundSchema: z.ZodNativeEnum<
|
|
35
|
+
typeof BalanceTransferCategory
|
|
36
|
+
> = BalanceTransferCategory$inboundSchema;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
41
|
+
*/
|
|
42
|
+
export namespace BalanceTransferCategory$ {
|
|
43
|
+
/** @deprecated use `BalanceTransferCategory$inboundSchema` instead. */
|
|
44
|
+
export const inboundSchema = BalanceTransferCategory$inboundSchema;
|
|
45
|
+
/** @deprecated use `BalanceTransferCategory$outboundSchema` instead. */
|
|
46
|
+
export const outboundSchema = BalanceTransferCategory$outboundSchema;
|
|
47
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
catchUnrecognizedEnum,
|
|
8
|
+
OpenEnum,
|
|
9
|
+
Unrecognized,
|
|
10
|
+
} from "../types/enums.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The type of the transfer. Different fees may apply to different types of transfers.
|
|
14
|
+
*/
|
|
15
|
+
export const BalanceTransferCategoryResponse = {
|
|
16
|
+
InvoiceCollection: "invoice_collection",
|
|
17
|
+
Purchase: "purchase",
|
|
18
|
+
Chargeback: "chargeback",
|
|
19
|
+
Refund: "refund",
|
|
20
|
+
ServicePenalty: "service_penalty",
|
|
21
|
+
DiscountCompensation: "discount_compensation",
|
|
22
|
+
ManualCorrection: "manual_correction",
|
|
23
|
+
Fee: "fee",
|
|
24
|
+
} as const;
|
|
25
|
+
/**
|
|
26
|
+
* The type of the transfer. Different fees may apply to different types of transfers.
|
|
27
|
+
*/
|
|
28
|
+
export type BalanceTransferCategoryResponse = OpenEnum<
|
|
29
|
+
typeof BalanceTransferCategoryResponse
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const BalanceTransferCategoryResponse$inboundSchema: z.ZodType<
|
|
34
|
+
BalanceTransferCategoryResponse,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z
|
|
38
|
+
.union([
|
|
39
|
+
z.nativeEnum(BalanceTransferCategoryResponse),
|
|
40
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const BalanceTransferCategoryResponse$outboundSchema: z.ZodType<
|
|
45
|
+
BalanceTransferCategoryResponse,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
BalanceTransferCategoryResponse
|
|
48
|
+
> = z.union([
|
|
49
|
+
z.nativeEnum(BalanceTransferCategoryResponse),
|
|
50
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
51
|
+
]);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace BalanceTransferCategoryResponse$ {
|
|
58
|
+
/** @deprecated use `BalanceTransferCategoryResponse$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = BalanceTransferCategoryResponse$inboundSchema;
|
|
60
|
+
/** @deprecated use `BalanceTransferCategoryResponse$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = BalanceTransferCategoryResponse$outboundSchema;
|
|
62
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Defines the type of the party. At the moment, only `organization` is supported.
|
|
10
|
+
*/
|
|
11
|
+
export const BalanceTransferPartyType = {
|
|
12
|
+
Organization: "organization",
|
|
13
|
+
} as const;
|
|
14
|
+
/**
|
|
15
|
+
* Defines the type of the party. At the moment, only `organization` is supported.
|
|
16
|
+
*/
|
|
17
|
+
export type BalanceTransferPartyType = ClosedEnum<
|
|
18
|
+
typeof BalanceTransferPartyType
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const BalanceTransferPartyType$inboundSchema: z.ZodNativeEnum<
|
|
23
|
+
typeof BalanceTransferPartyType
|
|
24
|
+
> = z.nativeEnum(BalanceTransferPartyType);
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const BalanceTransferPartyType$outboundSchema: z.ZodNativeEnum<
|
|
28
|
+
typeof BalanceTransferPartyType
|
|
29
|
+
> = BalanceTransferPartyType$inboundSchema;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
34
|
+
*/
|
|
35
|
+
export namespace BalanceTransferPartyType$ {
|
|
36
|
+
/** @deprecated use `BalanceTransferPartyType$inboundSchema` instead. */
|
|
37
|
+
export const inboundSchema = BalanceTransferPartyType$inboundSchema;
|
|
38
|
+
/** @deprecated use `BalanceTransferPartyType$outboundSchema` instead. */
|
|
39
|
+
export const outboundSchema = BalanceTransferPartyType$outboundSchema;
|
|
40
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
catchUnrecognizedEnum,
|
|
8
|
+
OpenEnum,
|
|
9
|
+
Unrecognized,
|
|
10
|
+
} from "../types/enums.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Defines the type of the party. At the moment, only `organization` is supported.
|
|
14
|
+
*/
|
|
15
|
+
export const BalanceTransferPartyTypeResponse = {
|
|
16
|
+
Organization: "organization",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* Defines the type of the party. At the moment, only `organization` is supported.
|
|
20
|
+
*/
|
|
21
|
+
export type BalanceTransferPartyTypeResponse = OpenEnum<
|
|
22
|
+
typeof BalanceTransferPartyTypeResponse
|
|
23
|
+
>;
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const BalanceTransferPartyTypeResponse$inboundSchema: z.ZodType<
|
|
27
|
+
BalanceTransferPartyTypeResponse,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z
|
|
31
|
+
.union([
|
|
32
|
+
z.nativeEnum(BalanceTransferPartyTypeResponse),
|
|
33
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const BalanceTransferPartyTypeResponse$outboundSchema: z.ZodType<
|
|
38
|
+
BalanceTransferPartyTypeResponse,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
BalanceTransferPartyTypeResponse
|
|
41
|
+
> = z.union([
|
|
42
|
+
z.nativeEnum(BalanceTransferPartyTypeResponse),
|
|
43
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace BalanceTransferPartyTypeResponse$ {
|
|
51
|
+
/** @deprecated use `BalanceTransferPartyTypeResponse$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = BalanceTransferPartyTypeResponse$inboundSchema;
|
|
53
|
+
/** @deprecated use `BalanceTransferPartyTypeResponse$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = BalanceTransferPartyTypeResponse$outboundSchema;
|
|
55
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
catchUnrecognizedEnum,
|
|
8
|
+
OpenEnum,
|
|
9
|
+
Unrecognized,
|
|
10
|
+
} from "../types/enums.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The status of the transfer.
|
|
14
|
+
*/
|
|
15
|
+
export const BalanceTransferStatus = {
|
|
16
|
+
Created: "created",
|
|
17
|
+
Failed: "failed",
|
|
18
|
+
Succeeded: "succeeded",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* The status of the transfer.
|
|
22
|
+
*/
|
|
23
|
+
export type BalanceTransferStatus = OpenEnum<typeof BalanceTransferStatus>;
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const BalanceTransferStatus$inboundSchema: z.ZodType<
|
|
27
|
+
BalanceTransferStatus,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z
|
|
31
|
+
.union([
|
|
32
|
+
z.nativeEnum(BalanceTransferStatus),
|
|
33
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const BalanceTransferStatus$outboundSchema: z.ZodType<
|
|
38
|
+
BalanceTransferStatus,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
BalanceTransferStatus
|
|
41
|
+
> = z.union([
|
|
42
|
+
z.nativeEnum(BalanceTransferStatus),
|
|
43
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace BalanceTransferStatus$ {
|
|
51
|
+
/** @deprecated use `BalanceTransferStatus$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = BalanceTransferStatus$inboundSchema;
|
|
53
|
+
/** @deprecated use `BalanceTransferStatus$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = BalanceTransferStatus$outboundSchema;
|
|
55
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
catchUnrecognizedEnum,
|
|
8
|
+
OpenEnum,
|
|
9
|
+
Unrecognized,
|
|
10
|
+
} from "../types/enums.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A machine-readable code that indicates the reason for the transfer's status.
|
|
14
|
+
*/
|
|
15
|
+
export const BalanceTransferStatusReasonResponse = {
|
|
16
|
+
RequestCreated: "request_created",
|
|
17
|
+
Success: "success",
|
|
18
|
+
SourceNotAllowed: "source_not_allowed",
|
|
19
|
+
DestinationNotAllowed: "destination_not_allowed",
|
|
20
|
+
InsufficientFunds: "insufficient_funds",
|
|
21
|
+
InvalidSourceBalance: "invalid_source_balance",
|
|
22
|
+
InvalidDestinationBalance: "invalid_destination_balance",
|
|
23
|
+
TransferRequestExpired: "transfer_request_expired",
|
|
24
|
+
TransferLimitReached: "transfer_limit_reached",
|
|
25
|
+
} as const;
|
|
26
|
+
/**
|
|
27
|
+
* A machine-readable code that indicates the reason for the transfer's status.
|
|
28
|
+
*/
|
|
29
|
+
export type BalanceTransferStatusReasonResponse = OpenEnum<
|
|
30
|
+
typeof BalanceTransferStatusReasonResponse
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const BalanceTransferStatusReasonResponse$inboundSchema: z.ZodType<
|
|
35
|
+
BalanceTransferStatusReasonResponse,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
unknown
|
|
38
|
+
> = z
|
|
39
|
+
.union([
|
|
40
|
+
z.nativeEnum(BalanceTransferStatusReasonResponse),
|
|
41
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const BalanceTransferStatusReasonResponse$outboundSchema: z.ZodType<
|
|
46
|
+
BalanceTransferStatusReasonResponse,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
BalanceTransferStatusReasonResponse
|
|
49
|
+
> = z.union([
|
|
50
|
+
z.nativeEnum(BalanceTransferStatusReasonResponse),
|
|
51
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
52
|
+
]);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace BalanceTransferStatusReasonResponse$ {
|
|
59
|
+
/** @deprecated use `BalanceTransferStatusReasonResponse$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema =
|
|
61
|
+
BalanceTransferStatusReasonResponse$inboundSchema;
|
|
62
|
+
/** @deprecated use `BalanceTransferStatusReasonResponse$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema =
|
|
64
|
+
BalanceTransferStatusReasonResponse$outboundSchema;
|
|
65
|
+
}
|
|
@@ -29,6 +29,10 @@ import {
|
|
|
29
29
|
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
30
30
|
*/
|
|
31
31
|
export type CreateWebhookLinks = {
|
|
32
|
+
/**
|
|
33
|
+
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
34
|
+
*/
|
|
35
|
+
self: Url;
|
|
32
36
|
/**
|
|
33
37
|
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
34
38
|
*/
|
|
@@ -88,11 +92,13 @@ export const CreateWebhookLinks$inboundSchema: z.ZodType<
|
|
|
88
92
|
z.ZodTypeDef,
|
|
89
93
|
unknown
|
|
90
94
|
> = z.object({
|
|
95
|
+
self: Url$inboundSchema,
|
|
91
96
|
documentation: Url$inboundSchema,
|
|
92
97
|
});
|
|
93
98
|
|
|
94
99
|
/** @internal */
|
|
95
100
|
export type CreateWebhookLinks$Outbound = {
|
|
101
|
+
self: Url$Outbound;
|
|
96
102
|
documentation: Url$Outbound;
|
|
97
103
|
};
|
|
98
104
|
|
|
@@ -102,6 +108,7 @@ export const CreateWebhookLinks$outboundSchema: z.ZodType<
|
|
|
102
108
|
z.ZodTypeDef,
|
|
103
109
|
CreateWebhookLinks
|
|
104
110
|
> = z.object({
|
|
111
|
+
self: Url$outboundSchema,
|
|
105
112
|
documentation: Url$outboundSchema,
|
|
106
113
|
});
|
|
107
114
|
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import {
|
|
9
|
+
Amount,
|
|
10
|
+
Amount$inboundSchema,
|
|
11
|
+
Amount$Outbound,
|
|
12
|
+
Amount$outboundSchema,
|
|
13
|
+
} from "./amount.js";
|
|
14
|
+
import {
|
|
15
|
+
BalanceTransferCategory,
|
|
16
|
+
BalanceTransferCategory$inboundSchema,
|
|
17
|
+
BalanceTransferCategory$outboundSchema,
|
|
18
|
+
} from "./balancetransfercategory.js";
|
|
19
|
+
import {
|
|
20
|
+
EntityBalanceTransferParty,
|
|
21
|
+
EntityBalanceTransferParty$inboundSchema,
|
|
22
|
+
EntityBalanceTransferParty$Outbound,
|
|
23
|
+
EntityBalanceTransferParty$outboundSchema,
|
|
24
|
+
} from "./entitybalancetransferparty.js";
|
|
25
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
26
|
+
|
|
27
|
+
export type EntityBalanceTransfer = {
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
|
|
31
|
+
*/
|
|
32
|
+
amount: Amount;
|
|
33
|
+
/**
|
|
34
|
+
* A party involved in the balance transfer, either the sender or the receiver.
|
|
35
|
+
*/
|
|
36
|
+
source: EntityBalanceTransferParty;
|
|
37
|
+
/**
|
|
38
|
+
* A party involved in the balance transfer, either the sender or the receiver.
|
|
39
|
+
*/
|
|
40
|
+
destination: EntityBalanceTransferParty;
|
|
41
|
+
/**
|
|
42
|
+
* The transfer description for initiating party.
|
|
43
|
+
*/
|
|
44
|
+
description: string;
|
|
45
|
+
/**
|
|
46
|
+
* The type of the transfer. Different fees may apply to different types of transfers.
|
|
47
|
+
*/
|
|
48
|
+
category?: BalanceTransferCategory | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to create the entity in test mode or live mode.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
*
|
|
54
|
+
* Most API credentials are specifically created for either live mode or test mode, in which case this parameter can be
|
|
55
|
+
* omitted. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting
|
|
56
|
+
* `testmode` to `true`.
|
|
57
|
+
*/
|
|
58
|
+
testmode?: boolean | null | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const EntityBalanceTransfer$inboundSchema: z.ZodType<
|
|
63
|
+
EntityBalanceTransfer,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
unknown
|
|
66
|
+
> = z.object({
|
|
67
|
+
id: z.string(),
|
|
68
|
+
amount: Amount$inboundSchema,
|
|
69
|
+
source: EntityBalanceTransferParty$inboundSchema,
|
|
70
|
+
destination: EntityBalanceTransferParty$inboundSchema,
|
|
71
|
+
description: z.string(),
|
|
72
|
+
category: BalanceTransferCategory$inboundSchema.optional(),
|
|
73
|
+
testmode: z.nullable(z.boolean()).optional(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export type EntityBalanceTransfer$Outbound = {
|
|
78
|
+
id: string;
|
|
79
|
+
amount: Amount$Outbound;
|
|
80
|
+
source: EntityBalanceTransferParty$Outbound;
|
|
81
|
+
destination: EntityBalanceTransferParty$Outbound;
|
|
82
|
+
description: string;
|
|
83
|
+
category?: string | undefined;
|
|
84
|
+
testmode?: boolean | null | undefined;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const EntityBalanceTransfer$outboundSchema: z.ZodType<
|
|
89
|
+
EntityBalanceTransfer$Outbound,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
EntityBalanceTransfer
|
|
92
|
+
> = z.object({
|
|
93
|
+
id: z.string(),
|
|
94
|
+
amount: Amount$outboundSchema,
|
|
95
|
+
source: EntityBalanceTransferParty$outboundSchema,
|
|
96
|
+
destination: EntityBalanceTransferParty$outboundSchema,
|
|
97
|
+
description: z.string(),
|
|
98
|
+
category: BalanceTransferCategory$outboundSchema.optional(),
|
|
99
|
+
testmode: z.nullable(z.boolean()).optional(),
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
105
|
+
*/
|
|
106
|
+
export namespace EntityBalanceTransfer$ {
|
|
107
|
+
/** @deprecated use `EntityBalanceTransfer$inboundSchema` instead. */
|
|
108
|
+
export const inboundSchema = EntityBalanceTransfer$inboundSchema;
|
|
109
|
+
/** @deprecated use `EntityBalanceTransfer$outboundSchema` instead. */
|
|
110
|
+
export const outboundSchema = EntityBalanceTransfer$outboundSchema;
|
|
111
|
+
/** @deprecated use `EntityBalanceTransfer$Outbound` instead. */
|
|
112
|
+
export type Outbound = EntityBalanceTransfer$Outbound;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function entityBalanceTransferToJSON(
|
|
116
|
+
entityBalanceTransfer: EntityBalanceTransfer,
|
|
117
|
+
): string {
|
|
118
|
+
return JSON.stringify(
|
|
119
|
+
EntityBalanceTransfer$outboundSchema.parse(entityBalanceTransfer),
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function entityBalanceTransferFromJSON(
|
|
124
|
+
jsonString: string,
|
|
125
|
+
): SafeParseResult<EntityBalanceTransfer, SDKValidationError> {
|
|
126
|
+
return safeParse(
|
|
127
|
+
jsonString,
|
|
128
|
+
(x) => EntityBalanceTransfer$inboundSchema.parse(JSON.parse(x)),
|
|
129
|
+
`Failed to parse 'EntityBalanceTransfer' from JSON`,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import {
|
|
9
|
+
BalanceTransferPartyType,
|
|
10
|
+
BalanceTransferPartyType$inboundSchema,
|
|
11
|
+
BalanceTransferPartyType$outboundSchema,
|
|
12
|
+
} from "./balancetransferpartytype.js";
|
|
13
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A party involved in the balance transfer, either the sender or the receiver.
|
|
17
|
+
*/
|
|
18
|
+
export type EntityBalanceTransferParty = {
|
|
19
|
+
/**
|
|
20
|
+
* Defines the type of the party. At the moment, only `organization` is supported.
|
|
21
|
+
*/
|
|
22
|
+
type: BalanceTransferPartyType;
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* The transfer description for the transfer party. This is the description that will appear in the financial reports of the party.
|
|
26
|
+
*/
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const EntityBalanceTransferParty$inboundSchema: z.ZodType<
|
|
32
|
+
EntityBalanceTransferParty,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
type: BalanceTransferPartyType$inboundSchema,
|
|
37
|
+
id: z.string(),
|
|
38
|
+
description: z.string(),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type EntityBalanceTransferParty$Outbound = {
|
|
43
|
+
type: string;
|
|
44
|
+
id: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const EntityBalanceTransferParty$outboundSchema: z.ZodType<
|
|
50
|
+
EntityBalanceTransferParty$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
EntityBalanceTransferParty
|
|
53
|
+
> = z.object({
|
|
54
|
+
type: BalanceTransferPartyType$outboundSchema,
|
|
55
|
+
id: z.string(),
|
|
56
|
+
description: z.string(),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
62
|
+
*/
|
|
63
|
+
export namespace EntityBalanceTransferParty$ {
|
|
64
|
+
/** @deprecated use `EntityBalanceTransferParty$inboundSchema` instead. */
|
|
65
|
+
export const inboundSchema = EntityBalanceTransferParty$inboundSchema;
|
|
66
|
+
/** @deprecated use `EntityBalanceTransferParty$outboundSchema` instead. */
|
|
67
|
+
export const outboundSchema = EntityBalanceTransferParty$outboundSchema;
|
|
68
|
+
/** @deprecated use `EntityBalanceTransferParty$Outbound` instead. */
|
|
69
|
+
export type Outbound = EntityBalanceTransferParty$Outbound;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function entityBalanceTransferPartyToJSON(
|
|
73
|
+
entityBalanceTransferParty: EntityBalanceTransferParty,
|
|
74
|
+
): string {
|
|
75
|
+
return JSON.stringify(
|
|
76
|
+
EntityBalanceTransferParty$outboundSchema.parse(entityBalanceTransferParty),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function entityBalanceTransferPartyFromJSON(
|
|
81
|
+
jsonString: string,
|
|
82
|
+
): SafeParseResult<EntityBalanceTransferParty, SDKValidationError> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) => EntityBalanceTransferParty$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
+
`Failed to parse 'EntityBalanceTransferParty' from JSON`,
|
|
87
|
+
);
|
|
88
|
+
}
|