partnermax 0.2.0 → 0.2.2

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 (179) hide show
  1. package/CHANGELOG.md +75 -47
  2. package/LICENSE +201 -201
  3. package/README.md +394 -370
  4. package/api-promise.js +1 -1
  5. package/client.d.mts +9 -3
  6. package/client.d.mts.map +1 -1
  7. package/client.d.ts +9 -3
  8. package/client.d.ts.map +1 -1
  9. package/client.js +12 -2
  10. package/client.js.map +1 -1
  11. package/client.mjs +12 -2
  12. package/client.mjs.map +1 -1
  13. package/core/api-promise.js +1 -1
  14. package/core/api-promise.mjs +1 -1
  15. package/core/pagination.d.mts +57 -0
  16. package/core/pagination.d.mts.map +1 -0
  17. package/core/pagination.d.ts +57 -0
  18. package/core/pagination.d.ts.map +1 -0
  19. package/core/pagination.js +108 -0
  20. package/core/pagination.js.map +1 -0
  21. package/core/pagination.mjs +102 -0
  22. package/core/pagination.mjs.map +1 -0
  23. package/error.js +1 -1
  24. package/index.d.mts +1 -0
  25. package/index.d.mts.map +1 -1
  26. package/index.d.ts +1 -0
  27. package/index.d.ts.map +1 -1
  28. package/index.js +3 -1
  29. package/index.js.map +1 -1
  30. package/index.mjs +1 -0
  31. package/index.mjs.map +1 -1
  32. package/internal/tslib.js +17 -17
  33. package/package.json +19 -15
  34. package/pagination.d.mts +3 -0
  35. package/pagination.d.mts.map +1 -0
  36. package/pagination.d.ts +3 -0
  37. package/pagination.d.ts.map +1 -0
  38. package/pagination.js +6 -0
  39. package/pagination.js.map +1 -0
  40. package/pagination.mjs +3 -0
  41. package/pagination.mjs.map +1 -0
  42. package/resource.js +1 -1
  43. package/resources/dealers/dealers.d.mts +7 -71
  44. package/resources/dealers/dealers.d.mts.map +1 -1
  45. package/resources/dealers/dealers.d.ts +7 -71
  46. package/resources/dealers/dealers.d.ts.map +1 -1
  47. package/resources/dealers/dealers.js +3 -16
  48. package/resources/dealers/dealers.js.map +1 -1
  49. package/resources/dealers/dealers.mjs +2 -15
  50. package/resources/dealers/dealers.mjs.map +1 -1
  51. package/resources/dealers/index.d.mts +2 -2
  52. package/resources/dealers/index.d.mts.map +1 -1
  53. package/resources/dealers/index.d.ts +2 -2
  54. package/resources/dealers/index.d.ts.map +1 -1
  55. package/resources/dealers/index.js.map +1 -1
  56. package/resources/dealers/index.mjs.map +1 -1
  57. package/resources/dealers/nlt/index.d.mts +1 -1
  58. package/resources/dealers/nlt/index.d.mts.map +1 -1
  59. package/resources/dealers/nlt/index.d.ts +1 -1
  60. package/resources/dealers/nlt/index.d.ts.map +1 -1
  61. package/resources/dealers/nlt/nlt.d.mts +2 -2
  62. package/resources/dealers/nlt/nlt.d.mts.map +1 -1
  63. package/resources/dealers/nlt/nlt.d.ts +2 -2
  64. package/resources/dealers/nlt/nlt.d.ts.map +1 -1
  65. package/resources/dealers/nlt/nlt.js +1 -1
  66. package/resources/dealers/nlt/offers.d.mts +55 -78
  67. package/resources/dealers/nlt/offers.d.mts.map +1 -1
  68. package/resources/dealers/nlt/offers.d.ts +55 -78
  69. package/resources/dealers/nlt/offers.d.ts.map +1 -1
  70. package/resources/dealers/nlt/offers.js +9 -11
  71. package/resources/dealers/nlt/offers.js.map +1 -1
  72. package/resources/dealers/nlt/offers.mjs +9 -11
  73. package/resources/dealers/nlt/offers.mjs.map +1 -1
  74. package/resources/dealers/nlt-settings.d.mts +24 -64
  75. package/resources/dealers/nlt-settings.d.mts.map +1 -1
  76. package/resources/dealers/nlt-settings.d.ts +24 -64
  77. package/resources/dealers/nlt-settings.d.ts.map +1 -1
  78. package/resources/dealers/nlt-settings.js +4 -13
  79. package/resources/dealers/nlt-settings.js.map +1 -1
  80. package/resources/dealers/nlt-settings.mjs +4 -13
  81. package/resources/dealers/nlt-settings.mjs.map +1 -1
  82. package/resources/dealers/nlt.js +1 -1
  83. package/resources/dealers/vehicles/images.d.mts +3 -2
  84. package/resources/dealers/vehicles/images.d.mts.map +1 -1
  85. package/resources/dealers/vehicles/images.d.ts +3 -2
  86. package/resources/dealers/vehicles/images.d.ts.map +1 -1
  87. package/resources/dealers/vehicles/images.js +3 -2
  88. package/resources/dealers/vehicles/images.js.map +1 -1
  89. package/resources/dealers/vehicles/images.mjs +3 -2
  90. package/resources/dealers/vehicles/images.mjs.map +1 -1
  91. package/resources/dealers/vehicles/index.d.mts +1 -1
  92. package/resources/dealers/vehicles/index.d.mts.map +1 -1
  93. package/resources/dealers/vehicles/index.d.ts +1 -1
  94. package/resources/dealers/vehicles/index.d.ts.map +1 -1
  95. package/resources/dealers/vehicles/index.js.map +1 -1
  96. package/resources/dealers/vehicles/index.mjs.map +1 -1
  97. package/resources/dealers/vehicles/vehicles.d.mts +57 -70
  98. package/resources/dealers/vehicles/vehicles.d.mts.map +1 -1
  99. package/resources/dealers/vehicles/vehicles.d.ts +57 -70
  100. package/resources/dealers/vehicles/vehicles.d.ts.map +1 -1
  101. package/resources/dealers/vehicles/vehicles.js +19 -19
  102. package/resources/dealers/vehicles/vehicles.js.map +1 -1
  103. package/resources/dealers/vehicles/vehicles.mjs +18 -18
  104. package/resources/dealers/vehicles/vehicles.mjs.map +1 -1
  105. package/resources/dealers/vehicles.js +1 -1
  106. package/resources/dealers.js +1 -1
  107. package/resources/index.d.mts +1 -1
  108. package/resources/index.d.mts.map +1 -1
  109. package/resources/index.d.ts +1 -1
  110. package/resources/index.d.ts.map +1 -1
  111. package/resources/index.js.map +1 -1
  112. package/resources/index.mjs.map +1 -1
  113. package/resources/keys.d.mts +7 -6
  114. package/resources/keys.d.mts.map +1 -1
  115. package/resources/keys.d.ts +7 -6
  116. package/resources/keys.d.ts.map +1 -1
  117. package/resources/keys.js +7 -6
  118. package/resources/keys.js.map +1 -1
  119. package/resources/keys.mjs +7 -6
  120. package/resources/keys.mjs.map +1 -1
  121. package/resources.js +1 -1
  122. package/src/api-promise.ts +2 -2
  123. package/src/client.ts +868 -841
  124. package/src/core/README.md +3 -3
  125. package/src/core/api-promise.ts +92 -92
  126. package/src/core/error.ts +130 -130
  127. package/src/core/pagination.ts +170 -0
  128. package/src/core/resource.ts +11 -11
  129. package/src/core/uploads.ts +2 -2
  130. package/src/error.ts +2 -2
  131. package/src/index.ts +23 -22
  132. package/src/internal/README.md +3 -3
  133. package/src/internal/builtin-types.ts +93 -93
  134. package/src/internal/detect-platform.ts +196 -196
  135. package/src/internal/errors.ts +33 -33
  136. package/src/internal/headers.ts +97 -97
  137. package/src/internal/parse.ts +56 -56
  138. package/src/internal/request-options.ts +91 -91
  139. package/src/internal/shim-types.ts +26 -26
  140. package/src/internal/shims.ts +107 -107
  141. package/src/internal/to-file.ts +154 -154
  142. package/src/internal/types.ts +93 -93
  143. package/src/internal/uploads.ts +187 -187
  144. package/src/internal/utils/base64.ts +40 -40
  145. package/src/internal/utils/bytes.ts +32 -32
  146. package/src/internal/utils/env.ts +18 -18
  147. package/src/internal/utils/log.ts +128 -128
  148. package/src/internal/utils/path.ts +88 -88
  149. package/src/internal/utils/query.ts +23 -23
  150. package/src/internal/utils/sleep.ts +3 -3
  151. package/src/internal/utils/uuid.ts +17 -17
  152. package/src/internal/utils/values.ts +105 -105
  153. package/src/internal/utils.ts +9 -9
  154. package/src/lib/.keep +4 -4
  155. package/src/pagination.ts +2 -0
  156. package/src/resource.ts +2 -2
  157. package/src/resources/dealers/dealers.ts +260 -348
  158. package/src/resources/dealers/index.ts +28 -28
  159. package/src/resources/dealers/nlt/index.ts +11 -11
  160. package/src/resources/dealers/nlt/nlt.ts +29 -29
  161. package/src/resources/dealers/nlt/offers.ts +403 -427
  162. package/src/resources/dealers/nlt-settings.ts +229 -269
  163. package/src/resources/dealers/nlt.ts +3 -3
  164. package/src/resources/dealers/vehicles/images.ts +154 -153
  165. package/src/resources/dealers/vehicles/index.ts +26 -25
  166. package/src/resources/dealers/vehicles/vehicles.ts +786 -796
  167. package/src/resources/dealers/vehicles.ts +3 -3
  168. package/src/resources/dealers.ts +3 -3
  169. package/src/resources/index.ts +11 -12
  170. package/src/resources/keys.ts +129 -128
  171. package/src/resources.ts +1 -1
  172. package/src/tsconfig.json +11 -11
  173. package/src/uploads.ts +2 -2
  174. package/src/version.ts +1 -1
  175. package/uploads.js +1 -1
  176. package/version.d.mts +1 -1
  177. package/version.d.ts +1 -1
  178. package/version.js +1 -1
  179. package/version.mjs +1 -1
@@ -1,269 +1,229 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../../core/resource';
4
- import { APIPromise } from '../../core/api-promise';
5
- import { buildHeaders } from '../../internal/headers';
6
- import { RequestOptions } from '../../internal/request-options';
7
- import { path } from '../../internal/utils/path';
8
-
9
- export class NltSettings extends APIResource {
10
- /**
11
- * Return current NLT economics for the dealer.
12
- */
13
- retrieve(dealerID: string, options?: RequestOptions): APIPromise<NltSettings> {
14
- return this._client.get(path`/v1/dealers/${dealerID}/nlt-settings`, options);
15
- }
16
-
17
- /**
18
- * Set markup percent (0-10) and three down-payment tiers (strictly ascending).
19
- *
20
- * Validation:
21
- *
22
- * - `agency_markup_percent` ∈ [0, 10] (Pydantic).
23
- * - `down_payment_tiers.{low,medium,high}` each
24
- * `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
25
- * final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
26
- *
27
- * Persistence:
28
- *
29
- * - `agency_markup_percent` `dealer_public.nlt_agency_percent` (rounded to int;
30
- * live column is `Integer NOT NULL DEFAULT 2`).
31
- * - `down_payment_tiers` `dealer_public.nlt_anticipi_config` JSONB, stored in
32
- * apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
33
- * `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
34
- * with the DealerMAX UI calculator that reads the same JSONB.
35
- *
36
- * There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
37
- * in the canonical DataMax pricing model, not per-dealer. The offer detail
38
- * endpoint surfaces it per row instead.
39
- *
40
- * `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
41
- * PATCH is also a row-level no-op by construction.
42
- */
43
- update(
44
- dealerID: string,
45
- params: NltSettingUpdateParams,
46
- options?: RequestOptions,
47
- ): APIPromise<NltSettings> {
48
- const { 'Idempotency-Key': idempotencyKey, ...body } = params;
49
- return this._client.patch(path`/v1/dealers/${dealerID}/nlt-settings`, {
50
- body,
51
- ...options,
52
- headers: buildHeaders([
53
- { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
54
- options?.headers,
55
- ]),
56
- });
57
- }
58
- }
59
-
60
- /**
61
- * Three down-payment scenarios (basso / medio / alto).
62
- *
63
- * No strict-ascending validation: the final EUR amount depends on the offer's list
64
- * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
65
- * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
66
- * semantics (low/medium/high) are advisory apimax/DealerMAX UI treats the 3
67
- * positions as opaque slots ordered by intent.
68
- */
69
- export interface DownPaymentTiers {
70
- /**
71
- * One down-payment tier — percent of list price + flat EUR.
72
- *
73
- * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
74
- * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
75
- * `listino_imponibile * pct + eur` (see
76
- * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
77
- *
78
- * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
79
- * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
80
- * byte-compatible with the DealerMAX UI calculator.
81
- */
82
- high: DownPaymentTiers.High;
83
-
84
- /**
85
- * One down-payment tier — percent of list price + flat EUR.
86
- *
87
- * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
88
- * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
89
- * `listino_imponibile * pct + eur` (see
90
- * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
91
- *
92
- * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
93
- * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
94
- * byte-compatible with the DealerMAX UI calculator.
95
- */
96
- low: DownPaymentTiers.Low;
97
-
98
- /**
99
- * One down-payment tier percent of list price + flat EUR.
100
- *
101
- * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
102
- * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
103
- * `listino_imponibile * pct + eur` (see
104
- * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
105
- *
106
- * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
107
- * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
108
- * byte-compatible with the DealerMAX UI calculator.
109
- */
110
- medium: DownPaymentTiers.Medium;
111
- }
112
-
113
- export namespace DownPaymentTiers {
114
- /**
115
- * One down-payment tier percent of list price + flat EUR.
116
- *
117
- * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
118
- * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
119
- * `listino_imponibile * pct + eur` (see
120
- * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
121
- *
122
- * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
123
- * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
124
- * byte-compatible with the DealerMAX UI calculator.
125
- */
126
- export interface High {
127
- /**
128
- * Flat EUR component added on top of the percentage (e.g. promo
129
- * `0% + 500 EUR fissi`). Whole euros only.
130
- */
131
- fixed_eur: number;
132
-
133
- /**
134
- * Percentage of the IVA-excluded list price applied as down payment for this tier.
135
- * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
136
- */
137
- percent_of_list: number;
138
- }
139
-
140
- /**
141
- * One down-payment tier percent of list price + flat EUR.
142
- *
143
- * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
144
- * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
145
- * `listino_imponibile * pct + eur` (see
146
- * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
147
- *
148
- * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
149
- * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
150
- * byte-compatible with the DealerMAX UI calculator.
151
- */
152
- export interface Low {
153
- /**
154
- * Flat EUR component added on top of the percentage (e.g. promo
155
- * `0% + 500 EUR fissi`). Whole euros only.
156
- */
157
- fixed_eur: number;
158
-
159
- /**
160
- * Percentage of the IVA-excluded list price applied as down payment for this tier.
161
- * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
162
- */
163
- percent_of_list: number;
164
- }
165
-
166
- /**
167
- * One down-payment tier — percent of list price + flat EUR.
168
- *
169
- * apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
170
- * `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
171
- * `listino_imponibile * pct + eur` (see
172
- * `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
173
- *
174
- * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
175
- * `12.5`, not `0.125`); the router persists `pct = percent_of_list / 100` to stay
176
- * byte-compatible with the DealerMAX UI calculator.
177
- */
178
- export interface Medium {
179
- /**
180
- * Flat EUR component added on top of the percentage (e.g. promo
181
- * `0% + 500 EUR fissi`). Whole euros only.
182
- */
183
- fixed_eur: number;
184
-
185
- /**
186
- * Percentage of the IVA-excluded list price applied as down payment for this tier.
187
- * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
188
- */
189
- percent_of_list: number;
190
- }
191
- }
192
-
193
- /**
194
- * Response model for GET / PATCH /v1/dealers/{id}/nlt-settings.
195
- *
196
- * Note: there is no `vat_treatment` field VAT is a property of the offer
197
- * (`nlt_offerte.solo_privati`), not of the dealer. The offer detail returns the
198
- * VAT treatment per row instead.
199
- */
200
- export interface NltSettings {
201
- agency_markup_percent: number;
202
-
203
- dealer_id: string;
204
-
205
- /**
206
- * Three down-payment scenarios (basso / medio / alto).
207
- *
208
- * No strict-ascending validation: the final EUR amount depends on the offer's list
209
- * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
210
- * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
211
- * semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
212
- * positions as opaque slots ordered by intent.
213
- */
214
- down_payment_tiers: DownPaymentTiers;
215
-
216
- effective_from: string;
217
-
218
- currency?: 'EUR';
219
-
220
- image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
221
-
222
- image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
223
- }
224
-
225
- export interface NltSettingUpdateParams {
226
- /**
227
- * Body param
228
- */
229
- agency_markup_percent: number;
230
-
231
- /**
232
- * Body param: Three down-payment scenarios (basso / medio / alto).
233
- *
234
- * No strict-ascending validation: the final EUR amount depends on the offer's list
235
- * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
236
- * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
237
- * semantics (low/medium/high) are advisory — apimax/DealerMAX UI treats the 3
238
- * positions as opaque slots ordered by intent.
239
- */
240
- down_payment_tiers: DownPaymentTiers;
241
-
242
- /**
243
- * Body param
244
- */
245
- currency?: 'EUR';
246
-
247
- /**
248
- * Body param
249
- */
250
- image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
251
-
252
- /**
253
- * Body param
254
- */
255
- image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
256
-
257
- /**
258
- * Header param
259
- */
260
- 'Idempotency-Key'?: string;
261
- }
262
-
263
- export declare namespace NltSettings {
264
- export {
265
- type DownPaymentTiers as DownPaymentTiers,
266
- type NltSettings as NltSettings,
267
- type NltSettingUpdateParams as NltSettingUpdateParams,
268
- };
269
- }
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { buildHeaders } from '../../internal/headers';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class NltSettings extends APIResource {
10
+ /**
11
+ * Return current NLT economics for the dealer.
12
+ */
13
+ retrieve(dealerID: string, options?: RequestOptions): APIPromise<NltSettings> {
14
+ return this._client.get(path`/v1/dealers/${dealerID}/nlt-settings`, options);
15
+ }
16
+
17
+ /**
18
+ * Set markup percent (0-10), three down-payment tiers, and image mode.
19
+ *
20
+ * Validation:
21
+ *
22
+ * - `agency_markup_percent` ∈ [0, 10] (Pydantic).
23
+ * - `down_payment_tiers.{low,medium,high}` each
24
+ * `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
25
+ * final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
26
+ *
27
+ * The stored economics are immediately used by DealerMAX's dealer-aware NLT
28
+ * calculator. There is NO `vat_treatment` field: VAT is per-offer, not per-dealer.
29
+ * The offer detail endpoint surfaces it per row instead.
30
+ *
31
+ * `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
32
+ * PATCH is also a row-level no-op by construction.
33
+ */
34
+ update(
35
+ dealerID: string,
36
+ params: NltSettingUpdateParams,
37
+ options?: RequestOptions,
38
+ ): APIPromise<NltSettings> {
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
+
51
+ /**
52
+ * Three down-payment scenarios (basso / medio / alto).
53
+ *
54
+ * No strict-ascending validation: the final EUR amount depends on the offer's list
55
+ * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
56
+ * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
57
+ * semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
58
+ * as opaque slots ordered by intent.
59
+ */
60
+ export interface DownPaymentTiers {
61
+ /**
62
+ * One down-payment tier — percent of list price + flat EUR.
63
+ *
64
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
65
+ * `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
66
+ * offer's IVA-excluded list price plus the flat component.
67
+ */
68
+ high: DownPaymentTiers.High;
69
+
70
+ /**
71
+ * One down-payment tier — percent of list price + flat EUR.
72
+ *
73
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
74
+ * `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
75
+ * offer's IVA-excluded list price plus the flat component.
76
+ */
77
+ low: DownPaymentTiers.Low;
78
+
79
+ /**
80
+ * One down-payment tier percent of list price + flat EUR.
81
+ *
82
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
83
+ * `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
84
+ * offer's IVA-excluded list price plus the flat component.
85
+ */
86
+ medium: DownPaymentTiers.Medium;
87
+ }
88
+
89
+ export namespace DownPaymentTiers {
90
+ /**
91
+ * One down-payment tier — percent of list price + flat EUR.
92
+ *
93
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
94
+ * `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
95
+ * offer's IVA-excluded list price plus the flat component.
96
+ */
97
+ export interface High {
98
+ /**
99
+ * Flat EUR component added on top of the percentage (e.g. promo
100
+ * `0% + 500 EUR fissi`). Whole euros only.
101
+ */
102
+ fixed_eur: number;
103
+
104
+ /**
105
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
106
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
107
+ */
108
+ percent_of_list: number;
109
+ }
110
+
111
+ /**
112
+ * One down-payment tier — percent of list price + flat EUR.
113
+ *
114
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
115
+ * `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
116
+ * offer's IVA-excluded list price plus the flat component.
117
+ */
118
+ export interface Low {
119
+ /**
120
+ * Flat EUR component added on top of the percentage (e.g. promo
121
+ * `0% + 500 EUR fissi`). Whole euros only.
122
+ */
123
+ fixed_eur: number;
124
+
125
+ /**
126
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
127
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
128
+ */
129
+ percent_of_list: number;
130
+ }
131
+
132
+ /**
133
+ * One down-payment tier — percent of list price + flat EUR.
134
+ *
135
+ * Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
136
+ * `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
137
+ * offer's IVA-excluded list price plus the flat component.
138
+ */
139
+ export interface Medium {
140
+ /**
141
+ * Flat EUR component added on top of the percentage (e.g. promo
142
+ * `0% + 500 EUR fissi`). Whole euros only.
143
+ */
144
+ fixed_eur: number;
145
+
146
+ /**
147
+ * Percentage of the IVA-excluded list price applied as down payment for this tier.
148
+ * Range 0–100. Typical defaults: 0 (low), 12.5 (medium), 25 (high).
149
+ */
150
+ percent_of_list: number;
151
+ }
152
+ }
153
+
154
+ /**
155
+ * Response model for GET / PATCH /v1/dealers/{id}/nlt-settings.
156
+ *
157
+ * Note: there is no `vat_treatment` field — VAT is a property of the offer, not of
158
+ * the dealer. The offer detail returns the VAT treatment per row instead.
159
+ */
160
+ export interface NltSettings {
161
+ agency_markup_percent: number;
162
+
163
+ dealer_id: string;
164
+
165
+ /**
166
+ * Three down-payment scenarios (basso / medio / alto).
167
+ *
168
+ * No strict-ascending validation: the final EUR amount depends on the offer's list
169
+ * price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
170
+ * tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
171
+ * semantics (low/medium/high) are advisory DealerMAX UI treats the 3 positions
172
+ * as opaque slots ordered by intent.
173
+ */
174
+ down_payment_tiers: DownPaymentTiers;
175
+
176
+ effective_from: string;
177
+
178
+ currency?: 'EUR';
179
+
180
+ image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
181
+
182
+ image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
183
+ }
184
+
185
+ export interface NltSettingUpdateParams {
186
+ /**
187
+ * Body param
188
+ */
189
+ agency_markup_percent: number;
190
+
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 DealerMAX UI treats the 3 positions
198
+ * as opaque slots ordered by intent.
199
+ */
200
+ down_payment_tiers: DownPaymentTiers;
201
+
202
+ /**
203
+ * Body param
204
+ */
205
+ currency?: 'EUR';
206
+
207
+ /**
208
+ * Body param
209
+ */
210
+ image_mode?: 'branded' | 'scenario_locked' | 'scenario_seasonal';
211
+
212
+ /**
213
+ * Body param
214
+ */
215
+ image_scenario_locked?: 'mediterraneo' | 'cortina' | 'milano' | 'showroom' | 'building' | null;
216
+
217
+ /**
218
+ * Header param
219
+ */
220
+ 'Idempotency-Key'?: string;
221
+ }
222
+
223
+ export declare namespace NltSettings {
224
+ export {
225
+ type DownPaymentTiers as DownPaymentTiers,
226
+ type NltSettings as NltSettings,
227
+ type NltSettingUpdateParams as NltSettingUpdateParams,
228
+ };
229
+ }
@@ -1,3 +1,3 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- export * from './nlt/index';
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './nlt/index';