@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
@@ -3,19 +3,8 @@
3
3
  export { Actions, type MergeCustomersRequest, type ActionMergeParams } from './actions';
4
4
  export {
5
5
  Customers,
6
- type Carrier,
7
6
  type CreateCustomerRequest,
8
- type Customer,
9
- type CustomerContactInfo,
10
- type CustomerDefaults,
11
- type CustomerFreightPreferences,
12
7
  type CustomerLeadTime,
13
- type CustomerNotificationPreferences,
14
- type ListCustomer,
15
- type ListServiceLevel,
16
- type PaymentTerm,
17
- type ServiceLevel,
18
- type ShippingTerm,
19
8
  type UpdateCustomerRequest,
20
9
  type CustomerDeleteResponse,
21
10
  type CustomerListParams,
@@ -11,6 +11,30 @@ export {
11
11
  type AccountGroupCreateParams,
12
12
  type AccountGroupUpdateParams,
13
13
  } from './account-groups';
14
+ export {
15
+ AccountPrices,
16
+ type AccountPrice,
17
+ type Carrier,
18
+ type CreateAccountPriceRequest,
19
+ type Customer,
20
+ type CustomerContactInfo,
21
+ type CustomerDefaults,
22
+ type CustomerFreightPreferences,
23
+ type CustomerNotificationPreferences,
24
+ type ListAccountPrice,
25
+ type ListCustomer,
26
+ type ListServiceLevel,
27
+ type PaymentTerm,
28
+ type Priority,
29
+ type ServiceLevel,
30
+ type ShippingTerm,
31
+ type UpdateAccountPriceRequest,
32
+ type AccountPriceDeleteResponse,
33
+ type AccountPriceListParams,
34
+ type AccountPriceRetrieveParams,
35
+ type AccountPriceCreateParams,
36
+ type AccountPriceUpdateParams,
37
+ } from './account-prices/index';
14
38
  export {
15
39
  AccountStatuses,
16
40
  type AccountStatus,
@@ -32,19 +56,8 @@ export {
32
56
  export { Contacts } from './contacts/index';
33
57
  export {
34
58
  Customers,
35
- type Carrier,
36
59
  type CreateCustomerRequest,
37
- type Customer,
38
- type CustomerContactInfo,
39
- type CustomerDefaults,
40
- type CustomerFreightPreferences,
41
60
  type CustomerLeadTime,
42
- type CustomerNotificationPreferences,
43
- type ListCustomer,
44
- type ListServiceLevel,
45
- type PaymentTerm,
46
- type ServiceLevel,
47
- type ShippingTerm,
48
61
  type UpdateCustomerRequest,
49
62
  type CustomerDeleteResponse,
50
63
  type CustomerListParams,
@@ -52,10 +65,19 @@ export {
52
65
  type CustomerCreateParams,
53
66
  type CustomerUpdateParams,
54
67
  } from './customers/index';
68
+ export {
69
+ OrderDiscounts,
70
+ type CreateOrderDiscountRequest,
71
+ type ListOrderDiscount,
72
+ type OrderDiscount,
73
+ type UpdateOrderDiscountRequest,
74
+ type OrderDiscountListParams,
75
+ type OrderDiscountCreateParams,
76
+ type OrderDiscountUpdateParams,
77
+ } from './order-discounts/index';
55
78
  export {
56
79
  Priorities,
57
80
  type ListPriority,
58
- type Priority,
59
81
  type PriorityListParams,
60
82
  type PriorityRetrieveParams,
61
83
  } from './priorities';
@@ -75,7 +97,6 @@ export {
75
97
  type ListSalesOrderLine,
76
98
  type ListSalesOrderStatus,
77
99
  type OrderContact,
78
- type OrderDiscount,
79
100
  type QuoteSalesOrderLineInput,
80
101
  type QuoteSalesOrderPricesRequest,
81
102
  type QuoteSalesOrderPricesResponse,
@@ -98,3 +119,19 @@ export {
98
119
  type SalesOrderCheckoutParams,
99
120
  type SalesOrderPriceQuoteParams,
100
121
  } from './sales-orders/index';
122
+ export {
123
+ VolumeDiscounts,
124
+ type CreateVolumeDiscountRequest,
125
+ type CreateVolumeDiscountTierInput,
126
+ type ListVolumeDiscount,
127
+ type ListVolumeDiscountTier,
128
+ type UpdateVolumeDiscountRequest,
129
+ type UpdateVolumeDiscountTierInput,
130
+ type VolumeDiscount,
131
+ type VolumeDiscountTier,
132
+ type VolumeDiscountDeleteResponse,
133
+ type VolumeDiscountListParams,
134
+ type VolumeDiscountRetrieveParams,
135
+ type VolumeDiscountCreateParams,
136
+ type VolumeDiscountUpdateParams,
137
+ } from './volume-discounts';
@@ -0,0 +1,102 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as OrderDiscountsAPI from './order-discounts';
5
+ import { APIPromise } from '../../../core/api-promise';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+
8
+ /**
9
+ * List and manage order discounts.
10
+ */
11
+ export class Actions extends APIResource {
12
+ /**
13
+ * Validates a discount code and returns the matching order discount, so a code a
14
+ * buyer typed can be attached to an order.
15
+ *
16
+ * When `buyer_account_id` is provided, or the caller is a customer user, the
17
+ * lookup also verifies that the buyer has not already redeemed the discount on
18
+ * another order, and reports an already-redeemed code as not found. Pass
19
+ * `sales_order_id` to exclude an order the buyer is currently editing from that
20
+ * check.
21
+ *
22
+ * This endpoint requires the permission: `discounts:read`.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const orderDiscount =
27
+ * await client.sales.orderDiscounts.actions.findByCode({
28
+ * code: 'SAVE10',
29
+ * });
30
+ * ```
31
+ */
32
+ findByCode(
33
+ body: ActionFindByCodeParams,
34
+ options?: RequestOptions,
35
+ ): APIPromise<OrderDiscountsAPI.OrderDiscount> {
36
+ return this._client.post('/v1/sales/order-discounts/actions/find-by-code', { body, ...options });
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Request to find an order discount by code.
42
+ */
43
+ export interface FindOrderDiscountByCodeRequest {
44
+ /**
45
+ * The discount code to look up, as the buyer typed it.
46
+ *
47
+ * Matching ignores letter case, so `save10` finds a discount stored as `SAVE10`.
48
+ */
49
+ code: string;
50
+
51
+ /**
52
+ * The buyer account to check for prior use of this code.
53
+ *
54
+ * When set, the lookup returns a not-found error if that buyer has already
55
+ * redeemed the discount on another order, so a one-use-per-customer code can be
56
+ * rejected before it is attached to a new one. Customer callers cannot set this —
57
+ * their own account is always used.
58
+ */
59
+ buyer_account_id?: string;
60
+
61
+ /**
62
+ * Sales order ID to exclude from the prior-usage check.
63
+ *
64
+ * Set this when re-validating a code on an existing order so the order's own usage
65
+ * does not count against the buyer.
66
+ */
67
+ sales_order_id?: string;
68
+ }
69
+
70
+ export interface ActionFindByCodeParams {
71
+ /**
72
+ * The discount code to look up, as the buyer typed it.
73
+ *
74
+ * Matching ignores letter case, so `save10` finds a discount stored as `SAVE10`.
75
+ */
76
+ code: string;
77
+
78
+ /**
79
+ * The buyer account to check for prior use of this code.
80
+ *
81
+ * When set, the lookup returns a not-found error if that buyer has already
82
+ * redeemed the discount on another order, so a one-use-per-customer code can be
83
+ * rejected before it is attached to a new one. Customer callers cannot set this —
84
+ * their own account is always used.
85
+ */
86
+ buyer_account_id?: string;
87
+
88
+ /**
89
+ * Sales order ID to exclude from the prior-usage check.
90
+ *
91
+ * Set this when re-validating a code on an existing order so the order's own usage
92
+ * does not count against the buyer.
93
+ */
94
+ sales_order_id?: string;
95
+ }
96
+
97
+ export declare namespace Actions {
98
+ export {
99
+ type FindOrderDiscountByCodeRequest as FindOrderDiscountByCodeRequest,
100
+ type ActionFindByCodeParams as ActionFindByCodeParams,
101
+ };
102
+ }
@@ -0,0 +1,13 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Actions, type FindOrderDiscountByCodeRequest, type ActionFindByCodeParams } from './actions';
4
+ export {
5
+ OrderDiscounts,
6
+ type CreateOrderDiscountRequest,
7
+ type ListOrderDiscount,
8
+ type OrderDiscount,
9
+ type UpdateOrderDiscountRequest,
10
+ type OrderDiscountListParams,
11
+ type OrderDiscountCreateParams,
12
+ type OrderDiscountUpdateParams,
13
+ } from './order-discounts';
@@ -0,0 +1,442 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as APIKeysAPI from '../../auth/api-keys/api-keys';
5
+ import * as ActionsAPI from './actions';
6
+ import { ActionFindByCodeParams, Actions, FindOrderDiscountByCodeRequest } from './actions';
7
+ import { APIPromise } from '../../../core/api-promise';
8
+ import { RequestOptions } from '../../../internal/request-options';
9
+ import { path } from '../../../internal/utils/path';
10
+
11
+ /**
12
+ * List and manage order discounts.
13
+ */
14
+ export class OrderDiscounts extends APIResource {
15
+ actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client);
16
+
17
+ /**
18
+ * Returns a paginated list of the order discounts defined for the current account,
19
+ * newest first.
20
+ *
21
+ * Pass `q` to narrow the list to discounts whose name or code contains the search
22
+ * text.
23
+ *
24
+ * This endpoint requires the permissions: `discounts:read`, `customers:read`,
25
+ * `suppliers:read`.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const listOrderDiscount =
30
+ * await client.sales.orderDiscounts.list();
31
+ * ```
32
+ */
33
+ list(
34
+ query: OrderDiscountListParams | null | undefined = {},
35
+ options?: RequestOptions,
36
+ ): APIPromise<ListOrderDiscount> {
37
+ return this._client.get('/v1/sales/order-discounts', { query, ...options });
38
+ }
39
+
40
+ /**
41
+ * Returns an order discount by ID.
42
+ *
43
+ * This endpoint requires the permission: `discounts:read`.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const orderDiscount =
48
+ * await client.sales.orderDiscounts.retrieve(
49
+ * 'ords_qnbrjvq5ih2q',
50
+ * );
51
+ * ```
52
+ */
53
+ retrieve(id: string, options?: RequestOptions): APIPromise<OrderDiscount> {
54
+ return this._client.get(path`/v1/sales/order-discounts/${id}`, options);
55
+ }
56
+
57
+ /**
58
+ * Creates an order discount that buyers can then redeem on a sales order by its
59
+ * code.
60
+ *
61
+ * The code must be unique within your account; reusing a code that another
62
+ * discount already holds returns a conflict error. Creating the discount does not
63
+ * apply it to anything — a discount only affects an order once that order
64
+ * references it.
65
+ *
66
+ * This endpoint requires the permission: `discounts:create`.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const orderDiscount =
71
+ * await client.sales.orderDiscounts.create({
72
+ * code: 'SAVE10',
73
+ * discount_type: 'percentage',
74
+ * name: '10% Off',
75
+ * percentage: '0.1',
76
+ * });
77
+ * ```
78
+ */
79
+ create(body: OrderDiscountCreateParams, options?: RequestOptions): APIPromise<OrderDiscount> {
80
+ return this._client.post('/v1/sales/order-discounts', { body, ...options });
81
+ }
82
+
83
+ /**
84
+ * Partially updates an order discount.
85
+ *
86
+ * Only the fields you send are changed; the rest keep their current values.
87
+ * Changing `code` to one another discount already holds returns a conflict error.
88
+ * Edits apply to future orders only — orders that already used this discount keep
89
+ * the reduction they were given.
90
+ *
91
+ * This endpoint requires the permission: `discounts:update`.
92
+ *
93
+ * @example
94
+ * ```ts
95
+ * const orderDiscount =
96
+ * await client.sales.orderDiscounts.update(
97
+ * 'ords_qnbrjvq5ih2q',
98
+ * { code: 'SAVE15', name: '15% Off' },
99
+ * );
100
+ * ```
101
+ */
102
+ update(
103
+ id: string,
104
+ body: OrderDiscountUpdateParams | null | undefined = {},
105
+ options?: RequestOptions,
106
+ ): APIPromise<OrderDiscount> {
107
+ return this._client.patch(path`/v1/sales/order-discounts/${id}`, { body, ...options });
108
+ }
109
+
110
+ /**
111
+ * Deletes an order discount and returns it as it was just before deletion.
112
+ *
113
+ * Deletion is permanent; further requests against the deleted ID return an error.
114
+ *
115
+ * The code can no longer be redeemed, but sales orders that already used the
116
+ * discount keep the reduction that was applied to them; their totals are not
117
+ * recalculated.
118
+ *
119
+ * This endpoint requires the permission: `discounts:delete`.
120
+ *
121
+ * @example
122
+ * ```ts
123
+ * const orderDiscount =
124
+ * await client.sales.orderDiscounts.delete(
125
+ * 'ords_qnbrjvq5ih2q',
126
+ * );
127
+ * ```
128
+ */
129
+ delete(id: string, options?: RequestOptions): APIPromise<OrderDiscount> {
130
+ return this._client.delete(path`/v1/sales/order-discounts/${id}`, options);
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Request to create an order discount.
136
+ */
137
+ export interface CreateOrderDiscountRequest {
138
+ /**
139
+ * The code a buyer enters to apply this discount to an order.
140
+ *
141
+ * Codes are unique within your account and are compared without regard to letter
142
+ * case, so `SAVE10` collides with `save10`.
143
+ */
144
+ code: string;
145
+
146
+ /**
147
+ * How the discount is calculated.
148
+ *
149
+ * - `percentage`: the order total is reduced by the fraction in `percentage`.
150
+ * - `amount`: the order total is reduced by the flat amount in `amount`.
151
+ */
152
+ discount_type: 'percentage' | 'amount';
153
+
154
+ /**
155
+ * Display name of the discount.
156
+ */
157
+ name: string;
158
+
159
+ /**
160
+ * The flat amount to take off the order total, as a decimal string.
161
+ *
162
+ * Only read when `discount_type` is `amount`. Leaving it out stores `0`, which
163
+ * produces a discount that takes nothing off.
164
+ */
165
+ amount?: string;
166
+
167
+ /**
168
+ * The fraction of the order total to take off, as a decimal string.
169
+ *
170
+ * This is a multiplier, not a whole percent: send `0.1` to take 10% off. Only read
171
+ * when `discount_type` is `percentage`. Leaving it out stores `0`, which produces
172
+ * a discount that takes nothing off.
173
+ */
174
+ percentage?: string;
175
+ }
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
+ export interface ListOrderDiscount {
182
+ /**
183
+ * Resources in this page.
184
+ */
185
+ data: Array<OrderDiscount>;
186
+
187
+ /**
188
+ * Resource type identifier.
189
+ */
190
+ object: 'list';
191
+
192
+ /**
193
+ * PageInfo describes where the current page sits within a paginated result set and
194
+ * how to move to the adjacent pages.
195
+ *
196
+ * Page a list by following the URLs below rather than assembling cursors yourself.
197
+ * For a top-level list endpoint the URL repeats the original request's query
198
+ * string with only the cursor swapped, so following it preserves the same filters,
199
+ * search term, and page size.
200
+ */
201
+ page_info: APIKeysAPI.PageInfo;
202
+ }
203
+
204
+ /**
205
+ * A discount code that can be applied to a sales order.
206
+ *
207
+ * An order discount reduces the order total by either a percentage or a fixed
208
+ * amount, depending on `discount_type`. The reduction is capped at the order total
209
+ * and rounded to the nearest cent.
210
+ */
211
+ export interface OrderDiscount {
212
+ /**
213
+ * Order discount ID.
214
+ */
215
+ id: string;
216
+
217
+ /**
218
+ * The flat amount taken off the order total, as a decimal string.
219
+ *
220
+ * Only read when `discount_type` is `amount`.
221
+ */
222
+ amount: string;
223
+
224
+ /**
225
+ * The code a buyer enters to apply this discount to an order.
226
+ *
227
+ * Codes are unique within your account and are matched without regard to letter
228
+ * case.
229
+ */
230
+ code: string;
231
+
232
+ /**
233
+ * Creation timestamp.
234
+ */
235
+ created_at: string;
236
+
237
+ /**
238
+ * How the discount is calculated.
239
+ *
240
+ * - `percentage`: the order total is reduced by the fraction in `percentage`.
241
+ * - `amount`: the order total is reduced by the flat amount in `amount`.
242
+ */
243
+ discount_type: 'percentage' | 'amount';
244
+
245
+ /**
246
+ * Display name of the discount.
247
+ */
248
+ name: string;
249
+
250
+ /**
251
+ * Resource type identifier.
252
+ */
253
+ object: 'order_discount';
254
+
255
+ /**
256
+ * How many sales orders this discount has been applied to, across all buyers.
257
+ */
258
+ order_count: number;
259
+
260
+ /**
261
+ * The fraction of the order total taken off, as a decimal string.
262
+ *
263
+ * This is a multiplier, not a whole percent: `0.1` takes 10% off. Only read when
264
+ * `discount_type` is `percentage`.
265
+ */
266
+ percentage: string;
267
+
268
+ /**
269
+ * Last updated timestamp.
270
+ */
271
+ updated_at: string;
272
+ }
273
+
274
+ /**
275
+ * Request to partially update an order discount.
276
+ */
277
+ export interface UpdateOrderDiscountRequest {
278
+ /**
279
+ * The flat amount to take off the order total, as a decimal string.
280
+ *
281
+ * Only read when `discount_type` is `amount`.
282
+ */
283
+ amount?: string;
284
+
285
+ /**
286
+ * The code a buyer enters to apply this discount to an order.
287
+ *
288
+ * Codes are unique within your account and are compared without regard to letter
289
+ * case.
290
+ */
291
+ code?: string;
292
+
293
+ /**
294
+ * How the discount is calculated.
295
+ *
296
+ * - `percentage`: the order total is reduced by the fraction in `percentage`.
297
+ * - `amount`: the order total is reduced by the flat amount in `amount`.
298
+ *
299
+ * Switching the type does not move the stored figure across, so send the matching
300
+ * `percentage` or `amount` in the same request or the discount will take nothing
301
+ * off.
302
+ */
303
+ discount_type?: 'percentage' | 'amount';
304
+
305
+ /**
306
+ * Display name of the discount.
307
+ */
308
+ name?: string;
309
+
310
+ /**
311
+ * The fraction of the order total to take off, as a decimal string.
312
+ *
313
+ * This is a multiplier, not a whole percent: send `0.1` to take 10% off. Only read
314
+ * when `discount_type` is `percentage`.
315
+ */
316
+ percentage?: string;
317
+ }
318
+
319
+ export interface OrderDiscountListParams {
320
+ /**
321
+ * Opaque cursor token identifying where the page of results starts.
322
+ *
323
+ * Use the `cursor` value embedded in a previous response's `next_page_url` or
324
+ * `previous_page_url` to fetch the adjacent page. Omit to start from the first
325
+ * page.
326
+ */
327
+ cursor?: string;
328
+
329
+ /**
330
+ * Maximum number of results to return in a single page.
331
+ */
332
+ limit?: number;
333
+
334
+ /**
335
+ * Free-text search term used to filter results.
336
+ *
337
+ * Which fields are matched against the term varies by endpoint.
338
+ */
339
+ q?: string;
340
+ }
341
+
342
+ export interface OrderDiscountCreateParams {
343
+ /**
344
+ * The code a buyer enters to apply this discount to an order.
345
+ *
346
+ * Codes are unique within your account and are compared without regard to letter
347
+ * case, so `SAVE10` collides with `save10`.
348
+ */
349
+ code: string;
350
+
351
+ /**
352
+ * How the discount is calculated.
353
+ *
354
+ * - `percentage`: the order total is reduced by the fraction in `percentage`.
355
+ * - `amount`: the order total is reduced by the flat amount in `amount`.
356
+ */
357
+ discount_type: 'percentage' | 'amount';
358
+
359
+ /**
360
+ * Display name of the discount.
361
+ */
362
+ name: string;
363
+
364
+ /**
365
+ * The flat amount to take off the order total, as a decimal string.
366
+ *
367
+ * Only read when `discount_type` is `amount`. Leaving it out stores `0`, which
368
+ * produces a discount that takes nothing off.
369
+ */
370
+ amount?: string;
371
+
372
+ /**
373
+ * The fraction of the order total to take off, as a decimal string.
374
+ *
375
+ * This is a multiplier, not a whole percent: send `0.1` to take 10% off. Only read
376
+ * when `discount_type` is `percentage`. Leaving it out stores `0`, which produces
377
+ * a discount that takes nothing off.
378
+ */
379
+ percentage?: string;
380
+ }
381
+
382
+ export interface OrderDiscountUpdateParams {
383
+ /**
384
+ * The flat amount to take off the order total, as a decimal string.
385
+ *
386
+ * Only read when `discount_type` is `amount`.
387
+ */
388
+ amount?: string;
389
+
390
+ /**
391
+ * The code a buyer enters to apply this discount to an order.
392
+ *
393
+ * Codes are unique within your account and are compared without regard to letter
394
+ * case.
395
+ */
396
+ code?: string;
397
+
398
+ /**
399
+ * How the discount is calculated.
400
+ *
401
+ * - `percentage`: the order total is reduced by the fraction in `percentage`.
402
+ * - `amount`: the order total is reduced by the flat amount in `amount`.
403
+ *
404
+ * Switching the type does not move the stored figure across, so send the matching
405
+ * `percentage` or `amount` in the same request or the discount will take nothing
406
+ * off.
407
+ */
408
+ discount_type?: 'percentage' | 'amount';
409
+
410
+ /**
411
+ * Display name of the discount.
412
+ */
413
+ name?: string;
414
+
415
+ /**
416
+ * The fraction of the order total to take off, as a decimal string.
417
+ *
418
+ * This is a multiplier, not a whole percent: send `0.1` to take 10% off. Only read
419
+ * when `discount_type` is `percentage`.
420
+ */
421
+ percentage?: string;
422
+ }
423
+
424
+ OrderDiscounts.Actions = Actions;
425
+
426
+ export declare namespace OrderDiscounts {
427
+ export {
428
+ type CreateOrderDiscountRequest as CreateOrderDiscountRequest,
429
+ type ListOrderDiscount as ListOrderDiscount,
430
+ type OrderDiscount as OrderDiscount,
431
+ type UpdateOrderDiscountRequest as UpdateOrderDiscountRequest,
432
+ type OrderDiscountListParams as OrderDiscountListParams,
433
+ type OrderDiscountCreateParams as OrderDiscountCreateParams,
434
+ type OrderDiscountUpdateParams as OrderDiscountUpdateParams,
435
+ };
436
+
437
+ export {
438
+ Actions as Actions,
439
+ type FindOrderDiscountByCodeRequest as FindOrderDiscountByCodeRequest,
440
+ type ActionFindByCodeParams as ActionFindByCodeParams,
441
+ };
442
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './order-discounts/index';