@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,561 @@
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("Locations Accounting Locations All", async () => {
10
+ const testHttpClient = createTestHTTPClient("accounting.locationsAll");
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.accounting.locations.list({
19
+ serviceId: "salesforce",
20
+ fields: "id,updated_at",
21
+ filter: {
22
+ subsidiary: "1",
23
+ },
24
+ });
25
+ expect(result.httpMeta.response.status).toBe(200);
26
+ expect(result.getAccountingLocationsResponse).toBeDefined();
27
+ expect(result.getAccountingLocationsResponse).toEqual({
28
+ statusCode: 200,
29
+ status: "OK",
30
+ service: "xero",
31
+ resource: "subsidiaries",
32
+ operation: "all",
33
+ data: [
34
+ {
35
+ id: "12345",
36
+ parentId: "12345",
37
+ companyName: "SpaceX",
38
+ displayName: "11 UT - South Jordan",
39
+ status: "active",
40
+ addresses: [
41
+ {
42
+ id: "123",
43
+ type: "primary",
44
+ string: "25 Spring Street, Blackburn, VIC 3130",
45
+ name: "HQ US",
46
+ line1: "Main street",
47
+ line2: "apt #",
48
+ line3: "Suite #",
49
+ line4: "delivery instructions",
50
+ streetNumber: "25",
51
+ city: "San Francisco",
52
+ state: "CA",
53
+ postalCode: "94104",
54
+ country: "US",
55
+ latitude: "40.759211",
56
+ longitude: "-73.984638",
57
+ county: "Santa Clara",
58
+ contactName: "Elon Musk",
59
+ salutation: "Mr",
60
+ phoneNumber: "111-111-1111",
61
+ fax: "122-111-1111",
62
+ email: "elon@musk.com",
63
+ website: "https://elonmusk.com",
64
+ notes: "Address notes or delivery instructions.",
65
+ rowVersion: "1-12345",
66
+ },
67
+ {
68
+ id: "123",
69
+ type: "primary",
70
+ string: "25 Spring Street, Blackburn, VIC 3130",
71
+ name: "HQ US",
72
+ line1: "Main street",
73
+ line2: "apt #",
74
+ line3: "Suite #",
75
+ line4: "delivery instructions",
76
+ streetNumber: "25",
77
+ city: "San Francisco",
78
+ state: "CA",
79
+ postalCode: "94104",
80
+ country: "US",
81
+ latitude: "40.759211",
82
+ longitude: "-73.984638",
83
+ county: "Santa Clara",
84
+ contactName: "Elon Musk",
85
+ salutation: "Mr",
86
+ phoneNumber: "111-111-1111",
87
+ fax: "122-111-1111",
88
+ email: "elon@musk.com",
89
+ website: "https://elonmusk.com",
90
+ notes: "Address notes or delivery instructions.",
91
+ rowVersion: "1-12345",
92
+ },
93
+ ],
94
+ subsidiaries: [
95
+ {
96
+ id: "12345",
97
+ name: "SpaceX",
98
+ },
99
+ {
100
+ id: "12345",
101
+ name: "SpaceX",
102
+ },
103
+ {
104
+ id: "12345",
105
+ name: "SpaceX",
106
+ },
107
+ ],
108
+ rowVersion: "1-12345",
109
+ updatedBy: "12345",
110
+ createdBy: "12345",
111
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
112
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
113
+ passThrough: [
114
+ {
115
+ serviceId: "<id>",
116
+ extendPaths: [
117
+ {
118
+ path: "$.nested.property",
119
+ value: {
120
+ "TaxClassificationRef": {
121
+ "value": "EUC-99990201-V1-00020000",
122
+ },
123
+ },
124
+ },
125
+ ],
126
+ },
127
+ ],
128
+ },
129
+ {
130
+ id: "12345",
131
+ parentId: "12345",
132
+ companyName: "SpaceX",
133
+ displayName: "11 UT - South Jordan",
134
+ status: "active",
135
+ addresses: [
136
+ {
137
+ id: "123",
138
+ type: "primary",
139
+ string: "25 Spring Street, Blackburn, VIC 3130",
140
+ name: "HQ US",
141
+ line1: "Main street",
142
+ line2: "apt #",
143
+ line3: "Suite #",
144
+ line4: "delivery instructions",
145
+ streetNumber: "25",
146
+ city: "San Francisco",
147
+ state: "CA",
148
+ postalCode: "94104",
149
+ country: "US",
150
+ latitude: "40.759211",
151
+ longitude: "-73.984638",
152
+ county: "Santa Clara",
153
+ contactName: "Elon Musk",
154
+ salutation: "Mr",
155
+ phoneNumber: "111-111-1111",
156
+ fax: "122-111-1111",
157
+ email: "elon@musk.com",
158
+ website: "https://elonmusk.com",
159
+ notes: "Address notes or delivery instructions.",
160
+ rowVersion: "1-12345",
161
+ },
162
+ ],
163
+ subsidiaries: [
164
+ {
165
+ id: "12345",
166
+ name: "SpaceX",
167
+ },
168
+ {
169
+ id: "12345",
170
+ name: "SpaceX",
171
+ },
172
+ ],
173
+ rowVersion: "1-12345",
174
+ updatedBy: "12345",
175
+ createdBy: "12345",
176
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
177
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
178
+ passThrough: [
179
+ {
180
+ serviceId: "<id>",
181
+ extendPaths: [
182
+ {
183
+ path: "$.nested.property",
184
+ value: {
185
+ "TaxClassificationRef": {
186
+ "value": "EUC-99990201-V1-00020000",
187
+ },
188
+ },
189
+ },
190
+ ],
191
+ },
192
+ {
193
+ serviceId: "<id>",
194
+ extendPaths: [
195
+ {
196
+ path: "$.nested.property",
197
+ value: {
198
+ "TaxClassificationRef": {
199
+ "value": "EUC-99990201-V1-00020000",
200
+ },
201
+ },
202
+ },
203
+ {
204
+ path: "$.nested.property",
205
+ value: {
206
+ "TaxClassificationRef": {
207
+ "value": "EUC-99990201-V1-00020000",
208
+ },
209
+ },
210
+ },
211
+ {
212
+ path: "$.nested.property",
213
+ value: {
214
+ "TaxClassificationRef": {
215
+ "value": "EUC-99990201-V1-00020000",
216
+ },
217
+ },
218
+ },
219
+ ],
220
+ },
221
+ ],
222
+ },
223
+ {
224
+ id: "12345",
225
+ parentId: "12345",
226
+ companyName: "SpaceX",
227
+ displayName: "11 UT - South Jordan",
228
+ status: "active",
229
+ addresses: [
230
+ {
231
+ id: "123",
232
+ type: "primary",
233
+ string: "25 Spring Street, Blackburn, VIC 3130",
234
+ name: "HQ US",
235
+ line1: "Main street",
236
+ line2: "apt #",
237
+ line3: "Suite #",
238
+ line4: "delivery instructions",
239
+ streetNumber: "25",
240
+ city: "San Francisco",
241
+ state: "CA",
242
+ postalCode: "94104",
243
+ country: "US",
244
+ latitude: "40.759211",
245
+ longitude: "-73.984638",
246
+ county: "Santa Clara",
247
+ contactName: "Elon Musk",
248
+ salutation: "Mr",
249
+ phoneNumber: "111-111-1111",
250
+ fax: "122-111-1111",
251
+ email: "elon@musk.com",
252
+ website: "https://elonmusk.com",
253
+ notes: "Address notes or delivery instructions.",
254
+ rowVersion: "1-12345",
255
+ },
256
+ ],
257
+ subsidiaries: [
258
+ {
259
+ id: "12345",
260
+ name: "SpaceX",
261
+ },
262
+ ],
263
+ rowVersion: "1-12345",
264
+ updatedBy: "12345",
265
+ createdBy: "12345",
266
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
267
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
268
+ passThrough: [
269
+ {
270
+ serviceId: "<id>",
271
+ extendPaths: [
272
+ {
273
+ path: "$.nested.property",
274
+ value: {
275
+ "TaxClassificationRef": {
276
+ "value": "EUC-99990201-V1-00020000",
277
+ },
278
+ },
279
+ },
280
+ {
281
+ path: "$.nested.property",
282
+ value: {
283
+ "TaxClassificationRef": {
284
+ "value": "EUC-99990201-V1-00020000",
285
+ },
286
+ },
287
+ },
288
+ ],
289
+ },
290
+ {
291
+ serviceId: "<id>",
292
+ extendPaths: [
293
+ {
294
+ path: "$.nested.property",
295
+ value: {
296
+ "TaxClassificationRef": {
297
+ "value": "EUC-99990201-V1-00020000",
298
+ },
299
+ },
300
+ },
301
+ {
302
+ path: "$.nested.property",
303
+ value: {
304
+ "TaxClassificationRef": {
305
+ "value": "EUC-99990201-V1-00020000",
306
+ },
307
+ },
308
+ },
309
+ ],
310
+ },
311
+ {
312
+ serviceId: "<id>",
313
+ extendPaths: [
314
+ {
315
+ path: "$.nested.property",
316
+ value: {
317
+ "TaxClassificationRef": {
318
+ "value": "EUC-99990201-V1-00020000",
319
+ },
320
+ },
321
+ },
322
+ ],
323
+ },
324
+ ],
325
+ },
326
+ ],
327
+ meta: {
328
+ itemsOnPage: 50,
329
+ cursors: {
330
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
331
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
332
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
333
+ },
334
+ },
335
+ links: {
336
+ previous:
337
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
338
+ current: "https://unify.apideck.com/crm/companies",
339
+ next:
340
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
341
+ },
342
+ });
343
+ });
344
+
345
+ it.skip("Locations Accounting Locations Add", async () => {
346
+ assert.fail(
347
+ "incomplete test found please make sure to address the following errors: [`workflow step accounting.locationsAdd.test referencing operation accounting.locationsAdd with expression in requestBody with type not currently supported`, `workflow step accounting.locationsAdd.test referencing operation accounting.locationsAdd with expression in requestBody with type not currently supported`]",
348
+ );
349
+ });
350
+
351
+ test("Locations Accounting Locations One", async () => {
352
+ const testHttpClient = createTestHTTPClient("accounting.locationsOne");
353
+
354
+ const apideck = new Apideck({
355
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
356
+ httpClient: testHttpClient,
357
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
358
+ });
359
+
360
+ const result = await apideck.accounting.locations.get({
361
+ id: "<id>",
362
+ serviceId: "salesforce",
363
+ fields: "id,updated_at",
364
+ });
365
+ expect(result.httpMeta.response.status).toBe(200);
366
+ expect(result.getAccountingLocationResponse).toBeDefined();
367
+ expect(result.getAccountingLocationResponse).toEqual({
368
+ statusCode: 200,
369
+ status: "OK",
370
+ service: "xero",
371
+ resource: "subsidiaries",
372
+ operation: "one",
373
+ data: {
374
+ id: "12345",
375
+ parentId: "12345",
376
+ companyName: "SpaceX",
377
+ displayName: "11 UT - South Jordan",
378
+ status: "active",
379
+ addresses: [
380
+ {
381
+ id: "123",
382
+ type: "primary",
383
+ string: "25 Spring Street, Blackburn, VIC 3130",
384
+ name: "HQ US",
385
+ line1: "Main street",
386
+ line2: "apt #",
387
+ line3: "Suite #",
388
+ line4: "delivery instructions",
389
+ streetNumber: "25",
390
+ city: "San Francisco",
391
+ state: "CA",
392
+ postalCode: "94104",
393
+ country: "US",
394
+ latitude: "40.759211",
395
+ longitude: "-73.984638",
396
+ county: "Santa Clara",
397
+ contactName: "Elon Musk",
398
+ salutation: "Mr",
399
+ phoneNumber: "111-111-1111",
400
+ fax: "122-111-1111",
401
+ email: "elon@musk.com",
402
+ website: "https://elonmusk.com",
403
+ notes: "Address notes or delivery instructions.",
404
+ rowVersion: "1-12345",
405
+ },
406
+ {
407
+ id: "123",
408
+ type: "primary",
409
+ string: "25 Spring Street, Blackburn, VIC 3130",
410
+ name: "HQ US",
411
+ line1: "Main street",
412
+ line2: "apt #",
413
+ line3: "Suite #",
414
+ line4: "delivery instructions",
415
+ streetNumber: "25",
416
+ city: "San Francisco",
417
+ state: "CA",
418
+ postalCode: "94104",
419
+ country: "US",
420
+ latitude: "40.759211",
421
+ longitude: "-73.984638",
422
+ county: "Santa Clara",
423
+ contactName: "Elon Musk",
424
+ salutation: "Mr",
425
+ phoneNumber: "111-111-1111",
426
+ fax: "122-111-1111",
427
+ email: "elon@musk.com",
428
+ website: "https://elonmusk.com",
429
+ notes: "Address notes or delivery instructions.",
430
+ rowVersion: "1-12345",
431
+ },
432
+ {
433
+ id: "123",
434
+ type: "primary",
435
+ string: "25 Spring Street, Blackburn, VIC 3130",
436
+ name: "HQ US",
437
+ line1: "Main street",
438
+ line2: "apt #",
439
+ line3: "Suite #",
440
+ line4: "delivery instructions",
441
+ streetNumber: "25",
442
+ city: "San Francisco",
443
+ state: "CA",
444
+ postalCode: "94104",
445
+ country: "US",
446
+ latitude: "40.759211",
447
+ longitude: "-73.984638",
448
+ county: "Santa Clara",
449
+ contactName: "Elon Musk",
450
+ salutation: "Mr",
451
+ phoneNumber: "111-111-1111",
452
+ fax: "122-111-1111",
453
+ email: "elon@musk.com",
454
+ website: "https://elonmusk.com",
455
+ notes: "Address notes or delivery instructions.",
456
+ rowVersion: "1-12345",
457
+ },
458
+ ],
459
+ subsidiaries: [
460
+ {
461
+ id: "12345",
462
+ name: "SpaceX",
463
+ },
464
+ {
465
+ id: "12345",
466
+ name: "SpaceX",
467
+ },
468
+ ],
469
+ rowVersion: "1-12345",
470
+ updatedBy: "12345",
471
+ createdBy: "12345",
472
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
473
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
474
+ passThrough: [
475
+ {
476
+ serviceId: "<id>",
477
+ extendPaths: [
478
+ {
479
+ path: "$.nested.property",
480
+ value: {
481
+ "TaxClassificationRef": {
482
+ "value": "EUC-99990201-V1-00020000",
483
+ },
484
+ },
485
+ },
486
+ {
487
+ path: "$.nested.property",
488
+ value: {
489
+ "TaxClassificationRef": {
490
+ "value": "EUC-99990201-V1-00020000",
491
+ },
492
+ },
493
+ },
494
+ ],
495
+ },
496
+ {
497
+ serviceId: "<id>",
498
+ extendPaths: [
499
+ {
500
+ path: "$.nested.property",
501
+ value: {
502
+ "TaxClassificationRef": {
503
+ "value": "EUC-99990201-V1-00020000",
504
+ },
505
+ },
506
+ },
507
+ {
508
+ path: "$.nested.property",
509
+ value: {
510
+ "TaxClassificationRef": {
511
+ "value": "EUC-99990201-V1-00020000",
512
+ },
513
+ },
514
+ },
515
+ {
516
+ path: "$.nested.property",
517
+ value: {
518
+ "TaxClassificationRef": {
519
+ "value": "EUC-99990201-V1-00020000",
520
+ },
521
+ },
522
+ },
523
+ ],
524
+ },
525
+ ],
526
+ },
527
+ });
528
+ });
529
+
530
+ it.skip("Locations Accounting Locations Update", async () => {
531
+ assert.fail(
532
+ "incomplete test found please make sure to address the following errors: [`workflow step accounting.locationsUpdate.test referencing operation accounting.locationsUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.locationsUpdate.test referencing operation accounting.locationsUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.locationsUpdate.test referencing operation accounting.locationsUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.locationsUpdate.test referencing operation accounting.locationsUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.locationsUpdate.test referencing operation accounting.locationsUpdate with expression in requestBody with type not currently supported`]",
533
+ );
534
+ });
535
+
536
+ test("Locations Accounting Locations Delete", async () => {
537
+ const testHttpClient = createTestHTTPClient("accounting.locationsDelete");
538
+
539
+ const apideck = new Apideck({
540
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
541
+ httpClient: testHttpClient,
542
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
543
+ });
544
+
545
+ const result = await apideck.accounting.locations.delete({
546
+ id: "<id>",
547
+ serviceId: "salesforce",
548
+ });
549
+ expect(result.httpMeta.response.status).toBe(200);
550
+ expect(result.deleteAccountingLocationResponse).toBeDefined();
551
+ expect(result.deleteAccountingLocationResponse).toEqual({
552
+ statusCode: 200,
553
+ status: "OK",
554
+ service: "quickbooks",
555
+ resource: "locations",
556
+ operation: "delete",
557
+ data: {
558
+ id: "12345",
559
+ },
560
+ });
561
+ });
@@ -0,0 +1,135 @@
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("Logs Vault Logs All", async () => {
10
+ const testHttpClient = createTestHTTPClient("vault.logsAll");
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.logs.list({
19
+ filter: {
20
+ connectorId: "crm+salesforce",
21
+ statusCode: 201,
22
+ excludeUnifiedApis: "vault,proxy",
23
+ },
24
+ });
25
+ expect(result.httpMeta.response.status).toBe(200);
26
+ expect(result.getLogsResponse).toBeDefined();
27
+ expect(result.getLogsResponse).toEqual({
28
+ statusCode: 200,
29
+ status: "OK",
30
+ data: [
31
+ {
32
+ apiStyle: "REST",
33
+ baseUrl: "unify.apideck.com",
34
+ childRequest: false,
35
+ consumerId: "test-consumer",
36
+ duration: 2220.379304,
37
+ errorMessage: "Refresh token is invalid",
38
+ execution: 2248,
39
+ hasChildren: false,
40
+ httpMethod: "GET",
41
+ id: "0b5f7480-5550-4f5c-a5fc-3c01ac43dd0f",
42
+ latency: 27.620695999999953,
43
+ operation: {
44
+ id: "connectionsAll",
45
+ name: "Get All Connections",
46
+ },
47
+ parentId: "0b5f7480-5550-4f5c-a5fc-3c01ac43dd0f",
48
+ path: "/vault/connections",
49
+ sandbox: false,
50
+ service: {
51
+ id: "apideck-vault",
52
+ name: "Apideck Vault",
53
+ },
54
+ sourceIp: "94.227.131.238",
55
+ statusCode: 200,
56
+ success: true,
57
+ timestamp: "2021-07-12T14:26:17.420Z",
58
+ unifiedApi: "vault",
59
+ },
60
+ {
61
+ apiStyle: "REST",
62
+ baseUrl: "unify.apideck.com",
63
+ childRequest: false,
64
+ consumerId: "test-consumer",
65
+ duration: 2220.379304,
66
+ errorMessage: "Refresh token is invalid",
67
+ execution: 2248,
68
+ hasChildren: false,
69
+ httpMethod: "GET",
70
+ id: "0b5f7480-5550-4f5c-a5fc-3c01ac43dd0f",
71
+ latency: 27.620695999999953,
72
+ operation: {
73
+ id: "connectionsAll",
74
+ name: "Get All Connections",
75
+ },
76
+ parentId: "0b5f7480-5550-4f5c-a5fc-3c01ac43dd0f",
77
+ path: "/vault/connections",
78
+ sandbox: false,
79
+ service: {
80
+ id: "apideck-vault",
81
+ name: "Apideck Vault",
82
+ },
83
+ sourceIp: "94.227.131.238",
84
+ statusCode: 200,
85
+ success: true,
86
+ timestamp: "2021-07-12T14:26:17.420Z",
87
+ unifiedApi: "vault",
88
+ },
89
+ {
90
+ apiStyle: "REST",
91
+ baseUrl: "unify.apideck.com",
92
+ childRequest: false,
93
+ consumerId: "test-consumer",
94
+ duration: 2220.379304,
95
+ errorMessage: "Refresh token is invalid",
96
+ execution: 2248,
97
+ hasChildren: false,
98
+ httpMethod: "GET",
99
+ id: "0b5f7480-5550-4f5c-a5fc-3c01ac43dd0f",
100
+ latency: 27.620695999999953,
101
+ operation: {
102
+ id: "connectionsAll",
103
+ name: "Get All Connections",
104
+ },
105
+ parentId: "0b5f7480-5550-4f5c-a5fc-3c01ac43dd0f",
106
+ path: "/vault/connections",
107
+ sandbox: false,
108
+ service: {
109
+ id: "apideck-vault",
110
+ name: "Apideck Vault",
111
+ },
112
+ sourceIp: "94.227.131.238",
113
+ statusCode: 200,
114
+ success: true,
115
+ timestamp: "2021-07-12T14:26:17.420Z",
116
+ unifiedApi: "vault",
117
+ },
118
+ ],
119
+ meta: {
120
+ itemsOnPage: 50,
121
+ cursors: {
122
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
123
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
124
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
125
+ },
126
+ },
127
+ links: {
128
+ previous:
129
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
130
+ current: "https://unify.apideck.com/crm/companies",
131
+ next:
132
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
133
+ },
134
+ });
135
+ });