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,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
3
4
|
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
5
|
export declare class Offers extends APIResource {
|
|
5
6
|
/**
|
|
@@ -10,26 +11,21 @@ export declare class Offers extends APIResource {
|
|
|
10
11
|
/**
|
|
11
12
|
* Listing of NLT offers with monthly canon repriced for this dealer.
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* row lets us know if there's a next page without a second COUNT(\*) query.
|
|
18
|
-
* 3. Apply text/enum filters server-side via SQL where possible (brand, segment,
|
|
19
|
-
* fuel) and the numeric `canone_max_eur` filter in Python after the pricing
|
|
20
|
-
* pass (the DB has no "displayed canon" column; we synthesize it per dealer).
|
|
21
|
-
* 4. For each surviving offer, price the (duration, km) cells the caller filtered
|
|
22
|
-
* to (if specified) or all 18, pick the cheapest cell as the headline.
|
|
14
|
+
* The response is cursor-paginated and dealer-aware: filters are applied to the
|
|
15
|
+
* shared NLT catalogue, then each returned offer is repriced with the dealer's
|
|
16
|
+
* configured mark-up, down-payment tiers, duration, and yearly-km filters. The
|
|
17
|
+
* headline canon is the cheapest eligible priced cell.
|
|
23
18
|
*/
|
|
24
|
-
list(dealerID: string, query?: OfferListParams | null | undefined, options?: RequestOptions):
|
|
19
|
+
list(dealerID: string, query?: OfferListParams | null | undefined, options?: RequestOptions): PagePromise<NltOfferSummariesCursorPage, NltOfferSummary>;
|
|
25
20
|
}
|
|
21
|
+
export type NltOfferSummariesCursorPage = CursorPage<NltOfferSummary>;
|
|
26
22
|
/**
|
|
27
23
|
* Single row in the offers list. Pricing is dealer-aware.
|
|
28
24
|
*
|
|
29
|
-
* Field names: American English snake_case. Values
|
|
30
|
-
* (`fuel_type: "Benzina"`, `segment: "SUV piccoli"`). No enum
|
|
31
|
-
*
|
|
32
|
-
* partner client sees the same string in both listing and detail.
|
|
25
|
+
* Field names: American English snake_case. Values use DealerMAX's Italian
|
|
26
|
+
* catalogue vocabulary (`fuel_type: "Benzina"`, `segment: "SUV piccoli"`). No enum
|
|
27
|
+
* normalization — labels are surfaced verbatim, exactly as the detail endpoint
|
|
28
|
+
* does, so the partner client sees the same string in both listing and detail.
|
|
33
29
|
*/
|
|
34
30
|
export interface NltOfferSummary {
|
|
35
31
|
brand: string;
|
|
@@ -52,10 +48,9 @@ export interface NltOfferSummary {
|
|
|
52
48
|
/**
|
|
53
49
|
* Full offer detail.
|
|
54
50
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* KEYS because they are `mnet_dettagli` column names (raw DB).
|
|
51
|
+
* Field names use American-English snake_case for the partner SDK contract. Values
|
|
52
|
+
* stay Italian raw where the underlying automotive catalogue uses Italian labels.
|
|
53
|
+
* The dict `technical_details` keeps Italian domain keys.
|
|
59
54
|
*/
|
|
60
55
|
export interface OfferRetrieveResponse {
|
|
61
56
|
found: boolean;
|
|
@@ -65,7 +60,7 @@ export interface OfferRetrieveResponse {
|
|
|
65
60
|
title: string;
|
|
66
61
|
vat_included: boolean;
|
|
67
62
|
/**
|
|
68
|
-
* Container for optional add-ons
|
|
63
|
+
* Container for optional add-ons.
|
|
69
64
|
*/
|
|
70
65
|
available_addons?: OfferRetrieveResponse.AvailableAddons;
|
|
71
66
|
brand?: string | null;
|
|
@@ -74,16 +69,15 @@ export interface OfferRetrieveResponse {
|
|
|
74
69
|
/**
|
|
75
70
|
* Three down-payment scenarios in EUR (whole amounts).
|
|
76
71
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
72
|
+
* Keys use American-English snake_case for the partnermax SDK: `zero`, `medium`,
|
|
73
|
+
* `standard`.
|
|
79
74
|
*/
|
|
80
75
|
down_payment_scenarios_eur?: OfferRetrieveResponse.DownPaymentScenariosEur | null;
|
|
81
76
|
/**
|
|
82
77
|
* Italian labels paired 1:1 with `NltDownPaymentScenariosEur`.
|
|
83
78
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* "Anticipo 12,5%" / "Anticipo 25%").
|
|
79
|
+
* Values stay in Italian raw ("Senza anticipo" / "Anticipo 12,5%" / "Anticipo
|
|
80
|
+
* 25%") so partner UIs match DealerMAX consumer-facing copy.
|
|
87
81
|
*/
|
|
88
82
|
down_payment_scenarios_labels?: OfferRetrieveResponse.DownPaymentScenariosLabels | null;
|
|
89
83
|
faqs?: Array<OfferRetrieveResponse.Faq>;
|
|
@@ -117,30 +111,28 @@ export interface OfferRetrieveResponse {
|
|
|
117
111
|
}
|
|
118
112
|
export declare namespace OfferRetrieveResponse {
|
|
119
113
|
/**
|
|
120
|
-
* Container for optional add-ons
|
|
114
|
+
* Container for optional add-ons.
|
|
121
115
|
*/
|
|
122
116
|
interface AvailableAddons {
|
|
123
117
|
/**
|
|
124
|
-
* Replacement-vehicle add-on lookup
|
|
125
|
-
* `addons_disponibili.auto_sostitutiva`).
|
|
118
|
+
* Replacement-vehicle add-on lookup.
|
|
126
119
|
*
|
|
127
120
|
* Always category B (utilitaria) per founder decision — the spoken "average
|
|
128
121
|
* customer" segment.
|
|
129
122
|
*/
|
|
130
123
|
replacement_vehicle?: AvailableAddons.ReplacementVehicle | null;
|
|
131
124
|
/**
|
|
132
|
-
* Tyre-replacement add-on lookup
|
|
125
|
+
* Tyre-replacement add-on lookup.
|
|
133
126
|
*
|
|
134
|
-
* Populated when
|
|
135
|
-
*
|
|
136
|
-
*
|
|
127
|
+
* Populated when the catalogue carries a parseable tyre diameter and a
|
|
128
|
+
* DealerMAX-managed tyre package exists for that diameter. Null otherwise.
|
|
129
|
+
* Replacement rule: 1 set of 4 tyres every 30 000 km, rounded up.
|
|
137
130
|
*/
|
|
138
131
|
tires?: AvailableAddons.Tires | null;
|
|
139
132
|
}
|
|
140
133
|
namespace AvailableAddons {
|
|
141
134
|
/**
|
|
142
|
-
* Replacement-vehicle add-on lookup
|
|
143
|
-
* `addons_disponibili.auto_sostitutiva`).
|
|
135
|
+
* Replacement-vehicle add-on lookup.
|
|
144
136
|
*
|
|
145
137
|
* Always category B (utilitaria) per founder decision — the spoken "average
|
|
146
138
|
* customer" segment.
|
|
@@ -151,11 +143,11 @@ export declare namespace OfferRetrieveResponse {
|
|
|
151
143
|
monthly_cost_eur: number;
|
|
152
144
|
}
|
|
153
145
|
/**
|
|
154
|
-
* Tyre-replacement add-on lookup
|
|
146
|
+
* Tyre-replacement add-on lookup.
|
|
155
147
|
*
|
|
156
|
-
* Populated when
|
|
157
|
-
*
|
|
158
|
-
*
|
|
148
|
+
* Populated when the catalogue carries a parseable tyre diameter and a
|
|
149
|
+
* DealerMAX-managed tyre package exists for that diameter. Null otherwise.
|
|
150
|
+
* Replacement rule: 1 set of 4 tyres every 30 000 km, rounded up.
|
|
159
151
|
*/
|
|
160
152
|
interface Tires {
|
|
161
153
|
diameter_in: number;
|
|
@@ -166,8 +158,8 @@ export declare namespace OfferRetrieveResponse {
|
|
|
166
158
|
/**
|
|
167
159
|
* Three down-payment scenarios in EUR (whole amounts).
|
|
168
160
|
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
161
|
+
* Keys use American-English snake_case for the partnermax SDK: `zero`, `medium`,
|
|
162
|
+
* `standard`.
|
|
171
163
|
*/
|
|
172
164
|
interface DownPaymentScenariosEur {
|
|
173
165
|
medium: number;
|
|
@@ -177,9 +169,8 @@ export declare namespace OfferRetrieveResponse {
|
|
|
177
169
|
/**
|
|
178
170
|
* Italian labels paired 1:1 with `NltDownPaymentScenariosEur`.
|
|
179
171
|
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* "Anticipo 12,5%" / "Anticipo 25%").
|
|
172
|
+
* Values stay in Italian raw ("Senza anticipo" / "Anticipo 12,5%" / "Anticipo
|
|
173
|
+
* 25%") so partner UIs match DealerMAX consumer-facing copy.
|
|
183
174
|
*/
|
|
184
175
|
interface DownPaymentScenariosLabels {
|
|
185
176
|
medium: string;
|
|
@@ -189,24 +180,23 @@ export declare namespace OfferRetrieveResponse {
|
|
|
189
180
|
/**
|
|
190
181
|
* One Italian Q&A entry derived per-offer.
|
|
191
182
|
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* surfaces them all, 1:1.
|
|
183
|
+
* Generated from the same grounded offer payload used by DealerMAX consumer-facing
|
|
184
|
+
* surfaces: dimensions, fuel, transmission, CO2, monthly canon, available
|
|
185
|
+
* durations, VAT inclusion, down-payment tiers, etc.
|
|
196
186
|
*/
|
|
197
187
|
interface Faq {
|
|
198
188
|
answer: string;
|
|
199
189
|
question: string;
|
|
200
190
|
}
|
|
201
191
|
/**
|
|
202
|
-
* One image in the offer gallery
|
|
192
|
+
* One image in the offer gallery.
|
|
203
193
|
*/
|
|
204
194
|
interface Gallery {
|
|
205
195
|
is_cover: boolean;
|
|
206
196
|
url: string;
|
|
207
197
|
}
|
|
208
198
|
/**
|
|
209
|
-
* One accessory bundled with the offer
|
|
199
|
+
* One accessory bundled with the offer.
|
|
210
200
|
*/
|
|
211
201
|
interface IncludedAccessory {
|
|
212
202
|
code: string;
|
|
@@ -216,25 +206,24 @@ export declare namespace OfferRetrieveResponse {
|
|
|
216
206
|
/**
|
|
217
207
|
* One NLT service normally included in the canone.
|
|
218
208
|
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
* Bollo, Pneumatici, Veicolo in anticipo, Vettura sostitutiva). Not per-offer.
|
|
209
|
+
* Same set of services across the network (Assicurazione RCA / Kasco /
|
|
210
|
+
* Incendio-Furto, Manutenzione, Assistenza Stradale, Bollo, Pneumatici, Veicolo in
|
|
211
|
+
* anticipo, Vettura sostitutiva). Not per-offer.
|
|
223
212
|
*/
|
|
224
213
|
interface IncludedService {
|
|
225
214
|
name: string;
|
|
226
215
|
description?: string | null;
|
|
227
216
|
}
|
|
228
217
|
/**
|
|
229
|
-
* One network dealer's quote for this offer
|
|
218
|
+
* One network dealer's quote for this offer.
|
|
230
219
|
*
|
|
231
|
-
* Sorted by `min_monthly_canon_eur ASC`. In
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
220
|
+
* Sorted by `min_monthly_canon_eur ASC`. In PartnerMAX this list is scoped to the
|
|
221
|
+
* calling partner's `partner_dealers` rows and returns the partner-owned
|
|
222
|
+
* `external_dealer_id`. Legacy `dlr_<id>` values remain only for compatibility
|
|
223
|
+
* callers.
|
|
235
224
|
*/
|
|
236
225
|
interface NetworkOffer {
|
|
237
|
-
dealer_id:
|
|
226
|
+
dealer_id: string;
|
|
238
227
|
dealer_name: string;
|
|
239
228
|
min_monthly_canon_eur: number;
|
|
240
229
|
city?: string | null;
|
|
@@ -248,10 +237,9 @@ export declare namespace OfferRetrieveResponse {
|
|
|
248
237
|
/**
|
|
249
238
|
* One priced cell of the 18-combination matrix.
|
|
250
239
|
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* the list may contain fewer than 18 rows.
|
|
240
|
+
* Reflects the dealer-aware pricing formula applied to each (duration, yearly-km)
|
|
241
|
+
* combination. Cells with implausible canons are filtered upstream, so the list
|
|
242
|
+
* may contain fewer than 18 rows.
|
|
255
243
|
*/
|
|
256
244
|
interface Quotation {
|
|
257
245
|
duration_months: number;
|
|
@@ -259,10 +247,9 @@ export declare namespace OfferRetrieveResponse {
|
|
|
259
247
|
monthly_canon_eur: number;
|
|
260
248
|
}
|
|
261
249
|
/**
|
|
262
|
-
* Category tag for an offer
|
|
250
|
+
* Category tag for an offer.
|
|
263
251
|
*
|
|
264
|
-
*
|
|
265
|
-
* "Promo", "Stock pronto", "GreenChoice".
|
|
252
|
+
* Examples in production: "Promo", "Stock pronto", "GreenChoice".
|
|
266
253
|
*/
|
|
267
254
|
interface Tag {
|
|
268
255
|
name: string;
|
|
@@ -270,25 +257,15 @@ export declare namespace OfferRetrieveResponse {
|
|
|
270
257
|
icon?: string | null;
|
|
271
258
|
}
|
|
272
259
|
}
|
|
273
|
-
/**
|
|
274
|
-
* Cursor-paginated list of offer summaries.
|
|
275
|
-
*/
|
|
276
|
-
export interface OfferListResponse {
|
|
277
|
-
data: Array<NltOfferSummary>;
|
|
278
|
-
has_more: boolean;
|
|
279
|
-
next_cursor?: string | null;
|
|
280
|
-
}
|
|
281
260
|
export interface OfferRetrieveParams {
|
|
282
261
|
dealer_id: string;
|
|
283
262
|
}
|
|
284
|
-
export interface OfferListParams {
|
|
263
|
+
export interface OfferListParams extends CursorPageParams {
|
|
285
264
|
brand?: string | null;
|
|
286
265
|
canone_max_eur?: number | null;
|
|
287
|
-
cursor?: string | null;
|
|
288
266
|
duration_months?: number | null;
|
|
289
267
|
fuel_type?: string | null;
|
|
290
268
|
km_per_year?: number | null;
|
|
291
|
-
limit?: number;
|
|
292
269
|
segment?: string | null;
|
|
293
270
|
/**
|
|
294
271
|
* Macro discriminator: 'auto' (passenger vehicles) or 'vcom' (light commercial ≤35
|
|
@@ -298,6 +275,6 @@ export interface OfferListParams {
|
|
|
298
275
|
vehicle_type?: string | null;
|
|
299
276
|
}
|
|
300
277
|
export declare namespace Offers {
|
|
301
|
-
export { type NltOfferSummary as NltOfferSummary, type OfferRetrieveResponse as OfferRetrieveResponse, type
|
|
278
|
+
export { type NltOfferSummary as NltOfferSummary, type OfferRetrieveResponse as OfferRetrieveResponse, type NltOfferSummariesCursorPage as NltOfferSummariesCursorPage, type OfferRetrieveParams as OfferRetrieveParams, type OfferListParams as OfferListParams, };
|
|
302
279
|
}
|
|
303
280
|
//# sourceMappingURL=offers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offers.d.mts","sourceRoot":"","sources":["../../../src/resources/dealers/nlt/offers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAKpC
|
|
1
|
+
{"version":3,"file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,5 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.js";
|
|
3
4
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
5
|
export declare class Offers extends APIResource {
|
|
5
6
|
/**
|
|
@@ -10,26 +11,21 @@ export declare class Offers extends APIResource {
|
|
|
10
11
|
/**
|
|
11
12
|
* Listing of NLT offers with monthly canon repriced for this dealer.
|
|
12
13
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* row lets us know if there's a next page without a second COUNT(\*) query.
|
|
18
|
-
* 3. Apply text/enum filters server-side via SQL where possible (brand, segment,
|
|
19
|
-
* fuel) and the numeric `canone_max_eur` filter in Python after the pricing
|
|
20
|
-
* pass (the DB has no "displayed canon" column; we synthesize it per dealer).
|
|
21
|
-
* 4. For each surviving offer, price the (duration, km) cells the caller filtered
|
|
22
|
-
* to (if specified) or all 18, pick the cheapest cell as the headline.
|
|
14
|
+
* The response is cursor-paginated and dealer-aware: filters are applied to the
|
|
15
|
+
* shared NLT catalogue, then each returned offer is repriced with the dealer's
|
|
16
|
+
* configured mark-up, down-payment tiers, duration, and yearly-km filters. The
|
|
17
|
+
* headline canon is the cheapest eligible priced cell.
|
|
23
18
|
*/
|
|
24
|
-
list(dealerID: string, query?: OfferListParams | null | undefined, options?: RequestOptions):
|
|
19
|
+
list(dealerID: string, query?: OfferListParams | null | undefined, options?: RequestOptions): PagePromise<NltOfferSummariesCursorPage, NltOfferSummary>;
|
|
25
20
|
}
|
|
21
|
+
export type NltOfferSummariesCursorPage = CursorPage<NltOfferSummary>;
|
|
26
22
|
/**
|
|
27
23
|
* Single row in the offers list. Pricing is dealer-aware.
|
|
28
24
|
*
|
|
29
|
-
* Field names: American English snake_case. Values
|
|
30
|
-
* (`fuel_type: "Benzina"`, `segment: "SUV piccoli"`). No enum
|
|
31
|
-
*
|
|
32
|
-
* partner client sees the same string in both listing and detail.
|
|
25
|
+
* Field names: American English snake_case. Values use DealerMAX's Italian
|
|
26
|
+
* catalogue vocabulary (`fuel_type: "Benzina"`, `segment: "SUV piccoli"`). No enum
|
|
27
|
+
* normalization — labels are surfaced verbatim, exactly as the detail endpoint
|
|
28
|
+
* does, so the partner client sees the same string in both listing and detail.
|
|
33
29
|
*/
|
|
34
30
|
export interface NltOfferSummary {
|
|
35
31
|
brand: string;
|
|
@@ -52,10 +48,9 @@ export interface NltOfferSummary {
|
|
|
52
48
|
/**
|
|
53
49
|
* Full offer detail.
|
|
54
50
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* KEYS because they are `mnet_dettagli` column names (raw DB).
|
|
51
|
+
* Field names use American-English snake_case for the partner SDK contract. Values
|
|
52
|
+
* stay Italian raw where the underlying automotive catalogue uses Italian labels.
|
|
53
|
+
* The dict `technical_details` keeps Italian domain keys.
|
|
59
54
|
*/
|
|
60
55
|
export interface OfferRetrieveResponse {
|
|
61
56
|
found: boolean;
|
|
@@ -65,7 +60,7 @@ export interface OfferRetrieveResponse {
|
|
|
65
60
|
title: string;
|
|
66
61
|
vat_included: boolean;
|
|
67
62
|
/**
|
|
68
|
-
* Container for optional add-ons
|
|
63
|
+
* Container for optional add-ons.
|
|
69
64
|
*/
|
|
70
65
|
available_addons?: OfferRetrieveResponse.AvailableAddons;
|
|
71
66
|
brand?: string | null;
|
|
@@ -74,16 +69,15 @@ export interface OfferRetrieveResponse {
|
|
|
74
69
|
/**
|
|
75
70
|
* Three down-payment scenarios in EUR (whole amounts).
|
|
76
71
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
72
|
+
* Keys use American-English snake_case for the partnermax SDK: `zero`, `medium`,
|
|
73
|
+
* `standard`.
|
|
79
74
|
*/
|
|
80
75
|
down_payment_scenarios_eur?: OfferRetrieveResponse.DownPaymentScenariosEur | null;
|
|
81
76
|
/**
|
|
82
77
|
* Italian labels paired 1:1 with `NltDownPaymentScenariosEur`.
|
|
83
78
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* "Anticipo 12,5%" / "Anticipo 25%").
|
|
79
|
+
* Values stay in Italian raw ("Senza anticipo" / "Anticipo 12,5%" / "Anticipo
|
|
80
|
+
* 25%") so partner UIs match DealerMAX consumer-facing copy.
|
|
87
81
|
*/
|
|
88
82
|
down_payment_scenarios_labels?: OfferRetrieveResponse.DownPaymentScenariosLabels | null;
|
|
89
83
|
faqs?: Array<OfferRetrieveResponse.Faq>;
|
|
@@ -117,30 +111,28 @@ export interface OfferRetrieveResponse {
|
|
|
117
111
|
}
|
|
118
112
|
export declare namespace OfferRetrieveResponse {
|
|
119
113
|
/**
|
|
120
|
-
* Container for optional add-ons
|
|
114
|
+
* Container for optional add-ons.
|
|
121
115
|
*/
|
|
122
116
|
interface AvailableAddons {
|
|
123
117
|
/**
|
|
124
|
-
* Replacement-vehicle add-on lookup
|
|
125
|
-
* `addons_disponibili.auto_sostitutiva`).
|
|
118
|
+
* Replacement-vehicle add-on lookup.
|
|
126
119
|
*
|
|
127
120
|
* Always category B (utilitaria) per founder decision — the spoken "average
|
|
128
121
|
* customer" segment.
|
|
129
122
|
*/
|
|
130
123
|
replacement_vehicle?: AvailableAddons.ReplacementVehicle | null;
|
|
131
124
|
/**
|
|
132
|
-
* Tyre-replacement add-on lookup
|
|
125
|
+
* Tyre-replacement add-on lookup.
|
|
133
126
|
*
|
|
134
|
-
* Populated when
|
|
135
|
-
*
|
|
136
|
-
*
|
|
127
|
+
* Populated when the catalogue carries a parseable tyre diameter and a
|
|
128
|
+
* DealerMAX-managed tyre package exists for that diameter. Null otherwise.
|
|
129
|
+
* Replacement rule: 1 set of 4 tyres every 30 000 km, rounded up.
|
|
137
130
|
*/
|
|
138
131
|
tires?: AvailableAddons.Tires | null;
|
|
139
132
|
}
|
|
140
133
|
namespace AvailableAddons {
|
|
141
134
|
/**
|
|
142
|
-
* Replacement-vehicle add-on lookup
|
|
143
|
-
* `addons_disponibili.auto_sostitutiva`).
|
|
135
|
+
* Replacement-vehicle add-on lookup.
|
|
144
136
|
*
|
|
145
137
|
* Always category B (utilitaria) per founder decision — the spoken "average
|
|
146
138
|
* customer" segment.
|
|
@@ -151,11 +143,11 @@ export declare namespace OfferRetrieveResponse {
|
|
|
151
143
|
monthly_cost_eur: number;
|
|
152
144
|
}
|
|
153
145
|
/**
|
|
154
|
-
* Tyre-replacement add-on lookup
|
|
146
|
+
* Tyre-replacement add-on lookup.
|
|
155
147
|
*
|
|
156
|
-
* Populated when
|
|
157
|
-
*
|
|
158
|
-
*
|
|
148
|
+
* Populated when the catalogue carries a parseable tyre diameter and a
|
|
149
|
+
* DealerMAX-managed tyre package exists for that diameter. Null otherwise.
|
|
150
|
+
* Replacement rule: 1 set of 4 tyres every 30 000 km, rounded up.
|
|
159
151
|
*/
|
|
160
152
|
interface Tires {
|
|
161
153
|
diameter_in: number;
|
|
@@ -166,8 +158,8 @@ export declare namespace OfferRetrieveResponse {
|
|
|
166
158
|
/**
|
|
167
159
|
* Three down-payment scenarios in EUR (whole amounts).
|
|
168
160
|
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
161
|
+
* Keys use American-English snake_case for the partnermax SDK: `zero`, `medium`,
|
|
162
|
+
* `standard`.
|
|
171
163
|
*/
|
|
172
164
|
interface DownPaymentScenariosEur {
|
|
173
165
|
medium: number;
|
|
@@ -177,9 +169,8 @@ export declare namespace OfferRetrieveResponse {
|
|
|
177
169
|
/**
|
|
178
170
|
* Italian labels paired 1:1 with `NltDownPaymentScenariosEur`.
|
|
179
171
|
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* "Anticipo 12,5%" / "Anticipo 25%").
|
|
172
|
+
* Values stay in Italian raw ("Senza anticipo" / "Anticipo 12,5%" / "Anticipo
|
|
173
|
+
* 25%") so partner UIs match DealerMAX consumer-facing copy.
|
|
183
174
|
*/
|
|
184
175
|
interface DownPaymentScenariosLabels {
|
|
185
176
|
medium: string;
|
|
@@ -189,24 +180,23 @@ export declare namespace OfferRetrieveResponse {
|
|
|
189
180
|
/**
|
|
190
181
|
* One Italian Q&A entry derived per-offer.
|
|
191
182
|
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* surfaces them all, 1:1.
|
|
183
|
+
* Generated from the same grounded offer payload used by DealerMAX consumer-facing
|
|
184
|
+
* surfaces: dimensions, fuel, transmission, CO2, monthly canon, available
|
|
185
|
+
* durations, VAT inclusion, down-payment tiers, etc.
|
|
196
186
|
*/
|
|
197
187
|
interface Faq {
|
|
198
188
|
answer: string;
|
|
199
189
|
question: string;
|
|
200
190
|
}
|
|
201
191
|
/**
|
|
202
|
-
* One image in the offer gallery
|
|
192
|
+
* One image in the offer gallery.
|
|
203
193
|
*/
|
|
204
194
|
interface Gallery {
|
|
205
195
|
is_cover: boolean;
|
|
206
196
|
url: string;
|
|
207
197
|
}
|
|
208
198
|
/**
|
|
209
|
-
* One accessory bundled with the offer
|
|
199
|
+
* One accessory bundled with the offer.
|
|
210
200
|
*/
|
|
211
201
|
interface IncludedAccessory {
|
|
212
202
|
code: string;
|
|
@@ -216,25 +206,24 @@ export declare namespace OfferRetrieveResponse {
|
|
|
216
206
|
/**
|
|
217
207
|
* One NLT service normally included in the canone.
|
|
218
208
|
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
* Bollo, Pneumatici, Veicolo in anticipo, Vettura sostitutiva). Not per-offer.
|
|
209
|
+
* Same set of services across the network (Assicurazione RCA / Kasco /
|
|
210
|
+
* Incendio-Furto, Manutenzione, Assistenza Stradale, Bollo, Pneumatici, Veicolo in
|
|
211
|
+
* anticipo, Vettura sostitutiva). Not per-offer.
|
|
223
212
|
*/
|
|
224
213
|
interface IncludedService {
|
|
225
214
|
name: string;
|
|
226
215
|
description?: string | null;
|
|
227
216
|
}
|
|
228
217
|
/**
|
|
229
|
-
* One network dealer's quote for this offer
|
|
218
|
+
* One network dealer's quote for this offer.
|
|
230
219
|
*
|
|
231
|
-
* Sorted by `min_monthly_canon_eur ASC`. In
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
220
|
+
* Sorted by `min_monthly_canon_eur ASC`. In PartnerMAX this list is scoped to the
|
|
221
|
+
* calling partner's `partner_dealers` rows and returns the partner-owned
|
|
222
|
+
* `external_dealer_id`. Legacy `dlr_<id>` values remain only for compatibility
|
|
223
|
+
* callers.
|
|
235
224
|
*/
|
|
236
225
|
interface NetworkOffer {
|
|
237
|
-
dealer_id:
|
|
226
|
+
dealer_id: string;
|
|
238
227
|
dealer_name: string;
|
|
239
228
|
min_monthly_canon_eur: number;
|
|
240
229
|
city?: string | null;
|
|
@@ -248,10 +237,9 @@ export declare namespace OfferRetrieveResponse {
|
|
|
248
237
|
/**
|
|
249
238
|
* One priced cell of the 18-combination matrix.
|
|
250
239
|
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* the list may contain fewer than 18 rows.
|
|
240
|
+
* Reflects the dealer-aware pricing formula applied to each (duration, yearly-km)
|
|
241
|
+
* combination. Cells with implausible canons are filtered upstream, so the list
|
|
242
|
+
* may contain fewer than 18 rows.
|
|
255
243
|
*/
|
|
256
244
|
interface Quotation {
|
|
257
245
|
duration_months: number;
|
|
@@ -259,10 +247,9 @@ export declare namespace OfferRetrieveResponse {
|
|
|
259
247
|
monthly_canon_eur: number;
|
|
260
248
|
}
|
|
261
249
|
/**
|
|
262
|
-
* Category tag for an offer
|
|
250
|
+
* Category tag for an offer.
|
|
263
251
|
*
|
|
264
|
-
*
|
|
265
|
-
* "Promo", "Stock pronto", "GreenChoice".
|
|
252
|
+
* Examples in production: "Promo", "Stock pronto", "GreenChoice".
|
|
266
253
|
*/
|
|
267
254
|
interface Tag {
|
|
268
255
|
name: string;
|
|
@@ -270,25 +257,15 @@ export declare namespace OfferRetrieveResponse {
|
|
|
270
257
|
icon?: string | null;
|
|
271
258
|
}
|
|
272
259
|
}
|
|
273
|
-
/**
|
|
274
|
-
* Cursor-paginated list of offer summaries.
|
|
275
|
-
*/
|
|
276
|
-
export interface OfferListResponse {
|
|
277
|
-
data: Array<NltOfferSummary>;
|
|
278
|
-
has_more: boolean;
|
|
279
|
-
next_cursor?: string | null;
|
|
280
|
-
}
|
|
281
260
|
export interface OfferRetrieveParams {
|
|
282
261
|
dealer_id: string;
|
|
283
262
|
}
|
|
284
|
-
export interface OfferListParams {
|
|
263
|
+
export interface OfferListParams extends CursorPageParams {
|
|
285
264
|
brand?: string | null;
|
|
286
265
|
canone_max_eur?: number | null;
|
|
287
|
-
cursor?: string | null;
|
|
288
266
|
duration_months?: number | null;
|
|
289
267
|
fuel_type?: string | null;
|
|
290
268
|
km_per_year?: number | null;
|
|
291
|
-
limit?: number;
|
|
292
269
|
segment?: string | null;
|
|
293
270
|
/**
|
|
294
271
|
* Macro discriminator: 'auto' (passenger vehicles) or 'vcom' (light commercial ≤35
|
|
@@ -298,6 +275,6 @@ export interface OfferListParams {
|
|
|
298
275
|
vehicle_type?: string | null;
|
|
299
276
|
}
|
|
300
277
|
export declare namespace Offers {
|
|
301
|
-
export { type NltOfferSummary as NltOfferSummary, type OfferRetrieveResponse as OfferRetrieveResponse, type
|
|
278
|
+
export { type NltOfferSummary as NltOfferSummary, type OfferRetrieveResponse as OfferRetrieveResponse, type NltOfferSummariesCursorPage as NltOfferSummariesCursorPage, type OfferRetrieveParams as OfferRetrieveParams, type OfferListParams as OfferListParams, };
|
|
302
279
|
}
|
|
303
280
|
//# sourceMappingURL=offers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["../../../src/resources/dealers/nlt/offers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD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