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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Offers = void 0;
|
|
5
5
|
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
6
7
|
const path_1 = require("../../../internal/utils/path.js");
|
|
7
8
|
class Offers extends resource_1.APIResource {
|
|
8
9
|
/**
|
|
@@ -16,19 +17,16 @@ class Offers extends resource_1.APIResource {
|
|
|
16
17
|
/**
|
|
17
18
|
* Listing of NLT offers with monthly canon repriced for this dealer.
|
|
18
19
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* row lets us know if there's a next page without a second COUNT(\*) query.
|
|
24
|
-
* 3. Apply text/enum filters server-side via SQL where possible (brand, segment,
|
|
25
|
-
* fuel) and the numeric `canone_max_eur` filter in Python after the pricing
|
|
26
|
-
* pass (the DB has no "displayed canon" column; we synthesize it per dealer).
|
|
27
|
-
* 4. For each surviving offer, price the (duration, km) cells the caller filtered
|
|
28
|
-
* to (if specified) or all 18, pick the cheapest cell as the headline.
|
|
20
|
+
* The response is cursor-paginated and dealer-aware: filters are applied to the
|
|
21
|
+
* shared NLT catalogue, then each returned offer is repriced with the dealer's
|
|
22
|
+
* configured mark-up, down-payment tiers, duration, and yearly-km filters. The
|
|
23
|
+
* headline canon is the cheapest eligible priced cell.
|
|
29
24
|
*/
|
|
30
25
|
list(dealerID, query = {}, options) {
|
|
31
|
-
return this._client.
|
|
26
|
+
return this._client.getAPIList((0, path_1.path) `/v1/dealers/${dealerID}/nlt/offers`, (pagination_1.CursorPage), {
|
|
27
|
+
query,
|
|
28
|
+
...options,
|
|
29
|
+
});
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
exports.Offers = Offers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offers.js","sourceRoot":"","sources":["../../../src/resources/dealers/nlt/offers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;
|
|
1
|
+
{"version":3,"file":"offers.js","sourceRoot":"","sources":["../../../src/resources/dealers/nlt/offers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,4DAA0F;AAE1F,0DAAoD;AAEpD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;OAGG;IACH,QAAQ,CACN,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,SAAS,eAAe,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAAgB,EAChB,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,aAAa,EAAE,CAAA,uBAA2B,CAAA,EAAE;YACpG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAhCD,wBAgCC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../../../core/pagination.mjs";
|
|
3
4
|
import { path } from "../../../internal/utils/path.mjs";
|
|
4
5
|
export class Offers extends APIResource {
|
|
5
6
|
/**
|
|
@@ -13,19 +14,16 @@ export class Offers extends APIResource {
|
|
|
13
14
|
/**
|
|
14
15
|
* Listing of NLT offers with monthly canon repriced for this dealer.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* row lets us know if there's a next page without a second COUNT(\*) query.
|
|
21
|
-
* 3. Apply text/enum filters server-side via SQL where possible (brand, segment,
|
|
22
|
-
* fuel) and the numeric `canone_max_eur` filter in Python after the pricing
|
|
23
|
-
* pass (the DB has no "displayed canon" column; we synthesize it per dealer).
|
|
24
|
-
* 4. For each surviving offer, price the (duration, km) cells the caller filtered
|
|
25
|
-
* to (if specified) or all 18, pick the cheapest cell as the headline.
|
|
17
|
+
* The response is cursor-paginated and dealer-aware: filters are applied to the
|
|
18
|
+
* shared NLT catalogue, then each returned offer is repriced with the dealer's
|
|
19
|
+
* configured mark-up, down-payment tiers, duration, and yearly-km filters. The
|
|
20
|
+
* headline canon is the cheapest eligible priced cell.
|
|
26
21
|
*/
|
|
27
22
|
list(dealerID, query = {}, options) {
|
|
28
|
-
return this._client.
|
|
23
|
+
return this._client.getAPIList(path `/v1/dealers/${dealerID}/nlt/offers`, (CursorPage), {
|
|
24
|
+
query,
|
|
25
|
+
...options,
|
|
26
|
+
});
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
//# sourceMappingURL=offers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offers.mjs","sourceRoot":"","sources":["../../../src/resources/dealers/nlt/offers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;
|
|
1
|
+
{"version":3,"file":"offers.mjs","sourceRoot":"","sources":["../../../src/resources/dealers/nlt/offers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,UAAU,EAAsC,qCAAiC;AAE1F,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;OAGG;IACH,QAAQ,CACN,OAAe,EACf,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,SAAS,eAAe,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAAgB,EAChB,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,eAAe,QAAQ,aAAa,EAAE,CAAA,UAA2B,CAAA,EAAE;YACpG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -7,7 +7,7 @@ export declare class NltSettings extends APIResource {
|
|
|
7
7
|
*/
|
|
8
8
|
retrieve(dealerID: string, options?: RequestOptions): APIPromise<NltSettings>;
|
|
9
9
|
/**
|
|
10
|
-
* Set markup percent (0-10)
|
|
10
|
+
* Set markup percent (0-10), three down-payment tiers, and image mode.
|
|
11
11
|
*
|
|
12
12
|
* Validation:
|
|
13
13
|
*
|
|
@@ -16,18 +16,9 @@ export declare class NltSettings extends APIResource {
|
|
|
16
16
|
* `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
|
|
17
17
|
* final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* live column is `Integer NOT NULL DEFAULT 2`).
|
|
23
|
-
* - `down_payment_tiers` → `dealer_public.nlt_anticipi_config` JSONB, stored in
|
|
24
|
-
* apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
|
|
25
|
-
* `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
|
|
26
|
-
* with the DealerMAX UI calculator that reads the same JSONB.
|
|
27
|
-
*
|
|
28
|
-
* There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
|
|
29
|
-
* in the canonical DataMax pricing model, not per-dealer. The offer detail
|
|
30
|
-
* endpoint surfaces it per row instead.
|
|
19
|
+
* The stored economics are immediately used by DealerMAX's dealer-aware NLT
|
|
20
|
+
* calculator. There is NO `vat_treatment` field: VAT is per-offer, not per-dealer.
|
|
21
|
+
* The offer detail endpoint surfaces it per row instead.
|
|
31
22
|
*
|
|
32
23
|
* `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
|
|
33
24
|
* PATCH is also a row-level no-op by construction.
|
|
@@ -40,47 +31,32 @@ export declare class NltSettings extends APIResource {
|
|
|
40
31
|
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
41
32
|
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
42
33
|
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
43
|
-
* semantics (low/medium/high) are advisory —
|
|
44
|
-
*
|
|
34
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
35
|
+
* as opaque slots ordered by intent.
|
|
45
36
|
*/
|
|
46
37
|
export interface DownPaymentTiers {
|
|
47
38
|
/**
|
|
48
39
|
* One down-payment tier — percent of list price + flat EUR.
|
|
49
40
|
*
|
|
50
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
51
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
52
|
-
* `listino_imponibile * pct + eur` (see
|
|
53
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
54
|
-
*
|
|
55
41
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
56
|
-
* `12.5`, not `0.125`)
|
|
57
|
-
*
|
|
42
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
43
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
58
44
|
*/
|
|
59
45
|
high: DownPaymentTiers.High;
|
|
60
46
|
/**
|
|
61
47
|
* One down-payment tier — percent of list price + flat EUR.
|
|
62
48
|
*
|
|
63
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
64
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
65
|
-
* `listino_imponibile * pct + eur` (see
|
|
66
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
67
|
-
*
|
|
68
49
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
69
|
-
* `12.5`, not `0.125`)
|
|
70
|
-
*
|
|
50
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
51
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
71
52
|
*/
|
|
72
53
|
low: DownPaymentTiers.Low;
|
|
73
54
|
/**
|
|
74
55
|
* One down-payment tier — percent of list price + flat EUR.
|
|
75
56
|
*
|
|
76
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
77
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
78
|
-
* `listino_imponibile * pct + eur` (see
|
|
79
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
80
|
-
*
|
|
81
57
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
82
|
-
* `12.5`, not `0.125`)
|
|
83
|
-
*
|
|
58
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
59
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
84
60
|
*/
|
|
85
61
|
medium: DownPaymentTiers.Medium;
|
|
86
62
|
}
|
|
@@ -88,14 +64,9 @@ export declare namespace DownPaymentTiers {
|
|
|
88
64
|
/**
|
|
89
65
|
* One down-payment tier — percent of list price + flat EUR.
|
|
90
66
|
*
|
|
91
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
92
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
93
|
-
* `listino_imponibile * pct + eur` (see
|
|
94
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
95
|
-
*
|
|
96
67
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
97
|
-
* `12.5`, not `0.125`)
|
|
98
|
-
*
|
|
68
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
69
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
99
70
|
*/
|
|
100
71
|
interface High {
|
|
101
72
|
/**
|
|
@@ -112,14 +83,9 @@ export declare namespace DownPaymentTiers {
|
|
|
112
83
|
/**
|
|
113
84
|
* One down-payment tier — percent of list price + flat EUR.
|
|
114
85
|
*
|
|
115
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
116
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
117
|
-
* `listino_imponibile * pct + eur` (see
|
|
118
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
119
|
-
*
|
|
120
86
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
121
|
-
* `12.5`, not `0.125`)
|
|
122
|
-
*
|
|
87
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
88
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
123
89
|
*/
|
|
124
90
|
interface Low {
|
|
125
91
|
/**
|
|
@@ -136,14 +102,9 @@ export declare namespace DownPaymentTiers {
|
|
|
136
102
|
/**
|
|
137
103
|
* One down-payment tier — percent of list price + flat EUR.
|
|
138
104
|
*
|
|
139
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
140
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
141
|
-
* `listino_imponibile * pct + eur` (see
|
|
142
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
143
|
-
*
|
|
144
105
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
145
|
-
* `12.5`, not `0.125`)
|
|
146
|
-
*
|
|
106
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
107
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
147
108
|
*/
|
|
148
109
|
interface Medium {
|
|
149
110
|
/**
|
|
@@ -161,9 +122,8 @@ export declare namespace DownPaymentTiers {
|
|
|
161
122
|
/**
|
|
162
123
|
* Response model for GET / PATCH /v1/dealers/{id}/nlt-settings.
|
|
163
124
|
*
|
|
164
|
-
* Note: there is no `vat_treatment` field — VAT is a property of the offer
|
|
165
|
-
*
|
|
166
|
-
* VAT treatment per row instead.
|
|
125
|
+
* Note: there is no `vat_treatment` field — VAT is a property of the offer, not of
|
|
126
|
+
* the dealer. The offer detail returns the VAT treatment per row instead.
|
|
167
127
|
*/
|
|
168
128
|
export interface NltSettings {
|
|
169
129
|
agency_markup_percent: number;
|
|
@@ -174,8 +134,8 @@ export interface NltSettings {
|
|
|
174
134
|
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
175
135
|
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
176
136
|
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
177
|
-
* semantics (low/medium/high) are advisory —
|
|
178
|
-
*
|
|
137
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
138
|
+
* as opaque slots ordered by intent.
|
|
179
139
|
*/
|
|
180
140
|
down_payment_tiers: DownPaymentTiers;
|
|
181
141
|
effective_from: string;
|
|
@@ -194,8 +154,8 @@ export interface NltSettingUpdateParams {
|
|
|
194
154
|
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
195
155
|
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
196
156
|
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
197
|
-
* semantics (low/medium/high) are advisory —
|
|
198
|
-
*
|
|
157
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
158
|
+
* as opaque slots ordered by intent.
|
|
199
159
|
*/
|
|
200
160
|
down_payment_tiers: DownPaymentTiers;
|
|
201
161
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nlt-settings.d.mts","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAI7E
|
|
1
|
+
{"version":3,"file":"nlt-settings.d.mts","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAI7E;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;CAW3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAE5B;;;;;;OAMG;IACH,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAE1B;;;;;;OAMG;IACH,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;CACjC;AAED,yBAAiB,gBAAgB,CAAC;IAChC;;;;;;OAMG;IACH,UAAiB,IAAI;QACnB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;IAED;;;;;;OAMG;IACH,UAAiB,GAAG;QAClB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;IAED;;;;;;OAMG;IACH,UAAiB,MAAM;QACrB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;CACF;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAE9B,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IAErC,cAAc,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;IAEjE,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;CAChG;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;;;;;;;OAQG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;IAEjE;;OAEG;IACH,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAE/F;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -7,7 +7,7 @@ export declare class NltSettings extends APIResource {
|
|
|
7
7
|
*/
|
|
8
8
|
retrieve(dealerID: string, options?: RequestOptions): APIPromise<NltSettings>;
|
|
9
9
|
/**
|
|
10
|
-
* Set markup percent (0-10)
|
|
10
|
+
* Set markup percent (0-10), three down-payment tiers, and image mode.
|
|
11
11
|
*
|
|
12
12
|
* Validation:
|
|
13
13
|
*
|
|
@@ -16,18 +16,9 @@ export declare class NltSettings extends APIResource {
|
|
|
16
16
|
* `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
|
|
17
17
|
* final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* live column is `Integer NOT NULL DEFAULT 2`).
|
|
23
|
-
* - `down_payment_tiers` → `dealer_public.nlt_anticipi_config` JSONB, stored in
|
|
24
|
-
* apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
|
|
25
|
-
* `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
|
|
26
|
-
* with the DealerMAX UI calculator that reads the same JSONB.
|
|
27
|
-
*
|
|
28
|
-
* There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
|
|
29
|
-
* in the canonical DataMax pricing model, not per-dealer. The offer detail
|
|
30
|
-
* endpoint surfaces it per row instead.
|
|
19
|
+
* The stored economics are immediately used by DealerMAX's dealer-aware NLT
|
|
20
|
+
* calculator. There is NO `vat_treatment` field: VAT is per-offer, not per-dealer.
|
|
21
|
+
* The offer detail endpoint surfaces it per row instead.
|
|
31
22
|
*
|
|
32
23
|
* `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
|
|
33
24
|
* PATCH is also a row-level no-op by construction.
|
|
@@ -40,47 +31,32 @@ export declare class NltSettings extends APIResource {
|
|
|
40
31
|
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
41
32
|
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
42
33
|
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
43
|
-
* semantics (low/medium/high) are advisory —
|
|
44
|
-
*
|
|
34
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
35
|
+
* as opaque slots ordered by intent.
|
|
45
36
|
*/
|
|
46
37
|
export interface DownPaymentTiers {
|
|
47
38
|
/**
|
|
48
39
|
* One down-payment tier — percent of list price + flat EUR.
|
|
49
40
|
*
|
|
50
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
51
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
52
|
-
* `listino_imponibile * pct + eur` (see
|
|
53
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
54
|
-
*
|
|
55
41
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
56
|
-
* `12.5`, not `0.125`)
|
|
57
|
-
*
|
|
42
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
43
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
58
44
|
*/
|
|
59
45
|
high: DownPaymentTiers.High;
|
|
60
46
|
/**
|
|
61
47
|
* One down-payment tier — percent of list price + flat EUR.
|
|
62
48
|
*
|
|
63
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
64
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
65
|
-
* `listino_imponibile * pct + eur` (see
|
|
66
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
67
|
-
*
|
|
68
49
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
69
|
-
* `12.5`, not `0.125`)
|
|
70
|
-
*
|
|
50
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
51
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
71
52
|
*/
|
|
72
53
|
low: DownPaymentTiers.Low;
|
|
73
54
|
/**
|
|
74
55
|
* One down-payment tier — percent of list price + flat EUR.
|
|
75
56
|
*
|
|
76
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
77
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
78
|
-
* `listino_imponibile * pct + eur` (see
|
|
79
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
80
|
-
*
|
|
81
57
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
82
|
-
* `12.5`, not `0.125`)
|
|
83
|
-
*
|
|
58
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
59
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
84
60
|
*/
|
|
85
61
|
medium: DownPaymentTiers.Medium;
|
|
86
62
|
}
|
|
@@ -88,14 +64,9 @@ export declare namespace DownPaymentTiers {
|
|
|
88
64
|
/**
|
|
89
65
|
* One down-payment tier — percent of list price + flat EUR.
|
|
90
66
|
*
|
|
91
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
92
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
93
|
-
* `listino_imponibile * pct + eur` (see
|
|
94
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
95
|
-
*
|
|
96
67
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
97
|
-
* `12.5`, not `0.125`)
|
|
98
|
-
*
|
|
68
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
69
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
99
70
|
*/
|
|
100
71
|
interface High {
|
|
101
72
|
/**
|
|
@@ -112,14 +83,9 @@ export declare namespace DownPaymentTiers {
|
|
|
112
83
|
/**
|
|
113
84
|
* One down-payment tier — percent of list price + flat EUR.
|
|
114
85
|
*
|
|
115
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
116
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
117
|
-
* `listino_imponibile * pct + eur` (see
|
|
118
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
119
|
-
*
|
|
120
86
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
121
|
-
* `12.5`, not `0.125`)
|
|
122
|
-
*
|
|
87
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
88
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
123
89
|
*/
|
|
124
90
|
interface Low {
|
|
125
91
|
/**
|
|
@@ -136,14 +102,9 @@ export declare namespace DownPaymentTiers {
|
|
|
136
102
|
/**
|
|
137
103
|
* One down-payment tier — percent of list price + flat EUR.
|
|
138
104
|
*
|
|
139
|
-
* apimax: `dealer_public.nlt_anticipi_config` is a JSONB list of three
|
|
140
|
-
* `{"pct": <0..1>, "eur": <int>}` entries. The final EUR applied to a deal is
|
|
141
|
-
* `listino_imponibile * pct + eur` (see
|
|
142
|
-
* `apimax/app/services/nlt/calculator.py::calcola_anticipo_eur`).
|
|
143
|
-
*
|
|
144
105
|
* Partnermax API exposes `percent_of_list` as a 0–100 number (UI-friendly: write
|
|
145
|
-
* `12.5`, not `0.125`)
|
|
146
|
-
*
|
|
106
|
+
* `12.5`, not `0.125`). The final EUR applied to a deal is computed from the
|
|
107
|
+
* offer's IVA-excluded list price plus the flat component.
|
|
147
108
|
*/
|
|
148
109
|
interface Medium {
|
|
149
110
|
/**
|
|
@@ -161,9 +122,8 @@ export declare namespace DownPaymentTiers {
|
|
|
161
122
|
/**
|
|
162
123
|
* Response model for GET / PATCH /v1/dealers/{id}/nlt-settings.
|
|
163
124
|
*
|
|
164
|
-
* Note: there is no `vat_treatment` field — VAT is a property of the offer
|
|
165
|
-
*
|
|
166
|
-
* VAT treatment per row instead.
|
|
125
|
+
* Note: there is no `vat_treatment` field — VAT is a property of the offer, not of
|
|
126
|
+
* the dealer. The offer detail returns the VAT treatment per row instead.
|
|
167
127
|
*/
|
|
168
128
|
export interface NltSettings {
|
|
169
129
|
agency_markup_percent: number;
|
|
@@ -174,8 +134,8 @@ export interface NltSettings {
|
|
|
174
134
|
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
175
135
|
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
176
136
|
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
177
|
-
* semantics (low/medium/high) are advisory —
|
|
178
|
-
*
|
|
137
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
138
|
+
* as opaque slots ordered by intent.
|
|
179
139
|
*/
|
|
180
140
|
down_payment_tiers: DownPaymentTiers;
|
|
181
141
|
effective_from: string;
|
|
@@ -194,8 +154,8 @@ export interface NltSettingUpdateParams {
|
|
|
194
154
|
* No strict-ascending validation: the final EUR amount depends on the offer's list
|
|
195
155
|
* price (`tier.percent_of_list / 100 * listino_imponibile + tier.fixed_eur`), so a
|
|
196
156
|
* tier that looks larger by % can produce a smaller EUR on cheap vehicles. Label
|
|
197
|
-
* semantics (low/medium/high) are advisory —
|
|
198
|
-
*
|
|
157
|
+
* semantics (low/medium/high) are advisory — DealerMAX UI treats the 3 positions
|
|
158
|
+
* as opaque slots ordered by intent.
|
|
199
159
|
*/
|
|
200
160
|
down_payment_tiers: DownPaymentTiers;
|
|
201
161
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nlt-settings.d.ts","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAI7E
|
|
1
|
+
{"version":3,"file":"nlt-settings.d.ts","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;IAI7E;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,sBAAsB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC;CAW3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;IAE5B;;;;;;OAMG;IACH,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAE1B;;;;;;OAMG;IACH,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC;CACjC;AAED,yBAAiB,gBAAgB,CAAC;IAChC;;;;;;OAMG;IACH,UAAiB,IAAI;QACnB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;IAED;;;;;;OAMG;IACH,UAAiB,GAAG;QAClB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;IAED;;;;;;OAMG;IACH,UAAiB,MAAM;QACrB;;;WAGG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,eAAe,EAAE,MAAM,CAAC;KACzB;CACF;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB,EAAE,MAAM,CAAC;IAE9B,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IAErC,cAAc,EAAE,MAAM,CAAC;IAEvB,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;IAEjE,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;CAChG;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;;;;;;;OAQG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;IAEjE;;OAEG;IACH,qBAAqB,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAE/F;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -13,7 +13,7 @@ class NltSettings extends resource_1.APIResource {
|
|
|
13
13
|
return this._client.get((0, path_1.path) `/v1/dealers/${dealerID}/nlt-settings`, options);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Set markup percent (0-10)
|
|
16
|
+
* Set markup percent (0-10), three down-payment tiers, and image mode.
|
|
17
17
|
*
|
|
18
18
|
* Validation:
|
|
19
19
|
*
|
|
@@ -22,18 +22,9 @@ class NltSettings extends resource_1.APIResource {
|
|
|
22
22
|
* `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
|
|
23
23
|
* final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* live column is `Integer NOT NULL DEFAULT 2`).
|
|
29
|
-
* - `down_payment_tiers` → `dealer_public.nlt_anticipi_config` JSONB, stored in
|
|
30
|
-
* apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
|
|
31
|
-
* `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
|
|
32
|
-
* with the DealerMAX UI calculator that reads the same JSONB.
|
|
33
|
-
*
|
|
34
|
-
* There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
|
|
35
|
-
* in the canonical DataMax pricing model, not per-dealer. The offer detail
|
|
36
|
-
* endpoint surfaces it per row instead.
|
|
25
|
+
* The stored economics are immediately used by DealerMAX's dealer-aware NLT
|
|
26
|
+
* calculator. There is NO `vat_treatment` field: VAT is per-offer, not per-dealer.
|
|
27
|
+
* The offer detail endpoint surfaces it per row instead.
|
|
37
28
|
*
|
|
38
29
|
* `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
|
|
39
30
|
* PATCH is also a row-level no-op by construction.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nlt-settings.js","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,eAAe,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"nlt-settings.js","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,eAAe,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,QAAgB,EAChB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,eAAe,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;AAxCD,kCAwCC"}
|
|
@@ -10,7 +10,7 @@ export class NltSettings extends APIResource {
|
|
|
10
10
|
return this._client.get(path `/v1/dealers/${dealerID}/nlt-settings`, options);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Set markup percent (0-10)
|
|
13
|
+
* Set markup percent (0-10), three down-payment tiers, and image mode.
|
|
14
14
|
*
|
|
15
15
|
* Validation:
|
|
16
16
|
*
|
|
@@ -19,18 +19,9 @@ export class NltSettings extends APIResource {
|
|
|
19
19
|
* `{percent_of_list (0–100), fixed_eur (≥0)}`. No strict-ascending check — the
|
|
20
20
|
* final EUR per tier is offer-dependent (`listino_imponibile * pct + eur`).
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* live column is `Integer NOT NULL DEFAULT 2`).
|
|
26
|
-
* - `down_payment_tiers` → `dealer_public.nlt_anticipi_config` JSONB, stored in
|
|
27
|
-
* apimax shape `[{"pct": <0..1>, "eur": <int>}, ...]`. The partner-facing
|
|
28
|
-
* `percent_of_list` (0–100) is divided by 100 to keep the column byte-compatible
|
|
29
|
-
* with the DealerMAX UI calculator that reads the same JSONB.
|
|
30
|
-
*
|
|
31
|
-
* There is NO `vat_treatment` field: VAT is per-offer (`nlt_offerte.solo_privati`)
|
|
32
|
-
* in the canonical DataMax pricing model, not per-dealer. The offer detail
|
|
33
|
-
* endpoint surfaces it per row instead.
|
|
22
|
+
* The stored economics are immediately used by DealerMAX's dealer-aware NLT
|
|
23
|
+
* calculator. There is NO `vat_treatment` field: VAT is per-offer, not per-dealer.
|
|
24
|
+
* The offer detail endpoint surfaces it per row instead.
|
|
34
25
|
*
|
|
35
26
|
* `Idempotency-Key` replay uses the shared endpoint helper; a re-applied identical
|
|
36
27
|
* PATCH is also a row-level no-op by construction.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nlt-settings.mjs","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,eAAe,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"nlt-settings.mjs","sourceRoot":"","sources":["../../src/resources/dealers/nlt-settings.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,eAAe,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,QAAgB,EAChB,MAA8B,EAC9B,OAAwB;QAExB,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,eAAe,QAAQ,eAAe,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;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"}
|
|
@@ -25,8 +25,9 @@ export declare class Images extends APIResource {
|
|
|
25
25
|
* List every photo attached to a vehicle, ordered by `position`.
|
|
26
26
|
*
|
|
27
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
|
|
29
|
-
* re-order
|
|
28
|
+
* a single response. `position=1` is the cover. There is no single-image
|
|
29
|
+
* retrieve/update route in v1: retrieve through this list and replace/re-order by
|
|
30
|
+
* deleting and re-posting the affected images.
|
|
30
31
|
*/
|
|
31
32
|
list(vehicleID: string, params: ImageListParams, options?: RequestOptions): APIPromise<VehicleImageList>;
|
|
32
33
|
/**
|
|
@@ -1 +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;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAQxG
|
|
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;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAQxG;;;;;;;OAOG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAKxG;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO/F;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;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"}
|
|
@@ -25,8 +25,9 @@ export declare class Images extends APIResource {
|
|
|
25
25
|
* List every photo attached to a vehicle, ordered by `position`.
|
|
26
26
|
*
|
|
27
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
|
|
29
|
-
* re-order
|
|
28
|
+
* a single response. `position=1` is the cover. There is no single-image
|
|
29
|
+
* retrieve/update route in v1: retrieve through this list and replace/re-order by
|
|
30
|
+
* deleting and re-posting the affected images.
|
|
30
31
|
*/
|
|
31
32
|
list(vehicleID: string, params: ImageListParams, options?: RequestOptions): APIPromise<VehicleImageList>;
|
|
32
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/images.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAInE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAQxG
|
|
1
|
+
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../../src/resources/dealers/vehicles/images.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAInE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC;IAQxG;;;;;;;OAOG;IACH,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAKxG;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAO/F;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;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"}
|
|
@@ -33,8 +33,9 @@ class Images extends resource_1.APIResource {
|
|
|
33
33
|
* List every photo attached to a vehicle, ordered by `position`.
|
|
34
34
|
*
|
|
35
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
|
|
37
|
-
* re-order
|
|
36
|
+
* a single response. `position=1` is the cover. There is no single-image
|
|
37
|
+
* retrieve/update route in v1: retrieve through this list and replace/re-order by
|
|
38
|
+
* deleting and re-posting the affected images.
|
|
38
39
|
*/
|
|
39
40
|
list(vehicleID, params, options) {
|
|
40
41
|
const { dealer_id } = params;
|
|
@@ -1 +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
|
|
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;;;;;;;OAOG;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;AAxDD,wBAwDC"}
|
|
@@ -30,8 +30,9 @@ export class Images extends APIResource {
|
|
|
30
30
|
* List every photo attached to a vehicle, ordered by `position`.
|
|
31
31
|
*
|
|
32
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
|
|
34
|
-
* re-order
|
|
33
|
+
* a single response. `position=1` is the cover. There is no single-image
|
|
34
|
+
* retrieve/update route in v1: retrieve through this list and replace/re-order by
|
|
35
|
+
* deleting and re-posting the affected images.
|
|
35
36
|
*/
|
|
36
37
|
list(vehicleID, params, options) {
|
|
37
38
|
const { dealer_id } = params;
|