platform-types 1.10.693 → 1.10.695

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/cart.d.ts CHANGED
@@ -197,7 +197,9 @@ declare global {
197
197
  * ⚠️ It is the value AFTER the cost floor. A cashier who types below cost
198
198
  * gets the cost, and the cost is what is remembered — so the floor is
199
199
  * re-applied against the CURRENT product cost on every later rebuild and a
200
- * pinned price can never drift below margin as costs rise.
200
+ * pinned price can never drift below margin as costs rise. That also means
201
+ * it can exceed 1,000,000,000 (the cap a TYPED price answers to), because
202
+ * the cost is catalogue-derived; echoing it back unchanged is never refused.
201
203
  *
202
204
  * ⚠️ It SURVIVES every later write to the cart — another line being added, a
203
205
  * coupon applied, this line's own quantity changed, the price list moving to
@@ -849,6 +851,11 @@ declare global {
849
851
  * on, and the result is floored at the product's own `cost` — a counter
850
852
  * price may discount and never sell below margin.
851
853
  *
854
+ * ⚠️ An HONOURED number above 1,000,000,000 — the line price order edit
855
+ * accepts — is refused `400 VALIDATION_FAILED` naming `price`. A number the
856
+ * surface or the store switch discards is never refused, however large, so
857
+ * a storefront or `changePrice`-off till may echo any list price.
858
+ *
852
859
  * ⚠️ THREE values, three different instructions:
853
860
  *
854
861
  * - ABSENT — say nothing about price. A line already pinned to a staff
@@ -197,6 +197,10 @@ exports.MAX_SERVICE_PICTURES = 20;
197
197
  * the ticket (`data.basketCurrency`, `data.serviceCurrency`). Nothing was
198
198
  * written and no order number was minted; bill the cart separately or resend
199
199
  * with `includeBasket: false`.
200
+ * - `SERVICE_LINE_PRICE_TOO_LARGE` · 400 — the `ready → delivered` handover
201
+ * would mint an order line (`data.line`: `'labor'` or `'parts'`, at
202
+ * `data.amount`) above `data.max`, the line price order edit accepts. Nothing
203
+ * was written and no order number was minted; split the work across tickets.
200
204
  * - `SERVICE_RENOTIFY_*` — `mode: 'renotify'`. `_TOO_SOON` (429) carries
201
205
  * `lastNotifiedAt` and `retryAfterMs`; `_IMPERSONATED` (403) means a support
202
206
  * session cannot message the customer — the store must resend it itself;
@@ -337,6 +341,7 @@ exports.SERVICE_ORDER_ERROR_CODES = [
337
341
  'PRODUCT_SALE_LIMIT_INVALID',
338
342
  'FX_CONVERSION_UNAVAILABLE',
339
343
  'TRANSACT_ITEMS_LIMIT_EXCEEDED',
344
+ 'SERVICE_LINE_PRICE_TOO_LARGE',
340
345
  // Parts
341
346
  'SERVICE_PARTS_RESTORE_EXCEEDS_CONSUMED',
342
347
  'SERVICE_PARTS_RESTORE_EXCEEDS_AMOUNT',
@@ -863,7 +863,6 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
863
863
  'PAYMENT_METHOD_SANTANDER_NAME',
864
864
  'PAYMENT_METHOD_SANTANDER_TYPE',
865
865
  'PREVIEW_BACK',
866
- 'PREVIEW_DISABLED',
867
866
  'PREVIEW_EXPIRED',
868
867
  'PREVIEW_FAILED',
869
868
  'PREVIEW_HOME',
package/dist/order.d.ts CHANGED
@@ -1774,7 +1774,8 @@ declare global {
1774
1774
  * cart path, where the price is the catalogue's. It is not a licence to set
1775
1775
  * any price: a store with `changePrice: false` refuses a line whose price
1776
1776
  * differs from the catalogue price, and a non-positive price is refused
1777
- * everywhere.
1777
+ * everywhere. A price above 1,000,000,000 is refused too, the cap order
1778
+ * edit puts on a line price, so the order can always be edited.
1778
1779
  */
1779
1780
  price: number;
1780
1781
  /** Per-line discount, subject to the same operator capability as a cart discount. */
@@ -1311,6 +1311,10 @@ export declare const MAX_SERVICE_PICTURES = 20;
1311
1311
  * the ticket (`data.basketCurrency`, `data.serviceCurrency`). Nothing was
1312
1312
  * written and no order number was minted; bill the cart separately or resend
1313
1313
  * with `includeBasket: false`.
1314
+ * - `SERVICE_LINE_PRICE_TOO_LARGE` · 400 — the `ready → delivered` handover
1315
+ * would mint an order line (`data.line`: `'labor'` or `'parts'`, at
1316
+ * `data.amount`) above `data.max`, the line price order edit accepts. Nothing
1317
+ * was written and no order number was minted; split the work across tickets.
1314
1318
  * - `SERVICE_RENOTIFY_*` — `mode: 'renotify'`. `_TOO_SOON` (429) carries
1315
1319
  * `lastNotifiedAt` and `retryAfterMs`; `_IMPERSONATED` (403) means a support
1316
1320
  * session cannot message the customer — the store must resend it itself;
@@ -1377,6 +1381,6 @@ export declare const MAX_SERVICE_PICTURES = 20;
1377
1381
  * check `GATING_ERROR_CODES` in addition. The deposit's opt-in idempotency
1378
1382
  * refusals are included here.
1379
1383
  */
1380
- export declare const SERVICE_ORDER_ERROR_CODES: readonly ["UNIT_QUANTITY_NOT_WHOLE", "UNIT_REVISION_STALE", "ROLE_FORBIDDEN", "PARENT_FILTER_CONFLICT", "VALIDATION_FAILED", "INVALID_CURSOR", "INVALID_FROM_DATE", "INVALID_TO_DATE", "INVALID_DATE_RANGE", "REWORK_INDEX_UNAVAILABLE", "STORE_NOT_FOUND", "SERVICE_ORDER_NOT_FOUND", "CUSTOMER_NOT_FOUND", "PARENT_SERVICE_ORDER_NOT_FOUND", "SERVICE_TEMPLATE_NOT_FOUND", "SERVICE_TYPE_REQUIRED", "INVALID_IMAGE_REFERENCE", "MISSING_STORE_CONTEXT", "WARRANTY_BELOW_LEGAL_MINIMUM", "TECHNICIAN_NOT_FOUND", "TECHNICIAN_NOT_ELIGIBLE", "CUSTODY_ILLEGAL_TRANSITION", "SERVICE_ORDER_BILLABLE_FROZEN", "SERVICE_ORDER_EDIT_CHANGED", "SERVICE_ORDER_DISABLED_STATE_UNCHANGED", "APPOINTMENT_NOT_FOUND", "APPOINTMENT_NOT_LINKABLE", "APPOINTMENT_NOT_OPEN", "APPOINTMENT_CUSTOMER_MISMATCH", "APPOINTMENT_VERSION_CONFLICT", "SERVICE_ORDER_TERMINAL", "SERVICE_ORDER_DISABLED", "SERVICE_ORDER_ILLEGAL_TRANSITION", "SERVICE_ORDER_STATUS_CHANGED", "SERVICE_ORDER_OUTCOME_REQUIRED", "SERVICE_ORDER_OUTCOME_NOT_ALLOWED", "SERVICE_ORDER_CUSTODY_NOT_RECEIVED", "SERVICE_ORDER_BILLABLE_NOT_AT_THIS_TRANSITION", "PAYMENT_METHODS_NOT_CONFIGURED", "PAYMENT_METHOD_NOT_FOUND", "SERVICE_ORDER_DEPOSIT_CHANGED", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSE", "IDEMPOTENCY_IN_PROGRESS", "IDEMPOTENCY_KEY_FAILED", "IDEMPOTENCY_LOCK_CONTENTION", "SERVICE_DEPOSIT_CURRENCY_MISMATCH", "SERVICE_DEPOSIT_INVALID", "INVALID_AMOUNT", "DEFAULT_DRAWER_UNAVAILABLE", "CURRENCY_MISMATCH", "SHIFT_NOT_OPEN", "SERVICE_BILLING_PRODUCTS_UNAVAILABLE", "CATEGORY_NOT_FOUND", "CATEGORY_DISABLED", "CATEGORY_DISABLE_IN_PROGRESS", "SERVICE_BILLING_PRODUCT_IN_BASKET", "SERVICE_DELIVERY_BASKET_DECISION_REQUIRED", "SERVICE_DELIVERY_BASKET_CURRENCY_MISMATCH", "PRODUCT_NOT_AVAILABLE", "PRODUCT_SALE_LIMIT_EXCEEDED", "PRODUCT_SALE_LIMIT_INVALID", "FX_CONVERSION_UNAVAILABLE", "TRANSACT_ITEMS_LIMIT_EXCEEDED", "SERVICE_PARTS_RESTORE_EXCEEDS_CONSUMED", "SERVICE_PARTS_RESTORE_EXCEEDS_AMOUNT", "SERVICE_PARTS_STOCK_INSUFFICIENT", "SERVICE_PARTS_PRODUCT_NOT_FOUND", "SERVICE_PARTS_LEDGER_FULL", "SERVICE_PARTS_TOO_MANY", "SERVICE_ORDER_PARTS_CHANGED", "SERVICE_QUOTE_NOT_FOUND", "SERVICE_QUOTE_NOT_OFFERABLE", "SERVICE_QUOTE_HOLDS_TOO_MANY", "SERVICE_QUOTE_SUPERSEDED", "SERVICE_QUOTE_ALREADY_RESOLVED", "SERVICE_QUOTE_LAPSED", "SERVICE_QUOTE_CHANNEL_RESERVED", "SERVICE_QUOTE_CHANNEL_NOT_APPLICABLE", "SERVICE_QUOTE_REASON_NOT_APPLICABLE", "SERVICE_ORDER_QUOTE_CHANGED", "SERVICE_ORDER_NOT_READY", "SERVICE_RENOTIFY_IMPERSONATED", "SERVICE_RENOTIFY_TOO_SOON", "SERVICE_RENOTIFY_CONFLICT", "SERVICE_RENOTIFY_NOT_RECORDED", "SERVICE_RENOTIFY_LEDGER_UNREADABLE", "SERVICE_RENOTIFY_NOT_DISPATCHED", "SERVICE_TIMER_ALREADY_RUNNING", "SERVICE_TIMER_NOT_RUNNING", "SERVICE_TIMER_STOP_CONFLICT", "TECHNICIAN_NOT_CLOCKED_IN", "SERVICE_ORDER_GONE", "SERVICE_WORKLOG_NOT_FOUND", "SERVICE_WORKLOG_NOT_REVERSIBLE", "SERVICE_WORKLOG_ALREADY_REVERSED", "SERVICE_ORDER_WORKLOG_CHANGED", "CART_PROMOTION_UNAVAILABLE", "COUPON_NOT_FOUND", "COUPON_NOT_ACTIVE", "COUPON_EXPIRED", "COUPON_EXHAUSTED", "COUPON_EXHAUSTED_AT_CHECKOUT", "COUPON_MIN_SUBTOTAL", "COUPON_REQUIRES_CUSTOMER", "COUPON_BUDGET_EXHAUSTED", "COUPON_CURRENCY_MISMATCH"];
1384
+ export declare const SERVICE_ORDER_ERROR_CODES: readonly ["UNIT_QUANTITY_NOT_WHOLE", "UNIT_REVISION_STALE", "ROLE_FORBIDDEN", "PARENT_FILTER_CONFLICT", "VALIDATION_FAILED", "INVALID_CURSOR", "INVALID_FROM_DATE", "INVALID_TO_DATE", "INVALID_DATE_RANGE", "REWORK_INDEX_UNAVAILABLE", "STORE_NOT_FOUND", "SERVICE_ORDER_NOT_FOUND", "CUSTOMER_NOT_FOUND", "PARENT_SERVICE_ORDER_NOT_FOUND", "SERVICE_TEMPLATE_NOT_FOUND", "SERVICE_TYPE_REQUIRED", "INVALID_IMAGE_REFERENCE", "MISSING_STORE_CONTEXT", "WARRANTY_BELOW_LEGAL_MINIMUM", "TECHNICIAN_NOT_FOUND", "TECHNICIAN_NOT_ELIGIBLE", "CUSTODY_ILLEGAL_TRANSITION", "SERVICE_ORDER_BILLABLE_FROZEN", "SERVICE_ORDER_EDIT_CHANGED", "SERVICE_ORDER_DISABLED_STATE_UNCHANGED", "APPOINTMENT_NOT_FOUND", "APPOINTMENT_NOT_LINKABLE", "APPOINTMENT_NOT_OPEN", "APPOINTMENT_CUSTOMER_MISMATCH", "APPOINTMENT_VERSION_CONFLICT", "SERVICE_ORDER_TERMINAL", "SERVICE_ORDER_DISABLED", "SERVICE_ORDER_ILLEGAL_TRANSITION", "SERVICE_ORDER_STATUS_CHANGED", "SERVICE_ORDER_OUTCOME_REQUIRED", "SERVICE_ORDER_OUTCOME_NOT_ALLOWED", "SERVICE_ORDER_CUSTODY_NOT_RECEIVED", "SERVICE_ORDER_BILLABLE_NOT_AT_THIS_TRANSITION", "PAYMENT_METHODS_NOT_CONFIGURED", "PAYMENT_METHOD_NOT_FOUND", "SERVICE_ORDER_DEPOSIT_CHANGED", "INVALID_IDEMPOTENCY_KEY", "IDEMPOTENCY_KEY_REUSE", "IDEMPOTENCY_IN_PROGRESS", "IDEMPOTENCY_KEY_FAILED", "IDEMPOTENCY_LOCK_CONTENTION", "SERVICE_DEPOSIT_CURRENCY_MISMATCH", "SERVICE_DEPOSIT_INVALID", "INVALID_AMOUNT", "DEFAULT_DRAWER_UNAVAILABLE", "CURRENCY_MISMATCH", "SHIFT_NOT_OPEN", "SERVICE_BILLING_PRODUCTS_UNAVAILABLE", "CATEGORY_NOT_FOUND", "CATEGORY_DISABLED", "CATEGORY_DISABLE_IN_PROGRESS", "SERVICE_BILLING_PRODUCT_IN_BASKET", "SERVICE_DELIVERY_BASKET_DECISION_REQUIRED", "SERVICE_DELIVERY_BASKET_CURRENCY_MISMATCH", "PRODUCT_NOT_AVAILABLE", "PRODUCT_SALE_LIMIT_EXCEEDED", "PRODUCT_SALE_LIMIT_INVALID", "FX_CONVERSION_UNAVAILABLE", "TRANSACT_ITEMS_LIMIT_EXCEEDED", "SERVICE_LINE_PRICE_TOO_LARGE", "SERVICE_PARTS_RESTORE_EXCEEDS_CONSUMED", "SERVICE_PARTS_RESTORE_EXCEEDS_AMOUNT", "SERVICE_PARTS_STOCK_INSUFFICIENT", "SERVICE_PARTS_PRODUCT_NOT_FOUND", "SERVICE_PARTS_LEDGER_FULL", "SERVICE_PARTS_TOO_MANY", "SERVICE_ORDER_PARTS_CHANGED", "SERVICE_QUOTE_NOT_FOUND", "SERVICE_QUOTE_NOT_OFFERABLE", "SERVICE_QUOTE_HOLDS_TOO_MANY", "SERVICE_QUOTE_SUPERSEDED", "SERVICE_QUOTE_ALREADY_RESOLVED", "SERVICE_QUOTE_LAPSED", "SERVICE_QUOTE_CHANNEL_RESERVED", "SERVICE_QUOTE_CHANNEL_NOT_APPLICABLE", "SERVICE_QUOTE_REASON_NOT_APPLICABLE", "SERVICE_ORDER_QUOTE_CHANGED", "SERVICE_ORDER_NOT_READY", "SERVICE_RENOTIFY_IMPERSONATED", "SERVICE_RENOTIFY_TOO_SOON", "SERVICE_RENOTIFY_CONFLICT", "SERVICE_RENOTIFY_NOT_RECORDED", "SERVICE_RENOTIFY_LEDGER_UNREADABLE", "SERVICE_RENOTIFY_NOT_DISPATCHED", "SERVICE_TIMER_ALREADY_RUNNING", "SERVICE_TIMER_NOT_RUNNING", "SERVICE_TIMER_STOP_CONFLICT", "TECHNICIAN_NOT_CLOCKED_IN", "SERVICE_ORDER_GONE", "SERVICE_WORKLOG_NOT_FOUND", "SERVICE_WORKLOG_NOT_REVERSIBLE", "SERVICE_WORKLOG_ALREADY_REVERSED", "SERVICE_ORDER_WORKLOG_CHANGED", "CART_PROMOTION_UNAVAILABLE", "COUPON_NOT_FOUND", "COUPON_NOT_ACTIVE", "COUPON_EXPIRED", "COUPON_EXHAUSTED", "COUPON_EXHAUSTED_AT_CHECKOUT", "COUPON_MIN_SUBTOTAL", "COUPON_REQUIRES_CUSTOMER", "COUPON_BUDGET_EXHAUSTED", "COUPON_CURRENCY_MISMATCH"];
1381
1385
  export type ServiceOrderErrorCode = (typeof SERVICE_ORDER_ERROR_CODES)[number];
1382
1386
  export {};
@@ -194,6 +194,10 @@ export const MAX_SERVICE_PICTURES = 20;
194
194
  * the ticket (`data.basketCurrency`, `data.serviceCurrency`). Nothing was
195
195
  * written and no order number was minted; bill the cart separately or resend
196
196
  * with `includeBasket: false`.
197
+ * - `SERVICE_LINE_PRICE_TOO_LARGE` · 400 — the `ready → delivered` handover
198
+ * would mint an order line (`data.line`: `'labor'` or `'parts'`, at
199
+ * `data.amount`) above `data.max`, the line price order edit accepts. Nothing
200
+ * was written and no order number was minted; split the work across tickets.
197
201
  * - `SERVICE_RENOTIFY_*` — `mode: 'renotify'`. `_TOO_SOON` (429) carries
198
202
  * `lastNotifiedAt` and `retryAfterMs`; `_IMPERSONATED` (403) means a support
199
203
  * session cannot message the customer — the store must resend it itself;
@@ -334,6 +338,7 @@ export const SERVICE_ORDER_ERROR_CODES = [
334
338
  'PRODUCT_SALE_LIMIT_INVALID',
335
339
  'FX_CONVERSION_UNAVAILABLE',
336
340
  'TRANSACT_ITEMS_LIMIT_EXCEEDED',
341
+ 'SERVICE_LINE_PRICE_TOO_LARGE',
337
342
  // Parts
338
343
  'SERVICE_PARTS_RESTORE_EXCEEDS_CONSUMED',
339
344
  'SERVICE_PARTS_RESTORE_EXCEEDS_AMOUNT',
@@ -860,7 +860,6 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
860
860
  'PAYMENT_METHOD_SANTANDER_NAME',
861
861
  'PAYMENT_METHOD_SANTANDER_TYPE',
862
862
  'PREVIEW_BACK',
863
- 'PREVIEW_DISABLED',
864
863
  'PREVIEW_EXPIRED',
865
864
  'PREVIEW_FAILED',
866
865
  'PREVIEW_HOME',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.693",
3
+ "version": "1.10.695",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",