@vindentech/api-client 0.3.0-next.76 → 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.
- package/dist/generated/_all.d.ts +1 -0
- package/dist/generated/_all.d.ts.map +1 -1
- package/dist/generated/_all.js +1 -0
- package/dist/generated/_all.js.map +1 -1
- package/dist/generated/_permissions.d.ts +11 -0
- package/dist/generated/_permissions.d.ts.map +1 -1
- package/dist/generated/_permissions.js +3 -0
- package/dist/generated/_permissions.js.map +1 -1
- package/dist/generated/coupons/coupons.d.ts +55 -1
- package/dist/generated/coupons/coupons.d.ts.map +1 -1
- package/dist/generated/coupons/coupons.js +37 -0
- package/dist/generated/coupons/coupons.js.map +1 -1
- package/dist/generated/index.schemas.d.ts +334 -13
- package/dist/generated/index.schemas.d.ts.map +1 -1
- package/dist/generated/index.schemas.js +54 -0
- package/dist/generated/index.schemas.js.map +1 -1
- package/dist/generated/me-campaign/me-campaign.d.ts +31 -0
- package/dist/generated/me-campaign/me-campaign.d.ts.map +1 -0
- package/dist/generated/me-campaign/me-campaign.js +22 -0
- package/dist/generated/me-campaign/me-campaign.js.map +1 -0
- package/package.json +1 -1
|
@@ -2680,9 +2680,9 @@ export interface QuoteLineDto {
|
|
|
2680
2680
|
reference: string | null;
|
|
2681
2681
|
description: string;
|
|
2682
2682
|
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`. */
|
|
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`. */
|
|
2684
2684
|
unitPriceExVatMinor: number;
|
|
2685
|
-
/** 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` */
|
|
2686
2686
|
lineTotalExVatMinor: number;
|
|
2687
2687
|
/**
|
|
2688
2688
|
* How much the binding plan took off this line, integer minor units. Null when no discount applied.
|
|
@@ -2694,6 +2694,11 @@ export interface QuoteLineDto {
|
|
|
2694
2694
|
* @nullable
|
|
2695
2695
|
*/
|
|
2696
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;
|
|
2697
2702
|
/** VAT rate as a percentage, per the platform-wide NUMERIC(6,4) convention (25 = 25%) */
|
|
2698
2703
|
vatRate: number;
|
|
2699
2704
|
/** Whether this line qualifies for the RUT labour deduction */
|
|
@@ -2726,6 +2731,47 @@ export interface QuoteCouponDto {
|
|
|
2726
2731
|
code: string;
|
|
2727
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. */
|
|
2728
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;
|
|
2729
2775
|
}
|
|
2730
2776
|
export interface QuoteBindingDto {
|
|
2731
2777
|
bindingPlanId: string;
|
|
@@ -2758,17 +2804,17 @@ export interface QuoteDiscountDto {
|
|
|
2758
2804
|
discountExVatMinor: number;
|
|
2759
2805
|
}
|
|
2760
2806
|
export interface QuoteTotalsDto {
|
|
2761
|
-
/** 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 */
|
|
2762
2808
|
exVatMinor: number;
|
|
2763
2809
|
/** Total VAT, minor units */
|
|
2764
2810
|
vatMinor: number;
|
|
2765
2811
|
/** exVat + vat, minor units */
|
|
2766
2812
|
incVatMinor: number;
|
|
2767
|
-
/** 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. */
|
|
2768
2814
|
payableMinor: number;
|
|
2769
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. */
|
|
2770
2816
|
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
|
|
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. */
|
|
2772
2818
|
discountIncVatMinor: number;
|
|
2773
2819
|
}
|
|
2774
2820
|
export interface QuoteBindingOptionDto {
|
|
@@ -2797,6 +2843,13 @@ export interface QuoteResponseDto {
|
|
|
2797
2843
|
volume: QuoteVolumeDto;
|
|
2798
2844
|
/** @nullable */
|
|
2799
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[];
|
|
2800
2853
|
/**
|
|
2801
2854
|
* The binding plan in force for this quote, or null when there is none
|
|
2802
2855
|
* @nullable
|
|
@@ -3136,6 +3189,11 @@ export interface SlotPriceDto {
|
|
|
3136
3189
|
perHourExVat?: string | null;
|
|
3137
3190
|
/** @nullable */
|
|
3138
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;
|
|
3139
3197
|
/** @nullable */
|
|
3140
3198
|
vatRate: string | null;
|
|
3141
3199
|
/** @nullable */
|
|
@@ -3832,7 +3890,7 @@ export declare const CreateSlotConfigDtoSlotKind: {
|
|
|
3832
3890
|
readonly PICKUP_WINDOW: "PICKUP_WINDOW";
|
|
3833
3891
|
};
|
|
3834
3892
|
/**
|
|
3835
|
-
* 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.
|
|
3836
3894
|
*/
|
|
3837
3895
|
export type CreateSlotConfigDtoWeeklySchedule = {
|
|
3838
3896
|
[key: string]: unknown;
|
|
@@ -3843,7 +3901,7 @@ export interface CreateSlotConfigDto {
|
|
|
3843
3901
|
/** NULL = daily-cap-only (no concrete slots). */
|
|
3844
3902
|
slotKind?: CreateSlotConfigDtoSlotKind;
|
|
3845
3903
|
timezone?: string;
|
|
3846
|
-
/** 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. */
|
|
3847
3905
|
weeklySchedule?: CreateSlotConfigDtoWeeklySchedule;
|
|
3848
3906
|
dayMaxOrders?: number;
|
|
3849
3907
|
/** bigint */
|
|
@@ -4017,14 +4075,14 @@ export interface SlotDto {
|
|
|
4017
4075
|
*/
|
|
4018
4076
|
baseMaxWeightG: number | null;
|
|
4019
4077
|
/**
|
|
4020
|
-
* money
|
|
4078
|
+
* money — a full override of the slot's transport price; no window surcharge is added to it
|
|
4021
4079
|
* @nullable
|
|
4022
4080
|
*/
|
|
4023
4081
|
priceExVat: string | null;
|
|
4024
4082
|
/** @nullable */
|
|
4025
4083
|
vatRate: string | null;
|
|
4026
4084
|
/**
|
|
4027
|
-
* money
|
|
4085
|
+
* money — the window surcharge: what this window adds on top of the base price (>= 0). Ignored while priceExVat is set.
|
|
4028
4086
|
* @nullable
|
|
4029
4087
|
*/
|
|
4030
4088
|
expressSurchargeExVat: string | null;
|
|
@@ -4091,7 +4149,7 @@ export interface PatchSlotDto {
|
|
|
4091
4149
|
manuallyClosed?: boolean;
|
|
4092
4150
|
/** money */
|
|
4093
4151
|
priceExVat?: string;
|
|
4094
|
-
/** money */
|
|
4152
|
+
/** money — the window surcharge, added on top of the base price; never negative. Ignored while priceExVat is set. */
|
|
4095
4153
|
expressSurchargeExVat?: string;
|
|
4096
4154
|
windowStart?: string;
|
|
4097
4155
|
windowEnd?: string;
|
|
@@ -4164,14 +4222,14 @@ export interface SlotWithAvailabilityDto {
|
|
|
4164
4222
|
*/
|
|
4165
4223
|
baseMaxWeightG: number | null;
|
|
4166
4224
|
/**
|
|
4167
|
-
* money
|
|
4225
|
+
* money — a full override of the slot's transport price; no window surcharge is added to it
|
|
4168
4226
|
* @nullable
|
|
4169
4227
|
*/
|
|
4170
4228
|
priceExVat: string | null;
|
|
4171
4229
|
/** @nullable */
|
|
4172
4230
|
vatRate: string | null;
|
|
4173
4231
|
/**
|
|
4174
|
-
* money
|
|
4232
|
+
* money — the window surcharge: what this window adds on top of the base price (>= 0). Ignored while priceExVat is set.
|
|
4175
4233
|
* @nullable
|
|
4176
4234
|
*/
|
|
4177
4235
|
expressSurchargeExVat: string | null;
|
|
@@ -8057,6 +8115,14 @@ export interface PaginatedInvoicesDto {
|
|
|
8057
8115
|
/** Effective rows skipped applied. */
|
|
8058
8116
|
offset: number;
|
|
8059
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
|
+
}
|
|
8060
8126
|
export interface InvoiceRowDto {
|
|
8061
8127
|
invoiceRowId: string;
|
|
8062
8128
|
/** @nullable */
|
|
@@ -8073,8 +8139,13 @@ export interface InvoiceRowDto {
|
|
|
8073
8139
|
vatRate: string;
|
|
8074
8140
|
/** ISO 4217 currency code. */
|
|
8075
8141
|
currencyCode: string;
|
|
8076
|
-
/**
|
|
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
|
+
*/
|
|
8077
8146
|
freeText: string | null;
|
|
8147
|
+
/** Coupon benefits that reduced this row. Empty when none did. */
|
|
8148
|
+
appliedCoupons: AppliedCouponSummaryDto[];
|
|
8078
8149
|
/**
|
|
8079
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.
|
|
8080
8151
|
* @nullable
|
|
@@ -8396,6 +8467,14 @@ export declare const TenantBillingConfigDtoPriceBookMode: {
|
|
|
8396
8467
|
readonly shadow: "shadow";
|
|
8397
8468
|
readonly live: "live";
|
|
8398
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
|
+
};
|
|
8399
8478
|
export interface TenantBillingConfigDto {
|
|
8400
8479
|
tenantBillingConfigId: string;
|
|
8401
8480
|
tenantId: string;
|
|
@@ -8418,6 +8497,10 @@ export interface TenantBillingConfigDto {
|
|
|
8418
8497
|
corporateIdentityNumber: string | null;
|
|
8419
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. */
|
|
8420
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;
|
|
8421
8504
|
createdAt: string;
|
|
8422
8505
|
updatedAt: string;
|
|
8423
8506
|
enabledCurrencies: EnabledCurrencyDto[];
|
|
@@ -8431,6 +8514,14 @@ export declare const UpdateTenantBillingConfigDtoPriceBookMode: {
|
|
|
8431
8514
|
readonly shadow: "shadow";
|
|
8432
8515
|
readonly live: "live";
|
|
8433
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
|
+
};
|
|
8434
8525
|
export interface UpdateTenantBillingConfigDto {
|
|
8435
8526
|
defaultPaymentMethodId?: string;
|
|
8436
8527
|
defaultPaymentTermId?: string;
|
|
@@ -8441,6 +8532,10 @@ export interface UpdateTenantBillingConfigDto {
|
|
|
8441
8532
|
corporateIdentityNumber?: string;
|
|
8442
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. */
|
|
8443
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;
|
|
8444
8539
|
changeReason?: string;
|
|
8445
8540
|
}
|
|
8446
8541
|
export interface EnabledCurrencyInputDto {
|
|
@@ -8934,6 +9029,25 @@ export interface CouponDto {
|
|
|
8934
9029
|
createdAt: string;
|
|
8935
9030
|
updatedAt: string;
|
|
8936
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
|
+
};
|
|
8937
9051
|
export interface CouponBenefitDto {
|
|
8938
9052
|
couponBenefitId: string;
|
|
8939
9053
|
couponId: string;
|
|
@@ -8954,12 +9068,44 @@ export interface CouponBenefitDto {
|
|
|
8954
9068
|
grantCreditAmountMinor: number | null;
|
|
8955
9069
|
/** @nullable */
|
|
8956
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;
|
|
8957
9083
|
/** @nullable */
|
|
8958
9084
|
currencyCode: string | null;
|
|
8959
9085
|
/** Application priority (lower applies first). */
|
|
8960
9086
|
priority: number;
|
|
8961
9087
|
createdAt: string;
|
|
8962
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
|
+
}
|
|
8963
9109
|
export interface CouponDetailDto {
|
|
8964
9110
|
couponId: string;
|
|
8965
9111
|
tenantId: string;
|
|
@@ -9002,6 +9148,8 @@ export interface CouponDetailDto {
|
|
|
9002
9148
|
updatedAt: string;
|
|
9003
9149
|
/** The coupon's benefits. */
|
|
9004
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[];
|
|
9005
9153
|
}
|
|
9006
9154
|
export type CouponValidationDtoReason = typeof CouponValidationDtoReason[keyof typeof CouponValidationDtoReason];
|
|
9007
9155
|
export declare const CouponValidationDtoReason: {
|
|
@@ -9106,6 +9254,23 @@ export declare const CreateCouponBenefitDtoBenefitType: {
|
|
|
9106
9254
|
readonly replacement_price: "replacement_price";
|
|
9107
9255
|
readonly grant_account_credit: "grant_account_credit";
|
|
9108
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
|
+
};
|
|
9109
9274
|
export interface CreateCouponBenefitDto {
|
|
9110
9275
|
benefitType: CreateCouponBenefitDtoBenefitType;
|
|
9111
9276
|
/** Target article. Required (with or instead of articleCategory) for discount-style benefits. */
|
|
@@ -9122,11 +9287,31 @@ export interface CreateCouponBenefitDto {
|
|
|
9122
9287
|
grantCreditAmountMinor?: number;
|
|
9123
9288
|
/** Money cap on a percentage discount (minor units). Forces currencyCode to be set. */
|
|
9124
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;
|
|
9125
9296
|
/** ISO 4217 currency code. Required for fixed_amount/replacement_price/grant_account_credit and for a capped percentage; omitted for an uncapped percentage. */
|
|
9126
9297
|
currencyCode?: string;
|
|
9127
9298
|
/** Application priority (lower applies first); default 100. */
|
|
9128
9299
|
priority?: number;
|
|
9129
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
|
+
}
|
|
9130
9315
|
/**
|
|
9131
9316
|
* Redemption source (default manual).
|
|
9132
9317
|
*/
|
|
@@ -9966,6 +10151,130 @@ export interface DiscardPriceBookChangeSetDto {
|
|
|
9966
10151
|
/** The change set version being discarded; a stale version is a 409. */
|
|
9967
10152
|
version: number;
|
|
9968
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
|
+
}
|
|
9969
10278
|
export interface StripeWebhookAckDto {
|
|
9970
10279
|
/** Always true once the event was accepted. */
|
|
9971
10280
|
received: boolean;
|
|
@@ -13866,6 +14175,18 @@ export type InvoiceBasisRowsControllerListInvoiceBasisRowsV1Params = {
|
|
|
13866
14175
|
*/
|
|
13867
14176
|
invoiced?: boolean;
|
|
13868
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
|
+
};
|
|
13869
14190
|
export type UsersControllerListV1Params = {
|
|
13870
14191
|
/**
|
|
13871
14192
|
* Case-insensitive substring match over display name OR email. Omit to list the first page of the directory.
|