@vindentech/api-client 0.3.0-next.26 → 0.3.0-next.27
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 +2 -0
- package/dist/generated/_all.d.ts.map +1 -1
- package/dist/generated/_all.js +2 -0
- package/dist/generated/_all.js.map +1 -1
- package/dist/generated/_permissions.d.ts +33 -1
- package/dist/generated/_permissions.d.ts.map +1 -1
- package/dist/generated/_permissions.js +8 -0
- package/dist/generated/_permissions.js.map +1 -1
- package/dist/generated/index.schemas.d.ts +322 -2
- package/dist/generated/index.schemas.d.ts.map +1 -1
- package/dist/generated/index.schemas.js.map +1 -1
- package/dist/generated/merchandise/merchandise.d.ts +79 -0
- package/dist/generated/merchandise/merchandise.d.ts.map +1 -0
- package/dist/generated/merchandise/merchandise.js +51 -0
- package/dist/generated/merchandise/merchandise.js.map +1 -0
- package/dist/generated/merchandise-checkout/merchandise-checkout.d.ts +23 -0
- package/dist/generated/merchandise-checkout/merchandise-checkout.d.ts.map +1 -0
- package/dist/generated/merchandise-checkout/merchandise-checkout.js +19 -0
- package/dist/generated/merchandise-checkout/merchandise-checkout.js.map +1 -0
- package/dist/generated/pricing-rules/pricing-rules.d.ts +15 -1
- package/dist/generated/pricing-rules/pricing-rules.d.ts.map +1 -1
- package/dist/generated/pricing-rules/pricing-rules.js +12 -0
- package/dist/generated/pricing-rules/pricing-rules.js.map +1 -1
- package/dist/generated/products/products.d.ts +5 -1
- package/dist/generated/products/products.d.ts.map +1 -1
- package/dist/generated/products/products.js.map +1 -1
- package/dist/generated/sales-orders/sales-orders.d.ts +14 -0
- package/dist/generated/sales-orders/sales-orders.d.ts.map +1 -1
- package/dist/generated/sales-orders/sales-orders.js +10 -0
- package/dist/generated/sales-orders/sales-orders.js.map +1 -1
- package/dist/generated/tenant-config/tenant-config.d.ts +15 -1
- package/dist/generated/tenant-config/tenant-config.d.ts.map +1 -1
- package/dist/generated/tenant-config/tenant-config.js +12 -0
- package/dist/generated/tenant-config/tenant-config.js.map +1 -1
- package/package.json +1 -1
|
@@ -185,6 +185,11 @@ export interface OrderLegDto {
|
|
|
185
185
|
legType: string;
|
|
186
186
|
legSequence: number;
|
|
187
187
|
status: string;
|
|
188
|
+
/**
|
|
189
|
+
* The cart_component_key this leg was placed under (e.g. move:pickup, move:delivery, material:delivery). Send this back as reschedule.componentKey to re-plan this leg. Null for a leg placed before component keys existed, or from a legacy single-component cart.
|
|
190
|
+
* @nullable
|
|
191
|
+
*/
|
|
192
|
+
componentKey: string | null;
|
|
188
193
|
/**
|
|
189
194
|
* Assigned carrier (tenant_carrier_id).
|
|
190
195
|
* @nullable
|
|
@@ -1985,6 +1990,35 @@ export interface CartServiceDto {
|
|
|
1985
1990
|
/** @nullable */
|
|
1986
1991
|
metadata: CartServiceDtoMetadata;
|
|
1987
1992
|
}
|
|
1993
|
+
export interface CartMerchandiseDto {
|
|
1994
|
+
cartMerchandiseId: string;
|
|
1995
|
+
tenantGoodsId: string;
|
|
1996
|
+
quantity: number;
|
|
1997
|
+
/** Provenance: CUSTOMER picked it, ESTIMATOR suggested it. */
|
|
1998
|
+
source: string;
|
|
1999
|
+
/**
|
|
2000
|
+
* From the SKU.
|
|
2001
|
+
* @nullable
|
|
2002
|
+
*/
|
|
2003
|
+
code: string | null;
|
|
2004
|
+
/**
|
|
2005
|
+
* From the SKU.
|
|
2006
|
+
* @nullable
|
|
2007
|
+
*/
|
|
2008
|
+
name: string | null;
|
|
2009
|
+
/**
|
|
2010
|
+
* The SKU's display price ex VAT. Not what the quote charges — see `deferred`.
|
|
2011
|
+
* @nullable
|
|
2012
|
+
*/
|
|
2013
|
+
retailPriceExVat: string | null;
|
|
2014
|
+
/** @nullable */
|
|
2015
|
+
currencyCode: string | null;
|
|
2016
|
+
/**
|
|
2017
|
+
* Whether the SKU is still offered. False means it was deactivated after being basketed: the line is kept so nothing silently disappears, and it should be shown as unavailable.
|
|
2018
|
+
* @nullable
|
|
2019
|
+
*/
|
|
2020
|
+
isActive: boolean | null;
|
|
2021
|
+
}
|
|
1988
2022
|
export interface CartHoldDto {
|
|
1989
2023
|
reservationId: string;
|
|
1990
2024
|
/** @nullable */
|
|
@@ -2062,6 +2096,8 @@ export interface CartDto {
|
|
|
2062
2096
|
confirmedAt: string | null;
|
|
2063
2097
|
items: CartItemDto[];
|
|
2064
2098
|
services: CartServiceDto[];
|
|
2099
|
+
/** The merchandise basket. Its prices are NOT in `rates.totals` yet — MERCHANDISE appears in `rates.deferred` until the quote prices it. */
|
|
2100
|
+
merchandise: CartMerchandiseDto[];
|
|
2065
2101
|
holds: CartHoldDto[];
|
|
2066
2102
|
createdAt: string;
|
|
2067
2103
|
updatedAt: string;
|
|
@@ -2205,7 +2241,7 @@ export interface QuoteResponseDto {
|
|
|
2205
2241
|
*/
|
|
2206
2242
|
rutDeductionMinor: number | null;
|
|
2207
2243
|
totals: QuoteTotalsDto;
|
|
2208
|
-
/** 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). */
|
|
2244
|
+
/** 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 (the cart holds a merchandise basket; the SKUs carry real prices and will be billed on delivery, but the quote does not yet turn them into lines, so they are excluded from `totals` rather than shown as free). */
|
|
2209
2245
|
deferred: string[];
|
|
2210
2246
|
}
|
|
2211
2247
|
/**
|
|
@@ -2539,6 +2575,16 @@ export interface CartServiceInputDto {
|
|
|
2539
2575
|
/** @nullable */
|
|
2540
2576
|
metadata?: CartServiceInputDtoMetadata;
|
|
2541
2577
|
}
|
|
2578
|
+
export interface CartMerchandiseInputDto {
|
|
2579
|
+
/** A SKU from GET /v1/checkout/available-merchandise. */
|
|
2580
|
+
tenantGoodsId: string;
|
|
2581
|
+
/**
|
|
2582
|
+
* Units of this SKU. Bounded above because the column is a 32-bit integer: an unbounded value validates in TypeScript and then overflows in Postgres.
|
|
2583
|
+
* @minimum 1
|
|
2584
|
+
* @maximum 1000
|
|
2585
|
+
*/
|
|
2586
|
+
quantity: number;
|
|
2587
|
+
}
|
|
2542
2588
|
export type UpdateCartDtoCustomerType = typeof UpdateCartDtoCustomerType[keyof typeof UpdateCartDtoCustomerType];
|
|
2543
2589
|
export declare const UpdateCartDtoCustomerType: {
|
|
2544
2590
|
readonly business: "business";
|
|
@@ -2629,6 +2675,8 @@ export interface UpdateCartDto {
|
|
|
2629
2675
|
items?: CartItemInputDto[];
|
|
2630
2676
|
/** Full reconcile of extra-service lines; same semantics as items. */
|
|
2631
2677
|
services?: CartServiceInputDto[];
|
|
2678
|
+
/** Full reconcile of the merchandise basket, keyed by tenantGoodsId: update the quantity of a SKU already present, insert one that is not, remove any SKU absent from the array. Omit the field to leave the basket untouched; send an empty array to clear it. The same SKU twice in one array is a 400 — a full desired set cannot contain a key twice, and collapsing silently would pick a quantity no rule documents. */
|
|
2679
|
+
merchandise?: CartMerchandiseInputDto[];
|
|
2632
2680
|
}
|
|
2633
2681
|
export interface ClaimCartDto {
|
|
2634
2682
|
/** Staff claim-on-behalf target organization. Org users always claim into their own organization. */
|
|
@@ -4447,10 +4495,15 @@ export interface ProductDto {
|
|
|
4447
4495
|
/** @nullable */
|
|
4448
4496
|
deliveryFrequency: string | null;
|
|
4449
4497
|
/**
|
|
4450
|
-
* Customer-facing note on the item, written by staff.
|
|
4498
|
+
* Customer-facing note on the item, written by staff. See internalComment for its staff-only counterpart.
|
|
4451
4499
|
* @nullable
|
|
4452
4500
|
*/
|
|
4453
4501
|
comment: string | null;
|
|
4502
|
+
/**
|
|
4503
|
+
* Staff-only note on the item, written by staff. Scoped to the caller: platform/tenant-wide/warehouse staff see the real value; an organization user reads NULL here regardless of whether a note is set (mirrors how pendingDeliveryDate reads NULL for an order the caller cannot see).
|
|
4504
|
+
* @nullable
|
|
4505
|
+
*/
|
|
4506
|
+
internalComment: string | null;
|
|
4454
4507
|
/** Permanently skips the pick-time GTIN prompt for this product. Set via POST /v1/products/:id/ignore-gtin (the pick-time "Skip GTIN" gesture) or the check-in edit command's ignoreGtin field; reset to false when check-in instead records a scanned boxGtin. */
|
|
4455
4508
|
ignoreGtin: boolean;
|
|
4456
4509
|
/**
|
|
@@ -4552,6 +4605,11 @@ export interface UpdateProductDto {
|
|
|
4552
4605
|
* @nullable
|
|
4553
4606
|
*/
|
|
4554
4607
|
comment?: string | null;
|
|
4608
|
+
/**
|
|
4609
|
+
* Staff-only note on the item. Null clears it. Rejected (403) if the caller is not platform/tenant-wide/warehouse staff, even though product:write is held by organization roles too.
|
|
4610
|
+
* @nullable
|
|
4611
|
+
*/
|
|
4612
|
+
internalComment?: string | null;
|
|
4555
4613
|
}
|
|
4556
4614
|
export interface ReplaceImageDto {
|
|
4557
4615
|
/** Storage key of the new primary image (never base64). */
|
|
@@ -6781,6 +6839,21 @@ export interface InvoiceRowDto {
|
|
|
6781
6839
|
currencyCode: string;
|
|
6782
6840
|
/** @nullable */
|
|
6783
6841
|
freeText: string | null;
|
|
6842
|
+
/**
|
|
6843
|
+
* 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.
|
|
6844
|
+
* @nullable
|
|
6845
|
+
*/
|
|
6846
|
+
periodStart: string | null;
|
|
6847
|
+
/**
|
|
6848
|
+
* Billing period end; null under the same conditions as periodStart.
|
|
6849
|
+
* @nullable
|
|
6850
|
+
*/
|
|
6851
|
+
periodEnd: string | null;
|
|
6852
|
+
/**
|
|
6853
|
+
* The single day a point-in-time (event-sourced) row was serviced. Null for a real-period row (see periodStart/periodEnd) or a correction row.
|
|
6854
|
+
* @nullable
|
|
6855
|
+
*/
|
|
6856
|
+
servicedAt: string | null;
|
|
6784
6857
|
}
|
|
6785
6858
|
export interface InvoiceDetailDto {
|
|
6786
6859
|
invoiceId: string;
|
|
@@ -7044,6 +7117,15 @@ export interface CreatePriceListItemDto {
|
|
|
7044
7117
|
effectiveUntil?: string;
|
|
7045
7118
|
changeReason?: string;
|
|
7046
7119
|
}
|
|
7120
|
+
export interface EnabledCurrencyDto {
|
|
7121
|
+
/** ISO 4217 currency code. */
|
|
7122
|
+
currencyCode: string;
|
|
7123
|
+
/** Used at billing_account creation when no currency is specified. */
|
|
7124
|
+
isDefault: boolean;
|
|
7125
|
+
isActive: boolean;
|
|
7126
|
+
createdAt: string;
|
|
7127
|
+
updatedAt: string;
|
|
7128
|
+
}
|
|
7047
7129
|
export interface TenantBillingConfigDto {
|
|
7048
7130
|
tenantBillingConfigId: string;
|
|
7049
7131
|
tenantId: string;
|
|
@@ -7059,8 +7141,14 @@ export interface TenantBillingConfigDto {
|
|
|
7059
7141
|
defaultBillingFrequencyId: string | null;
|
|
7060
7142
|
autoChargeEnabled: boolean;
|
|
7061
7143
|
requiresPricingApproval: boolean;
|
|
7144
|
+
/**
|
|
7145
|
+
* The tenant's own legal-entity registration number (e.g. Swedish orgnummer).
|
|
7146
|
+
* @nullable
|
|
7147
|
+
*/
|
|
7148
|
+
corporateIdentityNumber: string | null;
|
|
7062
7149
|
createdAt: string;
|
|
7063
7150
|
updatedAt: string;
|
|
7151
|
+
enabledCurrencies: EnabledCurrencyDto[];
|
|
7064
7152
|
}
|
|
7065
7153
|
export interface UpdateTenantBillingConfigDto {
|
|
7066
7154
|
defaultPaymentMethodId?: string;
|
|
@@ -7068,8 +7156,20 @@ export interface UpdateTenantBillingConfigDto {
|
|
|
7068
7156
|
defaultBillingFrequencyId?: string;
|
|
7069
7157
|
autoChargeEnabled?: boolean;
|
|
7070
7158
|
requiresPricingApproval?: boolean;
|
|
7159
|
+
/** The tenant's own legal-entity registration number (e.g. Swedish orgnummer). */
|
|
7160
|
+
corporateIdentityNumber?: string;
|
|
7071
7161
|
changeReason?: string;
|
|
7072
7162
|
}
|
|
7163
|
+
export interface EnabledCurrencyInputDto {
|
|
7164
|
+
/** ISO 4217 currency code. */
|
|
7165
|
+
currencyCode: string;
|
|
7166
|
+
/** Used at billing_account creation when no currency is specified. */
|
|
7167
|
+
isDefault: boolean;
|
|
7168
|
+
isActive: boolean;
|
|
7169
|
+
}
|
|
7170
|
+
export interface ReplaceEnabledCurrenciesDto {
|
|
7171
|
+
currencies: EnabledCurrencyInputDto[];
|
|
7172
|
+
}
|
|
7073
7173
|
export interface CustomerSubscriptionConfigDto {
|
|
7074
7174
|
customerSubscriptionConfigId: string;
|
|
7075
7175
|
tenantId: string;
|
|
@@ -7841,6 +7941,102 @@ export interface ApplyTemplateDto {
|
|
|
7841
7941
|
effectiveUntil?: string;
|
|
7842
7942
|
changeReason?: string;
|
|
7843
7943
|
}
|
|
7944
|
+
/**
|
|
7945
|
+
* Engine-shaped payload for this event (method-specific inputs — quantities, hours, per-line arrays already in the engine's expected keys).
|
|
7946
|
+
*/
|
|
7947
|
+
export type SimulatePricingEventDtoPayload = {
|
|
7948
|
+
[key: string]: unknown;
|
|
7949
|
+
};
|
|
7950
|
+
export interface SimulatePricingEventDto {
|
|
7951
|
+
basisPeriodStart: string;
|
|
7952
|
+
basisPeriodEnd?: string;
|
|
7953
|
+
/** Engine-shaped payload for this event (method-specific inputs — quantities, hours, per-line arrays already in the engine's expected keys). */
|
|
7954
|
+
payload: SimulatePricingEventDtoPayload;
|
|
7955
|
+
}
|
|
7956
|
+
/**
|
|
7957
|
+
* Template form values, per the template's uiFormSchema (e.g. { amount_minor: 49900 }).
|
|
7958
|
+
*/
|
|
7959
|
+
export type SimulatePricingDtoInput = {
|
|
7960
|
+
[key: string]: unknown;
|
|
7961
|
+
};
|
|
7962
|
+
export interface SimulatePricingDto {
|
|
7963
|
+
/** Built-in template code (see GET /billing/billing-model-templates). */
|
|
7964
|
+
templateCode: string;
|
|
7965
|
+
/** Article the priced amount would post to. */
|
|
7966
|
+
articleId: string;
|
|
7967
|
+
/** ISO 4217 currency code (must be enabled for the tenant). */
|
|
7968
|
+
currencyCode: string;
|
|
7969
|
+
/** Omit to preview the tenant-wide default; set to preview a per-customer override. */
|
|
7970
|
+
billingAccountId?: string;
|
|
7971
|
+
/** Template form values, per the template's uiFormSchema (e.g. { amount_minor: 49900 }). */
|
|
7972
|
+
input: SimulatePricingDtoInput;
|
|
7973
|
+
/** Synthetic events to price the expanded rule(s) against (1–50). */
|
|
7974
|
+
events: SimulatePricingEventDto[];
|
|
7975
|
+
}
|
|
7976
|
+
export interface MatchedPricingRuleDto {
|
|
7977
|
+
pricingRuleId: string;
|
|
7978
|
+
calculationMethod: string;
|
|
7979
|
+
ruleScope: string;
|
|
7980
|
+
componentCode: string;
|
|
7981
|
+
stage: number;
|
|
7982
|
+
/** Whether this rule produced at least one basis row for any supplied event. */
|
|
7983
|
+
matched: boolean;
|
|
7984
|
+
/** @nullable */
|
|
7985
|
+
resolutionError: string | null;
|
|
7986
|
+
}
|
|
7987
|
+
/**
|
|
7988
|
+
* Calculation audit detail (method, inputs, cap/floor flags).
|
|
7989
|
+
*/
|
|
7990
|
+
export type SimulatedBasisRowDtoCalculationSnapshot = {
|
|
7991
|
+
[key: string]: unknown;
|
|
7992
|
+
};
|
|
7993
|
+
export interface SimulatedBasisRowDto {
|
|
7994
|
+
/** Index into the request's events[] that produced this row. */
|
|
7995
|
+
eventIndex: number;
|
|
7996
|
+
pricingRuleId: string;
|
|
7997
|
+
articleId: string;
|
|
7998
|
+
/** Quantity (numeric). */
|
|
7999
|
+
quantity: number;
|
|
8000
|
+
unitOfMeasureId: string;
|
|
8001
|
+
unitCode: string;
|
|
8002
|
+
/** @nullable */
|
|
8003
|
+
unitPriceMinor: number | null;
|
|
8004
|
+
/** Amount excl. VAT in minor currency units. */
|
|
8005
|
+
amountExVatMinor: number;
|
|
8006
|
+
/** Frozen article VAT percentage (e.g. 25). */
|
|
8007
|
+
vatRate: number;
|
|
8008
|
+
/** Pre-discount VAT in minor currency units. */
|
|
8009
|
+
vatAmountMinor: number;
|
|
8010
|
+
currencyCode: string;
|
|
8011
|
+
ruleScope: string;
|
|
8012
|
+
componentCode: string;
|
|
8013
|
+
/** Calculation audit detail (method, inputs, cap/floor flags). */
|
|
8014
|
+
calculationSnapshot: SimulatedBasisRowDtoCalculationSnapshot;
|
|
8015
|
+
}
|
|
8016
|
+
export interface ProjectedInvoiceRowDto {
|
|
8017
|
+
articleId: string;
|
|
8018
|
+
unitOfMeasureId: string;
|
|
8019
|
+
vatRate: string;
|
|
8020
|
+
currencyCode: string;
|
|
8021
|
+
/** Quantity (numeric). */
|
|
8022
|
+
quantity: number;
|
|
8023
|
+
/** Amount excl. VAT in minor currency units. */
|
|
8024
|
+
amountExVatMinor: number;
|
|
8025
|
+
/** VAT amount in minor currency units, BEFORE discounts. */
|
|
8026
|
+
vatAmountMinor: number;
|
|
8027
|
+
rutEligible: boolean;
|
|
8028
|
+
/** @nullable */
|
|
8029
|
+
periodStart: string | null;
|
|
8030
|
+
/** @nullable */
|
|
8031
|
+
periodEnd: string | null;
|
|
8032
|
+
/** @nullable */
|
|
8033
|
+
servicedAt: string | null;
|
|
8034
|
+
}
|
|
8035
|
+
export interface SimulatePricingResponseDto {
|
|
8036
|
+
matchedRules: MatchedPricingRuleDto[];
|
|
8037
|
+
basisRows: SimulatedBasisRowDto[];
|
|
8038
|
+
projectedInvoiceRowsBeforeDiscounts: ProjectedInvoiceRowDto[];
|
|
8039
|
+
}
|
|
7844
8040
|
export interface BillableEventTypeDto {
|
|
7845
8041
|
/** Canonical event_type key (e.g. picking_order_processed). */
|
|
7846
8042
|
eventType: string;
|
|
@@ -9774,6 +9970,104 @@ export interface SimulationResultDto {
|
|
|
9774
9970
|
/** This event's cutover mode for this tenant (05 §12 steps 4-5). `live` — the pipeline sends. `shadow` — it fans out and renders, then settles `skipped_shadow` without sending; the legacy message-service is still the system of record. `off` — Phase A discards the event and none of the verdicts above are written at all. Defaults to `shadow` when nobody has ruled on the event. */
|
|
9775
9971
|
eventMode: SimulationResultDtoEventMode;
|
|
9776
9972
|
}
|
|
9973
|
+
/**
|
|
9974
|
+
* @nullable
|
|
9975
|
+
*/
|
|
9976
|
+
export type TenantGoodsDtoMetadata = {
|
|
9977
|
+
[key: string]: unknown;
|
|
9978
|
+
} | null;
|
|
9979
|
+
export interface TenantGoodsDto {
|
|
9980
|
+
tenantGoodsId: string;
|
|
9981
|
+
tenantId: string;
|
|
9982
|
+
/** Tenant-unique SKU code. */
|
|
9983
|
+
code: string;
|
|
9984
|
+
name: string;
|
|
9985
|
+
/** @nullable */
|
|
9986
|
+
description?: string | null;
|
|
9987
|
+
/**
|
|
9988
|
+
* Display price ex VAT (numeric column → string). Derived from the authoritative minor-unit price on the SKU's pricing rule, written in the same transaction, so the two cannot disagree.
|
|
9989
|
+
* @nullable
|
|
9990
|
+
*/
|
|
9991
|
+
retailPriceExVat?: string | null;
|
|
9992
|
+
/** @nullable */
|
|
9993
|
+
currencyCode?: string | null;
|
|
9994
|
+
/** The billing.article this SKU prices through. Created by the SKU command; not caller-supplied. */
|
|
9995
|
+
billingArticleId: string;
|
|
9996
|
+
/** @nullable */
|
|
9997
|
+
category?: string | null;
|
|
9998
|
+
/** Whether the SKU is offered at checkout. Deactivating hides it from the catalogue and deliberately leaves its pricing rule active, so an order already placed still bills when it is delivered. */
|
|
9999
|
+
isActive: boolean;
|
|
10000
|
+
/** @nullable */
|
|
10001
|
+
metadata?: TenantGoodsDtoMetadata;
|
|
10002
|
+
createdAt: string;
|
|
10003
|
+
updatedAt: string;
|
|
10004
|
+
}
|
|
10005
|
+
/**
|
|
10006
|
+
* Operational hints only.
|
|
10007
|
+
*/
|
|
10008
|
+
export type CreateTenantGoodsDtoMetadata = {
|
|
10009
|
+
[key: string]: unknown;
|
|
10010
|
+
};
|
|
10011
|
+
export interface CreateTenantGoodsDto {
|
|
10012
|
+
/** Tenant-unique SKU code, e.g. BOX-L. */
|
|
10013
|
+
code: string;
|
|
10014
|
+
name: string;
|
|
10015
|
+
description?: string;
|
|
10016
|
+
/**
|
|
10017
|
+
* Price per unit ex VAT, in minor units (öre/cent). 0 is allowed — a free item still needs a rule so the sale produces an invoice line.
|
|
10018
|
+
* @minimum 0
|
|
10019
|
+
*/
|
|
10020
|
+
unitPriceExVatMinor: number;
|
|
10021
|
+
/** ISO 4217. Required even though the SKU column is nullable: the pricing rule's currency is NOT NULL and must be enabled for the tenant (billing.tenant_enabled_currency), so a SKU without one could not be priced. */
|
|
10022
|
+
currencyCode: string;
|
|
10023
|
+
/** VAT rate for the SKU's article (numeric → string, e.g. 25.0000). Defaults to the article default of 25.0000 when omitted. */
|
|
10024
|
+
vatRate?: string;
|
|
10025
|
+
/** Date the price takes effect (YYYY-MM-DD). Defaults to today. The rule is open-ended until a later price change closes its window. */
|
|
10026
|
+
effectiveFrom?: string;
|
|
10027
|
+
category?: string;
|
|
10028
|
+
/** Offered at checkout. Defaults to true. */
|
|
10029
|
+
isActive?: boolean;
|
|
10030
|
+
/** Operational hints only. */
|
|
10031
|
+
metadata?: CreateTenantGoodsDtoMetadata;
|
|
10032
|
+
}
|
|
10033
|
+
export type UpdateTenantGoodsDtoMetadata = {
|
|
10034
|
+
[key: string]: unknown;
|
|
10035
|
+
};
|
|
10036
|
+
export interface UpdateTenantGoodsDto {
|
|
10037
|
+
name?: string;
|
|
10038
|
+
description?: string;
|
|
10039
|
+
/**
|
|
10040
|
+
* New price per unit ex VAT in minor units. Equal to the current price is a no-op; different closes the live rule's window and opens a new one.
|
|
10041
|
+
* @minimum 0
|
|
10042
|
+
*/
|
|
10043
|
+
unitPriceExVatMinor?: number;
|
|
10044
|
+
/** Date the new price takes effect (YYYY-MM-DD). Defaults to today. Must be strictly AFTER the live rule's effective_from: an earlier date would build an inverted date range and a same-day one an empty range, which the EXCLUDE constraint silently accepts and nothing can ever price. */
|
|
10045
|
+
effectiveFrom?: string;
|
|
10046
|
+
category?: string;
|
|
10047
|
+
/** Offered at checkout. Setting false hides the SKU and leaves its pricing rule active on purpose, so an order already placed still bills on delivery. */
|
|
10048
|
+
isActive?: boolean;
|
|
10049
|
+
metadata?: UpdateTenantGoodsDtoMetadata;
|
|
10050
|
+
/** Recorded on the pricing rule when the price changes. */
|
|
10051
|
+
changeReason?: string;
|
|
10052
|
+
}
|
|
10053
|
+
export interface CheckoutMerchandiseDto {
|
|
10054
|
+
/** Pass this as `tenantGoodsId` when basketing. */
|
|
10055
|
+
tenantGoodsId: string;
|
|
10056
|
+
/** Tenant-unique SKU code, e.g. BOX-L. */
|
|
10057
|
+
code: string;
|
|
10058
|
+
name: string;
|
|
10059
|
+
/** @nullable */
|
|
10060
|
+
description?: string | null;
|
|
10061
|
+
/**
|
|
10062
|
+
* Display price ex VAT (numeric column → string).
|
|
10063
|
+
* @nullable
|
|
10064
|
+
*/
|
|
10065
|
+
retailPriceExVat?: string | null;
|
|
10066
|
+
/** @nullable */
|
|
10067
|
+
currencyCode?: string | null;
|
|
10068
|
+
/** @nullable */
|
|
10069
|
+
category?: string | null;
|
|
10070
|
+
}
|
|
9777
10071
|
export type OrdersControllerListV1Params = {
|
|
9778
10072
|
/**
|
|
9779
10073
|
* Max rows to return (1–100).
|
|
@@ -11168,4 +11462,30 @@ export declare const SenderIdentitiesControllerListV1Channel: {
|
|
|
11168
11462
|
readonly push: "push";
|
|
11169
11463
|
readonly webhook: "webhook";
|
|
11170
11464
|
};
|
|
11465
|
+
export type MerchandiseControllerListTenantGoodsV1Params = {
|
|
11466
|
+
/**
|
|
11467
|
+
* Max rows to return (1–100).
|
|
11468
|
+
* @minimum 1
|
|
11469
|
+
* @maximum 100
|
|
11470
|
+
*/
|
|
11471
|
+
limit?: number;
|
|
11472
|
+
/**
|
|
11473
|
+
* Rows to skip.
|
|
11474
|
+
* @minimum 0
|
|
11475
|
+
*/
|
|
11476
|
+
offset?: number;
|
|
11477
|
+
};
|
|
11478
|
+
export type MerchandiseCheckoutControllerAvailableMerchandiseV1Params = {
|
|
11479
|
+
/**
|
|
11480
|
+
* Max rows to return (1–100).
|
|
11481
|
+
* @minimum 1
|
|
11482
|
+
* @maximum 100
|
|
11483
|
+
*/
|
|
11484
|
+
limit?: number;
|
|
11485
|
+
/**
|
|
11486
|
+
* Rows to skip.
|
|
11487
|
+
* @minimum 0
|
|
11488
|
+
*/
|
|
11489
|
+
offset?: number;
|
|
11490
|
+
};
|
|
11171
11491
|
//# sourceMappingURL=index.schemas.d.ts.map
|