@augno/sdk 0.16.1 → 0.18.0

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 (350) hide show
  1. package/CHANGELOG.md +7 -2
  2. package/README.md +1 -1
  3. package/client.js +1 -1
  4. package/client.mjs +1 -1
  5. package/package.json +1 -1
  6. package/resources/catalog/item-categories/actions.d.mts +8 -2
  7. package/resources/catalog/item-categories/actions.d.mts.map +1 -1
  8. package/resources/catalog/item-categories/actions.d.ts +8 -2
  9. package/resources/catalog/item-categories/actions.d.ts.map +1 -1
  10. package/resources/catalog/item-categories/actions.js +7 -2
  11. package/resources/catalog/item-categories/actions.js.map +1 -1
  12. package/resources/catalog/item-categories/actions.mjs +7 -2
  13. package/resources/catalog/item-categories/actions.mjs.map +1 -1
  14. package/resources/catalog/materials/actions.d.mts +7 -2
  15. package/resources/catalog/materials/actions.d.mts.map +1 -1
  16. package/resources/catalog/materials/actions.d.ts +7 -2
  17. package/resources/catalog/materials/actions.d.ts.map +1 -1
  18. package/resources/catalog/materials/actions.js +7 -2
  19. package/resources/catalog/materials/actions.js.map +1 -1
  20. package/resources/catalog/materials/actions.mjs +7 -2
  21. package/resources/catalog/materials/actions.mjs.map +1 -1
  22. package/resources/catalog/parts/actions.d.mts +7 -2
  23. package/resources/catalog/parts/actions.d.mts.map +1 -1
  24. package/resources/catalog/parts/actions.d.ts +7 -2
  25. package/resources/catalog/parts/actions.d.ts.map +1 -1
  26. package/resources/catalog/parts/actions.js +7 -2
  27. package/resources/catalog/parts/actions.js.map +1 -1
  28. package/resources/catalog/parts/actions.mjs +7 -2
  29. package/resources/catalog/parts/actions.mjs.map +1 -1
  30. package/resources/catalog/product-lines/actions.d.mts +8 -2
  31. package/resources/catalog/product-lines/actions.d.mts.map +1 -1
  32. package/resources/catalog/product-lines/actions.d.ts +8 -2
  33. package/resources/catalog/product-lines/actions.d.ts.map +1 -1
  34. package/resources/catalog/product-lines/actions.js +7 -2
  35. package/resources/catalog/product-lines/actions.js.map +1 -1
  36. package/resources/catalog/product-lines/actions.mjs +7 -2
  37. package/resources/catalog/product-lines/actions.mjs.map +1 -1
  38. package/resources/catalog/products/actions.d.mts +7 -2
  39. package/resources/catalog/products/actions.d.mts.map +1 -1
  40. package/resources/catalog/products/actions.d.ts +7 -2
  41. package/resources/catalog/products/actions.d.ts.map +1 -1
  42. package/resources/catalog/products/actions.js +7 -2
  43. package/resources/catalog/products/actions.js.map +1 -1
  44. package/resources/catalog/products/actions.mjs +7 -2
  45. package/resources/catalog/products/actions.mjs.map +1 -1
  46. package/resources/catalog/properties/actions.d.mts +8 -3
  47. package/resources/catalog/properties/actions.d.mts.map +1 -1
  48. package/resources/catalog/properties/actions.d.ts +8 -3
  49. package/resources/catalog/properties/actions.d.ts.map +1 -1
  50. package/resources/catalog/properties/actions.js +7 -2
  51. package/resources/catalog/properties/actions.js.map +1 -1
  52. package/resources/catalog/properties/actions.mjs +7 -2
  53. package/resources/catalog/properties/actions.mjs.map +1 -1
  54. package/resources/catalog/unit-groups/actions.d.mts +7 -2
  55. package/resources/catalog/unit-groups/actions.d.mts.map +1 -1
  56. package/resources/catalog/unit-groups/actions.d.ts +7 -2
  57. package/resources/catalog/unit-groups/actions.d.ts.map +1 -1
  58. package/resources/catalog/unit-groups/actions.js +7 -2
  59. package/resources/catalog/unit-groups/actions.js.map +1 -1
  60. package/resources/catalog/unit-groups/actions.mjs +7 -2
  61. package/resources/catalog/unit-groups/actions.mjs.map +1 -1
  62. package/resources/catalog/units/actions.d.mts +8 -2
  63. package/resources/catalog/units/actions.d.mts.map +1 -1
  64. package/resources/catalog/units/actions.d.ts +8 -2
  65. package/resources/catalog/units/actions.d.ts.map +1 -1
  66. package/resources/catalog/units/actions.js +7 -2
  67. package/resources/catalog/units/actions.js.map +1 -1
  68. package/resources/catalog/units/actions.mjs +7 -2
  69. package/resources/catalog/units/actions.mjs.map +1 -1
  70. package/resources/core/analytics.d.mts +195 -1
  71. package/resources/core/analytics.d.mts.map +1 -1
  72. package/resources/core/analytics.d.ts +195 -1
  73. package/resources/core/analytics.d.ts.map +1 -1
  74. package/resources/core/analytics.js +11 -0
  75. package/resources/core/analytics.js.map +1 -1
  76. package/resources/core/analytics.mjs +11 -0
  77. package/resources/core/analytics.mjs.map +1 -1
  78. package/resources/core/audit-events.d.mts +4 -4
  79. package/resources/core/audit-events.d.mts.map +1 -1
  80. package/resources/core/audit-events.d.ts +4 -4
  81. package/resources/core/audit-events.d.ts.map +1 -1
  82. package/resources/core/core.d.mts +6 -6
  83. package/resources/core/core.d.mts.map +1 -1
  84. package/resources/core/core.d.ts +6 -6
  85. package/resources/core/core.d.ts.map +1 -1
  86. package/resources/core/core.js.map +1 -1
  87. package/resources/core/core.mjs +1 -1
  88. package/resources/core/core.mjs.map +1 -1
  89. package/resources/core/index.d.mts +2 -2
  90. package/resources/core/index.d.mts.map +1 -1
  91. package/resources/core/index.d.ts +2 -2
  92. package/resources/core/index.d.ts.map +1 -1
  93. package/resources/core/index.js.map +1 -1
  94. package/resources/core/index.mjs.map +1 -1
  95. package/resources/core/jobs.d.mts +102 -60
  96. package/resources/core/jobs.d.mts.map +1 -1
  97. package/resources/core/jobs.d.ts +102 -60
  98. package/resources/core/jobs.d.ts.map +1 -1
  99. package/resources/core/jobs.js +12 -6
  100. package/resources/core/jobs.js.map +1 -1
  101. package/resources/core/jobs.mjs +12 -6
  102. package/resources/core/jobs.mjs.map +1 -1
  103. package/resources/finance/payment-terms.d.mts +5 -5
  104. package/resources/finance/payment-terms.d.mts.map +1 -1
  105. package/resources/finance/payment-terms.d.ts +5 -5
  106. package/resources/finance/payment-terms.d.ts.map +1 -1
  107. package/resources/finance/payment-terms.js.map +1 -1
  108. package/resources/finance/payment-terms.mjs.map +1 -1
  109. package/resources/identity/account-users/account-users.d.mts +39 -0
  110. package/resources/identity/account-users/account-users.d.mts.map +1 -1
  111. package/resources/identity/account-users/account-users.d.ts +39 -0
  112. package/resources/identity/account-users/account-users.d.ts.map +1 -1
  113. package/resources/identity/account-users/account-users.js.map +1 -1
  114. package/resources/identity/account-users/account-users.mjs.map +1 -1
  115. package/resources/messaging/blocks.d.mts +8 -0
  116. package/resources/messaging/blocks.d.mts.map +1 -1
  117. package/resources/messaging/blocks.d.ts +8 -0
  118. package/resources/messaging/blocks.d.ts.map +1 -1
  119. package/resources/messaging/conversations/conversations.d.mts +3 -3
  120. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  121. package/resources/messaging/conversations/conversations.d.ts +3 -3
  122. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  123. package/resources/messaging/conversations/conversations.js.map +1 -1
  124. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  125. package/resources/messaging/conversations/links.d.mts +2 -2
  126. package/resources/messaging/conversations/links.d.mts.map +1 -1
  127. package/resources/messaging/conversations/links.d.ts +2 -2
  128. package/resources/messaging/conversations/links.d.ts.map +1 -1
  129. package/resources/messaging/conversations/messages.d.mts +2 -2
  130. package/resources/messaging/conversations/messages.d.mts.map +1 -1
  131. package/resources/messaging/conversations/messages.d.ts +2 -2
  132. package/resources/messaging/conversations/messages.d.ts.map +1 -1
  133. package/resources/messaging/notifications/notifications.d.mts +2 -2
  134. package/resources/messaging/notifications/notifications.d.mts.map +1 -1
  135. package/resources/messaging/notifications/notifications.d.ts +2 -2
  136. package/resources/messaging/notifications/notifications.d.ts.map +1 -1
  137. package/resources/messaging/notifications/notifications.js.map +1 -1
  138. package/resources/messaging/notifications/notifications.mjs.map +1 -1
  139. package/resources/operations/carriers/carriers.d.mts +5 -5
  140. package/resources/operations/carriers/carriers.d.mts.map +1 -1
  141. package/resources/operations/carriers/carriers.d.ts +5 -5
  142. package/resources/operations/carriers/carriers.d.ts.map +1 -1
  143. package/resources/operations/carriers/service-levels.d.mts +5 -5
  144. package/resources/operations/carriers/service-levels.d.mts.map +1 -1
  145. package/resources/operations/carriers/service-levels.d.ts +5 -5
  146. package/resources/operations/carriers/service-levels.d.ts.map +1 -1
  147. package/resources/operations/locations/actions.d.mts +7 -2
  148. package/resources/operations/locations/actions.d.mts.map +1 -1
  149. package/resources/operations/locations/actions.d.ts +7 -2
  150. package/resources/operations/locations/actions.d.ts.map +1 -1
  151. package/resources/operations/locations/actions.js +7 -2
  152. package/resources/operations/locations/actions.js.map +1 -1
  153. package/resources/operations/locations/actions.mjs +7 -2
  154. package/resources/operations/locations/actions.mjs.map +1 -1
  155. package/resources/operations/production-schedules/production-schedules.d.mts +5 -3
  156. package/resources/operations/production-schedules/production-schedules.d.mts.map +1 -1
  157. package/resources/operations/production-schedules/production-schedules.d.ts +5 -3
  158. package/resources/operations/production-schedules/production-schedules.d.ts.map +1 -1
  159. package/resources/operations/production-schedules/production-schedules.js +5 -3
  160. package/resources/operations/production-schedules/production-schedules.js.map +1 -1
  161. package/resources/operations/production-schedules/production-schedules.mjs +5 -3
  162. package/resources/operations/production-schedules/production-schedules.mjs.map +1 -1
  163. package/resources/operations/shipments/actions.d.mts +3 -3
  164. package/resources/operations/shipments/actions.d.mts.map +1 -1
  165. package/resources/operations/shipments/actions.d.ts +3 -3
  166. package/resources/operations/shipments/actions.d.ts.map +1 -1
  167. package/resources/operations/shipping-terms.d.mts +5 -5
  168. package/resources/operations/shipping-terms.d.mts.map +1 -1
  169. package/resources/operations/shipping-terms.d.ts +5 -5
  170. package/resources/operations/shipping-terms.d.ts.map +1 -1
  171. package/resources/operations/shipping-terms.js.map +1 -1
  172. package/resources/operations/shipping-terms.mjs.map +1 -1
  173. package/resources/sales/account-prices/account-prices.d.mts +999 -0
  174. package/resources/sales/account-prices/account-prices.d.mts.map +1 -0
  175. package/resources/sales/account-prices/account-prices.d.ts +999 -0
  176. package/resources/sales/account-prices/account-prices.d.ts.map +1 -0
  177. package/resources/sales/account-prices/account-prices.js +143 -0
  178. package/resources/sales/account-prices/account-prices.js.map +1 -0
  179. package/resources/sales/account-prices/account-prices.mjs +138 -0
  180. package/resources/sales/account-prices/account-prices.mjs.map +1 -0
  181. package/resources/sales/account-prices/actions.d.mts +58 -0
  182. package/resources/sales/account-prices/actions.d.mts.map +1 -0
  183. package/resources/sales/account-prices/actions.d.ts +58 -0
  184. package/resources/sales/account-prices/actions.d.ts.map +1 -0
  185. package/resources/sales/account-prices/actions.js +44 -0
  186. package/resources/sales/account-prices/actions.js.map +1 -0
  187. package/resources/sales/account-prices/actions.mjs +40 -0
  188. package/resources/sales/account-prices/actions.mjs.map +1 -0
  189. package/resources/sales/account-prices/index.d.mts +3 -0
  190. package/resources/sales/account-prices/index.d.mts.map +1 -0
  191. package/resources/sales/account-prices/index.d.ts +3 -0
  192. package/resources/sales/account-prices/index.d.ts.map +1 -0
  193. package/resources/sales/account-prices/index.js +9 -0
  194. package/resources/sales/account-prices/index.js.map +1 -0
  195. package/resources/sales/account-prices/index.mjs +4 -0
  196. package/resources/sales/account-prices/index.mjs.map +1 -0
  197. package/resources/sales/account-prices.d.mts +2 -0
  198. package/resources/sales/account-prices.d.mts.map +1 -0
  199. package/resources/sales/account-prices.d.ts +2 -0
  200. package/resources/sales/account-prices.d.ts.map +1 -0
  201. package/resources/sales/account-prices.js +6 -0
  202. package/resources/sales/account-prices.js.map +1 -0
  203. package/resources/sales/account-prices.mjs +3 -0
  204. package/resources/sales/account-prices.mjs.map +1 -0
  205. package/resources/sales/customers/actions.d.mts +2 -2
  206. package/resources/sales/customers/actions.d.mts.map +1 -1
  207. package/resources/sales/customers/actions.d.ts +2 -2
  208. package/resources/sales/customers/actions.d.ts.map +1 -1
  209. package/resources/sales/customers/actions.js.map +1 -1
  210. package/resources/sales/customers/actions.mjs.map +1 -1
  211. package/resources/sales/customers/customers.d.mts +6 -564
  212. package/resources/sales/customers/customers.d.mts.map +1 -1
  213. package/resources/sales/customers/customers.d.ts +6 -564
  214. package/resources/sales/customers/customers.d.ts.map +1 -1
  215. package/resources/sales/customers/customers.js.map +1 -1
  216. package/resources/sales/customers/customers.mjs.map +1 -1
  217. package/resources/sales/customers/index.d.mts +1 -1
  218. package/resources/sales/customers/index.d.mts.map +1 -1
  219. package/resources/sales/customers/index.d.ts +1 -1
  220. package/resources/sales/customers/index.d.ts.map +1 -1
  221. package/resources/sales/customers/index.js.map +1 -1
  222. package/resources/sales/customers/index.mjs.map +1 -1
  223. package/resources/sales/index.d.mts +6 -3
  224. package/resources/sales/index.d.mts.map +1 -1
  225. package/resources/sales/index.d.ts +6 -3
  226. package/resources/sales/index.d.ts.map +1 -1
  227. package/resources/sales/index.js +15 -9
  228. package/resources/sales/index.js.map +1 -1
  229. package/resources/sales/index.mjs +3 -0
  230. package/resources/sales/index.mjs.map +1 -1
  231. package/resources/sales/order-discounts/actions.d.mts +85 -0
  232. package/resources/sales/order-discounts/actions.d.mts.map +1 -0
  233. package/resources/sales/order-discounts/actions.d.ts +85 -0
  234. package/resources/sales/order-discounts/actions.d.ts.map +1 -0
  235. package/resources/sales/order-discounts/actions.js +35 -0
  236. package/resources/sales/order-discounts/actions.js.map +1 -0
  237. package/resources/sales/order-discounts/actions.mjs +31 -0
  238. package/resources/sales/order-discounts/actions.mjs.map +1 -0
  239. package/resources/sales/order-discounts/index.d.mts +3 -0
  240. package/resources/sales/order-discounts/index.d.mts.map +1 -0
  241. package/resources/sales/order-discounts/index.d.ts +3 -0
  242. package/resources/sales/order-discounts/index.d.ts.map +1 -0
  243. package/resources/sales/order-discounts/index.js +9 -0
  244. package/resources/sales/order-discounts/index.js.map +1 -0
  245. package/resources/sales/order-discounts/index.mjs +4 -0
  246. package/resources/sales/order-discounts/index.mjs.map +1 -0
  247. package/resources/sales/order-discounts/order-discounts.d.mts +365 -0
  248. package/resources/sales/order-discounts/order-discounts.d.mts.map +1 -0
  249. package/resources/sales/order-discounts/order-discounts.d.ts +365 -0
  250. package/resources/sales/order-discounts/order-discounts.d.ts.map +1 -0
  251. package/resources/sales/order-discounts/order-discounts.js +125 -0
  252. package/resources/sales/order-discounts/order-discounts.js.map +1 -0
  253. package/resources/sales/order-discounts/order-discounts.mjs +120 -0
  254. package/resources/sales/order-discounts/order-discounts.mjs.map +1 -0
  255. package/resources/sales/order-discounts.d.mts +2 -0
  256. package/resources/sales/order-discounts.d.mts.map +1 -0
  257. package/resources/sales/order-discounts.d.ts +2 -0
  258. package/resources/sales/order-discounts.d.ts.map +1 -0
  259. package/resources/sales/order-discounts.js +6 -0
  260. package/resources/sales/order-discounts.js.map +1 -0
  261. package/resources/sales/order-discounts.mjs +3 -0
  262. package/resources/sales/order-discounts.mjs.map +1 -0
  263. package/resources/sales/priorities.d.mts +4 -44
  264. package/resources/sales/priorities.d.mts.map +1 -1
  265. package/resources/sales/priorities.d.ts +4 -44
  266. package/resources/sales/priorities.d.ts.map +1 -1
  267. package/resources/sales/priorities.js.map +1 -1
  268. package/resources/sales/priorities.mjs.map +1 -1
  269. package/resources/sales/sales-orders/index.d.mts +1 -1
  270. package/resources/sales/sales-orders/index.d.mts.map +1 -1
  271. package/resources/sales/sales-orders/index.d.ts +1 -1
  272. package/resources/sales/sales-orders/index.d.ts.map +1 -1
  273. package/resources/sales/sales-orders/index.js.map +1 -1
  274. package/resources/sales/sales-orders/index.mjs.map +1 -1
  275. package/resources/sales/sales-orders/lines/lines.d.mts +2 -2
  276. package/resources/sales/sales-orders/lines/lines.d.mts.map +1 -1
  277. package/resources/sales/sales-orders/lines/lines.d.ts +2 -2
  278. package/resources/sales/sales-orders/lines/lines.d.ts.map +1 -1
  279. package/resources/sales/sales-orders/sales-orders.d.mts +10 -69
  280. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  281. package/resources/sales/sales-orders/sales-orders.d.ts +10 -69
  282. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  283. package/resources/sales/sales-orders/sales-orders.js.map +1 -1
  284. package/resources/sales/sales-orders/sales-orders.mjs.map +1 -1
  285. package/resources/sales/sales.d.mts +18 -6
  286. package/resources/sales/sales.d.mts.map +1 -1
  287. package/resources/sales/sales.d.ts +18 -6
  288. package/resources/sales/sales.d.ts.map +1 -1
  289. package/resources/sales/sales.js +12 -0
  290. package/resources/sales/sales.js.map +1 -1
  291. package/resources/sales/sales.mjs +12 -0
  292. package/resources/sales/sales.mjs.map +1 -1
  293. package/resources/sales/volume-discounts.d.mts +684 -0
  294. package/resources/sales/volume-discounts.d.mts.map +1 -0
  295. package/resources/sales/volume-discounts.d.ts +684 -0
  296. package/resources/sales/volume-discounts.d.ts.map +1 -0
  297. package/resources/sales/volume-discounts.js +152 -0
  298. package/resources/sales/volume-discounts.js.map +1 -0
  299. package/resources/sales/volume-discounts.mjs +148 -0
  300. package/resources/sales/volume-discounts.mjs.map +1 -0
  301. package/src/client.ts +1 -1
  302. package/src/resources/catalog/item-categories/actions.ts +15 -3
  303. package/src/resources/catalog/materials/actions.ts +14 -3
  304. package/src/resources/catalog/parts/actions.ts +14 -3
  305. package/src/resources/catalog/product-lines/actions.ts +15 -3
  306. package/src/resources/catalog/products/actions.ts +14 -3
  307. package/src/resources/catalog/properties/actions.ts +15 -4
  308. package/src/resources/catalog/unit-groups/actions.ts +14 -3
  309. package/src/resources/catalog/units/actions.ts +15 -3
  310. package/src/resources/core/analytics.ts +231 -0
  311. package/src/resources/core/audit-events.ts +16 -0
  312. package/src/resources/core/core.ts +30 -2
  313. package/src/resources/core/index.ts +7 -1
  314. package/src/resources/core/jobs.ts +422 -67
  315. package/src/resources/finance/payment-terms.ts +8 -5
  316. package/src/resources/identity/account-users/account-users.ts +44 -0
  317. package/src/resources/messaging/blocks.ts +9 -0
  318. package/src/resources/messaging/conversations/conversations.ts +12 -0
  319. package/src/resources/messaging/conversations/links.ts +8 -0
  320. package/src/resources/messaging/conversations/messages.ts +8 -0
  321. package/src/resources/messaging/notifications/notifications.ts +8 -0
  322. package/src/resources/operations/carriers/carriers.ts +5 -5
  323. package/src/resources/operations/carriers/service-levels.ts +5 -5
  324. package/src/resources/operations/locations/actions.ts +14 -3
  325. package/src/resources/operations/production-schedules/production-schedules.ts +5 -3
  326. package/src/resources/operations/shipments/actions.ts +3 -3
  327. package/src/resources/operations/shipping-terms.ts +8 -5
  328. package/src/resources/sales/account-prices/account-prices.ts +1191 -0
  329. package/src/resources/sales/account-prices/actions.ts +74 -0
  330. package/src/resources/sales/account-prices/index.ts +27 -0
  331. package/src/resources/sales/account-prices.ts +3 -0
  332. package/src/resources/sales/customers/actions.ts +6 -2
  333. package/src/resources/sales/customers/customers.ts +5 -658
  334. package/src/resources/sales/customers/index.ts +0 -11
  335. package/src/resources/sales/index.ts +50 -13
  336. package/src/resources/sales/order-discounts/actions.ts +102 -0
  337. package/src/resources/sales/order-discounts/index.ts +13 -0
  338. package/src/resources/sales/order-discounts/order-discounts.ts +442 -0
  339. package/src/resources/sales/order-discounts.ts +3 -0
  340. package/src/resources/sales/priorities.ts +3 -51
  341. package/src/resources/sales/sales-orders/index.ts +0 -1
  342. package/src/resources/sales/sales-orders/lines/lines.ts +2 -2
  343. package/src/resources/sales/sales-orders/sales-orders.ts +9 -79
  344. package/src/resources/sales/sales.ts +113 -26
  345. package/src/resources/sales/volume-discounts.ts +813 -0
  346. package/src/version.ts +1 -1
  347. package/version.d.mts +1 -1
  348. package/version.d.ts +1 -1
  349. package/version.js +1 -1
  350. package/version.mjs +1 -1
@@ -1,4 +1,7 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
+ import * as CoreAPI from "./core.mjs";
3
+ import * as RequestLogsAPI from "./request-logs.mjs";
4
+ import * as APIKeysAPI from "../auth/api-keys/api-keys.mjs";
2
5
  import { APIPromise } from "../../core/api-promise.mjs";
3
6
  import { RequestOptions } from "../../internal/request-options.mjs";
4
7
  /**
@@ -10,27 +13,32 @@ export declare class Jobs extends APIResource {
10
13
  * `Location` to observe its outcome. A completed export carries the link to its
11
14
  * file on `export.url`.
12
15
  *
16
+ * This endpoint requires the permissions: `jobs:read`, `customers:read`,
17
+ * `suppliers:read`.
18
+ *
13
19
  * @example
14
20
  * ```ts
15
21
  * const job = await client.core.jobs.retrieve(
16
- * 'jb_01k0a5smf9ekb8rqg1',
22
+ * 'jb_grz7cdpnz8jr',
17
23
  * );
18
24
  * ```
19
25
  */
20
- retrieve(id: string, options?: RequestOptions): APIPromise<Job>;
26
+ retrieve(id: string, query?: JobRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Job>;
21
27
  /**
22
28
  * Cancels a job and returns it carrying its `cancelled` status. Work in flight is
23
29
  * not interrupted but can no longer settle, and a finished job cannot be
24
30
  * cancelled.
25
31
  *
32
+ * This endpoint requires the permission: `jobs:delete`.
33
+ *
26
34
  * @example
27
35
  * ```ts
28
36
  * const job = await client.core.jobs.cancel(
29
- * 'jb_01k0a5smf9ekb8rqg1',
37
+ * 'jb_grz7cdpnz8jr',
30
38
  * );
31
39
  * ```
32
40
  */
33
- cancel(id: string, options?: RequestOptions): APIPromise<Job>;
41
+ cancel(id: string, params?: JobCancelParams | null | undefined, options?: RequestOptions): APIPromise<Job>;
34
42
  }
35
43
  /**
36
44
  * Records a piece of work the API accepted and carries out asynchronously.
@@ -55,30 +63,16 @@ export interface Job {
55
63
  */
56
64
  created_at: string;
57
65
  /**
58
- * Email of the account user who requested the work.
59
- */
60
- created_by_email: string | null;
61
- /**
62
- * The ID of the account user who requested the work.
66
+ * Reference to an actor — the user, API key, agent, or group identity associated
67
+ * with an action.
63
68
  */
64
- created_by_id: string | null;
69
+ created_by: RequestLogsAPI.Actor | null;
65
70
  /**
66
- * Name of the account user who requested the work.
67
- */
68
- created_by_name: string | null;
69
- /**
70
- * Username of the account user who requested the work.
71
- */
72
- created_by_username: string | null;
73
- /**
74
- * A one-line reason the last attempt failed.
75
- */
76
- error_summary: string | null;
77
- /**
78
- * One entry per failure, so a `completed` job can still carry failed rows. A
79
- * whole-job failure records a single entry with no `index`.
71
+ * ResponseError is the JSON-serializable error body returned to API clients. It
72
+ * contains only public information. This struct is used by the OpenAPI schema
73
+ * generator to produce documentation.
80
74
  */
81
- errors: Array<RowError>;
75
+ error: ResponseError | null;
82
76
  /**
83
77
  * Points a completed export job at the file it produced.
84
78
  */
@@ -93,24 +87,33 @@ export interface Job {
93
87
  */
94
88
  object: 'job';
95
89
  /**
96
- * One entry per request row that produced a resource. A bulk create records these
97
- * when it accepts the request, so they stay provisional until `status` is
98
- * `completed`.
90
+ * The kind of resource the job operates on, as an object-type value (e.g.
91
+ * `product`).
92
+ *
93
+ * `type` names the verb — what the job does — and this names the subject, so a job
94
+ * that produced no results still says what it was for.
95
+ */
96
+ resource_type: 'account' | 'actor' | 'entity' | 'record' | 'freight' | 'sales_order_totals' | 'sales_order_stage_total' | 'sales_order_related' | 'order_contact' | 'user' | 'address' | 'api_key' | 'created_api_key' | 'refresh_token' | 'list' | 'sandbox' | 'registration_session' | 'pricing_plan' | 'account_plan' | 'plan_change' | 'enterprise_inquiry' | 'request_log' | 'audit_event' | 'audit_field_change' | 'role' | 'unit' | 'account_affiliation' | 'agent_definition' | 'available_tool' | 'agent_definition_tool' | 'agent_account_status' | 'agent_run' | 'agent_action' | 'agent_run_step' | 'agent_token_usage' | 'agent_memory' | 'notification' | 'notification_unread_count' | 'notification_send_result' | 'notification_unread_summary' | 'announcement' | 'conversation' | 'support_case' | 'conversation_participant' | 'read_cursor' | 'chat_message' | 'notification_unread_summary_account' | 'messaging_block' | 'notification_preference' | 'message_attachment' | 'attachment_upload_target' | 'scheduled_message' | 'messaging_contact' | 'message_report' | 'tool_group' | 'model' | 'payment_term' | 'shipping_term' | 'quantity' | 'account_group' | 'support_route' | 'support_availability' | 'account_status' | 'geolocation' | 'account_user' | 'department' | 'account_integration' | 'account_price' | 'product_line' | 'item_category' | 'attribute' | 'rate' | 'account_group_product_line_access' | 'sales_target' | 'adjustment_type' | 'account_branding' | 'account_portal' | 'account_logo_url' | 'account_favicon_url' | 'public_account' | 'property' | 'carrier' | 'service_level' | 'item' | 'item_lot_default' | 'item_inventory' | 'product' | 'batch' | 'batch_flow_node' | 'scanning_consumption' | 'open_batch_summary' | 'scanning_production_step_info' | 'scanning_station' | 'production_step' | 'production_run' | 'machine' | 'machine_status' | 'machine_downtime_event' | 'demand_override' | 'demand_override_type' | 'machine_downtime_reason' | 'production_schedule_preview' | 'production_schedule_regenerate_preview' | 'production_schedule' | 'production_schedule_line' | 'production_schedule_deviation' | 'production_schedule_derived_line' | 'production_schedule_settings' | 'production_schedule_resource_setting' | 'production_schedule_item_setting' | 'fulfillment_recommendation' | 'analyze_delivery_performance_response' | 'delivery_performance' | 'delivery_backlog_bucket' | 'delivery_lateness_bucket' | 'delivery_breakdown' | 'schedule_order_coverage' | 'schedule_order_coverage_line' | 'promise_date_quote' | 'schedule_deviation_type' | 'schedule_at_risk_order' | 'production_schedule_finished_policy' | 'production_schedule_week_release' | 'production_schedule_week_release_preview' | 'production_schedule_item_policy' | 'child_account' | 'unit_group' | 'unit_group_unit' | 'consumption' | 'customer_product_line_access' | 'customer' | 'frequently_ordered_product' | 'priority' | 'delivery' | 'delivery_line' | 'sales_order' | 'location' | 'location_type' | 'lot' | 'email_log' | 'email_domain' | 'email_inbox' | 'portal_domain' | 'dns_record' | 'inventory_change_log' | 'invoice' | 'invoice_summary' | 'invoice_line' | 'invoice_allocation' | 'invoice_for_payment' | 'shipment' | 'shipment_summary' | 'shipment_line' | 'shipping_case' | 'shipping_case_label_url' | 'settlement' | 'settlement_summary' | 'role_permission' | 'registration_flow' | 'registration_flow_option' | 'transaction' | 'transaction_summary' | 'transaction_method' | 'transaction_type' | 'transaction_allocation' | 'usage_item' | 'account_usage_response' | 'subscription_info' | 'billing_portal_session_response' | 'switch_plan_response' | 'ensure_billing_customer_response' | 'spending_cap_response' | 'agent_spend_info' | 'webhook_response' | 'address_suggestion' | 'address_components' | 'address_details_result' | 'validated_address' | 'plan_limit' | 'plan_change_proration' | 'plan_change_line_item' | 'setup_billing_response' | 'confirm_payment_response' | 'oauth_response' | 'oauth_status_response' | 'stripe_publishable_key' | 'stripe_status' | 'healthcheck' | 'agent_definition_config' | 'trigger_config' | 'customer_contact_info' | 'customer_freight_preferences' | 'customer_defaults' | 'customer_lead_time' | 'customer_notification_preferences' | 'order_notification_recipient' | 'order_discount' | 'sales_order_line' | 'sales_order_type' | 'sales_order_status' | 'material' | 'supplier_material' | 'part' | 'permission_group' | 'permission' | 'pick' | 'pick_line' | 'product_type' | 'production' | 'production_flow' | 'map' | 'purchase_order' | 'purchase_order_line' | 'supplier' | 'supplier_summary' | 'receivable_entry' | 'receiving_order' | 'receiving_order_line' | 'email_contact' | 'allocation_entry' | 'open_credit_entry' | 'volume_discount' | 'volume_discount_tier' | 'analyze_deliveries_response' | 'analyze_manufacturing_response' | 'analyze_manufacturing_batch_response' | 'analyze_quarterly_orders_response' | 'analyze_new_customers_response' | 'analyze_demand_forecast_response' | 'analyze_oee_response' | 'analyze_oee_trend_response' | 'analyze_schedule_attainment_response' | 'catalog_product_line' | 'catalog_category' | 'catalog_product' | 'catalog_property' | 'catalog_attribute' | 'dc_location' | 'edi_run' | 'inventory_item' | 'analyze_weeks_of_sales_response' | 'bulk_reconcile_items_response' | 'sys_property' | 'sys_property_type' | 'sys_property_value' | 'territory' | 'tenancy' | 'checkout_session' | 'estimate_rate_result' | 'rate_shop_option' | 'rate_shop_result' | 'owner' | 'created_by' | 'message' | 'account_photo_upload_result' | 'user_photo_upload_result' | 'user_photo_url' | 'batch_lot' | 'check_duplicate_result' | 'item_trend_point' | 'pack_pick_response' | 'pick_shipments_response' | 'tenancy_pending_registration' | 'invoice_allocation_entry' | 'allocation_customer' | 'checkout_sales_order' | 'sales_order_price_quote' | 'sales_order_freight_quote' | 'sales_order_price_quote_line' | 'hubspot_sync_job' | 'hubspot_sync_report' | 'hubspot_company_review' | 'hubspot_company_candidate' | 'hubspot_sync_record' | 'contact_match' | 'reply_draft' | 'conversation_link' | 'messaging_group' | 'messaging_group_member' | 'portal_profile' | 'portal_registration_session' | 'portal_registration_session_data' | 'pack_list' | 'pack_list_party' | 'pack_list_line_item' | 'pack_list_back_order' | 'pack_list_case' | 'job' | 'job_result' | 'job_export' | 'analyze_customer_pricing_response' | 'customer_pricing_finding' | 'customer_pricing_summary' | 'computed_rate' | 'computed_quantity' | 'analyze_realized_margins_response' | 'realized_margin_finding' | 'realized_margin_summary' | null;
97
+ /**
98
+ * A single page of resources, together with the metadata needed to page through
99
+ * the rest of the result set.
99
100
  */
100
- results: Array<JobResult>;
101
+ results: ListJobResult | null;
101
102
  /**
102
103
  * When the job began executing.
103
104
  */
104
105
  started_at: string | null;
105
106
  /**
106
- * How far the job has got. `completed` means the work was processed, not that
107
- * every row succeeded — read `errors`.
107
+ * How far the job has got.
108
+ *
109
+ * `completed` means the work was processed, not that every row succeeded — read
110
+ * each entry's own `status` in `results`.
108
111
  */
109
112
  status: 'created' | 'started' | 'completed' | 'failed' | 'cancelled';
110
113
  /**
111
114
  * The kind of work the job carries out.
112
115
  */
113
- type: 'bulkcreate' | 'bulkupsert' | 'export';
116
+ type: 'bulk_create' | 'bulk_upsert' | 'export';
114
117
  /**
115
118
  * When the job was last updated.
116
119
  */
@@ -121,35 +124,77 @@ export interface Job {
121
124
  */
122
125
  export interface JobExport {
123
126
  /**
124
- * Presigned link to the file, valid for five minutes — read the job again for a
125
- * fresh one. It carries its own authorization, so treat it as a credential: do not
126
- * log it, store it, or pass it on.
127
+ * Resource type identifier.
128
+ */
129
+ object: 'job_export';
130
+ /**
131
+ * Presigned link to the file, valid for five minutes.
132
+ *
133
+ * If the link has expired, read the job again for a fresh one.
127
134
  */
128
135
  url: string;
129
136
  }
130
137
  /**
131
- * Accounts for one request row that produced a resource. With `errors`, also
132
- * row-indexed, every submitted row lands in exactly one of the two once the job
133
- * completes.
138
+ * Accounts for one row of the request: the resource it produced, or the error it
139
+ * was rejected with. Every submitted row lands in exactly one of these once the
140
+ * job completes.
134
141
  */
135
142
  export interface JobResult {
136
143
  /**
137
- * ID of the resource this row produced.
138
- */
139
- id: string;
140
- /**
141
- * Whether the resource was created or updated.
144
+ * ResponseError is the JSON-serializable error body returned to API clients. It
145
+ * contains only public information. This struct is used by the OpenAPI schema
146
+ * generator to produce documentation.
142
147
  */
143
- action: 'created' | 'updated';
148
+ error: ResponseError | null;
144
149
  /**
145
150
  * Zero-based row of the request this result names.
146
151
  */
147
152
  index: number;
148
153
  /**
149
- * Resources created alongside this row's own resource — for a bulk production run
150
- * create, the ids of its batches. Omitted for operations that produce none.
154
+ * Resource type identifier.
155
+ */
156
+ object: 'job_result';
157
+ /**
158
+ * Entity is a polymorphic reference to any resource in the system.
159
+ */
160
+ resource: CoreAPI.Entity | null;
161
+ /**
162
+ * What became of the row.
163
+ *
164
+ * - `created`: the row produced a new resource.
165
+ * - `updated`: the row updated an existing resource.
166
+ * - `failed`: the row was rejected and wrote nothing.
167
+ */
168
+ status: 'created' | 'updated' | 'failed';
169
+ /**
170
+ * A single page of resources, together with the metadata needed to page through
171
+ * the rest of the result set.
172
+ */
173
+ sub_resources: CoreAPI.ListEntity | null;
174
+ }
175
+ /**
176
+ * A single page of resources, together with the metadata needed to page through
177
+ * the rest of the result set.
178
+ */
179
+ export interface ListJobResult {
180
+ /**
181
+ * Resources in this page.
182
+ */
183
+ data: Array<JobResult>;
184
+ /**
185
+ * Resource type identifier.
186
+ */
187
+ object: 'list';
188
+ /**
189
+ * PageInfo describes where the current page sits within a paginated result set and
190
+ * how to move to the adjacent pages.
191
+ *
192
+ * Page a list by following the URLs below rather than assembling cursors yourself.
193
+ * For a top-level list endpoint the URL repeats the original request's query
194
+ * string with only the cursor swapped, so following it preserves the same filters,
195
+ * search term, and page size.
151
196
  */
152
- sub_resource_ids?: Array<string>;
197
+ page_info: APIKeysAPI.PageInfo;
153
198
  }
154
199
  /**
155
200
  * QuotaInfo provides machine-readable details about a plan-imposed resource limit.
@@ -213,24 +258,21 @@ export interface ResponseError {
213
258
  */
214
259
  type: 'api_error' | 'idempotency_error' | 'invalid_request_error';
215
260
  }
216
- /**
217
- * pairs one row of a bulk request with the failure it produced; a failure of the
218
- * request as a whole carries no index
219
- */
220
- export interface RowError {
261
+ export interface JobRetrieveParams {
221
262
  /**
222
- * ResponseError is the JSON-serializable error body returned to API clients. It
223
- * contains only public information. This struct is used by the OpenAPI schema
224
- * generator to produce documentation.
263
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
264
+ * `null`.
225
265
  */
226
- error: ResponseError;
266
+ include?: Array<'created_by' | 'created_by.role'>;
267
+ }
268
+ export interface JobCancelParams {
227
269
  /**
228
- * Zero-based row of the request this failure names. Absent for a failure of the
229
- * whole request.
270
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
271
+ * `null`.
230
272
  */
231
- index?: number;
273
+ include?: Array<'created_by' | 'created_by.role'>;
232
274
  }
233
275
  export declare namespace Jobs {
234
- export { type Job as Job, type JobExport as JobExport, type JobResult as JobResult, type QuotaInfo as QuotaInfo, type ResponseError as ResponseError, type RowError as RowError, };
276
+ export { type Job as Job, type JobExport as JobExport, type JobResult as JobResult, type ListJobResult as ListJobResult, type QuotaInfo as QuotaInfo, type ResponseError as ResponseError, type JobRetrieveParams as JobRetrieveParams, type JobCancelParams as JobCancelParams, };
235
277
  }
236
278
  //# sourceMappingURL=jobs.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.d.mts","sourceRoot":"","sources":["../../src/resources/core/jobs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;IAI/D;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;CAG9D;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IAC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OAIG;IACH,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAExB;;;OAGG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,IAAI,EAAE,WAAW,GAAG,mBAAmB,GAAG,uBAAuB,CAAC;CACnE;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,iBAAiB,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,iBAAiB,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,GAAG,IAAI,GAAG,EACf,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
@@ -1,4 +1,7 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
+ import * as CoreAPI from "./core.js";
3
+ import * as RequestLogsAPI from "./request-logs.js";
4
+ import * as APIKeysAPI from "../auth/api-keys/api-keys.js";
2
5
  import { APIPromise } from "../../core/api-promise.js";
3
6
  import { RequestOptions } from "../../internal/request-options.js";
4
7
  /**
@@ -10,27 +13,32 @@ export declare class Jobs extends APIResource {
10
13
  * `Location` to observe its outcome. A completed export carries the link to its
11
14
  * file on `export.url`.
12
15
  *
16
+ * This endpoint requires the permissions: `jobs:read`, `customers:read`,
17
+ * `suppliers:read`.
18
+ *
13
19
  * @example
14
20
  * ```ts
15
21
  * const job = await client.core.jobs.retrieve(
16
- * 'jb_01k0a5smf9ekb8rqg1',
22
+ * 'jb_grz7cdpnz8jr',
17
23
  * );
18
24
  * ```
19
25
  */
20
- retrieve(id: string, options?: RequestOptions): APIPromise<Job>;
26
+ retrieve(id: string, query?: JobRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Job>;
21
27
  /**
22
28
  * Cancels a job and returns it carrying its `cancelled` status. Work in flight is
23
29
  * not interrupted but can no longer settle, and a finished job cannot be
24
30
  * cancelled.
25
31
  *
32
+ * This endpoint requires the permission: `jobs:delete`.
33
+ *
26
34
  * @example
27
35
  * ```ts
28
36
  * const job = await client.core.jobs.cancel(
29
- * 'jb_01k0a5smf9ekb8rqg1',
37
+ * 'jb_grz7cdpnz8jr',
30
38
  * );
31
39
  * ```
32
40
  */
33
- cancel(id: string, options?: RequestOptions): APIPromise<Job>;
41
+ cancel(id: string, params?: JobCancelParams | null | undefined, options?: RequestOptions): APIPromise<Job>;
34
42
  }
35
43
  /**
36
44
  * Records a piece of work the API accepted and carries out asynchronously.
@@ -55,30 +63,16 @@ export interface Job {
55
63
  */
56
64
  created_at: string;
57
65
  /**
58
- * Email of the account user who requested the work.
59
- */
60
- created_by_email: string | null;
61
- /**
62
- * The ID of the account user who requested the work.
66
+ * Reference to an actor — the user, API key, agent, or group identity associated
67
+ * with an action.
63
68
  */
64
- created_by_id: string | null;
69
+ created_by: RequestLogsAPI.Actor | null;
65
70
  /**
66
- * Name of the account user who requested the work.
67
- */
68
- created_by_name: string | null;
69
- /**
70
- * Username of the account user who requested the work.
71
- */
72
- created_by_username: string | null;
73
- /**
74
- * A one-line reason the last attempt failed.
75
- */
76
- error_summary: string | null;
77
- /**
78
- * One entry per failure, so a `completed` job can still carry failed rows. A
79
- * whole-job failure records a single entry with no `index`.
71
+ * ResponseError is the JSON-serializable error body returned to API clients. It
72
+ * contains only public information. This struct is used by the OpenAPI schema
73
+ * generator to produce documentation.
80
74
  */
81
- errors: Array<RowError>;
75
+ error: ResponseError | null;
82
76
  /**
83
77
  * Points a completed export job at the file it produced.
84
78
  */
@@ -93,24 +87,33 @@ export interface Job {
93
87
  */
94
88
  object: 'job';
95
89
  /**
96
- * One entry per request row that produced a resource. A bulk create records these
97
- * when it accepts the request, so they stay provisional until `status` is
98
- * `completed`.
90
+ * The kind of resource the job operates on, as an object-type value (e.g.
91
+ * `product`).
92
+ *
93
+ * `type` names the verb — what the job does — and this names the subject, so a job
94
+ * that produced no results still says what it was for.
95
+ */
96
+ resource_type: 'account' | 'actor' | 'entity' | 'record' | 'freight' | 'sales_order_totals' | 'sales_order_stage_total' | 'sales_order_related' | 'order_contact' | 'user' | 'address' | 'api_key' | 'created_api_key' | 'refresh_token' | 'list' | 'sandbox' | 'registration_session' | 'pricing_plan' | 'account_plan' | 'plan_change' | 'enterprise_inquiry' | 'request_log' | 'audit_event' | 'audit_field_change' | 'role' | 'unit' | 'account_affiliation' | 'agent_definition' | 'available_tool' | 'agent_definition_tool' | 'agent_account_status' | 'agent_run' | 'agent_action' | 'agent_run_step' | 'agent_token_usage' | 'agent_memory' | 'notification' | 'notification_unread_count' | 'notification_send_result' | 'notification_unread_summary' | 'announcement' | 'conversation' | 'support_case' | 'conversation_participant' | 'read_cursor' | 'chat_message' | 'notification_unread_summary_account' | 'messaging_block' | 'notification_preference' | 'message_attachment' | 'attachment_upload_target' | 'scheduled_message' | 'messaging_contact' | 'message_report' | 'tool_group' | 'model' | 'payment_term' | 'shipping_term' | 'quantity' | 'account_group' | 'support_route' | 'support_availability' | 'account_status' | 'geolocation' | 'account_user' | 'department' | 'account_integration' | 'account_price' | 'product_line' | 'item_category' | 'attribute' | 'rate' | 'account_group_product_line_access' | 'sales_target' | 'adjustment_type' | 'account_branding' | 'account_portal' | 'account_logo_url' | 'account_favicon_url' | 'public_account' | 'property' | 'carrier' | 'service_level' | 'item' | 'item_lot_default' | 'item_inventory' | 'product' | 'batch' | 'batch_flow_node' | 'scanning_consumption' | 'open_batch_summary' | 'scanning_production_step_info' | 'scanning_station' | 'production_step' | 'production_run' | 'machine' | 'machine_status' | 'machine_downtime_event' | 'demand_override' | 'demand_override_type' | 'machine_downtime_reason' | 'production_schedule_preview' | 'production_schedule_regenerate_preview' | 'production_schedule' | 'production_schedule_line' | 'production_schedule_deviation' | 'production_schedule_derived_line' | 'production_schedule_settings' | 'production_schedule_resource_setting' | 'production_schedule_item_setting' | 'fulfillment_recommendation' | 'analyze_delivery_performance_response' | 'delivery_performance' | 'delivery_backlog_bucket' | 'delivery_lateness_bucket' | 'delivery_breakdown' | 'schedule_order_coverage' | 'schedule_order_coverage_line' | 'promise_date_quote' | 'schedule_deviation_type' | 'schedule_at_risk_order' | 'production_schedule_finished_policy' | 'production_schedule_week_release' | 'production_schedule_week_release_preview' | 'production_schedule_item_policy' | 'child_account' | 'unit_group' | 'unit_group_unit' | 'consumption' | 'customer_product_line_access' | 'customer' | 'frequently_ordered_product' | 'priority' | 'delivery' | 'delivery_line' | 'sales_order' | 'location' | 'location_type' | 'lot' | 'email_log' | 'email_domain' | 'email_inbox' | 'portal_domain' | 'dns_record' | 'inventory_change_log' | 'invoice' | 'invoice_summary' | 'invoice_line' | 'invoice_allocation' | 'invoice_for_payment' | 'shipment' | 'shipment_summary' | 'shipment_line' | 'shipping_case' | 'shipping_case_label_url' | 'settlement' | 'settlement_summary' | 'role_permission' | 'registration_flow' | 'registration_flow_option' | 'transaction' | 'transaction_summary' | 'transaction_method' | 'transaction_type' | 'transaction_allocation' | 'usage_item' | 'account_usage_response' | 'subscription_info' | 'billing_portal_session_response' | 'switch_plan_response' | 'ensure_billing_customer_response' | 'spending_cap_response' | 'agent_spend_info' | 'webhook_response' | 'address_suggestion' | 'address_components' | 'address_details_result' | 'validated_address' | 'plan_limit' | 'plan_change_proration' | 'plan_change_line_item' | 'setup_billing_response' | 'confirm_payment_response' | 'oauth_response' | 'oauth_status_response' | 'stripe_publishable_key' | 'stripe_status' | 'healthcheck' | 'agent_definition_config' | 'trigger_config' | 'customer_contact_info' | 'customer_freight_preferences' | 'customer_defaults' | 'customer_lead_time' | 'customer_notification_preferences' | 'order_notification_recipient' | 'order_discount' | 'sales_order_line' | 'sales_order_type' | 'sales_order_status' | 'material' | 'supplier_material' | 'part' | 'permission_group' | 'permission' | 'pick' | 'pick_line' | 'product_type' | 'production' | 'production_flow' | 'map' | 'purchase_order' | 'purchase_order_line' | 'supplier' | 'supplier_summary' | 'receivable_entry' | 'receiving_order' | 'receiving_order_line' | 'email_contact' | 'allocation_entry' | 'open_credit_entry' | 'volume_discount' | 'volume_discount_tier' | 'analyze_deliveries_response' | 'analyze_manufacturing_response' | 'analyze_manufacturing_batch_response' | 'analyze_quarterly_orders_response' | 'analyze_new_customers_response' | 'analyze_demand_forecast_response' | 'analyze_oee_response' | 'analyze_oee_trend_response' | 'analyze_schedule_attainment_response' | 'catalog_product_line' | 'catalog_category' | 'catalog_product' | 'catalog_property' | 'catalog_attribute' | 'dc_location' | 'edi_run' | 'inventory_item' | 'analyze_weeks_of_sales_response' | 'bulk_reconcile_items_response' | 'sys_property' | 'sys_property_type' | 'sys_property_value' | 'territory' | 'tenancy' | 'checkout_session' | 'estimate_rate_result' | 'rate_shop_option' | 'rate_shop_result' | 'owner' | 'created_by' | 'message' | 'account_photo_upload_result' | 'user_photo_upload_result' | 'user_photo_url' | 'batch_lot' | 'check_duplicate_result' | 'item_trend_point' | 'pack_pick_response' | 'pick_shipments_response' | 'tenancy_pending_registration' | 'invoice_allocation_entry' | 'allocation_customer' | 'checkout_sales_order' | 'sales_order_price_quote' | 'sales_order_freight_quote' | 'sales_order_price_quote_line' | 'hubspot_sync_job' | 'hubspot_sync_report' | 'hubspot_company_review' | 'hubspot_company_candidate' | 'hubspot_sync_record' | 'contact_match' | 'reply_draft' | 'conversation_link' | 'messaging_group' | 'messaging_group_member' | 'portal_profile' | 'portal_registration_session' | 'portal_registration_session_data' | 'pack_list' | 'pack_list_party' | 'pack_list_line_item' | 'pack_list_back_order' | 'pack_list_case' | 'job' | 'job_result' | 'job_export' | 'analyze_customer_pricing_response' | 'customer_pricing_finding' | 'customer_pricing_summary' | 'computed_rate' | 'computed_quantity' | 'analyze_realized_margins_response' | 'realized_margin_finding' | 'realized_margin_summary' | null;
97
+ /**
98
+ * A single page of resources, together with the metadata needed to page through
99
+ * the rest of the result set.
99
100
  */
100
- results: Array<JobResult>;
101
+ results: ListJobResult | null;
101
102
  /**
102
103
  * When the job began executing.
103
104
  */
104
105
  started_at: string | null;
105
106
  /**
106
- * How far the job has got. `completed` means the work was processed, not that
107
- * every row succeeded — read `errors`.
107
+ * How far the job has got.
108
+ *
109
+ * `completed` means the work was processed, not that every row succeeded — read
110
+ * each entry's own `status` in `results`.
108
111
  */
109
112
  status: 'created' | 'started' | 'completed' | 'failed' | 'cancelled';
110
113
  /**
111
114
  * The kind of work the job carries out.
112
115
  */
113
- type: 'bulkcreate' | 'bulkupsert' | 'export';
116
+ type: 'bulk_create' | 'bulk_upsert' | 'export';
114
117
  /**
115
118
  * When the job was last updated.
116
119
  */
@@ -121,35 +124,77 @@ export interface Job {
121
124
  */
122
125
  export interface JobExport {
123
126
  /**
124
- * Presigned link to the file, valid for five minutes — read the job again for a
125
- * fresh one. It carries its own authorization, so treat it as a credential: do not
126
- * log it, store it, or pass it on.
127
+ * Resource type identifier.
128
+ */
129
+ object: 'job_export';
130
+ /**
131
+ * Presigned link to the file, valid for five minutes.
132
+ *
133
+ * If the link has expired, read the job again for a fresh one.
127
134
  */
128
135
  url: string;
129
136
  }
130
137
  /**
131
- * Accounts for one request row that produced a resource. With `errors`, also
132
- * row-indexed, every submitted row lands in exactly one of the two once the job
133
- * completes.
138
+ * Accounts for one row of the request: the resource it produced, or the error it
139
+ * was rejected with. Every submitted row lands in exactly one of these once the
140
+ * job completes.
134
141
  */
135
142
  export interface JobResult {
136
143
  /**
137
- * ID of the resource this row produced.
138
- */
139
- id: string;
140
- /**
141
- * Whether the resource was created or updated.
144
+ * ResponseError is the JSON-serializable error body returned to API clients. It
145
+ * contains only public information. This struct is used by the OpenAPI schema
146
+ * generator to produce documentation.
142
147
  */
143
- action: 'created' | 'updated';
148
+ error: ResponseError | null;
144
149
  /**
145
150
  * Zero-based row of the request this result names.
146
151
  */
147
152
  index: number;
148
153
  /**
149
- * Resources created alongside this row's own resource — for a bulk production run
150
- * create, the ids of its batches. Omitted for operations that produce none.
154
+ * Resource type identifier.
155
+ */
156
+ object: 'job_result';
157
+ /**
158
+ * Entity is a polymorphic reference to any resource in the system.
159
+ */
160
+ resource: CoreAPI.Entity | null;
161
+ /**
162
+ * What became of the row.
163
+ *
164
+ * - `created`: the row produced a new resource.
165
+ * - `updated`: the row updated an existing resource.
166
+ * - `failed`: the row was rejected and wrote nothing.
167
+ */
168
+ status: 'created' | 'updated' | 'failed';
169
+ /**
170
+ * A single page of resources, together with the metadata needed to page through
171
+ * the rest of the result set.
172
+ */
173
+ sub_resources: CoreAPI.ListEntity | null;
174
+ }
175
+ /**
176
+ * A single page of resources, together with the metadata needed to page through
177
+ * the rest of the result set.
178
+ */
179
+ export interface ListJobResult {
180
+ /**
181
+ * Resources in this page.
182
+ */
183
+ data: Array<JobResult>;
184
+ /**
185
+ * Resource type identifier.
186
+ */
187
+ object: 'list';
188
+ /**
189
+ * PageInfo describes where the current page sits within a paginated result set and
190
+ * how to move to the adjacent pages.
191
+ *
192
+ * Page a list by following the URLs below rather than assembling cursors yourself.
193
+ * For a top-level list endpoint the URL repeats the original request's query
194
+ * string with only the cursor swapped, so following it preserves the same filters,
195
+ * search term, and page size.
151
196
  */
152
- sub_resource_ids?: Array<string>;
197
+ page_info: APIKeysAPI.PageInfo;
153
198
  }
154
199
  /**
155
200
  * QuotaInfo provides machine-readable details about a plan-imposed resource limit.
@@ -213,24 +258,21 @@ export interface ResponseError {
213
258
  */
214
259
  type: 'api_error' | 'idempotency_error' | 'invalid_request_error';
215
260
  }
216
- /**
217
- * pairs one row of a bulk request with the failure it produced; a failure of the
218
- * request as a whole carries no index
219
- */
220
- export interface RowError {
261
+ export interface JobRetrieveParams {
221
262
  /**
222
- * ResponseError is the JSON-serializable error body returned to API clients. It
223
- * contains only public information. This struct is used by the OpenAPI schema
224
- * generator to produce documentation.
263
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
264
+ * `null`.
225
265
  */
226
- error: ResponseError;
266
+ include?: Array<'created_by' | 'created_by.role'>;
267
+ }
268
+ export interface JobCancelParams {
227
269
  /**
228
- * Zero-based row of the request this failure names. Absent for a failure of the
229
- * whole request.
270
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
271
+ * `null`.
230
272
  */
231
- index?: number;
273
+ include?: Array<'created_by' | 'created_by.role'>;
232
274
  }
233
275
  export declare namespace Jobs {
234
- export { type Job as Job, type JobExport as JobExport, type JobResult as JobResult, type QuotaInfo as QuotaInfo, type ResponseError as ResponseError, type RowError as RowError, };
276
+ export { type Job as Job, type JobExport as JobExport, type JobResult as JobResult, type ListJobResult as ListJobResult, type QuotaInfo as QuotaInfo, type ResponseError as ResponseError, type JobRetrieveParams as JobRetrieveParams, type JobCancelParams as JobCancelParams, };
235
277
  }
236
278
  //# sourceMappingURL=jobs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/resources/core/jobs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;IAI/D;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,GAAG,CAAC;CAG9D;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAClB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,YAAY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ACH,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAExB;;;OAGG;IACH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,IAAI,EAAE,WAAW,GAAG,mBAAmB,GAAG,uBAAuB,CAAC;CACnE;AAED,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,iBAAiB,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,iBAAiB,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,GAAG,IAAI,GAAG,EACf,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
@@ -13,30 +13,36 @@ class Jobs extends resource_1.APIResource {
13
13
  * `Location` to observe its outcome. A completed export carries the link to its
14
14
  * file on `export.url`.
15
15
  *
16
+ * This endpoint requires the permissions: `jobs:read`, `customers:read`,
17
+ * `suppliers:read`.
18
+ *
16
19
  * @example
17
20
  * ```ts
18
21
  * const job = await client.core.jobs.retrieve(
19
- * 'jb_01k0a5smf9ekb8rqg1',
22
+ * 'jb_grz7cdpnz8jr',
20
23
  * );
21
24
  * ```
22
25
  */
23
- retrieve(id, options) {
24
- return this._client.get((0, path_1.path) `/v1/core/jobs/${id}`, options);
26
+ retrieve(id, query = {}, options) {
27
+ return this._client.get((0, path_1.path) `/v1/core/jobs/${id}`, { query, ...options });
25
28
  }
26
29
  /**
27
30
  * Cancels a job and returns it carrying its `cancelled` status. Work in flight is
28
31
  * not interrupted but can no longer settle, and a finished job cannot be
29
32
  * cancelled.
30
33
  *
34
+ * This endpoint requires the permission: `jobs:delete`.
35
+ *
31
36
  * @example
32
37
  * ```ts
33
38
  * const job = await client.core.jobs.cancel(
34
- * 'jb_01k0a5smf9ekb8rqg1',
39
+ * 'jb_grz7cdpnz8jr',
35
40
  * );
36
41
  * ```
37
42
  */
38
- cancel(id, options) {
39
- return this._client.post((0, path_1.path) `/v1/core/jobs/${id}/cancel`, options);
43
+ cancel(id, params = {}, options) {
44
+ const { include } = params ?? {};
45
+ return this._client.post((0, path_1.path) `/v1/core/jobs/${id}/cancel`, { query: { include }, ...options });
40
46
  }
41
47
  }
42
48
  exports.Jobs = Jobs;