@vindentech/api-client 0.3.0-next.75 → 0.3.0-next.77

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.
@@ -1387,6 +1387,11 @@ export interface OrganizationDto {
1387
1387
  invoiceCountryCode: string | null;
1388
1388
  /** @nullable */
1389
1389
  preferredWarehouseId: string | null;
1390
+ /**
1391
+ * The language this customer's messages are written in (order confirmations, storage notices). null = not stated: the language follows the country of the customer's billing account (SE → sv-SE, FI → fi-FI, otherwise en-GB). A language with no authored template falls back to en-GB, then sv-SE.
1392
+ * @nullable
1393
+ */
1394
+ preferredLocale: string | null;
1390
1395
  /** @nullable */
1391
1396
  metadata: OrganizationDtoMetadata;
1392
1397
  createdAt: string;
@@ -1423,6 +1428,16 @@ export declare const CreateOrganizationDtoType: {
1423
1428
  readonly business: "business";
1424
1429
  readonly personal: "personal";
1425
1430
  };
1431
+ /**
1432
+ * The language this customer's messages are written in (order confirmations, storage notices). null = not stated: the language follows the country of the customer's billing account (SE → sv-SE, FI → fi-FI, otherwise en-GB). A language with no authored template falls back to en-GB, then sv-SE.
1433
+ * @nullable
1434
+ */
1435
+ export type CreateOrganizationDtoPreferredLocale = typeof CreateOrganizationDtoPreferredLocale[keyof typeof CreateOrganizationDtoPreferredLocale] | null;
1436
+ export declare const CreateOrganizationDtoPreferredLocale: {
1437
+ readonly 'sv-SE': "sv-SE";
1438
+ readonly 'en-GB': "en-GB";
1439
+ readonly 'fi-FI': "fi-FI";
1440
+ };
1426
1441
  export type CreateOrganizationDtoMetadata = {
1427
1442
  [key: string]: unknown;
1428
1443
  };
@@ -1440,8 +1455,23 @@ export interface CreateOrganizationDto {
1440
1455
  /** ISO-3166-1 alpha-2. */
1441
1456
  invoiceCountryCode?: string;
1442
1457
  preferredWarehouseId?: string;
1458
+ /**
1459
+ * The language this customer's messages are written in (order confirmations, storage notices). null = not stated: the language follows the country of the customer's billing account (SE → sv-SE, FI → fi-FI, otherwise en-GB). A language with no authored template falls back to en-GB, then sv-SE.
1460
+ * @nullable
1461
+ */
1462
+ preferredLocale?: CreateOrganizationDtoPreferredLocale;
1443
1463
  metadata?: CreateOrganizationDtoMetadata;
1444
1464
  }
1465
+ /**
1466
+ * The language this customer's messages are written in (order confirmations, storage notices). null = not stated: the language follows the country of the customer's billing account (SE → sv-SE, FI → fi-FI, otherwise en-GB). A language with no authored template falls back to en-GB, then sv-SE.
1467
+ * @nullable
1468
+ */
1469
+ export type UpdateOrganizationDtoPreferredLocale = typeof UpdateOrganizationDtoPreferredLocale[keyof typeof UpdateOrganizationDtoPreferredLocale] | null;
1470
+ export declare const UpdateOrganizationDtoPreferredLocale: {
1471
+ readonly 'sv-SE': "sv-SE";
1472
+ readonly 'en-GB': "en-GB";
1473
+ readonly 'fi-FI': "fi-FI";
1474
+ };
1445
1475
  export type UpdateOrganizationDtoMetadata = {
1446
1476
  [key: string]: unknown;
1447
1477
  };
@@ -1456,6 +1486,11 @@ export interface UpdateOrganizationDto {
1456
1486
  /** ISO-3166-1 alpha-2. */
1457
1487
  invoiceCountryCode?: string;
1458
1488
  preferredWarehouseId?: string;
1489
+ /**
1490
+ * The language this customer's messages are written in (order confirmations, storage notices). null = not stated: the language follows the country of the customer's billing account (SE → sv-SE, FI → fi-FI, otherwise en-GB). A language with no authored template falls back to en-GB, then sv-SE.
1491
+ * @nullable
1492
+ */
1493
+ preferredLocale?: UpdateOrganizationDtoPreferredLocale;
1459
1494
  metadata?: UpdateOrganizationDtoMetadata;
1460
1495
  }
1461
1496
  export interface OrganizationMemberDto {
@@ -2627,6 +2662,15 @@ export declare const QuoteLineDtoKind: {
2627
2662
  readonly INSURANCE: "INSURANCE";
2628
2663
  readonly START_FEE: "START_FEE";
2629
2664
  };
2665
+ /**
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.
2667
+ * @nullable
2668
+ */
2669
+ export type QuoteLineDtoFloorKind = typeof QuoteLineDtoFloorKind[keyof typeof QuoteLineDtoFloorKind] | null;
2670
+ export declare const QuoteLineDtoFloorKind: {
2671
+ readonly quantity: "quantity";
2672
+ readonly fee: "fee";
2673
+ };
2630
2674
  export interface QuoteLineDto {
2631
2675
  kind: QuoteLineDtoKind;
2632
2676
  /**
@@ -2636,9 +2680,9 @@ export interface QuoteLineDto {
2636
2680
  reference: string | null;
2637
2681
  description: string;
2638
2682
  quantity: number;
2639
- /** 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`. */
2683
+ /** 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). Sum `lineTotalExVatMinor`, never unit × quantity, or the result contradicts `totals`. */
2640
2684
  unitPriceExVatMinor: number;
2641
- /** Line total ex-VAT, integer minor units, AFTER any binding discount — the amount that reaches `totals` */
2685
+ /** Line total ex-VAT, integer minor units, AFTER any campaign and binding discount — the amount that reaches `totals` */
2642
2686
  lineTotalExVatMinor: number;
2643
2687
  /**
2644
2688
  * How much the binding plan took off this line, integer minor units. Null when no discount applied.
@@ -2650,10 +2694,30 @@ export interface QuoteLineDto {
2650
2694
  * @nullable
2651
2695
  */
2652
2696
  couponDiscountIncVatMinor: number | null;
2697
+ /**
2698
+ * 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.
2699
+ * @nullable
2700
+ */
2701
+ campaignDiscountExVatMinor: number | null;
2653
2702
  /** VAT rate as a percentage, per the platform-wide NUMERIC(6,4) convention (25 = 25%) */
2654
2703
  vatRate: number;
2655
2704
  /** Whether this line qualifies for the RUT labour deduction */
2656
2705
  rutEligible: boolean;
2706
+ /**
2707
+ * The `billing.pricing_rule` that priced this line, on lines the pricing engine priced (the tenant's price-book mode is `live`). Absent on lines priced from the price list, a slot or the rate card.
2708
+ * @nullable
2709
+ */
2710
+ pricingRuleId?: string | null;
2711
+ /**
2712
+ * The pricing rule's component (e.g. `storage_base`, `transport_base`, `start_fee`) — the same component code the invoice's basis row carries. Present exactly when `pricingRuleId` is.
2713
+ * @nullable
2714
+ */
2715
+ componentCode?: string | null;
2716
+ /**
2717
+ * 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.
2718
+ * @nullable
2719
+ */
2720
+ floorKind?: QuoteLineDtoFloorKind;
2657
2721
  }
2658
2722
  export interface QuoteVolumeDto {
2659
2723
  /** Total goods volume in cm³ */
@@ -2667,6 +2731,47 @@ export interface QuoteCouponDto {
2667
2731
  code: string;
2668
2732
  /** 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. */
2669
2733
  discountMinor: number;
2734
+ /** Always false: this is the code the customer entered. An automatic campaign is reported in `campaigns`, where it is true. */
2735
+ automatic: boolean;
2736
+ }
2737
+ /**
2738
+ * Present when `valid` is false. `not_combinable`: an automatic campaign this cart runs under refuses a code alongside it.
2739
+ */
2740
+ export type QuoteCouponValidationDtoReason = typeof QuoteCouponValidationDtoReason[keyof typeof QuoteCouponValidationDtoReason];
2741
+ export declare const QuoteCouponValidationDtoReason: {
2742
+ readonly not_found: "not_found";
2743
+ readonly inactive: "inactive";
2744
+ readonly not_yet_valid: "not_yet_valid";
2745
+ readonly expired: "expired";
2746
+ readonly not_combinable: "not_combinable";
2747
+ };
2748
+ export interface QuoteCouponValidationDto {
2749
+ valid: boolean;
2750
+ /** Present when `valid` is false. `not_combinable`: an automatic campaign this cart runs under refuses a code alongside it. */
2751
+ reason?: QuoteCouponValidationDtoReason;
2752
+ }
2753
+ /**
2754
+ * `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.
2755
+ */
2756
+ export type QuoteCampaignDtoStatus = typeof QuoteCampaignDtoStatus[keyof typeof QuoteCampaignDtoStatus];
2757
+ export declare const QuoteCampaignDtoStatus: {
2758
+ readonly qualifies: "qualifies";
2759
+ readonly provisional: "provisional";
2760
+ readonly enrolled: "enrolled";
2761
+ };
2762
+ export interface QuoteCampaignDto {
2763
+ /** The campaign's `billing.coupon` */
2764
+ couponId: string;
2765
+ /** Always true: granted automatically, never entered as a code */
2766
+ automatic: boolean;
2767
+ /** Whether a code may be used alongside it. When false the cart's code is refused — see `couponValidation`. */
2768
+ combinable: boolean;
2769
+ /** `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. */
2770
+ status: QuoteCampaignDtoStatus;
2771
+ /** What this campaign took off, ex-VAT, integer minor units — its share of `lines[].campaignDiscountExVatMinor`, already out of `totals`. */
2772
+ discountExVatMinor: number;
2773
+ /** The same reduction inc-VAT, minor units — the saving to show a consumer. Summed per line at that line's own rate. */
2774
+ discountIncVatMinor: number;
2670
2775
  }
2671
2776
  export interface QuoteBindingDto {
2672
2777
  bindingPlanId: string;
@@ -2699,17 +2804,17 @@ export interface QuoteDiscountDto {
2699
2804
  discountExVatMinor: number;
2700
2805
  }
2701
2806
  export interface QuoteTotalsDto {
2702
- /** Sum of line totals ex-VAT after binding discounts, minor units */
2807
+ /** Sum of line totals ex-VAT after campaign and binding discounts, minor units */
2703
2808
  exVatMinor: number;
2704
2809
  /** Total VAT, minor units */
2705
2810
  vatMinor: number;
2706
2811
  /** exVat + vat, minor units */
2707
2812
  incVatMinor: number;
2708
- /** What the customer pays: incVat − coupon discount − RUT deduction, minor units */
2813
+ /** What the customer pays: incVat − coupon discount − RUT deduction, minor units. Campaigns are already out of incVat. */
2709
2814
  payableMinor: number;
2710
2815
  /** 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. */
2711
2816
  discountExVatMinor: number;
2712
- /** 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. */
2817
+ /** 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 with no binding plan; add `campaigns[].discountIncVatMinor` for the price with no campaign either. Grossing `discountExVatMinor` up by the bundle's inc/ex ratio instead is only right when every discounted line carries the same VAT rate. */
2713
2818
  discountIncVatMinor: number;
2714
2819
  }
2715
2820
  export interface QuoteBindingOptionDto {
@@ -2738,6 +2843,13 @@ export interface QuoteResponseDto {
2738
2843
  volume: QuoteVolumeDto;
2739
2844
  /** @nullable */
2740
2845
  coupon: QuoteCouponDto | null;
2846
+ /**
2847
+ * The cart's code, validated. Null when the cart carries no code.
2848
+ * @nullable
2849
+ */
2850
+ couponValidation: QuoteCouponValidationDto | null;
2851
+ /** Automatic campaigns this cart qualifies for or already runs under. Empty when none. */
2852
+ campaigns: QuoteCampaignDto[];
2741
2853
  /**
2742
2854
  * The binding plan in force for this quote, or null when there is none
2743
2855
  * @nullable
@@ -2750,12 +2862,12 @@ export interface QuoteResponseDto {
2750
2862
  /** Whether setting `bindingId` on this cart would change the plan in force. False when the organization already holds a contract, because placement never rewrites an in-force binding — the options are then informational only. */
2751
2863
  bindingOptionsSelectable: boolean;
2752
2864
  /**
2753
- * Total RUT labour deduction in minor units. Null when RUT does not apply, and also when every RUT-eligible line was priced from a source that carries no post-deduction price to derive it from (see TRANSPORT_RUT in `deferred`) — null means 'not computed', never 'zero saving'.
2865
+ * Total RUT labour deduction in minor units. Currently always null: no pricing source carries a post-deduction price to derive it from, so a RUT cart with a RUT-eligible line reports TRANSPORT_RUT in `deferred` instead — null means 'not computed', never 'zero saving'.
2754
2866
  * @nullable
2755
2867
  */
2756
2868
  rutDeductionMinor: number | null;
2757
2869
  totals: QuoteTotalsDto;
2758
- /** Components present on the cart that this quote did not price, or reductions it did not apply. Their absence from `totals` is intentional, never a zero charge. Values: GOODS, SERVICE, START_FEE, TRANSPORT (no configured article, price row, or computable rate — no line is emitted at all), INSURANCE (no plan catalogue exists yet), TRANSPORT_PARTIAL (a transport line IS priced from the rate card but excludes a component the cart carries no quantity for — a per-hour rate with no `estimatedHours`, or a per-unit rate with no shipment manifest — so the transport amount is a floor, not the final charge), TRANSPORT_RUT (the line is RUT-eligible but its price source carries no post-deduction price to derive the amount from), MATERIAL_DELIVERY (the cart holds a material:delivery timeslot; its underlying slot may carry a real price, but materials pricing is not yet designed, so it is excluded from `totals` rather than priced as ordinary transport), MERCHANDISE (at least one basketed SKU could not be priced and is excluded from `totals` — it was deactivated after being basketed, it has no active price for today in the cart's currency, or its price rule is malformed. Priceable SKUs in the same basket still appear as MERCHANDISE lines, so this value means 'some of the basket is missing from the total', not 'none of it is priced'). */
2870
+ /** Components present on the cart that this quote did not price, or reductions it did not apply. Their absence from `totals` is intentional, never a zero charge. Values: GOODS, SERVICE, START_FEE, TRANSPORT (no configured article, price row, or computable rate — no line is emitted at all), INSURANCE (no plan catalogue exists yet), TRANSPORT_PARTIAL (a transport line IS priced from the rate card but excludes a component the cart carries no quantity for — a per-hour rate with no `estimatedHours`, or a per-unit rate with no shipment manifest — so the transport amount is a floor, not the final charge), TRANSPORT_RUT (the line is RUT-eligible but its price source carries no post-deduction price to derive the amount from), MATERIAL_DELIVERY (the cart holds a material:delivery timeslot; its underlying slot may carry a real price, but materials pricing is not yet designed, so it is excluded from `totals` rather than priced as ordinary transport), MERCHANDISE (at least one basketed SKU could not be priced and is excluded from `totals` — it was deactivated after being basketed, it has no active price for today in the cart's currency, or its price rule is malformed. Priceable SKUs in the same basket still appear as MERCHANDISE lines, so this value means 'some of the basket is missing from the total', not 'none of it is priced'). When the tenant's price-book mode is `live`, a PICKUP or DELIVERY cart's GOODS, START_FEE and TRANSPORT come from the pricing rules the invoice uses, and one of those values here means a rule could not price this cart — most often because the cart does not yet state what it reads (a volume with a line missing its dimensions, a slot price before a slot is held) — or reads a component that could not be priced; the rest of the cart is still priced. A rule-priced TRANSPORT line carries no post-deduction price, so a RUT cart reports TRANSPORT_RUT for it. TRANSPORT_PARTIAL does not occur in that mode. */
2759
2871
  deferred: string[];
2760
2872
  }
2761
2873
  export interface CartContactInputDto {
@@ -3074,11 +3186,14 @@ export interface SlotPriceDto {
3074
3186
  /** @nullable */
3075
3187
  perM3IncVat?: string | null;
3076
3188
  /** @nullable */
3077
- perM3IncRut?: string | null;
3078
- /** @nullable */
3079
3189
  perHourExVat?: string | null;
3080
3190
  /** @nullable */
3081
3191
  baseFeeExVat?: string | null;
3192
+ /**
3193
+ * Money, ex VAT: what this window adds ON TOP of the base transport price — show it as "+X". Null when the window carries no surcharge, or when `baseFeeExVat` is set: a slot's own price is its whole price, and no surcharge is added to it.
3194
+ * @nullable
3195
+ */
3196
+ windowSurchargeExVat: string | null;
3082
3197
  /** @nullable */
3083
3198
  vatRate: string | null;
3084
3199
  /** @nullable */
@@ -3178,8 +3293,6 @@ export interface TransportServiceListItemDto {
3178
3293
  tenantCarrierMethodId: string | null;
3179
3294
  /** @nullable */
3180
3295
  originWarehouseId: string | null;
3181
- /** @nullable */
3182
- billingArticleId: string | null;
3183
3296
  customerTypes: TransportServiceListItemDtoCustomerTypesItem[];
3184
3297
  minLeadTimeHours: number;
3185
3298
  customerSelectable: boolean;
@@ -3307,8 +3420,6 @@ export interface TransportServiceDetailDto {
3307
3420
  tenantCarrierMethodId: string | null;
3308
3421
  /** @nullable */
3309
3422
  originWarehouseId: string | null;
3310
- /** @nullable */
3311
- billingArticleId: string | null;
3312
3423
  customerTypes: TransportServiceDetailDtoCustomerTypesItem[];
3313
3424
  minLeadTimeHours: number;
3314
3425
  customerSelectable: boolean;
@@ -3415,7 +3526,6 @@ export interface CreateTransportServiceDto {
3415
3526
  tenantCarrierMethodId?: string;
3416
3527
  /** NULL = any warehouse */
3417
3528
  originWarehouseId?: string;
3418
- billingArticleId?: string;
3419
3529
  customerTypes?: CreateTransportServiceDtoCustomerTypesItem[];
3420
3530
  minLeadTimeHours?: number;
3421
3531
  customerSelectable?: boolean;
@@ -3476,8 +3586,6 @@ export interface TransportServiceDto {
3476
3586
  tenantCarrierMethodId: string | null;
3477
3587
  /** @nullable */
3478
3588
  originWarehouseId: string | null;
3479
- /** @nullable */
3480
- billingArticleId: string | null;
3481
3589
  customerTypes: TransportServiceDtoCustomerTypesItem[];
3482
3590
  minLeadTimeHours: number;
3483
3591
  customerSelectable: boolean;
@@ -3537,7 +3645,6 @@ export interface UpdateTransportServiceDto {
3537
3645
  */
3538
3646
  tenantCarrierMethodId?: string | null;
3539
3647
  originWarehouseId?: string;
3540
- billingArticleId?: string;
3541
3648
  customerTypes?: UpdateTransportServiceDtoCustomerTypesItem[];
3542
3649
  minLeadTimeHours?: number;
3543
3650
  customerSelectable?: boolean;
@@ -3783,7 +3890,7 @@ export declare const CreateSlotConfigDtoSlotKind: {
3783
3890
  readonly PICKUP_WINDOW: "PICKUP_WINDOW";
3784
3891
  };
3785
3892
  /**
3786
- * Per-weekday windows (incl. per-slot base_max_orders / price_ex_vat). NULL = daily-cap-only.
3893
+ * Per-weekday windows (incl. per-slot base_max_orders / price_ex_vat / express_surcharge_ex_vat). price_ex_vat is a full override of the window's price; express_surcharge_ex_vat (>= 0) is added on top of the base price instead. NULL = daily-cap-only.
3787
3894
  */
3788
3895
  export type CreateSlotConfigDtoWeeklySchedule = {
3789
3896
  [key: string]: unknown;
@@ -3794,7 +3901,7 @@ export interface CreateSlotConfigDto {
3794
3901
  /** NULL = daily-cap-only (no concrete slots). */
3795
3902
  slotKind?: CreateSlotConfigDtoSlotKind;
3796
3903
  timezone?: string;
3797
- /** Per-weekday windows (incl. per-slot base_max_orders / price_ex_vat). NULL = daily-cap-only. */
3904
+ /** Per-weekday windows (incl. per-slot base_max_orders / price_ex_vat / express_surcharge_ex_vat). price_ex_vat is a full override of the window's price; express_surcharge_ex_vat (>= 0) is added on top of the base price instead. NULL = daily-cap-only. */
3798
3905
  weeklySchedule?: CreateSlotConfigDtoWeeklySchedule;
3799
3906
  dayMaxOrders?: number;
3800
3907
  /** bigint */
@@ -3968,16 +4075,14 @@ export interface SlotDto {
3968
4075
  */
3969
4076
  baseMaxWeightG: number | null;
3970
4077
  /**
3971
- * money
4078
+ * money — a full override of the slot's transport price; no window surcharge is added to it
3972
4079
  * @nullable
3973
4080
  */
3974
4081
  priceExVat: string | null;
3975
4082
  /** @nullable */
3976
4083
  vatRate: string | null;
3977
- /** @nullable */
3978
- priceIncRut: string | null;
3979
4084
  /**
3980
- * money
4085
+ * money — the window surcharge: what this window adds on top of the base price (>= 0). Ignored while priceExVat is set.
3981
4086
  * @nullable
3982
4087
  */
3983
4088
  expressSurchargeExVat: string | null;
@@ -4044,7 +4149,7 @@ export interface PatchSlotDto {
4044
4149
  manuallyClosed?: boolean;
4045
4150
  /** money */
4046
4151
  priceExVat?: string;
4047
- /** money */
4152
+ /** money — the window surcharge, added on top of the base price; never negative. Ignored while priceExVat is set. */
4048
4153
  expressSurchargeExVat?: string;
4049
4154
  windowStart?: string;
4050
4155
  windowEnd?: string;
@@ -4117,16 +4222,14 @@ export interface SlotWithAvailabilityDto {
4117
4222
  */
4118
4223
  baseMaxWeightG: number | null;
4119
4224
  /**
4120
- * money
4225
+ * money — a full override of the slot's transport price; no window surcharge is added to it
4121
4226
  * @nullable
4122
4227
  */
4123
4228
  priceExVat: string | null;
4124
4229
  /** @nullable */
4125
4230
  vatRate: string | null;
4126
- /** @nullable */
4127
- priceIncRut: string | null;
4128
4231
  /**
4129
- * money
4232
+ * money — the window surcharge: what this window adds on top of the base price (>= 0). Ignored while priceExVat is set.
4130
4233
  * @nullable
4131
4234
  */
4132
4235
  expressSurchargeExVat: string | null;
@@ -8012,6 +8115,14 @@ export interface PaginatedInvoicesDto {
8012
8115
  /** Effective rows skipped applied. */
8013
8116
  offset: number;
8014
8117
  }
8118
+ export interface AppliedCouponSummaryDto {
8119
+ couponId: string;
8120
+ couponBenefitId: string;
8121
+ /** percentage / fixed_amount / replacement_price. */
8122
+ benefitType: string;
8123
+ /** 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. */
8124
+ discountAmountMinor: number;
8125
+ }
8015
8126
  export interface InvoiceRowDto {
8016
8127
  invoiceRowId: string;
8017
8128
  /** @nullable */
@@ -8028,8 +8139,13 @@ export interface InvoiceRowDto {
8028
8139
  vatRate: string;
8029
8140
  /** ISO 4217 currency code. */
8030
8141
  currencyCode: string;
8031
- /** @nullable */
8142
+ /**
8143
+ * 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.
8144
+ * @nullable
8145
+ */
8032
8146
  freeText: string | null;
8147
+ /** Coupon benefits that reduced this row. Empty when none did. */
8148
+ appliedCoupons: AppliedCouponSummaryDto[];
8033
8149
  /**
8034
8150
  * 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.
8035
8151
  * @nullable
@@ -8342,6 +8458,23 @@ export interface EnabledCurrencyDto {
8342
8458
  createdAt: string;
8343
8459
  updatedAt: string;
8344
8460
  }
8461
+ /**
8462
+ * 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.
8463
+ */
8464
+ export type TenantBillingConfigDtoPriceBookMode = typeof TenantBillingConfigDtoPriceBookMode[keyof typeof TenantBillingConfigDtoPriceBookMode];
8465
+ export declare const TenantBillingConfigDtoPriceBookMode: {
8466
+ readonly legacy: "legacy";
8467
+ readonly shadow: "shadow";
8468
+ readonly live: "live";
8469
+ };
8470
+ /**
8471
+ * 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.
8472
+ */
8473
+ export type TenantBillingConfigDtoOneOffInvoicing = typeof TenantBillingConfigDtoOneOffInvoicing[keyof typeof TenantBillingConfigDtoOneOffInvoicing];
8474
+ export declare const TenantBillingConfigDtoOneOffInvoicing: {
8475
+ readonly per_charge: "per_charge";
8476
+ readonly monthly: "monthly";
8477
+ };
8345
8478
  export interface TenantBillingConfigDto {
8346
8479
  tenantBillingConfigId: string;
8347
8480
  tenantId: string;
@@ -8362,10 +8495,33 @@ export interface TenantBillingConfigDto {
8362
8495
  * @nullable
8363
8496
  */
8364
8497
  corporateIdentityNumber: string | null;
8498
+ /** 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. */
8499
+ priceBookMode: TenantBillingConfigDtoPriceBookMode;
8500
+ /** 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. */
8501
+ timezone: string;
8502
+ /** 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. */
8503
+ oneOffInvoicing: TenantBillingConfigDtoOneOffInvoicing;
8365
8504
  createdAt: string;
8366
8505
  updatedAt: string;
8367
8506
  enabledCurrencies: EnabledCurrencyDto[];
8368
8507
  }
8508
+ /**
8509
+ * 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.
8510
+ */
8511
+ export type UpdateTenantBillingConfigDtoPriceBookMode = typeof UpdateTenantBillingConfigDtoPriceBookMode[keyof typeof UpdateTenantBillingConfigDtoPriceBookMode];
8512
+ export declare const UpdateTenantBillingConfigDtoPriceBookMode: {
8513
+ readonly legacy: "legacy";
8514
+ readonly shadow: "shadow";
8515
+ readonly live: "live";
8516
+ };
8517
+ /**
8518
+ * 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.
8519
+ */
8520
+ export type UpdateTenantBillingConfigDtoOneOffInvoicing = typeof UpdateTenantBillingConfigDtoOneOffInvoicing[keyof typeof UpdateTenantBillingConfigDtoOneOffInvoicing];
8521
+ export declare const UpdateTenantBillingConfigDtoOneOffInvoicing: {
8522
+ readonly per_charge: "per_charge";
8523
+ readonly monthly: "monthly";
8524
+ };
8369
8525
  export interface UpdateTenantBillingConfigDto {
8370
8526
  defaultPaymentMethodId?: string;
8371
8527
  defaultPaymentTermId?: string;
@@ -8374,6 +8530,12 @@ export interface UpdateTenantBillingConfigDto {
8374
8530
  requiresPricingApproval?: boolean;
8375
8531
  /** The tenant's own legal-entity registration number (e.g. Swedish orgnummer). */
8376
8532
  corporateIdentityNumber?: string;
8533
+ /** 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. */
8534
+ priceBookMode?: UpdateTenantBillingConfigDtoPriceBookMode;
8535
+ /** 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. */
8536
+ timezone?: string;
8537
+ /** 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. */
8538
+ oneOffInvoicing?: UpdateTenantBillingConfigDtoOneOffInvoicing;
8377
8539
  changeReason?: string;
8378
8540
  }
8379
8541
  export interface EnabledCurrencyInputDto {
@@ -8856,11 +9018,36 @@ export interface CouponDto {
8856
9018
  durationInMonths: number | null;
8857
9019
  /** @nullable */
8858
9020
  createdFrom: string | null;
9021
+ /** Granted automatically to a qualifying order instead of by code entry (a campaign). Its code is generated and never shown to customers. Set at create only. */
9022
+ autoApply: boolean;
9023
+ /** Whether a code may be used alongside this coupon. false: an account enrolled in it cannot also apply a code. */
9024
+ combinable: boolean;
8859
9025
  /** Lifecycle status (draft / pending_approval / active / archived). */
8860
9026
  lifecycleStatus: string;
9027
+ /** Number of the current definition. A new coupon is 1; every later change to its terms goes up by one, and so does each benefit added, changed or removed — so a coupon created and then given two benefits is 3. Lifecycle, isActive and note changes do not count. A campaign enrolment keeps the version it was granted under. */
9028
+ version: number;
8861
9029
  createdAt: string;
8862
9030
  updatedAt: string;
8863
9031
  }
9032
+ /**
9033
+ * @nullable
9034
+ */
9035
+ export type CouponBenefitDtoMaxQuantityUnit = typeof CouponBenefitDtoMaxQuantityUnit[keyof typeof CouponBenefitDtoMaxQuantityUnit] | null;
9036
+ export declare const CouponBenefitDtoMaxQuantityUnit: {
9037
+ readonly m3: "m3";
9038
+ readonly hours: "hours";
9039
+ };
9040
+ /**
9041
+ * 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.
9042
+ * @nullable
9043
+ */
9044
+ export type CouponBenefitDtoCapScope = typeof CouponBenefitDtoCapScope[keyof typeof CouponBenefitDtoCapScope] | null;
9045
+ export declare const CouponBenefitDtoCapScope: {
9046
+ readonly per_event: "per_event";
9047
+ readonly per_order: "per_order";
9048
+ readonly per_billing_period: "per_billing_period";
9049
+ readonly lifetime: "lifetime";
9050
+ };
8864
9051
  export interface CouponBenefitDto {
8865
9052
  couponBenefitId: string;
8866
9053
  couponId: string;
@@ -8881,12 +9068,44 @@ export interface CouponBenefitDto {
8881
9068
  grantCreditAmountMinor: number | null;
8882
9069
  /** @nullable */
8883
9070
  maxDiscountMinor: number | null;
9071
+ /**
9072
+ * Quantity cap, in maxQuantityUnit.
9073
+ * @nullable
9074
+ */
9075
+ maxQuantity: number | null;
9076
+ /** @nullable */
9077
+ maxQuantityUnit: CouponBenefitDtoMaxQuantityUnit;
9078
+ /**
9079
+ * 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.
9080
+ * @nullable
9081
+ */
9082
+ capScope: CouponBenefitDtoCapScope;
8884
9083
  /** @nullable */
8885
9084
  currencyCode: string | null;
8886
9085
  /** Application priority (lower applies first). */
8887
9086
  priority: number;
8888
9087
  createdAt: string;
8889
9088
  }
9089
+ export interface CouponTextDto {
9090
+ couponTextId: string;
9091
+ couponId: string;
9092
+ /** BCP-47 locale. */
9093
+ locale: string;
9094
+ /** Name of the offer as the customer reads it. Also labels the invoice rows the coupon reduces. */
9095
+ title: string;
9096
+ /**
9097
+ * One or two sentences for a banner or the cart.
9098
+ * @nullable
9099
+ */
9100
+ summary: string | null;
9101
+ /**
9102
+ * The offer's terms, e.g. its clawback rule.
9103
+ * @nullable
9104
+ */
9105
+ terms: string | null;
9106
+ createdAt: string;
9107
+ updatedAt: string;
9108
+ }
8890
9109
  export interface CouponDetailDto {
8891
9110
  couponId: string;
8892
9111
  tenantId: string;
@@ -8917,12 +9136,20 @@ export interface CouponDetailDto {
8917
9136
  durationInMonths: number | null;
8918
9137
  /** @nullable */
8919
9138
  createdFrom: string | null;
9139
+ /** Granted automatically to a qualifying order instead of by code entry (a campaign). Its code is generated and never shown to customers. Set at create only. */
9140
+ autoApply: boolean;
9141
+ /** Whether a code may be used alongside this coupon. false: an account enrolled in it cannot also apply a code. */
9142
+ combinable: boolean;
8920
9143
  /** Lifecycle status (draft / pending_approval / active / archived). */
8921
9144
  lifecycleStatus: string;
9145
+ /** Number of the current definition. A new coupon is 1; every later change to its terms goes up by one, and so does each benefit added, changed or removed — so a coupon created and then given two benefits is 3. Lifecycle, isActive and note changes do not count. A campaign enrolment keeps the version it was granted under. */
9146
+ version: number;
8922
9147
  createdAt: string;
8923
9148
  updatedAt: string;
8924
9149
  /** The coupon's benefits. */
8925
9150
  benefits: CouponBenefitDto[];
9151
+ /** 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). */
9152
+ texts: CouponTextDto[];
8926
9153
  }
8927
9154
  export type CouponValidationDtoReason = typeof CouponValidationDtoReason[keyof typeof CouponValidationDtoReason];
8928
9155
  export declare const CouponValidationDtoReason: {
@@ -8954,8 +9181,12 @@ export declare const CreateCouponDtoCreatedFrom: {
8954
9181
  readonly migration: "migration";
8955
9182
  };
8956
9183
  export interface CreateCouponDto {
8957
- /** Unique coupon code within the tenant. */
8958
- code: string;
9184
+ /** Unique coupon code within the tenant. Required unless autoApply is true; an automatic coupon's code is generated, so omit it. */
9185
+ code?: string;
9186
+ /** Grant automatically to a qualifying order instead of by code entry (default false). Cannot be changed after create. */
9187
+ autoApply?: boolean;
9188
+ /** Whether a code may be used alongside this coupon (default true). */
9189
+ combinable?: boolean;
8959
9190
  name?: string;
8960
9191
  description?: string;
8961
9192
  /** Whether the coupon is active (default true). */
@@ -8997,6 +9228,8 @@ export interface UpdateCouponDto {
8997
9228
  expiresAt?: string | null;
8998
9229
  /** Restrict to new customers only. */
8999
9230
  onlyNewCustomers?: boolean;
9231
+ /** Whether a code may be used alongside this coupon. */
9232
+ combinable?: boolean;
9000
9233
  /**
9001
9234
  * Total redemption cap across all accounts; null = unlimited.
9002
9235
  * @nullable
@@ -9021,6 +9254,23 @@ export declare const CreateCouponBenefitDtoBenefitType: {
9021
9254
  readonly replacement_price: "replacement_price";
9022
9255
  readonly grant_account_credit: "grant_account_credit";
9023
9256
  };
9257
+ /**
9258
+ * Unit of maxQuantity: m3 (stored or moved volume) or hours. Required iff maxQuantity is set.
9259
+ */
9260
+ export type CreateCouponBenefitDtoMaxQuantityUnit = typeof CreateCouponBenefitDtoMaxQuantityUnit[keyof typeof CreateCouponBenefitDtoMaxQuantityUnit];
9261
+ export declare const CreateCouponBenefitDtoMaxQuantityUnit: {
9262
+ readonly m3: "m3";
9263
+ readonly hours: "hours";
9264
+ };
9265
+ /**
9266
+ * 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.
9267
+ */
9268
+ export type CreateCouponBenefitDtoCapScope = typeof CreateCouponBenefitDtoCapScope[keyof typeof CreateCouponBenefitDtoCapScope];
9269
+ export declare const CreateCouponBenefitDtoCapScope: {
9270
+ readonly per_event: "per_event";
9271
+ readonly per_order: "per_order";
9272
+ readonly per_billing_period: "per_billing_period";
9273
+ };
9024
9274
  export interface CreateCouponBenefitDto {
9025
9275
  benefitType: CreateCouponBenefitDtoBenefitType;
9026
9276
  /** Target article. Required (with or instead of articleCategory) for discount-style benefits. */
@@ -9037,11 +9287,31 @@ export interface CreateCouponBenefitDto {
9037
9287
  grantCreditAmountMinor?: number;
9038
9288
  /** Money cap on a percentage discount (minor units). Forces currencyCode to be set. */
9039
9289
  maxDiscountMinor?: number;
9290
+ /** 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. */
9291
+ maxQuantity?: number;
9292
+ /** Unit of maxQuantity: m3 (stored or moved volume) or hours. Required iff maxQuantity is set. */
9293
+ maxQuantityUnit?: CreateCouponBenefitDtoMaxQuantityUnit;
9294
+ /** 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. */
9295
+ capScope?: CreateCouponBenefitDtoCapScope;
9040
9296
  /** ISO 4217 currency code. Required for fixed_amount/replacement_price/grant_account_credit and for a capped percentage; omitted for an uncapped percentage. */
9041
9297
  currencyCode?: string;
9042
9298
  /** Application priority (lower applies first); default 100. */
9043
9299
  priority?: number;
9044
9300
  }
9301
+ export interface UpsertCouponTextDto {
9302
+ /** @maxLength 80 */
9303
+ title: string;
9304
+ /**
9305
+ * @maxLength 500
9306
+ * @nullable
9307
+ */
9308
+ summary?: string | null;
9309
+ /**
9310
+ * @maxLength 2000
9311
+ * @nullable
9312
+ */
9313
+ terms?: string | null;
9314
+ }
9045
9315
  /**
9046
9316
  * Redemption source (default manual).
9047
9317
  */
@@ -9217,6 +9487,13 @@ export interface BillingModelTemplateDto {
9217
9487
  export type PricingRuleDtoParameters = {
9218
9488
  [key: string]: unknown;
9219
9489
  };
9490
+ /**
9491
+ * The template form values this rule was expanded from (the template's uiFormSchema shape), or null. Every rule one template application produced carries the same value.
9492
+ * @nullable
9493
+ */
9494
+ export type PricingRuleDtoTemplateInput = {
9495
+ [key: string]: unknown;
9496
+ } | null;
9220
9497
  export interface PricingRuleDto {
9221
9498
  pricingRuleId: string;
9222
9499
  tenantId: string;
@@ -9264,6 +9541,21 @@ export interface PricingRuleDto {
9264
9541
  * @nullable
9265
9542
  */
9266
9543
  approvedAt: string | null;
9544
+ /**
9545
+ * The price book change set that introduced this rule, or null for a rule written any other way (apply-template, merchandise, imports).
9546
+ * @nullable
9547
+ */
9548
+ changeSetId: string | null;
9549
+ /**
9550
+ * The built-in billing-model template this rule was expanded from, or null for a rule written without one.
9551
+ * @nullable
9552
+ */
9553
+ templateCode: string | null;
9554
+ /**
9555
+ * The template form values this rule was expanded from (the template's uiFormSchema shape), or null. Every rule one template application produced carries the same value.
9556
+ * @nullable
9557
+ */
9558
+ templateInput: PricingRuleDtoTemplateInput;
9267
9559
  createdAt: string;
9268
9560
  updatedAt: string;
9269
9561
  }
@@ -9711,6 +10003,278 @@ export interface PaginatedInvoiceBasisRowsDto {
9711
10003
  /** Effective rows skipped applied. */
9712
10004
  offset: number;
9713
10005
  }
10006
+ export type PriceBookSectionDtoSection = typeof PriceBookSectionDtoSection[keyof typeof PriceBookSectionDtoSection];
10007
+ export declare const PriceBookSectionDtoSection: {
10008
+ readonly storage: "storage";
10009
+ readonly pickup: "pickup";
10010
+ readonly delivery: "delivery";
10011
+ readonly fees: "fees";
10012
+ };
10013
+ export interface PriceBookSectionDto {
10014
+ section: PriceBookSectionDtoSection;
10015
+ /** The billable event types this section prices. */
10016
+ billableEventTypes: string[];
10017
+ /** Tenant-wide active rules in effect today. */
10018
+ rules: PricingRuleDto[];
10019
+ /** Tenant-wide active rules published to start after today. */
10020
+ scheduledRules: PricingRuleDto[];
10021
+ }
10022
+ export type PriceBookChangeSetSectionDtoSection = typeof PriceBookChangeSetSectionDtoSection[keyof typeof PriceBookChangeSetSectionDtoSection];
10023
+ export declare const PriceBookChangeSetSectionDtoSection: {
10024
+ readonly storage: "storage";
10025
+ readonly pickup: "pickup";
10026
+ readonly delivery: "delivery";
10027
+ readonly fees: "fees";
10028
+ };
10029
+ /**
10030
+ * `edited`: publish replaces this section's live rules with `rules` (none, if empty). `unchanged`: publish leaves the section's live rules alone.
10031
+ */
10032
+ export type PriceBookChangeSetSectionDtoState = typeof PriceBookChangeSetSectionDtoState[keyof typeof PriceBookChangeSetSectionDtoState];
10033
+ export declare const PriceBookChangeSetSectionDtoState: {
10034
+ readonly unchanged: "unchanged";
10035
+ readonly edited: "edited";
10036
+ };
10037
+ export interface PriceBookChangeSetSectionDto {
10038
+ section: PriceBookChangeSetSectionDtoSection;
10039
+ /** `edited`: publish replaces this section's live rules with `rules` (none, if empty). `unchanged`: publish leaves the section's live rules alone. */
10040
+ state: PriceBookChangeSetSectionDtoState;
10041
+ /** The draft rules this change set holds for the section. */
10042
+ rules: PricingRuleDto[];
10043
+ }
10044
+ /**
10045
+ * `draft` (editable), `published`, or `discarded`. A published change set whose effectiveFrom is still ahead is scheduled.
10046
+ */
10047
+ export type PriceBookChangeSetDtoStatus = typeof PriceBookChangeSetDtoStatus[keyof typeof PriceBookChangeSetDtoStatus];
10048
+ export declare const PriceBookChangeSetDtoStatus: {
10049
+ readonly draft: "draft";
10050
+ readonly published: "published";
10051
+ readonly discarded: "discarded";
10052
+ };
10053
+ export interface PriceBookChangeSetDto {
10054
+ changeSetId: string;
10055
+ /** ISO 4217 currency every rule in the change set prices in. */
10056
+ currencyCode: string;
10057
+ /** `draft` (editable), `published`, or `discarded`. A published change set whose effectiveFrom is still ahead is scheduled. */
10058
+ status: PriceBookChangeSetDtoStatus;
10059
+ /** Optimistic-concurrency version; send it back on the next write. */
10060
+ version: number;
10061
+ effectiveFrom: string;
10062
+ sections: PriceBookChangeSetSectionDto[];
10063
+ /** @nullable */
10064
+ publishedAt: string | null;
10065
+ createdAt: string;
10066
+ updatedAt: string;
10067
+ }
10068
+ export type PriceBookDtoPriceBookMode = typeof PriceBookDtoPriceBookMode[keyof typeof PriceBookDtoPriceBookMode];
10069
+ export declare const PriceBookDtoPriceBookMode: {
10070
+ readonly legacy: "legacy";
10071
+ readonly shadow: "shadow";
10072
+ readonly live: "live";
10073
+ };
10074
+ export interface PriceBookDto {
10075
+ priceBookMode: PriceBookDtoPriceBookMode;
10076
+ /** Whether the caller may write the price book now: `live` opens it to tenant admins, `shadow` to platform admins only, `legacy` to nobody. */
10077
+ writable: boolean;
10078
+ /**
10079
+ * 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.
10080
+ * @nullable
10081
+ */
10082
+ currencyCode: string | null;
10083
+ sections: PriceBookSectionDto[];
10084
+ /**
10085
+ * The tenant's open draft, or null.
10086
+ * @nullable
10087
+ */
10088
+ draft: PriceBookChangeSetDto | null;
10089
+ }
10090
+ export interface CreatePriceBookChangeSetDto {
10091
+ /** The date the draft takes effect when published: its rules start and the rules it supersedes stop on this date. Not in the past. A section edit or the publish call can move it. */
10092
+ effectiveFrom: string;
10093
+ }
10094
+ /**
10095
+ * Template form values, per the template's uiFormSchema.
10096
+ */
10097
+ export type PriceBookSectionEntryDtoInput = {
10098
+ [key: string]: unknown;
10099
+ };
10100
+ export interface PriceBookSectionEntryDto {
10101
+ /** Built-in template code (see GET /billing/billing-model-templates). Its billableEventType must belong to the section being edited. */
10102
+ templateCode: string;
10103
+ /** The billing article the priced amount posts to — the ledger line on the invoice. */
10104
+ articleId: string;
10105
+ /** Template form values, per the template's uiFormSchema. */
10106
+ input: PriceBookSectionEntryDtoInput;
10107
+ }
10108
+ export interface ReplacePriceBookSectionDto {
10109
+ /** The change set version this edit was made against; a stale version is a 409. */
10110
+ version: number;
10111
+ entries: PriceBookSectionEntryDto[];
10112
+ /** Why the section changed. Stored on every rule the edit writes. */
10113
+ changeReason: string;
10114
+ /** Moves the whole draft's effective date (one date per change set). Not in the past. Omit to keep it. */
10115
+ effectiveFrom?: string;
10116
+ }
10117
+ export interface PreviewPriceBookChangeSetDto {
10118
+ /** Preview as of this effective date instead of the draft's own. Not in the past. */
10119
+ effectiveFrom?: string;
10120
+ }
10121
+ export type PriceBookPublishSectionDtoSection = typeof PriceBookPublishSectionDtoSection[keyof typeof PriceBookPublishSectionDtoSection];
10122
+ export declare const PriceBookPublishSectionDtoSection: {
10123
+ readonly storage: "storage";
10124
+ readonly pickup: "pickup";
10125
+ readonly delivery: "delivery";
10126
+ readonly fees: "fees";
10127
+ };
10128
+ export interface PriceBookPublishSectionDto {
10129
+ section: PriceBookPublishSectionDtoSection;
10130
+ /** Draft rules that go live on effectiveFrom. */
10131
+ activated: PricingRuleDto[];
10132
+ /** Live rules whose window closes on effectiveFrom (they keep pricing until then). */
10133
+ closed: PricingRuleDto[];
10134
+ /** Rules published to start on or after effectiveFrom that never take effect: retired, as DELETE /billing/pricing-rules/:id would. */
10135
+ retired: PricingRuleDto[];
10136
+ }
10137
+ export interface PriceBookPublishResultDto {
10138
+ /** The change set — published after a publish, still the draft after a preview. */
10139
+ changeSet: PriceBookChangeSetDto;
10140
+ effectiveFrom: string;
10141
+ /** One entry per edited section. */
10142
+ sections: PriceBookPublishSectionDto[];
10143
+ }
10144
+ export interface PublishPriceBookChangeSetDto {
10145
+ /** The change set version being published; a stale version is a 409. */
10146
+ version: number;
10147
+ /** Publish on this date instead of the draft's own. Not in the past. */
10148
+ effectiveFrom?: string;
10149
+ }
10150
+ export interface DiscardPriceBookChangeSetDto {
10151
+ /** The change set version being discarded; a stale version is a 409. */
10152
+ version: number;
10153
+ }
10154
+ /**
10155
+ * @nullable
10156
+ */
10157
+ export type MeCampaignBenefitDtoMaxQuantityUnit = typeof MeCampaignBenefitDtoMaxQuantityUnit[keyof typeof MeCampaignBenefitDtoMaxQuantityUnit] | null;
10158
+ export declare const MeCampaignBenefitDtoMaxQuantityUnit: {
10159
+ readonly m3: "m3";
10160
+ readonly hours: "hours";
10161
+ };
10162
+ /**
10163
+ * 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.
10164
+ * @nullable
10165
+ */
10166
+ export type MeCampaignBenefitDtoCapScope = typeof MeCampaignBenefitDtoCapScope[keyof typeof MeCampaignBenefitDtoCapScope] | null;
10167
+ export declare const MeCampaignBenefitDtoCapScope: {
10168
+ readonly per_event: "per_event";
10169
+ readonly per_order: "per_order";
10170
+ readonly per_billing_period: "per_billing_period";
10171
+ readonly lifetime: "lifetime";
10172
+ };
10173
+ export interface MeCampaignBenefitDto {
10174
+ couponBenefitId: string;
10175
+ /** @nullable */
10176
+ articleId: string | null;
10177
+ /**
10178
+ * Article category the benefit applies to, e.g. storage.
10179
+ * @nullable
10180
+ */
10181
+ articleCategory: string | null;
10182
+ /** percentage / fixed_amount / replacement_price / grant_account_credit. */
10183
+ benefitType: string;
10184
+ /**
10185
+ * Percentage off in basis points (5000 = 50 %).
10186
+ * @nullable
10187
+ */
10188
+ discountPercentBps: number | null;
10189
+ /**
10190
+ * Amount off in minor currency units.
10191
+ * @nullable
10192
+ */
10193
+ discountAmountMinor: number | null;
10194
+ /**
10195
+ * Price charged instead, in minor currency units.
10196
+ * @nullable
10197
+ */
10198
+ replacementPriceMinor: number | null;
10199
+ /**
10200
+ * Account credit granted, in minor currency units.
10201
+ * @nullable
10202
+ */
10203
+ grantCreditAmountMinor: number | null;
10204
+ /**
10205
+ * Cap on the reduction, in minor currency units.
10206
+ * @nullable
10207
+ */
10208
+ maxDiscountMinor: number | null;
10209
+ /**
10210
+ * The most the benefit reaches, in maxQuantityUnit: 10 with m3 is "up to 10 m³". Above it, full price.
10211
+ * @nullable
10212
+ */
10213
+ maxQuantity: number | null;
10214
+ /** @nullable */
10215
+ maxQuantityUnit: MeCampaignBenefitDtoMaxQuantityUnit;
10216
+ /**
10217
+ * 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.
10218
+ * @nullable
10219
+ */
10220
+ capScope: MeCampaignBenefitDtoCapScope;
10221
+ /** @nullable */
10222
+ currencyCode: string | null;
10223
+ /** Application order (lower applies first). */
10224
+ priority: number;
10225
+ }
10226
+ export interface MeCampaignDto {
10227
+ campaignEnrollmentId: string;
10228
+ couponId: string;
10229
+ /** The campaign version the customer enrolled under. */
10230
+ couponVersion: number;
10231
+ /** Enrolment status. Only `active` enrolments are listed. */
10232
+ status: string;
10233
+ /**
10234
+ * 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.
10235
+ * @nullable
10236
+ */
10237
+ locale: string | null;
10238
+ /** @nullable */
10239
+ title: string | null;
10240
+ /** @nullable */
10241
+ summary: string | null;
10242
+ /** @nullable */
10243
+ terms: string | null;
10244
+ /** one_time / repeating_months / forever. */
10245
+ durationType: string;
10246
+ /**
10247
+ * Benefit length in months, for repeating_months.
10248
+ * @nullable
10249
+ */
10250
+ durationInMonths: number | null;
10251
+ /** Ordered as they apply. */
10252
+ benefits: MeCampaignBenefitDto[];
10253
+ /**
10254
+ * Planned date of the first pickup, which the benefit window starts from. Null until one is placed.
10255
+ * @nullable
10256
+ */
10257
+ anchorDate: string | null;
10258
+ /**
10259
+ * First day the benefit applies.
10260
+ * @nullable
10261
+ */
10262
+ appliesFrom: string | null;
10263
+ /**
10264
+ * 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.
10265
+ * @nullable
10266
+ */
10267
+ appliesUntil: string | null;
10268
+ /**
10269
+ * 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.
10270
+ * @nullable
10271
+ */
10272
+ clawbackUntil: string | null;
10273
+ }
10274
+ export interface MeCampaignsDto {
10275
+ /** 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. */
10276
+ campaigns: MeCampaignDto[];
10277
+ }
9714
10278
  export interface StripeWebhookAckDto {
9715
10279
  /** Always true once the event was accepted. */
9716
10280
  received: boolean;
@@ -13569,6 +14133,14 @@ export type BillableEventsControllerListBillableEventsV1Params = {
13569
14133
  * Filter by the operational source row id.
13570
14134
  */
13571
14135
  sourceId?: string;
14136
+ /**
14137
+ * Only events charged to this billing account. An event not yet resolved to an account has no billingAccountId and is never returned by this filter.
14138
+ */
14139
+ billingAccountId?: string;
14140
+ /**
14141
+ * Only events of this type — one of the keys GET /billing/billable-event-types returns.
14142
+ */
14143
+ eventType?: string;
13572
14144
  };
13573
14145
  export type InvoiceBasisRowsControllerListInvoiceBasisRowsV1Params = {
13574
14146
  /**
@@ -13603,6 +14175,18 @@ export type InvoiceBasisRowsControllerListInvoiceBasisRowsV1Params = {
13603
14175
  */
13604
14176
  invoiced?: boolean;
13605
14177
  };
14178
+ export type MeCampaignControllerListV1Params = {
14179
+ /**
14180
+ * 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.
14181
+ */
14182
+ locale?: MeCampaignControllerListV1Locale;
14183
+ };
14184
+ export type MeCampaignControllerListV1Locale = typeof MeCampaignControllerListV1Locale[keyof typeof MeCampaignControllerListV1Locale];
14185
+ export declare const MeCampaignControllerListV1Locale: {
14186
+ readonly 'sv-SE': "sv-SE";
14187
+ readonly 'en-GB': "en-GB";
14188
+ readonly 'fi-FI': "fi-FI";
14189
+ };
13606
14190
  export type UsersControllerListV1Params = {
13607
14191
  /**
13608
14192
  * Case-insensitive substring match over display name OR email. Omit to list the first page of the directory.