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.
- package/CHANGELOG.md +75 -47
- package/LICENSE +201 -201
- package/README.md +394 -370
- package/api-promise.js +1 -1
- package/client.d.mts +9 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -3
- package/client.d.ts.map +1 -1
- package/client.js +12 -2
- package/client.js.map +1 -1
- package/client.mjs +12 -2
- package/client.mjs.map +1 -1
- package/core/api-promise.js +1 -1
- package/core/api-promise.mjs +1 -1
- package/core/pagination.d.mts +57 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +57 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +108 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +102 -0
- package/core/pagination.mjs.map +1 -0
- package/error.js +1 -1
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +19 -15
- package/pagination.d.mts +3 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +3 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -0
- package/resource.js +1 -1
- package/resources/dealers/dealers.d.mts +7 -71
- package/resources/dealers/dealers.d.mts.map +1 -1
- package/resources/dealers/dealers.d.ts +7 -71
- package/resources/dealers/dealers.d.ts.map +1 -1
- package/resources/dealers/dealers.js +3 -16
- package/resources/dealers/dealers.js.map +1 -1
- package/resources/dealers/dealers.mjs +2 -15
- package/resources/dealers/dealers.mjs.map +1 -1
- package/resources/dealers/index.d.mts +2 -2
- package/resources/dealers/index.d.mts.map +1 -1
- package/resources/dealers/index.d.ts +2 -2
- package/resources/dealers/index.d.ts.map +1 -1
- package/resources/dealers/index.js.map +1 -1
- package/resources/dealers/index.mjs.map +1 -1
- package/resources/dealers/nlt/index.d.mts +1 -1
- package/resources/dealers/nlt/index.d.mts.map +1 -1
- package/resources/dealers/nlt/index.d.ts +1 -1
- package/resources/dealers/nlt/index.d.ts.map +1 -1
- package/resources/dealers/nlt/nlt.d.mts +2 -2
- package/resources/dealers/nlt/nlt.d.mts.map +1 -1
- package/resources/dealers/nlt/nlt.d.ts +2 -2
- package/resources/dealers/nlt/nlt.d.ts.map +1 -1
- package/resources/dealers/nlt/nlt.js +1 -1
- package/resources/dealers/nlt/offers.d.mts +55 -78
- package/resources/dealers/nlt/offers.d.mts.map +1 -1
- package/resources/dealers/nlt/offers.d.ts +55 -78
- package/resources/dealers/nlt/offers.d.ts.map +1 -1
- package/resources/dealers/nlt/offers.js +9 -11
- package/resources/dealers/nlt/offers.js.map +1 -1
- package/resources/dealers/nlt/offers.mjs +9 -11
- package/resources/dealers/nlt/offers.mjs.map +1 -1
- package/resources/dealers/nlt-settings.d.mts +24 -64
- package/resources/dealers/nlt-settings.d.mts.map +1 -1
- package/resources/dealers/nlt-settings.d.ts +24 -64
- package/resources/dealers/nlt-settings.d.ts.map +1 -1
- package/resources/dealers/nlt-settings.js +4 -13
- package/resources/dealers/nlt-settings.js.map +1 -1
- package/resources/dealers/nlt-settings.mjs +4 -13
- package/resources/dealers/nlt-settings.mjs.map +1 -1
- package/resources/dealers/nlt.js +1 -1
- package/resources/dealers/vehicles/images.d.mts +3 -2
- package/resources/dealers/vehicles/images.d.mts.map +1 -1
- package/resources/dealers/vehicles/images.d.ts +3 -2
- package/resources/dealers/vehicles/images.d.ts.map +1 -1
- package/resources/dealers/vehicles/images.js +3 -2
- package/resources/dealers/vehicles/images.js.map +1 -1
- package/resources/dealers/vehicles/images.mjs +3 -2
- package/resources/dealers/vehicles/images.mjs.map +1 -1
- package/resources/dealers/vehicles/index.d.mts +1 -1
- package/resources/dealers/vehicles/index.d.mts.map +1 -1
- package/resources/dealers/vehicles/index.d.ts +1 -1
- package/resources/dealers/vehicles/index.d.ts.map +1 -1
- package/resources/dealers/vehicles/index.js.map +1 -1
- package/resources/dealers/vehicles/index.mjs.map +1 -1
- package/resources/dealers/vehicles/vehicles.d.mts +57 -70
- package/resources/dealers/vehicles/vehicles.d.mts.map +1 -1
- package/resources/dealers/vehicles/vehicles.d.ts +57 -70
- package/resources/dealers/vehicles/vehicles.d.ts.map +1 -1
- package/resources/dealers/vehicles/vehicles.js +19 -19
- package/resources/dealers/vehicles/vehicles.js.map +1 -1
- package/resources/dealers/vehicles/vehicles.mjs +18 -18
- package/resources/dealers/vehicles/vehicles.mjs.map +1 -1
- package/resources/dealers/vehicles.js +1 -1
- package/resources/dealers.js +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/keys.d.mts +7 -6
- package/resources/keys.d.mts.map +1 -1
- package/resources/keys.d.ts +7 -6
- package/resources/keys.d.ts.map +1 -1
- package/resources/keys.js +7 -6
- package/resources/keys.js.map +1 -1
- package/resources/keys.mjs +7 -6
- package/resources/keys.mjs.map +1 -1
- package/resources.js +1 -1
- package/src/api-promise.ts +2 -2
- package/src/client.ts +868 -841
- package/src/core/README.md +3 -3
- package/src/core/api-promise.ts +92 -92
- package/src/core/error.ts +130 -130
- package/src/core/pagination.ts +170 -0
- package/src/core/resource.ts +11 -11
- package/src/core/uploads.ts +2 -2
- package/src/error.ts +2 -2
- package/src/index.ts +23 -22
- package/src/internal/README.md +3 -3
- package/src/internal/builtin-types.ts +93 -93
- package/src/internal/detect-platform.ts +196 -196
- package/src/internal/errors.ts +33 -33
- package/src/internal/headers.ts +97 -97
- package/src/internal/parse.ts +56 -56
- package/src/internal/request-options.ts +91 -91
- package/src/internal/shim-types.ts +26 -26
- package/src/internal/shims.ts +107 -107
- package/src/internal/to-file.ts +154 -154
- package/src/internal/types.ts +93 -93
- package/src/internal/uploads.ts +187 -187
- package/src/internal/utils/base64.ts +40 -40
- package/src/internal/utils/bytes.ts +32 -32
- package/src/internal/utils/env.ts +18 -18
- package/src/internal/utils/log.ts +128 -128
- package/src/internal/utils/path.ts +88 -88
- package/src/internal/utils/query.ts +23 -23
- package/src/internal/utils/sleep.ts +3 -3
- package/src/internal/utils/uuid.ts +17 -17
- package/src/internal/utils/values.ts +105 -105
- package/src/internal/utils.ts +9 -9
- package/src/lib/.keep +4 -4
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -2
- package/src/resources/dealers/dealers.ts +260 -348
- package/src/resources/dealers/index.ts +28 -28
- package/src/resources/dealers/nlt/index.ts +11 -11
- package/src/resources/dealers/nlt/nlt.ts +29 -29
- package/src/resources/dealers/nlt/offers.ts +403 -427
- package/src/resources/dealers/nlt-settings.ts +229 -269
- package/src/resources/dealers/nlt.ts +3 -3
- package/src/resources/dealers/vehicles/images.ts +154 -153
- package/src/resources/dealers/vehicles/index.ts +26 -25
- package/src/resources/dealers/vehicles/vehicles.ts +786 -796
- package/src/resources/dealers/vehicles.ts +3 -3
- package/src/resources/dealers.ts +3 -3
- package/src/resources/index.ts +11 -12
- package/src/resources/keys.ts +129 -128
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +11 -11
- package/src/uploads.ts +2 -2
- package/src/version.ts +1 -1
- package/uploads.js +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,427 +1,403 @@
|
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Single row in the offers list. Pricing is dealer-aware.
|
|
47
|
-
*
|
|
48
|
-
* Field names: American English snake_case. Values
|
|
49
|
-
* (`fuel_type: "Benzina"`, `segment: "SUV piccoli"`). No enum
|
|
50
|
-
*
|
|
51
|
-
* partner client sees the same string in both listing and detail.
|
|
52
|
-
*/
|
|
53
|
-
export interface NltOfferSummary {
|
|
54
|
-
brand: string;
|
|
55
|
-
|
|
56
|
-
dealer_id: string;
|
|
57
|
-
|
|
58
|
-
duration_months: number;
|
|
59
|
-
|
|
60
|
-
km_per_year_at_quote: number;
|
|
61
|
-
|
|
62
|
-
model: string;
|
|
63
|
-
|
|
64
|
-
monthly_canon_from_eur: number;
|
|
65
|
-
|
|
66
|
-
offer_id: string;
|
|
67
|
-
|
|
68
|
-
slug: string;
|
|
69
|
-
|
|
70
|
-
vat_treatment: 'private' | 'business';
|
|
71
|
-
|
|
72
|
-
canonical_url?: string | null;
|
|
73
|
-
|
|
74
|
-
fuel_type?: string | null;
|
|
75
|
-
|
|
76
|
-
has_promo?: boolean;
|
|
77
|
-
|
|
78
|
-
image_url?: string | null;
|
|
79
|
-
|
|
80
|
-
segment?: string | null;
|
|
81
|
-
|
|
82
|
-
trim?: string | null;
|
|
83
|
-
|
|
84
|
-
vehicle_type?: 'auto' | 'vcom';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Full offer detail.
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
*
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
*
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
km_per_year?: number | null;
|
|
406
|
-
|
|
407
|
-
limit?: number;
|
|
408
|
-
|
|
409
|
-
segment?: string | null;
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Macro discriminator: 'auto' (passenger vehicles) or 'vcom' (light commercial ≤35
|
|
413
|
-
* q.li: vans, panel trucks, multispace, pickups, minibuses). Omit to return the
|
|
414
|
-
* mixed catalog.
|
|
415
|
-
*/
|
|
416
|
-
vehicle_type?: string | null;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
export declare namespace Offers {
|
|
420
|
-
export {
|
|
421
|
-
type NltOfferSummary as NltOfferSummary,
|
|
422
|
-
type OfferRetrieveResponse as OfferRetrieveResponse,
|
|
423
|
-
type OfferListResponse as OfferListResponse,
|
|
424
|
-
type OfferRetrieveParams as OfferRetrieveParams,
|
|
425
|
-
type OfferListParams as OfferListParams,
|
|
426
|
-
};
|
|
427
|
-
}
|
|
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 { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
import { path } from '../../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Offers extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Full offer detail. Payload shape mirrors apimax MCP `get_nlt_offer_details`
|
|
12
|
+
* bit-for-bit (mcp_server.py:1546-1606).
|
|
13
|
+
*/
|
|
14
|
+
retrieve(
|
|
15
|
+
offerID: string,
|
|
16
|
+
params: OfferRetrieveParams,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): APIPromise<OfferRetrieveResponse> {
|
|
19
|
+
const { dealer_id } = params;
|
|
20
|
+
return this._client.get(path`/v1/dealers/${dealer_id}/nlt/offers/${offerID}`, options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Listing of NLT offers with monthly canon repriced for this dealer.
|
|
25
|
+
*
|
|
26
|
+
* The response is cursor-paginated and dealer-aware: filters are applied to the
|
|
27
|
+
* shared NLT catalogue, then each returned offer is repriced with the dealer's
|
|
28
|
+
* configured mark-up, down-payment tiers, duration, and yearly-km filters. The
|
|
29
|
+
* headline canon is the cheapest eligible priced cell.
|
|
30
|
+
*/
|
|
31
|
+
list(
|
|
32
|
+
dealerID: string,
|
|
33
|
+
query: OfferListParams | null | undefined = {},
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): PagePromise<NltOfferSummariesCursorPage, NltOfferSummary> {
|
|
36
|
+
return this._client.getAPIList(path`/v1/dealers/${dealerID}/nlt/offers`, CursorPage<NltOfferSummary>, {
|
|
37
|
+
query,
|
|
38
|
+
...options,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type NltOfferSummariesCursorPage = CursorPage<NltOfferSummary>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Single row in the offers list. Pricing is dealer-aware.
|
|
47
|
+
*
|
|
48
|
+
* Field names: American English snake_case. Values use DealerMAX's Italian
|
|
49
|
+
* catalogue vocabulary (`fuel_type: "Benzina"`, `segment: "SUV piccoli"`). No enum
|
|
50
|
+
* normalization — labels are surfaced verbatim, exactly as the detail endpoint
|
|
51
|
+
* does, so the partner client sees the same string in both listing and detail.
|
|
52
|
+
*/
|
|
53
|
+
export interface NltOfferSummary {
|
|
54
|
+
brand: string;
|
|
55
|
+
|
|
56
|
+
dealer_id: string;
|
|
57
|
+
|
|
58
|
+
duration_months: number;
|
|
59
|
+
|
|
60
|
+
km_per_year_at_quote: number;
|
|
61
|
+
|
|
62
|
+
model: string;
|
|
63
|
+
|
|
64
|
+
monthly_canon_from_eur: number;
|
|
65
|
+
|
|
66
|
+
offer_id: string;
|
|
67
|
+
|
|
68
|
+
slug: string;
|
|
69
|
+
|
|
70
|
+
vat_treatment: 'private' | 'business';
|
|
71
|
+
|
|
72
|
+
canonical_url?: string | null;
|
|
73
|
+
|
|
74
|
+
fuel_type?: string | null;
|
|
75
|
+
|
|
76
|
+
has_promo?: boolean;
|
|
77
|
+
|
|
78
|
+
image_url?: string | null;
|
|
79
|
+
|
|
80
|
+
segment?: string | null;
|
|
81
|
+
|
|
82
|
+
trim?: string | null;
|
|
83
|
+
|
|
84
|
+
vehicle_type?: 'auto' | 'vcom';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Full offer detail.
|
|
89
|
+
*
|
|
90
|
+
* Field names use American-English snake_case for the partner SDK contract. Values
|
|
91
|
+
* stay Italian raw where the underlying automotive catalogue uses Italian labels.
|
|
92
|
+
* The dict `technical_details` keeps Italian domain keys.
|
|
93
|
+
*/
|
|
94
|
+
export interface OfferRetrieveResponse {
|
|
95
|
+
found: boolean;
|
|
96
|
+
|
|
97
|
+
network_dealer_count: number;
|
|
98
|
+
|
|
99
|
+
offer_id: string;
|
|
100
|
+
|
|
101
|
+
slug: string;
|
|
102
|
+
|
|
103
|
+
title: string;
|
|
104
|
+
|
|
105
|
+
vat_included: boolean;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Container for optional add-ons.
|
|
109
|
+
*/
|
|
110
|
+
available_addons?: OfferRetrieveResponse.AvailableAddons;
|
|
111
|
+
|
|
112
|
+
brand?: string | null;
|
|
113
|
+
|
|
114
|
+
description_full?: string | null;
|
|
115
|
+
|
|
116
|
+
description_short?: string | null;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Three down-payment scenarios in EUR (whole amounts).
|
|
120
|
+
*
|
|
121
|
+
* Keys use American-English snake_case for the partnermax SDK: `zero`, `medium`,
|
|
122
|
+
* `standard`.
|
|
123
|
+
*/
|
|
124
|
+
down_payment_scenarios_eur?: OfferRetrieveResponse.DownPaymentScenariosEur | null;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Italian labels paired 1:1 with `NltDownPaymentScenariosEur`.
|
|
128
|
+
*
|
|
129
|
+
* Values stay in Italian raw ("Senza anticipo" / "Anticipo 12,5%" / "Anticipo
|
|
130
|
+
* 25%") so partner UIs match DealerMAX consumer-facing copy.
|
|
131
|
+
*/
|
|
132
|
+
down_payment_scenarios_labels?: OfferRetrieveResponse.DownPaymentScenariosLabels | null;
|
|
133
|
+
|
|
134
|
+
faqs?: Array<OfferRetrieveResponse.Faq>;
|
|
135
|
+
|
|
136
|
+
fuel_type?: string | null;
|
|
137
|
+
|
|
138
|
+
gallery?: Array<OfferRetrieveResponse.Gallery>;
|
|
139
|
+
|
|
140
|
+
image_url?: string | null;
|
|
141
|
+
|
|
142
|
+
included_accessories?: Array<OfferRetrieveResponse.IncludedAccessory>;
|
|
143
|
+
|
|
144
|
+
included_services?: Array<OfferRetrieveResponse.IncludedService>;
|
|
145
|
+
|
|
146
|
+
last_modified?: string | null;
|
|
147
|
+
|
|
148
|
+
min_monthly_canon_eur?: number | null;
|
|
149
|
+
|
|
150
|
+
model?: string | null;
|
|
151
|
+
|
|
152
|
+
network_offers?: Array<OfferRetrieveResponse.NetworkOffer>;
|
|
153
|
+
|
|
154
|
+
primary_dealer_city?: string | null;
|
|
155
|
+
|
|
156
|
+
primary_dealer_name?: string | null;
|
|
157
|
+
|
|
158
|
+
primary_dealer_province?: string | null;
|
|
159
|
+
|
|
160
|
+
private_only?: boolean | null;
|
|
161
|
+
|
|
162
|
+
quotations?: Array<OfferRetrieveResponse.Quotation>;
|
|
163
|
+
|
|
164
|
+
schema_org?: { [key: string]: unknown } | null;
|
|
165
|
+
|
|
166
|
+
segment?: string | null;
|
|
167
|
+
|
|
168
|
+
standard_equipment?: Array<string>;
|
|
169
|
+
|
|
170
|
+
tags?: Array<OfferRetrieveResponse.Tag>;
|
|
171
|
+
|
|
172
|
+
technical_details?: { [key: string]: unknown };
|
|
173
|
+
|
|
174
|
+
total_price_eur?: number | null;
|
|
175
|
+
|
|
176
|
+
transmission?: string | null;
|
|
177
|
+
|
|
178
|
+
trim?: string | null;
|
|
179
|
+
|
|
180
|
+
vehicle_type?: 'auto' | 'vcom';
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export namespace OfferRetrieveResponse {
|
|
184
|
+
/**
|
|
185
|
+
* Container for optional add-ons.
|
|
186
|
+
*/
|
|
187
|
+
export interface AvailableAddons {
|
|
188
|
+
/**
|
|
189
|
+
* Replacement-vehicle add-on lookup.
|
|
190
|
+
*
|
|
191
|
+
* Always category B (utilitaria) per founder decision — the spoken "average
|
|
192
|
+
* customer" segment.
|
|
193
|
+
*/
|
|
194
|
+
replacement_vehicle?: AvailableAddons.ReplacementVehicle | null;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Tyre-replacement add-on lookup.
|
|
198
|
+
*
|
|
199
|
+
* Populated when the catalogue carries a parseable tyre diameter and a
|
|
200
|
+
* DealerMAX-managed tyre package exists for that diameter. Null otherwise.
|
|
201
|
+
* Replacement rule: 1 set of 4 tyres every 30 000 km, rounded up.
|
|
202
|
+
*/
|
|
203
|
+
tires?: AvailableAddons.Tires | null;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export namespace AvailableAddons {
|
|
207
|
+
/**
|
|
208
|
+
* Replacement-vehicle add-on lookup.
|
|
209
|
+
*
|
|
210
|
+
* Always category B (utilitaria) per founder decision — the spoken "average
|
|
211
|
+
* customer" segment.
|
|
212
|
+
*/
|
|
213
|
+
export interface ReplacementVehicle {
|
|
214
|
+
category_description: string;
|
|
215
|
+
|
|
216
|
+
default_category: string;
|
|
217
|
+
|
|
218
|
+
monthly_cost_eur: number;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Tyre-replacement add-on lookup.
|
|
223
|
+
*
|
|
224
|
+
* Populated when the catalogue carries a parseable tyre diameter and a
|
|
225
|
+
* DealerMAX-managed tyre package exists for that diameter. Null otherwise.
|
|
226
|
+
* Replacement rule: 1 set of 4 tyres every 30 000 km, rounded up.
|
|
227
|
+
*/
|
|
228
|
+
export interface Tires {
|
|
229
|
+
diameter_in: number;
|
|
230
|
+
|
|
231
|
+
replacement_rule: string;
|
|
232
|
+
|
|
233
|
+
set_cost_eur: number;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Three down-payment scenarios in EUR (whole amounts).
|
|
239
|
+
*
|
|
240
|
+
* Keys use American-English snake_case for the partnermax SDK: `zero`, `medium`,
|
|
241
|
+
* `standard`.
|
|
242
|
+
*/
|
|
243
|
+
export interface DownPaymentScenariosEur {
|
|
244
|
+
medium: number;
|
|
245
|
+
|
|
246
|
+
standard: number;
|
|
247
|
+
|
|
248
|
+
zero: number;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Italian labels paired 1:1 with `NltDownPaymentScenariosEur`.
|
|
253
|
+
*
|
|
254
|
+
* Values stay in Italian raw ("Senza anticipo" / "Anticipo 12,5%" / "Anticipo
|
|
255
|
+
* 25%") so partner UIs match DealerMAX consumer-facing copy.
|
|
256
|
+
*/
|
|
257
|
+
export interface DownPaymentScenariosLabels {
|
|
258
|
+
medium: string;
|
|
259
|
+
|
|
260
|
+
standard: string;
|
|
261
|
+
|
|
262
|
+
zero: string;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* One Italian Q&A entry derived per-offer.
|
|
267
|
+
*
|
|
268
|
+
* Generated from the same grounded offer payload used by DealerMAX consumer-facing
|
|
269
|
+
* surfaces: dimensions, fuel, transmission, CO2, monthly canon, available
|
|
270
|
+
* durations, VAT inclusion, down-payment tiers, etc.
|
|
271
|
+
*/
|
|
272
|
+
export interface Faq {
|
|
273
|
+
answer: string;
|
|
274
|
+
|
|
275
|
+
question: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* One image in the offer gallery.
|
|
280
|
+
*/
|
|
281
|
+
export interface Gallery {
|
|
282
|
+
is_cover: boolean;
|
|
283
|
+
|
|
284
|
+
url: string;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* One accessory bundled with the offer.
|
|
289
|
+
*/
|
|
290
|
+
export interface IncludedAccessory {
|
|
291
|
+
code: string;
|
|
292
|
+
|
|
293
|
+
description: string;
|
|
294
|
+
|
|
295
|
+
extra_price_eur: number;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* One NLT service normally included in the canone.
|
|
300
|
+
*
|
|
301
|
+
* Same set of services across the network (Assicurazione RCA / Kasco /
|
|
302
|
+
* Incendio-Furto, Manutenzione, Assistenza Stradale, Bollo, Pneumatici, Veicolo in
|
|
303
|
+
* anticipo, Vettura sostitutiva). Not per-offer.
|
|
304
|
+
*/
|
|
305
|
+
export interface IncludedService {
|
|
306
|
+
name: string;
|
|
307
|
+
|
|
308
|
+
description?: string | null;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* One network dealer's quote for this offer.
|
|
313
|
+
*
|
|
314
|
+
* Sorted by `min_monthly_canon_eur ASC`. In PartnerMAX this list is scoped to the
|
|
315
|
+
* calling partner's `partner_dealers` rows and returns the partner-owned
|
|
316
|
+
* `external_dealer_id`. Legacy `dlr_<id>` values remain only for compatibility
|
|
317
|
+
* callers.
|
|
318
|
+
*/
|
|
319
|
+
export interface NetworkOffer {
|
|
320
|
+
dealer_id: string;
|
|
321
|
+
|
|
322
|
+
dealer_name: string;
|
|
323
|
+
|
|
324
|
+
min_monthly_canon_eur: number;
|
|
325
|
+
|
|
326
|
+
city?: string | null;
|
|
327
|
+
|
|
328
|
+
contact_url?: string | null;
|
|
329
|
+
|
|
330
|
+
google_maps_url?: string | null;
|
|
331
|
+
|
|
332
|
+
phone?: string | null;
|
|
333
|
+
|
|
334
|
+
province?: string | null;
|
|
335
|
+
|
|
336
|
+
rating_value?: number | null;
|
|
337
|
+
|
|
338
|
+
review_count?: number | null;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* One priced cell of the 18-combination matrix.
|
|
343
|
+
*
|
|
344
|
+
* Reflects the dealer-aware pricing formula applied to each (duration, yearly-km)
|
|
345
|
+
* combination. Cells with implausible canons are filtered upstream, so the list
|
|
346
|
+
* may contain fewer than 18 rows.
|
|
347
|
+
*/
|
|
348
|
+
export interface Quotation {
|
|
349
|
+
duration_months: number;
|
|
350
|
+
|
|
351
|
+
km_per_year: number;
|
|
352
|
+
|
|
353
|
+
monthly_canon_eur: number;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Category tag for an offer.
|
|
358
|
+
*
|
|
359
|
+
* Examples in production: "Promo", "Stock pronto", "GreenChoice".
|
|
360
|
+
*/
|
|
361
|
+
export interface Tag {
|
|
362
|
+
name: string;
|
|
363
|
+
|
|
364
|
+
color?: string | null;
|
|
365
|
+
|
|
366
|
+
icon?: string | null;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface OfferRetrieveParams {
|
|
371
|
+
dealer_id: string;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export interface OfferListParams extends CursorPageParams {
|
|
375
|
+
brand?: string | null;
|
|
376
|
+
|
|
377
|
+
canone_max_eur?: number | null;
|
|
378
|
+
|
|
379
|
+
duration_months?: number | null;
|
|
380
|
+
|
|
381
|
+
fuel_type?: string | null;
|
|
382
|
+
|
|
383
|
+
km_per_year?: number | null;
|
|
384
|
+
|
|
385
|
+
segment?: string | null;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Macro discriminator: 'auto' (passenger vehicles) or 'vcom' (light commercial ≤35
|
|
389
|
+
* q.li: vans, panel trucks, multispace, pickups, minibuses). Omit to return the
|
|
390
|
+
* mixed catalog.
|
|
391
|
+
*/
|
|
392
|
+
vehicle_type?: string | null;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export declare namespace Offers {
|
|
396
|
+
export {
|
|
397
|
+
type NltOfferSummary as NltOfferSummary,
|
|
398
|
+
type OfferRetrieveResponse as OfferRetrieveResponse,
|
|
399
|
+
type NltOfferSummariesCursorPage as NltOfferSummariesCursorPage,
|
|
400
|
+
type OfferRetrieveParams as OfferRetrieveParams,
|
|
401
|
+
type OfferListParams as OfferListParams,
|
|
402
|
+
};
|
|
403
|
+
}
|