partnermax 0.2.1 → 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 +15 -0
- package/README.md +41 -17
- 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 +11 -1
- package/client.js.map +1 -1
- package/client.mjs +11 -1
- package/client.mjs.map +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/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 +11 -1
- 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/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 +2 -15
- 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/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/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 +18 -18
- 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/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/src/client.ts +32 -5
- package/src/core/pagination.ts +170 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/dealers/dealers.ts +9 -97
- package/src/resources/dealers/index.ts +2 -2
- package/src/resources/dealers/nlt/index.ts +1 -1
- package/src/resources/dealers/nlt/nlt.ts +2 -2
- package/src/resources/dealers/nlt/offers.ts +60 -84
- package/src/resources/dealers/nlt-settings.ts +24 -64
- package/src/resources/dealers/vehicles/images.ts +3 -2
- package/src/resources/dealers/vehicles/index.ts +1 -0
- package/src/resources/dealers/vehicles/vehicles.ts +62 -72
- package/src/resources/index.ts +1 -2
- package/src/resources/keys.ts +7 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -2,6 +2,7 @@ import { APIResource } from "../../../core/resource.js";
|
|
|
2
2
|
import * as ImagesAPI from "./images.js";
|
|
3
3
|
import { ImageCreateParams, ImageDeleteParams, ImageListParams, Images, VehicleImage, VehicleImageList } from "./images.js";
|
|
4
4
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.js";
|
|
5
6
|
import { RequestOptions } from "../../../internal/request-options.js";
|
|
6
7
|
/**
|
|
7
8
|
* Used-vehicle stock management for partner-owned dealers. The partner uploads each used vehicle by its canonical Motornet UNI code; DealerMAX joins the partner-provided pricing and stock metadata with the catalog master so the resulting listing is immediately indexed by the AI surfaces (MCP server, ChatGPT Custom GPT, NLWeb /ask, and the SEO/JSON-LD layer).
|
|
@@ -11,11 +12,10 @@ export declare class Vehicles extends APIResource {
|
|
|
11
12
|
/**
|
|
12
13
|
* Provision a new used vehicle in a dealer's stock.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* embedding — at which point the vehicle becomes discoverable on the cross-network
|
|
15
|
+
* The write is atomic: a plate conflict or catalogue-code error leaves no partial
|
|
16
|
+
* stock record behind. On success the asynchronous AI-content worker picks up the
|
|
17
|
+
* new vehicle within 60 seconds and generates the SEO body plus semantic
|
|
18
|
+
* embedding; at that point the vehicle becomes discoverable on the cross-network
|
|
19
19
|
* MCP / Custom GPT / NLWeb surfaces. The response returns immediately (no
|
|
20
20
|
* synchronous wait on the worker).
|
|
21
21
|
*/
|
|
@@ -27,9 +27,9 @@ export declare class Vehicles extends APIResource {
|
|
|
27
27
|
/**
|
|
28
28
|
* Partial update of a vehicle.
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* Applies the transmitted fields inside a single transaction. Fields not present
|
|
31
|
+
* in the body are not touched; explicit `null` clears only fields that are
|
|
32
|
+
* nullable in the public contract.
|
|
33
33
|
*/
|
|
34
34
|
update(vehicleID: string, params: VehicleUpdateParams, options?: RequestOptions): APIPromise<VehicleDetail>;
|
|
35
35
|
/**
|
|
@@ -40,22 +40,19 @@ export declare class Vehicles extends APIResource {
|
|
|
40
40
|
* Soft-deleted rows are excluded unless `include_deleted=true` is set explicitly —
|
|
41
41
|
* this preserves the soft-delete semantic across the API contract.
|
|
42
42
|
*/
|
|
43
|
-
list(dealerID: string, query?: VehicleListParams | null | undefined, options?: RequestOptions):
|
|
43
|
+
list(dealerID: string, query?: VehicleListParams | null | undefined, options?: RequestOptions): PagePromise<VehicleSummariesCursorPage, VehicleSummary>;
|
|
44
44
|
/**
|
|
45
45
|
* Withdraw a vehicle from sale without deleting the row.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* active-uniqueness check excludes rows where `visibile = FALSE` OR
|
|
50
|
-
* `venduto_il IS NOT NULL`).
|
|
47
|
+
* Marks the vehicle as no longer for sale. The plate becomes reusable on the
|
|
48
|
+
* network the moment this returns.
|
|
51
49
|
*
|
|
52
50
|
* Soft-delete is the canonical "remove this vehicle from sale" surface. The
|
|
53
51
|
* AI-citation consumers (MCP `_tool_search_vehicles`, Custom GPT
|
|
54
|
-
* `search_vehicles_network`, NLWeb `/ask`) each filter their own
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* surface within the next index cycle.
|
|
52
|
+
* `search_vehicles_network`, NLWeb `/ask`) each filter their own
|
|
53
|
+
* public-availability state. The result on the partner side is the same: a
|
|
54
|
+
* soft-deleted vehicle disappears from every AI surface within the next index
|
|
55
|
+
* cycle.
|
|
59
56
|
*
|
|
60
57
|
* Returns `409 vehicle_already_deleted` if the row is already soft- deleted — same
|
|
61
58
|
* idempotency pattern as the dealers DELETE endpoint.
|
|
@@ -87,6 +84,7 @@ export declare class Vehicles extends APIResource {
|
|
|
87
84
|
*/
|
|
88
85
|
bulk(dealerID: string, params: VehicleBulkParams, options?: RequestOptions): APIPromise<BulkCreateVehiclesResponse>;
|
|
89
86
|
}
|
|
87
|
+
export type VehicleSummariesCursorPage = CursorPage<VehicleSummary>;
|
|
90
88
|
/**
|
|
91
89
|
* AI-generated editorial content for a single vehicle.
|
|
92
90
|
*
|
|
@@ -180,20 +178,16 @@ export interface BulkRowOutcome {
|
|
|
180
178
|
*
|
|
181
179
|
* - **Partner-supplied** — what the partner posted (`plate`, `description`,
|
|
182
180
|
* `sale_price_eur`, etc.).
|
|
183
|
-
* - **Catalogue-derived** — `technical_details` is
|
|
184
|
-
*
|
|
185
|
-
* `
|
|
186
|
-
* `NltOfferDetail` per `feedback_partnermax_field_naming_us_english`.
|
|
181
|
+
* - **Catalogue-derived** — `technical_details` is a flat dictionary of
|
|
182
|
+
* Motornet-backed technical attributes using Italian domain labels such as
|
|
183
|
+
* `cilindrata`, `kw`, `hp`, `lunghezza`, `consumo_medio`, and `emissioni_co2`.
|
|
187
184
|
* - **AI-derived** — `ai_content` carries the editorial output the cross-network
|
|
188
185
|
* consumers display (descriptions, highlights, FAQ, SEO meta). `null` until the
|
|
189
186
|
* worker has processed the vehicle.
|
|
190
187
|
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
* `previous_owner_count`, `previous_ownership_transfer_date`, `last_service_*`.
|
|
195
|
-
* These exist in the underlying DB tables for the DealerMAX dashboard but are
|
|
196
|
-
* intentionally not exposed via the SDK.
|
|
188
|
+
* Dealer-internal margin and operations data remains outside this SDK surface;
|
|
189
|
+
* partners receive only the inventory, commercial, catalogue, media, and
|
|
190
|
+
* AI-derived fields needed to publish the vehicle.
|
|
197
191
|
*/
|
|
198
192
|
vehicle?: VehicleDetail | null;
|
|
199
193
|
}
|
|
@@ -205,20 +199,16 @@ export interface BulkRowOutcome {
|
|
|
205
199
|
*
|
|
206
200
|
* - **Partner-supplied** — what the partner posted (`plate`, `description`,
|
|
207
201
|
* `sale_price_eur`, etc.).
|
|
208
|
-
* - **Catalogue-derived** — `technical_details` is
|
|
209
|
-
*
|
|
210
|
-
* `
|
|
211
|
-
* `NltOfferDetail` per `feedback_partnermax_field_naming_us_english`.
|
|
202
|
+
* - **Catalogue-derived** — `technical_details` is a flat dictionary of
|
|
203
|
+
* Motornet-backed technical attributes using Italian domain labels such as
|
|
204
|
+
* `cilindrata`, `kw`, `hp`, `lunghezza`, `consumo_medio`, and `emissioni_co2`.
|
|
212
205
|
* - **AI-derived** — `ai_content` carries the editorial output the cross-network
|
|
213
206
|
* consumers display (descriptions, highlights, FAQ, SEO meta). `null` until the
|
|
214
207
|
* worker has processed the vehicle.
|
|
215
208
|
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* `previous_owner_count`, `previous_ownership_transfer_date`, `last_service_*`.
|
|
220
|
-
* These exist in the underlying DB tables for the DealerMAX dashboard but are
|
|
221
|
-
* intentionally not exposed via the SDK.
|
|
209
|
+
* Dealer-internal margin and operations data remains outside this SDK surface;
|
|
210
|
+
* partners receive only the inventory, commercial, catalogue, media, and
|
|
211
|
+
* AI-derived fields needed to publish the vehicle.
|
|
222
212
|
*/
|
|
223
213
|
export interface VehicleDetail {
|
|
224
214
|
certified_km: number;
|
|
@@ -257,9 +247,9 @@ export interface VehicleDetail {
|
|
|
257
247
|
notes?: string | null;
|
|
258
248
|
registration_month?: number | null;
|
|
259
249
|
/**
|
|
260
|
-
* Flat
|
|
261
|
-
* `motornet_code`. Keys stay in Italian
|
|
262
|
-
*
|
|
250
|
+
* Flat dictionary of Motornet-backed technical attributes for this
|
|
251
|
+
* `motornet_code`. Keys stay in Italian domain vocabulary; native units are
|
|
252
|
+
* preserved (mm, kg, kW, CV, g/km, etc.).
|
|
263
253
|
*/
|
|
264
254
|
technical_details?: {
|
|
265
255
|
[key: string]: unknown;
|
|
@@ -279,8 +269,9 @@ export interface VehicleList {
|
|
|
279
269
|
* Compact vehicle payload for list endpoints.
|
|
280
270
|
*
|
|
281
271
|
* Catalogue fields (`brand`, `model`, `trim`, `fuel_type`) are derived from
|
|
282
|
-
*
|
|
283
|
-
*
|
|
272
|
+
* DealerMAX's licensed Motornet-backed catalogue at read time. Italian raw labels
|
|
273
|
+
* are surfaced verbatim so partner clients see the same vocabulary as
|
|
274
|
+
* consumer-facing DealerMAX surfaces.
|
|
284
275
|
*/
|
|
285
276
|
export interface VehicleSummary {
|
|
286
277
|
certified_km: number;
|
|
@@ -306,15 +297,16 @@ export interface VehicleCreateParams {
|
|
|
306
297
|
certified_km: number;
|
|
307
298
|
/**
|
|
308
299
|
* Body param: Motornet UNI code identifying the exact vehicle configuration. Must
|
|
309
|
-
* exist in
|
|
310
|
-
* 422 `motornet_code_not_in_catalogue`.
|
|
311
|
-
*
|
|
300
|
+
* exist in the used-vehicle catalogue at submission time; otherwise the call
|
|
301
|
+
* returns 422 `motornet_code_not_in_catalogue`. Partners may send a code from
|
|
302
|
+
* their own Motornet agreement or use the paid control-plane targa/VIN resolver
|
|
303
|
+
* before creating the vehicle.
|
|
312
304
|
*/
|
|
313
305
|
motornet_code: string;
|
|
314
306
|
/**
|
|
315
307
|
* Body param: Italian licence plate. Uppercased server-side. UNIQUE across the
|
|
316
|
-
* network for active vehicles
|
|
317
|
-
*
|
|
308
|
+
* network for active vehicles; reusable once the previous holder withdraws the
|
|
309
|
+
* vehicle from sale.
|
|
318
310
|
*/
|
|
319
311
|
plate: string;
|
|
320
312
|
/**
|
|
@@ -348,18 +340,16 @@ export interface VehicleCreateParams {
|
|
|
348
340
|
*/
|
|
349
341
|
extended_warranty_months?: number | null;
|
|
350
342
|
/**
|
|
351
|
-
* Body param:
|
|
352
|
-
* is in stock but not offered for sale.
|
|
343
|
+
* Body param: When false the vehicle remains in stock but is not offered for sale.
|
|
353
344
|
*/
|
|
354
345
|
is_for_sale?: boolean;
|
|
355
346
|
/**
|
|
356
347
|
* Body param: Soft-publish flag. When false the row exists in stock but is
|
|
357
|
-
* excluded from consumer-facing AI surfaces.
|
|
348
|
+
* excluded from consumer-facing AI surfaces.
|
|
358
349
|
*/
|
|
359
350
|
is_visible?: boolean;
|
|
360
351
|
/**
|
|
361
|
-
* Body param: Free-form short notes
|
|
362
|
-
* `mnet_dettagli.precisazioni`-style.
|
|
352
|
+
* Body param: Free-form short notes for partner-facing vehicle detail views.
|
|
363
353
|
*/
|
|
364
354
|
notes?: string | null;
|
|
365
355
|
/**
|
|
@@ -459,8 +449,7 @@ export interface VehicleUpdateParams {
|
|
|
459
449
|
*/
|
|
460
450
|
'Idempotency-Key'?: string;
|
|
461
451
|
}
|
|
462
|
-
export interface VehicleListParams {
|
|
463
|
-
cursor?: string | null;
|
|
452
|
+
export interface VehicleListParams extends CursorPageParams {
|
|
464
453
|
/**
|
|
465
454
|
* If true, soft-deleted rows (`venduto_il` populated) are also returned. Default
|
|
466
455
|
* false — listings hide soft-deleted vehicles.
|
|
@@ -474,7 +463,6 @@ export interface VehicleListParams {
|
|
|
474
463
|
* Filter on the visibility flag.
|
|
475
464
|
*/
|
|
476
465
|
is_visible?: boolean | null;
|
|
477
|
-
limit?: number;
|
|
478
466
|
}
|
|
479
467
|
export interface VehicleDeleteParams {
|
|
480
468
|
dealer_id: string;
|
|
@@ -497,9 +485,8 @@ export declare namespace VehicleBulkParams {
|
|
|
497
485
|
*
|
|
498
486
|
* The partner sends a small, vehicle-specific payload. All technical specs (brand,
|
|
499
487
|
* model, trim, fuel type, displacement, dimensions, CO2, etc.) are derived
|
|
500
|
-
* server-side from
|
|
501
|
-
* never types them.
|
|
502
|
-
* matches the platform rule `feedback_motornet_authoritative`.
|
|
488
|
+
* server-side from DealerMAX's licensed Motornet-backed catalogue — the partner
|
|
489
|
+
* never types them.
|
|
503
490
|
*
|
|
504
491
|
* Fields immutable after creation: `motornet_code`, `plate`, `vin`. Other fields
|
|
505
492
|
* may be updated via PATCH.
|
|
@@ -510,16 +497,17 @@ export declare namespace VehicleBulkParams {
|
|
|
510
497
|
*/
|
|
511
498
|
certified_km: number;
|
|
512
499
|
/**
|
|
513
|
-
* Motornet UNI code identifying the exact vehicle configuration. Must exist in
|
|
514
|
-
*
|
|
515
|
-
* `motornet_code_not_in_catalogue`.
|
|
516
|
-
*
|
|
500
|
+
* Motornet UNI code identifying the exact vehicle configuration. Must exist in the
|
|
501
|
+
* used-vehicle catalogue at submission time; otherwise the call returns 422
|
|
502
|
+
* `motornet_code_not_in_catalogue`. Partners may send a code from their own
|
|
503
|
+
* Motornet agreement or use the paid control-plane targa/VIN resolver before
|
|
504
|
+
* creating the vehicle.
|
|
517
505
|
*/
|
|
518
506
|
motornet_code: string;
|
|
519
507
|
/**
|
|
520
508
|
* Italian licence plate. Uppercased server-side. UNIQUE across the network for
|
|
521
|
-
* active vehicles
|
|
522
|
-
*
|
|
509
|
+
* active vehicles; reusable once the previous holder withdraws the vehicle from
|
|
510
|
+
* sale.
|
|
523
511
|
*/
|
|
524
512
|
plate: string;
|
|
525
513
|
/**
|
|
@@ -540,17 +528,16 @@ export declare namespace VehicleBulkParams {
|
|
|
540
528
|
extended_warranty_enabled?: boolean;
|
|
541
529
|
extended_warranty_months?: number | null;
|
|
542
530
|
/**
|
|
543
|
-
*
|
|
544
|
-
* but not offered for sale.
|
|
531
|
+
* When false the vehicle remains in stock but is not offered for sale.
|
|
545
532
|
*/
|
|
546
533
|
is_for_sale?: boolean;
|
|
547
534
|
/**
|
|
548
535
|
* Soft-publish flag. When false the row exists in stock but is excluded from
|
|
549
|
-
* consumer-facing AI surfaces.
|
|
536
|
+
* consumer-facing AI surfaces.
|
|
550
537
|
*/
|
|
551
538
|
is_visible?: boolean;
|
|
552
539
|
/**
|
|
553
|
-
* Free-form short notes
|
|
540
|
+
* Free-form short notes for partner-facing vehicle detail views.
|
|
554
541
|
*/
|
|
555
542
|
notes?: string | null;
|
|
556
543
|
/**
|
|
@@ -570,7 +557,7 @@ export declare namespace VehicleBulkParams {
|
|
|
570
557
|
}
|
|
571
558
|
}
|
|
572
559
|
export declare namespace Vehicles {
|
|
573
|
-
export { type AIContent as AIContent, type BulkCreateVehiclesResponse as BulkCreateVehiclesResponse, type BulkRowOutcome as BulkRowOutcome, type VehicleDetail as VehicleDetail, type VehicleList as VehicleList, type VehicleSummary as VehicleSummary, type VehicleCreateParams as VehicleCreateParams, type VehicleRetrieveParams as VehicleRetrieveParams, type VehicleUpdateParams as VehicleUpdateParams, type VehicleListParams as VehicleListParams, type VehicleDeleteParams as VehicleDeleteParams, type VehicleBulkParams as VehicleBulkParams, };
|
|
560
|
+
export { type AIContent as AIContent, type BulkCreateVehiclesResponse as BulkCreateVehiclesResponse, type BulkRowOutcome as BulkRowOutcome, type VehicleDetail as VehicleDetail, type VehicleList as VehicleList, type VehicleSummary as VehicleSummary, type VehicleSummariesCursorPage as VehicleSummariesCursorPage, type VehicleCreateParams as VehicleCreateParams, type VehicleRetrieveParams as VehicleRetrieveParams, type VehicleUpdateParams as VehicleUpdateParams, type VehicleListParams as VehicleListParams, type VehicleDeleteParams as VehicleDeleteParams, type VehicleBulkParams as VehicleBulkParams, };
|
|
574
561
|
export { Images as Images, type VehicleImage as VehicleImage, type VehicleImageList as VehicleImageList, type ImageCreateParams as ImageCreateParams, type ImageListParams as ImageListParams, type ImageDeleteParams as ImageDeleteParams, };
|
|
575
562
|
}
|
|
576
563
|
//# sourceMappingURL=vehicles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicles.d.ts","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/vehicles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,YAAY,EACZ,gBAAgB,EACjB,oBAAiB;AAClB,OAAO,EAAE,UAAU,EAAE,qCAAkC;
|
|
1
|
+
{"version":3,"file":"vehicles.d.ts","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/vehicles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,MA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B,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -6,6 +6,7 @@ const tslib_1 = require("../../../internal/tslib.js");
|
|
|
6
6
|
const resource_1 = require("../../../core/resource.js");
|
|
7
7
|
const ImagesAPI = tslib_1.__importStar(require("./images.js"));
|
|
8
8
|
const images_1 = require("./images.js");
|
|
9
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
9
10
|
const headers_1 = require("../../../internal/headers.js");
|
|
10
11
|
const path_1 = require("../../../internal/utils/path.js");
|
|
11
12
|
/**
|
|
@@ -19,11 +20,10 @@ class Vehicles extends resource_1.APIResource {
|
|
|
19
20
|
/**
|
|
20
21
|
* Provision a new used vehicle in a dealer's stock.
|
|
21
22
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* embedding — at which point the vehicle becomes discoverable on the cross-network
|
|
23
|
+
* The write is atomic: a plate conflict or catalogue-code error leaves no partial
|
|
24
|
+
* stock record behind. On success the asynchronous AI-content worker picks up the
|
|
25
|
+
* new vehicle within 60 seconds and generates the SEO body plus semantic
|
|
26
|
+
* embedding; at that point the vehicle becomes discoverable on the cross-network
|
|
27
27
|
* MCP / Custom GPT / NLWeb surfaces. The response returns immediately (no
|
|
28
28
|
* synchronous wait on the worker).
|
|
29
29
|
*/
|
|
@@ -48,9 +48,9 @@ class Vehicles extends resource_1.APIResource {
|
|
|
48
48
|
/**
|
|
49
49
|
* Partial update of a vehicle.
|
|
50
50
|
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
51
|
+
* Applies the transmitted fields inside a single transaction. Fields not present
|
|
52
|
+
* in the body are not touched; explicit `null` clears only fields that are
|
|
53
|
+
* nullable in the public contract.
|
|
54
54
|
*/
|
|
55
55
|
update(vehicleID, params, options) {
|
|
56
56
|
const { dealer_id, 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
@@ -72,23 +72,23 @@ class Vehicles extends resource_1.APIResource {
|
|
|
72
72
|
* this preserves the soft-delete semantic across the API contract.
|
|
73
73
|
*/
|
|
74
74
|
list(dealerID, query = {}, options) {
|
|
75
|
-
return this._client.
|
|
75
|
+
return this._client.getAPIList((0, path_1.path) `/v1/dealers/${dealerID}/vehicles`, (pagination_1.CursorPage), {
|
|
76
|
+
query,
|
|
77
|
+
...options,
|
|
78
|
+
});
|
|
76
79
|
}
|
|
77
80
|
/**
|
|
78
81
|
* Withdraw a vehicle from sale without deleting the row.
|
|
79
82
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* active-uniqueness check excludes rows where `visibile = FALSE` OR
|
|
83
|
-
* `venduto_il IS NOT NULL`).
|
|
83
|
+
* Marks the vehicle as no longer for sale. The plate becomes reusable on the
|
|
84
|
+
* network the moment this returns.
|
|
84
85
|
*
|
|
85
86
|
* Soft-delete is the canonical "remove this vehicle from sale" surface. The
|
|
86
87
|
* AI-citation consumers (MCP `_tool_search_vehicles`, Custom GPT
|
|
87
|
-
* `search_vehicles_network`, NLWeb `/ask`) each filter their own
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* surface within the next index cycle.
|
|
88
|
+
* `search_vehicles_network`, NLWeb `/ask`) each filter their own
|
|
89
|
+
* public-availability state. The result on the partner side is the same: a
|
|
90
|
+
* soft-deleted vehicle disappears from every AI surface within the next index
|
|
91
|
+
* cycle.
|
|
92
92
|
*
|
|
93
93
|
* Returns `409 vehicle_already_deleted` if the row is already soft- deleted — same
|
|
94
94
|
* idempotency pattern as the dealers DELETE endpoint.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicles.js","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/vehicles.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,+DAAsC;AACtC,wCAOkB;AAElB,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;Q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EACzB,OAAwB;QAExB,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,gBAAgB,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;AA9ID,4BA8IC;AAmlBD,QAAQ,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
3
|
import * as ImagesAPI from "./images.mjs";
|
|
4
4
|
import { Images, } from "./images.mjs";
|
|
5
|
+
import { CursorPage } from "../../../core/pagination.mjs";
|
|
5
6
|
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
6
7
|
import { path } from "../../../internal/utils/path.mjs";
|
|
7
8
|
/**
|
|
@@ -15,11 +16,10 @@ export class Vehicles extends APIResource {
|
|
|
15
16
|
/**
|
|
16
17
|
* Provision a new used vehicle in a dealer's stock.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* embedding — at which point the vehicle becomes discoverable on the cross-network
|
|
19
|
+
* The write is atomic: a plate conflict or catalogue-code error leaves no partial
|
|
20
|
+
* stock record behind. On success the asynchronous AI-content worker picks up the
|
|
21
|
+
* new vehicle within 60 seconds and generates the SEO body plus semantic
|
|
22
|
+
* embedding; at that point the vehicle becomes discoverable on the cross-network
|
|
23
23
|
* MCP / Custom GPT / NLWeb surfaces. The response returns immediately (no
|
|
24
24
|
* synchronous wait on the worker).
|
|
25
25
|
*/
|
|
@@ -44,9 +44,9 @@ export class Vehicles extends APIResource {
|
|
|
44
44
|
/**
|
|
45
45
|
* Partial update of a vehicle.
|
|
46
46
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* Applies the transmitted fields inside a single transaction. Fields not present
|
|
48
|
+
* in the body are not touched; explicit `null` clears only fields that are
|
|
49
|
+
* nullable in the public contract.
|
|
50
50
|
*/
|
|
51
51
|
update(vehicleID, params, options) {
|
|
52
52
|
const { dealer_id, 'Idempotency-Key': idempotencyKey, ...body } = params;
|
|
@@ -68,23 +68,23 @@ export class Vehicles extends APIResource {
|
|
|
68
68
|
* this preserves the soft-delete semantic across the API contract.
|
|
69
69
|
*/
|
|
70
70
|
list(dealerID, query = {}, options) {
|
|
71
|
-
return this._client.
|
|
71
|
+
return this._client.getAPIList(path `/v1/dealers/${dealerID}/vehicles`, (CursorPage), {
|
|
72
|
+
query,
|
|
73
|
+
...options,
|
|
74
|
+
});
|
|
72
75
|
}
|
|
73
76
|
/**
|
|
74
77
|
* Withdraw a vehicle from sale without deleting the row.
|
|
75
78
|
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* active-uniqueness check excludes rows where `visibile = FALSE` OR
|
|
79
|
-
* `venduto_il IS NOT NULL`).
|
|
79
|
+
* Marks the vehicle as no longer for sale. The plate becomes reusable on the
|
|
80
|
+
* network the moment this returns.
|
|
80
81
|
*
|
|
81
82
|
* Soft-delete is the canonical "remove this vehicle from sale" surface. The
|
|
82
83
|
* AI-citation consumers (MCP `_tool_search_vehicles`, Custom GPT
|
|
83
|
-
* `search_vehicles_network`, NLWeb `/ask`) each filter their own
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* surface within the next index cycle.
|
|
84
|
+
* `search_vehicles_network`, NLWeb `/ask`) each filter their own
|
|
85
|
+
* public-availability state. The result on the partner side is the same: a
|
|
86
|
+
* soft-deleted vehicle disappears from every AI surface within the next index
|
|
87
|
+
* cycle.
|
|
88
88
|
*
|
|
89
89
|
* Returns `409 vehicle_already_deleted` if the row is already soft- deleted — same
|
|
90
90
|
* idempotency pattern as the dealers DELETE endpoint.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicles.mjs","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/vehicles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAIL,MAAM,GAGP,qBAAiB;AAElB,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"vehicles.mjs","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/vehicles.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAIL,MAAM,GAGP,qBAAiB;AAElB,OAAO,EAAE,UAAU,EAAsC,qCAAiC;AAC1F,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6IhE,CAAC;IA3IC;;;;;;;;;OASG;IACH,MAAM,CAAC,QAAgB,EAAE,MAA2B,EAAE,OAAwB;QAC5E,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GA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, type DealerDetail, type DealerSummary, type DealerUpdateParams, type DealerListParams, type DealerSummariesCursorPage, } from "./dealers/dealers.mjs";
|
|
2
2
|
export { Keys, type KeyListResponse, type KeyIssueResponse, type KeyIssueParams } from "./keys.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,GAC/B,8BAA0B;AAC3B,OAAO,EAAE,IAAI,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,mBAAe"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Dealers, type DealerDetail, type DealerSummary, type
|
|
1
|
+
export { Dealers, type DealerDetail, type DealerSummary, type DealerUpdateParams, type DealerListParams, type DealerSummariesCursorPage, } from "./dealers/dealers.js";
|
|
2
2
|
export { Keys, type KeyListResponse, type KeyIssueResponse, type KeyIssueParams } from "./keys.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,GAC/B,6BAA0B;AAC3B,OAAO,EAAE,IAAI,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAE,kBAAe"}
|
package/resources/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAO2B;AANzB,kGAAA,OAAO,OAAA;AAOT,kCAAgG;AAAvF,4FAAA,IAAI,OAAA"}
|
package/resources/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,OAAO,GAMR,8BAA0B;AAC3B,OAAO,EAAE,IAAI,EAAoE,mBAAe"}
|
package/resources/keys.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
4
|
/**
|
|
5
|
-
* API key lifecycle management
|
|
5
|
+
* API key lifecycle management. PartnerMAX v1 allows one active API key per partner/environment; partners authenticate every request with `X-Api-Key` (preferred) or `Authorization: Bearer <key>`, and replacement is handled through DealerMAX support.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Keys extends APIResource {
|
|
8
8
|
/**
|
|
@@ -13,12 +13,13 @@ export declare class Keys extends APIResource {
|
|
|
13
13
|
*/
|
|
14
14
|
list(options?: RequestOptions): APIPromise<KeyListResponse>;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Rotate the partner API key during a DealerMAX support flow.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* Plaintext is returned exactly once. The key authenticating this request is
|
|
19
|
+
* deactivated in the same transaction that inserts the replacement, preserving
|
|
20
|
+
* PartnerMAX v1's one-active-key invariant. Callers must not use this endpoint for
|
|
21
|
+
* per-deployment, CI, or engineer credentials. Capability gate: caller's key must
|
|
22
|
+
* hold `can_issue_keys`.
|
|
22
23
|
*/
|
|
23
24
|
issue(params: KeyIssueParams, options?: RequestOptions): APIPromise<KeyIssueResponse>;
|
|
24
25
|
/**
|
package/resources/keys.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.mts","sourceRoot":"","sources":["../src/resources/keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;OAKG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,eAAe,CAAC;IAI3D
|
|
1
|
+
{"version":3,"file":"keys.d.mts","sourceRoot":"","sources":["../src/resources/keys.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;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eAAe,IAAI,eAAe,EACvC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
package/resources/keys.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
4
|
/**
|
|
5
|
-
* API key lifecycle management
|
|
5
|
+
* API key lifecycle management. PartnerMAX v1 allows one active API key per partner/environment; partners authenticate every request with `X-Api-Key` (preferred) or `Authorization: Bearer <key>`, and replacement is handled through DealerMAX support.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Keys extends APIResource {
|
|
8
8
|
/**
|
|
@@ -13,12 +13,13 @@ export declare class Keys extends APIResource {
|
|
|
13
13
|
*/
|
|
14
14
|
list(options?: RequestOptions): APIPromise<KeyListResponse>;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Rotate the partner API key during a DealerMAX support flow.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* Plaintext is returned exactly once. The key authenticating this request is
|
|
19
|
+
* deactivated in the same transaction that inserts the replacement, preserving
|
|
20
|
+
* PartnerMAX v1's one-active-key invariant. Callers must not use this endpoint for
|
|
21
|
+
* per-deployment, CI, or engineer credentials. Capability gate: caller's key must
|
|
22
|
+
* hold `can_issue_keys`.
|
|
22
23
|
*/
|
|
23
24
|
issue(params: KeyIssueParams, options?: RequestOptions): APIPromise<KeyIssueResponse>;
|
|
24
25
|
/**
|