@vindentech/api-client 0.3.0-next.76 → 0.3.0-next.78

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 (54) hide show
  1. package/README.md +1 -1
  2. package/dist/generated/_all.d.ts +1 -4
  3. package/dist/generated/_all.d.ts.map +1 -1
  4. package/dist/generated/_all.js +1 -4
  5. package/dist/generated/_all.js.map +1 -1
  6. package/dist/generated/_permissions.d.ts +16 -65
  7. package/dist/generated/_permissions.d.ts.map +1 -1
  8. package/dist/generated/_permissions.js +4 -16
  9. package/dist/generated/_permissions.js.map +1 -1
  10. package/dist/generated/coupons/coupons.d.ts +55 -1
  11. package/dist/generated/coupons/coupons.d.ts.map +1 -1
  12. package/dist/generated/coupons/coupons.js +37 -0
  13. package/dist/generated/coupons/coupons.js.map +1 -1
  14. package/dist/generated/index.schemas.d.ts +520 -540
  15. package/dist/generated/index.schemas.d.ts.map +1 -1
  16. package/dist/generated/index.schemas.js +69 -68
  17. package/dist/generated/index.schemas.js.map +1 -1
  18. package/dist/generated/me-campaign/me-campaign.d.ts +31 -0
  19. package/dist/generated/me-campaign/me-campaign.d.ts.map +1 -0
  20. package/dist/generated/me-campaign/me-campaign.js +22 -0
  21. package/dist/generated/me-campaign/me-campaign.js.map +1 -0
  22. package/dist/generated/merchandise-checkout/merchandise-checkout.d.ts +1 -1
  23. package/dist/generated/merchandise-checkout/merchandise-checkout.js +1 -1
  24. package/dist/generated/price-book/price-book.d.ts +1 -1
  25. package/dist/generated/price-book/price-book.js +1 -1
  26. package/dist/generated/pricing-rules/pricing-rules.d.ts +42 -3
  27. package/dist/generated/pricing-rules/pricing-rules.d.ts.map +1 -1
  28. package/dist/generated/pricing-rules/pricing-rules.js +24 -2
  29. package/dist/generated/pricing-rules/pricing-rules.js.map +1 -1
  30. package/dist/generated/transport-services/transport-services.d.ts +19 -19
  31. package/dist/generated/transport-services/transport-services.d.ts.map +1 -1
  32. package/dist/generated/transport-services/transport-services.js +2 -25
  33. package/dist/generated/transport-services/transport-services.js.map +1 -1
  34. package/dist/generated/warehouse-orders/warehouse-orders.d.ts +1 -15
  35. package/dist/generated/warehouse-orders/warehouse-orders.d.ts.map +1 -1
  36. package/dist/generated/warehouse-orders/warehouse-orders.js +0 -14
  37. package/dist/generated/warehouse-orders/warehouse-orders.js.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/generated/price-lists/price-lists.d.ts +0 -143
  40. package/dist/generated/price-lists/price-lists.d.ts.map +0 -1
  41. package/dist/generated/price-lists/price-lists.js +0 -180
  42. package/dist/generated/price-lists/price-lists.js.map +0 -1
  43. package/dist/generated/price-suggestion/price-suggestion.d.ts +0 -24
  44. package/dist/generated/price-suggestion/price-suggestion.d.ts.map +0 -1
  45. package/dist/generated/price-suggestion/price-suggestion.js +0 -23
  46. package/dist/generated/price-suggestion/price-suggestion.js.map +0 -1
  47. package/dist/generated/service-catalog/service-catalog.d.ts +0 -24
  48. package/dist/generated/service-catalog/service-catalog.d.ts.map +0 -1
  49. package/dist/generated/service-catalog/service-catalog.js +0 -16
  50. package/dist/generated/service-catalog/service-catalog.js.map +0 -1
  51. package/dist/generated/tenant-services/tenant-services.d.ts +0 -66
  52. package/dist/generated/tenant-services/tenant-services.d.ts.map +0 -1
  53. package/dist/generated/tenant-services/tenant-services.js +0 -80
  54. package/dist/generated/tenant-services/tenant-services.js.map +0 -1
@@ -1724,77 +1724,6 @@ export interface ModuleToggleDto {
1724
1724
  export interface UpdateTenantModulesDto {
1725
1725
  modules: ModuleToggleDto[];
1726
1726
  }
1727
- export interface ServiceCatalogDto {
1728
- serviceCode: string;
1729
- name: string;
1730
- category: string;
1731
- /** @nullable */
1732
- description: string | null;
1733
- }
1734
- export type TenantServiceDtoDispatchMode = typeof TenantServiceDtoDispatchMode[keyof typeof TenantServiceDtoDispatchMode];
1735
- export declare const TenantServiceDtoDispatchMode: {
1736
- readonly RIDES_LEG: "RIDES_LEG";
1737
- readonly OWN_VISIT: "OWN_VISIT";
1738
- readonly EITHER: "EITHER";
1739
- };
1740
- export type TenantServiceDtoConfig = {
1741
- [key: string]: unknown;
1742
- };
1743
- export interface TenantServiceDto {
1744
- tenantServiceId: string;
1745
- serviceCode: string;
1746
- /** Joined from service_catalog. */
1747
- serviceName: string;
1748
- /** Joined from service_catalog. */
1749
- category: string;
1750
- isActive: boolean;
1751
- /** @nullable */
1752
- billingArticleId: string | null;
1753
- dispatchMode: TenantServiceDtoDispatchMode;
1754
- /** @nullable */
1755
- dispatchTransportServiceId: string | null;
1756
- config: TenantServiceDtoConfig;
1757
- createdAt: string;
1758
- updatedAt: string;
1759
- }
1760
- export type CreateTenantServiceDtoDispatchMode = typeof CreateTenantServiceDtoDispatchMode[keyof typeof CreateTenantServiceDtoDispatchMode];
1761
- export declare const CreateTenantServiceDtoDispatchMode: {
1762
- readonly RIDES_LEG: "RIDES_LEG";
1763
- readonly OWN_VISIT: "OWN_VISIT";
1764
- readonly EITHER: "EITHER";
1765
- };
1766
- /**
1767
- * Per-service operational config (JSONB).
1768
- */
1769
- export type CreateTenantServiceDtoConfig = {
1770
- [key: string]: unknown;
1771
- };
1772
- export interface CreateTenantServiceDto {
1773
- /** FK → service_catalog.service_code. */
1774
- serviceCode: string;
1775
- isActive?: boolean;
1776
- billingArticleId?: string;
1777
- dispatchMode?: CreateTenantServiceDtoDispatchMode;
1778
- dispatchTransportServiceId?: string;
1779
- /** Per-service operational config (JSONB). */
1780
- config?: CreateTenantServiceDtoConfig;
1781
- }
1782
- export type UpdateTenantServiceDtoDispatchMode = typeof UpdateTenantServiceDtoDispatchMode[keyof typeof UpdateTenantServiceDtoDispatchMode];
1783
- export declare const UpdateTenantServiceDtoDispatchMode: {
1784
- readonly RIDES_LEG: "RIDES_LEG";
1785
- readonly OWN_VISIT: "OWN_VISIT";
1786
- readonly EITHER: "EITHER";
1787
- };
1788
- export type UpdateTenantServiceDtoConfig = {
1789
- [key: string]: unknown;
1790
- };
1791
- export interface UpdateTenantServiceDto {
1792
- isActive?: boolean;
1793
- billingArticleId?: string;
1794
- dispatchMode?: UpdateTenantServiceDtoDispatchMode;
1795
- dispatchTransportServiceId?: string;
1796
- config?: UpdateTenantServiceDtoConfig;
1797
- }
1798
1727
  export type CarrierProviderDtoDefaultKind = typeof CarrierProviderDtoDefaultKind[keyof typeof CarrierProviderDtoDefaultKind];
1799
1728
  export declare const CarrierProviderDtoDefaultKind: {
1800
1729
  readonly OWN_FLEET: "OWN_FLEET";
@@ -2511,24 +2440,6 @@ export interface CartItemDto {
2511
2440
  /** @nullable */
2512
2441
  metadata: CartItemDtoMetadata;
2513
2442
  }
2514
- /**
2515
- * @nullable
2516
- */
2517
- export type CartServiceDtoMetadata = {
2518
- [key: string]: unknown;
2519
- } | null;
2520
- export interface CartServiceDto {
2521
- cartExtraServiceId: string;
2522
- serviceCode: string;
2523
- /** @nullable */
2524
- level: string | null;
2525
- /** @nullable */
2526
- quantity: number | null;
2527
- /** @nullable */
2528
- hours: string | null;
2529
- /** @nullable */
2530
- metadata: CartServiceDtoMetadata;
2531
- }
2532
2443
  export interface CartMerchandiseDto {
2533
2444
  cartMerchandiseId: string;
2534
2445
  tenantGoodsId: string;
@@ -2546,7 +2457,7 @@ export interface CartMerchandiseDto {
2546
2457
  */
2547
2458
  name: string | null;
2548
2459
  /**
2549
- * The SKU's display price ex VAT. Not what the quote charges — see `deferred`.
2460
+ * Price ex VAT as a decimal string: what the SKU's pricing rule charges today in the cart's currency, which is what the quote charges for the line. Null when no price is in force.
2550
2461
  * @nullable
2551
2462
  */
2552
2463
  retailPriceExVat: string | null;
@@ -2646,7 +2557,6 @@ export interface CartDto {
2646
2557
  /** @nullable */
2647
2558
  confirmedAt: string | null;
2648
2559
  items: CartItemDto[];
2649
- services: CartServiceDto[];
2650
2560
  /** The merchandise basket. Its prices are NOT in `rates.totals` yet — MERCHANDISE appears in `rates.deferred` until the quote prices it. */
2651
2561
  merchandise: CartMerchandiseDto[];
2652
2562
  holds: CartHoldDto[];
@@ -2656,20 +2566,21 @@ export interface CartDto {
2656
2566
  export type QuoteLineDtoKind = typeof QuoteLineDtoKind[keyof typeof QuoteLineDtoKind];
2657
2567
  export declare const QuoteLineDtoKind: {
2658
2568
  readonly GOODS: "GOODS";
2659
- readonly SERVICE: "SERVICE";
2660
2569
  readonly MERCHANDISE: "MERCHANDISE";
2661
2570
  readonly TRANSPORT: "TRANSPORT";
2662
2571
  readonly INSURANCE: "INSURANCE";
2663
2572
  readonly START_FEE: "START_FEE";
2664
2573
  };
2665
2574
  /**
2666
- * Set on a line that exists only because a contracted minimum applied, so it can be shown as such: `quantity` — a minimum billable volume lifted the quantity (the line carries the difference; the line before it carries what the goods account for), `fee` — a minimum charge topped the component up. The line keeps the kind of the charge it lifts. Absent on every other line.
2575
+ * Set on a line that exists only because a contracted minimum applied, so it can be shown as such: `quantity` — a minimum billable volume lifted the quantity (the line carries the difference; the line before it carries what the goods account for), `fee` — a minimum charge topped the component up, `minimum_amount` — the charge's own minimum price per order lifted it (the line carries the difference, including any minimum billable volume beneath it; the line before it carries what the goods account for), `minimum_monthly_fee` — the storage came in under its minimum monthly fee after every campaign, binding discount and code, and this line bills the difference (a `GOODS` line against the minimum fee article; no reduction applies to it, and it is the line the invoice bills for the month). The line keeps the kind of the charge it lifts. Absent on every other line.
2667
2576
  * @nullable
2668
2577
  */
2669
2578
  export type QuoteLineDtoFloorKind = typeof QuoteLineDtoFloorKind[keyof typeof QuoteLineDtoFloorKind] | null;
2670
2579
  export declare const QuoteLineDtoFloorKind: {
2671
2580
  readonly quantity: "quantity";
2672
2581
  readonly fee: "fee";
2582
+ readonly minimum_amount: "minimum_amount";
2583
+ readonly minimum_monthly_fee: "minimum_monthly_fee";
2673
2584
  };
2674
2585
  export interface QuoteLineDto {
2675
2586
  kind: QuoteLineDtoKind;
@@ -2680,9 +2591,9 @@ export interface QuoteLineDto {
2680
2591
  reference: string | null;
2681
2592
  description: string;
2682
2593
  quantity: number;
2683
- /** Unit price ex-VAT, integer minor units of the quote currency. This is the catalogue price BEFORE any binding discount — with one applied it no longer multiplies out to `lineTotalExVatMinor` (a 100% start-fee waiver leaves a priced unit against a zero line). Sum `lineTotalExVatMinor`, never unit × quantity, or the result contradicts `totals`. */
2594
+ /** Unit price ex-VAT, integer minor units of the quote currency. This is the catalogue price BEFORE any campaign or binding discount — with one applied it no longer multiplies out to `lineTotalExVatMinor` (a 100% start-fee waiver leaves a priced unit against a zero line). Nor does a storage month the price book prices, which is billed a night at a time with each night rounded, as the invoice bills it. Sum `lineTotalExVatMinor`, never unit × quantity, or the result contradicts `totals`. */
2684
2595
  unitPriceExVatMinor: number;
2685
- /** Line total ex-VAT, integer minor units, AFTER any binding discount — the amount that reaches `totals` */
2596
+ /** Line total ex-VAT, integer minor units, AFTER any campaign and binding discount — the amount that reaches `totals` */
2686
2597
  lineTotalExVatMinor: number;
2687
2598
  /**
2688
2599
  * How much the binding plan took off this line, integer minor units. Null when no discount applied.
@@ -2694,6 +2605,11 @@ export interface QuoteLineDto {
2694
2605
  * @nullable
2695
2606
  */
2696
2607
  couponDiscountIncVatMinor: number | null;
2608
+ /**
2609
+ * How much the automatic campaigns took off this line, ex-VAT, integer minor units. Taken first — before the binding discount, which applies to what is left, and before the coupon — as the invoice takes them. Like `discountExVatMinor` it is already subtracted from `lineTotalExVatMinor`. Null when no campaign reduces this line.
2610
+ * @nullable
2611
+ */
2612
+ campaignDiscountExVatMinor: number | null;
2697
2613
  /** VAT rate as a percentage, per the platform-wide NUMERIC(6,4) convention (25 = 25%) */
2698
2614
  vatRate: number;
2699
2615
  /** Whether this line qualifies for the RUT labour deduction */
@@ -2709,7 +2625,7 @@ export interface QuoteLineDto {
2709
2625
  */
2710
2626
  componentCode?: string | null;
2711
2627
  /**
2712
- * Set on a line that exists only because a contracted minimum applied, so it can be shown as such: `quantity` — a minimum billable volume lifted the quantity (the line carries the difference; the line before it carries what the goods account for), `fee` — a minimum charge topped the component up. The line keeps the kind of the charge it lifts. Absent on every other line.
2628
+ * Set on a line that exists only because a contracted minimum applied, so it can be shown as such: `quantity` — a minimum billable volume lifted the quantity (the line carries the difference; the line before it carries what the goods account for), `fee` — a minimum charge topped the component up, `minimum_amount` — the charge's own minimum price per order lifted it (the line carries the difference, including any minimum billable volume beneath it; the line before it carries what the goods account for), `minimum_monthly_fee` — the storage came in under its minimum monthly fee after every campaign, binding discount and code, and this line bills the difference (a `GOODS` line against the minimum fee article; no reduction applies to it, and it is the line the invoice bills for the month). The line keeps the kind of the charge it lifts. Absent on every other line.
2713
2629
  * @nullable
2714
2630
  */
2715
2631
  floorKind?: QuoteLineDtoFloorKind;
@@ -2724,8 +2640,49 @@ export interface QuoteVolumeDto {
2724
2640
  }
2725
2641
  export interface QuoteCouponDto {
2726
2642
  code: string;
2727
- /** Discount applied to the payable total, integer minor units — the sum of `lines[].couponDiscountIncVatMinor`, which is only the lines the coupon's benefits are scoped to. Read that field for which lines they were. */
2643
+ /** Discount applied to the payable total, integer minor units — the sum of `lines[].couponDiscountIncVatMinor`, which is only the lines the coupon's benefits are scoped to. Read that field for which lines they were. The code is taken off the ex-VAT net as the invoice takes it (a replacement price applied, a cap bounding the net's reduction); this is the difference that makes to the taxed total. */
2728
2644
  discountMinor: number;
2645
+ /** Always false: this is the code the customer entered. An automatic campaign is reported in `campaigns`, where it is true. */
2646
+ automatic: boolean;
2647
+ }
2648
+ /**
2649
+ * Present when `valid` is false. `not_combinable`: an automatic campaign this cart runs under refuses a code alongside it.
2650
+ */
2651
+ export type QuoteCouponValidationDtoReason = typeof QuoteCouponValidationDtoReason[keyof typeof QuoteCouponValidationDtoReason];
2652
+ export declare const QuoteCouponValidationDtoReason: {
2653
+ readonly not_found: "not_found";
2654
+ readonly inactive: "inactive";
2655
+ readonly not_yet_valid: "not_yet_valid";
2656
+ readonly expired: "expired";
2657
+ readonly not_combinable: "not_combinable";
2658
+ };
2659
+ export interface QuoteCouponValidationDto {
2660
+ valid: boolean;
2661
+ /** Present when `valid` is false. `not_combinable`: an automatic campaign this cart runs under refuses a code alongside it. */
2662
+ reason?: QuoteCouponValidationDtoReason;
2663
+ }
2664
+ /**
2665
+ * `qualifies`: placing this cart enrols the account. `provisional`: a guest cart qualifies if this is the customer's first order — confirmed when the cart is claimed, or at placement. `enrolled`: the account already takes part.
2666
+ */
2667
+ export type QuoteCampaignDtoStatus = typeof QuoteCampaignDtoStatus[keyof typeof QuoteCampaignDtoStatus];
2668
+ export declare const QuoteCampaignDtoStatus: {
2669
+ readonly qualifies: "qualifies";
2670
+ readonly provisional: "provisional";
2671
+ readonly enrolled: "enrolled";
2672
+ };
2673
+ export interface QuoteCampaignDto {
2674
+ /** The campaign's `billing.coupon` */
2675
+ couponId: string;
2676
+ /** Always true: granted automatically, never entered as a code */
2677
+ automatic: boolean;
2678
+ /** Whether a code may be used alongside it. When false the cart's code is refused — see `couponValidation`. */
2679
+ combinable: boolean;
2680
+ /** `qualifies`: placing this cart enrols the account. `provisional`: a guest cart qualifies if this is the customer's first order — confirmed when the cart is claimed, or at placement. `enrolled`: the account already takes part. */
2681
+ status: QuoteCampaignDtoStatus;
2682
+ /** What this campaign took off, ex-VAT, integer minor units — its share of `lines[].campaignDiscountExVatMinor`, already out of `totals`. */
2683
+ discountExVatMinor: number;
2684
+ /** The same reduction inc-VAT, minor units — the saving to show a consumer: the difference it makes to the taxed total, each invoice line taxed as the invoice taxes it. A line nothing reduces keeps its rows' own VAT, each rounded (a storage month's nights), and a reduced one is taxed on its net, so a reduction smaller than that rounding can show a few cents less than its ex-VAT figure, or below zero. */
2685
+ discountIncVatMinor: number;
2729
2686
  }
2730
2687
  export interface QuoteBindingDto {
2731
2688
  bindingPlanId: string;
@@ -2758,17 +2715,17 @@ export interface QuoteDiscountDto {
2758
2715
  discountExVatMinor: number;
2759
2716
  }
2760
2717
  export interface QuoteTotalsDto {
2761
- /** Sum of line totals ex-VAT after binding discounts, minor units */
2718
+ /** Sum of line totals ex-VAT after campaign and binding discounts, minor units */
2762
2719
  exVatMinor: number;
2763
2720
  /** Total VAT, minor units */
2764
2721
  vatMinor: number;
2765
2722
  /** exVat + vat, minor units */
2766
2723
  incVatMinor: number;
2767
- /** What the customer pays: incVat − coupon discount − RUT deduction, minor units */
2724
+ /** What the customer pays: incVat − coupon discount − RUT deduction, minor units. Campaigns are already out of incVat. */
2768
2725
  payableMinor: number;
2769
2726
  /** What the binding plan took off, ex-VAT, minor units. The number to compare options by: `payableMinor` also carries the coupon and the RUT deduction, both of which floor at zero and can make two options look identical. */
2770
2727
  discountExVatMinor: number;
2771
- /** The same reduction inc-VAT, minor units — the figure to show a consumer as their saving. Summed per line at that line's own rate, so `incVatMinor + discountIncVatMinor` is exactly what this cart would have come to undiscounted. Grossing `discountExVatMinor` up by the bundle's inc/ex ratio instead is only right when every discounted line carries the same VAT rate. */
2728
+ /** The same reduction inc-VAT, minor units — the figure to show a consumer as their saving. The difference the plan makes to the taxed total, each invoice line taxed at its own rate as the invoice taxes it, so `incVatMinor + discountIncVatMinor` is exactly what this cart would have come to with no binding plan; add `campaigns[].discountIncVatMinor` for the price with no campaign either. A line nothing reduces keeps its rows' own VAT, each rounded (a storage month's nights), and a reduced one is taxed on its net, so a reduction smaller than that rounding can make this slightly negative. Grossing `discountExVatMinor` up by the bundle's inc/ex ratio instead is only right when every discounted line carries the same VAT rate. */
2772
2729
  discountIncVatMinor: number;
2773
2730
  }
2774
2731
  export interface QuoteBindingOptionDto {
@@ -2797,6 +2754,13 @@ export interface QuoteResponseDto {
2797
2754
  volume: QuoteVolumeDto;
2798
2755
  /** @nullable */
2799
2756
  coupon: QuoteCouponDto | null;
2757
+ /**
2758
+ * The cart's code, validated. Null when the cart carries no code.
2759
+ * @nullable
2760
+ */
2761
+ couponValidation: QuoteCouponValidationDto | null;
2762
+ /** Automatic campaigns this cart qualifies for or already runs under. Empty when none. */
2763
+ campaigns: QuoteCampaignDto[];
2800
2764
  /**
2801
2765
  * The binding plan in force for this quote, or null when there is none
2802
2766
  * @nullable
@@ -2955,29 +2919,6 @@ export interface CartItemInputDto {
2955
2919
  /** @nullable */
2956
2920
  metadata?: CartItemInputDtoMetadata;
2957
2921
  }
2958
- /**
2959
- * @nullable
2960
- */
2961
- export type CartServiceInputDtoMetadata = {
2962
- [key: string]: unknown;
2963
- } | null;
2964
- export interface CartServiceInputDto {
2965
- /** Present = reconcile against this existing line; absent = insert. */
2966
- cartExtraServiceId?: string;
2967
- /** Service code string (becomes sales_order_service at placement) */
2968
- serviceCode: string;
2969
- /** @nullable */
2970
- level?: string | null;
2971
- /**
2972
- * @minimum 1
2973
- * @nullable
2974
- */
2975
- quantity?: number | null;
2976
- /** @nullable */
2977
- hours?: number | null;
2978
- /** @nullable */
2979
- metadata?: CartServiceInputDtoMetadata;
2980
- }
2981
2922
  /**
2982
2923
  * Where the line came from: CUSTOMER picked it out of the catalogue, ESTIMATOR means it came from a suggested basket the customer accepted or edited. PROVENANCE ONLY — analytics, not a fact. A client can claim either value, so it must never feed price or permission. Omitted on a resubmission leaves the stored value alone.
2983
2924
  */
@@ -3037,8 +2978,6 @@ export interface UpdateCartDto {
3037
2978
  estimatedHours?: number | null;
3038
2979
  /** Full reconcile of cart lines: update by cartProductId, insert without one, remove lines absent from the array. Omit the field to leave lines untouched. */
3039
2980
  items?: CartItemInputDto[];
3040
- /** Full reconcile of extra-service lines; same semantics as items. */
3041
- services?: CartServiceInputDto[];
3042
2981
  /** Full reconcile of the merchandise basket, keyed by tenantGoodsId: update the quantity of a SKU already present, insert one that is not, remove any SKU absent from the array. Omit the field to leave the basket untouched; send an empty array to clear it. The same SKU twice in one array is a 400 — a full desired set cannot contain a key twice, and collapsing silently would pick a quantity no rule documents. */
3043
2982
  merchandise?: CartMerchandiseInputDto[];
3044
2983
  }
@@ -3120,7 +3059,7 @@ export interface AvailableServiceDto {
3120
3059
  resolvedServiceZoneId: string;
3121
3060
  minLeadTimeHours: number;
3122
3061
  /**
3123
- * Lowest applicable price; null when none published
3062
+ * Lowest published component of the service's transport price, ex VAT — a flat fee or a per-m³ rate. From the price book, for a PICKUP or DELIVERY service (the same rules for every such service: pricing rules have no service dimension, and a zone only adds a surcharge on top, stated per timeslot). Null when none is published, and for a MOVE or other service, which the cart does not price.
3124
3063
  * @nullable
3125
3064
  */
3126
3065
  fromPrice: MoneyDto | null;
@@ -3136,6 +3075,16 @@ export interface SlotPriceDto {
3136
3075
  perHourExVat?: string | null;
3137
3076
  /** @nullable */
3138
3077
  baseFeeExVat?: string | null;
3078
+ /**
3079
+ * Money, ex VAT: what the slot's service zone adds ON TOP of the base transport price — show it as "+X". Null when the cart would add none: the slot has no zone of its own (a pooled slot), or no zone surcharge rule lists the slot's zone above 0.
3080
+ * @nullable
3081
+ */
3082
+ zoneSurchargeExVat: string | null;
3083
+ /**
3084
+ * Money, ex VAT: what this window adds ON TOP of the base transport price — show it as "+X". Null when the cart would add none: the window carries no surcharge, or no pricing rule bills it.
3085
+ * @nullable
3086
+ */
3087
+ windowSurchargeExVat: string | null;
3139
3088
  /** @nullable */
3140
3089
  vatRate: string | null;
3141
3090
  /** @nullable */
@@ -3171,7 +3120,8 @@ export interface AvailableDayDto {
3171
3120
  weekday: number;
3172
3121
  isHoliday: boolean;
3173
3122
  /**
3174
- * { amount, currencyCode }
3123
+ * Always null — nothing records a day's lowest price. Read the slots' `price` instead.
3124
+ * @deprecated
3175
3125
  * @nullable
3176
3126
  */
3177
3127
  lowestPrice?: MoneyDto | null;
@@ -3258,54 +3208,6 @@ export interface PaginatedTransportServicesDto {
3258
3208
  /** Effective rows skipped applied. */
3259
3209
  offset: number;
3260
3210
  }
3261
- /**
3262
- * @nullable
3263
- */
3264
- export type TransportServicePriceDtoCustomerType = typeof TransportServicePriceDtoCustomerType[keyof typeof TransportServicePriceDtoCustomerType] | null;
3265
- export declare const TransportServicePriceDtoCustomerType: {
3266
- readonly business: "business";
3267
- readonly personal: "personal";
3268
- };
3269
- /**
3270
- * @nullable
3271
- */
3272
- export type TransportServicePriceDtoUnitType = typeof TransportServicePriceDtoUnitType[keyof typeof TransportServicePriceDtoUnitType] | null;
3273
- export declare const TransportServicePriceDtoUnitType: {
3274
- readonly EPAL: "EPAL";
3275
- readonly HALF_PALLET: "HALF_PALLET";
3276
- readonly QUARTER_PALLET: "QUARTER_PALLET";
3277
- readonly PARCEL: "PARCEL";
3278
- readonly SACK: "SACK";
3279
- readonly LOOSE_ITEM: "LOOSE_ITEM";
3280
- readonly OTHER: "OTHER";
3281
- };
3282
- export interface TransportServicePriceDto {
3283
- transportServicePriceId: string;
3284
- transportServiceId: string;
3285
- /** @nullable */
3286
- serviceZoneId: string | null;
3287
- /** @nullable */
3288
- customerType: TransportServicePriceDtoCustomerType;
3289
- /** @nullable */
3290
- unitType: TransportServicePriceDtoUnitType;
3291
- /** @nullable */
3292
- baseFeeExVat: string | null;
3293
- /** @nullable */
3294
- pricePerUnitExVat: string | null;
3295
- /** @nullable */
3296
- pricePerM3ExVat: string | null;
3297
- /** @nullable */
3298
- pricePerHourExVat: string | null;
3299
- rutEligible: boolean;
3300
- vatRate: string;
3301
- currencyCode: string;
3302
- /** @nullable */
3303
- effectiveFrom: string | null;
3304
- /** @nullable */
3305
- effectiveUntil: string | null;
3306
- isActive: boolean;
3307
- createdAt: string;
3308
- }
3309
3211
  export interface TransportServiceOrgGrantDto {
3310
3212
  transportServiceOrgGrantId: string;
3311
3213
  organizationId: string;
@@ -3374,7 +3276,6 @@ export interface TransportServiceDetailDto {
3374
3276
  createdAt: string;
3375
3277
  updatedAt: string;
3376
3278
  zones: TransportServiceZoneDto[];
3377
- activePrices: TransportServicePriceDto[];
3378
3279
  /** Organizations that may be offered this service. Meaningful only when visibility is RESTRICTED; always empty for a PUBLIC service unless grants were authored ahead of the flip. */
3379
3280
  orgGrants: TransportServiceOrgGrantDto[];
3380
3281
  }
@@ -3382,43 +3283,6 @@ export interface TransportServiceZoneInputDto {
3382
3283
  transportServiceZoneId?: string;
3383
3284
  serviceZoneId: string;
3384
3285
  }
3385
- export type PricePerShipmentUnitDtoUnitType = typeof PricePerShipmentUnitDtoUnitType[keyof typeof PricePerShipmentUnitDtoUnitType];
3386
- export declare const PricePerShipmentUnitDtoUnitType: {
3387
- readonly EPAL: "EPAL";
3388
- readonly HALF_PALLET: "HALF_PALLET";
3389
- readonly QUARTER_PALLET: "QUARTER_PALLET";
3390
- readonly PARCEL: "PARCEL";
3391
- readonly SACK: "SACK";
3392
- readonly LOOSE_ITEM: "LOOSE_ITEM";
3393
- readonly OTHER: "OTHER";
3394
- };
3395
- export interface PricePerShipmentUnitDto {
3396
- unitType: PricePerShipmentUnitDtoUnitType;
3397
- /** Decimal money, ex-VAT */
3398
- price: string;
3399
- }
3400
- export type TransportServicePriceInputDtoCustomerType = typeof TransportServicePriceInputDtoCustomerType[keyof typeof TransportServicePriceInputDtoCustomerType];
3401
- export declare const TransportServicePriceInputDtoCustomerType: {
3402
- readonly business: "business";
3403
- readonly personal: "personal";
3404
- };
3405
- export interface TransportServicePriceInputDto {
3406
- transportServicePriceId?: string;
3407
- serviceZoneId?: string;
3408
- customerType?: TransportServicePriceInputDtoCustomerType;
3409
- baseFeeExVat?: string;
3410
- pricePerM3ExVat?: string;
3411
- pricePerHourExVat?: string;
3412
- pricePerShipmentUnit?: PricePerShipmentUnitDto[];
3413
- rutEligible?: boolean;
3414
- /** Percentage, e.g. 25.0000 = 25% (never a fraction); snapshot, not derived */
3415
- vatRate: string;
3416
- /** ISO-4217 alpha-3 */
3417
- currencyCode: string;
3418
- effectiveFrom?: string;
3419
- effectiveUntil?: string;
3420
- isActive?: boolean;
3421
- }
3422
3286
  export interface TransportServiceOrgGrantInputDto {
3423
3287
  /** The organization to grant this service to. */
3424
3288
  organizationId: string;
@@ -3477,8 +3341,7 @@ export interface CreateTransportServiceDto {
3477
3341
  displayOrder?: number;
3478
3342
  metadata?: CreateTransportServiceDtoMetadata;
3479
3343
  zones?: TransportServiceZoneInputDto[];
3480
- prices?: TransportServicePriceInputDto[];
3481
- /** Organizations that may be offered this service when visibility is RESTRICTED. Reconciled like zones[]/prices[]: omit to leave the set unchanged, [] to revoke every grant, or supply the exact set. */
3344
+ /** Organizations that may be offered this service when visibility is RESTRICTED. Reconciled like zones[]: omit to leave the set unchanged, [] to revoke every grant, or supply the exact set. */
3482
3345
  orgGrants?: TransportServiceOrgGrantInputDto[];
3483
3346
  }
3484
3347
  export type TransportServiceDtoSalesOrderType = typeof TransportServiceDtoSalesOrderType[keyof typeof TransportServiceDtoSalesOrderType];
@@ -3596,20 +3459,9 @@ export interface UpdateTransportServiceDto {
3596
3459
  displayOrder?: number;
3597
3460
  metadata?: UpdateTransportServiceDtoMetadata;
3598
3461
  zones?: TransportServiceZoneInputDto[];
3599
- prices?: TransportServicePriceInputDto[];
3600
3462
  /** Organizations that may be offered this service when visibility is RESTRICTED. Omit to leave the set unchanged; [] revokes every grant; a supplied array is reconciled to exactly that set. */
3601
3463
  orgGrants?: TransportServiceOrgGrantInputDto[];
3602
3464
  }
3603
- export interface PaginatedTransportServicePricesDto {
3604
- /** The page of rows. */
3605
- items: TransportServicePriceDto[];
3606
- /** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
3607
- total: number;
3608
- /** Effective max rows applied (after defaults/clamp). */
3609
- limit: number;
3610
- /** Effective rows skipped applied. */
3611
- offset: number;
3612
- }
3613
3465
  /**
3614
3466
  * GeoJSON Polygon/MultiPolygon, re-serialised from geography. NULL = zip-only zone. Stored and validated, and used by resolve_service_zone() as a polygon-containment match (after exact postal-code match, before matchPriority tie-break) whenever a caller supplies coordinates. GET /v1/checkout/available-services accepts latitude+longitude (XOR with postalCode) and passes them through, so this is live at checkout, not merely reference/visualization — a zone with no mapped postal codes and only a boundary is reachable via coordinates.
3615
3467
  * @nullable
@@ -3832,7 +3684,7 @@ export declare const CreateSlotConfigDtoSlotKind: {
3832
3684
  readonly PICKUP_WINDOW: "PICKUP_WINDOW";
3833
3685
  };
3834
3686
  /**
3835
- * Per-weekday windows (incl. per-slot base_max_orders / price_ex_vat). NULL = daily-cap-only.
3687
+ * Per-weekday windows (incl. per-slot base_max_orders / express_surcharge_ex_vat). express_surcharge_ex_vat (>= 0) is added on top of the price book's base price. A window carries no price of its own: price_ex_vat is refused. NULL = daily-cap-only.
3836
3688
  */
3837
3689
  export type CreateSlotConfigDtoWeeklySchedule = {
3838
3690
  [key: string]: unknown;
@@ -3843,7 +3695,7 @@ export interface CreateSlotConfigDto {
3843
3695
  /** NULL = daily-cap-only (no concrete slots). */
3844
3696
  slotKind?: CreateSlotConfigDtoSlotKind;
3845
3697
  timezone?: string;
3846
- /** Per-weekday windows (incl. per-slot base_max_orders / price_ex_vat). NULL = daily-cap-only. */
3698
+ /** Per-weekday windows (incl. per-slot base_max_orders / express_surcharge_ex_vat). express_surcharge_ex_vat (>= 0) is added on top of the price book's base price. A window carries no price of its own: price_ex_vat is refused. NULL = daily-cap-only. */
3847
3699
  weeklySchedule?: CreateSlotConfigDtoWeeklySchedule;
3848
3700
  dayMaxOrders?: number;
3849
3701
  /** bigint */
@@ -3984,7 +3836,7 @@ export interface SlotDto {
3984
3836
  transportSlotConfigId: string | null;
3985
3837
  transportServiceId: string;
3986
3838
  /**
3987
- * NULL = a pooled slot, generated by a config that names no zone (0077). A pooled slot is served to every zone the service covers, and a transport_service_price row naming a specific zone does not apply to it.
3839
+ * NULL = a pooled slot, generated by a config that names no zone (0077). A pooled slot is served to every zone the service covers, and its orders carry no zone, so no zone surcharge applies to them.
3988
3840
  * @nullable
3989
3841
  */
3990
3842
  serviceZoneId: string | null;
@@ -4017,19 +3869,10 @@ export interface SlotDto {
4017
3869
  */
4018
3870
  baseMaxWeightG: number | null;
4019
3871
  /**
4020
- * money
4021
- * @nullable
4022
- */
4023
- priceExVat: string | null;
4024
- /** @nullable */
4025
- vatRate: string | null;
4026
- /**
4027
- * money
3872
+ * money — the window surcharge: what this window adds on top of the price book's base price (>= 0), in the order's currency.
4028
3873
  * @nullable
4029
3874
  */
4030
3875
  expressSurchargeExVat: string | null;
4031
- /** @nullable */
4032
- currencyCode: string | null;
4033
3876
  status: string;
4034
3877
  manuallyClosed: boolean;
4035
3878
  /** @nullable */
@@ -4089,9 +3932,7 @@ export declare const PatchSlotDtoStatus: {
4089
3932
  export interface PatchSlotDto {
4090
3933
  status?: PatchSlotDtoStatus;
4091
3934
  manuallyClosed?: boolean;
4092
- /** money */
4093
- priceExVat?: string;
4094
- /** money */
3935
+ /** money — the window surcharge, added on top of the price book's base price; never negative. */
4095
3936
  expressSurchargeExVat?: string;
4096
3937
  windowStart?: string;
4097
3938
  windowEnd?: string;
@@ -4131,7 +3972,7 @@ export interface SlotWithAvailabilityDto {
4131
3972
  transportSlotConfigId: string | null;
4132
3973
  transportServiceId: string;
4133
3974
  /**
4134
- * NULL = a pooled slot, generated by a config that names no zone (0077). A pooled slot is served to every zone the service covers, and a transport_service_price row naming a specific zone does not apply to it.
3975
+ * NULL = a pooled slot, generated by a config that names no zone (0077). A pooled slot is served to every zone the service covers, and its orders carry no zone, so no zone surcharge applies to them.
4135
3976
  * @nullable
4136
3977
  */
4137
3978
  serviceZoneId: string | null;
@@ -4164,19 +4005,10 @@ export interface SlotWithAvailabilityDto {
4164
4005
  */
4165
4006
  baseMaxWeightG: number | null;
4166
4007
  /**
4167
- * money
4168
- * @nullable
4169
- */
4170
- priceExVat: string | null;
4171
- /** @nullable */
4172
- vatRate: string | null;
4173
- /**
4174
- * money
4008
+ * money — the window surcharge: what this window adds on top of the price book's base price (>= 0), in the order's currency.
4175
4009
  * @nullable
4176
4010
  */
4177
4011
  expressSurchargeExVat: string | null;
4178
- /** @nullable */
4179
- currencyCode: string | null;
4180
4012
  status: string;
4181
4013
  manuallyClosed: boolean;
4182
4014
  /** @nullable */
@@ -4249,27 +4081,6 @@ export interface UpdateCapacityOverrideDto {
4249
4081
  effectiveUntil?: string;
4250
4082
  isActive?: boolean;
4251
4083
  }
4252
- export type PriceSuggestionDtoRationale = typeof PriceSuggestionDtoRationale[keyof typeof PriceSuggestionDtoRationale];
4253
- export declare const PriceSuggestionDtoRationale: {
4254
- readonly LOW_REMAINING_CAPACITY: "LOW_REMAINING_CAPACITY";
4255
- readonly OFF_PEAK: "OFF_PEAK";
4256
- readonly BASELINE: "BASELINE";
4257
- };
4258
- export interface PriceSuggestionDto {
4259
- transportServiceId: string;
4260
- serviceZoneId: string;
4261
- /** @nullable */
4262
- transportSlotId?: string | null;
4263
- /** @nullable */
4264
- transportCapacityDayId?: string | null;
4265
- /** The target's current base price */
4266
- basePrice: MoneyDto;
4267
- /** Non-binding recommended price */
4268
- suggestedPrice: MoneyDto;
4269
- /** 0..1 used/cap; 0 when uncapped */
4270
- utilisation: number;
4271
- rationale: PriceSuggestionDtoRationale;
4272
- }
4273
4084
  export interface RouteDto {
4274
4085
  routeId: string;
4275
4086
  warehouseId: string;
@@ -4780,11 +4591,10 @@ export interface TransportLegDto {
4780
4591
  dispatchedAt: string | null;
4781
4592
  /** @nullable */
4782
4593
  completedAt: string | null;
4783
- /** @nullable */
4784
- priceExVat: string | null;
4785
- /** @nullable */
4786
- vatRate: string | null;
4787
- /** @nullable */
4594
+ /**
4595
+ * The order's currency.
4596
+ * @nullable
4597
+ */
4788
4598
  currencyCode: string | null;
4789
4599
  createdAt: string;
4790
4600
  updatedAt: string;
@@ -6134,23 +5944,6 @@ export interface DisposalRequestResultDto {
6134
5944
  /** True when this response replays a previous run of the key. */
6135
5945
  idempotent: boolean;
6136
5946
  }
6137
- export interface DisposalHandlingFeeDto {
6138
- /**
6139
- * Fee amount ex-VAT, integer minor units (e.g. öre/cents). Null when not yet priced for this tenant.
6140
- * @nullable
6141
- */
6142
- amountExVatMinor: number | null;
6143
- /**
6144
- * VAT rate as a percentage (25 = 25%). Null when not yet priced for this tenant.
6145
- * @nullable
6146
- */
6147
- vatRate: number | null;
6148
- /**
6149
- * ISO 4217. Null when not yet priced for this tenant.
6150
- * @nullable
6151
- */
6152
- currencyCode: string | null;
6153
- }
6154
5947
  export interface CancelDisposalRequestDto {
6155
5948
  /**
6156
5949
  * Why the request is being withdrawn.
@@ -7925,8 +7718,6 @@ export interface BillingAccountDto {
7925
7718
  accountingProvider: string;
7926
7719
  /** Payment provider enum. */
7927
7720
  paymentProvider: string;
7928
- /** @nullable */
7929
- priceListId: string | null;
7930
7721
  createdAt: string;
7931
7722
  updatedAt: string;
7932
7723
  }
@@ -7959,7 +7750,6 @@ export interface CreateBillingAccountDto {
7959
7750
  /** ISO 4217 currency code. */
7960
7751
  currencyCode?: string;
7961
7752
  languageCode?: string;
7962
- priceListId?: string;
7963
7753
  }
7964
7754
  export type UpdateBillingAccountDtoCustomerType = typeof UpdateBillingAccountDtoCustomerType[keyof typeof UpdateBillingAccountDtoCustomerType];
7965
7755
  export declare const UpdateBillingAccountDtoCustomerType: {
@@ -7989,7 +7779,6 @@ export interface UpdateBillingAccountDto {
7989
7779
  /** ISO 4217 currency code. */
7990
7780
  currencyCode?: string;
7991
7781
  languageCode?: string;
7992
- priceListId?: string;
7993
7782
  }
7994
7783
  export interface InvoiceDto {
7995
7784
  invoiceId: string;
@@ -8057,6 +7846,14 @@ export interface PaginatedInvoicesDto {
8057
7846
  /** Effective rows skipped applied. */
8058
7847
  offset: number;
8059
7848
  }
7849
+ export interface AppliedCouponSummaryDto {
7850
+ couponId: string;
7851
+ couponBenefitId: string;
7852
+ /** percentage / fixed_amount / replacement_price. */
7853
+ benefitType: string;
7854
+ /** What the benefit took off, in minor currency units, measured on the whole part of the invoice line it applied to — not on this row alone. A line billed as several rows (one per constant-volume span) repeats the entry on each row of that part, so do not sum it across rows; the rows' own amounts are already net of it. */
7855
+ discountAmountMinor: number;
7856
+ }
8060
7857
  export interface InvoiceRowDto {
8061
7858
  invoiceRowId: string;
8062
7859
  /** @nullable */
@@ -8073,8 +7870,13 @@ export interface InvoiceRowDto {
8073
7870
  vatRate: string;
8074
7871
  /** ISO 4217 currency code. */
8075
7872
  currencyCode: string;
8076
- /** @nullable */
7873
+ /**
7874
+ * Explanation printed on the invoice line: why a floor or minimum period applied, and the title of a campaign or discount code that reduced the row, in the customer's language.
7875
+ * @nullable
7876
+ */
8077
7877
  freeText: string | null;
7878
+ /** Coupon benefits that reduced this row. Empty when none did. */
7879
+ appliedCoupons: AppliedCouponSummaryDto[];
8078
7880
  /**
8079
7881
  * Billing period start, for a row priced from a real period (e.g. a subscription month). Null for a point-in-time row (see servicedAt) or a correction row (credit_note/adjustment), which carries no period.
8080
7882
  * @nullable
@@ -8264,8 +8066,8 @@ export interface CreateArticleDto {
8264
8066
  vatInclusiveDefault?: boolean;
8265
8067
  rutEligible?: boolean;
8266
8068
  isActive?: boolean;
8267
- /** Default VAT rate (numeric column → string, e.g. 25.0000). */
8268
- vatRateDefault?: string;
8069
+ /** Default VAT rate, a percentage (numeric column → string): 25.0000 for 25 %, 25.5000 for 25.5 %. Invoice rows priced on this article take their VAT from it. */
8070
+ vatRateDefault: string;
8269
8071
  }
8270
8072
  export interface UpdateArticleDto {
8271
8073
  code?: string;
@@ -8280,156 +8082,58 @@ export interface UpdateArticleDto {
8280
8082
  /** Default VAT rate (numeric column → string, e.g. 25.0000). */
8281
8083
  vatRateDefault?: string;
8282
8084
  }
8283
- export interface PriceListDto {
8284
- priceListId: string;
8285
- tenantId: string;
8286
- name: string;
8287
- code: string;
8288
- /** @nullable */
8289
- description: string | null;
8085
+ export interface EnabledCurrencyDto {
8290
8086
  /** ISO 4217 currency code. */
8291
8087
  currencyCode: string;
8088
+ /** Used at billing_account creation when no currency is specified. */
8292
8089
  isDefault: boolean;
8293
- /** @nullable */
8294
- effectiveFrom: string | null;
8295
- /** @nullable */
8296
- effectiveUntil: string | null;
8297
8090
  isActive: boolean;
8298
- /** Lifecycle status (draft / pending_approval / active / archived). */
8299
- lifecycleStatus: string;
8300
8091
  createdAt: string;
8301
8092
  updatedAt: string;
8302
8093
  }
8303
- export interface PriceListItemDto {
8304
- priceListItemId: string;
8305
- priceListId: string;
8094
+ /**
8095
+ * When one-off charges (a transport, its start fee, a failed-transport or packaging fee) are invoiced: `per_charge` (on an invoice of their own, the day after they are incurred) or `monthly` (on the calendar month's invoice beside storage, once the month has closed). Storage, subscription and recurring charges are invoiced monthly either way. Defaults to `per_charge`. Written by platform admins only.
8096
+ */
8097
+ export type TenantBillingConfigDtoOneOffInvoicing = typeof TenantBillingConfigDtoOneOffInvoicing[keyof typeof TenantBillingConfigDtoOneOffInvoicing];
8098
+ export declare const TenantBillingConfigDtoOneOffInvoicing: {
8099
+ readonly per_charge: "per_charge";
8100
+ readonly monthly: "monthly";
8101
+ };
8102
+ export interface TenantBillingConfigDto {
8103
+ tenantBillingConfigId: string;
8306
8104
  tenantId: string;
8307
- articleId: string;
8308
- unitOfMeasureId: string;
8309
- /** Price excl. VAT in minor currency units. */
8310
- priceExVatMinor: number;
8311
- /**
8312
- * VAT rate override (numeric) or null.
8313
- * @nullable
8314
- */
8315
- vatRateOverride: string | null;
8316
- /** Minimum quantity (numeric). */
8317
- minQuantity: string;
8105
+ /** Default accounting provider enum. */
8106
+ defaultAccountingProvider: string;
8107
+ /** Default payment provider enum. */
8108
+ defaultPaymentProvider: string;
8109
+ /** @nullable */
8110
+ defaultPaymentMethodId: string | null;
8111
+ /** @nullable */
8112
+ defaultPaymentTermId: string | null;
8113
+ /** @nullable */
8114
+ defaultBillingFrequencyId: string | null;
8115
+ autoChargeEnabled: boolean;
8116
+ requiresPricingApproval: boolean;
8318
8117
  /**
8319
- * Maximum quantity (numeric) or null.
8118
+ * The tenant's own legal-entity registration number (e.g. Swedish orgnummer).
8320
8119
  * @nullable
8321
8120
  */
8322
- maxQuantity: string | null;
8323
- effectiveFrom: string;
8324
- /** @nullable */
8325
- effectiveUntil: string | null;
8326
- isActive: boolean;
8327
- /** Lifecycle status (draft / pending_approval / active / archived). */
8328
- lifecycleStatus: string;
8121
+ corporateIdentityNumber: string | null;
8122
+ /** The tenant's billing calendar: the IANA timezone its storage nights, invoice windows and billable-event dates are counted in. Defaults to `Europe/Stockholm`. Written by platform admins only, and fixed once the tenant has an invoice. */
8123
+ timezone: string;
8124
+ /** When one-off charges (a transport, its start fee, a failed-transport or packaging fee) are invoiced: `per_charge` (on an invoice of their own, the day after they are incurred) or `monthly` (on the calendar month's invoice beside storage, once the month has closed). Storage, subscription and recurring charges are invoiced monthly either way. Defaults to `per_charge`. Written by platform admins only. */
8125
+ oneOffInvoicing: TenantBillingConfigDtoOneOffInvoicing;
8329
8126
  createdAt: string;
8330
8127
  updatedAt: string;
8331
- }
8332
- export interface CreatePriceListDto {
8333
- name: string;
8334
- code: string;
8335
- /** ISO 4217 currency code (3 uppercase letters). */
8336
- currencyCode: string;
8337
- description?: string;
8338
- isDefault?: boolean;
8339
- effectiveFrom?: string;
8340
- effectiveUntil?: string;
8341
- changeReason?: string;
8128
+ enabledCurrencies: EnabledCurrencyDto[];
8342
8129
  }
8343
8130
  /**
8344
- * Move between draft and pending_approval only. Activation/archival are dedicated endpoints.
8131
+ * When one-off charges are invoiced (see the read model). **Changed by platform admins only**: anyone else sending a value that differs from the current one gets 403 and nothing is written. Sending the current value back — a form that round-trips the object — is accepted. A change applies to the charges not yet invoiced; nothing already invoiced moves.
8345
8132
  */
8346
- export type UpdatePriceListDtoLifecycleStatus = typeof UpdatePriceListDtoLifecycleStatus[keyof typeof UpdatePriceListDtoLifecycleStatus];
8347
- export declare const UpdatePriceListDtoLifecycleStatus: {
8348
- readonly draft: "draft";
8349
- readonly pending_approval: "pending_approval";
8350
- };
8351
- export interface UpdatePriceListDto {
8352
- name?: string;
8353
- code?: string;
8354
- description?: string;
8355
- isDefault?: boolean;
8356
- effectiveFrom?: string;
8357
- effectiveUntil?: string;
8358
- changeReason?: string;
8359
- /** Move between draft and pending_approval only. Activation/archival are dedicated endpoints. */
8360
- lifecycleStatus?: UpdatePriceListDtoLifecycleStatus;
8361
- }
8362
- export interface PriceListLifecycleActionDto {
8363
- /** Optional justification for this decision. */
8364
- changeReason?: string;
8365
- }
8366
- export interface CreatePriceListItemDto {
8367
- articleId: string;
8368
- unitOfMeasureId: string;
8369
- /** Price excluding VAT in minor units (never negative). */
8370
- priceExVatMinor: number;
8371
- /** VAT rate override (numeric column → string, e.g. 25.0000). */
8372
- vatRateOverride?: string;
8373
- /** Minimum quantity (numeric column → string). */
8374
- minQuantity?: string;
8375
- /** Maximum quantity (numeric column → string). */
8376
- maxQuantity?: string;
8377
- effectiveFrom: string;
8378
- effectiveUntil?: string;
8379
- changeReason?: string;
8380
- }
8381
- export interface EnabledCurrencyDto {
8382
- /** ISO 4217 currency code. */
8383
- currencyCode: string;
8384
- /** Used at billing_account creation when no currency is specified. */
8385
- isDefault: boolean;
8386
- isActive: boolean;
8387
- createdAt: string;
8388
- updatedAt: string;
8389
- }
8390
- /**
8391
- * Which pricing source the checkout quote serves: `legacy` (price list + transport rate card), `shadow` (legacy served, the pricing-engine quote computed beside it and every difference logged), or `live` (the pricing-engine quote, from the pricing rules the invoice uses). Written by platform admins only.
8392
- */
8393
- export type TenantBillingConfigDtoPriceBookMode = typeof TenantBillingConfigDtoPriceBookMode[keyof typeof TenantBillingConfigDtoPriceBookMode];
8394
- export declare const TenantBillingConfigDtoPriceBookMode: {
8395
- readonly legacy: "legacy";
8396
- readonly shadow: "shadow";
8397
- readonly live: "live";
8398
- };
8399
- export interface TenantBillingConfigDto {
8400
- tenantBillingConfigId: string;
8401
- tenantId: string;
8402
- /** Default accounting provider enum. */
8403
- defaultAccountingProvider: string;
8404
- /** Default payment provider enum. */
8405
- defaultPaymentProvider: string;
8406
- /** @nullable */
8407
- defaultPaymentMethodId: string | null;
8408
- /** @nullable */
8409
- defaultPaymentTermId: string | null;
8410
- /** @nullable */
8411
- defaultBillingFrequencyId: string | null;
8412
- autoChargeEnabled: boolean;
8413
- requiresPricingApproval: boolean;
8414
- /**
8415
- * The tenant's own legal-entity registration number (e.g. Swedish orgnummer).
8416
- * @nullable
8417
- */
8418
- corporateIdentityNumber: string | null;
8419
- /** Which pricing source the checkout quote serves: `legacy` (price list + transport rate card), `shadow` (legacy served, the pricing-engine quote computed beside it and every difference logged), or `live` (the pricing-engine quote, from the pricing rules the invoice uses). Written by platform admins only. */
8420
- priceBookMode: TenantBillingConfigDtoPriceBookMode;
8421
- createdAt: string;
8422
- updatedAt: string;
8423
- enabledCurrencies: EnabledCurrencyDto[];
8424
- }
8425
- /**
8426
- * Which pricing source the checkout quote serves (see the read model). **Changed by platform admins only**: anyone else sending a value that differs from the current one gets 403 and nothing is written. Sending the current value back — a form that round-trips the object — is accepted.
8427
- */
8428
- export type UpdateTenantBillingConfigDtoPriceBookMode = typeof UpdateTenantBillingConfigDtoPriceBookMode[keyof typeof UpdateTenantBillingConfigDtoPriceBookMode];
8429
- export declare const UpdateTenantBillingConfigDtoPriceBookMode: {
8430
- readonly legacy: "legacy";
8431
- readonly shadow: "shadow";
8432
- readonly live: "live";
8133
+ export type UpdateTenantBillingConfigDtoOneOffInvoicing = typeof UpdateTenantBillingConfigDtoOneOffInvoicing[keyof typeof UpdateTenantBillingConfigDtoOneOffInvoicing];
8134
+ export declare const UpdateTenantBillingConfigDtoOneOffInvoicing: {
8135
+ readonly per_charge: "per_charge";
8136
+ readonly monthly: "monthly";
8433
8137
  };
8434
8138
  export interface UpdateTenantBillingConfigDto {
8435
8139
  defaultPaymentMethodId?: string;
@@ -8439,8 +8143,10 @@ export interface UpdateTenantBillingConfigDto {
8439
8143
  requiresPricingApproval?: boolean;
8440
8144
  /** The tenant's own legal-entity registration number (e.g. Swedish orgnummer). */
8441
8145
  corporateIdentityNumber?: string;
8442
- /** Which pricing source the checkout quote serves (see the read model). **Changed by platform admins only**: anyone else sending a value that differs from the current one gets 403 and nothing is written. Sending the current value back — a form that round-trips the object — is accepted. */
8443
- priceBookMode?: UpdateTenantBillingConfigDtoPriceBookMode;
8146
+ /** The tenant's billing calendar (see the read model): a canonical IANA timezone name. **Changed by platform admins only**, and only before the tenant's first invoice: anyone else sending a value that differs from the current one gets 403, and a change once the tenant has an invoice gets 409. Sending the current value back — a form that round-trips the object — is accepted. */
8147
+ timezone?: string;
8148
+ /** When one-off charges are invoiced (see the read model). **Changed by platform admins only**: anyone else sending a value that differs from the current one gets 403 and nothing is written. Sending the current value back — a form that round-trips the object — is accepted. A change applies to the charges not yet invoiced; nothing already invoiced moves. */
8149
+ oneOffInvoicing?: UpdateTenantBillingConfigDtoOneOffInvoicing;
8444
8150
  changeReason?: string;
8445
8151
  }
8446
8152
  export interface EnabledCurrencyInputDto {
@@ -8614,11 +8320,6 @@ export interface DiscountRuleDto {
8614
8320
  * @nullable
8615
8321
  */
8616
8322
  billingAccountId: string | null;
8617
- /**
8618
- * Target price list, or null for any list.
8619
- * @nullable
8620
- */
8621
- priceListId: string | null;
8622
8323
  /**
8623
8324
  * Target article, or null for any article.
8624
8325
  * @nullable
@@ -8706,7 +8407,6 @@ export interface CreateDiscountRuleDto {
8706
8407
  currencyCode?: string;
8707
8408
  organizationId?: string;
8708
8409
  billingAccountId?: string;
8709
- priceListId?: string;
8710
8410
  articleId?: string;
8711
8411
  bindingPlanId?: string;
8712
8412
  /** Optional JSON conditions. */
@@ -8934,6 +8634,25 @@ export interface CouponDto {
8934
8634
  createdAt: string;
8935
8635
  updatedAt: string;
8936
8636
  }
8637
+ /**
8638
+ * @nullable
8639
+ */
8640
+ export type CouponBenefitDtoMaxQuantityUnit = typeof CouponBenefitDtoMaxQuantityUnit[keyof typeof CouponBenefitDtoMaxQuantityUnit] | null;
8641
+ export declare const CouponBenefitDtoMaxQuantityUnit: {
8642
+ readonly m3: "m3";
8643
+ readonly hours: "hours";
8644
+ };
8645
+ /**
8646
+ * Which of an invoice line's events share one cap. Null on a money cap written before caps had a scope, which means per_billing_period.
8647
+ * @nullable
8648
+ */
8649
+ export type CouponBenefitDtoCapScope = typeof CouponBenefitDtoCapScope[keyof typeof CouponBenefitDtoCapScope] | null;
8650
+ export declare const CouponBenefitDtoCapScope: {
8651
+ readonly per_event: "per_event";
8652
+ readonly per_order: "per_order";
8653
+ readonly per_billing_period: "per_billing_period";
8654
+ readonly lifetime: "lifetime";
8655
+ };
8937
8656
  export interface CouponBenefitDto {
8938
8657
  couponBenefitId: string;
8939
8658
  couponId: string;
@@ -8954,12 +8673,44 @@ export interface CouponBenefitDto {
8954
8673
  grantCreditAmountMinor: number | null;
8955
8674
  /** @nullable */
8956
8675
  maxDiscountMinor: number | null;
8676
+ /**
8677
+ * Quantity cap, in maxQuantityUnit.
8678
+ * @nullable
8679
+ */
8680
+ maxQuantity: number | null;
8681
+ /** @nullable */
8682
+ maxQuantityUnit: CouponBenefitDtoMaxQuantityUnit;
8683
+ /**
8684
+ * Which of an invoice line's events share one cap. Null on a money cap written before caps had a scope, which means per_billing_period.
8685
+ * @nullable
8686
+ */
8687
+ capScope: CouponBenefitDtoCapScope;
8957
8688
  /** @nullable */
8958
8689
  currencyCode: string | null;
8959
8690
  /** Application priority (lower applies first). */
8960
8691
  priority: number;
8961
8692
  createdAt: string;
8962
8693
  }
8694
+ export interface CouponTextDto {
8695
+ couponTextId: string;
8696
+ couponId: string;
8697
+ /** BCP-47 locale. */
8698
+ locale: string;
8699
+ /** Name of the offer as the customer reads it. Also labels the invoice rows the coupon reduces. */
8700
+ title: string;
8701
+ /**
8702
+ * One or two sentences for a banner or the cart.
8703
+ * @nullable
8704
+ */
8705
+ summary: string | null;
8706
+ /**
8707
+ * The offer's terms, e.g. its clawback rule.
8708
+ * @nullable
8709
+ */
8710
+ terms: string | null;
8711
+ createdAt: string;
8712
+ updatedAt: string;
8713
+ }
8963
8714
  export interface CouponDetailDto {
8964
8715
  couponId: string;
8965
8716
  tenantId: string;
@@ -9002,6 +8753,8 @@ export interface CouponDetailDto {
9002
8753
  updatedAt: string;
9003
8754
  /** The coupon's benefits. */
9004
8755
  benefits: CouponBenefitDto[];
8756
+ /** The coupon's customer-facing texts, one per locale, ordered by locale. A locale with no text falls back to another (same language, then the tenant's default, then en-GB). */
8757
+ texts: CouponTextDto[];
9005
8758
  }
9006
8759
  export type CouponValidationDtoReason = typeof CouponValidationDtoReason[keyof typeof CouponValidationDtoReason];
9007
8760
  export declare const CouponValidationDtoReason: {
@@ -9106,6 +8859,23 @@ export declare const CreateCouponBenefitDtoBenefitType: {
9106
8859
  readonly replacement_price: "replacement_price";
9107
8860
  readonly grant_account_credit: "grant_account_credit";
9108
8861
  };
8862
+ /**
8863
+ * Unit of maxQuantity: m3 (stored or moved volume) or hours. Required iff maxQuantity is set.
8864
+ */
8865
+ export type CreateCouponBenefitDtoMaxQuantityUnit = typeof CreateCouponBenefitDtoMaxQuantityUnit[keyof typeof CreateCouponBenefitDtoMaxQuantityUnit];
8866
+ export declare const CreateCouponBenefitDtoMaxQuantityUnit: {
8867
+ readonly m3: "m3";
8868
+ readonly hours: "hours";
8869
+ };
8870
+ /**
8871
+ * Which of an invoice line's priced events share one cap, money and quantity alike. per_event: each event alone. per_order: the events of one sales order — a storage night bills no order and is its own event, so a per_order m³ cap on storage bounds the account's volume held per night. per_billing_period: the whole invoice line. Required with maxQuantity; a maxDiscountMinor given without it is stored as per_billing_period. lifetime is not accepted yet.
8872
+ */
8873
+ export type CreateCouponBenefitDtoCapScope = typeof CreateCouponBenefitDtoCapScope[keyof typeof CreateCouponBenefitDtoCapScope];
8874
+ export declare const CreateCouponBenefitDtoCapScope: {
8875
+ readonly per_event: "per_event";
8876
+ readonly per_order: "per_order";
8877
+ readonly per_billing_period: "per_billing_period";
8878
+ };
9109
8879
  export interface CreateCouponBenefitDto {
9110
8880
  benefitType: CreateCouponBenefitDtoBenefitType;
9111
8881
  /** Target article. Required (with or instead of articleCategory) for discount-style benefits. */
@@ -9122,11 +8892,31 @@ export interface CreateCouponBenefitDto {
9122
8892
  grantCreditAmountMinor?: number;
9123
8893
  /** Money cap on a percentage discount (minor units). Forces currencyCode to be set. */
9124
8894
  maxDiscountMinor?: number;
8895
+ /** Quantity cap: the most of what a row measured that the benefit reaches, in maxQuantityUnit (at most 4 decimals). Above it the benefit reaches cap / quantity of the row's amount and the rest is billed in full. A row measured in no quantity (a start fee, a fixed surcharge) takes the benefit in full. Requires maxQuantityUnit and capScope; not allowed on grant_account_credit. */
8896
+ maxQuantity?: number;
8897
+ /** Unit of maxQuantity: m3 (stored or moved volume) or hours. Required iff maxQuantity is set. */
8898
+ maxQuantityUnit?: CreateCouponBenefitDtoMaxQuantityUnit;
8899
+ /** Which of an invoice line's priced events share one cap, money and quantity alike. per_event: each event alone. per_order: the events of one sales order — a storage night bills no order and is its own event, so a per_order m³ cap on storage bounds the account's volume held per night. per_billing_period: the whole invoice line. Required with maxQuantity; a maxDiscountMinor given without it is stored as per_billing_period. lifetime is not accepted yet. */
8900
+ capScope?: CreateCouponBenefitDtoCapScope;
9125
8901
  /** ISO 4217 currency code. Required for fixed_amount/replacement_price/grant_account_credit and for a capped percentage; omitted for an uncapped percentage. */
9126
8902
  currencyCode?: string;
9127
8903
  /** Application priority (lower applies first); default 100. */
9128
8904
  priority?: number;
9129
8905
  }
8906
+ export interface UpsertCouponTextDto {
8907
+ /** @maxLength 80 */
8908
+ title: string;
8909
+ /**
8910
+ * @maxLength 500
8911
+ * @nullable
8912
+ */
8913
+ summary?: string | null;
8914
+ /**
8915
+ * @maxLength 2000
8916
+ * @nullable
8917
+ */
8918
+ terms?: string | null;
8919
+ }
9130
8920
  /**
9131
8921
  * Redemption source (default manual).
9132
8922
  */
@@ -9317,11 +9107,6 @@ export interface PricingRuleDto {
9317
9107
  * @nullable
9318
9108
  */
9319
9109
  billingAccountId: string | null;
9320
- /**
9321
- * Target price list, or null.
9322
- * @nullable
9323
- */
9324
- priceListId: string | null;
9325
9110
  /** The billable event type these rules price. */
9326
9111
  billableEventType: string;
9327
9112
  /** The billing article this rule's basis rows post to — the ledger line on the invoice. Not a scope: the rule prices every event of its type within its billingAccountId scope, whatever goods the event concerns. */
@@ -9389,8 +9174,6 @@ export interface ApplyTemplateDto {
9389
9174
  currencyCode: string;
9390
9175
  /** Omit for the tenant-wide default; set for a per-customer override. */
9391
9176
  billingAccountId?: string;
9392
- /** Reserved for price-list-scoped rules (#70) — not implemented yet, so a non-null value is rejected with 400 (BE-1822). Omit this field. */
9393
- priceListId?: string;
9394
9177
  /** Template form values, per the template's uiFormSchema (e.g. { amount_minor: 49900 }). */
9395
9178
  input: ApplyTemplateDtoInput;
9396
9179
  effectiveFrom: string;
@@ -9493,6 +9276,149 @@ export interface SimulatePricingResponseDto {
9493
9276
  basisRows: SimulatedBasisRowDto[];
9494
9277
  projectedInvoiceRowsBeforeDiscounts: ProjectedInvoiceRowDto[];
9495
9278
  }
9279
+ /**
9280
+ * PICKUP quotes one month of storage and the pickup order, as a PICKUP cart; DELIVERY quotes the delivery order.
9281
+ */
9282
+ export type SimulatePricingQuoteDtoOrderType = typeof SimulatePricingQuoteDtoOrderType[keyof typeof SimulatePricingQuoteDtoOrderType];
9283
+ export declare const SimulatePricingQuoteDtoOrderType: {
9284
+ readonly PICKUP: "PICKUP";
9285
+ readonly DELIVERY: "DELIVERY";
9286
+ };
9287
+ /**
9288
+ * The cart's customer type (default personal). Read only by the transport rate card, when a rule bills the quoted price.
9289
+ */
9290
+ export type SimulatePricingQuoteDtoCustomerType = typeof SimulatePricingQuoteDtoCustomerType[keyof typeof SimulatePricingQuoteDtoCustomerType];
9291
+ export declare const SimulatePricingQuoteDtoCustomerType: {
9292
+ readonly business: "business";
9293
+ readonly personal: "personal";
9294
+ };
9295
+ export interface SimulatePricingQuoteDto {
9296
+ /** PICKUP quotes one month of storage and the pickup order, as a PICKUP cart; DELIVERY quotes the delivery order. */
9297
+ orderType: SimulatePricingQuoteDtoOrderType;
9298
+ /** The planned pickup or delivery date the rules are resolved as of. Defaults to the draft's effective date when the draft is priced, else today in the tenant's billing calendar. */
9299
+ date?: string;
9300
+ /** Total goods volume in m³ (at most 4 decimals, 0–10000). 0 with no itemCount quotes an empty cart: no storage and no pods. */
9301
+ volumeM3: number;
9302
+ /** Identical units the volume is split over, each one estimated pod (1–1000; default 1, or none when volumeM3 is 0) — what a per-item or per-pod floor counts. */
9303
+ itemCount?: number;
9304
+ /** ISO 4217 currency code the quote is priced in. */
9305
+ currencyCode: string;
9306
+ /** Quote for this customer: their per-customer rules win the slots they claim, as on their cart. Omit for the tenant-wide price book. Campaigns still read as a new customer. */
9307
+ billingAccountId?: string;
9308
+ /** The cart's customer type (default personal). Read only by the transport rate card, when a rule bills the quoted price. */
9309
+ customerType?: SimulatePricingQuoteDtoCustomerType;
9310
+ /** The customer's service zone, carried on the order as the cart carries its slot's. Overrides an all-zones slot config's; must agree with a zone-specific one. */
9311
+ serviceZoneId?: string;
9312
+ /** The slot config whose window is booked. Requires windowStart. Its service must sell orderType. */
9313
+ transportSlotConfigId?: string;
9314
+ /** The booked window's start (HH:MM) in the config's weekly schedule on the date's weekday. Its express surcharge is the window surcharge; its price override, when set, is the whole transport price. Requires transportSlotConfigId. */
9315
+ windowStart?: string;
9316
+ /** Quote as a customer with no history ordering on the date: every approved automatic campaign whose offer window is open on it applies, as it would on that customer's cart (default false). */
9317
+ newCustomerInCampaignWindow?: boolean;
9318
+ /** Price the open draft change set as it would read once published (default true). With no draft, a draft in another currency, or a date before the draft takes effect, the live price book prices it — see priceBook.source. */
9319
+ useDraft?: boolean;
9320
+ }
9321
+ export interface SimulatedPriceBookDraftDto {
9322
+ changeSetId: string;
9323
+ version: number;
9324
+ /** The date publishing now would take the draft live from: its own effective date, or today if that has passed. */
9325
+ effectiveFrom: string;
9326
+ currencyCode: string;
9327
+ }
9328
+ /**
9329
+ * `draft`: the open draft, as publishing it would leave the price book on the date. `live`: the published rules. Whether the draft can be published is the change-set preview's answer, not this one's.
9330
+ */
9331
+ export type SimulatedPriceBookSourceDtoSource = typeof SimulatedPriceBookSourceDtoSource[keyof typeof SimulatedPriceBookSourceDtoSource];
9332
+ export declare const SimulatedPriceBookSourceDtoSource: {
9333
+ readonly live: "live";
9334
+ readonly draft: "draft";
9335
+ };
9336
+ export interface SimulatedPriceBookSourceDto {
9337
+ /** `draft`: the open draft, as publishing it would leave the price book on the date. `live`: the published rules. Whether the draft can be published is the change-set preview's answer, not this one's. */
9338
+ source: SimulatedPriceBookSourceDtoSource;
9339
+ /**
9340
+ * The tenant's open draft, whether or not it priced this; null when there is none or useDraft is false.
9341
+ * @nullable
9342
+ */
9343
+ draft: SimulatedPriceBookDraftDto | null;
9344
+ }
9345
+ /**
9346
+ * `estimate_over_cap`: the volume is over one of its per-event or per-order m³ caps, so a cart this size is not offered it.
9347
+ */
9348
+ export type SimulatedQuoteExcludedCampaignDtoReason = typeof SimulatedQuoteExcludedCampaignDtoReason[keyof typeof SimulatedQuoteExcludedCampaignDtoReason];
9349
+ export declare const SimulatedQuoteExcludedCampaignDtoReason: {
9350
+ readonly estimate_over_cap: "estimate_over_cap";
9351
+ };
9352
+ export interface SimulatedQuoteExcludedCampaignDto {
9353
+ /** The campaign's `billing.coupon` */
9354
+ couponId: string;
9355
+ /** `estimate_over_cap`: the volume is over one of its per-event or per-order m³ caps, so a cart this size is not offered it. */
9356
+ reason: SimulatedQuoteExcludedCampaignDtoReason;
9357
+ }
9358
+ export interface SimulatedQuoteDeferralDto {
9359
+ /** The `quote.deferred` value this explains. */
9360
+ kind: string;
9361
+ reason: string;
9362
+ }
9363
+ export interface SimulatedQuoteDto {
9364
+ /** ISO 4217 — the currency all amounts are expressed in */
9365
+ currencyCode: string;
9366
+ /** One line per priced component, as the cart lists them: the transport base, a zone surcharge, a window surcharge, the start fee, storage, and each floor (`floorKind` quantity or fee) on a line of its own. Each campaign's reduction is on the line it reduces (`campaignDiscountExVatMinor`). */
9367
+ lines: QuoteLineDto[];
9368
+ volume: QuoteVolumeDto;
9369
+ /** The automatic campaigns applied (newCustomerInCampaignWindow); status is qualifies. */
9370
+ campaigns: QuoteCampaignDto[];
9371
+ campaignsExcluded: SimulatedQuoteExcludedCampaignDto[];
9372
+ totals: QuoteTotalsDto;
9373
+ /** Components the cart would carry unpriced — the cart quote's `deferred`, with reasons in deferralReasons. */
9374
+ deferred: string[];
9375
+ deferralReasons: SimulatedQuoteDeferralDto[];
9376
+ }
9377
+ /**
9378
+ * Engine-shaped payload, as the real event will carry it once the cart is an order.
9379
+ */
9380
+ export type SimulatedQuoteEventDtoPayload = {
9381
+ [key: string]: unknown;
9382
+ };
9383
+ export interface SimulatedQuoteEventDto {
9384
+ billableEventType: string;
9385
+ basisPeriodStart: string;
9386
+ basisPeriodEnd: string;
9387
+ /** Engine-shaped payload, as the real event will carry it once the cart is an order. */
9388
+ payload: SimulatedQuoteEventDtoPayload;
9389
+ /**
9390
+ * Why none of this event could be priced (two rules on one component); null otherwise.
9391
+ * @nullable
9392
+ */
9393
+ error: string | null;
9394
+ }
9395
+ export interface SimulatedQuoteRuleDto {
9396
+ pricingRuleId: string;
9397
+ calculationMethod: string;
9398
+ ruleScope: string;
9399
+ componentCode: string;
9400
+ stage: number;
9401
+ /** Whether this rule produced at least one basis row for any supplied event. */
9402
+ matched: boolean;
9403
+ /** @nullable */
9404
+ resolutionError: string | null;
9405
+ /** The event type the rule prices. */
9406
+ billableEventType: string;
9407
+ /** Index into events[] of the event the rule was asked to price. */
9408
+ eventIndex: number;
9409
+ }
9410
+ export interface SimulatePricingQuoteResponseDto {
9411
+ /** The date the rules were resolved as of. */
9412
+ pricedAsOf: string;
9413
+ priceBook: SimulatedPriceBookSourceDto;
9414
+ quote: SimulatedQuoteDto;
9415
+ /** The invoice rows the basis rows group into, BEFORE campaigns, discounts and credits — which the monthly aggregator applies and this endpoint does not. `quote.lines` carry the campaign; these do not. */
9416
+ projectedInvoiceRowsBeforeDiscounts: ProjectedInvoiceRowDto[];
9417
+ events: SimulatedQuoteEventDto[];
9418
+ /** Every rule the events' selection returned. `matched` is false, with a resolutionError, for one that could not price or reads a component that could not; false with none for a window-surcharge rule left out because no surcharge was booked or the quoted price carries it. */
9419
+ matchedRules: SimulatedQuoteRuleDto[];
9420
+ basisRows: SimulatedBasisRowDto[];
9421
+ }
9496
9422
  export interface ApprovePricingRulesDto {
9497
9423
  /** Pricing rule ids to approve together, atomically. */
9498
9424
  pricingRuleIds: string[];
@@ -9880,15 +9806,8 @@ export interface PriceBookChangeSetDto {
9880
9806
  createdAt: string;
9881
9807
  updatedAt: string;
9882
9808
  }
9883
- export type PriceBookDtoPriceBookMode = typeof PriceBookDtoPriceBookMode[keyof typeof PriceBookDtoPriceBookMode];
9884
- export declare const PriceBookDtoPriceBookMode: {
9885
- readonly legacy: "legacy";
9886
- readonly shadow: "shadow";
9887
- readonly live: "live";
9888
- };
9889
9809
  export interface PriceBookDto {
9890
- priceBookMode: PriceBookDtoPriceBookMode;
9891
- /** Whether the caller may write the price book now: `live` opens it to tenant admins, `shadow` to platform admins only, `legacy` to nobody. */
9810
+ /** Whether the caller may write the price book: tenant admins and platform admins. */
9892
9811
  writable: boolean;
9893
9812
  /**
9894
9813
  * The currency the sections are read in — the tenant's default enabled currency — or null when the tenant has none, in which case every section is empty.
@@ -9966,6 +9885,130 @@ export interface DiscardPriceBookChangeSetDto {
9966
9885
  /** The change set version being discarded; a stale version is a 409. */
9967
9886
  version: number;
9968
9887
  }
9888
+ /**
9889
+ * @nullable
9890
+ */
9891
+ export type MeCampaignBenefitDtoMaxQuantityUnit = typeof MeCampaignBenefitDtoMaxQuantityUnit[keyof typeof MeCampaignBenefitDtoMaxQuantityUnit] | null;
9892
+ export declare const MeCampaignBenefitDtoMaxQuantityUnit: {
9893
+ readonly m3: "m3";
9894
+ readonly hours: "hours";
9895
+ };
9896
+ /**
9897
+ * What one cap covers: per_order is each order (for storage, the volume held on any one night); per_event each charge; per_billing_period each invoice line.
9898
+ * @nullable
9899
+ */
9900
+ export type MeCampaignBenefitDtoCapScope = typeof MeCampaignBenefitDtoCapScope[keyof typeof MeCampaignBenefitDtoCapScope] | null;
9901
+ export declare const MeCampaignBenefitDtoCapScope: {
9902
+ readonly per_event: "per_event";
9903
+ readonly per_order: "per_order";
9904
+ readonly per_billing_period: "per_billing_period";
9905
+ readonly lifetime: "lifetime";
9906
+ };
9907
+ export interface MeCampaignBenefitDto {
9908
+ couponBenefitId: string;
9909
+ /** @nullable */
9910
+ articleId: string | null;
9911
+ /**
9912
+ * Article category the benefit applies to, e.g. storage.
9913
+ * @nullable
9914
+ */
9915
+ articleCategory: string | null;
9916
+ /** percentage / fixed_amount / replacement_price / grant_account_credit. */
9917
+ benefitType: string;
9918
+ /**
9919
+ * Percentage off in basis points (5000 = 50 %).
9920
+ * @nullable
9921
+ */
9922
+ discountPercentBps: number | null;
9923
+ /**
9924
+ * Amount off in minor currency units.
9925
+ * @nullable
9926
+ */
9927
+ discountAmountMinor: number | null;
9928
+ /**
9929
+ * Price charged instead, in minor currency units.
9930
+ * @nullable
9931
+ */
9932
+ replacementPriceMinor: number | null;
9933
+ /**
9934
+ * Account credit granted, in minor currency units.
9935
+ * @nullable
9936
+ */
9937
+ grantCreditAmountMinor: number | null;
9938
+ /**
9939
+ * Cap on the reduction, in minor currency units.
9940
+ * @nullable
9941
+ */
9942
+ maxDiscountMinor: number | null;
9943
+ /**
9944
+ * The most the benefit reaches, in maxQuantityUnit: 10 with m3 is "up to 10 m³". Above it, full price.
9945
+ * @nullable
9946
+ */
9947
+ maxQuantity: number | null;
9948
+ /** @nullable */
9949
+ maxQuantityUnit: MeCampaignBenefitDtoMaxQuantityUnit;
9950
+ /**
9951
+ * What one cap covers: per_order is each order (for storage, the volume held on any one night); per_event each charge; per_billing_period each invoice line.
9952
+ * @nullable
9953
+ */
9954
+ capScope: MeCampaignBenefitDtoCapScope;
9955
+ /** @nullable */
9956
+ currencyCode: string | null;
9957
+ /** Application order (lower applies first). */
9958
+ priority: number;
9959
+ }
9960
+ export interface MeCampaignDto {
9961
+ campaignEnrollmentId: string;
9962
+ couponId: string;
9963
+ /** The campaign version the customer enrolled under. */
9964
+ couponVersion: number;
9965
+ /** Enrolment status. Only `active` enrolments are listed. */
9966
+ status: string;
9967
+ /**
9968
+ * Locale of `title` / `summary` / `terms`. Differs from the one asked for when the campaign has no text in it: the fallback is the same language, then the tenant's default, then en-GB, then any text. Null only when the campaign has no text at all.
9969
+ * @nullable
9970
+ */
9971
+ locale: string | null;
9972
+ /** @nullable */
9973
+ title: string | null;
9974
+ /** @nullable */
9975
+ summary: string | null;
9976
+ /** @nullable */
9977
+ terms: string | null;
9978
+ /** one_time / repeating_months / forever. */
9979
+ durationType: string;
9980
+ /**
9981
+ * Benefit length in months, for repeating_months.
9982
+ * @nullable
9983
+ */
9984
+ durationInMonths: number | null;
9985
+ /** Ordered as they apply. */
9986
+ benefits: MeCampaignBenefitDto[];
9987
+ /**
9988
+ * Planned date of the first pickup, which the benefit window starts from. Null until one is placed.
9989
+ * @nullable
9990
+ */
9991
+ anchorDate: string | null;
9992
+ /**
9993
+ * First day the benefit applies.
9994
+ * @nullable
9995
+ */
9996
+ appliesFrom: string | null;
9997
+ /**
9998
+ * EXCLUSIVE end of the benefit window: the benefit applies up to the day before. Null for a benefit with no end, or before the first pickup anchors the window.
9999
+ * @nullable
10000
+ */
10001
+ appliesUntil: string | null;
10002
+ /**
10003
+ * If the customer's storage ends before this date, the granted benefit is charged back on the next invoice. Null when the campaign has no clawback.
10004
+ * @nullable
10005
+ */
10006
+ clawbackUntil: string | null;
10007
+ }
10008
+ export interface MeCampaignsDto {
10009
+ /** The caller's organization's active campaigns whose benefit or clawback window is still open (or not yet anchored). Empty when there are none, and for a caller who is not an organization user. */
10010
+ campaigns: MeCampaignDto[];
10011
+ }
9969
10012
  export interface StripeWebhookAckDto {
9970
10013
  /** Always true once the event was accepted. */
9971
10014
  received: boolean;
@@ -11925,7 +11968,7 @@ export interface TenantGoodsDto {
11925
11968
  /** @nullable */
11926
11969
  description?: string | null;
11927
11970
  /**
11928
- * Display price ex VAT (numeric column → string). Derived from the authoritative minor-unit price on the SKU's pricing rule, written in the same transaction, so the two cannot disagree.
11971
+ * The SKU's price ex VAT as a decimal string, read from its pricing rule: the open-ended rule, which is the latest price set even when it starts in the future. Null when the SKU has no open-ended price.
11929
11972
  * @nullable
11930
11973
  */
11931
11974
  retailPriceExVat?: string | null;
@@ -11980,8 +12023,8 @@ export interface CreateTenantGoodsDto {
11980
12023
  unitPriceExVatMinor: number;
11981
12024
  /** ISO 4217. Required even though the SKU column is nullable: the pricing rule's currency is NOT NULL and must be enabled for the tenant (billing.tenant_enabled_currency), so a SKU without one could not be priced. */
11982
12025
  currencyCode: string;
11983
- /** VAT rate for the SKU's article (numeric → string, e.g. 25.0000). Defaults to the article default of 25.0000 when omitted. */
11984
- vatRate?: string;
12026
+ /** VAT rate for the SKU's article, a percentage (numeric → string): 25.0000 for 25 %, 25.5000 for 25.5 %. A code that restores a deleted SKU keeps that SKU's article, and so its rate; change it through PATCH /v1/billing/articles/:id. */
12027
+ vatRate: string;
11985
12028
  /** Date the price takes effect (YYYY-MM-DD). Defaults to today. The rule is open-ended until a later price change closes its window. */
11986
12029
  effectiveFrom?: string;
11987
12030
  category?: string;
@@ -12170,7 +12213,7 @@ export interface CheckoutMerchandiseDto {
12170
12213
  /** @nullable */
12171
12214
  description?: string | null;
12172
12215
  /**
12173
- * Display price ex VAT (numeric column → string).
12216
+ * Price ex VAT as a decimal string: what the SKU's pricing rule charges today, in currencyCode. Null when no price is in force today.
12174
12217
  * @nullable
12175
12218
  */
12176
12219
  retailPriceExVat?: string | null;
@@ -12206,7 +12249,7 @@ export interface MerchandiseEstimateLineDto {
12206
12249
  /** @nullable */
12207
12250
  description?: string | null;
12208
12251
  /**
12209
- * Display price ex VAT (numeric column → string).
12252
+ * Price ex VAT as a decimal string: what the SKU's pricing rule charges today, in currencyCode. Null when no price is in force today.
12210
12253
  * @nullable
12211
12254
  */
12212
12255
  retailPriceExVat?: string | null;
@@ -12890,23 +12933,6 @@ export declare const TransportServicesControllerListV1FulfilmentMode: {
12890
12933
  readonly DISPATCH_SLOT: "DISPATCH_SLOT";
12891
12934
  readonly BOOKED: "BOOKED";
12892
12935
  };
12893
- export type TransportServicesControllerListPricesV1Params = {
12894
- /**
12895
- * Max rows to return (1–100).
12896
- * @minimum 1
12897
- * @maximum 100
12898
- */
12899
- limit?: number;
12900
- /**
12901
- * Rows to skip.
12902
- * @minimum 0
12903
- */
12904
- offset?: number;
12905
- /**
12906
- * Filter by active state.
12907
- */
12908
- isActive?: boolean;
12909
- };
12910
12936
  export type ServiceZonesControllerListV1Params = {
12911
12937
  /**
12912
12938
  * Max rows to return (1–100).
@@ -13012,38 +13038,6 @@ export type CapacityControllerListOverridesV1Params = {
13012
13038
  */
13013
13039
  isActive?: boolean;
13014
13040
  };
13015
- export type PriceSuggestionControllerPriceSuggestionV1Params = {
13016
- /**
13017
- * The service zone the target belongs to
13018
- */
13019
- serviceZoneId: string;
13020
- /**
13021
- * Price this slot (XOR day / targetDate)
13022
- */
13023
- transportSlotId?: string;
13024
- /**
13025
- * Price this capacity day (XOR slot / targetDate)
13026
- */
13027
- transportCapacityDayId?: string;
13028
- /**
13029
- * Resolve + price the day for this date (XOR slot / day)
13030
- */
13031
- targetDate?: string;
13032
- customerType?: PriceSuggestionControllerPriceSuggestionV1CustomerType;
13033
- /**
13034
- * bigint
13035
- */
13036
- volumeCm3?: string;
13037
- /**
13038
- * bigint
13039
- */
13040
- weightG?: string;
13041
- };
13042
- export type PriceSuggestionControllerPriceSuggestionV1CustomerType = typeof PriceSuggestionControllerPriceSuggestionV1CustomerType[keyof typeof PriceSuggestionControllerPriceSuggestionV1CustomerType];
13043
- export declare const PriceSuggestionControllerPriceSuggestionV1CustomerType: {
13044
- readonly business: "business";
13045
- readonly personal: "personal";
13046
- };
13047
13041
  export type RoutesControllerListV1Params = {
13048
13042
  /**
13049
13043
  * Max rows to return (1–100).
@@ -13624,32 +13618,6 @@ export type ArticlesControllerListArticlesV1Params = {
13624
13618
  */
13625
13619
  offset?: number;
13626
13620
  };
13627
- export type PriceListsControllerListPriceListsV1Params = {
13628
- /**
13629
- * Max rows to return (1–100).
13630
- * @minimum 1
13631
- * @maximum 100
13632
- */
13633
- limit?: number;
13634
- /**
13635
- * Rows to skip.
13636
- * @minimum 0
13637
- */
13638
- offset?: number;
13639
- };
13640
- export type PriceListsControllerGetPriceListItemsV1Params = {
13641
- /**
13642
- * Max rows to return (1–100).
13643
- * @minimum 1
13644
- * @maximum 100
13645
- */
13646
- limit?: number;
13647
- /**
13648
- * Rows to skip.
13649
- * @minimum 0
13650
- */
13651
- offset?: number;
13652
- };
13653
13621
  export type RecurringFeeConfigsControllerListByBillingAccountV1Params = {
13654
13622
  billingAccountId: string;
13655
13623
  };
@@ -13866,6 +13834,18 @@ export type InvoiceBasisRowsControllerListInvoiceBasisRowsV1Params = {
13866
13834
  */
13867
13835
  invoiced?: boolean;
13868
13836
  };
13837
+ export type MeCampaignControllerListV1Params = {
13838
+ /**
13839
+ * Language to show the texts in. Omit it to get the customer's own: the organization's preferred locale, else its billing account's country.
13840
+ */
13841
+ locale?: MeCampaignControllerListV1Locale;
13842
+ };
13843
+ export type MeCampaignControllerListV1Locale = typeof MeCampaignControllerListV1Locale[keyof typeof MeCampaignControllerListV1Locale];
13844
+ export declare const MeCampaignControllerListV1Locale: {
13845
+ readonly 'sv-SE': "sv-SE";
13846
+ readonly 'en-GB': "en-GB";
13847
+ readonly 'fi-FI': "fi-FI";
13848
+ };
13869
13849
  export type UsersControllerListV1Params = {
13870
13850
  /**
13871
13851
  * Case-insensitive substring match over display name OR email. Omit to list the first page of the directory.