From b313b8c20120511885f96ea534bd7a2eb61d5162 Mon Sep 17 00:00:00 2001 From: Richard Gajda Date: Fri, 18 Sep 2026 12:17:12 -0400 Subject: [PATCH] docs(pos): clarify payment and storage API types --- .../src/surfaces/point-of-sale/types/payment.ts | 5 +++++ .../src/surfaces/point-of-sale/types/storage.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/types/payment.ts b/packages/ui-extensions/src/surfaces/point-of-sale/types/payment.ts index b6b5d8414a..a860792790 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/types/payment.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/types/payment.ts @@ -1,5 +1,10 @@ /** * The available payment method types for POS transactions. + * + * Not every value is produced in every context. `Unknown` is returned only for + * sale transactions whose payment details can't be classified. On return and + * exchange transactions, unrecognized payment gateways are returned as + * `Custom`. `CardPresentRefund` isn't currently returned by POS. * @publicDocs */ export type PaymentMethod = diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/types/storage.ts b/packages/ui-extensions/src/surfaces/point-of-sale/types/storage.ts index 62146b6765..cc67b17fcc 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/types/storage.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/types/storage.ts @@ -47,7 +47,7 @@ export interface Storage< current: SubscribableStorage; /** - * Stores a value under the specified key, overwriting any existing value. Values must be JSON-serializable and return `StorageError` when storage limits are exceeded. Commonly used for storing user preferences, caching API responses, or passing contextual data from tiles to modals. + * Stores a value under the specified key, overwriting any existing value. Values must be JSON-serializable, and the promise rejects with a `StorageError` when storage limits are exceeded. Values are JSON-serialized on write: `undefined` properties are dropped, `NaN` and `Infinity` become `null`, and `Date` objects become ISO strings. Keys are limited to 1024 UTF-16 code units, and values to 1,048,576 code units of their JSON serialization. Commonly used for storing user preferences, caching API responses, or passing contextual data from tiles to modals. * * @param key - The key to set the value for. * @param value - The value to set for the key.