@apideck/unify 0.23.0 → 0.23.2

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 (298) hide show
  1. package/README.md +26 -0
  2. package/docs/sdks/bankfeedaccounts/README.md +571 -0
  3. package/docs/sdks/bankfeedstatements/README.md +605 -0
  4. package/funcs/accountingBankFeedAccountsCreate.d.ts +17 -0
  5. package/funcs/accountingBankFeedAccountsCreate.d.ts.map +1 -0
  6. package/funcs/accountingBankFeedAccountsCreate.js +123 -0
  7. package/funcs/accountingBankFeedAccountsCreate.js.map +1 -0
  8. package/funcs/accountingBankFeedAccountsDelete.d.ts +17 -0
  9. package/funcs/accountingBankFeedAccountsDelete.d.ts.map +1 -0
  10. package/funcs/accountingBankFeedAccountsDelete.js +128 -0
  11. package/funcs/accountingBankFeedAccountsDelete.js.map +1 -0
  12. package/funcs/accountingBankFeedAccountsGet.d.ts +17 -0
  13. package/funcs/accountingBankFeedAccountsGet.d.ts.map +1 -0
  14. package/funcs/accountingBankFeedAccountsGet.js +129 -0
  15. package/funcs/accountingBankFeedAccountsGet.js.map +1 -0
  16. package/funcs/accountingBankFeedAccountsList.d.ts +20 -0
  17. package/funcs/accountingBankFeedAccountsList.d.ts.map +1 -0
  18. package/funcs/accountingBankFeedAccountsList.js +149 -0
  19. package/funcs/accountingBankFeedAccountsList.js.map +1 -0
  20. package/funcs/accountingBankFeedAccountsUpdate.d.ts +17 -0
  21. package/funcs/accountingBankFeedAccountsUpdate.d.ts.map +1 -0
  22. package/funcs/accountingBankFeedAccountsUpdate.js +129 -0
  23. package/funcs/accountingBankFeedAccountsUpdate.js.map +1 -0
  24. package/funcs/accountingBankFeedStatementsCreate.d.ts +17 -0
  25. package/funcs/accountingBankFeedStatementsCreate.d.ts.map +1 -0
  26. package/funcs/accountingBankFeedStatementsCreate.js +123 -0
  27. package/funcs/accountingBankFeedStatementsCreate.js.map +1 -0
  28. package/funcs/accountingBankFeedStatementsDelete.d.ts +17 -0
  29. package/funcs/accountingBankFeedStatementsDelete.d.ts.map +1 -0
  30. package/funcs/accountingBankFeedStatementsDelete.js +128 -0
  31. package/funcs/accountingBankFeedStatementsDelete.js.map +1 -0
  32. package/funcs/accountingBankFeedStatementsGet.d.ts +17 -0
  33. package/funcs/accountingBankFeedStatementsGet.d.ts.map +1 -0
  34. package/funcs/accountingBankFeedStatementsGet.js +129 -0
  35. package/funcs/accountingBankFeedStatementsGet.js.map +1 -0
  36. package/funcs/accountingBankFeedStatementsList.d.ts +20 -0
  37. package/funcs/accountingBankFeedStatementsList.d.ts.map +1 -0
  38. package/funcs/accountingBankFeedStatementsList.js +149 -0
  39. package/funcs/accountingBankFeedStatementsList.js.map +1 -0
  40. package/funcs/accountingBankFeedStatementsUpdate.d.ts +17 -0
  41. package/funcs/accountingBankFeedStatementsUpdate.d.ts.map +1 -0
  42. package/funcs/accountingBankFeedStatementsUpdate.js +129 -0
  43. package/funcs/accountingBankFeedStatementsUpdate.js.map +1 -0
  44. package/jsr.json +1 -1
  45. package/lib/config.d.ts +4 -4
  46. package/lib/config.js +4 -4
  47. package/lib/sdks.d.ts +3 -1
  48. package/lib/sdks.d.ts.map +1 -1
  49. package/lib/sdks.js +6 -11
  50. package/lib/sdks.js.map +1 -1
  51. package/models/components/bankfeedaccount.d.ts +230 -0
  52. package/models/components/bankfeedaccount.d.ts.map +1 -0
  53. package/models/components/bankfeedaccount.js +229 -0
  54. package/models/components/bankfeedaccount.js.map +1 -0
  55. package/models/components/bankfeedstatement.d.ts +307 -0
  56. package/models/components/bankfeedstatement.d.ts.map +1 -0
  57. package/models/components/bankfeedstatement.js +286 -0
  58. package/models/components/bankfeedstatement.js.map +1 -0
  59. package/models/components/createbankfeedaccountresponse.d.ts +70 -0
  60. package/models/components/createbankfeedaccountresponse.d.ts.map +1 -0
  61. package/models/components/createbankfeedaccountresponse.js +83 -0
  62. package/models/components/createbankfeedaccountresponse.js.map +1 -0
  63. package/models/components/createbankfeedstatementresponse.d.ts +70 -0
  64. package/models/components/createbankfeedstatementresponse.d.ts.map +1 -0
  65. package/models/components/createbankfeedstatementresponse.js +83 -0
  66. package/models/components/createbankfeedstatementresponse.js.map +1 -0
  67. package/models/components/creditordebit.d.ts +34 -0
  68. package/models/components/creditordebit.d.ts.map +1 -0
  69. package/models/components/creditordebit.js +53 -0
  70. package/models/components/creditordebit.js.map +1 -0
  71. package/models/components/deletebankfeedaccountresponse.d.ts +70 -0
  72. package/models/components/deletebankfeedaccountresponse.d.ts.map +1 -0
  73. package/models/components/deletebankfeedaccountresponse.js +83 -0
  74. package/models/components/deletebankfeedaccountresponse.js.map +1 -0
  75. package/models/components/deletebankfeedstatementresponse.d.ts +70 -0
  76. package/models/components/deletebankfeedstatementresponse.d.ts.map +1 -0
  77. package/models/components/deletebankfeedstatementresponse.js +83 -0
  78. package/models/components/deletebankfeedstatementresponse.js.map +1 -0
  79. package/models/components/ecommerceorderlineitem.d.ts +2 -2
  80. package/models/components/ecommerceorderlineitem.d.ts.map +1 -1
  81. package/models/components/ecommerceorderlineitem.js +2 -2
  82. package/models/components/ecommerceorderlineitem.js.map +1 -1
  83. package/models/components/getbankfeedaccountresponse.d.ts +67 -0
  84. package/models/components/getbankfeedaccountresponse.d.ts.map +1 -0
  85. package/models/components/getbankfeedaccountresponse.js +83 -0
  86. package/models/components/getbankfeedaccountresponse.js.map +1 -0
  87. package/models/components/getbankfeedaccountsresponse.d.ts +79 -0
  88. package/models/components/getbankfeedaccountsresponse.d.ts.map +1 -0
  89. package/models/components/getbankfeedaccountsresponse.js +89 -0
  90. package/models/components/getbankfeedaccountsresponse.js.map +1 -0
  91. package/models/components/getbankfeedstatementresponse.d.ts +67 -0
  92. package/models/components/getbankfeedstatementresponse.d.ts.map +1 -0
  93. package/models/components/getbankfeedstatementresponse.js +83 -0
  94. package/models/components/getbankfeedstatementresponse.js.map +1 -0
  95. package/models/components/getbankfeedstatementsresponse.d.ts +79 -0
  96. package/models/components/getbankfeedstatementsresponse.d.ts.map +1 -0
  97. package/models/components/getbankfeedstatementsresponse.js +89 -0
  98. package/models/components/getbankfeedstatementsresponse.js.map +1 -0
  99. package/models/components/index.d.ts +13 -0
  100. package/models/components/index.d.ts.map +1 -1
  101. package/models/components/index.js +13 -0
  102. package/models/components/index.js.map +1 -1
  103. package/models/components/note.d.ts +5 -0
  104. package/models/components/note.d.ts.map +1 -1
  105. package/models/components/note.js +4 -0
  106. package/models/components/note.js.map +1 -1
  107. package/models/components/noteinput.d.ts +5 -0
  108. package/models/components/noteinput.d.ts.map +1 -1
  109. package/models/components/noteinput.js +4 -0
  110. package/models/components/noteinput.js.map +1 -1
  111. package/models/components/updatebankfeedaccountresponse.d.ts +70 -0
  112. package/models/components/updatebankfeedaccountresponse.d.ts.map +1 -0
  113. package/models/components/updatebankfeedaccountresponse.js +83 -0
  114. package/models/components/updatebankfeedaccountresponse.js.map +1 -0
  115. package/models/components/updatebankfeedstatementresponse.d.ts +70 -0
  116. package/models/components/updatebankfeedstatementresponse.d.ts.map +1 -0
  117. package/models/components/updatebankfeedstatementresponse.js +83 -0
  118. package/models/components/updatebankfeedstatementresponse.js.map +1 -0
  119. package/models/operations/accountingbankfeedaccountsadd.d.ts +118 -0
  120. package/models/operations/accountingbankfeedaccountsadd.d.ts.map +1 -0
  121. package/models/operations/accountingbankfeedaccountsadd.js +153 -0
  122. package/models/operations/accountingbankfeedaccountsadd.js.map +1 -0
  123. package/models/operations/accountingbankfeedaccountsall.d.ts +140 -0
  124. package/models/operations/accountingbankfeedaccountsall.d.ts.map +1 -0
  125. package/models/operations/accountingbankfeedaccountsall.js +159 -0
  126. package/models/operations/accountingbankfeedaccountsall.js.map +1 -0
  127. package/models/operations/accountingbankfeedaccountsdelete.d.ts +121 -0
  128. package/models/operations/accountingbankfeedaccountsdelete.d.ts.map +1 -0
  129. package/models/operations/accountingbankfeedaccountsdelete.js +145 -0
  130. package/models/operations/accountingbankfeedaccountsdelete.js.map +1 -0
  131. package/models/operations/accountingbankfeedaccountsone.d.ts +126 -0
  132. package/models/operations/accountingbankfeedaccountsone.d.ts.map +1 -0
  133. package/models/operations/accountingbankfeedaccountsone.js +147 -0
  134. package/models/operations/accountingbankfeedaccountsone.js.map +1 -0
  135. package/models/operations/accountingbankfeedaccountsupdate.d.ts +123 -0
  136. package/models/operations/accountingbankfeedaccountsupdate.d.ts.map +1 -0
  137. package/models/operations/accountingbankfeedaccountsupdate.js +155 -0
  138. package/models/operations/accountingbankfeedaccountsupdate.js.map +1 -0
  139. package/models/operations/accountingbankfeedstatementsadd.d.ts +118 -0
  140. package/models/operations/accountingbankfeedstatementsadd.d.ts.map +1 -0
  141. package/models/operations/accountingbankfeedstatementsadd.js +153 -0
  142. package/models/operations/accountingbankfeedstatementsadd.js.map +1 -0
  143. package/models/operations/accountingbankfeedstatementsall.d.ts +140 -0
  144. package/models/operations/accountingbankfeedstatementsall.d.ts.map +1 -0
  145. package/models/operations/accountingbankfeedstatementsall.js +159 -0
  146. package/models/operations/accountingbankfeedstatementsall.js.map +1 -0
  147. package/models/operations/accountingbankfeedstatementsdelete.d.ts +121 -0
  148. package/models/operations/accountingbankfeedstatementsdelete.d.ts.map +1 -0
  149. package/models/operations/accountingbankfeedstatementsdelete.js +145 -0
  150. package/models/operations/accountingbankfeedstatementsdelete.js.map +1 -0
  151. package/models/operations/accountingbankfeedstatementsone.d.ts +126 -0
  152. package/models/operations/accountingbankfeedstatementsone.d.ts.map +1 -0
  153. package/models/operations/accountingbankfeedstatementsone.js +147 -0
  154. package/models/operations/accountingbankfeedstatementsone.js.map +1 -0
  155. package/models/operations/accountingbankfeedstatementsupdate.d.ts +123 -0
  156. package/models/operations/accountingbankfeedstatementsupdate.d.ts.map +1 -0
  157. package/models/operations/accountingbankfeedstatementsupdate.js +155 -0
  158. package/models/operations/accountingbankfeedstatementsupdate.js.map +1 -0
  159. package/models/operations/index.d.ts +10 -0
  160. package/models/operations/index.d.ts.map +1 -1
  161. package/models/operations/index.js +10 -0
  162. package/models/operations/index.js.map +1 -1
  163. package/package.json +5 -1
  164. package/sdk/accounting.d.ts +6 -0
  165. package/sdk/accounting.d.ts.map +1 -1
  166. package/sdk/accounting.js +8 -0
  167. package/sdk/accounting.js.map +1 -1
  168. package/sdk/bankfeedaccounts.d.ts +43 -0
  169. package/sdk/bankfeedaccounts.d.ts.map +1 -0
  170. package/sdk/bankfeedaccounts.js +63 -0
  171. package/sdk/bankfeedaccounts.js.map +1 -0
  172. package/sdk/bankfeedstatements.d.ts +43 -0
  173. package/sdk/bankfeedstatements.d.ts.map +1 -0
  174. package/sdk/bankfeedstatements.js +63 -0
  175. package/sdk/bankfeedstatements.js.map +1 -0
  176. package/src/__tests__/activities.test.ts +783 -0
  177. package/src/__tests__/agedcreditors.test.ts +279 -0
  178. package/src/__tests__/ageddebtors.test.ts +279 -0
  179. package/src/__tests__/apideckcompanies.test.ts +712 -0
  180. package/src/__tests__/apideckcustomers.test.ts +360 -0
  181. package/src/__tests__/apideckdepartments.test.ts +319 -0
  182. package/src/__tests__/apiresources.test.ts +61 -0
  183. package/src/__tests__/apis.test.ts +214 -0
  184. package/src/__tests__/applicants.test.ts +976 -0
  185. package/src/__tests__/applications.test.ts +329 -0
  186. package/src/__tests__/assertions.ts +13 -0
  187. package/src/__tests__/attachments.test.ts +363 -0
  188. package/src/__tests__/balancesheet.test.ts +451 -0
  189. package/src/__tests__/bankfeedaccounts.test.ts +333 -0
  190. package/src/__tests__/bankfeedstatements.test.ts +398 -0
  191. package/src/__tests__/billpayments.test.ts +666 -0
  192. package/src/__tests__/bills.test.ts +1133 -0
  193. package/src/__tests__/collections.test.ts +115 -0
  194. package/src/__tests__/collectiontags.test.ts +66 -0
  195. package/src/__tests__/collectionticketcomments.test.ts +318 -0
  196. package/src/__tests__/collectiontickets.test.ts +436 -0
  197. package/src/__tests__/collectionusers.test.ts +122 -0
  198. package/src/__tests__/companies.test.ts +1059 -0
  199. package/src/__tests__/companyinfo.test.ts +218 -0
  200. package/src/__tests__/connectioncustommappings.test.ts +67 -0
  201. package/src/__tests__/connections.test.ts +1713 -0
  202. package/src/__tests__/connectionsettings.test.ts +280 -0
  203. package/src/__tests__/connectordocs.test.ts +28 -0
  204. package/src/__tests__/connectors.test.ts +751 -0
  205. package/src/__tests__/consumerrequestcounts.test.ts +41 -0
  206. package/src/__tests__/consumers.test.ts +517 -0
  207. package/src/__tests__/contacts.test.ts +957 -0
  208. package/src/__tests__/createcallback.test.ts +34 -0
  209. package/src/__tests__/creditnotes.test.ts +1362 -0
  210. package/src/__tests__/customers.test.ts +1089 -0
  211. package/src/__tests__/customfields.test.ts +50 -0
  212. package/src/__tests__/custommappings.test.ts +63 -0
  213. package/src/__tests__/departments.test.ts +359 -0
  214. package/src/__tests__/drivegroups.test.ts +318 -0
  215. package/src/__tests__/drives.test.ts +311 -0
  216. package/src/__tests__/employeepayrolls.test.ts +487 -0
  217. package/src/__tests__/employees.test.ts +1682 -0
  218. package/src/__tests__/employeeschedules.test.ts +456 -0
  219. package/src/__tests__/eventlogs.test.ts +157 -0
  220. package/src/__tests__/expenses.test.ts +566 -0
  221. package/src/__tests__/files.test.ts +392 -0
  222. package/src/__tests__/files.ts +56 -0
  223. package/src/__tests__/folders.test.ts +103 -0
  224. package/src/__tests__/invoiceitems.test.ts +586 -0
  225. package/src/__tests__/invoices.test.ts +1561 -0
  226. package/src/__tests__/jobs.test.ts +837 -0
  227. package/src/__tests__/journalentries.test.ts +1053 -0
  228. package/src/__tests__/leads.test.ts +897 -0
  229. package/src/__tests__/ledgeraccounts.test.ts +594 -0
  230. package/src/__tests__/locations.test.ts +561 -0
  231. package/src/__tests__/logs.test.ts +135 -0
  232. package/src/__tests__/messages.test.ts +396 -0
  233. package/src/__tests__/mockserver/README.md +52 -0
  234. package/src/__tests__/notes.test.ts +335 -0
  235. package/src/__tests__/opportunities.test.ts +503 -0
  236. package/src/__tests__/orders.test.ts +849 -0
  237. package/src/__tests__/payments.test.ts +557 -0
  238. package/src/__tests__/payrolls.test.ts +481 -0
  239. package/src/__tests__/pipelines.test.ts +383 -0
  240. package/src/__tests__/products.test.ts +505 -0
  241. package/src/__tests__/profitandloss.test.ts +221 -0
  242. package/src/__tests__/purchaseorders.test.ts +1464 -0
  243. package/src/__tests__/sessions.test.ts +70 -0
  244. package/src/__tests__/sharedlinks.test.ts +331 -0
  245. package/src/__tests__/stores.test.ts +39 -0
  246. package/src/__tests__/subsidiaries.test.ts +316 -0
  247. package/src/__tests__/suppliers.test.ts +1071 -0
  248. package/src/__tests__/taxrates.test.ts +472 -0
  249. package/src/__tests__/testclient.ts +48 -0
  250. package/src/__tests__/timeoffrequests.test.ts +381 -0
  251. package/src/__tests__/trackingcategories.test.ts +329 -0
  252. package/src/__tests__/uploadsessions.test.ts +142 -0
  253. package/src/__tests__/users.test.ts +667 -0
  254. package/src/__tests__/validateconnection.test.ts +32 -0
  255. package/src/__tests__/webhooks.test.ts +248 -0
  256. package/src/funcs/accountingBankFeedAccountsCreate.ts +221 -0
  257. package/src/funcs/accountingBankFeedAccountsDelete.ts +227 -0
  258. package/src/funcs/accountingBankFeedAccountsGet.ts +228 -0
  259. package/src/funcs/accountingBankFeedAccountsList.ts +295 -0
  260. package/src/funcs/accountingBankFeedAccountsUpdate.ts +228 -0
  261. package/src/funcs/accountingBankFeedStatementsCreate.ts +221 -0
  262. package/src/funcs/accountingBankFeedStatementsDelete.ts +227 -0
  263. package/src/funcs/accountingBankFeedStatementsGet.ts +228 -0
  264. package/src/funcs/accountingBankFeedStatementsList.ts +295 -0
  265. package/src/funcs/accountingBankFeedStatementsUpdate.ts +228 -0
  266. package/src/lib/config.ts +4 -4
  267. package/src/lib/sdks.ts +11 -11
  268. package/src/models/components/bankfeedaccount.ts +413 -0
  269. package/src/models/components/bankfeedstatement.ts +535 -0
  270. package/src/models/components/createbankfeedaccountresponse.ts +133 -0
  271. package/src/models/components/createbankfeedstatementresponse.ts +133 -0
  272. package/src/models/components/creditordebit.ts +39 -0
  273. package/src/models/components/deletebankfeedaccountresponse.ts +133 -0
  274. package/src/models/components/deletebankfeedstatementresponse.ts +133 -0
  275. package/src/models/components/ecommerceorderlineitem.ts +4 -4
  276. package/src/models/components/getbankfeedaccountresponse.ts +128 -0
  277. package/src/models/components/getbankfeedaccountsresponse.ts +156 -0
  278. package/src/models/components/getbankfeedstatementresponse.ts +130 -0
  279. package/src/models/components/getbankfeedstatementsresponse.ts +156 -0
  280. package/src/models/components/index.ts +13 -0
  281. package/src/models/components/note.ts +9 -0
  282. package/src/models/components/noteinput.ts +9 -0
  283. package/src/models/components/updatebankfeedaccountresponse.ts +133 -0
  284. package/src/models/components/updatebankfeedstatementresponse.ts +133 -0
  285. package/src/models/operations/accountingbankfeedaccountsadd.ts +281 -0
  286. package/src/models/operations/accountingbankfeedaccountsall.ts +305 -0
  287. package/src/models/operations/accountingbankfeedaccountsdelete.ts +294 -0
  288. package/src/models/operations/accountingbankfeedaccountsone.ts +283 -0
  289. package/src/models/operations/accountingbankfeedaccountsupdate.ts +306 -0
  290. package/src/models/operations/accountingbankfeedstatementsadd.ts +289 -0
  291. package/src/models/operations/accountingbankfeedstatementsall.ts +313 -0
  292. package/src/models/operations/accountingbankfeedstatementsdelete.ts +295 -0
  293. package/src/models/operations/accountingbankfeedstatementsone.ts +291 -0
  294. package/src/models/operations/accountingbankfeedstatementsupdate.ts +307 -0
  295. package/src/models/operations/index.ts +10 -0
  296. package/src/sdk/accounting.ts +12 -0
  297. package/src/sdk/bankfeedaccounts.ts +105 -0
  298. package/src/sdk/bankfeedstatements.ts +105 -0
@@ -0,0 +1,228 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { ApideckCore } from "../core.js";
6
+ import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { APICall, APIPromise } from "../types/async.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Update Bank Feed Statement
29
+ *
30
+ * @remarks
31
+ * Update Bank Feed Statement
32
+ */
33
+ export function accountingBankFeedStatementsUpdate(
34
+ client: ApideckCore,
35
+ request: operations.AccountingBankFeedStatementsUpdateRequest,
36
+ options?: RequestOptions,
37
+ ): APIPromise<
38
+ Result<
39
+ operations.AccountingBankFeedStatementsUpdateResponse,
40
+ | errors.BadRequestResponse
41
+ | errors.UnauthorizedResponse
42
+ | errors.PaymentRequiredResponse
43
+ | errors.NotFoundResponse
44
+ | errors.UnprocessableResponse
45
+ | APIError
46
+ | SDKValidationError
47
+ | UnexpectedClientError
48
+ | InvalidRequestError
49
+ | RequestAbortedError
50
+ | RequestTimeoutError
51
+ | ConnectionError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: ApideckCore,
63
+ request: operations.AccountingBankFeedStatementsUpdateRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ operations.AccountingBankFeedStatementsUpdateResponse,
69
+ | errors.BadRequestResponse
70
+ | errors.UnauthorizedResponse
71
+ | errors.PaymentRequiredResponse
72
+ | errors.NotFoundResponse
73
+ | errors.UnprocessableResponse
74
+ | APIError
75
+ | SDKValidationError
76
+ | UnexpectedClientError
77
+ | InvalidRequestError
78
+ | RequestAbortedError
79
+ | RequestTimeoutError
80
+ | ConnectionError
81
+ >,
82
+ APICall,
83
+ ]
84
+ > {
85
+ const parsed = safeParse(
86
+ request,
87
+ (value) =>
88
+ operations.AccountingBankFeedStatementsUpdateRequest$outboundSchema.parse(
89
+ value,
90
+ ),
91
+ "Input validation failed",
92
+ );
93
+ if (!parsed.ok) {
94
+ return [parsed, { status: "invalid" }];
95
+ }
96
+ const payload = parsed.value;
97
+ const body = encodeJSON("body", payload.BankFeedStatement, { explode: true });
98
+
99
+ const pathParams = {
100
+ id: encodeSimple("id", payload.id, {
101
+ explode: false,
102
+ charEncoding: "percent",
103
+ }),
104
+ };
105
+
106
+ const path = pathToFunc("/accounting/bank-feed-statements/{id}")(pathParams);
107
+
108
+ const query = encodeFormQuery({
109
+ "raw": payload.raw,
110
+ });
111
+
112
+ const headers = new Headers(compactMap({
113
+ "Content-Type": "application/json",
114
+ Accept: "application/json",
115
+ "x-apideck-app-id": encodeSimple(
116
+ "x-apideck-app-id",
117
+ payload.appId ?? client._options.appId,
118
+ { explode: false, charEncoding: "none" },
119
+ ),
120
+ "x-apideck-consumer-id": encodeSimple(
121
+ "x-apideck-consumer-id",
122
+ payload.consumerId ?? client._options.consumerId,
123
+ { explode: false, charEncoding: "none" },
124
+ ),
125
+ "x-apideck-service-id": encodeSimple(
126
+ "x-apideck-service-id",
127
+ payload.serviceId,
128
+ { explode: false, charEncoding: "none" },
129
+ ),
130
+ }));
131
+
132
+ const secConfig = await extractSecurity(client._options.apiKey);
133
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
134
+ const requestSecurity = resolveGlobalSecurity(securityInput);
135
+
136
+ const context = {
137
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
138
+ operationID: "accounting.bankFeedStatementsUpdate",
139
+ oAuth2Scopes: [],
140
+
141
+ resolvedSecurity: requestSecurity,
142
+
143
+ securitySource: client._options.apiKey,
144
+ retryConfig: options?.retries
145
+ || client._options.retryConfig
146
+ || {
147
+ strategy: "backoff",
148
+ backoff: {
149
+ initialInterval: 500,
150
+ maxInterval: 60000,
151
+ exponent: 1.5,
152
+ maxElapsedTime: 3600000,
153
+ },
154
+ retryConnectionErrors: true,
155
+ }
156
+ || { strategy: "none" },
157
+ retryCodes: options?.retryCodes || ["408", "500", "502", "503", "504"],
158
+ };
159
+
160
+ const requestRes = client._createRequest(context, {
161
+ security: requestSecurity,
162
+ method: "PATCH",
163
+ baseURL: options?.serverURL,
164
+ path: path,
165
+ headers: headers,
166
+ query: query,
167
+ body: body,
168
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
169
+ }, options);
170
+ if (!requestRes.ok) {
171
+ return [requestRes, { status: "invalid" }];
172
+ }
173
+ const req = requestRes.value;
174
+
175
+ const doResult = await client._do(req, {
176
+ context,
177
+ errorCodes: ["400", "401", "402", "404", "422", "4XX", "5XX"],
178
+ retryConfig: context.retryConfig,
179
+ retryCodes: context.retryCodes,
180
+ });
181
+ if (!doResult.ok) {
182
+ return [doResult, { status: "request-error", request: req }];
183
+ }
184
+ const response = doResult.value;
185
+
186
+ const responseFields = {
187
+ HttpMeta: { Response: response, Request: req },
188
+ };
189
+
190
+ const [result] = await M.match<
191
+ operations.AccountingBankFeedStatementsUpdateResponse,
192
+ | errors.BadRequestResponse
193
+ | errors.UnauthorizedResponse
194
+ | errors.PaymentRequiredResponse
195
+ | errors.NotFoundResponse
196
+ | errors.UnprocessableResponse
197
+ | APIError
198
+ | SDKValidationError
199
+ | UnexpectedClientError
200
+ | InvalidRequestError
201
+ | RequestAbortedError
202
+ | RequestTimeoutError
203
+ | ConnectionError
204
+ >(
205
+ M.json(
206
+ 200,
207
+ operations.AccountingBankFeedStatementsUpdateResponse$inboundSchema,
208
+ { key: "UpdateBankFeedStatementResponse" },
209
+ ),
210
+ M.jsonErr(400, errors.BadRequestResponse$inboundSchema),
211
+ M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema),
212
+ M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema),
213
+ M.jsonErr(404, errors.NotFoundResponse$inboundSchema),
214
+ M.jsonErr(422, errors.UnprocessableResponse$inboundSchema),
215
+ M.fail("4XX"),
216
+ M.fail("5XX"),
217
+ M.json(
218
+ "default",
219
+ operations.AccountingBankFeedStatementsUpdateResponse$inboundSchema,
220
+ { key: "UnexpectedErrorResponse" },
221
+ ),
222
+ )(response, req, { extraFields: responseFields });
223
+ if (!result.ok) {
224
+ return [result, { status: "complete", request: req, response }];
225
+ }
226
+
227
+ return [result, { status: "complete", request: req, response }];
228
+ }
package/src/lib/config.ts CHANGED
@@ -63,8 +63,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
63
63
 
64
64
  export const SDK_METADATA = {
65
65
  language: "typescript",
66
- openapiDocVersion: "10.16.2",
67
- sdkVersion: "0.23.0",
68
- genVersion: "2.588.0",
69
- userAgent: "speakeasy-sdk/typescript 0.23.0 2.588.0 10.16.2 @apideck/unify",
66
+ openapiDocVersion: "10.16.5",
67
+ sdkVersion: "0.23.2",
68
+ genVersion: "2.599.0",
69
+ userAgent: "speakeasy-sdk/typescript 0.23.2 2.599.0 10.16.5 @apideck/unify",
70
70
  } as const;
package/src/lib/sdks.ts CHANGED
@@ -47,12 +47,14 @@ export type RequestOptions = {
47
47
  */
48
48
  serverURL?: string | URL;
49
49
  /**
50
+ * @deprecated `fetchOptions` has been flattened into `RequestOptions`.
51
+ *
50
52
  * Sets various request options on the `fetch` call made by an SDK method.
51
53
  *
52
54
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request}
53
55
  */
54
56
  fetchOptions?: Omit<RequestInit, "method" | "body">;
55
- };
57
+ } & Omit<RequestInit, "method" | "body">;
56
58
 
57
59
  type RequestConfig = {
58
60
  method: string;
@@ -172,7 +174,9 @@ export class ClientSDK {
172
174
  cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie;
173
175
  headers.set("cookie", cookie);
174
176
 
175
- const userHeaders = new Headers(options?.fetchOptions?.headers);
177
+ const userHeaders = new Headers(
178
+ options?.headers ?? options?.fetchOptions?.headers,
179
+ );
176
180
  for (const [k, v] of userHeaders) {
177
181
  headers.set(k, v);
178
182
  }
@@ -183,20 +187,16 @@ export class ClientSDK {
183
187
  headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent);
184
188
  }
185
189
 
186
- let fetchOptions = options?.fetchOptions;
190
+ const fetchOptions: Omit<RequestInit, "method" | "body"> = {
191
+ ...options?.fetchOptions,
192
+ ...options,
193
+ };
187
194
  if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
188
195
  const timeoutSignal = AbortSignal.timeout(conf.timeoutMs);
189
- if (!fetchOptions) {
190
- fetchOptions = { signal: timeoutSignal };
191
- } else {
192
- fetchOptions.signal = timeoutSignal;
193
- }
196
+ fetchOptions.signal = timeoutSignal;
194
197
  }
195
198
 
196
199
  if (conf.body instanceof ReadableStream) {
197
- if (!fetchOptions) {
198
- fetchOptions = {};
199
- }
200
200
  Object.assign(fetchOptions, { duplex: "half" });
201
201
  }
202
202
 
@@ -0,0 +1,413 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ Currency,
13
+ Currency$inboundSchema,
14
+ Currency$outboundSchema,
15
+ } from "./currency.js";
16
+ import {
17
+ CustomField,
18
+ CustomField$inboundSchema,
19
+ CustomField$Outbound,
20
+ CustomField$outboundSchema,
21
+ } from "./customfield.js";
22
+ import {
23
+ CustomMappings,
24
+ CustomMappings$inboundSchema,
25
+ CustomMappings$Outbound,
26
+ CustomMappings$outboundSchema,
27
+ } from "./custommappings.js";
28
+
29
+ /**
30
+ * Type of the bank account.
31
+ */
32
+ export const BankAccountType = {
33
+ Bank: "bank",
34
+ CreditCard: "credit_card",
35
+ } as const;
36
+ /**
37
+ * Type of the bank account.
38
+ */
39
+ export type BankAccountType = ClosedEnum<typeof BankAccountType>;
40
+
41
+ /**
42
+ * Current status of the bank feed.
43
+ */
44
+ export const FeedStatus = {
45
+ Pending: "pending",
46
+ Rejected: "rejected",
47
+ } as const;
48
+ /**
49
+ * Current status of the bank feed.
50
+ */
51
+ export type FeedStatus = ClosedEnum<typeof FeedStatus>;
52
+
53
+ export type BankFeedAccount = {
54
+ /**
55
+ * A unique identifier for an object.
56
+ */
57
+ id: string;
58
+ /**
59
+ * Type of the bank account.
60
+ */
61
+ bankAccountType?: BankAccountType | undefined;
62
+ /**
63
+ * The source account's unique identifier.
64
+ */
65
+ sourceAccountId?: string | undefined;
66
+ /**
67
+ * The target account's unique identifier in the accounting connector.
68
+ */
69
+ targetAccountId?: string | undefined;
70
+ /**
71
+ * Name associated with the target account.
72
+ */
73
+ targetAccountName?: string | undefined;
74
+ /**
75
+ * Account number of the destination bank account.
76
+ */
77
+ targetAccountNumber?: string | undefined;
78
+ /**
79
+ * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
80
+ */
81
+ currency?: Currency | null | undefined;
82
+ /**
83
+ * Current status of the bank feed.
84
+ */
85
+ feedStatus?: FeedStatus | undefined;
86
+ /**
87
+ * Country code according to ISO 3166-1 alpha-2.
88
+ */
89
+ country?: string | null | undefined;
90
+ customFields?: Array<CustomField> | undefined;
91
+ /**
92
+ * When custom mappings are configured on the resource, the result is included here.
93
+ */
94
+ customMappings?: CustomMappings | null | undefined;
95
+ /**
96
+ * The date and time when the object was created.
97
+ */
98
+ createdAt?: Date | null | undefined;
99
+ /**
100
+ * The date and time when the object was last updated.
101
+ */
102
+ updatedAt?: Date | null | undefined;
103
+ /**
104
+ * The user who last updated the object.
105
+ */
106
+ updatedBy?: string | null | undefined;
107
+ /**
108
+ * The user who created the object.
109
+ */
110
+ createdBy?: string | null | undefined;
111
+ };
112
+
113
+ export type BankFeedAccountInput = {
114
+ /**
115
+ * Type of the bank account.
116
+ */
117
+ bankAccountType?: BankAccountType | undefined;
118
+ /**
119
+ * The source account's unique identifier.
120
+ */
121
+ sourceAccountId?: string | undefined;
122
+ /**
123
+ * The target account's unique identifier in the accounting connector.
124
+ */
125
+ targetAccountId?: string | undefined;
126
+ /**
127
+ * Name associated with the target account.
128
+ */
129
+ targetAccountName?: string | undefined;
130
+ /**
131
+ * Account number of the destination bank account.
132
+ */
133
+ targetAccountNumber?: string | undefined;
134
+ /**
135
+ * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
136
+ */
137
+ currency?: Currency | null | undefined;
138
+ /**
139
+ * Current status of the bank feed.
140
+ */
141
+ feedStatus?: FeedStatus | undefined;
142
+ /**
143
+ * Country code according to ISO 3166-1 alpha-2.
144
+ */
145
+ country?: string | null | undefined;
146
+ customFields?: Array<CustomField> | undefined;
147
+ };
148
+
149
+ /** @internal */
150
+ export const BankAccountType$inboundSchema: z.ZodNativeEnum<
151
+ typeof BankAccountType
152
+ > = z.nativeEnum(BankAccountType);
153
+
154
+ /** @internal */
155
+ export const BankAccountType$outboundSchema: z.ZodNativeEnum<
156
+ typeof BankAccountType
157
+ > = BankAccountType$inboundSchema;
158
+
159
+ /**
160
+ * @internal
161
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
162
+ */
163
+ export namespace BankAccountType$ {
164
+ /** @deprecated use `BankAccountType$inboundSchema` instead. */
165
+ export const inboundSchema = BankAccountType$inboundSchema;
166
+ /** @deprecated use `BankAccountType$outboundSchema` instead. */
167
+ export const outboundSchema = BankAccountType$outboundSchema;
168
+ }
169
+
170
+ /** @internal */
171
+ export const FeedStatus$inboundSchema: z.ZodNativeEnum<typeof FeedStatus> = z
172
+ .nativeEnum(FeedStatus);
173
+
174
+ /** @internal */
175
+ export const FeedStatus$outboundSchema: z.ZodNativeEnum<typeof FeedStatus> =
176
+ FeedStatus$inboundSchema;
177
+
178
+ /**
179
+ * @internal
180
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
181
+ */
182
+ export namespace FeedStatus$ {
183
+ /** @deprecated use `FeedStatus$inboundSchema` instead. */
184
+ export const inboundSchema = FeedStatus$inboundSchema;
185
+ /** @deprecated use `FeedStatus$outboundSchema` instead. */
186
+ export const outboundSchema = FeedStatus$outboundSchema;
187
+ }
188
+
189
+ /** @internal */
190
+ export const BankFeedAccount$inboundSchema: z.ZodType<
191
+ BankFeedAccount,
192
+ z.ZodTypeDef,
193
+ unknown
194
+ > = z.object({
195
+ id: z.string(),
196
+ bank_account_type: BankAccountType$inboundSchema.optional(),
197
+ source_account_id: z.string().optional(),
198
+ target_account_id: z.string().optional(),
199
+ target_account_name: z.string().optional(),
200
+ target_account_number: z.string().optional(),
201
+ currency: z.nullable(Currency$inboundSchema).optional(),
202
+ feed_status: FeedStatus$inboundSchema.optional(),
203
+ country: z.nullable(z.string()).optional(),
204
+ custom_fields: z.array(CustomField$inboundSchema).optional(),
205
+ custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(),
206
+ created_at: z.nullable(
207
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
208
+ ).optional(),
209
+ updated_at: z.nullable(
210
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
211
+ ).optional(),
212
+ updated_by: z.nullable(z.string()).optional(),
213
+ created_by: z.nullable(z.string()).optional(),
214
+ }).transform((v) => {
215
+ return remap$(v, {
216
+ "bank_account_type": "bankAccountType",
217
+ "source_account_id": "sourceAccountId",
218
+ "target_account_id": "targetAccountId",
219
+ "target_account_name": "targetAccountName",
220
+ "target_account_number": "targetAccountNumber",
221
+ "feed_status": "feedStatus",
222
+ "custom_fields": "customFields",
223
+ "custom_mappings": "customMappings",
224
+ "created_at": "createdAt",
225
+ "updated_at": "updatedAt",
226
+ "updated_by": "updatedBy",
227
+ "created_by": "createdBy",
228
+ });
229
+ });
230
+
231
+ /** @internal */
232
+ export type BankFeedAccount$Outbound = {
233
+ id: string;
234
+ bank_account_type?: string | undefined;
235
+ source_account_id?: string | undefined;
236
+ target_account_id?: string | undefined;
237
+ target_account_name?: string | undefined;
238
+ target_account_number?: string | undefined;
239
+ currency?: string | null | undefined;
240
+ feed_status?: string | undefined;
241
+ country?: string | null | undefined;
242
+ custom_fields?: Array<CustomField$Outbound> | undefined;
243
+ custom_mappings?: CustomMappings$Outbound | null | undefined;
244
+ created_at?: string | null | undefined;
245
+ updated_at?: string | null | undefined;
246
+ updated_by?: string | null | undefined;
247
+ created_by?: string | null | undefined;
248
+ };
249
+
250
+ /** @internal */
251
+ export const BankFeedAccount$outboundSchema: z.ZodType<
252
+ BankFeedAccount$Outbound,
253
+ z.ZodTypeDef,
254
+ BankFeedAccount
255
+ > = z.object({
256
+ id: z.string(),
257
+ bankAccountType: BankAccountType$outboundSchema.optional(),
258
+ sourceAccountId: z.string().optional(),
259
+ targetAccountId: z.string().optional(),
260
+ targetAccountName: z.string().optional(),
261
+ targetAccountNumber: z.string().optional(),
262
+ currency: z.nullable(Currency$outboundSchema).optional(),
263
+ feedStatus: FeedStatus$outboundSchema.optional(),
264
+ country: z.nullable(z.string()).optional(),
265
+ customFields: z.array(CustomField$outboundSchema).optional(),
266
+ customMappings: z.nullable(CustomMappings$outboundSchema).optional(),
267
+ createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
268
+ updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
269
+ updatedBy: z.nullable(z.string()).optional(),
270
+ createdBy: z.nullable(z.string()).optional(),
271
+ }).transform((v) => {
272
+ return remap$(v, {
273
+ bankAccountType: "bank_account_type",
274
+ sourceAccountId: "source_account_id",
275
+ targetAccountId: "target_account_id",
276
+ targetAccountName: "target_account_name",
277
+ targetAccountNumber: "target_account_number",
278
+ feedStatus: "feed_status",
279
+ customFields: "custom_fields",
280
+ customMappings: "custom_mappings",
281
+ createdAt: "created_at",
282
+ updatedAt: "updated_at",
283
+ updatedBy: "updated_by",
284
+ createdBy: "created_by",
285
+ });
286
+ });
287
+
288
+ /**
289
+ * @internal
290
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
291
+ */
292
+ export namespace BankFeedAccount$ {
293
+ /** @deprecated use `BankFeedAccount$inboundSchema` instead. */
294
+ export const inboundSchema = BankFeedAccount$inboundSchema;
295
+ /** @deprecated use `BankFeedAccount$outboundSchema` instead. */
296
+ export const outboundSchema = BankFeedAccount$outboundSchema;
297
+ /** @deprecated use `BankFeedAccount$Outbound` instead. */
298
+ export type Outbound = BankFeedAccount$Outbound;
299
+ }
300
+
301
+ export function bankFeedAccountToJSON(
302
+ bankFeedAccount: BankFeedAccount,
303
+ ): string {
304
+ return JSON.stringify(BankFeedAccount$outboundSchema.parse(bankFeedAccount));
305
+ }
306
+
307
+ export function bankFeedAccountFromJSON(
308
+ jsonString: string,
309
+ ): SafeParseResult<BankFeedAccount, SDKValidationError> {
310
+ return safeParse(
311
+ jsonString,
312
+ (x) => BankFeedAccount$inboundSchema.parse(JSON.parse(x)),
313
+ `Failed to parse 'BankFeedAccount' from JSON`,
314
+ );
315
+ }
316
+
317
+ /** @internal */
318
+ export const BankFeedAccountInput$inboundSchema: z.ZodType<
319
+ BankFeedAccountInput,
320
+ z.ZodTypeDef,
321
+ unknown
322
+ > = z.object({
323
+ bank_account_type: BankAccountType$inboundSchema.optional(),
324
+ source_account_id: z.string().optional(),
325
+ target_account_id: z.string().optional(),
326
+ target_account_name: z.string().optional(),
327
+ target_account_number: z.string().optional(),
328
+ currency: z.nullable(Currency$inboundSchema).optional(),
329
+ feed_status: FeedStatus$inboundSchema.optional(),
330
+ country: z.nullable(z.string()).optional(),
331
+ custom_fields: z.array(CustomField$inboundSchema).optional(),
332
+ }).transform((v) => {
333
+ return remap$(v, {
334
+ "bank_account_type": "bankAccountType",
335
+ "source_account_id": "sourceAccountId",
336
+ "target_account_id": "targetAccountId",
337
+ "target_account_name": "targetAccountName",
338
+ "target_account_number": "targetAccountNumber",
339
+ "feed_status": "feedStatus",
340
+ "custom_fields": "customFields",
341
+ });
342
+ });
343
+
344
+ /** @internal */
345
+ export type BankFeedAccountInput$Outbound = {
346
+ bank_account_type?: string | undefined;
347
+ source_account_id?: string | undefined;
348
+ target_account_id?: string | undefined;
349
+ target_account_name?: string | undefined;
350
+ target_account_number?: string | undefined;
351
+ currency?: string | null | undefined;
352
+ feed_status?: string | undefined;
353
+ country?: string | null | undefined;
354
+ custom_fields?: Array<CustomField$Outbound> | undefined;
355
+ };
356
+
357
+ /** @internal */
358
+ export const BankFeedAccountInput$outboundSchema: z.ZodType<
359
+ BankFeedAccountInput$Outbound,
360
+ z.ZodTypeDef,
361
+ BankFeedAccountInput
362
+ > = z.object({
363
+ bankAccountType: BankAccountType$outboundSchema.optional(),
364
+ sourceAccountId: z.string().optional(),
365
+ targetAccountId: z.string().optional(),
366
+ targetAccountName: z.string().optional(),
367
+ targetAccountNumber: z.string().optional(),
368
+ currency: z.nullable(Currency$outboundSchema).optional(),
369
+ feedStatus: FeedStatus$outboundSchema.optional(),
370
+ country: z.nullable(z.string()).optional(),
371
+ customFields: z.array(CustomField$outboundSchema).optional(),
372
+ }).transform((v) => {
373
+ return remap$(v, {
374
+ bankAccountType: "bank_account_type",
375
+ sourceAccountId: "source_account_id",
376
+ targetAccountId: "target_account_id",
377
+ targetAccountName: "target_account_name",
378
+ targetAccountNumber: "target_account_number",
379
+ feedStatus: "feed_status",
380
+ customFields: "custom_fields",
381
+ });
382
+ });
383
+
384
+ /**
385
+ * @internal
386
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
387
+ */
388
+ export namespace BankFeedAccountInput$ {
389
+ /** @deprecated use `BankFeedAccountInput$inboundSchema` instead. */
390
+ export const inboundSchema = BankFeedAccountInput$inboundSchema;
391
+ /** @deprecated use `BankFeedAccountInput$outboundSchema` instead. */
392
+ export const outboundSchema = BankFeedAccountInput$outboundSchema;
393
+ /** @deprecated use `BankFeedAccountInput$Outbound` instead. */
394
+ export type Outbound = BankFeedAccountInput$Outbound;
395
+ }
396
+
397
+ export function bankFeedAccountInputToJSON(
398
+ bankFeedAccountInput: BankFeedAccountInput,
399
+ ): string {
400
+ return JSON.stringify(
401
+ BankFeedAccountInput$outboundSchema.parse(bankFeedAccountInput),
402
+ );
403
+ }
404
+
405
+ export function bankFeedAccountInputFromJSON(
406
+ jsonString: string,
407
+ ): SafeParseResult<BankFeedAccountInput, SDKValidationError> {
408
+ return safeParse(
409
+ jsonString,
410
+ (x) => BankFeedAccountInput$inboundSchema.parse(JSON.parse(x)),
411
+ `Failed to parse 'BankFeedAccountInput' from JSON`,
412
+ );
413
+ }