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,31 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import { path } from "../../../internal/utils/path.mjs";
4
+ export class Offers extends APIResource {
5
+ /**
6
+ * Full offer detail. Payload shape mirrors apimax MCP `get_nlt_offer_details`
7
+ * bit-for-bit (mcp_server.py:1546-1606).
8
+ */
9
+ retrieve(offerID, params, options) {
10
+ const { dealer_id } = params;
11
+ return this._client.get(path `/v1/dealers/${dealer_id}/nlt/offers/${offerID}`, options);
12
+ }
13
+ /**
14
+ * Listing of NLT offers with monthly canon repriced for this dealer.
15
+ *
16
+ * Strategy:
17
+ *
18
+ * 1. Resolve + ACL the dealer.
19
+ * 2. Pull at most `limit + 1` offers from the catalog after the cursor. The extra
20
+ * row lets us know if there's a next page without a second COUNT(\*) query.
21
+ * 3. Apply text/enum filters server-side via SQL where possible (brand, segment,
22
+ * fuel) and the numeric `canone_max_eur` filter in Python after the pricing
23
+ * pass (the DB has no "displayed canon" column; we synthesize it per dealer).
24
+ * 4. For each surviving offer, price the (duration, km) cells the caller filtered
25
+ * to (if specified) or all 18, pick the cheapest cell as the headline.
26
+ */
27
+ list(dealerID, query = {}, options) {
28
+ return this._client.get(path `/v1/dealers/${dealerID}/nlt/offers`, { query, ...options });
29
+ }
30
+ }
31
+ //# sourceMappingURL=offers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offers.mjs","sourceRoot":"","sources":["../../../src/resources/dealers/nlt/offers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAGrD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CACN,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,SAAS,eAAe,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,QAAgB,EAChB,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,aAAa,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
@@ -0,0 +1,221 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import { APIPromise } from "../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../internal/request-options.mjs";
4
+ export declare class NltSettings extends APIResource {
5
+ /**
6
+ * Return current NLT economics for the dealer.
7
+ */
8
+ retrieve(dealerID: string, options?: RequestOptions): APIPromise<NltSettings>;
9
+ /**
10
+ * Set markup percent (0-10) and three down-payment tiers (strictly ascending).
11
+ *
12
+ * Validation:
13
+ *
14
+ * - `agency_markup_percent` ∈ [0, 10] (Pydantic).
15
+ * - `down_payment_tiers.{low,medium,high}` each
16
+ * `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
17
+ * final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
18
+ *
19
+ * Persistence:
20
+ *
21
+ * - `agency_markup_percent` → `dealer_public.nlt_agency_percent` (rounded to int;
22
+ * live column is `Integer NOT NULL DEFAULT 2`).
23
+ * - `down_payment_tiers` → `dealer_public.nlt_anticipi_config` JSONB, stored in
24
+ * apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
25
+ * `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
26
+ * with the DealerMAX UI calculator that reads the same JSONB.
27
+ *
28
+ * There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
29
+ * in the canonical DataMax pricing model, not per-dealer. The offer detail
30
+ * endpoint surfaces it per row instead.
31
+ *
32
+ * `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
33
+ * PATCH is also a row-level no-op by construction.
34
+ */
35
+ update(dealerID: string, params: NltSettingUpdateParams, options?: RequestOptions): APIPromise<NltSettings>;
36
+ }
37
+ /**
38
+ * Three down-payment scenarios (basso / medio / alto).
39
+ *
40
+ * No strict-ascending validation: the final EUR amount depends on the offer's list
41
+ * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
42
+ * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
43
+ * semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
44
+ * positions as opaque slots ordered by intent.
45
+ */
46
+ export interface DownPaymentTiers {
47
+ /**
48
+ * One down-payment tier — percent of list price + flat EUR.
49
+ *
50
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
51
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
52
+ * `listino_imponibile * pct + eur` (see
53
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
54
+ *
55
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
56
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
57
+ * byte-compatible with the DealerMAX UI calculator.
58
+ */
59
+ high: DownPaymentTiers.High;
60
+ /**
61
+ * One down-payment tier — percent of list price + flat EUR.
62
+ *
63
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
64
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
65
+ * `listino_imponibile * pct + eur` (see
66
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
67
+ *
68
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
69
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
70
+ * byte-compatible with the DealerMAX UI calculator.
71
+ */
72
+ low: DownPaymentTiers.Low;
73
+ /**
74
+ * One down-payment tier — percent of list price + flat EUR.
75
+ *
76
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
77
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
78
+ * `listino_imponibile * pct + eur` (see
79
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
80
+ *
81
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
82
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
83
+ * byte-compatible with the DealerMAX UI calculator.
84
+ */
85
+ medium: DownPaymentTiers.Medium;
86
+ }
87
+ export declare namespace DownPaymentTiers {
88
+ /**
89
+ * One down-payment tier — percent of list price + flat EUR.
90
+ *
91
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
92
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
93
+ * `listino_imponibile * pct + eur` (see
94
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
95
+ *
96
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
97
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
98
+ * byte-compatible with the DealerMAX UI calculator.
99
+ */
100
+ interface High {
101
+ /**
102
+ * Flat EUR component added on top of the percentage (e.g. promo
103
+ * `0% + 500 EUR fissi`). Whole euros only.
104
+ */
105
+ fixed_eur: number;
106
+ /**
107
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
108
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
109
+ */
110
+ percent_of_list: number;
111
+ }
112
+ /**
113
+ * One down-payment tier — percent of list price + flat EUR.
114
+ *
115
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
116
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
117
+ * `listino_imponibile * pct + eur` (see
118
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
119
+ *
120
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
121
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
122
+ * byte-compatible with the DealerMAX UI calculator.
123
+ */
124
+ interface Low {
125
+ /**
126
+ * Flat EUR component added on top of the percentage (e.g. promo
127
+ * `0% + 500 EUR fissi`). Whole euros only.
128
+ */
129
+ fixed_eur: number;
130
+ /**
131
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
132
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
133
+ */
134
+ percent_of_list: number;
135
+ }
136
+ /**
137
+ * One down-payment tier — percent of list price + flat EUR.
138
+ *
139
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
140
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
141
+ * `listino_imponibile * pct + eur` (see
142
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
143
+ *
144
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
145
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
146
+ * byte-compatible with the DealerMAX UI calculator.
147
+ */
148
+ interface Medium {
149
+ /**
150
+ * Flat EUR component added on top of the percentage (e.g. promo
151
+ * `0% + 500 EUR fissi`). Whole euros only.
152
+ */
153
+ fixed_eur: number;
154
+ /**
155
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
156
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
157
+ */
158
+ percent_of_list: number;
159
+ }
160
+ }
161
+ /**
162
+ * Response model for GET / PATCH /v1/dealers/{id}/nlt-settings.
163
+ *
164
+ * Note: there is no `vat_treatment` field — VAT is a property of the offer
165
+ * (`nlt_offerte.solo_privati`), not of the dealer. The offer detail returns the
166
+ * VAT treatment per row instead.
167
+ */
168
+ export interface NltSettings {
169
+ agency_markup_percent: number;
170
+ dealer_id: string;
171
+ /**
172
+ * Three down-payment scenarios (basso / medio / alto).
173
+ *
174
+ * No strict-ascending validation: the final EUR amount depends on the offer's list
175
+ * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
176
+ * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
177
+ * semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
178
+ * positions as opaque slots ordered by intent.
179
+ */
180
+ down_payment_tiers: DownPaymentTiers;
181
+ effective_from: string;
182
+ currency?: 'EUR';
183
+ image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
184
+ image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
185
+ }
186
+ export interface NltSettingUpdateParams {
187
+ /**
188
+ * Body param
189
+ */
190
+ agency_markup_percent: number;
191
+ /**
192
+ * Body param: Three down-payment scenarios (basso / medio / alto).
193
+ *
194
+ * No strict-ascending validation: the final EUR amount depends on the offer's list
195
+ * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
196
+ * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
197
+ * semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
198
+ * positions as opaque slots ordered by intent.
199
+ */
200
+ down_payment_tiers: DownPaymentTiers;
201
+ /**
202
+ * Body param
203
+ */
204
+ currency?: 'EUR';
205
+ /**
206
+ * Body param
207
+ */
208
+ image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
209
+ /**
210
+ * Body param
211
+ */
212
+ image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
213
+ /**
214
+ * Header param
215
+ */
216
+ 'Idempotency-Key'?: string;
217
+ }
218
+ export declare namespace NltSettings {
219
+ export { type DownPaymentTiers as DownPaymentTiers, type NltSettings as NltSettings, type NltSettingUpdateParams as NltSettingUpdateParams, };
220
+ }
221
+ //# sourceMappingURL=nlt-settings.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nlt-settings.d.mts","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAI7E;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;CAW3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;CACjC;AAED,yBAAiB,gBAAgB,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,UAAiB,IAAI;QACnB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;IAED;;;;;;;;;;;OAWG;IACH,UAAiB,GAAG;QAClB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;IAED;;;;;;;;;;;OAWG;IACH,UAAiB,MAAM;QACrB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;CACF;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAE9B,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IAErC,cAAc,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;IAEjE,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;CAChG;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;;;;;;;OAQG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;IAEjE;;OAEG;IACH,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAE/F;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,221 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import { APIPromise } from "../../core/api-promise.js";
3
+ import { RequestOptions } from "../../internal/request-options.js";
4
+ export declare class NltSettings extends APIResource {
5
+ /**
6
+ * Return current NLT economics for the dealer.
7
+ */
8
+ retrieve(dealerID: string, options?: RequestOptions): APIPromise<NltSettings>;
9
+ /**
10
+ * Set markup percent (0-10) and three down-payment tiers (strictly ascending).
11
+ *
12
+ * Validation:
13
+ *
14
+ * - `agency_markup_percent` ∈ [0, 10] (Pydantic).
15
+ * - `down_payment_tiers.{low,medium,high}` each
16
+ * `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
17
+ * final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
18
+ *
19
+ * Persistence:
20
+ *
21
+ * - `agency_markup_percent` → `dealer_public.nlt_agency_percent` (rounded to int;
22
+ * live column is `Integer NOT NULL DEFAULT 2`).
23
+ * - `down_payment_tiers` → `dealer_public.nlt_anticipi_config` JSONB, stored in
24
+ * apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
25
+ * `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
26
+ * with the DealerMAX UI calculator that reads the same JSONB.
27
+ *
28
+ * There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
29
+ * in the canonical DataMax pricing model, not per-dealer. The offer detail
30
+ * endpoint surfaces it per row instead.
31
+ *
32
+ * `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
33
+ * PATCH is also a row-level no-op by construction.
34
+ */
35
+ update(dealerID: string, params: NltSettingUpdateParams, options?: RequestOptions): APIPromise<NltSettings>;
36
+ }
37
+ /**
38
+ * Three down-payment scenarios (basso / medio / alto).
39
+ *
40
+ * No strict-ascending validation: the final EUR amount depends on the offer's list
41
+ * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
42
+ * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
43
+ * semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
44
+ * positions as opaque slots ordered by intent.
45
+ */
46
+ export interface DownPaymentTiers {
47
+ /**
48
+ * One down-payment tier — percent of list price + flat EUR.
49
+ *
50
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
51
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
52
+ * `listino_imponibile * pct + eur` (see
53
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
54
+ *
55
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
56
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
57
+ * byte-compatible with the DealerMAX UI calculator.
58
+ */
59
+ high: DownPaymentTiers.High;
60
+ /**
61
+ * One down-payment tier — percent of list price + flat EUR.
62
+ *
63
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
64
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
65
+ * `listino_imponibile * pct + eur` (see
66
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
67
+ *
68
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
69
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
70
+ * byte-compatible with the DealerMAX UI calculator.
71
+ */
72
+ low: DownPaymentTiers.Low;
73
+ /**
74
+ * One down-payment tier — percent of list price + flat EUR.
75
+ *
76
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
77
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
78
+ * `listino_imponibile * pct + eur` (see
79
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
80
+ *
81
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
82
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
83
+ * byte-compatible with the DealerMAX UI calculator.
84
+ */
85
+ medium: DownPaymentTiers.Medium;
86
+ }
87
+ export declare namespace DownPaymentTiers {
88
+ /**
89
+ * One down-payment tier — percent of list price + flat EUR.
90
+ *
91
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
92
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
93
+ * `listino_imponibile * pct + eur` (see
94
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
95
+ *
96
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
97
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
98
+ * byte-compatible with the DealerMAX UI calculator.
99
+ */
100
+ interface High {
101
+ /**
102
+ * Flat EUR component added on top of the percentage (e.g. promo
103
+ * `0% + 500 EUR fissi`). Whole euros only.
104
+ */
105
+ fixed_eur: number;
106
+ /**
107
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
108
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
109
+ */
110
+ percent_of_list: number;
111
+ }
112
+ /**
113
+ * One down-payment tier — percent of list price + flat EUR.
114
+ *
115
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
116
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
117
+ * `listino_imponibile * pct + eur` (see
118
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
119
+ *
120
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
121
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
122
+ * byte-compatible with the DealerMAX UI calculator.
123
+ */
124
+ interface Low {
125
+ /**
126
+ * Flat EUR component added on top of the percentage (e.g. promo
127
+ * `0% + 500 EUR fissi`). Whole euros only.
128
+ */
129
+ fixed_eur: number;
130
+ /**
131
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
132
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
133
+ */
134
+ percent_of_list: number;
135
+ }
136
+ /**
137
+ * One down-payment tier — percent of list price + flat EUR.
138
+ *
139
+ * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
140
+ * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
141
+ * `listino_imponibile * pct + eur` (see
142
+ * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
143
+ *
144
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
145
+ * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
146
+ * byte-compatible with the DealerMAX UI calculator.
147
+ */
148
+ interface Medium {
149
+ /**
150
+ * Flat EUR component added on top of the percentage (e.g. promo
151
+ * `0% + 500 EUR fissi`). Whole euros only.
152
+ */
153
+ fixed_eur: number;
154
+ /**
155
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
156
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
157
+ */
158
+ percent_of_list: number;
159
+ }
160
+ }
161
+ /**
162
+ * Response model for GET / PATCH /v1/dealers/{id}/nlt-settings.
163
+ *
164
+ * Note: there is no `vat_treatment` field — VAT is a property of the offer
165
+ * (`nlt_offerte.solo_privati`), not of the dealer. The offer detail returns the
166
+ * VAT treatment per row instead.
167
+ */
168
+ export interface NltSettings {
169
+ agency_markup_percent: number;
170
+ dealer_id: string;
171
+ /**
172
+ * Three down-payment scenarios (basso / medio / alto).
173
+ *
174
+ * No strict-ascending validation: the final EUR amount depends on the offer's list
175
+ * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
176
+ * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
177
+ * semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
178
+ * positions as opaque slots ordered by intent.
179
+ */
180
+ down_payment_tiers: DownPaymentTiers;
181
+ effective_from: string;
182
+ currency?: 'EUR';
183
+ image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
184
+ image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
185
+ }
186
+ export interface NltSettingUpdateParams {
187
+ /**
188
+ * Body param
189
+ */
190
+ agency_markup_percent: number;
191
+ /**
192
+ * Body param: Three down-payment scenarios (basso / medio / alto).
193
+ *
194
+ * No strict-ascending validation: the final EUR amount depends on the offer's list
195
+ * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
196
+ * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
197
+ * semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
198
+ * positions as opaque slots ordered by intent.
199
+ */
200
+ down_payment_tiers: DownPaymentTiers;
201
+ /**
202
+ * Body param
203
+ */
204
+ currency?: 'EUR';
205
+ /**
206
+ * Body param
207
+ */
208
+ image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
209
+ /**
210
+ * Body param
211
+ */
212
+ image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
213
+ /**
214
+ * Header param
215
+ */
216
+ 'Idempotency-Key'?: string;
217
+ }
218
+ export declare namespace NltSettings {
219
+ export { type DownPaymentTiers as DownPaymentTiers, type NltSettings as NltSettings, type NltSettingUpdateParams as NltSettingUpdateParams, };
220
+ }
221
+ //# sourceMappingURL=nlt-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nlt-settings.d.ts","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAI7E;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;CAW3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;CACjC;AAED,yBAAiB,gBAAgB,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,UAAiB,IAAI;QACnB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;IAED;;;;;;;;;;;OAWG;IACH,UAAiB,GAAG;QAClB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;IAED;;;;;;;;;;;OAWG;IACH,UAAiB,MAAM;QACrB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;CACF;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAE9B,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IAErC,cAAc,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;IAEjE,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;CAChG;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;;;;;;;OAQG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;IAEjE;;OAEG;IACH,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAE/F;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.NltSettings = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const headers_1 = require("../../internal/headers.js");
7
+ const path_1 = require("../../internal/utils/path.js");
8
+ class NltSettings extends resource_1.APIResource {
9
+ /**
10
+ * Return current NLT economics for the dealer.
11
+ */
12
+ retrieve(dealerID, options) {
13
+ return this._client.get((0, path_1.path) `/v1/dealers/${dealerID}/nlt-settings`, options);
14
+ }
15
+ /**
16
+ * Set markup percent (0-10) and three down-payment tiers (strictly ascending).
17
+ *
18
+ * Validation:
19
+ *
20
+ * - `agency_markup_percent` ∈ [0, 10] (Pydantic).
21
+ * - `down_payment_tiers.{low,medium,high}` each
22
+ * `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
23
+ * final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
24
+ *
25
+ * Persistence:
26
+ *
27
+ * - `agency_markup_percent` → `dealer_public.nlt_agency_percent` (rounded to int;
28
+ * live column is `Integer NOT NULL DEFAULT 2`).
29
+ * - `down_payment_tiers` → `dealer_public.nlt_anticipi_config` JSONB, stored in
30
+ * apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
31
+ * `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
32
+ * with the DealerMAX UI calculator that reads the same JSONB.
33
+ *
34
+ * There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
35
+ * in the canonical DataMax pricing model, not per-dealer. The offer detail
36
+ * endpoint surfaces it per row instead.
37
+ *
38
+ * `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
39
+ * PATCH is also a row-level no-op by construction.
40
+ */
41
+ update(dealerID, params, options) {
42
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
43
+ return this._client.patch((0, path_1.path) `/v1/dealers/${dealerID}/nlt-settings`, {
44
+ body,
45
+ ...options,
46
+ headers: (0, headers_1.buildHeaders)([
47
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
48
+ options?.headers,
49
+ ]),
50
+ });
51
+ }
52
+ }
53
+ exports.NltSettings = NltSettings;
54
+ //# sourceMappingURL=nlt-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nlt-settings.js","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,eAAe,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CACJ,QAAgB,EAChB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,eAAe,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACnF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAjDD,kCAiDC"}
@@ -0,0 +1,50 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { buildHeaders } from "../../internal/headers.mjs";
4
+ import { path } from "../../internal/utils/path.mjs";
5
+ export class NltSettings extends APIResource {
6
+ /**
7
+ * Return current NLT economics for the dealer.
8
+ */
9
+ retrieve(dealerID, options) {
10
+ return this._client.get(path `/v1/dealers/${dealerID}/nlt-settings`, options);
11
+ }
12
+ /**
13
+ * Set markup percent (0-10) and three down-payment tiers (strictly ascending).
14
+ *
15
+ * Validation:
16
+ *
17
+ * - `agency_markup_percent` ∈ [0, 10] (Pydantic).
18
+ * - `down_payment_tiers.{low,medium,high}` each
19
+ * `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
20
+ * final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
21
+ *
22
+ * Persistence:
23
+ *
24
+ * - `agency_markup_percent` → `dealer_public.nlt_agency_percent` (rounded to int;
25
+ * live column is `Integer NOT NULL DEFAULT 2`).
26
+ * - `down_payment_tiers` → `dealer_public.nlt_anticipi_config` JSONB, stored in
27
+ * apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
28
+ * `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
29
+ * with the DealerMAX UI calculator that reads the same JSONB.
30
+ *
31
+ * There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
32
+ * in the canonical DataMax pricing model, not per-dealer. The offer detail
33
+ * endpoint surfaces it per row instead.
34
+ *
35
+ * `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
36
+ * PATCH is also a row-level no-op by construction.
37
+ */
38
+ update(dealerID, params, options) {
39
+ const { 'Idempotency-Key': idempotencyKey, ...body } = params;
40
+ return this._client.patch(path `/v1/dealers/${dealerID}/nlt-settings`, {
41
+ body,
42
+ ...options,
43
+ headers: buildHeaders([
44
+ { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
45
+ options?.headers,
46
+ ]),
47
+ });
48
+ }
49
+ }
50
+ //# sourceMappingURL=nlt-settings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nlt-settings.mjs","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,eAAe,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CACJ,QAAgB,EAChB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,eAAe,QAAQ,eAAe,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBACnF,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from "./nlt/index.mjs";
2
+ //# sourceMappingURL=nlt.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nlt.d.mts","sourceRoot":"","sources":["../../src/resources/dealers/nlt.ts"],"names":[],"mappings":"AAEA,gCAA4B"}
@@ -0,0 +1,2 @@
1
+ export * from "./nlt/index.js";
2
+ //# sourceMappingURL=nlt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nlt.d.ts","sourceRoot":"","sources":["../../src/resources/dealers/nlt.ts"],"names":[],"mappings":"AAEA,+BAA4B"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("./..\\..\\internal\\tslib.js");
5
+ tslib_1.__exportStar(require("./nlt/index.js"), exports);
6
+ //# sourceMappingURL=nlt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nlt.js","sourceRoot":"","sources":["../../src/resources/dealers/nlt.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,yDAA4B"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./nlt/index.mjs";
3
+ //# sourceMappingURL=nlt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nlt.mjs","sourceRoot":"","sources":["../../src/resources/dealers/nlt.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,gCAA4B"}