partnermax 0.2.1 → 0.4.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.
Files changed (130) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +41 -17
  3. package/client.d.mts +12 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +12 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js +14 -4
  8. package/client.js.map +1 -1
  9. package/client.mjs +14 -4
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +57 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +57 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +108 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +102 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/internal/tslib.js +17 -17
  28. package/package.json +11 -1
  29. package/pagination.d.mts +3 -0
  30. package/pagination.d.mts.map +1 -0
  31. package/pagination.d.ts +3 -0
  32. package/pagination.d.ts.map +1 -0
  33. package/pagination.js +6 -0
  34. package/pagination.js.map +1 -0
  35. package/pagination.mjs +3 -0
  36. package/pagination.mjs.map +1 -0
  37. package/resources/dealers/dealers.d.mts +7 -71
  38. package/resources/dealers/dealers.d.mts.map +1 -1
  39. package/resources/dealers/dealers.d.ts +7 -71
  40. package/resources/dealers/dealers.d.ts.map +1 -1
  41. package/resources/dealers/dealers.js +2 -15
  42. package/resources/dealers/dealers.js.map +1 -1
  43. package/resources/dealers/dealers.mjs +2 -15
  44. package/resources/dealers/dealers.mjs.map +1 -1
  45. package/resources/dealers/index.d.mts +2 -2
  46. package/resources/dealers/index.d.mts.map +1 -1
  47. package/resources/dealers/index.d.ts +2 -2
  48. package/resources/dealers/index.d.ts.map +1 -1
  49. package/resources/dealers/index.js.map +1 -1
  50. package/resources/dealers/index.mjs.map +1 -1
  51. package/resources/dealers/nlt/index.d.mts +1 -1
  52. package/resources/dealers/nlt/index.d.mts.map +1 -1
  53. package/resources/dealers/nlt/index.d.ts +1 -1
  54. package/resources/dealers/nlt/index.d.ts.map +1 -1
  55. package/resources/dealers/nlt/nlt.d.mts +2 -2
  56. package/resources/dealers/nlt/nlt.d.mts.map +1 -1
  57. package/resources/dealers/nlt/nlt.d.ts +2 -2
  58. package/resources/dealers/nlt/nlt.d.ts.map +1 -1
  59. package/resources/dealers/nlt/offers.d.mts +55 -78
  60. package/resources/dealers/nlt/offers.d.mts.map +1 -1
  61. package/resources/dealers/nlt/offers.d.ts +55 -78
  62. package/resources/dealers/nlt/offers.d.ts.map +1 -1
  63. package/resources/dealers/nlt/offers.js +9 -11
  64. package/resources/dealers/nlt/offers.js.map +1 -1
  65. package/resources/dealers/nlt/offers.mjs +9 -11
  66. package/resources/dealers/nlt/offers.mjs.map +1 -1
  67. package/resources/dealers/nlt-settings.d.mts +24 -64
  68. package/resources/dealers/nlt-settings.d.mts.map +1 -1
  69. package/resources/dealers/nlt-settings.d.ts +24 -64
  70. package/resources/dealers/nlt-settings.d.ts.map +1 -1
  71. package/resources/dealers/nlt-settings.js +4 -13
  72. package/resources/dealers/nlt-settings.js.map +1 -1
  73. package/resources/dealers/nlt-settings.mjs +4 -13
  74. package/resources/dealers/nlt-settings.mjs.map +1 -1
  75. package/resources/dealers/vehicles/images.d.mts +3 -2
  76. package/resources/dealers/vehicles/images.d.mts.map +1 -1
  77. package/resources/dealers/vehicles/images.d.ts +3 -2
  78. package/resources/dealers/vehicles/images.d.ts.map +1 -1
  79. package/resources/dealers/vehicles/images.js +3 -2
  80. package/resources/dealers/vehicles/images.js.map +1 -1
  81. package/resources/dealers/vehicles/images.mjs +3 -2
  82. package/resources/dealers/vehicles/images.mjs.map +1 -1
  83. package/resources/dealers/vehicles/index.d.mts +1 -1
  84. package/resources/dealers/vehicles/index.d.mts.map +1 -1
  85. package/resources/dealers/vehicles/index.d.ts +1 -1
  86. package/resources/dealers/vehicles/index.d.ts.map +1 -1
  87. package/resources/dealers/vehicles/index.js.map +1 -1
  88. package/resources/dealers/vehicles/index.mjs.map +1 -1
  89. package/resources/dealers/vehicles/vehicles.d.mts +57 -70
  90. package/resources/dealers/vehicles/vehicles.d.mts.map +1 -1
  91. package/resources/dealers/vehicles/vehicles.d.ts +57 -70
  92. package/resources/dealers/vehicles/vehicles.d.ts.map +1 -1
  93. package/resources/dealers/vehicles/vehicles.js +18 -18
  94. package/resources/dealers/vehicles/vehicles.js.map +1 -1
  95. package/resources/dealers/vehicles/vehicles.mjs +18 -18
  96. package/resources/dealers/vehicles/vehicles.mjs.map +1 -1
  97. package/resources/index.d.mts +1 -1
  98. package/resources/index.d.mts.map +1 -1
  99. package/resources/index.d.ts +1 -1
  100. package/resources/index.d.ts.map +1 -1
  101. package/resources/index.js.map +1 -1
  102. package/resources/index.mjs.map +1 -1
  103. package/resources/keys.d.mts +7 -6
  104. package/resources/keys.d.mts.map +1 -1
  105. package/resources/keys.d.ts +7 -6
  106. package/resources/keys.d.ts.map +1 -1
  107. package/resources/keys.js +7 -6
  108. package/resources/keys.js.map +1 -1
  109. package/resources/keys.mjs +7 -6
  110. package/resources/keys.mjs.map +1 -1
  111. package/src/client.ts +37 -10
  112. package/src/core/pagination.ts +170 -0
  113. package/src/index.ts +1 -0
  114. package/src/pagination.ts +2 -0
  115. package/src/resources/dealers/dealers.ts +9 -97
  116. package/src/resources/dealers/index.ts +2 -2
  117. package/src/resources/dealers/nlt/index.ts +1 -1
  118. package/src/resources/dealers/nlt/nlt.ts +2 -2
  119. package/src/resources/dealers/nlt/offers.ts +60 -84
  120. package/src/resources/dealers/nlt-settings.ts +24 -64
  121. package/src/resources/dealers/vehicles/images.ts +3 -2
  122. package/src/resources/dealers/vehicles/index.ts +1 -0
  123. package/src/resources/dealers/vehicles/vehicles.ts +62 -72
  124. package/src/resources/index.ts +1 -2
  125. package/src/resources/keys.ts +7 -6
  126. package/src/version.ts +1 -1
  127. package/version.d.mts +1 -1
  128. package/version.d.ts +1 -1
  129. package/version.js +1 -1
  130. package/version.mjs +1 -1
@@ -11,6 +11,7 @@ import {
11
11
  VehicleImageList,
12
12
  } from './images';
13
13
  import { APIPromise } from '../../../core/api-promise';
14
+ import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pagination';
14
15
  import { buildHeaders } from '../../../internal/headers';
15
16
  import { RequestOptions } from '../../../internal/request-options';
16
17
  import { path } from '../../../internal/utils/path';
@@ -24,11 +25,10 @@ export class Vehicles extends APIResource {
24
25
  /**
25
26
  * Provision a new used vehicle in a dealer's stock.
26
27
  *
27
- * Writes are atomic across `azlease_usatoin` and `azlease_usatoauto` using a
28
- * `SAVEPOINT` so a UNIQUE plate violation rolls back cleanly. On success the
29
- * AI-content worker (:mod:`azurenet-engine.app.jobs.usato_ai_content_worker`)
30
- * picks up the new row within 60 seconds and generates the SEO body + pgvector
31
- * embedding — at which point the vehicle becomes discoverable on the cross-network
28
+ * The write is atomic: a plate conflict or catalogue-code error leaves no partial
29
+ * stock record behind. On success the asynchronous AI-content worker picks up the
30
+ * new vehicle within 60 seconds and generates the SEO body plus semantic
31
+ * embedding; at that point the vehicle becomes discoverable on the cross-network
32
32
  * MCP / Custom GPT / NLWeb surfaces. The response returns immediately (no
33
33
  * synchronous wait on the worker).
34
34
  */
@@ -59,9 +59,9 @@ export class Vehicles extends APIResource {
59
59
  /**
60
60
  * Partial update of a vehicle.
61
61
  *
62
- * Splits the inbound body across the two physical tables (`azlease_usatoauto` and
63
- * `azlease_usatoin`) and emits at most one UPDATE per table inside a single
64
- * transaction. Fields not present in the body are not touched.
62
+ * Applies the transmitted fields inside a single transaction. Fields not present
63
+ * in the body are not touched; explicit `null` clears only fields that are
64
+ * nullable in the public contract.
65
65
  */
66
66
  update(
67
67
  vehicleID: string,
@@ -91,25 +91,25 @@ export class Vehicles extends APIResource {
91
91
  dealerID: string,
92
92
  query: VehicleListParams | null | undefined = {},
93
93
  options?: RequestOptions,
94
- ): APIPromise<VehicleList> {
95
- return this._client.get(path`/v1/dealers/${dealerID}/vehicles`, { query, ...options });
94
+ ): PagePromise<VehicleSummariesCursorPage, VehicleSummary> {
95
+ return this._client.getAPIList(path`/v1/dealers/${dealerID}/vehicles`, CursorPage<VehicleSummary>, {
96
+ query,
97
+ ...options,
98
+ });
96
99
  }
97
100
 
98
101
  /**
99
102
  * Withdraw a vehicle from sale without deleting the row.
100
103
  *
101
- * Sets `azlease_usatoin.visibile = FALSE` and stamps `venduto_il = now()`. The
102
- * plate becomes reusable on the network the moment this returns (the
103
- * active-uniqueness check excludes rows where `visibile = FALSE` OR
104
- * `venduto_il IS NOT NULL`).
104
+ * Marks the vehicle as no longer for sale. The plate becomes reusable on the
105
+ * network the moment this returns.
105
106
  *
106
107
  * Soft-delete is the canonical "remove this vehicle from sale" surface. The
107
108
  * AI-citation consumers (MCP `_tool_search_vehicles`, Custom GPT
108
- * `search_vehicles_network`, NLWeb `/ask`) each filter their own queries on
109
- * `i.visibile = TRUE AND i.venduto_il IS NULL` the shared `v_apimax_listing`
110
- * view itself does not impose that filter, every consumer adds it. The result on
111
- * the partner side is the same: a soft-deleted vehicle disappears from every AI
112
- * surface within the next index cycle.
109
+ * `search_vehicles_network`, NLWeb `/ask`) each filter their own
110
+ * public-availability state. The result on the partner side is the same: a
111
+ * soft-deleted vehicle disappears from every AI surface within the next index
112
+ * cycle.
113
113
  *
114
114
  * Returns `409 vehicle_already_deleted` if the row is already soft- deleted — same
115
115
  * idempotency pattern as the dealers DELETE endpoint.
@@ -163,6 +163,8 @@ export class Vehicles extends APIResource {
163
163
  }
164
164
  }
165
165
 
166
+ export type VehicleSummariesCursorPage = CursorPage<VehicleSummary>;
167
+
166
168
  /**
167
169
  * AI-generated editorial content for a single vehicle.
168
170
  *
@@ -272,20 +274,16 @@ export interface BulkRowOutcome {
272
274
  *
273
275
  * - **Partner-supplied** — what the partner posted (`plate`, `description`,
274
276
  * `sale_price_eur`, etc.).
275
- * - **Catalogue-derived** — `technical_details` is the flat `mnet_dettagli_usato`
276
- * dict (Italian column keys: `cilindrata`, `kw`, `hp`, `lunghezza`,
277
- * `consumo_medio`, `emissioni_co2`, etc.). Same shape conventions as
278
- * `NltOfferDetail` per `feedback_partnermax_field_naming_us_english`.
277
+ * - **Catalogue-derived** — `technical_details` is a flat dictionary of
278
+ * Motornet-backed technical attributes using Italian domain labels such as
279
+ * `cilindrata`, `kw`, `hp`, `lunghezza`, `consumo_medio`, and `emissioni_co2`.
279
280
  * - **AI-derived** — `ai_content` carries the editorial output the cross-network
280
281
  * consumers display (descriptions, highlights, FAQ, SEO meta). `null` until the
281
282
  * worker has processed the vehicle.
282
283
  *
283
- * Fields the partner does NOT see through this surface (because they are
284
- * dealer-internal margin/operations data the partner does not own):
285
- * `cost_price_eur`, `inspection_expiry_date`, `road_tax_expiry_date`,
286
- * `previous_owner_count`, `previous_ownership_transfer_date`, `last_service_*`.
287
- * These exist in the underlying DB tables for the DealerMAX dashboard but are
288
- * intentionally not exposed via the SDK.
284
+ * Dealer-internal margin and operations data remains outside this SDK surface;
285
+ * partners receive only the inventory, commercial, catalogue, media, and
286
+ * AI-derived fields needed to publish the vehicle.
289
287
  */
290
288
  vehicle?: VehicleDetail | null;
291
289
  }
@@ -298,20 +296,16 @@ export interface BulkRowOutcome {
298
296
  *
299
297
  * - **Partner-supplied** — what the partner posted (`plate`, `description`,
300
298
  * `sale_price_eur`, etc.).
301
- * - **Catalogue-derived** — `technical_details` is the flat `mnet_dettagli_usato`
302
- * dict (Italian column keys: `cilindrata`, `kw`, `hp`, `lunghezza`,
303
- * `consumo_medio`, `emissioni_co2`, etc.). Same shape conventions as
304
- * `NltOfferDetail` per `feedback_partnermax_field_naming_us_english`.
299
+ * - **Catalogue-derived** — `technical_details` is a flat dictionary of
300
+ * Motornet-backed technical attributes using Italian domain labels such as
301
+ * `cilindrata`, `kw`, `hp`, `lunghezza`, `consumo_medio`, and `emissioni_co2`.
305
302
  * - **AI-derived** — `ai_content` carries the editorial output the cross-network
306
303
  * consumers display (descriptions, highlights, FAQ, SEO meta). `null` until the
307
304
  * worker has processed the vehicle.
308
305
  *
309
- * Fields the partner does NOT see through this surface (because they are
310
- * dealer-internal margin/operations data the partner does not own):
311
- * `cost_price_eur`, `inspection_expiry_date`, `road_tax_expiry_date`,
312
- * `previous_owner_count`, `previous_ownership_transfer_date`, `last_service_*`.
313
- * These exist in the underlying DB tables for the DealerMAX dashboard but are
314
- * intentionally not exposed via the SDK.
306
+ * Dealer-internal margin and operations data remains outside this SDK surface;
307
+ * partners receive only the inventory, commercial, catalogue, media, and
308
+ * AI-derived fields needed to publish the vehicle.
315
309
  */
316
310
  export interface VehicleDetail {
317
311
  certified_km: number;
@@ -376,9 +370,9 @@ export interface VehicleDetail {
376
370
  registration_month?: number | null;
377
371
 
378
372
  /**
379
- * Flat dict of every non-null `mnet_dettagli_usato` column for this
380
- * `motornet_code`. Keys stay in Italian because they are raw SQL column names;
381
- * native units preserved (mm, kg, kW, CV, g/km, etc.).
373
+ * Flat dictionary of Motornet-backed technical attributes for this
374
+ * `motornet_code`. Keys stay in Italian domain vocabulary; native units are
375
+ * preserved (mm, kg, kW, CV, g/km, etc.).
382
376
  */
383
377
  technical_details?: { [key: string]: unknown };
384
378
 
@@ -402,8 +396,9 @@ export interface VehicleList {
402
396
  * Compact vehicle payload for list endpoints.
403
397
  *
404
398
  * Catalogue fields (`brand`, `model`, `trim`, `fuel_type`) are derived from
405
- * `mnet_dettagli` at read time. Italian raw labels are surfaced verbatim — same
406
- * convention as NLT (`apimax`-aligned).
399
+ * DealerMAX's licensed Motornet-backed catalogue at read time. Italian raw labels
400
+ * are surfaced verbatim so partner clients see the same vocabulary as
401
+ * consumer-facing DealerMAX surfaces.
407
402
  */
408
403
  export interface VehicleSummary {
409
404
  certified_km: number;
@@ -445,16 +440,17 @@ export interface VehicleCreateParams {
445
440
 
446
441
  /**
447
442
  * Body param: Motornet UNI code identifying the exact vehicle configuration. Must
448
- * exist in `mnet_dettagli_usato` at submission time; otherwise the call returns
449
- * 422 `motornet_code_not_in_catalogue`. The partner is expected to source this
450
- * from its own DMS; partnermax does not expose a plate→code lookup.
443
+ * exist in the used-vehicle catalogue at submission time; otherwise the call
444
+ * returns 422 `motornet_code_not_in_catalogue`. Partners may send a code from
445
+ * their own Motornet agreement or use the paid control-plane targa/VIN resolver
446
+ * before creating the vehicle.
451
447
  */
452
448
  motornet_code: string;
453
449
 
454
450
  /**
455
451
  * Body param: Italian licence plate. Uppercased server-side. UNIQUE across the
456
- * network for active vehicles (`visibile=true AND venduto_il IS NULL`); reusable
457
- * once the previous holder sells/hides the row.
452
+ * network for active vehicles; reusable once the previous holder withdraws the
453
+ * vehicle from sale.
458
454
  */
459
455
  plate: string;
460
456
 
@@ -496,20 +492,18 @@ export interface VehicleCreateParams {
496
492
  extended_warranty_months?: number | null;
497
493
 
498
494
  /**
499
- * Body param: Maps to `azlease_usatoauto.is_vendita_enabled`. When false the row
500
- * is in stock but not offered for sale.
495
+ * Body param: When false the vehicle remains in stock but is not offered for sale.
501
496
  */
502
497
  is_for_sale?: boolean;
503
498
 
504
499
  /**
505
500
  * Body param: Soft-publish flag. When false the row exists in stock but is
506
- * excluded from consumer-facing AI surfaces. Maps to `azlease_usatoin.visibile`.
501
+ * excluded from consumer-facing AI surfaces.
507
502
  */
508
503
  is_visible?: boolean;
509
504
 
510
505
  /**
511
- * Body param: Free-form short notes; surfaced as
512
- * `mnet_dettagli.precisazioni`-style.
506
+ * Body param: Free-form short notes for partner-facing vehicle detail views.
513
507
  */
514
508
  notes?: string | null;
515
509
 
@@ -632,9 +626,7 @@ export interface VehicleUpdateParams {
632
626
  'Idempotency-Key'?: string;
633
627
  }
634
628
 
635
- export interface VehicleListParams {
636
- cursor?: string | null;
637
-
629
+ export interface VehicleListParams extends CursorPageParams {
638
630
  /**
639
631
  * If true, soft-deleted rows (`venduto_il` populated) are also returned. Default
640
632
  * false — listings hide soft-deleted vehicles.
@@ -650,8 +642,6 @@ export interface VehicleListParams {
650
642
  * Filter on the visibility flag.
651
643
  */
652
644
  is_visible?: boolean | null;
653
-
654
- limit?: number;
655
645
  }
656
646
 
657
647
  export interface VehicleDeleteParams {
@@ -678,9 +668,8 @@ export namespace VehicleBulkParams {
678
668
  *
679
669
  * The partner sends a small, vehicle-specific payload. All technical specs (brand,
680
670
  * model, trim, fuel type, displacement, dimensions, CO2, etc.) are derived
681
- * server-side from `mnet_dettagli` via the `motornet_code` join — the partner
682
- * never types them. This is the same canonical pattern used by NLT offers and
683
- * matches the platform rule `feedback_motornet_authoritative`.
671
+ * server-side from DealerMAX's licensed Motornet-backed catalogue — the partner
672
+ * never types them.
684
673
  *
685
674
  * Fields immutable after creation: `motornet_code`, `plate`, `vin`. Other fields
686
675
  * may be updated via PATCH.
@@ -692,17 +681,18 @@ export namespace VehicleBulkParams {
692
681
  certified_km: number;
693
682
 
694
683
  /**
695
- * Motornet UNI code identifying the exact vehicle configuration. Must exist in
696
- * `mnet_dettagli_usato` at submission time; otherwise the call returns 422
697
- * `motornet_code_not_in_catalogue`. The partner is expected to source this from
698
- * its own DMS; partnermax does not expose a plate→code lookup.
684
+ * Motornet UNI code identifying the exact vehicle configuration. Must exist in the
685
+ * used-vehicle catalogue at submission time; otherwise the call returns 422
686
+ * `motornet_code_not_in_catalogue`. Partners may send a code from their own
687
+ * Motornet agreement or use the paid control-plane targa/VIN resolver before
688
+ * creating the vehicle.
699
689
  */
700
690
  motornet_code: string;
701
691
 
702
692
  /**
703
693
  * Italian licence plate. Uppercased server-side. UNIQUE across the network for
704
- * active vehicles (`visibile=true AND venduto_il IS NULL`); reusable once the
705
- * previous holder sells/hides the row.
694
+ * active vehicles; reusable once the previous holder withdraws the vehicle from
695
+ * sale.
706
696
  */
707
697
  plate: string;
708
698
 
@@ -731,19 +721,18 @@ export namespace VehicleBulkParams {
731
721
  extended_warranty_months?: number | null;
732
722
 
733
723
  /**
734
- * Maps to `azlease_usatoauto.is_vendita_enabled`. When false the row is in stock
735
- * but not offered for sale.
724
+ * When false the vehicle remains in stock but is not offered for sale.
736
725
  */
737
726
  is_for_sale?: boolean;
738
727
 
739
728
  /**
740
729
  * Soft-publish flag. When false the row exists in stock but is excluded from
741
- * consumer-facing AI surfaces. Maps to `azlease_usatoin.visibile`.
730
+ * consumer-facing AI surfaces.
742
731
  */
743
732
  is_visible?: boolean;
744
733
 
745
734
  /**
746
- * Free-form short notes; surfaced as `mnet_dettagli.precisazioni`-style.
735
+ * Free-form short notes for partner-facing vehicle detail views.
747
736
  */
748
737
  notes?: string | null;
749
738
 
@@ -777,6 +766,7 @@ export declare namespace Vehicles {
777
766
  type VehicleDetail as VehicleDetail,
778
767
  type VehicleList as VehicleList,
779
768
  type VehicleSummary as VehicleSummary,
769
+ type VehicleSummariesCursorPage as VehicleSummariesCursorPage,
780
770
  type VehicleCreateParams as VehicleCreateParams,
781
771
  type VehicleRetrieveParams as VehicleRetrieveParams,
782
772
  type VehicleUpdateParams as VehicleUpdateParams,
@@ -4,9 +4,8 @@ export {
4
4
  Dealers,
5
5
  type DealerDetail,
6
6
  type DealerSummary,
7
- type DealerListResponse,
8
- type DealerCreateParams,
9
7
  type DealerUpdateParams,
10
8
  type DealerListParams,
9
+ type DealerSummariesCursorPage,
11
10
  } from './dealers/dealers';
12
11
  export { Keys, type KeyListResponse, type KeyIssueResponse, type KeyIssueParams } from './keys';
@@ -7,7 +7,7 @@ import { RequestOptions } from '../internal/request-options';
7
7
  import { path } from '../internal/utils/path';
8
8
 
9
9
  /**
10
- * API key lifecycle management issue, list, revoke. The partner authenticates every request with `X-Api-Key` (preferred) or `Authorization: Bearer <key>`; the server identifies the partner from the key and scopes all reads/writes to dealers owned by that partner.
10
+ * API key lifecycle management. PartnerMAX v1 allows one active API key per partner/environment; partners authenticate every request with `X-Api-Key` (preferred) or `Authorization: Bearer <key>`, and replacement is handled through DealerMAX support.
11
11
  */
12
12
  export class Keys extends APIResource {
13
13
  /**
@@ -21,12 +21,13 @@ export class Keys extends APIResource {
21
21
  }
22
22
 
23
23
  /**
24
- * Issue a new API key. Plaintext returned exactly once.
24
+ * Rotate the partner API key during a DealerMAX support flow.
25
25
  *
26
- * Capability gate: caller's key must hold `can_issue_keys`. The bootstrap key
27
- * handed to a partner by DealerMAX support carries this capability; keys minted
28
- * here inherit the _same_ capabilities as the caller, so partners can never
29
- * accidentally widen their own scope.
26
+ * Plaintext is returned exactly once. The key authenticating this request is
27
+ * deactivated in the same transaction that inserts the replacement, preserving
28
+ * PartnerMAX v1's one-active-key invariant. Callers must not use this endpoint for
29
+ * per-deployment, CI, or engineer credentials. Capability gate: caller's key must
30
+ * hold `can_issue_keys`.
30
31
  */
31
32
  issue(params: KeyIssueParams, options?: RequestOptions): APIPromise<KeyIssueResponse> {
32
33
  const { 'Idempotency-Key': idempotencyKey, ...body } = params;
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.1'; // x-release-please-version
1
+ export const VERSION = '0.4.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.1";
1
+ export declare const VERSION = "0.4.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.1";
1
+ export declare const VERSION = "0.4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.2.1'; // x-release-please-version
4
+ exports.VERSION = '0.4.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.2.1'; // x-release-please-version
1
+ export const VERSION = '0.4.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map