@apideck/unify 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (583) hide show
  1. package/FUNCTIONS.md +4 -2
  2. package/README.md +73 -12
  3. package/docs/sdks/activities/README.md +8 -4
  4. package/docs/sdks/apideckcompanies/README.md +8 -4
  5. package/docs/sdks/apideckcustomers/README.md +8 -4
  6. package/docs/sdks/apideckdepartments/README.md +8 -4
  7. package/docs/sdks/apis/README.md +8 -4
  8. package/docs/sdks/applicants/README.md +8 -4
  9. package/docs/sdks/applications/README.md +8 -4
  10. package/docs/sdks/attachments/README.md +8 -4
  11. package/docs/sdks/billpayments/README.md +8 -4
  12. package/docs/sdks/bills/README.md +8 -4
  13. package/docs/sdks/collections/README.md +8 -4
  14. package/docs/sdks/collectiontags/README.md +8 -4
  15. package/docs/sdks/collectionticketcomments/README.md +16 -8
  16. package/docs/sdks/collectiontickets/README.md +8 -4
  17. package/docs/sdks/collectionusers/README.md +8 -4
  18. package/docs/sdks/companies/README.md +8 -4
  19. package/docs/sdks/connectors/README.md +8 -4
  20. package/docs/sdks/consumers/README.md +8 -4
  21. package/docs/sdks/contacts/README.md +8 -4
  22. package/docs/sdks/creditnotes/README.md +8 -4
  23. package/docs/sdks/customers/README.md +8 -4
  24. package/docs/sdks/departments/README.md +8 -4
  25. package/docs/sdks/drivegroups/README.md +8 -4
  26. package/docs/sdks/drives/README.md +8 -4
  27. package/docs/sdks/employees/README.md +8 -4
  28. package/docs/sdks/eventlogs/README.md +8 -4
  29. package/docs/sdks/expenses/README.md +8 -4
  30. package/docs/sdks/files/README.md +8 -4
  31. package/docs/sdks/invoiceitems/README.md +8 -4
  32. package/docs/sdks/invoices/README.md +8 -4
  33. package/docs/sdks/jobs/README.md +8 -4
  34. package/docs/sdks/journalentries/README.md +8 -4
  35. package/docs/sdks/leads/README.md +8 -4
  36. package/docs/sdks/ledgeraccounts/README.md +8 -4
  37. package/docs/sdks/locations/README.md +8 -4
  38. package/docs/sdks/logs/README.md +8 -4
  39. package/docs/sdks/messages/README.md +8 -4
  40. package/docs/sdks/notes/README.md +8 -4
  41. package/docs/sdks/opportunities/README.md +8 -4
  42. package/docs/sdks/orders/README.md +8 -4
  43. package/docs/sdks/payments/README.md +8 -4
  44. package/docs/sdks/pipelines/README.md +8 -4
  45. package/docs/sdks/products/README.md +8 -4
  46. package/docs/sdks/purchaseorders/README.md +8 -4
  47. package/docs/sdks/sharedlinks/README.md +8 -4
  48. package/docs/sdks/subsidiaries/README.md +8 -4
  49. package/docs/sdks/suppliers/README.md +8 -4
  50. package/docs/sdks/taxrates/README.md +8 -4
  51. package/docs/sdks/timeoffrequests/README.md +8 -4
  52. package/docs/sdks/trackingcategories/README.md +8 -4
  53. package/docs/sdks/users/README.md +8 -4
  54. package/docs/sdks/webhooks/README.md +8 -4
  55. package/funcs/accountingAttachmentsList.d.ts +4 -1
  56. package/funcs/accountingAttachmentsList.d.ts.map +1 -1
  57. package/funcs/accountingAttachmentsList.js +20 -6
  58. package/funcs/accountingAttachmentsList.js.map +1 -1
  59. package/funcs/accountingBillPaymentsList.d.ts +4 -1
  60. package/funcs/accountingBillPaymentsList.d.ts.map +1 -1
  61. package/funcs/accountingBillPaymentsList.js +20 -6
  62. package/funcs/accountingBillPaymentsList.js.map +1 -1
  63. package/funcs/accountingBillsList.d.ts +4 -1
  64. package/funcs/accountingBillsList.d.ts.map +1 -1
  65. package/funcs/accountingBillsList.js +20 -6
  66. package/funcs/accountingBillsList.js.map +1 -1
  67. package/funcs/accountingCreditNotesList.d.ts +4 -1
  68. package/funcs/accountingCreditNotesList.d.ts.map +1 -1
  69. package/funcs/accountingCreditNotesList.js +20 -6
  70. package/funcs/accountingCreditNotesList.js.map +1 -1
  71. package/funcs/accountingCustomersList.d.ts +4 -1
  72. package/funcs/accountingCustomersList.d.ts.map +1 -1
  73. package/funcs/accountingCustomersList.js +20 -6
  74. package/funcs/accountingCustomersList.js.map +1 -1
  75. package/funcs/accountingDepartmentsList.d.ts +4 -1
  76. package/funcs/accountingDepartmentsList.d.ts.map +1 -1
  77. package/funcs/accountingDepartmentsList.js +20 -6
  78. package/funcs/accountingDepartmentsList.js.map +1 -1
  79. package/funcs/accountingExpensesList.d.ts +4 -1
  80. package/funcs/accountingExpensesList.d.ts.map +1 -1
  81. package/funcs/accountingExpensesList.js +20 -6
  82. package/funcs/accountingExpensesList.js.map +1 -1
  83. package/funcs/accountingInvoiceItemsList.d.ts +4 -1
  84. package/funcs/accountingInvoiceItemsList.d.ts.map +1 -1
  85. package/funcs/accountingInvoiceItemsList.js +20 -6
  86. package/funcs/accountingInvoiceItemsList.js.map +1 -1
  87. package/funcs/accountingInvoicesList.d.ts +4 -1
  88. package/funcs/accountingInvoicesList.d.ts.map +1 -1
  89. package/funcs/accountingInvoicesList.js +20 -6
  90. package/funcs/accountingInvoicesList.js.map +1 -1
  91. package/funcs/accountingJournalEntriesList.d.ts +4 -1
  92. package/funcs/accountingJournalEntriesList.d.ts.map +1 -1
  93. package/funcs/accountingJournalEntriesList.js +20 -6
  94. package/funcs/accountingJournalEntriesList.js.map +1 -1
  95. package/funcs/accountingLedgerAccountsList.d.ts +4 -1
  96. package/funcs/accountingLedgerAccountsList.d.ts.map +1 -1
  97. package/funcs/accountingLedgerAccountsList.js +20 -6
  98. package/funcs/accountingLedgerAccountsList.js.map +1 -1
  99. package/funcs/accountingLocationsList.d.ts +4 -1
  100. package/funcs/accountingLocationsList.d.ts.map +1 -1
  101. package/funcs/accountingLocationsList.js +20 -6
  102. package/funcs/accountingLocationsList.js.map +1 -1
  103. package/funcs/accountingPaymentsList.d.ts +4 -1
  104. package/funcs/accountingPaymentsList.d.ts.map +1 -1
  105. package/funcs/accountingPaymentsList.js +20 -6
  106. package/funcs/accountingPaymentsList.js.map +1 -1
  107. package/funcs/accountingPurchaseOrdersList.d.ts +4 -1
  108. package/funcs/accountingPurchaseOrdersList.d.ts.map +1 -1
  109. package/funcs/accountingPurchaseOrdersList.js +20 -6
  110. package/funcs/accountingPurchaseOrdersList.js.map +1 -1
  111. package/funcs/accountingSubsidiariesList.d.ts +4 -1
  112. package/funcs/accountingSubsidiariesList.d.ts.map +1 -1
  113. package/funcs/accountingSubsidiariesList.js +20 -6
  114. package/funcs/accountingSubsidiariesList.js.map +1 -1
  115. package/funcs/accountingSuppliersList.d.ts +4 -1
  116. package/funcs/accountingSuppliersList.d.ts.map +1 -1
  117. package/funcs/accountingSuppliersList.js +20 -6
  118. package/funcs/accountingSuppliersList.js.map +1 -1
  119. package/funcs/accountingTaxRatesList.d.ts +4 -1
  120. package/funcs/accountingTaxRatesList.d.ts.map +1 -1
  121. package/funcs/accountingTaxRatesList.js +20 -6
  122. package/funcs/accountingTaxRatesList.js.map +1 -1
  123. package/funcs/accountingTrackingCategoriesList.d.ts +4 -1
  124. package/funcs/accountingTrackingCategoriesList.d.ts.map +1 -1
  125. package/funcs/accountingTrackingCategoriesList.js +20 -6
  126. package/funcs/accountingTrackingCategoriesList.js.map +1 -1
  127. package/funcs/atsApplicantsList.d.ts +4 -1
  128. package/funcs/atsApplicantsList.d.ts.map +1 -1
  129. package/funcs/atsApplicantsList.js +20 -6
  130. package/funcs/atsApplicantsList.js.map +1 -1
  131. package/funcs/atsApplicationsList.d.ts +4 -1
  132. package/funcs/atsApplicationsList.d.ts.map +1 -1
  133. package/funcs/atsApplicationsList.js +20 -6
  134. package/funcs/atsApplicationsList.js.map +1 -1
  135. package/funcs/atsJobsList.d.ts +4 -1
  136. package/funcs/atsJobsList.d.ts.map +1 -1
  137. package/funcs/atsJobsList.js +20 -6
  138. package/funcs/atsJobsList.js.map +1 -1
  139. package/funcs/connectorApisList.d.ts +4 -1
  140. package/funcs/connectorApisList.d.ts.map +1 -1
  141. package/funcs/connectorApisList.js +20 -6
  142. package/funcs/connectorApisList.js.map +1 -1
  143. package/funcs/connectorConnectorsList.d.ts +4 -1
  144. package/funcs/connectorConnectorsList.d.ts.map +1 -1
  145. package/funcs/connectorConnectorsList.js +20 -6
  146. package/funcs/connectorConnectorsList.js.map +1 -1
  147. package/funcs/crmActivitiesList.d.ts +4 -1
  148. package/funcs/crmActivitiesList.d.ts.map +1 -1
  149. package/funcs/crmActivitiesList.js +20 -6
  150. package/funcs/crmActivitiesList.js.map +1 -1
  151. package/funcs/crmCompaniesList.d.ts +4 -1
  152. package/funcs/crmCompaniesList.d.ts.map +1 -1
  153. package/funcs/crmCompaniesList.js +20 -6
  154. package/funcs/crmCompaniesList.js.map +1 -1
  155. package/funcs/crmContactsList.d.ts +4 -1
  156. package/funcs/crmContactsList.d.ts.map +1 -1
  157. package/funcs/crmContactsList.js +20 -6
  158. package/funcs/crmContactsList.js.map +1 -1
  159. package/funcs/crmLeadsList.d.ts +4 -1
  160. package/funcs/crmLeadsList.d.ts.map +1 -1
  161. package/funcs/crmLeadsList.js +20 -6
  162. package/funcs/crmLeadsList.js.map +1 -1
  163. package/funcs/crmNotesList.d.ts +4 -1
  164. package/funcs/crmNotesList.d.ts.map +1 -1
  165. package/funcs/crmNotesList.js +20 -6
  166. package/funcs/crmNotesList.js.map +1 -1
  167. package/funcs/crmOpportunitiesList.d.ts +4 -1
  168. package/funcs/crmOpportunitiesList.d.ts.map +1 -1
  169. package/funcs/crmOpportunitiesList.js +20 -6
  170. package/funcs/crmOpportunitiesList.js.map +1 -1
  171. package/funcs/crmPipelinesList.d.ts +4 -1
  172. package/funcs/crmPipelinesList.d.ts.map +1 -1
  173. package/funcs/crmPipelinesList.js +20 -6
  174. package/funcs/crmPipelinesList.js.map +1 -1
  175. package/funcs/crmUsersList.d.ts +4 -1
  176. package/funcs/crmUsersList.d.ts.map +1 -1
  177. package/funcs/crmUsersList.js +20 -6
  178. package/funcs/crmUsersList.js.map +1 -1
  179. package/funcs/ecommerceCustomersList.d.ts +4 -1
  180. package/funcs/ecommerceCustomersList.d.ts.map +1 -1
  181. package/funcs/ecommerceCustomersList.js +20 -6
  182. package/funcs/ecommerceCustomersList.js.map +1 -1
  183. package/funcs/ecommerceOrdersList.d.ts +4 -1
  184. package/funcs/ecommerceOrdersList.d.ts.map +1 -1
  185. package/funcs/ecommerceOrdersList.js +20 -6
  186. package/funcs/ecommerceOrdersList.js.map +1 -1
  187. package/funcs/ecommerceProductsList.d.ts +4 -1
  188. package/funcs/ecommerceProductsList.d.ts.map +1 -1
  189. package/funcs/ecommerceProductsList.js +20 -6
  190. package/funcs/ecommerceProductsList.js.map +1 -1
  191. package/funcs/fileStorageDriveGroupsList.d.ts +4 -1
  192. package/funcs/fileStorageDriveGroupsList.d.ts.map +1 -1
  193. package/funcs/fileStorageDriveGroupsList.js +20 -6
  194. package/funcs/fileStorageDriveGroupsList.js.map +1 -1
  195. package/funcs/fileStorageDrivesList.d.ts +4 -1
  196. package/funcs/fileStorageDrivesList.d.ts.map +1 -1
  197. package/funcs/fileStorageDrivesList.js +20 -6
  198. package/funcs/fileStorageDrivesList.js.map +1 -1
  199. package/funcs/fileStorageFilesList.d.ts +4 -1
  200. package/funcs/fileStorageFilesList.d.ts.map +1 -1
  201. package/funcs/fileStorageFilesList.js +20 -6
  202. package/funcs/fileStorageFilesList.js.map +1 -1
  203. package/funcs/fileStorageSharedLinksList.d.ts +4 -1
  204. package/funcs/fileStorageSharedLinksList.d.ts.map +1 -1
  205. package/funcs/fileStorageSharedLinksList.js +20 -6
  206. package/funcs/fileStorageSharedLinksList.js.map +1 -1
  207. package/funcs/hrisCompaniesList.d.ts +4 -1
  208. package/funcs/hrisCompaniesList.d.ts.map +1 -1
  209. package/funcs/hrisCompaniesList.js +20 -6
  210. package/funcs/hrisCompaniesList.js.map +1 -1
  211. package/funcs/hrisDepartmentsList.d.ts +4 -1
  212. package/funcs/hrisDepartmentsList.d.ts.map +1 -1
  213. package/funcs/hrisDepartmentsList.js +20 -6
  214. package/funcs/hrisDepartmentsList.js.map +1 -1
  215. package/funcs/hrisEmployeesList.d.ts +4 -1
  216. package/funcs/hrisEmployeesList.d.ts.map +1 -1
  217. package/funcs/hrisEmployeesList.js +20 -6
  218. package/funcs/hrisEmployeesList.js.map +1 -1
  219. package/funcs/hrisTimeOffRequestsList.d.ts +4 -1
  220. package/funcs/hrisTimeOffRequestsList.d.ts.map +1 -1
  221. package/funcs/hrisTimeOffRequestsList.js +20 -6
  222. package/funcs/hrisTimeOffRequestsList.js.map +1 -1
  223. package/funcs/issueTrackingCollectionTagsList.d.ts +4 -1
  224. package/funcs/issueTrackingCollectionTagsList.d.ts.map +1 -1
  225. package/funcs/issueTrackingCollectionTagsList.js +20 -6
  226. package/funcs/issueTrackingCollectionTagsList.js.map +1 -1
  227. package/funcs/issueTrackingCollectionTicketCommentsGet.d.ts +4 -1
  228. package/funcs/issueTrackingCollectionTicketCommentsGet.d.ts.map +1 -1
  229. package/funcs/issueTrackingCollectionTicketCommentsGet.js +20 -6
  230. package/funcs/issueTrackingCollectionTicketCommentsGet.js.map +1 -1
  231. package/funcs/issueTrackingCollectionTicketCommentsList.d.ts +4 -1
  232. package/funcs/issueTrackingCollectionTicketCommentsList.d.ts.map +1 -1
  233. package/funcs/issueTrackingCollectionTicketCommentsList.js +20 -6
  234. package/funcs/issueTrackingCollectionTicketCommentsList.js.map +1 -1
  235. package/funcs/issueTrackingCollectionTicketsList.d.ts +4 -1
  236. package/funcs/issueTrackingCollectionTicketsList.d.ts.map +1 -1
  237. package/funcs/issueTrackingCollectionTicketsList.js +20 -6
  238. package/funcs/issueTrackingCollectionTicketsList.js.map +1 -1
  239. package/funcs/issueTrackingCollectionUsersList.d.ts +4 -1
  240. package/funcs/issueTrackingCollectionUsersList.d.ts.map +1 -1
  241. package/funcs/issueTrackingCollectionUsersList.js +20 -6
  242. package/funcs/issueTrackingCollectionUsersList.js.map +1 -1
  243. package/funcs/issueTrackingCollectionsList.d.ts +4 -1
  244. package/funcs/issueTrackingCollectionsList.d.ts.map +1 -1
  245. package/funcs/issueTrackingCollectionsList.js +20 -6
  246. package/funcs/issueTrackingCollectionsList.js.map +1 -1
  247. package/funcs/smsMessagesList.d.ts +4 -1
  248. package/funcs/smsMessagesList.d.ts.map +1 -1
  249. package/funcs/smsMessagesList.js +20 -6
  250. package/funcs/smsMessagesList.js.map +1 -1
  251. package/funcs/vaultConsumersList.d.ts +4 -1
  252. package/funcs/vaultConsumersList.d.ts.map +1 -1
  253. package/funcs/vaultConsumersList.js +20 -6
  254. package/funcs/vaultConsumersList.js.map +1 -1
  255. package/funcs/vaultLogsList.d.ts +4 -1
  256. package/funcs/vaultLogsList.d.ts.map +1 -1
  257. package/funcs/vaultLogsList.js +20 -6
  258. package/funcs/vaultLogsList.js.map +1 -1
  259. package/funcs/webhookEventLogsList.d.ts +4 -1
  260. package/funcs/webhookEventLogsList.d.ts.map +1 -1
  261. package/funcs/webhookEventLogsList.js +20 -6
  262. package/funcs/webhookEventLogsList.js.map +1 -1
  263. package/funcs/webhookWebhooksList.d.ts +4 -1
  264. package/funcs/webhookWebhooksList.d.ts.map +1 -1
  265. package/funcs/webhookWebhooksList.js +20 -6
  266. package/funcs/webhookWebhooksList.js.map +1 -1
  267. package/lib/config.d.ts +2 -2
  268. package/lib/config.js +2 -2
  269. package/package.json +1 -1
  270. package/sdk/activities.d.ts +4 -1
  271. package/sdk/activities.d.ts.map +1 -1
  272. package/sdk/activities.js +2 -1
  273. package/sdk/activities.js.map +1 -1
  274. package/sdk/apideckcompanies.d.ts +4 -1
  275. package/sdk/apideckcompanies.d.ts.map +1 -1
  276. package/sdk/apideckcompanies.js +2 -1
  277. package/sdk/apideckcompanies.js.map +1 -1
  278. package/sdk/apideckcustomers.d.ts +4 -1
  279. package/sdk/apideckcustomers.d.ts.map +1 -1
  280. package/sdk/apideckcustomers.js +2 -1
  281. package/sdk/apideckcustomers.js.map +1 -1
  282. package/sdk/apideckdepartments.d.ts +4 -1
  283. package/sdk/apideckdepartments.d.ts.map +1 -1
  284. package/sdk/apideckdepartments.js +2 -1
  285. package/sdk/apideckdepartments.js.map +1 -1
  286. package/sdk/apis.d.ts +4 -1
  287. package/sdk/apis.d.ts.map +1 -1
  288. package/sdk/apis.js +2 -1
  289. package/sdk/apis.js.map +1 -1
  290. package/sdk/applicants.d.ts +4 -1
  291. package/sdk/applicants.d.ts.map +1 -1
  292. package/sdk/applicants.js +2 -1
  293. package/sdk/applicants.js.map +1 -1
  294. package/sdk/applications.d.ts +4 -1
  295. package/sdk/applications.d.ts.map +1 -1
  296. package/sdk/applications.js +2 -1
  297. package/sdk/applications.js.map +1 -1
  298. package/sdk/attachments.d.ts +4 -1
  299. package/sdk/attachments.d.ts.map +1 -1
  300. package/sdk/attachments.js +2 -1
  301. package/sdk/attachments.js.map +1 -1
  302. package/sdk/billpayments.d.ts +4 -1
  303. package/sdk/billpayments.d.ts.map +1 -1
  304. package/sdk/billpayments.js +2 -1
  305. package/sdk/billpayments.js.map +1 -1
  306. package/sdk/bills.d.ts +4 -1
  307. package/sdk/bills.d.ts.map +1 -1
  308. package/sdk/bills.js +2 -1
  309. package/sdk/bills.js.map +1 -1
  310. package/sdk/collections.d.ts +4 -1
  311. package/sdk/collections.d.ts.map +1 -1
  312. package/sdk/collections.js +2 -1
  313. package/sdk/collections.js.map +1 -1
  314. package/sdk/collectiontags.d.ts +4 -1
  315. package/sdk/collectiontags.d.ts.map +1 -1
  316. package/sdk/collectiontags.js +2 -2
  317. package/sdk/collectiontags.js.map +1 -1
  318. package/sdk/collectionticketcomments.d.ts +7 -2
  319. package/sdk/collectionticketcomments.d.ts.map +1 -1
  320. package/sdk/collectionticketcomments.js +3 -2
  321. package/sdk/collectionticketcomments.js.map +1 -1
  322. package/sdk/collectiontickets.d.ts +4 -1
  323. package/sdk/collectiontickets.d.ts.map +1 -1
  324. package/sdk/collectiontickets.js +2 -1
  325. package/sdk/collectiontickets.js.map +1 -1
  326. package/sdk/collectionusers.d.ts +4 -1
  327. package/sdk/collectionusers.d.ts.map +1 -1
  328. package/sdk/collectionusers.js +2 -1
  329. package/sdk/collectionusers.js.map +1 -1
  330. package/sdk/companies.d.ts +4 -1
  331. package/sdk/companies.d.ts.map +1 -1
  332. package/sdk/companies.js +2 -1
  333. package/sdk/companies.js.map +1 -1
  334. package/sdk/connectors.d.ts +4 -1
  335. package/sdk/connectors.d.ts.map +1 -1
  336. package/sdk/connectors.js +2 -1
  337. package/sdk/connectors.js.map +1 -1
  338. package/sdk/consumers.d.ts +4 -1
  339. package/sdk/consumers.d.ts.map +1 -1
  340. package/sdk/consumers.js +2 -1
  341. package/sdk/consumers.js.map +1 -1
  342. package/sdk/contacts.d.ts +4 -1
  343. package/sdk/contacts.d.ts.map +1 -1
  344. package/sdk/contacts.js +2 -1
  345. package/sdk/contacts.js.map +1 -1
  346. package/sdk/creditnotes.d.ts +4 -1
  347. package/sdk/creditnotes.d.ts.map +1 -1
  348. package/sdk/creditnotes.js +2 -1
  349. package/sdk/creditnotes.js.map +1 -1
  350. package/sdk/customers.d.ts +4 -1
  351. package/sdk/customers.d.ts.map +1 -1
  352. package/sdk/customers.js +2 -1
  353. package/sdk/customers.js.map +1 -1
  354. package/sdk/departments.d.ts +4 -1
  355. package/sdk/departments.d.ts.map +1 -1
  356. package/sdk/departments.js +2 -1
  357. package/sdk/departments.js.map +1 -1
  358. package/sdk/drivegroups.d.ts +4 -1
  359. package/sdk/drivegroups.d.ts.map +1 -1
  360. package/sdk/drivegroups.js +2 -1
  361. package/sdk/drivegroups.js.map +1 -1
  362. package/sdk/drives.d.ts +4 -1
  363. package/sdk/drives.d.ts.map +1 -1
  364. package/sdk/drives.js +2 -1
  365. package/sdk/drives.js.map +1 -1
  366. package/sdk/employees.d.ts +4 -1
  367. package/sdk/employees.d.ts.map +1 -1
  368. package/sdk/employees.js +2 -1
  369. package/sdk/employees.js.map +1 -1
  370. package/sdk/eventlogs.d.ts +4 -1
  371. package/sdk/eventlogs.d.ts.map +1 -1
  372. package/sdk/eventlogs.js +2 -2
  373. package/sdk/eventlogs.js.map +1 -1
  374. package/sdk/expenses.d.ts +4 -1
  375. package/sdk/expenses.d.ts.map +1 -1
  376. package/sdk/expenses.js +2 -1
  377. package/sdk/expenses.js.map +1 -1
  378. package/sdk/files.d.ts +4 -1
  379. package/sdk/files.d.ts.map +1 -1
  380. package/sdk/files.js +2 -1
  381. package/sdk/files.js.map +1 -1
  382. package/sdk/invoiceitems.d.ts +4 -1
  383. package/sdk/invoiceitems.d.ts.map +1 -1
  384. package/sdk/invoiceitems.js +2 -1
  385. package/sdk/invoiceitems.js.map +1 -1
  386. package/sdk/invoices.d.ts +4 -1
  387. package/sdk/invoices.d.ts.map +1 -1
  388. package/sdk/invoices.js +2 -1
  389. package/sdk/invoices.js.map +1 -1
  390. package/sdk/jobs.d.ts +4 -1
  391. package/sdk/jobs.d.ts.map +1 -1
  392. package/sdk/jobs.js +2 -1
  393. package/sdk/jobs.js.map +1 -1
  394. package/sdk/journalentries.d.ts +4 -1
  395. package/sdk/journalentries.d.ts.map +1 -1
  396. package/sdk/journalentries.js +2 -1
  397. package/sdk/journalentries.js.map +1 -1
  398. package/sdk/leads.d.ts +4 -1
  399. package/sdk/leads.d.ts.map +1 -1
  400. package/sdk/leads.js +2 -1
  401. package/sdk/leads.js.map +1 -1
  402. package/sdk/ledgeraccounts.d.ts +4 -1
  403. package/sdk/ledgeraccounts.d.ts.map +1 -1
  404. package/sdk/ledgeraccounts.js +2 -1
  405. package/sdk/ledgeraccounts.js.map +1 -1
  406. package/sdk/locations.d.ts +4 -1
  407. package/sdk/locations.d.ts.map +1 -1
  408. package/sdk/locations.js +2 -1
  409. package/sdk/locations.js.map +1 -1
  410. package/sdk/logs.d.ts +4 -1
  411. package/sdk/logs.d.ts.map +1 -1
  412. package/sdk/logs.js +2 -2
  413. package/sdk/logs.js.map +1 -1
  414. package/sdk/messages.d.ts +4 -1
  415. package/sdk/messages.d.ts.map +1 -1
  416. package/sdk/messages.js +2 -1
  417. package/sdk/messages.js.map +1 -1
  418. package/sdk/notes.d.ts +4 -1
  419. package/sdk/notes.d.ts.map +1 -1
  420. package/sdk/notes.js +2 -1
  421. package/sdk/notes.js.map +1 -1
  422. package/sdk/opportunities.d.ts +4 -1
  423. package/sdk/opportunities.d.ts.map +1 -1
  424. package/sdk/opportunities.js +2 -1
  425. package/sdk/opportunities.js.map +1 -1
  426. package/sdk/orders.d.ts +4 -1
  427. package/sdk/orders.d.ts.map +1 -1
  428. package/sdk/orders.js +2 -1
  429. package/sdk/orders.js.map +1 -1
  430. package/sdk/payments.d.ts +4 -1
  431. package/sdk/payments.d.ts.map +1 -1
  432. package/sdk/payments.js +2 -1
  433. package/sdk/payments.js.map +1 -1
  434. package/sdk/pipelines.d.ts +4 -1
  435. package/sdk/pipelines.d.ts.map +1 -1
  436. package/sdk/pipelines.js +2 -1
  437. package/sdk/pipelines.js.map +1 -1
  438. package/sdk/products.d.ts +4 -1
  439. package/sdk/products.d.ts.map +1 -1
  440. package/sdk/products.js +2 -1
  441. package/sdk/products.js.map +1 -1
  442. package/sdk/purchaseorders.d.ts +4 -1
  443. package/sdk/purchaseorders.d.ts.map +1 -1
  444. package/sdk/purchaseorders.js +2 -1
  445. package/sdk/purchaseorders.js.map +1 -1
  446. package/sdk/sharedlinks.d.ts +4 -1
  447. package/sdk/sharedlinks.d.ts.map +1 -1
  448. package/sdk/sharedlinks.js +2 -1
  449. package/sdk/sharedlinks.js.map +1 -1
  450. package/sdk/subsidiaries.d.ts +4 -1
  451. package/sdk/subsidiaries.d.ts.map +1 -1
  452. package/sdk/subsidiaries.js +2 -1
  453. package/sdk/subsidiaries.js.map +1 -1
  454. package/sdk/suppliers.d.ts +4 -1
  455. package/sdk/suppliers.d.ts.map +1 -1
  456. package/sdk/suppliers.js +2 -1
  457. package/sdk/suppliers.js.map +1 -1
  458. package/sdk/taxrates.d.ts +4 -1
  459. package/sdk/taxrates.d.ts.map +1 -1
  460. package/sdk/taxrates.js +2 -1
  461. package/sdk/taxrates.js.map +1 -1
  462. package/sdk/timeoffrequests.d.ts +4 -1
  463. package/sdk/timeoffrequests.d.ts.map +1 -1
  464. package/sdk/timeoffrequests.js +2 -1
  465. package/sdk/timeoffrequests.js.map +1 -1
  466. package/sdk/trackingcategories.d.ts +4 -1
  467. package/sdk/trackingcategories.d.ts.map +1 -1
  468. package/sdk/trackingcategories.js +2 -1
  469. package/sdk/trackingcategories.js.map +1 -1
  470. package/sdk/users.d.ts +4 -1
  471. package/sdk/users.d.ts.map +1 -1
  472. package/sdk/users.js +2 -1
  473. package/sdk/users.js.map +1 -1
  474. package/sdk/webhooks.d.ts +4 -1
  475. package/sdk/webhooks.d.ts.map +1 -1
  476. package/sdk/webhooks.js +2 -1
  477. package/sdk/webhooks.js.map +1 -1
  478. package/src/funcs/accountingAttachmentsList.ts +71 -20
  479. package/src/funcs/accountingBillPaymentsList.ts +71 -20
  480. package/src/funcs/accountingBillsList.ts +71 -20
  481. package/src/funcs/accountingCreditNotesList.ts +71 -20
  482. package/src/funcs/accountingCustomersList.ts +71 -20
  483. package/src/funcs/accountingDepartmentsList.ts +71 -20
  484. package/src/funcs/accountingExpensesList.ts +71 -20
  485. package/src/funcs/accountingInvoiceItemsList.ts +71 -20
  486. package/src/funcs/accountingInvoicesList.ts +71 -20
  487. package/src/funcs/accountingJournalEntriesList.ts +71 -20
  488. package/src/funcs/accountingLedgerAccountsList.ts +71 -20
  489. package/src/funcs/accountingLocationsList.ts +71 -20
  490. package/src/funcs/accountingPaymentsList.ts +71 -20
  491. package/src/funcs/accountingPurchaseOrdersList.ts +71 -20
  492. package/src/funcs/accountingSubsidiariesList.ts +71 -20
  493. package/src/funcs/accountingSuppliersList.ts +71 -20
  494. package/src/funcs/accountingTaxRatesList.ts +71 -20
  495. package/src/funcs/accountingTrackingCategoriesList.ts +71 -20
  496. package/src/funcs/atsApplicantsList.ts +71 -20
  497. package/src/funcs/atsApplicationsList.ts +71 -20
  498. package/src/funcs/atsJobsList.ts +71 -20
  499. package/src/funcs/connectorApisList.ts +67 -18
  500. package/src/funcs/connectorConnectorsList.ts +67 -18
  501. package/src/funcs/crmActivitiesList.ts +71 -20
  502. package/src/funcs/crmCompaniesList.ts +71 -20
  503. package/src/funcs/crmContactsList.ts +71 -20
  504. package/src/funcs/crmLeadsList.ts +71 -20
  505. package/src/funcs/crmNotesList.ts +71 -20
  506. package/src/funcs/crmOpportunitiesList.ts +71 -20
  507. package/src/funcs/crmPipelinesList.ts +71 -20
  508. package/src/funcs/crmUsersList.ts +71 -20
  509. package/src/funcs/ecommerceCustomersList.ts +71 -20
  510. package/src/funcs/ecommerceOrdersList.ts +71 -20
  511. package/src/funcs/ecommerceProductsList.ts +71 -20
  512. package/src/funcs/fileStorageDriveGroupsList.ts +71 -20
  513. package/src/funcs/fileStorageDrivesList.ts +71 -20
  514. package/src/funcs/fileStorageFilesList.ts +71 -20
  515. package/src/funcs/fileStorageSharedLinksList.ts +71 -20
  516. package/src/funcs/hrisCompaniesList.ts +71 -20
  517. package/src/funcs/hrisDepartmentsList.ts +71 -20
  518. package/src/funcs/hrisEmployeesList.ts +71 -20
  519. package/src/funcs/hrisTimeOffRequestsList.ts +71 -20
  520. package/src/funcs/issueTrackingCollectionTagsList.ts +71 -20
  521. package/src/funcs/issueTrackingCollectionTicketCommentsGet.ts +71 -20
  522. package/src/funcs/issueTrackingCollectionTicketCommentsList.ts +71 -20
  523. package/src/funcs/issueTrackingCollectionTicketsList.ts +71 -20
  524. package/src/funcs/issueTrackingCollectionUsersList.ts +71 -20
  525. package/src/funcs/issueTrackingCollectionsList.ts +71 -20
  526. package/src/funcs/smsMessagesList.ts +71 -20
  527. package/src/funcs/vaultConsumersList.ts +71 -20
  528. package/src/funcs/vaultLogsList.ts +71 -20
  529. package/src/funcs/webhookEventLogsList.ts +71 -20
  530. package/src/funcs/webhookWebhooksList.ts +71 -20
  531. package/src/lib/config.ts +2 -2
  532. package/src/sdk/activities.ts +5 -2
  533. package/src/sdk/apideckcompanies.ts +5 -2
  534. package/src/sdk/apideckcustomers.ts +5 -2
  535. package/src/sdk/apideckdepartments.ts +5 -2
  536. package/src/sdk/apis.ts +5 -2
  537. package/src/sdk/applicants.ts +5 -2
  538. package/src/sdk/applications.ts +5 -2
  539. package/src/sdk/attachments.ts +8 -2
  540. package/src/sdk/billpayments.ts +8 -2
  541. package/src/sdk/bills.ts +5 -2
  542. package/src/sdk/collections.ts +8 -2
  543. package/src/sdk/collectiontags.ts +8 -3
  544. package/src/sdk/collectionticketcomments.ts +15 -4
  545. package/src/sdk/collectiontickets.ts +8 -2
  546. package/src/sdk/collectionusers.ts +8 -2
  547. package/src/sdk/companies.ts +5 -2
  548. package/src/sdk/connectors.ts +5 -2
  549. package/src/sdk/consumers.ts +5 -2
  550. package/src/sdk/contacts.ts +5 -2
  551. package/src/sdk/creditnotes.ts +8 -2
  552. package/src/sdk/customers.ts +5 -2
  553. package/src/sdk/departments.ts +8 -2
  554. package/src/sdk/drivegroups.ts +8 -2
  555. package/src/sdk/drives.ts +5 -2
  556. package/src/sdk/employees.ts +5 -2
  557. package/src/sdk/eventlogs.ts +5 -3
  558. package/src/sdk/expenses.ts +5 -2
  559. package/src/sdk/files.ts +5 -2
  560. package/src/sdk/invoiceitems.ts +8 -2
  561. package/src/sdk/invoices.ts +5 -2
  562. package/src/sdk/jobs.ts +3 -2
  563. package/src/sdk/journalentries.ts +8 -2
  564. package/src/sdk/leads.ts +3 -2
  565. package/src/sdk/ledgeraccounts.ts +8 -2
  566. package/src/sdk/locations.ts +5 -2
  567. package/src/sdk/logs.ts +5 -3
  568. package/src/sdk/messages.ts +5 -2
  569. package/src/sdk/notes.ts +3 -2
  570. package/src/sdk/opportunities.ts +5 -2
  571. package/src/sdk/orders.ts +5 -2
  572. package/src/sdk/payments.ts +5 -2
  573. package/src/sdk/pipelines.ts +5 -2
  574. package/src/sdk/products.ts +5 -2
  575. package/src/sdk/purchaseorders.ts +8 -2
  576. package/src/sdk/sharedlinks.ts +8 -2
  577. package/src/sdk/subsidiaries.ts +8 -2
  578. package/src/sdk/suppliers.ts +5 -2
  579. package/src/sdk/taxrates.ts +5 -2
  580. package/src/sdk/timeoffrequests.ts +5 -2
  581. package/src/sdk/trackingcategories.ts +8 -2
  582. package/src/sdk/users.ts +3 -2
  583. package/src/sdk/webhooks.ts +5 -2
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import { ApideckCore } from "../core.js";
6
+ import { dlv } from "../lib/dlv.js";
6
7
  import {
7
8
  encodeDeepObjectQuery,
8
9
  encodeFormQuery,
@@ -26,6 +27,12 @@ import * as errors from "../models/errors/index.js";
26
27
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
27
28
  import * as operations from "../models/operations/index.js";
28
29
  import { Result } from "../types/fp.js";
30
+ import {
31
+ createPageIterator,
32
+ haltIterator,
33
+ PageIterator,
34
+ Paginator,
35
+ } from "../types/operations.js";
29
36
 
30
37
  /**
31
38
  * List Ledger Accounts
@@ -38,20 +45,23 @@ export async function accountingLedgerAccountsList(
38
45
  request: operations.AccountingLedgerAccountsAllRequest,
39
46
  options?: RequestOptions,
40
47
  ): Promise<
41
- Result<
42
- operations.AccountingLedgerAccountsAllResponse,
43
- | errors.BadRequestResponse
44
- | errors.UnauthorizedResponse
45
- | errors.PaymentRequiredResponse
46
- | errors.NotFoundResponse
47
- | errors.UnprocessableResponse
48
- | APIError
49
- | SDKValidationError
50
- | UnexpectedClientError
51
- | InvalidRequestError
52
- | RequestAbortedError
53
- | RequestTimeoutError
54
- | ConnectionError
48
+ PageIterator<
49
+ Result<
50
+ operations.AccountingLedgerAccountsAllResponse,
51
+ | errors.BadRequestResponse
52
+ | errors.UnauthorizedResponse
53
+ | errors.PaymentRequiredResponse
54
+ | errors.NotFoundResponse
55
+ | errors.UnprocessableResponse
56
+ | APIError
57
+ | SDKValidationError
58
+ | UnexpectedClientError
59
+ | InvalidRequestError
60
+ | RequestAbortedError
61
+ | RequestTimeoutError
62
+ | ConnectionError
63
+ >,
64
+ { cursor: string }
55
65
  >
56
66
  > {
57
67
  const parsed = safeParse(
@@ -61,7 +71,7 @@ export async function accountingLedgerAccountsList(
61
71
  "Input validation failed",
62
72
  );
63
73
  if (!parsed.ok) {
64
- return parsed;
74
+ return haltIterator(parsed);
65
75
  }
66
76
  const payload = parsed.value;
67
77
  const body = null;
@@ -138,7 +148,7 @@ export async function accountingLedgerAccountsList(
138
148
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
139
149
  }, options);
140
150
  if (!requestRes.ok) {
141
- return requestRes;
151
+ return haltIterator(requestRes);
142
152
  }
143
153
  const req = requestRes.value;
144
154
 
@@ -149,7 +159,7 @@ export async function accountingLedgerAccountsList(
149
159
  retryCodes: context.retryCodes,
150
160
  });
151
161
  if (!doResult.ok) {
152
- return doResult;
162
+ return haltIterator(doResult);
153
163
  }
154
164
  const response = doResult.value;
155
165
 
@@ -157,7 +167,7 @@ export async function accountingLedgerAccountsList(
157
167
  HttpMeta: { Response: response, Request: req },
158
168
  };
159
169
 
160
- const [result] = await M.match<
170
+ const [result, raw] = await M.match<
161
171
  operations.AccountingLedgerAccountsAllResponse,
162
172
  | errors.BadRequestResponse
163
173
  | errors.UnauthorizedResponse
@@ -188,8 +198,49 @@ export async function accountingLedgerAccountsList(
188
198
  ),
189
199
  )(response, req, { extraFields: responseFields });
190
200
  if (!result.ok) {
191
- return result;
201
+ return haltIterator(result);
192
202
  }
193
203
 
194
- return result;
204
+ const nextFunc = (
205
+ responseData: unknown,
206
+ ): {
207
+ next: Paginator<
208
+ Result<
209
+ operations.AccountingLedgerAccountsAllResponse,
210
+ | errors.BadRequestResponse
211
+ | errors.UnauthorizedResponse
212
+ | errors.PaymentRequiredResponse
213
+ | errors.NotFoundResponse
214
+ | errors.UnprocessableResponse
215
+ | APIError
216
+ | SDKValidationError
217
+ | UnexpectedClientError
218
+ | InvalidRequestError
219
+ | RequestAbortedError
220
+ | RequestTimeoutError
221
+ | ConnectionError
222
+ >
223
+ >;
224
+ "~next"?: { cursor: string };
225
+ } => {
226
+ const nextCursor = dlv(responseData, "meta.cursors.next");
227
+ if (nextCursor == null) {
228
+ return { next: () => null };
229
+ }
230
+
231
+ const nextVal = () =>
232
+ accountingLedgerAccountsList(
233
+ client,
234
+ {
235
+ ...request,
236
+ cursor: nextCursor,
237
+ },
238
+ options,
239
+ );
240
+
241
+ return { next: nextVal, "~next": { cursor: nextCursor } };
242
+ };
243
+
244
+ const page = { ...result, ...nextFunc(raw) };
245
+ return { ...page, ...createPageIterator(page, (v) => !v.ok) };
195
246
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import { ApideckCore } from "../core.js";
6
+ import { dlv } from "../lib/dlv.js";
6
7
  import {
7
8
  encodeDeepObjectQuery,
8
9
  encodeFormQuery,
@@ -26,6 +27,12 @@ import * as errors from "../models/errors/index.js";
26
27
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
27
28
  import * as operations from "../models/operations/index.js";
28
29
  import { Result } from "../types/fp.js";
30
+ import {
31
+ createPageIterator,
32
+ haltIterator,
33
+ PageIterator,
34
+ Paginator,
35
+ } from "../types/operations.js";
29
36
 
30
37
  /**
31
38
  * List Locations
@@ -38,20 +45,23 @@ export async function accountingLocationsList(
38
45
  request: operations.AccountingLocationsAllRequest,
39
46
  options?: RequestOptions,
40
47
  ): Promise<
41
- Result<
42
- operations.AccountingLocationsAllResponse,
43
- | errors.BadRequestResponse
44
- | errors.UnauthorizedResponse
45
- | errors.PaymentRequiredResponse
46
- | errors.NotFoundResponse
47
- | errors.UnprocessableResponse
48
- | APIError
49
- | SDKValidationError
50
- | UnexpectedClientError
51
- | InvalidRequestError
52
- | RequestAbortedError
53
- | RequestTimeoutError
54
- | ConnectionError
48
+ PageIterator<
49
+ Result<
50
+ operations.AccountingLocationsAllResponse,
51
+ | errors.BadRequestResponse
52
+ | errors.UnauthorizedResponse
53
+ | errors.PaymentRequiredResponse
54
+ | errors.NotFoundResponse
55
+ | errors.UnprocessableResponse
56
+ | APIError
57
+ | SDKValidationError
58
+ | UnexpectedClientError
59
+ | InvalidRequestError
60
+ | RequestAbortedError
61
+ | RequestTimeoutError
62
+ | ConnectionError
63
+ >,
64
+ { cursor: string }
55
65
  >
56
66
  > {
57
67
  const parsed = safeParse(
@@ -61,7 +71,7 @@ export async function accountingLocationsList(
61
71
  "Input validation failed",
62
72
  );
63
73
  if (!parsed.ok) {
64
- return parsed;
74
+ return haltIterator(parsed);
65
75
  }
66
76
  const payload = parsed.value;
67
77
  const body = null;
@@ -136,7 +146,7 @@ export async function accountingLocationsList(
136
146
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
137
147
  }, options);
138
148
  if (!requestRes.ok) {
139
- return requestRes;
149
+ return haltIterator(requestRes);
140
150
  }
141
151
  const req = requestRes.value;
142
152
 
@@ -147,7 +157,7 @@ export async function accountingLocationsList(
147
157
  retryCodes: context.retryCodes,
148
158
  });
149
159
  if (!doResult.ok) {
150
- return doResult;
160
+ return haltIterator(doResult);
151
161
  }
152
162
  const response = doResult.value;
153
163
 
@@ -155,7 +165,7 @@ export async function accountingLocationsList(
155
165
  HttpMeta: { Response: response, Request: req },
156
166
  };
157
167
 
158
- const [result] = await M.match<
168
+ const [result, raw] = await M.match<
159
169
  operations.AccountingLocationsAllResponse,
160
170
  | errors.BadRequestResponse
161
171
  | errors.UnauthorizedResponse
@@ -184,8 +194,49 @@ export async function accountingLocationsList(
184
194
  }),
185
195
  )(response, req, { extraFields: responseFields });
186
196
  if (!result.ok) {
187
- return result;
197
+ return haltIterator(result);
188
198
  }
189
199
 
190
- return result;
200
+ const nextFunc = (
201
+ responseData: unknown,
202
+ ): {
203
+ next: Paginator<
204
+ Result<
205
+ operations.AccountingLocationsAllResponse,
206
+ | errors.BadRequestResponse
207
+ | errors.UnauthorizedResponse
208
+ | errors.PaymentRequiredResponse
209
+ | errors.NotFoundResponse
210
+ | errors.UnprocessableResponse
211
+ | APIError
212
+ | SDKValidationError
213
+ | UnexpectedClientError
214
+ | InvalidRequestError
215
+ | RequestAbortedError
216
+ | RequestTimeoutError
217
+ | ConnectionError
218
+ >
219
+ >;
220
+ "~next"?: { cursor: string };
221
+ } => {
222
+ const nextCursor = dlv(responseData, "meta.cursors.next");
223
+ if (nextCursor == null) {
224
+ return { next: () => null };
225
+ }
226
+
227
+ const nextVal = () =>
228
+ accountingLocationsList(
229
+ client,
230
+ {
231
+ ...request,
232
+ cursor: nextCursor,
233
+ },
234
+ options,
235
+ );
236
+
237
+ return { next: nextVal, "~next": { cursor: nextCursor } };
238
+ };
239
+
240
+ const page = { ...result, ...nextFunc(raw) };
241
+ return { ...page, ...createPageIterator(page, (v) => !v.ok) };
191
242
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import { ApideckCore } from "../core.js";
6
+ import { dlv } from "../lib/dlv.js";
6
7
  import {
7
8
  encodeDeepObjectQuery,
8
9
  encodeFormQuery,
@@ -26,6 +27,12 @@ import * as errors from "../models/errors/index.js";
26
27
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
27
28
  import * as operations from "../models/operations/index.js";
28
29
  import { Result } from "../types/fp.js";
30
+ import {
31
+ createPageIterator,
32
+ haltIterator,
33
+ PageIterator,
34
+ Paginator,
35
+ } from "../types/operations.js";
29
36
 
30
37
  /**
31
38
  * List Payments
@@ -38,20 +45,23 @@ export async function accountingPaymentsList(
38
45
  request: operations.AccountingPaymentsAllRequest,
39
46
  options?: RequestOptions,
40
47
  ): Promise<
41
- Result<
42
- operations.AccountingPaymentsAllResponse,
43
- | errors.BadRequestResponse
44
- | errors.UnauthorizedResponse
45
- | errors.PaymentRequiredResponse
46
- | errors.NotFoundResponse
47
- | errors.UnprocessableResponse
48
- | APIError
49
- | SDKValidationError
50
- | UnexpectedClientError
51
- | InvalidRequestError
52
- | RequestAbortedError
53
- | RequestTimeoutError
54
- | ConnectionError
48
+ PageIterator<
49
+ Result<
50
+ operations.AccountingPaymentsAllResponse,
51
+ | errors.BadRequestResponse
52
+ | errors.UnauthorizedResponse
53
+ | errors.PaymentRequiredResponse
54
+ | errors.NotFoundResponse
55
+ | errors.UnprocessableResponse
56
+ | APIError
57
+ | SDKValidationError
58
+ | UnexpectedClientError
59
+ | InvalidRequestError
60
+ | RequestAbortedError
61
+ | RequestTimeoutError
62
+ | ConnectionError
63
+ >,
64
+ { cursor: string }
55
65
  >
56
66
  > {
57
67
  const parsed = safeParse(
@@ -61,7 +71,7 @@ export async function accountingPaymentsList(
61
71
  "Input validation failed",
62
72
  );
63
73
  if (!parsed.ok) {
64
- return parsed;
74
+ return haltIterator(parsed);
65
75
  }
66
76
  const payload = parsed.value;
67
77
  const body = null;
@@ -138,7 +148,7 @@ export async function accountingPaymentsList(
138
148
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
139
149
  }, options);
140
150
  if (!requestRes.ok) {
141
- return requestRes;
151
+ return haltIterator(requestRes);
142
152
  }
143
153
  const req = requestRes.value;
144
154
 
@@ -149,7 +159,7 @@ export async function accountingPaymentsList(
149
159
  retryCodes: context.retryCodes,
150
160
  });
151
161
  if (!doResult.ok) {
152
- return doResult;
162
+ return haltIterator(doResult);
153
163
  }
154
164
  const response = doResult.value;
155
165
 
@@ -157,7 +167,7 @@ export async function accountingPaymentsList(
157
167
  HttpMeta: { Response: response, Request: req },
158
168
  };
159
169
 
160
- const [result] = await M.match<
170
+ const [result, raw] = await M.match<
161
171
  operations.AccountingPaymentsAllResponse,
162
172
  | errors.BadRequestResponse
163
173
  | errors.UnauthorizedResponse
@@ -186,8 +196,49 @@ export async function accountingPaymentsList(
186
196
  }),
187
197
  )(response, req, { extraFields: responseFields });
188
198
  if (!result.ok) {
189
- return result;
199
+ return haltIterator(result);
190
200
  }
191
201
 
192
- return result;
202
+ const nextFunc = (
203
+ responseData: unknown,
204
+ ): {
205
+ next: Paginator<
206
+ Result<
207
+ operations.AccountingPaymentsAllResponse,
208
+ | errors.BadRequestResponse
209
+ | errors.UnauthorizedResponse
210
+ | errors.PaymentRequiredResponse
211
+ | errors.NotFoundResponse
212
+ | errors.UnprocessableResponse
213
+ | APIError
214
+ | SDKValidationError
215
+ | UnexpectedClientError
216
+ | InvalidRequestError
217
+ | RequestAbortedError
218
+ | RequestTimeoutError
219
+ | ConnectionError
220
+ >
221
+ >;
222
+ "~next"?: { cursor: string };
223
+ } => {
224
+ const nextCursor = dlv(responseData, "meta.cursors.next");
225
+ if (nextCursor == null) {
226
+ return { next: () => null };
227
+ }
228
+
229
+ const nextVal = () =>
230
+ accountingPaymentsList(
231
+ client,
232
+ {
233
+ ...request,
234
+ cursor: nextCursor,
235
+ },
236
+ options,
237
+ );
238
+
239
+ return { next: nextVal, "~next": { cursor: nextCursor } };
240
+ };
241
+
242
+ const page = { ...result, ...nextFunc(raw) };
243
+ return { ...page, ...createPageIterator(page, (v) => !v.ok) };
193
244
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import { ApideckCore } from "../core.js";
6
+ import { dlv } from "../lib/dlv.js";
6
7
  import {
7
8
  encodeDeepObjectQuery,
8
9
  encodeFormQuery,
@@ -26,6 +27,12 @@ import * as errors from "../models/errors/index.js";
26
27
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
27
28
  import * as operations from "../models/operations/index.js";
28
29
  import { Result } from "../types/fp.js";
30
+ import {
31
+ createPageIterator,
32
+ haltIterator,
33
+ PageIterator,
34
+ Paginator,
35
+ } from "../types/operations.js";
29
36
 
30
37
  /**
31
38
  * List Purchase Orders
@@ -38,20 +45,23 @@ export async function accountingPurchaseOrdersList(
38
45
  request: operations.AccountingPurchaseOrdersAllRequest,
39
46
  options?: RequestOptions,
40
47
  ): Promise<
41
- Result<
42
- operations.AccountingPurchaseOrdersAllResponse,
43
- | errors.BadRequestResponse
44
- | errors.UnauthorizedResponse
45
- | errors.PaymentRequiredResponse
46
- | errors.NotFoundResponse
47
- | errors.UnprocessableResponse
48
- | APIError
49
- | SDKValidationError
50
- | UnexpectedClientError
51
- | InvalidRequestError
52
- | RequestAbortedError
53
- | RequestTimeoutError
54
- | ConnectionError
48
+ PageIterator<
49
+ Result<
50
+ operations.AccountingPurchaseOrdersAllResponse,
51
+ | errors.BadRequestResponse
52
+ | errors.UnauthorizedResponse
53
+ | errors.PaymentRequiredResponse
54
+ | errors.NotFoundResponse
55
+ | errors.UnprocessableResponse
56
+ | APIError
57
+ | SDKValidationError
58
+ | UnexpectedClientError
59
+ | InvalidRequestError
60
+ | RequestAbortedError
61
+ | RequestTimeoutError
62
+ | ConnectionError
63
+ >,
64
+ { cursor: string }
55
65
  >
56
66
  > {
57
67
  const parsed = safeParse(
@@ -61,7 +71,7 @@ export async function accountingPurchaseOrdersList(
61
71
  "Input validation failed",
62
72
  );
63
73
  if (!parsed.ok) {
64
- return parsed;
74
+ return haltIterator(parsed);
65
75
  }
66
76
  const payload = parsed.value;
67
77
  const body = null;
@@ -137,7 +147,7 @@ export async function accountingPurchaseOrdersList(
137
147
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
138
148
  }, options);
139
149
  if (!requestRes.ok) {
140
- return requestRes;
150
+ return haltIterator(requestRes);
141
151
  }
142
152
  const req = requestRes.value;
143
153
 
@@ -148,7 +158,7 @@ export async function accountingPurchaseOrdersList(
148
158
  retryCodes: context.retryCodes,
149
159
  });
150
160
  if (!doResult.ok) {
151
- return doResult;
161
+ return haltIterator(doResult);
152
162
  }
153
163
  const response = doResult.value;
154
164
 
@@ -156,7 +166,7 @@ export async function accountingPurchaseOrdersList(
156
166
  HttpMeta: { Response: response, Request: req },
157
167
  };
158
168
 
159
- const [result] = await M.match<
169
+ const [result, raw] = await M.match<
160
170
  operations.AccountingPurchaseOrdersAllResponse,
161
171
  | errors.BadRequestResponse
162
172
  | errors.UnauthorizedResponse
@@ -187,8 +197,49 @@ export async function accountingPurchaseOrdersList(
187
197
  ),
188
198
  )(response, req, { extraFields: responseFields });
189
199
  if (!result.ok) {
190
- return result;
200
+ return haltIterator(result);
191
201
  }
192
202
 
193
- return result;
203
+ const nextFunc = (
204
+ responseData: unknown,
205
+ ): {
206
+ next: Paginator<
207
+ Result<
208
+ operations.AccountingPurchaseOrdersAllResponse,
209
+ | errors.BadRequestResponse
210
+ | errors.UnauthorizedResponse
211
+ | errors.PaymentRequiredResponse
212
+ | errors.NotFoundResponse
213
+ | errors.UnprocessableResponse
214
+ | APIError
215
+ | SDKValidationError
216
+ | UnexpectedClientError
217
+ | InvalidRequestError
218
+ | RequestAbortedError
219
+ | RequestTimeoutError
220
+ | ConnectionError
221
+ >
222
+ >;
223
+ "~next"?: { cursor: string };
224
+ } => {
225
+ const nextCursor = dlv(responseData, "meta.cursors.next");
226
+ if (nextCursor == null) {
227
+ return { next: () => null };
228
+ }
229
+
230
+ const nextVal = () =>
231
+ accountingPurchaseOrdersList(
232
+ client,
233
+ {
234
+ ...request,
235
+ cursor: nextCursor,
236
+ },
237
+ options,
238
+ );
239
+
240
+ return { next: nextVal, "~next": { cursor: nextCursor } };
241
+ };
242
+
243
+ const page = { ...result, ...nextFunc(raw) };
244
+ return { ...page, ...createPageIterator(page, (v) => !v.ok) };
194
245
  }