partnermax 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/LICENSE +201 -0
- package/README.md +370 -0
- package/api-promise.d.mts +3 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +3 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +3 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +212 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +212 -0
- package/client.d.ts.map +1 -0
- package/client.js +528 -0
- package/client.js.map +1 -0
- package/client.mjs +524 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +3 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +3 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +3 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +26 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +26 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +149 -0
- package/resource.d.mts +3 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +3 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +3 -0
- package/resource.mjs.map +1 -0
- package/resources/dealers/dealers.d.mts +211 -0
- package/resources/dealers/dealers.d.mts.map +1 -0
- package/resources/dealers/dealers.d.ts +211 -0
- package/resources/dealers/dealers.d.ts.map +1 -0
- package/resources/dealers/dealers.js +77 -0
- package/resources/dealers/dealers.js.map +1 -0
- package/resources/dealers/dealers.mjs +72 -0
- package/resources/dealers/dealers.mjs.map +1 -0
- package/resources/dealers/index.d.mts +5 -0
- package/resources/dealers/index.d.mts.map +1 -0
- package/resources/dealers/index.d.ts +5 -0
- package/resources/dealers/index.d.ts.map +1 -0
- package/resources/dealers/index.js +13 -0
- package/resources/dealers/index.js.map +1 -0
- package/resources/dealers/index.mjs +6 -0
- package/resources/dealers/index.mjs.map +1 -0
- package/resources/dealers/nlt/index.d.mts +3 -0
- package/resources/dealers/nlt/index.d.mts.map +1 -0
- package/resources/dealers/nlt/index.d.ts +3 -0
- package/resources/dealers/nlt/index.d.ts.map +1 -0
- package/resources/dealers/nlt/index.js +9 -0
- package/resources/dealers/nlt/index.js.map +1 -0
- package/resources/dealers/nlt/index.mjs +4 -0
- package/resources/dealers/nlt/index.mjs.map +1 -0
- package/resources/dealers/nlt/nlt.d.mts +10 -0
- package/resources/dealers/nlt/nlt.d.mts.map +1 -0
- package/resources/dealers/nlt/nlt.d.ts +10 -0
- package/resources/dealers/nlt/nlt.d.ts.map +1 -0
- package/resources/dealers/nlt/nlt.js +17 -0
- package/resources/dealers/nlt/nlt.js.map +1 -0
- package/resources/dealers/nlt/nlt.mjs +12 -0
- package/resources/dealers/nlt/nlt.mjs.map +1 -0
- package/resources/dealers/nlt/offers.d.mts +303 -0
- package/resources/dealers/nlt/offers.d.mts.map +1 -0
- package/resources/dealers/nlt/offers.d.ts +303 -0
- package/resources/dealers/nlt/offers.d.ts.map +1 -0
- package/resources/dealers/nlt/offers.js +35 -0
- package/resources/dealers/nlt/offers.js.map +1 -0
- package/resources/dealers/nlt/offers.mjs +31 -0
- package/resources/dealers/nlt/offers.mjs.map +1 -0
- package/resources/dealers/nlt-settings.d.mts +221 -0
- package/resources/dealers/nlt-settings.d.mts.map +1 -0
- package/resources/dealers/nlt-settings.d.ts +221 -0
- package/resources/dealers/nlt-settings.d.ts.map +1 -0
- package/resources/dealers/nlt-settings.js +54 -0
- package/resources/dealers/nlt-settings.js.map +1 -0
- package/resources/dealers/nlt-settings.mjs +50 -0
- package/resources/dealers/nlt-settings.mjs.map +1 -0
- package/resources/dealers/nlt.d.mts +2 -0
- package/resources/dealers/nlt.d.mts.map +1 -0
- package/resources/dealers/nlt.d.ts +2 -0
- package/resources/dealers/nlt.d.ts.map +1 -0
- package/resources/dealers/nlt.js +6 -0
- package/resources/dealers/nlt.js.map +1 -0
- package/resources/dealers/nlt.mjs +3 -0
- package/resources/dealers/nlt.mjs.map +1 -0
- package/resources/dealers/vehicles/images.d.mts +113 -0
- package/resources/dealers/vehicles/images.d.mts.map +1 -0
- package/resources/dealers/vehicles/images.d.ts +113 -0
- package/resources/dealers/vehicles/images.d.ts.map +1 -0
- package/resources/dealers/vehicles/images.js +64 -0
- package/resources/dealers/vehicles/images.js.map +1 -0
- package/resources/dealers/vehicles/images.mjs +60 -0
- package/resources/dealers/vehicles/images.mjs.map +1 -0
- package/resources/dealers/vehicles/index.d.mts +3 -0
- package/resources/dealers/vehicles/index.d.mts.map +1 -0
- package/resources/dealers/vehicles/index.d.ts +3 -0
- package/resources/dealers/vehicles/index.d.ts.map +1 -0
- package/resources/dealers/vehicles/index.js +9 -0
- package/resources/dealers/vehicles/index.js.map +1 -0
- package/resources/dealers/vehicles/index.mjs +4 -0
- package/resources/dealers/vehicles/index.mjs.map +1 -0
- package/resources/dealers/vehicles/vehicles.d.mts +576 -0
- package/resources/dealers/vehicles/vehicles.d.mts.map +1 -0
- package/resources/dealers/vehicles/vehicles.d.ts +576 -0
- package/resources/dealers/vehicles/vehicles.d.ts.map +1 -0
- package/resources/dealers/vehicles/vehicles.js +141 -0
- package/resources/dealers/vehicles/vehicles.js.map +1 -0
- package/resources/dealers/vehicles/vehicles.mjs +136 -0
- package/resources/dealers/vehicles/vehicles.mjs.map +1 -0
- package/resources/dealers/vehicles.d.mts +2 -0
- package/resources/dealers/vehicles.d.mts.map +1 -0
- package/resources/dealers/vehicles.d.ts +2 -0
- package/resources/dealers/vehicles.d.ts.map +1 -0
- package/resources/dealers/vehicles.js +6 -0
- package/resources/dealers/vehicles.js.map +1 -0
- package/resources/dealers/vehicles.mjs +3 -0
- package/resources/dealers/vehicles.mjs.map +1 -0
- package/resources/dealers.d.mts +2 -0
- package/resources/dealers.d.mts.map +1 -0
- package/resources/dealers.d.ts +2 -0
- package/resources/dealers.d.ts.map +1 -0
- package/resources/dealers.js +6 -0
- package/resources/dealers.js.map +1 -0
- package/resources/dealers.mjs +3 -0
- package/resources/dealers.mjs.map +1 -0
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +9 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -0
- package/resources/keys.d.mts +83 -0
- package/resources/keys.d.mts.map +1 -0
- package/resources/keys.d.ts +83 -0
- package/resources/keys.d.ts.map +1 -0
- package/resources/keys.js +51 -0
- package/resources/keys.js.map +1 -0
- package/resources/keys.mjs +47 -0
- package/resources/keys.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +841 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +93 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +128 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/dealers/dealers.ts +348 -0
- package/src/resources/dealers/index.ts +28 -0
- package/src/resources/dealers/nlt/index.ts +11 -0
- package/src/resources/dealers/nlt/nlt.ts +29 -0
- package/src/resources/dealers/nlt/offers.ts +427 -0
- package/src/resources/dealers/nlt-settings.ts +269 -0
- package/src/resources/dealers/nlt.ts +3 -0
- package/src/resources/dealers/vehicles/images.ts +153 -0
- package/src/resources/dealers/vehicles/index.ts +25 -0
- package/src/resources/dealers/vehicles/vehicles.ts +796 -0
- package/src/resources/dealers/vehicles.ts +3 -0
- package/src/resources/dealers.ts +3 -0
- package/src/resources/index.ts +12 -0
- package/src/resources/keys.ts +128 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +3 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +3 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +3 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as ImagesAPI from "./images.js";
|
|
3
|
+
import { ImageCreateParams, ImageDeleteParams, ImageListParams, Images, VehicleImage, VehicleImageList } from "./images.js";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* 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).
|
|
8
|
+
*/
|
|
9
|
+
export declare class Vehicles extends APIResource {
|
|
10
|
+
images: ImagesAPI.Images;
|
|
11
|
+
/**
|
|
12
|
+
* Provision a new used vehicle in a dealer's stock.
|
|
13
|
+
*
|
|
14
|
+
* Writes are atomic across `azlease_usatoin` and `azlease_usatoauto` using a
|
|
15
|
+
* `SAVEPOINT` so a UNIQUE plate violation rolls back cleanly. On success the
|
|
16
|
+
* AI-content worker (:mod:`azurenet-engine.app.jobs.usato_ai_content_worker`)
|
|
17
|
+
* picks up the new row within 60 seconds and generates the SEO body + pgvector
|
|
18
|
+
* embedding — at which point the vehicle becomes discoverable on the cross-network
|
|
19
|
+
* MCP / Custom GPT / NLWeb surfaces. The response returns immediately (no
|
|
20
|
+
* synchronous wait on the worker).
|
|
21
|
+
*/
|
|
22
|
+
create(dealerID: string, params: VehicleCreateParams, options?: RequestOptions): APIPromise<VehicleDetail>;
|
|
23
|
+
/**
|
|
24
|
+
* Get Vehicle
|
|
25
|
+
*/
|
|
26
|
+
retrieve(vehicleID: string, params: VehicleRetrieveParams, options?: RequestOptions): APIPromise<VehicleDetail>;
|
|
27
|
+
/**
|
|
28
|
+
* Partial update of a vehicle.
|
|
29
|
+
*
|
|
30
|
+
* Splits the inbound body across the two physical tables (`azlease_usatoauto` and
|
|
31
|
+
* `azlease_usatoin`) and emits at most one UPDATE per table inside a single
|
|
32
|
+
* transaction. Fields not present in the body are not touched.
|
|
33
|
+
*/
|
|
34
|
+
update(vehicleID: string, params: VehicleUpdateParams, options?: RequestOptions): APIPromise<VehicleDetail>;
|
|
35
|
+
/**
|
|
36
|
+
* List vehicles in a dealer's stock owned by the calling partner.
|
|
37
|
+
*
|
|
38
|
+
* Cursor pagination is opaque base64url over the last vehicle UUID. Default sort
|
|
39
|
+
* is `i.data_inserimento ASC` so freshly provisioned vehicles surface at the tail.
|
|
40
|
+
* Soft-deleted rows are excluded unless `include_deleted=true` is set explicitly —
|
|
41
|
+
* this preserves the soft-delete semantic across the API contract.
|
|
42
|
+
*/
|
|
43
|
+
list(dealerID: string, query?: VehicleListParams | null | undefined, options?: RequestOptions): APIPromise<VehicleList>;
|
|
44
|
+
/**
|
|
45
|
+
* Withdraw a vehicle from sale without deleting the row.
|
|
46
|
+
*
|
|
47
|
+
* Sets `azlease_usatoin.visibile = FALSE` and stamps `venduto_il = now()`. The
|
|
48
|
+
* plate becomes reusable on the network the moment this returns (the
|
|
49
|
+
* active-uniqueness check excludes rows where `visibile = FALSE` OR
|
|
50
|
+
* `venduto_il IS NOT NULL`).
|
|
51
|
+
*
|
|
52
|
+
* Soft-delete is the canonical "remove this vehicle from sale" surface. The
|
|
53
|
+
* AI-citation consumers (MCP `_tool_search_vehicles`, Custom GPT
|
|
54
|
+
* `search_vehicles_network`, NLWeb `/ask`) each filter their own queries on
|
|
55
|
+
* `i.visibile = TRUE AND i.venduto_il IS NULL` — the shared `v_apimax_listing`
|
|
56
|
+
* view itself does not impose that filter, every consumer adds it. The result on
|
|
57
|
+
* the partner side is the same: a soft-deleted vehicle disappears from every AI
|
|
58
|
+
* surface within the next index cycle.
|
|
59
|
+
*
|
|
60
|
+
* Returns `409 vehicle_already_deleted` if the row is already soft- deleted — same
|
|
61
|
+
* idempotency pattern as the dealers DELETE endpoint.
|
|
62
|
+
*/
|
|
63
|
+
delete(vehicleID: string, params: VehicleDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Provision up to `BULK_MAX_ROWS` vehicles in a single synchronous call.
|
|
66
|
+
*
|
|
67
|
+
* Each row is processed inside its own `SAVEPOINT` so a failure on row N
|
|
68
|
+
* (validation, plate conflict, motornet not in catalogue, race) is isolated — the
|
|
69
|
+
* SAVEPOINT rolls back, the per-row outcome is collected with a structured error
|
|
70
|
+
* code, and the loop continues with row N+1.
|
|
71
|
+
*
|
|
72
|
+
* Successful rows accumulate in the outer transaction and are committed together
|
|
73
|
+
* at the end of the request. Failed rows leave no trace in the database.
|
|
74
|
+
*
|
|
75
|
+
* Returns `207 Multi-Status`. The response carries:
|
|
76
|
+
*
|
|
77
|
+
* - `total`, `succeeded`, `failed` — aggregate counters for quick branch logic on
|
|
78
|
+
* the partner side.
|
|
79
|
+
* - `results` — array of per-row outcomes, indexed by the position in the request
|
|
80
|
+
* `vehicles[]` array. Successful rows include the full `VehicleDetail`; failed
|
|
81
|
+
* rows include `error_code` + `error_message` keyed to the same codes as the
|
|
82
|
+
* single-POST surface so the partner reuses one error handler for both paths.
|
|
83
|
+
*
|
|
84
|
+
* For imports larger than `BULK_MAX_ROWS` (currently 100), the partner is expected
|
|
85
|
+
* to chunk the array client-side. A 5 000-vehicle initial migration is 50 calls;
|
|
86
|
+
* the partner controls concurrency.
|
|
87
|
+
*/
|
|
88
|
+
bulk(dealerID: string, params: VehicleBulkParams, options?: RequestOptions): APIPromise<BulkCreateVehiclesResponse>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* AI-generated editorial content for a single vehicle.
|
|
92
|
+
*
|
|
93
|
+
* Produced asynchronously by the `usato_ai_content_worker` in `azurenet-engine`
|
|
94
|
+
* within ~60 seconds of vehicle creation. While the worker is still pending, every
|
|
95
|
+
* field is `null`; once the worker completes the row this object carries the full
|
|
96
|
+
* editorial set the cross-network AI consumers (MCP, ChatGPT Custom GPT, NLWeb)
|
|
97
|
+
* display.
|
|
98
|
+
*
|
|
99
|
+
* Layered descriptions:
|
|
100
|
+
*
|
|
101
|
+
* - `tagline` — 8–12 word headline. Use on listing cards / push notifications.
|
|
102
|
+
* - `short` — 1–2 sentence summary (≤ 220 chars). Use as the meta description
|
|
103
|
+
* fallback.
|
|
104
|
+
* - `medium` — paragraph (~400 chars). Use on vehicle-detail SEO blurbs.
|
|
105
|
+
* - `long` — full marketing description (1500–3000 chars). Use on detail pages.
|
|
106
|
+
* - `highlights` — array of 3–7 selling points. Render as a bullet list above the
|
|
107
|
+
* description.
|
|
108
|
+
* - `faq` — array of `{question, answer}` objects. Render as accordion / JSON-LD
|
|
109
|
+
* `FAQPage`.
|
|
110
|
+
* - `seo_title` — ≤ 60 chars, `<title>`-ready.
|
|
111
|
+
* - `seo_description` — ≤ 160 chars, meta description-ready.
|
|
112
|
+
* - `slug` — URL-safe slug used in the canonical URL on the dealer site.
|
|
113
|
+
*
|
|
114
|
+
* The Italian language is canonical (`lang='it'`). Multi-language is on the
|
|
115
|
+
* roadmap; until then the partner gets exactly what the consumer AI surfaces get.
|
|
116
|
+
*/
|
|
117
|
+
export interface AIContent {
|
|
118
|
+
/**
|
|
119
|
+
* Array of `{question, answer}` objects. Each entry has two string keys; render
|
|
120
|
+
* with the partner's own FAQ UI or feed into a `FAQPage` JSON-LD block.
|
|
121
|
+
*/
|
|
122
|
+
faq?: Array<{
|
|
123
|
+
[key: string]: string;
|
|
124
|
+
}> | null;
|
|
125
|
+
/**
|
|
126
|
+
* UTC timestamp of the most recent AI generation. `null` until the worker first
|
|
127
|
+
* processes the vehicle (≤ 60 seconds after vehicle creation).
|
|
128
|
+
*/
|
|
129
|
+
generated_at?: string | null;
|
|
130
|
+
highlights?: Array<string> | null;
|
|
131
|
+
long?: string | null;
|
|
132
|
+
medium?: string | null;
|
|
133
|
+
seo_description?: string | null;
|
|
134
|
+
seo_title?: string | null;
|
|
135
|
+
short?: string | null;
|
|
136
|
+
slug?: string | null;
|
|
137
|
+
tagline?: string | null;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Response of `POST /v1/dealers/{dealer_id}/vehicles/bulk`.
|
|
141
|
+
*
|
|
142
|
+
* HTTP status is `207 Multi-Status` (rather than 201) to make partial success
|
|
143
|
+
* explicit at the protocol level. The aggregate counters at the top let a partner
|
|
144
|
+
* short-circuit when every row succeeded; the `results` array carries per-row
|
|
145
|
+
* detail when not.
|
|
146
|
+
*/
|
|
147
|
+
export interface BulkCreateVehiclesResponse {
|
|
148
|
+
failed: number;
|
|
149
|
+
results: Array<BulkRowOutcome>;
|
|
150
|
+
succeeded: number;
|
|
151
|
+
/**
|
|
152
|
+
* Number of rows in the request body.
|
|
153
|
+
*/
|
|
154
|
+
total: number;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Per-row result inside `BulkCreateVehiclesResponse`.
|
|
158
|
+
*
|
|
159
|
+
* On success `vehicle` is populated (full `VehicleDetail`) and
|
|
160
|
+
* `error_code`/`error_message` are null. On failure `vehicle` is null and
|
|
161
|
+
* `error_code`/`error_message` carry the same code that the corresponding
|
|
162
|
+
* single-create POST would have raised (e.g. `motornet_code_not_in_catalogue`,
|
|
163
|
+
* `vehicle_plate_already_registered`, `validation_error`).
|
|
164
|
+
*/
|
|
165
|
+
export interface BulkRowOutcome {
|
|
166
|
+
/**
|
|
167
|
+
* Zero-based index of the row in the request `vehicles[]` array. Stable across
|
|
168
|
+
* retries — the partner can correlate failures back to its own batch by this
|
|
169
|
+
* index.
|
|
170
|
+
*/
|
|
171
|
+
row_index: number;
|
|
172
|
+
status: 'succeeded' | 'failed';
|
|
173
|
+
error_code?: string | null;
|
|
174
|
+
error_message?: string | null;
|
|
175
|
+
/**
|
|
176
|
+
* Full vehicle resource. Returned by `GET /v1/dealers/{id}/vehicles/{id}`,
|
|
177
|
+
* `POST /v1/dealers/{id}/vehicles`, and `PATCH /v1/dealers/{id}/vehicles/{id}`.
|
|
178
|
+
*
|
|
179
|
+
* Carries three layers of information:
|
|
180
|
+
*
|
|
181
|
+
* - **Partner-supplied** — what the partner posted (`plate`, `description`,
|
|
182
|
+
* `sale_price_eur`, etc.).
|
|
183
|
+
* - **Catalogue-derived** — `technical_details` is the flat `mnet_dettagli_usato`
|
|
184
|
+
* dict (Italian column keys: `cilindrata`, `kw`, `hp`, `lunghezza`,
|
|
185
|
+
* `consumo_medio`, `emissioni_co2`, etc.). Same shape conventions as
|
|
186
|
+
* `NltOfferDetail` per `feedback_partnermax_field_naming_us_english`.
|
|
187
|
+
* - **AI-derived** — `ai_content` carries the editorial output the cross-network
|
|
188
|
+
* consumers display (descriptions, highlights, FAQ, SEO meta). `null` until the
|
|
189
|
+
* worker has processed the vehicle.
|
|
190
|
+
*
|
|
191
|
+
* Fields the partner does NOT see through this surface (because they are
|
|
192
|
+
* dealer-internal margin/operations data the partner does not own):
|
|
193
|
+
* `cost_price_eur`, `inspection_expiry_date`, `road_tax_expiry_date`,
|
|
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.
|
|
197
|
+
*/
|
|
198
|
+
vehicle?: VehicleDetail | null;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Full vehicle resource. Returned by `GET /v1/dealers/{id}/vehicles/{id}`,
|
|
202
|
+
* `POST /v1/dealers/{id}/vehicles`, and `PATCH /v1/dealers/{id}/vehicles/{id}`.
|
|
203
|
+
*
|
|
204
|
+
* Carries three layers of information:
|
|
205
|
+
*
|
|
206
|
+
* - **Partner-supplied** — what the partner posted (`plate`, `description`,
|
|
207
|
+
* `sale_price_eur`, etc.).
|
|
208
|
+
* - **Catalogue-derived** — `technical_details` is the flat `mnet_dettagli_usato`
|
|
209
|
+
* dict (Italian column keys: `cilindrata`, `kw`, `hp`, `lunghezza`,
|
|
210
|
+
* `consumo_medio`, `emissioni_co2`, etc.). Same shape conventions as
|
|
211
|
+
* `NltOfferDetail` per `feedback_partnermax_field_naming_us_english`.
|
|
212
|
+
* - **AI-derived** — `ai_content` carries the editorial output the cross-network
|
|
213
|
+
* consumers display (descriptions, highlights, FAQ, SEO meta). `null` until the
|
|
214
|
+
* worker has processed the vehicle.
|
|
215
|
+
*
|
|
216
|
+
* Fields the partner does NOT see through this surface (because they are
|
|
217
|
+
* dealer-internal margin/operations data the partner does not own):
|
|
218
|
+
* `cost_price_eur`, `inspection_expiry_date`, `road_tax_expiry_date`,
|
|
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.
|
|
222
|
+
*/
|
|
223
|
+
export interface VehicleDetail {
|
|
224
|
+
certified_km: number;
|
|
225
|
+
created_at: string;
|
|
226
|
+
dealer_id: string;
|
|
227
|
+
description: string;
|
|
228
|
+
extended_warranty_enabled: boolean;
|
|
229
|
+
is_for_sale: boolean;
|
|
230
|
+
is_visible: boolean;
|
|
231
|
+
last_modified_at: string;
|
|
232
|
+
motornet_code: string;
|
|
233
|
+
partner_id: string;
|
|
234
|
+
plate: string;
|
|
235
|
+
registration_year: number;
|
|
236
|
+
sale_price_eur: number;
|
|
237
|
+
vat_displayed: boolean;
|
|
238
|
+
vehicle_damaged: boolean;
|
|
239
|
+
vehicle_id: string;
|
|
240
|
+
/**
|
|
241
|
+
* Editorial content generated by the partnermax AI pipeline. `null` immediately
|
|
242
|
+
* after `POST` until the worker has produced the row (≤ 60 seconds). Populated for
|
|
243
|
+
* the same consumer-AI surfaces (MCP, Custom GPT, NLWeb).
|
|
244
|
+
*/
|
|
245
|
+
ai_content?: AIContent | null;
|
|
246
|
+
alloy_wheel_size?: number | null;
|
|
247
|
+
brand?: string | null;
|
|
248
|
+
color?: string | null;
|
|
249
|
+
extended_warranty_months?: number | null;
|
|
250
|
+
fuel_type?: string | null;
|
|
251
|
+
/**
|
|
252
|
+
* Vehicle photos in display order. The first entry is the cover photo
|
|
253
|
+
* (`position=1` in the dedicated images endpoint).
|
|
254
|
+
*/
|
|
255
|
+
image_urls?: Array<string>;
|
|
256
|
+
model?: string | null;
|
|
257
|
+
notes?: string | null;
|
|
258
|
+
registration_month?: number | null;
|
|
259
|
+
/**
|
|
260
|
+
* Flat dict of every non-null `mnet_dettagli_usato` column for this
|
|
261
|
+
* `motornet_code`. Keys stay in Italian because they are raw SQL column names;
|
|
262
|
+
* native units preserved (mm, kg, kW, CV, g/km, etc.).
|
|
263
|
+
*/
|
|
264
|
+
technical_details?: {
|
|
265
|
+
[key: string]: unknown;
|
|
266
|
+
};
|
|
267
|
+
trim?: string | null;
|
|
268
|
+
vin?: string | null;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Cursor-paginated list of vehicle summaries.
|
|
272
|
+
*/
|
|
273
|
+
export interface VehicleList {
|
|
274
|
+
data: Array<VehicleSummary>;
|
|
275
|
+
has_more: boolean;
|
|
276
|
+
next_cursor?: string | null;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Compact vehicle payload for list endpoints.
|
|
280
|
+
*
|
|
281
|
+
* Catalogue fields (`brand`, `model`, `trim`, `fuel_type`) are derived from
|
|
282
|
+
* `mnet_dettagli` at read time. Italian raw labels are surfaced verbatim — same
|
|
283
|
+
* convention as NLT (`apimax`-aligned).
|
|
284
|
+
*/
|
|
285
|
+
export interface VehicleSummary {
|
|
286
|
+
certified_km: number;
|
|
287
|
+
created_at: string;
|
|
288
|
+
dealer_id: string;
|
|
289
|
+
is_for_sale: boolean;
|
|
290
|
+
is_visible: boolean;
|
|
291
|
+
motornet_code: string;
|
|
292
|
+
plate: string;
|
|
293
|
+
registration_year: number;
|
|
294
|
+
sale_price_eur: number;
|
|
295
|
+
vehicle_id: string;
|
|
296
|
+
brand?: string | null;
|
|
297
|
+
color?: string | null;
|
|
298
|
+
fuel_type?: string | null;
|
|
299
|
+
model?: string | null;
|
|
300
|
+
trim?: string | null;
|
|
301
|
+
}
|
|
302
|
+
export interface VehicleCreateParams {
|
|
303
|
+
/**
|
|
304
|
+
* Body param: Certified odometer reading at intake, in kilometres.
|
|
305
|
+
*/
|
|
306
|
+
certified_km: number;
|
|
307
|
+
/**
|
|
308
|
+
* Body param: Motornet UNI code identifying the exact vehicle configuration. Must
|
|
309
|
+
* exist in `mnet_dettagli_usato` at submission time; otherwise the call returns
|
|
310
|
+
* 422 `motornet_code_not_in_catalogue`. The partner is expected to source this
|
|
311
|
+
* from its own DMS; partnermax does not expose a plate→code lookup.
|
|
312
|
+
*/
|
|
313
|
+
motornet_code: string;
|
|
314
|
+
/**
|
|
315
|
+
* Body param: Italian licence plate. Uppercased server-side. UNIQUE across the
|
|
316
|
+
* network for active vehicles (`visibile=true AND venduto_il IS NULL`); reusable
|
|
317
|
+
* once the previous holder sells/hides the row.
|
|
318
|
+
*/
|
|
319
|
+
plate: string;
|
|
320
|
+
/**
|
|
321
|
+
* Body param: Year of first registration. Upper bound is current year + 1.
|
|
322
|
+
*/
|
|
323
|
+
registration_year: number;
|
|
324
|
+
/**
|
|
325
|
+
* Body param: Public sale price in EUR. Surfaced on MCP / Custom GPT / NLWeb and
|
|
326
|
+
* on the dealer's site JSON-LD `Offer.price`.
|
|
327
|
+
*/
|
|
328
|
+
sale_price_eur: number;
|
|
329
|
+
/**
|
|
330
|
+
* Body param
|
|
331
|
+
*/
|
|
332
|
+
alloy_wheel_size?: number | null;
|
|
333
|
+
/**
|
|
334
|
+
* Body param
|
|
335
|
+
*/
|
|
336
|
+
color?: string | null;
|
|
337
|
+
/**
|
|
338
|
+
* Body param: Partner-supplied long description. Surfaced on the dealer site
|
|
339
|
+
* detail page.
|
|
340
|
+
*/
|
|
341
|
+
description?: string;
|
|
342
|
+
/**
|
|
343
|
+
* Body param
|
|
344
|
+
*/
|
|
345
|
+
extended_warranty_enabled?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* Body param
|
|
348
|
+
*/
|
|
349
|
+
extended_warranty_months?: number | null;
|
|
350
|
+
/**
|
|
351
|
+
* Body param: Maps to `azlease_usatoauto.is_vendita_enabled`. When false the row
|
|
352
|
+
* is in stock but not offered for sale.
|
|
353
|
+
*/
|
|
354
|
+
is_for_sale?: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* Body param: Soft-publish flag. When false the row exists in stock but is
|
|
357
|
+
* excluded from consumer-facing AI surfaces. Maps to `azlease_usatoin.visibile`.
|
|
358
|
+
*/
|
|
359
|
+
is_visible?: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Body param: Free-form short notes; surfaced as
|
|
362
|
+
* `mnet_dettagli.precisazioni`-style.
|
|
363
|
+
*/
|
|
364
|
+
notes?: string | null;
|
|
365
|
+
/**
|
|
366
|
+
* Body param: Month of registration (1–12).
|
|
367
|
+
*/
|
|
368
|
+
registration_month?: number | null;
|
|
369
|
+
/**
|
|
370
|
+
* Body param: If true the public price is displayed VAT-exposed (B2B); otherwise
|
|
371
|
+
* VAT-inclusive (B2C).
|
|
372
|
+
*/
|
|
373
|
+
vat_displayed?: boolean;
|
|
374
|
+
/**
|
|
375
|
+
* Body param
|
|
376
|
+
*/
|
|
377
|
+
vehicle_damaged?: boolean;
|
|
378
|
+
/**
|
|
379
|
+
* Body param: ISO 3779 vehicle identification number. Optional but strongly
|
|
380
|
+
* recommended.
|
|
381
|
+
*/
|
|
382
|
+
vin?: string | null;
|
|
383
|
+
/**
|
|
384
|
+
* Header param
|
|
385
|
+
*/
|
|
386
|
+
'Idempotency-Key'?: string;
|
|
387
|
+
}
|
|
388
|
+
export interface VehicleRetrieveParams {
|
|
389
|
+
/**
|
|
390
|
+
* Path param
|
|
391
|
+
*/
|
|
392
|
+
dealer_id: string;
|
|
393
|
+
/**
|
|
394
|
+
* Query param: If true, the detail of a soft-deleted vehicle is returned. Default
|
|
395
|
+
* false — soft-deleted rows return 404 to keep behaviour consistent with the list
|
|
396
|
+
* endpoint.
|
|
397
|
+
*/
|
|
398
|
+
include_deleted?: boolean;
|
|
399
|
+
}
|
|
400
|
+
export interface VehicleUpdateParams {
|
|
401
|
+
/**
|
|
402
|
+
* Path param
|
|
403
|
+
*/
|
|
404
|
+
dealer_id: string;
|
|
405
|
+
/**
|
|
406
|
+
* Body param
|
|
407
|
+
*/
|
|
408
|
+
alloy_wheel_size?: number | null;
|
|
409
|
+
/**
|
|
410
|
+
* Body param
|
|
411
|
+
*/
|
|
412
|
+
certified_km?: number | null;
|
|
413
|
+
/**
|
|
414
|
+
* Body param
|
|
415
|
+
*/
|
|
416
|
+
color?: string | null;
|
|
417
|
+
/**
|
|
418
|
+
* Body param
|
|
419
|
+
*/
|
|
420
|
+
description?: string | null;
|
|
421
|
+
/**
|
|
422
|
+
* Body param
|
|
423
|
+
*/
|
|
424
|
+
extended_warranty_enabled?: boolean | null;
|
|
425
|
+
/**
|
|
426
|
+
* Body param
|
|
427
|
+
*/
|
|
428
|
+
extended_warranty_months?: number | null;
|
|
429
|
+
/**
|
|
430
|
+
* Body param
|
|
431
|
+
*/
|
|
432
|
+
is_for_sale?: boolean | null;
|
|
433
|
+
/**
|
|
434
|
+
* Body param
|
|
435
|
+
*/
|
|
436
|
+
is_visible?: boolean | null;
|
|
437
|
+
/**
|
|
438
|
+
* Body param
|
|
439
|
+
*/
|
|
440
|
+
notes?: string | null;
|
|
441
|
+
/**
|
|
442
|
+
* Body param
|
|
443
|
+
*/
|
|
444
|
+
registration_month?: number | null;
|
|
445
|
+
/**
|
|
446
|
+
* Body param
|
|
447
|
+
*/
|
|
448
|
+
sale_price_eur?: number | null;
|
|
449
|
+
/**
|
|
450
|
+
* Body param
|
|
451
|
+
*/
|
|
452
|
+
vat_displayed?: boolean | null;
|
|
453
|
+
/**
|
|
454
|
+
* Body param
|
|
455
|
+
*/
|
|
456
|
+
vehicle_damaged?: boolean | null;
|
|
457
|
+
/**
|
|
458
|
+
* Header param
|
|
459
|
+
*/
|
|
460
|
+
'Idempotency-Key'?: string;
|
|
461
|
+
}
|
|
462
|
+
export interface VehicleListParams {
|
|
463
|
+
cursor?: string | null;
|
|
464
|
+
/**
|
|
465
|
+
* If true, soft-deleted rows (`venduto_il` populated) are also returned. Default
|
|
466
|
+
* false — listings hide soft-deleted vehicles.
|
|
467
|
+
*/
|
|
468
|
+
include_deleted?: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Filter on the sale flag.
|
|
471
|
+
*/
|
|
472
|
+
is_for_sale?: boolean | null;
|
|
473
|
+
/**
|
|
474
|
+
* Filter on the visibility flag.
|
|
475
|
+
*/
|
|
476
|
+
is_visible?: boolean | null;
|
|
477
|
+
limit?: number;
|
|
478
|
+
}
|
|
479
|
+
export interface VehicleDeleteParams {
|
|
480
|
+
dealer_id: string;
|
|
481
|
+
}
|
|
482
|
+
export interface VehicleBulkParams {
|
|
483
|
+
/**
|
|
484
|
+
* Body param: Array of vehicles to create. Between 1 and 100 rows per call. For
|
|
485
|
+
* larger imports, the partner is expected to chunk client-side (e.g. 50 calls of
|
|
486
|
+
* 100 rows each for a 5 000-vehicle migration).
|
|
487
|
+
*/
|
|
488
|
+
vehicles: Array<VehicleBulkParams.Vehicle>;
|
|
489
|
+
/**
|
|
490
|
+
* Header param
|
|
491
|
+
*/
|
|
492
|
+
'Idempotency-Key'?: string;
|
|
493
|
+
}
|
|
494
|
+
export declare namespace VehicleBulkParams {
|
|
495
|
+
/**
|
|
496
|
+
* Request body for vehicle provisioning.
|
|
497
|
+
*
|
|
498
|
+
* The partner sends a small, vehicle-specific payload. All technical specs (brand,
|
|
499
|
+
* model, trim, fuel type, displacement, dimensions, CO2, etc.) are derived
|
|
500
|
+
* server-side from `mnet_dettagli` via the `motornet_code` join — the partner
|
|
501
|
+
* never types them. This is the same canonical pattern used by NLT offers and
|
|
502
|
+
* matches the platform rule `feedback_motornet_authoritative`.
|
|
503
|
+
*
|
|
504
|
+
* Fields immutable after creation: `motornet_code`, `plate`, `vin`. Other fields
|
|
505
|
+
* may be updated via PATCH.
|
|
506
|
+
*/
|
|
507
|
+
interface Vehicle {
|
|
508
|
+
/**
|
|
509
|
+
* Certified odometer reading at intake, in kilometres.
|
|
510
|
+
*/
|
|
511
|
+
certified_km: number;
|
|
512
|
+
/**
|
|
513
|
+
* Motornet UNI code identifying the exact vehicle configuration. Must exist in
|
|
514
|
+
* `mnet_dettagli_usato` at submission time; otherwise the call returns 422
|
|
515
|
+
* `motornet_code_not_in_catalogue`. The partner is expected to source this from
|
|
516
|
+
* its own DMS; partnermax does not expose a plate→code lookup.
|
|
517
|
+
*/
|
|
518
|
+
motornet_code: string;
|
|
519
|
+
/**
|
|
520
|
+
* Italian licence plate. Uppercased server-side. UNIQUE across the network for
|
|
521
|
+
* active vehicles (`visibile=true AND venduto_il IS NULL`); reusable once the
|
|
522
|
+
* previous holder sells/hides the row.
|
|
523
|
+
*/
|
|
524
|
+
plate: string;
|
|
525
|
+
/**
|
|
526
|
+
* Year of first registration. Upper bound is current year + 1.
|
|
527
|
+
*/
|
|
528
|
+
registration_year: number;
|
|
529
|
+
/**
|
|
530
|
+
* Public sale price in EUR. Surfaced on MCP / Custom GPT / NLWeb and on the
|
|
531
|
+
* dealer's site JSON-LD `Offer.price`.
|
|
532
|
+
*/
|
|
533
|
+
sale_price_eur: number;
|
|
534
|
+
alloy_wheel_size?: number | null;
|
|
535
|
+
color?: string | null;
|
|
536
|
+
/**
|
|
537
|
+
* Partner-supplied long description. Surfaced on the dealer site detail page.
|
|
538
|
+
*/
|
|
539
|
+
description?: string;
|
|
540
|
+
extended_warranty_enabled?: boolean;
|
|
541
|
+
extended_warranty_months?: number | null;
|
|
542
|
+
/**
|
|
543
|
+
* Maps to `azlease_usatoauto.is_vendita_enabled`. When false the row is in stock
|
|
544
|
+
* but not offered for sale.
|
|
545
|
+
*/
|
|
546
|
+
is_for_sale?: boolean;
|
|
547
|
+
/**
|
|
548
|
+
* Soft-publish flag. When false the row exists in stock but is excluded from
|
|
549
|
+
* consumer-facing AI surfaces. Maps to `azlease_usatoin.visibile`.
|
|
550
|
+
*/
|
|
551
|
+
is_visible?: boolean;
|
|
552
|
+
/**
|
|
553
|
+
* Free-form short notes; surfaced as `mnet_dettagli.precisazioni`-style.
|
|
554
|
+
*/
|
|
555
|
+
notes?: string | null;
|
|
556
|
+
/**
|
|
557
|
+
* Month of registration (1–12).
|
|
558
|
+
*/
|
|
559
|
+
registration_month?: number | null;
|
|
560
|
+
/**
|
|
561
|
+
* If true the public price is displayed VAT-exposed (B2B); otherwise VAT-inclusive
|
|
562
|
+
* (B2C).
|
|
563
|
+
*/
|
|
564
|
+
vat_displayed?: boolean;
|
|
565
|
+
vehicle_damaged?: boolean;
|
|
566
|
+
/**
|
|
567
|
+
* ISO 3779 vehicle identification number. Optional but strongly recommended.
|
|
568
|
+
*/
|
|
569
|
+
vin?: string | null;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
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, };
|
|
574
|
+
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
|
+
}
|
|
576
|
+
//# sourceMappingURL=vehicles.d.ts.map
|
|
@@ -0,0 +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;AAEvD,OAAO,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