partnermax 0.2.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 (433) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/LICENSE +201 -0
  3. package/README.md +370 -0
  4. package/api-promise.d.mts +3 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +3 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +3 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +212 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +212 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +528 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +524 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/resource.d.mts +6 -0
  37. package/core/resource.d.mts.map +1 -0
  38. package/core/resource.d.ts +6 -0
  39. package/core/resource.d.ts.map +1 -0
  40. package/core/resource.js +11 -0
  41. package/core/resource.js.map +1 -0
  42. package/core/resource.mjs +7 -0
  43. package/core/resource.mjs.map +1 -0
  44. package/core/uploads.d.mts +3 -0
  45. package/core/uploads.d.mts.map +1 -0
  46. package/core/uploads.d.ts +3 -0
  47. package/core/uploads.d.ts.map +1 -0
  48. package/core/uploads.js +6 -0
  49. package/core/uploads.js.map +1 -0
  50. package/core/uploads.mjs +2 -0
  51. package/core/uploads.mjs.map +1 -0
  52. package/error.d.mts +3 -0
  53. package/error.d.mts.map +1 -0
  54. package/error.d.ts +3 -0
  55. package/error.d.ts.map +1 -0
  56. package/error.js +6 -0
  57. package/error.js.map +1 -0
  58. package/error.mjs +3 -0
  59. package/error.mjs.map +1 -0
  60. package/index.d.mts +6 -0
  61. package/index.d.mts.map +1 -0
  62. package/index.d.ts +6 -0
  63. package/index.d.ts.map +1 -0
  64. package/index.js +30 -0
  65. package/index.js.map +1 -0
  66. package/index.mjs +7 -0
  67. package/index.mjs.map +1 -0
  68. package/internal/builtin-types.d.mts +73 -0
  69. package/internal/builtin-types.d.mts.map +1 -0
  70. package/internal/builtin-types.d.ts +73 -0
  71. package/internal/builtin-types.d.ts.map +1 -0
  72. package/internal/builtin-types.js +4 -0
  73. package/internal/builtin-types.js.map +1 -0
  74. package/internal/builtin-types.mjs +3 -0
  75. package/internal/builtin-types.mjs.map +1 -0
  76. package/internal/detect-platform.d.mts +15 -0
  77. package/internal/detect-platform.d.mts.map +1 -0
  78. package/internal/detect-platform.d.ts +15 -0
  79. package/internal/detect-platform.d.ts.map +1 -0
  80. package/internal/detect-platform.js +162 -0
  81. package/internal/detect-platform.js.map +1 -0
  82. package/internal/detect-platform.mjs +157 -0
  83. package/internal/detect-platform.mjs.map +1 -0
  84. package/internal/errors.d.mts +3 -0
  85. package/internal/errors.d.mts.map +1 -0
  86. package/internal/errors.d.ts +3 -0
  87. package/internal/errors.d.ts.map +1 -0
  88. package/internal/errors.js +41 -0
  89. package/internal/errors.js.map +1 -0
  90. package/internal/errors.mjs +36 -0
  91. package/internal/errors.mjs.map +1 -0
  92. package/internal/headers.d.mts +20 -0
  93. package/internal/headers.d.mts.map +1 -0
  94. package/internal/headers.d.ts +20 -0
  95. package/internal/headers.d.ts.map +1 -0
  96. package/internal/headers.js +79 -0
  97. package/internal/headers.js.map +1 -0
  98. package/internal/headers.mjs +74 -0
  99. package/internal/headers.mjs.map +1 -0
  100. package/internal/parse.d.mts +12 -0
  101. package/internal/parse.d.mts.map +1 -0
  102. package/internal/parse.d.ts +12 -0
  103. package/internal/parse.d.ts.map +1 -0
  104. package/internal/parse.js +40 -0
  105. package/internal/parse.js.map +1 -0
  106. package/internal/parse.mjs +37 -0
  107. package/internal/parse.mjs.map +1 -0
  108. package/internal/request-options.d.mts +75 -0
  109. package/internal/request-options.d.mts.map +1 -0
  110. package/internal/request-options.d.ts +75 -0
  111. package/internal/request-options.d.ts.map +1 -0
  112. package/internal/request-options.js +14 -0
  113. package/internal/request-options.js.map +1 -0
  114. package/internal/request-options.mjs +10 -0
  115. package/internal/request-options.mjs.map +1 -0
  116. package/internal/shim-types.d.mts +17 -0
  117. package/internal/shim-types.d.mts.map +1 -0
  118. package/internal/shim-types.d.ts +17 -0
  119. package/internal/shim-types.d.ts.map +1 -0
  120. package/internal/shim-types.js +4 -0
  121. package/internal/shim-types.js.map +1 -0
  122. package/internal/shim-types.mjs +3 -0
  123. package/internal/shim-types.mjs.map +1 -0
  124. package/internal/shims.d.mts +26 -0
  125. package/internal/shims.d.mts.map +1 -0
  126. package/internal/shims.d.ts +26 -0
  127. package/internal/shims.d.ts.map +1 -0
  128. package/internal/shims.js +92 -0
  129. package/internal/shims.js.map +1 -0
  130. package/internal/shims.mjs +85 -0
  131. package/internal/shims.mjs.map +1 -0
  132. package/internal/to-file.d.mts +45 -0
  133. package/internal/to-file.d.mts.map +1 -0
  134. package/internal/to-file.d.ts +45 -0
  135. package/internal/to-file.d.ts.map +1 -0
  136. package/internal/to-file.js +91 -0
  137. package/internal/to-file.js.map +1 -0
  138. package/internal/to-file.mjs +88 -0
  139. package/internal/to-file.mjs.map +1 -0
  140. package/internal/tslib.js +81 -0
  141. package/internal/tslib.mjs +17 -0
  142. package/internal/types.d.mts +69 -0
  143. package/internal/types.d.mts.map +1 -0
  144. package/internal/types.d.ts +69 -0
  145. package/internal/types.d.ts.map +1 -0
  146. package/internal/types.js +4 -0
  147. package/internal/types.js.map +1 -0
  148. package/internal/types.mjs +3 -0
  149. package/internal/types.mjs.map +1 -0
  150. package/internal/uploads.d.mts +42 -0
  151. package/internal/uploads.d.mts.map +1 -0
  152. package/internal/uploads.d.ts +42 -0
  153. package/internal/uploads.d.ts.map +1 -0
  154. package/internal/uploads.js +141 -0
  155. package/internal/uploads.js.map +1 -0
  156. package/internal/uploads.mjs +131 -0
  157. package/internal/uploads.mjs.map +1 -0
  158. package/internal/utils/base64.d.mts +3 -0
  159. package/internal/utils/base64.d.mts.map +1 -0
  160. package/internal/utils/base64.d.ts +3 -0
  161. package/internal/utils/base64.d.ts.map +1 -0
  162. package/internal/utils/base64.js +38 -0
  163. package/internal/utils/base64.js.map +1 -0
  164. package/internal/utils/base64.mjs +33 -0
  165. package/internal/utils/base64.mjs.map +1 -0
  166. package/internal/utils/bytes.d.mts +4 -0
  167. package/internal/utils/bytes.d.mts.map +1 -0
  168. package/internal/utils/bytes.d.ts +4 -0
  169. package/internal/utils/bytes.d.ts.map +1 -0
  170. package/internal/utils/bytes.js +31 -0
  171. package/internal/utils/bytes.js.map +1 -0
  172. package/internal/utils/bytes.mjs +26 -0
  173. package/internal/utils/bytes.mjs.map +1 -0
  174. package/internal/utils/env.d.mts +9 -0
  175. package/internal/utils/env.d.mts.map +1 -0
  176. package/internal/utils/env.d.ts +9 -0
  177. package/internal/utils/env.d.ts.map +1 -0
  178. package/internal/utils/env.js +22 -0
  179. package/internal/utils/env.js.map +1 -0
  180. package/internal/utils/env.mjs +18 -0
  181. package/internal/utils/env.mjs.map +1 -0
  182. package/internal/utils/log.d.mts +37 -0
  183. package/internal/utils/log.d.mts.map +1 -0
  184. package/internal/utils/log.d.ts +37 -0
  185. package/internal/utils/log.d.ts.map +1 -0
  186. package/internal/utils/log.js +87 -0
  187. package/internal/utils/log.js.map +1 -0
  188. package/internal/utils/log.mjs +81 -0
  189. package/internal/utils/log.mjs.map +1 -0
  190. package/internal/utils/path.d.mts +15 -0
  191. package/internal/utils/path.d.mts.map +1 -0
  192. package/internal/utils/path.d.ts +15 -0
  193. package/internal/utils/path.d.ts.map +1 -0
  194. package/internal/utils/path.js +79 -0
  195. package/internal/utils/path.js.map +1 -0
  196. package/internal/utils/path.mjs +74 -0
  197. package/internal/utils/path.mjs.map +1 -0
  198. package/internal/utils/query.d.mts +5 -0
  199. package/internal/utils/query.d.mts.map +1 -0
  200. package/internal/utils/query.d.ts +5 -0
  201. package/internal/utils/query.d.ts.map +1 -0
  202. package/internal/utils/query.js +23 -0
  203. package/internal/utils/query.js.map +1 -0
  204. package/internal/utils/query.mjs +20 -0
  205. package/internal/utils/query.mjs.map +1 -0
  206. package/internal/utils/sleep.d.mts +2 -0
  207. package/internal/utils/sleep.d.mts.map +1 -0
  208. package/internal/utils/sleep.d.ts +2 -0
  209. package/internal/utils/sleep.d.ts.map +1 -0
  210. package/internal/utils/sleep.js +7 -0
  211. package/internal/utils/sleep.js.map +1 -0
  212. package/internal/utils/sleep.mjs +3 -0
  213. package/internal/utils/sleep.mjs.map +1 -0
  214. package/internal/utils/uuid.d.mts +5 -0
  215. package/internal/utils/uuid.d.mts.map +1 -0
  216. package/internal/utils/uuid.d.ts +5 -0
  217. package/internal/utils/uuid.d.ts.map +1 -0
  218. package/internal/utils/uuid.js +19 -0
  219. package/internal/utils/uuid.js.map +1 -0
  220. package/internal/utils/uuid.mjs +15 -0
  221. package/internal/utils/uuid.mjs.map +1 -0
  222. package/internal/utils/values.d.mts +18 -0
  223. package/internal/utils/values.d.mts.map +1 -0
  224. package/internal/utils/values.d.ts +18 -0
  225. package/internal/utils/values.d.ts.map +1 -0
  226. package/internal/utils/values.js +112 -0
  227. package/internal/utils/values.js.map +1 -0
  228. package/internal/utils/values.mjs +94 -0
  229. package/internal/utils/values.mjs.map +1 -0
  230. package/internal/utils.d.mts +8 -0
  231. package/internal/utils.d.mts.map +1 -0
  232. package/internal/utils.d.ts +8 -0
  233. package/internal/utils.d.ts.map +1 -0
  234. package/internal/utils.js +12 -0
  235. package/internal/utils.js.map +1 -0
  236. package/internal/utils.mjs +9 -0
  237. package/internal/utils.mjs.map +1 -0
  238. package/package.json +149 -0
  239. package/resource.d.mts +3 -0
  240. package/resource.d.mts.map +1 -0
  241. package/resource.d.ts +3 -0
  242. package/resource.d.ts.map +1 -0
  243. package/resource.js +6 -0
  244. package/resource.js.map +1 -0
  245. package/resource.mjs +3 -0
  246. package/resource.mjs.map +1 -0
  247. package/resources/dealers/dealers.d.mts +211 -0
  248. package/resources/dealers/dealers.d.mts.map +1 -0
  249. package/resources/dealers/dealers.d.ts +211 -0
  250. package/resources/dealers/dealers.d.ts.map +1 -0
  251. package/resources/dealers/dealers.js +77 -0
  252. package/resources/dealers/dealers.js.map +1 -0
  253. package/resources/dealers/dealers.mjs +72 -0
  254. package/resources/dealers/dealers.mjs.map +1 -0
  255. package/resources/dealers/index.d.mts +5 -0
  256. package/resources/dealers/index.d.mts.map +1 -0
  257. package/resources/dealers/index.d.ts +5 -0
  258. package/resources/dealers/index.d.ts.map +1 -0
  259. package/resources/dealers/index.js +13 -0
  260. package/resources/dealers/index.js.map +1 -0
  261. package/resources/dealers/index.mjs +6 -0
  262. package/resources/dealers/index.mjs.map +1 -0
  263. package/resources/dealers/nlt/index.d.mts +3 -0
  264. package/resources/dealers/nlt/index.d.mts.map +1 -0
  265. package/resources/dealers/nlt/index.d.ts +3 -0
  266. package/resources/dealers/nlt/index.d.ts.map +1 -0
  267. package/resources/dealers/nlt/index.js +9 -0
  268. package/resources/dealers/nlt/index.js.map +1 -0
  269. package/resources/dealers/nlt/index.mjs +4 -0
  270. package/resources/dealers/nlt/index.mjs.map +1 -0
  271. package/resources/dealers/nlt/nlt.d.mts +10 -0
  272. package/resources/dealers/nlt/nlt.d.mts.map +1 -0
  273. package/resources/dealers/nlt/nlt.d.ts +10 -0
  274. package/resources/dealers/nlt/nlt.d.ts.map +1 -0
  275. package/resources/dealers/nlt/nlt.js +17 -0
  276. package/resources/dealers/nlt/nlt.js.map +1 -0
  277. package/resources/dealers/nlt/nlt.mjs +12 -0
  278. package/resources/dealers/nlt/nlt.mjs.map +1 -0
  279. package/resources/dealers/nlt/offers.d.mts +303 -0
  280. package/resources/dealers/nlt/offers.d.mts.map +1 -0
  281. package/resources/dealers/nlt/offers.d.ts +303 -0
  282. package/resources/dealers/nlt/offers.d.ts.map +1 -0
  283. package/resources/dealers/nlt/offers.js +35 -0
  284. package/resources/dealers/nlt/offers.js.map +1 -0
  285. package/resources/dealers/nlt/offers.mjs +31 -0
  286. package/resources/dealers/nlt/offers.mjs.map +1 -0
  287. package/resources/dealers/nlt-settings.d.mts +221 -0
  288. package/resources/dealers/nlt-settings.d.mts.map +1 -0
  289. package/resources/dealers/nlt-settings.d.ts +221 -0
  290. package/resources/dealers/nlt-settings.d.ts.map +1 -0
  291. package/resources/dealers/nlt-settings.js +54 -0
  292. package/resources/dealers/nlt-settings.js.map +1 -0
  293. package/resources/dealers/nlt-settings.mjs +50 -0
  294. package/resources/dealers/nlt-settings.mjs.map +1 -0
  295. package/resources/dealers/nlt.d.mts +2 -0
  296. package/resources/dealers/nlt.d.mts.map +1 -0
  297. package/resources/dealers/nlt.d.ts +2 -0
  298. package/resources/dealers/nlt.d.ts.map +1 -0
  299. package/resources/dealers/nlt.js +6 -0
  300. package/resources/dealers/nlt.js.map +1 -0
  301. package/resources/dealers/nlt.mjs +3 -0
  302. package/resources/dealers/nlt.mjs.map +1 -0
  303. package/resources/dealers/vehicles/images.d.mts +113 -0
  304. package/resources/dealers/vehicles/images.d.mts.map +1 -0
  305. package/resources/dealers/vehicles/images.d.ts +113 -0
  306. package/resources/dealers/vehicles/images.d.ts.map +1 -0
  307. package/resources/dealers/vehicles/images.js +64 -0
  308. package/resources/dealers/vehicles/images.js.map +1 -0
  309. package/resources/dealers/vehicles/images.mjs +60 -0
  310. package/resources/dealers/vehicles/images.mjs.map +1 -0
  311. package/resources/dealers/vehicles/index.d.mts +3 -0
  312. package/resources/dealers/vehicles/index.d.mts.map +1 -0
  313. package/resources/dealers/vehicles/index.d.ts +3 -0
  314. package/resources/dealers/vehicles/index.d.ts.map +1 -0
  315. package/resources/dealers/vehicles/index.js +9 -0
  316. package/resources/dealers/vehicles/index.js.map +1 -0
  317. package/resources/dealers/vehicles/index.mjs +4 -0
  318. package/resources/dealers/vehicles/index.mjs.map +1 -0
  319. package/resources/dealers/vehicles/vehicles.d.mts +576 -0
  320. package/resources/dealers/vehicles/vehicles.d.mts.map +1 -0
  321. package/resources/dealers/vehicles/vehicles.d.ts +576 -0
  322. package/resources/dealers/vehicles/vehicles.d.ts.map +1 -0
  323. package/resources/dealers/vehicles/vehicles.js +141 -0
  324. package/resources/dealers/vehicles/vehicles.js.map +1 -0
  325. package/resources/dealers/vehicles/vehicles.mjs +136 -0
  326. package/resources/dealers/vehicles/vehicles.mjs.map +1 -0
  327. package/resources/dealers/vehicles.d.mts +2 -0
  328. package/resources/dealers/vehicles.d.mts.map +1 -0
  329. package/resources/dealers/vehicles.d.ts +2 -0
  330. package/resources/dealers/vehicles.d.ts.map +1 -0
  331. package/resources/dealers/vehicles.js +6 -0
  332. package/resources/dealers/vehicles.js.map +1 -0
  333. package/resources/dealers/vehicles.mjs +3 -0
  334. package/resources/dealers/vehicles.mjs.map +1 -0
  335. package/resources/dealers.d.mts +2 -0
  336. package/resources/dealers.d.mts.map +1 -0
  337. package/resources/dealers.d.ts +2 -0
  338. package/resources/dealers.d.ts.map +1 -0
  339. package/resources/dealers.js +6 -0
  340. package/resources/dealers.js.map +1 -0
  341. package/resources/dealers.mjs +3 -0
  342. package/resources/dealers.mjs.map +1 -0
  343. package/resources/index.d.mts +3 -0
  344. package/resources/index.d.mts.map +1 -0
  345. package/resources/index.d.ts +3 -0
  346. package/resources/index.d.ts.map +1 -0
  347. package/resources/index.js +9 -0
  348. package/resources/index.js.map +1 -0
  349. package/resources/index.mjs +4 -0
  350. package/resources/index.mjs.map +1 -0
  351. package/resources/keys.d.mts +83 -0
  352. package/resources/keys.d.mts.map +1 -0
  353. package/resources/keys.d.ts +83 -0
  354. package/resources/keys.d.ts.map +1 -0
  355. package/resources/keys.js +51 -0
  356. package/resources/keys.js.map +1 -0
  357. package/resources/keys.mjs +47 -0
  358. package/resources/keys.mjs.map +1 -0
  359. package/resources.d.mts +2 -0
  360. package/resources.d.mts.map +1 -0
  361. package/resources.d.ts +2 -0
  362. package/resources.d.ts.map +1 -0
  363. package/resources.js +5 -0
  364. package/resources.js.map +1 -0
  365. package/resources.mjs +2 -0
  366. package/resources.mjs.map +1 -0
  367. package/src/api-promise.ts +2 -0
  368. package/src/client.ts +841 -0
  369. package/src/core/README.md +3 -0
  370. package/src/core/api-promise.ts +92 -0
  371. package/src/core/error.ts +130 -0
  372. package/src/core/resource.ts +11 -0
  373. package/src/core/uploads.ts +2 -0
  374. package/src/error.ts +2 -0
  375. package/src/index.ts +22 -0
  376. package/src/internal/README.md +3 -0
  377. package/src/internal/builtin-types.ts +93 -0
  378. package/src/internal/detect-platform.ts +196 -0
  379. package/src/internal/errors.ts +33 -0
  380. package/src/internal/headers.ts +97 -0
  381. package/src/internal/parse.ts +56 -0
  382. package/src/internal/request-options.ts +91 -0
  383. package/src/internal/shim-types.ts +26 -0
  384. package/src/internal/shims.ts +107 -0
  385. package/src/internal/to-file.ts +154 -0
  386. package/src/internal/types.ts +93 -0
  387. package/src/internal/uploads.ts +187 -0
  388. package/src/internal/utils/base64.ts +40 -0
  389. package/src/internal/utils/bytes.ts +32 -0
  390. package/src/internal/utils/env.ts +18 -0
  391. package/src/internal/utils/log.ts +128 -0
  392. package/src/internal/utils/path.ts +88 -0
  393. package/src/internal/utils/query.ts +23 -0
  394. package/src/internal/utils/sleep.ts +3 -0
  395. package/src/internal/utils/uuid.ts +17 -0
  396. package/src/internal/utils/values.ts +105 -0
  397. package/src/internal/utils.ts +9 -0
  398. package/src/lib/.keep +4 -0
  399. package/src/resource.ts +2 -0
  400. package/src/resources/dealers/dealers.ts +348 -0
  401. package/src/resources/dealers/index.ts +28 -0
  402. package/src/resources/dealers/nlt/index.ts +11 -0
  403. package/src/resources/dealers/nlt/nlt.ts +29 -0
  404. package/src/resources/dealers/nlt/offers.ts +427 -0
  405. package/src/resources/dealers/nlt-settings.ts +269 -0
  406. package/src/resources/dealers/nlt.ts +3 -0
  407. package/src/resources/dealers/vehicles/images.ts +153 -0
  408. package/src/resources/dealers/vehicles/index.ts +25 -0
  409. package/src/resources/dealers/vehicles/vehicles.ts +796 -0
  410. package/src/resources/dealers/vehicles.ts +3 -0
  411. package/src/resources/dealers.ts +3 -0
  412. package/src/resources/index.ts +12 -0
  413. package/src/resources/keys.ts +128 -0
  414. package/src/resources.ts +1 -0
  415. package/src/tsconfig.json +11 -0
  416. package/src/uploads.ts +2 -0
  417. package/src/version.ts +1 -0
  418. package/uploads.d.mts +3 -0
  419. package/uploads.d.mts.map +1 -0
  420. package/uploads.d.ts +3 -0
  421. package/uploads.d.ts.map +1 -0
  422. package/uploads.js +6 -0
  423. package/uploads.js.map +1 -0
  424. package/uploads.mjs +3 -0
  425. package/uploads.mjs.map +1 -0
  426. package/version.d.mts +2 -0
  427. package/version.d.mts.map +1 -0
  428. package/version.d.ts +2 -0
  429. package/version.d.ts.map +1 -0
  430. package/version.js +5 -0
  431. package/version.js.map +1 -0
  432. package/version.mjs +2 -0
  433. package/version.mjs.map +1 -0
@@ -0,0 +1,796 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as ImagesAPI from './images';
5
+ import {
6
+ ImageCreateParams,
7
+ ImageDeleteParams,
8
+ ImageListParams,
9
+ Images,
10
+ VehicleImage,
11
+ VehicleImageList,
12
+ } from './images';
13
+ import { APIPromise } from '../../../core/api-promise';
14
+ import { buildHeaders } from '../../../internal/headers';
15
+ import { RequestOptions } from '../../../internal/request-options';
16
+ import { path } from '../../../internal/utils/path';
17
+
18
+ /**
19
+ * Used-vehicle stock management for partner-owned dealers. The partner uploads each used vehicle by its canonical Motornet UNI code; DealerMAX joins the partner-provided pricing and stock metadata with the catalog master so the resulting listing is immediately indexed by the AI surfaces (MCP server, ChatGPT Custom GPT, NLWeb /ask, and the SEO/JSON-LD layer).
20
+ */
21
+ export class Vehicles extends APIResource {
22
+ images: ImagesAPI.Images = new ImagesAPI.Images(this._client);
23
+
24
+ /**
25
+ * Provision a new used vehicle in a dealer's stock.
26
+ *
27
+ * Writes are atomic across `azlease_usatoin` and `azlease_usatoauto` using a
28
+ * `SAVEPOINT` so a UNIQUE plate violation rolls back cleanly. On success the
29
+ * AI-content worker (:mod:`azurenet-engine.app.jobs.usato_ai_content_worker`)
30
+ * picks up the new row within 60 seconds and generates the SEO body + pgvector
31
+ * embedding — at which point the vehicle becomes discoverable on the cross-network
32
+ * MCP / Custom GPT / NLWeb surfaces. The response returns immediately (no
33
+ * synchronous wait on the worker).
34
+ */
35
+ create(dealerID: string, params: VehicleCreateParams, options?: RequestOptions): APIPromise<VehicleDetail> {
36
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
37
+ return this._client.post(path`/v1/dealers/${dealerID}/vehicles`, {
38
+ body,
39
+ ...options,
40
+ headers: buildHeaders([
41
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
42
+ options?.headers,
43
+ ]),
44
+ });
45
+ }
46
+
47
+ /**
48
+ * Get Vehicle
49
+ */
50
+ retrieve(
51
+ vehicleID: string,
52
+ params: VehicleRetrieveParams,
53
+ options?: RequestOptions,
54
+ ): APIPromise<VehicleDetail> {
55
+ const { dealer_id, ...query } = params;
56
+ return this._client.get(path`/v1/dealers/${dealer_id}/vehicles/${vehicleID}`, { query, ...options });
57
+ }
58
+
59
+ /**
60
+ * Partial update of a vehicle.
61
+ *
62
+ * Splits the inbound body across the two physical tables (`azlease_usatoauto` and
63
+ * `azlease_usatoin`) and emits at most one UPDATE per table inside a single
64
+ * transaction. Fields not present in the body are not touched.
65
+ */
66
+ update(
67
+ vehicleID: string,
68
+ params: VehicleUpdateParams,
69
+ options?: RequestOptions,
70
+ ): APIPromise<VehicleDetail> {
71
+ const { dealer_id, 'Idempotency-Key': idempotencyKey, ...body } = params;
72
+ return this._client.patch(path`/v1/dealers/${dealer_id}/vehicles/${vehicleID}`, {
73
+ body,
74
+ ...options,
75
+ headers: buildHeaders([
76
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
77
+ options?.headers,
78
+ ]),
79
+ });
80
+ }
81
+
82
+ /**
83
+ * List vehicles in a dealer's stock owned by the calling partner.
84
+ *
85
+ * Cursor pagination is opaque base64url over the last vehicle UUID. Default sort
86
+ * is `i.data_inserimento ASC` so freshly provisioned vehicles surface at the tail.
87
+ * Soft-deleted rows are excluded unless `include_deleted=true` is set explicitly —
88
+ * this preserves the soft-delete semantic across the API contract.
89
+ */
90
+ list(
91
+ dealerID: string,
92
+ query: VehicleListParams | null | undefined = {},
93
+ options?: RequestOptions,
94
+ ): APIPromise<VehicleList> {
95
+ return this._client.get(path`/v1/dealers/${dealerID}/vehicles`, { query, ...options });
96
+ }
97
+
98
+ /**
99
+ * Withdraw a vehicle from sale without deleting the row.
100
+ *
101
+ * Sets `azlease_usatoin.visibile = FALSE` and stamps `venduto_il = now()`. The
102
+ * plate becomes reusable on the network the moment this returns (the
103
+ * active-uniqueness check excludes rows where `visibile = FALSE` OR
104
+ * `venduto_il IS NOT NULL`).
105
+ *
106
+ * Soft-delete is the canonical "remove this vehicle from sale" surface. The
107
+ * AI-citation consumers (MCP `_tool_search_vehicles`, Custom GPT
108
+ * `search_vehicles_network`, NLWeb `/ask`) each filter their own queries on
109
+ * `i.visibile = TRUE AND i.venduto_il IS NULL` — the shared `v_apimax_listing`
110
+ * view itself does not impose that filter, every consumer adds it. The result on
111
+ * the partner side is the same: a soft-deleted vehicle disappears from every AI
112
+ * surface within the next index cycle.
113
+ *
114
+ * Returns `409 vehicle_already_deleted` if the row is already soft- deleted — same
115
+ * idempotency pattern as the dealers DELETE endpoint.
116
+ */
117
+ delete(vehicleID: string, params: VehicleDeleteParams, options?: RequestOptions): APIPromise<void> {
118
+ const { dealer_id } = params;
119
+ return this._client.delete(path`/v1/dealers/${dealer_id}/vehicles/${vehicleID}`, {
120
+ ...options,
121
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
122
+ });
123
+ }
124
+
125
+ /**
126
+ * Provision up to `BULK_MAX_ROWS` vehicles in a single synchronous call.
127
+ *
128
+ * Each row is processed inside its own `SAVEPOINT` so a failure on row N
129
+ * (validation, plate conflict, motornet not in catalogue, race) is isolated — the
130
+ * SAVEPOINT rolls back, the per-row outcome is collected with a structured error
131
+ * code, and the loop continues with row N+1.
132
+ *
133
+ * Successful rows accumulate in the outer transaction and are committed together
134
+ * at the end of the request. Failed rows leave no trace in the database.
135
+ *
136
+ * Returns `207 Multi-Status`. The response carries:
137
+ *
138
+ * - `total`, `succeeded`, `failed` — aggregate counters for quick branch logic on
139
+ * the partner side.
140
+ * - `results` — array of per-row outcomes, indexed by the position in the request
141
+ * `vehicles[]` array. Successful rows include the full `VehicleDetail`; failed
142
+ * rows include `error_code` + `error_message` keyed to the same codes as the
143
+ * single-POST surface so the partner reuses one error handler for both paths.
144
+ *
145
+ * For imports larger than `BULK_MAX_ROWS` (currently 100), the partner is expected
146
+ * to chunk the array client-side. A 5 000-vehicle initial migration is 50 calls;
147
+ * the partner controls concurrency.
148
+ */
149
+ bulk(
150
+ dealerID: string,
151
+ params: VehicleBulkParams,
152
+ options?: RequestOptions,
153
+ ): APIPromise<BulkCreateVehiclesResponse> {
154
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
155
+ return this._client.post(path`/v1/dealers/${dealerID}/vehicles/bulk`, {
156
+ body,
157
+ ...options,
158
+ headers: buildHeaders([
159
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
160
+ options?.headers,
161
+ ]),
162
+ });
163
+ }
164
+ }
165
+
166
+ /**
167
+ * AI-generated editorial content for a single vehicle.
168
+ *
169
+ * Produced asynchronously by the `usato_ai_content_worker` in `azurenet-engine`
170
+ * within ~60 seconds of vehicle creation. While the worker is still pending, every
171
+ * field is `null`; once the worker completes the row this object carries the full
172
+ * editorial set the cross-network AI consumers (MCP, ChatGPT Custom GPT, NLWeb)
173
+ * display.
174
+ *
175
+ * Layered descriptions:
176
+ *
177
+ * - `tagline` — 8–12 word headline. Use on listing cards / push notifications.
178
+ * - `short` — 1–2 sentence summary (≤ 220 chars). Use as the meta description
179
+ * fallback.
180
+ * - `medium` — paragraph (~400 chars). Use on vehicle-detail SEO blurbs.
181
+ * - `long` — full marketing description (1500–3000 chars). Use on detail pages.
182
+ * - `highlights` — array of 3–7 selling points. Render as a bullet list above the
183
+ * description.
184
+ * - `faq` — array of `{question, answer}` objects. Render as accordion / JSON-LD
185
+ * `FAQPage`.
186
+ * - `seo_title` — ≤ 60 chars, `<title>`-ready.
187
+ * - `seo_description` — ≤ 160 chars, meta description-ready.
188
+ * - `slug` — URL-safe slug used in the canonical URL on the dealer site.
189
+ *
190
+ * The Italian language is canonical (`lang='it'`). Multi-language is on the
191
+ * roadmap; until then the partner gets exactly what the consumer AI surfaces get.
192
+ */
193
+ export interface AIContent {
194
+ /**
195
+ * Array of `{question, answer}` objects. Each entry has two string keys; render
196
+ * with the partner's own FAQ UI or feed into a `FAQPage` JSON-LD block.
197
+ */
198
+ faq?: Array<{ [key: string]: string }> | null;
199
+
200
+ /**
201
+ * UTC timestamp of the most recent AI generation. `null` until the worker first
202
+ * processes the vehicle (≤ 60 seconds after vehicle creation).
203
+ */
204
+ generated_at?: string | null;
205
+
206
+ highlights?: Array<string> | null;
207
+
208
+ long?: string | null;
209
+
210
+ medium?: string | null;
211
+
212
+ seo_description?: string | null;
213
+
214
+ seo_title?: string | null;
215
+
216
+ short?: string | null;
217
+
218
+ slug?: string | null;
219
+
220
+ tagline?: string | null;
221
+ }
222
+
223
+ /**
224
+ * Response of `POST /v1/dealers/{dealer_id}/vehicles/bulk`.
225
+ *
226
+ * HTTP status is `207 Multi-Status` (rather than 201) to make partial success
227
+ * explicit at the protocol level. The aggregate counters at the top let a partner
228
+ * short-circuit when every row succeeded; the `results` array carries per-row
229
+ * detail when not.
230
+ */
231
+ export interface BulkCreateVehiclesResponse {
232
+ failed: number;
233
+
234
+ results: Array<BulkRowOutcome>;
235
+
236
+ succeeded: number;
237
+
238
+ /**
239
+ * Number of rows in the request body.
240
+ */
241
+ total: number;
242
+ }
243
+
244
+ /**
245
+ * Per-row result inside `BulkCreateVehiclesResponse`.
246
+ *
247
+ * On success `vehicle` is populated (full `VehicleDetail`) and
248
+ * `error_code`/`error_message` are null. On failure `vehicle` is null and
249
+ * `error_code`/`error_message` carry the same code that the corresponding
250
+ * single-create POST would have raised (e.g. `motornet_code_not_in_catalogue`,
251
+ * `vehicle_plate_already_registered`, `validation_error`).
252
+ */
253
+ export interface BulkRowOutcome {
254
+ /**
255
+ * Zero-based index of the row in the request `vehicles[]` array. Stable across
256
+ * retries — the partner can correlate failures back to its own batch by this
257
+ * index.
258
+ */
259
+ row_index: number;
260
+
261
+ status: 'succeeded' | 'failed';
262
+
263
+ error_code?: string | null;
264
+
265
+ error_message?: string | null;
266
+
267
+ /**
268
+ * Full vehicle resource. Returned by `GET /v1/dealers/{id}/vehicles/{id}`,
269
+ * `POST /v1/dealers/{id}/vehicles`, and `PATCH /v1/dealers/{id}/vehicles/{id}`.
270
+ *
271
+ * Carries three layers of information:
272
+ *
273
+ * - **Partner-supplied** — what the partner posted (`plate`, `description`,
274
+ * `sale_price_eur`, etc.).
275
+ * - **Catalogue-derived** — `technical_details` is the flat `mnet_dettagli_usato`
276
+ * dict (Italian column keys: `cilindrata`, `kw`, `hp`, `lunghezza`,
277
+ * `consumo_medio`, `emissioni_co2`, etc.). Same shape conventions as
278
+ * `NltOfferDetail` per `feedback_partnermax_field_naming_us_english`.
279
+ * - **AI-derived** — `ai_content` carries the editorial output the cross-network
280
+ * consumers display (descriptions, highlights, FAQ, SEO meta). `null` until the
281
+ * worker has processed the vehicle.
282
+ *
283
+ * Fields the partner does NOT see through this surface (because they are
284
+ * dealer-internal margin/operations data the partner does not own):
285
+ * `cost_price_eur`, `inspection_expiry_date`, `road_tax_expiry_date`,
286
+ * `previous_owner_count`, `previous_ownership_transfer_date`, `last_service_*`.
287
+ * These exist in the underlying DB tables for the DealerMAX dashboard but are
288
+ * intentionally not exposed via the SDK.
289
+ */
290
+ vehicle?: VehicleDetail | null;
291
+ }
292
+
293
+ /**
294
+ * Full vehicle resource. Returned by `GET /v1/dealers/{id}/vehicles/{id}`,
295
+ * `POST /v1/dealers/{id}/vehicles`, and `PATCH /v1/dealers/{id}/vehicles/{id}`.
296
+ *
297
+ * Carries three layers of information:
298
+ *
299
+ * - **Partner-supplied** — what the partner posted (`plate`, `description`,
300
+ * `sale_price_eur`, etc.).
301
+ * - **Catalogue-derived** — `technical_details` is the flat `mnet_dettagli_usato`
302
+ * dict (Italian column keys: `cilindrata`, `kw`, `hp`, `lunghezza`,
303
+ * `consumo_medio`, `emissioni_co2`, etc.). Same shape conventions as
304
+ * `NltOfferDetail` per `feedback_partnermax_field_naming_us_english`.
305
+ * - **AI-derived** — `ai_content` carries the editorial output the cross-network
306
+ * consumers display (descriptions, highlights, FAQ, SEO meta). `null` until the
307
+ * worker has processed the vehicle.
308
+ *
309
+ * Fields the partner does NOT see through this surface (because they are
310
+ * dealer-internal margin/operations data the partner does not own):
311
+ * `cost_price_eur`, `inspection_expiry_date`, `road_tax_expiry_date`,
312
+ * `previous_owner_count`, `previous_ownership_transfer_date`, `last_service_*`.
313
+ * These exist in the underlying DB tables for the DealerMAX dashboard but are
314
+ * intentionally not exposed via the SDK.
315
+ */
316
+ export interface VehicleDetail {
317
+ certified_km: number;
318
+
319
+ created_at: string;
320
+
321
+ dealer_id: string;
322
+
323
+ description: string;
324
+
325
+ extended_warranty_enabled: boolean;
326
+
327
+ is_for_sale: boolean;
328
+
329
+ is_visible: boolean;
330
+
331
+ last_modified_at: string;
332
+
333
+ motornet_code: string;
334
+
335
+ partner_id: string;
336
+
337
+ plate: string;
338
+
339
+ registration_year: number;
340
+
341
+ sale_price_eur: number;
342
+
343
+ vat_displayed: boolean;
344
+
345
+ vehicle_damaged: boolean;
346
+
347
+ vehicle_id: string;
348
+
349
+ /**
350
+ * Editorial content generated by the partnermax AI pipeline. `null` immediately
351
+ * after `POST` until the worker has produced the row (≤ 60 seconds). Populated for
352
+ * the same consumer-AI surfaces (MCP, Custom GPT, NLWeb).
353
+ */
354
+ ai_content?: AIContent | null;
355
+
356
+ alloy_wheel_size?: number | null;
357
+
358
+ brand?: string | null;
359
+
360
+ color?: string | null;
361
+
362
+ extended_warranty_months?: number | null;
363
+
364
+ fuel_type?: string | null;
365
+
366
+ /**
367
+ * Vehicle photos in display order. The first entry is the cover photo
368
+ * (`position=1` in the dedicated images endpoint).
369
+ */
370
+ image_urls?: Array<string>;
371
+
372
+ model?: string | null;
373
+
374
+ notes?: string | null;
375
+
376
+ registration_month?: number | null;
377
+
378
+ /**
379
+ * Flat dict of every non-null `mnet_dettagli_usato` column for this
380
+ * `motornet_code`. Keys stay in Italian because they are raw SQL column names;
381
+ * native units preserved (mm, kg, kW, CV, g/km, etc.).
382
+ */
383
+ technical_details?: { [key: string]: unknown };
384
+
385
+ trim?: string | null;
386
+
387
+ vin?: string | null;
388
+ }
389
+
390
+ /**
391
+ * Cursor-paginated list of vehicle summaries.
392
+ */
393
+ export interface VehicleList {
394
+ data: Array<VehicleSummary>;
395
+
396
+ has_more: boolean;
397
+
398
+ next_cursor?: string | null;
399
+ }
400
+
401
+ /**
402
+ * Compact vehicle payload for list endpoints.
403
+ *
404
+ * Catalogue fields (`brand`, `model`, `trim`, `fuel_type`) are derived from
405
+ * `mnet_dettagli` at read time. Italian raw labels are surfaced verbatim — same
406
+ * convention as NLT (`apimax`-aligned).
407
+ */
408
+ export interface VehicleSummary {
409
+ certified_km: number;
410
+
411
+ created_at: string;
412
+
413
+ dealer_id: string;
414
+
415
+ is_for_sale: boolean;
416
+
417
+ is_visible: boolean;
418
+
419
+ motornet_code: string;
420
+
421
+ plate: string;
422
+
423
+ registration_year: number;
424
+
425
+ sale_price_eur: number;
426
+
427
+ vehicle_id: string;
428
+
429
+ brand?: string | null;
430
+
431
+ color?: string | null;
432
+
433
+ fuel_type?: string | null;
434
+
435
+ model?: string | null;
436
+
437
+ trim?: string | null;
438
+ }
439
+
440
+ export interface VehicleCreateParams {
441
+ /**
442
+ * Body param: Certified odometer reading at intake, in kilometres.
443
+ */
444
+ certified_km: number;
445
+
446
+ /**
447
+ * Body param: Motornet UNI code identifying the exact vehicle configuration. Must
448
+ * exist in `mnet_dettagli_usato` at submission time; otherwise the call returns
449
+ * 422 `motornet_code_not_in_catalogue`. The partner is expected to source this
450
+ * from its own DMS; partnermax does not expose a plate→code lookup.
451
+ */
452
+ motornet_code: string;
453
+
454
+ /**
455
+ * Body param: Italian licence plate. Uppercased server-side. UNIQUE across the
456
+ * network for active vehicles (`visibile=true AND venduto_il IS NULL`); reusable
457
+ * once the previous holder sells/hides the row.
458
+ */
459
+ plate: string;
460
+
461
+ /**
462
+ * Body param: Year of first registration. Upper bound is current year + 1.
463
+ */
464
+ registration_year: number;
465
+
466
+ /**
467
+ * Body param: Public sale price in EUR. Surfaced on MCP / Custom GPT / NLWeb and
468
+ * on the dealer's site JSON-LD `Offer.price`.
469
+ */
470
+ sale_price_eur: number;
471
+
472
+ /**
473
+ * Body param
474
+ */
475
+ alloy_wheel_size?: number | null;
476
+
477
+ /**
478
+ * Body param
479
+ */
480
+ color?: string | null;
481
+
482
+ /**
483
+ * Body param: Partner-supplied long description. Surfaced on the dealer site
484
+ * detail page.
485
+ */
486
+ description?: string;
487
+
488
+ /**
489
+ * Body param
490
+ */
491
+ extended_warranty_enabled?: boolean;
492
+
493
+ /**
494
+ * Body param
495
+ */
496
+ extended_warranty_months?: number | null;
497
+
498
+ /**
499
+ * Body param: Maps to `azlease_usatoauto.is_vendita_enabled`. When false the row
500
+ * is in stock but not offered for sale.
501
+ */
502
+ is_for_sale?: boolean;
503
+
504
+ /**
505
+ * Body param: Soft-publish flag. When false the row exists in stock but is
506
+ * excluded from consumer-facing AI surfaces. Maps to `azlease_usatoin.visibile`.
507
+ */
508
+ is_visible?: boolean;
509
+
510
+ /**
511
+ * Body param: Free-form short notes; surfaced as
512
+ * `mnet_dettagli.precisazioni`-style.
513
+ */
514
+ notes?: string | null;
515
+
516
+ /**
517
+ * Body param: Month of registration (1–12).
518
+ */
519
+ registration_month?: number | null;
520
+
521
+ /**
522
+ * Body param: If true the public price is displayed VAT-exposed (B2B); otherwise
523
+ * VAT-inclusive (B2C).
524
+ */
525
+ vat_displayed?: boolean;
526
+
527
+ /**
528
+ * Body param
529
+ */
530
+ vehicle_damaged?: boolean;
531
+
532
+ /**
533
+ * Body param: ISO 3779 vehicle identification number. Optional but strongly
534
+ * recommended.
535
+ */
536
+ vin?: string | null;
537
+
538
+ /**
539
+ * Header param
540
+ */
541
+ 'Idempotency-Key'?: string;
542
+ }
543
+
544
+ export interface VehicleRetrieveParams {
545
+ /**
546
+ * Path param
547
+ */
548
+ dealer_id: string;
549
+
550
+ /**
551
+ * Query param: If true, the detail of a soft-deleted vehicle is returned. Default
552
+ * false — soft-deleted rows return 404 to keep behaviour consistent with the list
553
+ * endpoint.
554
+ */
555
+ include_deleted?: boolean;
556
+ }
557
+
558
+ export interface VehicleUpdateParams {
559
+ /**
560
+ * Path param
561
+ */
562
+ dealer_id: string;
563
+
564
+ /**
565
+ * Body param
566
+ */
567
+ alloy_wheel_size?: number | null;
568
+
569
+ /**
570
+ * Body param
571
+ */
572
+ certified_km?: number | null;
573
+
574
+ /**
575
+ * Body param
576
+ */
577
+ color?: string | null;
578
+
579
+ /**
580
+ * Body param
581
+ */
582
+ description?: string | null;
583
+
584
+ /**
585
+ * Body param
586
+ */
587
+ extended_warranty_enabled?: boolean | null;
588
+
589
+ /**
590
+ * Body param
591
+ */
592
+ extended_warranty_months?: number | null;
593
+
594
+ /**
595
+ * Body param
596
+ */
597
+ is_for_sale?: boolean | null;
598
+
599
+ /**
600
+ * Body param
601
+ */
602
+ is_visible?: boolean | null;
603
+
604
+ /**
605
+ * Body param
606
+ */
607
+ notes?: string | null;
608
+
609
+ /**
610
+ * Body param
611
+ */
612
+ registration_month?: number | null;
613
+
614
+ /**
615
+ * Body param
616
+ */
617
+ sale_price_eur?: number | null;
618
+
619
+ /**
620
+ * Body param
621
+ */
622
+ vat_displayed?: boolean | null;
623
+
624
+ /**
625
+ * Body param
626
+ */
627
+ vehicle_damaged?: boolean | null;
628
+
629
+ /**
630
+ * Header param
631
+ */
632
+ 'Idempotency-Key'?: string;
633
+ }
634
+
635
+ export interface VehicleListParams {
636
+ cursor?: string | null;
637
+
638
+ /**
639
+ * If true, soft-deleted rows (`venduto_il` populated) are also returned. Default
640
+ * false — listings hide soft-deleted vehicles.
641
+ */
642
+ include_deleted?: boolean;
643
+
644
+ /**
645
+ * Filter on the sale flag.
646
+ */
647
+ is_for_sale?: boolean | null;
648
+
649
+ /**
650
+ * Filter on the visibility flag.
651
+ */
652
+ is_visible?: boolean | null;
653
+
654
+ limit?: number;
655
+ }
656
+
657
+ export interface VehicleDeleteParams {
658
+ dealer_id: string;
659
+ }
660
+
661
+ export interface VehicleBulkParams {
662
+ /**
663
+ * Body param: Array of vehicles to create. Between 1 and 100 rows per call. For
664
+ * larger imports, the partner is expected to chunk client-side (e.g. 50 calls of
665
+ * 100 rows each for a 5 000-vehicle migration).
666
+ */
667
+ vehicles: Array<VehicleBulkParams.Vehicle>;
668
+
669
+ /**
670
+ * Header param
671
+ */
672
+ 'Idempotency-Key'?: string;
673
+ }
674
+
675
+ export namespace VehicleBulkParams {
676
+ /**
677
+ * Request body for vehicle provisioning.
678
+ *
679
+ * The partner sends a small, vehicle-specific payload. All technical specs (brand,
680
+ * model, trim, fuel type, displacement, dimensions, CO2, etc.) are derived
681
+ * server-side from `mnet_dettagli` via the `motornet_code` join — the partner
682
+ * never types them. This is the same canonical pattern used by NLT offers and
683
+ * matches the platform rule `feedback_motornet_authoritative`.
684
+ *
685
+ * Fields immutable after creation: `motornet_code`, `plate`, `vin`. Other fields
686
+ * may be updated via PATCH.
687
+ */
688
+ export interface Vehicle {
689
+ /**
690
+ * Certified odometer reading at intake, in kilometres.
691
+ */
692
+ certified_km: number;
693
+
694
+ /**
695
+ * Motornet UNI code identifying the exact vehicle configuration. Must exist in
696
+ * `mnet_dettagli_usato` at submission time; otherwise the call returns 422
697
+ * `motornet_code_not_in_catalogue`. The partner is expected to source this from
698
+ * its own DMS; partnermax does not expose a plate→code lookup.
699
+ */
700
+ motornet_code: string;
701
+
702
+ /**
703
+ * Italian licence plate. Uppercased server-side. UNIQUE across the network for
704
+ * active vehicles (`visibile=true AND venduto_il IS NULL`); reusable once the
705
+ * previous holder sells/hides the row.
706
+ */
707
+ plate: string;
708
+
709
+ /**
710
+ * Year of first registration. Upper bound is current year + 1.
711
+ */
712
+ registration_year: number;
713
+
714
+ /**
715
+ * Public sale price in EUR. Surfaced on MCP / Custom GPT / NLWeb and on the
716
+ * dealer's site JSON-LD `Offer.price`.
717
+ */
718
+ sale_price_eur: number;
719
+
720
+ alloy_wheel_size?: number | null;
721
+
722
+ color?: string | null;
723
+
724
+ /**
725
+ * Partner-supplied long description. Surfaced on the dealer site detail page.
726
+ */
727
+ description?: string;
728
+
729
+ extended_warranty_enabled?: boolean;
730
+
731
+ extended_warranty_months?: number | null;
732
+
733
+ /**
734
+ * Maps to `azlease_usatoauto.is_vendita_enabled`. When false the row is in stock
735
+ * but not offered for sale.
736
+ */
737
+ is_for_sale?: boolean;
738
+
739
+ /**
740
+ * Soft-publish flag. When false the row exists in stock but is excluded from
741
+ * consumer-facing AI surfaces. Maps to `azlease_usatoin.visibile`.
742
+ */
743
+ is_visible?: boolean;
744
+
745
+ /**
746
+ * Free-form short notes; surfaced as `mnet_dettagli.precisazioni`-style.
747
+ */
748
+ notes?: string | null;
749
+
750
+ /**
751
+ * Month of registration (1–12).
752
+ */
753
+ registration_month?: number | null;
754
+
755
+ /**
756
+ * If true the public price is displayed VAT-exposed (B2B); otherwise VAT-inclusive
757
+ * (B2C).
758
+ */
759
+ vat_displayed?: boolean;
760
+
761
+ vehicle_damaged?: boolean;
762
+
763
+ /**
764
+ * ISO 3779 vehicle identification number. Optional but strongly recommended.
765
+ */
766
+ vin?: string | null;
767
+ }
768
+ }
769
+
770
+ Vehicles.Images = Images;
771
+
772
+ export declare namespace Vehicles {
773
+ export {
774
+ type AIContent as AIContent,
775
+ type BulkCreateVehiclesResponse as BulkCreateVehiclesResponse,
776
+ type BulkRowOutcome as BulkRowOutcome,
777
+ type VehicleDetail as VehicleDetail,
778
+ type VehicleList as VehicleList,
779
+ type VehicleSummary as VehicleSummary,
780
+ type VehicleCreateParams as VehicleCreateParams,
781
+ type VehicleRetrieveParams as VehicleRetrieveParams,
782
+ type VehicleUpdateParams as VehicleUpdateParams,
783
+ type VehicleListParams as VehicleListParams,
784
+ type VehicleDeleteParams as VehicleDeleteParams,
785
+ type VehicleBulkParams as VehicleBulkParams,
786
+ };
787
+
788
+ export {
789
+ Images as Images,
790
+ type VehicleImage as VehicleImage,
791
+ type VehicleImageList as VehicleImageList,
792
+ type ImageCreateParams as ImageCreateParams,
793
+ type ImageListParams as ImageListParams,
794
+ type ImageDeleteParams as ImageDeleteParams,
795
+ };
796
+ }