mollie-api-typescript 1.3.6 → 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.
Files changed (244) hide show
  1. package/README.md +11 -0
  2. package/bin/mcp-server.js +1716 -768
  3. package/bin/mcp-server.js.map +32 -12
  4. package/dist/commonjs/funcs/accountsGet.d.ts +22 -0
  5. package/dist/commonjs/funcs/accountsGet.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/accountsGet.js +147 -0
  7. package/dist/commonjs/funcs/accountsGet.js.map +1 -0
  8. package/dist/commonjs/funcs/accountsGetAccount.d.ts +22 -0
  9. package/dist/commonjs/funcs/accountsGetAccount.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/accountsGetAccount.js +143 -0
  11. package/dist/commonjs/funcs/accountsGetAccount.js.map +1 -0
  12. package/dist/commonjs/funcs/accountsList.d.ts +27 -0
  13. package/dist/commonjs/funcs/accountsList.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/accountsList.js +178 -0
  15. package/dist/commonjs/funcs/accountsList.js.map +1 -0
  16. package/dist/commonjs/funcs/accountsListAccounts.d.ts +27 -0
  17. package/dist/commonjs/funcs/accountsListAccounts.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/accountsListAccounts.js +178 -0
  19. package/dist/commonjs/funcs/accountsListAccounts.js.map +1 -0
  20. package/dist/commonjs/lib/config.d.ts +2 -2
  21. package/dist/commonjs/lib/config.js +2 -2
  22. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  23. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  24. package/dist/commonjs/mcp-server/server.js +9 -1
  25. package/dist/commonjs/mcp-server/server.js.map +1 -1
  26. package/dist/commonjs/mcp-server/tools/accountsGet.d.ts +8 -0
  27. package/dist/commonjs/mcp-server/tools/accountsGet.d.ts.map +1 -0
  28. package/dist/commonjs/mcp-server/tools/accountsGet.js +66 -0
  29. package/dist/commonjs/mcp-server/tools/accountsGet.js.map +1 -0
  30. package/dist/commonjs/mcp-server/tools/accountsGetAccount.d.ts +8 -0
  31. package/dist/commonjs/mcp-server/tools/accountsGetAccount.d.ts.map +1 -0
  32. package/dist/commonjs/mcp-server/tools/accountsGetAccount.js +66 -0
  33. package/dist/commonjs/mcp-server/tools/accountsGetAccount.js.map +1 -0
  34. package/dist/commonjs/mcp-server/tools/accountsList.d.ts +8 -0
  35. package/dist/commonjs/mcp-server/tools/accountsList.d.ts.map +1 -0
  36. package/dist/commonjs/mcp-server/tools/accountsList.js +67 -0
  37. package/dist/commonjs/mcp-server/tools/accountsList.js.map +1 -0
  38. package/dist/commonjs/mcp-server/tools/accountsListAccounts.d.ts +8 -0
  39. package/dist/commonjs/mcp-server/tools/accountsListAccounts.d.ts.map +1 -0
  40. package/dist/commonjs/mcp-server/tools/accountsListAccounts.js +67 -0
  41. package/dist/commonjs/mcp-server/tools/accountsListAccounts.js.map +1 -0
  42. package/dist/commonjs/models/accountdetails.d.ts +43 -0
  43. package/dist/commonjs/models/accountdetails.d.ts.map +1 -0
  44. package/dist/commonjs/models/accountdetails.js +67 -0
  45. package/dist/commonjs/models/accountdetails.js.map +1 -0
  46. package/dist/commonjs/models/accountstatus.d.ts +19 -0
  47. package/dist/commonjs/models/accountstatus.d.ts.map +1 -0
  48. package/dist/commonjs/models/accountstatus.js +54 -0
  49. package/dist/commonjs/models/accountstatus.js.map +1 -0
  50. package/dist/commonjs/models/afterbalance.d.ts +24 -0
  51. package/dist/commonjs/models/afterbalance.d.ts.map +1 -0
  52. package/dist/commonjs/models/afterbalance.js +60 -0
  53. package/dist/commonjs/models/afterbalance.js.map +1 -0
  54. package/dist/commonjs/models/balance.d.ts +24 -0
  55. package/dist/commonjs/models/balance.d.ts.map +1 -0
  56. package/dist/commonjs/models/balance.js +60 -0
  57. package/dist/commonjs/models/balance.js.map +1 -0
  58. package/dist/commonjs/models/businessaccountresponse.d.ts +60 -0
  59. package/dist/commonjs/models/businessaccountresponse.d.ts.map +1 -0
  60. package/dist/commonjs/models/businessaccountresponse.js +75 -0
  61. package/dist/commonjs/models/businessaccountresponse.js.map +1 -0
  62. package/dist/commonjs/models/counterparty.d.ts +28 -0
  63. package/dist/commonjs/models/counterparty.d.ts.map +1 -0
  64. package/dist/commonjs/models/counterparty.js +61 -0
  65. package/dist/commonjs/models/counterparty.js.map +1 -0
  66. package/dist/commonjs/models/creditdebitindicator.d.ts +2 -2
  67. package/dist/commonjs/models/creditdebitindicator.js +1 -1
  68. package/dist/commonjs/models/index.d.ts +8 -0
  69. package/dist/commonjs/models/index.d.ts.map +1 -1
  70. package/dist/commonjs/models/index.js +8 -0
  71. package/dist/commonjs/models/index.js.map +1 -1
  72. package/dist/commonjs/models/operations/getbusinessaccount.d.ts +58 -0
  73. package/dist/commonjs/models/operations/getbusinessaccount.d.ts.map +1 -0
  74. package/dist/commonjs/models/operations/getbusinessaccount.js +88 -0
  75. package/dist/commonjs/models/operations/getbusinessaccount.js.map +1 -0
  76. package/dist/commonjs/models/operations/getbusinessaccounttransaction.d.ts +63 -0
  77. package/dist/commonjs/models/operations/getbusinessaccounttransaction.d.ts.map +1 -0
  78. package/dist/commonjs/models/operations/getbusinessaccounttransaction.js +90 -0
  79. package/dist/commonjs/models/operations/getbusinessaccounttransaction.js.map +1 -0
  80. package/dist/commonjs/models/operations/index.d.ts +4 -0
  81. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  82. package/dist/commonjs/models/operations/index.js +4 -0
  83. package/dist/commonjs/models/operations/index.js.map +1 -1
  84. package/dist/commonjs/models/operations/listbusinessaccounts.d.ts +131 -0
  85. package/dist/commonjs/models/operations/listbusinessaccounts.d.ts.map +1 -0
  86. package/dist/commonjs/models/operations/listbusinessaccounts.js +161 -0
  87. package/dist/commonjs/models/operations/listbusinessaccounts.js.map +1 -0
  88. package/dist/commonjs/models/operations/listbusinessaccounttransactions.d.ts +136 -0
  89. package/dist/commonjs/models/operations/listbusinessaccounttransactions.d.ts.map +1 -0
  90. package/dist/commonjs/models/operations/listbusinessaccounttransactions.js +161 -0
  91. package/dist/commonjs/models/operations/listbusinessaccounttransactions.js.map +1 -0
  92. package/dist/commonjs/models/transactionresponse.d.ts +92 -0
  93. package/dist/commonjs/models/transactionresponse.d.ts.map +1 -0
  94. package/dist/commonjs/models/transactionresponse.js +87 -0
  95. package/dist/commonjs/models/transactionresponse.js.map +1 -0
  96. package/dist/commonjs/models/transactiontype.d.ts +35 -0
  97. package/dist/commonjs/models/transactiontype.d.ts.map +1 -0
  98. package/dist/commonjs/models/transactiontype.js +65 -0
  99. package/dist/commonjs/models/transactiontype.js.map +1 -0
  100. package/dist/commonjs/models/transferresponse.d.ts +1 -1
  101. package/dist/commonjs/sdk/accounts.d.ts +45 -0
  102. package/dist/commonjs/sdk/accounts.d.ts.map +1 -0
  103. package/dist/commonjs/sdk/accounts.js +60 -0
  104. package/dist/commonjs/sdk/accounts.js.map +1 -0
  105. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  106. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  107. package/dist/commonjs/sdk/sdk.js +4 -0
  108. package/dist/commonjs/sdk/sdk.js.map +1 -1
  109. package/dist/esm/funcs/accountsGet.d.ts +22 -0
  110. package/dist/esm/funcs/accountsGet.d.ts.map +1 -0
  111. package/dist/esm/funcs/accountsGet.js +111 -0
  112. package/dist/esm/funcs/accountsGet.js.map +1 -0
  113. package/dist/esm/funcs/accountsGetAccount.d.ts +22 -0
  114. package/dist/esm/funcs/accountsGetAccount.d.ts.map +1 -0
  115. package/dist/esm/funcs/accountsGetAccount.js +107 -0
  116. package/dist/esm/funcs/accountsGetAccount.js.map +1 -0
  117. package/dist/esm/funcs/accountsList.d.ts +27 -0
  118. package/dist/esm/funcs/accountsList.d.ts.map +1 -0
  119. package/dist/esm/funcs/accountsList.js +142 -0
  120. package/dist/esm/funcs/accountsList.js.map +1 -0
  121. package/dist/esm/funcs/accountsListAccounts.d.ts +27 -0
  122. package/dist/esm/funcs/accountsListAccounts.d.ts.map +1 -0
  123. package/dist/esm/funcs/accountsListAccounts.js +142 -0
  124. package/dist/esm/funcs/accountsListAccounts.js.map +1 -0
  125. package/dist/esm/lib/config.d.ts +2 -2
  126. package/dist/esm/lib/config.js +2 -2
  127. package/dist/esm/mcp-server/mcp-server.js +1 -1
  128. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  129. package/dist/esm/mcp-server/server.js +9 -1
  130. package/dist/esm/mcp-server/server.js.map +1 -1
  131. package/dist/esm/mcp-server/tools/accountsGet.d.ts +8 -0
  132. package/dist/esm/mcp-server/tools/accountsGet.d.ts.map +1 -0
  133. package/dist/esm/mcp-server/tools/accountsGet.js +30 -0
  134. package/dist/esm/mcp-server/tools/accountsGet.js.map +1 -0
  135. package/dist/esm/mcp-server/tools/accountsGetAccount.d.ts +8 -0
  136. package/dist/esm/mcp-server/tools/accountsGetAccount.d.ts.map +1 -0
  137. package/dist/esm/mcp-server/tools/accountsGetAccount.js +30 -0
  138. package/dist/esm/mcp-server/tools/accountsGetAccount.js.map +1 -0
  139. package/dist/esm/mcp-server/tools/accountsList.d.ts +8 -0
  140. package/dist/esm/mcp-server/tools/accountsList.d.ts.map +1 -0
  141. package/dist/esm/mcp-server/tools/accountsList.js +31 -0
  142. package/dist/esm/mcp-server/tools/accountsList.js.map +1 -0
  143. package/dist/esm/mcp-server/tools/accountsListAccounts.d.ts +8 -0
  144. package/dist/esm/mcp-server/tools/accountsListAccounts.d.ts.map +1 -0
  145. package/dist/esm/mcp-server/tools/accountsListAccounts.js +31 -0
  146. package/dist/esm/mcp-server/tools/accountsListAccounts.js.map +1 -0
  147. package/dist/esm/models/accountdetails.d.ts +43 -0
  148. package/dist/esm/models/accountdetails.d.ts.map +1 -0
  149. package/dist/esm/models/accountdetails.js +29 -0
  150. package/dist/esm/models/accountdetails.js.map +1 -0
  151. package/dist/esm/models/accountstatus.d.ts +19 -0
  152. package/dist/esm/models/accountstatus.d.ts.map +1 -0
  153. package/dist/esm/models/accountstatus.js +18 -0
  154. package/dist/esm/models/accountstatus.js.map +1 -0
  155. package/dist/esm/models/afterbalance.d.ts +24 -0
  156. package/dist/esm/models/afterbalance.d.ts.map +1 -0
  157. package/dist/esm/models/afterbalance.js +22 -0
  158. package/dist/esm/models/afterbalance.js.map +1 -0
  159. package/dist/esm/models/balance.d.ts +24 -0
  160. package/dist/esm/models/balance.d.ts.map +1 -0
  161. package/dist/esm/models/balance.js +22 -0
  162. package/dist/esm/models/balance.js.map +1 -0
  163. package/dist/esm/models/businessaccountresponse.d.ts +60 -0
  164. package/dist/esm/models/businessaccountresponse.d.ts.map +1 -0
  165. package/dist/esm/models/businessaccountresponse.js +37 -0
  166. package/dist/esm/models/businessaccountresponse.js.map +1 -0
  167. package/dist/esm/models/counterparty.d.ts +28 -0
  168. package/dist/esm/models/counterparty.d.ts.map +1 -0
  169. package/dist/esm/models/counterparty.js +23 -0
  170. package/dist/esm/models/counterparty.js.map +1 -0
  171. package/dist/esm/models/creditdebitindicator.d.ts +2 -2
  172. package/dist/esm/models/creditdebitindicator.js +1 -1
  173. package/dist/esm/models/index.d.ts +8 -0
  174. package/dist/esm/models/index.d.ts.map +1 -1
  175. package/dist/esm/models/index.js +8 -0
  176. package/dist/esm/models/index.js.map +1 -1
  177. package/dist/esm/models/operations/getbusinessaccount.d.ts +58 -0
  178. package/dist/esm/models/operations/getbusinessaccount.d.ts.map +1 -0
  179. package/dist/esm/models/operations/getbusinessaccount.js +48 -0
  180. package/dist/esm/models/operations/getbusinessaccount.js.map +1 -0
  181. package/dist/esm/models/operations/getbusinessaccounttransaction.d.ts +63 -0
  182. package/dist/esm/models/operations/getbusinessaccounttransaction.d.ts.map +1 -0
  183. package/dist/esm/models/operations/getbusinessaccounttransaction.js +50 -0
  184. package/dist/esm/models/operations/getbusinessaccounttransaction.js.map +1 -0
  185. package/dist/esm/models/operations/index.d.ts +4 -0
  186. package/dist/esm/models/operations/index.d.ts.map +1 -1
  187. package/dist/esm/models/operations/index.js +4 -0
  188. package/dist/esm/models/operations/index.js.map +1 -1
  189. package/dist/esm/models/operations/listbusinessaccounts.d.ts +131 -0
  190. package/dist/esm/models/operations/listbusinessaccounts.d.ts.map +1 -0
  191. package/dist/esm/models/operations/listbusinessaccounts.js +115 -0
  192. package/dist/esm/models/operations/listbusinessaccounts.js.map +1 -0
  193. package/dist/esm/models/operations/listbusinessaccounttransactions.d.ts +136 -0
  194. package/dist/esm/models/operations/listbusinessaccounttransactions.d.ts.map +1 -0
  195. package/dist/esm/models/operations/listbusinessaccounttransactions.js +115 -0
  196. package/dist/esm/models/operations/listbusinessaccounttransactions.js.map +1 -0
  197. package/dist/esm/models/transactionresponse.d.ts +92 -0
  198. package/dist/esm/models/transactionresponse.d.ts.map +1 -0
  199. package/dist/esm/models/transactionresponse.js +49 -0
  200. package/dist/esm/models/transactionresponse.js.map +1 -0
  201. package/dist/esm/models/transactiontype.d.ts +35 -0
  202. package/dist/esm/models/transactiontype.d.ts.map +1 -0
  203. package/dist/esm/models/transactiontype.js +29 -0
  204. package/dist/esm/models/transactiontype.js.map +1 -0
  205. package/dist/esm/models/transferresponse.d.ts +1 -1
  206. package/dist/esm/sdk/accounts.d.ts +45 -0
  207. package/dist/esm/sdk/accounts.d.ts.map +1 -0
  208. package/dist/esm/sdk/accounts.js +56 -0
  209. package/dist/esm/sdk/accounts.js.map +1 -0
  210. package/dist/esm/sdk/sdk.d.ts +3 -0
  211. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  212. package/dist/esm/sdk/sdk.js +4 -0
  213. package/dist/esm/sdk/sdk.js.map +1 -1
  214. package/jsr.json +1 -1
  215. package/package.json +1 -1
  216. package/src/funcs/accountsGet.ts +212 -0
  217. package/src/funcs/accountsGetAccount.ts +205 -0
  218. package/src/funcs/accountsList.ts +285 -0
  219. package/src/funcs/accountsListAccounts.ts +275 -0
  220. package/src/lib/config.ts +2 -2
  221. package/src/mcp-server/mcp-server.ts +1 -1
  222. package/src/mcp-server/server.ts +9 -1
  223. package/src/mcp-server/tools/accountsGet.ts +39 -0
  224. package/src/mcp-server/tools/accountsGetAccount.ts +39 -0
  225. package/src/mcp-server/tools/accountsList.ts +40 -0
  226. package/src/mcp-server/tools/accountsListAccounts.ts +40 -0
  227. package/src/models/accountdetails.ts +82 -0
  228. package/src/models/accountstatus.ts +34 -0
  229. package/src/models/afterbalance.ts +60 -0
  230. package/src/models/balance.ts +57 -0
  231. package/src/models/businessaccountresponse.ts +121 -0
  232. package/src/models/counterparty.ts +61 -0
  233. package/src/models/creditdebitindicator.ts +2 -2
  234. package/src/models/index.ts +8 -0
  235. package/src/models/operations/getbusinessaccount.ts +136 -0
  236. package/src/models/operations/getbusinessaccounttransaction.ts +149 -0
  237. package/src/models/operations/index.ts +4 -0
  238. package/src/models/operations/listbusinessaccounts.ts +333 -0
  239. package/src/models/operations/listbusinessaccounttransactions.ts +373 -0
  240. package/src/models/transactionresponse.ts +172 -0
  241. package/src/models/transactiontype.ts +50 -0
  242. package/src/models/transferresponse.ts +1 -1
  243. package/src/sdk/accounts.ts +97 -0
  244. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,333 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 5c6ec2f06f8c
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import { remap as remap$ } from "../../lib/primitives.js";
8
+ import { safeParse } from "../../lib/schemas.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import * as models from "../index.js";
12
+
13
+ export type ListBusinessAccountsGlobals = {
14
+ /**
15
+ * Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
16
+ *
17
+ * @remarks
18
+ * parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
19
+ * setting the `testmode` query parameter to `true`.
20
+ *
21
+ * Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
22
+ */
23
+ testmode?: boolean | undefined;
24
+ };
25
+
26
+ export type ListBusinessAccountsRequest = {
27
+ /**
28
+ * Provide an ID to start the result set from the item with the given ID and onwards. This allows you to paginate
29
+ *
30
+ * @remarks
31
+ * the result set.
32
+ */
33
+ from?: string | undefined;
34
+ /**
35
+ * The maximum number of items to return. Defaults to 50 items.
36
+ */
37
+ limit?: number | null | undefined;
38
+ /**
39
+ * Used for setting the direction of the result set. Defaults to descending order, meaning the results are ordered from
40
+ *
41
+ * @remarks
42
+ * newest to oldest.
43
+ */
44
+ sort?: models.Sorting | undefined;
45
+ /**
46
+ * Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
47
+ *
48
+ * @remarks
49
+ * parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
50
+ * setting the `testmode` query parameter to `true`.
51
+ *
52
+ * Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
53
+ */
54
+ testmode?: boolean | undefined;
55
+ /**
56
+ * A unique key to ensure idempotent requests. This key should be a UUID v4 string.
57
+ */
58
+ idempotencyKey?: string | undefined;
59
+ };
60
+
61
+ export type ListBusinessAccountsEmbedded = {
62
+ /**
63
+ * An array of business account objects.
64
+ */
65
+ businessAccounts?: Array<models.BusinessAccountResponse> | undefined;
66
+ };
67
+
68
+ /**
69
+ * A list of business account objects.
70
+ */
71
+ export type ListBusinessAccountsResponseBody = {
72
+ /**
73
+ * The number of items in this result set. If more items are available, a `_links.next` URL will be present in the result
74
+ *
75
+ * @remarks
76
+ * as well.
77
+ *
78
+ * The maximum number of items per result set is controlled by the `limit` property provided in the request. The default
79
+ * limit is 50 items.
80
+ */
81
+ count: number;
82
+ embedded: ListBusinessAccountsEmbedded;
83
+ };
84
+
85
+ export type ListBusinessAccountsResponse = {
86
+ result: ListBusinessAccountsResponseBody;
87
+ };
88
+
89
+ /** @internal */
90
+ export const ListBusinessAccountsGlobals$inboundSchema: z.ZodType<
91
+ ListBusinessAccountsGlobals,
92
+ z.ZodTypeDef,
93
+ unknown
94
+ > = z.object({
95
+ testmode: z.boolean().optional(),
96
+ });
97
+ /** @internal */
98
+ export type ListBusinessAccountsGlobals$Outbound = {
99
+ testmode?: boolean | undefined;
100
+ };
101
+
102
+ /** @internal */
103
+ export const ListBusinessAccountsGlobals$outboundSchema: z.ZodType<
104
+ ListBusinessAccountsGlobals$Outbound,
105
+ z.ZodTypeDef,
106
+ ListBusinessAccountsGlobals
107
+ > = z.object({
108
+ testmode: z.boolean().optional(),
109
+ });
110
+
111
+ export function listBusinessAccountsGlobalsToJSON(
112
+ listBusinessAccountsGlobals: ListBusinessAccountsGlobals,
113
+ ): string {
114
+ return JSON.stringify(
115
+ ListBusinessAccountsGlobals$outboundSchema.parse(
116
+ listBusinessAccountsGlobals,
117
+ ),
118
+ );
119
+ }
120
+ export function listBusinessAccountsGlobalsFromJSON(
121
+ jsonString: string,
122
+ ): SafeParseResult<ListBusinessAccountsGlobals, SDKValidationError> {
123
+ return safeParse(
124
+ jsonString,
125
+ (x) => ListBusinessAccountsGlobals$inboundSchema.parse(JSON.parse(x)),
126
+ `Failed to parse 'ListBusinessAccountsGlobals' from JSON`,
127
+ );
128
+ }
129
+
130
+ /** @internal */
131
+ export const ListBusinessAccountsRequest$inboundSchema: z.ZodType<
132
+ ListBusinessAccountsRequest,
133
+ z.ZodTypeDef,
134
+ unknown
135
+ > = z.object({
136
+ from: z.string().optional(),
137
+ limit: z.nullable(z.number().int()).optional(),
138
+ sort: models.Sorting$inboundSchema.optional(),
139
+ testmode: z.boolean().optional(),
140
+ "idempotency-key": z.string().optional(),
141
+ }).transform((v) => {
142
+ return remap$(v, {
143
+ "idempotency-key": "idempotencyKey",
144
+ });
145
+ });
146
+ /** @internal */
147
+ export type ListBusinessAccountsRequest$Outbound = {
148
+ from?: string | undefined;
149
+ limit?: number | null | undefined;
150
+ sort?: string | undefined;
151
+ testmode?: boolean | undefined;
152
+ "idempotency-key"?: string | undefined;
153
+ };
154
+
155
+ /** @internal */
156
+ export const ListBusinessAccountsRequest$outboundSchema: z.ZodType<
157
+ ListBusinessAccountsRequest$Outbound,
158
+ z.ZodTypeDef,
159
+ ListBusinessAccountsRequest
160
+ > = z.object({
161
+ from: z.string().optional(),
162
+ limit: z.nullable(z.number().int()).optional(),
163
+ sort: models.Sorting$outboundSchema.optional(),
164
+ testmode: z.boolean().optional(),
165
+ idempotencyKey: z.string().optional(),
166
+ }).transform((v) => {
167
+ return remap$(v, {
168
+ idempotencyKey: "idempotency-key",
169
+ });
170
+ });
171
+
172
+ export function listBusinessAccountsRequestToJSON(
173
+ listBusinessAccountsRequest: ListBusinessAccountsRequest,
174
+ ): string {
175
+ return JSON.stringify(
176
+ ListBusinessAccountsRequest$outboundSchema.parse(
177
+ listBusinessAccountsRequest,
178
+ ),
179
+ );
180
+ }
181
+ export function listBusinessAccountsRequestFromJSON(
182
+ jsonString: string,
183
+ ): SafeParseResult<ListBusinessAccountsRequest, SDKValidationError> {
184
+ return safeParse(
185
+ jsonString,
186
+ (x) => ListBusinessAccountsRequest$inboundSchema.parse(JSON.parse(x)),
187
+ `Failed to parse 'ListBusinessAccountsRequest' from JSON`,
188
+ );
189
+ }
190
+
191
+ /** @internal */
192
+ export const ListBusinessAccountsEmbedded$inboundSchema: z.ZodType<
193
+ ListBusinessAccountsEmbedded,
194
+ z.ZodTypeDef,
195
+ unknown
196
+ > = z.object({
197
+ businessAccounts: z.array(models.BusinessAccountResponse$inboundSchema)
198
+ .optional(),
199
+ });
200
+ /** @internal */
201
+ export type ListBusinessAccountsEmbedded$Outbound = {
202
+ businessAccounts?: Array<models.BusinessAccountResponse$Outbound> | undefined;
203
+ };
204
+
205
+ /** @internal */
206
+ export const ListBusinessAccountsEmbedded$outboundSchema: z.ZodType<
207
+ ListBusinessAccountsEmbedded$Outbound,
208
+ z.ZodTypeDef,
209
+ ListBusinessAccountsEmbedded
210
+ > = z.object({
211
+ businessAccounts: z.array(models.BusinessAccountResponse$outboundSchema)
212
+ .optional(),
213
+ });
214
+
215
+ export function listBusinessAccountsEmbeddedToJSON(
216
+ listBusinessAccountsEmbedded: ListBusinessAccountsEmbedded,
217
+ ): string {
218
+ return JSON.stringify(
219
+ ListBusinessAccountsEmbedded$outboundSchema.parse(
220
+ listBusinessAccountsEmbedded,
221
+ ),
222
+ );
223
+ }
224
+ export function listBusinessAccountsEmbeddedFromJSON(
225
+ jsonString: string,
226
+ ): SafeParseResult<ListBusinessAccountsEmbedded, SDKValidationError> {
227
+ return safeParse(
228
+ jsonString,
229
+ (x) => ListBusinessAccountsEmbedded$inboundSchema.parse(JSON.parse(x)),
230
+ `Failed to parse 'ListBusinessAccountsEmbedded' from JSON`,
231
+ );
232
+ }
233
+
234
+ /** @internal */
235
+ export const ListBusinessAccountsResponseBody$inboundSchema: z.ZodType<
236
+ ListBusinessAccountsResponseBody,
237
+ z.ZodTypeDef,
238
+ unknown
239
+ > = z.object({
240
+ count: z.number().int(),
241
+ _embedded: z.lazy(() => ListBusinessAccountsEmbedded$inboundSchema),
242
+ }).transform((v) => {
243
+ return remap$(v, {
244
+ "_embedded": "embedded",
245
+ });
246
+ });
247
+ /** @internal */
248
+ export type ListBusinessAccountsResponseBody$Outbound = {
249
+ count: number;
250
+ _embedded: ListBusinessAccountsEmbedded$Outbound;
251
+ };
252
+
253
+ /** @internal */
254
+ export const ListBusinessAccountsResponseBody$outboundSchema: z.ZodType<
255
+ ListBusinessAccountsResponseBody$Outbound,
256
+ z.ZodTypeDef,
257
+ ListBusinessAccountsResponseBody
258
+ > = z.object({
259
+ count: z.number().int(),
260
+ embedded: z.lazy(() => ListBusinessAccountsEmbedded$outboundSchema),
261
+ }).transform((v) => {
262
+ return remap$(v, {
263
+ embedded: "_embedded",
264
+ });
265
+ });
266
+
267
+ export function listBusinessAccountsResponseBodyToJSON(
268
+ listBusinessAccountsResponseBody: ListBusinessAccountsResponseBody,
269
+ ): string {
270
+ return JSON.stringify(
271
+ ListBusinessAccountsResponseBody$outboundSchema.parse(
272
+ listBusinessAccountsResponseBody,
273
+ ),
274
+ );
275
+ }
276
+ export function listBusinessAccountsResponseBodyFromJSON(
277
+ jsonString: string,
278
+ ): SafeParseResult<ListBusinessAccountsResponseBody, SDKValidationError> {
279
+ return safeParse(
280
+ jsonString,
281
+ (x) => ListBusinessAccountsResponseBody$inboundSchema.parse(JSON.parse(x)),
282
+ `Failed to parse 'ListBusinessAccountsResponseBody' from JSON`,
283
+ );
284
+ }
285
+
286
+ /** @internal */
287
+ export const ListBusinessAccountsResponse$inboundSchema: z.ZodType<
288
+ ListBusinessAccountsResponse,
289
+ z.ZodTypeDef,
290
+ unknown
291
+ > = z.object({
292
+ Result: z.lazy(() => ListBusinessAccountsResponseBody$inboundSchema),
293
+ }).transform((v) => {
294
+ return remap$(v, {
295
+ "Result": "result",
296
+ });
297
+ });
298
+ /** @internal */
299
+ export type ListBusinessAccountsResponse$Outbound = {
300
+ Result: ListBusinessAccountsResponseBody$Outbound;
301
+ };
302
+
303
+ /** @internal */
304
+ export const ListBusinessAccountsResponse$outboundSchema: z.ZodType<
305
+ ListBusinessAccountsResponse$Outbound,
306
+ z.ZodTypeDef,
307
+ ListBusinessAccountsResponse
308
+ > = z.object({
309
+ result: z.lazy(() => ListBusinessAccountsResponseBody$outboundSchema),
310
+ }).transform((v) => {
311
+ return remap$(v, {
312
+ result: "Result",
313
+ });
314
+ });
315
+
316
+ export function listBusinessAccountsResponseToJSON(
317
+ listBusinessAccountsResponse: ListBusinessAccountsResponse,
318
+ ): string {
319
+ return JSON.stringify(
320
+ ListBusinessAccountsResponse$outboundSchema.parse(
321
+ listBusinessAccountsResponse,
322
+ ),
323
+ );
324
+ }
325
+ export function listBusinessAccountsResponseFromJSON(
326
+ jsonString: string,
327
+ ): SafeParseResult<ListBusinessAccountsResponse, SDKValidationError> {
328
+ return safeParse(
329
+ jsonString,
330
+ (x) => ListBusinessAccountsResponse$inboundSchema.parse(JSON.parse(x)),
331
+ `Failed to parse 'ListBusinessAccountsResponse' from JSON`,
332
+ );
333
+ }
@@ -0,0 +1,373 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 207970bdbb7e
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import { remap as remap$ } from "../../lib/primitives.js";
8
+ import { safeParse } from "../../lib/schemas.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import * as models from "../index.js";
12
+
13
+ export type ListBusinessAccountTransactionsGlobals = {
14
+ /**
15
+ * Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
16
+ *
17
+ * @remarks
18
+ * parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
19
+ * setting the `testmode` query parameter to `true`.
20
+ *
21
+ * Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
22
+ */
23
+ testmode?: boolean | undefined;
24
+ };
25
+
26
+ export type ListBusinessAccountTransactionsRequest = {
27
+ /**
28
+ * Provide the ID of the related business account.
29
+ */
30
+ businessAccountId: string;
31
+ /**
32
+ * Provide an ID to start the result set from the item with the given ID and onwards. This allows you to paginate
33
+ *
34
+ * @remarks
35
+ * the result set.
36
+ */
37
+ from?: string | undefined;
38
+ /**
39
+ * The maximum number of items to return. Defaults to 50 items.
40
+ */
41
+ limit?: number | null | undefined;
42
+ /**
43
+ * Used for setting the direction of the result set. Defaults to descending order, meaning the results are ordered from
44
+ *
45
+ * @remarks
46
+ * newest to oldest.
47
+ */
48
+ sort?: models.Sorting | undefined;
49
+ /**
50
+ * Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query
51
+ *
52
+ * @remarks
53
+ * parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by
54
+ * setting the `testmode` query parameter to `true`.
55
+ *
56
+ * Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
57
+ */
58
+ testmode?: boolean | undefined;
59
+ /**
60
+ * A unique key to ensure idempotent requests. This key should be a UUID v4 string.
61
+ */
62
+ idempotencyKey?: string | undefined;
63
+ };
64
+
65
+ export type ListBusinessAccountTransactionsEmbedded = {
66
+ /**
67
+ * An array of transaction objects.
68
+ */
69
+ transactions?: Array<models.TransactionResponse> | undefined;
70
+ };
71
+
72
+ /**
73
+ * A list of transaction objects.
74
+ */
75
+ export type ListBusinessAccountTransactionsResponseBody = {
76
+ /**
77
+ * The number of items in this result set. If more items are available, a `_links.next` URL will be present in the result
78
+ *
79
+ * @remarks
80
+ * as well.
81
+ *
82
+ * The maximum number of items per result set is controlled by the `limit` property provided in the request. The default
83
+ * limit is 50 items.
84
+ */
85
+ count: number;
86
+ embedded: ListBusinessAccountTransactionsEmbedded;
87
+ };
88
+
89
+ export type ListBusinessAccountTransactionsResponse = {
90
+ result: ListBusinessAccountTransactionsResponseBody;
91
+ };
92
+
93
+ /** @internal */
94
+ export const ListBusinessAccountTransactionsGlobals$inboundSchema: z.ZodType<
95
+ ListBusinessAccountTransactionsGlobals,
96
+ z.ZodTypeDef,
97
+ unknown
98
+ > = z.object({
99
+ testmode: z.boolean().optional(),
100
+ });
101
+ /** @internal */
102
+ export type ListBusinessAccountTransactionsGlobals$Outbound = {
103
+ testmode?: boolean | undefined;
104
+ };
105
+
106
+ /** @internal */
107
+ export const ListBusinessAccountTransactionsGlobals$outboundSchema: z.ZodType<
108
+ ListBusinessAccountTransactionsGlobals$Outbound,
109
+ z.ZodTypeDef,
110
+ ListBusinessAccountTransactionsGlobals
111
+ > = z.object({
112
+ testmode: z.boolean().optional(),
113
+ });
114
+
115
+ export function listBusinessAccountTransactionsGlobalsToJSON(
116
+ listBusinessAccountTransactionsGlobals:
117
+ ListBusinessAccountTransactionsGlobals,
118
+ ): string {
119
+ return JSON.stringify(
120
+ ListBusinessAccountTransactionsGlobals$outboundSchema.parse(
121
+ listBusinessAccountTransactionsGlobals,
122
+ ),
123
+ );
124
+ }
125
+ export function listBusinessAccountTransactionsGlobalsFromJSON(
126
+ jsonString: string,
127
+ ): SafeParseResult<ListBusinessAccountTransactionsGlobals, SDKValidationError> {
128
+ return safeParse(
129
+ jsonString,
130
+ (x) =>
131
+ ListBusinessAccountTransactionsGlobals$inboundSchema.parse(JSON.parse(x)),
132
+ `Failed to parse 'ListBusinessAccountTransactionsGlobals' from JSON`,
133
+ );
134
+ }
135
+
136
+ /** @internal */
137
+ export const ListBusinessAccountTransactionsRequest$inboundSchema: z.ZodType<
138
+ ListBusinessAccountTransactionsRequest,
139
+ z.ZodTypeDef,
140
+ unknown
141
+ > = z.object({
142
+ businessAccountId: z.string(),
143
+ from: z.string().optional(),
144
+ limit: z.nullable(z.number().int()).optional(),
145
+ sort: models.Sorting$inboundSchema.optional(),
146
+ testmode: z.boolean().optional(),
147
+ "idempotency-key": z.string().optional(),
148
+ }).transform((v) => {
149
+ return remap$(v, {
150
+ "idempotency-key": "idempotencyKey",
151
+ });
152
+ });
153
+ /** @internal */
154
+ export type ListBusinessAccountTransactionsRequest$Outbound = {
155
+ businessAccountId: string;
156
+ from?: string | undefined;
157
+ limit?: number | null | undefined;
158
+ sort?: string | undefined;
159
+ testmode?: boolean | undefined;
160
+ "idempotency-key"?: string | undefined;
161
+ };
162
+
163
+ /** @internal */
164
+ export const ListBusinessAccountTransactionsRequest$outboundSchema: z.ZodType<
165
+ ListBusinessAccountTransactionsRequest$Outbound,
166
+ z.ZodTypeDef,
167
+ ListBusinessAccountTransactionsRequest
168
+ > = z.object({
169
+ businessAccountId: z.string(),
170
+ from: z.string().optional(),
171
+ limit: z.nullable(z.number().int()).optional(),
172
+ sort: models.Sorting$outboundSchema.optional(),
173
+ testmode: z.boolean().optional(),
174
+ idempotencyKey: z.string().optional(),
175
+ }).transform((v) => {
176
+ return remap$(v, {
177
+ idempotencyKey: "idempotency-key",
178
+ });
179
+ });
180
+
181
+ export function listBusinessAccountTransactionsRequestToJSON(
182
+ listBusinessAccountTransactionsRequest:
183
+ ListBusinessAccountTransactionsRequest,
184
+ ): string {
185
+ return JSON.stringify(
186
+ ListBusinessAccountTransactionsRequest$outboundSchema.parse(
187
+ listBusinessAccountTransactionsRequest,
188
+ ),
189
+ );
190
+ }
191
+ export function listBusinessAccountTransactionsRequestFromJSON(
192
+ jsonString: string,
193
+ ): SafeParseResult<ListBusinessAccountTransactionsRequest, SDKValidationError> {
194
+ return safeParse(
195
+ jsonString,
196
+ (x) =>
197
+ ListBusinessAccountTransactionsRequest$inboundSchema.parse(JSON.parse(x)),
198
+ `Failed to parse 'ListBusinessAccountTransactionsRequest' from JSON`,
199
+ );
200
+ }
201
+
202
+ /** @internal */
203
+ export const ListBusinessAccountTransactionsEmbedded$inboundSchema: z.ZodType<
204
+ ListBusinessAccountTransactionsEmbedded,
205
+ z.ZodTypeDef,
206
+ unknown
207
+ > = z.object({
208
+ transactions: z.array(models.TransactionResponse$inboundSchema).optional(),
209
+ });
210
+ /** @internal */
211
+ export type ListBusinessAccountTransactionsEmbedded$Outbound = {
212
+ transactions?: Array<models.TransactionResponse$Outbound> | undefined;
213
+ };
214
+
215
+ /** @internal */
216
+ export const ListBusinessAccountTransactionsEmbedded$outboundSchema: z.ZodType<
217
+ ListBusinessAccountTransactionsEmbedded$Outbound,
218
+ z.ZodTypeDef,
219
+ ListBusinessAccountTransactionsEmbedded
220
+ > = z.object({
221
+ transactions: z.array(models.TransactionResponse$outboundSchema).optional(),
222
+ });
223
+
224
+ export function listBusinessAccountTransactionsEmbeddedToJSON(
225
+ listBusinessAccountTransactionsEmbedded:
226
+ ListBusinessAccountTransactionsEmbedded,
227
+ ): string {
228
+ return JSON.stringify(
229
+ ListBusinessAccountTransactionsEmbedded$outboundSchema.parse(
230
+ listBusinessAccountTransactionsEmbedded,
231
+ ),
232
+ );
233
+ }
234
+ export function listBusinessAccountTransactionsEmbeddedFromJSON(
235
+ jsonString: string,
236
+ ): SafeParseResult<
237
+ ListBusinessAccountTransactionsEmbedded,
238
+ SDKValidationError
239
+ > {
240
+ return safeParse(
241
+ jsonString,
242
+ (x) =>
243
+ ListBusinessAccountTransactionsEmbedded$inboundSchema.parse(
244
+ JSON.parse(x),
245
+ ),
246
+ `Failed to parse 'ListBusinessAccountTransactionsEmbedded' from JSON`,
247
+ );
248
+ }
249
+
250
+ /** @internal */
251
+ export const ListBusinessAccountTransactionsResponseBody$inboundSchema:
252
+ z.ZodType<
253
+ ListBusinessAccountTransactionsResponseBody,
254
+ z.ZodTypeDef,
255
+ unknown
256
+ > = z.object({
257
+ count: z.number().int(),
258
+ _embedded: z.lazy(() =>
259
+ ListBusinessAccountTransactionsEmbedded$inboundSchema
260
+ ),
261
+ }).transform((v) => {
262
+ return remap$(v, {
263
+ "_embedded": "embedded",
264
+ });
265
+ });
266
+ /** @internal */
267
+ export type ListBusinessAccountTransactionsResponseBody$Outbound = {
268
+ count: number;
269
+ _embedded: ListBusinessAccountTransactionsEmbedded$Outbound;
270
+ };
271
+
272
+ /** @internal */
273
+ export const ListBusinessAccountTransactionsResponseBody$outboundSchema:
274
+ z.ZodType<
275
+ ListBusinessAccountTransactionsResponseBody$Outbound,
276
+ z.ZodTypeDef,
277
+ ListBusinessAccountTransactionsResponseBody
278
+ > = z.object({
279
+ count: z.number().int(),
280
+ embedded: z.lazy(() =>
281
+ ListBusinessAccountTransactionsEmbedded$outboundSchema
282
+ ),
283
+ }).transform((v) => {
284
+ return remap$(v, {
285
+ embedded: "_embedded",
286
+ });
287
+ });
288
+
289
+ export function listBusinessAccountTransactionsResponseBodyToJSON(
290
+ listBusinessAccountTransactionsResponseBody:
291
+ ListBusinessAccountTransactionsResponseBody,
292
+ ): string {
293
+ return JSON.stringify(
294
+ ListBusinessAccountTransactionsResponseBody$outboundSchema.parse(
295
+ listBusinessAccountTransactionsResponseBody,
296
+ ),
297
+ );
298
+ }
299
+ export function listBusinessAccountTransactionsResponseBodyFromJSON(
300
+ jsonString: string,
301
+ ): SafeParseResult<
302
+ ListBusinessAccountTransactionsResponseBody,
303
+ SDKValidationError
304
+ > {
305
+ return safeParse(
306
+ jsonString,
307
+ (x) =>
308
+ ListBusinessAccountTransactionsResponseBody$inboundSchema.parse(
309
+ JSON.parse(x),
310
+ ),
311
+ `Failed to parse 'ListBusinessAccountTransactionsResponseBody' from JSON`,
312
+ );
313
+ }
314
+
315
+ /** @internal */
316
+ export const ListBusinessAccountTransactionsResponse$inboundSchema: z.ZodType<
317
+ ListBusinessAccountTransactionsResponse,
318
+ z.ZodTypeDef,
319
+ unknown
320
+ > = z.object({
321
+ Result: z.lazy(() =>
322
+ ListBusinessAccountTransactionsResponseBody$inboundSchema
323
+ ),
324
+ }).transform((v) => {
325
+ return remap$(v, {
326
+ "Result": "result",
327
+ });
328
+ });
329
+ /** @internal */
330
+ export type ListBusinessAccountTransactionsResponse$Outbound = {
331
+ Result: ListBusinessAccountTransactionsResponseBody$Outbound;
332
+ };
333
+
334
+ /** @internal */
335
+ export const ListBusinessAccountTransactionsResponse$outboundSchema: z.ZodType<
336
+ ListBusinessAccountTransactionsResponse$Outbound,
337
+ z.ZodTypeDef,
338
+ ListBusinessAccountTransactionsResponse
339
+ > = z.object({
340
+ result: z.lazy(() =>
341
+ ListBusinessAccountTransactionsResponseBody$outboundSchema
342
+ ),
343
+ }).transform((v) => {
344
+ return remap$(v, {
345
+ result: "Result",
346
+ });
347
+ });
348
+
349
+ export function listBusinessAccountTransactionsResponseToJSON(
350
+ listBusinessAccountTransactionsResponse:
351
+ ListBusinessAccountTransactionsResponse,
352
+ ): string {
353
+ return JSON.stringify(
354
+ ListBusinessAccountTransactionsResponse$outboundSchema.parse(
355
+ listBusinessAccountTransactionsResponse,
356
+ ),
357
+ );
358
+ }
359
+ export function listBusinessAccountTransactionsResponseFromJSON(
360
+ jsonString: string,
361
+ ): SafeParseResult<
362
+ ListBusinessAccountTransactionsResponse,
363
+ SDKValidationError
364
+ > {
365
+ return safeParse(
366
+ jsonString,
367
+ (x) =>
368
+ ListBusinessAccountTransactionsResponse$inboundSchema.parse(
369
+ JSON.parse(x),
370
+ ),
371
+ `Failed to parse 'ListBusinessAccountTransactionsResponse' from JSON`,
372
+ );
373
+ }