@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,316 @@
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("Subsidiaries Accounting Subsidiaries All", async () => {
10
+ const testHttpClient = createTestHTTPClient("accounting.subsidiariesAll");
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.subsidiaries.list({
19
+ serviceId: "salesforce",
20
+ fields: "id,updated_at",
21
+ });
22
+ expect(result.httpMeta.response.status).toBe(200);
23
+ expect(result.getSubsidiariesResponse).toBeDefined();
24
+ expect(result.getSubsidiariesResponse).toEqual({
25
+ statusCode: 200,
26
+ status: "OK",
27
+ service: "xero",
28
+ resource: "subsidiaries",
29
+ operation: "all",
30
+ data: [
31
+ {
32
+ id: "12345",
33
+ parentId: "12345",
34
+ name: "SpaceX",
35
+ status: "active",
36
+ rowVersion: "1-12345",
37
+ updatedBy: "12345",
38
+ createdBy: "12345",
39
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
40
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
41
+ passThrough: [
42
+ {
43
+ serviceId: "<id>",
44
+ extendPaths: [
45
+ {
46
+ path: "$.nested.property",
47
+ value: {
48
+ "TaxClassificationRef": {
49
+ "value": "EUC-99990201-V1-00020000",
50
+ },
51
+ },
52
+ },
53
+ {
54
+ path: "$.nested.property",
55
+ value: {
56
+ "TaxClassificationRef": {
57
+ "value": "EUC-99990201-V1-00020000",
58
+ },
59
+ },
60
+ },
61
+ {
62
+ path: "$.nested.property",
63
+ value: {
64
+ "TaxClassificationRef": {
65
+ "value": "EUC-99990201-V1-00020000",
66
+ },
67
+ },
68
+ },
69
+ ],
70
+ },
71
+ {
72
+ serviceId: "<id>",
73
+ extendPaths: [
74
+ {
75
+ path: "$.nested.property",
76
+ value: {
77
+ "TaxClassificationRef": {
78
+ "value": "EUC-99990201-V1-00020000",
79
+ },
80
+ },
81
+ },
82
+ ],
83
+ },
84
+ ],
85
+ },
86
+ {
87
+ id: "12345",
88
+ parentId: "12345",
89
+ name: "SpaceX",
90
+ status: "active",
91
+ rowVersion: "1-12345",
92
+ updatedBy: "12345",
93
+ createdBy: "12345",
94
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
95
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
96
+ passThrough: [
97
+ {
98
+ serviceId: "<id>",
99
+ extendPaths: [
100
+ {
101
+ path: "$.nested.property",
102
+ value: {
103
+ "TaxClassificationRef": {
104
+ "value": "EUC-99990201-V1-00020000",
105
+ },
106
+ },
107
+ },
108
+ ],
109
+ },
110
+ ],
111
+ },
112
+ {
113
+ id: "12345",
114
+ parentId: "12345",
115
+ name: "SpaceX",
116
+ status: "active",
117
+ rowVersion: "1-12345",
118
+ updatedBy: "12345",
119
+ createdBy: "12345",
120
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
121
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
122
+ passThrough: [
123
+ {
124
+ serviceId: "<id>",
125
+ extendPaths: [
126
+ {
127
+ path: "$.nested.property",
128
+ value: {
129
+ "TaxClassificationRef": {
130
+ "value": "EUC-99990201-V1-00020000",
131
+ },
132
+ },
133
+ },
134
+ {
135
+ path: "$.nested.property",
136
+ value: {
137
+ "TaxClassificationRef": {
138
+ "value": "EUC-99990201-V1-00020000",
139
+ },
140
+ },
141
+ },
142
+ ],
143
+ },
144
+ {
145
+ serviceId: "<id>",
146
+ extendPaths: [
147
+ {
148
+ path: "$.nested.property",
149
+ value: {
150
+ "TaxClassificationRef": {
151
+ "value": "EUC-99990201-V1-00020000",
152
+ },
153
+ },
154
+ },
155
+ ],
156
+ },
157
+ ],
158
+ },
159
+ ],
160
+ meta: {
161
+ itemsOnPage: 50,
162
+ cursors: {
163
+ previous: "em9oby1jcm06OnBhZ2U6OjE=",
164
+ current: "em9oby1jcm06OnBhZ2U6OjI=",
165
+ next: "em9oby1jcm06OnBhZ2U6OjM=",
166
+ },
167
+ },
168
+ links: {
169
+ previous:
170
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
171
+ current: "https://unify.apideck.com/crm/companies",
172
+ next:
173
+ "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
174
+ },
175
+ });
176
+ });
177
+
178
+ it.skip("Subsidiaries Accounting Subsidiaries Add", async () => {
179
+ assert.fail(
180
+ "incomplete test found please make sure to address the following errors: [`workflow step accounting.subsidiariesAdd.test referencing operation accounting.subsidiariesAdd with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesAdd.test referencing operation accounting.subsidiariesAdd with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesAdd.test referencing operation accounting.subsidiariesAdd with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesAdd.test referencing operation accounting.subsidiariesAdd with expression in requestBody with type not currently supported`]",
181
+ );
182
+ });
183
+
184
+ test("Subsidiaries Accounting Subsidiaries One", async () => {
185
+ const testHttpClient = createTestHTTPClient("accounting.subsidiariesOne");
186
+
187
+ const apideck = new Apideck({
188
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
189
+ httpClient: testHttpClient,
190
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
191
+ });
192
+
193
+ const result = await apideck.accounting.subsidiaries.get({
194
+ id: "<id>",
195
+ serviceId: "salesforce",
196
+ fields: "id,updated_at",
197
+ });
198
+ expect(result.httpMeta.response.status).toBe(200);
199
+ expect(result.getSubsidiaryResponse).toBeDefined();
200
+ expect(result.getSubsidiaryResponse).toEqual({
201
+ statusCode: 200,
202
+ status: "OK",
203
+ service: "xero",
204
+ resource: "subsidiaries",
205
+ operation: "one",
206
+ data: {
207
+ id: "12345",
208
+ parentId: "12345",
209
+ name: "SpaceX",
210
+ status: "active",
211
+ rowVersion: "1-12345",
212
+ updatedBy: "12345",
213
+ createdBy: "12345",
214
+ updatedAt: new Date("2020-09-30T07:43:32.000Z"),
215
+ createdAt: new Date("2020-09-30T07:43:32.000Z"),
216
+ passThrough: [
217
+ {
218
+ serviceId: "<id>",
219
+ extendPaths: [
220
+ {
221
+ path: "$.nested.property",
222
+ value: {
223
+ "TaxClassificationRef": {
224
+ "value": "EUC-99990201-V1-00020000",
225
+ },
226
+ },
227
+ },
228
+ {
229
+ path: "$.nested.property",
230
+ value: {
231
+ "TaxClassificationRef": {
232
+ "value": "EUC-99990201-V1-00020000",
233
+ },
234
+ },
235
+ },
236
+ ],
237
+ },
238
+ {
239
+ serviceId: "<id>",
240
+ extendPaths: [
241
+ {
242
+ path: "$.nested.property",
243
+ value: {
244
+ "TaxClassificationRef": {
245
+ "value": "EUC-99990201-V1-00020000",
246
+ },
247
+ },
248
+ },
249
+ {
250
+ path: "$.nested.property",
251
+ value: {
252
+ "TaxClassificationRef": {
253
+ "value": "EUC-99990201-V1-00020000",
254
+ },
255
+ },
256
+ },
257
+ ],
258
+ },
259
+ {
260
+ serviceId: "<id>",
261
+ extendPaths: [
262
+ {
263
+ path: "$.nested.property",
264
+ value: {
265
+ "TaxClassificationRef": {
266
+ "value": "EUC-99990201-V1-00020000",
267
+ },
268
+ },
269
+ },
270
+ {
271
+ path: "$.nested.property",
272
+ value: {
273
+ "TaxClassificationRef": {
274
+ "value": "EUC-99990201-V1-00020000",
275
+ },
276
+ },
277
+ },
278
+ ],
279
+ },
280
+ ],
281
+ },
282
+ });
283
+ });
284
+
285
+ it.skip("Subsidiaries Accounting Subsidiaries Update", async () => {
286
+ assert.fail(
287
+ "incomplete test found please make sure to address the following errors: [`workflow step accounting.subsidiariesUpdate.test referencing operation accounting.subsidiariesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesUpdate.test referencing operation accounting.subsidiariesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesUpdate.test referencing operation accounting.subsidiariesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesUpdate.test referencing operation accounting.subsidiariesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesUpdate.test referencing operation accounting.subsidiariesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesUpdate.test referencing operation accounting.subsidiariesUpdate with expression in requestBody with type not currently supported`, `workflow step accounting.subsidiariesUpdate.test referencing operation accounting.subsidiariesUpdate with expression in requestBody with type not currently supported`]",
288
+ );
289
+ });
290
+
291
+ test("Subsidiaries Accounting Subsidiaries Delete", async () => {
292
+ const testHttpClient = createTestHTTPClient("accounting.subsidiariesDelete");
293
+
294
+ const apideck = new Apideck({
295
+ serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080",
296
+ httpClient: testHttpClient,
297
+ apiKey: process.env["APIDECK_API_KEY"] ?? "value",
298
+ });
299
+
300
+ const result = await apideck.accounting.subsidiaries.delete({
301
+ id: "<id>",
302
+ serviceId: "salesforce",
303
+ });
304
+ expect(result.httpMeta.response.status).toBe(200);
305
+ expect(result.deleteSubsidiaryResponse).toBeDefined();
306
+ expect(result.deleteSubsidiaryResponse).toEqual({
307
+ statusCode: 200,
308
+ status: "OK",
309
+ service: "quickbooks",
310
+ resource: "subsidiaries",
311
+ operation: "delete",
312
+ data: {
313
+ id: "12345",
314
+ },
315
+ });
316
+ });