@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
@@ -0,0 +1,1191 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as BlocksAPI from '../../messaging/blocks';
5
+ import * as AccountGroupsAPI from '../account-groups';
6
+ import * as APIKeysAPI from '../../auth/api-keys/api-keys';
7
+ import * as ItemCategoriesAPI from '../../catalog/item-categories/item-categories';
8
+ import * as ItemsAPI from '../../catalog/items/items';
9
+ import * as MaterialsAPI from '../../catalog/materials/materials';
10
+ import * as ProductLinesAPI from '../../catalog/product-lines/product-lines';
11
+ import * as PropertiesAPI from '../../catalog/properties/properties';
12
+ import * as ActionsAPI from './actions';
13
+ import { ActionExportPriceListParams, Actions, ExportPriceListRequest } from './actions';
14
+ import { APIPromise } from '../../../core/api-promise';
15
+ import { RequestOptions } from '../../../internal/request-options';
16
+ import { path } from '../../../internal/utils/path';
17
+
18
+ /**
19
+ * List and manage account prices.
20
+ */
21
+ export class AccountPrices extends APIResource {
22
+ actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client);
23
+
24
+ /**
25
+ * Returns a paginated list of account prices, newest first.
26
+ *
27
+ * The search term matches the recipient customer's name or their customer number.
28
+ * Customer portal users always see only the prices that apply to their own
29
+ * account, whatever `recipient_account_id` is set to.
30
+ *
31
+ * This endpoint requires the permissions: `discounts:read`, `customers:read`,
32
+ * `suppliers:read`.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const listAccountPrice =
37
+ * await client.sales.accountPrices.list();
38
+ * ```
39
+ */
40
+ list(
41
+ query: AccountPriceListParams | null | undefined = {},
42
+ options?: RequestOptions,
43
+ ): APIPromise<ListAccountPrice> {
44
+ return this._client.get('/v1/sales/account-prices', { query, ...options });
45
+ }
46
+
47
+ /**
48
+ * Returns an account price by ID.
49
+ *
50
+ * A customer portal user can only retrieve a price whose recipient is their own
51
+ * account or its parent; any other price is reported as not found.
52
+ *
53
+ * This endpoint requires the permissions: `discounts:read`, `customers:read`,
54
+ * `suppliers:read`.
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const accountPrice =
59
+ * await client.sales.accountPrices.retrieve(
60
+ * 'acpr_7l4j483kf32p',
61
+ * );
62
+ * ```
63
+ */
64
+ retrieve(
65
+ id: string,
66
+ query: AccountPriceRetrieveParams | null | undefined = {},
67
+ options?: RequestOptions,
68
+ ): APIPromise<AccountPrice> {
69
+ return this._client.get(path`/v1/sales/account-prices/${id}`, { query, ...options });
70
+ }
71
+
72
+ /**
73
+ * Creates a customer-specific price for a product line.
74
+ *
75
+ * When a sales order line for the recipient matches the price's product line and
76
+ * attributes, this price replaces the unit price the line would otherwise be
77
+ * given, including the effect of any volume discount. If more than one account
78
+ * price matches a line, the most recently created one wins.
79
+ *
80
+ * This endpoint requires the permission: `discounts:create`.
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * const accountPrice =
85
+ * await client.sales.accountPrices.create({
86
+ * product_line_id: 'pdln_k9bnlgvxhxjh',
87
+ * rate: {
88
+ * value: '25.50',
89
+ * numerator_unit_id: 'un_82bd37dae5po',
90
+ * denominator_unit_id: 'un_82bd37dae5po',
91
+ * },
92
+ * recipient_account_id: 'ac_ykxoradjoeb3',
93
+ * attribute_ids: ['at_rf1w295jt5ia'],
94
+ * category_ids: ['ic_d06g9c6yc9ck'],
95
+ * });
96
+ * ```
97
+ */
98
+ create(params: AccountPriceCreateParams, options?: RequestOptions): APIPromise<AccountPrice> {
99
+ const { include, ...body } = params;
100
+ return this._client.post('/v1/sales/account-prices', { query: { include }, body, ...options });
101
+ }
102
+
103
+ /**
104
+ * Partially updates an account price.
105
+ *
106
+ * Only the provided fields are changed. If `category_ids` or `attribute_ids` are
107
+ * provided, they replace the existing set entirely.
108
+ *
109
+ * Order lines that have already been priced keep the unit price they were given;
110
+ * the new price applies to lines priced after the change.
111
+ *
112
+ * This endpoint requires the permission: `discounts:update`.
113
+ *
114
+ * @example
115
+ * ```ts
116
+ * const accountPrice =
117
+ * await client.sales.accountPrices.update(
118
+ * 'acpr_7l4j483kf32p',
119
+ * {
120
+ * rate: {
121
+ * value: '30.000000000000000000000000000000',
122
+ * numerator_unit_id: 'un_82bd37dae5po',
123
+ * denominator_unit_id: 'un_82bd37dae5po',
124
+ * },
125
+ * },
126
+ * );
127
+ * ```
128
+ */
129
+ update(
130
+ id: string,
131
+ params: AccountPriceUpdateParams | null | undefined = {},
132
+ options?: RequestOptions,
133
+ ): APIPromise<AccountPrice> {
134
+ const { include, ...body } = params ?? {};
135
+ return this._client.patch(path`/v1/sales/account-prices/${id}`, { query: { include }, body, ...options });
136
+ }
137
+
138
+ /**
139
+ * Deletes an account price.
140
+ *
141
+ * The price's category and attribute associations and its rate record are removed
142
+ * with it. Deletion is permanent; further requests against the deleted ID return
143
+ * an error.
144
+ *
145
+ * Order lines that have already been priced keep the unit price they were given;
146
+ * only lines priced after the deletion revert to standard pricing.
147
+ *
148
+ * This endpoint requires the permission: `discounts:delete`.
149
+ *
150
+ * @example
151
+ * ```ts
152
+ * const accountPrice =
153
+ * await client.sales.accountPrices.delete(
154
+ * 'acpr_7l4j483kf32p',
155
+ * );
156
+ * ```
157
+ */
158
+ delete(id: string, options?: RequestOptions): APIPromise<AccountPriceDeleteResponse> {
159
+ return this._client.delete(path`/v1/sales/account-prices/${id}`, options);
160
+ }
161
+ }
162
+
163
+ /**
164
+ * A customer-specific price for a product line.
165
+ *
166
+ * When a sales order line matches an account price, that price replaces the unit
167
+ * price the line would otherwise be given — including the effect of any volume
168
+ * discount — rather than discounting it. If more than one account price matches a
169
+ * line, the most recently created one wins.
170
+ */
171
+ export interface AccountPrice {
172
+ /**
173
+ * Account price ID.
174
+ */
175
+ id: string;
176
+
177
+ /**
178
+ * A single page of resources, together with the metadata needed to page through
179
+ * the rest of the result set.
180
+ */
181
+ attributes: PropertiesAPI.ListAttribute | null;
182
+
183
+ /**
184
+ * A single page of resources, together with the metadata needed to page through
185
+ * the rest of the result set.
186
+ */
187
+ categories: ItemCategoriesAPI.ListItemCategory | null;
188
+
189
+ /**
190
+ * Creation timestamp.
191
+ */
192
+ created_at: string;
193
+
194
+ /**
195
+ * Resource type identifier.
196
+ */
197
+ object: 'account_price';
198
+
199
+ /**
200
+ * A named grouping of related products in your catalog.
201
+ *
202
+ * A product line carries the default commission and freight policies for the
203
+ * products assigned to it, along with the unit group that determines how those
204
+ * products are measured. Product lines are also the unit that catalog access is
205
+ * granted over, for both customers and account groups.
206
+ */
207
+ product_line: ProductLinesAPI.ProductLine | null;
208
+
209
+ /**
210
+ * Value expressed as a ratio of two units, such as a price per kilogram or a
211
+ * throughput per hour.
212
+ */
213
+ rate: ItemsAPI.Rate | null;
214
+
215
+ /**
216
+ * A business you sell to, with its contact details, default fulfillment settings,
217
+ * and order policies.
218
+ */
219
+ recipient_account: Customer | null;
220
+
221
+ /**
222
+ * Last updated timestamp.
223
+ */
224
+ updated_at: string;
225
+ }
226
+
227
+ /**
228
+ * A shipping carrier configured for fulfilling orders.
229
+ *
230
+ * Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected
231
+ * through Shippo for live rating and label purchase; other carriers represent
232
+ * self-managed shipping methods such as will call or local delivery.
233
+ */
234
+ export interface Carrier {
235
+ /**
236
+ * Carrier ID.
237
+ */
238
+ id: string;
239
+
240
+ /**
241
+ * Your account number with this carrier.
242
+ *
243
+ * UPS and USPS carrier accounts are connected to Shippo using this number; FedEx
244
+ * carriers authorize through OAuth instead, so their account number is not used to
245
+ * connect them.
246
+ */
247
+ account_number: string | null;
248
+
249
+ /**
250
+ * Well-known carrier identifier, set only for recognized carriers and absent for
251
+ * custom ones.
252
+ *
253
+ * - `fedex`, `ups`, `usps`: integrated carriers managed through Shippo (live
254
+ * rating and labels).
255
+ * - `will_call`: customer picks the order up; no carrier shipment.
256
+ * - `delivery`: delivered by your own vehicles/drivers.
257
+ * - `ltl`, `ltl1`: less-than-truckload freight carriers.
258
+ * - `freight_collect`: freight billed to and arranged by the receiver.
259
+ */
260
+ code: 'fedex' | 'ups' | 'usps' | 'will_call' | 'delivery' | 'ltl' | 'ltl1' | 'freight_collect' | null;
261
+
262
+ /**
263
+ * Creation timestamp.
264
+ */
265
+ created_at: string;
266
+
267
+ /**
268
+ * Whether customers can see and select this carrier at checkout in the customer
269
+ * portal.
270
+ */
271
+ customer_portal_visibility: 'visible' | 'hidden';
272
+
273
+ /**
274
+ * Soft-delete timestamp.
275
+ */
276
+ deleted_at: string | null;
277
+
278
+ /**
279
+ * Human-readable name for the carrier, unique among the carriers visible to your
280
+ * account.
281
+ */
282
+ name: string;
283
+
284
+ /**
285
+ * Resource type identifier.
286
+ */
287
+ object: 'carrier';
288
+
289
+ /**
290
+ * Owner describes the provenance of a resource.
291
+ */
292
+ owner: APIKeysAPI.Owner | null;
293
+
294
+ /**
295
+ * A single page of resources, together with the metadata needed to page through
296
+ * the rest of the result set.
297
+ */
298
+ service_levels: ListServiceLevel | null;
299
+
300
+ /**
301
+ * Last updated timestamp.
302
+ */
303
+ updated_at: string;
304
+ }
305
+
306
+ /**
307
+ * Request to create an account price.
308
+ */
309
+ export interface CreateAccountPriceRequest {
310
+ /**
311
+ * ID of the product line whose products this price applies to.
312
+ */
313
+ product_line_id: string;
314
+
315
+ /**
316
+ * A value expressed as a ratio of two units, supplied on create and update
317
+ * requests.
318
+ *
319
+ * A unit price, for example, has a currency as its numerator unit and the unit the
320
+ * product is bought or sold by as its denominator.
321
+ */
322
+ rate: MaterialsAPI.RateInput;
323
+
324
+ /**
325
+ * ID of the customer this price is offered to.
326
+ *
327
+ * A price recorded against a parent customer account also applies to orders placed
328
+ * by its child accounts.
329
+ */
330
+ recipient_account_id: string;
331
+
332
+ /**
333
+ * Attribute IDs to constrain this price to.
334
+ *
335
+ * When set, the price applies only to items that have every listed attribute.
336
+ */
337
+ attribute_ids?: Array<string>;
338
+
339
+ /**
340
+ * Item category IDs to record on this price.
341
+ *
342
+ * Order pricing matches an account price on its product line and attributes only,
343
+ * so categories recorded here do not narrow which products the price applies to.
344
+ */
345
+ category_ids?: Array<string>;
346
+ }
347
+
348
+ /**
349
+ * A business you sell to, with its contact details, default fulfillment settings,
350
+ * and order policies.
351
+ */
352
+ export interface Customer {
353
+ /**
354
+ * Customer ID.
355
+ */
356
+ id: string;
357
+
358
+ /**
359
+ * A saved address that can be used for billing and shipping on sales orders,
360
+ * invoices, and shipments.
361
+ */
362
+ bill_to_address: APIKeysAPI.Address | null;
363
+
364
+ /**
365
+ * A single page of resources, together with the metadata needed to page through
366
+ * the rest of the result set.
367
+ */
368
+ child_accounts: ListCustomer | null;
369
+
370
+ /**
371
+ * How sales commission applies to this customer's orders.
372
+ *
373
+ * - `commission_exempt`: this customer's orders are exempt from sales commission.
374
+ * - `commission_applied`: sales commission is calculated on this customer's
375
+ * orders.
376
+ *
377
+ * The customer counts as exempt if this field, its `type` group, or any of its
378
+ * `price_groups` is `commission_exempt`. Exempt customers never have a sales rep
379
+ * assigned automatically when an order is created without one.
380
+ */
381
+ commission_policy: 'commission_applied' | 'commission_exempt';
382
+
383
+ /**
384
+ * Customer contact information.
385
+ */
386
+ contact_info: CustomerContactInfo | null;
387
+
388
+ /**
389
+ * Creation timestamp.
390
+ */
391
+ created_at: string;
392
+
393
+ /**
394
+ * A measured amount: a numeric value together with the unit it is expressed in.
395
+ *
396
+ * Quantities are shared building blocks rather than standalone records — other
397
+ * resources point at them to report stock levels, ordered and packed amounts,
398
+ * money, weights, and durations.
399
+ */
400
+ credit_limit: ItemsAPI.Quantity | null;
401
+
402
+ /**
403
+ * Values used to fill in a new sales order for this customer when the order does
404
+ * not supply its own.
405
+ */
406
+ defaults: CustomerDefaults | null;
407
+
408
+ /**
409
+ * Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and
410
+ * documents with this customer.
411
+ */
412
+ edi_status: 'enabled' | 'disabled';
413
+
414
+ /**
415
+ * Customer freight and carrier settings.
416
+ */
417
+ freight_preferences: CustomerFreightPreferences | null;
418
+
419
+ /**
420
+ * The customer's business name, as shown throughout the app and on documents.
421
+ */
422
+ name: string;
423
+
424
+ /**
425
+ * Free-form note about the customer.
426
+ */
427
+ note: string | null;
428
+
429
+ /**
430
+ * Customer notification settings.
431
+ */
432
+ notification_preferences: CustomerNotificationPreferences | null;
433
+
434
+ /**
435
+ * Human-readable customer number used to identify the account, distinct from the
436
+ * `id`.
437
+ *
438
+ * Unique within your account.
439
+ */
440
+ number: string;
441
+
442
+ /**
443
+ * Resource type identifier.
444
+ */
445
+ object: 'customer';
446
+
447
+ /**
448
+ * A business you sell to, with its contact details, default fulfillment settings,
449
+ * and order policies.
450
+ */
451
+ parent_account: Customer | null;
452
+
453
+ /**
454
+ * A single page of resources, together with the metadata needed to page through
455
+ * the rest of the result set.
456
+ */
457
+ price_groups: AccountGroupsAPI.ListAccountGroup | null;
458
+
459
+ /**
460
+ * The customer's position in the account hierarchy.
461
+ *
462
+ * - `standalone`: no parent or child accounts.
463
+ * - `parent`: has one or more child accounts (see `child_accounts`).
464
+ * - `child`: belongs to a parent account (see `parent_account`).
465
+ */
466
+ relationship_type: 'standalone' | 'parent' | 'child';
467
+
468
+ /**
469
+ * A saved address that can be used for billing and shipping on sales orders,
470
+ * invoices, and shipments.
471
+ */
472
+ ship_to_address: APIKeysAPI.Address | null;
473
+
474
+ /**
475
+ * The customer's account standing.
476
+ *
477
+ * - `normal`: standard account with no restrictions.
478
+ * - `preferred`: account flagged for prioritized handling.
479
+ * - `hold_shipment`: the customer's shipments should be held, typically over a
480
+ * credit problem, while orders can still be placed.
481
+ * - `hold_all`: all activity for the customer should be held.
482
+ *
483
+ * The hold statuses are advisory: Augno flags the customer's orders as being on
484
+ * credit hold, but requests to create orders or shipments for the customer are not
485
+ * rejected.
486
+ */
487
+ status: 'normal' | 'preferred' | 'hold_shipment' | 'hold_all';
488
+
489
+ /**
490
+ * A named grouping of customer accounts, used for pricing rules or to categorize
491
+ * accounts.
492
+ *
493
+ * A customer carries at most one group of type `type_group` as its customer type,
494
+ * plus any number of groups of type `pricing_group`. Membership of either kind can
495
+ * scope a volume discount to the customer and open up product lines for it to
496
+ * order from.
497
+ */
498
+ type: AccountGroupsAPI.AccountGroup | null;
499
+
500
+ /**
501
+ * Last updated timestamp.
502
+ */
503
+ updated_at: string;
504
+ }
505
+
506
+ /**
507
+ * Customer contact information.
508
+ */
509
+ export interface CustomerContactInfo {
510
+ /**
511
+ * Email address.
512
+ */
513
+ email: string | null;
514
+
515
+ /**
516
+ * Resource type identifier.
517
+ */
518
+ object: 'customer_contact_info';
519
+
520
+ /**
521
+ * Phone number.
522
+ */
523
+ phone: string | null;
524
+
525
+ /**
526
+ * Website URL.
527
+ */
528
+ url: string | null;
529
+ }
530
+
531
+ /**
532
+ * Values used to fill in a new sales order for this customer when the order does
533
+ * not supply its own.
534
+ */
535
+ export interface CustomerDefaults {
536
+ /**
537
+ * Calendar days between an order being issued and it being due to ship.
538
+ *
539
+ * Sets each order's `ship_by_date` when it is issued. With none set here the
540
+ * customer inherits its account group's lead time, then the account default.
541
+ */
542
+ lead_time_days: number | null;
543
+
544
+ /**
545
+ * Resource type identifier.
546
+ */
547
+ object: 'customer_defaults';
548
+
549
+ /**
550
+ * A payment term describing when payment is due (e.g. `Net 30`), assignable to
551
+ * customers, sales orders, purchase orders, and invoices.
552
+ */
553
+ payment_term: PaymentTerm | null;
554
+
555
+ /**
556
+ * Priority level used to order work on sales orders, purchase orders, and picks.
557
+ *
558
+ * The levels are platform-provided and the same for every account, so they cannot
559
+ * be created, renamed, or removed. A customer can carry a default priority that
560
+ * pre-fills new orders for them.
561
+ */
562
+ priority: Priority | null;
563
+
564
+ /**
565
+ * A user's membership in an account, carrying the account-specific status, role,
566
+ * and department.
567
+ *
568
+ * Profile fields (name, email, username, image URL) live on the `user`
569
+ * sub-resource, which is shared across every account the user belongs to.
570
+ */
571
+ sales_rep: BlocksAPI.AccountUser | null;
572
+
573
+ /**
574
+ * A named freight pricing rule that decides what a buyer pays for shipping.
575
+ *
576
+ * A customer's default shipping term is evaluated whenever freight is quoted for
577
+ * one of their orders. Freight exemptions on the customer, its type group, or any
578
+ * of its price groups are checked first and zero the freight charge before the
579
+ * shipping term is considered.
580
+ */
581
+ shipping_term: ShippingTerm | null;
582
+ }
583
+
584
+ /**
585
+ * Customer freight and carrier settings.
586
+ */
587
+ export interface CustomerFreightPreferences {
588
+ /**
589
+ * Carrier billing account number charged when `billing_type` is `third_party`.
590
+ */
591
+ billing_account: string | null;
592
+
593
+ /**
594
+ * Who pays the carrier for shipments.
595
+ *
596
+ * - `sender`: the shipper (you) pays the carrier.
597
+ * - `third_party`: a third party is billed, using `billing_account`.
598
+ */
599
+ billing_type: 'sender' | 'third_party' | null;
600
+
601
+ /**
602
+ * A shipping carrier configured for fulfilling orders.
603
+ *
604
+ * Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected
605
+ * through Shippo for live rating and label purchase; other carriers represent
606
+ * self-managed shipping methods such as will call or local delivery.
607
+ */
608
+ carrier: Carrier | null;
609
+
610
+ /**
611
+ * Resource type identifier.
612
+ */
613
+ object: 'customer_freight_preferences';
614
+
615
+ /**
616
+ * A shipping speed or method offered by a carrier, such as ground or overnight.
617
+ *
618
+ * Carriers connected through Shippo have their service levels synced from the
619
+ * carrier itself; any carrier can also have service levels you create by hand.
620
+ */
621
+ service_level: ServiceLevel | null;
622
+
623
+ /**
624
+ * Freight policy applied to this customer's orders.
625
+ *
626
+ * - `free_freight`: the customer is not billed for freight.
627
+ * - `billed_freight`: freight is billed to the customer.
628
+ *
629
+ * Freight is waived when this field, the customer's `type` group, any of its
630
+ * `price_groups`, or any product line the ordered products belong to is
631
+ * `free_freight`, so a shipment can come back freight-exempt even while this field
632
+ * is `billed_freight`.
633
+ */
634
+ status: 'free_freight' | 'billed_freight';
635
+ }
636
+
637
+ /**
638
+ * Customer notification settings.
639
+ */
640
+ export interface CustomerNotificationPreferences {
641
+ /**
642
+ * Whether anyone is set up to receive invoice emails for this customer.
643
+ *
644
+ * Derived from the customer's notification recipients: true when at least one of
645
+ * them is configured for invoice notifications.
646
+ */
647
+ accepts_invoice_emails: boolean;
648
+
649
+ /**
650
+ * Resource type identifier.
651
+ */
652
+ object: 'customer_notification_preferences';
653
+ }
654
+
655
+ /**
656
+ * A single page of resources, together with the metadata needed to page through
657
+ * the rest of the result set.
658
+ */
659
+ export interface ListAccountPrice {
660
+ /**
661
+ * Resources in this page.
662
+ */
663
+ data: Array<AccountPrice>;
664
+
665
+ /**
666
+ * Resource type identifier.
667
+ */
668
+ object: 'list';
669
+
670
+ /**
671
+ * PageInfo describes where the current page sits within a paginated result set and
672
+ * how to move to the adjacent pages.
673
+ *
674
+ * Page a list by following the URLs below rather than assembling cursors yourself.
675
+ * For a top-level list endpoint the URL repeats the original request's query
676
+ * string with only the cursor swapped, so following it preserves the same filters,
677
+ * search term, and page size.
678
+ */
679
+ page_info: APIKeysAPI.PageInfo;
680
+ }
681
+
682
+ /**
683
+ * A single page of resources, together with the metadata needed to page through
684
+ * the rest of the result set.
685
+ */
686
+ export interface ListCustomer {
687
+ /**
688
+ * Resources in this page.
689
+ */
690
+ data: Array<Customer>;
691
+
692
+ /**
693
+ * Resource type identifier.
694
+ */
695
+ object: 'list';
696
+
697
+ /**
698
+ * PageInfo describes where the current page sits within a paginated result set and
699
+ * how to move to the adjacent pages.
700
+ *
701
+ * Page a list by following the URLs below rather than assembling cursors yourself.
702
+ * For a top-level list endpoint the URL repeats the original request's query
703
+ * string with only the cursor swapped, so following it preserves the same filters,
704
+ * search term, and page size.
705
+ */
706
+ page_info: APIKeysAPI.PageInfo;
707
+ }
708
+
709
+ /**
710
+ * A single page of resources, together with the metadata needed to page through
711
+ * the rest of the result set.
712
+ */
713
+ export interface ListServiceLevel {
714
+ /**
715
+ * Resources in this page.
716
+ */
717
+ data: Array<ServiceLevel>;
718
+
719
+ /**
720
+ * Resource type identifier.
721
+ */
722
+ object: 'list';
723
+
724
+ /**
725
+ * PageInfo describes where the current page sits within a paginated result set and
726
+ * how to move to the adjacent pages.
727
+ *
728
+ * Page a list by following the URLs below rather than assembling cursors yourself.
729
+ * For a top-level list endpoint the URL repeats the original request's query
730
+ * string with only the cursor swapped, so following it preserves the same filters,
731
+ * search term, and page size.
732
+ */
733
+ page_info: APIKeysAPI.PageInfo;
734
+ }
735
+
736
+ /**
737
+ * A payment term describing when payment is due (e.g. `Net 30`), assignable to
738
+ * customers, sales orders, purchase orders, and invoices.
739
+ */
740
+ export interface PaymentTerm {
741
+ /**
742
+ * Payment term ID.
743
+ */
744
+ id: string;
745
+
746
+ /**
747
+ * Creation timestamp.
748
+ */
749
+ created_at: string;
750
+
751
+ /**
752
+ * Display name (e.g. `Net 30`), unique among the payment terms visible to your
753
+ * account.
754
+ */
755
+ name: string;
756
+
757
+ /**
758
+ * Resource type identifier.
759
+ */
760
+ object: 'payment_term';
761
+
762
+ /**
763
+ * Owner describes the provenance of a resource.
764
+ */
765
+ owner: APIKeysAPI.Owner | null;
766
+
767
+ /**
768
+ * Whether this payment term is still in active use.
769
+ *
770
+ * Payment terms created through the API are always `active`, and no endpoint
771
+ * changes a term's status. List Payment Terms returns inactive terms alongside
772
+ * active ones, so filter them out yourself if you only want the ones still on
773
+ * offer.
774
+ */
775
+ status: 'active' | 'inactive';
776
+
777
+ /**
778
+ * Last-updated timestamp.
779
+ */
780
+ updated_at: string;
781
+ }
782
+
783
+ /**
784
+ * Priority level used to order work on sales orders, purchase orders, and picks.
785
+ *
786
+ * The levels are platform-provided and the same for every account, so they cannot
787
+ * be created, renamed, or removed. A customer can carry a default priority that
788
+ * pre-fills new orders for them.
789
+ */
790
+ export interface Priority {
791
+ /**
792
+ * Priority ID.
793
+ */
794
+ id: string;
795
+
796
+ /**
797
+ * Machine-readable code identifying the priority level.
798
+ *
799
+ * Other resources refer to a priority by this code rather than by its ID, such as
800
+ * a sales order's `priority`, and it can be used in place of the ID when
801
+ * retrieving a priority.
802
+ */
803
+ code: 'low' | 'normal' | 'high';
804
+
805
+ /**
806
+ * Creation timestamp.
807
+ */
808
+ created_at: string;
809
+
810
+ /**
811
+ * Display name of the priority level.
812
+ */
813
+ name: string;
814
+
815
+ /**
816
+ * Resource type identifier.
817
+ */
818
+ object: 'priority';
819
+
820
+ /**
821
+ * Owner describes the provenance of a resource.
822
+ */
823
+ owner: APIKeysAPI.Owner | null;
824
+
825
+ /**
826
+ * Last updated timestamp.
827
+ */
828
+ updated_at: string;
829
+ }
830
+
831
+ /**
832
+ * A shipping speed or method offered by a carrier, such as ground or overnight.
833
+ *
834
+ * Carriers connected through Shippo have their service levels synced from the
835
+ * carrier itself; any carrier can also have service levels you create by hand.
836
+ */
837
+ export interface ServiceLevel {
838
+ /**
839
+ * Service level ID.
840
+ */
841
+ id: string;
842
+
843
+ /**
844
+ * Creation timestamp.
845
+ */
846
+ created_at: string;
847
+
848
+ /**
849
+ * Whether customers can see and select this service level at checkout in the
850
+ * customer portal.
851
+ */
852
+ customer_portal_visibility: 'visible' | 'hidden';
853
+
854
+ /**
855
+ * Business days this service typically takes in transit, used to work an order's
856
+ * ship-by date back from a promised delivery date.
857
+ *
858
+ * A fallback for lanes the carrier has not quoted. Null means transit is unknown
859
+ * for this service rather than instant, so a ship-by date falls back to the
860
+ * promised delivery date itself.
861
+ */
862
+ default_transit_days: number | null;
863
+
864
+ /**
865
+ * Whether this is the carrier's default service level, pre-selected when the
866
+ * carrier is chosen.
867
+ *
868
+ * Each carrier has at most one default; setting a new default clears the previous
869
+ * one. A default service level cannot be deleted until another service level takes
870
+ * its place or the flag is cleared.
871
+ */
872
+ is_default: boolean;
873
+
874
+ /**
875
+ * Human-readable name for the service level, shown to customers at checkout when
876
+ * the service level is visible.
877
+ */
878
+ name: string;
879
+
880
+ /**
881
+ * Resource type identifier.
882
+ */
883
+ object: 'service_level';
884
+
885
+ /**
886
+ * Owner describes the provenance of a resource.
887
+ */
888
+ owner: APIKeysAPI.Owner | null;
889
+
890
+ /**
891
+ * Carrier-specific code identifying this service level (e.g. `fedex_ground`,
892
+ * `ups_next_day_air`).
893
+ *
894
+ * For service levels synced from a connected carrier this is the carrier's own
895
+ * token, which is what rate shopping and label purchase are keyed on; for service
896
+ * levels you create yourself it is the `code` you supplied.
897
+ */
898
+ service_level_token: string;
899
+
900
+ /**
901
+ * Last updated timestamp.
902
+ */
903
+ updated_at: string;
904
+ }
905
+
906
+ /**
907
+ * A named freight pricing rule that decides what a buyer pays for shipping.
908
+ *
909
+ * A customer's default shipping term is evaluated whenever freight is quoted for
910
+ * one of their orders. Freight exemptions on the customer, its type group, or any
911
+ * of its price groups are checked first and zero the freight charge before the
912
+ * shipping term is considered.
913
+ */
914
+ export interface ShippingTerm {
915
+ /**
916
+ * Shipping term ID.
917
+ */
918
+ id: string;
919
+
920
+ /**
921
+ * When this shipping term was created.
922
+ */
923
+ created_at: string;
924
+
925
+ /**
926
+ * A measured amount: a numeric value together with the unit it is expressed in.
927
+ *
928
+ * Quantities are shared building blocks rather than standalone records — other
929
+ * resources point at them to report stock levels, ordered and packed amounts,
930
+ * money, weights, and durations.
931
+ */
932
+ flat_rate: ItemsAPI.Quantity | null;
933
+
934
+ /**
935
+ * A single page of resources, together with the metadata needed to page through
936
+ * the rest of the result set.
937
+ */
938
+ free_shipping_service_levels: ListServiceLevel | null;
939
+
940
+ /**
941
+ * A measured amount: a numeric value together with the unit it is expressed in.
942
+ *
943
+ * Quantities are shared building blocks rather than standalone records — other
944
+ * resources point at them to report stock levels, ordered and packed amounts,
945
+ * money, weights, and durations.
946
+ */
947
+ minimum_order_value: ItemsAPI.Quantity | null;
948
+
949
+ /**
950
+ * Human-readable name for the shipping term, used to identify it when assigning
951
+ * shipping terms to customers and orders.
952
+ */
953
+ name: string;
954
+
955
+ /**
956
+ * Resource type identifier.
957
+ */
958
+ object: 'shipping_term';
959
+
960
+ /**
961
+ * Owner describes the provenance of a resource.
962
+ */
963
+ owner: APIKeysAPI.Owner | null;
964
+
965
+ /**
966
+ * Freight pricing model applied by this shipping term.
967
+ *
968
+ * - `free_freight`: the buyer is never charged for shipping.
969
+ * - `flat_rate_freight`: the buyer is charged the fixed amount in `flat_rate`,
970
+ * regardless of what the carrier would have charged.
971
+ * - `carrier_rate_freight`: the buyer is charged the rate the carrier quotes for
972
+ * the order's carrier and service level.
973
+ */
974
+ type: 'free_freight' | 'flat_rate_freight' | 'carrier_rate_freight';
975
+
976
+ /**
977
+ * When this shipping term was last updated.
978
+ */
979
+ updated_at: string;
980
+ }
981
+
982
+ /**
983
+ * Request to partially update an account price.
984
+ */
985
+ export interface UpdateAccountPriceRequest {
986
+ /**
987
+ * Attribute IDs to constrain this price to.
988
+ *
989
+ * When provided, replaces the existing set of attributes entirely; an empty list
990
+ * removes all attribute constraints.
991
+ */
992
+ attribute_ids?: Array<string>;
993
+
994
+ /**
995
+ * Item category IDs to record on this price.
996
+ *
997
+ * When provided, replaces the existing set of categories entirely; an empty list
998
+ * removes them all. Categories are recorded only — they do not narrow which
999
+ * products the price applies to.
1000
+ */
1001
+ category_ids?: Array<string>;
1002
+
1003
+ /**
1004
+ * ID of the product line whose products this price applies to.
1005
+ */
1006
+ product_line_id?: string;
1007
+
1008
+ /**
1009
+ * A value expressed as a ratio of two units, supplied on create and update
1010
+ * requests.
1011
+ *
1012
+ * A unit price, for example, has a currency as its numerator unit and the unit the
1013
+ * product is bought or sold by as its denominator.
1014
+ */
1015
+ rate?: MaterialsAPI.RateInput;
1016
+
1017
+ /**
1018
+ * ID of the customer this price is offered to.
1019
+ */
1020
+ recipient_account_id?: string;
1021
+ }
1022
+
1023
+ export interface AccountPriceDeleteResponse {}
1024
+
1025
+ export interface AccountPriceListParams {
1026
+ /**
1027
+ * Opaque cursor token identifying where the page of results starts.
1028
+ *
1029
+ * Use the `cursor` value embedded in a previous response's `next_page_url` or
1030
+ * `previous_page_url` to fetch the adjacent page. Omit to start from the first
1031
+ * page.
1032
+ */
1033
+ cursor?: string;
1034
+
1035
+ /**
1036
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
1037
+ * `null`.
1038
+ */
1039
+ include?: Array<'recipient_account' | 'product_line' | 'categories' | 'attributes'>;
1040
+
1041
+ /**
1042
+ * Maximum number of results to return in a single page.
1043
+ */
1044
+ limit?: number;
1045
+
1046
+ /**
1047
+ * Free-text search term used to filter results.
1048
+ *
1049
+ * Which fields are matched against the term varies by endpoint.
1050
+ */
1051
+ q?: string;
1052
+
1053
+ /**
1054
+ * Filters results to prices whose recipient is this customer account.
1055
+ *
1056
+ * A child account also matches the prices recorded against its parent, since those
1057
+ * price its orders too.
1058
+ */
1059
+ recipient_account_id?: string;
1060
+ }
1061
+
1062
+ export interface AccountPriceRetrieveParams {
1063
+ /**
1064
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
1065
+ * `null`.
1066
+ */
1067
+ include?: Array<'recipient_account' | 'product_line' | 'categories' | 'attributes'>;
1068
+ }
1069
+
1070
+ export interface AccountPriceCreateParams {
1071
+ /**
1072
+ * Body param: ID of the product line whose products this price applies to.
1073
+ */
1074
+ product_line_id: string;
1075
+
1076
+ /**
1077
+ * Body param: A value expressed as a ratio of two units, supplied on create and
1078
+ * update requests.
1079
+ *
1080
+ * A unit price, for example, has a currency as its numerator unit and the unit the
1081
+ * product is bought or sold by as its denominator.
1082
+ */
1083
+ rate: MaterialsAPI.RateInput;
1084
+
1085
+ /**
1086
+ * Body param: ID of the customer this price is offered to.
1087
+ *
1088
+ * A price recorded against a parent customer account also applies to orders placed
1089
+ * by its child accounts.
1090
+ */
1091
+ recipient_account_id: string;
1092
+
1093
+ /**
1094
+ * Query param: Sub-objects to expand in the response. When omitted, sub-objects
1095
+ * are returned as `null`.
1096
+ */
1097
+ include?: Array<'recipient_account' | 'product_line' | 'categories' | 'attributes'>;
1098
+
1099
+ /**
1100
+ * Body param: Attribute IDs to constrain this price to.
1101
+ *
1102
+ * When set, the price applies only to items that have every listed attribute.
1103
+ */
1104
+ attribute_ids?: Array<string>;
1105
+
1106
+ /**
1107
+ * Body param: Item category IDs to record on this price.
1108
+ *
1109
+ * Order pricing matches an account price on its product line and attributes only,
1110
+ * so categories recorded here do not narrow which products the price applies to.
1111
+ */
1112
+ category_ids?: Array<string>;
1113
+ }
1114
+
1115
+ export interface AccountPriceUpdateParams {
1116
+ /**
1117
+ * Query param: Sub-objects to expand in the response. When omitted, sub-objects
1118
+ * are returned as `null`.
1119
+ */
1120
+ include?: Array<'recipient_account' | 'product_line' | 'categories' | 'attributes'>;
1121
+
1122
+ /**
1123
+ * Body param: Attribute IDs to constrain this price to.
1124
+ *
1125
+ * When provided, replaces the existing set of attributes entirely; an empty list
1126
+ * removes all attribute constraints.
1127
+ */
1128
+ attribute_ids?: Array<string>;
1129
+
1130
+ /**
1131
+ * Body param: Item category IDs to record on this price.
1132
+ *
1133
+ * When provided, replaces the existing set of categories entirely; an empty list
1134
+ * removes them all. Categories are recorded only — they do not narrow which
1135
+ * products the price applies to.
1136
+ */
1137
+ category_ids?: Array<string>;
1138
+
1139
+ /**
1140
+ * Body param: ID of the product line whose products this price applies to.
1141
+ */
1142
+ product_line_id?: string;
1143
+
1144
+ /**
1145
+ * Body param: A value expressed as a ratio of two units, supplied on create and
1146
+ * update requests.
1147
+ *
1148
+ * A unit price, for example, has a currency as its numerator unit and the unit the
1149
+ * product is bought or sold by as its denominator.
1150
+ */
1151
+ rate?: MaterialsAPI.RateInput;
1152
+
1153
+ /**
1154
+ * Body param: ID of the customer this price is offered to.
1155
+ */
1156
+ recipient_account_id?: string;
1157
+ }
1158
+
1159
+ AccountPrices.Actions = Actions;
1160
+
1161
+ export declare namespace AccountPrices {
1162
+ export {
1163
+ type AccountPrice as AccountPrice,
1164
+ type Carrier as Carrier,
1165
+ type CreateAccountPriceRequest as CreateAccountPriceRequest,
1166
+ type Customer as Customer,
1167
+ type CustomerContactInfo as CustomerContactInfo,
1168
+ type CustomerDefaults as CustomerDefaults,
1169
+ type CustomerFreightPreferences as CustomerFreightPreferences,
1170
+ type CustomerNotificationPreferences as CustomerNotificationPreferences,
1171
+ type ListAccountPrice as ListAccountPrice,
1172
+ type ListCustomer as ListCustomer,
1173
+ type ListServiceLevel as ListServiceLevel,
1174
+ type PaymentTerm as PaymentTerm,
1175
+ type Priority as Priority,
1176
+ type ServiceLevel as ServiceLevel,
1177
+ type ShippingTerm as ShippingTerm,
1178
+ type UpdateAccountPriceRequest as UpdateAccountPriceRequest,
1179
+ type AccountPriceDeleteResponse as AccountPriceDeleteResponse,
1180
+ type AccountPriceListParams as AccountPriceListParams,
1181
+ type AccountPriceRetrieveParams as AccountPriceRetrieveParams,
1182
+ type AccountPriceCreateParams as AccountPriceCreateParams,
1183
+ type AccountPriceUpdateParams as AccountPriceUpdateParams,
1184
+ };
1185
+
1186
+ export {
1187
+ Actions as Actions,
1188
+ type ExportPriceListRequest as ExportPriceListRequest,
1189
+ type ActionExportPriceListParams as ActionExportPriceListParams,
1190
+ };
1191
+ }