@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,329 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { assert, expect, it, test } from "vitest";
6
+ import { Apideck } from "../index.js";
7
+ import { createTestHTTPClient } from "./testclient.js";
8
+
9
+ test("Applications Ats Applications All", async () => {
10
+ const testHttpClient = createTestHTTPClient("ats.applicationsAll");
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.ats.applications.list({
19
+ serviceId: "salesforce",
20
+ passThrough: {
21
+ "search": "San Francisco",
22
+ },
23
+ });
24
+ expect(result.httpMeta.response.status).toBe(200);
25
+ expect(result.getApplicationsResponse).toBeDefined();
26
+ expect(result.getApplicationsResponse).toEqual({
27
+ statusCode: 200,
28
+ status: "OK",
29
+ service: "sap-successfactors",
30
+ resource: "Applications",
31
+ operation: "all",
32
+ data: [
33
+ {
34
+ id: "12345",
35
+ applicantId: "12345",
36
+ jobId: "12345",
37
+ status: "open",
38
+ stage: {
39
+ id: "12345",
40
+ name: "12345",
41
+ },
42
+ updatedBy: "12345",
43
+ createdBy: "12345",
44
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
45
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
46
+ passThrough: [
47
+ {
48
+ serviceId: "<id>",
49
+ extendPaths: [
50
+ {
51
+ path: "$.nested.property",
52
+ value: {
53
+ "TaxClassificationRef": {
54
+ "value": "EUC-99990201-V1-00020000",
55
+ },
56
+ },
57
+ },
58
+ {
59
+ path: "$.nested.property",
60
+ value: {
61
+ "TaxClassificationRef": {
62
+ "value": "EUC-99990201-V1-00020000",
63
+ },
64
+ },
65
+ },
66
+ {
67
+ path: "$.nested.property",
68
+ value: {
69
+ "TaxClassificationRef": {
70
+ "value": "EUC-99990201-V1-00020000",
71
+ },
72
+ },
73
+ },
74
+ ],
75
+ },
76
+ {
77
+ serviceId: "<id>",
78
+ extendPaths: [
79
+ {
80
+ path: "$.nested.property",
81
+ value: {
82
+ "TaxClassificationRef": {
83
+ "value": "EUC-99990201-V1-00020000",
84
+ },
85
+ },
86
+ },
87
+ ],
88
+ },
89
+ ],
90
+ },
91
+ {
92
+ id: "12345",
93
+ applicantId: "12345",
94
+ jobId: "12345",
95
+ status: "open",
96
+ stage: {
97
+ id: "12345",
98
+ name: "12345",
99
+ },
100
+ updatedBy: "12345",
101
+ createdBy: "12345",
102
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
103
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
104
+ passThrough: [
105
+ {
106
+ serviceId: "<id>",
107
+ extendPaths: [
108
+ {
109
+ path: "$.nested.property",
110
+ value: {
111
+ "TaxClassificationRef": {
112
+ "value": "EUC-99990201-V1-00020000",
113
+ },
114
+ },
115
+ },
116
+ ],
117
+ },
118
+ ],
119
+ },
120
+ {
121
+ id: "12345",
122
+ applicantId: "12345",
123
+ jobId: "12345",
124
+ status: "open",
125
+ stage: {
126
+ id: "12345",
127
+ name: "12345",
128
+ },
129
+ updatedBy: "12345",
130
+ createdBy: "12345",
131
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
132
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
133
+ passThrough: [
134
+ {
135
+ serviceId: "<id>",
136
+ extendPaths: [
137
+ {
138
+ path: "$.nested.property",
139
+ value: {
140
+ "TaxClassificationRef": {
141
+ "value": "EUC-99990201-V1-00020000",
142
+ },
143
+ },
144
+ },
145
+ {
146
+ path: "$.nested.property",
147
+ value: {
148
+ "TaxClassificationRef": {
149
+ "value": "EUC-99990201-V1-00020000",
150
+ },
151
+ },
152
+ },
153
+ ],
154
+ },
155
+ {
156
+ serviceId: "<id>",
157
+ extendPaths: [
158
+ {
159
+ path: "$.nested.property",
160
+ value: {
161
+ "TaxClassificationRef": {
162
+ "value": "EUC-99990201-V1-00020000",
163
+ },
164
+ },
165
+ },
166
+ ],
167
+ },
168
+ ],
169
+ },
170
+ ],
171
+ meta: {
172
+ itemsOnPage: 50,
173
+ cursors: {
174
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
175
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
176
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
177
+ },
178
+ },
179
+ links: {
180
+ previous:
181
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
182
+ current: "https://unify.apideck.com/crm/companies",
183
+ next:
184
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
185
+ },
186
+ });
187
+ });
188
+
189
+ it.skip("Applications Ats Applications Add", async () => {
190
+ assert.fail(
191
+ "incomplete test found please make sure to address the following errors: [`workflow step ats.applicationsAdd.test referencing operation ats.applicationsAdd with expression in requestBody with type not currently supported`, `workflow step ats.applicationsAdd.test referencing operation ats.applicationsAdd with expression in requestBody with type not currently supported`, `workflow step ats.applicationsAdd.test referencing operation ats.applicationsAdd with expression in requestBody with type not currently supported`, `workflow step ats.applicationsAdd.test referencing operation ats.applicationsAdd with expression in requestBody with type not currently supported`]",
192
+ );
193
+ });
194
+
195
+ test("Applications Ats Applications One", async () => {
196
+ const testHttpClient = createTestHTTPClient("ats.applicationsOne");
197
+
198
+ const apideck = new Apideck({
199
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
200
+ httpClient: testHttpClient,
201
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
202
+ });
203
+
204
+ const result = await apideck.ats.applications.get({
205
+ id: "<id>",
206
+ serviceId: "salesforce",
207
+ });
208
+ expect(result.httpMeta.response.status).toBe(200);
209
+ expect(result.getApplicationResponse).toBeDefined();
210
+ expect(result.getApplicationResponse).toEqual({
211
+ statusCode: 200,
212
+ status: "OK",
213
+ service: "sap-successfactors",
214
+ resource: "Applications",
215
+ operation: "one",
216
+ data: {
217
+ id: "12345",
218
+ applicantId: "12345",
219
+ jobId: "12345",
220
+ status: "open",
221
+ stage: {
222
+ id: "12345",
223
+ name: "12345",
224
+ },
225
+ updatedBy: "12345",
226
+ createdBy: "12345",
227
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
228
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
229
+ passThrough: [
230
+ {
231
+ serviceId: "<id>",
232
+ extendPaths: [
233
+ {
234
+ path: "$.nested.property",
235
+ value: {
236
+ "TaxClassificationRef": {
237
+ "value": "EUC-99990201-V1-00020000",
238
+ },
239
+ },
240
+ },
241
+ {
242
+ path: "$.nested.property",
243
+ value: {
244
+ "TaxClassificationRef": {
245
+ "value": "EUC-99990201-V1-00020000",
246
+ },
247
+ },
248
+ },
249
+ ],
250
+ },
251
+ {
252
+ serviceId: "<id>",
253
+ extendPaths: [
254
+ {
255
+ path: "$.nested.property",
256
+ value: {
257
+ "TaxClassificationRef": {
258
+ "value": "EUC-99990201-V1-00020000",
259
+ },
260
+ },
261
+ },
262
+ {
263
+ path: "$.nested.property",
264
+ value: {
265
+ "TaxClassificationRef": {
266
+ "value": "EUC-99990201-V1-00020000",
267
+ },
268
+ },
269
+ },
270
+ ],
271
+ },
272
+ {
273
+ serviceId: "<id>",
274
+ extendPaths: [
275
+ {
276
+ path: "$.nested.property",
277
+ value: {
278
+ "TaxClassificationRef": {
279
+ "value": "EUC-99990201-V1-00020000",
280
+ },
281
+ },
282
+ },
283
+ {
284
+ path: "$.nested.property",
285
+ value: {
286
+ "TaxClassificationRef": {
287
+ "value": "EUC-99990201-V1-00020000",
288
+ },
289
+ },
290
+ },
291
+ ],
292
+ },
293
+ ],
294
+ },
295
+ });
296
+ });
297
+
298
+ it.skip("Applications Ats Applications Update", async () => {
299
+ assert.fail(
300
+ "incomplete test found please make sure to address the following errors: [`workflow step ats.applicationsUpdate.test referencing operation ats.applicationsUpdate with expression in requestBody with type not currently supported`, `workflow step ats.applicationsUpdate.test referencing operation ats.applicationsUpdate with expression in requestBody with type not currently supported`, `workflow step ats.applicationsUpdate.test referencing operation ats.applicationsUpdate with expression in requestBody with type not currently supported`, `workflow step ats.applicationsUpdate.test referencing operation ats.applicationsUpdate with expression in requestBody with type not currently supported`, `workflow step ats.applicationsUpdate.test referencing operation ats.applicationsUpdate with expression in requestBody with type not currently supported`, `workflow step ats.applicationsUpdate.test referencing operation ats.applicationsUpdate with expression in requestBody with type not currently supported`, `workflow step ats.applicationsUpdate.test referencing operation ats.applicationsUpdate with expression in requestBody with type not currently supported`]",
301
+ );
302
+ });
303
+
304
+ test("Applications Ats Applications Delete", async () => {
305
+ const testHttpClient = createTestHTTPClient("ats.applicationsDelete");
306
+
307
+ const apideck = new Apideck({
308
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
309
+ httpClient: testHttpClient,
310
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
311
+ });
312
+
313
+ const result = await apideck.ats.applications.delete({
314
+ id: "<id>",
315
+ serviceId: "salesforce",
316
+ });
317
+ expect(result.httpMeta.response.status).toBe(200);
318
+ expect(result.deleteApplicationResponse).toBeDefined();
319
+ expect(result.deleteApplicationResponse).toEqual({
320
+ statusCode: 200,
321
+ status: "OK",
322
+ service: "sap-successfactors",
323
+ resource: "Applications",
324
+ operation: "delete",
325
+ data: {
326
+ id: "12345",
327
+ },
328
+ });
329
+ });
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { fail } from "assert";
6
+
7
+ export function assertDefined(value: any): any {
8
+ if (value === undefined) {
9
+ fail("value is undefined");
10
+ }
11
+
12
+ return value;
13
+ }
@@ -0,0 +1,363 @@
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 { DownloadAcceptEnum } from "../sdk/attachments.js";
8
+ import { filesToByteArray, streamToByteArray } from "./files.js";
9
+ import { createTestHTTPClient } from "./testclient.js";
10
+
11
+ test("Attachments Accounting Attachments All", async () => {
12
+ const testHttpClient = createTestHTTPClient("accounting.attachmentsAll");
13
+
14
+ const apideck = new Apideck({
15
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
16
+ httpClient: testHttpClient,
17
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
18
+ });
19
+
20
+ const result = await apideck.accounting.attachments.list({
21
+ referenceType: "invoice",
22
+ referenceId: "123456",
23
+ serviceId: "salesforce",
24
+ fields: "id,updated_at",
25
+ });
26
+ expect(result.httpMeta.response.status).toBe(200);
27
+ expect(result.getAttachmentsResponse).toBeDefined();
28
+ expect(result.getAttachmentsResponse).toEqual({
29
+ statusCode: 200,
30
+ status: "OK",
31
+ service: "quickbooks",
32
+ resource: "PurchaseOrders",
33
+ operation: "all",
34
+ data: [
35
+ {
36
+ id: "12345",
37
+ displayId: "sample ID",
38
+ name: "sample.jpg",
39
+ mimeType: "image/jpeg",
40
+ size: 1810673,
41
+ reference: {
42
+ type: "invoice",
43
+ id: "12345",
44
+ },
45
+ description: "A sample image",
46
+ parentFolderId: "123",
47
+ updatedBy: "12345",
48
+ createdBy: "12345",
49
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
50
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
51
+ passThrough: [
52
+ {
53
+ serviceId: "<id>",
54
+ extendPaths: [
55
+ {
56
+ path: "$.nested.property",
57
+ value: {
58
+ "TaxClassificationRef": {
59
+ "value": "EUC-99990201-V1-00020000",
60
+ },
61
+ },
62
+ },
63
+ {
64
+ path: "$.nested.property",
65
+ value: {
66
+ "TaxClassificationRef": {
67
+ "value": "EUC-99990201-V1-00020000",
68
+ },
69
+ },
70
+ },
71
+ {
72
+ path: "$.nested.property",
73
+ value: {
74
+ "TaxClassificationRef": {
75
+ "value": "EUC-99990201-V1-00020000",
76
+ },
77
+ },
78
+ },
79
+ ],
80
+ },
81
+ {
82
+ serviceId: "<id>",
83
+ extendPaths: [
84
+ {
85
+ path: "$.nested.property",
86
+ value: {
87
+ "TaxClassificationRef": {
88
+ "value": "EUC-99990201-V1-00020000",
89
+ },
90
+ },
91
+ },
92
+ ],
93
+ },
94
+ ],
95
+ },
96
+ {
97
+ id: "12345",
98
+ displayId: "sample ID",
99
+ name: "sample.jpg",
100
+ mimeType: "image/jpeg",
101
+ size: 1810673,
102
+ reference: {
103
+ type: "invoice",
104
+ id: "12345",
105
+ },
106
+ description: "A sample image",
107
+ parentFolderId: "123",
108
+ updatedBy: "12345",
109
+ createdBy: "12345",
110
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
111
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
112
+ passThrough: [
113
+ {
114
+ serviceId: "<id>",
115
+ extendPaths: [
116
+ {
117
+ path: "$.nested.property",
118
+ value: {
119
+ "TaxClassificationRef": {
120
+ "value": "EUC-99990201-V1-00020000",
121
+ },
122
+ },
123
+ },
124
+ ],
125
+ },
126
+ ],
127
+ },
128
+ {
129
+ id: "12345",
130
+ displayId: "sample ID",
131
+ name: "sample.jpg",
132
+ mimeType: "image/jpeg",
133
+ size: 1810673,
134
+ reference: {
135
+ type: "invoice",
136
+ id: "12345",
137
+ },
138
+ description: "A sample image",
139
+ parentFolderId: "123",
140
+ updatedBy: "12345",
141
+ createdBy: "12345",
142
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
143
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
144
+ passThrough: [
145
+ {
146
+ serviceId: "<id>",
147
+ extendPaths: [
148
+ {
149
+ path: "$.nested.property",
150
+ value: {
151
+ "TaxClassificationRef": {
152
+ "value": "EUC-99990201-V1-00020000",
153
+ },
154
+ },
155
+ },
156
+ {
157
+ path: "$.nested.property",
158
+ value: {
159
+ "TaxClassificationRef": {
160
+ "value": "EUC-99990201-V1-00020000",
161
+ },
162
+ },
163
+ },
164
+ ],
165
+ },
166
+ {
167
+ serviceId: "<id>",
168
+ extendPaths: [
169
+ {
170
+ path: "$.nested.property",
171
+ value: {
172
+ "TaxClassificationRef": {
173
+ "value": "EUC-99990201-V1-00020000",
174
+ },
175
+ },
176
+ },
177
+ ],
178
+ },
179
+ ],
180
+ },
181
+ ],
182
+ meta: {
183
+ itemsOnPage: 50,
184
+ cursors: {
185
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
186
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
187
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
188
+ },
189
+ },
190
+ links: {
191
+ previous:
192
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
193
+ current: "https://unify.apideck.com/crm/companies",
194
+ next:
195
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
196
+ },
197
+ });
198
+ });
199
+
200
+ test("Attachments Accounting Attachments One", async () => {
201
+ const testHttpClient = createTestHTTPClient("accounting.attachmentsOne");
202
+
203
+ const apideck = new Apideck({
204
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
205
+ httpClient: testHttpClient,
206
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
207
+ });
208
+
209
+ const result = await apideck.accounting.attachments.get({
210
+ referenceType: "invoice",
211
+ referenceId: "123456",
212
+ id: "<id>",
213
+ serviceId: "salesforce",
214
+ fields: "id,updated_at",
215
+ });
216
+ expect(result.httpMeta.response.status).toBe(200);
217
+ expect(result.getAttachmentResponse).toBeDefined();
218
+ expect(result.getAttachmentResponse).toEqual({
219
+ statusCode: 200,
220
+ status: "OK",
221
+ service: "xero",
222
+ resource: "payments",
223
+ operation: "one",
224
+ data: {
225
+ id: "12345",
226
+ displayId: "sample ID",
227
+ name: "sample.jpg",
228
+ mimeType: "image/jpeg",
229
+ size: 1810673,
230
+ reference: {
231
+ type: "invoice",
232
+ id: "12345",
233
+ },
234
+ description: "A sample image",
235
+ parentFolderId: "123",
236
+ updatedBy: "12345",
237
+ createdBy: "12345",
238
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
239
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
240
+ passThrough: [
241
+ {
242
+ serviceId: "<id>",
243
+ extendPaths: [
244
+ {
245
+ path: "$.nested.property",
246
+ value: {
247
+ "TaxClassificationRef": {
248
+ "value": "EUC-99990201-V1-00020000",
249
+ },
250
+ },
251
+ },
252
+ {
253
+ path: "$.nested.property",
254
+ value: {
255
+ "TaxClassificationRef": {
256
+ "value": "EUC-99990201-V1-00020000",
257
+ },
258
+ },
259
+ },
260
+ ],
261
+ },
262
+ {
263
+ serviceId: "<id>",
264
+ extendPaths: [
265
+ {
266
+ path: "$.nested.property",
267
+ value: {
268
+ "TaxClassificationRef": {
269
+ "value": "EUC-99990201-V1-00020000",
270
+ },
271
+ },
272
+ },
273
+ {
274
+ path: "$.nested.property",
275
+ value: {
276
+ "TaxClassificationRef": {
277
+ "value": "EUC-99990201-V1-00020000",
278
+ },
279
+ },
280
+ },
281
+ ],
282
+ },
283
+ {
284
+ serviceId: "<id>",
285
+ extendPaths: [
286
+ {
287
+ path: "$.nested.property",
288
+ value: {
289
+ "TaxClassificationRef": {
290
+ "value": "EUC-99990201-V1-00020000",
291
+ },
292
+ },
293
+ },
294
+ {
295
+ path: "$.nested.property",
296
+ value: {
297
+ "TaxClassificationRef": {
298
+ "value": "EUC-99990201-V1-00020000",
299
+ },
300
+ },
301
+ },
302
+ ],
303
+ },
304
+ ],
305
+ },
306
+ });
307
+ });
308
+
309
+ test("Attachments Accounting Attachments Delete", async () => {
310
+ const testHttpClient = createTestHTTPClient("accounting.attachmentsDelete");
311
+
312
+ const apideck = new Apideck({
313
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
314
+ httpClient: testHttpClient,
315
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
316
+ });
317
+
318
+ const result = await apideck.accounting.attachments.delete({
319
+ referenceType: "invoice",
320
+ referenceId: "123456",
321
+ id: "<id>",
322
+ serviceId: "salesforce",
323
+ });
324
+ expect(result.httpMeta.response.status).toBe(200);
325
+ expect(result.deleteAttachmentResponse).toBeDefined();
326
+ expect(result.deleteAttachmentResponse).toEqual({
327
+ statusCode: 200,
328
+ status: "OK",
329
+ service: "google-drive",
330
+ resource: "files",
331
+ operation: "delete",
332
+ data: {
333
+ id: "12345",
334
+ },
335
+ });
336
+ });
337
+
338
+ test("Attachments Accounting Attachments Download", async () => {
339
+ const testHttpClient = createTestHTTPClient("accounting.attachmentsDownload");
340
+
341
+ const apideck = new Apideck({
342
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
343
+ httpClient: testHttpClient,
344
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
345
+ });
346
+
347
+ const result = await apideck.accounting.attachments.download({
348
+ referenceType: "invoice",
349
+ referenceId: "123456",
350
+ id: "<id>",
351
+ serviceId: "salesforce",
352
+ fields: "id,updated_at",
353
+ }, {
354
+ acceptHeaderOverride: DownloadAcceptEnum.wildcardRootWildcard,
355
+ });
356
+ expect(result.httpMeta.response.status).toBe(200);
357
+ expect(result.getAttachmentDownloadResponse).toBeDefined();
358
+ expect(
359
+ new Uint8Array(
360
+ await streamToByteArray(result.getAttachmentDownloadResponse),
361
+ ),
362
+ ).toEqual(await filesToByteArray(".speakeasy/testfiles/example.file"));
363
+ });