@apideck/unify 0.29.6 → 0.29.8

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 (331) hide show
  1. package/README.md +10 -0
  2. package/docs/sdks/connectionconsent/README.md +100 -0
  3. package/docs/sdks/connectionconsents/README.md +92 -0
  4. package/docs/sdks/expenses/README.md +8 -0
  5. package/examples/package-lock.json +1 -1
  6. package/funcs/accountingAttachmentsList.js +3 -0
  7. package/funcs/accountingAttachmentsList.js.map +1 -1
  8. package/funcs/accountingBankFeedAccountsList.js +3 -0
  9. package/funcs/accountingBankFeedAccountsList.js.map +1 -1
  10. package/funcs/accountingBankFeedStatementsList.js +3 -0
  11. package/funcs/accountingBankFeedStatementsList.js.map +1 -1
  12. package/funcs/accountingBillPaymentsList.js +3 -0
  13. package/funcs/accountingBillPaymentsList.js.map +1 -1
  14. package/funcs/accountingBillsList.js +3 -0
  15. package/funcs/accountingBillsList.js.map +1 -1
  16. package/funcs/accountingCategoriesList.js +3 -0
  17. package/funcs/accountingCategoriesList.js.map +1 -1
  18. package/funcs/accountingCreditNotesList.js +3 -0
  19. package/funcs/accountingCreditNotesList.js.map +1 -1
  20. package/funcs/accountingCustomersList.js +3 -0
  21. package/funcs/accountingCustomersList.js.map +1 -1
  22. package/funcs/accountingDepartmentsList.js +3 -0
  23. package/funcs/accountingDepartmentsList.js.map +1 -1
  24. package/funcs/accountingExpensesList.d.ts.map +1 -1
  25. package/funcs/accountingExpensesList.js +7 -2
  26. package/funcs/accountingExpensesList.js.map +1 -1
  27. package/funcs/accountingInvoiceItemsList.js +3 -0
  28. package/funcs/accountingInvoiceItemsList.js.map +1 -1
  29. package/funcs/accountingInvoicesList.js +3 -0
  30. package/funcs/accountingInvoicesList.js.map +1 -1
  31. package/funcs/accountingJournalEntriesList.js +3 -0
  32. package/funcs/accountingJournalEntriesList.js.map +1 -1
  33. package/funcs/accountingLedgerAccountsList.js +3 -0
  34. package/funcs/accountingLedgerAccountsList.js.map +1 -1
  35. package/funcs/accountingLocationsList.js +3 -0
  36. package/funcs/accountingLocationsList.js.map +1 -1
  37. package/funcs/accountingPaymentsList.js +3 -0
  38. package/funcs/accountingPaymentsList.js.map +1 -1
  39. package/funcs/accountingPurchaseOrdersList.js +3 -0
  40. package/funcs/accountingPurchaseOrdersList.js.map +1 -1
  41. package/funcs/accountingQuotesList.js +3 -0
  42. package/funcs/accountingQuotesList.js.map +1 -1
  43. package/funcs/accountingSubsidiariesList.js +3 -0
  44. package/funcs/accountingSubsidiariesList.js.map +1 -1
  45. package/funcs/accountingSuppliersList.js +3 -0
  46. package/funcs/accountingSuppliersList.js.map +1 -1
  47. package/funcs/accountingTaxRatesList.js +3 -0
  48. package/funcs/accountingTaxRatesList.js.map +1 -1
  49. package/funcs/accountingTrackingCategoriesList.js +3 -0
  50. package/funcs/accountingTrackingCategoriesList.js.map +1 -1
  51. package/funcs/atsApplicantsList.js +3 -0
  52. package/funcs/atsApplicantsList.js.map +1 -1
  53. package/funcs/atsApplicationsList.js +3 -0
  54. package/funcs/atsApplicationsList.js.map +1 -1
  55. package/funcs/atsJobsList.js +3 -0
  56. package/funcs/atsJobsList.js.map +1 -1
  57. package/funcs/connectorApisList.js +3 -0
  58. package/funcs/connectorApisList.js.map +1 -1
  59. package/funcs/connectorConnectorsList.js +3 -0
  60. package/funcs/connectorConnectorsList.js.map +1 -1
  61. package/funcs/crmActivitiesList.js +3 -0
  62. package/funcs/crmActivitiesList.js.map +1 -1
  63. package/funcs/crmCompaniesList.js +3 -0
  64. package/funcs/crmCompaniesList.js.map +1 -1
  65. package/funcs/crmContactsList.js +3 -0
  66. package/funcs/crmContactsList.js.map +1 -1
  67. package/funcs/crmCustomObjectSchemasList.js +3 -0
  68. package/funcs/crmCustomObjectSchemasList.js.map +1 -1
  69. package/funcs/crmCustomObjectsList.js +3 -0
  70. package/funcs/crmCustomObjectsList.js.map +1 -1
  71. package/funcs/crmLeadsList.js +3 -0
  72. package/funcs/crmLeadsList.js.map +1 -1
  73. package/funcs/crmNotesList.js +3 -0
  74. package/funcs/crmNotesList.js.map +1 -1
  75. package/funcs/crmOpportunitiesList.js +3 -0
  76. package/funcs/crmOpportunitiesList.js.map +1 -1
  77. package/funcs/crmPipelinesList.js +3 -0
  78. package/funcs/crmPipelinesList.js.map +1 -1
  79. package/funcs/crmUsersList.js +3 -0
  80. package/funcs/crmUsersList.js.map +1 -1
  81. package/funcs/ecommerceCustomersList.js +3 -0
  82. package/funcs/ecommerceCustomersList.js.map +1 -1
  83. package/funcs/ecommerceOrdersList.js +3 -0
  84. package/funcs/ecommerceOrdersList.js.map +1 -1
  85. package/funcs/ecommerceProductsList.js +3 -0
  86. package/funcs/ecommerceProductsList.js.map +1 -1
  87. package/funcs/fileStorageDriveGroupsList.js +3 -0
  88. package/funcs/fileStorageDriveGroupsList.js.map +1 -1
  89. package/funcs/fileStorageDrivesList.js +3 -0
  90. package/funcs/fileStorageDrivesList.js.map +1 -1
  91. package/funcs/fileStorageFilesList.js +3 -0
  92. package/funcs/fileStorageFilesList.js.map +1 -1
  93. package/funcs/fileStorageSharedLinksList.js +3 -0
  94. package/funcs/fileStorageSharedLinksList.js.map +1 -1
  95. package/funcs/hrisCompaniesList.js +3 -0
  96. package/funcs/hrisCompaniesList.js.map +1 -1
  97. package/funcs/hrisDepartmentsList.js +3 -0
  98. package/funcs/hrisDepartmentsList.js.map +1 -1
  99. package/funcs/hrisEmployeesList.js +3 -0
  100. package/funcs/hrisEmployeesList.js.map +1 -1
  101. package/funcs/hrisTimeOffRequestsList.js +3 -0
  102. package/funcs/hrisTimeOffRequestsList.js.map +1 -1
  103. package/funcs/issueTrackingCollectionTagsList.js +3 -0
  104. package/funcs/issueTrackingCollectionTagsList.js.map +1 -1
  105. package/funcs/issueTrackingCollectionTicketCommentsGet.js +3 -0
  106. package/funcs/issueTrackingCollectionTicketCommentsGet.js.map +1 -1
  107. package/funcs/issueTrackingCollectionTicketCommentsList.js +3 -0
  108. package/funcs/issueTrackingCollectionTicketCommentsList.js.map +1 -1
  109. package/funcs/issueTrackingCollectionTicketsList.js +3 -0
  110. package/funcs/issueTrackingCollectionTicketsList.js.map +1 -1
  111. package/funcs/issueTrackingCollectionUsersList.js +3 -0
  112. package/funcs/issueTrackingCollectionUsersList.js.map +1 -1
  113. package/funcs/issueTrackingCollectionsList.js +3 -0
  114. package/funcs/issueTrackingCollectionsList.js.map +1 -1
  115. package/funcs/smsMessagesList.js +3 -0
  116. package/funcs/smsMessagesList.js.map +1 -1
  117. package/funcs/vaultConnectionConsentUpdate.d.ts +18 -0
  118. package/funcs/vaultConnectionConsentUpdate.d.ts.map +1 -0
  119. package/funcs/vaultConnectionConsentUpdate.js +144 -0
  120. package/funcs/vaultConnectionConsentUpdate.js.map +1 -0
  121. package/funcs/vaultConnectionConsentsList.d.ts +18 -0
  122. package/funcs/vaultConnectionConsentsList.d.ts.map +1 -0
  123. package/funcs/vaultConnectionConsentsList.js +141 -0
  124. package/funcs/vaultConnectionConsentsList.js.map +1 -0
  125. package/funcs/vaultConsumersList.js +3 -0
  126. package/funcs/vaultConsumersList.js.map +1 -1
  127. package/funcs/vaultLogsList.js +3 -0
  128. package/funcs/vaultLogsList.js.map +1 -1
  129. package/funcs/webhookEventLogsList.js +3 -0
  130. package/funcs/webhookEventLogsList.js.map +1 -1
  131. package/funcs/webhookWebhooksList.js +3 -0
  132. package/funcs/webhookWebhooksList.js.map +1 -1
  133. package/jsr.json +1 -1
  134. package/lib/config.d.ts +4 -4
  135. package/lib/config.js +4 -4
  136. package/models/components/companyinfo.d.ts +42 -0
  137. package/models/components/companyinfo.d.ts.map +1 -1
  138. package/models/components/companyinfo.js +29 -1
  139. package/models/components/companyinfo.js.map +1 -1
  140. package/models/components/connection.d.ts +28 -0
  141. package/models/components/connection.d.ts.map +1 -1
  142. package/models/components/connection.js +31 -0
  143. package/models/components/connection.js.map +1 -1
  144. package/models/components/consentrecord.d.ts +48 -0
  145. package/models/components/consentrecord.d.ts.map +1 -0
  146. package/models/components/consentrecord.js +85 -0
  147. package/models/components/consentrecord.js.map +1 -0
  148. package/models/components/consentrecordinput.d.ts +38 -0
  149. package/models/components/consentrecordinput.d.ts.map +1 -0
  150. package/models/components/consentrecordinput.js +72 -0
  151. package/models/components/consentrecordinput.js.map +1 -0
  152. package/models/components/consentstate.d.ts +46 -0
  153. package/models/components/consentstate.d.ts.map +1 -0
  154. package/models/components/consentstate.js +67 -0
  155. package/models/components/consentstate.js.map +1 -0
  156. package/models/components/datascopes.d.ts +43 -0
  157. package/models/components/datascopes.d.ts.map +1 -0
  158. package/models/components/datascopes.js +83 -0
  159. package/models/components/datascopes.js.map +1 -0
  160. package/models/components/datascopesinput.d.ts +38 -0
  161. package/models/components/datascopesinput.d.ts.map +1 -0
  162. package/models/components/datascopesinput.js +72 -0
  163. package/models/components/datascopesinput.js.map +1 -0
  164. package/models/components/datascopesresources.d.ts +98 -0
  165. package/models/components/datascopesresources.d.ts.map +1 -0
  166. package/models/components/datascopesresources.js +121 -0
  167. package/models/components/datascopesresources.js.map +1 -0
  168. package/models/components/expense.d.ts +41 -0
  169. package/models/components/expense.d.ts.map +1 -1
  170. package/models/components/expense.js +27 -1
  171. package/models/components/expense.js.map +1 -1
  172. package/models/components/expensesfilter.d.ts +75 -0
  173. package/models/components/expensesfilter.d.ts.map +1 -0
  174. package/models/components/expensesfilter.js +105 -0
  175. package/models/components/expensesfilter.js.map +1 -0
  176. package/models/components/formfield.d.ts +3 -0
  177. package/models/components/formfield.d.ts.map +1 -1
  178. package/models/components/formfield.js +1 -0
  179. package/models/components/formfield.js.map +1 -1
  180. package/models/components/getconsentrecordsresponse.d.ts +52 -0
  181. package/models/components/getconsentrecordsresponse.d.ts.map +1 -0
  182. package/models/components/getconsentrecordsresponse.js +87 -0
  183. package/models/components/getconsentrecordsresponse.js.map +1 -0
  184. package/models/components/index.d.ts +10 -0
  185. package/models/components/index.d.ts.map +1 -1
  186. package/models/components/index.js +10 -0
  187. package/models/components/index.js.map +1 -1
  188. package/models/components/invoiceitem.d.ts +11 -0
  189. package/models/components/invoiceitem.d.ts.map +1 -1
  190. package/models/components/invoiceitem.js +5 -0
  191. package/models/components/invoiceitem.js.map +1 -1
  192. package/models/components/journalentriesfilter.d.ts +46 -0
  193. package/models/components/journalentriesfilter.d.ts.map +1 -1
  194. package/models/components/journalentriesfilter.js +28 -1
  195. package/models/components/journalentriesfilter.js.map +1 -1
  196. package/models/components/timeoffrequestsfilter.d.ts +2 -2
  197. package/models/components/trackingcategory.d.ts +10 -0
  198. package/models/components/trackingcategory.d.ts.map +1 -1
  199. package/models/components/trackingcategory.js +8 -0
  200. package/models/components/trackingcategory.js.map +1 -1
  201. package/models/components/updateconsentrequest.d.ts +133 -0
  202. package/models/components/updateconsentrequest.d.ts.map +1 -0
  203. package/models/components/updateconsentrequest.js +158 -0
  204. package/models/components/updateconsentrequest.js.map +1 -0
  205. package/models/components/updateconsentresponse.d.ts +52 -0
  206. package/models/components/updateconsentresponse.d.ts.map +1 -0
  207. package/models/components/updateconsentresponse.js +87 -0
  208. package/models/components/updateconsentresponse.js.map +1 -0
  209. package/models/components/webhookeventtype.d.ts +6 -6
  210. package/models/components/webhookeventtype.js +2 -2
  211. package/models/components/webhookeventtype.js.map +1 -1
  212. package/models/operations/accountingexpensesall.d.ts +5 -0
  213. package/models/operations/accountingexpensesall.d.ts.map +1 -1
  214. package/models/operations/accountingexpensesall.js +2 -0
  215. package/models/operations/accountingexpensesall.js.map +1 -1
  216. package/models/operations/index.d.ts +2 -0
  217. package/models/operations/index.d.ts.map +1 -1
  218. package/models/operations/index.js +2 -0
  219. package/models/operations/index.js.map +1 -1
  220. package/models/operations/vaultconnectionconsentsall.d.ts +116 -0
  221. package/models/operations/vaultconnectionconsentsall.d.ts.map +1 -0
  222. package/models/operations/vaultconnectionconsentsall.js +163 -0
  223. package/models/operations/vaultconnectionconsentsall.js.map +1 -0
  224. package/models/operations/vaultconnectionconsentupdate.d.ts +121 -0
  225. package/models/operations/vaultconnectionconsentupdate.d.ts.map +1 -0
  226. package/models/operations/vaultconnectionconsentupdate.js +167 -0
  227. package/models/operations/vaultconnectionconsentupdate.js.map +1 -0
  228. package/package.json +1 -1
  229. package/sdk/connectionconsent.d.ts +12 -0
  230. package/sdk/connectionconsent.d.ts.map +1 -0
  231. package/sdk/connectionconsent.js +22 -0
  232. package/sdk/connectionconsent.js.map +1 -0
  233. package/sdk/connectionconsents.d.ts +12 -0
  234. package/sdk/connectionconsents.d.ts.map +1 -0
  235. package/sdk/connectionconsents.js +22 -0
  236. package/sdk/connectionconsents.js.map +1 -0
  237. package/sdk/vault.d.ts +6 -0
  238. package/sdk/vault.d.ts.map +1 -1
  239. package/sdk/vault.js +8 -0
  240. package/sdk/vault.js.map +1 -1
  241. package/src/__tests__/connectionconsent.test.ts +89 -0
  242. package/src/__tests__/connectionconsents.test.ts +31 -0
  243. package/src/funcs/accountingAttachmentsList.ts +3 -0
  244. package/src/funcs/accountingBankFeedAccountsList.ts +3 -0
  245. package/src/funcs/accountingBankFeedStatementsList.ts +3 -0
  246. package/src/funcs/accountingBillPaymentsList.ts +3 -0
  247. package/src/funcs/accountingBillsList.ts +3 -0
  248. package/src/funcs/accountingCategoriesList.ts +3 -0
  249. package/src/funcs/accountingCreditNotesList.ts +3 -0
  250. package/src/funcs/accountingCustomersList.ts +3 -0
  251. package/src/funcs/accountingDepartmentsList.ts +3 -0
  252. package/src/funcs/accountingExpensesList.ts +19 -6
  253. package/src/funcs/accountingInvoiceItemsList.ts +3 -0
  254. package/src/funcs/accountingInvoicesList.ts +3 -0
  255. package/src/funcs/accountingJournalEntriesList.ts +3 -0
  256. package/src/funcs/accountingLedgerAccountsList.ts +3 -0
  257. package/src/funcs/accountingLocationsList.ts +3 -0
  258. package/src/funcs/accountingPaymentsList.ts +3 -0
  259. package/src/funcs/accountingPurchaseOrdersList.ts +3 -0
  260. package/src/funcs/accountingQuotesList.ts +3 -0
  261. package/src/funcs/accountingSubsidiariesList.ts +3 -0
  262. package/src/funcs/accountingSuppliersList.ts +3 -0
  263. package/src/funcs/accountingTaxRatesList.ts +3 -0
  264. package/src/funcs/accountingTrackingCategoriesList.ts +3 -0
  265. package/src/funcs/atsApplicantsList.ts +3 -0
  266. package/src/funcs/atsApplicationsList.ts +3 -0
  267. package/src/funcs/atsJobsList.ts +3 -0
  268. package/src/funcs/connectorApisList.ts +3 -0
  269. package/src/funcs/connectorConnectorsList.ts +3 -0
  270. package/src/funcs/crmActivitiesList.ts +3 -0
  271. package/src/funcs/crmCompaniesList.ts +3 -0
  272. package/src/funcs/crmContactsList.ts +3 -0
  273. package/src/funcs/crmCustomObjectSchemasList.ts +3 -0
  274. package/src/funcs/crmCustomObjectsList.ts +3 -0
  275. package/src/funcs/crmLeadsList.ts +3 -0
  276. package/src/funcs/crmNotesList.ts +3 -0
  277. package/src/funcs/crmOpportunitiesList.ts +3 -0
  278. package/src/funcs/crmPipelinesList.ts +3 -0
  279. package/src/funcs/crmUsersList.ts +3 -0
  280. package/src/funcs/ecommerceCustomersList.ts +3 -0
  281. package/src/funcs/ecommerceOrdersList.ts +3 -0
  282. package/src/funcs/ecommerceProductsList.ts +3 -0
  283. package/src/funcs/fileStorageDriveGroupsList.ts +3 -0
  284. package/src/funcs/fileStorageDrivesList.ts +3 -0
  285. package/src/funcs/fileStorageFilesList.ts +3 -0
  286. package/src/funcs/fileStorageSharedLinksList.ts +3 -0
  287. package/src/funcs/hrisCompaniesList.ts +3 -0
  288. package/src/funcs/hrisDepartmentsList.ts +3 -0
  289. package/src/funcs/hrisEmployeesList.ts +3 -0
  290. package/src/funcs/hrisTimeOffRequestsList.ts +3 -0
  291. package/src/funcs/issueTrackingCollectionTagsList.ts +3 -0
  292. package/src/funcs/issueTrackingCollectionTicketCommentsGet.ts +3 -0
  293. package/src/funcs/issueTrackingCollectionTicketCommentsList.ts +3 -0
  294. package/src/funcs/issueTrackingCollectionTicketsList.ts +3 -0
  295. package/src/funcs/issueTrackingCollectionUsersList.ts +3 -0
  296. package/src/funcs/issueTrackingCollectionsList.ts +3 -0
  297. package/src/funcs/smsMessagesList.ts +3 -0
  298. package/src/funcs/vaultConnectionConsentUpdate.ts +230 -0
  299. package/src/funcs/vaultConnectionConsentsList.ts +225 -0
  300. package/src/funcs/vaultConsumersList.ts +3 -0
  301. package/src/funcs/vaultLogsList.ts +3 -0
  302. package/src/funcs/webhookEventLogsList.ts +3 -0
  303. package/src/funcs/webhookWebhooksList.ts +3 -0
  304. package/src/lib/config.ts +4 -4
  305. package/src/models/components/companyinfo.ts +44 -0
  306. package/src/models/components/connection.ts +78 -0
  307. package/src/models/components/consentrecord.ts +101 -0
  308. package/src/models/components/consentrecordinput.ts +82 -0
  309. package/src/models/components/consentstate.ts +41 -0
  310. package/src/models/components/datascopes.ts +94 -0
  311. package/src/models/components/datascopesinput.ts +80 -0
  312. package/src/models/components/datascopesresources.ts +172 -0
  313. package/src/models/components/expense.ts +47 -0
  314. package/src/models/components/expensesfilter.ts +111 -0
  315. package/src/models/components/formfield.ts +1 -0
  316. package/src/models/components/getconsentrecordsresponse.ts +107 -0
  317. package/src/models/components/index.ts +10 -0
  318. package/src/models/components/invoiceitem.ts +19 -0
  319. package/src/models/components/journalentriesfilter.ts +40 -0
  320. package/src/models/components/timeoffrequestsfilter.ts +2 -2
  321. package/src/models/components/trackingcategory.ts +18 -0
  322. package/src/models/components/updateconsentrequest.ts +229 -0
  323. package/src/models/components/updateconsentresponse.ts +107 -0
  324. package/src/models/components/webhookeventtype.ts +2 -2
  325. package/src/models/operations/accountingexpensesall.ts +7 -0
  326. package/src/models/operations/index.ts +2 -0
  327. package/src/models/operations/vaultconnectionconsentsall.ts +272 -0
  328. package/src/models/operations/vaultconnectionconsentupdate.ts +284 -0
  329. package/src/sdk/connectionconsent.ts +27 -0
  330. package/src/sdk/connectionconsents.ts +27 -0
  331. package/src/sdk/vault.ts +12 -0
@@ -0,0 +1,89 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { expect, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { createTestHTTPClient } from "./testclient.js";
8
+
9
+ test("Connectionconsent Vault Connection Consent Update", async () => {
10
+ const testHttpClient = createTestHTTPClient("vault.connectionConsentUpdate");
11
+
12
+ const apideck = new Apideck({
13
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
14
+ httpClient: testHttpClient,
15
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
16
+ });
17
+
18
+ const result = await apideck.vault.connectionConsent.update({
19
+ consumerId: "test-consumer",
20
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
21
+ serviceId: "pipedrive",
22
+ unifiedApi: "crm",
23
+ updateConsentRequest: {
24
+ resources: "*",
25
+ granted: true,
26
+ },
27
+ });
28
+ expect(result.httpMeta.response.status).toBe(200);
29
+ expect(result.updateConsentResponse).toBeDefined();
30
+ expect(result.updateConsentResponse).toEqual({
31
+ statusCode: 200,
32
+ status: "OK",
33
+ data: {
34
+ id: "con_1234567890",
35
+ createdAt: "2025-04-15T14:30:00Z",
36
+ granted: true,
37
+ resources: {
38
+ "hris.employees": {
39
+ "id": {
40
+ read: true,
41
+ write: false,
42
+ },
43
+ "first_name": {
44
+ read: true,
45
+ write: true,
46
+ },
47
+ "last_name": {
48
+ read: true,
49
+ write: true,
50
+ },
51
+ "email": {
52
+ read: true,
53
+ write: true,
54
+ },
55
+ "addresses[].street": {
56
+ read: true,
57
+ write: false,
58
+ },
59
+ "addresses[].city": {
60
+ read: true,
61
+ write: false,
62
+ },
63
+ "employment.job_title": {
64
+ read: true,
65
+ write: true,
66
+ },
67
+ "custom_fields[].employee_number": {
68
+ read: true,
69
+ write: false,
70
+ },
71
+ },
72
+ "hris.departments": {
73
+ "id": {
74
+ read: true,
75
+ write: false,
76
+ },
77
+ "name": {
78
+ read: true,
79
+ write: true,
80
+ },
81
+ "code": {
82
+ read: true,
83
+ write: false,
84
+ },
85
+ },
86
+ },
87
+ },
88
+ });
89
+ });
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { expect, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { createTestHTTPClient } from "./testclient.js";
8
+
9
+ test("Connectionconsents Vault Connection Consents All", async () => {
10
+ const testHttpClient = createTestHTTPClient("vault.connectionConsentsAll");
11
+
12
+ const apideck = new Apideck({
13
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
14
+ httpClient: testHttpClient,
15
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
16
+ });
17
+
18
+ const result = await apideck.vault.connectionConsents.list({
19
+ consumerId: "test-consumer",
20
+ appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
21
+ serviceId: "pipedrive",
22
+ unifiedApi: "crm",
23
+ });
24
+ expect(result.httpMeta.response.status).toBe(200);
25
+ expect(result.getConsentRecordsResponse).toBeDefined();
26
+ expect(result.getConsentRecordsResponse).toEqual({
27
+ statusCode: 200,
28
+ status: "OK",
29
+ data: [],
30
+ });
31
+ });
@@ -278,6 +278,9 @@ async function $do(
278
278
  if (typeof nextCursor !== "string") {
279
279
  return { next: () => null };
280
280
  }
281
+ if (nextCursor.trim() === "") {
282
+ return { next: () => null };
283
+ }
281
284
 
282
285
  const nextVal = () =>
283
286
  accountingAttachmentsList(
@@ -279,6 +279,9 @@ async function $do(
279
279
  if (typeof nextCursor !== "string") {
280
280
  return { next: () => null };
281
281
  }
282
+ if (nextCursor.trim() === "") {
283
+ return { next: () => null };
284
+ }
282
285
 
283
286
  const nextVal = () =>
284
287
  accountingBankFeedAccountsList(
@@ -279,6 +279,9 @@ async function $do(
279
279
  if (typeof nextCursor !== "string") {
280
280
  return { next: () => null };
281
281
  }
282
+ if (nextCursor.trim() === "") {
283
+ return { next: () => null };
284
+ }
282
285
 
283
286
  const nextVal = () =>
284
287
  accountingBankFeedStatementsList(
@@ -277,6 +277,9 @@ async function $do(
277
277
  if (typeof nextCursor !== "string") {
278
278
  return { next: () => null };
279
279
  }
280
+ if (nextCursor.trim() === "") {
281
+ return { next: () => null };
282
+ }
280
283
 
281
284
  const nextVal = () =>
282
285
  accountingBillPaymentsList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  accountingBillsList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  accountingCategoriesList(
@@ -277,6 +277,9 @@ async function $do(
277
277
  if (typeof nextCursor !== "string") {
278
278
  return { next: () => null };
279
279
  }
280
+ if (nextCursor.trim() === "") {
281
+ return { next: () => null };
282
+ }
280
283
 
281
284
  const nextVal = () =>
282
285
  accountingCreditNotesList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  accountingCustomersList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  accountingDepartmentsList(
@@ -4,7 +4,12 @@
4
4
 
5
5
  import { ApideckCore } from "../core.js";
6
6
  import { dlv } from "../lib/dlv.js";
7
- import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import {
8
+ encodeDeepObjectQuery,
9
+ encodeFormQuery,
10
+ encodeSimple,
11
+ queryJoin,
12
+ } from "../lib/encodings.js";
8
13
  import * as M from "../lib/matchers.js";
9
14
  import { compactMap } from "../lib/primitives.js";
10
15
  import { safeParse } from "../lib/schemas.js";
@@ -112,11 +117,16 @@ async function $do(
112
117
 
113
118
  const path = pathToFunc("/accounting/expenses")();
114
119
 
115
- const query = encodeFormQuery({
116
- "cursor": payload.cursor,
117
- "limit": payload.limit,
118
- "raw": payload.raw,
119
- });
120
+ const query = queryJoin(
121
+ encodeDeepObjectQuery({
122
+ "filter": payload.filter,
123
+ }),
124
+ encodeFormQuery({
125
+ "cursor": payload.cursor,
126
+ "limit": payload.limit,
127
+ "raw": payload.raw,
128
+ }),
129
+ );
120
130
 
121
131
  const headers = new Headers(compactMap({
122
132
  Accept: "application/json",
@@ -262,6 +272,9 @@ async function $do(
262
272
  if (typeof nextCursor !== "string") {
263
273
  return { next: () => null };
264
274
  }
275
+ if (nextCursor.trim() === "") {
276
+ return { next: () => null };
277
+ }
265
278
 
266
279
  const nextVal = () =>
267
280
  accountingExpensesList(
@@ -277,6 +277,9 @@ async function $do(
277
277
  if (typeof nextCursor !== "string") {
278
278
  return { next: () => null };
279
279
  }
280
+ if (nextCursor.trim() === "") {
281
+ return { next: () => null };
282
+ }
280
283
 
281
284
  const nextVal = () =>
282
285
  accountingInvoiceItemsList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  accountingInvoicesList(
@@ -277,6 +277,9 @@ async function $do(
277
277
  if (typeof nextCursor !== "string") {
278
278
  return { next: () => null };
279
279
  }
280
+ if (nextCursor.trim() === "") {
281
+ return { next: () => null };
282
+ }
280
283
 
281
284
  const nextVal = () =>
282
285
  accountingJournalEntriesList(
@@ -277,6 +277,9 @@ async function $do(
277
277
  if (typeof nextCursor !== "string") {
278
278
  return { next: () => null };
279
279
  }
280
+ if (nextCursor.trim() === "") {
281
+ return { next: () => null };
282
+ }
280
283
 
281
284
  const nextVal = () =>
282
285
  accountingLedgerAccountsList(
@@ -273,6 +273,9 @@ async function $do(
273
273
  if (typeof nextCursor !== "string") {
274
274
  return { next: () => null };
275
275
  }
276
+ if (nextCursor.trim() === "") {
277
+ return { next: () => null };
278
+ }
276
279
 
277
280
  const nextVal = () =>
278
281
  accountingLocationsList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  accountingPaymentsList(
@@ -276,6 +276,9 @@ async function $do(
276
276
  if (typeof nextCursor !== "string") {
277
277
  return { next: () => null };
278
278
  }
279
+ if (nextCursor.trim() === "") {
280
+ return { next: () => null };
281
+ }
279
282
 
280
283
  const nextVal = () =>
281
284
  accountingPurchaseOrdersList(
@@ -262,6 +262,9 @@ async function $do(
262
262
  if (typeof nextCursor !== "string") {
263
263
  return { next: () => null };
264
264
  }
265
+ if (nextCursor.trim() === "") {
266
+ return { next: () => null };
267
+ }
265
268
 
266
269
  const nextVal = () =>
267
270
  accountingQuotesList(
@@ -265,6 +265,9 @@ async function $do(
265
265
  if (typeof nextCursor !== "string") {
266
266
  return { next: () => null };
267
267
  }
268
+ if (nextCursor.trim() === "") {
269
+ return { next: () => null };
270
+ }
268
271
 
269
272
  const nextVal = () =>
270
273
  accountingSubsidiariesList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  accountingSuppliersList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  accountingTaxRatesList(
@@ -279,6 +279,9 @@ async function $do(
279
279
  if (typeof nextCursor !== "string") {
280
280
  return { next: () => null };
281
281
  }
282
+ if (nextCursor.trim() === "") {
283
+ return { next: () => null };
284
+ }
282
285
 
283
286
  const nextVal = () =>
284
287
  accountingTrackingCategoriesList(
@@ -273,6 +273,9 @@ async function $do(
273
273
  if (typeof nextCursor !== "string") {
274
274
  return { next: () => null };
275
275
  }
276
+ if (nextCursor.trim() === "") {
277
+ return { next: () => null };
278
+ }
276
279
 
277
280
  const nextVal = () =>
278
281
  atsApplicantsList(
@@ -271,6 +271,9 @@ async function $do(
271
271
  if (typeof nextCursor !== "string") {
272
272
  return { next: () => null };
273
273
  }
274
+ if (nextCursor.trim() === "") {
275
+ return { next: () => null };
276
+ }
274
277
 
275
278
  const nextVal = () =>
276
279
  atsApplicationsList(
@@ -272,6 +272,9 @@ async function $do(
272
272
  if (typeof nextCursor !== "string") {
273
273
  return { next: () => null };
274
274
  }
275
+ if (nextCursor.trim() === "") {
276
+ return { next: () => null };
277
+ }
275
278
 
276
279
  const nextVal = () =>
277
280
  atsJobsList(
@@ -250,6 +250,9 @@ async function $do(
250
250
  if (typeof nextCursor !== "string") {
251
251
  return { next: () => null };
252
252
  }
253
+ if (nextCursor.trim() === "") {
254
+ return { next: () => null };
255
+ }
253
256
 
254
257
  const nextVal = () =>
255
258
  connectorApisList(
@@ -251,6 +251,9 @@ async function $do(
251
251
  if (typeof nextCursor !== "string") {
252
252
  return { next: () => null };
253
253
  }
254
+ if (nextCursor.trim() === "") {
255
+ return { next: () => null };
256
+ }
254
257
 
255
258
  const nextVal = () =>
256
259
  connectorConnectorsList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  crmActivitiesList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  crmCompaniesList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  crmContactsList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  crmCustomObjectSchemasList(
@@ -280,6 +280,9 @@ async function $do(
280
280
  if (typeof nextCursor !== "string") {
281
281
  return { next: () => null };
282
282
  }
283
+ if (nextCursor.trim() === "") {
284
+ return { next: () => null };
285
+ }
283
286
 
284
287
  const nextVal = () =>
285
288
  crmCustomObjectsList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  crmLeadsList(
@@ -272,6 +272,9 @@ async function $do(
272
272
  if (typeof nextCursor !== "string") {
273
273
  return { next: () => null };
274
274
  }
275
+ if (nextCursor.trim() === "") {
276
+ return { next: () => null };
277
+ }
275
278
 
276
279
  const nextVal = () =>
277
280
  crmNotesList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  crmOpportunitiesList(
@@ -272,6 +272,9 @@ async function $do(
272
272
  if (typeof nextCursor !== "string") {
273
273
  return { next: () => null };
274
274
  }
275
+ if (nextCursor.trim() === "") {
276
+ return { next: () => null };
277
+ }
275
278
 
276
279
  const nextVal = () =>
277
280
  crmPipelinesList(
@@ -272,6 +272,9 @@ async function $do(
272
272
  if (typeof nextCursor !== "string") {
273
273
  return { next: () => null };
274
274
  }
275
+ if (nextCursor.trim() === "") {
276
+ return { next: () => null };
277
+ }
275
278
 
276
279
  const nextVal = () =>
277
280
  crmUsersList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  ecommerceCustomersList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  ecommerceOrdersList(
@@ -274,6 +274,9 @@ async function $do(
274
274
  if (typeof nextCursor !== "string") {
275
275
  return { next: () => null };
276
276
  }
277
+ if (nextCursor.trim() === "") {
278
+ return { next: () => null };
279
+ }
277
280
 
278
281
  const nextVal = () =>
279
282
  ecommerceProductsList(
@@ -276,6 +276,9 @@ async function $do(
276
276
  if (typeof nextCursor !== "string") {
277
277
  return { next: () => null };
278
278
  }
279
+ if (nextCursor.trim() === "") {
280
+ return { next: () => null };
281
+ }
279
282
 
280
283
  const nextVal = () =>
281
284
  fileStorageDriveGroupsList(
@@ -273,6 +273,9 @@ async function $do(
273
273
  if (typeof nextCursor !== "string") {
274
274
  return { next: () => null };
275
275
  }
276
+ if (nextCursor.trim() === "") {
277
+ return { next: () => null };
278
+ }
276
279
 
277
280
  const nextVal = () =>
278
281
  fileStorageDrivesList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  fileStorageFilesList(
@@ -275,6 +275,9 @@ async function $do(
275
275
  if (typeof nextCursor !== "string") {
276
276
  return { next: () => null };
277
277
  }
278
+ if (nextCursor.trim() === "") {
279
+ return { next: () => null };
280
+ }
278
281
 
279
282
  const nextVal = () =>
280
283
  fileStorageSharedLinksList(
@@ -272,6 +272,9 @@ async function $do(
272
272
  if (typeof nextCursor !== "string") {
273
273
  return { next: () => null };
274
274
  }
275
+ if (nextCursor.trim() === "") {
276
+ return { next: () => null };
277
+ }
275
278
 
276
279
  const nextVal = () =>
277
280
  hrisCompaniesList(