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,113 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* 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).
|
|
6
|
+
*/
|
|
7
|
+
export declare class Images extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Attach a photo to a used vehicle.
|
|
10
|
+
*
|
|
11
|
+
* The partner posts photos one at a time, in the desired display order. The first
|
|
12
|
+
* photo becomes the cover (`position=1`, `is_cover=true`) automatically;
|
|
13
|
+
* subsequent photos get the next `position`. There is intentionally no separate
|
|
14
|
+
* "set cover" endpoint — order is the contract. To re-order, DELETE and re-POST.
|
|
15
|
+
*
|
|
16
|
+
* Up to `20` photos per vehicle. Bigger payloads return `413`; unsupported formats
|
|
17
|
+
* return `415`; missing storage credentials return `503 storage_not_configured`.
|
|
18
|
+
*
|
|
19
|
+
* The uploaded photo is visible on every AI surface (MCP `search_vehicles`, Custom
|
|
20
|
+
* GPT `search-vehicles-network`, the dealer site SEO/JSON-LD, NLWeb `/ask`) within
|
|
21
|
+
* the next apimax cache TTL (≤ 5 min).
|
|
22
|
+
*/
|
|
23
|
+
create(vehicleID: string, params: ImageCreateParams, options?: RequestOptions): APIPromise<VehicleImage>;
|
|
24
|
+
/**
|
|
25
|
+
* List every photo attached to a vehicle, ordered by `position`.
|
|
26
|
+
*
|
|
27
|
+
* No pagination — a vehicle is capped at 20 photos so the full list always fits in
|
|
28
|
+
* a single response. `position=1` is the cover; use `DELETE` and re-`POST` to
|
|
29
|
+
* re-order.
|
|
30
|
+
*/
|
|
31
|
+
list(vehicleID: string, params: ImageListParams, options?: RequestOptions): APIPromise<VehicleImageList>;
|
|
32
|
+
/**
|
|
33
|
+
* Remove a photo from a vehicle.
|
|
34
|
+
*
|
|
35
|
+
* If the deleted photo was the cover (`position=1`), the next photo in order is
|
|
36
|
+
* promoted to cover automatically — partnermax re-ranks every remaining photo to
|
|
37
|
+
* contiguous 1..N so the partner never has to reason about gaps in the ordinal
|
|
38
|
+
* sequence.
|
|
39
|
+
*
|
|
40
|
+
* Returns `404 vehicle_image_not_found` if the image id is unknown or belongs to a
|
|
41
|
+
* different vehicle (cross-partner enumeration is blocked by the dealer + vehicle
|
|
42
|
+
* ACL chain).
|
|
43
|
+
*/
|
|
44
|
+
delete(imageID: string, params: ImageDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A single photo attached to a used vehicle.
|
|
48
|
+
*
|
|
49
|
+
* Returned by `POST .../images` (single upload) and as elements of
|
|
50
|
+
* `VehicleImageList.data` (list endpoint). `position == 1` is the cover photo by
|
|
51
|
+
* convention; `is_cover` mirrors it for readability.
|
|
52
|
+
*
|
|
53
|
+
* The `image_url` is the raw Supabase public URL. The cross-network AI surfaces
|
|
54
|
+
* (MCP search_vehicles, Custom GPT, NLWeb) embed a CDN AVIF-transformed variant;
|
|
55
|
+
* partners that render this URL themselves can apply Supabase's render-service
|
|
56
|
+
* query parameters (`?format=avif&quality=70&resize=contain`) for the same
|
|
57
|
+
* treatment.
|
|
58
|
+
*/
|
|
59
|
+
export interface VehicleImage {
|
|
60
|
+
created_at: string;
|
|
61
|
+
/**
|
|
62
|
+
* Opaque image identifier in the form `img_<uuid>`. Use as the path parameter on
|
|
63
|
+
* `DELETE` to remove the photo.
|
|
64
|
+
*/
|
|
65
|
+
image_id: string;
|
|
66
|
+
/**
|
|
67
|
+
* Public Supabase Storage URL of the original upload. Stable for the lifetime of
|
|
68
|
+
* the photo.
|
|
69
|
+
*/
|
|
70
|
+
image_url: string;
|
|
71
|
+
/**
|
|
72
|
+
* True when `position == 1`. Surfaced as a separate field so partners can branch
|
|
73
|
+
* on cover handling without doing integer arithmetic on positions.
|
|
74
|
+
*/
|
|
75
|
+
is_cover: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 1-based ordinal among this vehicle's photos. `position=1` is the cover that
|
|
78
|
+
* appears on every AI surface; subsequent positions are gallery photos shown on
|
|
79
|
+
* the dealer site detail page.
|
|
80
|
+
*/
|
|
81
|
+
position: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* All photos attached to a single vehicle, ordered by `position`.
|
|
85
|
+
*
|
|
86
|
+
* No pagination — a vehicle is capped at `VEHICLE_IMAGE_MAX_PER_VEHICLE` photos by
|
|
87
|
+
* contract, so the full list always fits in one response.
|
|
88
|
+
*/
|
|
89
|
+
export interface VehicleImageList {
|
|
90
|
+
data: Array<VehicleImage>;
|
|
91
|
+
}
|
|
92
|
+
export interface ImageCreateParams {
|
|
93
|
+
/**
|
|
94
|
+
* Path param
|
|
95
|
+
*/
|
|
96
|
+
dealer_id: string;
|
|
97
|
+
/**
|
|
98
|
+
* Body param: The photo file. JPEG, PNG, or WebP, up to 15 MB. WebP is converted
|
|
99
|
+
* to PNG server-side.
|
|
100
|
+
*/
|
|
101
|
+
file: string;
|
|
102
|
+
}
|
|
103
|
+
export interface ImageListParams {
|
|
104
|
+
dealer_id: string;
|
|
105
|
+
}
|
|
106
|
+
export interface ImageDeleteParams {
|
|
107
|
+
dealer_id: string;
|
|
108
|
+
vehicle_id: string;
|
|
109
|
+
}
|
|
110
|
+
export declare namespace Images {
|
|
111
|
+
export { type VehicleImage as VehicleImage, type VehicleImageList as VehicleImageList, type ImageCreateParams as ImageCreateParams, type ImageListParams as ImageListParams, type ImageDeleteParams as ImageDeleteParams, };
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=images.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"images.d.mts","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/images.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAInE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;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AAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* 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).
|
|
6
|
+
*/
|
|
7
|
+
export declare class Images extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Attach a photo to a used vehicle.
|
|
10
|
+
*
|
|
11
|
+
* The partner posts photos one at a time, in the desired display order. The first
|
|
12
|
+
* photo becomes the cover (`position=1`, `is_cover=true`) automatically;
|
|
13
|
+
* subsequent photos get the next `position`. There is intentionally no separate
|
|
14
|
+
* "set cover" endpoint — order is the contract. To re-order, DELETE and re-POST.
|
|
15
|
+
*
|
|
16
|
+
* Up to `20` photos per vehicle. Bigger payloads return `413`; unsupported formats
|
|
17
|
+
* return `415`; missing storage credentials return `503 storage_not_configured`.
|
|
18
|
+
*
|
|
19
|
+
* The uploaded photo is visible on every AI surface (MCP `search_vehicles`, Custom
|
|
20
|
+
* GPT `search-vehicles-network`, the dealer site SEO/JSON-LD, NLWeb `/ask`) within
|
|
21
|
+
* the next apimax cache TTL (≤ 5 min).
|
|
22
|
+
*/
|
|
23
|
+
create(vehicleID: string, params: ImageCreateParams, options?: RequestOptions): APIPromise<VehicleImage>;
|
|
24
|
+
/**
|
|
25
|
+
* List every photo attached to a vehicle, ordered by `position`.
|
|
26
|
+
*
|
|
27
|
+
* No pagination — a vehicle is capped at 20 photos so the full list always fits in
|
|
28
|
+
* a single response. `position=1` is the cover; use `DELETE` and re-`POST` to
|
|
29
|
+
* re-order.
|
|
30
|
+
*/
|
|
31
|
+
list(vehicleID: string, params: ImageListParams, options?: RequestOptions): APIPromise<VehicleImageList>;
|
|
32
|
+
/**
|
|
33
|
+
* Remove a photo from a vehicle.
|
|
34
|
+
*
|
|
35
|
+
* If the deleted photo was the cover (`position=1`), the next photo in order is
|
|
36
|
+
* promoted to cover automatically — partnermax re-ranks every remaining photo to
|
|
37
|
+
* contiguous 1..N so the partner never has to reason about gaps in the ordinal
|
|
38
|
+
* sequence.
|
|
39
|
+
*
|
|
40
|
+
* Returns `404 vehicle_image_not_found` if the image id is unknown or belongs to a
|
|
41
|
+
* different vehicle (cross-partner enumeration is blocked by the dealer + vehicle
|
|
42
|
+
* ACL chain).
|
|
43
|
+
*/
|
|
44
|
+
delete(imageID: string, params: ImageDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A single photo attached to a used vehicle.
|
|
48
|
+
*
|
|
49
|
+
* Returned by `POST .../images` (single upload) and as elements of
|
|
50
|
+
* `VehicleImageList.data` (list endpoint). `position == 1` is the cover photo by
|
|
51
|
+
* convention; `is_cover` mirrors it for readability.
|
|
52
|
+
*
|
|
53
|
+
* The `image_url` is the raw Supabase public URL. The cross-network AI surfaces
|
|
54
|
+
* (MCP search_vehicles, Custom GPT, NLWeb) embed a CDN AVIF-transformed variant;
|
|
55
|
+
* partners that render this URL themselves can apply Supabase's render-service
|
|
56
|
+
* query parameters (`?format=avif&quality=70&resize=contain`) for the same
|
|
57
|
+
* treatment.
|
|
58
|
+
*/
|
|
59
|
+
export interface VehicleImage {
|
|
60
|
+
created_at: string;
|
|
61
|
+
/**
|
|
62
|
+
* Opaque image identifier in the form `img_<uuid>`. Use as the path parameter on
|
|
63
|
+
* `DELETE` to remove the photo.
|
|
64
|
+
*/
|
|
65
|
+
image_id: string;
|
|
66
|
+
/**
|
|
67
|
+
* Public Supabase Storage URL of the original upload. Stable for the lifetime of
|
|
68
|
+
* the photo.
|
|
69
|
+
*/
|
|
70
|
+
image_url: string;
|
|
71
|
+
/**
|
|
72
|
+
* True when `position == 1`. Surfaced as a separate field so partners can branch
|
|
73
|
+
* on cover handling without doing integer arithmetic on positions.
|
|
74
|
+
*/
|
|
75
|
+
is_cover: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 1-based ordinal among this vehicle's photos. `position=1` is the cover that
|
|
78
|
+
* appears on every AI surface; subsequent positions are gallery photos shown on
|
|
79
|
+
* the dealer site detail page.
|
|
80
|
+
*/
|
|
81
|
+
position: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* All photos attached to a single vehicle, ordered by `position`.
|
|
85
|
+
*
|
|
86
|
+
* No pagination — a vehicle is capped at `VEHICLE_IMAGE_MAX_PER_VEHICLE` photos by
|
|
87
|
+
* contract, so the full list always fits in one response.
|
|
88
|
+
*/
|
|
89
|
+
export interface VehicleImageList {
|
|
90
|
+
data: Array<VehicleImage>;
|
|
91
|
+
}
|
|
92
|
+
export interface ImageCreateParams {
|
|
93
|
+
/**
|
|
94
|
+
* Path param
|
|
95
|
+
*/
|
|
96
|
+
dealer_id: string;
|
|
97
|
+
/**
|
|
98
|
+
* Body param: The photo file. JPEG, PNG, or WebP, up to 15 MB. WebP is converted
|
|
99
|
+
* to PNG server-side.
|
|
100
|
+
*/
|
|
101
|
+
file: string;
|
|
102
|
+
}
|
|
103
|
+
export interface ImageListParams {
|
|
104
|
+
dealer_id: string;
|
|
105
|
+
}
|
|
106
|
+
export interface ImageDeleteParams {
|
|
107
|
+
dealer_id: string;
|
|
108
|
+
vehicle_id: string;
|
|
109
|
+
}
|
|
110
|
+
export declare namespace Images {
|
|
111
|
+
export { type VehicleImage as VehicleImage, type VehicleImageList as VehicleImageList, type ImageCreateParams as ImageCreateParams, type ImageListParams as ImageListParams, type ImageDeleteParams as ImageDeleteParams, };
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=images.d.ts.map
|
|
@@ -0,0 +1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;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAElB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Images = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
7
|
+
const uploads_1 = require("../../../internal/uploads.js");
|
|
8
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
9
|
+
/**
|
|
10
|
+
* 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
|
+
*/
|
|
12
|
+
class Images extends resource_1.APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Attach a photo to a used vehicle.
|
|
15
|
+
*
|
|
16
|
+
* The partner posts photos one at a time, in the desired display order. The first
|
|
17
|
+
* photo becomes the cover (`position=1`, `is_cover=true`) automatically;
|
|
18
|
+
* subsequent photos get the next `position`. There is intentionally no separate
|
|
19
|
+
* "set cover" endpoint — order is the contract. To re-order, DELETE and re-POST.
|
|
20
|
+
*
|
|
21
|
+
* Up to `20` photos per vehicle. Bigger payloads return `413`; unsupported formats
|
|
22
|
+
* return `415`; missing storage credentials return `503 storage_not_configured`.
|
|
23
|
+
*
|
|
24
|
+
* The uploaded photo is visible on every AI surface (MCP `search_vehicles`, Custom
|
|
25
|
+
* GPT `search-vehicles-network`, the dealer site SEO/JSON-LD, NLWeb `/ask`) within
|
|
26
|
+
* the next apimax cache TTL (≤ 5 min).
|
|
27
|
+
*/
|
|
28
|
+
create(vehicleID, params, options) {
|
|
29
|
+
const { dealer_id, ...body } = params;
|
|
30
|
+
return this._client.post((0, path_1.path) `/v1/dealers/${dealer_id}/vehicles/${vehicleID}/images`, (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* List every photo attached to a vehicle, ordered by `position`.
|
|
34
|
+
*
|
|
35
|
+
* No pagination — a vehicle is capped at 20 photos so the full list always fits in
|
|
36
|
+
* a single response. `position=1` is the cover; use `DELETE` and re-`POST` to
|
|
37
|
+
* re-order.
|
|
38
|
+
*/
|
|
39
|
+
list(vehicleID, params, options) {
|
|
40
|
+
const { dealer_id } = params;
|
|
41
|
+
return this._client.get((0, path_1.path) `/v1/dealers/${dealer_id}/vehicles/${vehicleID}/images`, options);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Remove a photo from a vehicle.
|
|
45
|
+
*
|
|
46
|
+
* If the deleted photo was the cover (`position=1`), the next photo in order is
|
|
47
|
+
* promoted to cover automatically — partnermax re-ranks every remaining photo to
|
|
48
|
+
* contiguous 1..N so the partner never has to reason about gaps in the ordinal
|
|
49
|
+
* sequence.
|
|
50
|
+
*
|
|
51
|
+
* Returns `404 vehicle_image_not_found` if the image id is unknown or belongs to a
|
|
52
|
+
* different vehicle (cross-partner enumeration is blocked by the dealer + vehicle
|
|
53
|
+
* ACL chain).
|
|
54
|
+
*/
|
|
55
|
+
delete(imageID, params, options) {
|
|
56
|
+
const { dealer_id, vehicle_id } = params;
|
|
57
|
+
return this._client.delete((0, path_1.path) `/v1/dealers/${dealer_id}/vehicles/${vehicle_id}/images/${imageID}`, {
|
|
58
|
+
...options,
|
|
59
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.Images = Images;
|
|
64
|
+
//# sourceMappingURL=images.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"images.js","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/images.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAwE;AACxE,0DAAoD;AAEpD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,SAAiB,EAAE,MAAyB,EAAE,OAAwB;QAC3E,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,eAAe,SAAS,aAAa,SAAS,SAAS,EAC3D,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,SAAiB,EAAE,MAAuB,EAAE,OAAwB;QACvE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,SAAS,aAAa,SAAS,SAAS,EAAE,OAAO,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,OAAe,EAAE,MAAyB,EAAE,OAAwB;QACzE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,eAAe,SAAS,aAAa,UAAU,WAAW,OAAO,EAAE,EAAE;YAClG,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAvDD,wBAuDC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
4
|
+
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
|
|
5
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
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 class Images extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Attach a photo to a used vehicle.
|
|
12
|
+
*
|
|
13
|
+
* The partner posts photos one at a time, in the desired display order. The first
|
|
14
|
+
* photo becomes the cover (`position=1`, `is_cover=true`) automatically;
|
|
15
|
+
* subsequent photos get the next `position`. There is intentionally no separate
|
|
16
|
+
* "set cover" endpoint — order is the contract. To re-order, DELETE and re-POST.
|
|
17
|
+
*
|
|
18
|
+
* Up to `20` photos per vehicle. Bigger payloads return `413`; unsupported formats
|
|
19
|
+
* return `415`; missing storage credentials return `503 storage_not_configured`.
|
|
20
|
+
*
|
|
21
|
+
* The uploaded photo is visible on every AI surface (MCP `search_vehicles`, Custom
|
|
22
|
+
* GPT `search-vehicles-network`, the dealer site SEO/JSON-LD, NLWeb `/ask`) within
|
|
23
|
+
* the next apimax cache TTL (≤ 5 min).
|
|
24
|
+
*/
|
|
25
|
+
create(vehicleID, params, options) {
|
|
26
|
+
const { dealer_id, ...body } = params;
|
|
27
|
+
return this._client.post(path `/v1/dealers/${dealer_id}/vehicles/${vehicleID}/images`, multipartFormRequestOptions({ body, ...options }, this._client));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* List every photo attached to a vehicle, ordered by `position`.
|
|
31
|
+
*
|
|
32
|
+
* No pagination — a vehicle is capped at 20 photos so the full list always fits in
|
|
33
|
+
* a single response. `position=1` is the cover; use `DELETE` and re-`POST` to
|
|
34
|
+
* re-order.
|
|
35
|
+
*/
|
|
36
|
+
list(vehicleID, params, options) {
|
|
37
|
+
const { dealer_id } = params;
|
|
38
|
+
return this._client.get(path `/v1/dealers/${dealer_id}/vehicles/${vehicleID}/images`, options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Remove a photo from a vehicle.
|
|
42
|
+
*
|
|
43
|
+
* If the deleted photo was the cover (`position=1`), the next photo in order is
|
|
44
|
+
* promoted to cover automatically — partnermax re-ranks every remaining photo to
|
|
45
|
+
* contiguous 1..N so the partner never has to reason about gaps in the ordinal
|
|
46
|
+
* sequence.
|
|
47
|
+
*
|
|
48
|
+
* Returns `404 vehicle_image_not_found` if the image id is unknown or belongs to a
|
|
49
|
+
* different vehicle (cross-partner enumeration is blocked by the dealer + vehicle
|
|
50
|
+
* ACL chain).
|
|
51
|
+
*/
|
|
52
|
+
delete(imageID, params, options) {
|
|
53
|
+
const { dealer_id, vehicle_id } = params;
|
|
54
|
+
return this._client.delete(path `/v1/dealers/${dealer_id}/vehicles/${vehicle_id}/images/${imageID}`, {
|
|
55
|
+
...options,
|
|
56
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=images.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"images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AAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Images, type VehicleImage, type VehicleImageList, type ImageCreateParams, type ImageListParams, type ImageDeleteParams, } from "./images.mjs";
|
|
2
|
+
export { Vehicles, type AIContent, type BulkCreateVehiclesResponse, type BulkRowOutcome, type VehicleDetail, type VehicleList, type VehicleSummary, type VehicleCreateParams, type VehicleRetrieveParams, type VehicleUpdateParams, type VehicleListParams, type VehicleDeleteParams, type VehicleBulkParams, } from "./vehicles.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,qBAAiB;AAClB,OAAO,EACL,QAAQ,EACR,KAAK,SAAS,EACd,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,uBAAmB"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Images, type VehicleImage, type VehicleImageList, type ImageCreateParams, type ImageListParams, type ImageDeleteParams, } from "./images.js";
|
|
2
|
+
export { Vehicles, type AIContent, type BulkCreateVehiclesResponse, type BulkRowOutcome, type VehicleDetail, type VehicleList, type VehicleSummary, type VehicleCreateParams, type VehicleRetrieveParams, type VehicleUpdateParams, type VehicleListParams, type VehicleDeleteParams, type VehicleBulkParams, } from "./vehicles.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,oBAAiB;AAClB,OAAO,EACL,QAAQ,EACR,KAAK,SAAS,EACd,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,sBAAmB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Vehicles = exports.Images = void 0;
|
|
5
|
+
var images_1 = require("./images.js");
|
|
6
|
+
Object.defineProperty(exports, "Images", { enumerable: true, get: function () { return images_1.Images; } });
|
|
7
|
+
var vehicles_1 = require("./vehicles.js");
|
|
8
|
+
Object.defineProperty(exports, "Vehicles", { enumerable: true, get: function () { return vehicles_1.Vehicles; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAOkB;AANhB,gGAAA,MAAM,OAAA;AAOR,0CAcoB;AAblB,oGAAA,QAAQ,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,MAAM,GAMP,qBAAiB;AAClB,OAAO,EACL,QAAQ,GAaT,uBAAmB"}
|