conductor-node 11.10.0 → 12.0.0-beta.1

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 (510) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/LICENSE +201 -21
  3. package/README.md +330 -63
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +914 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +882 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +113 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +97 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +121 -0
  87. package/index.d.ts +121 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +133 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +90 -0
  92. package/index.mjs.map +1 -0
  93. package/internal/qs/formats.d.ts +6 -0
  94. package/internal/qs/formats.d.ts.map +1 -0
  95. package/internal/qs/formats.js +11 -0
  96. package/internal/qs/formats.js.map +1 -0
  97. package/internal/qs/formats.mjs +8 -0
  98. package/internal/qs/formats.mjs.map +1 -0
  99. package/internal/qs/index.d.ts +10 -0
  100. package/internal/qs/index.d.ts.map +1 -0
  101. package/internal/qs/index.js +14 -0
  102. package/internal/qs/index.js.map +1 -0
  103. package/internal/qs/index.mjs +10 -0
  104. package/internal/qs/index.mjs.map +1 -0
  105. package/internal/qs/stringify.d.ts +3 -0
  106. package/internal/qs/stringify.d.ts.map +1 -0
  107. package/internal/qs/stringify.js +280 -0
  108. package/internal/qs/stringify.js.map +1 -0
  109. package/internal/qs/stringify.mjs +276 -0
  110. package/internal/qs/stringify.mjs.map +1 -0
  111. package/internal/qs/types.d.ts +57 -0
  112. package/internal/qs/types.d.ts.map +1 -0
  113. package/{dist/src/resources → internal/qs}/types.js +1 -0
  114. package/internal/qs/types.js.map +1 -0
  115. package/internal/qs/types.mjs +2 -0
  116. package/internal/qs/types.mjs.map +1 -0
  117. package/internal/qs/utils.d.ts +14 -0
  118. package/internal/qs/utils.d.ts.map +1 -0
  119. package/internal/qs/utils.js +229 -0
  120. package/internal/qs/utils.js.map +1 -0
  121. package/internal/qs/utils.mjs +217 -0
  122. package/internal/qs/utils.mjs.map +1 -0
  123. package/package.json +111 -35
  124. package/pagination.d.ts +18 -0
  125. package/pagination.d.ts.map +1 -0
  126. package/pagination.js +40 -0
  127. package/pagination.js.map +1 -0
  128. package/pagination.mjs +36 -0
  129. package/pagination.mjs.map +1 -0
  130. package/resource.d.ts +6 -0
  131. package/resource.d.ts.map +1 -0
  132. package/resource.js +11 -0
  133. package/resource.js.map +1 -0
  134. package/resource.mjs +7 -0
  135. package/resource.mjs.map +1 -0
  136. package/resources/auth-sessions.d.ts +79 -0
  137. package/resources/auth-sessions.d.ts.map +1 -0
  138. package/resources/auth-sessions.js +23 -0
  139. package/resources/auth-sessions.js.map +1 -0
  140. package/resources/auth-sessions.mjs +19 -0
  141. package/resources/auth-sessions.mjs.map +1 -0
  142. package/resources/end-users.d.ts +154 -0
  143. package/resources/end-users.d.ts.map +1 -0
  144. package/resources/end-users.js +48 -0
  145. package/resources/end-users.js.map +1 -0
  146. package/resources/end-users.mjs +44 -0
  147. package/resources/end-users.mjs.map +1 -0
  148. package/resources/index.d.ts +4 -0
  149. package/resources/index.d.ts.map +1 -0
  150. package/resources/index.js +11 -0
  151. package/resources/index.js.map +1 -0
  152. package/resources/index.mjs +5 -0
  153. package/resources/index.mjs.map +1 -0
  154. package/resources/qbd/accounts.d.ts +579 -0
  155. package/resources/qbd/accounts.d.ts.map +1 -0
  156. package/resources/qbd/accounts.js +54 -0
  157. package/resources/qbd/accounts.js.map +1 -0
  158. package/resources/qbd/accounts.mjs +50 -0
  159. package/resources/qbd/accounts.mjs.map +1 -0
  160. package/resources/qbd/bill-check-payments.d.ts +831 -0
  161. package/resources/qbd/bill-check-payments.d.ts.map +1 -0
  162. package/resources/qbd/bill-check-payments.js +70 -0
  163. package/resources/qbd/bill-check-payments.js.map +1 -0
  164. package/resources/qbd/bill-check-payments.mjs +65 -0
  165. package/resources/qbd/bill-check-payments.mjs.map +1 -0
  166. package/resources/qbd/bill-credit-card-payments.d.ts +641 -0
  167. package/resources/qbd/bill-credit-card-payments.d.ts.map +1 -0
  168. package/resources/qbd/bill-credit-card-payments.js +55 -0
  169. package/resources/qbd/bill-credit-card-payments.js.map +1 -0
  170. package/resources/qbd/bill-credit-card-payments.mjs +50 -0
  171. package/resources/qbd/bill-credit-card-payments.mjs.map +1 -0
  172. package/resources/qbd/bills.d.ts +2561 -0
  173. package/resources/qbd/bills.d.ts.map +1 -0
  174. package/resources/qbd/bills.js +69 -0
  175. package/resources/qbd/bills.js.map +1 -0
  176. package/resources/qbd/bills.mjs +64 -0
  177. package/resources/qbd/bills.mjs.map +1 -0
  178. package/resources/qbd/checks.d.ts +2528 -0
  179. package/resources/qbd/checks.d.ts.map +1 -0
  180. package/resources/qbd/checks.js +69 -0
  181. package/resources/qbd/checks.js.map +1 -0
  182. package/resources/qbd/checks.mjs +64 -0
  183. package/resources/qbd/checks.mjs.map +1 -0
  184. package/resources/qbd/classes.d.ts +289 -0
  185. package/resources/qbd/classes.d.ts.map +1 -0
  186. package/resources/qbd/classes.js +54 -0
  187. package/resources/qbd/classes.js.map +1 -0
  188. package/resources/qbd/classes.mjs +50 -0
  189. package/resources/qbd/classes.mjs.map +1 -0
  190. package/resources/qbd/credit-card-charges.d.ts +2236 -0
  191. package/resources/qbd/credit-card-charges.d.ts.map +1 -0
  192. package/resources/qbd/credit-card-charges.js +69 -0
  193. package/resources/qbd/credit-card-charges.js.map +1 -0
  194. package/resources/qbd/credit-card-charges.mjs +64 -0
  195. package/resources/qbd/credit-card-charges.mjs.map +1 -0
  196. package/resources/qbd/credit-card-credits.d.ts +2233 -0
  197. package/resources/qbd/credit-card-credits.d.ts.map +1 -0
  198. package/resources/qbd/credit-card-credits.js +69 -0
  199. package/resources/qbd/credit-card-credits.js.map +1 -0
  200. package/resources/qbd/credit-card-credits.mjs +64 -0
  201. package/resources/qbd/credit-card-credits.mjs.map +1 -0
  202. package/resources/qbd/credit-memos.d.ts +2649 -0
  203. package/resources/qbd/credit-memos.d.ts.map +1 -0
  204. package/resources/qbd/credit-memos.js +69 -0
  205. package/resources/qbd/credit-memos.js.map +1 -0
  206. package/resources/qbd/credit-memos.mjs +64 -0
  207. package/resources/qbd/credit-memos.mjs.map +1 -0
  208. package/resources/qbd/customers.d.ts +2106 -0
  209. package/resources/qbd/customers.d.ts.map +1 -0
  210. package/resources/qbd/customers.js +58 -0
  211. package/resources/qbd/customers.js.map +1 -0
  212. package/resources/qbd/customers.mjs +53 -0
  213. package/resources/qbd/customers.mjs.map +1 -0
  214. package/resources/qbd/date-driven-terms.d.ts +242 -0
  215. package/resources/qbd/date-driven-terms.d.ts.map +1 -0
  216. package/resources/qbd/date-driven-terms.js +43 -0
  217. package/resources/qbd/date-driven-terms.js.map +1 -0
  218. package/resources/qbd/date-driven-terms.mjs +39 -0
  219. package/resources/qbd/date-driven-terms.mjs.map +1 -0
  220. package/resources/qbd/discount-items.d.ts +576 -0
  221. package/resources/qbd/discount-items.d.ts.map +1 -0
  222. package/resources/qbd/discount-items.js +58 -0
  223. package/resources/qbd/discount-items.js.map +1 -0
  224. package/resources/qbd/discount-items.mjs +53 -0
  225. package/resources/qbd/discount-items.mjs.map +1 -0
  226. package/resources/qbd/employees.d.ts +1669 -0
  227. package/resources/qbd/employees.d.ts.map +1 -0
  228. package/resources/qbd/employees.js +58 -0
  229. package/resources/qbd/employees.js.map +1 -0
  230. package/resources/qbd/employees.mjs +53 -0
  231. package/resources/qbd/employees.mjs.map +1 -0
  232. package/resources/qbd/estimates.d.ts +2493 -0
  233. package/resources/qbd/estimates.d.ts.map +1 -0
  234. package/resources/qbd/estimates.js +69 -0
  235. package/resources/qbd/estimates.js.map +1 -0
  236. package/resources/qbd/estimates.mjs +64 -0
  237. package/resources/qbd/estimates.mjs.map +1 -0
  238. package/resources/qbd/index.d.ts +37 -0
  239. package/resources/qbd/index.d.ts.map +1 -0
  240. package/resources/qbd/index.js +105 -0
  241. package/resources/qbd/index.js.map +1 -0
  242. package/resources/qbd/index.mjs +38 -0
  243. package/resources/qbd/index.mjs.map +1 -0
  244. package/resources/qbd/inventory-adjustments.d.ts +814 -0
  245. package/resources/qbd/inventory-adjustments.d.ts.map +1 -0
  246. package/resources/qbd/inventory-adjustments.js +66 -0
  247. package/resources/qbd/inventory-adjustments.js.map +1 -0
  248. package/resources/qbd/inventory-adjustments.mjs +62 -0
  249. package/resources/qbd/inventory-adjustments.mjs.map +1 -0
  250. package/resources/qbd/inventory-assembly-items.d.ts +931 -0
  251. package/resources/qbd/inventory-assembly-items.d.ts.map +1 -0
  252. package/resources/qbd/inventory-assembly-items.js +54 -0
  253. package/resources/qbd/inventory-assembly-items.js.map +1 -0
  254. package/resources/qbd/inventory-assembly-items.mjs +49 -0
  255. package/resources/qbd/inventory-assembly-items.mjs.map +1 -0
  256. package/resources/qbd/inventory-items.d.ts +844 -0
  257. package/resources/qbd/inventory-items.d.ts.map +1 -0
  258. package/resources/qbd/inventory-items.js +58 -0
  259. package/resources/qbd/inventory-items.js.map +1 -0
  260. package/resources/qbd/inventory-items.mjs +53 -0
  261. package/resources/qbd/inventory-items.mjs.map +1 -0
  262. package/resources/qbd/inventory-sites.d.ts +477 -0
  263. package/resources/qbd/inventory-sites.d.ts.map +1 -0
  264. package/resources/qbd/inventory-sites.js +54 -0
  265. package/resources/qbd/inventory-sites.js.map +1 -0
  266. package/resources/qbd/inventory-sites.mjs +50 -0
  267. package/resources/qbd/inventory-sites.mjs.map +1 -0
  268. package/resources/qbd/invoices.d.ts +2873 -0
  269. package/resources/qbd/invoices.d.ts.map +1 -0
  270. package/resources/qbd/invoices.js +69 -0
  271. package/resources/qbd/invoices.js.map +1 -0
  272. package/resources/qbd/invoices.mjs +64 -0
  273. package/resources/qbd/invoices.mjs.map +1 -0
  274. package/resources/qbd/journal-entries.d.ts +856 -0
  275. package/resources/qbd/journal-entries.d.ts.map +1 -0
  276. package/resources/qbd/journal-entries.js +69 -0
  277. package/resources/qbd/journal-entries.js.map +1 -0
  278. package/resources/qbd/journal-entries.mjs +64 -0
  279. package/resources/qbd/journal-entries.mjs.map +1 -0
  280. package/resources/qbd/non-inventory-items.d.ts +950 -0
  281. package/resources/qbd/non-inventory-items.d.ts.map +1 -0
  282. package/resources/qbd/non-inventory-items.js +58 -0
  283. package/resources/qbd/non-inventory-items.js.map +1 -0
  284. package/resources/qbd/non-inventory-items.mjs +53 -0
  285. package/resources/qbd/non-inventory-items.mjs.map +1 -0
  286. package/resources/qbd/payroll-wage-items.d.ts +215 -0
  287. package/resources/qbd/payroll-wage-items.d.ts.map +1 -0
  288. package/resources/qbd/payroll-wage-items.js +47 -0
  289. package/resources/qbd/payroll-wage-items.js.map +1 -0
  290. package/resources/qbd/payroll-wage-items.mjs +42 -0
  291. package/resources/qbd/payroll-wage-items.mjs.map +1 -0
  292. package/resources/qbd/purchase-orders.d.ts +2554 -0
  293. package/resources/qbd/purchase-orders.d.ts.map +1 -0
  294. package/resources/qbd/purchase-orders.js +69 -0
  295. package/resources/qbd/purchase-orders.js.map +1 -0
  296. package/resources/qbd/purchase-orders.mjs +64 -0
  297. package/resources/qbd/purchase-orders.mjs.map +1 -0
  298. package/resources/qbd/qbd.d.ts +146 -0
  299. package/resources/qbd/qbd.d.ts.map +1 -0
  300. package/resources/qbd/qbd.js +202 -0
  301. package/resources/qbd/qbd.js.map +1 -0
  302. package/resources/qbd/qbd.mjs +175 -0
  303. package/resources/qbd/qbd.mjs.map +1 -0
  304. package/resources/qbd/receive-payments.d.ts +1282 -0
  305. package/resources/qbd/receive-payments.d.ts.map +1 -0
  306. package/resources/qbd/receive-payments.js +70 -0
  307. package/resources/qbd/receive-payments.js.map +1 -0
  308. package/resources/qbd/receive-payments.mjs +65 -0
  309. package/resources/qbd/receive-payments.mjs.map +1 -0
  310. package/resources/qbd/sales-orders.d.ts +2628 -0
  311. package/resources/qbd/sales-orders.d.ts.map +1 -0
  312. package/resources/qbd/sales-orders.js +69 -0
  313. package/resources/qbd/sales-orders.js.map +1 -0
  314. package/resources/qbd/sales-orders.mjs +64 -0
  315. package/resources/qbd/sales-orders.mjs.map +1 -0
  316. package/resources/qbd/sales-receipts.d.ts +3373 -0
  317. package/resources/qbd/sales-receipts.d.ts.map +1 -0
  318. package/resources/qbd/sales-receipts.js +69 -0
  319. package/resources/qbd/sales-receipts.js.map +1 -0
  320. package/resources/qbd/sales-receipts.mjs +64 -0
  321. package/resources/qbd/sales-receipts.mjs.map +1 -0
  322. package/resources/qbd/sales-representatives.d.ts +251 -0
  323. package/resources/qbd/sales-representatives.d.ts.map +1 -0
  324. package/resources/qbd/sales-representatives.js +54 -0
  325. package/resources/qbd/sales-representatives.js.map +1 -0
  326. package/resources/qbd/sales-representatives.mjs +50 -0
  327. package/resources/qbd/sales-representatives.mjs.map +1 -0
  328. package/resources/qbd/sales-tax-codes.d.ts +306 -0
  329. package/resources/qbd/sales-tax-codes.d.ts.map +1 -0
  330. package/resources/qbd/sales-tax-codes.js +54 -0
  331. package/resources/qbd/sales-tax-codes.js.map +1 -0
  332. package/resources/qbd/sales-tax-codes.mjs +50 -0
  333. package/resources/qbd/sales-tax-codes.mjs.map +1 -0
  334. package/resources/qbd/sales-tax-items.d.ts +458 -0
  335. package/resources/qbd/sales-tax-items.d.ts.map +1 -0
  336. package/resources/qbd/sales-tax-items.js +58 -0
  337. package/resources/qbd/sales-tax-items.js.map +1 -0
  338. package/resources/qbd/sales-tax-items.mjs +53 -0
  339. package/resources/qbd/sales-tax-items.mjs.map +1 -0
  340. package/resources/qbd/service-items.d.ts +923 -0
  341. package/resources/qbd/service-items.d.ts.map +1 -0
  342. package/resources/qbd/service-items.js +58 -0
  343. package/resources/qbd/service-items.js.map +1 -0
  344. package/resources/qbd/service-items.mjs +53 -0
  345. package/resources/qbd/service-items.mjs.map +1 -0
  346. package/resources/qbd/standard-terms.d.ts +225 -0
  347. package/resources/qbd/standard-terms.d.ts.map +1 -0
  348. package/resources/qbd/standard-terms.js +43 -0
  349. package/resources/qbd/standard-terms.js.map +1 -0
  350. package/resources/qbd/standard-terms.mjs +39 -0
  351. package/resources/qbd/standard-terms.mjs.map +1 -0
  352. package/resources/qbd/subtotal-items.d.ts +323 -0
  353. package/resources/qbd/subtotal-items.d.ts.map +1 -0
  354. package/resources/qbd/subtotal-items.js +58 -0
  355. package/resources/qbd/subtotal-items.js.map +1 -0
  356. package/resources/qbd/subtotal-items.mjs +53 -0
  357. package/resources/qbd/subtotal-items.mjs.map +1 -0
  358. package/resources/qbd/transfers.d.ts +269 -0
  359. package/resources/qbd/transfers.d.ts.map +1 -0
  360. package/resources/qbd/transfers.js +58 -0
  361. package/resources/qbd/transfers.js.map +1 -0
  362. package/resources/qbd/transfers.mjs +53 -0
  363. package/resources/qbd/transfers.mjs.map +1 -0
  364. package/resources/qbd/vendor-credits.d.ts +2298 -0
  365. package/resources/qbd/vendor-credits.d.ts.map +1 -0
  366. package/resources/qbd/vendor-credits.js +69 -0
  367. package/resources/qbd/vendor-credits.js.map +1 -0
  368. package/resources/qbd/vendor-credits.mjs +64 -0
  369. package/resources/qbd/vendor-credits.mjs.map +1 -0
  370. package/resources/qbd/vendors.d.ts +1677 -0
  371. package/resources/qbd/vendors.d.ts.map +1 -0
  372. package/resources/qbd/vendors.js +58 -0
  373. package/resources/qbd/vendors.js.map +1 -0
  374. package/resources/qbd/vendors.mjs +53 -0
  375. package/resources/qbd/vendors.mjs.map +1 -0
  376. package/shims/node.d.ts +30 -0
  377. package/shims/node.d.ts.map +1 -0
  378. package/shims/node.js +31 -0
  379. package/shims/node.js.map +1 -0
  380. package/shims/node.mjs +5 -0
  381. package/shims/node.mjs.map +1 -0
  382. package/shims/web.d.ts +26 -0
  383. package/shims/web.d.ts.map +1 -0
  384. package/shims/web.js +31 -0
  385. package/shims/web.js.map +1 -0
  386. package/shims/web.mjs +5 -0
  387. package/shims/web.mjs.map +1 -0
  388. package/src/_shims/MultipartBody.ts +9 -0
  389. package/src/_shims/README.md +46 -0
  390. package/src/_shims/auto/runtime-bun.ts +4 -0
  391. package/src/_shims/auto/runtime-node.ts +4 -0
  392. package/src/_shims/auto/runtime.ts +4 -0
  393. package/src/_shims/auto/types-node.ts +4 -0
  394. package/src/_shims/auto/types.d.ts +101 -0
  395. package/src/_shims/auto/types.js +3 -0
  396. package/src/_shims/auto/types.mjs +3 -0
  397. package/src/_shims/bun-runtime.ts +14 -0
  398. package/src/_shims/index.d.ts +81 -0
  399. package/src/_shims/index.js +13 -0
  400. package/src/_shims/index.mjs +7 -0
  401. package/src/_shims/manual-types.d.ts +12 -0
  402. package/src/_shims/manual-types.js +3 -0
  403. package/src/_shims/manual-types.mjs +3 -0
  404. package/src/_shims/node-runtime.ts +81 -0
  405. package/src/_shims/node-types.d.ts +42 -0
  406. package/src/_shims/node-types.js +3 -0
  407. package/src/_shims/node-types.mjs +3 -0
  408. package/src/_shims/registry.ts +67 -0
  409. package/src/_shims/web-runtime.ts +103 -0
  410. package/src/_shims/web-types.d.ts +83 -0
  411. package/src/_shims/web-types.js +3 -0
  412. package/src/_shims/web-types.mjs +3 -0
  413. package/src/core.ts +1208 -0
  414. package/src/error.ts +130 -0
  415. package/src/index.ts +227 -0
  416. package/src/internal/qs/LICENSE.md +13 -0
  417. package/src/internal/qs/README.md +3 -0
  418. package/src/internal/qs/formats.ts +9 -0
  419. package/src/internal/qs/index.ts +13 -0
  420. package/src/internal/qs/stringify.ts +388 -0
  421. package/src/internal/qs/types.ts +71 -0
  422. package/src/internal/qs/utils.ts +265 -0
  423. package/src/lib/.keep +4 -0
  424. package/src/pagination.ts +60 -0
  425. package/src/resource.ts +11 -0
  426. package/src/resources/auth-sessions.ts +99 -0
  427. package/src/resources/end-users.ts +216 -0
  428. package/src/resources/index.ts +14 -0
  429. package/src/resources/qbd/accounts.ts +797 -0
  430. package/src/resources/qbd/bill-check-payments.ts +1086 -0
  431. package/src/resources/qbd/bill-credit-card-payments.ts +851 -0
  432. package/src/resources/qbd/bills.ts +3039 -0
  433. package/src/resources/qbd/checks.ts +3003 -0
  434. package/src/resources/qbd/classes.ts +366 -0
  435. package/src/resources/qbd/credit-card-charges.ts +2646 -0
  436. package/src/resources/qbd/credit-card-credits.ts +2643 -0
  437. package/src/resources/qbd/credit-memos.ts +3157 -0
  438. package/src/resources/qbd/customers.ts +2518 -0
  439. package/src/resources/qbd/date-driven-terms.ts +314 -0
  440. package/src/resources/qbd/discount-items.ts +712 -0
  441. package/src/resources/qbd/employees.ts +2266 -0
  442. package/src/resources/qbd/estimates.ts +2975 -0
  443. package/src/resources/qbd/index.ts +346 -0
  444. package/src/resources/qbd/inventory-adjustments.ts +1008 -0
  445. package/src/resources/qbd/inventory-assembly-items.ts +1126 -0
  446. package/src/resources/qbd/inventory-items.ts +1026 -0
  447. package/src/resources/qbd/inventory-sites.ts +605 -0
  448. package/src/resources/qbd/invoices.ts +3398 -0
  449. package/src/resources/qbd/journal-entries.ts +1051 -0
  450. package/src/resources/qbd/non-inventory-items.ts +1138 -0
  451. package/src/resources/qbd/payroll-wage-items.ts +304 -0
  452. package/src/resources/qbd/purchase-orders.ts +3045 -0
  453. package/src/resources/qbd/qbd.ts +876 -0
  454. package/src/resources/qbd/receive-payments.ts +1609 -0
  455. package/src/resources/qbd/sales-orders.ts +3141 -0
  456. package/src/resources/qbd/sales-receipts.ts +3977 -0
  457. package/src/resources/qbd/sales-representatives.ts +340 -0
  458. package/src/resources/qbd/sales-tax-codes.ts +398 -0
  459. package/src/resources/qbd/sales-tax-items.ts +583 -0
  460. package/src/resources/qbd/service-items.ts +1105 -0
  461. package/src/resources/qbd/standard-terms.ts +295 -0
  462. package/src/resources/qbd/subtotal-items.ts +430 -0
  463. package/src/resources/qbd/transfers.ts +359 -0
  464. package/src/resources/qbd/vendor-credits.ts +2742 -0
  465. package/src/resources/qbd/vendors.ts +2017 -0
  466. package/src/shims/node.ts +50 -0
  467. package/src/shims/web.ts +50 -0
  468. package/src/tsconfig.json +11 -0
  469. package/src/uploads.ts +255 -0
  470. package/src/version.ts +1 -0
  471. package/uploads.d.ts +75 -0
  472. package/uploads.d.ts.map +1 -0
  473. package/uploads.js +171 -0
  474. package/uploads.js.map +1 -0
  475. package/uploads.mjs +158 -0
  476. package/uploads.mjs.map +1 -0
  477. package/version.d.ts +2 -0
  478. package/version.d.ts.map +1 -0
  479. package/version.js +5 -0
  480. package/version.js.map +1 -0
  481. package/version.mjs +2 -0
  482. package/version.mjs.map +1 -0
  483. package/dist/package.json +0 -48
  484. package/dist/src/Client.d.ts +0 -21
  485. package/dist/src/Client.js +0 -54
  486. package/dist/src/index.d.ts +0 -11
  487. package/dist/src/index.js +0 -59
  488. package/dist/src/integrations/BaseIntegration.d.ts +0 -9
  489. package/dist/src/integrations/BaseIntegration.js +0 -14
  490. package/dist/src/integrations/qbd/QbdIntegration.d.ts +0 -3120
  491. package/dist/src/integrations/qbd/QbdIntegration.js +0 -3147
  492. package/dist/src/integrations/qbd/qbdTypes.d.ts +0 -14076
  493. package/dist/src/integrations/qbd/qbdTypes.js +0 -2
  494. package/dist/src/interceptors/errorHandling.d.ts +0 -2
  495. package/dist/src/interceptors/errorHandling.js +0 -53
  496. package/dist/src/interceptors/logging.d.ts +0 -18
  497. package/dist/src/interceptors/logging.js +0 -70
  498. package/dist/src/resources/AuthSessionsResource.d.ts +0 -77
  499. package/dist/src/resources/AuthSessionsResource.js +0 -26
  500. package/dist/src/resources/BaseResource.d.ts +0 -6
  501. package/dist/src/resources/BaseResource.js +0 -9
  502. package/dist/src/resources/EndUsersResource.d.ts +0 -84
  503. package/dist/src/resources/EndUsersResource.js +0 -57
  504. package/dist/src/resources/types.d.ts +0 -40
  505. package/dist/src/utils/checkForUpdates.d.ts +0 -2
  506. package/dist/src/utils/checkForUpdates.js +0 -62
  507. package/dist/src/utils/env.d.ts +0 -1
  508. package/dist/src/utils/env.js +0 -15
  509. package/dist/src/utils/error.d.ts +0 -184
  510. package/dist/src/utils/error.js +0 -254
@@ -0,0 +1,3045 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../resource';
4
+ import * as Core from '../../core';
5
+ import { CursorPage, type CursorPageParams } from '../../pagination';
6
+
7
+ export class PurchaseOrders extends APIResource {
8
+ /**
9
+ * Creates a new purchase order.
10
+ */
11
+ create(params: PurchaseOrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<PurchaseOrder> {
12
+ const { conductorEndUserId, ...body } = params;
13
+ return this._client.post('/quickbooks-desktop/purchase-orders', {
14
+ body,
15
+ ...options,
16
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
17
+ });
18
+ }
19
+
20
+ /**
21
+ * Retrieves a purchase order by ID.
22
+ */
23
+ retrieve(
24
+ id: string,
25
+ params: PurchaseOrderRetrieveParams,
26
+ options?: Core.RequestOptions,
27
+ ): Core.APIPromise<PurchaseOrder> {
28
+ const { conductorEndUserId } = params;
29
+ return this._client.get(`/quickbooks-desktop/purchase-orders/${id}`, {
30
+ ...options,
31
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
32
+ });
33
+ }
34
+
35
+ /**
36
+ * Updates an existing purchase order.
37
+ */
38
+ update(
39
+ id: string,
40
+ params: PurchaseOrderUpdateParams,
41
+ options?: Core.RequestOptions,
42
+ ): Core.APIPromise<PurchaseOrder> {
43
+ const { conductorEndUserId, ...body } = params;
44
+ return this._client.post(`/quickbooks-desktop/purchase-orders/${id}`, {
45
+ body,
46
+ ...options,
47
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
48
+ });
49
+ }
50
+
51
+ /**
52
+ * Returns a list of purchase orders. Use the `cursor` parameter to paginate
53
+ * through the results.
54
+ */
55
+ list(
56
+ params: PurchaseOrderListParams,
57
+ options?: Core.RequestOptions,
58
+ ): Core.PagePromise<PurchaseOrdersCursorPage, PurchaseOrder> {
59
+ const { conductorEndUserId, ...query } = params;
60
+ return this._client.getAPIList('/quickbooks-desktop/purchase-orders', PurchaseOrdersCursorPage, {
61
+ query,
62
+ ...options,
63
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
64
+ });
65
+ }
66
+
67
+ /**
68
+ * Permanently deletes a a purchase order. The deletion will fail if the purchase
69
+ * order is currently in use or has any linked transactions that are in use.
70
+ */
71
+ delete(
72
+ id: string,
73
+ params: PurchaseOrderDeleteParams,
74
+ options?: Core.RequestOptions,
75
+ ): Core.APIPromise<PurchaseOrderDeleteResponse> {
76
+ const { conductorEndUserId } = params;
77
+ return this._client.delete(`/quickbooks-desktop/purchase-orders/${id}`, {
78
+ ...options,
79
+ headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
80
+ });
81
+ }
82
+ }
83
+
84
+ export class PurchaseOrdersCursorPage extends CursorPage<PurchaseOrder> {}
85
+
86
+ export interface PurchaseOrder {
87
+ /**
88
+ * The unique identifier assigned by QuickBooks to this purchase order. This ID is
89
+ * unique across all transaction types.
90
+ */
91
+ id: string;
92
+
93
+ /**
94
+ * The purchase order's class. Classes can be used to categorize objects into
95
+ * meaningful segments, such as department, location, or type of work. In
96
+ * QuickBooks, class tracking is off by default. A class defined here is
97
+ * automatically used in this purchase order's line items unless overridden at the
98
+ * line item level.
99
+ */
100
+ class: PurchaseOrder.Class | null;
101
+
102
+ /**
103
+ * The date and time when this purchase order was created, in ISO 8601 format
104
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
105
+ * in QuickBooks.
106
+ */
107
+ createdAt: string;
108
+
109
+ /**
110
+ * The purchase order's currency. For built-in currencies, the name and code are
111
+ * standard international values. For user-defined currencies, all values are
112
+ * editable.
113
+ */
114
+ currency: PurchaseOrder.Currency | null;
115
+
116
+ /**
117
+ * The custom fields for the purchase order object, added as user-defined data
118
+ * extensions, not included in the standard QuickBooks object.
119
+ */
120
+ customFields: Array<PurchaseOrder.CustomField>;
121
+
122
+ /**
123
+ * The predefined template in QuickBooks that determines the layout and formatting
124
+ * for this purchase order when printed or displayed.
125
+ */
126
+ documentTemplate: PurchaseOrder.DocumentTemplate | null;
127
+
128
+ /**
129
+ * The date by which this purchase order must be paid, in ISO 8601 format
130
+ * (YYYY-MM-DD).
131
+ */
132
+ dueDate: string | null;
133
+
134
+ /**
135
+ * The market exchange rate between this purchase order's currency and the home
136
+ * currency in QuickBooks at the time of this transaction. Represented as a decimal
137
+ * value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).
138
+ */
139
+ exchangeRate: number | null;
140
+
141
+ /**
142
+ * The date on which shipment of this purchase order is expected to be completed,
143
+ * in ISO 8601 format (YYYY-MM-DD).
144
+ */
145
+ expectedDate: string | null;
146
+
147
+ /**
148
+ * A globally unique identifier (GUID) you, the developer, can provide for tracking
149
+ * this object in your external system. This field is immutable and can only be set
150
+ * during object creation.
151
+ */
152
+ externalId: string | null;
153
+
154
+ /**
155
+ * The site location where inventory for the item associated with this purchase
156
+ * order is stored.
157
+ */
158
+ inventorySite: PurchaseOrder.InventorySite | null;
159
+
160
+ /**
161
+ * Indicates whether all items in this purchase order have been received and none
162
+ * of them were closed manually.
163
+ */
164
+ isFullyReceived: boolean | null;
165
+
166
+ /**
167
+ * Indicates whether this purchase order has been manually marked as closed, even
168
+ * if all items have not been received or the sale has not been cancelled. Once the
169
+ * purchase order is marked as closed, all of its line items become closed as well.
170
+ * You cannot change `isManuallyClosed` to `false` after the purchase order has
171
+ * been fully received.
172
+ */
173
+ isManuallyClosed: boolean;
174
+
175
+ /**
176
+ * Indicates whether this purchase order is included in the queue of documents for
177
+ * QuickBooks to email to the customer.
178
+ */
179
+ isQueuedForEmail: boolean | null;
180
+
181
+ /**
182
+ * Indicates whether this purchase order is included in the queue of documents for
183
+ * QuickBooks to print.
184
+ */
185
+ isQueuedForPrint: boolean | null;
186
+
187
+ /**
188
+ * The purchase order's line item groups, each representing a predefined set of
189
+ * related items.
190
+ */
191
+ lineGroups: Array<PurchaseOrder.LineGroup>;
192
+
193
+ /**
194
+ * The purchase order's line items, each representing a single product or service
195
+ * ordered.
196
+ */
197
+ lines: Array<PurchaseOrder.Line>;
198
+
199
+ /**
200
+ * The purchase order's linked transactions, such as payments applied, credits
201
+ * used, or associated purchase orders.
202
+ *
203
+ * **IMPORTANT**: You must specify the parameter `includeLinkedTransactions` when
204
+ * fetching a list of purchase orders to receive this field because it is not
205
+ * returned by default.
206
+ */
207
+ linkedTransactions: Array<PurchaseOrder.LinkedTransaction>;
208
+
209
+ /**
210
+ * A memo or note for this purchase order that appears in reports, but not on the
211
+ * purchase order.
212
+ */
213
+ memo: string | null;
214
+
215
+ /**
216
+ * The type of object. This value is always `"qbd_purchase_order"`.
217
+ */
218
+ objectType: 'qbd_purchase_order';
219
+
220
+ /**
221
+ * A built-in custom field for additional information specific to this purchase
222
+ * order. Unlike the user-defined fields in the `customFields` array, this is a
223
+ * standard QuickBooks field that exists for all purchase orders for convenience.
224
+ * Developers often use this field for tracking information that doesn't fit into
225
+ * other standard QuickBooks fields. Hidden by default in the QuickBooks UI.
226
+ */
227
+ otherCustomField1: string | null;
228
+
229
+ /**
230
+ * A second built-in custom field for additional information specific to this
231
+ * purchase order. Unlike the user-defined fields in the `customFields` array, this
232
+ * is a standard QuickBooks field that exists for all purchase orders for
233
+ * convenience. Like `otherCustomField1`, developers often use this field for
234
+ * tracking information that doesn't fit into other standard QuickBooks fields.
235
+ * Hidden by default in the QuickBooks UI.
236
+ */
237
+ otherCustomField2: string | null;
238
+
239
+ /**
240
+ * The case-sensitive user-defined reference number for this purchase order, which
241
+ * can be used to identify the transaction in QuickBooks. This value is not
242
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
243
+ */
244
+ refNumber: string | null;
245
+
246
+ /**
247
+ * The current QuickBooks-assigned revision number of this purchase order object,
248
+ * which changes each time the object is modified. When updating this object, you
249
+ * must provide the most recent `revisionNumber` to ensure you're working with the
250
+ * latest data; otherwise, the update will return an error.
251
+ */
252
+ revisionNumber: string;
253
+
254
+ /**
255
+ * The sales-tax code for this purchase order, determining whether it is taxable or
256
+ * non-taxable. If set, this overrides any sales-tax codes defined on the vendor.
257
+ * This can be overridden on the purchase order's individual lines.
258
+ *
259
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
260
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
261
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
262
+ * non-taxable code to all sales.
263
+ */
264
+ salesTaxCode: PurchaseOrder.SalesTaxCode | null;
265
+
266
+ /**
267
+ * The origin location from where the product associated with this purchase order
268
+ * is shipped. This is the point at which ownership and liability for goods
269
+ * transfer from seller to buyer. Internally, QuickBooks uses the term "FOB" for
270
+ * this field, which stands for "freight on board". This field is informational and
271
+ * has no accounting implications.
272
+ */
273
+ shipmentOrigin: string | null;
274
+
275
+ /**
276
+ * The purchase order's shipping address.
277
+ */
278
+ shippingAddress: PurchaseOrder.ShippingAddress | null;
279
+
280
+ /**
281
+ * The shipping method used for this purchase order, such as standard mail or
282
+ * overnight delivery.
283
+ */
284
+ shippingMethod: PurchaseOrder.ShippingMethod | null;
285
+
286
+ /**
287
+ * The customer, vendor, employee, or other entity to whom this purchase order is
288
+ * to be shipped.
289
+ */
290
+ shipToEntity: PurchaseOrder.ShipToEntity | null;
291
+
292
+ /**
293
+ * The purchase order's payment terms, defining when payment is due and any
294
+ * applicable discounts.
295
+ */
296
+ terms: PurchaseOrder.Terms | null;
297
+
298
+ /**
299
+ * The total monetary amount of this purchase order, equivalent to the sum of the
300
+ * amounts in `lines` and `lineGroups`, represented as a decimal string.
301
+ */
302
+ totalAmount: string;
303
+
304
+ /**
305
+ * The total monetary amount of this purchase order converted to the home currency
306
+ * of the QuickBooks company file. Represented as a decimal string.
307
+ */
308
+ totalAmountInHomeCurrency: string | null;
309
+
310
+ /**
311
+ * The date of this purchase order, in ISO 8601 format (YYYY-MM-DD).
312
+ */
313
+ transactionDate: string;
314
+
315
+ /**
316
+ * The date and time when this purchase order was last updated, in ISO 8601 format
317
+ * (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
318
+ * in QuickBooks.
319
+ */
320
+ updatedAt: string;
321
+
322
+ /**
323
+ * The vendor who sent this purchase order for goods or services purchased.
324
+ */
325
+ vendor: PurchaseOrder.Vendor | null;
326
+
327
+ /**
328
+ * The address of the vendor who sent this purchase order.
329
+ */
330
+ vendorAddress: PurchaseOrder.VendorAddress | null;
331
+
332
+ /**
333
+ * A message to be printed on this purchase order for the vendor to read.
334
+ */
335
+ vendorMessage: string | null;
336
+ }
337
+
338
+ export namespace PurchaseOrder {
339
+ /**
340
+ * The purchase order's class. Classes can be used to categorize objects into
341
+ * meaningful segments, such as department, location, or type of work. In
342
+ * QuickBooks, class tracking is off by default. A class defined here is
343
+ * automatically used in this purchase order's line items unless overridden at the
344
+ * line item level.
345
+ */
346
+ export interface Class {
347
+ /**
348
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
349
+ * across all objects of the same type, but not across different QuickBooks object
350
+ * types.
351
+ */
352
+ id: string | null;
353
+
354
+ /**
355
+ * The fully-qualified unique name for this object, formed by combining the names
356
+ * of its parent objects with its own `name`, separated by colons. Not
357
+ * case-sensitive.
358
+ */
359
+ fullName: string | null;
360
+ }
361
+
362
+ /**
363
+ * The purchase order's currency. For built-in currencies, the name and code are
364
+ * standard international values. For user-defined currencies, all values are
365
+ * editable.
366
+ */
367
+ export interface Currency {
368
+ /**
369
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
370
+ * across all objects of the same type, but not across different QuickBooks object
371
+ * types.
372
+ */
373
+ id: string | null;
374
+
375
+ /**
376
+ * The fully-qualified unique name for this object, formed by combining the names
377
+ * of its parent objects with its own `name`, separated by colons. Not
378
+ * case-sensitive.
379
+ */
380
+ fullName: string | null;
381
+ }
382
+
383
+ export interface CustomField {
384
+ /**
385
+ * The name of the custom field, unique for the specified `ownerId`. For public
386
+ * custom fields, this name is visible as a label in the QuickBooks UI.
387
+ */
388
+ name: string;
389
+
390
+ /**
391
+ * The identifier of the owner of the custom field, which QuickBooks internally
392
+ * calls a "data extension". For public custom fields visible in the UI, such as
393
+ * those added by the QuickBooks user, this is always "0". For private custom
394
+ * fields that are only visible to the application that created them, this is a
395
+ * valid GUID identifying the owning application. Internally, Conductor always
396
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
397
+ * objects.
398
+ */
399
+ ownerId: string;
400
+
401
+ /**
402
+ * The data type of this custom field.
403
+ */
404
+ type:
405
+ | 'amount_type'
406
+ | 'date_time_type'
407
+ | 'integer_type'
408
+ | 'percent_type'
409
+ | 'price_type'
410
+ | 'quantity_type'
411
+ | 'string_1024_type'
412
+ | 'string_255_type';
413
+
414
+ /**
415
+ * The value of this custom field. The maximum length depends on the field's data
416
+ * type.
417
+ */
418
+ value: string;
419
+ }
420
+
421
+ /**
422
+ * The predefined template in QuickBooks that determines the layout and formatting
423
+ * for this purchase order when printed or displayed.
424
+ */
425
+ export interface DocumentTemplate {
426
+ /**
427
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
428
+ * across all objects of the same type, but not across different QuickBooks object
429
+ * types.
430
+ */
431
+ id: string | null;
432
+
433
+ /**
434
+ * The fully-qualified unique name for this object, formed by combining the names
435
+ * of its parent objects with its own `name`, separated by colons. Not
436
+ * case-sensitive.
437
+ */
438
+ fullName: string | null;
439
+ }
440
+
441
+ /**
442
+ * The site location where inventory for the item associated with this purchase
443
+ * order is stored.
444
+ */
445
+ export interface InventorySite {
446
+ /**
447
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
448
+ * across all objects of the same type, but not across different QuickBooks object
449
+ * types.
450
+ */
451
+ id: string | null;
452
+
453
+ /**
454
+ * The fully-qualified unique name for this object, formed by combining the names
455
+ * of its parent objects with its own `name`, separated by colons. Not
456
+ * case-sensitive.
457
+ */
458
+ fullName: string | null;
459
+ }
460
+
461
+ export interface LineGroup {
462
+ /**
463
+ * The unique identifier assigned by QuickBooks to this purchase order line group.
464
+ * This ID is unique across all transaction line types.
465
+ */
466
+ id: string;
467
+
468
+ /**
469
+ * The custom fields for the purchase order line group object, added as
470
+ * user-defined data extensions, not included in the standard QuickBooks object.
471
+ */
472
+ customFields: Array<LineGroup.CustomField>;
473
+
474
+ /**
475
+ * A description of this purchase order line group.
476
+ */
477
+ description: string | null;
478
+
479
+ /**
480
+ * The purchase order line group's item group, representing a predefined set of
481
+ * items bundled because they are commonly purchased together or grouped for faster
482
+ * entry.
483
+ */
484
+ itemGroup: LineGroup.ItemGroup;
485
+
486
+ /**
487
+ * The purchase order line group's line items, each representing a single product
488
+ * or service ordered.
489
+ */
490
+ lines: Array<LineGroup.Line>;
491
+
492
+ /**
493
+ * The type of object. This value is always `"qbd_purchase_order_line_group"`.
494
+ */
495
+ objectType: 'qbd_purchase_order_line_group';
496
+
497
+ /**
498
+ * Specifies an alternative unit-of-measure set when updating this purchase order
499
+ * line group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows
500
+ * you to select units from a different set than the item's default unit-of-measure
501
+ * set, which remains unchanged on the item itself. The override applies only to
502
+ * this specific line. For example, you can sell an item typically measured in
503
+ * volume units using weight units in a specific transaction by specifying a
504
+ * different unit-of-measure set with this field.
505
+ */
506
+ overrideUnitOfMeasureSet: LineGroup.OverrideUnitOfMeasureSet | null;
507
+
508
+ /**
509
+ * The quantity of the item group associated with this purchase order line group.
510
+ * This field cannot be cleared.
511
+ *
512
+ * **NOTE**: Do not use this field if the associated item group is a discount item
513
+ * group.
514
+ */
515
+ quantity: number | null;
516
+
517
+ /**
518
+ * Indicates whether the individual items in this purchase order line group and
519
+ * their separate amounts appear on printed forms.
520
+ */
521
+ shouldPrintItemsInGroup: boolean;
522
+
523
+ /**
524
+ * The total monetary amount of this purchase order line group, equivalent to the
525
+ * sum of the amounts in `lines`, represented as a decimal string.
526
+ */
527
+ totalAmount: string;
528
+
529
+ /**
530
+ * The unit-of-measure used for the `quantity` in this purchase order line group.
531
+ * Must be a valid unit within the item's available units of measure.
532
+ */
533
+ unitOfMeasure: string | null;
534
+ }
535
+
536
+ export namespace LineGroup {
537
+ export interface CustomField {
538
+ /**
539
+ * The name of the custom field, unique for the specified `ownerId`. For public
540
+ * custom fields, this name is visible as a label in the QuickBooks UI.
541
+ */
542
+ name: string;
543
+
544
+ /**
545
+ * The identifier of the owner of the custom field, which QuickBooks internally
546
+ * calls a "data extension". For public custom fields visible in the UI, such as
547
+ * those added by the QuickBooks user, this is always "0". For private custom
548
+ * fields that are only visible to the application that created them, this is a
549
+ * valid GUID identifying the owning application. Internally, Conductor always
550
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
551
+ * objects.
552
+ */
553
+ ownerId: string;
554
+
555
+ /**
556
+ * The data type of this custom field.
557
+ */
558
+ type:
559
+ | 'amount_type'
560
+ | 'date_time_type'
561
+ | 'integer_type'
562
+ | 'percent_type'
563
+ | 'price_type'
564
+ | 'quantity_type'
565
+ | 'string_1024_type'
566
+ | 'string_255_type';
567
+
568
+ /**
569
+ * The value of this custom field. The maximum length depends on the field's data
570
+ * type.
571
+ */
572
+ value: string;
573
+ }
574
+
575
+ /**
576
+ * The purchase order line group's item group, representing a predefined set of
577
+ * items bundled because they are commonly purchased together or grouped for faster
578
+ * entry.
579
+ */
580
+ export interface ItemGroup {
581
+ /**
582
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
583
+ * across all objects of the same type, but not across different QuickBooks object
584
+ * types.
585
+ */
586
+ id: string | null;
587
+
588
+ /**
589
+ * The fully-qualified unique name for this object, formed by combining the names
590
+ * of its parent objects with its own `name`, separated by colons. Not
591
+ * case-sensitive.
592
+ */
593
+ fullName: string | null;
594
+ }
595
+
596
+ export interface Line {
597
+ /**
598
+ * The unique identifier assigned by QuickBooks to this purchase order line. This
599
+ * ID is unique across all transaction line types.
600
+ */
601
+ id: string;
602
+
603
+ /**
604
+ * The monetary amount of this purchase order line, represented as a decimal
605
+ * string. If both `quantity` and `rate` are specified but not `amount`, QuickBooks
606
+ * will use them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
607
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
608
+ * `1` and the suggested `rate`. This field cannot be cleared.
609
+ */
610
+ amount: string | null;
611
+
612
+ /**
613
+ * The purchase order line's class. Classes can be used to categorize objects into
614
+ * meaningful segments, such as department, location, or type of work. In
615
+ * QuickBooks, class tracking is off by default. If a class is specified for the
616
+ * entire parent transaction, it is automatically applied to all purchase order
617
+ * lines unless overridden here, at the transaction line level.
618
+ */
619
+ class: Line.Class | null;
620
+
621
+ /**
622
+ * The custom fields for the purchase order line object, added as user-defined data
623
+ * extensions, not included in the standard QuickBooks object.
624
+ */
625
+ customFields: Array<Line.CustomField>;
626
+
627
+ /**
628
+ * A description of this purchase order line.
629
+ */
630
+ description: string | null;
631
+
632
+ /**
633
+ * The specific location (e.g., bin or shelf) within the inventory site where the
634
+ * item associated with this purchase order line is stored.
635
+ */
636
+ inventorySiteLocation: Line.InventorySiteLocation | null;
637
+
638
+ /**
639
+ * Indicates whether this purchase order line has been billed.
640
+ */
641
+ isBilled: boolean | null;
642
+
643
+ /**
644
+ * Indicates whether this purchase order line has been manually marked as closed,
645
+ * even if this item has not been received or its sale has not been cancelled. If
646
+ * all the purchase order lines are marked as closed, the purchase order itself is
647
+ * marked as closed as well. You cannot change `isManuallyClosed` to `false` after
648
+ * the purchase order line has been fully received.
649
+ */
650
+ isManuallyClosed: boolean;
651
+
652
+ /**
653
+ * The item associated with this purchase order line. This can refer to any good or
654
+ * service that the business buys or sells, including item types such as a service
655
+ * item, inventory item, or special calculation item like a discount item or
656
+ * sales-tax item.
657
+ */
658
+ item: Line.Item | null;
659
+
660
+ /**
661
+ * The type of object. This value is always `"qbd_purchase_order_line"`.
662
+ */
663
+ objectType: 'qbd_purchase_order_line';
664
+
665
+ /**
666
+ * A built-in custom field for additional information specific to this purchase
667
+ * order line. Unlike the user-defined fields in the `customFields` array, this is
668
+ * a standard QuickBooks field that exists for all purchase order lines for
669
+ * convenience. Developers often use this field for tracking information that
670
+ * doesn't fit into other standard QuickBooks fields. Hidden by default in the
671
+ * QuickBooks UI.
672
+ */
673
+ otherCustomField1: string | null;
674
+
675
+ /**
676
+ * A second built-in custom field for additional information specific to this
677
+ * purchase order line. Unlike the user-defined fields in the `customFields` array,
678
+ * this is a standard QuickBooks field that exists for all purchase order lines for
679
+ * convenience. Like `otherCustomField1`, developers often use this field for
680
+ * tracking information that doesn't fit into other standard QuickBooks fields.
681
+ * Hidden by default in the QuickBooks UI.
682
+ */
683
+ otherCustomField2: string | null;
684
+
685
+ /**
686
+ * Specifies an alternative unit-of-measure set when updating this purchase order
687
+ * line's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
688
+ * select units from a different set than the item's default unit-of-measure set,
689
+ * which remains unchanged on the item itself. The override applies only to this
690
+ * specific line. For example, you can sell an item typically measured in volume
691
+ * units using weight units in a specific transaction by specifying a different
692
+ * unit-of-measure set with this field.
693
+ */
694
+ overrideUnitOfMeasureSet: Line.OverrideUnitOfMeasureSet | null;
695
+
696
+ /**
697
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
698
+ * expense's vendor (not the customer). If `account` refers to any other type of
699
+ * account, `payee` refers to the expense's customer (not the vendor).
700
+ */
701
+ payee: Line.Payee | null;
702
+
703
+ /**
704
+ * The quantity of the item associated with this purchase order line. This field
705
+ * cannot be cleared.
706
+ *
707
+ * **NOTE**: Do not use this field if the associated item is a discount item.
708
+ */
709
+ quantity: number | null;
710
+
711
+ /**
712
+ * The price per unit for this purchase order line. If both `rate` and `amount` are
713
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
714
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
715
+ * decimal string. This field cannot be cleared.
716
+ */
717
+ rate: string | null;
718
+
719
+ /**
720
+ * The quantity that has been received against this purchase order line.
721
+ */
722
+ receivedQuantity: number | null;
723
+
724
+ /**
725
+ * The sales-tax code for this purchase order line, determining whether it is
726
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
727
+ * the parent transaction or the associated item.
728
+ *
729
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
730
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
731
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
732
+ * non-taxable code to all sales.
733
+ */
734
+ salesTaxCode: Line.SalesTaxCode | null;
735
+
736
+ /**
737
+ * The date on which the service for this purchase order line was or will be
738
+ * performed, in ISO 8601 format (YYYY-MM-DD). This is particularly relevant for
739
+ * service items.
740
+ */
741
+ serviceDate: string | null;
742
+
743
+ /**
744
+ * The purchase order line's stock keeping unit (SKU), which is sometimes the
745
+ * manufacturer's part number.
746
+ */
747
+ sku: string | null;
748
+
749
+ /**
750
+ * The quantity that has not been billed for this purchase order line.
751
+ */
752
+ unbilledQuantity: number | null;
753
+
754
+ /**
755
+ * The unit-of-measure used for the `quantity` in this purchase order line. Must be
756
+ * a valid unit within the item's available units of measure.
757
+ */
758
+ unitOfMeasure: string | null;
759
+ }
760
+
761
+ export namespace Line {
762
+ /**
763
+ * The purchase order line's class. Classes can be used to categorize objects into
764
+ * meaningful segments, such as department, location, or type of work. In
765
+ * QuickBooks, class tracking is off by default. If a class is specified for the
766
+ * entire parent transaction, it is automatically applied to all purchase order
767
+ * lines unless overridden here, at the transaction line level.
768
+ */
769
+ export interface Class {
770
+ /**
771
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
772
+ * across all objects of the same type, but not across different QuickBooks object
773
+ * types.
774
+ */
775
+ id: string | null;
776
+
777
+ /**
778
+ * The fully-qualified unique name for this object, formed by combining the names
779
+ * of its parent objects with its own `name`, separated by colons. Not
780
+ * case-sensitive.
781
+ */
782
+ fullName: string | null;
783
+ }
784
+
785
+ export interface CustomField {
786
+ /**
787
+ * The name of the custom field, unique for the specified `ownerId`. For public
788
+ * custom fields, this name is visible as a label in the QuickBooks UI.
789
+ */
790
+ name: string;
791
+
792
+ /**
793
+ * The identifier of the owner of the custom field, which QuickBooks internally
794
+ * calls a "data extension". For public custom fields visible in the UI, such as
795
+ * those added by the QuickBooks user, this is always "0". For private custom
796
+ * fields that are only visible to the application that created them, this is a
797
+ * valid GUID identifying the owning application. Internally, Conductor always
798
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
799
+ * objects.
800
+ */
801
+ ownerId: string;
802
+
803
+ /**
804
+ * The data type of this custom field.
805
+ */
806
+ type:
807
+ | 'amount_type'
808
+ | 'date_time_type'
809
+ | 'integer_type'
810
+ | 'percent_type'
811
+ | 'price_type'
812
+ | 'quantity_type'
813
+ | 'string_1024_type'
814
+ | 'string_255_type';
815
+
816
+ /**
817
+ * The value of this custom field. The maximum length depends on the field's data
818
+ * type.
819
+ */
820
+ value: string;
821
+ }
822
+
823
+ /**
824
+ * The specific location (e.g., bin or shelf) within the inventory site where the
825
+ * item associated with this purchase order line is stored.
826
+ */
827
+ export interface InventorySiteLocation {
828
+ /**
829
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
830
+ * across all objects of the same type, but not across different QuickBooks object
831
+ * types.
832
+ */
833
+ id: string | null;
834
+
835
+ /**
836
+ * The fully-qualified unique name for this object, formed by combining the names
837
+ * of its parent objects with its own `name`, separated by colons. Not
838
+ * case-sensitive.
839
+ */
840
+ fullName: string | null;
841
+ }
842
+
843
+ /**
844
+ * The item associated with this purchase order line. This can refer to any good or
845
+ * service that the business buys or sells, including item types such as a service
846
+ * item, inventory item, or special calculation item like a discount item or
847
+ * sales-tax item.
848
+ */
849
+ export interface Item {
850
+ /**
851
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
852
+ * across all objects of the same type, but not across different QuickBooks object
853
+ * types.
854
+ */
855
+ id: string | null;
856
+
857
+ /**
858
+ * The fully-qualified unique name for this object, formed by combining the names
859
+ * of its parent objects with its own `name`, separated by colons. Not
860
+ * case-sensitive.
861
+ */
862
+ fullName: string | null;
863
+ }
864
+
865
+ /**
866
+ * Specifies an alternative unit-of-measure set when updating this purchase order
867
+ * line's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
868
+ * select units from a different set than the item's default unit-of-measure set,
869
+ * which remains unchanged on the item itself. The override applies only to this
870
+ * specific line. For example, you can sell an item typically measured in volume
871
+ * units using weight units in a specific transaction by specifying a different
872
+ * unit-of-measure set with this field.
873
+ */
874
+ export interface OverrideUnitOfMeasureSet {
875
+ /**
876
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
877
+ * across all objects of the same type, but not across different QuickBooks object
878
+ * types.
879
+ */
880
+ id: string | null;
881
+
882
+ /**
883
+ * The fully-qualified unique name for this object, formed by combining the names
884
+ * of its parent objects with its own `name`, separated by colons. Not
885
+ * case-sensitive.
886
+ */
887
+ fullName: string | null;
888
+ }
889
+
890
+ /**
891
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
892
+ * expense's vendor (not the customer). If `account` refers to any other type of
893
+ * account, `payee` refers to the expense's customer (not the vendor).
894
+ */
895
+ export interface Payee {
896
+ /**
897
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
898
+ * across all objects of the same type, but not across different QuickBooks object
899
+ * types.
900
+ */
901
+ id: string | null;
902
+
903
+ /**
904
+ * The fully-qualified unique name for this object, formed by combining the names
905
+ * of its parent objects with its own `name`, separated by colons. Not
906
+ * case-sensitive.
907
+ */
908
+ fullName: string | null;
909
+ }
910
+
911
+ /**
912
+ * The sales-tax code for this purchase order line, determining whether it is
913
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
914
+ * the parent transaction or the associated item.
915
+ *
916
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
917
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
918
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
919
+ * non-taxable code to all sales.
920
+ */
921
+ export interface SalesTaxCode {
922
+ /**
923
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
924
+ * across all objects of the same type, but not across different QuickBooks object
925
+ * types.
926
+ */
927
+ id: string | null;
928
+
929
+ /**
930
+ * The fully-qualified unique name for this object, formed by combining the names
931
+ * of its parent objects with its own `name`, separated by colons. Not
932
+ * case-sensitive.
933
+ */
934
+ fullName: string | null;
935
+ }
936
+ }
937
+
938
+ /**
939
+ * Specifies an alternative unit-of-measure set when updating this purchase order
940
+ * line group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows
941
+ * you to select units from a different set than the item's default unit-of-measure
942
+ * set, which remains unchanged on the item itself. The override applies only to
943
+ * this specific line. For example, you can sell an item typically measured in
944
+ * volume units using weight units in a specific transaction by specifying a
945
+ * different unit-of-measure set with this field.
946
+ */
947
+ export interface OverrideUnitOfMeasureSet {
948
+ /**
949
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
950
+ * across all objects of the same type, but not across different QuickBooks object
951
+ * types.
952
+ */
953
+ id: string | null;
954
+
955
+ /**
956
+ * The fully-qualified unique name for this object, formed by combining the names
957
+ * of its parent objects with its own `name`, separated by colons. Not
958
+ * case-sensitive.
959
+ */
960
+ fullName: string | null;
961
+ }
962
+ }
963
+
964
+ export interface Line {
965
+ /**
966
+ * The unique identifier assigned by QuickBooks to this purchase order line. This
967
+ * ID is unique across all transaction line types.
968
+ */
969
+ id: string;
970
+
971
+ /**
972
+ * The monetary amount of this purchase order line, represented as a decimal
973
+ * string. If both `quantity` and `rate` are specified but not `amount`, QuickBooks
974
+ * will use them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
975
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
976
+ * `1` and the suggested `rate`. This field cannot be cleared.
977
+ */
978
+ amount: string | null;
979
+
980
+ /**
981
+ * The purchase order line's class. Classes can be used to categorize objects into
982
+ * meaningful segments, such as department, location, or type of work. In
983
+ * QuickBooks, class tracking is off by default. If a class is specified for the
984
+ * entire parent transaction, it is automatically applied to all purchase order
985
+ * lines unless overridden here, at the transaction line level.
986
+ */
987
+ class: Line.Class | null;
988
+
989
+ /**
990
+ * The custom fields for the purchase order line object, added as user-defined data
991
+ * extensions, not included in the standard QuickBooks object.
992
+ */
993
+ customFields: Array<Line.CustomField>;
994
+
995
+ /**
996
+ * A description of this purchase order line.
997
+ */
998
+ description: string | null;
999
+
1000
+ /**
1001
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1002
+ * item associated with this purchase order line is stored.
1003
+ */
1004
+ inventorySiteLocation: Line.InventorySiteLocation | null;
1005
+
1006
+ /**
1007
+ * Indicates whether this purchase order line has been billed.
1008
+ */
1009
+ isBilled: boolean | null;
1010
+
1011
+ /**
1012
+ * Indicates whether this purchase order line has been manually marked as closed,
1013
+ * even if this item has not been received or its sale has not been cancelled. If
1014
+ * all the purchase order lines are marked as closed, the purchase order itself is
1015
+ * marked as closed as well. You cannot change `isManuallyClosed` to `false` after
1016
+ * the purchase order line has been fully received.
1017
+ */
1018
+ isManuallyClosed: boolean;
1019
+
1020
+ /**
1021
+ * The item associated with this purchase order line. This can refer to any good or
1022
+ * service that the business buys or sells, including item types such as a service
1023
+ * item, inventory item, or special calculation item like a discount item or
1024
+ * sales-tax item.
1025
+ */
1026
+ item: Line.Item | null;
1027
+
1028
+ /**
1029
+ * The type of object. This value is always `"qbd_purchase_order_line"`.
1030
+ */
1031
+ objectType: 'qbd_purchase_order_line';
1032
+
1033
+ /**
1034
+ * A built-in custom field for additional information specific to this purchase
1035
+ * order line. Unlike the user-defined fields in the `customFields` array, this is
1036
+ * a standard QuickBooks field that exists for all purchase order lines for
1037
+ * convenience. Developers often use this field for tracking information that
1038
+ * doesn't fit into other standard QuickBooks fields. Hidden by default in the
1039
+ * QuickBooks UI.
1040
+ */
1041
+ otherCustomField1: string | null;
1042
+
1043
+ /**
1044
+ * A second built-in custom field for additional information specific to this
1045
+ * purchase order line. Unlike the user-defined fields in the `customFields` array,
1046
+ * this is a standard QuickBooks field that exists for all purchase order lines for
1047
+ * convenience. Like `otherCustomField1`, developers often use this field for
1048
+ * tracking information that doesn't fit into other standard QuickBooks fields.
1049
+ * Hidden by default in the QuickBooks UI.
1050
+ */
1051
+ otherCustomField2: string | null;
1052
+
1053
+ /**
1054
+ * Specifies an alternative unit-of-measure set when updating this purchase order
1055
+ * line's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
1056
+ * select units from a different set than the item's default unit-of-measure set,
1057
+ * which remains unchanged on the item itself. The override applies only to this
1058
+ * specific line. For example, you can sell an item typically measured in volume
1059
+ * units using weight units in a specific transaction by specifying a different
1060
+ * unit-of-measure set with this field.
1061
+ */
1062
+ overrideUnitOfMeasureSet: Line.OverrideUnitOfMeasureSet | null;
1063
+
1064
+ /**
1065
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
1066
+ * expense's vendor (not the customer). If `account` refers to any other type of
1067
+ * account, `payee` refers to the expense's customer (not the vendor).
1068
+ */
1069
+ payee: Line.Payee | null;
1070
+
1071
+ /**
1072
+ * The quantity of the item associated with this purchase order line. This field
1073
+ * cannot be cleared.
1074
+ *
1075
+ * **NOTE**: Do not use this field if the associated item is a discount item.
1076
+ */
1077
+ quantity: number | null;
1078
+
1079
+ /**
1080
+ * The price per unit for this purchase order line. If both `rate` and `amount` are
1081
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
1082
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
1083
+ * decimal string. This field cannot be cleared.
1084
+ */
1085
+ rate: string | null;
1086
+
1087
+ /**
1088
+ * The quantity that has been received against this purchase order line.
1089
+ */
1090
+ receivedQuantity: number | null;
1091
+
1092
+ /**
1093
+ * The sales-tax code for this purchase order line, determining whether it is
1094
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
1095
+ * the parent transaction or the associated item.
1096
+ *
1097
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1098
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1099
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1100
+ * non-taxable code to all sales.
1101
+ */
1102
+ salesTaxCode: Line.SalesTaxCode | null;
1103
+
1104
+ /**
1105
+ * The date on which the service for this purchase order line was or will be
1106
+ * performed, in ISO 8601 format (YYYY-MM-DD). This is particularly relevant for
1107
+ * service items.
1108
+ */
1109
+ serviceDate: string | null;
1110
+
1111
+ /**
1112
+ * The purchase order line's stock keeping unit (SKU), which is sometimes the
1113
+ * manufacturer's part number.
1114
+ */
1115
+ sku: string | null;
1116
+
1117
+ /**
1118
+ * The quantity that has not been billed for this purchase order line.
1119
+ */
1120
+ unbilledQuantity: number | null;
1121
+
1122
+ /**
1123
+ * The unit-of-measure used for the `quantity` in this purchase order line. Must be
1124
+ * a valid unit within the item's available units of measure.
1125
+ */
1126
+ unitOfMeasure: string | null;
1127
+ }
1128
+
1129
+ export namespace Line {
1130
+ /**
1131
+ * The purchase order line's class. Classes can be used to categorize objects into
1132
+ * meaningful segments, such as department, location, or type of work. In
1133
+ * QuickBooks, class tracking is off by default. If a class is specified for the
1134
+ * entire parent transaction, it is automatically applied to all purchase order
1135
+ * lines unless overridden here, at the transaction line level.
1136
+ */
1137
+ export interface Class {
1138
+ /**
1139
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1140
+ * across all objects of the same type, but not across different QuickBooks object
1141
+ * types.
1142
+ */
1143
+ id: string | null;
1144
+
1145
+ /**
1146
+ * The fully-qualified unique name for this object, formed by combining the names
1147
+ * of its parent objects with its own `name`, separated by colons. Not
1148
+ * case-sensitive.
1149
+ */
1150
+ fullName: string | null;
1151
+ }
1152
+
1153
+ export interface CustomField {
1154
+ /**
1155
+ * The name of the custom field, unique for the specified `ownerId`. For public
1156
+ * custom fields, this name is visible as a label in the QuickBooks UI.
1157
+ */
1158
+ name: string;
1159
+
1160
+ /**
1161
+ * The identifier of the owner of the custom field, which QuickBooks internally
1162
+ * calls a "data extension". For public custom fields visible in the UI, such as
1163
+ * those added by the QuickBooks user, this is always "0". For private custom
1164
+ * fields that are only visible to the application that created them, this is a
1165
+ * valid GUID identifying the owning application. Internally, Conductor always
1166
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
1167
+ * objects.
1168
+ */
1169
+ ownerId: string;
1170
+
1171
+ /**
1172
+ * The data type of this custom field.
1173
+ */
1174
+ type:
1175
+ | 'amount_type'
1176
+ | 'date_time_type'
1177
+ | 'integer_type'
1178
+ | 'percent_type'
1179
+ | 'price_type'
1180
+ | 'quantity_type'
1181
+ | 'string_1024_type'
1182
+ | 'string_255_type';
1183
+
1184
+ /**
1185
+ * The value of this custom field. The maximum length depends on the field's data
1186
+ * type.
1187
+ */
1188
+ value: string;
1189
+ }
1190
+
1191
+ /**
1192
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1193
+ * item associated with this purchase order line is stored.
1194
+ */
1195
+ export interface InventorySiteLocation {
1196
+ /**
1197
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1198
+ * across all objects of the same type, but not across different QuickBooks object
1199
+ * types.
1200
+ */
1201
+ id: string | null;
1202
+
1203
+ /**
1204
+ * The fully-qualified unique name for this object, formed by combining the names
1205
+ * of its parent objects with its own `name`, separated by colons. Not
1206
+ * case-sensitive.
1207
+ */
1208
+ fullName: string | null;
1209
+ }
1210
+
1211
+ /**
1212
+ * The item associated with this purchase order line. This can refer to any good or
1213
+ * service that the business buys or sells, including item types such as a service
1214
+ * item, inventory item, or special calculation item like a discount item or
1215
+ * sales-tax item.
1216
+ */
1217
+ export interface Item {
1218
+ /**
1219
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1220
+ * across all objects of the same type, but not across different QuickBooks object
1221
+ * types.
1222
+ */
1223
+ id: string | null;
1224
+
1225
+ /**
1226
+ * The fully-qualified unique name for this object, formed by combining the names
1227
+ * of its parent objects with its own `name`, separated by colons. Not
1228
+ * case-sensitive.
1229
+ */
1230
+ fullName: string | null;
1231
+ }
1232
+
1233
+ /**
1234
+ * Specifies an alternative unit-of-measure set when updating this purchase order
1235
+ * line's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
1236
+ * select units from a different set than the item's default unit-of-measure set,
1237
+ * which remains unchanged on the item itself. The override applies only to this
1238
+ * specific line. For example, you can sell an item typically measured in volume
1239
+ * units using weight units in a specific transaction by specifying a different
1240
+ * unit-of-measure set with this field.
1241
+ */
1242
+ export interface OverrideUnitOfMeasureSet {
1243
+ /**
1244
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1245
+ * across all objects of the same type, but not across different QuickBooks object
1246
+ * types.
1247
+ */
1248
+ id: string | null;
1249
+
1250
+ /**
1251
+ * The fully-qualified unique name for this object, formed by combining the names
1252
+ * of its parent objects with its own `name`, separated by colons. Not
1253
+ * case-sensitive.
1254
+ */
1255
+ fullName: string | null;
1256
+ }
1257
+
1258
+ /**
1259
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
1260
+ * expense's vendor (not the customer). If `account` refers to any other type of
1261
+ * account, `payee` refers to the expense's customer (not the vendor).
1262
+ */
1263
+ export interface Payee {
1264
+ /**
1265
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1266
+ * across all objects of the same type, but not across different QuickBooks object
1267
+ * types.
1268
+ */
1269
+ id: string | null;
1270
+
1271
+ /**
1272
+ * The fully-qualified unique name for this object, formed by combining the names
1273
+ * of its parent objects with its own `name`, separated by colons. Not
1274
+ * case-sensitive.
1275
+ */
1276
+ fullName: string | null;
1277
+ }
1278
+
1279
+ /**
1280
+ * The sales-tax code for this purchase order line, determining whether it is
1281
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
1282
+ * the parent transaction or the associated item.
1283
+ *
1284
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1285
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1286
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1287
+ * non-taxable code to all sales.
1288
+ */
1289
+ export interface SalesTaxCode {
1290
+ /**
1291
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1292
+ * across all objects of the same type, but not across different QuickBooks object
1293
+ * types.
1294
+ */
1295
+ id: string | null;
1296
+
1297
+ /**
1298
+ * The fully-qualified unique name for this object, formed by combining the names
1299
+ * of its parent objects with its own `name`, separated by colons. Not
1300
+ * case-sensitive.
1301
+ */
1302
+ fullName: string | null;
1303
+ }
1304
+ }
1305
+
1306
+ export interface LinkedTransaction {
1307
+ /**
1308
+ * The unique identifier assigned by QuickBooks to this linked transaction. This ID
1309
+ * is unique across all transaction types.
1310
+ */
1311
+ id: string;
1312
+
1313
+ /**
1314
+ * The monetary amount of this linked transaction, represented as a decimal string.
1315
+ */
1316
+ amount: string | null;
1317
+
1318
+ /**
1319
+ * Indicates the nature of the link between the transactions: `amount` denotes an
1320
+ * amount-based link (e.g., an invoice linked to a payment), and `quantity` denotes
1321
+ * a quantity-based link (e.g., an invoice created from a sales order based on the
1322
+ * quantity of items received).
1323
+ */
1324
+ linkType: 'amount' | 'quantity' | null;
1325
+
1326
+ /**
1327
+ * The type of object. This value is always `"qbd_linked_transaction"`.
1328
+ */
1329
+ objectType: 'qbd_linked_transaction';
1330
+
1331
+ /**
1332
+ * The case-sensitive user-defined reference number for this linked transaction,
1333
+ * which can be used to identify the transaction in QuickBooks. This value is not
1334
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
1335
+ */
1336
+ refNumber: string | null;
1337
+
1338
+ /**
1339
+ * The date of this linked transaction, in ISO 8601 format (YYYY-MM-DD).
1340
+ */
1341
+ transactionDate: string;
1342
+
1343
+ /**
1344
+ * The type of transaction for this linked transaction.
1345
+ */
1346
+ transactionType:
1347
+ | 'ar_refund_credit_card'
1348
+ | 'bill'
1349
+ | 'bill_payment_check'
1350
+ | 'bill_payment_credit_card'
1351
+ | 'build_assembly'
1352
+ | 'charge'
1353
+ | 'check'
1354
+ | 'credit_card_charge'
1355
+ | 'credit_card_credit'
1356
+ | 'credit_memo'
1357
+ | 'deposit'
1358
+ | 'estimate'
1359
+ | 'inventory_adjustment'
1360
+ | 'invoice'
1361
+ | 'item_receipt'
1362
+ | 'journal_entry'
1363
+ | 'liability_adjustment'
1364
+ | 'paycheck'
1365
+ | 'payroll_liability_check'
1366
+ | 'purchase_order'
1367
+ | 'receive_payment'
1368
+ | 'sales_order'
1369
+ | 'sales_receipt'
1370
+ | 'sales_tax_payment_check'
1371
+ | 'transfer'
1372
+ | 'vendor_credit'
1373
+ | 'ytd_adjustment';
1374
+ }
1375
+
1376
+ /**
1377
+ * The sales-tax code for this purchase order, determining whether it is taxable or
1378
+ * non-taxable. If set, this overrides any sales-tax codes defined on the vendor.
1379
+ * This can be overridden on the purchase order's individual lines.
1380
+ *
1381
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1382
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1383
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1384
+ * non-taxable code to all sales.
1385
+ */
1386
+ export interface SalesTaxCode {
1387
+ /**
1388
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1389
+ * across all objects of the same type, but not across different QuickBooks object
1390
+ * types.
1391
+ */
1392
+ id: string | null;
1393
+
1394
+ /**
1395
+ * The fully-qualified unique name for this object, formed by combining the names
1396
+ * of its parent objects with its own `name`, separated by colons. Not
1397
+ * case-sensitive.
1398
+ */
1399
+ fullName: string | null;
1400
+ }
1401
+
1402
+ /**
1403
+ * The purchase order's shipping address.
1404
+ */
1405
+ export interface ShippingAddress {
1406
+ /**
1407
+ * The city, district, suburb, town, or village name of the address.
1408
+ */
1409
+ city: string | null;
1410
+
1411
+ /**
1412
+ * The country name of the address.
1413
+ */
1414
+ country: string | null;
1415
+
1416
+ /**
1417
+ * The first line of the address (e.g., street, PO Box, or company name).
1418
+ */
1419
+ line1: string | null;
1420
+
1421
+ /**
1422
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
1423
+ * building).
1424
+ */
1425
+ line2: string | null;
1426
+
1427
+ /**
1428
+ * The third line of the address, if needed.
1429
+ */
1430
+ line3: string | null;
1431
+
1432
+ /**
1433
+ * The fourth line of the address, if needed.
1434
+ */
1435
+ line4: string | null;
1436
+
1437
+ /**
1438
+ * The fifth line of the address, if needed.
1439
+ */
1440
+ line5: string | null;
1441
+
1442
+ /**
1443
+ * A note written at the bottom of the address in the form in which it appears,
1444
+ * such as the invoice form.
1445
+ */
1446
+ note: string | null;
1447
+
1448
+ /**
1449
+ * The postal code or ZIP code of the address.
1450
+ */
1451
+ postalCode: string | null;
1452
+
1453
+ /**
1454
+ * The state, county, province, or region name of the address.
1455
+ */
1456
+ state: string | null;
1457
+ }
1458
+
1459
+ /**
1460
+ * The shipping method used for this purchase order, such as standard mail or
1461
+ * overnight delivery.
1462
+ */
1463
+ export interface ShippingMethod {
1464
+ /**
1465
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1466
+ * across all objects of the same type, but not across different QuickBooks object
1467
+ * types.
1468
+ */
1469
+ id: string | null;
1470
+
1471
+ /**
1472
+ * The fully-qualified unique name for this object, formed by combining the names
1473
+ * of its parent objects with its own `name`, separated by colons. Not
1474
+ * case-sensitive.
1475
+ */
1476
+ fullName: string | null;
1477
+ }
1478
+
1479
+ /**
1480
+ * The customer, vendor, employee, or other entity to whom this purchase order is
1481
+ * to be shipped.
1482
+ */
1483
+ export interface ShipToEntity {
1484
+ /**
1485
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1486
+ * across all objects of the same type, but not across different QuickBooks object
1487
+ * types.
1488
+ */
1489
+ id: string | null;
1490
+
1491
+ /**
1492
+ * The fully-qualified unique name for this object, formed by combining the names
1493
+ * of its parent objects with its own `name`, separated by colons. Not
1494
+ * case-sensitive.
1495
+ */
1496
+ fullName: string | null;
1497
+ }
1498
+
1499
+ /**
1500
+ * The purchase order's payment terms, defining when payment is due and any
1501
+ * applicable discounts.
1502
+ */
1503
+ export interface Terms {
1504
+ /**
1505
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1506
+ * across all objects of the same type, but not across different QuickBooks object
1507
+ * types.
1508
+ */
1509
+ id: string | null;
1510
+
1511
+ /**
1512
+ * The fully-qualified unique name for this object, formed by combining the names
1513
+ * of its parent objects with its own `name`, separated by colons. Not
1514
+ * case-sensitive.
1515
+ */
1516
+ fullName: string | null;
1517
+ }
1518
+
1519
+ /**
1520
+ * The vendor who sent this purchase order for goods or services purchased.
1521
+ */
1522
+ export interface Vendor {
1523
+ /**
1524
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
1525
+ * across all objects of the same type, but not across different QuickBooks object
1526
+ * types.
1527
+ */
1528
+ id: string | null;
1529
+
1530
+ /**
1531
+ * The fully-qualified unique name for this object, formed by combining the names
1532
+ * of its parent objects with its own `name`, separated by colons. Not
1533
+ * case-sensitive.
1534
+ */
1535
+ fullName: string | null;
1536
+ }
1537
+
1538
+ /**
1539
+ * The address of the vendor who sent this purchase order.
1540
+ */
1541
+ export interface VendorAddress {
1542
+ /**
1543
+ * The city, district, suburb, town, or village name of the address.
1544
+ */
1545
+ city: string | null;
1546
+
1547
+ /**
1548
+ * The country name of the address.
1549
+ */
1550
+ country: string | null;
1551
+
1552
+ /**
1553
+ * The first line of the address (e.g., street, PO Box, or company name).
1554
+ */
1555
+ line1: string | null;
1556
+
1557
+ /**
1558
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
1559
+ * building).
1560
+ */
1561
+ line2: string | null;
1562
+
1563
+ /**
1564
+ * The third line of the address, if needed.
1565
+ */
1566
+ line3: string | null;
1567
+
1568
+ /**
1569
+ * The fourth line of the address, if needed.
1570
+ */
1571
+ line4: string | null;
1572
+
1573
+ /**
1574
+ * The fifth line of the address, if needed.
1575
+ */
1576
+ line5: string | null;
1577
+
1578
+ /**
1579
+ * A note written at the bottom of the address in the form in which it appears,
1580
+ * such as the invoice form.
1581
+ */
1582
+ note: string | null;
1583
+
1584
+ /**
1585
+ * The postal code or ZIP code of the address.
1586
+ */
1587
+ postalCode: string | null;
1588
+
1589
+ /**
1590
+ * The state, county, province, or region name of the address.
1591
+ */
1592
+ state: string | null;
1593
+ }
1594
+ }
1595
+
1596
+ export interface PurchaseOrderDeleteResponse {
1597
+ /**
1598
+ * The QuickBooks-assigned unique identifier of the deleted purchase order.
1599
+ */
1600
+ id: string;
1601
+
1602
+ /**
1603
+ * Indicates whether the purchase order was deleted.
1604
+ */
1605
+ deleted: boolean;
1606
+
1607
+ /**
1608
+ * The type of object. This value is always `"qbd_purchase_order"`.
1609
+ */
1610
+ objectType: 'qbd_purchase_order';
1611
+
1612
+ /**
1613
+ * The case-sensitive user-defined reference number of the deleted purchase order.
1614
+ */
1615
+ refNumber: string | null;
1616
+ }
1617
+
1618
+ export interface PurchaseOrderCreateParams {
1619
+ /**
1620
+ * Body param: The date of this purchase order, in ISO 8601 format (YYYY-MM-DD).
1621
+ */
1622
+ transactionDate: string;
1623
+
1624
+ /**
1625
+ * Header param: The ID of the EndUser to receive this request (e.g.,
1626
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
1627
+ */
1628
+ conductorEndUserId: string;
1629
+
1630
+ /**
1631
+ * Body param: The purchase order's class. Classes can be used to categorize
1632
+ * objects into meaningful segments, such as department, location, or type of work.
1633
+ * In QuickBooks, class tracking is off by default. A class defined here is
1634
+ * automatically used in this purchase order's line items unless overridden at the
1635
+ * line item level.
1636
+ */
1637
+ classId?: string;
1638
+
1639
+ /**
1640
+ * Body param: The predefined template in QuickBooks that determines the layout and
1641
+ * formatting for this purchase order when printed or displayed.
1642
+ */
1643
+ documentTemplateId?: string;
1644
+
1645
+ /**
1646
+ * Body param: The date by which this purchase order must be paid, in ISO 8601
1647
+ * format (YYYY-MM-DD).
1648
+ */
1649
+ dueDate?: string;
1650
+
1651
+ /**
1652
+ * Body param: The market exchange rate between this purchase order's currency and
1653
+ * the home currency in QuickBooks at the time of this transaction. Represented as
1654
+ * a decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home
1655
+ * currency).
1656
+ */
1657
+ exchangeRate?: number;
1658
+
1659
+ /**
1660
+ * Body param: The date on which shipment of this purchase order is expected to be
1661
+ * completed, in ISO 8601 format (YYYY-MM-DD).
1662
+ */
1663
+ expectedDate?: string;
1664
+
1665
+ /**
1666
+ * Body param: A globally unique identifier (GUID) you, the developer, can provide
1667
+ * for tracking this object in your external system. This field is immutable and
1668
+ * can only be set during object creation.
1669
+ *
1670
+ * **IMPORTANT**: This field must be formatted as a valid GUID; otherwise,
1671
+ * QuickBooks will return an error.
1672
+ */
1673
+ externalId?: string;
1674
+
1675
+ /**
1676
+ * Body param: The site location where inventory for the item associated with this
1677
+ * purchase order is stored.
1678
+ */
1679
+ inventorySiteId?: string;
1680
+
1681
+ /**
1682
+ * Body param: Indicates whether this purchase order is included in the queue of
1683
+ * documents for QuickBooks to email to the customer.
1684
+ */
1685
+ isQueuedForEmail?: boolean;
1686
+
1687
+ /**
1688
+ * Body param: Indicates whether this purchase order is included in the queue of
1689
+ * documents for QuickBooks to print.
1690
+ */
1691
+ isQueuedForPrint?: boolean;
1692
+
1693
+ /**
1694
+ * Body param: The purchase order's line item groups, each representing a
1695
+ * predefined set of related items.
1696
+ *
1697
+ * **IMPORTANT**: You must specify `lines`, `lineGroups`, or both when creating a
1698
+ * purchase order.
1699
+ */
1700
+ lineGroups?: Array<PurchaseOrderCreateParams.LineGroup>;
1701
+
1702
+ /**
1703
+ * Body param: The purchase order's line items, each representing a single product
1704
+ * or service ordered.
1705
+ *
1706
+ * **IMPORTANT**: You must specify `lines`, `lineGroups`, or both when creating a
1707
+ * purchase order.
1708
+ */
1709
+ lines?: Array<PurchaseOrderCreateParams.Line>;
1710
+
1711
+ /**
1712
+ * Body param: A memo or note for this purchase order that appears in reports, but
1713
+ * not on the purchase order.
1714
+ */
1715
+ memo?: string;
1716
+
1717
+ /**
1718
+ * Body param: A built-in custom field for additional information specific to this
1719
+ * purchase order. Unlike the user-defined fields in the `customFields` array, this
1720
+ * is a standard QuickBooks field that exists for all purchase orders for
1721
+ * convenience. Developers often use this field for tracking information that
1722
+ * doesn't fit into other standard QuickBooks fields. Hidden by default in the
1723
+ * QuickBooks UI.
1724
+ */
1725
+ otherCustomField1?: string;
1726
+
1727
+ /**
1728
+ * Body param: A second built-in custom field for additional information specific
1729
+ * to this purchase order. Unlike the user-defined fields in the `customFields`
1730
+ * array, this is a standard QuickBooks field that exists for all purchase orders
1731
+ * for convenience. Like `otherCustomField1`, developers often use this field for
1732
+ * tracking information that doesn't fit into other standard QuickBooks fields.
1733
+ * Hidden by default in the QuickBooks UI.
1734
+ */
1735
+ otherCustomField2?: string;
1736
+
1737
+ /**
1738
+ * Body param: The case-sensitive user-defined reference number for this purchase
1739
+ * order, which can be used to identify the transaction in QuickBooks. This value
1740
+ * is not required to be unique and can be arbitrarily changed by the QuickBooks
1741
+ * user. When left blank in this create request, this field will be left blank in
1742
+ * QuickBooks (i.e., it does _not_ auto-increment).
1743
+ */
1744
+ refNumber?: string;
1745
+
1746
+ /**
1747
+ * Body param: The sales-tax code for this purchase order, determining whether it
1748
+ * is taxable or non-taxable. If set, this overrides any sales-tax codes defined on
1749
+ * the vendor. This can be overridden on the purchase order's individual lines.
1750
+ *
1751
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1752
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1753
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1754
+ * non-taxable code to all sales.
1755
+ */
1756
+ salesTaxCodeId?: string;
1757
+
1758
+ /**
1759
+ * Body param: The origin location from where the product associated with this
1760
+ * purchase order is shipped. This is the point at which ownership and liability
1761
+ * for goods transfer from seller to buyer. Internally, QuickBooks uses the term
1762
+ * "FOB" for this field, which stands for "freight on board". This field is
1763
+ * informational and has no accounting implications.
1764
+ */
1765
+ shipmentOrigin?: string;
1766
+
1767
+ /**
1768
+ * Body param: The purchase order's shipping address.
1769
+ */
1770
+ shippingAddress?: PurchaseOrderCreateParams.ShippingAddress;
1771
+
1772
+ /**
1773
+ * Body param: The shipping method used for this purchase order, such as standard
1774
+ * mail or overnight delivery.
1775
+ */
1776
+ shippingMethodId?: string;
1777
+
1778
+ /**
1779
+ * Body param: The customer, vendor, employee, or other entity to whom this
1780
+ * purchase order is to be shipped.
1781
+ */
1782
+ shipToEntityId?: string;
1783
+
1784
+ /**
1785
+ * Body param: The purchase order's payment terms, defining when payment is due and
1786
+ * any applicable discounts.
1787
+ */
1788
+ termsId?: string;
1789
+
1790
+ /**
1791
+ * Body param: The address of the vendor who sent this purchase order.
1792
+ */
1793
+ vendorAddress?: PurchaseOrderCreateParams.VendorAddress;
1794
+
1795
+ /**
1796
+ * Body param: The vendor who sent this purchase order for goods or services
1797
+ * purchased.
1798
+ */
1799
+ vendorId?: string;
1800
+
1801
+ /**
1802
+ * Body param: A message to be printed on this purchase order for the vendor to
1803
+ * read.
1804
+ */
1805
+ vendorMessage?: string;
1806
+ }
1807
+
1808
+ export namespace PurchaseOrderCreateParams {
1809
+ export interface LineGroup {
1810
+ /**
1811
+ * The purchase order line group's item group, representing a predefined set of
1812
+ * items bundled because they are commonly purchased together or grouped for faster
1813
+ * entry.
1814
+ */
1815
+ itemGroupId: string;
1816
+
1817
+ /**
1818
+ * The custom fields for the purchase order line group object, added as
1819
+ * user-defined data extensions, not included in the standard QuickBooks object.
1820
+ */
1821
+ customFields?: Array<LineGroup.CustomField>;
1822
+
1823
+ /**
1824
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1825
+ * item group associated with this purchase order line group is stored.
1826
+ */
1827
+ inventorySiteLocationId?: string;
1828
+
1829
+ /**
1830
+ * The quantity of the item group associated with this purchase order line group.
1831
+ * This field cannot be cleared.
1832
+ *
1833
+ * **NOTE**: Do not use this field if the associated item group is a discount item
1834
+ * group.
1835
+ */
1836
+ quantity?: number;
1837
+
1838
+ /**
1839
+ * The unit-of-measure used for the `quantity` in this purchase order line group.
1840
+ * Must be a valid unit within the item's available units of measure.
1841
+ */
1842
+ unitOfMeasure?: string;
1843
+ }
1844
+
1845
+ export namespace LineGroup {
1846
+ export interface CustomField {
1847
+ /**
1848
+ * The name of the custom field, unique for the specified `ownerId`. For public
1849
+ * custom fields, this name is visible as a label in the QuickBooks UI.
1850
+ */
1851
+ name: string;
1852
+
1853
+ /**
1854
+ * The identifier of the owner of the custom field, which QuickBooks internally
1855
+ * calls a "data extension". For public custom fields visible in the UI, such as
1856
+ * those added by the QuickBooks user, this is always "0". For private custom
1857
+ * fields that are only visible to the application that created them, this is a
1858
+ * valid GUID identifying the owning application. Internally, Conductor always
1859
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
1860
+ * objects.
1861
+ */
1862
+ ownerId: string;
1863
+
1864
+ /**
1865
+ * The value of this custom field. The maximum length depends on the field's data
1866
+ * type.
1867
+ */
1868
+ value: string;
1869
+ }
1870
+ }
1871
+
1872
+ export interface Line {
1873
+ /**
1874
+ * The monetary amount of this purchase order line, represented as a decimal
1875
+ * string. If both `quantity` and `rate` are specified but not `amount`, QuickBooks
1876
+ * will use them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
1877
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
1878
+ * `1` and the suggested `rate`. This field cannot be cleared.
1879
+ */
1880
+ amount?: string;
1881
+
1882
+ /**
1883
+ * The purchase order line's class. Classes can be used to categorize objects into
1884
+ * meaningful segments, such as department, location, or type of work. In
1885
+ * QuickBooks, class tracking is off by default. If a class is specified for the
1886
+ * entire parent transaction, it is automatically applied to all purchase order
1887
+ * lines unless overridden here, at the transaction line level.
1888
+ */
1889
+ classId?: string;
1890
+
1891
+ /**
1892
+ * The custom fields for the purchase order line object, added as user-defined data
1893
+ * extensions, not included in the standard QuickBooks object.
1894
+ */
1895
+ customFields?: Array<Line.CustomField>;
1896
+
1897
+ /**
1898
+ * A description of this purchase order line.
1899
+ */
1900
+ description?: string;
1901
+
1902
+ /**
1903
+ * The specific location (e.g., bin or shelf) within the inventory site where the
1904
+ * item associated with this purchase order line is stored.
1905
+ */
1906
+ inventorySiteLocationId?: string;
1907
+
1908
+ /**
1909
+ * The item associated with this purchase order line. This can refer to any good or
1910
+ * service that the business buys or sells, including item types such as a service
1911
+ * item, inventory item, or special calculation item like a discount item or
1912
+ * sales-tax item.
1913
+ */
1914
+ itemId?: string;
1915
+
1916
+ /**
1917
+ * A built-in custom field for additional information specific to this purchase
1918
+ * order line. Unlike the user-defined fields in the `customFields` array, this is
1919
+ * a standard QuickBooks field that exists for all purchase order lines for
1920
+ * convenience. Developers often use this field for tracking information that
1921
+ * doesn't fit into other standard QuickBooks fields. Hidden by default in the
1922
+ * QuickBooks UI.
1923
+ */
1924
+ otherCustomField1?: string;
1925
+
1926
+ /**
1927
+ * A second built-in custom field for additional information specific to this
1928
+ * purchase order line. Unlike the user-defined fields in the `customFields` array,
1929
+ * this is a standard QuickBooks field that exists for all purchase order lines for
1930
+ * convenience. Like `otherCustomField1`, developers often use this field for
1931
+ * tracking information that doesn't fit into other standard QuickBooks fields.
1932
+ * Hidden by default in the QuickBooks UI.
1933
+ */
1934
+ otherCustomField2?: string;
1935
+
1936
+ /**
1937
+ * The account to use for this purchase order line, overriding the default account
1938
+ * associated with the item.
1939
+ */
1940
+ overrideItemAccountId?: string;
1941
+
1942
+ /**
1943
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
1944
+ * expense's vendor (not the customer). If `account` refers to any other type of
1945
+ * account, `payee` refers to the expense's customer (not the vendor).
1946
+ */
1947
+ payeeId?: string;
1948
+
1949
+ /**
1950
+ * The quantity of the item associated with this purchase order line. This field
1951
+ * cannot be cleared.
1952
+ *
1953
+ * **NOTE**: Do not use this field if the associated item is a discount item.
1954
+ */
1955
+ quantity?: number;
1956
+
1957
+ /**
1958
+ * The price per unit for this purchase order line. If both `rate` and `amount` are
1959
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
1960
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
1961
+ * decimal string. This field cannot be cleared.
1962
+ */
1963
+ rate?: string;
1964
+
1965
+ /**
1966
+ * The sales-tax code for this purchase order line, determining whether it is
1967
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
1968
+ * the parent transaction or the associated item.
1969
+ *
1970
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
1971
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
1972
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
1973
+ * non-taxable code to all sales.
1974
+ */
1975
+ salesTaxCodeId?: string;
1976
+
1977
+ /**
1978
+ * The date on which the service for this purchase order line was or will be
1979
+ * performed, in ISO 8601 format (YYYY-MM-DD). This is particularly relevant for
1980
+ * service items.
1981
+ */
1982
+ serviceDate?: string;
1983
+
1984
+ /**
1985
+ * The purchase order line's stock keeping unit (SKU), which is sometimes the
1986
+ * manufacturer's part number.
1987
+ */
1988
+ sku?: string;
1989
+
1990
+ /**
1991
+ * The unit-of-measure used for the `quantity` in this purchase order line. Must be
1992
+ * a valid unit within the item's available units of measure.
1993
+ */
1994
+ unitOfMeasure?: string;
1995
+ }
1996
+
1997
+ export namespace Line {
1998
+ export interface CustomField {
1999
+ /**
2000
+ * The name of the custom field, unique for the specified `ownerId`. For public
2001
+ * custom fields, this name is visible as a label in the QuickBooks UI.
2002
+ */
2003
+ name: string;
2004
+
2005
+ /**
2006
+ * The identifier of the owner of the custom field, which QuickBooks internally
2007
+ * calls a "data extension". For public custom fields visible in the UI, such as
2008
+ * those added by the QuickBooks user, this is always "0". For private custom
2009
+ * fields that are only visible to the application that created them, this is a
2010
+ * valid GUID identifying the owning application. Internally, Conductor always
2011
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
2012
+ * objects.
2013
+ */
2014
+ ownerId: string;
2015
+
2016
+ /**
2017
+ * The value of this custom field. The maximum length depends on the field's data
2018
+ * type.
2019
+ */
2020
+ value: string;
2021
+ }
2022
+ }
2023
+
2024
+ /**
2025
+ * The purchase order's shipping address.
2026
+ */
2027
+ export interface ShippingAddress {
2028
+ /**
2029
+ * The city, district, suburb, town, or village name of the address.
2030
+ *
2031
+ * Maximum length: 31 characters.
2032
+ */
2033
+ city?: string;
2034
+
2035
+ /**
2036
+ * The country name of the address.
2037
+ */
2038
+ country?: string;
2039
+
2040
+ /**
2041
+ * The first line of the address (e.g., street, PO Box, or company name).
2042
+ *
2043
+ * Maximum length: 41 characters.
2044
+ */
2045
+ line1?: string;
2046
+
2047
+ /**
2048
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
2049
+ * building).
2050
+ *
2051
+ * Maximum length: 41 characters.
2052
+ */
2053
+ line2?: string;
2054
+
2055
+ /**
2056
+ * The third line of the address, if needed.
2057
+ *
2058
+ * Maximum length: 41 characters.
2059
+ */
2060
+ line3?: string;
2061
+
2062
+ /**
2063
+ * The fourth line of the address, if needed.
2064
+ *
2065
+ * Maximum length: 41 characters.
2066
+ */
2067
+ line4?: string;
2068
+
2069
+ /**
2070
+ * The fifth line of the address, if needed.
2071
+ *
2072
+ * Maximum length: 41 characters.
2073
+ */
2074
+ line5?: string;
2075
+
2076
+ /**
2077
+ * A note written at the bottom of the address in the form in which it appears,
2078
+ * such as the invoice form.
2079
+ */
2080
+ note?: string;
2081
+
2082
+ /**
2083
+ * The postal code or ZIP code of the address.
2084
+ *
2085
+ * Maximum length: 13 characters.
2086
+ */
2087
+ postalCode?: string;
2088
+
2089
+ /**
2090
+ * The state, county, province, or region name of the address.
2091
+ *
2092
+ * Maximum length: 21 characters.
2093
+ */
2094
+ state?: string;
2095
+ }
2096
+
2097
+ /**
2098
+ * The address of the vendor who sent this purchase order.
2099
+ */
2100
+ export interface VendorAddress {
2101
+ /**
2102
+ * The city, district, suburb, town, or village name of the address.
2103
+ *
2104
+ * Maximum length: 31 characters.
2105
+ */
2106
+ city?: string;
2107
+
2108
+ /**
2109
+ * The country name of the address.
2110
+ */
2111
+ country?: string;
2112
+
2113
+ /**
2114
+ * The first line of the address (e.g., street, PO Box, or company name).
2115
+ *
2116
+ * Maximum length: 41 characters.
2117
+ */
2118
+ line1?: string;
2119
+
2120
+ /**
2121
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
2122
+ * building).
2123
+ *
2124
+ * Maximum length: 41 characters.
2125
+ */
2126
+ line2?: string;
2127
+
2128
+ /**
2129
+ * The third line of the address, if needed.
2130
+ *
2131
+ * Maximum length: 41 characters.
2132
+ */
2133
+ line3?: string;
2134
+
2135
+ /**
2136
+ * The fourth line of the address, if needed.
2137
+ *
2138
+ * Maximum length: 41 characters.
2139
+ */
2140
+ line4?: string;
2141
+
2142
+ /**
2143
+ * The fifth line of the address, if needed.
2144
+ *
2145
+ * Maximum length: 41 characters.
2146
+ */
2147
+ line5?: string;
2148
+
2149
+ /**
2150
+ * A note written at the bottom of the address in the form in which it appears,
2151
+ * such as the invoice form.
2152
+ */
2153
+ note?: string;
2154
+
2155
+ /**
2156
+ * The postal code or ZIP code of the address.
2157
+ *
2158
+ * Maximum length: 13 characters.
2159
+ */
2160
+ postalCode?: string;
2161
+
2162
+ /**
2163
+ * The state, county, province, or region name of the address.
2164
+ *
2165
+ * Maximum length: 21 characters.
2166
+ */
2167
+ state?: string;
2168
+ }
2169
+ }
2170
+
2171
+ export interface PurchaseOrderRetrieveParams {
2172
+ /**
2173
+ * The ID of the EndUser to receive this request (e.g.,
2174
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2175
+ */
2176
+ conductorEndUserId: string;
2177
+ }
2178
+
2179
+ export interface PurchaseOrderUpdateParams {
2180
+ /**
2181
+ * Body param: The current QuickBooks-assigned revision number of the purchase
2182
+ * order object you are updating, which you can get by fetching the object first.
2183
+ * Provide the most recent `revisionNumber` to ensure you're working with the
2184
+ * latest data; otherwise, the update will return an error.
2185
+ */
2186
+ revisionNumber: string;
2187
+
2188
+ /**
2189
+ * Header param: The ID of the EndUser to receive this request (e.g.,
2190
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2191
+ */
2192
+ conductorEndUserId: string;
2193
+
2194
+ /**
2195
+ * Body param: The purchase order's class. Classes can be used to categorize
2196
+ * objects into meaningful segments, such as department, location, or type of work.
2197
+ * In QuickBooks, class tracking is off by default. A class defined here is
2198
+ * automatically used in this purchase order's line items unless overridden at the
2199
+ * line item level.
2200
+ */
2201
+ classId?: string;
2202
+
2203
+ /**
2204
+ * Body param: The predefined template in QuickBooks that determines the layout and
2205
+ * formatting for this purchase order when printed or displayed.
2206
+ */
2207
+ documentTemplateId?: string;
2208
+
2209
+ /**
2210
+ * Body param: The date by which this purchase order must be paid, in ISO 8601
2211
+ * format (YYYY-MM-DD).
2212
+ */
2213
+ dueDate?: string;
2214
+
2215
+ /**
2216
+ * Body param: The market exchange rate between this purchase order's currency and
2217
+ * the home currency in QuickBooks at the time of this transaction. Represented as
2218
+ * a decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home
2219
+ * currency).
2220
+ */
2221
+ exchangeRate?: number;
2222
+
2223
+ /**
2224
+ * Body param: The date on which shipment of this purchase order is expected to be
2225
+ * completed, in ISO 8601 format (YYYY-MM-DD).
2226
+ */
2227
+ expectedDate?: string;
2228
+
2229
+ /**
2230
+ * Body param: The site location where inventory for the item associated with this
2231
+ * purchase order is stored.
2232
+ */
2233
+ inventorySiteId?: string;
2234
+
2235
+ /**
2236
+ * Body param: Indicates whether this purchase order has been manually marked as
2237
+ * closed, even if all items have not been received or the sale has not been
2238
+ * cancelled. Once the purchase order is marked as closed, all of its line items
2239
+ * become closed as well. You cannot change `isManuallyClosed` to `false` after the
2240
+ * purchase order has been fully received.
2241
+ */
2242
+ isManuallyClosed?: boolean;
2243
+
2244
+ /**
2245
+ * Body param: Indicates whether this purchase order is included in the queue of
2246
+ * documents for QuickBooks to email to the customer.
2247
+ */
2248
+ isQueuedForEmail?: boolean;
2249
+
2250
+ /**
2251
+ * Body param: Indicates whether this purchase order is included in the queue of
2252
+ * documents for QuickBooks to print.
2253
+ */
2254
+ isQueuedForPrint?: boolean;
2255
+
2256
+ /**
2257
+ * Body param: The purchase order's line item groups, each representing a
2258
+ * predefined set of related items.
2259
+ *
2260
+ * **IMPORTANT**:
2261
+ *
2262
+ * 1. Including this array in your update request will **REPLACE** all existing
2263
+ * line item groups for the purchase order with this array. To keep any existing
2264
+ * line item groups, you must include them in this array even if they have not
2265
+ * changed. **Any line item groups not included will be removed.**
2266
+ *
2267
+ * 2. To add a new line item group, include it here with the `id` field set to
2268
+ * `-1`.
2269
+ *
2270
+ * 3. If you do not wish to modify any line item groups, omit this field entirely
2271
+ * to keep them unchanged.
2272
+ */
2273
+ lineGroups?: Array<PurchaseOrderUpdateParams.LineGroup>;
2274
+
2275
+ /**
2276
+ * Body param: The purchase order's line items, each representing a single product
2277
+ * or service ordered.
2278
+ *
2279
+ * **IMPORTANT**:
2280
+ *
2281
+ * 1. Including this array in your update request will **REPLACE** all existing
2282
+ * line items for the purchase order with this array. To keep any existing line
2283
+ * items, you must include them in this array even if they have not changed.
2284
+ * **Any line items not included will be removed.**
2285
+ *
2286
+ * 2. To add a new line item, include it here with the `id` field set to `-1`.
2287
+ *
2288
+ * 3. If you do not wish to modify any line items, omit this field entirely to keep
2289
+ * them unchanged.
2290
+ */
2291
+ lines?: Array<PurchaseOrderUpdateParams.Line>;
2292
+
2293
+ /**
2294
+ * Body param: A memo or note for this purchase order that appears in reports, but
2295
+ * not on the purchase order.
2296
+ */
2297
+ memo?: string;
2298
+
2299
+ /**
2300
+ * Body param: A built-in custom field for additional information specific to this
2301
+ * purchase order. Unlike the user-defined fields in the `customFields` array, this
2302
+ * is a standard QuickBooks field that exists for all purchase orders for
2303
+ * convenience. Developers often use this field for tracking information that
2304
+ * doesn't fit into other standard QuickBooks fields. Hidden by default in the
2305
+ * QuickBooks UI.
2306
+ */
2307
+ otherCustomField1?: string;
2308
+
2309
+ /**
2310
+ * Body param: A second built-in custom field for additional information specific
2311
+ * to this purchase order. Unlike the user-defined fields in the `customFields`
2312
+ * array, this is a standard QuickBooks field that exists for all purchase orders
2313
+ * for convenience. Like `otherCustomField1`, developers often use this field for
2314
+ * tracking information that doesn't fit into other standard QuickBooks fields.
2315
+ * Hidden by default in the QuickBooks UI.
2316
+ */
2317
+ otherCustomField2?: string;
2318
+
2319
+ /**
2320
+ * Body param: The case-sensitive user-defined reference number for this purchase
2321
+ * order, which can be used to identify the transaction in QuickBooks. This value
2322
+ * is not required to be unique and can be arbitrarily changed by the QuickBooks
2323
+ * user.
2324
+ */
2325
+ refNumber?: string;
2326
+
2327
+ /**
2328
+ * Body param: The sales-tax code for this purchase order, determining whether it
2329
+ * is taxable or non-taxable. If set, this overrides any sales-tax codes defined on
2330
+ * the vendor. This can be overridden on the purchase order's individual lines.
2331
+ *
2332
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2333
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2334
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2335
+ * non-taxable code to all sales.
2336
+ */
2337
+ salesTaxCodeId?: string;
2338
+
2339
+ /**
2340
+ * Body param: The origin location from where the product associated with this
2341
+ * purchase order is shipped. This is the point at which ownership and liability
2342
+ * for goods transfer from seller to buyer. Internally, QuickBooks uses the term
2343
+ * "FOB" for this field, which stands for "freight on board". This field is
2344
+ * informational and has no accounting implications.
2345
+ */
2346
+ shipmentOrigin?: string;
2347
+
2348
+ /**
2349
+ * Body param: The purchase order's shipping address.
2350
+ */
2351
+ shippingAddress?: PurchaseOrderUpdateParams.ShippingAddress;
2352
+
2353
+ /**
2354
+ * Body param: The shipping method used for this purchase order, such as standard
2355
+ * mail or overnight delivery.
2356
+ */
2357
+ shippingMethodId?: string;
2358
+
2359
+ /**
2360
+ * Body param: The customer, vendor, employee, or other entity to whom this
2361
+ * purchase order is to be shipped.
2362
+ */
2363
+ shipToEntityId?: string;
2364
+
2365
+ /**
2366
+ * Body param: The purchase order's payment terms, defining when payment is due and
2367
+ * any applicable discounts.
2368
+ */
2369
+ termsId?: string;
2370
+
2371
+ /**
2372
+ * Body param: The date of this purchase order, in ISO 8601 format (YYYY-MM-DD).
2373
+ */
2374
+ transactionDate?: string;
2375
+
2376
+ /**
2377
+ * Body param: The address of the vendor who sent this purchase order.
2378
+ */
2379
+ vendorAddress?: PurchaseOrderUpdateParams.VendorAddress;
2380
+
2381
+ /**
2382
+ * Body param: The vendor who sent this purchase order for goods or services
2383
+ * purchased.
2384
+ */
2385
+ vendorId?: string;
2386
+
2387
+ /**
2388
+ * Body param: A message to be printed on this purchase order for the vendor to
2389
+ * read.
2390
+ */
2391
+ vendorMessage?: string;
2392
+ }
2393
+
2394
+ export namespace PurchaseOrderUpdateParams {
2395
+ export interface LineGroup {
2396
+ /**
2397
+ * The QuickBooks-assigned unique identifier of an existing purchase order line
2398
+ * group you wish to retain or update.
2399
+ *
2400
+ * **IMPORTANT**: Set this field to `-1` for new purchase order line groups you
2401
+ * wish to add.
2402
+ */
2403
+ id: string;
2404
+
2405
+ /**
2406
+ * The purchase order line group's item group, representing a predefined set of
2407
+ * items bundled because they are commonly purchased together or grouped for faster
2408
+ * entry.
2409
+ */
2410
+ itemGroupId?: string;
2411
+
2412
+ /**
2413
+ * The purchase order line group's line items, each representing a single product
2414
+ * or service ordered.
2415
+ *
2416
+ * **IMPORTANT**:
2417
+ *
2418
+ * 1. Including this array in your update request will **REPLACE** all existing
2419
+ * line items for the purchase order line group with this array. To keep any
2420
+ * existing line items, you must include them in this array even if they have
2421
+ * not changed. **Any line items not included will be removed.**
2422
+ *
2423
+ * 2. To add a new line item, include it here with the `id` field set to `-1`.
2424
+ *
2425
+ * 3. If you do not wish to modify any line items, omit this field entirely to keep
2426
+ * them unchanged.
2427
+ */
2428
+ lines?: Array<LineGroup.Line>;
2429
+
2430
+ /**
2431
+ * Specifies an alternative unit-of-measure set when updating this purchase order
2432
+ * line group's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows
2433
+ * you to select units from a different set than the item's default unit-of-measure
2434
+ * set, which remains unchanged on the item itself. The override applies only to
2435
+ * this specific line. For example, you can sell an item typically measured in
2436
+ * volume units using weight units in a specific transaction by specifying a
2437
+ * different unit-of-measure set with this field.
2438
+ */
2439
+ overrideUnitOfMeasureSetId?: string;
2440
+
2441
+ /**
2442
+ * The quantity of the item group associated with this purchase order line group.
2443
+ * This field cannot be cleared.
2444
+ *
2445
+ * **NOTE**: Do not use this field if the associated item group is a discount item
2446
+ * group.
2447
+ */
2448
+ quantity?: number;
2449
+
2450
+ /**
2451
+ * The unit-of-measure used for the `quantity` in this purchase order line group.
2452
+ * Must be a valid unit within the item's available units of measure.
2453
+ */
2454
+ unitOfMeasure?: string;
2455
+ }
2456
+
2457
+ export namespace LineGroup {
2458
+ export interface Line {
2459
+ /**
2460
+ * The QuickBooks-assigned unique identifier of an existing purchase order line you
2461
+ * wish to retain or update.
2462
+ *
2463
+ * **IMPORTANT**: Set this field to `-1` for new purchase order lines you wish to
2464
+ * add.
2465
+ */
2466
+ id: string;
2467
+
2468
+ /**
2469
+ * The monetary amount of this purchase order line, represented as a decimal
2470
+ * string. If both `quantity` and `rate` are specified but not `amount`, QuickBooks
2471
+ * will use them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
2472
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
2473
+ * `1` and the suggested `rate`. This field cannot be cleared.
2474
+ */
2475
+ amount?: string;
2476
+
2477
+ /**
2478
+ * The purchase order line's class. Classes can be used to categorize objects into
2479
+ * meaningful segments, such as department, location, or type of work. In
2480
+ * QuickBooks, class tracking is off by default. If a class is specified for the
2481
+ * entire parent transaction, it is automatically applied to all purchase order
2482
+ * lines unless overridden here, at the transaction line level.
2483
+ */
2484
+ classId?: string;
2485
+
2486
+ /**
2487
+ * A description of this purchase order line.
2488
+ */
2489
+ description?: string;
2490
+
2491
+ /**
2492
+ * The specific location (e.g., bin or shelf) within the inventory site where the
2493
+ * item associated with this purchase order line is stored.
2494
+ */
2495
+ inventorySiteLocationId?: string;
2496
+
2497
+ /**
2498
+ * Indicates whether this purchase order line has been manually marked as closed,
2499
+ * even if this item has not been received or its sale has not been cancelled. If
2500
+ * all the purchase order lines are marked as closed, the purchase order itself is
2501
+ * marked as closed as well. You cannot change `isManuallyClosed` to `false` after
2502
+ * the purchase order line has been fully received.
2503
+ */
2504
+ isManuallyClosed?: boolean;
2505
+
2506
+ /**
2507
+ * The item associated with this purchase order line. This can refer to any good or
2508
+ * service that the business buys or sells, including item types such as a service
2509
+ * item, inventory item, or special calculation item like a discount item or
2510
+ * sales-tax item.
2511
+ */
2512
+ itemId?: string;
2513
+
2514
+ /**
2515
+ * A built-in custom field for additional information specific to this purchase
2516
+ * order line. Unlike the user-defined fields in the `customFields` array, this is
2517
+ * a standard QuickBooks field that exists for all purchase order lines for
2518
+ * convenience. Developers often use this field for tracking information that
2519
+ * doesn't fit into other standard QuickBooks fields. Hidden by default in the
2520
+ * QuickBooks UI.
2521
+ */
2522
+ otherCustomField1?: string;
2523
+
2524
+ /**
2525
+ * A second built-in custom field for additional information specific to this
2526
+ * purchase order line. Unlike the user-defined fields in the `customFields` array,
2527
+ * this is a standard QuickBooks field that exists for all purchase order lines for
2528
+ * convenience. Like `otherCustomField1`, developers often use this field for
2529
+ * tracking information that doesn't fit into other standard QuickBooks fields.
2530
+ * Hidden by default in the QuickBooks UI.
2531
+ */
2532
+ otherCustomField2?: string;
2533
+
2534
+ /**
2535
+ * The account to use for this purchase order line, overriding the default account
2536
+ * associated with the item.
2537
+ */
2538
+ overrideItemAccountId?: string;
2539
+
2540
+ /**
2541
+ * Specifies an alternative unit-of-measure set when updating this purchase order
2542
+ * line's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
2543
+ * select units from a different set than the item's default unit-of-measure set,
2544
+ * which remains unchanged on the item itself. The override applies only to this
2545
+ * specific line. For example, you can sell an item typically measured in volume
2546
+ * units using weight units in a specific transaction by specifying a different
2547
+ * unit-of-measure set with this field.
2548
+ */
2549
+ overrideUnitOfMeasureSetId?: string;
2550
+
2551
+ /**
2552
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
2553
+ * expense's vendor (not the customer). If `account` refers to any other type of
2554
+ * account, `payee` refers to the expense's customer (not the vendor).
2555
+ */
2556
+ payeeId?: string;
2557
+
2558
+ /**
2559
+ * The quantity of the item associated with this purchase order line. This field
2560
+ * cannot be cleared.
2561
+ *
2562
+ * **NOTE**: Do not use this field if the associated item is a discount item.
2563
+ */
2564
+ quantity?: number;
2565
+
2566
+ /**
2567
+ * The price per unit for this purchase order line. If both `rate` and `amount` are
2568
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
2569
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
2570
+ * decimal string. This field cannot be cleared.
2571
+ */
2572
+ rate?: string;
2573
+
2574
+ /**
2575
+ * The sales-tax code for this purchase order line, determining whether it is
2576
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
2577
+ * the parent transaction or the associated item.
2578
+ *
2579
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2580
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2581
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2582
+ * non-taxable code to all sales.
2583
+ */
2584
+ salesTaxCodeId?: string;
2585
+
2586
+ /**
2587
+ * The date on which the service for this purchase order line was or will be
2588
+ * performed, in ISO 8601 format (YYYY-MM-DD). This is particularly relevant for
2589
+ * service items.
2590
+ */
2591
+ serviceDate?: string;
2592
+
2593
+ /**
2594
+ * The purchase order line's stock keeping unit (SKU), which is sometimes the
2595
+ * manufacturer's part number.
2596
+ */
2597
+ sku?: string;
2598
+
2599
+ /**
2600
+ * The unit-of-measure used for the `quantity` in this purchase order line. Must be
2601
+ * a valid unit within the item's available units of measure.
2602
+ */
2603
+ unitOfMeasure?: string;
2604
+ }
2605
+ }
2606
+
2607
+ export interface Line {
2608
+ /**
2609
+ * The QuickBooks-assigned unique identifier of an existing purchase order line you
2610
+ * wish to retain or update.
2611
+ *
2612
+ * **IMPORTANT**: Set this field to `-1` for new purchase order lines you wish to
2613
+ * add.
2614
+ */
2615
+ id: string;
2616
+
2617
+ /**
2618
+ * The monetary amount of this purchase order line, represented as a decimal
2619
+ * string. If both `quantity` and `rate` are specified but not `amount`, QuickBooks
2620
+ * will use them to calculate `amount`. If `amount`, `rate`, and `quantity` are all
2621
+ * unspecified, then QuickBooks will calculate `amount` based on a `quantity` of
2622
+ * `1` and the suggested `rate`. This field cannot be cleared.
2623
+ */
2624
+ amount?: string;
2625
+
2626
+ /**
2627
+ * The purchase order line's class. Classes can be used to categorize objects into
2628
+ * meaningful segments, such as department, location, or type of work. In
2629
+ * QuickBooks, class tracking is off by default. If a class is specified for the
2630
+ * entire parent transaction, it is automatically applied to all purchase order
2631
+ * lines unless overridden here, at the transaction line level.
2632
+ */
2633
+ classId?: string;
2634
+
2635
+ /**
2636
+ * A description of this purchase order line.
2637
+ */
2638
+ description?: string;
2639
+
2640
+ /**
2641
+ * The specific location (e.g., bin or shelf) within the inventory site where the
2642
+ * item associated with this purchase order line is stored.
2643
+ */
2644
+ inventorySiteLocationId?: string;
2645
+
2646
+ /**
2647
+ * Indicates whether this purchase order line has been manually marked as closed,
2648
+ * even if this item has not been received or its sale has not been cancelled. If
2649
+ * all the purchase order lines are marked as closed, the purchase order itself is
2650
+ * marked as closed as well. You cannot change `isManuallyClosed` to `false` after
2651
+ * the purchase order line has been fully received.
2652
+ */
2653
+ isManuallyClosed?: boolean;
2654
+
2655
+ /**
2656
+ * The item associated with this purchase order line. This can refer to any good or
2657
+ * service that the business buys or sells, including item types such as a service
2658
+ * item, inventory item, or special calculation item like a discount item or
2659
+ * sales-tax item.
2660
+ */
2661
+ itemId?: string;
2662
+
2663
+ /**
2664
+ * A built-in custom field for additional information specific to this purchase
2665
+ * order line. Unlike the user-defined fields in the `customFields` array, this is
2666
+ * a standard QuickBooks field that exists for all purchase order lines for
2667
+ * convenience. Developers often use this field for tracking information that
2668
+ * doesn't fit into other standard QuickBooks fields. Hidden by default in the
2669
+ * QuickBooks UI.
2670
+ */
2671
+ otherCustomField1?: string;
2672
+
2673
+ /**
2674
+ * A second built-in custom field for additional information specific to this
2675
+ * purchase order line. Unlike the user-defined fields in the `customFields` array,
2676
+ * this is a standard QuickBooks field that exists for all purchase order lines for
2677
+ * convenience. Like `otherCustomField1`, developers often use this field for
2678
+ * tracking information that doesn't fit into other standard QuickBooks fields.
2679
+ * Hidden by default in the QuickBooks UI.
2680
+ */
2681
+ otherCustomField2?: string;
2682
+
2683
+ /**
2684
+ * The account to use for this purchase order line, overriding the default account
2685
+ * associated with the item.
2686
+ */
2687
+ overrideItemAccountId?: string;
2688
+
2689
+ /**
2690
+ * Specifies an alternative unit-of-measure set when updating this purchase order
2691
+ * line's `unitOfMeasure` field (e.g., "pound" or "kilogram"). This allows you to
2692
+ * select units from a different set than the item's default unit-of-measure set,
2693
+ * which remains unchanged on the item itself. The override applies only to this
2694
+ * specific line. For example, you can sell an item typically measured in volume
2695
+ * units using weight units in a specific transaction by specifying a different
2696
+ * unit-of-measure set with this field.
2697
+ */
2698
+ overrideUnitOfMeasureSetId?: string;
2699
+
2700
+ /**
2701
+ * If `account` refers to an Accounts-Payable (A/P) account, `payee` refers to the
2702
+ * expense's vendor (not the customer). If `account` refers to any other type of
2703
+ * account, `payee` refers to the expense's customer (not the vendor).
2704
+ */
2705
+ payeeId?: string;
2706
+
2707
+ /**
2708
+ * The quantity of the item associated with this purchase order line. This field
2709
+ * cannot be cleared.
2710
+ *
2711
+ * **NOTE**: Do not use this field if the associated item is a discount item.
2712
+ */
2713
+ quantity?: number;
2714
+
2715
+ /**
2716
+ * The price per unit for this purchase order line. If both `rate` and `amount` are
2717
+ * specified, `rate` will be ignored. If both `quantity` and `amount` are specified
2718
+ * but not `rate`, QuickBooks will use them to calculate `rate`. Represented as a
2719
+ * decimal string. This field cannot be cleared.
2720
+ */
2721
+ rate?: string;
2722
+
2723
+ /**
2724
+ * The sales-tax code for this purchase order line, determining whether it is
2725
+ * taxable or non-taxable. If set, this overrides any sales-tax codes defined on
2726
+ * the parent transaction or the associated item.
2727
+ *
2728
+ * Default codes include "Non" (non-taxable) and "Tax" (taxable), but custom codes
2729
+ * can also be created in QuickBooks. If QuickBooks is not set up to charge sales
2730
+ * tax (via the "Do You Charge Sales Tax?" preference), it will assign the default
2731
+ * non-taxable code to all sales.
2732
+ */
2733
+ salesTaxCodeId?: string;
2734
+
2735
+ /**
2736
+ * The date on which the service for this purchase order line was or will be
2737
+ * performed, in ISO 8601 format (YYYY-MM-DD). This is particularly relevant for
2738
+ * service items.
2739
+ */
2740
+ serviceDate?: string;
2741
+
2742
+ /**
2743
+ * The purchase order line's stock keeping unit (SKU), which is sometimes the
2744
+ * manufacturer's part number.
2745
+ */
2746
+ sku?: string;
2747
+
2748
+ /**
2749
+ * The unit-of-measure used for the `quantity` in this purchase order line. Must be
2750
+ * a valid unit within the item's available units of measure.
2751
+ */
2752
+ unitOfMeasure?: string;
2753
+ }
2754
+
2755
+ /**
2756
+ * The purchase order's shipping address.
2757
+ */
2758
+ export interface ShippingAddress {
2759
+ /**
2760
+ * The city, district, suburb, town, or village name of the address.
2761
+ *
2762
+ * Maximum length: 31 characters.
2763
+ */
2764
+ city?: string;
2765
+
2766
+ /**
2767
+ * The country name of the address.
2768
+ */
2769
+ country?: string;
2770
+
2771
+ /**
2772
+ * The first line of the address (e.g., street, PO Box, or company name).
2773
+ *
2774
+ * Maximum length: 41 characters.
2775
+ */
2776
+ line1?: string;
2777
+
2778
+ /**
2779
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
2780
+ * building).
2781
+ *
2782
+ * Maximum length: 41 characters.
2783
+ */
2784
+ line2?: string;
2785
+
2786
+ /**
2787
+ * The third line of the address, if needed.
2788
+ *
2789
+ * Maximum length: 41 characters.
2790
+ */
2791
+ line3?: string;
2792
+
2793
+ /**
2794
+ * The fourth line of the address, if needed.
2795
+ *
2796
+ * Maximum length: 41 characters.
2797
+ */
2798
+ line4?: string;
2799
+
2800
+ /**
2801
+ * The fifth line of the address, if needed.
2802
+ *
2803
+ * Maximum length: 41 characters.
2804
+ */
2805
+ line5?: string;
2806
+
2807
+ /**
2808
+ * A note written at the bottom of the address in the form in which it appears,
2809
+ * such as the invoice form.
2810
+ */
2811
+ note?: string;
2812
+
2813
+ /**
2814
+ * The postal code or ZIP code of the address.
2815
+ *
2816
+ * Maximum length: 13 characters.
2817
+ */
2818
+ postalCode?: string;
2819
+
2820
+ /**
2821
+ * The state, county, province, or region name of the address.
2822
+ *
2823
+ * Maximum length: 21 characters.
2824
+ */
2825
+ state?: string;
2826
+ }
2827
+
2828
+ /**
2829
+ * The address of the vendor who sent this purchase order.
2830
+ */
2831
+ export interface VendorAddress {
2832
+ /**
2833
+ * The city, district, suburb, town, or village name of the address.
2834
+ *
2835
+ * Maximum length: 31 characters.
2836
+ */
2837
+ city?: string;
2838
+
2839
+ /**
2840
+ * The country name of the address.
2841
+ */
2842
+ country?: string;
2843
+
2844
+ /**
2845
+ * The first line of the address (e.g., street, PO Box, or company name).
2846
+ *
2847
+ * Maximum length: 41 characters.
2848
+ */
2849
+ line1?: string;
2850
+
2851
+ /**
2852
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
2853
+ * building).
2854
+ *
2855
+ * Maximum length: 41 characters.
2856
+ */
2857
+ line2?: string;
2858
+
2859
+ /**
2860
+ * The third line of the address, if needed.
2861
+ *
2862
+ * Maximum length: 41 characters.
2863
+ */
2864
+ line3?: string;
2865
+
2866
+ /**
2867
+ * The fourth line of the address, if needed.
2868
+ *
2869
+ * Maximum length: 41 characters.
2870
+ */
2871
+ line4?: string;
2872
+
2873
+ /**
2874
+ * The fifth line of the address, if needed.
2875
+ *
2876
+ * Maximum length: 41 characters.
2877
+ */
2878
+ line5?: string;
2879
+
2880
+ /**
2881
+ * A note written at the bottom of the address in the form in which it appears,
2882
+ * such as the invoice form.
2883
+ */
2884
+ note?: string;
2885
+
2886
+ /**
2887
+ * The postal code or ZIP code of the address.
2888
+ *
2889
+ * Maximum length: 13 characters.
2890
+ */
2891
+ postalCode?: string;
2892
+
2893
+ /**
2894
+ * The state, county, province, or region name of the address.
2895
+ *
2896
+ * Maximum length: 21 characters.
2897
+ */
2898
+ state?: string;
2899
+ }
2900
+ }
2901
+
2902
+ export interface PurchaseOrderListParams extends CursorPageParams {
2903
+ /**
2904
+ * Header param: The ID of the EndUser to receive this request (e.g.,
2905
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
2906
+ */
2907
+ conductorEndUserId: string;
2908
+
2909
+ /**
2910
+ * Query param: Filter for purchase orders associated with these accounts.
2911
+ */
2912
+ accountIds?: Array<string>;
2913
+
2914
+ /**
2915
+ * Query param: Filter for purchase orders in these currencies.
2916
+ */
2917
+ currencyIds?: Array<string>;
2918
+
2919
+ /**
2920
+ * Query param: Filter for specific purchase orders by their QuickBooks-assigned
2921
+ * unique identifier(s).
2922
+ *
2923
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
2924
+ * query parameters for this request.
2925
+ *
2926
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
2927
+ * request will return an error.
2928
+ */
2929
+ ids?: Array<string>;
2930
+
2931
+ /**
2932
+ * Query param: Whether to include line items in the response. Defaults to `true`.
2933
+ */
2934
+ includeLineItems?: boolean;
2935
+
2936
+ /**
2937
+ * Query param: Whether to include linked transactions in the response. Defaults to
2938
+ * `false`. For example, a payment linked to the corresponding purchase order.
2939
+ */
2940
+ includeLinkedTransactions?: boolean;
2941
+
2942
+ /**
2943
+ * Query param: Filter for purchase orders whose `refNumber` contains this
2944
+ * substring. NOTE: If you use this parameter, you cannot also use
2945
+ * `refNumberStartsWith` or `refNumberEndsWith`.
2946
+ */
2947
+ refNumberContains?: string;
2948
+
2949
+ /**
2950
+ * Query param: Filter for purchase orders whose `refNumber` ends with this
2951
+ * substring. NOTE: If you use this parameter, you cannot also use
2952
+ * `refNumberContains` or `refNumberStartsWith`.
2953
+ */
2954
+ refNumberEndsWith?: string;
2955
+
2956
+ /**
2957
+ * Query param: Filter for purchase orders whose `refNumber` is greater than or
2958
+ * equal to this value. If omitted, the range will begin with the first number of
2959
+ * the list. Uses a numerical comparison for values that contain only digits;
2960
+ * otherwise, uses a lexicographical comparison.
2961
+ */
2962
+ refNumberFrom?: string;
2963
+
2964
+ /**
2965
+ * Query param: Filter for specific purchase orders by their ref-number(s),
2966
+ * case-sensitive. In QuickBooks, ref-numbers are not required to be unique and can
2967
+ * be arbitrarily changed by the QuickBooks user.
2968
+ *
2969
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
2970
+ * query parameters for this request.
2971
+ *
2972
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
2973
+ * request will return an error.
2974
+ */
2975
+ refNumbers?: Array<string>;
2976
+
2977
+ /**
2978
+ * Query param: Filter for purchase orders whose `refNumber` starts with this
2979
+ * substring. NOTE: If you use this parameter, you cannot also use
2980
+ * `refNumberContains` or `refNumberEndsWith`.
2981
+ */
2982
+ refNumberStartsWith?: string;
2983
+
2984
+ /**
2985
+ * Query param: Filter for purchase orders whose `refNumber` is less than or equal
2986
+ * to this value. If omitted, the range will end with the last number of the list.
2987
+ * Uses a numerical comparison for values that contain only digits; otherwise, uses
2988
+ * a lexicographical comparison.
2989
+ */
2990
+ refNumberTo?: string;
2991
+
2992
+ /**
2993
+ * Query param: Filter for purchase orders created on or after this date, in ISO
2994
+ * 8601 format (YYYY-MM-DD).
2995
+ */
2996
+ transactionDateFrom?: string;
2997
+
2998
+ /**
2999
+ * Query param: Filter for purchase orders created on or before this date, in ISO
3000
+ * 8601 format (YYYY-MM-DD).
3001
+ */
3002
+ transactionDateTo?: string;
3003
+
3004
+ /**
3005
+ * Query param: Filter for purchase orders updated on or after this date and time,
3006
+ * in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
3007
+ * (YYYY-MM-DD), the time is assumed to be 00:00:00 of that day.
3008
+ */
3009
+ updatedAfter?: string;
3010
+
3011
+ /**
3012
+ * Query param: Filter for purchase orders updated on or before this date and time,
3013
+ * in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
3014
+ * (YYYY-MM-DD), the time is assumed to be 23:59:59 of that day.
3015
+ */
3016
+ updatedBefore?: string;
3017
+
3018
+ /**
3019
+ * Query param: Filter for purchase orders sent to these vendors.
3020
+ */
3021
+ vendorIds?: Array<string>;
3022
+ }
3023
+
3024
+ export interface PurchaseOrderDeleteParams {
3025
+ /**
3026
+ * The ID of the EndUser to receive this request (e.g.,
3027
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
3028
+ */
3029
+ conductorEndUserId: string;
3030
+ }
3031
+
3032
+ PurchaseOrders.PurchaseOrdersCursorPage = PurchaseOrdersCursorPage;
3033
+
3034
+ export declare namespace PurchaseOrders {
3035
+ export {
3036
+ type PurchaseOrder as PurchaseOrder,
3037
+ type PurchaseOrderDeleteResponse as PurchaseOrderDeleteResponse,
3038
+ PurchaseOrdersCursorPage as PurchaseOrdersCursorPage,
3039
+ type PurchaseOrderCreateParams as PurchaseOrderCreateParams,
3040
+ type PurchaseOrderRetrieveParams as PurchaseOrderRetrieveParams,
3041
+ type PurchaseOrderUpdateParams as PurchaseOrderUpdateParams,
3042
+ type PurchaseOrderListParams as PurchaseOrderListParams,
3043
+ type PurchaseOrderDeleteParams as PurchaseOrderDeleteParams,
3044
+ };
3045
+ }