mollie-api-typescript 1.3.5 → 1.3.7
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 +11 -0
- package/bin/mcp-server.js +1716 -768
- package/bin/mcp-server.js.map +32 -12
- package/dist/commonjs/funcs/accountsGet.d.ts +22 -0
- package/dist/commonjs/funcs/accountsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsGet.js +147 -0
- package/dist/commonjs/funcs/accountsGet.js.map +1 -0
- package/dist/commonjs/funcs/accountsGetAccount.d.ts +22 -0
- package/dist/commonjs/funcs/accountsGetAccount.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsGetAccount.js +143 -0
- package/dist/commonjs/funcs/accountsGetAccount.js.map +1 -0
- package/dist/commonjs/funcs/accountsList.d.ts +27 -0
- package/dist/commonjs/funcs/accountsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsList.js +178 -0
- package/dist/commonjs/funcs/accountsList.js.map +1 -0
- package/dist/commonjs/funcs/accountsListAccounts.d.ts +27 -0
- package/dist/commonjs/funcs/accountsListAccounts.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsListAccounts.js +178 -0
- package/dist/commonjs/funcs/accountsListAccounts.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- 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 +9 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/accountsGet.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/accountsGet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsGet.js +66 -0
- package/dist/commonjs/mcp-server/tools/accountsGet.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsGetAccount.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/accountsGetAccount.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsGetAccount.js +66 -0
- package/dist/commonjs/mcp-server/tools/accountsGetAccount.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsList.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/accountsList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsList.js +67 -0
- package/dist/commonjs/mcp-server/tools/accountsList.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsListAccounts.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/accountsListAccounts.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsListAccounts.js +67 -0
- package/dist/commonjs/mcp-server/tools/accountsListAccounts.js.map +1 -0
- package/dist/commonjs/models/accountdetails.d.ts +43 -0
- package/dist/commonjs/models/accountdetails.d.ts.map +1 -0
- package/dist/commonjs/models/accountdetails.js +67 -0
- package/dist/commonjs/models/accountdetails.js.map +1 -0
- package/dist/commonjs/models/accountstatus.d.ts +19 -0
- package/dist/commonjs/models/accountstatus.d.ts.map +1 -0
- package/dist/commonjs/models/accountstatus.js +54 -0
- package/dist/commonjs/models/accountstatus.js.map +1 -0
- package/dist/commonjs/models/afterbalance.d.ts +24 -0
- package/dist/commonjs/models/afterbalance.d.ts.map +1 -0
- package/dist/commonjs/models/afterbalance.js +60 -0
- package/dist/commonjs/models/afterbalance.js.map +1 -0
- package/dist/commonjs/models/balance.d.ts +24 -0
- package/dist/commonjs/models/balance.d.ts.map +1 -0
- package/dist/commonjs/models/balance.js +60 -0
- package/dist/commonjs/models/balance.js.map +1 -0
- package/dist/commonjs/models/businessaccountresponse.d.ts +60 -0
- package/dist/commonjs/models/businessaccountresponse.d.ts.map +1 -0
- package/dist/commonjs/models/businessaccountresponse.js +75 -0
- package/dist/commonjs/models/businessaccountresponse.js.map +1 -0
- package/dist/commonjs/models/counterparty.d.ts +28 -0
- package/dist/commonjs/models/counterparty.d.ts.map +1 -0
- package/dist/commonjs/models/counterparty.js +61 -0
- package/dist/commonjs/models/counterparty.js.map +1 -0
- package/dist/commonjs/models/creditdebitindicator.d.ts +2 -2
- package/dist/commonjs/models/creditdebitindicator.js +1 -1
- package/dist/commonjs/models/index.d.ts +8 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +8 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/operations/getbusinessaccount.d.ts +58 -0
- package/dist/commonjs/models/operations/getbusinessaccount.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getbusinessaccount.js +88 -0
- package/dist/commonjs/models/operations/getbusinessaccount.js.map +1 -0
- package/dist/commonjs/models/operations/getbusinessaccounttransaction.d.ts +63 -0
- package/dist/commonjs/models/operations/getbusinessaccounttransaction.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getbusinessaccounttransaction.js +90 -0
- package/dist/commonjs/models/operations/getbusinessaccounttransaction.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listbusinessaccounts.d.ts +131 -0
- package/dist/commonjs/models/operations/listbusinessaccounts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listbusinessaccounts.js +161 -0
- package/dist/commonjs/models/operations/listbusinessaccounts.js.map +1 -0
- package/dist/commonjs/models/operations/listbusinessaccounttransactions.d.ts +136 -0
- package/dist/commonjs/models/operations/listbusinessaccounttransactions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listbusinessaccounttransactions.js +161 -0
- package/dist/commonjs/models/operations/listbusinessaccounttransactions.js.map +1 -0
- package/dist/commonjs/models/transactionresponse.d.ts +92 -0
- package/dist/commonjs/models/transactionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/transactionresponse.js +87 -0
- package/dist/commonjs/models/transactionresponse.js.map +1 -0
- package/dist/commonjs/models/transactiontype.d.ts +35 -0
- package/dist/commonjs/models/transactiontype.d.ts.map +1 -0
- package/dist/commonjs/models/transactiontype.js +65 -0
- package/dist/commonjs/models/transactiontype.js.map +1 -0
- package/dist/commonjs/models/transferresponse.d.ts +1 -1
- package/dist/commonjs/sdk/accounts.d.ts +45 -0
- package/dist/commonjs/sdk/accounts.d.ts.map +1 -0
- package/dist/commonjs/sdk/accounts.js +60 -0
- package/dist/commonjs/sdk/accounts.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/accountsGet.d.ts +22 -0
- package/dist/esm/funcs/accountsGet.d.ts.map +1 -0
- package/dist/esm/funcs/accountsGet.js +111 -0
- package/dist/esm/funcs/accountsGet.js.map +1 -0
- package/dist/esm/funcs/accountsGetAccount.d.ts +22 -0
- package/dist/esm/funcs/accountsGetAccount.d.ts.map +1 -0
- package/dist/esm/funcs/accountsGetAccount.js +107 -0
- package/dist/esm/funcs/accountsGetAccount.js.map +1 -0
- package/dist/esm/funcs/accountsList.d.ts +27 -0
- package/dist/esm/funcs/accountsList.d.ts.map +1 -0
- package/dist/esm/funcs/accountsList.js +142 -0
- package/dist/esm/funcs/accountsList.js.map +1 -0
- package/dist/esm/funcs/accountsListAccounts.d.ts +27 -0
- package/dist/esm/funcs/accountsListAccounts.d.ts.map +1 -0
- package/dist/esm/funcs/accountsListAccounts.js +142 -0
- package/dist/esm/funcs/accountsListAccounts.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- 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 +9 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/accountsGet.d.ts +8 -0
- package/dist/esm/mcp-server/tools/accountsGet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/accountsGet.js +30 -0
- package/dist/esm/mcp-server/tools/accountsGet.js.map +1 -0
- package/dist/esm/mcp-server/tools/accountsGetAccount.d.ts +8 -0
- package/dist/esm/mcp-server/tools/accountsGetAccount.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/accountsGetAccount.js +30 -0
- package/dist/esm/mcp-server/tools/accountsGetAccount.js.map +1 -0
- package/dist/esm/mcp-server/tools/accountsList.d.ts +8 -0
- package/dist/esm/mcp-server/tools/accountsList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/accountsList.js +31 -0
- package/dist/esm/mcp-server/tools/accountsList.js.map +1 -0
- package/dist/esm/mcp-server/tools/accountsListAccounts.d.ts +8 -0
- package/dist/esm/mcp-server/tools/accountsListAccounts.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/accountsListAccounts.js +31 -0
- package/dist/esm/mcp-server/tools/accountsListAccounts.js.map +1 -0
- package/dist/esm/models/accountdetails.d.ts +43 -0
- package/dist/esm/models/accountdetails.d.ts.map +1 -0
- package/dist/esm/models/accountdetails.js +29 -0
- package/dist/esm/models/accountdetails.js.map +1 -0
- package/dist/esm/models/accountstatus.d.ts +19 -0
- package/dist/esm/models/accountstatus.d.ts.map +1 -0
- package/dist/esm/models/accountstatus.js +18 -0
- package/dist/esm/models/accountstatus.js.map +1 -0
- package/dist/esm/models/afterbalance.d.ts +24 -0
- package/dist/esm/models/afterbalance.d.ts.map +1 -0
- package/dist/esm/models/afterbalance.js +22 -0
- package/dist/esm/models/afterbalance.js.map +1 -0
- package/dist/esm/models/balance.d.ts +24 -0
- package/dist/esm/models/balance.d.ts.map +1 -0
- package/dist/esm/models/balance.js +22 -0
- package/dist/esm/models/balance.js.map +1 -0
- package/dist/esm/models/businessaccountresponse.d.ts +60 -0
- package/dist/esm/models/businessaccountresponse.d.ts.map +1 -0
- package/dist/esm/models/businessaccountresponse.js +37 -0
- package/dist/esm/models/businessaccountresponse.js.map +1 -0
- package/dist/esm/models/counterparty.d.ts +28 -0
- package/dist/esm/models/counterparty.d.ts.map +1 -0
- package/dist/esm/models/counterparty.js +23 -0
- package/dist/esm/models/counterparty.js.map +1 -0
- package/dist/esm/models/creditdebitindicator.d.ts +2 -2
- package/dist/esm/models/creditdebitindicator.js +1 -1
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +8 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/operations/getbusinessaccount.d.ts +58 -0
- package/dist/esm/models/operations/getbusinessaccount.d.ts.map +1 -0
- package/dist/esm/models/operations/getbusinessaccount.js +48 -0
- package/dist/esm/models/operations/getbusinessaccount.js.map +1 -0
- package/dist/esm/models/operations/getbusinessaccounttransaction.d.ts +63 -0
- package/dist/esm/models/operations/getbusinessaccounttransaction.d.ts.map +1 -0
- package/dist/esm/models/operations/getbusinessaccounttransaction.js +50 -0
- package/dist/esm/models/operations/getbusinessaccounttransaction.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listbusinessaccounts.d.ts +131 -0
- package/dist/esm/models/operations/listbusinessaccounts.d.ts.map +1 -0
- package/dist/esm/models/operations/listbusinessaccounts.js +115 -0
- package/dist/esm/models/operations/listbusinessaccounts.js.map +1 -0
- package/dist/esm/models/operations/listbusinessaccounttransactions.d.ts +136 -0
- package/dist/esm/models/operations/listbusinessaccounttransactions.d.ts.map +1 -0
- package/dist/esm/models/operations/listbusinessaccounttransactions.js +115 -0
- package/dist/esm/models/operations/listbusinessaccounttransactions.js.map +1 -0
- package/dist/esm/models/transactionresponse.d.ts +92 -0
- package/dist/esm/models/transactionresponse.d.ts.map +1 -0
- package/dist/esm/models/transactionresponse.js +49 -0
- package/dist/esm/models/transactionresponse.js.map +1 -0
- package/dist/esm/models/transactiontype.d.ts +35 -0
- package/dist/esm/models/transactiontype.d.ts.map +1 -0
- package/dist/esm/models/transactiontype.js +29 -0
- package/dist/esm/models/transactiontype.js.map +1 -0
- package/dist/esm/models/transferresponse.d.ts +1 -1
- package/dist/esm/sdk/accounts.d.ts +45 -0
- package/dist/esm/sdk/accounts.d.ts.map +1 -0
- package/dist/esm/sdk/accounts.js +56 -0
- package/dist/esm/sdk/accounts.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/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/accountsGet.ts +212 -0
- package/src/funcs/accountsGetAccount.ts +205 -0
- package/src/funcs/accountsList.ts +285 -0
- package/src/funcs/accountsListAccounts.ts +275 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/accountsGet.ts +39 -0
- package/src/mcp-server/tools/accountsGetAccount.ts +39 -0
- package/src/mcp-server/tools/accountsList.ts +40 -0
- package/src/mcp-server/tools/accountsListAccounts.ts +40 -0
- package/src/models/accountdetails.ts +82 -0
- package/src/models/accountstatus.ts +34 -0
- package/src/models/afterbalance.ts +60 -0
- package/src/models/balance.ts +57 -0
- package/src/models/businessaccountresponse.ts +121 -0
- package/src/models/counterparty.ts +61 -0
- package/src/models/creditdebitindicator.ts +2 -2
- package/src/models/index.ts +8 -0
- package/src/models/operations/getbusinessaccount.ts +136 -0
- package/src/models/operations/getbusinessaccounttransaction.ts +149 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listbusinessaccounts.ts +333 -0
- package/src/models/operations/listbusinessaccounttransactions.ts +373 -0
- package/src/models/transactionresponse.ts +172 -0
- package/src/models/transactiontype.ts +50 -0
- package/src/models/transferresponse.ts +1 -1
- package/src/sdk/accounts.ts +97 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f293b6ef2c8f
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import {
|
|
10
|
+
AfterBalance,
|
|
11
|
+
AfterBalance$inboundSchema,
|
|
12
|
+
AfterBalance$Outbound,
|
|
13
|
+
AfterBalance$outboundSchema,
|
|
14
|
+
} from "./afterbalance.js";
|
|
15
|
+
import {
|
|
16
|
+
Amount,
|
|
17
|
+
Amount$inboundSchema,
|
|
18
|
+
Amount$Outbound,
|
|
19
|
+
Amount$outboundSchema,
|
|
20
|
+
} from "./amount.js";
|
|
21
|
+
import {
|
|
22
|
+
Counterparty,
|
|
23
|
+
Counterparty$inboundSchema,
|
|
24
|
+
Counterparty$Outbound,
|
|
25
|
+
Counterparty$outboundSchema,
|
|
26
|
+
} from "./counterparty.js";
|
|
27
|
+
import {
|
|
28
|
+
CreditDebitIndicator,
|
|
29
|
+
CreditDebitIndicator$inboundSchema,
|
|
30
|
+
CreditDebitIndicator$outboundSchema,
|
|
31
|
+
} from "./creditdebitindicator.js";
|
|
32
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
33
|
+
import { Mode, Mode$inboundSchema, Mode$outboundSchema } from "./mode.js";
|
|
34
|
+
import {
|
|
35
|
+
TransactionType,
|
|
36
|
+
TransactionType$inboundSchema,
|
|
37
|
+
TransactionType$outboundSchema,
|
|
38
|
+
} from "./transactiontype.js";
|
|
39
|
+
|
|
40
|
+
export type TransactionResponse = {
|
|
41
|
+
/**
|
|
42
|
+
* Indicates the response contains a business account transaction object. Will always contain the string
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* `business-account-transaction` for this endpoint.
|
|
46
|
+
*/
|
|
47
|
+
resource: string;
|
|
48
|
+
/**
|
|
49
|
+
* The identifier uniquely referring to this transaction. Mollie assigns this identifier at transaction creation
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* time.
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* The identifier of the business account this transaction belongs to.
|
|
57
|
+
*/
|
|
58
|
+
businessAccountId: string;
|
|
59
|
+
/**
|
|
60
|
+
* Indicates whether the entry is a credit or debit from the perspective of the account holder.
|
|
61
|
+
*/
|
|
62
|
+
creditDebitIndicator: CreditDebitIndicator;
|
|
63
|
+
/**
|
|
64
|
+
* Indicates what kind of transaction this is.
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
*
|
|
68
|
+
* We may introduce new transaction types as we expand the product. We recommend building your integration
|
|
69
|
+
* to handle unexpected values gracefully, so nothing breaks when that happens.
|
|
70
|
+
*/
|
|
71
|
+
type: TransactionType;
|
|
72
|
+
/**
|
|
73
|
+
* In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
|
|
74
|
+
*/
|
|
75
|
+
amount: Amount;
|
|
76
|
+
/**
|
|
77
|
+
* A short description of the transaction.
|
|
78
|
+
*/
|
|
79
|
+
description?: string | null | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* The counterparty involved in the transaction, including their name and account identifier.
|
|
82
|
+
*/
|
|
83
|
+
counterparty?: Counterparty | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* The balance of the business account after this transaction was processed.
|
|
86
|
+
*/
|
|
87
|
+
afterBalance?: AfterBalance | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* The date and time when the transaction was processed, in ISO 8601 format.
|
|
90
|
+
*/
|
|
91
|
+
processedAt?: string | null | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Whether this entity was created in live mode or in test mode.
|
|
94
|
+
*/
|
|
95
|
+
mode: Mode;
|
|
96
|
+
/**
|
|
97
|
+
* The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
98
|
+
*/
|
|
99
|
+
createdAt: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const TransactionResponse$inboundSchema: z.ZodType<
|
|
104
|
+
TransactionResponse,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
unknown
|
|
107
|
+
> = z.object({
|
|
108
|
+
resource: z.string(),
|
|
109
|
+
id: z.string(),
|
|
110
|
+
businessAccountId: z.string(),
|
|
111
|
+
creditDebitIndicator: CreditDebitIndicator$inboundSchema,
|
|
112
|
+
type: TransactionType$inboundSchema,
|
|
113
|
+
amount: Amount$inboundSchema,
|
|
114
|
+
description: z.nullable(z.string()).optional(),
|
|
115
|
+
counterparty: Counterparty$inboundSchema.optional(),
|
|
116
|
+
afterBalance: AfterBalance$inboundSchema.optional(),
|
|
117
|
+
processedAt: z.nullable(z.string()).optional(),
|
|
118
|
+
mode: Mode$inboundSchema,
|
|
119
|
+
createdAt: z.string(),
|
|
120
|
+
});
|
|
121
|
+
/** @internal */
|
|
122
|
+
export type TransactionResponse$Outbound = {
|
|
123
|
+
resource: string;
|
|
124
|
+
id: string;
|
|
125
|
+
businessAccountId: string;
|
|
126
|
+
creditDebitIndicator: string;
|
|
127
|
+
type: string;
|
|
128
|
+
amount: Amount$Outbound;
|
|
129
|
+
description?: string | null | undefined;
|
|
130
|
+
counterparty?: Counterparty$Outbound | undefined;
|
|
131
|
+
afterBalance?: AfterBalance$Outbound | undefined;
|
|
132
|
+
processedAt?: string | null | undefined;
|
|
133
|
+
mode: string;
|
|
134
|
+
createdAt: string;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const TransactionResponse$outboundSchema: z.ZodType<
|
|
139
|
+
TransactionResponse$Outbound,
|
|
140
|
+
z.ZodTypeDef,
|
|
141
|
+
TransactionResponse
|
|
142
|
+
> = z.object({
|
|
143
|
+
resource: z.string(),
|
|
144
|
+
id: z.string(),
|
|
145
|
+
businessAccountId: z.string(),
|
|
146
|
+
creditDebitIndicator: CreditDebitIndicator$outboundSchema,
|
|
147
|
+
type: TransactionType$outboundSchema,
|
|
148
|
+
amount: Amount$outboundSchema,
|
|
149
|
+
description: z.nullable(z.string()).optional(),
|
|
150
|
+
counterparty: Counterparty$outboundSchema.optional(),
|
|
151
|
+
afterBalance: AfterBalance$outboundSchema.optional(),
|
|
152
|
+
processedAt: z.nullable(z.string()).optional(),
|
|
153
|
+
mode: Mode$outboundSchema,
|
|
154
|
+
createdAt: z.string(),
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
export function transactionResponseToJSON(
|
|
158
|
+
transactionResponse: TransactionResponse,
|
|
159
|
+
): string {
|
|
160
|
+
return JSON.stringify(
|
|
161
|
+
TransactionResponse$outboundSchema.parse(transactionResponse),
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
export function transactionResponseFromJSON(
|
|
165
|
+
jsonString: string,
|
|
166
|
+
): SafeParseResult<TransactionResponse, SDKValidationError> {
|
|
167
|
+
return safeParse(
|
|
168
|
+
jsonString,
|
|
169
|
+
(x) => TransactionResponse$inboundSchema.parse(JSON.parse(x)),
|
|
170
|
+
`Failed to parse 'TransactionResponse' from JSON`,
|
|
171
|
+
);
|
|
172
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 50b0e691d718
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../types/enums.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Indicates what kind of transaction this is.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
*
|
|
15
|
+
* We may introduce new transaction types as we expand the product. We recommend building your integration
|
|
16
|
+
* to handle unexpected values gracefully, so nothing breaks when that happens.
|
|
17
|
+
*/
|
|
18
|
+
export const TransactionType = {
|
|
19
|
+
CardPayment: "card-payment",
|
|
20
|
+
BankTransfer: "bank-transfer",
|
|
21
|
+
PspTransfer: "psp-transfer",
|
|
22
|
+
InternalTransfer: "internal-transfer",
|
|
23
|
+
IdealPayment: "ideal-payment",
|
|
24
|
+
Fee: "fee",
|
|
25
|
+
Correction: "correction",
|
|
26
|
+
DirectDebit: "direct-debit",
|
|
27
|
+
DirectDebitRefund: "direct-debit-refund",
|
|
28
|
+
} as const;
|
|
29
|
+
/**
|
|
30
|
+
* Indicates what kind of transaction this is.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
*
|
|
34
|
+
* We may introduce new transaction types as we expand the product. We recommend building your integration
|
|
35
|
+
* to handle unexpected values gracefully, so nothing breaks when that happens.
|
|
36
|
+
*/
|
|
37
|
+
export type TransactionType = OpenEnum<typeof TransactionType>;
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const TransactionType$inboundSchema: z.ZodType<
|
|
41
|
+
TransactionType,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = openEnums.inboundSchema(TransactionType);
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const TransactionType$outboundSchema: z.ZodType<
|
|
47
|
+
string,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
TransactionType
|
|
50
|
+
> = openEnums.outboundSchema(TransactionType);
|
|
@@ -132,7 +132,7 @@ export type TransferResponse = {
|
|
|
132
132
|
*/
|
|
133
133
|
transferScheme: TransferSchemeResponse;
|
|
134
134
|
/**
|
|
135
|
-
* Indicates whether the
|
|
135
|
+
* Indicates whether the entry is a credit or debit from the perspective of the account holder.
|
|
136
136
|
*/
|
|
137
137
|
creditDebitIndicator: CreditDebitIndicator;
|
|
138
138
|
/**
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a4031260e046
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { accountsGet } from "../funcs/accountsGet.js";
|
|
7
|
+
import { accountsGetAccount } from "../funcs/accountsGetAccount.js";
|
|
8
|
+
import { accountsList } from "../funcs/accountsList.js";
|
|
9
|
+
import { accountsListAccounts } from "../funcs/accountsListAccounts.js";
|
|
10
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import * as models from "../models/index.js";
|
|
12
|
+
import * as operations from "../models/operations/index.js";
|
|
13
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
14
|
+
import { PageIterator, unwrapResultIterator } from "../types/operations.js";
|
|
15
|
+
|
|
16
|
+
export class Accounts extends ClientSDK {
|
|
17
|
+
/**
|
|
18
|
+
* List business accounts
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Retrieve all business accounts for the authenticated organization.
|
|
22
|
+
*
|
|
23
|
+
* The results are paginated.
|
|
24
|
+
*/
|
|
25
|
+
async listAccounts(
|
|
26
|
+
request?: operations.ListBusinessAccountsRequest | undefined,
|
|
27
|
+
options?: RequestOptions,
|
|
28
|
+
): Promise<
|
|
29
|
+
PageIterator<operations.ListBusinessAccountsResponse, { url: string }>
|
|
30
|
+
> {
|
|
31
|
+
return unwrapResultIterator(accountsListAccounts(
|
|
32
|
+
this,
|
|
33
|
+
request,
|
|
34
|
+
options,
|
|
35
|
+
));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get business account
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Retrieve a single business account object by its account ID. This allows you to check the current status,
|
|
43
|
+
* balance, and account details.
|
|
44
|
+
*/
|
|
45
|
+
async getAccount(
|
|
46
|
+
request: operations.GetBusinessAccountRequest,
|
|
47
|
+
options?: RequestOptions,
|
|
48
|
+
): Promise<models.BusinessAccountResponse> {
|
|
49
|
+
return unwrapAsync(accountsGetAccount(
|
|
50
|
+
this,
|
|
51
|
+
request,
|
|
52
|
+
options,
|
|
53
|
+
));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* List transactions
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Retrieve all transactions for a specific business account.
|
|
61
|
+
*
|
|
62
|
+
* The results are paginated.
|
|
63
|
+
*/
|
|
64
|
+
async list(
|
|
65
|
+
request: operations.ListBusinessAccountTransactionsRequest,
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): Promise<
|
|
68
|
+
PageIterator<
|
|
69
|
+
operations.ListBusinessAccountTransactionsResponse,
|
|
70
|
+
{ url: string }
|
|
71
|
+
>
|
|
72
|
+
> {
|
|
73
|
+
return unwrapResultIterator(accountsList(
|
|
74
|
+
this,
|
|
75
|
+
request,
|
|
76
|
+
options,
|
|
77
|
+
));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get transaction
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Retrieve a single transaction object by its transaction ID. This allows you to check the details,
|
|
85
|
+
* amount, counterparty, and balance impact of a specific transaction.
|
|
86
|
+
*/
|
|
87
|
+
async get(
|
|
88
|
+
request: operations.GetBusinessAccountTransactionRequest,
|
|
89
|
+
options?: RequestOptions,
|
|
90
|
+
): Promise<models.TransactionResponse> {
|
|
91
|
+
return unwrapAsync(accountsGet(
|
|
92
|
+
this,
|
|
93
|
+
request,
|
|
94
|
+
options,
|
|
95
|
+
));
|
|
96
|
+
}
|
|
97
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { ClientSDK } from "../lib/sdks.js";
|
|
7
|
+
import { Accounts } from "./accounts.js";
|
|
7
8
|
import { Balances } from "./balances.js";
|
|
8
9
|
import { BalanceTransfers } from "./balancetransfers.js";
|
|
9
10
|
import { Capabilities } from "./capabilities.js";
|
|
@@ -170,6 +171,11 @@ export class Client extends ClientSDK {
|
|
|
170
171
|
return (this._salesInvoices ??= new SalesInvoices(this._options));
|
|
171
172
|
}
|
|
172
173
|
|
|
174
|
+
private _accounts?: Accounts;
|
|
175
|
+
get accounts(): Accounts {
|
|
176
|
+
return (this._accounts ??= new Accounts(this._options));
|
|
177
|
+
}
|
|
178
|
+
|
|
173
179
|
private _transfers?: Transfers;
|
|
174
180
|
get transfers(): Transfers {
|
|
175
181
|
return (this._transfers ??= new Transfers(this._options));
|