@augno/sdk 0.1.6 → 0.7.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 (670) hide show
  1. package/CHANGELOG.md +5 -4
  2. package/README.md +27 -0
  3. package/api-promise.d.mts +0 -1
  4. package/api-promise.d.mts.map +1 -1
  5. package/api-promise.d.ts +0 -1
  6. package/api-promise.d.ts.map +1 -1
  7. package/api-promise.mjs +0 -1
  8. package/api-promise.mjs.map +1 -1
  9. package/client.d.mts +4 -1
  10. package/client.d.mts.map +1 -1
  11. package/client.d.ts +4 -1
  12. package/client.d.ts.map +1 -1
  13. package/client.js +9 -1
  14. package/client.js.map +1 -1
  15. package/client.mjs +9 -1
  16. package/client.mjs.map +1 -1
  17. package/core/api-promise.d.mts.map +1 -1
  18. package/core/api-promise.d.ts.map +1 -1
  19. package/core/api-promise.mjs.map +1 -1
  20. package/core/error.mjs.map +1 -1
  21. package/core/resource.d.mts.map +1 -1
  22. package/core/resource.d.ts.map +1 -1
  23. package/core/uploads.d.mts.map +1 -1
  24. package/core/uploads.d.ts.map +1 -1
  25. package/core/uploads.mjs.map +1 -1
  26. package/error.d.mts +0 -1
  27. package/error.d.mts.map +1 -1
  28. package/error.d.ts +0 -1
  29. package/error.d.ts.map +1 -1
  30. package/error.mjs +0 -1
  31. package/error.mjs.map +1 -1
  32. package/index.d.mts.map +1 -1
  33. package/index.d.ts.map +1 -1
  34. package/index.mjs.map +1 -1
  35. package/internal/headers.mjs.map +1 -1
  36. package/internal/parse.d.mts.map +1 -1
  37. package/internal/parse.d.ts.map +1 -1
  38. package/internal/parse.mjs.map +1 -1
  39. package/internal/qs/formats.d.mts.map +1 -1
  40. package/internal/qs/formats.d.ts.map +1 -1
  41. package/internal/qs/index.d.mts +2 -2
  42. package/internal/qs/index.d.mts.map +1 -1
  43. package/internal/qs/index.d.ts +2 -2
  44. package/internal/qs/index.d.ts.map +1 -1
  45. package/internal/qs/index.mjs.map +1 -1
  46. package/internal/qs/stringify.d.mts.map +1 -1
  47. package/internal/qs/stringify.d.ts.map +1 -1
  48. package/internal/qs/stringify.mjs.map +1 -1
  49. package/internal/qs/utils.d.mts.map +1 -1
  50. package/internal/qs/utils.d.ts.map +1 -1
  51. package/internal/qs/utils.mjs.map +1 -1
  52. package/internal/request-options.d.mts.map +1 -1
  53. package/internal/request-options.d.ts.map +1 -1
  54. package/internal/shims.d.mts +0 -6
  55. package/internal/shims.d.mts.map +1 -1
  56. package/internal/shims.d.ts +0 -6
  57. package/internal/shims.d.ts.map +1 -1
  58. package/internal/to-file.d.mts.map +1 -1
  59. package/internal/to-file.d.ts.map +1 -1
  60. package/internal/to-file.mjs.map +1 -1
  61. package/internal/types.d.mts +4 -4
  62. package/internal/types.d.mts.map +1 -1
  63. package/internal/types.d.ts +4 -4
  64. package/internal/types.d.ts.map +1 -1
  65. package/internal/uploads.d.mts.map +1 -1
  66. package/internal/uploads.d.ts.map +1 -1
  67. package/internal/uploads.mjs.map +1 -1
  68. package/internal/utils/base64.mjs.map +1 -1
  69. package/internal/utils/log.d.mts.map +1 -1
  70. package/internal/utils/log.d.ts.map +1 -1
  71. package/internal/utils/log.mjs.map +1 -1
  72. package/internal/utils/path.mjs.map +1 -1
  73. package/internal/utils/query.mjs.map +1 -1
  74. package/internal/utils/values.mjs.map +1 -1
  75. package/internal/utils.d.mts.map +1 -1
  76. package/internal/utils.d.ts.map +1 -1
  77. package/internal/utils.mjs.map +1 -1
  78. package/package.json +13 -18
  79. package/resource.d.mts +0 -1
  80. package/resource.d.mts.map +1 -1
  81. package/resource.d.ts +0 -1
  82. package/resource.d.ts.map +1 -1
  83. package/resource.mjs +0 -1
  84. package/resource.mjs.map +1 -1
  85. package/resources/auth/api-keys/actions.d.mts +26 -5
  86. package/resources/auth/api-keys/actions.d.mts.map +1 -1
  87. package/resources/auth/api-keys/actions.d.ts +26 -5
  88. package/resources/auth/api-keys/actions.d.ts.map +1 -1
  89. package/resources/auth/api-keys/actions.js +4 -1
  90. package/resources/auth/api-keys/actions.js.map +1 -1
  91. package/resources/auth/api-keys/actions.mjs +4 -1
  92. package/resources/auth/api-keys/actions.mjs.map +1 -1
  93. package/resources/auth/api-keys/api-keys.d.mts +134 -70
  94. package/resources/auth/api-keys/api-keys.d.mts.map +1 -1
  95. package/resources/auth/api-keys/api-keys.d.ts +134 -70
  96. package/resources/auth/api-keys/api-keys.d.ts.map +1 -1
  97. package/resources/auth/api-keys/api-keys.js +24 -22
  98. package/resources/auth/api-keys/api-keys.js.map +1 -1
  99. package/resources/auth/api-keys/api-keys.mjs +24 -22
  100. package/resources/auth/api-keys/api-keys.mjs.map +1 -1
  101. package/resources/auth/api-keys/index.d.mts +1 -1
  102. package/resources/auth/api-keys/index.d.mts.map +1 -1
  103. package/resources/auth/api-keys/index.d.ts +1 -1
  104. package/resources/auth/api-keys/index.d.ts.map +1 -1
  105. package/resources/auth/api-keys/index.mjs.map +1 -1
  106. package/resources/auth/api-keys.d.mts.map +1 -1
  107. package/resources/auth/api-keys.d.ts.map +1 -1
  108. package/resources/auth/api-keys.mjs.map +1 -1
  109. package/resources/auth/auth.d.mts +1 -1
  110. package/resources/auth/auth.d.mts.map +1 -1
  111. package/resources/auth/auth.d.ts +1 -1
  112. package/resources/auth/auth.d.ts.map +1 -1
  113. package/resources/auth/auth.mjs.map +1 -1
  114. package/resources/auth/index.d.mts +1 -1
  115. package/resources/auth/index.d.mts.map +1 -1
  116. package/resources/auth/index.d.ts +1 -1
  117. package/resources/auth/index.d.ts.map +1 -1
  118. package/resources/auth/index.mjs.map +1 -1
  119. package/resources/auth.d.mts.map +1 -1
  120. package/resources/auth.d.ts.map +1 -1
  121. package/resources/auth.mjs.map +1 -1
  122. package/resources/catalog/catalog.d.mts +9 -9
  123. package/resources/catalog/catalog.d.mts.map +1 -1
  124. package/resources/catalog/catalog.d.ts +9 -9
  125. package/resources/catalog/catalog.d.ts.map +1 -1
  126. package/resources/catalog/catalog.mjs.map +1 -1
  127. package/resources/catalog/index.d.mts +9 -9
  128. package/resources/catalog/index.d.mts.map +1 -1
  129. package/resources/catalog/index.d.ts +9 -9
  130. package/resources/catalog/index.d.ts.map +1 -1
  131. package/resources/catalog/index.mjs.map +1 -1
  132. package/resources/catalog/item-categories/index.d.mts +1 -1
  133. package/resources/catalog/item-categories/index.d.mts.map +1 -1
  134. package/resources/catalog/item-categories/index.d.ts +1 -1
  135. package/resources/catalog/item-categories/index.d.ts.map +1 -1
  136. package/resources/catalog/item-categories/index.mjs.map +1 -1
  137. package/resources/catalog/item-categories/item-categories.d.mts +95 -66
  138. package/resources/catalog/item-categories/item-categories.d.mts.map +1 -1
  139. package/resources/catalog/item-categories/item-categories.d.ts +95 -66
  140. package/resources/catalog/item-categories/item-categories.d.ts.map +1 -1
  141. package/resources/catalog/item-categories/item-categories.js +37 -30
  142. package/resources/catalog/item-categories/item-categories.js.map +1 -1
  143. package/resources/catalog/item-categories/item-categories.mjs +37 -30
  144. package/resources/catalog/item-categories/item-categories.mjs.map +1 -1
  145. package/resources/catalog/item-categories/properties.d.mts +9 -4
  146. package/resources/catalog/item-categories/properties.d.mts.map +1 -1
  147. package/resources/catalog/item-categories/properties.d.ts +9 -4
  148. package/resources/catalog/item-categories/properties.d.ts.map +1 -1
  149. package/resources/catalog/item-categories/properties.js +9 -4
  150. package/resources/catalog/item-categories/properties.js.map +1 -1
  151. package/resources/catalog/item-categories/properties.mjs +9 -4
  152. package/resources/catalog/item-categories/properties.mjs.map +1 -1
  153. package/resources/catalog/item-categories.d.mts.map +1 -1
  154. package/resources/catalog/item-categories.d.ts.map +1 -1
  155. package/resources/catalog/item-categories.mjs.map +1 -1
  156. package/resources/catalog/items/attributes.d.mts +3 -2
  157. package/resources/catalog/items/attributes.d.mts.map +1 -1
  158. package/resources/catalog/items/attributes.d.ts +3 -2
  159. package/resources/catalog/items/attributes.d.ts.map +1 -1
  160. package/resources/catalog/items/attributes.js +3 -2
  161. package/resources/catalog/items/attributes.js.map +1 -1
  162. package/resources/catalog/items/attributes.mjs +3 -2
  163. package/resources/catalog/items/attributes.mjs.map +1 -1
  164. package/resources/catalog/items/index.d.mts +1 -1
  165. package/resources/catalog/items/index.d.mts.map +1 -1
  166. package/resources/catalog/items/index.d.ts +1 -1
  167. package/resources/catalog/items/index.d.ts.map +1 -1
  168. package/resources/catalog/items/index.mjs.map +1 -1
  169. package/resources/catalog/items/items.d.mts +88 -52
  170. package/resources/catalog/items/items.d.mts.map +1 -1
  171. package/resources/catalog/items/items.d.ts +88 -52
  172. package/resources/catalog/items/items.d.ts.map +1 -1
  173. package/resources/catalog/items/items.js +24 -21
  174. package/resources/catalog/items/items.js.map +1 -1
  175. package/resources/catalog/items/items.mjs +24 -21
  176. package/resources/catalog/items/items.mjs.map +1 -1
  177. package/resources/catalog/items.d.mts.map +1 -1
  178. package/resources/catalog/items.d.ts.map +1 -1
  179. package/resources/catalog/items.mjs.map +1 -1
  180. package/resources/catalog/materials.d.mts +142 -95
  181. package/resources/catalog/materials.d.mts.map +1 -1
  182. package/resources/catalog/materials.d.ts +142 -95
  183. package/resources/catalog/materials.d.ts.map +1 -1
  184. package/resources/catalog/materials.js +28 -19
  185. package/resources/catalog/materials.js.map +1 -1
  186. package/resources/catalog/materials.mjs +28 -19
  187. package/resources/catalog/materials.mjs.map +1 -1
  188. package/resources/catalog/parts.d.mts +131 -81
  189. package/resources/catalog/parts.d.mts.map +1 -1
  190. package/resources/catalog/parts.d.ts +131 -81
  191. package/resources/catalog/parts.d.ts.map +1 -1
  192. package/resources/catalog/parts.js +34 -21
  193. package/resources/catalog/parts.js.map +1 -1
  194. package/resources/catalog/parts.mjs +34 -21
  195. package/resources/catalog/parts.mjs.map +1 -1
  196. package/resources/catalog/product-lines.d.mts +145 -71
  197. package/resources/catalog/product-lines.d.mts.map +1 -1
  198. package/resources/catalog/product-lines.d.ts +145 -71
  199. package/resources/catalog/product-lines.d.ts.map +1 -1
  200. package/resources/catalog/product-lines.js +30 -26
  201. package/resources/catalog/product-lines.js.map +1 -1
  202. package/resources/catalog/product-lines.mjs +30 -26
  203. package/resources/catalog/product-lines.mjs.map +1 -1
  204. package/resources/catalog/products.d.mts +196 -104
  205. package/resources/catalog/products.d.mts.map +1 -1
  206. package/resources/catalog/products.d.ts +196 -104
  207. package/resources/catalog/products.d.ts.map +1 -1
  208. package/resources/catalog/products.js +24 -21
  209. package/resources/catalog/products.js.map +1 -1
  210. package/resources/catalog/products.mjs +24 -21
  211. package/resources/catalog/products.mjs.map +1 -1
  212. package/resources/catalog/properties/attributes.d.mts +97 -48
  213. package/resources/catalog/properties/attributes.d.mts.map +1 -1
  214. package/resources/catalog/properties/attributes.d.ts +97 -48
  215. package/resources/catalog/properties/attributes.d.ts.map +1 -1
  216. package/resources/catalog/properties/attributes.js +27 -20
  217. package/resources/catalog/properties/attributes.js.map +1 -1
  218. package/resources/catalog/properties/attributes.mjs +27 -20
  219. package/resources/catalog/properties/attributes.mjs.map +1 -1
  220. package/resources/catalog/properties/index.d.mts +2 -2
  221. package/resources/catalog/properties/index.d.mts.map +1 -1
  222. package/resources/catalog/properties/index.d.ts +2 -2
  223. package/resources/catalog/properties/index.d.ts.map +1 -1
  224. package/resources/catalog/properties/index.mjs.map +1 -1
  225. package/resources/catalog/properties/properties.d.mts +70 -48
  226. package/resources/catalog/properties/properties.d.mts.map +1 -1
  227. package/resources/catalog/properties/properties.d.ts +70 -48
  228. package/resources/catalog/properties/properties.d.ts.map +1 -1
  229. package/resources/catalog/properties/properties.js +18 -18
  230. package/resources/catalog/properties/properties.js.map +1 -1
  231. package/resources/catalog/properties/properties.mjs +18 -18
  232. package/resources/catalog/properties/properties.mjs.map +1 -1
  233. package/resources/catalog/properties.d.mts.map +1 -1
  234. package/resources/catalog/properties.d.ts.map +1 -1
  235. package/resources/catalog/properties.mjs.map +1 -1
  236. package/resources/catalog/unit-groups/index.d.mts +2 -2
  237. package/resources/catalog/unit-groups/index.d.mts.map +1 -1
  238. package/resources/catalog/unit-groups/index.d.ts +2 -2
  239. package/resources/catalog/unit-groups/index.d.ts.map +1 -1
  240. package/resources/catalog/unit-groups/index.mjs.map +1 -1
  241. package/resources/catalog/unit-groups/unit-groups.d.mts +123 -85
  242. package/resources/catalog/unit-groups/unit-groups.d.mts.map +1 -1
  243. package/resources/catalog/unit-groups/unit-groups.d.ts +123 -85
  244. package/resources/catalog/unit-groups/unit-groups.d.ts.map +1 -1
  245. package/resources/catalog/unit-groups/unit-groups.js +25 -25
  246. package/resources/catalog/unit-groups/unit-groups.js.map +1 -1
  247. package/resources/catalog/unit-groups/unit-groups.mjs +25 -25
  248. package/resources/catalog/unit-groups/unit-groups.mjs.map +1 -1
  249. package/resources/catalog/unit-groups/units.d.mts +75 -59
  250. package/resources/catalog/unit-groups/units.d.mts.map +1 -1
  251. package/resources/catalog/unit-groups/units.d.ts +75 -59
  252. package/resources/catalog/unit-groups/units.d.ts.map +1 -1
  253. package/resources/catalog/unit-groups/units.js +31 -30
  254. package/resources/catalog/unit-groups/units.js.map +1 -1
  255. package/resources/catalog/unit-groups/units.mjs +31 -30
  256. package/resources/catalog/unit-groups/units.mjs.map +1 -1
  257. package/resources/catalog/unit-groups.d.mts.map +1 -1
  258. package/resources/catalog/unit-groups.d.ts.map +1 -1
  259. package/resources/catalog/unit-groups.mjs.map +1 -1
  260. package/resources/catalog/units.d.mts +100 -64
  261. package/resources/catalog/units.d.mts.map +1 -1
  262. package/resources/catalog/units.d.ts +100 -64
  263. package/resources/catalog/units.d.ts.map +1 -1
  264. package/resources/catalog/units.js +25 -25
  265. package/resources/catalog/units.js.map +1 -1
  266. package/resources/catalog/units.mjs +25 -25
  267. package/resources/catalog/units.mjs.map +1 -1
  268. package/resources/catalog.d.mts.map +1 -1
  269. package/resources/catalog.d.ts.map +1 -1
  270. package/resources/catalog.mjs.map +1 -1
  271. package/resources/core/addresses/actions.d.mts +12 -5
  272. package/resources/core/addresses/actions.d.mts.map +1 -1
  273. package/resources/core/addresses/actions.d.ts +12 -5
  274. package/resources/core/addresses/actions.d.ts.map +1 -1
  275. package/resources/core/addresses/actions.mjs.map +1 -1
  276. package/resources/core/addresses/addresses.d.mts +5 -2
  277. package/resources/core/addresses/addresses.d.mts.map +1 -1
  278. package/resources/core/addresses/addresses.d.ts +5 -2
  279. package/resources/core/addresses/addresses.d.ts.map +1 -1
  280. package/resources/core/addresses/addresses.js.map +1 -1
  281. package/resources/core/addresses/addresses.mjs.map +1 -1
  282. package/resources/core/addresses/index.d.mts.map +1 -1
  283. package/resources/core/addresses/index.d.ts.map +1 -1
  284. package/resources/core/addresses/index.mjs.map +1 -1
  285. package/resources/core/addresses.d.mts.map +1 -1
  286. package/resources/core/addresses.d.ts.map +1 -1
  287. package/resources/core/addresses.mjs.map +1 -1
  288. package/resources/core/audit-events.d.mts +78 -34
  289. package/resources/core/audit-events.d.mts.map +1 -1
  290. package/resources/core/audit-events.d.ts +78 -34
  291. package/resources/core/audit-events.d.ts.map +1 -1
  292. package/resources/core/audit-events.js +13 -10
  293. package/resources/core/audit-events.js.map +1 -1
  294. package/resources/core/audit-events.mjs +13 -10
  295. package/resources/core/audit-events.mjs.map +1 -1
  296. package/resources/core/core.d.mts +4 -4
  297. package/resources/core/core.d.mts.map +1 -1
  298. package/resources/core/core.d.ts +4 -4
  299. package/resources/core/core.d.ts.map +1 -1
  300. package/resources/core/core.mjs.map +1 -1
  301. package/resources/core/email-logs.d.mts +31 -21
  302. package/resources/core/email-logs.d.mts.map +1 -1
  303. package/resources/core/email-logs.d.ts +31 -21
  304. package/resources/core/email-logs.d.ts.map +1 -1
  305. package/resources/core/email-logs.js +10 -10
  306. package/resources/core/email-logs.js.map +1 -1
  307. package/resources/core/email-logs.mjs +10 -10
  308. package/resources/core/email-logs.mjs.map +1 -1
  309. package/resources/core/index.d.mts +4 -4
  310. package/resources/core/index.d.mts.map +1 -1
  311. package/resources/core/index.d.ts +4 -4
  312. package/resources/core/index.d.ts.map +1 -1
  313. package/resources/core/index.mjs.map +1 -1
  314. package/resources/core/request-logs.d.mts +95 -41
  315. package/resources/core/request-logs.d.mts.map +1 -1
  316. package/resources/core/request-logs.d.ts +95 -41
  317. package/resources/core/request-logs.d.ts.map +1 -1
  318. package/resources/core/request-logs.js +10 -10
  319. package/resources/core/request-logs.js.map +1 -1
  320. package/resources/core/request-logs.mjs +10 -10
  321. package/resources/core/request-logs.mjs.map +1 -1
  322. package/resources/core/sandboxes.d.mts +53 -32
  323. package/resources/core/sandboxes.d.mts.map +1 -1
  324. package/resources/core/sandboxes.d.ts +53 -32
  325. package/resources/core/sandboxes.d.ts.map +1 -1
  326. package/resources/core/sandboxes.js +20 -13
  327. package/resources/core/sandboxes.js.map +1 -1
  328. package/resources/core/sandboxes.mjs +20 -13
  329. package/resources/core/sandboxes.mjs.map +1 -1
  330. package/resources/core.d.mts.map +1 -1
  331. package/resources/core.d.ts.map +1 -1
  332. package/resources/core.mjs.map +1 -1
  333. package/resources/finance/finance.d.mts +69 -35
  334. package/resources/finance/finance.d.mts.map +1 -1
  335. package/resources/finance/finance.d.ts +69 -35
  336. package/resources/finance/finance.d.ts.map +1 -1
  337. package/resources/finance/finance.js +10 -10
  338. package/resources/finance/finance.js.map +1 -1
  339. package/resources/finance/finance.mjs +10 -10
  340. package/resources/finance/finance.mjs.map +1 -1
  341. package/resources/finance/index.d.mts +2 -2
  342. package/resources/finance/index.d.mts.map +1 -1
  343. package/resources/finance/index.d.ts +2 -2
  344. package/resources/finance/index.d.ts.map +1 -1
  345. package/resources/finance/index.mjs.map +1 -1
  346. package/resources/finance/payment-terms.d.mts +72 -44
  347. package/resources/finance/payment-terms.d.mts.map +1 -1
  348. package/resources/finance/payment-terms.d.ts +72 -44
  349. package/resources/finance/payment-terms.d.ts.map +1 -1
  350. package/resources/finance/payment-terms.js +32 -22
  351. package/resources/finance/payment-terms.js.map +1 -1
  352. package/resources/finance/payment-terms.mjs +32 -22
  353. package/resources/finance/payment-terms.mjs.map +1 -1
  354. package/resources/finance.d.mts.map +1 -1
  355. package/resources/finance.d.ts.map +1 -1
  356. package/resources/finance.mjs.map +1 -1
  357. package/resources/identity/account-users/account-users.d.mts +175 -93
  358. package/resources/identity/account-users/account-users.d.mts.map +1 -1
  359. package/resources/identity/account-users/account-users.d.ts +175 -93
  360. package/resources/identity/account-users/account-users.d.ts.map +1 -1
  361. package/resources/identity/account-users/account-users.js +43 -30
  362. package/resources/identity/account-users/account-users.js.map +1 -1
  363. package/resources/identity/account-users/account-users.mjs +43 -30
  364. package/resources/identity/account-users/account-users.mjs.map +1 -1
  365. package/resources/identity/account-users/actions.d.mts +13 -3
  366. package/resources/identity/account-users/actions.d.mts.map +1 -1
  367. package/resources/identity/account-users/actions.d.ts +13 -3
  368. package/resources/identity/account-users/actions.d.ts.map +1 -1
  369. package/resources/identity/account-users/actions.js +13 -3
  370. package/resources/identity/account-users/actions.js.map +1 -1
  371. package/resources/identity/account-users/actions.mjs +13 -3
  372. package/resources/identity/account-users/actions.mjs.map +1 -1
  373. package/resources/identity/account-users/index.d.mts +1 -1
  374. package/resources/identity/account-users/index.d.mts.map +1 -1
  375. package/resources/identity/account-users/index.d.ts +1 -1
  376. package/resources/identity/account-users/index.d.ts.map +1 -1
  377. package/resources/identity/account-users/index.mjs.map +1 -1
  378. package/resources/identity/account-users.d.mts.map +1 -1
  379. package/resources/identity/account-users.d.ts.map +1 -1
  380. package/resources/identity/account-users.mjs.map +1 -1
  381. package/resources/identity/identity.d.mts +2 -2
  382. package/resources/identity/identity.d.mts.map +1 -1
  383. package/resources/identity/identity.d.ts +2 -2
  384. package/resources/identity/identity.d.ts.map +1 -1
  385. package/resources/identity/identity.mjs.map +1 -1
  386. package/resources/identity/index.d.mts +2 -2
  387. package/resources/identity/index.d.mts.map +1 -1
  388. package/resources/identity/index.d.ts +2 -2
  389. package/resources/identity/index.d.ts.map +1 -1
  390. package/resources/identity/index.mjs.map +1 -1
  391. package/resources/identity/roles.d.mts +84 -61
  392. package/resources/identity/roles.d.mts.map +1 -1
  393. package/resources/identity/roles.d.ts +84 -61
  394. package/resources/identity/roles.d.ts.map +1 -1
  395. package/resources/identity/roles.js +29 -27
  396. package/resources/identity/roles.js.map +1 -1
  397. package/resources/identity/roles.mjs +29 -27
  398. package/resources/identity/roles.mjs.map +1 -1
  399. package/resources/identity.d.mts.map +1 -1
  400. package/resources/identity.d.ts.map +1 -1
  401. package/resources/identity.mjs.map +1 -1
  402. package/resources/index.d.mts +2 -1
  403. package/resources/index.d.mts.map +1 -1
  404. package/resources/index.d.ts +2 -1
  405. package/resources/index.d.ts.map +1 -1
  406. package/resources/index.js +3 -1
  407. package/resources/index.js.map +1 -1
  408. package/resources/index.mjs +1 -0
  409. package/resources/index.mjs.map +1 -1
  410. package/resources/operations/carriers/carriers.d.mts +101 -64
  411. package/resources/operations/carriers/carriers.d.mts.map +1 -1
  412. package/resources/operations/carriers/carriers.d.ts +101 -64
  413. package/resources/operations/carriers/carriers.d.ts.map +1 -1
  414. package/resources/operations/carriers/carriers.js +28 -24
  415. package/resources/operations/carriers/carriers.js.map +1 -1
  416. package/resources/operations/carriers/carriers.mjs +28 -24
  417. package/resources/operations/carriers/carriers.mjs.map +1 -1
  418. package/resources/operations/carriers/index.d.mts +2 -2
  419. package/resources/operations/carriers/index.d.mts.map +1 -1
  420. package/resources/operations/carriers/index.d.ts +2 -2
  421. package/resources/operations/carriers/index.d.ts.map +1 -1
  422. package/resources/operations/carriers/index.mjs.map +1 -1
  423. package/resources/operations/carriers/service-levels.d.mts +113 -69
  424. package/resources/operations/carriers/service-levels.d.mts.map +1 -1
  425. package/resources/operations/carriers/service-levels.d.ts +113 -69
  426. package/resources/operations/carriers/service-levels.d.ts.map +1 -1
  427. package/resources/operations/carriers/service-levels.js +34 -30
  428. package/resources/operations/carriers/service-levels.js.map +1 -1
  429. package/resources/operations/carriers/service-levels.mjs +34 -30
  430. package/resources/operations/carriers/service-levels.mjs.map +1 -1
  431. package/resources/operations/carriers.d.mts.map +1 -1
  432. package/resources/operations/carriers.d.ts.map +1 -1
  433. package/resources/operations/carriers.mjs.map +1 -1
  434. package/resources/operations/index.d.mts +4 -4
  435. package/resources/operations/index.d.mts.map +1 -1
  436. package/resources/operations/index.d.ts +4 -4
  437. package/resources/operations/index.d.ts.map +1 -1
  438. package/resources/operations/index.mjs.map +1 -1
  439. package/resources/operations/location-types.d.mts +33 -18
  440. package/resources/operations/location-types.d.mts.map +1 -1
  441. package/resources/operations/location-types.d.ts +33 -18
  442. package/resources/operations/location-types.d.ts.map +1 -1
  443. package/resources/operations/location-types.js +12 -12
  444. package/resources/operations/location-types.js.map +1 -1
  445. package/resources/operations/location-types.mjs +12 -12
  446. package/resources/operations/location-types.mjs.map +1 -1
  447. package/resources/operations/locations.d.mts +132 -67
  448. package/resources/operations/locations.d.mts.map +1 -1
  449. package/resources/operations/locations.d.ts +132 -67
  450. package/resources/operations/locations.d.ts.map +1 -1
  451. package/resources/operations/locations.js +23 -20
  452. package/resources/operations/locations.js.map +1 -1
  453. package/resources/operations/locations.mjs +23 -20
  454. package/resources/operations/locations.mjs.map +1 -1
  455. package/resources/operations/operations.d.mts +4 -4
  456. package/resources/operations/operations.d.mts.map +1 -1
  457. package/resources/operations/operations.d.ts +4 -4
  458. package/resources/operations/operations.d.ts.map +1 -1
  459. package/resources/operations/operations.mjs.map +1 -1
  460. package/resources/operations/scanning-stations.d.mts +143 -72
  461. package/resources/operations/scanning-stations.d.mts.map +1 -1
  462. package/resources/operations/scanning-stations.d.ts +143 -72
  463. package/resources/operations/scanning-stations.d.ts.map +1 -1
  464. package/resources/operations/scanning-stations.js +31 -25
  465. package/resources/operations/scanning-stations.js.map +1 -1
  466. package/resources/operations/scanning-stations.mjs +31 -25
  467. package/resources/operations/scanning-stations.mjs.map +1 -1
  468. package/resources/operations/shipping-terms.d.mts +121 -86
  469. package/resources/operations/shipping-terms.d.mts.map +1 -1
  470. package/resources/operations/shipping-terms.d.ts +121 -86
  471. package/resources/operations/shipping-terms.d.ts.map +1 -1
  472. package/resources/operations/shipping-terms.js +27 -26
  473. package/resources/operations/shipping-terms.js.map +1 -1
  474. package/resources/operations/shipping-terms.mjs +27 -26
  475. package/resources/operations/shipping-terms.mjs.map +1 -1
  476. package/resources/operations.d.mts.map +1 -1
  477. package/resources/operations.d.ts.map +1 -1
  478. package/resources/operations.mjs.map +1 -1
  479. package/resources/sales/account-groups.d.mts +149 -66
  480. package/resources/sales/account-groups.d.mts.map +1 -1
  481. package/resources/sales/account-groups.d.ts +149 -66
  482. package/resources/sales/account-groups.d.ts.map +1 -1
  483. package/resources/sales/account-groups.js +29 -21
  484. package/resources/sales/account-groups.js.map +1 -1
  485. package/resources/sales/account-groups.mjs +29 -21
  486. package/resources/sales/account-groups.mjs.map +1 -1
  487. package/resources/sales/account-statuses.d.mts +41 -23
  488. package/resources/sales/account-statuses.d.mts.map +1 -1
  489. package/resources/sales/account-statuses.d.ts +41 -23
  490. package/resources/sales/account-statuses.d.ts.map +1 -1
  491. package/resources/sales/account-statuses.js +16 -13
  492. package/resources/sales/account-statuses.js.map +1 -1
  493. package/resources/sales/account-statuses.mjs +16 -13
  494. package/resources/sales/account-statuses.mjs.map +1 -1
  495. package/resources/sales/addresses.d.mts +96 -50
  496. package/resources/sales/addresses.d.mts.map +1 -1
  497. package/resources/sales/addresses.d.ts +96 -50
  498. package/resources/sales/addresses.d.ts.map +1 -1
  499. package/resources/sales/addresses.js +28 -19
  500. package/resources/sales/addresses.js.map +1 -1
  501. package/resources/sales/addresses.mjs +28 -19
  502. package/resources/sales/addresses.mjs.map +1 -1
  503. package/resources/sales/customers/actions.d.mts +15 -5
  504. package/resources/sales/customers/actions.d.mts.map +1 -1
  505. package/resources/sales/customers/actions.d.ts +15 -5
  506. package/resources/sales/customers/actions.d.ts.map +1 -1
  507. package/resources/sales/customers/actions.js +6 -2
  508. package/resources/sales/customers/actions.js.map +1 -1
  509. package/resources/sales/customers/actions.mjs +6 -2
  510. package/resources/sales/customers/actions.mjs.map +1 -1
  511. package/resources/sales/customers/customers.d.mts +583 -288
  512. package/resources/sales/customers/customers.d.mts.map +1 -1
  513. package/resources/sales/customers/customers.d.ts +583 -288
  514. package/resources/sales/customers/customers.d.ts.map +1 -1
  515. package/resources/sales/customers/customers.js +52 -30
  516. package/resources/sales/customers/customers.js.map +1 -1
  517. package/resources/sales/customers/customers.mjs +52 -30
  518. package/resources/sales/customers/customers.mjs.map +1 -1
  519. package/resources/sales/customers/index.d.mts +1 -1
  520. package/resources/sales/customers/index.d.mts.map +1 -1
  521. package/resources/sales/customers/index.d.ts +1 -1
  522. package/resources/sales/customers/index.d.ts.map +1 -1
  523. package/resources/sales/customers/index.js.map +1 -1
  524. package/resources/sales/customers/index.mjs.map +1 -1
  525. package/resources/sales/customers.d.mts.map +1 -1
  526. package/resources/sales/customers.d.ts.map +1 -1
  527. package/resources/sales/customers.mjs.map +1 -1
  528. package/resources/sales/index.d.mts +6 -6
  529. package/resources/sales/index.d.mts.map +1 -1
  530. package/resources/sales/index.d.ts +6 -6
  531. package/resources/sales/index.d.ts.map +1 -1
  532. package/resources/sales/index.js.map +1 -1
  533. package/resources/sales/index.mjs.map +1 -1
  534. package/resources/sales/priorities.d.mts +31 -21
  535. package/resources/sales/priorities.d.mts.map +1 -1
  536. package/resources/sales/priorities.d.ts +31 -21
  537. package/resources/sales/priorities.d.ts.map +1 -1
  538. package/resources/sales/priorities.js +10 -10
  539. package/resources/sales/priorities.js.map +1 -1
  540. package/resources/sales/priorities.mjs +10 -10
  541. package/resources/sales/priorities.mjs.map +1 -1
  542. package/resources/sales/sales-orders.d.mts +877 -7
  543. package/resources/sales/sales-orders.d.mts.map +1 -1
  544. package/resources/sales/sales-orders.d.ts +877 -7
  545. package/resources/sales/sales-orders.d.ts.map +1 -1
  546. package/resources/sales/sales-orders.js +45 -3
  547. package/resources/sales/sales-orders.js.map +1 -1
  548. package/resources/sales/sales-orders.mjs +45 -3
  549. package/resources/sales/sales-orders.mjs.map +1 -1
  550. package/resources/sales/sales.d.mts +8 -8
  551. package/resources/sales/sales.d.mts.map +1 -1
  552. package/resources/sales/sales.d.ts +8 -8
  553. package/resources/sales/sales.d.ts.map +1 -1
  554. package/resources/sales/sales.js.map +1 -1
  555. package/resources/sales/sales.mjs.map +1 -1
  556. package/resources/sales.d.mts.map +1 -1
  557. package/resources/sales.d.ts.map +1 -1
  558. package/resources/sales.mjs.map +1 -1
  559. package/resources/settings/index.d.mts +3 -0
  560. package/resources/settings/index.d.mts.map +1 -0
  561. package/resources/settings/index.d.ts +3 -0
  562. package/resources/settings/index.d.ts.map +1 -0
  563. package/resources/settings/index.js +9 -0
  564. package/resources/settings/index.js.map +1 -0
  565. package/resources/settings/index.mjs +4 -0
  566. package/resources/settings/index.mjs.map +1 -0
  567. package/resources/settings/integrations.d.mts +238 -0
  568. package/resources/settings/integrations.d.mts.map +1 -0
  569. package/resources/settings/integrations.d.ts +238 -0
  570. package/resources/settings/integrations.d.ts.map +1 -0
  571. package/resources/settings/integrations.js +80 -0
  572. package/resources/settings/integrations.js.map +1 -0
  573. package/resources/settings/integrations.mjs +76 -0
  574. package/resources/settings/integrations.mjs.map +1 -0
  575. package/resources/settings/settings.d.mts +10 -0
  576. package/resources/settings/settings.d.mts.map +1 -0
  577. package/resources/settings/settings.d.ts +10 -0
  578. package/resources/settings/settings.d.ts.map +1 -0
  579. package/resources/settings/settings.js +17 -0
  580. package/resources/settings/settings.js.map +1 -0
  581. package/resources/settings/settings.mjs +12 -0
  582. package/resources/settings/settings.mjs.map +1 -0
  583. package/resources/settings.d.mts +2 -0
  584. package/resources/settings.d.mts.map +1 -0
  585. package/resources/settings.d.ts +2 -0
  586. package/resources/settings.d.ts.map +1 -0
  587. package/resources/settings.js +6 -0
  588. package/resources/settings.js.map +1 -0
  589. package/resources/settings.mjs +3 -0
  590. package/resources/settings.mjs.map +1 -0
  591. package/resources.d.mts.map +1 -1
  592. package/resources.d.ts.map +1 -1
  593. package/resources.mjs.map +1 -1
  594. package/src/client.ts +13 -3
  595. package/src/resources/auth/api-keys/actions.ts +28 -5
  596. package/src/resources/auth/api-keys/api-keys.ts +142 -78
  597. package/src/resources/auth/api-keys/index.ts +1 -1
  598. package/src/resources/auth/auth.ts +1 -1
  599. package/src/resources/auth/index.ts +1 -1
  600. package/src/resources/catalog/catalog.ts +18 -18
  601. package/src/resources/catalog/index.ts +18 -18
  602. package/src/resources/catalog/item-categories/index.ts +2 -2
  603. package/src/resources/catalog/item-categories/item-categories.ts +115 -86
  604. package/src/resources/catalog/item-categories/properties.ts +9 -4
  605. package/src/resources/catalog/items/attributes.ts +3 -2
  606. package/src/resources/catalog/items/index.ts +2 -2
  607. package/src/resources/catalog/items/items.ts +111 -75
  608. package/src/resources/catalog/materials.ts +167 -120
  609. package/src/resources/catalog/parts.ts +149 -99
  610. package/src/resources/catalog/product-lines.ts +159 -85
  611. package/src/resources/catalog/products.ts +211 -119
  612. package/src/resources/catalog/properties/attributes.ts +109 -82
  613. package/src/resources/catalog/properties/index.ts +4 -4
  614. package/src/resources/catalog/properties/properties.ts +83 -61
  615. package/src/resources/catalog/unit-groups/index.ts +4 -4
  616. package/src/resources/catalog/unit-groups/unit-groups.ts +140 -102
  617. package/src/resources/catalog/unit-groups/units.ts +94 -78
  618. package/src/resources/catalog/units.ts +113 -77
  619. package/src/resources/core/addresses/actions.ts +12 -5
  620. package/src/resources/core/addresses/addresses.ts +5 -2
  621. package/src/resources/core/audit-events.ts +154 -47
  622. package/src/resources/core/core.ts +5 -5
  623. package/src/resources/core/email-logs.ts +39 -29
  624. package/src/resources/core/index.ts +5 -5
  625. package/src/resources/core/request-logs.ts +113 -57
  626. package/src/resources/core/sandboxes.ts +58 -37
  627. package/src/resources/finance/finance.ts +78 -44
  628. package/src/resources/finance/index.ts +4 -4
  629. package/src/resources/finance/payment-terms.ts +84 -56
  630. package/src/resources/identity/account-users/account-users.ts +190 -105
  631. package/src/resources/identity/account-users/actions.ts +13 -3
  632. package/src/resources/identity/account-users/index.ts +2 -2
  633. package/src/resources/identity/identity.ts +4 -4
  634. package/src/resources/identity/index.ts +4 -4
  635. package/src/resources/identity/roles.ts +92 -69
  636. package/src/resources/index.ts +3 -2
  637. package/src/resources/operations/carriers/carriers.ts +109 -72
  638. package/src/resources/operations/carriers/index.ts +4 -4
  639. package/src/resources/operations/carriers/service-levels.ts +133 -89
  640. package/src/resources/operations/index.ts +8 -8
  641. package/src/resources/operations/location-types.ts +38 -23
  642. package/src/resources/operations/locations.ts +141 -76
  643. package/src/resources/operations/operations.ts +8 -8
  644. package/src/resources/operations/scanning-stations.ts +159 -88
  645. package/src/resources/operations/shipping-terms.ts +135 -100
  646. package/src/resources/sales/account-groups.ts +159 -76
  647. package/src/resources/sales/account-statuses.ts +48 -30
  648. package/src/resources/sales/addresses.ts +104 -58
  649. package/src/resources/sales/customers/actions.ts +15 -4
  650. package/src/resources/sales/customers/customers.ts +655 -347
  651. package/src/resources/sales/customers/index.ts +4 -2
  652. package/src/resources/sales/index.ts +25 -6
  653. package/src/resources/sales/priorities.ts +39 -29
  654. package/src/resources/sales/sales-orders.ts +1113 -21
  655. package/src/resources/sales/sales.ts +44 -6
  656. package/src/resources/settings/index.ts +13 -0
  657. package/src/resources/settings/integrations.ts +291 -0
  658. package/src/resources/settings/settings.ts +33 -0
  659. package/src/resources/settings.ts +3 -0
  660. package/src/version.ts +1 -1
  661. package/uploads.d.mts +0 -1
  662. package/uploads.d.mts.map +1 -1
  663. package/uploads.d.ts +0 -1
  664. package/uploads.d.ts.map +1 -1
  665. package/uploads.mjs +0 -1
  666. package/uploads.mjs.map +1 -1
  667. package/version.d.mts +1 -1
  668. package/version.d.ts +1 -1
  669. package/version.js +1 -1
  670. package/version.mjs +1 -1
@@ -9,17 +9,14 @@ import { RequestOptions } from "../../internal/request-options.js";
9
9
  */
10
10
  export declare class Parts extends APIResource {
11
11
  /**
12
- * Creates a part with the specified SKU and category.
12
+ * Returns a paginated list of parts for the current account.
13
13
  *
14
14
  * @example
15
15
  * ```ts
16
- * const part = await client.catalog.parts.create({
17
- * category_id: 'ic_01ae7bd7bfd21ca0ab81e1357e',
18
- * sku: 'BRG-6204-2RS',
19
- * });
16
+ * const listPart = await client.catalog.parts.list();
20
17
  * ```
21
18
  */
22
- create(params: PartCreateParams, options?: RequestOptions): APIPromise<Part>;
19
+ list(query?: PartListParams | null | undefined, options?: RequestOptions): APIPromise<ListPart>;
23
20
  /**
24
21
  * Returns a part by ID.
25
22
  *
@@ -32,28 +29,44 @@ export declare class Parts extends APIResource {
32
29
  */
33
30
  retrieve(id: string, query?: PartRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<Part>;
34
31
  /**
35
- * Partially updates a part. Fields not provided retain their current values.
32
+ * Creates a part with the specified SKU and category.
33
+ *
34
+ * Inventory tracking for the new part starts at a zero on-hand quantity in the
35
+ * category's base unit.
36
36
  *
37
37
  * @example
38
38
  * ```ts
39
- * const part = await client.catalog.parts.update(
40
- * 'pt_018d7bab53e864351f4c693a21',
41
- * { sku: 'BRG-6204-2RS' },
42
- * );
39
+ * const part = await client.catalog.parts.create({
40
+ * category_id: 'ic_01ae7bd7bfd21ca0ab81e1357e',
41
+ * sku: 'BRG-6204-2RS',
42
+ * description: 'Deep groove ball bearing, 20x47x14mm',
43
+ * });
43
44
  * ```
44
45
  */
45
- update(id: string, params?: PartUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Part>;
46
+ create(params: PartCreateParams, options?: RequestOptions): APIPromise<Part>;
46
47
  /**
47
- * Returns a paginated list of parts for the current account.
48
+ * Partially updates a part.
49
+ *
50
+ * Fields not provided retain their current values.
48
51
  *
49
52
  * @example
50
53
  * ```ts
51
- * const listPart = await client.catalog.parts.list();
54
+ * const part = await client.catalog.parts.update(
55
+ * 'pt_018d7bab53e864351f4c693a21',
56
+ * {
57
+ * description: 'Deep groove ball bearing, 20x47x14mm',
58
+ * sku: 'BRG-6204-2RS',
59
+ * },
60
+ * );
52
61
  * ```
53
62
  */
54
- list(query?: PartListParams | null | undefined, options?: RequestOptions): APIPromise<ListPart>;
63
+ update(id: string, params?: PartUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Part>;
55
64
  /**
56
- * Deletes a part. Sets the deleted_at timestamp rather than removing the record.
65
+ * Deletes a part.
66
+ *
67
+ * This is a soft delete: the part is marked deleted and no longer returned by
68
+ * other endpoints, but the record is retained. Deleting an already-deleted part
69
+ * returns an error.
57
70
  *
58
71
  * @example
59
72
  * ```ts
@@ -69,34 +82,41 @@ export declare class Parts extends APIResource {
69
82
  */
70
83
  export interface CreatePartRequest {
71
84
  /**
72
- * Category ID.
85
+ * ID of the item category to place the part in.
86
+ *
87
+ * The category's unit group determines the base unit used for the part's rates
88
+ * (`unit_value`, `unit_cost`, `burn_rate`).
73
89
  */
74
90
  category_id: string;
75
91
  /**
76
- * SKU.
92
+ * Stock keeping unit code for the part.
93
+ *
94
+ * Must be unique within the account; creating a part with a SKU already used by
95
+ * another item fails with a conflict error.
77
96
  */
78
97
  sku: string;
79
98
  /**
80
- * Attribute IDs to connect to the part at creation time.
99
+ * IDs of existing attributes to link to the part at creation time.
81
100
  */
82
101
  attribute_ids?: Array<string>;
83
102
  /**
84
- * Description.
103
+ * Free-form description of the part.
85
104
  */
86
- description?: string | null;
105
+ description?: string;
87
106
  /**
88
- * Notes.
107
+ * Free-form notes about the part.
89
108
  */
90
- notes?: string | null;
109
+ notes?: string;
91
110
  /**
92
- * Initial unit cost. Same currency rule as unit_price.
111
+ * A rate value with its numerator and denominator units, used in create and update
112
+ * requests.
93
113
  */
94
- unit_cost?: MaterialsAPI.RateInput | null;
114
+ unit_cost?: MaterialsAPI.RateInput;
95
115
  /**
96
- * Initial unit price. When set, numerator must be a currency unit and denominator
97
- * must not be.
116
+ * A rate value with its numerator and denominator units, used in create and update
117
+ * requests.
98
118
  */
99
- unit_price?: MaterialsAPI.RateInput | null;
119
+ unit_price?: MaterialsAPI.RateInput;
100
120
  }
101
121
  /**
102
122
  * List represents a paginated list of resources.
@@ -116,7 +136,10 @@ export interface ListPart {
116
136
  page_info: APIKeysAPI.PageInfo;
117
137
  }
118
138
  /**
119
- * Part resource.
139
+ * A part in the account's catalog: a component used in production.
140
+ *
141
+ * Part-level data such as the SKU, description, category, pricing, and attributes
142
+ * lives on the underlying `item`.
120
143
  */
121
144
  export interface Part {
122
145
  /**
@@ -145,53 +168,65 @@ export interface Part {
145
168
  */
146
169
  export interface UpdatePartRequest {
147
170
  /**
148
- * Description.
171
+ * New description for the part.
172
+ *
173
+ * Set to a string to replace the current description, or `null` to clear it.
149
174
  */
150
175
  description?: string | null;
151
176
  /**
152
- * Notes.
177
+ * New notes for the part.
178
+ *
179
+ * Set to a string to replace the current notes, or `null` to clear them.
153
180
  */
154
181
  notes?: string | null;
155
182
  /**
156
- * SKU.
183
+ * New stock keeping unit code for the part.
184
+ *
185
+ * Must remain unique within the account; a conflict error is returned if another
186
+ * item already uses it.
157
187
  */
158
188
  sku?: string;
159
189
  }
160
- export interface PartCreateParams {
190
+ export interface PartListParams {
161
191
  /**
162
- * Body param: Category ID.
192
+ * Filter by attribute IDs.
163
193
  */
164
- category_id: string;
194
+ attribute_ids?: Array<string>;
165
195
  /**
166
- * Body param: SKU.
196
+ * Filter by category IDs.
167
197
  */
168
- sku: string;
198
+ category_ids?: Array<string>;
169
199
  /**
170
- * Query param: Sub-objects to expand in the response. When omitted, sub-objects
171
- * are returned as `null`.
200
+ * Opaque cursor token identifying where the page of results starts.
201
+ *
202
+ * Use the `cursor` value embedded in a previous response's `next_page_url` or
203
+ * `previous_page_url` to fetch the adjacent page. Omit to start from the first
204
+ * page.
172
205
  */
173
- include?: Array<'item' | 'item.category' | 'item.unit_value' | 'item.unit_cost' | 'item.burn_rate' | 'item.attributes'>;
206
+ cursor?: string;
174
207
  /**
175
- * Body param: Attribute IDs to connect to the part at creation time.
208
+ * Filter parts created on or before this date.
176
209
  */
177
- attribute_ids?: Array<string>;
210
+ end_date?: string;
178
211
  /**
179
- * Body param: Description.
212
+ * Sub-objects to expand in the response. When omitted, sub-objects are returned as
213
+ * `null`.
180
214
  */
181
- description?: string | null;
215
+ include?: Array<'item' | 'item.category' | 'item.category.properties' | 'item.category.unit_group' | 'item.unit_value' | 'item.unit_cost' | 'item.burn_rate' | 'item.attributes'>;
182
216
  /**
183
- * Body param: Notes.
217
+ * Maximum number of results to return in a single page.
184
218
  */
185
- notes?: string | null;
219
+ limit?: number;
186
220
  /**
187
- * Body param: Initial unit cost. Same currency rule as unit_price.
221
+ * Free-text search term used to filter results.
222
+ *
223
+ * Which fields are matched against the term varies by endpoint.
188
224
  */
189
- unit_cost?: MaterialsAPI.RateInput | null;
225
+ q?: string;
190
226
  /**
191
- * Body param: Initial unit price. When set, numerator must be a currency unit and
192
- * denominator must not be.
227
+ * Filter parts created on or after this date.
193
228
  */
194
- unit_price?: MaterialsAPI.RateInput | null;
229
+ start_date?: string;
195
230
  }
196
231
  export interface PartRetrieveParams {
197
232
  /**
@@ -200,61 +235,76 @@ export interface PartRetrieveParams {
200
235
  */
201
236
  include?: Array<'item' | 'item.category' | 'item.category.properties' | 'item.category.unit_group' | 'item.unit_value' | 'item.unit_cost' | 'item.burn_rate' | 'item.attributes'>;
202
237
  }
203
- export interface PartUpdateParams {
238
+ export interface PartCreateParams {
204
239
  /**
205
- * Query param: Sub-objects to expand in the response. When omitted, sub-objects
206
- * are returned as `null`.
240
+ * Body param: ID of the item category to place the part in.
241
+ *
242
+ * The category's unit group determines the base unit used for the part's rates
243
+ * (`unit_value`, `unit_cost`, `burn_rate`).
207
244
  */
208
- include?: Array<'item' | 'item.category' | 'item.unit_value' | 'item.unit_cost' | 'item.burn_rate' | 'item.attributes'>;
245
+ category_id: string;
209
246
  /**
210
- * Body param: Description.
247
+ * Body param: Stock keeping unit code for the part.
248
+ *
249
+ * Must be unique within the account; creating a part with a SKU already used by
250
+ * another item fails with a conflict error.
211
251
  */
212
- description?: string | null;
252
+ sku: string;
213
253
  /**
214
- * Body param: Notes.
254
+ * Query param: Sub-objects to expand in the response. When omitted, sub-objects
255
+ * are returned as `null`.
215
256
  */
216
- notes?: string | null;
257
+ include?: Array<'item' | 'item.category' | 'item.unit_value' | 'item.unit_cost' | 'item.burn_rate' | 'item.attributes'>;
217
258
  /**
218
- * Body param: SKU.
259
+ * Body param: IDs of existing attributes to link to the part at creation time.
219
260
  */
220
- sku?: string;
221
- }
222
- export interface PartListParams {
261
+ attribute_ids?: Array<string>;
223
262
  /**
224
- * Filter by attribute IDs.
263
+ * Body param: Free-form description of the part.
225
264
  */
226
- attribute_ids?: Array<string>;
265
+ description?: string;
227
266
  /**
228
- * Filter by category IDs.
267
+ * Body param: Free-form notes about the part.
229
268
  */
230
- category_ids?: Array<string>;
269
+ notes?: string;
231
270
  /**
232
- * Cursor token used to retrieve the next or previous page of results.
271
+ * Body param: A rate value with its numerator and denominator units, used in
272
+ * create and update requests.
233
273
  */
234
- cursor?: string;
274
+ unit_cost?: MaterialsAPI.RateInput;
235
275
  /**
236
- * Filter parts created on or before this date.
276
+ * Body param: A rate value with its numerator and denominator units, used in
277
+ * create and update requests.
237
278
  */
238
- end_date?: string;
279
+ unit_price?: MaterialsAPI.RateInput;
280
+ }
281
+ export interface PartUpdateParams {
239
282
  /**
240
- * Sub-objects to expand in the response. When omitted, sub-objects are returned as
241
- * `null`.
283
+ * Query param: Sub-objects to expand in the response. When omitted, sub-objects
284
+ * are returned as `null`.
242
285
  */
243
- include?: Array<'item' | 'item.category' | 'item.category.properties' | 'item.category.unit_group' | 'item.unit_value' | 'item.unit_cost' | 'item.burn_rate' | 'item.attributes'>;
286
+ include?: Array<'item' | 'item.category' | 'item.unit_value' | 'item.unit_cost' | 'item.burn_rate' | 'item.attributes'>;
244
287
  /**
245
- * Maximum number of results per page (default: 100, max: 1000).
288
+ * Body param: New description for the part.
289
+ *
290
+ * Set to a string to replace the current description, or `null` to clear it.
246
291
  */
247
- limit?: number;
292
+ description?: string | null;
248
293
  /**
249
- * Search query used to filter results.
294
+ * Body param: New notes for the part.
295
+ *
296
+ * Set to a string to replace the current notes, or `null` to clear them.
250
297
  */
251
- q?: string;
298
+ notes?: string | null;
252
299
  /**
253
- * Filter parts created on or after this date.
300
+ * Body param: New stock keeping unit code for the part.
301
+ *
302
+ * Must remain unique within the account; a conflict error is returned if another
303
+ * item already uses it.
254
304
  */
255
- start_date?: string;
305
+ sku?: string;
256
306
  }
257
307
  export declare namespace Parts {
258
- export { type CreatePartRequest as CreatePartRequest, type ListPart as ListPart, type Part as Part, type UpdatePartRequest as UpdatePartRequest, type PartCreateParams as PartCreateParams, type PartRetrieveParams as PartRetrieveParams, type PartUpdateParams as PartUpdateParams, type PartListParams as PartListParams, };
308
+ export { type CreatePartRequest as CreatePartRequest, type ListPart as ListPart, type Part as Part, type UpdatePartRequest as UpdatePartRequest, type PartListParams as PartListParams, type PartRetrieveParams as PartRetrieveParams, type PartCreateParams as PartCreateParams, type PartUpdateParams as PartUpdateParams, };
259
309
  }
260
310
  //# sourceMappingURL=parts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../src/resources/catalog/parts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,YAAY,uBAAoB;AAC5C,OAAO,KAAK,UAAU,qCAAkC;AACxD,OAAO,KAAK,QAAQ,yBAAsB;AAC1C,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAK5E;;;;;;;;;OASG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,IAAI,CAAC;IAInB;;;;;;;;;;OAUG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MA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B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -9,19 +9,15 @@ const path_1 = require("../../internal/utils/path.js");
9
9
  */
10
10
  class Parts extends resource_1.APIResource {
11
11
  /**
12
- * Creates a part with the specified SKU and category.
12
+ * Returns a paginated list of parts for the current account.
13
13
  *
14
14
  * @example
15
15
  * ```ts
16
- * const part = await client.catalog.parts.create({
17
- * category_id: 'ic_01ae7bd7bfd21ca0ab81e1357e',
18
- * sku: 'BRG-6204-2RS',
19
- * });
16
+ * const listPart = await client.catalog.parts.list();
20
17
  * ```
21
18
  */
22
- create(params, options) {
23
- const { include, ...body } = params;
24
- return this._client.post('/v1/catalog/parts', { query: { include }, body, ...options });
19
+ list(query = {}, options) {
20
+ return this._client.get('/v1/catalog/parts', { query, ...options });
25
21
  }
26
22
  /**
27
23
  * Returns a part by ID.
@@ -37,33 +33,50 @@ class Parts extends resource_1.APIResource {
37
33
  return this._client.get((0, path_1.path) `/v1/catalog/parts/${id}`, { query, ...options });
38
34
  }
39
35
  /**
40
- * Partially updates a part. Fields not provided retain their current values.
36
+ * Creates a part with the specified SKU and category.
37
+ *
38
+ * Inventory tracking for the new part starts at a zero on-hand quantity in the
39
+ * category's base unit.
41
40
  *
42
41
  * @example
43
42
  * ```ts
44
- * const part = await client.catalog.parts.update(
45
- * 'pt_018d7bab53e864351f4c693a21',
46
- * { sku: 'BRG-6204-2RS' },
47
- * );
43
+ * const part = await client.catalog.parts.create({
44
+ * category_id: 'ic_01ae7bd7bfd21ca0ab81e1357e',
45
+ * sku: 'BRG-6204-2RS',
46
+ * description: 'Deep groove ball bearing, 20x47x14mm',
47
+ * });
48
48
  * ```
49
49
  */
50
- update(id, params = {}, options) {
51
- const { include, ...body } = params ?? {};
52
- return this._client.patch((0, path_1.path) `/v1/catalog/parts/${id}`, { query: { include }, body, ...options });
50
+ create(params, options) {
51
+ const { include, ...body } = params;
52
+ return this._client.post('/v1/catalog/parts', { query: { include }, body, ...options });
53
53
  }
54
54
  /**
55
- * Returns a paginated list of parts for the current account.
55
+ * Partially updates a part.
56
+ *
57
+ * Fields not provided retain their current values.
56
58
  *
57
59
  * @example
58
60
  * ```ts
59
- * const listPart = await client.catalog.parts.list();
61
+ * const part = await client.catalog.parts.update(
62
+ * 'pt_018d7bab53e864351f4c693a21',
63
+ * {
64
+ * description: 'Deep groove ball bearing, 20x47x14mm',
65
+ * sku: 'BRG-6204-2RS',
66
+ * },
67
+ * );
60
68
  * ```
61
69
  */
62
- list(query = {}, options) {
63
- return this._client.get('/v1/catalog/parts', { query, ...options });
70
+ update(id, params = {}, options) {
71
+ const { include, ...body } = params ?? {};
72
+ return this._client.patch((0, path_1.path) `/v1/catalog/parts/${id}`, { query: { include }, body, ...options });
64
73
  }
65
74
  /**
66
- * Deletes a part. Sets the deleted_at timestamp rather than removing the record.
75
+ * Deletes a part.
76
+ *
77
+ * This is a soft delete: the part is marked deleted and no longer returned by
78
+ * other endpoints, but the record is retained. Deleting an already-deleted part
79
+ * returns an error.
67
80
  *
68
81
  * @example
69
82
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"parts.js","sourceRoot":"","sources":["../../src/resources/catalog/parts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAwB,EAAE,OAAwB;QACvD,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,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E,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AA7FD,sBA6FC"}
@@ -6,19 +6,15 @@ import { path } from "../../internal/utils/path.mjs";
6
6
  */
7
7
  export class Parts extends APIResource {
8
8
  /**
9
- * Creates a part with the specified SKU and category.
9
+ * Returns a paginated list of parts for the current account.
10
10
  *
11
11
  * @example
12
12
  * ```ts
13
- * const part = await client.catalog.parts.create({
14
- * category_id: 'ic_01ae7bd7bfd21ca0ab81e1357e',
15
- * sku: 'BRG-6204-2RS',
16
- * });
13
+ * const listPart = await client.catalog.parts.list();
17
14
  * ```
18
15
  */
19
- create(params, options) {
20
- const { include, ...body } = params;
21
- return this._client.post('/v1/catalog/parts', { query: { include }, body, ...options });
16
+ list(query = {}, options) {
17
+ return this._client.get('/v1/catalog/parts', { query, ...options });
22
18
  }
23
19
  /**
24
20
  * Returns a part by ID.
@@ -34,33 +30,50 @@ export class Parts extends APIResource {
34
30
  return this._client.get(path `/v1/catalog/parts/${id}`, { query, ...options });
35
31
  }
36
32
  /**
37
- * Partially updates a part. Fields not provided retain their current values.
33
+ * Creates a part with the specified SKU and category.
34
+ *
35
+ * Inventory tracking for the new part starts at a zero on-hand quantity in the
36
+ * category's base unit.
38
37
  *
39
38
  * @example
40
39
  * ```ts
41
- * const part = await client.catalog.parts.update(
42
- * 'pt_018d7bab53e864351f4c693a21',
43
- * { sku: 'BRG-6204-2RS' },
44
- * );
40
+ * const part = await client.catalog.parts.create({
41
+ * category_id: 'ic_01ae7bd7bfd21ca0ab81e1357e',
42
+ * sku: 'BRG-6204-2RS',
43
+ * description: 'Deep groove ball bearing, 20x47x14mm',
44
+ * });
45
45
  * ```
46
46
  */
47
- update(id, params = {}, options) {
48
- const { include, ...body } = params ?? {};
49
- return this._client.patch(path `/v1/catalog/parts/${id}`, { query: { include }, body, ...options });
47
+ create(params, options) {
48
+ const { include, ...body } = params;
49
+ return this._client.post('/v1/catalog/parts', { query: { include }, body, ...options });
50
50
  }
51
51
  /**
52
- * Returns a paginated list of parts for the current account.
52
+ * Partially updates a part.
53
+ *
54
+ * Fields not provided retain their current values.
53
55
  *
54
56
  * @example
55
57
  * ```ts
56
- * const listPart = await client.catalog.parts.list();
58
+ * const part = await client.catalog.parts.update(
59
+ * 'pt_018d7bab53e864351f4c693a21',
60
+ * {
61
+ * description: 'Deep groove ball bearing, 20x47x14mm',
62
+ * sku: 'BRG-6204-2RS',
63
+ * },
64
+ * );
57
65
  * ```
58
66
  */
59
- list(query = {}, options) {
60
- return this._client.get('/v1/catalog/parts', { query, ...options });
67
+ update(id, params = {}, options) {
68
+ const { include, ...body } = params ?? {};
69
+ return this._client.patch(path `/v1/catalog/parts/${id}`, { query: { include }, body, ...options });
61
70
  }
62
71
  /**
63
- * Deletes a part. Sets the deleted_at timestamp rather than removing the record.
72
+ * Deletes a part.
73
+ *
74
+ * This is a soft delete: the part is marked deleted and no longer returned by
75
+ * other endpoints, but the record is retained. Deleting an already-deleted part
76
+ * returns an error.
64
77
  *
65
78
  * @example
66
79
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"parts.mjs","sourceRoot":"","sources":["../../src/resources/catalog/parts.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAMlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAwB,EAAE,OAAwB;QACvD,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CACN,EAAU,EACV,QAA+C,EAAE,EACjD,OAAwB;QAEx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