From e14aa78665cb733ea2f9535a1520ca3d54fcaeec Mon Sep 17 00:00:00 2001 From: Henry Stelle Date: Fri, 17 Jul 2026 14:17:46 -0700 Subject: [PATCH 1/6] Prototype POS intercept capabilities Assisted-By: devx/90838b77-8fc2-4e3c-a4f5-da2bb34ceb43 --- .changeset/pos-intercept-capabilities.md | 5 ++ .../2026-07-rc/generated_docs_data_v2.json | 38 +++++++++++- .../src/surfaces/point-of-sale/events.ts | 12 ++++ .../surfaces/point-of-sale/globals.test.ts | 60 +++++++++++++++++++ .../src/surfaces/point-of-sale/globals.ts | 53 +++++++++++++++- 5 files changed, 165 insertions(+), 3 deletions(-) create mode 100644 .changeset/pos-intercept-capabilities.md create mode 100644 packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts diff --git a/.changeset/pos-intercept-capabilities.md b/.changeset/pos-intercept-capabilities.md new file mode 100644 index 0000000000..79fa2bd373 --- /dev/null +++ b/.changeset/pos-intercept-capabilities.md @@ -0,0 +1,5 @@ +--- +'@shopify/ui-extensions': minor +--- + +Add per-event POS intercept severity permissions to the `shopify.capabilities` signal. diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json index f5801de930..686500703f 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json @@ -10178,14 +10178,48 @@ "value": "export interface Window {\n /**\n * Closes the extension screen and dismisses the modal interface. Use to programmatically close the modal after completing a workflow, canceling an operation, or when user action is no longer required. This provides the same behavior as the user dismissing the modal through the UI.\n */\n close(): void;\n}" } }, + "InterceptCapability": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "InterceptCapability", + "value": "`${Extract<\n keyof ShopifyInterceptMap,\n string\n>}.${'error' | 'warn' | 'info'}`", + "description": "A merchant-granted permission to return a validation severity for a POS intercept event. Event names come directly from `ShopifyInterceptMap`. The `warn` suffix corresponds to the interceptor result level `WARNING`.", + "isPublicDocs": true + } + }, "ShopifyGlobal": { "src/surfaces/point-of-sale/globals.ts": { "filePath": "src/surfaces/point-of-sale/globals.ts", "name": "ShopifyGlobal", "description": "The `shopify` global provides APIs that are available to all POS extensions without needing to access them through the target's `api` argument.", "isPublicDocs": true, - "members": [], - "value": "export interface ShopifyGlobal {}" + "members": [ + { + "filePath": "src/surfaces/point-of-sale/globals.ts", + "syntaxKind": "PropertySignature", + "name": "capabilities", + "value": "ReadonlySignalLike", + "description": "The merchant-granted permissions for validation severities returned by POS interceptors. This signal is available to every POS extension target.\n\nCapability names combine an event from the approved Intercept API with an allowed severity: `${event}.error`, `${event}.warn`, or `${event}.info`. Event names exactly match the names accepted by `shopify.intercept()`; the severity suffixes are proposed by the target-scoped configuration contract.\n\nPermissions are cumulative and every implied permission is included in the array. For example, `beforecheckout.error` is accompanied by `beforecheckout.warn` and `beforecheckout.info`; `beforecheckout.warn` is accompanied by `beforecheckout.info`.\n\nAn extension can return `ERROR`, `WARNING`, or `INFO` only when the matching `error`, `warn`, or `info` capability (respectively) is present. A stronger capability also permits the weaker severities made explicit in the array.\n\nExtensions request events per target in `shopify.extension.toml`. Shopify validates at deploy time that each event is supported by its target. The declaration also tells POS to expect that target to register the matching interceptor, so the host can detect a missing validator. Only the target that registers the interceptor declares the event; companion UI targets can read this signal without redeclaring it. This distinction matters for compliance workflows where a validator failure can have legal implications and must not look like an intentionally absent validator.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "[[extensions.targeting]]\ntarget = \"pos.app.ready.data\"\nmodule = \"./src/Extension.ts\"\n\n[extensions.targeting.capabilities]\nintercepts = [\"beforecheckout\"]", + "title": "Example" + }, + { + "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor may return ERROR, WARNING, or INFO validations.\n}", + "title": "Example" + } + ] + } + ] + } + ], + "value": "export interface ShopifyGlobal {\n /**\n * The merchant-granted permissions for validation severities returned by POS\n * interceptors. This signal is available to every POS extension target.\n *\n * Capability names combine an event from the approved Intercept API with an\n * allowed severity: `${event}.error`, `${event}.warn`, or `${event}.info`.\n * Event names exactly match the names accepted by `shopify.intercept()`; the\n * severity suffixes are proposed by the target-scoped configuration contract.\n *\n * Permissions are cumulative and every implied permission is included in the\n * array. For example, `beforecheckout.error` is accompanied by\n * `beforecheckout.warn` and `beforecheckout.info`; `beforecheckout.warn` is\n * accompanied by `beforecheckout.info`.\n *\n * An extension can return `ERROR`, `WARNING`, or `INFO` only when the matching\n * `error`, `warn`, or `info` capability (respectively) is present. A stronger\n * capability also permits the weaker severities made explicit in the array.\n *\n * Extensions request events per target in `shopify.extension.toml`. Shopify\n * validates at deploy time that each event is supported by its target. The\n * declaration also tells POS to expect that target to register the matching\n * interceptor, so the host can detect a missing validator. Only the target\n * that registers the interceptor declares the event; companion UI targets can\n * read this signal without redeclaring it. This distinction matters for\n * compliance workflows where a validator failure can have legal implications\n * and must not look like an intentionally absent validator.\n *\n * @example\n * ```toml\n * [[extensions.targeting]]\n * target = \"pos.app.ready.data\"\n * module = \"./src/Extension.ts\"\n *\n * [extensions.targeting.capabilities]\n * intercepts = [\"beforecheckout\"]\n * ```\n *\n * ```ts\n * if (shopify.capabilities.value.includes('beforecheckout.error')) {\n * // This interceptor may return ERROR, WARNING, or INFO validations.\n * }\n * ```\n *\n * @see https://github.com/Shopify/ui-api-design/blob/be97e2ca7089b05db762a00941400c0e4dd3df94/libraries/javascript/ui-api-design/types/extensions/configuration/capabilities.md\n * @see https://github.com/Shopify/ui-api-design/pull/1557\n * @see https://github.com/Shopify/ui-api-design/pull/1563\n */\n capabilities: ReadonlySignalLike;\n}" } }, "BackgroundShopifyGlobal": { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/events.ts b/packages/ui-extensions/src/surfaces/point-of-sale/events.ts index 325d4b14ec..1ef932954b 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/events.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/events.ts @@ -52,6 +52,18 @@ export interface ShopifyInterceptMap { [POS_INTERCEPT_NAMES.BEFORE_CHECKOUT]: BeforeCheckoutEvent; } +/** + * A merchant-granted permission to return a validation severity for a POS + * intercept event. Event names come directly from `ShopifyInterceptMap`. + * The `warn` suffix corresponds to the interceptor result level `WARNING`. + * + * @publicDocs + */ +export type InterceptCapability = `${Extract< + keyof ShopifyInterceptMap, + string +>}.${'error' | 'warn' | 'info'}`; + /** * Dispatched when staff attempts to leave the active cart for checkout. * diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts b/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts new file mode 100644 index 0000000000..f0b17aa673 --- /dev/null +++ b/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts @@ -0,0 +1,60 @@ +import type {ReadonlySignalLike} from '../../shared'; +import type {InterceptCapability} from './events'; +import type {ShopifyGlobal} from './globals'; + +function createSignal(value: T): ReadonlySignalLike { + return { + value, + subscribe: () => () => undefined, + }; +} + +// POS expands cumulative grants at runtime. These tests cover the public type +// and signal shape used to represent the host-provided arrays. +describe('POS intercept capabilities', () => { + it('accepts all capabilities implied by an error grant', () => { + const capabilities: InterceptCapability[] = [ + 'beforecheckout.error', + 'beforecheckout.warn', + 'beforecheckout.info', + ]; + const global: ShopifyGlobal = { + capabilities: createSignal(capabilities), + }; + + expect(global.capabilities.value).toStrictEqual(capabilities); + }); + + it('accepts info with a warning grant', () => { + const capabilities: InterceptCapability[] = [ + 'beforecheckout.warn', + 'beforecheckout.info', + ]; + + const global: ShopifyGlobal = { + capabilities: createSignal(capabilities), + }; + + expect(global.capabilities.value).toStrictEqual(capabilities); + expect(global.capabilities.value).not.toContain('beforecheckout.error'); + }); + + it('accepts an empty array when no intercept permissions are granted', () => { + const global: ShopifyGlobal = { + capabilities: createSignal([]), + }; + + expect(global.capabilities.value).toStrictEqual([]); + }); + + it('types capabilities from intercept event names and proposed suffixes', () => { + const capabilities: InterceptCapability[] = [ + // @ts-expect-error Event names must come from ShopifyInterceptMap. + 'unsupported.error', + // @ts-expect-error Capability suffixes use `warn`, not `warning`. + 'beforecheckout.warning', + ]; + + expect(capabilities).toHaveLength(2); + }); +}); diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts b/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts index bae46a34dc..8f6d676ce2 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts @@ -1,5 +1,7 @@ +import type {ReadonlySignalLike} from '../../shared'; import type {Navigation} from './api/navigation-api/navigation-api'; import type { + InterceptCapability, ShopifyEventMap, ShopifyInterceptMap, ShopifyInterceptor, @@ -11,7 +13,56 @@ import type { * * @publicDocs */ -export interface ShopifyGlobal {} +export interface ShopifyGlobal { + /** + * The merchant-granted permissions for validation severities returned by POS + * interceptors. This signal is available to every POS extension target. + * + * Capability names combine an event from the approved Intercept API with an + * allowed severity: `${event}.error`, `${event}.warn`, or `${event}.info`. + * Event names exactly match the names accepted by `shopify.intercept()`; the + * severity suffixes are proposed by the target-scoped configuration contract. + * + * Permissions are cumulative and every implied permission is included in the + * array. For example, `beforecheckout.error` is accompanied by + * `beforecheckout.warn` and `beforecheckout.info`; `beforecheckout.warn` is + * accompanied by `beforecheckout.info`. + * + * An extension can return `ERROR`, `WARNING`, or `INFO` only when the matching + * `error`, `warn`, or `info` capability (respectively) is present. A stronger + * capability also permits the weaker severities made explicit in the array. + * + * Extensions request events per target in `shopify.extension.toml`. Shopify + * validates at deploy time that each event is supported by its target. The + * declaration also tells POS to expect that target to register the matching + * interceptor, so the host can detect a missing validator. Only the target + * that registers the interceptor declares the event; companion UI targets can + * read this signal without redeclaring it. This distinction matters for + * compliance workflows where a validator failure can have legal implications + * and must not look like an intentionally absent validator. + * + * @example + * ```toml + * [[extensions.targeting]] + * target = "pos.app.ready.data" + * module = "./src/Extension.ts" + * + * [extensions.targeting.capabilities] + * intercepts = ["beforecheckout"] + * ``` + * + * ```ts + * if (shopify.capabilities.value.includes('beforecheckout.error')) { + * // This interceptor may return ERROR, WARNING, or INFO validations. + * } + * ``` + * + * @see https://github.com/Shopify/ui-api-design/blob/be97e2ca7089b05db762a00941400c0e4dd3df94/libraries/javascript/ui-api-design/types/extensions/configuration/capabilities.md + * @see https://github.com/Shopify/ui-api-design/pull/1557 + * @see https://github.com/Shopify/ui-api-design/pull/1563 + */ + capabilities: ReadonlySignalLike; +} /** * Background-only extension of `ShopifyGlobal`. Adds host-event listener APIs From 8d81158b27785e1ff0a54ce9b155362adee178b5 Mon Sep 17 00:00:00 2001 From: Henry Stelle Date: Fri, 17 Jul 2026 14:27:55 -0700 Subject: [PATCH 2/6] Cover info-only intercept capability grants --- .../src/surfaces/point-of-sale/globals.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts b/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts index f0b17aa673..a3534d8d4d 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts @@ -39,6 +39,18 @@ describe('POS intercept capabilities', () => { expect(global.capabilities.value).not.toContain('beforecheckout.error'); }); + it('accepts only info with an info grant', () => { + const global: ShopifyGlobal = { + capabilities: createSignal([ + 'beforecheckout.info', + ]), + }; + + expect(global.capabilities.value).toStrictEqual(['beforecheckout.info']); + expect(global.capabilities.value).not.toContain('beforecheckout.error'); + expect(global.capabilities.value).not.toContain('beforecheckout.warn'); + }); + it('accepts an empty array when no intercept permissions are granted', () => { const global: ShopifyGlobal = { capabilities: createSignal([]), From 67651e77d6e7fba8968210a67fece85ea092b81e Mon Sep 17 00:00:00 2001 From: Henry Stelle Date: Fri, 17 Jul 2026 14:51:22 -0700 Subject: [PATCH 3/6] Address POS intercept capability feedback Assisted-By: devx/2c55c133-dd59-4875-86d9-cce3ea78d8e1 --- .changeset/pos-intercept-capabilities.md | 2 +- .../2026-07-rc/generated_docs_data_v2.json | 1256 ++++++++++++----- .../src/surfaces/point-of-sale/api.ts | 5 + .../api/capabilities-api/capabilities-api.ts | 38 + .../src/surfaces/point-of-sale/events.ts | 12 - .../surfaces/point-of-sale/globals.test.ts | 14 +- .../src/surfaces/point-of-sale/globals.ts | 54 +- 7 files changed, 934 insertions(+), 447 deletions(-) create mode 100644 packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts diff --git a/.changeset/pos-intercept-capabilities.md b/.changeset/pos-intercept-capabilities.md index 79fa2bd373..6044a06fec 100644 --- a/.changeset/pos-intercept-capabilities.md +++ b/.changeset/pos-intercept-capabilities.md @@ -2,4 +2,4 @@ '@shopify/ui-extensions': minor --- -Add per-event POS intercept severity permissions to the `shopify.capabilities` signal. +Add `.error`, `.warning`, and `.info` POS intercept severity values to the existing `shopify.capabilities` signal. diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json index 686500703f..16a0607af7 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json @@ -971,7 +971,7 @@ "syntaxKind": "MethodSignature", "name": "bulkSetLineItemDiscounts", "value": "(lineItemDiscounts: SetLineItemDiscountInput[]) => Promise", - "description": "Apply discounts to multiple line items simultaneously. Each input specifies the line item `UUID` and discount details for efficient bulk discount operations with enhanced validation and allocation tracking." + "description": "Apply discounts to multiple line items simultaneously. Each input specifies the line item `UUID` and discount details for efficient bulk discount operations with enhanced validation and allocation tracking. `FixedAmount` discounts use per-unit amounts. For example, passing `'5.00'` on a line item with quantity 2 results in a $10.00 total discount." }, { "filePath": "src/surfaces/point-of-sale/api/cart-api/cart-api.ts", @@ -1076,7 +1076,7 @@ "syntaxKind": "MethodSignature", "name": "setLineItemDiscount", "value": "(uuid: string, type: LineItemDiscountType, title: string, amount: string) => Promise", - "description": "Apply a discount to a specific line item using its `UUID`. Specify the discount type (`'Percentage'` or `'FixedAmount'`), title, and amount value with improved discount allocation tracking." + "description": "Apply a discount to a specific line item using its `UUID`. Specify the discount type (`'Percentage'` or `'FixedAmount'`), title, and amount value with improved discount allocation tracking. `FixedAmount` discounts use per-unit amounts. For example, passing `'5.00'` on a line item with quantity 2 results in a $10.00 total discount." }, { "filePath": "src/surfaces/point-of-sale/api/cart-api/cart-api.ts", @@ -1251,7 +1251,7 @@ "syntaxKind": "MethodSignature", "name": "bulkSetLineItemDiscounts", "value": "(lineItemDiscounts: SetLineItemDiscountInput[]) => Promise", - "description": "Apply discounts to multiple line items simultaneously. Each input specifies the line item `UUID` and discount details for efficient bulk discount operations with enhanced validation and allocation tracking." + "description": "Apply discounts to multiple line items simultaneously. Each input specifies the line item `UUID` and discount details for efficient bulk discount operations with enhanced validation and allocation tracking. `FixedAmount` discounts use per-unit amounts. For example, passing `'5.00'` on a line item with quantity 2 results in a $10.00 total discount." }, { "filePath": "src/surfaces/point-of-sale/api/cart-api/cart-api.ts", @@ -1349,7 +1349,7 @@ "syntaxKind": "MethodSignature", "name": "setLineItemDiscount", "value": "(uuid: string, type: LineItemDiscountType, title: string, amount: string) => Promise", - "description": "Apply a discount to a specific line item using its `UUID`. Specify the discount type (`'Percentage'` or `'FixedAmount'`), title, and amount value with improved discount allocation tracking." + "description": "Apply a discount to a specific line item using its `UUID`. Specify the discount type (`'Percentage'` or `'FixedAmount'`), title, and amount value with improved discount allocation tracking. `FixedAmount` discounts use per-unit amounts. For example, passing `'5.00'` on a line item with quantity 2 results in a $10.00 total discount." }, { "filePath": "src/surfaces/point-of-sale/api/cart-api/cart-api.ts", @@ -1359,7 +1359,7 @@ "description": "Set a specific address as the default address for the customer using the address `ID`. The customer must be present in the cart to update the default address with enhanced validation." } ], - "value": "export interface MutableCartApiContent {\n /**\n * Perform a bulk update of the entire cart state including note, discounts, customer, line items, and properties. Returns the updated cart object after the operation completes with enhanced validation and error handling.\n *\n * @param cartState the cart state to set\n * @returns the updated cart\n */\n bulkCartUpdate(cartState: CartUpdateInput): Promise;\n\n /**\n * Apply a cart-level discount with the specified type (`'Percentage'`, `'FixedAmount'`, or `'Code'`), title, and optional amount. For discount codes, omit the `amount` parameter. Enhanced validation ensures proper discount application.\n *\n * @param type the type of discount applied (example: 'Percentage')\n * @param title the title attributed with the discount\n * @param amount the percentage or fixed monetary amount deducted with the discount. Pass in `undefined` if using discount codes.\n */\n applyCartDiscount(\n type: CartDiscountType,\n title: string,\n amount?: string,\n ): Promise;\n\n /**\n * Apply a discount code to the cart. The system will validate the code and apply the appropriate discount if the code is valid and applicable to the current cart contents with improved error messaging.\n *\n * @param code the code for the discount to add to the cart\n */\n addCartCodeDiscount(code: string): Promise;\n\n /**\n * Remove the current cart-level discount. This only affects cart-level discounts and does not impact line item discounts or automatic discount eligibility.\n */\n removeCartDiscount(): Promise;\n\n /**\n * Remove all discounts from both the cart and individual line items. Set `disableAutomaticDiscounts` to `true` to prevent automatic discounts from being reapplied after removal with enhanced discount allocation handling.\n *\n * @param disableAutomaticDiscounts Whether or not automatic discounts should be enabled after removing the discounts.\n */\n removeAllDiscounts(disableAutomaticDiscounts: boolean): Promise;\n\n /**\n * Remove all line items and reset the cart to an empty state. This action can't be undone and will clear all cart contents including line items, discounts, properties, and selling plans.\n */\n clearCart(): Promise;\n\n /**\n * Associate a customer with the current cart using the customer object containing the customer `ID`. This enables customer-specific pricing, discounts, and checkout features with enhanced customer data validation.\n *\n * @param customer the customer object to add to the cart\n */\n setCustomer(customer: Customer): Promise;\n\n /**\n * Remove the currently associated customer from the cart, converting it back to a guest cart without customer-specific benefits or information while preserving cart contents.\n */\n removeCustomer(): Promise;\n\n /**\n * Add a custom sale item to the cart with specified quantity, title, price, and taxable status. Returns the `UUID` of the created line item for future operations and property management.\n *\n * @param customSale the custom sale object to add to the cart\n * @returns {string} the UUID of the line item added\n */\n addCustomSale(customSale: CustomSale): Promise;\n\n /**\n * Add a product variant to the cart by its numeric `ID` with the specified quantity. Returns the `UUID` of the newly added line item, or an empty string if the user dismissed an oversell guard modal. Throws an error if POS fails to add the line item due to validation or system errors.\n *\n * @param variantId the product variant's numeric ID to add to the cart\n * @param quantity the number of this variant to add to the cart\n * @returns {string} the UUID of the line item added, or the empty string if the user dismissed an oversell guard modal\n * @throws {Error} if POS fails to add the line item\n */\n addLineItem(variantId: number, quantity: number): Promise;\n\n /**\n * Remove a specific line item from the cart using its `UUID`. The line item will be completely removed from the cart along with any associated discounts, properties, or selling plans.\n *\n * @param uuid the uuid of the line item that should be removed\n */\n removeLineItem(uuid: string): Promise;\n\n /**\n * Add custom key-value properties to the cart for storing metadata, tracking information, or integration data. Properties are merged with existing cart properties with enhanced validation and conflict resolution.\n *\n * @param properties the custom key to value object to attribute to the cart\n */\n addCartProperties(properties: Record): Promise;\n\n /**\n * Remove specific cart properties by their keys. Only the specified property keys will be removed while other properties remain intact with improved error handling for non-existent keys.\n *\n * @param keys the collection of keys to be removed from the cart properties\n */\n removeCartProperties(keys: string[]): Promise;\n\n /**\n * Add custom properties to a specific line item using its `UUID`. Properties are merged with existing line item properties for metadata storage and tracking with enhanced validation.\n *\n * @param uuid the uuid of the line item to which the properties should be stringd\n * @param properties the custom key to value object to attribute to the line item\n */\n addLineItemProperties(\n uuid: string,\n properties: Record,\n ): Promise;\n\n /**\n * Add properties to multiple line items simultaneously using an array of inputs containing line item `UUIDs` and their respective properties for efficient bulk operations with enhanced validation and error reporting.\n *\n * @param lineItemProperties the collection of custom line item properties to apply to their respective line items.\n */\n bulkAddLineItemProperties(\n lineItemProperties: SetLineItemPropertiesInput[],\n ): Promise;\n\n /**\n * Remove specific properties from a line item by `UUID` and property keys. Only the specified keys will be removed while other properties remain intact with improved error handling.\n *\n * @param uuid the uuid of the line item to which the properties should be removed\n * @param keys the collection of keys to be removed from the line item properties\n */\n removeLineItemProperties(uuid: string, keys: string[]): Promise;\n\n /**\n * Apply a discount to a specific line item using its `UUID`. Specify the discount type (`'Percentage'` or `'FixedAmount'`), title, and amount value with improved discount allocation tracking.\n *\n * @param uuid the uuid of the line item that should receive a discount\n * @param type the type of discount applied (example: 'Percentage')\n * @param title the title attributed with the discount\n * @param amount the percentage or fixed monetary amount deducted with the discout\n */\n setLineItemDiscount(\n uuid: string,\n type: LineItemDiscountType,\n title: string,\n amount: string,\n ): Promise;\n\n /**\n * Apply discounts to multiple line items simultaneously. Each input specifies the line item `UUID` and discount details for efficient bulk discount operations with enhanced validation and allocation tracking.\n *\n * @param lineItemDiscounts a map of discounts to add. They key is the uuid of the line item you want to add the discount to. The value is the discount input.\n */\n bulkSetLineItemDiscounts(\n lineItemDiscounts: SetLineItemDiscountInput[],\n ): Promise;\n\n /**\n * Set the attributed staff member for all line items in the cart using the staff `ID`. Pass `undefined` to clear staff attribution from all line items with enhanced staff validation and tracking.\n *\n * @param staffId the ID of the staff. Providing undefined will clear the attributed staff from all line items.\n */\n setAttributedStaff(staffId: number | undefined): Promise;\n\n /**\n * Set the attributed staff member for a specific line item using the staff `ID` and line item `UUID`. Pass `undefined` as `staffId` to clear attribution from the line item with improved validation and error handling.\n *\n * @param staffId the ID of the staff. Providing undefined will clear the attributed staff on the line item.\n * @param lineItemUuid the UUID of the line item.\n */\n setAttributedStaffToLineItem(\n staffId: number | undefined,\n lineItemUuid: string,\n ): Promise;\n\n /**\n * Remove all discounts from a specific line item identified by its `UUID`. This will clear any custom discounts applied to the line item while preserving discount allocation history.\n *\n * @param uuid the uuid of the line item whose discounts should be removed\n */\n removeLineItemDiscount(uuid: string): Promise;\n\n /**\n * Add a new address to the customer associated with the cart. The customer must be present in the cart before adding addresses with enhanced address validation and formatting.\n *\n * @param address the address object to add to the customer in cart\n */\n addAddress(address: Address): Promise;\n\n /**\n * Delete an existing address from the customer using the address `ID`. The customer must be present in the cart to perform this operation with improved error handling for invalid address `IDs`.\n *\n * @param addressId the address ID to delete\n */\n deleteAddress(addressId: number): Promise;\n\n /**\n * Set a specific address as the default address for the customer using the address `ID`. The customer must be present in the cart to update the default address with enhanced validation.\n *\n * @param addressId the address ID to set as the default address\n */\n updateDefaultAddress(addressId: number): Promise;\n\n /**\n * Add a selling plan to a line item in the cart using the line item `UUID`, selling plan `ID`, and selling plan name. Optionally provide delivery interval and interval count for improved performance, otherwise POS will fetch them after syncing the cart.\n *\n * @param uuid the uuid of the line item that should receive the selling plan\n * @param sellingPlanId the ID of the selling plan to add to the line item\n */\n addLineItemSellingPlan(input: SetLineItemSellingPlanInput): Promise;\n\n /**\n * Remove the selling plan from a line item in the cart using the line item `UUID`. This will clear any subscription or recurring purchase configuration from the line item.\n *\n * @param uuid the uuid of the line item whose selling plan should be removed\n */\n removeLineItemSellingPlan(uuid: string): Promise;\n}" + "value": "export interface MutableCartApiContent {\n /**\n * Perform a bulk update of the entire cart state including note, discounts, customer, line items, and properties. Returns the updated cart object after the operation completes with enhanced validation and error handling.\n *\n * @param cartState the cart state to set\n * @returns the updated cart\n */\n bulkCartUpdate(cartState: CartUpdateInput): Promise;\n\n /**\n * Apply a cart-level discount with the specified type (`'Percentage'`, `'FixedAmount'`, or `'Code'`), title, and optional amount. For discount codes, omit the `amount` parameter. Enhanced validation ensures proper discount application.\n *\n * @param type the type of discount applied (example: 'Percentage')\n * @param title the title attributed with the discount\n * @param amount the percentage or fixed monetary amount deducted with the discount. Pass in `undefined` if using discount codes.\n */\n applyCartDiscount(\n type: CartDiscountType,\n title: string,\n amount?: string,\n ): Promise;\n\n /**\n * Apply a discount code to the cart. The system will validate the code and apply the appropriate discount if the code is valid and applicable to the current cart contents with improved error messaging.\n *\n * @param code the code for the discount to add to the cart\n */\n addCartCodeDiscount(code: string): Promise;\n\n /**\n * Remove the current cart-level discount. This only affects cart-level discounts and does not impact line item discounts or automatic discount eligibility.\n */\n removeCartDiscount(): Promise;\n\n /**\n * Remove all discounts from both the cart and individual line items. Set `disableAutomaticDiscounts` to `true` to prevent automatic discounts from being reapplied after removal with enhanced discount allocation handling.\n *\n * @param disableAutomaticDiscounts Whether or not automatic discounts should be enabled after removing the discounts.\n */\n removeAllDiscounts(disableAutomaticDiscounts: boolean): Promise;\n\n /**\n * Remove all line items and reset the cart to an empty state. This action can't be undone and will clear all cart contents including line items, discounts, properties, and selling plans.\n */\n clearCart(): Promise;\n\n /**\n * Associate a customer with the current cart using the customer object containing the customer `ID`. This enables customer-specific pricing, discounts, and checkout features with enhanced customer data validation.\n *\n * @param customer the customer object to add to the cart\n */\n setCustomer(customer: Customer): Promise;\n\n /**\n * Remove the currently associated customer from the cart, converting it back to a guest cart without customer-specific benefits or information while preserving cart contents.\n */\n removeCustomer(): Promise;\n\n /**\n * Add a custom sale item to the cart with specified quantity, title, price, and taxable status. Returns the `UUID` of the created line item for future operations and property management.\n *\n * @param customSale the custom sale object to add to the cart\n * @returns {string} the UUID of the line item added\n */\n addCustomSale(customSale: CustomSale): Promise;\n\n /**\n * Add a product variant to the cart by its numeric `ID` with the specified quantity. Returns the `UUID` of the newly added line item, or an empty string if the user dismissed an oversell guard modal. Throws an error if POS fails to add the line item due to validation or system errors.\n *\n * @param variantId the product variant's numeric ID to add to the cart\n * @param quantity the number of this variant to add to the cart\n * @returns {string} the UUID of the line item added, or the empty string if the user dismissed an oversell guard modal\n * @throws {Error} if POS fails to add the line item\n */\n addLineItem(variantId: number, quantity: number): Promise;\n\n /**\n * Remove a specific line item from the cart using its `UUID`. The line item will be completely removed from the cart along with any associated discounts, properties, or selling plans.\n *\n * @param uuid the uuid of the line item that should be removed\n */\n removeLineItem(uuid: string): Promise;\n\n /**\n * Add custom key-value properties to the cart for storing metadata, tracking information, or integration data. Properties are merged with existing cart properties with enhanced validation and conflict resolution.\n *\n * @param properties the custom key to value object to attribute to the cart\n */\n addCartProperties(properties: Record): Promise;\n\n /**\n * Remove specific cart properties by their keys. Only the specified property keys will be removed while other properties remain intact with improved error handling for non-existent keys.\n *\n * @param keys the collection of keys to be removed from the cart properties\n */\n removeCartProperties(keys: string[]): Promise;\n\n /**\n * Add custom properties to a specific line item using its `UUID`. Properties are merged with existing line item properties for metadata storage and tracking with enhanced validation.\n *\n * @param uuid the uuid of the line item to which the properties should be stringd\n * @param properties the custom key to value object to attribute to the line item\n */\n addLineItemProperties(\n uuid: string,\n properties: Record,\n ): Promise;\n\n /**\n * Add properties to multiple line items simultaneously using an array of inputs containing line item `UUIDs` and their respective properties for efficient bulk operations with enhanced validation and error reporting.\n *\n * @param lineItemProperties the collection of custom line item properties to apply to their respective line items.\n */\n bulkAddLineItemProperties(\n lineItemProperties: SetLineItemPropertiesInput[],\n ): Promise;\n\n /**\n * Remove specific properties from a line item by `UUID` and property keys. Only the specified keys will be removed while other properties remain intact with improved error handling.\n *\n * @param uuid the uuid of the line item to which the properties should be removed\n * @param keys the collection of keys to be removed from the line item properties\n */\n removeLineItemProperties(uuid: string, keys: string[]): Promise;\n\n /**\n * Apply a discount to a specific line item using its `UUID`. Specify the discount type (`'Percentage'` or `'FixedAmount'`), title, and amount value with improved discount allocation tracking. `FixedAmount` discounts use per-unit amounts. For example, passing `'5.00'` on a line item with quantity 2 results in a $10.00 total discount.\n *\n * @param uuid the uuid of the line item that should receive a discount\n * @param type the type of discount applied (example: 'Percentage')\n * @param title the title attributed with the discount\n * @param amount the percentage or fixed monetary amount deducted with the discout\n */\n setLineItemDiscount(\n uuid: string,\n type: LineItemDiscountType,\n title: string,\n amount: string,\n ): Promise;\n\n /**\n * Apply discounts to multiple line items simultaneously. Each input specifies the line item `UUID` and discount details for efficient bulk discount operations with enhanced validation and allocation tracking. `FixedAmount` discounts use per-unit amounts. For example, passing `'5.00'` on a line item with quantity 2 results in a $10.00 total discount.\n *\n * @param lineItemDiscounts a map of discounts to add. They key is the uuid of the line item you want to add the discount to. The value is the discount input.\n */\n bulkSetLineItemDiscounts(\n lineItemDiscounts: SetLineItemDiscountInput[],\n ): Promise;\n\n /**\n * Set the attributed staff member for all line items in the cart using the staff `ID`. Pass `undefined` to clear staff attribution from all line items with enhanced staff validation and tracking.\n *\n * @param staffId the ID of the staff. Providing undefined will clear the attributed staff from all line items.\n */\n setAttributedStaff(staffId: number | undefined): Promise;\n\n /**\n * Set the attributed staff member for a specific line item using the staff `ID` and line item `UUID`. Pass `undefined` as `staffId` to clear attribution from the line item with improved validation and error handling.\n *\n * @param staffId the ID of the staff. Providing undefined will clear the attributed staff on the line item.\n * @param lineItemUuid the UUID of the line item.\n */\n setAttributedStaffToLineItem(\n staffId: number | undefined,\n lineItemUuid: string,\n ): Promise;\n\n /**\n * Remove all discounts from a specific line item identified by its `UUID`. This will clear any custom discounts applied to the line item while preserving discount allocation history.\n *\n * @param uuid the uuid of the line item whose discounts should be removed\n */\n removeLineItemDiscount(uuid: string): Promise;\n\n /**\n * Add a new address to the customer associated with the cart. The customer must be present in the cart before adding addresses with enhanced address validation and formatting.\n *\n * @param address the address object to add to the customer in cart\n */\n addAddress(address: Address): Promise;\n\n /**\n * Delete an existing address from the customer using the address `ID`. The customer must be present in the cart to perform this operation with improved error handling for invalid address `IDs`.\n *\n * @param addressId the address ID to delete\n */\n deleteAddress(addressId: number): Promise;\n\n /**\n * Set a specific address as the default address for the customer using the address `ID`. The customer must be present in the cart to update the default address with enhanced validation.\n *\n * @param addressId the address ID to set as the default address\n */\n updateDefaultAddress(addressId: number): Promise;\n\n /**\n * Add a selling plan to a line item in the cart using the line item `UUID`, selling plan `ID`, and selling plan name. Optionally provide delivery interval and interval count for improved performance, otherwise POS will fetch them after syncing the cart.\n *\n * @param uuid the uuid of the line item that should receive the selling plan\n * @param sellingPlanId the ID of the selling plan to add to the line item\n */\n addLineItemSellingPlan(input: SetLineItemSellingPlanInput): Promise;\n\n /**\n * Remove the selling plan from a line item in the cart using the line item `UUID`. This will clear any subscription or recurring purchase configuration from the line item.\n *\n * @param uuid the uuid of the line item whose selling plan should be removed\n */\n removeLineItemSellingPlan(uuid: string): Promise;\n}" } }, "CartLineItemApi": { @@ -1814,6 +1814,24 @@ "value": "export interface LocaleApi {\n locale: LocaleApiContent;\n}" } }, + "StaffMember": { + "src/surfaces/point-of-sale/types/session.ts": { + "filePath": "src/surfaces/point-of-sale/types/session.ts", + "name": "StaffMember", + "description": "Defines a staff member in POS.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/types/session.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "number", + "description": "The staff member ID." + } + ], + "value": "export interface StaffMember {\n /**\n * The staff member ID.\n */\n id: number;\n}" + } + }, "Session": { "src/surfaces/point-of-sale/types/session.ts": { "filePath": "src/surfaces/point-of-sale/types/session.ts", @@ -1861,8 +1879,9 @@ "syntaxKind": "PropertySignature", "name": "staffMemberId", "value": "number", - "description": "The staff ID of the staff member currently pinned into the POS. This may differ from the user ID if the pinned staff member is different from the logged-in user.", - "isOptional": true + "description": "The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.", + "isOptional": true, + "deprecationMessage": "Use `session.staffMember` on the Session API instead." }, { "filePath": "src/surfaces/point-of-sale/types/session.ts", @@ -1872,7 +1891,7 @@ "description": "The user ID associated with the Shopify account currently authenticated on POS." } ], - "value": "export interface Session {\n /**\n * The shop ID associated with the shop currently logged into POS.\n */\n shopId: number;\n\n /**\n * The user ID associated with the Shopify account currently authenticated on POS.\n */\n userId: number;\n\n /**\n * The shop domain associated with the shop currently logged into POS.\n */\n shopDomain: string;\n\n /**\n * The location ID associated with the POS device's current location.\n */\n locationId: number;\n\n /**\n * The staff ID of the staff member currently pinned into the POS. This may differ from the user ID if the pinned staff member is different from the logged-in user.\n */\n staffMemberId?: number;\n\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: CurrencyCode;\n\n /**\n * The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running.\n */\n posVersion: string;\n}" + "value": "export interface Session {\n /**\n * The shop ID associated with the shop currently logged into POS.\n */\n shopId: number;\n\n /**\n * The user ID associated with the Shopify account currently authenticated on POS.\n */\n userId: number;\n\n /**\n * The shop domain associated with the shop currently logged into POS.\n */\n shopDomain: string;\n\n /**\n * The location ID associated with the POS device's current location.\n */\n locationId: number;\n\n /**\n * The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.\n *\n * @deprecated Use `session.staffMember` on the Session API instead.\n */\n staffMemberId?: number;\n\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: CurrencyCode;\n\n /**\n * The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running.\n */\n posVersion: string;\n}" } }, "CurrencyCode": { @@ -1923,9 +1942,16 @@ "name": "getSessionToken", "value": "() => Promise", "description": "Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member." + }, + { + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "syntaxKind": "PropertySignature", + "name": "staffMember", + "value": "ReadonlySignalLike", + "description": "Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in." } ], - "value": "export interface SessionApiContent {\n /**\n * Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change.\n */\n currentSession: Session;\n /**\n * Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member.\n */\n getSessionToken: () => Promise;\n /**\n * The numeric ID of the device running this session.\n *\n * Use this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.\n *\n * @example 123456\n * @see [Global IDs documentation](/docs/api/usage/gids) for more about GID format and structure\n * @see [device.getDeviceId()](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) for physical device identifier (UUID format)\n */\n deviceId: number;\n}" + "value": "export interface SessionApiContent {\n /**\n * Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change.\n */\n currentSession: Session;\n /**\n * Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in.\n */\n staffMember: ReadonlySignalLike;\n /**\n * Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member.\n */\n getSessionToken: () => Promise;\n /**\n * The numeric ID of the device running this session.\n *\n * Use this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.\n *\n * @example 123456\n * @see [Global IDs documentation](/docs/api/usage/gids) for more about GID format and structure\n * @see [device.getDeviceId()](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) for physical device identifier (UUID format)\n */\n deviceId: number;\n}" } }, "SessionApi": { @@ -3420,6 +3446,14 @@ "value": "1", "description": "" }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true + }, { "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", @@ -3697,6 +3731,14 @@ "value": "1", "description": "" }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true + }, { "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", @@ -3990,6 +4032,14 @@ "value": "1", "description": "" }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true + }, { "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", @@ -4630,196 +4680,587 @@ "value": "export interface ShopifyEventMap {\n [POS_EVENT_NAMES.TRANSACTION_COMPLETE]: TransactionCompleteEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;\n}" } }, - "CustomerApi": { - "src/surfaces/point-of-sale/api/customer-api/customer-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/customer-api/customer-api.ts", - "name": "CustomerApi", - "description": "The `CustomerApi` object provides access to customer data in customer-specific extension contexts. Access this property through `shopify.customer` to retrieve information about the customer currently being viewed or interacted with in the POS interface.", + "ShopifyInterceptMap": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ShopifyInterceptMap", + "description": "Maps POS interceptable workflow names to their corresponding `Event` types.\n\nUsed as the generic type parameter for `shopify.intercept`.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/customer-api/customer-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "customer", - "value": "CustomerApiContent", - "description": "The `CustomerApi` object provides customer information for the active context." + "name": "beforecheckout", + "value": "BeforeCheckoutEvent", + "description": "Dispatched when staff attempts to leave the active cart for checkout." } ], - "value": "export interface CustomerApi {\n customer: CustomerApiContent;\n}" + "value": "export interface ShopifyInterceptMap {\n [POS_INTERCEPT_NAMES.BEFORE_CHECKOUT]: BeforeCheckoutEvent;\n}" } }, - "CustomerApiContent": { - "src/surfaces/point-of-sale/api/customer-api/customer-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/customer-api/customer-api.ts", - "name": "CustomerApiContent", - "description": "The `CustomerApi` object provides customer information for the active context.", + "BeforeCheckoutEvent": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "BeforeCheckoutEvent", + "description": "Dispatched when staff attempts to leave the active cart for checkout.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/customer-api/customer-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems." - } - ], - "value": "export interface CustomerApiContent {\n /**\n * The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems.\n */\n id: number;\n}" - } - }, - "OrderApi": { - "src/surfaces/point-of-sale/api/order-api/order-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", - "name": "OrderApi", - "description": "The `OrderApi` object provides access to order data in order-specific extension contexts. Access this property through `shopify.order` to retrieve information about the order currently being viewed or interacted with in the POS interface.", - "isPublicDocs": true, - "members": [ + "name": "AT_TARGET", + "value": "2", + "description": "" + }, { - "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "order", - "value": "OrderApiContent", - "description": "The `OrderApi` object provides access to order data. Access this property through `shopify.order` to interact with the current order context." - } - ], - "value": "export interface OrderApi {\n order: OrderApiContent;\n}" - } - }, - "OrderApiContent": { - "src/surfaces/point-of-sale/api/order-api/order-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", - "name": "OrderApiContent", - "description": "The `OrderApi` object provides access to order data. Access this property through `shopify.order` to interact with the current order context.", - "isPublicDocs": true, - "members": [ + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + }, { - "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "customerId", - "value": "number", - "description": "The unique identifier of the customer associated with the order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.", - "isOptional": true + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The unique identifier for the order. Use for order lookups, implementing order-specific functionality, and integrating with external systems." + "name": "cancelable", + "value": "boolean", + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The name of the order as configured by the merchant. Use for order identification, displays, and customer-facing interfaces." - } - ], - "value": "export interface OrderApiContent {\n /**\n * The unique identifier for the order. Use for order lookups, implementing order-specific functionality, and integrating with external systems.\n */\n id: number;\n\n /**\n * The name of the order as configured by the merchant. Use for order identification, displays, and customer-facing interfaces.\n */\n name: string;\n\n /**\n * The unique identifier of the customer associated with the order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.\n */\n customerId?: number;\n}" - } - }, - "ProductApi": { - "src/surfaces/point-of-sale/api/product-api/product-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", - "name": "ProductApi", - "description": "The `ProductApi` object provides access to product and variant data in product-specific extension contexts. Access this property through `shopify.product` to retrieve information about the product or variant currently being viewed or interacted with in the POS interface.", - "isPublicDocs": true, - "members": [ + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" + }, { - "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "product", - "value": "ProductApiContent", - "description": "The `ProductApi` object provides product and variant details for the active context." - } - ], - "value": "export interface ProductApi {\n product: ProductApiContent;\n}" - } - }, - "ProductApiContent": { - "src/surfaces/point-of-sale/api/product-api/product-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", - "name": "ProductApiContent", - "description": "The `ProductApi` object provides product and variant details for the active context.", - "isPublicDocs": true, - "members": [ + "name": "CAPTURING_PHASE", + "value": "1", + "description": "" + }, { - "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The unique identifier for the product. Use for product lookups, implementing product-specific functionality, and integrating with external systems." + "name": "cart", + "value": "Cart", + "description": "The POS cart at the point checkout was requested." }, { - "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "variantId", - "value": "number", - "description": "The unique identifier for the product variant. Use for variant-specific operations, cart additions, and inventory management." - } - ], - "value": "export interface ProductApiContent {\n /**\n * The unique identifier for the product. Use for product lookups, implementing product-specific functionality, and integrating with external systems.\n */\n id: number;\n /**\n * The unique identifier for the product variant. Use for variant-specific operations, cart additions, and inventory management.\n */\n variantId: number;\n}" - } - }, - "DraftOrderApi": { - "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", - "name": "DraftOrderApi", - "description": "The `DraftOrderApi` object provides access to draft order data in draft order-specific extension contexts. Access this property through `shopify.draftOrder` to retrieve information about the draft order currently being viewed or interacted with in the POS interface.", - "isPublicDocs": true, - "members": [ + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" + }, { - "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "draftOrder", - "value": "DraftOrderApiContent", - "description": "The `DraftOrderApi` object provides draft order details for the active context." - } - ], - "value": "export interface DraftOrderApi {\n draftOrder: DraftOrderApiContent;\n}" - } - }, - "DraftOrderApiContent": { - "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", - "name": "DraftOrderApiContent", - "description": "The `DraftOrderApi` object provides draft order details for the active context.", - "isPublicDocs": true, - "members": [ + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + }, { - "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "customerId", - "value": "number", - "description": "The unique identifier of the customer associated with the draft order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.", - "isOptional": true + "name": "defaultPrevented", + "value": "boolean", + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "id", + "name": "eventPhase", "value": "number", - "description": "The unique identifier for the draft order. Use for draft order lookups, implementing order-specific functionality, and integrating with external systems." + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", - "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The name of the draft order as configured by the merchant. Use for draft order identification, displays, and customer-facing interfaces." - } - ], - "value": "export interface DraftOrderApiContent {\n /**\n * The unique identifier for the draft order. Use for draft order lookups, implementing order-specific functionality, and integrating with external systems.\n */\n id: number;\n\n /**\n * The name of the draft order as configured by the merchant. Use for draft order identification, displays, and customer-facing interfaces.\n */\n name: string;\n\n /**\n * The unique identifier of the customer associated with the draft order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.\n */\n customerId?: number;\n}" - } - }, - "LineItemRefund": { - "src/surfaces/point-of-sale/types/order.ts": { - "filePath": "src/surfaces/point-of-sale/types/order.ts", - "name": "LineItemRefund", - "description": "Represents a refund applied to a line item, including when it was created and the quantity refunded.", - "isPublicDocs": true, - "members": [ + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + }, { - "filePath": "src/surfaces/point-of-sale/types/order.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "isTrusted", + "value": "boolean", + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "NONE", + "value": "0", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "'beforecheckout'", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + } + ], + "value": "export interface BeforeCheckoutEvent extends Event {\n readonly type: typeof POS_INTERCEPT_NAMES.BEFORE_CHECKOUT;\n /** The POS cart at the point checkout was requested. */\n readonly cart: Cart;\n}" + } + }, + "ShopifyInterceptor": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ShopifyInterceptor", + "description": "", + "isPublicDocs": true, + "params": [ + { + "name": "event", + "description": "", + "value": "TEvent", + "filePath": "src/surfaces/point-of-sale/events.ts" + } + ], + "returns": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "description": "", + "name": "InterceptResult", + "value": "InterceptResult" + }, + "value": "(\n event: TEvent,\n) => InterceptResult" + } + }, + "InterceptResult": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "InterceptResult", + "description": "The result an interceptor returns. An empty `operations` list allows the workflow; an `ERROR` validation blocks it.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "operations", + "value": "Operation[]", + "description": "" + } + ], + "value": "export interface InterceptResult {\n operations: Operation[];\n}" + } + }, + "Operation": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "Operation", + "description": "A single host operation produced by an interceptor.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "validationAdd", + "value": "ValidationAdd", + "description": "Adds a validation to the workflow being intercepted.", + "isOptional": true + } + ], + "value": "export interface Operation {\n validationAdd?: ValidationAdd;\n}" + } + }, + "ValidationAdd": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ValidationAdd", + "description": "Adds a validation to the workflow being intercepted.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "handle", + "value": "string", + "description": "Stable identifier for this validation." + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "level", + "value": "ValidationLevel", + "description": "`ERROR` blocks the workflow. `WARNING` and `INFO` do not." + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "message", + "value": "string", + "description": "Host-facing message for support, observability, or staff UX." + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "metafields", + "value": "Metafield[]", + "description": "Optional structured data for custom UX or order metadata.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "target", + "value": "string", + "description": "JSON-path locator for where the validation applies. Defaults to `$.cart`.", + "isOptional": true + } + ], + "value": "export interface ValidationAdd {\n /** `ERROR` blocks the workflow. `WARNING` and `INFO` do not. */\n level: ValidationLevel;\n\n /** Stable identifier for this validation. */\n handle: string;\n\n /** Host-facing message for support, observability, or staff UX. */\n message: string;\n\n /** JSON-path locator for where the validation applies. Defaults to `$.cart`. */\n target?: string;\n\n /** Optional structured data for custom UX or order metadata. */\n metafields?: Metafield[];\n}" + } + }, + "ValidationLevel": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ValidationLevel", + "value": "'INFO' | 'WARNING' | 'ERROR'", + "description": "", + "isPublicDocs": true + } + }, + "Metafield": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "Metafield", + "description": "Metafield input attached to a validation.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "key", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "namespace", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "value", + "value": "string", + "description": "" + } + ], + "value": "export interface Metafield {\n namespace: string;\n key: string;\n value: string;\n type: string;\n}" + } + }, + "CustomerApi": { + "src/surfaces/point-of-sale/api/customer-api/customer-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/customer-api/customer-api.ts", + "name": "CustomerApi", + "description": "The `CustomerApi` object provides access to customer data in customer-specific extension contexts. Access this property through `shopify.customer` to retrieve information about the customer currently being viewed or interacted with in the POS interface.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/customer-api/customer-api.ts", + "syntaxKind": "PropertySignature", + "name": "customer", + "value": "CustomerApiContent", + "description": "The `CustomerApi` object provides customer information for the active context." + } + ], + "value": "export interface CustomerApi {\n customer: CustomerApiContent;\n}" + } + }, + "CustomerApiContent": { + "src/surfaces/point-of-sale/api/customer-api/customer-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/customer-api/customer-api.ts", + "name": "CustomerApiContent", + "description": "The `CustomerApi` object provides customer information for the active context.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/customer-api/customer-api.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "number", + "description": "The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems." + } + ], + "value": "export interface CustomerApiContent {\n /**\n * The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems.\n */\n id: number;\n}" + } + }, + "InterceptCapability": { + "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "InterceptCapability", + "value": "`${Extract<\n keyof ShopifyInterceptMap,\n string\n>}.${'error' | 'warning' | 'info'}`", + "description": "A granted validation severity for a POS intercept event. Event names are derived from `ShopifyInterceptMap`; `warning` corresponds to the `WARNING` validation level.", + "isPublicDocs": true + } + }, + "CapabilitiesApi": { + "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "name": "CapabilitiesApi", + "description": "Provides the validation severities granted for POS intercept events.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "syntaxKind": "PropertySignature", + "name": "capabilities", + "value": "ReadonlySignalLike", + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", + "title": "Example" + } + ] + } + ] + } + ], + "value": "export interface CapabilitiesApi {\n /**\n * A read-only list of granted intercept capabilities. The signal is available\n * to every POS target, but only the target that registers an interceptor\n * declares its event in `shopify.extension.toml`.\n *\n * Grants are cumulative. An `.error` grant includes `.warning` and `.info`,\n * and a `.warning` grant includes `.info`.\n *\n * @example\n * ```ts\n * if (shopify.capabilities.value.includes('beforecheckout.error')) {\n * // This interceptor can return ERROR, WARNING, or INFO validations.\n * }\n * ```\n */\n capabilities: ReadonlySignalLike;\n}" + } + }, + "OrderApi": { + "src/surfaces/point-of-sale/api/order-api/order-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "name": "OrderApi", + "description": "The `OrderApi` object provides access to order data in order-specific extension contexts. Access this property through `shopify.order` to retrieve information about the order currently being viewed or interacted with in the POS interface.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "syntaxKind": "PropertySignature", + "name": "order", + "value": "OrderApiContent", + "description": "The `OrderApi` object provides access to order data. Access this property through `shopify.order` to interact with the current order context." + } + ], + "value": "export interface OrderApi {\n order: OrderApiContent;\n}" + } + }, + "OrderApiContent": { + "src/surfaces/point-of-sale/api/order-api/order-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "name": "OrderApiContent", + "description": "The `OrderApi` object provides access to order data. Access this property through `shopify.order` to interact with the current order context.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "syntaxKind": "PropertySignature", + "name": "customerId", + "value": "number", + "description": "The unique identifier of the customer associated with the order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "number", + "description": "The unique identifier for the order. Use for order lookups, implementing order-specific functionality, and integrating with external systems." + }, + { + "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", + "syntaxKind": "PropertySignature", + "name": "name", + "value": "string", + "description": "The name of the order as configured by the merchant. Use for order identification, displays, and customer-facing interfaces." + } + ], + "value": "export interface OrderApiContent {\n /**\n * The unique identifier for the order. Use for order lookups, implementing order-specific functionality, and integrating with external systems.\n */\n id: number;\n\n /**\n * The name of the order as configured by the merchant. Use for order identification, displays, and customer-facing interfaces.\n */\n name: string;\n\n /**\n * The unique identifier of the customer associated with the order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.\n */\n customerId?: number;\n}" + } + }, + "ProductApi": { + "src/surfaces/point-of-sale/api/product-api/product-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", + "name": "ProductApi", + "description": "The `ProductApi` object provides access to product and variant data in product-specific extension contexts. Access this property through `shopify.product` to retrieve information about the product or variant currently being viewed or interacted with in the POS interface.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", + "syntaxKind": "PropertySignature", + "name": "product", + "value": "ProductApiContent", + "description": "The `ProductApi` object provides product and variant details for the active context." + } + ], + "value": "export interface ProductApi {\n product: ProductApiContent;\n}" + } + }, + "ProductApiContent": { + "src/surfaces/point-of-sale/api/product-api/product-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", + "name": "ProductApiContent", + "description": "The `ProductApi` object provides product and variant details for the active context.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "number", + "description": "The unique identifier for the product. Use for product lookups, implementing product-specific functionality, and integrating with external systems." + }, + { + "filePath": "src/surfaces/point-of-sale/api/product-api/product-api.ts", + "syntaxKind": "PropertySignature", + "name": "variantId", + "value": "number", + "description": "The unique identifier for the product variant. Use for variant-specific operations, cart additions, and inventory management." + } + ], + "value": "export interface ProductApiContent {\n /**\n * The unique identifier for the product. Use for product lookups, implementing product-specific functionality, and integrating with external systems.\n */\n id: number;\n /**\n * The unique identifier for the product variant. Use for variant-specific operations, cart additions, and inventory management.\n */\n variantId: number;\n}" + } + }, + "DraftOrderApi": { + "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "name": "DraftOrderApi", + "description": "The `DraftOrderApi` object provides access to draft order data in draft order-specific extension contexts. Access this property through `shopify.draftOrder` to retrieve information about the draft order currently being viewed or interacted with in the POS interface.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "syntaxKind": "PropertySignature", + "name": "draftOrder", + "value": "DraftOrderApiContent", + "description": "The `DraftOrderApi` object provides draft order details for the active context." + } + ], + "value": "export interface DraftOrderApi {\n draftOrder: DraftOrderApiContent;\n}" + } + }, + "DraftOrderApiContent": { + "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "name": "DraftOrderApiContent", + "description": "The `DraftOrderApi` object provides draft order details for the active context.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "syntaxKind": "PropertySignature", + "name": "customerId", + "value": "number", + "description": "The unique identifier of the customer associated with the draft order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "number", + "description": "The unique identifier for the draft order. Use for draft order lookups, implementing order-specific functionality, and integrating with external systems." + }, + { + "filePath": "src/surfaces/point-of-sale/api/draft-order-api/draft-order-api.ts", + "syntaxKind": "PropertySignature", + "name": "name", + "value": "string", + "description": "The name of the draft order as configured by the merchant. Use for draft order identification, displays, and customer-facing interfaces." + } + ], + "value": "export interface DraftOrderApiContent {\n /**\n * The unique identifier for the draft order. Use for draft order lookups, implementing order-specific functionality, and integrating with external systems.\n */\n id: number;\n\n /**\n * The name of the draft order as configured by the merchant. Use for draft order identification, displays, and customer-facing interfaces.\n */\n name: string;\n\n /**\n * The unique identifier of the customer associated with the draft order. Returns `undefined` if no customer is associated. Use for customer-specific functionality and personalized experiences.\n */\n customerId?: number;\n}" + } + }, + "LineItemRefund": { + "src/surfaces/point-of-sale/types/order.ts": { + "filePath": "src/surfaces/point-of-sale/types/order.ts", + "name": "LineItemRefund", + "description": "Represents a refund applied to a line item, including when it was created and the quantity refunded.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/types/order.ts", "syntaxKind": "PropertySignature", "name": "createdAt", "value": "string", @@ -5074,7 +5515,7 @@ "filePath": "src/surfaces/point-of-sale/components.ts", "syntaxKind": "TypeAliasDeclaration", "name": "IconType", - "value": "'camera' | 'external' | 'adjust' | 'affiliate' | 'airplane' | 'alert-bubble' | 'alert-circle' | 'alert-diamond' | 'alert-location' | 'alert-octagon' | 'alert-octagon-filled' | 'alert-triangle' | 'alert-triangle-filled' | 'align-horizontal-centers' | 'app-extension' | 'apps' | 'archive' | 'arrow-down' | 'arrow-down-circle' | 'arrow-down-right' | 'arrow-left' | 'arrow-left-circle' | 'arrow-right' | 'arrow-right-circle' | 'arrow-up' | 'arrow-up-circle' | 'arrow-up-right' | 'arrows-in-horizontal' | 'arrows-out-horizontal' | 'asterisk' | 'attachment' | 'automation' | 'backspace' | 'bag' | 'bank' | 'barcode' | 'battery-low' | 'bill' | 'blank' | 'blog' | 'bolt' | 'bolt-filled' | 'book' | 'book-open' | 'bug' | 'bullet' | 'business-entity' | 'button' | 'button-press' | 'calculator' | 'calendar' | 'calendar-check' | 'calendar-compare' | 'calendar-list' | 'calendar-time' | 'camera-flip' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'cart' | 'cart-abandoned' | 'cart-discount' | 'cart-down' | 'cart-filled' | 'cart-sale' | 'cart-send' | 'cart-up' | 'cash-dollar' | 'cash-euro' | 'cash-pound' | 'cash-rupee' | 'cash-yen' | 'catalog-product' | 'categories' | 'channels' | 'chart-cohort' | 'chart-donut' | 'chart-funnel' | 'chart-histogram-first' | 'chart-histogram-first-last' | 'chart-histogram-flat' | 'chart-histogram-full' | 'chart-histogram-growth' | 'chart-histogram-last' | 'chart-histogram-second-last' | 'chart-horizontal' | 'chart-line' | 'chart-popular' | 'chart-stacked' | 'chart-vertical' | 'chat' | 'chat-new' | 'chat-referral' | 'check' | 'check-circle' | 'check-circle-filled' | 'checkbox' | 'chevron-down' | 'chevron-down-circle' | 'chevron-left' | 'chevron-left-circle' | 'chevron-right' | 'chevron-right-circle' | 'chevron-up' | 'chevron-up-circle' | 'circle' | 'circle-dashed' | 'clipboard' | 'clipboard-check' | 'clipboard-checklist' | 'clock' | 'clock-list' | 'clock-revert' | 'code' | 'code-add' | 'collection' | 'collection-featured' | 'collection-list' | 'collection-reference' | 'color' | 'color-none' | 'compass' | 'complete' | 'compose' | 'confetti' | 'connect' | 'content' | 'contract' | 'corner-pill' | 'corner-round' | 'corner-square' | 'credit-card' | 'credit-card-cancel' | 'credit-card-percent' | 'credit-card-reader' | 'credit-card-reader-chip' | 'credit-card-reader-tap' | 'credit-card-secure' | 'credit-card-tap-chip' | 'crop' | 'currency-convert' | 'cursor' | 'cursor-banner' | 'cursor-option' | 'data-presentation' | 'data-table' | 'database' | 'database-add' | 'database-connect' | 'delete' | 'delivered' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'dns-settings' | 'dock-floating' | 'dock-side' | 'domain' | 'domain-landing-page' | 'domain-new' | 'domain-redirect' | 'download' | 'drag-drop' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'email-follow-up' | 'email-newsletter' | 'empty' | 'enabled' | 'enter' | 'envelope' | 'envelope-soft-pack' | 'eraser' | 'exchange' | 'exit' | 'export' | 'eye-check-mark' | 'eye-dropper' | 'eye-dropper-list' | 'eye-first' | 'eyeglasses' | 'fav' | 'favicon' | 'file' | 'file-list' | 'filter' | 'filter-active' | 'flag' | 'flip-horizontal' | 'flip-vertical' | 'flower' | 'folder' | 'folder-add' | 'folder-down' | 'folder-remove' | 'folder-up' | 'food' | 'foreground' | 'forklift' | 'forms' | 'games' | 'gauge' | 'geolocation' | 'gift' | 'gift-card' | 'git-branch' | 'git-commit' | 'git-repository' | 'globe' | 'globe-asia' | 'globe-europe' | 'globe-lines' | 'globe-list' | 'graduation-hat' | 'grid' | 'hashtag' | 'hashtag-decimal' | 'hashtag-list' | 'heart' | 'hide' | 'hide-filled' | 'home' | 'home-filled' | 'icons' | 'identity-card' | 'image' | 'image-add' | 'image-alt' | 'image-explore' | 'image-magic' | 'image-none' | 'image-with-text-overlay' | 'images' | 'import' | 'in-progress' | 'incentive' | 'incoming' | 'incomplete' | 'info' | 'info-filled' | 'inheritance' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'inventory-updated' | 'iq' | 'key' | 'keyboard' | 'keyboard-filled' | 'keyboard-hide' | 'keypad' | 'label-printer' | 'language' | 'language-translate' | 'layout-block' | 'layout-buy-button' | 'layout-buy-button-horizontal' | 'layout-buy-button-vertical' | 'layout-column-1' | 'layout-columns-2' | 'layout-columns-3' | 'layout-footer' | 'layout-header' | 'layout-logo-block' | 'layout-popup' | 'layout-rows-2' | 'layout-section' | 'layout-sidebar-left' | 'layout-sidebar-right' | 'lightbulb' | 'link' | 'link-list' | 'list-bulleted' | 'list-bulleted-filled' | 'list-numbered' | 'live' | 'live-critical' | 'live-none' | 'location' | 'location-none' | 'lock' | 'map' | 'markets' | 'markets-euro' | 'markets-rupee' | 'markets-yen' | 'maximize' | 'measurement-size' | 'measurement-size-list' | 'measurement-volume' | 'measurement-volume-list' | 'measurement-weight' | 'measurement-weight-list' | 'media-receiver' | 'megaphone' | 'mention' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'menu-vertical' | 'merge' | 'metafields' | 'metaobject' | 'metaobject-list' | 'metaobject-reference' | 'microphone' | 'microphone-muted' | 'minimize' | 'minus' | 'minus-circle' | 'mobile' | 'money' | 'money-none' | 'money-split' | 'moon' | 'nature' | 'note' | 'note-add' | 'notification' | 'number-one' | 'order' | 'order-batches' | 'order-draft' | 'order-filled' | 'order-first' | 'order-fulfilled' | 'order-repeat' | 'order-unfulfilled' | 'orders-status' | 'organization' | 'outdent' | 'outgoing' | 'package' | 'package-cancel' | 'package-fulfilled' | 'package-on-hold' | 'package-reassign' | 'package-returned' | 'page' | 'page-add' | 'page-attachment' | 'page-clock' | 'page-down' | 'page-heart' | 'page-list' | 'page-reference' | 'page-remove' | 'page-report' | 'page-up' | 'pagination-end' | 'pagination-start' | 'paint-brush-flat' | 'paint-brush-round' | 'paper-check' | 'partially-complete' | 'passkey' | 'paste' | 'pause-circle' | 'payment' | 'payment-capture' | 'payout' | 'payout-dollar' | 'payout-euro' | 'payout-pound' | 'payout-rupee' | 'payout-yen' | 'person' | 'person-add' | 'person-exit' | 'person-filled' | 'person-list' | 'person-lock' | 'person-remove' | 'person-segment' | 'personalized-text' | 'phablet' | 'phone' | 'phone-down' | 'phone-down-filled' | 'phone-in' | 'phone-out' | 'pin' | 'pin-remove' | 'plan' | 'play' | 'play-circle' | 'plus' | 'plus-circle' | 'plus-circle-down' | 'plus-circle-filled' | 'plus-circle-up' | 'point-of-sale' | 'point-of-sale-register' | 'price-list' | 'print' | 'product' | 'product-add' | 'product-cost' | 'product-filled' | 'product-list' | 'product-reference' | 'product-remove' | 'product-return' | 'product-unavailable' | 'profile' | 'profile-filled' | 'question-circle' | 'question-circle-filled' | 'radio-control' | 'receipt' | 'receipt-dollar' | 'receipt-euro' | 'receipt-folded' | 'receipt-paid' | 'receipt-pound' | 'receipt-refund' | 'receipt-rupee' | 'receipt-yen' | 'receivables' | 'redo' | 'referral-code' | 'refresh' | 'remove-background' | 'reorder' | 'replace' | 'replay' | 'reset' | 'return' | 'reward' | 'rocket' | 'rotate-left' | 'rotate-right' | 'sandbox' | 'save' | 'savings' | 'scan-qr-code' | 'search' | 'search-add' | 'search-list' | 'search-recent' | 'search-resource' | 'select' | 'send' | 'settings' | 'share' | 'shield-check-mark' | 'shield-none' | 'shield-pending' | 'shield-person' | 'shipping-label' | 'shipping-label-cancel' | 'shopcodes' | 'slideshow' | 'smiley-happy' | 'smiley-joy' | 'smiley-neutral' | 'smiley-sad' | 'social-ad' | 'social-post' | 'sort' | 'sort-ascending' | 'sort-descending' | 'sound' | 'split' | 'sports' | 'star' | 'star-circle' | 'star-filled' | 'star-half' | 'star-list' | 'status' | 'status-active' | 'stop-circle' | 'store' | 'store-import' | 'store-managed' | 'store-online' | 'sun' | 'table' | 'table-masonry' | 'tablet' | 'target' | 'tax' | 'team' | 'text' | 'text-align-center' | 'text-align-left' | 'text-align-right' | 'text-block' | 'text-bold' | 'text-color' | 'text-font' | 'text-font-list' | 'text-grammar' | 'text-in-columns' | 'text-in-rows' | 'text-indent' | 'text-indent-remove' | 'text-italic' | 'text-quote' | 'text-title' | 'text-underline' | 'text-with-image' | 'theme' | 'theme-edit' | 'theme-store' | 'theme-template' | 'three-d-environment' | 'thumbs-down' | 'thumbs-up' | 'tip-jar' | 'toggle-off' | 'toggle-on' | 'transaction' | 'transaction-fee-add' | 'transaction-fee-dollar' | 'transaction-fee-euro' | 'transaction-fee-pound' | 'transaction-fee-rupee' | 'transaction-fee-yen' | 'transfer' | 'transfer-in' | 'transfer-internal' | 'transfer-out' | 'truck' | 'undo' | 'unknown-device' | 'unlock' | 'upload' | 'variant' | 'variant-list' | 'video' | 'video-list' | 'view' | 'viewport-narrow' | 'viewport-short' | 'viewport-tall' | 'viewport-wide' | 'wallet' | 'wand' | 'watch' | 'wifi' | 'work' | 'work-list' | 'wrench' | 'x' | 'x-circle' | 'x-circle-filled'", + "value": "'camera' | 'external' | 'info' | 'adjust' | 'affiliate' | 'airplane' | 'alert-bubble' | 'alert-circle' | 'alert-diamond' | 'alert-location' | 'alert-octagon' | 'alert-octagon-filled' | 'alert-triangle' | 'alert-triangle-filled' | 'align-horizontal-centers' | 'app-extension' | 'apps' | 'archive' | 'arrow-down' | 'arrow-down-circle' | 'arrow-down-right' | 'arrow-left' | 'arrow-left-circle' | 'arrow-right' | 'arrow-right-circle' | 'arrow-up' | 'arrow-up-circle' | 'arrow-up-right' | 'arrows-in-horizontal' | 'arrows-out-horizontal' | 'asterisk' | 'attachment' | 'automation' | 'backspace' | 'bag' | 'bank' | 'barcode' | 'battery-low' | 'bill' | 'blank' | 'blog' | 'bolt' | 'bolt-filled' | 'book' | 'book-open' | 'bug' | 'bullet' | 'business-entity' | 'button' | 'button-press' | 'calculator' | 'calendar' | 'calendar-check' | 'calendar-compare' | 'calendar-list' | 'calendar-time' | 'camera-flip' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'cart' | 'cart-abandoned' | 'cart-discount' | 'cart-down' | 'cart-filled' | 'cart-sale' | 'cart-send' | 'cart-up' | 'cash-dollar' | 'cash-euro' | 'cash-pound' | 'cash-rupee' | 'cash-yen' | 'catalog-product' | 'categories' | 'channels' | 'chart-cohort' | 'chart-donut' | 'chart-funnel' | 'chart-histogram-first' | 'chart-histogram-first-last' | 'chart-histogram-flat' | 'chart-histogram-full' | 'chart-histogram-growth' | 'chart-histogram-last' | 'chart-histogram-second-last' | 'chart-horizontal' | 'chart-line' | 'chart-popular' | 'chart-stacked' | 'chart-vertical' | 'chat' | 'chat-new' | 'chat-referral' | 'check' | 'check-circle' | 'check-circle-filled' | 'checkbox' | 'chevron-down' | 'chevron-down-circle' | 'chevron-left' | 'chevron-left-circle' | 'chevron-right' | 'chevron-right-circle' | 'chevron-up' | 'chevron-up-circle' | 'circle' | 'circle-dashed' | 'clipboard' | 'clipboard-check' | 'clipboard-checklist' | 'clock' | 'clock-list' | 'clock-revert' | 'code' | 'code-add' | 'collection' | 'collection-featured' | 'collection-list' | 'collection-reference' | 'color' | 'color-none' | 'compass' | 'complete' | 'compose' | 'confetti' | 'connect' | 'content' | 'contract' | 'corner-pill' | 'corner-round' | 'corner-square' | 'credit-card' | 'credit-card-cancel' | 'credit-card-percent' | 'credit-card-reader' | 'credit-card-reader-chip' | 'credit-card-reader-tap' | 'credit-card-secure' | 'credit-card-tap-chip' | 'crop' | 'currency-convert' | 'cursor' | 'cursor-banner' | 'cursor-option' | 'data-presentation' | 'data-table' | 'database' | 'database-add' | 'database-connect' | 'delete' | 'delivered' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'dns-settings' | 'dock-floating' | 'dock-side' | 'domain' | 'domain-landing-page' | 'domain-new' | 'domain-redirect' | 'download' | 'drag-drop' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'email-follow-up' | 'email-newsletter' | 'empty' | 'enabled' | 'enter' | 'envelope' | 'envelope-soft-pack' | 'eraser' | 'exchange' | 'exit' | 'export' | 'eye-check-mark' | 'eye-dropper' | 'eye-dropper-list' | 'eye-first' | 'eyeglasses' | 'fav' | 'favicon' | 'file' | 'file-list' | 'filter' | 'filter-active' | 'flag' | 'flip-horizontal' | 'flip-vertical' | 'flower' | 'folder' | 'folder-add' | 'folder-down' | 'folder-remove' | 'folder-up' | 'food' | 'foreground' | 'forklift' | 'forms' | 'games' | 'gauge' | 'geolocation' | 'gift' | 'gift-card' | 'git-branch' | 'git-commit' | 'git-repository' | 'globe' | 'globe-asia' | 'globe-europe' | 'globe-lines' | 'globe-list' | 'graduation-hat' | 'grid' | 'hashtag' | 'hashtag-decimal' | 'hashtag-list' | 'heart' | 'hide' | 'hide-filled' | 'home' | 'home-filled' | 'icons' | 'identity-card' | 'image' | 'image-add' | 'image-alt' | 'image-explore' | 'image-magic' | 'image-none' | 'image-with-text-overlay' | 'images' | 'import' | 'in-progress' | 'incentive' | 'incoming' | 'incomplete' | 'info-filled' | 'inheritance' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'inventory-updated' | 'iq' | 'key' | 'keyboard' | 'keyboard-filled' | 'keyboard-hide' | 'keypad' | 'label-printer' | 'language' | 'language-translate' | 'layout-block' | 'layout-buy-button' | 'layout-buy-button-horizontal' | 'layout-buy-button-vertical' | 'layout-column-1' | 'layout-columns-2' | 'layout-columns-3' | 'layout-footer' | 'layout-header' | 'layout-logo-block' | 'layout-popup' | 'layout-rows-2' | 'layout-section' | 'layout-sidebar-left' | 'layout-sidebar-right' | 'lightbulb' | 'link' | 'link-list' | 'list-bulleted' | 'list-bulleted-filled' | 'list-numbered' | 'live' | 'live-critical' | 'live-none' | 'location' | 'location-none' | 'lock' | 'map' | 'markets' | 'markets-euro' | 'markets-rupee' | 'markets-yen' | 'maximize' | 'measurement-size' | 'measurement-size-list' | 'measurement-volume' | 'measurement-volume-list' | 'measurement-weight' | 'measurement-weight-list' | 'media-receiver' | 'megaphone' | 'mention' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'menu-vertical' | 'merge' | 'metafields' | 'metaobject' | 'metaobject-list' | 'metaobject-reference' | 'microphone' | 'microphone-muted' | 'minimize' | 'minus' | 'minus-circle' | 'mobile' | 'money' | 'money-none' | 'money-split' | 'moon' | 'nature' | 'note' | 'note-add' | 'notification' | 'number-one' | 'order' | 'order-batches' | 'order-draft' | 'order-filled' | 'order-first' | 'order-fulfilled' | 'order-repeat' | 'order-unfulfilled' | 'orders-status' | 'organization' | 'outdent' | 'outgoing' | 'package' | 'package-cancel' | 'package-fulfilled' | 'package-on-hold' | 'package-reassign' | 'package-returned' | 'page' | 'page-add' | 'page-attachment' | 'page-clock' | 'page-down' | 'page-heart' | 'page-list' | 'page-reference' | 'page-remove' | 'page-report' | 'page-up' | 'pagination-end' | 'pagination-start' | 'paint-brush-flat' | 'paint-brush-round' | 'paper-check' | 'partially-complete' | 'passkey' | 'paste' | 'pause-circle' | 'payment' | 'payment-capture' | 'payout' | 'payout-dollar' | 'payout-euro' | 'payout-pound' | 'payout-rupee' | 'payout-yen' | 'person' | 'person-add' | 'person-exit' | 'person-filled' | 'person-list' | 'person-lock' | 'person-remove' | 'person-segment' | 'personalized-text' | 'phablet' | 'phone' | 'phone-down' | 'phone-down-filled' | 'phone-in' | 'phone-out' | 'pin' | 'pin-remove' | 'plan' | 'play' | 'play-circle' | 'plus' | 'plus-circle' | 'plus-circle-down' | 'plus-circle-filled' | 'plus-circle-up' | 'point-of-sale' | 'point-of-sale-register' | 'price-list' | 'print' | 'product' | 'product-add' | 'product-cost' | 'product-filled' | 'product-list' | 'product-reference' | 'product-remove' | 'product-return' | 'product-unavailable' | 'profile' | 'profile-filled' | 'question-circle' | 'question-circle-filled' | 'radio-control' | 'receipt' | 'receipt-dollar' | 'receipt-euro' | 'receipt-folded' | 'receipt-paid' | 'receipt-pound' | 'receipt-refund' | 'receipt-rupee' | 'receipt-yen' | 'receivables' | 'redo' | 'referral-code' | 'refresh' | 'remove-background' | 'reorder' | 'replace' | 'replay' | 'reset' | 'return' | 'reward' | 'rocket' | 'rotate-left' | 'rotate-right' | 'sandbox' | 'save' | 'savings' | 'scan-qr-code' | 'search' | 'search-add' | 'search-list' | 'search-recent' | 'search-resource' | 'select' | 'send' | 'settings' | 'share' | 'shield-check-mark' | 'shield-none' | 'shield-pending' | 'shield-person' | 'shipping-label' | 'shipping-label-cancel' | 'shopcodes' | 'slideshow' | 'smiley-happy' | 'smiley-joy' | 'smiley-neutral' | 'smiley-sad' | 'social-ad' | 'social-post' | 'sort' | 'sort-ascending' | 'sort-descending' | 'sound' | 'split' | 'sports' | 'star' | 'star-circle' | 'star-filled' | 'star-half' | 'star-list' | 'status' | 'status-active' | 'stop-circle' | 'store' | 'store-import' | 'store-managed' | 'store-online' | 'sun' | 'table' | 'table-masonry' | 'tablet' | 'target' | 'tax' | 'team' | 'text' | 'text-align-center' | 'text-align-left' | 'text-align-right' | 'text-block' | 'text-bold' | 'text-color' | 'text-font' | 'text-font-list' | 'text-grammar' | 'text-in-columns' | 'text-in-rows' | 'text-indent' | 'text-indent-remove' | 'text-italic' | 'text-quote' | 'text-title' | 'text-underline' | 'text-with-image' | 'theme' | 'theme-edit' | 'theme-store' | 'theme-template' | 'three-d-environment' | 'thumbs-down' | 'thumbs-up' | 'tip-jar' | 'toggle-off' | 'toggle-on' | 'transaction' | 'transaction-fee-add' | 'transaction-fee-dollar' | 'transaction-fee-euro' | 'transaction-fee-pound' | 'transaction-fee-rupee' | 'transaction-fee-yen' | 'transfer' | 'transfer-in' | 'transfer-internal' | 'transfer-out' | 'truck' | 'undo' | 'unknown-device' | 'unlock' | 'upload' | 'variant' | 'variant-list' | 'video' | 'video-list' | 'view' | 'viewport-narrow' | 'viewport-short' | 'viewport-tall' | 'viewport-wide' | 'wallet' | 'wand' | 'watch' | 'wifi' | 'work' | 'work-list' | 'wrench' | 'x' | 'x-circle' | 'x-circle-filled'", "description": "", "isPublicDocs": true } @@ -6605,7 +7046,7 @@ "filePath": "src/surfaces/point-of-sale/components.ts", "syntaxKind": "TypeAliasDeclaration", "name": "SupportedIconNames", - "value": "'external' | 'alert-circle' | 'apps' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'backspace' | 'barcode' | 'battery-low' | 'bolt-filled' | 'bullet' | 'camera-flip' | 'caret-down' | 'caret-up' | 'cart' | 'cart-down' | 'cart-filled' | 'cart-send' | 'cart-up' | 'chart-line' | 'chart-vertical' | 'check' | 'check-circle-filled' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle' | 'clipboard-checklist' | 'clock' | 'collection' | 'credit-card' | 'credit-card-reader' | 'delete' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'exchange' | 'flag' | 'gift-card' | 'graduation-hat' | 'grid' | 'hide-filled' | 'home' | 'home-filled' | 'image' | 'images' | 'info' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'keyboard-hide' | 'keypad' | 'link' | 'list-bulleted' | 'list-bulleted-filled' | 'live' | 'live-critical' | 'live-none' | 'location' | 'lock' | 'maximize' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'minimize' | 'minus' | 'mobile' | 'money' | 'money-split' | 'note' | 'order' | 'order-draft' | 'order-filled' | 'package' | 'package-cancel' | 'package-reassign' | 'payment' | 'person' | 'person-add' | 'person-filled' | 'phablet' | 'phone-out' | 'play-circle' | 'plus' | 'point-of-sale' | 'point-of-sale-register' | 'print' | 'product' | 'product-filled' | 'profile' | 'question-circle-filled' | 'receipt' | 'refresh' | 'return' | 'scan-qr-code' | 'search' | 'send' | 'settings' | 'shipping-label-cancel' | 'sort' | 'star-circle' | 'star-filled' | 'store' | 'tablet' | 'transaction-fee-add' | 'unlock' | 'variant' | 'view' | 'wallet' | 'x' | 'x-circle'", + "value": "'external' | 'info' | 'alert-circle' | 'apps' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'backspace' | 'barcode' | 'battery-low' | 'bolt-filled' | 'bullet' | 'camera-flip' | 'caret-down' | 'caret-up' | 'cart' | 'cart-down' | 'cart-filled' | 'cart-send' | 'cart-up' | 'chart-line' | 'chart-vertical' | 'check' | 'check-circle-filled' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle' | 'clipboard-checklist' | 'clock' | 'collection' | 'credit-card' | 'credit-card-reader' | 'delete' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'exchange' | 'flag' | 'gift-card' | 'graduation-hat' | 'grid' | 'hide-filled' | 'home' | 'home-filled' | 'image' | 'images' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'keyboard-hide' | 'keypad' | 'link' | 'list-bulleted' | 'list-bulleted-filled' | 'live' | 'live-critical' | 'live-none' | 'location' | 'lock' | 'maximize' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'minimize' | 'minus' | 'mobile' | 'money' | 'money-split' | 'note' | 'order' | 'order-draft' | 'order-filled' | 'package' | 'package-cancel' | 'package-reassign' | 'payment' | 'person' | 'person-add' | 'person-filled' | 'phablet' | 'phone-out' | 'play-circle' | 'plus' | 'point-of-sale' | 'point-of-sale-register' | 'print' | 'product' | 'product-filled' | 'profile' | 'question-circle-filled' | 'receipt' | 'refresh' | 'return' | 'scan-qr-code' | 'search' | 'send' | 'settings' | 'shipping-label-cancel' | 'sort' | 'star-circle' | 'star-filled' | 'store' | 'tablet' | 'transaction-fee-add' | 'unlock' | 'variant' | 'view' | 'wallet' | 'x' | 'x-circle'", "description": "" } }, @@ -8371,6 +8812,14 @@ "value": "Money", "description": "The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: \"USD\"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, + { + "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "syntaxKind": "PropertySignature", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true + }, { "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", "syntaxKind": "PropertySignature", @@ -8462,7 +8911,7 @@ "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps, `'Reprint'` for receipt reprints). This determines the transaction's business logic, receipt format, and inventory impact." } ], - "value": "export interface BaseTransactionComplete {\n /**\n * The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps, `'Reprint'` for receipt reprints). This determines the transaction's business logic, receipt format, and inventory impact.\n */\n transactionType: TransactionType;\n /**\n * The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` for transactions that don't create orders (for example, reprints) or when order creation is pending.\n */\n orderId?: number;\n /**\n * The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.\n */\n customer?: Customer;\n /**\n * An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Returns `undefined` or empty array when no discounts were applied. The sum of discount amounts reduces the final transaction total.\n */\n discounts?: Discount[];\n /**\n * The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify.\n */\n taxTotal: Money;\n /**\n * The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations.\n */\n subtotal: Money;\n /**\n * The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts.\n */\n grandTotal: Money;\n /**\n * An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`.\n */\n paymentMethods: Payment[];\n /**\n * The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: \"USD\"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts.\n */\n balanceDue: Money;\n /**\n * An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Returns `undefined` or empty array for transactions with no shipping charges (for example, in-store purchases, digital products).\n */\n shippingLines?: ShippingLine[];\n /**\n * An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Returns `undefined` or empty array for tax-exempt transactions or when detailed tax breakdown isn't available.\n */\n taxLines?: TaxLine[];\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems.\n */\n executedAt: string;\n /**\n * The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.\n */\n tipAmount?: Money;\n}" + "value": "export interface BaseTransactionComplete {\n /**\n * The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps, `'Reprint'` for receipt reprints). This determines the transaction's business logic, receipt format, and inventory impact.\n */\n transactionType: TransactionType;\n /**\n * The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` for transactions that don't create orders (for example, reprints) or when order creation is pending.\n */\n orderId?: number;\n /**\n * The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.\n */\n customer?: Customer;\n /**\n * An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Returns `undefined` or empty array when no discounts were applied. The sum of discount amounts reduces the final transaction total.\n */\n discounts?: Discount[];\n /**\n * The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify.\n */\n taxTotal: Money;\n /**\n * The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations.\n */\n subtotal: Money;\n /**\n * The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts.\n */\n grandTotal: Money;\n /**\n * An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`.\n */\n paymentMethods: Payment[];\n /**\n * The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: \"USD\"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts.\n */\n balanceDue: Money;\n /**\n * An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Returns `undefined` or empty array for transactions with no shipping charges (for example, in-store purchases, digital products).\n */\n shippingLines?: ShippingLine[];\n /**\n * An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Returns `undefined` or empty array for tax-exempt transactions or when detailed tax breakdown isn't available.\n */\n taxLines?: TaxLine[];\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems.\n */\n executedAt: string;\n /**\n * The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.\n */\n tipAmount?: Money;\n /**\n * The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.\n */\n cashRoundingAdjustment?: Money;\n}" } }, "ReprintReceiptData": { @@ -8479,6 +8928,14 @@ "value": "Money", "description": "The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: \"USD\"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, + { + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "syntaxKind": "PropertySignature", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true + }, { "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", @@ -8634,6 +9091,14 @@ "value": "Money", "description": "The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: \"USD\"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, + { + "filePath": "src/surfaces/point-of-sale/event/data/SaleTransactionData.ts", + "syntaxKind": "PropertySignature", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true + }, { "filePath": "src/surfaces/point-of-sale/event/data/SaleTransactionData.ts", "syntaxKind": "PropertySignature", @@ -8757,6 +9222,14 @@ "value": "Money", "description": "The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: \"USD\"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, + { + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "syntaxKind": "PropertySignature", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true + }, { "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", @@ -8895,6 +9368,14 @@ "value": "Money", "description": "The remaining balance still owed on this transaction as a `Money` object. Typically `{amount: 0, currency: \"USD\"}` for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, + { + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "syntaxKind": "PropertySignature", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true + }, { "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", @@ -9105,57 +9586,203 @@ "value": "export interface Device {\n /**\n * The name of the POS device.\n */\n name: string;\n /**\n * The unique identifier for the POS device.\n */\n deviceId: number;\n /**\n * Whether the device is a tablet form factor.\n */\n isTablet: boolean;\n}" } }, - "TransactionCompleteWithReprintData": { - "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts": { - "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", - "name": "TransactionCompleteWithReprintData", - "description": "The data object provided to receipt targets containing transaction details and reprint information.", + "TransactionCompleteWithReprintData": { + "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts": { + "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "name": "TransactionCompleteWithReprintData", + "description": "The data object provided to receipt targets containing transaction details and reprint information.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "syntaxKind": "PropertySignature", + "name": "connectivity", + "value": "ConnectivityApiContent", + "description": "The current Internet connectivity state of the POS device. Indicates whether the device is connected to or disconnected from the Internet. This state updates in real-time as connectivity changes, allowing extensions to adapt behavior for offline scenarios, show connectivity warnings, or queue operations for when connectivity is restored." + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "syntaxKind": "PropertySignature", + "name": "device", + "value": "Device", + "description": "Comprehensive information about the physical POS device where the extension is currently running. Includes the device name, unique device ID, and form factor information (tablet vs other). This data is static for the session and helps extensions adapt to different device types, log device-specific information, or implement device-based configurations." + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "syntaxKind": "PropertySignature", + "name": "locale", + "value": "string", + "description": "The [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale string for the current POS session (for example, `\"en-US\"`, `\"fr-CA\"`, `\"de-DE\"`). This indicates the merchant's language and regional preferences. Commonly used for internationalization (i18n), locale-specific date/time/number formatting, translating UI text, and providing localized content. The locale remains constant for the session and reflects the language selected in POS settings." + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "syntaxKind": "PropertySignature", + "name": "session", + "value": "Session", + "description": "Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members." + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "syntaxKind": "PropertySignature", + "name": "storage", + "value": "Storage>", + "description": "Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions." + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "syntaxKind": "PropertySignature", + "name": "transaction", + "value": "| SaleTransactionData\n | ReturnTransactionData\n | ExchangeTransactionData\n | ReprintReceiptData", + "description": "The transaction data, which can be one of the following types:\n- `SaleTransactionData`: Defines the data structure for completed sale transactions.\n- `ReturnTransactionData`: Defines the data structure for completed return transactions.\n- `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.\n- `ReprintReceiptData`: Defines the data structure for receipt reprint requests." + } + ], + "value": "export interface TransactionCompleteWithReprintData extends BaseData, BaseApi {\n /**\n * Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions.\n */\n storage: BaseApi['storage'];\n /**\n * The transaction data, which can be one of the following types:\n * - `SaleTransactionData`: Defines the data structure for completed sale transactions.\n * - `ReturnTransactionData`: Defines the data structure for completed return transactions.\n * - `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.\n * - `ReprintReceiptData`: Defines the data structure for receipt reprint requests.\n */\n transaction:\n | SaleTransactionData\n | ReturnTransactionData\n | ExchangeTransactionData\n | ReprintReceiptData;\n}" + } + }, + "BaseData": { + "src/surfaces/point-of-sale/event/data/BaseData.ts": { + "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", + "name": "BaseData", + "description": "Base data object provided to all extension targets containing device information, session context, and connectivity state. This data is available at extension initialization and provides essential context about the runtime environment.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", + "syntaxKind": "PropertySignature", + "name": "connectivity", + "value": "ConnectivityApiContent", + "description": "The current Internet connectivity state of the POS device. Indicates whether the device is connected to or disconnected from the Internet. This state updates in real-time as connectivity changes, allowing extensions to adapt behavior for offline scenarios, show connectivity warnings, or queue operations for when connectivity is restored." + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", + "syntaxKind": "PropertySignature", + "name": "device", + "value": "Device", + "description": "Comprehensive information about the physical POS device where the extension is currently running. Includes the device name, unique device ID, and form factor information (tablet vs other). This data is static for the session and helps extensions adapt to different device types, log device-specific information, or implement device-based configurations." + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", + "syntaxKind": "PropertySignature", + "name": "locale", + "value": "string", + "description": "The [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale string for the current POS session (for example, `\"en-US\"`, `\"fr-CA\"`, `\"de-DE\"`). This indicates the merchant's language and regional preferences. Commonly used for internationalization (i18n), locale-specific date/time/number formatting, translating UI text, and providing localized content. The locale remains constant for the session and reflects the language selected in POS settings." + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", + "syntaxKind": "PropertySignature", + "name": "session", + "value": "Session", + "description": "Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members." + } + ], + "value": "export interface BaseData {\n /**\n * The current Internet connectivity state of the POS device. Indicates whether the device is connected to or disconnected from the Internet. This state updates in real-time as connectivity changes, allowing extensions to adapt behavior for offline scenarios, show connectivity warnings, or queue operations for when connectivity is restored.\n */\n connectivity: ConnectivityApiContent;\n /**\n * Comprehensive information about the physical POS device where the extension is currently running. Includes the device name, unique device ID, and form factor information (tablet vs other). This data is static for the session and helps extensions adapt to different device types, log device-specific information, or implement device-based configurations.\n */\n device: Device;\n /**\n * The [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale string for the current POS session (for example, `\"en-US\"`, `\"fr-CA\"`, `\"de-DE\"`). This indicates the merchant's language and regional preferences. Commonly used for internationalization (i18n), locale-specific date/time/number formatting, translating UI text, and providing localized content. The locale remains constant for the session and reflects the language selected in POS settings.\n */\n locale: string;\n /**\n * Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members.\n */\n session: Session;\n}" + } + }, + "ActionExtensionComponents": { + "src/surfaces/point-of-sale/components/targets/ActionExtensionComponents.ts": { + "filePath": "src/surfaces/point-of-sale/components/targets/ActionExtensionComponents.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ActionExtensionComponents", + "value": "'Button'", + "description": "", + "isPublicDocs": true + } + }, + "BlockExtensionComponents": { + "src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts": { + "filePath": "src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "BlockExtensionComponents", + "value": "'Badge' | 'Box' | 'Button' | 'DatePicker' | 'DateSpinner' | 'Dialog' | 'Heading' | 'Icon' | 'Image' | 'Modal' | 'POSBlock' | 'PosBlock' | 'POSBlockRow' | 'PrintPreview' | 'Section' | 'Stack' | 'Text' | 'TimePicker'", + "description": "", + "isPublicDocs": true + } + }, + "SmartGridComponents": { + "src/surfaces/point-of-sale/components/targets/SmartGridComponents.ts": { + "filePath": "src/surfaces/point-of-sale/components/targets/SmartGridComponents.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "SmartGridComponents", + "value": "'Tile'", + "description": "", + "isPublicDocs": true + } + }, + "ReceiptComponents": { + "src/surfaces/point-of-sale/components/targets/ReceiptComponents.ts": { + "filePath": "src/surfaces/point-of-sale/components/targets/ReceiptComponents.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ReceiptComponents", + "value": "'PosBlock' | 'Text' | 'QrCode'", + "description": "", + "isPublicDocs": true + } + }, + "StandardComponents": { + "src/surfaces/point-of-sale/components/targets/StandardComponents.ts": { + "filePath": "src/surfaces/point-of-sale/components/targets/StandardComponents.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StandardComponents", + "value": "'Badge' | 'Banner' | 'Box' | 'Button' | 'Choice' | 'ChoiceList' | 'Clickable' | 'DateField' | 'DatePicker' | 'DateSpinner' | 'Divider' | 'EmailField' | 'Embed' | 'EmptyState' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Modal' | 'NumberField' | 'Page' | 'POSBlock' | 'PosBlock' | 'QRCode' | 'QrCode' | 'Route' | 'Router' | 'ScrollBox' | 'SearchField' | 'Section' | 'Spinner' | 'Stack' | 'Switch' | 'Tab' | 'TabList' | 'TabPanel' | 'Tabs' | 'Text' | 'TextArea' | 'TextField' | 'Tile' | 'TimeField' | 'TimePicker'", + "description": "", + "isPublicDocs": true + } + }, + "BasicComponents": { + "src/surfaces/point-of-sale/components/targets/BasicComponents.ts": { + "filePath": "src/surfaces/point-of-sale/components/targets/BasicComponents.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "BasicComponents", + "value": "'Badge' | 'Banner' | 'Box' | 'Button' | 'Choice' | 'ChoiceList' | 'Clickable' | 'DateField' | 'DatePicker' | 'DateSpinner' | 'Divider' | 'EmailField' | 'Embed' | 'EmptyState' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Modal' | 'NumberField' | 'Page' | 'POSBlock' | 'PosBlock' | 'QRCode' | 'QrCode' | 'Route' | 'Router' | 'ScrollBox' | 'SearchField' | 'Section' | 'Spinner' | 'Stack' | 'Switch' | 'Tab' | 'TabList' | 'TabPanel' | 'Tabs' | 'Text' | 'TextArea' | 'TextField' | 'TimeField' | 'TimePicker'", + "description": "", + "isPublicDocs": true + } + }, + "EventExtensionTargets": { + "src/surfaces/point-of-sale/extension-targets.ts": { + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "name": "EventExtensionTargets", + "description": "", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", - "syntaxKind": "PropertySignature", - "name": "connectivity", - "value": "ConnectivityApiContent", - "description": "The current Internet connectivity state of the POS device. Indicates whether the device is connected to or disconnected from the Internet. This state updates in real-time as connectivity changes, allowing extensions to adapt behavior for offline scenarios, show connectivity warnings, or queue operations for when connectivity is restored." - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", - "syntaxKind": "PropertySignature", - "name": "device", - "value": "Device", - "description": "Comprehensive information about the physical POS device where the extension is currently running. Includes the device name, unique device ID, and form factor information (tablet vs other). This data is static for the session and helps extensions adapt to different device types, log device-specific information, or implement device-based configurations." - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "locale", - "value": "string", - "description": "The [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale string for the current POS session (for example, `\"en-US\"`, `\"fr-CA\"`, `\"de-DE\"`). This indicates the merchant's language and regional preferences. Commonly used for internationalization (i18n), locale-specific date/time/number formatting, translating UI text, and providing localized content. The locale remains constant for the session and reflects the language selected in POS settings." + "name": "pos.cart-update.event.observe", + "value": "(data: CartUpdateEventData) => Promise", + "description": "Fires when the cart is updated.", + "deprecationMessage": "Deprecated as of version `2026-07`. Use `api.cart.current.subscribe()` on the\n[`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) instead.", + "isPrivate": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "session", - "value": "Session", - "description": "Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members." + "name": "pos.cash-tracking-session-complete.event.observe", + "value": "(data: CashTrackingSessionCompleteData) => Promise", + "description": "Fires when a cash tracking session completes.", + "deprecationMessage": "Deprecated as of version `2026-07`. Use the\n[`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n`shopify.addEventListener('cashtrackingsessioncomplete', callback)` instead.", + "isPrivate": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "storage", - "value": "Storage>", - "description": "Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions." + "name": "pos.cash-tracking-session-start.event.observe", + "value": "(data: CashTrackingSessionStartData) => Promise", + "description": "Fires when a cash tracking session starts.", + "deprecationMessage": "Deprecated as of version `2026-07`. Use the\n[`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n`shopify.addEventListener('cashtrackingsessionstart', callback)` instead.", + "isPrivate": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "transaction", - "value": "| SaleTransactionData\n | ReturnTransactionData\n | ExchangeTransactionData\n | ReprintReceiptData", - "description": "The transaction data, which can be one of the following types:\n- `SaleTransactionData`: Defines the data structure for completed sale transactions.\n- `ReturnTransactionData`: Defines the data structure for completed return transactions.\n- `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.\n- `ReprintReceiptData`: Defines the data structure for receipt reprint requests." + "name": "pos.transaction-complete.event.observe", + "value": "(data: TransactionCompleteData) => Promise", + "description": "Fires when a transaction completes successfully.", + "deprecationMessage": "Deprecated as of version `2026-07`. Use the\n[`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n`shopify.addEventListener('transactioncomplete', callback)` instead.", + "isPrivate": true } ], - "value": "export interface TransactionCompleteWithReprintData extends BaseData, BaseApi {\n /**\n * Provides access to persistent local storage methods for your POS UI extension. Use this to store, retrieve, and manage data that persists across sessions.\n */\n storage: BaseApi['storage'];\n /**\n * The transaction data, which can be one of the following types:\n * - `SaleTransactionData`: Defines the data structure for completed sale transactions.\n * - `ReturnTransactionData`: Defines the data structure for completed return transactions.\n * - `ExchangeTransactionData`: Defines the data structure for completed exchange transactions.\n * - `ReprintReceiptData`: Defines the data structure for receipt reprint requests.\n */\n transaction:\n | SaleTransactionData\n | ReturnTransactionData\n | ExchangeTransactionData\n | ReprintReceiptData;\n}" + "value": "export interface EventExtensionTargets {\n /**\n * Fires when a transaction completes successfully.\n *\n * @deprecated Deprecated as of version `2026-07`. Use the\n * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n * `shopify.addEventListener('transactioncomplete', callback)` instead.\n * @private\n */\n 'pos.transaction-complete.event.observe': (\n data: TransactionCompleteData,\n ) => Promise;\n /**\n * Fires when a cash tracking session starts.\n *\n * @deprecated Deprecated as of version `2026-07`. Use the\n * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n * `shopify.addEventListener('cashtrackingsessionstart', callback)` instead.\n * @private\n */\n 'pos.cash-tracking-session-start.event.observe': (\n // eslint-disable-next-line import/no-deprecated\n data: CashTrackingSessionStartData,\n ) => Promise;\n /**\n * Fires when a cash tracking session completes.\n *\n * @deprecated Deprecated as of version `2026-07`. Use the\n * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n * `shopify.addEventListener('cashtrackingsessioncomplete', callback)` instead.\n * @private\n */\n 'pos.cash-tracking-session-complete.event.observe': (\n // eslint-disable-next-line import/no-deprecated\n data: CashTrackingSessionCompleteData,\n ) => Promise;\n /**\n * Fires when the cart is updated.\n *\n * @deprecated Deprecated as of version `2026-07`. Use `api.cart.current.subscribe()` on the\n * [`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) instead.\n * @private\n */\n 'pos.cart-update.event.observe': (\n // eslint-disable-next-line import/no-deprecated\n data: CartUpdateEventData,\n ) => Promise;\n}" } }, "CartUpdateEventData": { @@ -9163,7 +9790,6 @@ "filePath": "src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts", "name": "CartUpdateEventData", "description": "The data object provided to cart update extension targets. Contains the current cart state along with device, session, and connectivity information. This data is passed to extensions whenever the cart changes, enabling real-time cart monitoring and cart-based business logic.", - "isPublicDocs": true, "members": [ { "filePath": "src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts", @@ -9211,58 +9837,18 @@ "value": "export interface CartUpdateEventData extends BaseData, BaseApi {\n /**\n * The complete current `Cart` object containing all cart data including line items with products and quantities, pricing totals (subtotal, tax, grand total), associated customer information, applied discounts, custom properties, and editability state. This represents the cart's state at the moment the extension is triggered, reflecting all recent changes. The cart object is read-only in this context—modifications should be made through the Cart API methods.\n */\n cart: Cart;\n}" } }, - "BaseData": { - "src/surfaces/point-of-sale/event/data/BaseData.ts": { - "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", - "name": "BaseData", - "description": "Base data object provided to all extension targets containing device information, session context, and connectivity state. This data is available at extension initialization and provides essential context about the runtime environment.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", - "syntaxKind": "PropertySignature", - "name": "connectivity", - "value": "ConnectivityApiContent", - "description": "The current Internet connectivity state of the POS device. Indicates whether the device is connected to or disconnected from the Internet. This state updates in real-time as connectivity changes, allowing extensions to adapt behavior for offline scenarios, show connectivity warnings, or queue operations for when connectivity is restored." - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", - "syntaxKind": "PropertySignature", - "name": "device", - "value": "Device", - "description": "Comprehensive information about the physical POS device where the extension is currently running. Includes the device name, unique device ID, and form factor information (tablet vs other). This data is static for the session and helps extensions adapt to different device types, log device-specific information, or implement device-based configurations." - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", - "syntaxKind": "PropertySignature", - "name": "locale", - "value": "string", - "description": "The [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale string for the current POS session (for example, `\"en-US\"`, `\"fr-CA\"`, `\"de-DE\"`). This indicates the merchant's language and regional preferences. Commonly used for internationalization (i18n), locale-specific date/time/number formatting, translating UI text, and providing localized content. The locale remains constant for the session and reflects the language selected in POS settings." - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/BaseData.ts", - "syntaxKind": "PropertySignature", - "name": "session", - "value": "Session", - "description": "Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members." - } - ], - "value": "export interface BaseData {\n /**\n * The current Internet connectivity state of the POS device. Indicates whether the device is connected to or disconnected from the Internet. This state updates in real-time as connectivity changes, allowing extensions to adapt behavior for offline scenarios, show connectivity warnings, or queue operations for when connectivity is restored.\n */\n connectivity: ConnectivityApiContent;\n /**\n * Comprehensive information about the physical POS device where the extension is currently running. Includes the device name, unique device ID, and form factor information (tablet vs other). This data is static for the session and helps extensions adapt to different device types, log device-specific information, or implement device-based configurations.\n */\n device: Device;\n /**\n * The [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) locale string for the current POS session (for example, `\"en-US\"`, `\"fr-CA\"`, `\"de-DE\"`). This indicates the merchant's language and regional preferences. Commonly used for internationalization (i18n), locale-specific date/time/number formatting, translating UI text, and providing localized content. The locale remains constant for the session and reflects the language selected in POS settings.\n */\n locale: string;\n /**\n * Comprehensive information about the current POS session including shop ID and domain, authenticated user, pinned staff member, active location, currency settings, and POS version. This session data remains constant for the session duration and provides critical context for business logic, permissions, API authentication, and transaction processing. Session data updates when users switch locations or change pinned staff members.\n */\n session: Session;\n}" - } - }, - "CashTrackingSessionStartData": { + "CashTrackingSessionCompleteData": { "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts": { "filePath": "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts", - "name": "CashTrackingSessionStartData", - "description": "The data object provided to cash tracking session start extension targets. Contains information about a newly opened cash tracking session along with device and session context.", - "isPublicDocs": true, + "name": "CashTrackingSessionCompleteData", + "description": "The data object provided to cash tracking session complete extension targets. Contains information about a completed cash tracking session including when it opened and closed, along with device and session context.", "members": [ { "filePath": "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts", "syntaxKind": "PropertySignature", - "name": "cashTrackingSessionStart", - "value": "{ id: number; openingTime: string; }", - "description": "The cash tracking session start data containing the session identifier and the time when the session began. Cash tracking sessions represent the period during which a cash drawer is open and being used for transactions, typically corresponding to a staff member's shift." + "name": "cashTrackingSessionComplete", + "value": "{ id: number; openingTime: string; closingTime: string; }", + "description": "The cash tracking session complete data containing the session identifier, opening time, and closing time. This represents the full lifecycle of a cash drawer session from opening to closing." }, { "filePath": "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts", @@ -9300,22 +9886,21 @@ "description": "" } ], - "value": "export interface CashTrackingSessionStartData extends BaseData, BaseApi {\n /**\n * The cash tracking session start data containing the session identifier and the time when the session began. Cash tracking sessions represent the period during which a cash drawer is open and being used for transactions, typically corresponding to a staff member's shift.\n */\n cashTrackingSessionStart: {\n /**\n * The unique numeric identifier for this cash tracking session. This ID distinguishes this session from other cash tracking sessions and can be used for session-specific operations, reporting, or linking transactions to sessions. The ID is assigned when the session opens and remains constant until the session closes.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and cash drawer operations began (for example, `\"2024-05-15T09:00:00Z\"`). This marks the start of the staff member's shift or cash handling period. Commonly used for calculating session duration, shift reporting, or determining which transactions belong to which session.\n */\n openingTime: string;\n };\n}" + "value": "export interface CashTrackingSessionCompleteData extends BaseData, BaseApi {\n /**\n * The cash tracking session complete data containing the session identifier, opening time, and closing time. This represents the full lifecycle of a cash drawer session from opening to closing.\n */\n cashTrackingSessionComplete: {\n /**\n * The unique numeric identifier for this cash tracking session. This ID matches the ID from when the session was opened and can be used to correlate session start and end events, retrieve session-specific data, or link all transactions that occurred during this session.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and began (for example, `\"2024-05-15T09:00:00Z\"`). This marks the start of the session and can be compared with `closingTime` to calculate the total session duration or shift length.\n */\n openingTime: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was closed and ended (for example, `\"2024-05-15T17:30:00Z\"`). This marks when the staff member completed their shift, closed out the cash drawer, and finalized the session. The time between `openingTime` and `closingTime` represents the active session duration. Commonly used for shift reporting, calculating hours worked, or determining the timeframe for session-specific transactions.\n */\n closingTime: string;\n };\n}" } }, - "CashTrackingSessionCompleteData": { + "CashTrackingSessionStartData": { "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts": { "filePath": "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts", - "name": "CashTrackingSessionCompleteData", - "description": "The data object provided to cash tracking session complete extension targets. Contains information about a completed cash tracking session including when it opened and closed, along with device and session context.", - "isPublicDocs": true, + "name": "CashTrackingSessionStartData", + "description": "The data object provided to cash tracking session start extension targets. Contains information about a newly opened cash tracking session along with device and session context.", "members": [ { "filePath": "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts", "syntaxKind": "PropertySignature", - "name": "cashTrackingSessionComplete", - "value": "{ id: number; openingTime: string; closingTime: string; }", - "description": "The cash tracking session complete data containing the session identifier, opening time, and closing time. This represents the full lifecycle of a cash drawer session from opening to closing." + "name": "cashTrackingSessionStart", + "value": "{ id: number; openingTime: string; }", + "description": "The cash tracking session start data containing the session identifier and the time when the session began. Cash tracking sessions represent the period during which a cash drawer is open and being used for transactions, typically corresponding to a staff member's shift." }, { "filePath": "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.ts", @@ -9353,106 +9938,7 @@ "description": "" } ], - "value": "export interface CashTrackingSessionCompleteData extends BaseData, BaseApi {\n /**\n * The cash tracking session complete data containing the session identifier, opening time, and closing time. This represents the full lifecycle of a cash drawer session from opening to closing.\n */\n cashTrackingSessionComplete: {\n /**\n * The unique numeric identifier for this cash tracking session. This ID matches the ID from when the session was opened and can be used to correlate session start and end events, retrieve session-specific data, or link all transactions that occurred during this session.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and began (for example, `\"2024-05-15T09:00:00Z\"`). This marks the start of the session and can be compared with `closingTime` to calculate the total session duration or shift length.\n */\n openingTime: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was closed and ended (for example, `\"2024-05-15T17:30:00Z\"`). This marks when the staff member completed their shift, closed out the cash drawer, and finalized the session. The time between `openingTime` and `closingTime` represents the active session duration. Commonly used for shift reporting, calculating hours worked, or determining the timeframe for session-specific transactions.\n */\n closingTime: string;\n };\n}" - } - }, - "ActionExtensionComponents": { - "src/surfaces/point-of-sale/components/targets/ActionExtensionComponents.ts": { - "filePath": "src/surfaces/point-of-sale/components/targets/ActionExtensionComponents.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ActionExtensionComponents", - "value": "'Button'", - "description": "", - "isPublicDocs": true - } - }, - "BlockExtensionComponents": { - "src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts": { - "filePath": "src/surfaces/point-of-sale/components/targets/BlockExtensionComponents.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "BlockExtensionComponents", - "value": "'Badge' | 'Box' | 'Button' | 'DatePicker' | 'DateSpinner' | 'Dialog' | 'Heading' | 'Icon' | 'Image' | 'Modal' | 'POSBlock' | 'PosBlock' | 'POSBlockRow' | 'PrintPreview' | 'Section' | 'Stack' | 'Text' | 'TimePicker'", - "description": "", - "isPublicDocs": true - } - }, - "SmartGridComponents": { - "src/surfaces/point-of-sale/components/targets/SmartGridComponents.ts": { - "filePath": "src/surfaces/point-of-sale/components/targets/SmartGridComponents.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "SmartGridComponents", - "value": "'Tile'", - "description": "", - "isPublicDocs": true - } - }, - "ReceiptComponents": { - "src/surfaces/point-of-sale/components/targets/ReceiptComponents.ts": { - "filePath": "src/surfaces/point-of-sale/components/targets/ReceiptComponents.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ReceiptComponents", - "value": "'PosBlock' | 'Text' | 'QrCode'", - "description": "", - "isPublicDocs": true - } - }, - "StandardComponents": { - "src/surfaces/point-of-sale/components/targets/StandardComponents.ts": { - "filePath": "src/surfaces/point-of-sale/components/targets/StandardComponents.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "StandardComponents", - "value": "'Badge' | 'Banner' | 'Box' | 'Button' | 'Choice' | 'ChoiceList' | 'Clickable' | 'DateField' | 'DatePicker' | 'DateSpinner' | 'Divider' | 'EmailField' | 'Embed' | 'EmptyState' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Modal' | 'NumberField' | 'Page' | 'POSBlock' | 'PosBlock' | 'QRCode' | 'QrCode' | 'Route' | 'Router' | 'ScrollBox' | 'SearchField' | 'Section' | 'Spinner' | 'Stack' | 'Switch' | 'Tab' | 'TabList' | 'TabPanel' | 'Tabs' | 'Text' | 'TextArea' | 'TextField' | 'Tile' | 'TimeField' | 'TimePicker'", - "description": "", - "isPublicDocs": true - } - }, - "BasicComponents": { - "src/surfaces/point-of-sale/components/targets/BasicComponents.ts": { - "filePath": "src/surfaces/point-of-sale/components/targets/BasicComponents.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "BasicComponents", - "value": "'Badge' | 'Banner' | 'Box' | 'Button' | 'Choice' | 'ChoiceList' | 'Clickable' | 'DateField' | 'DatePicker' | 'DateSpinner' | 'Divider' | 'EmailField' | 'Embed' | 'EmptyState' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Modal' | 'NumberField' | 'Page' | 'POSBlock' | 'PosBlock' | 'QRCode' | 'QrCode' | 'Route' | 'Router' | 'ScrollBox' | 'SearchField' | 'Section' | 'Spinner' | 'Stack' | 'Switch' | 'Tab' | 'TabList' | 'TabPanel' | 'Tabs' | 'Text' | 'TextArea' | 'TextField' | 'TimeField' | 'TimePicker'", - "description": "", - "isPublicDocs": true - } - }, - "EventExtensionTargets": { - "src/surfaces/point-of-sale/extension-targets.ts": { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "name": "EventExtensionTargets", - "description": "", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.cart-update.event.observe", - "value": "(data: CartUpdateEventData) => Promise", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.cash-tracking-session-complete.event.observe", - "value": "(data: CashTrackingSessionCompleteData) => Promise", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.cash-tracking-session-start.event.observe", - "value": "(data: CashTrackingSessionStartData) => Promise", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.transaction-complete.event.observe", - "value": "(data: TransactionCompleteData) => Promise", - "description": "" - } - ], - "value": "export interface EventExtensionTargets {\n 'pos.transaction-complete.event.observe': (\n data: TransactionCompleteData,\n ) => Promise;\n 'pos.cash-tracking-session-start.event.observe': (\n data: CashTrackingSessionStartData,\n ) => Promise;\n 'pos.cash-tracking-session-complete.event.observe': (\n data: CashTrackingSessionCompleteData,\n ) => Promise;\n 'pos.cart-update.event.observe': (\n data: CartUpdateEventData,\n ) => Promise;\n}" + "value": "export interface CashTrackingSessionStartData extends BaseData, BaseApi {\n /**\n * The cash tracking session start data containing the session identifier and the time when the session began. Cash tracking sessions represent the period during which a cash drawer is open and being used for transactions, typically corresponding to a staff member's shift.\n */\n cashTrackingSessionStart: {\n /**\n * The unique numeric identifier for this cash tracking session. This ID distinguishes this session from other cash tracking sessions and can be used for session-specific operations, reporting, or linking transactions to sessions. The ID is assigned when the session opens and remains constant until the session closes.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the cash tracking session was opened and cash drawer operations began (for example, `\"2024-05-15T09:00:00Z\"`). This marks the start of the staff member's shift or cash handling period. Commonly used for calculating session duration, shift reporting, or determining which transactions belong to which session.\n */\n openingTime: string;\n };\n}" } }, "DataExtensionTargets": { @@ -9768,7 +10254,9 @@ "syntaxKind": "PropertySignature", "name": "pos.cart-update.event.observe", "value": "(data: CartUpdateEventData) => Promise", - "description": "" + "description": "Fires when the cart is updated.", + "deprecationMessage": "Deprecated as of version `2026-07`. Use `api.cart.current.subscribe()` on the\n[`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) instead.", + "isPrivate": true }, { "filePath": "src/surfaces/point-of-sale/extension-targets.ts", @@ -9789,14 +10277,18 @@ "syntaxKind": "PropertySignature", "name": "pos.cash-tracking-session-complete.event.observe", "value": "(data: CashTrackingSessionCompleteData) => Promise", - "description": "" + "description": "Fires when a cash tracking session completes.", + "deprecationMessage": "Deprecated as of version `2026-07`. Use the\n[`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n`shopify.addEventListener('cashtrackingsessioncomplete', callback)` instead.", + "isPrivate": true }, { "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", "name": "pos.cash-tracking-session-start.event.observe", "value": "(data: CashTrackingSessionStartData) => Promise", - "description": "" + "description": "Fires when a cash tracking session starts.", + "deprecationMessage": "Deprecated as of version `2026-07`. Use the\n[`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n`shopify.addEventListener('cashtrackingsessionstart', callback)` instead.", + "isPrivate": true }, { "filePath": "src/surfaces/point-of-sale/extension-targets.ts", @@ -9999,7 +10491,9 @@ "syntaxKind": "PropertySignature", "name": "pos.transaction-complete.event.observe", "value": "(data: TransactionCompleteData) => Promise", - "description": "" + "description": "Fires when a transaction completes successfully.", + "deprecationMessage": "Deprecated as of version `2026-07`. Use the\n[`pos.app.ready.data` target](/docs/api/pos-ui-extensions/{API_VERSION}/targets/pos-app-ready-data) with\n`shopify.addEventListener('transactioncomplete', callback)` instead.", + "isPrivate": true } ], "value": "export interface ExtensionTargets\n extends RenderExtensionTargets,\n EventExtensionTargets,\n DataExtensionTargets {}" @@ -10178,16 +10672,6 @@ "value": "export interface Window {\n /**\n * Closes the extension screen and dismisses the modal interface. Use to programmatically close the modal after completing a workflow, canceling an operation, or when user action is no longer required. This provides the same behavior as the user dismissing the modal through the UI.\n */\n close(): void;\n}" } }, - "InterceptCapability": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "InterceptCapability", - "value": "`${Extract<\n keyof ShopifyInterceptMap,\n string\n>}.${'error' | 'warn' | 'info'}`", - "description": "A merchant-granted permission to return a validation severity for a POS intercept event. Event names come directly from `ShopifyInterceptMap`. The `warn` suffix corresponds to the interceptor result level `WARNING`.", - "isPublicDocs": true - } - }, "ShopifyGlobal": { "src/surfaces/point-of-sale/globals.ts": { "filePath": "src/surfaces/point-of-sale/globals.ts", @@ -10200,18 +10684,14 @@ "syntaxKind": "PropertySignature", "name": "capabilities", "value": "ReadonlySignalLike", - "description": "The merchant-granted permissions for validation severities returned by POS interceptors. This signal is available to every POS extension target.\n\nCapability names combine an event from the approved Intercept API with an allowed severity: `${event}.error`, `${event}.warn`, or `${event}.info`. Event names exactly match the names accepted by `shopify.intercept()`; the severity suffixes are proposed by the target-scoped configuration contract.\n\nPermissions are cumulative and every implied permission is included in the array. For example, `beforecheckout.error` is accompanied by `beforecheckout.warn` and `beforecheckout.info`; `beforecheckout.warn` is accompanied by `beforecheckout.info`.\n\nAn extension can return `ERROR`, `WARNING`, or `INFO` only when the matching `error`, `warn`, or `info` capability (respectively) is present. A stronger capability also permits the weaker severities made explicit in the array.\n\nExtensions request events per target in `shopify.extension.toml`. Shopify validates at deploy time that each event is supported by its target. The declaration also tells POS to expect that target to register the matching interceptor, so the host can detect a missing validator. Only the target that registers the interceptor declares the event; companion UI targets can read this signal without redeclaring it. This distinction matters for compliance workflows where a validator failure can have legal implications and must not look like an intentionally absent validator.", + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", "examples": [ { "title": "Example", "description": "", "tabs": [ { - "code": "[[extensions.targeting]]\ntarget = \"pos.app.ready.data\"\nmodule = \"./src/Extension.ts\"\n\n[extensions.targeting.capabilities]\nintercepts = [\"beforecheckout\"]", - "title": "Example" - }, - { - "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor may return ERROR, WARNING, or INFO validations.\n}", + "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", "title": "Example" } ] @@ -10219,7 +10699,7 @@ ] } ], - "value": "export interface ShopifyGlobal {\n /**\n * The merchant-granted permissions for validation severities returned by POS\n * interceptors. This signal is available to every POS extension target.\n *\n * Capability names combine an event from the approved Intercept API with an\n * allowed severity: `${event}.error`, `${event}.warn`, or `${event}.info`.\n * Event names exactly match the names accepted by `shopify.intercept()`; the\n * severity suffixes are proposed by the target-scoped configuration contract.\n *\n * Permissions are cumulative and every implied permission is included in the\n * array. For example, `beforecheckout.error` is accompanied by\n * `beforecheckout.warn` and `beforecheckout.info`; `beforecheckout.warn` is\n * accompanied by `beforecheckout.info`.\n *\n * An extension can return `ERROR`, `WARNING`, or `INFO` only when the matching\n * `error`, `warn`, or `info` capability (respectively) is present. A stronger\n * capability also permits the weaker severities made explicit in the array.\n *\n * Extensions request events per target in `shopify.extension.toml`. Shopify\n * validates at deploy time that each event is supported by its target. The\n * declaration also tells POS to expect that target to register the matching\n * interceptor, so the host can detect a missing validator. Only the target\n * that registers the interceptor declares the event; companion UI targets can\n * read this signal without redeclaring it. This distinction matters for\n * compliance workflows where a validator failure can have legal implications\n * and must not look like an intentionally absent validator.\n *\n * @example\n * ```toml\n * [[extensions.targeting]]\n * target = \"pos.app.ready.data\"\n * module = \"./src/Extension.ts\"\n *\n * [extensions.targeting.capabilities]\n * intercepts = [\"beforecheckout\"]\n * ```\n *\n * ```ts\n * if (shopify.capabilities.value.includes('beforecheckout.error')) {\n * // This interceptor may return ERROR, WARNING, or INFO validations.\n * }\n * ```\n *\n * @see https://github.com/Shopify/ui-api-design/blob/be97e2ca7089b05db762a00941400c0e4dd3df94/libraries/javascript/ui-api-design/types/extensions/configuration/capabilities.md\n * @see https://github.com/Shopify/ui-api-design/pull/1557\n * @see https://github.com/Shopify/ui-api-design/pull/1563\n */\n capabilities: ReadonlySignalLike;\n}" + "value": "export interface ShopifyGlobal extends CapabilitiesApi {}" } }, "BackgroundShopifyGlobal": { @@ -10236,6 +10716,32 @@ "value": "(type: K, listener: (event: ShopifyEventMap[K]) => void) => void", "description": "Register a listener for a POS host event. Listeners are fire-and-forget: their return values are ignored, and their errors are caught without affecting the host or other listeners." }, + { + "filePath": "src/surfaces/point-of-sale/globals.ts", + "syntaxKind": "PropertySignature", + "name": "capabilities", + "value": "ReadonlySignalLike", + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", + "title": "Example" + } + ] + } + ] + }, + { + "filePath": "src/surfaces/point-of-sale/globals.ts", + "syntaxKind": "MethodSignature", + "name": "intercept", + "value": "(type: K, interceptor: ShopifyInterceptor) => () => void", + "description": "Register an interceptor for a POS host workflow that can be blocked. Returns a function that unregisters the interceptor." + }, { "filePath": "src/surfaces/point-of-sale/globals.ts", "syntaxKind": "MethodSignature", @@ -10244,7 +10750,7 @@ "description": "Remove a listener previously registered with `addEventListener`. The `listener` reference must match the one used to register." } ], - "value": "export interface BackgroundShopifyGlobal extends ShopifyGlobal {\n /**\n * Register a listener for a POS host event. Listeners are fire-and-forget:\n * their return values are ignored, and their errors are caught without\n * affecting the host or other listeners.\n */\n addEventListener(\n type: K,\n listener: (event: ShopifyEventMap[K]) => void,\n ): void;\n\n /**\n * Remove a listener previously registered with `addEventListener`. The\n * `listener` reference must match the one used to register.\n */\n removeEventListener(\n type: K,\n listener: (event: ShopifyEventMap[K]) => void,\n ): void;\n}" + "value": "export interface BackgroundShopifyGlobal extends ShopifyGlobal {\n /**\n * Register a listener for a POS host event. Listeners are fire-and-forget:\n * their return values are ignored, and their errors are caught without\n * affecting the host or other listeners.\n */\n addEventListener(\n type: K,\n listener: (event: ShopifyEventMap[K]) => void,\n ): void;\n\n /**\n * Remove a listener previously registered with `addEventListener`. The\n * `listener` reference must match the one used to register.\n */\n removeEventListener(\n type: K,\n listener: (event: ShopifyEventMap[K]) => void,\n ): void;\n\n /**\n * Register an interceptor for a POS host workflow that can be blocked.\n * Returns a function that unregisters the interceptor.\n */\n intercept(\n type: K,\n interceptor: ShopifyInterceptor,\n ): () => void;\n}" } } } \ No newline at end of file diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api.ts index 59394033d5..647614b57a 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api.ts @@ -51,6 +51,11 @@ export type {DeviceApi, DeviceApiContent} from './api/device-api/device-api'; export type {LocaleApi, LocaleApiContent} from './api/locale-api/locale-api'; +export type { + CapabilitiesApi, + InterceptCapability, +} from './api/capabilities-api/capabilities-api'; + export type {OrderApiContent, OrderApi} from './api/order-api/order-api'; export type { diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts new file mode 100644 index 0000000000..1c10e66fce --- /dev/null +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts @@ -0,0 +1,38 @@ +import type {ReadonlySignalLike} from '../../../../shared'; +import type {ShopifyInterceptMap} from '../../events'; + +/** + * A granted validation severity for a POS intercept event. Event names are + * derived from `ShopifyInterceptMap`; `warning` corresponds to the `WARNING` + * validation level. + * + * @publicDocs + */ +export type InterceptCapability = `${Extract< + keyof ShopifyInterceptMap, + string +>}.${'error' | 'warning' | 'info'}`; + +/** + * Provides the validation severities granted for POS intercept events. + * + * @publicDocs + */ +export interface CapabilitiesApi { + /** + * A read-only list of granted intercept capabilities. The signal is available + * to every POS target, but only the target that registers an interceptor + * declares its event in `shopify.extension.toml`. + * + * Grants are cumulative. An `.error` grant includes `.warning` and `.info`, + * and a `.warning` grant includes `.info`. + * + * @example + * ```ts + * if (shopify.capabilities.value.includes('beforecheckout.error')) { + * // This interceptor can return ERROR, WARNING, or INFO validations. + * } + * ``` + */ + capabilities: ReadonlySignalLike; +} diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/events.ts b/packages/ui-extensions/src/surfaces/point-of-sale/events.ts index 1ef932954b..325d4b14ec 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/events.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/events.ts @@ -52,18 +52,6 @@ export interface ShopifyInterceptMap { [POS_INTERCEPT_NAMES.BEFORE_CHECKOUT]: BeforeCheckoutEvent; } -/** - * A merchant-granted permission to return a validation severity for a POS - * intercept event. Event names come directly from `ShopifyInterceptMap`. - * The `warn` suffix corresponds to the interceptor result level `WARNING`. - * - * @publicDocs - */ -export type InterceptCapability = `${Extract< - keyof ShopifyInterceptMap, - string ->}.${'error' | 'warn' | 'info'}`; - /** * Dispatched when staff attempts to leave the active cart for checkout. * diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts b/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts index a3534d8d4d..1cb5ddb6a1 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts @@ -1,5 +1,5 @@ import type {ReadonlySignalLike} from '../../shared'; -import type {InterceptCapability} from './events'; +import type {InterceptCapability} from './api'; import type {ShopifyGlobal} from './globals'; function createSignal(value: T): ReadonlySignalLike { @@ -15,7 +15,7 @@ describe('POS intercept capabilities', () => { it('accepts all capabilities implied by an error grant', () => { const capabilities: InterceptCapability[] = [ 'beforecheckout.error', - 'beforecheckout.warn', + 'beforecheckout.warning', 'beforecheckout.info', ]; const global: ShopifyGlobal = { @@ -25,9 +25,9 @@ describe('POS intercept capabilities', () => { expect(global.capabilities.value).toStrictEqual(capabilities); }); - it('accepts info with a warning grant', () => { + it('accepts a warning grant and info without error', () => { const capabilities: InterceptCapability[] = [ - 'beforecheckout.warn', + 'beforecheckout.warning', 'beforecheckout.info', ]; @@ -48,7 +48,7 @@ describe('POS intercept capabilities', () => { expect(global.capabilities.value).toStrictEqual(['beforecheckout.info']); expect(global.capabilities.value).not.toContain('beforecheckout.error'); - expect(global.capabilities.value).not.toContain('beforecheckout.warn'); + expect(global.capabilities.value).not.toContain('beforecheckout.warning'); }); it('accepts an empty array when no intercept permissions are granted', () => { @@ -63,8 +63,8 @@ describe('POS intercept capabilities', () => { const capabilities: InterceptCapability[] = [ // @ts-expect-error Event names must come from ShopifyInterceptMap. 'unsupported.error', - // @ts-expect-error Capability suffixes use `warn`, not `warning`. - 'beforecheckout.warning', + // @ts-expect-error Capability suffixes use `warning`, not `warn`. + 'beforecheckout.warn', ]; expect(capabilities).toHaveLength(2); diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts b/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts index 8f6d676ce2..4bcb0fd77d 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts @@ -1,7 +1,6 @@ -import type {ReadonlySignalLike} from '../../shared'; +import type {CapabilitiesApi} from './api/capabilities-api/capabilities-api'; import type {Navigation} from './api/navigation-api/navigation-api'; import type { - InterceptCapability, ShopifyEventMap, ShopifyInterceptMap, ShopifyInterceptor, @@ -13,56 +12,7 @@ import type { * * @publicDocs */ -export interface ShopifyGlobal { - /** - * The merchant-granted permissions for validation severities returned by POS - * interceptors. This signal is available to every POS extension target. - * - * Capability names combine an event from the approved Intercept API with an - * allowed severity: `${event}.error`, `${event}.warn`, or `${event}.info`. - * Event names exactly match the names accepted by `shopify.intercept()`; the - * severity suffixes are proposed by the target-scoped configuration contract. - * - * Permissions are cumulative and every implied permission is included in the - * array. For example, `beforecheckout.error` is accompanied by - * `beforecheckout.warn` and `beforecheckout.info`; `beforecheckout.warn` is - * accompanied by `beforecheckout.info`. - * - * An extension can return `ERROR`, `WARNING`, or `INFO` only when the matching - * `error`, `warn`, or `info` capability (respectively) is present. A stronger - * capability also permits the weaker severities made explicit in the array. - * - * Extensions request events per target in `shopify.extension.toml`. Shopify - * validates at deploy time that each event is supported by its target. The - * declaration also tells POS to expect that target to register the matching - * interceptor, so the host can detect a missing validator. Only the target - * that registers the interceptor declares the event; companion UI targets can - * read this signal without redeclaring it. This distinction matters for - * compliance workflows where a validator failure can have legal implications - * and must not look like an intentionally absent validator. - * - * @example - * ```toml - * [[extensions.targeting]] - * target = "pos.app.ready.data" - * module = "./src/Extension.ts" - * - * [extensions.targeting.capabilities] - * intercepts = ["beforecheckout"] - * ``` - * - * ```ts - * if (shopify.capabilities.value.includes('beforecheckout.error')) { - * // This interceptor may return ERROR, WARNING, or INFO validations. - * } - * ``` - * - * @see https://github.com/Shopify/ui-api-design/blob/be97e2ca7089b05db762a00941400c0e4dd3df94/libraries/javascript/ui-api-design/types/extensions/configuration/capabilities.md - * @see https://github.com/Shopify/ui-api-design/pull/1557 - * @see https://github.com/Shopify/ui-api-design/pull/1563 - */ - capabilities: ReadonlySignalLike; -} +export interface ShopifyGlobal extends CapabilitiesApi {} /** * Background-only extension of `ShopifyGlobal`. Adds host-event listener APIs From 6d414ab3005bbeb7eedadf265a662e470b839299 Mon Sep 17 00:00:00 2001 From: Henry Stelle Date: Fri, 17 Jul 2026 15:22:46 -0700 Subject: [PATCH 4/6] Expose capabilities in POS target APIs Assisted-By: devx/2c55c133-dd59-4875-86d9-cce3ea78d8e1 --- .changeset/pos-intercept-capabilities.md | 3 +- packages/ui-extensions-tester/README.md | 8 + .../src/point-of-sale/README.md | 10 + .../src/point-of-sale/factories.ts | 2 + .../tests/point-of-sale-capabilities.test.ts | 37 + .../2026-07-rc/generated_docs_data_v2.json | 4792 ++++++++--------- .../pos_ui_extensions/2026-07-rc/targets.json | 60 + .../capabilities-api/capabilities-api.test.ts | 83 + .../api/capabilities-api/capabilities-api.ts | 7 - .../api/data-target-api/data-target-api.ts | 2 + .../api/standard/standard-api.ts | 2 + .../surfaces/point-of-sale/globals.test.ts | 72 - 12 files changed, 2584 insertions(+), 2494 deletions(-) create mode 100644 packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts create mode 100644 packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.test.ts delete mode 100644 packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts diff --git a/.changeset/pos-intercept-capabilities.md b/.changeset/pos-intercept-capabilities.md index 6044a06fec..9584ec6039 100644 --- a/.changeset/pos-intercept-capabilities.md +++ b/.changeset/pos-intercept-capabilities.md @@ -1,5 +1,6 @@ --- '@shopify/ui-extensions': minor +'@shopify/ui-extensions-tester': minor --- -Add `.error`, `.warning`, and `.info` POS intercept severity values to the existing `shopify.capabilities` signal. +Add `.error`, `.warning`, and `.info` POS intercept severity values to the existing `shopify.capabilities` signal, with corresponding POS target mocks in `@shopify/ui-extensions-tester`. diff --git a/packages/ui-extensions-tester/README.md b/packages/ui-extensions-tester/README.md index f24ae79116..e4e1164f6b 100644 --- a/packages/ui-extensions-tester/README.md +++ b/packages/ui-extensions-tester/README.md @@ -227,6 +227,14 @@ test('it handles an empty order', async () => { }); ``` +POS target mocks include an empty `shopify.capabilities` signal. Set its value to test capability-dependent behavior: + +```ts +extension.shopify.capabilities.value = [ + 'beforecheckout.error', +]; +``` + ### 🖱️ Triggering events To simulate how a user would interact with your UI extension, you can call [`dispatchEvent()`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent) or use `fireEvent` from `@testing-library/preact`. When an event triggers an async state change (like a Preact re-render), wrap follow-up assertions in `await waitFor()` to wait for the DOM to settle: diff --git a/packages/ui-extensions-tester/src/point-of-sale/README.md b/packages/ui-extensions-tester/src/point-of-sale/README.md index a30a20cc41..345becfb59 100644 --- a/packages/ui-extensions-tester/src/point-of-sale/README.md +++ b/packages/ui-extensions-tester/src/point-of-sale/README.md @@ -37,6 +37,16 @@ expect(tile.getAttribute('subheading')).toEqual( ); ``` +## ✅ Mocking capabilities + +POS target mocks include an empty capabilities signal by default. Replace its value with the capabilities needed by your test: + +```ts +extension.shopify.capabilities.value = [ + 'beforecheckout.error', +]; +``` + ## 💾 Mocking storage POS storage is a typed key-value store: diff --git a/packages/ui-extensions-tester/src/point-of-sale/factories.ts b/packages/ui-extensions-tester/src/point-of-sale/factories.ts index 6c538ee5cc..c172d206e5 100644 --- a/packages/ui-extensions-tester/src/point-of-sale/factories.ts +++ b/packages/ui-extensions-tester/src/point-of-sale/factories.ts @@ -122,6 +122,7 @@ function createMockStandardApi( target, }, i18n: createMockI18n(), + capabilities: createReadonlySignalLike([]), locale: {current: createReadonlySignalLike('en-US')}, toast: {show: () => {}}, session: { @@ -460,6 +461,7 @@ function createDataTargetMock( target, }, i18n: createMockI18n(), + capabilities: createReadonlySignalLike([]), session: { currentSession: createSessionCurrentSession(), staffMember: createReadonlySignalLike(createStaffMember()), diff --git a/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts b/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts new file mode 100644 index 0000000000..c52a4f3fe9 --- /dev/null +++ b/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts @@ -0,0 +1,37 @@ +import {getExtension} from '../index'; + +import {createTestSandbox, type TestSandbox} from './helpers'; + +describe('POS capabilities mocks', () => { + let sandbox: TestSandbox; + + beforeEach(() => { + sandbox = createTestSandbox(); + }); + + afterEach(() => { + sandbox.destroy(); + }); + + it('provides an empty capabilities signal for standard targets', () => { + sandbox.placeToml({target: 'pos.home.tile.render'}); + const extension = getExtension('pos.home.tile.render', { + configSearchDir: sandbox.tempDir, + }); + + extension.setUp(); + + expect(extension.shopify.capabilities.value).toStrictEqual([]); + }); + + it('provides an empty capabilities signal for data targets', () => { + sandbox.placeToml({target: 'pos.app.ready.data'}); + const extension = getExtension('pos.app.ready.data', { + configSearchDir: sandbox.tempDir, + }); + + extension.setUp(); + + expect(extension.shopify.capabilities.value).toStrictEqual([]); + }); +}); diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json index 16a0607af7..fbc1e41392 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json @@ -1581,1858 +1581,1310 @@ "value": "export interface CameraApi {\n camera: CameraApiContent;\n}" } }, - "ConnectivityStateSeverity": { - "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "PaymentMethod": { + "src/surfaces/point-of-sale/types/payment.ts": { + "filePath": "src/surfaces/point-of-sale/types/payment.ts", "syntaxKind": "TypeAliasDeclaration", - "name": "ConnectivityStateSeverity", - "value": "'Connected' | 'Disconnected'", - "description": "", + "name": "PaymentMethod", + "value": "'Cash' | 'Custom' | 'CreditCard' | 'CardPresentRefund' | 'StripeCardPresentRefund' | 'GiftCard' | 'StripeCreditCard' | 'ShopPay' | 'StoreCredit' | 'Unknown'", + "description": "The available payment method types for POS transactions.", "isPublicDocs": true } }, - "ConnectivityState": { - "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", - "name": "ConnectivityState", - "description": "Represents the current Internet connectivity status of the device. Indicates whether the device is connected or disconnected from the Internet.", + "Payment": { + "src/surfaces/point-of-sale/types/payment.ts": { + "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "name": "Payment", + "description": "Represents a payment applied to a transaction, including the amount, currency, and payment method type.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "filePath": "src/surfaces/point-of-sale/types/payment.ts", "syntaxKind": "PropertySignature", - "name": "internetConnected", - "value": "ConnectivityStateSeverity", - "description": "The Internet connection status of the POS device." - } - ], - "value": "export interface ConnectivityState {\n /**\n * The Internet connection status of the POS device.\n */\n internetConnected: ConnectivityStateSeverity;\n}" - } - }, - "ConnectivityApiContent": { - "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", - "name": "ConnectivityApiContent", - "description": "Provides access to the current connectivity state for the POS device.", - "isPublicDocs": true, - "members": [ + "name": "amount", + "value": "number", + "description": "The payment amount." + }, { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "filePath": "src/surfaces/point-of-sale/types/payment.ts", "syntaxKind": "PropertySignature", - "name": "current", - "value": "ReadonlySignalLike", - "description": "Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling." - } - ], - "value": "export interface ConnectivityApiContent {\n /**\n * Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling.\n */\n current: ReadonlySignalLike;\n}" - } - }, - "ConnectivityApi": { - "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", - "name": "ConnectivityApi", - "description": "The `ConnectivityApi` object provides access to current connectivity information and change notifications. Access these properties through `shopify.connectivity` to monitor network status.", - "isPublicDocs": true, - "members": [ + "name": "currency", + "value": "string", + "description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS." + }, { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "filePath": "src/surfaces/point-of-sale/types/payment.ts", "syntaxKind": "PropertySignature", - "name": "connectivity", - "value": "ConnectivityApiContent", - "description": "Provides access to the current connectivity state for the POS device." + "name": "type", + "value": "PaymentMethod", + "description": "The payment method type." } ], - "value": "export interface ConnectivityApi {\n connectivity: ConnectivityApiContent;\n}" + "value": "export interface Payment {\n /**\n * The payment amount.\n */\n amount: number;\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: string;\n /**\n * The payment method type.\n */\n type: PaymentMethod;\n}" } }, - "DeviceApiContent": { - "src/surfaces/point-of-sale/api/device-api/device-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", - "name": "DeviceApiContent", - "description": "The `DeviceApi` object provides device details and capabilities.", + "ShippingLine": { + "src/surfaces/point-of-sale/types/shipping-line.ts": { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "name": "ShippingLine", + "description": "Represents a shipping charge applied to an order, including the price and applicable taxes.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", - "syntaxKind": "MethodSignature", - "name": "getDeviceId", - "value": "() => Promise", - "description": "Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations. Note: While Shopify POS attempts to maintain a stable identifier, it is not guaranteed to be permanent and may change." + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "syntaxKind": "PropertySignature", + "name": "handle", + "value": "string", + "description": "The handle identifier for the shipping method.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", - "syntaxKind": "MethodSignature", - "name": "isTablet", - "value": "() => Promise", - "description": "Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences." + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "syntaxKind": "PropertySignature", + "name": "price", + "value": "Money", + "description": "The price of the shipping as a Money object." }, { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful." + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing tax breakdown.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "registerName", + "name": "title", "value": "string", - "description": "A short, unique identifier for the device, assigned by Shopify." + "description": "The display title of the shipping method.", + "isOptional": true } ], - "value": "export interface DeviceApiContent {\n /**\n * The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful.\n */\n name: string;\n /**\n * A short, unique identifier for the device, assigned by Shopify.\n */\n registerName: string;\n /**\n * Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations.\n * Note: While Shopify POS attempts to maintain a stable identifier, it is not guaranteed to be permanent and may change.\n */\n getDeviceId(): Promise;\n /**\n * Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences.\n */\n isTablet(): Promise;\n}" + "value": "export interface ShippingLine {\n /**\n * The handle identifier for the shipping method.\n */\n handle?: string;\n /**\n * The price of the shipping as a Money object.\n */\n price: Money;\n /**\n * The display title of the shipping method.\n */\n title?: string;\n /**\n * An array of individual tax lines showing tax breakdown.\n */\n taxLines?: TaxLine[];\n}" } }, - "DeviceApi": { - "src/surfaces/point-of-sale/api/device-api/device-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", - "name": "DeviceApi", - "description": "The `DeviceApi` object provides access to device information and capabilities. Access these properties and methods through `shopify.device` to retrieve device details and check device characteristics.", + "CalculatedShippingLine": { + "src/surfaces/point-of-sale/types/shipping-line.ts": { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "name": "CalculatedShippingLine", + "description": "Represents a calculated shipping line with specific shipping or retail method type.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "device", - "value": "DeviceApiContent", - "description": "The `DeviceApi` object provides device details and capabilities." - } - ], - "value": "export interface DeviceApi {\n device: DeviceApiContent;\n}" - } - }, - "ExtensionApiContent": { - "src/surfaces/point-of-sale/api/extension-api/extension-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", - "name": "ExtensionApiContent", - "description": "The Extension API lets you read metadata about the currently running extension. Use it to implement version-aware behaviour or to identify which target is active when the same extension module is registered against multiple targets. Access these properties through `shopify.extension`.", - "isPublicDocs": true, - "members": [ + "name": "handle", + "value": "string", + "description": "The handle identifier for the shipping method.", + "isOptional": true + }, { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "The API version that was set in the extension configuration file.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "'2026-01', '2026-04'", - "title": "Example" - } - ] - } - ] + "name": "methodType", + "value": "'SHIPPING' | 'RETAIL'", + "description": "The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:\n- `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.\n- `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location." }, { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "T", - "description": "The extension target that is currently running, as configured in the extension's `shopify.extension.toml` file.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "'pos.home.tile.render', 'pos.home.modal.render'", - "title": "Example" - } - ] - } - ] - } - ], - "value": "export interface ExtensionApiContent {\n /**\n * The API version that was set in the extension configuration file.\n *\n * @example '2026-01', '2026-04'\n */\n apiVersion: ApiVersion;\n /**\n * The extension target that is currently running, as configured in the\n * extension's `shopify.extension.toml` file.\n *\n * @example 'pos.home.tile.render', 'pos.home.modal.render'\n */\n target: T;\n}" - } - }, - "ApiVersion": { - "src/shared.ts": { - "filePath": "src/shared.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ApiVersion", - "value": "'2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '2025-01' | '2025-04' | 'unstable' | '2025-07' | '2025-10' | '2026-01' | '2026-04' | '2026-07'", - "description": "The supported GraphQL Admin API versions. Use this to specify which API version your GraphQL queries should execute against. Each version includes specific features, bug fixes, and breaking changes. The `unstable` version provides access to the latest features but may change without notice." - } - }, - "ExtensionApi": { - "src/surfaces/point-of-sale/api/extension-api/extension-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", - "name": "ExtensionApi", - "description": "The `ExtensionApi` object provides metadata about the currently running extension, including the configured API version and the active extension target. Access these properties through `shopify.extension`.", - "isPublicDocs": true, - "members": [ + "name": "price", + "value": "Money", + "description": "The price of the shipping as a Money object." + }, { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "extension", - "value": "ExtensionApiContent", - "description": "" + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing tax breakdown.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "syntaxKind": "PropertySignature", + "name": "title", + "value": "string", + "description": "The display title of the shipping method.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "'Calculated'", + "description": "The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators." } ], - "value": "export interface ExtensionApi {\n extension: ExtensionApiContent;\n}" + "value": "export interface CalculatedShippingLine extends ShippingLine {\n /**\n * The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators.\n */\n type: 'Calculated';\n /**\n * The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:\n * - `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.\n * - `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location.\n */\n methodType: 'SHIPPING' | 'RETAIL';\n}" } }, - "LocaleApiContent": { - "src/surfaces/point-of-sale/api/locale-api/locale-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", - "name": "LocaleApiContent", - "description": "The `LocaleApi` object provides the current locale and locale updates.", + "CustomShippingLine": { + "src/surfaces/point-of-sale/types/shipping-line.ts": { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "name": "CustomShippingLine", + "description": "Represents a custom shipping line with merchant-defined shipping charges.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "current", - "value": "ReadonlySignalLike", - "description": "Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings." - } - ], - "value": "export interface LocaleApiContent {\n /**\n * Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings.\n */\n current: ReadonlySignalLike;\n}" - } - }, - "LocaleApi": { - "src/surfaces/point-of-sale/api/locale-api/locale-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", - "name": "LocaleApi", - "description": "The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `shopify.locale` to retrieve and monitor locale data.", - "isPublicDocs": true, - "members": [ + "name": "handle", + "value": "string", + "description": "The handle identifier for the shipping method.", + "isOptional": true + }, { - "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "locale", - "value": "LocaleApiContent", - "description": "The `LocaleApi` object provides the current locale and locale updates." - } - ], - "value": "export interface LocaleApi {\n locale: LocaleApiContent;\n}" - } - }, - "StaffMember": { - "src/surfaces/point-of-sale/types/session.ts": { - "filePath": "src/surfaces/point-of-sale/types/session.ts", - "name": "StaffMember", - "description": "Defines a staff member in POS.", - "isPublicDocs": true, - "members": [ + "name": "price", + "value": "Money", + "description": "The price of the shipping as a Money object." + }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The staff member ID." + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing tax breakdown.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "syntaxKind": "PropertySignature", + "name": "title", + "value": "string", + "description": "The display title of the shipping method.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "'Custom'", + "description": "The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems." } ], - "value": "export interface StaffMember {\n /**\n * The staff member ID.\n */\n id: number;\n}" + "value": "export interface CustomShippingLine extends ShippingLine {\n /**\n * The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems.\n */\n type: 'Custom';\n}" } }, - "Session": { - "src/surfaces/point-of-sale/types/session.ts": { - "filePath": "src/surfaces/point-of-sale/types/session.ts", - "name": "Session", - "description": "Defines information about the current POS session.", - "isPublicDocs": true, + "TransactionCompleteEvent": { + "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "TransactionCompleteEvent", + "value": "SaleCompleteEvent | ReturnCompleteEvent | ExchangeCompleteEvent", + "description": "Dispatched when a sale, return, or exchange transaction completes.\n\nNarrow on `transactionType` to access per-type fields.", + "isPublicDocs": true + } + }, + "SaleCompleteEvent": { + "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "name": "SaleCompleteEvent", + "description": "Dispatched when a sale transaction completes.", "members": [ { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "currency", - "value": "CurrencyCode", - "description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS." + "name": "AT_TARGET", + "value": "2", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "locationId", - "value": "number", - "description": "The location ID associated with the POS device's current location." + "name": "balanceDue", + "value": "Money", + "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "posVersion", - "value": "string", - "description": "The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running." + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "shopDomain", - "value": "string", - "description": "The shop domain associated with the shop currently logged into POS." + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "shopId", - "value": "number", - "description": "The shop ID associated with the shop currently logged into POS." + "name": "cancelable", + "value": "boolean", + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "staffMemberId", - "value": "number", - "description": "The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.", - "isOptional": true, - "deprecationMessage": "Use `session.staffMember` on the Session API instead." + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "userId", - "value": "number", - "description": "The user ID associated with the Shopify account currently authenticated on POS." - } - ], - "value": "export interface Session {\n /**\n * The shop ID associated with the shop currently logged into POS.\n */\n shopId: number;\n\n /**\n * The user ID associated with the Shopify account currently authenticated on POS.\n */\n userId: number;\n\n /**\n * The shop domain associated with the shop currently logged into POS.\n */\n shopDomain: string;\n\n /**\n * The location ID associated with the POS device's current location.\n */\n locationId: number;\n\n /**\n * The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.\n *\n * @deprecated Use `session.staffMember` on the Session API instead.\n */\n staffMemberId?: number;\n\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: CurrencyCode;\n\n /**\n * The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running.\n */\n posVersion: string;\n}" - } - }, - "CurrencyCode": { - "src/shared.ts": { - "filePath": "src/shared.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "CurrencyCode", - "value": "'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'", - "description": "" - } - }, - "SessionApiContent": { - "src/surfaces/point-of-sale/api/session-api/session-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", - "name": "SessionApiContent", - "description": "The `SessionApi` object provides session details and authentication methods.", - "isPublicDocs": true, - "members": [ + "name": "CAPTURING_PHASE", + "value": "1", + "description": "" + }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "currentSession", - "value": "Session", - "description": "Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change." + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "deviceId", - "value": "number", - "description": "The numeric ID of the device running this session.\n\nUse this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "123456", - "title": "Example" - } - ] - } - ] + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", - "syntaxKind": "PropertySignature", - "name": "getSessionToken", - "value": "() => Promise", - "description": "Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "staffMember", - "value": "ReadonlySignalLike", - "description": "Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in." - } - ], - "value": "export interface SessionApiContent {\n /**\n * Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change.\n */\n currentSession: Session;\n /**\n * Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in.\n */\n staffMember: ReadonlySignalLike;\n /**\n * Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member.\n */\n getSessionToken: () => Promise;\n /**\n * The numeric ID of the device running this session.\n *\n * Use this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.\n *\n * @example 123456\n * @see [Global IDs documentation](/docs/api/usage/gids) for more about GID format and structure\n * @see [device.getDeviceId()](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) for physical device identifier (UUID format)\n */\n deviceId: number;\n}" - } - }, - "SessionApi": { - "src/surfaces/point-of-sale/api/session-api/session-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", - "name": "SessionApi", - "description": "The `SessionApi` object provides access to current session information and authentication methods. Access these properties and methods through `shopify.session` to retrieve shop data and generate secure tokens. These methods enable secure API calls while maintaining user privacy and [app permissions](https://help.shopify.com/manual/your-account/users/roles/permissions/store-permissions#apps-and-channels-permissions).", - "isPublicDocs": true, - "members": [ + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "session", - "value": "SessionApiContent", - "description": "The `SessionApi` object provides session details and authentication methods." - } - ], - "value": "export interface SessionApi {\n session: SessionApiContent;\n}" - } - }, - "ToastApiContent": { - "src/surfaces/point-of-sale/api/toast-api/toast-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", - "name": "ToastApiContent", - "description": "The `ToastApi` object provides methods for showing toast notifications.", - "isPublicDocs": true, - "members": [ + "name": "customer", + "value": "Customer", + "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", + "isOptional": true + }, { - "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "show", - "value": "(content: string) => void", - "description": "Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow." - } - ], - "value": "export interface ToastApiContent {\n /**\n * Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow.\n *\n * @param content The text content to display.\n */\n show: (content: string) => void;\n}" - } - }, - "ToastApi": { - "src/surfaces/point-of-sale/api/toast-api/toast-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", - "name": "ToastApi", - "description": "The `ToastApi` object provides methods for displaying temporary notification messages. Access these methods through `shopify.toast` to show user feedback and status updates.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", - "syntaxKind": "PropertySignature", - "name": "toast", - "value": "ToastApiContent", - "description": "The `ToastApi` object provides methods for showing toast notifications." - } - ], - "value": "export interface ToastApi {\n toast: ToastApiContent;\n}" - } - }, - "MultipleResourceResult": { - "src/surfaces/point-of-sale/types/multiple-resource-result.ts": { - "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", - "name": "MultipleResourceResult", - "description": "Represents the result of a bulk resource lookup operation. Contains successfully found resources and identifiers for resources that were not found.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", - "syntaxKind": "PropertySignature", - "name": "fetchedResources", - "value": "T[]", - "description": "The resources that were fetched using the IDs provided." - }, - { - "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", - "syntaxKind": "PropertySignature", - "name": "idsForResourcesNotFound", - "value": "number[]", - "description": "The IDs for which a resource was not found." - } - ], - "value": "export interface MultipleResourceResult {\n /**\n * The resources that were fetched using the IDs provided.\n */\n fetchedResources: T[];\n /**\n * The IDs for which a resource was not found.\n */\n idsForResourcesNotFound: number[];\n}" - } - }, - "PaginatedResult": { - "src/surfaces/point-of-sale/types/paginated-result.ts": { - "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", - "name": "PaginatedResult", - "description": "Represents the result of a paginated query. Contains the data items, pagination cursors for navigating pages, and information about whether more results exist.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", - "syntaxKind": "PropertySignature", - "name": "hasNextPage", + "name": "defaultPrevented", "value": "boolean", - "description": "Whether or not there is another page of results that can be fetched." + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "items", - "value": "T[]", - "description": "The items returned from the fetch." + "name": "discounts", + "value": "Discount[]", + "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." }, { - "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "lastCursor", + "name": "draftCheckoutUuid", "value": "string", - "description": "The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.", + "description": "The UUID of the draft order's checkout. Set when the sale originated from a draft order; `undefined` otherwise.", "isOptional": true - } - ], - "value": "export interface PaginatedResult {\n /**\n * The items returned from the fetch.\n */\n items: T[];\n\n /**\n * The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.\n */\n lastCursor?: string;\n\n /**\n * Whether or not there is another page of results that can be fetched.\n */\n hasNextPage: boolean;\n}" - } - }, - "Product": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "name": "Product", - "description": "Represents comprehensive product information including metadata, pricing, variants, and availability. Contains all data needed to display and work with products in the POS interface.", - "isPublicDocs": true, - "members": [ + }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "createdAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing \"new product\" features, or tracking product catalog growth over time." + "name": "eventPhase", + "value": "number", + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "description", + "name": "executedAt", "value": "string", - "description": "The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing." + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "descriptionHtml", - "value": "string", - "description": "The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface." + "name": "grandTotal", + "value": "Money", + "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "featuredImage", - "value": "string", - "description": "The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.", - "isOptional": true + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "hasInStockVariants", + "name": "isTrusted", "value": "boolean", - "description": "Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.", - "isOptional": true + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "hasOnlyDefaultVariant", - "value": "boolean", - "description": "Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products." + "name": "lineItems", + "value": "LineItem[]", + "description": "An array of line items included in the sale transaction." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "hasSellingPlanGroups", - "value": "boolean", - "description": "Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.", - "isOptional": true + "name": "NONE", + "value": "0", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "id", + "name": "orderId", "value": "number", - "description": "The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations." + "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "isGiftCard", - "value": "boolean", - "description": "Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces." + "name": "paymentMethods", + "value": "Payment[]", + "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "maxVariantPrice", - "value": "string", - "description": "The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "minVariantPrice", - "value": "string", - "description": "The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings." + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "numVariants", - "value": "number", - "description": "The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies." + "name": "shippingLines", + "value": "ShippingLine[]", + "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "onlineStoreUrl", - "value": "string", - "description": "The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.", - "isOptional": true + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "options", - "value": "ProductOption[]", - "description": "An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "productCategory", - "value": "string", - "description": "The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "productType", - "value": "string", - "description": "The product type category as defined by the merchant (For example, \"T-Shirt,\" \"Electronics,\" \"Books\"). Use for product categorization, filtering, or implementing category-specific business logic." + "name": "subtotal", + "value": "Money", + "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "requiresSellingPlan", - "value": "boolean", - "description": "Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.", - "isOptional": true + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "tags", - "value": "string[]", - "description": "An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions." + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize." + "name": "taxTotal", + "value": "Money", + "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "totalAvailableInventory", - "value": "number", - "description": "The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "totalInventory", - "value": "number", - "description": "The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts." - }, - { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "tracksInventory", - "value": "boolean", - "description": "Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic." + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "updatedAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features." + "name": "tipAmount", + "value": "Money", + "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "variants", - "value": "ProductVariant[]", - "description": "An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality." + "name": "transactionType", + "value": "'Sale'", + "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "vendor", + "name": "type", "value": "string", - "description": "The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier." + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface Product {\n /**\n * The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing \"new product\" features, or tracking product catalog growth over time.\n */\n createdAt: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features.\n */\n updatedAt: string;\n /**\n * The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize.\n */\n title: string;\n /**\n * The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing.\n */\n description: string;\n /**\n * The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface.\n */\n descriptionHtml: string;\n /**\n * The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.\n */\n featuredImage?: string;\n /**\n * Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces.\n */\n isGiftCard: boolean;\n /**\n * Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic.\n */\n tracksInventory: boolean;\n /**\n * The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier.\n */\n vendor: string;\n /**\n * The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings.\n */\n minVariantPrice: string;\n /**\n * The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants.\n */\n maxVariantPrice: string;\n /**\n * The product type category as defined by the merchant (For example, \"T-Shirt,\" \"Electronics,\" \"Books\"). Use for product categorization, filtering, or implementing category-specific business logic.\n */\n productType: string;\n /**\n * The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories.\n */\n productCategory: string;\n /**\n * An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions.\n */\n tags: string[];\n /**\n * The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies.\n */\n numVariants: number;\n /**\n * The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.\n */\n totalAvailableInventory?: number;\n /**\n * The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts.\n */\n totalInventory: number;\n /**\n * An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality.\n */\n variants: ProductVariant[];\n /**\n * An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities.\n */\n options: ProductOption[];\n /**\n * Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products.\n */\n hasOnlyDefaultVariant: boolean;\n /**\n * Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.\n */\n hasInStockVariants?: boolean;\n /**\n * The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.\n */\n onlineStoreUrl?: string;\n /**\n * Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.\n */\n requiresSellingPlan?: boolean;\n /**\n * Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.\n */\n hasSellingPlanGroups?: boolean;\n}" + "value": "interface SaleCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Sale';\n /**\n * The UUID of the draft order's checkout. Set when the sale originated from\n * a draft order; `undefined` otherwise.\n */\n readonly draftCheckoutUuid?: string;\n /**\n * An array of line items included in the sale transaction.\n */\n readonly lineItems: LineItem[];\n}" } }, - "ProductOption": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "name": "ProductOption", - "description": "Represents a product option definition showing one of the configurable attributes for a product (like Size, Color, Material) along with all the possible values customers can choose from. Products can have up to 3 options.", - "isPublicDocs": true, + "ReturnCompleteEvent": { + "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "name": "ReturnCompleteEvent", + "description": "Dispatched when a return transaction completes.", "members": [ { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems." + "name": "AT_TARGET", + "value": "2", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type." + "name": "balanceDue", + "value": "Money", + "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "optionValues", - "value": "string[]", - "description": "An array of all available values for this option that customers can choose from (for example, `[\"Small\", \"Medium\", \"Large\", \"X-Large\"]` for a Size option, or `[\"Red\", \"Blue\", \"Green\", \"Black\"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute." + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "productId", - "value": "number", - "description": "The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management." - } - ], - "value": "export interface ProductOption {\n /**\n * The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems.\n */\n id: number;\n /**\n * The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type.\n */\n name: string;\n /**\n * An array of all available values for this option that customers can choose from (for example, `[\"Small\", \"Medium\", \"Large\", \"X-Large\"]` for a Size option, or `[\"Red\", \"Blue\", \"Green\", \"Black\"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute.\n */\n optionValues: string[];\n /**\n * The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management.\n */\n productId: number;\n}" - } - }, - "ProductVariant": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "name": "ProductVariant", - "description": "Represents a specific variant of a product with its own SKU, price, and inventory. Contains variant-specific attributes including options, availability, and identification data.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "barcode", - "value": "string", - "description": "The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.", - "isOptional": true + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "compareAtPrice", - "value": "string", - "description": "The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.", - "isOptional": true + "name": "cancelable", + "value": "boolean", + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "createdAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing \"new product\" features, or tracking product catalog changes over time." + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "displayName", - "value": "string", - "description": "The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays." + "name": "CAPTURING_PHASE", + "value": "1", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "hasInStockVariants", - "value": "boolean", - "description": "Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems." + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "image", - "value": "string", - "description": "The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.", - "isOptional": true + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "inventoryAtAllLocations", - "value": "number", - "description": "The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.", - "isOptional": true + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "inventoryAtLocation", - "value": "number", - "description": "The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.", + "name": "customer", + "value": "Customer", + "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "inventoryIsTracked", + "name": "defaultPrevented", "value": "boolean", - "description": "Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant." + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "inventoryPolicy", - "value": "ProductVariantInventoryPolicy", - "description": "The inventory policy for this variant, either \"DENY\" (prevent sales when out of stock) or \"CONTINUE\" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items." + "name": "discounts", + "value": "Discount[]", + "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "options", - "value": "ProductVariantOption[]", - "description": "An array of option name-value pairs that define this variant's configuration. For example, `[{name: \"Size,\" value: \"Large\"}, {name: \"Color,\" value: \"Blue\"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.", - "isOptional": true + "name": "eventPhase", + "value": "number", + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "position", + "name": "exchangeId", "value": "number", - "description": "The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic." + "description": "The exchange ID when this return is the gift-card side of an exchange; `undefined` for standalone returns.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "price", + "name": "executedAt", "value": "string", - "description": "The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant." + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "product", - "value": "Product", - "description": "Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.", - "isOptional": true + "name": "grandTotal", + "value": "Money", + "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "productId", - "value": "number", - "description": "The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "sku", - "value": "string", - "description": "The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.", - "isOptional": true + "name": "isTrusted", + "value": "boolean", + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "taxable", - "value": "boolean", - "description": "Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling." + "name": "lineItems", + "value": "LineItem[]", + "description": "An array of line items included in the return transaction." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The variant's display title, typically showing the option combinations. For example, `\"Large / Blue\"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants." + "name": "NONE", + "value": "0", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "updatedAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features." - } - ], - "value": "export interface ProductVariant {\n /**\n * The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing \"new product\" features, or tracking product catalog changes over time.\n */\n createdAt: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features.\n */\n updatedAt: string;\n /**\n * The variant's display title, typically showing the option combinations. For example, `\"Large / Blue\"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants.\n */\n title: string;\n /**\n * The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant.\n */\n price: string;\n /**\n * The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.\n */\n compareAtPrice?: string;\n /**\n * Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling.\n */\n taxable: boolean;\n /**\n * The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.\n */\n sku?: string;\n /**\n * The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.\n */\n barcode?: string;\n /**\n * The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays.\n */\n displayName: string;\n /**\n * The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.\n */\n image?: string;\n /**\n * Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant.\n */\n inventoryIsTracked: boolean;\n /**\n * The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.\n */\n inventoryAtLocation?: number;\n /**\n * The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.\n */\n inventoryAtAllLocations?: number;\n /**\n * The inventory policy for this variant, either \"DENY\" (prevent sales when out of stock) or \"CONTINUE\" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items.\n */\n inventoryPolicy: ProductVariantInventoryPolicy;\n /**\n * Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.\n */\n hasInStockVariants?: boolean;\n /**\n * An array of option name-value pairs that define this variant's configuration. For example, `[{name: \"Size,\" value: \"Large\"}, {name: \"Color,\" value: \"Blue\"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.\n */\n options?: ProductVariantOption[];\n /**\n * Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.\n */\n product?: Product;\n /**\n * The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product.\n */\n productId: number;\n /**\n * The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic.\n */\n position: number;\n}" - } - }, - "ProductVariantInventoryPolicy": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ProductVariantInventoryPolicy", - "value": "'DENY' | 'CONTINUE'", - "description": "The inventory policy determining whether sales can continue when a variant has no inventory available:\n- `'DENY'`: Sales are prevented when inventory reaches zero. Customers can't purchase out-of-stock variants. The \"Add to cart\" action is disabled or shows \"Out of stock\". This is the default and recommended policy for most physical products to prevent overselling.\n- `'CONTINUE'`: Sales are allowed even when inventory is zero or negative. Customers can purchase out-of-stock variants, creating backorders. This enables pre-orders, made-to-order products, or drop-shipped items where inventory tracking is less critical.", - "isPublicDocs": true - } - }, - "ProductVariantOption": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "name": "ProductVariantOption", - "description": "Represents a single option selection for a product variant, showing one chosen value from a product's configuration options. For example, if a product has Size and Color options, a variant might have one option for Size=Large and another for Color=Blue.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type." + "name": "orderId", + "value": "number", + "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "value", - "value": "string", - "description": "The selected value for this option that defines this specific variant (for example, \"Large\", \"Blue\", \"Cotton\", \"V-Neck\"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is \"Size\", the `value` might be \"Large\" or \"Small\". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration (\"Size: Large, Color: Blue\"), building variant selection dropdowns, or matching user selections to variants." - } - ], - "value": "export interface ProductVariantOption {\n /**\n * The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type.\n */\n name: string;\n /**\n * The selected value for this option that defines this specific variant (for example, \"Large\", \"Blue\", \"Cotton\", \"V-Neck\"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is \"Size\", the `value` might be \"Large\" or \"Small\". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration (\"Size: Large, Color: Blue\"), building variant selection dropdowns, or matching user selections to variants.\n */\n value: string;\n}" - } - }, - "ProductSortType": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ProductSortType", - "value": "'RECENTLY_ADDED' | 'RECENTLY_ADDED_ASCENDING' | 'ALPHABETICAL_A_TO_Z' | 'ALPHABETICAL_Z_TO_A'", - "description": "", - "isPublicDocs": true - } - }, - "PaginationParams": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "name": "PaginationParams", - "description": "Specifies parameters for cursor-based pagination. Includes the cursor position and the number of results to retrieve per page.", - "isPublicDocs": true, - "members": [ + "name": "paymentMethods", + "value": "Payment[]", + "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." + }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "PropertySignature", - "name": "afterCursor", - "value": "string", - "description": "Specifies the page cursor. Items after this cursor will be returned.", - "isOptional": true + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "first", + "name": "refundId", "value": "number", - "description": "Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.", + "description": "The refund ID. `undefined` when the return did not issue a refund (for example, store-credit-only returns).", "isOptional": true - } - ], - "value": "export interface PaginationParams {\n /**\n * Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.\n */\n first?: number;\n /**\n * Specifies the page cursor. Items after this cursor will be returned.\n */\n afterCursor?: string;\n}" - } - }, - "ProductSearchParams": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "name": "ProductSearchParams", - "description": "Specifies the parameters for searching products. Includes query text, pagination options, and sorting preferences for product search operations.", - "isPublicDocs": true, - "members": [ + }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "afterCursor", - "value": "string", - "description": "Specifies the page cursor. Items after this cursor will be returned.", + "name": "returnId", + "value": "number", + "description": "The return ID for the completed return transaction.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "first", - "value": "number", - "description": "Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.", - "isOptional": true + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "queryString", - "value": "string", - "description": "The search term to be used to search for POS products.", - "isOptional": true + "name": "shippingLines", + "value": "ShippingLine[]", + "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "sortType", - "value": "ProductSortType", - "description": "Specifies the order in which products should be sorted. When a `queryString` is provided, sortType will not have any effect, as the results will be returned in order by relevance to the `queryString`.", - "isOptional": true - } - ], - "value": "export interface ProductSearchParams extends PaginationParams {\n /**\n * The search term to be used to search for POS products.\n */\n queryString?: string;\n /**\n * Specifies the order in which products should be sorted. When a `queryString` is provided, sortType will not have any effect, as the results will be returned in order by relevance to the `queryString`.\n */\n sortType?: ProductSortType;\n}" - } - }, - "ProductSearchApiContent": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "name": "ProductSearchApiContent", - "description": "The `ProductSearchApi` object provides product search and lookup methods.", - "isPublicDocs": true, - "members": [ + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", - "name": "fetchPaginatedProductVariantsWithProductId", - "value": "(productId: number, paginationParams: PaginationParams) => Promise>", - "description": "Retrieves product variants for a specific product with pagination support. Use when a product has many variants and you need to load them incrementally for better performance. Ideal for products with extensive variant collections that would be too large to load at once." + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", - "name": "fetchProductsWithIds", - "value": "(productIds: number[]) => Promise>", - "description": "Retrieves detailed information for multiple products by their IDs. Limited to 50 products maximum—additional IDs are automatically removed. Returns results with both found and not found products clearly identified. Use for bulk product lookups, building product collections, or validating product lists." + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchProductVariantsWithIds", - "value": "(productVariantIds: number[]) => Promise>", - "description": "Retrieves detailed information for multiple product variants by their IDs. Limited to 50 variants maximum—additional IDs are automatically removed. Returns results with both found and not found variants clearly identified. Use for bulk variant lookups or building variant-specific collections." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "subtotal", + "value": "Money", + "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchProductVariantsWithProductId", - "value": "(productId: number) => Promise", - "description": "Retrieves all product variants associated with a specific product ID. Returns all variants at once without pagination. Use for displaying complete variant options, building variant selectors, or analyzing all available configurations for a product." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchProductVariantWithId", - "value": "(productVariantId: number) => Promise", - "description": "Retrieves detailed information for a single product variant by its ID. Returns `undefined` if the variant doesn't exist or isn't available. Use for displaying variant-specific details like pricing, inventory, or options when working with specific product configurations." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchProductWithId", - "value": "(productId: number) => Promise", - "description": "Retrieves detailed information for a single product by its ID. Returns `undefined` if the product doesn't exist or isn't available on the POS device. Use for displaying product details, validating product availability, or building product-specific workflows." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "taxTotal", + "value": "Money", + "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "searchProducts", - "value": "(searchParams: ProductSearchParams) => Promise>", - "description": "Searches for products on the POS device using text queries and sorting options. Returns paginated results with up to 50 products per page. When a query string is provided, results are sorted by relevance. Use for implementing custom search interfaces, product discovery features, or filtered product listings." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "tipAmount", + "value": "Money", + "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "transactionType", + "value": "'Return'", + "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "string", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface ProductSearchApiContent {\n /**\n * Searches for products on the POS device using text queries and sorting options. Returns paginated results with up to 50 products per page. When a query string is provided, results are sorted by relevance. Use for implementing custom search interfaces, product discovery features, or filtered product listings.\n *\n * @param searchParams The parameters for the product search.\n */\n searchProducts(\n searchParams: ProductSearchParams,\n ): Promise>;\n\n /**\n * Retrieves detailed information for a single product by its ID. Returns `undefined` if the product doesn't exist or isn't available on the POS device. Use for displaying product details, validating product availability, or building product-specific workflows.\n *\n * @param productId The ID of the product to lookup.\n */\n fetchProductWithId(productId: number): Promise;\n\n /**\n * Retrieves detailed information for multiple products by their IDs. Limited to 50 products maximum—additional IDs are automatically removed. Returns results with both found and not found products clearly identified. Use for bulk product lookups, building product collections, or validating product lists.\n *\n * @param productIds Specifies the array of product IDs to lookup. This is limited to 50 products. All excess requested IDs will be removed from the array.\n */\n fetchProductsWithIds(\n productIds: number[],\n ): Promise>;\n\n /**\n * Retrieves detailed information for a single product variant by its ID. Returns `undefined` if the variant doesn't exist or isn't available. Use for displaying variant-specific details like pricing, inventory, or options when working with specific product configurations.\n *\n * @param productVariantId The ID of the product variant to lookup.\n */\n fetchProductVariantWithId(\n productVariantId: number,\n ): Promise;\n\n /**\n * Retrieves detailed information for multiple product variants by their IDs. Limited to 50 variants maximum—additional IDs are automatically removed. Returns results with both found and not found variants clearly identified. Use for bulk variant lookups or building variant-specific collections.\n *\n * @param productVariantIds Specifies the array of product variant IDs to lookup. This is limited to 50 product variants. All excess requested IDs will be removed from the array.\n */\n fetchProductVariantsWithIds(\n productVariantIds: number[],\n ): Promise>;\n\n /**\n * Retrieves all product variants associated with a specific product ID. Returns all variants at once without pagination. Use for displaying complete variant options, building variant selectors, or analyzing all available configurations for a product.\n *\n * @param productId The product ID. All variants' details associated with this product ID are returned.\n */\n fetchProductVariantsWithProductId(\n productId: number,\n ): Promise;\n\n /**\n * Retrieves product variants for a specific product with pagination support. Use when a product has many variants and you need to load them incrementally for better performance. Ideal for products with extensive variant collections that would be too large to load at once.\n *\n * @param paginationParams The parameters for pagination.\n */\n fetchPaginatedProductVariantsWithProductId(\n productId: number,\n paginationParams: PaginationParams,\n ): Promise>;\n}" + "value": "interface ReturnCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Return';\n /**\n * The refund ID. `undefined` when the return did not issue a refund\n * (for example, store-credit-only returns).\n */\n readonly refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n readonly returnId?: number;\n /**\n * The exchange ID when this return is the gift-card side of an exchange;\n * `undefined` for standalone returns.\n */\n readonly exchangeId?: number;\n /**\n * An array of line items included in the return transaction.\n */\n readonly lineItems: LineItem[];\n}" } }, - "ProductSearchApi": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "name": "ProductSearchApi", - "description": "The `ProductSearchApi` object provides methods for searching and retrieving product information. Access these methods through `shopify.productSearch` to search products and fetch detailed product data.", - "isPublicDocs": true, + "ExchangeCompleteEvent": { + "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "name": "ExchangeCompleteEvent", + "description": "Dispatched when an exchange transaction completes.", "members": [ { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "productSearch", - "value": "ProductSearchApiContent", - "description": "The `ProductSearchApi` object provides product search and lookup methods." - } - ], - "value": "export interface ProductSearchApi {\n productSearch: ProductSearchApiContent;\n}" - } - }, - "PrintApiContent": { - "src/surfaces/point-of-sale/api/print-api/print-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", - "name": "PrintApiContent", - "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.", - "isPublicDocs": true, - "members": [ + "name": "AT_TARGET", + "value": "2", + "description": "" + }, { - "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", - "syntaxKind": "MethodSignature", - "name": "print", - "value": "(src: string) => Promise", - "description": "Triggers a print dialog for the specified document source. The `print()` method accepts either:\n\n• A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n\n• A full URL to your app's backend that will be used to return the document to print\n\nReturns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports." - } - ], - "value": "export interface PrintApiContent {\n /**\n * Triggers a print dialog for the specified document source. The `print()` method accepts either:\n *\n * • A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n *\n * • A full URL to your app's backend that will be used to return the document to print\n *\n * Returns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports.\n *\n * @param src the source URL of the content to print.\n * @returns Promise that resolves when content is ready and native print dialog appears.\n */\n print(src: string): Promise;\n}" - } - }, - "PrintApi": { - "src/surfaces/point-of-sale/api/print-api/print-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", - "name": "PrintApi", - "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.", - "isPublicDocs": true, - "members": [ + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "balanceDue", + "value": "Money", + "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." + }, { - "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "print", - "value": "PrintApiContent", - "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types." - } - ], - "value": "export interface PrintApi {\n /**\n * The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.\n */\n print: PrintApiContent;\n}" - } - }, - "StorageError": { - "src/surfaces/point-of-sale/types/storage.ts": { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "name": "StorageError", - "description": "", - "isPublicDocs": true, - "members": [ + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "PropertyDeclaration", - "name": "name", - "value": "string", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "BUBBLING_PHASE", + "value": "3", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "Parameter", - "name": "code", - "value": "\"RecordsCount\" | \"RecordSize\" | \"KeyType\" | \"KeySize\"", - "description": "" + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "cancelable", + "value": "boolean", + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "message", - "value": "string", + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "CAPTURING_PHASE", + "value": "1", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "stack", - "value": "string", - "description": "", + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", "isOptional": true - } - ], - "value": "export class StorageError extends Error {\n public name = 'StorageError';\n constructor(\n public code: 'RecordsCount' | 'RecordSize' | 'KeyType' | 'KeySize',\n message: string,\n ) {\n super(message);\n }\n}" - } - }, - "Storage": { - "src/surfaces/point-of-sale/types/storage.ts": { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "name": "Storage", - "description": "Defines the storage interface for persisting extension data across sessions.", - "isPublicDocs": true, - "members": [ + }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "clear", - "value": "() => Promise", - "description": "Clears all data from storage, removing all key-value pairs." + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", - "name": "delete", - "value": "(key: Keys) => Promise", - "description": "Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes." + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "MethodSignature", - "name": "entries", - "value": "() => Promise<[Keys, StorageTypes[Keys]][]>", - "description": "Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "MethodSignature", - "name": "get", - "value": "(key: Keys) => Promise", - "description": "Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "customer", + "value": "Customer", + "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "MethodSignature", - "name": "set", - "value": "(key: Keys, value: StorageTypes[Keys]) => Promise", - "description": "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." - } - ], - "value": "export interface Storage<\n BaseStorageTypes extends Record = Record,\n> {\n /**\n * 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.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set for the key.\n * @throws StorageError when:\n * - Maximum number of records is exceeded (`code: 'RecordsCount'`)\n * - Individual record size exceeds the limit (`code: 'RecordSize'`)\n * - Key is not a string (`code: 'KeyType'`)\n * - Key size exceeds the limit (`code: 'KeySize'`)\n */\n set<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n value: StorageTypes[Keys],\n ): Promise;\n\n /**\n * Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets.\n *\n * @param key - The key to get the value for.\n * @returns The value of the key.\n * @throws StorageError when the key isn't a string or exceeds its allotted size.\n */\n get<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n ): Promise;\n\n /**\n * Clears all data from storage, removing all key-value pairs.\n */\n clear: () => Promise;\n\n /**\n * Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes.\n *\n * @param key - The key to delete.\n */\n delete<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n ): Promise;\n\n /**\n * Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data.\n *\n * @returns An array containing all the keys and values in the storage.\n */\n entries<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(): Promise<[Keys, StorageTypes[Keys]][]>;\n}" - } - }, - "StorageApi": { - "src/surfaces/point-of-sale/api/storage-api/storage-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/storage-api/storage-api.ts", - "name": "StorageApi", - "description": "The `StorageApi` object provides access to persistent local storage methods for your POS UI extension. Access these methods through `shopify.storage` to store, retrieve, and manage data that persists across sessions.", - "isPublicDocs": true, - "members": [ + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "defaultPrevented", + "value": "boolean", + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" + }, { - "filePath": "src/surfaces/point-of-sale/api/storage-api/storage-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "storage", - "value": "Storage", - "description": "" - } - ], - "value": "export interface StorageApi {\n storage: Storage;\n}" - } - }, - "PinPadResult": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "name": "PinPadResult", - "description": "Represents the result of a PIN pad interaction, indicating whether PIN entry was completed and providing the entered PIN if available.", - "isPublicDocs": true, - "members": [ + "name": "discounts", + "value": "Discount[]", + "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." + }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "completed", - "value": "boolean", - "description": "Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal." + "name": "eventPhase", + "value": "number", + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "pin", - "value": "number[]", - "description": "The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN \"1234\"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.", - "isOptional": true - } - ], - "value": "export interface PinPadResult {\n /**\n * Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal.\n */\n completed: boolean;\n /**\n * The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN \"1234\"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.\n */\n pin?: number[];\n}" - } - }, - "PinValidationResult": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "PinValidationResult", - "value": "{result: 'accept'} | {result: 'reject'; errorMessage?: string}", - "description": "Represents the validation outcome for an entered PIN. Indicates whether the PIN should be accepted or rejected, with optional error messaging for rejected PINs.", - "isPublicDocs": true - } - }, - "PinLength": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "PinLength", - "value": "4 | 5 | 6 | 7 | 8 | 9 | 10", - "description": "The valid PIN length values (4-10 digits). Commonly used to configure minimum and maximum PIN length requirements.", - "isPublicDocs": true - } - }, - "PinPadActionType": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "name": "PinPadActionType", - "description": "Defines a custom action button for the PIN pad interface with a label and click handler.", - "isPublicDocs": true, - "members": [ + "name": "exchangeId", + "value": "number", + "description": "The exchange ID linking the return and sale sides of the exchange." + }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "label", + "name": "executedAt", "value": "string", - "description": "The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for." + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "onClick", - "value": "() => number[] | Promise", - "description": "Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows." - } - ], - "value": "export interface PinPadActionType {\n /**\n * The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.\n */\n label: string;\n /**\n * Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows.\n */\n onClick: () => Promise | number[];\n}" - } - }, - "PinPadOptions": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "name": "PinPadOptions", - "description": "Specifies configuration options for displaying the PIN pad interface. Includes callback functions for PIN entry events, dismissal handling, and customizable labels and messaging.", - "isPublicDocs": true, - "members": [ + "name": "grandTotal", + "value": "Money", + "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." + }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "autoSubmit", + "name": "isTrusted", "value": "boolean", - "description": "Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.", - "isOptional": true, - "defaultValue": "false" + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "label", - "value": "string", - "description": "The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.", - "isOptional": true + "name": "lineItemsAdded", + "value": "LineItem[]", + "description": "An array of line items added to the customer in the exchange." }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "masked", - "value": "boolean", - "description": "Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.", - "isOptional": true, - "defaultValue": "true" + "name": "lineItemsRemoved", + "value": "LineItem[]", + "description": "An array of line items removed from the customer in the exchange." }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "maxPinLength", - "value": "PinLength", - "description": "The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.", - "isOptional": true, - "defaultValue": "6" + "name": "NONE", + "value": "0", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "minPinLength", - "value": "PinLength", - "description": "The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.", - "isOptional": true, - "defaultValue": "4" + "name": "orderId", + "value": "number", + "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "onDismissed", - "value": "(result: PinPadResult) => void", - "description": "The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.", - "isOptional": true + "name": "paymentMethods", + "value": "Payment[]", + "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "onPinEntry", - "value": "(pin: number[]) => void", - "description": "The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.", + "name": "returnId", + "value": "number", + "description": "The return-side ID. `undefined` when the exchange has no return side.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "pinPadAction", - "value": "PinPadActionType", - "description": "The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.", - "isOptional": true + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.", - "isOptional": true - } - ], - "value": "export interface PinPadOptions {\n /**\n * The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.\n */\n onPinEntry?: (pin: number[]) => void;\n /**\n * The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.\n */\n onDismissed?: (result: PinPadResult) => void;\n /**\n * The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.\n */\n label?: string;\n /**\n * Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.\n *\n * @default true\n */\n masked?: boolean;\n /**\n * The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.\n *\n * @default 4\n */\n minPinLength?: PinLength;\n /**\n * The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.\n *\n * @default 6\n */\n maxPinLength?: PinLength;\n /**\n * The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.\n */\n pinPadAction?: PinPadActionType;\n /**\n * The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.\n */\n title?: string;\n /**\n * Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.\n *\n * @default false\n */\n autoSubmit?: boolean;\n}" - } - }, - "PinPadApiContent": { - "src/surfaces/point-of-sale/api/pin-pad-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", - "name": "PinPadApiContent", - "description": "The `PinPadApi` object provides PIN entry and validation functionality.", - "isPublicDocs": true, - "members": [ + "name": "shippingLines", + "value": "ShippingLine[]", + "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." + }, { - "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", - "name": "showPinPad", - "value": "(onSubmit: (pin: number[]) => PinValidationResult | Promise, options?: PinPadOptions) => void", - "description": "Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.\n\n• **When accepted**: The modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.\n\n• **When rejected**: Displays the optional `errorMessage` and keeps the modal open.\n\nUse for implementing secure authentication workflows, access control, or PIN-based verification systems." - } - ], - "value": "export interface PinPadApiContent {\n /**\n * Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.\n *\n * • **When accepted**: The modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.\n *\n * • **When rejected**: Displays the optional `errorMessage` and keeps the modal open.\n *\n * Use for implementing secure authentication workflows, access control, or PIN-based verification systems.\n */\n showPinPad(\n onSubmit: (\n pin: number[],\n ) => Promise | PinValidationResult,\n options?: PinPadOptions,\n ): void;\n}" - } - }, - "PinPadApi": { - "src/surfaces/point-of-sale/api/pin-pad-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", - "name": "PinPadApi", - "description": "The `PinPadApi` object provides methods for displaying secure PIN entry interfaces. Access these methods through `shopify.pinPad` to show PIN pad modals and handle PIN validation.", - "isPublicDocs": true, - "members": [ + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + }, { - "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "pinPad", - "value": "PinPadApiContent", - "description": "The `PinPadApi` object provides PIN entry and validation functionality." - } - ], - "value": "export interface PinPadApi {\n pinPad: PinPadApiContent;\n}" - } - }, - "StandardApi": { - "src/surfaces/point-of-sale/api/standard/standard-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/standard/standard-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "StandardApi", - "value": "{[key: string]: any} & {\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & LocaleApi & ToastApi & SessionApi & PrintApi & ProductSearchApi & DeviceApi & ConnectivityApi & StorageApi & PinPadApi & CameraApi", - "description": "", - "isPublicDocs": true - } - }, - "I18n": { - "src/api.ts": { - "filePath": "src/api.ts", - "name": "I18n", - "description": "Internationalization utilities for formatting and translating content according to the user's locale. Use these methods to display numbers, currency, dates, and translated strings that match the merchant's language and regional preferences.", - "members": [ + "name": "subtotal", + "value": "Money", + "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." + }, { - "filePath": "src/api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "formatCurrency", - "value": "(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string", - "description": "Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default." + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" }, { - "filePath": "src/api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "formatDate", - "value": "(date: Date, options?: { inExtensionLocale?: boolean; } & DateTimeFormatOptions) => string", - "description": "Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style." + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." }, { - "filePath": "src/api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "formatNumber", - "value": "(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string", - "description": "Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default." + "name": "taxTotal", + "value": "Money", + "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." }, { - "filePath": "src/api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "translate", - "value": "I18nTranslate", - "description": "Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components." + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "tipAmount", + "value": "Money", + "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "transactionType", + "value": "'Exchange'", + "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "string", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface I18n {\n /**\n * Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default.\n *\n * @param number - The number to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.NumberFormatOptions for customizing the number format\n */\n formatNumber: (\n number: number | bigint,\n options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,\n ) => string;\n\n /**\n * Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default.\n *\n * @param number - The currency amount to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.NumberFormatOptions for customizing the currency format, such as the currency code\n */\n formatCurrency: (\n number: number | bigint,\n options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,\n ) => string;\n\n /**\n * Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style.\n *\n * @param date - The Date object to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.DateTimeFormatOptions for customizing the date format\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n formatDate: (\n date: Date,\n options?: {inExtensionLocale?: boolean} & Intl.DateTimeFormatOptions,\n ) => string;\n\n /**\n * Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components.\n */\n translate: I18nTranslate;\n}" - } - }, - "I18nTranslate": { - "src/api.ts": { - "filePath": "src/api.ts", - "name": "I18nTranslate", - "description": "The translation function signature for internationalization. Use this to translate string keys defined in your locale files into localized content for the current user's language.", - "members": [], - "value": "export interface I18nTranslate {\n /**\n * Returns a translated string matching a key in a locale file. Use this to display localized text in your extension based on the merchant's language preferences. Supports interpolation with replacement values and pluralization with the `count` option. Returns a string when replacements are primitives, or an array when replacements include UI components.\n *\n * @param key - The translation key from your locale file (for example, \"banner.title\")\n * @param options - Optional replacement values for interpolation or the special `count` property for pluralization\n *\n * @example translate(\"banner.title\")\n * @example translate(\"items.count\", { count: 5 })\n */\n (\n key: string,\n options?: Record,\n ): ReplacementType extends string | number\n ? string\n : (string | ReplacementType)[];\n}" + "value": "interface ExchangeCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Exchange';\n /**\n * The exchange ID linking the return and sale sides of the exchange.\n */\n readonly exchangeId: number;\n /**\n * The return-side ID. `undefined` when the exchange has no return side.\n */\n readonly returnId?: number;\n /**\n * An array of line items added to the customer in the exchange.\n */\n readonly lineItemsAdded: LineItem[];\n /**\n * An array of line items removed from the customer in the exchange.\n */\n readonly lineItemsRemoved: LineItem[];\n}" } }, - "ScannerSource": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ScannerSource", - "value": "'camera' | 'external' | 'embedded'", - "description": "The scanner source the POS device supports.", - "isPublicDocs": true - } - }, - "ScannerSubscriptionResult": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerSubscriptionResult", - "description": "Represents the data from a scanner event. Contains the scanned string data and the hardware source that captured the scan.", + "CashTrackingSessionStartEvent": { + "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts": { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "name": "CashTrackingSessionStartEvent", + "description": "Dispatched when a cash tracking session is opened.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "data", - "value": "string", - "description": "The string data from the last scanner event received. Contains the scanned barcode, QR code, or other scannable data. Returns `undefined` when no scan data is available. Use to process scanned content and implement scan-based business logic.", - "isOptional": true + "name": "AT_TARGET", + "value": "2", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "source", - "value": "ScannerSource", - "description": "The scanning source from which the scan event came. Returns one of the following scanner types:\n\n• `'camera'` - Built-in device camera used for scanning • `'external'` - External scanner hardware connected to the device • `'embedded'` - Embedded scanner hardware built into the device", - "isOptional": true - } - ], - "value": "export interface ScannerSubscriptionResult {\n /**\n * The string data from the last scanner event received. Contains the scanned barcode, QR code, or other scannable data. Returns `undefined` when no scan data is available. Use to process scanned content and implement scan-based business logic.\n */\n data?: string;\n /**\n * The scanning source from which the scan event came. Returns one of the following scanner types:\n *\n * • `'camera'` - Built-in device camera used for scanning\n * • `'external'` - External scanner hardware connected to the device\n * • `'embedded'` - Embedded scanner hardware built into the device\n */\n source?: ScannerSource;\n}" - } - }, - "ScannerSources": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerSources", - "description": "Represents the available scanner hardware sources on the device. Provides reactive access to the list of scanners that can be used for scanning operations.", - "isPublicDocs": true, - "members": [ + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "current", - "value": "ReadonlySignalLike", - "description": "Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available." - } - ], - "value": "export interface ScannerSources {\n /**\n * Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available.\n */\n current: ReadonlySignalLike;\n}" - } - }, - "ScannerData": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerData", - "description": "Represents the scanner interface for accessing scan events and subscription management. Provides real-time access to scanned data through a reactive signal pattern.", - "isPublicDocs": true, - "members": [ + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" + }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "current", - "value": "ReadonlySignalLike", - "description": "Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available." - } - ], - "value": "export interface ScannerData {\n /**\n * Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available.\n */\n current: ReadonlySignalLike;\n}" - } - }, - "ScannerApiContent": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerApiContent", - "description": "The `ScannerApi` object provides scan results and scanner controls.", - "isPublicDocs": true, - "members": [ + "name": "cancelable", + "value": "boolean", + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" + }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "hideCameraScanner", - "value": "() => void", - "description": "Hide the camera scanner." + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "scannerData", - "value": "ScannerData", - "description": "Access current scan data and subscribe to new scan events. Use to receive real-time scan results." + "name": "CAPTURING_PHASE", + "value": "1", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "showCameraScanner", - "value": "() => void", - "description": "Show the camera scanner." + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "syntaxKind": "PropertySignature", - "name": "sources", - "value": "ScannerSources", - "description": "Access available scanner sources on the device. Use to check which scanners are available (camera, external, or embedded)." - } - ], - "value": "export interface ScannerApiContent {\n /**\n * Access current scan data and subscribe to new scan events. Use to receive real-time scan results.\n */\n scannerData: ScannerData;\n /**\n * Access available scanner sources on the device. Use to check which scanners are available (camera, external, or embedded).\n */\n sources: ScannerSources;\n /**\n * Show the camera scanner.\n */\n showCameraScanner: () => void;\n /**\n * Hide the camera scanner.\n */\n hideCameraScanner: () => void;\n}" - } - }, - "ScannerApi": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerApi", - "description": "The `ScannerApi` object provides access to scanning functionality and scanner source information. Access these properties through `shopify.scanner` to monitor scan events and available scanner sources.", - "isPublicDocs": true, - "members": [ + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "scanner", - "value": "ScannerApiContent", - "description": "The `ScannerApi` object provides scan results and scanner controls." - } - ], - "value": "export interface ScannerApi {\n scanner: ScannerApiContent;\n}" - } - }, - "ActionTargetApi": { - "src/surfaces/point-of-sale/api/action-target-api/action-target-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/action-target-api/action-target-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ActionTargetApi", - "value": "{[key: string]: any} & {\n extensionPoint: T;\n} & StandardApi & ScannerApi", - "description": "", - "isPublicDocs": true - } - }, - "DataTargetApi": { - "src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "DataTargetApi", - "value": "{\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & SessionApi & StorageApi & LocaleApi & ConnectivityApi & DeviceApi & ProductSearchApi & ReadonlyCartApi", - "description": "API surface for non-rendering data extension targets.", - "isPublicDocs": true - } - }, - "PaymentMethod": { - "src/surfaces/point-of-sale/types/payment.ts": { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "PaymentMethod", - "value": "'Cash' | 'Custom' | 'CreditCard' | 'CardPresentRefund' | 'StripeCardPresentRefund' | 'GiftCard' | 'StripeCreditCard' | 'ShopPay' | 'StoreCredit' | 'Unknown'", - "description": "The available payment method types for POS transactions.", - "isPublicDocs": true - } - }, - "Payment": { - "src/surfaces/point-of-sale/types/payment.ts": { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", - "name": "Payment", - "description": "Represents a payment applied to a transaction, including the amount, currency, and payment method type.", - "isPublicDocs": true, - "members": [ + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + }, { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "amount", - "value": "number", - "description": "The payment amount." + "name": "defaultPrevented", + "value": "boolean", + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "currency", - "value": "string", - "description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS." + "name": "eventPhase", + "value": "number", + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "PaymentMethod", - "description": "The payment method type." - } - ], - "value": "export interface Payment {\n /**\n * The payment amount.\n */\n amount: number;\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: string;\n /**\n * The payment method type.\n */\n type: PaymentMethod;\n}" - } - }, - "ShippingLine": { - "src/surfaces/point-of-sale/types/shipping-line.ts": { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "name": "ShippingLine", - "description": "Represents a shipping charge applied to an order, including the price and applicable taxes.", - "isPublicDocs": true, - "members": [ + "name": "id", + "value": "number", + "description": "The numeric identifier for the cash tracking session." + }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "handle", - "value": "string", - "description": "The handle identifier for the shipping method.", - "isOptional": true + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "price", - "value": "Money", - "description": "The price of the shipping as a Money object." + "name": "isTrusted", + "value": "boolean", + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing tax breakdown.", - "isOptional": true + "name": "NONE", + "value": "0", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The display title of the shipping method.", - "isOptional": true - } - ], - "value": "export interface ShippingLine {\n /**\n * The handle identifier for the shipping method.\n */\n handle?: string;\n /**\n * The price of the shipping as a Money object.\n */\n price: Money;\n /**\n * The display title of the shipping method.\n */\n title?: string;\n /**\n * An array of individual tax lines showing tax breakdown.\n */\n taxLines?: TaxLine[];\n}" - } - }, - "CalculatedShippingLine": { - "src/surfaces/point-of-sale/types/shipping-line.ts": { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "name": "CalculatedShippingLine", - "description": "Represents a calculated shipping line with specific shipping or retail method type.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "handle", + "name": "openingTime", "value": "string", - "description": "The handle identifier for the shipping method.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "methodType", - "value": "'SHIPPING' | 'RETAIL'", - "description": "The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:\n- `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.\n- `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location." + "description": "ISO 8601 timestamp when the session was opened." }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "price", - "value": "Money", - "description": "The price of the shipping as a Money object." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing tax breakdown.", - "isOptional": true + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The display title of the shipping method.", - "isOptional": true + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "type", - "value": "'Calculated'", - "description": "The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators." - } - ], - "value": "export interface CalculatedShippingLine extends ShippingLine {\n /**\n * The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators.\n */\n type: 'Calculated';\n /**\n * The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:\n * - `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.\n * - `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location.\n */\n methodType: 'SHIPPING' | 'RETAIL';\n}" - } - }, - "CustomShippingLine": { - "src/surfaces/point-of-sale/types/shipping-line.ts": { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "name": "CustomShippingLine", - "description": "Represents a custom shipping line with merchant-defined shipping charges.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "handle", - "value": "string", - "description": "The handle identifier for the shipping method.", - "isOptional": true + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "price", - "value": "Money", - "description": "The price of the shipping as a Money object." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing tax breakdown.", - "isOptional": true + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The display title of the shipping method.", - "isOptional": true + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "type", - "value": "'Custom'", - "description": "The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems." + "value": "string", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface CustomShippingLine extends ShippingLine {\n /**\n * The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems.\n */\n type: 'Custom';\n}" - } - }, - "TransactionCompleteEvent": { - "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "TransactionCompleteEvent", - "value": "SaleCompleteEvent | ReturnCompleteEvent | ExchangeCompleteEvent", - "description": "Dispatched when a sale, return, or exchange transaction completes.\n\nNarrow on `transactionType` to access per-type fields.", - "isPublicDocs": true + "value": "export interface CashTrackingSessionStartEvent\n extends CashTrackingSessionEvent {}" } }, - "SaleCompleteEvent": { - "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "name": "SaleCompleteEvent", - "description": "Dispatched when a sale transaction completes.", + "CashTrackingSessionCompleteEvent": { + "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts": { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "name": "CashTrackingSessionCompleteEvent", + "description": "Dispatched when a cash tracking session is successfully closed via reconciliation.", + "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "AT_TARGET", "value": "2", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "balanceDue", - "value": "Money", - "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "bubbles", "value": "boolean", "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "BUBBLING_PHASE", "value": "3", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "cancelable", "value": "boolean", "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "cancelBubble", "value": "boolean", @@ -3440,94 +2892,63 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "CAPTURING_PHASE", "value": "1", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "cashRoundingAdjustment", - "value": "Money", - "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", - "isOptional": true + "name": "closingTime", + "value": "string", + "description": "ISO 8601 timestamp when the session was closed." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "composed", "value": "boolean", "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "MethodSignature", "name": "composedPath", "value": "() => EventTarget[]", "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "currentTarget", "value": "EventTarget | null", "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "customer", - "value": "Customer", - "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "defaultPrevented", "value": "boolean", "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "discounts", - "value": "Discount[]", - "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "draftCheckoutUuid", - "value": "string", - "description": "The UUID of the draft order's checkout. Set when the sale originated from a draft order; `undefined` otherwise.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "eventPhase", "value": "number", "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "executedAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "grandTotal", - "value": "Money", - "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." + "name": "id", + "value": "number", + "description": "The numeric identifier for the cash tracking session." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "MethodSignature", "name": "initEvent", "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", @@ -3535,50 +2956,35 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "isTrusted", "value": "boolean", "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "lineItems", - "value": "LineItem[]", - "description": "An array of line items included in the sale transaction." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "NONE", "value": "0", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "orderId", - "value": "number", - "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "paymentMethods", - "value": "Payment[]", - "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." + "name": "openingTime", + "value": "string", + "description": "ISO 8601 timestamp when the session was opened." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "MethodSignature", "name": "preventDefault", "value": "() => void", "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "returnValue", "value": "boolean", @@ -3586,14 +2992,7 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "shippingLines", - "value": "ShippingLine[]", - "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "srcElement", "value": "EventTarget | null", @@ -3601,123 +3000,131 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "MethodSignature", "name": "stopImmediatePropagation", "value": "() => void", "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "MethodSignature", "name": "stopPropagation", "value": "() => void", "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "subtotal", - "value": "Money", - "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", "name": "target", "value": "EventTarget | null", "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "taxTotal", - "value": "Money", - "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." - }, + "name": "type", + "value": "string", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + } + ], + "value": "export interface CashTrackingSessionCompleteEvent\n extends CashTrackingSessionEvent {\n /** ISO 8601 timestamp when the session was closed. */\n readonly closingTime: string;\n}" + } + }, + "ShopifyEventMap": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ShopifyEventMap", + "description": "Maps Shopify POS event names to their corresponding `Event` subclass types.\n\nUsed as the generic type parameter for `shopify.addEventListener` and `shopify.removeEventListener`.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "name": "cashtrackingsessioncomplete", + "value": "CashTrackingSessionCompleteEvent", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "tipAmount", - "value": "Money", - "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", - "isOptional": true + "name": "cashtrackingsessionstart", + "value": "CashTrackingSessionStartEvent", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "transactionType", - "value": "'Sale'", - "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." - }, + "name": "transactioncomplete", + "value": "TransactionCompleteEvent", + "description": "Dispatched when a sale, return, or exchange transaction completes.\n\nNarrow on `transactionType` to access per-type fields." + } + ], + "value": "export interface ShopifyEventMap {\n [POS_EVENT_NAMES.TRANSACTION_COMPLETE]: TransactionCompleteEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;\n}" + } + }, + "ShopifyInterceptMap": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ShopifyInterceptMap", + "description": "Maps POS interceptable workflow names to their corresponding `Event` types.\n\nUsed as the generic type parameter for `shopify.intercept`.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + "name": "beforecheckout", + "value": "BeforeCheckoutEvent", + "description": "Dispatched when staff attempts to leave the active cart for checkout." } ], - "value": "interface SaleCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Sale';\n /**\n * The UUID of the draft order's checkout. Set when the sale originated from\n * a draft order; `undefined` otherwise.\n */\n readonly draftCheckoutUuid?: string;\n /**\n * An array of line items included in the sale transaction.\n */\n readonly lineItems: LineItem[];\n}" + "value": "export interface ShopifyInterceptMap {\n [POS_INTERCEPT_NAMES.BEFORE_CHECKOUT]: BeforeCheckoutEvent;\n}" } }, - "ReturnCompleteEvent": { - "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "name": "ReturnCompleteEvent", - "description": "Dispatched when a return transaction completes.", + "BeforeCheckoutEvent": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "BeforeCheckoutEvent", + "description": "Dispatched when staff attempts to leave the active cart for checkout.", + "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "AT_TARGET", "value": "2", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "balanceDue", - "value": "Money", - "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "bubbles", "value": "boolean", "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "BUBBLING_PHASE", "value": "3", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "cancelable", "value": "boolean", "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "cancelBubble", "value": "boolean", @@ -3725,94 +3132,56 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "CAPTURING_PHASE", "value": "1", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "cashRoundingAdjustment", - "value": "Money", - "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", - "isOptional": true + "name": "cart", + "value": "Cart", + "description": "The POS cart at the point checkout was requested." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "composed", "value": "boolean", "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "MethodSignature", "name": "composedPath", "value": "() => EventTarget[]", "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "currentTarget", "value": "EventTarget | null", "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "customer", - "value": "Customer", - "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "defaultPrevented", "value": "boolean", "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "discounts", - "value": "Discount[]", - "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "eventPhase", "value": "number", "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "exchangeId", - "value": "number", - "description": "The exchange ID when this return is the gift-card side of an exchange; `undefined` for standalone returns.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "executedAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "grandTotal", - "value": "Money", - "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "MethodSignature", "name": "initEvent", "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", @@ -3820,66 +3189,28 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "isTrusted", "value": "boolean", "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "lineItems", - "value": "LineItem[]", - "description": "An array of line items included in the return transaction." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "NONE", "value": "0", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "orderId", - "value": "number", - "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "paymentMethods", - "value": "Payment[]", - "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "MethodSignature", "name": "preventDefault", "value": "() => void", "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "refundId", - "value": "number", - "description": "The refund ID. `undefined` when the return did not issue a refund (for example, store-credit-only returns).", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "returnId", - "value": "number", - "description": "The return ID for the completed return transaction.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "returnValue", "value": "boolean", @@ -3887,14 +3218,7 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "shippingLines", - "value": "ShippingLine[]", - "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "srcElement", "value": "EventTarget | null", @@ -3902,1133 +3226,1837 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "MethodSignature", "name": "stopImmediatePropagation", "value": "() => void", "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" - }, + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "'beforecheckout'", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + } + ], + "value": "export interface BeforeCheckoutEvent extends Event {\n readonly type: typeof POS_INTERCEPT_NAMES.BEFORE_CHECKOUT;\n /** The POS cart at the point checkout was requested. */\n readonly cart: Cart;\n}" + } + }, + "ShopifyInterceptor": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ShopifyInterceptor", + "description": "", + "isPublicDocs": true, + "params": [ + { + "name": "event", + "description": "", + "value": "TEvent", + "filePath": "src/surfaces/point-of-sale/events.ts" + } + ], + "returns": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "description": "", + "name": "InterceptResult", + "value": "InterceptResult" + }, + "value": "(\n event: TEvent,\n) => InterceptResult" + } + }, + "InterceptResult": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "InterceptResult", + "description": "The result an interceptor returns. An empty `operations` list allows the workflow; an `ERROR` validation blocks it.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "operations", + "value": "Operation[]", + "description": "" + } + ], + "value": "export interface InterceptResult {\n operations: Operation[];\n}" + } + }, + "Operation": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "Operation", + "description": "A single host operation produced by an interceptor.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "validationAdd", + "value": "ValidationAdd", + "description": "Adds a validation to the workflow being intercepted.", + "isOptional": true + } + ], + "value": "export interface Operation {\n validationAdd?: ValidationAdd;\n}" + } + }, + "ValidationAdd": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ValidationAdd", + "description": "Adds a validation to the workflow being intercepted.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "handle", + "value": "string", + "description": "Stable identifier for this validation." + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "level", + "value": "ValidationLevel", + "description": "`ERROR` blocks the workflow. `WARNING` and `INFO` do not." + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "message", + "value": "string", + "description": "Host-facing message for support, observability, or staff UX." + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "metafields", + "value": "Metafield[]", + "description": "Optional structured data for custom UX or order metadata.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "target", + "value": "string", + "description": "JSON-path locator for where the validation applies. Defaults to `$.cart`.", + "isOptional": true + } + ], + "value": "export interface ValidationAdd {\n /** `ERROR` blocks the workflow. `WARNING` and `INFO` do not. */\n level: ValidationLevel;\n\n /** Stable identifier for this validation. */\n handle: string;\n\n /** Host-facing message for support, observability, or staff UX. */\n message: string;\n\n /** JSON-path locator for where the validation applies. Defaults to `$.cart`. */\n target?: string;\n\n /** Optional structured data for custom UX or order metadata. */\n metafields?: Metafield[];\n}" + } + }, + "ValidationLevel": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ValidationLevel", + "value": "'INFO' | 'WARNING' | 'ERROR'", + "description": "", + "isPublicDocs": true + } + }, + "Metafield": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "Metafield", + "description": "Metafield input attached to a validation.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "key", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "namespace", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "value", + "value": "string", + "description": "" + } + ], + "value": "export interface Metafield {\n namespace: string;\n key: string;\n value: string;\n type: string;\n}" + } + }, + "InterceptCapability": { + "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "InterceptCapability", + "value": "`${Extract<\n keyof ShopifyInterceptMap,\n string\n>}.${'error' | 'warning' | 'info'}`", + "description": "A granted validation severity for a POS intercept event. Event names are derived from `ShopifyInterceptMap`; `warning` corresponds to the `WARNING` validation level.", + "isPublicDocs": true + } + }, + "CapabilitiesApi": { + "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "name": "CapabilitiesApi", + "description": "Provides the validation severities granted for POS intercept events.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "syntaxKind": "PropertySignature", + "name": "capabilities", + "value": "ReadonlySignalLike", + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`." + } + ], + "value": "export interface CapabilitiesApi {\n /**\n * A read-only list of granted intercept capabilities. The signal is available\n * to every POS target, but only the target that registers an interceptor\n * declares its event in `shopify.extension.toml`.\n *\n * Grants are cumulative. An `.error` grant includes `.warning` and `.info`,\n * and a `.warning` grant includes `.info`.\n */\n capabilities: ReadonlySignalLike;\n}" + } + }, + "ConnectivityStateSeverity": { + "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ConnectivityStateSeverity", + "value": "'Connected' | 'Disconnected'", + "description": "", + "isPublicDocs": true + } + }, + "ConnectivityState": { + "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "name": "ConnectivityState", + "description": "Represents the current Internet connectivity status of the device. Indicates whether the device is connected or disconnected from the Internet.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "syntaxKind": "PropertySignature", + "name": "internetConnected", + "value": "ConnectivityStateSeverity", + "description": "The Internet connection status of the POS device." + } + ], + "value": "export interface ConnectivityState {\n /**\n * The Internet connection status of the POS device.\n */\n internetConnected: ConnectivityStateSeverity;\n}" + } + }, + "ConnectivityApiContent": { + "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "name": "ConnectivityApiContent", + "description": "Provides access to the current connectivity state for the POS device.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "syntaxKind": "PropertySignature", + "name": "current", + "value": "ReadonlySignalLike", + "description": "Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling." + } + ], + "value": "export interface ConnectivityApiContent {\n /**\n * Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling.\n */\n current: ReadonlySignalLike;\n}" + } + }, + "ConnectivityApi": { + "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "name": "ConnectivityApi", + "description": "The `ConnectivityApi` object provides access to current connectivity information and change notifications. Access these properties through `shopify.connectivity` to monitor network status.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "syntaxKind": "PropertySignature", + "name": "connectivity", + "value": "ConnectivityApiContent", + "description": "Provides access to the current connectivity state for the POS device." + } + ], + "value": "export interface ConnectivityApi {\n connectivity: ConnectivityApiContent;\n}" + } + }, + "DeviceApiContent": { + "src/surfaces/point-of-sale/api/device-api/device-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "name": "DeviceApiContent", + "description": "The `DeviceApi` object provides device details and capabilities.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "syntaxKind": "MethodSignature", + "name": "getDeviceId", + "value": "() => Promise", + "description": "Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations. Note: While Shopify POS attempts to maintain a stable identifier, it is not guaranteed to be permanent and may change." + }, + { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "syntaxKind": "MethodSignature", + "name": "isTablet", + "value": "() => Promise", + "description": "Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences." + }, + { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "syntaxKind": "PropertySignature", + "name": "name", + "value": "string", + "description": "The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful." + }, + { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "syntaxKind": "PropertySignature", + "name": "registerName", + "value": "string", + "description": "A short, unique identifier for the device, assigned by Shopify." + } + ], + "value": "export interface DeviceApiContent {\n /**\n * The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful.\n */\n name: string;\n /**\n * A short, unique identifier for the device, assigned by Shopify.\n */\n registerName: string;\n /**\n * Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations.\n * Note: While Shopify POS attempts to maintain a stable identifier, it is not guaranteed to be permanent and may change.\n */\n getDeviceId(): Promise;\n /**\n * Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences.\n */\n isTablet(): Promise;\n}" + } + }, + "DeviceApi": { + "src/surfaces/point-of-sale/api/device-api/device-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "name": "DeviceApi", + "description": "The `DeviceApi` object provides access to device information and capabilities. Access these properties and methods through `shopify.device` to retrieve device details and check device characteristics.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "syntaxKind": "PropertySignature", + "name": "device", + "value": "DeviceApiContent", + "description": "The `DeviceApi` object provides device details and capabilities." + } + ], + "value": "export interface DeviceApi {\n device: DeviceApiContent;\n}" + } + }, + "ExtensionApiContent": { + "src/surfaces/point-of-sale/api/extension-api/extension-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "name": "ExtensionApiContent", + "description": "The Extension API lets you read metadata about the currently running extension. Use it to implement version-aware behaviour or to identify which target is active when the same extension module is registered against multiple targets. Access these properties through `shopify.extension`.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "syntaxKind": "PropertySignature", + "name": "apiVersion", + "value": "ApiVersion", + "description": "The API version that was set in the extension configuration file.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "'2026-01', '2026-04'", + "title": "Example" + } + ] + } + ] + }, + { + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "syntaxKind": "PropertySignature", + "name": "target", + "value": "T", + "description": "The extension target that is currently running, as configured in the extension's `shopify.extension.toml` file.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "'pos.home.tile.render', 'pos.home.modal.render'", + "title": "Example" + } + ] + } + ] + } + ], + "value": "export interface ExtensionApiContent {\n /**\n * The API version that was set in the extension configuration file.\n *\n * @example '2026-01', '2026-04'\n */\n apiVersion: ApiVersion;\n /**\n * The extension target that is currently running, as configured in the\n * extension's `shopify.extension.toml` file.\n *\n * @example 'pos.home.tile.render', 'pos.home.modal.render'\n */\n target: T;\n}" + } + }, + "ApiVersion": { + "src/shared.ts": { + "filePath": "src/shared.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ApiVersion", + "value": "'2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '2025-01' | '2025-04' | 'unstable' | '2025-07' | '2025-10' | '2026-01' | '2026-04' | '2026-07'", + "description": "The supported GraphQL Admin API versions. Use this to specify which API version your GraphQL queries should execute against. Each version includes specific features, bug fixes, and breaking changes. The `unstable` version provides access to the latest features but may change without notice." + } + }, + "ExtensionApi": { + "src/surfaces/point-of-sale/api/extension-api/extension-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "name": "ExtensionApi", + "description": "The `ExtensionApi` object provides metadata about the currently running extension, including the configured API version and the active extension target. Access these properties through `shopify.extension`.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "syntaxKind": "PropertySignature", + "name": "extension", + "value": "ExtensionApiContent", + "description": "" + } + ], + "value": "export interface ExtensionApi {\n extension: ExtensionApiContent;\n}" + } + }, + "LocaleApiContent": { + "src/surfaces/point-of-sale/api/locale-api/locale-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "name": "LocaleApiContent", + "description": "The `LocaleApi` object provides the current locale and locale updates.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "syntaxKind": "PropertySignature", + "name": "current", + "value": "ReadonlySignalLike", + "description": "Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings." + } + ], + "value": "export interface LocaleApiContent {\n /**\n * Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings.\n */\n current: ReadonlySignalLike;\n}" + } + }, + "LocaleApi": { + "src/surfaces/point-of-sale/api/locale-api/locale-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "name": "LocaleApi", + "description": "The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `shopify.locale` to retrieve and monitor locale data.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "syntaxKind": "PropertySignature", + "name": "locale", + "value": "LocaleApiContent", + "description": "The `LocaleApi` object provides the current locale and locale updates." + } + ], + "value": "export interface LocaleApi {\n locale: LocaleApiContent;\n}" + } + }, + "StaffMember": { + "src/surfaces/point-of-sale/types/session.ts": { + "filePath": "src/surfaces/point-of-sale/types/session.ts", + "name": "StaffMember", + "description": "Defines a staff member in POS.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "subtotal", - "value": "Money", - "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." - }, + "name": "id", + "value": "number", + "description": "The staff member ID." + } + ], + "value": "export interface StaffMember {\n /**\n * The staff member ID.\n */\n id: number;\n}" + } + }, + "Session": { + "src/surfaces/point-of-sale/types/session.ts": { + "filePath": "src/surfaces/point-of-sale/types/session.ts", + "name": "Session", + "description": "Defines information about the current POS session.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + "name": "currency", + "value": "CurrencyCode", + "description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." + "name": "locationId", + "value": "number", + "description": "The location ID associated with the POS device's current location." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "taxTotal", - "value": "Money", - "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." + "name": "posVersion", + "value": "string", + "description": "The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "name": "shopDomain", + "value": "string", + "description": "The shop domain associated with the shop currently logged into POS." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "tipAmount", - "value": "Money", - "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", - "isOptional": true + "name": "shopId", + "value": "number", + "description": "The shop ID associated with the shop currently logged into POS." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "transactionType", - "value": "'Return'", - "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + "name": "staffMemberId", + "value": "number", + "description": "The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.", + "isOptional": true, + "deprecationMessage": "Use `session.staffMember` on the Session API instead." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + "name": "userId", + "value": "number", + "description": "The user ID associated with the Shopify account currently authenticated on POS." } ], - "value": "interface ReturnCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Return';\n /**\n * The refund ID. `undefined` when the return did not issue a refund\n * (for example, store-credit-only returns).\n */\n readonly refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n readonly returnId?: number;\n /**\n * The exchange ID when this return is the gift-card side of an exchange;\n * `undefined` for standalone returns.\n */\n readonly exchangeId?: number;\n /**\n * An array of line items included in the return transaction.\n */\n readonly lineItems: LineItem[];\n}" + "value": "export interface Session {\n /**\n * The shop ID associated with the shop currently logged into POS.\n */\n shopId: number;\n\n /**\n * The user ID associated with the Shopify account currently authenticated on POS.\n */\n userId: number;\n\n /**\n * The shop domain associated with the shop currently logged into POS.\n */\n shopDomain: string;\n\n /**\n * The location ID associated with the POS device's current location.\n */\n locationId: number;\n\n /**\n * The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.\n *\n * @deprecated Use `session.staffMember` on the Session API instead.\n */\n staffMemberId?: number;\n\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: CurrencyCode;\n\n /**\n * The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running.\n */\n posVersion: string;\n}" } }, - "ExchangeCompleteEvent": { - "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "name": "ExchangeCompleteEvent", - "description": "Dispatched when an exchange transaction completes.", + "CurrencyCode": { + "src/shared.ts": { + "filePath": "src/shared.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "CurrencyCode", + "value": "'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'", + "description": "" + } + }, + "SessionApiContent": { + "src/surfaces/point-of-sale/api/session-api/session-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "name": "SessionApiContent", + "description": "The `SessionApi` object provides session details and authentication methods.", + "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" + "name": "currentSession", + "value": "Session", + "description": "Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "balanceDue", - "value": "Money", - "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." + "name": "deviceId", + "value": "number", + "description": "The numeric ID of the device running this session.\n\nUse this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "123456", + "title": "Example" + } + ] + } + ] }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "bubbles", - "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + "name": "getSessionToken", + "value": "() => Promise", + "description": "Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" - }, + "name": "staffMember", + "value": "ReadonlySignalLike", + "description": "Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in." + } + ], + "value": "export interface SessionApiContent {\n /**\n * Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change.\n */\n currentSession: Session;\n /**\n * Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in.\n */\n staffMember: ReadonlySignalLike;\n /**\n * Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member.\n */\n getSessionToken: () => Promise;\n /**\n * The numeric ID of the device running this session.\n *\n * Use this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.\n *\n * @example 123456\n * @see [Global IDs documentation](/docs/api/usage/gids) for more about GID format and structure\n * @see [device.getDeviceId()](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) for physical device identifier (UUID format)\n */\n deviceId: number;\n}" + } + }, + "SessionApi": { + "src/surfaces/point-of-sale/api/session-api/session-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "name": "SessionApi", + "description": "The `SessionApi` object provides access to current session information and authentication methods. Access these properties and methods through `shopify.session` to retrieve shop data and generate secure tokens. These methods enable secure API calls while maintaining user privacy and [app permissions](https://help.shopify.com/manual/your-account/users/roles/permissions/store-permissions#apps-and-channels-permissions).", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" - }, + "name": "session", + "value": "SessionApiContent", + "description": "The `SessionApi` object provides session details and authentication methods." + } + ], + "value": "export interface SessionApi {\n session: SessionApiContent;\n}" + } + }, + "ToastApiContent": { + "src/surfaces/point-of-sale/api/toast-api/toast-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", + "name": "ToastApiContent", + "description": "The `ToastApi` object provides methods for showing toast notifications.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", "syntaxKind": "PropertySignature", - "name": "cancelBubble", - "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" - }, + "name": "show", + "value": "(content: string) => void", + "description": "Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow." + } + ], + "value": "export interface ToastApiContent {\n /**\n * Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow.\n *\n * @param content The text content to display.\n */\n show: (content: string) => void;\n}" + } + }, + "ToastApi": { + "src/surfaces/point-of-sale/api/toast-api/toast-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", + "name": "ToastApi", + "description": "The `ToastApi` object provides methods for displaying temporary notification messages. Access these methods through `shopify.toast` to show user feedback and status updates.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" + "name": "toast", + "value": "ToastApiContent", + "description": "The `ToastApi` object provides methods for showing toast notifications." + } + ], + "value": "export interface ToastApi {\n toast: ToastApiContent;\n}" + } + }, + "MultipleResourceResult": { + "src/surfaces/point-of-sale/types/multiple-resource-result.ts": { + "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", + "name": "MultipleResourceResult", + "description": "Represents the result of a bulk resource lookup operation. Contains successfully found resources and identifiers for resources that were not found.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", + "syntaxKind": "PropertySignature", + "name": "fetchedResources", + "value": "T[]", + "description": "The resources that were fetched using the IDs provided." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", "syntaxKind": "PropertySignature", - "name": "cashRoundingAdjustment", - "value": "Money", - "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", - "isOptional": true - }, + "name": "idsForResourcesNotFound", + "value": "number[]", + "description": "The IDs for which a resource was not found." + } + ], + "value": "export interface MultipleResourceResult {\n /**\n * The resources that were fetched using the IDs provided.\n */\n fetchedResources: T[];\n /**\n * The IDs for which a resource was not found.\n */\n idsForResourcesNotFound: number[];\n}" + } + }, + "PaginatedResult": { + "src/surfaces/point-of-sale/types/paginated-result.ts": { + "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", + "name": "PaginatedResult", + "description": "Represents the result of a paginated query. Contains the data items, pagination cursors for navigating pages, and information about whether more results exist.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", "syntaxKind": "PropertySignature", - "name": "composed", + "name": "hasNextPage", "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + "description": "Whether or not there is another page of results that can be fetched." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + "name": "items", + "value": "T[]", + "description": "The items returned from the fetch." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", "syntaxKind": "PropertySignature", - "name": "customer", - "value": "Customer", - "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", + "name": "lastCursor", + "value": "string", + "description": "The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.", "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "defaultPrevented", - "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" - }, + } + ], + "value": "export interface PaginatedResult {\n /**\n * The items returned from the fetch.\n */\n items: T[];\n\n /**\n * The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.\n */\n lastCursor?: string;\n\n /**\n * Whether or not there is another page of results that can be fetched.\n */\n hasNextPage: boolean;\n}" + } + }, + "Product": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "name": "Product", + "description": "Represents comprehensive product information including metadata, pricing, variants, and availability. Contains all data needed to display and work with products in the POS interface.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "discounts", - "value": "Discount[]", - "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." + "name": "createdAt", + "value": "string", + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing \"new product\" features, or tracking product catalog growth over time." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "eventPhase", - "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + "name": "description", + "value": "string", + "description": "The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "exchangeId", - "value": "number", - "description": "The exchange ID linking the return and sale sides of the exchange." + "name": "descriptionHtml", + "value": "string", + "description": "The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "executedAt", + "name": "featuredImage", "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." + "description": "The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "grandTotal", - "value": "Money", - "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + "name": "hasInStockVariants", + "value": "boolean", + "description": "Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "isTrusted", + "name": "hasOnlyDefaultVariant", "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + "description": "Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "lineItemsAdded", - "value": "LineItem[]", - "description": "An array of line items added to the customer in the exchange." + "name": "hasSellingPlanGroups", + "value": "boolean", + "description": "Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "lineItemsRemoved", - "value": "LineItem[]", - "description": "An array of line items removed from the customer in the exchange." + "name": "id", + "value": "number", + "description": "The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", - "description": "" + "name": "isGiftCard", + "value": "boolean", + "description": "Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "orderId", - "value": "number", - "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", - "isOptional": true + "name": "maxVariantPrice", + "value": "string", + "description": "The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "paymentMethods", - "value": "Payment[]", - "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", - "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + "name": "minVariantPrice", + "value": "string", + "description": "The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "returnId", + "name": "numVariants", "value": "number", - "description": "The return-side ID. `undefined` when the exchange has no return side.", - "isOptional": true + "description": "The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", - "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" + "name": "onlineStoreUrl", + "value": "string", + "description": "The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "shippingLines", - "value": "ShippingLine[]", - "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." + "name": "options", + "value": "ProductOption[]", + "description": "An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + "name": "productCategory", + "value": "string", + "description": "The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "productType", + "value": "string", + "description": "The product type category as defined by the merchant (For example, \"T-Shirt,\" \"Electronics,\" \"Books\"). Use for product categorization, filtering, or implementing category-specific business logic." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "requiresSellingPlan", + "value": "boolean", + "description": "Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "subtotal", - "value": "Money", - "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." + "name": "tags", + "value": "string[]", + "description": "An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + "name": "title", + "value": "string", + "description": "The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." + "name": "totalAvailableInventory", + "value": "number", + "description": "The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "taxTotal", - "value": "Money", - "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." + "name": "totalInventory", + "value": "number", + "description": "The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "name": "tracksInventory", + "value": "boolean", + "description": "Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "tipAmount", - "value": "Money", - "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", - "isOptional": true + "name": "updatedAt", + "value": "string", + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "transactionType", - "value": "'Exchange'", - "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + "name": "variants", + "value": "ProductVariant[]", + "description": "An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "type", + "name": "vendor", "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + "description": "The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier." } ], - "value": "interface ExchangeCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Exchange';\n /**\n * The exchange ID linking the return and sale sides of the exchange.\n */\n readonly exchangeId: number;\n /**\n * The return-side ID. `undefined` when the exchange has no return side.\n */\n readonly returnId?: number;\n /**\n * An array of line items added to the customer in the exchange.\n */\n readonly lineItemsAdded: LineItem[];\n /**\n * An array of line items removed from the customer in the exchange.\n */\n readonly lineItemsRemoved: LineItem[];\n}" + "value": "export interface Product {\n /**\n * The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing \"new product\" features, or tracking product catalog growth over time.\n */\n createdAt: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features.\n */\n updatedAt: string;\n /**\n * The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize.\n */\n title: string;\n /**\n * The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing.\n */\n description: string;\n /**\n * The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface.\n */\n descriptionHtml: string;\n /**\n * The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.\n */\n featuredImage?: string;\n /**\n * Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces.\n */\n isGiftCard: boolean;\n /**\n * Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic.\n */\n tracksInventory: boolean;\n /**\n * The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier.\n */\n vendor: string;\n /**\n * The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings.\n */\n minVariantPrice: string;\n /**\n * The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants.\n */\n maxVariantPrice: string;\n /**\n * The product type category as defined by the merchant (For example, \"T-Shirt,\" \"Electronics,\" \"Books\"). Use for product categorization, filtering, or implementing category-specific business logic.\n */\n productType: string;\n /**\n * The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories.\n */\n productCategory: string;\n /**\n * An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions.\n */\n tags: string[];\n /**\n * The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies.\n */\n numVariants: number;\n /**\n * The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.\n */\n totalAvailableInventory?: number;\n /**\n * The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts.\n */\n totalInventory: number;\n /**\n * An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality.\n */\n variants: ProductVariant[];\n /**\n * An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities.\n */\n options: ProductOption[];\n /**\n * Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products.\n */\n hasOnlyDefaultVariant: boolean;\n /**\n * Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.\n */\n hasInStockVariants?: boolean;\n /**\n * The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.\n */\n onlineStoreUrl?: string;\n /**\n * Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.\n */\n requiresSellingPlan?: boolean;\n /**\n * Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.\n */\n hasSellingPlanGroups?: boolean;\n}" } }, - "CashTrackingSessionStartEvent": { - "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts": { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "name": "CashTrackingSessionStartEvent", - "description": "Dispatched when a cash tracking session is opened.", + "ProductOption": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "name": "ProductOption", + "description": "Represents a product option definition showing one of the configurable attributes for a product (like Size, Color, Material) along with all the possible values customers can choose from. Products can have up to 3 options.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" + "name": "id", + "value": "number", + "description": "The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "bubbles", - "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + "name": "name", + "value": "string", + "description": "The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" + "name": "optionValues", + "value": "string[]", + "description": "An array of all available values for this option that customers can choose from (for example, `[\"Small\", \"Medium\", \"Large\", \"X-Large\"]` for a Size option, or `[\"Red\", \"Blue\", \"Green\", \"Black\"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" - }, + "name": "productId", + "value": "number", + "description": "The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management." + } + ], + "value": "export interface ProductOption {\n /**\n * The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems.\n */\n id: number;\n /**\n * The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type.\n */\n name: string;\n /**\n * An array of all available values for this option that customers can choose from (for example, `[\"Small\", \"Medium\", \"Large\", \"X-Large\"]` for a Size option, or `[\"Red\", \"Blue\", \"Green\", \"Black\"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute.\n */\n optionValues: string[];\n /**\n * The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management.\n */\n productId: number;\n}" + } + }, + "ProductVariant": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "name": "ProductVariant", + "description": "Represents a specific variant of a product with its own SKU, price, and inventory. Contains variant-specific attributes including options, availability, and identification data.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "cancelBubble", - "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" + "name": "barcode", + "value": "string", + "description": "The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" + "name": "compareAtPrice", + "value": "string", + "description": "The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "composed", - "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + "name": "createdAt", + "value": "string", + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing \"new product\" features, or tracking product catalog changes over time." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + "name": "displayName", + "value": "string", + "description": "The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "defaultPrevented", + "name": "hasInStockVariants", "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" + "description": "Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "eventPhase", + "name": "id", "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + "description": "The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "id", + "name": "image", + "value": "string", + "description": "The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "inventoryAtAllLocations", "value": "number", - "description": "The numeric identifier for the cash tracking session." + "description": "The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "inventoryAtLocation", + "value": "number", + "description": "The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "isTrusted", + "name": "inventoryIsTracked", "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + "description": "Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", - "description": "" + "name": "inventoryPolicy", + "value": "ProductVariantInventoryPolicy", + "description": "The inventory policy for this variant, either \"DENY\" (prevent sales when out of stock) or \"CONTINUE\" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "openingTime", - "value": "string", - "description": "ISO 8601 timestamp when the session was opened." + "name": "options", + "value": "ProductVariantOption[]", + "description": "An array of option name-value pairs that define this variant's configuration. For example, `[{name: \"Size,\" value: \"Large\"}, {name: \"Color,\" value: \"Blue\"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", - "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "position", + "value": "number", + "description": "The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", - "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" + "name": "price", + "value": "string", + "description": "The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + "name": "product", + "value": "Product", + "description": "Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "productId", + "value": "number", + "description": "The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "sku", + "value": "string", + "description": "The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "taxable", + "value": "boolean", + "description": "Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "name": "title", + "value": "string", + "description": "The variant's display title, typically showing the option combinations. For example, `\"Large / Blue\"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "type", + "name": "updatedAt", "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features." } ], - "value": "export interface CashTrackingSessionStartEvent\n extends CashTrackingSessionEvent {}" + "value": "export interface ProductVariant {\n /**\n * The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing \"new product\" features, or tracking product catalog changes over time.\n */\n createdAt: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features.\n */\n updatedAt: string;\n /**\n * The variant's display title, typically showing the option combinations. For example, `\"Large / Blue\"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants.\n */\n title: string;\n /**\n * The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant.\n */\n price: string;\n /**\n * The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.\n */\n compareAtPrice?: string;\n /**\n * Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling.\n */\n taxable: boolean;\n /**\n * The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.\n */\n sku?: string;\n /**\n * The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.\n */\n barcode?: string;\n /**\n * The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays.\n */\n displayName: string;\n /**\n * The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.\n */\n image?: string;\n /**\n * Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant.\n */\n inventoryIsTracked: boolean;\n /**\n * The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.\n */\n inventoryAtLocation?: number;\n /**\n * The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.\n */\n inventoryAtAllLocations?: number;\n /**\n * The inventory policy for this variant, either \"DENY\" (prevent sales when out of stock) or \"CONTINUE\" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items.\n */\n inventoryPolicy: ProductVariantInventoryPolicy;\n /**\n * Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.\n */\n hasInStockVariants?: boolean;\n /**\n * An array of option name-value pairs that define this variant's configuration. For example, `[{name: \"Size,\" value: \"Large\"}, {name: \"Color,\" value: \"Blue\"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.\n */\n options?: ProductVariantOption[];\n /**\n * Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.\n */\n product?: Product;\n /**\n * The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product.\n */\n productId: number;\n /**\n * The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic.\n */\n position: number;\n}" } }, - "CashTrackingSessionCompleteEvent": { - "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts": { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "name": "CashTrackingSessionCompleteEvent", - "description": "Dispatched when a cash tracking session is successfully closed via reconciliation.", + "ProductVariantInventoryPolicy": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ProductVariantInventoryPolicy", + "value": "'DENY' | 'CONTINUE'", + "description": "The inventory policy determining whether sales can continue when a variant has no inventory available:\n- `'DENY'`: Sales are prevented when inventory reaches zero. Customers can't purchase out-of-stock variants. The \"Add to cart\" action is disabled or shows \"Out of stock\". This is the default and recommended policy for most physical products to prevent overselling.\n- `'CONTINUE'`: Sales are allowed even when inventory is zero or negative. Customers can purchase out-of-stock variants, creating backorders. This enables pre-orders, made-to-order products, or drop-shipped items where inventory tracking is less critical.", + "isPublicDocs": true + } + }, + "ProductVariantOption": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "name": "ProductVariantOption", + "description": "Represents a single option selection for a product variant, showing one chosen value from a product's configuration options. For example, if a product has Size and Color options, a variant might have one option for Size=Large and another for Color=Blue.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" + "name": "name", + "value": "string", + "description": "The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "bubbles", - "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" - }, + "name": "value", + "value": "string", + "description": "The selected value for this option that defines this specific variant (for example, \"Large\", \"Blue\", \"Cotton\", \"V-Neck\"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is \"Size\", the `value` might be \"Large\" or \"Small\". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration (\"Size: Large, Color: Blue\"), building variant selection dropdowns, or matching user selections to variants." + } + ], + "value": "export interface ProductVariantOption {\n /**\n * The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type.\n */\n name: string;\n /**\n * The selected value for this option that defines this specific variant (for example, \"Large\", \"Blue\", \"Cotton\", \"V-Neck\"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is \"Size\", the `value` might be \"Large\" or \"Small\". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration (\"Size: Large, Color: Blue\"), building variant selection dropdowns, or matching user selections to variants.\n */\n value: string;\n}" + } + }, + "ProductSortType": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ProductSortType", + "value": "'RECENTLY_ADDED' | 'RECENTLY_ADDED_ASCENDING' | 'ALPHABETICAL_A_TO_Z' | 'ALPHABETICAL_Z_TO_A'", + "description": "", + "isPublicDocs": true + } + }, + "PaginationParams": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "name": "PaginationParams", + "description": "Specifies parameters for cursor-based pagination. Includes the cursor position and the number of results to retrieve per page.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" + "name": "afterCursor", + "value": "string", + "description": "Specifies the page cursor. Items after this cursor will be returned.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" - }, + "name": "first", + "value": "number", + "description": "Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.", + "isOptional": true + } + ], + "value": "export interface PaginationParams {\n /**\n * Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.\n */\n first?: number;\n /**\n * Specifies the page cursor. Items after this cursor will be returned.\n */\n afterCursor?: string;\n}" + } + }, + "ProductSearchParams": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "name": "ProductSearchParams", + "description": "Specifies the parameters for searching products. Includes query text, pagination options, and sorting preferences for product search operations.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "cancelBubble", - "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" + "name": "afterCursor", + "value": "string", + "description": "Specifies the page cursor. Items after this cursor will be returned.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" + "name": "first", + "value": "number", + "description": "Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "closingTime", + "name": "queryString", "value": "string", - "description": "ISO 8601 timestamp when the session was closed." + "description": "The search term to be used to search for POS products.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "composed", - "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" + "name": "sortType", + "value": "ProductSortType", + "description": "Specifies the order in which products should be sorted. When a `queryString` is provided, sortType will not have any effect, as the results will be returned in order by relevance to the `queryString`.", + "isOptional": true + } + ], + "value": "export interface ProductSearchParams extends PaginationParams {\n /**\n * The search term to be used to search for POS products.\n */\n queryString?: string;\n /**\n * Specifies the order in which products should be sorted. When a `queryString` is provided, sortType will not have any effect, as the results will be returned in order by relevance to the `queryString`.\n */\n sortType?: ProductSortType;\n}" + } + }, + "ProductSearchApiContent": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "name": "ProductSearchApiContent", + "description": "The `ProductSearchApi` object provides product search and lookup methods.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchPaginatedProductVariantsWithProductId", + "value": "(productId: number, paginationParams: PaginationParams) => Promise>", + "description": "Retrieves product variants for a specific product with pagination support. Use when a product has many variants and you need to load them incrementally for better performance. Ideal for products with extensive variant collections that would be too large to load at once." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + "name": "fetchProductsWithIds", + "value": "(productIds: number[]) => Promise>", + "description": "Retrieves detailed information for multiple products by their IDs. Limited to 50 products maximum—additional IDs are automatically removed. Returns results with both found and not found products clearly identified. Use for bulk product lookups, building product collections, or validating product lists." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductVariantsWithIds", + "value": "(productVariantIds: number[]) => Promise>", + "description": "Retrieves detailed information for multiple product variants by their IDs. Limited to 50 variants maximum—additional IDs are automatically removed. Returns results with both found and not found variants clearly identified. Use for bulk variant lookups or building variant-specific collections." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "defaultPrevented", - "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductVariantsWithProductId", + "value": "(productId: number) => Promise", + "description": "Retrieves all product variants associated with a specific product ID. Returns all variants at once without pagination. Use for displaying complete variant options, building variant selectors, or analyzing all available configurations for a product." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "eventPhase", - "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductVariantWithId", + "value": "(productVariantId: number) => Promise", + "description": "Retrieves detailed information for a single product variant by its ID. Returns `undefined` if the variant doesn't exist or isn't available. Use for displaying variant-specific details like pricing, inventory, or options when working with specific product configurations." + }, + { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductWithId", + "value": "(productId: number) => Promise", + "description": "Retrieves detailed information for a single product by its ID. Returns `undefined` if the product doesn't exist or isn't available on the POS device. Use for displaying product details, validating product availability, or building product-specific workflows." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "searchProducts", + "value": "(searchParams: ProductSearchParams) => Promise>", + "description": "Searches for products on the POS device using text queries and sorting options. Returns paginated results with up to 50 products per page. When a query string is provided, results are sorted by relevance. Use for implementing custom search interfaces, product discovery features, or filtered product listings." + } + ], + "value": "export interface ProductSearchApiContent {\n /**\n * Searches for products on the POS device using text queries and sorting options. Returns paginated results with up to 50 products per page. When a query string is provided, results are sorted by relevance. Use for implementing custom search interfaces, product discovery features, or filtered product listings.\n *\n * @param searchParams The parameters for the product search.\n */\n searchProducts(\n searchParams: ProductSearchParams,\n ): Promise>;\n\n /**\n * Retrieves detailed information for a single product by its ID. Returns `undefined` if the product doesn't exist or isn't available on the POS device. Use for displaying product details, validating product availability, or building product-specific workflows.\n *\n * @param productId The ID of the product to lookup.\n */\n fetchProductWithId(productId: number): Promise;\n\n /**\n * Retrieves detailed information for multiple products by their IDs. Limited to 50 products maximum—additional IDs are automatically removed. Returns results with both found and not found products clearly identified. Use for bulk product lookups, building product collections, or validating product lists.\n *\n * @param productIds Specifies the array of product IDs to lookup. This is limited to 50 products. All excess requested IDs will be removed from the array.\n */\n fetchProductsWithIds(\n productIds: number[],\n ): Promise>;\n\n /**\n * Retrieves detailed information for a single product variant by its ID. Returns `undefined` if the variant doesn't exist or isn't available. Use for displaying variant-specific details like pricing, inventory, or options when working with specific product configurations.\n *\n * @param productVariantId The ID of the product variant to lookup.\n */\n fetchProductVariantWithId(\n productVariantId: number,\n ): Promise;\n\n /**\n * Retrieves detailed information for multiple product variants by their IDs. Limited to 50 variants maximum—additional IDs are automatically removed. Returns results with both found and not found variants clearly identified. Use for bulk variant lookups or building variant-specific collections.\n *\n * @param productVariantIds Specifies the array of product variant IDs to lookup. This is limited to 50 product variants. All excess requested IDs will be removed from the array.\n */\n fetchProductVariantsWithIds(\n productVariantIds: number[],\n ): Promise>;\n\n /**\n * Retrieves all product variants associated with a specific product ID. Returns all variants at once without pagination. Use for displaying complete variant options, building variant selectors, or analyzing all available configurations for a product.\n *\n * @param productId The product ID. All variants' details associated with this product ID are returned.\n */\n fetchProductVariantsWithProductId(\n productId: number,\n ): Promise;\n\n /**\n * Retrieves product variants for a specific product with pagination support. Use when a product has many variants and you need to load them incrementally for better performance. Ideal for products with extensive variant collections that would be too large to load at once.\n *\n * @param paginationParams The parameters for pagination.\n */\n fetchPaginatedProductVariantsWithProductId(\n productId: number,\n paginationParams: PaginationParams,\n ): Promise>;\n}" + } + }, + "ProductSearchApi": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "name": "ProductSearchApi", + "description": "The `ProductSearchApi` object provides methods for searching and retrieving product information. Access these methods through `shopify.productSearch` to search products and fetch detailed product data.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "PropertySignature", + "name": "productSearch", + "value": "ProductSearchApiContent", + "description": "The `ProductSearchApi` object provides product search and lookup methods." + } + ], + "value": "export interface ProductSearchApi {\n productSearch: ProductSearchApiContent;\n}" + } + }, + "PrintApiContent": { + "src/surfaces/point-of-sale/api/print-api/print-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", + "name": "PrintApiContent", + "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", + "syntaxKind": "MethodSignature", + "name": "print", + "value": "(src: string) => Promise", + "description": "Triggers a print dialog for the specified document source. The `print()` method accepts either:\n\n• A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n\n• A full URL to your app's backend that will be used to return the document to print\n\nReturns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports." + } + ], + "value": "export interface PrintApiContent {\n /**\n * Triggers a print dialog for the specified document source. The `print()` method accepts either:\n *\n * • A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n *\n * • A full URL to your app's backend that will be used to return the document to print\n *\n * Returns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports.\n *\n * @param src the source URL of the content to print.\n * @returns Promise that resolves when content is ready and native print dialog appears.\n */\n print(src: string): Promise;\n}" + } + }, + "PrintApi": { + "src/surfaces/point-of-sale/api/print-api/print-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", + "name": "PrintApi", + "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The numeric identifier for the cash tracking session." - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" - }, + "name": "print", + "value": "PrintApiContent", + "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types." + } + ], + "value": "export interface PrintApi {\n /**\n * The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.\n */\n print: PrintApiContent;\n}" + } + }, + "StorageError": { + "src/surfaces/point-of-sale/types/storage.ts": { + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "name": "StorageError", + "description": "", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "isTrusted", - "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "PropertyDeclaration", + "name": "name", + "value": "string", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "Parameter", + "name": "code", + "value": "\"RecordsCount\" | \"RecordSize\" | \"KeyType\" | \"KeySize\"", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "PropertySignature", - "name": "openingTime", + "name": "message", "value": "string", - "description": "ISO 8601 timestamp when the session was opened." - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", - "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", - "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" - }, + "name": "stack", + "value": "string", + "description": "", + "isOptional": true + } + ], + "value": "export class StorageError extends Error {\n public name = 'StorageError';\n constructor(\n public code: 'RecordsCount' | 'RecordSize' | 'KeyType' | 'KeySize',\n message: string,\n ) {\n super(message);\n }\n}" + } + }, + "Storage": { + "src/surfaces/point-of-sale/types/storage.ts": { + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "name": "Storage", + "description": "Defines the storage interface for persisting extension data across sessions.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + "name": "clear", + "value": "() => Promise", + "description": "Clears all data from storage, removing all key-value pairs." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + "name": "delete", + "value": "(key: Keys) => Promise", + "description": "Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + "name": "entries", + "value": "() => Promise<[Keys, StorageTypes[Keys]][]>", + "description": "Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "MethodSignature", + "name": "get", + "value": "(key: Keys) => Promise", + "description": "Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "type", - "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "MethodSignature", + "name": "set", + "value": "(key: Keys, value: StorageTypes[Keys]) => Promise", + "description": "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." } ], - "value": "export interface CashTrackingSessionCompleteEvent\n extends CashTrackingSessionEvent {\n /** ISO 8601 timestamp when the session was closed. */\n readonly closingTime: string;\n}" + "value": "export interface Storage<\n BaseStorageTypes extends Record = Record,\n> {\n /**\n * 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.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set for the key.\n * @throws StorageError when:\n * - Maximum number of records is exceeded (`code: 'RecordsCount'`)\n * - Individual record size exceeds the limit (`code: 'RecordSize'`)\n * - Key is not a string (`code: 'KeyType'`)\n * - Key size exceeds the limit (`code: 'KeySize'`)\n */\n set<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n value: StorageTypes[Keys],\n ): Promise;\n\n /**\n * Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets.\n *\n * @param key - The key to get the value for.\n * @returns The value of the key.\n * @throws StorageError when the key isn't a string or exceeds its allotted size.\n */\n get<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n ): Promise;\n\n /**\n * Clears all data from storage, removing all key-value pairs.\n */\n clear: () => Promise;\n\n /**\n * Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes.\n *\n * @param key - The key to delete.\n */\n delete<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n ): Promise;\n\n /**\n * Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data.\n *\n * @returns An array containing all the keys and values in the storage.\n */\n entries<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(): Promise<[Keys, StorageTypes[Keys]][]>;\n}" } }, - "ShopifyEventMap": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "ShopifyEventMap", - "description": "Maps Shopify POS event names to their corresponding `Event` subclass types.\n\nUsed as the generic type parameter for `shopify.addEventListener` and `shopify.removeEventListener`.", + "StorageApi": { + "src/surfaces/point-of-sale/api/storage-api/storage-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/storage-api/storage-api.ts", + "name": "StorageApi", + "description": "The `StorageApi` object provides access to persistent local storage methods for your POS UI extension. Access these methods through `shopify.storage` to store, retrieve, and manage data that persists across sessions.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/storage-api/storage-api.ts", "syntaxKind": "PropertySignature", - "name": "cashtrackingsessioncomplete", - "value": "CashTrackingSessionCompleteEvent", + "name": "storage", + "value": "Storage", "description": "" - }, + } + ], + "value": "export interface StorageApi {\n storage: Storage;\n}" + } + }, + "PinPadResult": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "name": "PinPadResult", + "description": "Represents the result of a PIN pad interaction, indicating whether PIN entry was completed and providing the entered PIN if available.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "cashtrackingsessionstart", - "value": "CashTrackingSessionStartEvent", - "description": "" + "name": "completed", + "value": "boolean", + "description": "Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal." }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "transactioncomplete", - "value": "TransactionCompleteEvent", - "description": "Dispatched when a sale, return, or exchange transaction completes.\n\nNarrow on `transactionType` to access per-type fields." + "name": "pin", + "value": "number[]", + "description": "The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN \"1234\"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.", + "isOptional": true } ], - "value": "export interface ShopifyEventMap {\n [POS_EVENT_NAMES.TRANSACTION_COMPLETE]: TransactionCompleteEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;\n}" + "value": "export interface PinPadResult {\n /**\n * Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal.\n */\n completed: boolean;\n /**\n * The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN \"1234\"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.\n */\n pin?: number[];\n}" } }, - "ShopifyInterceptMap": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "ShopifyInterceptMap", - "description": "Maps POS interceptable workflow names to their corresponding `Event` types.\n\nUsed as the generic type parameter for `shopify.intercept`.", + "PinValidationResult": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "PinValidationResult", + "value": "{result: 'accept'} | {result: 'reject'; errorMessage?: string}", + "description": "Represents the validation outcome for an entered PIN. Indicates whether the PIN should be accepted or rejected, with optional error messaging for rejected PINs.", + "isPublicDocs": true + } + }, + "PinLength": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "PinLength", + "value": "4 | 5 | 6 | 7 | 8 | 9 | 10", + "description": "The valid PIN length values (4-10 digits). Commonly used to configure minimum and maximum PIN length requirements.", + "isPublicDocs": true + } + }, + "PinPadActionType": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "name": "PinPadActionType", + "description": "Defines a custom action button for the PIN pad interface with a label and click handler.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "beforecheckout", - "value": "BeforeCheckoutEvent", - "description": "Dispatched when staff attempts to leave the active cart for checkout." + "name": "label", + "value": "string", + "description": "The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for." + }, + { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "syntaxKind": "PropertySignature", + "name": "onClick", + "value": "() => number[] | Promise", + "description": "Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows." } ], - "value": "export interface ShopifyInterceptMap {\n [POS_INTERCEPT_NAMES.BEFORE_CHECKOUT]: BeforeCheckoutEvent;\n}" + "value": "export interface PinPadActionType {\n /**\n * The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.\n */\n label: string;\n /**\n * Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows.\n */\n onClick: () => Promise | number[];\n}" } }, - "BeforeCheckoutEvent": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "BeforeCheckoutEvent", - "description": "Dispatched when staff attempts to leave the active cart for checkout.", + "PinPadOptions": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "name": "PinPadOptions", + "description": "Specifies configuration options for displaying the PIN pad interface. Includes callback functions for PIN entry events, dismissal handling, and customizable labels and messaging.", "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" - }, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "bubbles", + "name": "autoSubmit", "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" + "description": "Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.", + "isOptional": true, + "defaultValue": "false" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" + "name": "label", + "value": "string", + "description": "The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "cancelBubble", + "name": "masked", "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" + "description": "Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.", + "isOptional": true, + "defaultValue": "true" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" + "name": "maxPinLength", + "value": "PinLength", + "description": "The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.", + "isOptional": true, + "defaultValue": "6" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "cart", - "value": "Cart", - "description": "The POS cart at the point checkout was requested." + "name": "minPinLength", + "value": "PinLength", + "description": "The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.", + "isOptional": true, + "defaultValue": "4" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "composed", - "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + "name": "onDismissed", + "value": "(result: PinPadResult) => void", + "description": "The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + "name": "onPinEntry", + "value": "(pin: number[]) => void", + "description": "The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "defaultPrevented", - "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" + "name": "pinPadAction", + "value": "PinPadActionType", + "description": "The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "eventPhase", - "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" - }, + "name": "title", + "value": "string", + "description": "The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.", + "isOptional": true + } + ], + "value": "export interface PinPadOptions {\n /**\n * The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.\n */\n onPinEntry?: (pin: number[]) => void;\n /**\n * The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.\n */\n onDismissed?: (result: PinPadResult) => void;\n /**\n * The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.\n */\n label?: string;\n /**\n * Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.\n *\n * @default true\n */\n masked?: boolean;\n /**\n * The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.\n *\n * @default 4\n */\n minPinLength?: PinLength;\n /**\n * The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.\n *\n * @default 6\n */\n maxPinLength?: PinLength;\n /**\n * The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.\n */\n pinPadAction?: PinPadActionType;\n /**\n * The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.\n */\n title?: string;\n /**\n * Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.\n *\n * @default false\n */\n autoSubmit?: boolean;\n}" + } + }, + "PinPadApiContent": { + "src/surfaces/point-of-sale/api/pin-pad-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "name": "PinPadApiContent", + "description": "The `PinPadApi` object provides PIN entry and validation functionality.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" - }, + "name": "showPinPad", + "value": "(onSubmit: (pin: number[]) => PinValidationResult | Promise, options?: PinPadOptions) => void", + "description": "Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.\n\n• **When accepted**: The modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.\n\n• **When rejected**: Displays the optional `errorMessage` and keeps the modal open.\n\nUse for implementing secure authentication workflows, access control, or PIN-based verification systems." + } + ], + "value": "export interface PinPadApiContent {\n /**\n * Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.\n *\n * • **When accepted**: The modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.\n *\n * • **When rejected**: Displays the optional `errorMessage` and keeps the modal open.\n *\n * Use for implementing secure authentication workflows, access control, or PIN-based verification systems.\n */\n showPinPad(\n onSubmit: (\n pin: number[],\n ) => Promise | PinValidationResult,\n options?: PinPadOptions,\n ): void;\n}" + } + }, + "PinPadApi": { + "src/surfaces/point-of-sale/api/pin-pad-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "name": "PinPadApi", + "description": "The `PinPadApi` object provides methods for displaying secure PIN entry interfaces. Access these methods through `shopify.pinPad` to show PIN pad modals and handle PIN validation.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", "syntaxKind": "PropertySignature", - "name": "isTrusted", - "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" - }, + "name": "pinPad", + "value": "PinPadApiContent", + "description": "The `PinPadApi` object provides PIN entry and validation functionality." + } + ], + "value": "export interface PinPadApi {\n pinPad: PinPadApiContent;\n}" + } + }, + "StandardApi": { + "src/surfaces/point-of-sale/api/standard/standard-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/standard/standard-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StandardApi", + "value": "{[key: string]: any} & {\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & CapabilitiesApi & LocaleApi & ToastApi & SessionApi & PrintApi & ProductSearchApi & DeviceApi & ConnectivityApi & StorageApi & PinPadApi & CameraApi", + "description": "", + "isPublicDocs": true + } + }, + "I18n": { + "src/api.ts": { + "filePath": "src/api.ts", + "name": "I18n", + "description": "Internationalization utilities for formatting and translating content according to the user's locale. Use these methods to display numbers, currency, dates, and translated strings that match the merchant's language and regional preferences.", + "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/api.ts", "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", - "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + "name": "formatCurrency", + "value": "(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string", + "description": "Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default." }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/api.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", - "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" + "name": "formatDate", + "value": "(date: Date, options?: { inExtensionLocale?: boolean; } & DateTimeFormatOptions) => string", + "description": "Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style." }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/api.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + "name": "formatNumber", + "value": "(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string", + "description": "Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default." }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/api.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" - }, + "name": "translate", + "value": "I18nTranslate", + "description": "Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components." + } + ], + "value": "export interface I18n {\n /**\n * Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default.\n *\n * @param number - The number to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.NumberFormatOptions for customizing the number format\n */\n formatNumber: (\n number: number | bigint,\n options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,\n ) => string;\n\n /**\n * Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default.\n *\n * @param number - The currency amount to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.NumberFormatOptions for customizing the currency format, such as the currency code\n */\n formatCurrency: (\n number: number | bigint,\n options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,\n ) => string;\n\n /**\n * Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style.\n *\n * @param date - The Date object to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.DateTimeFormatOptions for customizing the date format\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n formatDate: (\n date: Date,\n options?: {inExtensionLocale?: boolean} & Intl.DateTimeFormatOptions,\n ) => string;\n\n /**\n * Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components.\n */\n translate: I18nTranslate;\n}" + } + }, + "I18nTranslate": { + "src/api.ts": { + "filePath": "src/api.ts", + "name": "I18nTranslate", + "description": "The translation function signature for internationalization. Use this to translate string keys defined in your locale files into localized content for the current user's language.", + "members": [], + "value": "export interface I18nTranslate {\n /**\n * Returns a translated string matching a key in a locale file. Use this to display localized text in your extension based on the merchant's language preferences. Supports interpolation with replacement values and pluralization with the `count` option. Returns a string when replacements are primitives, or an array when replacements include UI components.\n *\n * @param key - The translation key from your locale file (for example, \"banner.title\")\n * @param options - Optional replacement values for interpolation or the special `count` property for pluralization\n *\n * @example translate(\"banner.title\")\n * @example translate(\"items.count\", { count: 5 })\n */\n (\n key: string,\n options?: Record,\n ): ReplacementType extends string | number\n ? string\n : (string | ReplacementType)[];\n}" + } + }, + "ScannerSource": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ScannerSource", + "value": "'camera' | 'external' | 'embedded'", + "description": "The scanner source the POS device supports.", + "isPublicDocs": true + } + }, + "ScannerSubscriptionResult": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerSubscriptionResult", + "description": "Represents the data from a scanner event. Contains the scanned string data and the hardware source that captured the scan.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "name": "data", + "value": "string", + "description": "The string data from the last scanner event received. Contains the scanned barcode, QR code, or other scannable data. Returns `undefined` when no scan data is available. Use to process scanned content and implement scan-based business logic.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "'beforecheckout'", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" - } - ], - "value": "export interface BeforeCheckoutEvent extends Event {\n readonly type: typeof POS_INTERCEPT_NAMES.BEFORE_CHECKOUT;\n /** The POS cart at the point checkout was requested. */\n readonly cart: Cart;\n}" - } - }, - "ShopifyInterceptor": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "ShopifyInterceptor", - "description": "", - "isPublicDocs": true, - "params": [ - { - "name": "event", - "description": "", - "value": "TEvent", - "filePath": "src/surfaces/point-of-sale/events.ts" + "name": "source", + "value": "ScannerSource", + "description": "The scanning source from which the scan event came. Returns one of the following scanner types:\n\n• `'camera'` - Built-in device camera used for scanning • `'external'` - External scanner hardware connected to the device • `'embedded'` - Embedded scanner hardware built into the device", + "isOptional": true } ], - "returns": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "description": "", - "name": "InterceptResult", - "value": "InterceptResult" - }, - "value": "(\n event: TEvent,\n) => InterceptResult" + "value": "export interface ScannerSubscriptionResult {\n /**\n * The string data from the last scanner event received. Contains the scanned barcode, QR code, or other scannable data. Returns `undefined` when no scan data is available. Use to process scanned content and implement scan-based business logic.\n */\n data?: string;\n /**\n * The scanning source from which the scan event came. Returns one of the following scanner types:\n *\n * • `'camera'` - Built-in device camera used for scanning\n * • `'external'` - External scanner hardware connected to the device\n * • `'embedded'` - Embedded scanner hardware built into the device\n */\n source?: ScannerSource;\n}" } }, - "InterceptResult": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "InterceptResult", - "description": "The result an interceptor returns. An empty `operations` list allows the workflow; an `ERROR` validation blocks it.", + "ScannerSources": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerSources", + "description": "Represents the available scanner hardware sources on the device. Provides reactive access to the list of scanners that can be used for scanning operations.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "operations", - "value": "Operation[]", - "description": "" + "name": "current", + "value": "ReadonlySignalLike", + "description": "Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available." } ], - "value": "export interface InterceptResult {\n operations: Operation[];\n}" + "value": "export interface ScannerSources {\n /**\n * Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available.\n */\n current: ReadonlySignalLike;\n}" } }, - "Operation": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "Operation", - "description": "A single host operation produced by an interceptor.", + "ScannerData": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerData", + "description": "Represents the scanner interface for accessing scan events and subscription management. Provides real-time access to scanned data through a reactive signal pattern.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "validationAdd", - "value": "ValidationAdd", - "description": "Adds a validation to the workflow being intercepted.", - "isOptional": true + "name": "current", + "value": "ReadonlySignalLike", + "description": "Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available." } ], - "value": "export interface Operation {\n validationAdd?: ValidationAdd;\n}" + "value": "export interface ScannerData {\n /**\n * Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available.\n */\n current: ReadonlySignalLike;\n}" } }, - "ValidationAdd": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "ValidationAdd", - "description": "Adds a validation to the workflow being intercepted.", + "ScannerApiContent": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerApiContent", + "description": "The `ScannerApi` object provides scan results and scanner controls.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "handle", - "value": "string", - "description": "Stable identifier for this validation." + "name": "hideCameraScanner", + "value": "() => void", + "description": "Hide the camera scanner." }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "level", - "value": "ValidationLevel", - "description": "`ERROR` blocks the workflow. `WARNING` and `INFO` do not." + "name": "scannerData", + "value": "ScannerData", + "description": "Access current scan data and subscribe to new scan events. Use to receive real-time scan results." }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "message", - "value": "string", - "description": "Host-facing message for support, observability, or staff UX." + "name": "showCameraScanner", + "value": "() => void", + "description": "Show the camera scanner." }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "metafields", - "value": "Metafield[]", - "description": "Optional structured data for custom UX or order metadata.", - "isOptional": true - }, + "name": "sources", + "value": "ScannerSources", + "description": "Access available scanner sources on the device. Use to check which scanners are available (camera, external, or embedded)." + } + ], + "value": "export interface ScannerApiContent {\n /**\n * Access current scan data and subscribe to new scan events. Use to receive real-time scan results.\n */\n scannerData: ScannerData;\n /**\n * Access available scanner sources on the device. Use to check which scanners are available (camera, external, or embedded).\n */\n sources: ScannerSources;\n /**\n * Show the camera scanner.\n */\n showCameraScanner: () => void;\n /**\n * Hide the camera scanner.\n */\n hideCameraScanner: () => void;\n}" + } + }, + "ScannerApi": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerApi", + "description": "The `ScannerApi` object provides access to scanning functionality and scanner source information. Access these properties through `shopify.scanner` to monitor scan events and available scanner sources.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "string", - "description": "JSON-path locator for where the validation applies. Defaults to `$.cart`.", - "isOptional": true + "name": "scanner", + "value": "ScannerApiContent", + "description": "The `ScannerApi` object provides scan results and scanner controls." } ], - "value": "export interface ValidationAdd {\n /** `ERROR` blocks the workflow. `WARNING` and `INFO` do not. */\n level: ValidationLevel;\n\n /** Stable identifier for this validation. */\n handle: string;\n\n /** Host-facing message for support, observability, or staff UX. */\n message: string;\n\n /** JSON-path locator for where the validation applies. Defaults to `$.cart`. */\n target?: string;\n\n /** Optional structured data for custom UX or order metadata. */\n metafields?: Metafield[];\n}" + "value": "export interface ScannerApi {\n scanner: ScannerApiContent;\n}" } }, - "ValidationLevel": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", + "ActionTargetApi": { + "src/surfaces/point-of-sale/api/action-target-api/action-target-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/action-target-api/action-target-api.ts", "syntaxKind": "TypeAliasDeclaration", - "name": "ValidationLevel", - "value": "'INFO' | 'WARNING' | 'ERROR'", + "name": "ActionTargetApi", + "value": "{[key: string]: any} & {\n extensionPoint: T;\n} & StandardApi & ScannerApi", "description": "", "isPublicDocs": true } }, - "Metafield": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "Metafield", - "description": "Metafield input attached to a validation.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "key", - "value": "string", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "namespace", - "value": "string", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "type", - "value": "string", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "value", - "value": "string", - "description": "" - } - ], - "value": "export interface Metafield {\n namespace: string;\n key: string;\n value: string;\n type: string;\n}" + "DataTargetApi": { + "src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "DataTargetApi", + "value": "{\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & CapabilitiesApi & SessionApi & StorageApi & LocaleApi & ConnectivityApi & DeviceApi & ProductSearchApi & ReadonlyCartApi", + "description": "API surface for non-rendering data extension targets.", + "isPublicDocs": true } }, "CustomerApi": { @@ -5067,46 +5095,6 @@ "value": "export interface CustomerApiContent {\n /**\n * The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems.\n */\n id: number;\n}" } }, - "InterceptCapability": { - "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "InterceptCapability", - "value": "`${Extract<\n keyof ShopifyInterceptMap,\n string\n>}.${'error' | 'warning' | 'info'}`", - "description": "A granted validation severity for a POS intercept event. Event names are derived from `ShopifyInterceptMap`; `warning` corresponds to the `WARNING` validation level.", - "isPublicDocs": true - } - }, - "CapabilitiesApi": { - "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", - "name": "CapabilitiesApi", - "description": "Provides the validation severities granted for POS intercept events.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", - "syntaxKind": "PropertySignature", - "name": "capabilities", - "value": "ReadonlySignalLike", - "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", - "title": "Example" - } - ] - } - ] - } - ], - "value": "export interface CapabilitiesApi {\n /**\n * A read-only list of granted intercept capabilities. The signal is available\n * to every POS target, but only the target that registers an interceptor\n * declares its event in `shopify.extension.toml`.\n *\n * Grants are cumulative. An `.error` grant includes `.warning` and `.info`,\n * and a `.warning` grant includes `.info`.\n *\n * @example\n * ```ts\n * if (shopify.capabilities.value.includes('beforecheckout.error')) {\n * // This interceptor can return ERROR, WARNING, or INFO validations.\n * }\n * ```\n */\n capabilities: ReadonlySignalLike;\n}" - } - }, "OrderApi": { "src/surfaces/point-of-sale/api/order-api/order-api.ts": { "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", @@ -5515,7 +5503,7 @@ "filePath": "src/surfaces/point-of-sale/components.ts", "syntaxKind": "TypeAliasDeclaration", "name": "IconType", - "value": "'camera' | 'external' | 'info' | 'adjust' | 'affiliate' | 'airplane' | 'alert-bubble' | 'alert-circle' | 'alert-diamond' | 'alert-location' | 'alert-octagon' | 'alert-octagon-filled' | 'alert-triangle' | 'alert-triangle-filled' | 'align-horizontal-centers' | 'app-extension' | 'apps' | 'archive' | 'arrow-down' | 'arrow-down-circle' | 'arrow-down-right' | 'arrow-left' | 'arrow-left-circle' | 'arrow-right' | 'arrow-right-circle' | 'arrow-up' | 'arrow-up-circle' | 'arrow-up-right' | 'arrows-in-horizontal' | 'arrows-out-horizontal' | 'asterisk' | 'attachment' | 'automation' | 'backspace' | 'bag' | 'bank' | 'barcode' | 'battery-low' | 'bill' | 'blank' | 'blog' | 'bolt' | 'bolt-filled' | 'book' | 'book-open' | 'bug' | 'bullet' | 'business-entity' | 'button' | 'button-press' | 'calculator' | 'calendar' | 'calendar-check' | 'calendar-compare' | 'calendar-list' | 'calendar-time' | 'camera-flip' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'cart' | 'cart-abandoned' | 'cart-discount' | 'cart-down' | 'cart-filled' | 'cart-sale' | 'cart-send' | 'cart-up' | 'cash-dollar' | 'cash-euro' | 'cash-pound' | 'cash-rupee' | 'cash-yen' | 'catalog-product' | 'categories' | 'channels' | 'chart-cohort' | 'chart-donut' | 'chart-funnel' | 'chart-histogram-first' | 'chart-histogram-first-last' | 'chart-histogram-flat' | 'chart-histogram-full' | 'chart-histogram-growth' | 'chart-histogram-last' | 'chart-histogram-second-last' | 'chart-horizontal' | 'chart-line' | 'chart-popular' | 'chart-stacked' | 'chart-vertical' | 'chat' | 'chat-new' | 'chat-referral' | 'check' | 'check-circle' | 'check-circle-filled' | 'checkbox' | 'chevron-down' | 'chevron-down-circle' | 'chevron-left' | 'chevron-left-circle' | 'chevron-right' | 'chevron-right-circle' | 'chevron-up' | 'chevron-up-circle' | 'circle' | 'circle-dashed' | 'clipboard' | 'clipboard-check' | 'clipboard-checklist' | 'clock' | 'clock-list' | 'clock-revert' | 'code' | 'code-add' | 'collection' | 'collection-featured' | 'collection-list' | 'collection-reference' | 'color' | 'color-none' | 'compass' | 'complete' | 'compose' | 'confetti' | 'connect' | 'content' | 'contract' | 'corner-pill' | 'corner-round' | 'corner-square' | 'credit-card' | 'credit-card-cancel' | 'credit-card-percent' | 'credit-card-reader' | 'credit-card-reader-chip' | 'credit-card-reader-tap' | 'credit-card-secure' | 'credit-card-tap-chip' | 'crop' | 'currency-convert' | 'cursor' | 'cursor-banner' | 'cursor-option' | 'data-presentation' | 'data-table' | 'database' | 'database-add' | 'database-connect' | 'delete' | 'delivered' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'dns-settings' | 'dock-floating' | 'dock-side' | 'domain' | 'domain-landing-page' | 'domain-new' | 'domain-redirect' | 'download' | 'drag-drop' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'email-follow-up' | 'email-newsletter' | 'empty' | 'enabled' | 'enter' | 'envelope' | 'envelope-soft-pack' | 'eraser' | 'exchange' | 'exit' | 'export' | 'eye-check-mark' | 'eye-dropper' | 'eye-dropper-list' | 'eye-first' | 'eyeglasses' | 'fav' | 'favicon' | 'file' | 'file-list' | 'filter' | 'filter-active' | 'flag' | 'flip-horizontal' | 'flip-vertical' | 'flower' | 'folder' | 'folder-add' | 'folder-down' | 'folder-remove' | 'folder-up' | 'food' | 'foreground' | 'forklift' | 'forms' | 'games' | 'gauge' | 'geolocation' | 'gift' | 'gift-card' | 'git-branch' | 'git-commit' | 'git-repository' | 'globe' | 'globe-asia' | 'globe-europe' | 'globe-lines' | 'globe-list' | 'graduation-hat' | 'grid' | 'hashtag' | 'hashtag-decimal' | 'hashtag-list' | 'heart' | 'hide' | 'hide-filled' | 'home' | 'home-filled' | 'icons' | 'identity-card' | 'image' | 'image-add' | 'image-alt' | 'image-explore' | 'image-magic' | 'image-none' | 'image-with-text-overlay' | 'images' | 'import' | 'in-progress' | 'incentive' | 'incoming' | 'incomplete' | 'info-filled' | 'inheritance' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'inventory-updated' | 'iq' | 'key' | 'keyboard' | 'keyboard-filled' | 'keyboard-hide' | 'keypad' | 'label-printer' | 'language' | 'language-translate' | 'layout-block' | 'layout-buy-button' | 'layout-buy-button-horizontal' | 'layout-buy-button-vertical' | 'layout-column-1' | 'layout-columns-2' | 'layout-columns-3' | 'layout-footer' | 'layout-header' | 'layout-logo-block' | 'layout-popup' | 'layout-rows-2' | 'layout-section' | 'layout-sidebar-left' | 'layout-sidebar-right' | 'lightbulb' | 'link' | 'link-list' | 'list-bulleted' | 'list-bulleted-filled' | 'list-numbered' | 'live' | 'live-critical' | 'live-none' | 'location' | 'location-none' | 'lock' | 'map' | 'markets' | 'markets-euro' | 'markets-rupee' | 'markets-yen' | 'maximize' | 'measurement-size' | 'measurement-size-list' | 'measurement-volume' | 'measurement-volume-list' | 'measurement-weight' | 'measurement-weight-list' | 'media-receiver' | 'megaphone' | 'mention' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'menu-vertical' | 'merge' | 'metafields' | 'metaobject' | 'metaobject-list' | 'metaobject-reference' | 'microphone' | 'microphone-muted' | 'minimize' | 'minus' | 'minus-circle' | 'mobile' | 'money' | 'money-none' | 'money-split' | 'moon' | 'nature' | 'note' | 'note-add' | 'notification' | 'number-one' | 'order' | 'order-batches' | 'order-draft' | 'order-filled' | 'order-first' | 'order-fulfilled' | 'order-repeat' | 'order-unfulfilled' | 'orders-status' | 'organization' | 'outdent' | 'outgoing' | 'package' | 'package-cancel' | 'package-fulfilled' | 'package-on-hold' | 'package-reassign' | 'package-returned' | 'page' | 'page-add' | 'page-attachment' | 'page-clock' | 'page-down' | 'page-heart' | 'page-list' | 'page-reference' | 'page-remove' | 'page-report' | 'page-up' | 'pagination-end' | 'pagination-start' | 'paint-brush-flat' | 'paint-brush-round' | 'paper-check' | 'partially-complete' | 'passkey' | 'paste' | 'pause-circle' | 'payment' | 'payment-capture' | 'payout' | 'payout-dollar' | 'payout-euro' | 'payout-pound' | 'payout-rupee' | 'payout-yen' | 'person' | 'person-add' | 'person-exit' | 'person-filled' | 'person-list' | 'person-lock' | 'person-remove' | 'person-segment' | 'personalized-text' | 'phablet' | 'phone' | 'phone-down' | 'phone-down-filled' | 'phone-in' | 'phone-out' | 'pin' | 'pin-remove' | 'plan' | 'play' | 'play-circle' | 'plus' | 'plus-circle' | 'plus-circle-down' | 'plus-circle-filled' | 'plus-circle-up' | 'point-of-sale' | 'point-of-sale-register' | 'price-list' | 'print' | 'product' | 'product-add' | 'product-cost' | 'product-filled' | 'product-list' | 'product-reference' | 'product-remove' | 'product-return' | 'product-unavailable' | 'profile' | 'profile-filled' | 'question-circle' | 'question-circle-filled' | 'radio-control' | 'receipt' | 'receipt-dollar' | 'receipt-euro' | 'receipt-folded' | 'receipt-paid' | 'receipt-pound' | 'receipt-refund' | 'receipt-rupee' | 'receipt-yen' | 'receivables' | 'redo' | 'referral-code' | 'refresh' | 'remove-background' | 'reorder' | 'replace' | 'replay' | 'reset' | 'return' | 'reward' | 'rocket' | 'rotate-left' | 'rotate-right' | 'sandbox' | 'save' | 'savings' | 'scan-qr-code' | 'search' | 'search-add' | 'search-list' | 'search-recent' | 'search-resource' | 'select' | 'send' | 'settings' | 'share' | 'shield-check-mark' | 'shield-none' | 'shield-pending' | 'shield-person' | 'shipping-label' | 'shipping-label-cancel' | 'shopcodes' | 'slideshow' | 'smiley-happy' | 'smiley-joy' | 'smiley-neutral' | 'smiley-sad' | 'social-ad' | 'social-post' | 'sort' | 'sort-ascending' | 'sort-descending' | 'sound' | 'split' | 'sports' | 'star' | 'star-circle' | 'star-filled' | 'star-half' | 'star-list' | 'status' | 'status-active' | 'stop-circle' | 'store' | 'store-import' | 'store-managed' | 'store-online' | 'sun' | 'table' | 'table-masonry' | 'tablet' | 'target' | 'tax' | 'team' | 'text' | 'text-align-center' | 'text-align-left' | 'text-align-right' | 'text-block' | 'text-bold' | 'text-color' | 'text-font' | 'text-font-list' | 'text-grammar' | 'text-in-columns' | 'text-in-rows' | 'text-indent' | 'text-indent-remove' | 'text-italic' | 'text-quote' | 'text-title' | 'text-underline' | 'text-with-image' | 'theme' | 'theme-edit' | 'theme-store' | 'theme-template' | 'three-d-environment' | 'thumbs-down' | 'thumbs-up' | 'tip-jar' | 'toggle-off' | 'toggle-on' | 'transaction' | 'transaction-fee-add' | 'transaction-fee-dollar' | 'transaction-fee-euro' | 'transaction-fee-pound' | 'transaction-fee-rupee' | 'transaction-fee-yen' | 'transfer' | 'transfer-in' | 'transfer-internal' | 'transfer-out' | 'truck' | 'undo' | 'unknown-device' | 'unlock' | 'upload' | 'variant' | 'variant-list' | 'video' | 'video-list' | 'view' | 'viewport-narrow' | 'viewport-short' | 'viewport-tall' | 'viewport-wide' | 'wallet' | 'wand' | 'watch' | 'wifi' | 'work' | 'work-list' | 'wrench' | 'x' | 'x-circle' | 'x-circle-filled'", + "value": "'info' | 'camera' | 'external' | 'adjust' | 'affiliate' | 'airplane' | 'alert-bubble' | 'alert-circle' | 'alert-diamond' | 'alert-location' | 'alert-octagon' | 'alert-octagon-filled' | 'alert-triangle' | 'alert-triangle-filled' | 'align-horizontal-centers' | 'app-extension' | 'apps' | 'archive' | 'arrow-down' | 'arrow-down-circle' | 'arrow-down-right' | 'arrow-left' | 'arrow-left-circle' | 'arrow-right' | 'arrow-right-circle' | 'arrow-up' | 'arrow-up-circle' | 'arrow-up-right' | 'arrows-in-horizontal' | 'arrows-out-horizontal' | 'asterisk' | 'attachment' | 'automation' | 'backspace' | 'bag' | 'bank' | 'barcode' | 'battery-low' | 'bill' | 'blank' | 'blog' | 'bolt' | 'bolt-filled' | 'book' | 'book-open' | 'bug' | 'bullet' | 'business-entity' | 'button' | 'button-press' | 'calculator' | 'calendar' | 'calendar-check' | 'calendar-compare' | 'calendar-list' | 'calendar-time' | 'camera-flip' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'cart' | 'cart-abandoned' | 'cart-discount' | 'cart-down' | 'cart-filled' | 'cart-sale' | 'cart-send' | 'cart-up' | 'cash-dollar' | 'cash-euro' | 'cash-pound' | 'cash-rupee' | 'cash-yen' | 'catalog-product' | 'categories' | 'channels' | 'chart-cohort' | 'chart-donut' | 'chart-funnel' | 'chart-histogram-first' | 'chart-histogram-first-last' | 'chart-histogram-flat' | 'chart-histogram-full' | 'chart-histogram-growth' | 'chart-histogram-last' | 'chart-histogram-second-last' | 'chart-horizontal' | 'chart-line' | 'chart-popular' | 'chart-stacked' | 'chart-vertical' | 'chat' | 'chat-new' | 'chat-referral' | 'check' | 'check-circle' | 'check-circle-filled' | 'checkbox' | 'chevron-down' | 'chevron-down-circle' | 'chevron-left' | 'chevron-left-circle' | 'chevron-right' | 'chevron-right-circle' | 'chevron-up' | 'chevron-up-circle' | 'circle' | 'circle-dashed' | 'clipboard' | 'clipboard-check' | 'clipboard-checklist' | 'clock' | 'clock-list' | 'clock-revert' | 'code' | 'code-add' | 'collection' | 'collection-featured' | 'collection-list' | 'collection-reference' | 'color' | 'color-none' | 'compass' | 'complete' | 'compose' | 'confetti' | 'connect' | 'content' | 'contract' | 'corner-pill' | 'corner-round' | 'corner-square' | 'credit-card' | 'credit-card-cancel' | 'credit-card-percent' | 'credit-card-reader' | 'credit-card-reader-chip' | 'credit-card-reader-tap' | 'credit-card-secure' | 'credit-card-tap-chip' | 'crop' | 'currency-convert' | 'cursor' | 'cursor-banner' | 'cursor-option' | 'data-presentation' | 'data-table' | 'database' | 'database-add' | 'database-connect' | 'delete' | 'delivered' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'dns-settings' | 'dock-floating' | 'dock-side' | 'domain' | 'domain-landing-page' | 'domain-new' | 'domain-redirect' | 'download' | 'drag-drop' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'email-follow-up' | 'email-newsletter' | 'empty' | 'enabled' | 'enter' | 'envelope' | 'envelope-soft-pack' | 'eraser' | 'exchange' | 'exit' | 'export' | 'eye-check-mark' | 'eye-dropper' | 'eye-dropper-list' | 'eye-first' | 'eyeglasses' | 'fav' | 'favicon' | 'file' | 'file-list' | 'filter' | 'filter-active' | 'flag' | 'flip-horizontal' | 'flip-vertical' | 'flower' | 'folder' | 'folder-add' | 'folder-down' | 'folder-remove' | 'folder-up' | 'food' | 'foreground' | 'forklift' | 'forms' | 'games' | 'gauge' | 'geolocation' | 'gift' | 'gift-card' | 'git-branch' | 'git-commit' | 'git-repository' | 'globe' | 'globe-asia' | 'globe-europe' | 'globe-lines' | 'globe-list' | 'graduation-hat' | 'grid' | 'hashtag' | 'hashtag-decimal' | 'hashtag-list' | 'heart' | 'hide' | 'hide-filled' | 'home' | 'home-filled' | 'icons' | 'identity-card' | 'image' | 'image-add' | 'image-alt' | 'image-explore' | 'image-magic' | 'image-none' | 'image-with-text-overlay' | 'images' | 'import' | 'in-progress' | 'incentive' | 'incoming' | 'incomplete' | 'info-filled' | 'inheritance' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'inventory-updated' | 'iq' | 'key' | 'keyboard' | 'keyboard-filled' | 'keyboard-hide' | 'keypad' | 'label-printer' | 'language' | 'language-translate' | 'layout-block' | 'layout-buy-button' | 'layout-buy-button-horizontal' | 'layout-buy-button-vertical' | 'layout-column-1' | 'layout-columns-2' | 'layout-columns-3' | 'layout-footer' | 'layout-header' | 'layout-logo-block' | 'layout-popup' | 'layout-rows-2' | 'layout-section' | 'layout-sidebar-left' | 'layout-sidebar-right' | 'lightbulb' | 'link' | 'link-list' | 'list-bulleted' | 'list-bulleted-filled' | 'list-numbered' | 'live' | 'live-critical' | 'live-none' | 'location' | 'location-none' | 'lock' | 'map' | 'markets' | 'markets-euro' | 'markets-rupee' | 'markets-yen' | 'maximize' | 'measurement-size' | 'measurement-size-list' | 'measurement-volume' | 'measurement-volume-list' | 'measurement-weight' | 'measurement-weight-list' | 'media-receiver' | 'megaphone' | 'mention' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'menu-vertical' | 'merge' | 'metafields' | 'metaobject' | 'metaobject-list' | 'metaobject-reference' | 'microphone' | 'microphone-muted' | 'minimize' | 'minus' | 'minus-circle' | 'mobile' | 'money' | 'money-none' | 'money-split' | 'moon' | 'nature' | 'note' | 'note-add' | 'notification' | 'number-one' | 'order' | 'order-batches' | 'order-draft' | 'order-filled' | 'order-first' | 'order-fulfilled' | 'order-repeat' | 'order-unfulfilled' | 'orders-status' | 'organization' | 'outdent' | 'outgoing' | 'package' | 'package-cancel' | 'package-fulfilled' | 'package-on-hold' | 'package-reassign' | 'package-returned' | 'page' | 'page-add' | 'page-attachment' | 'page-clock' | 'page-down' | 'page-heart' | 'page-list' | 'page-reference' | 'page-remove' | 'page-report' | 'page-up' | 'pagination-end' | 'pagination-start' | 'paint-brush-flat' | 'paint-brush-round' | 'paper-check' | 'partially-complete' | 'passkey' | 'paste' | 'pause-circle' | 'payment' | 'payment-capture' | 'payout' | 'payout-dollar' | 'payout-euro' | 'payout-pound' | 'payout-rupee' | 'payout-yen' | 'person' | 'person-add' | 'person-exit' | 'person-filled' | 'person-list' | 'person-lock' | 'person-remove' | 'person-segment' | 'personalized-text' | 'phablet' | 'phone' | 'phone-down' | 'phone-down-filled' | 'phone-in' | 'phone-out' | 'pin' | 'pin-remove' | 'plan' | 'play' | 'play-circle' | 'plus' | 'plus-circle' | 'plus-circle-down' | 'plus-circle-filled' | 'plus-circle-up' | 'point-of-sale' | 'point-of-sale-register' | 'price-list' | 'print' | 'product' | 'product-add' | 'product-cost' | 'product-filled' | 'product-list' | 'product-reference' | 'product-remove' | 'product-return' | 'product-unavailable' | 'profile' | 'profile-filled' | 'question-circle' | 'question-circle-filled' | 'radio-control' | 'receipt' | 'receipt-dollar' | 'receipt-euro' | 'receipt-folded' | 'receipt-paid' | 'receipt-pound' | 'receipt-refund' | 'receipt-rupee' | 'receipt-yen' | 'receivables' | 'redo' | 'referral-code' | 'refresh' | 'remove-background' | 'reorder' | 'replace' | 'replay' | 'reset' | 'return' | 'reward' | 'rocket' | 'rotate-left' | 'rotate-right' | 'sandbox' | 'save' | 'savings' | 'scan-qr-code' | 'search' | 'search-add' | 'search-list' | 'search-recent' | 'search-resource' | 'select' | 'send' | 'settings' | 'share' | 'shield-check-mark' | 'shield-none' | 'shield-pending' | 'shield-person' | 'shipping-label' | 'shipping-label-cancel' | 'shopcodes' | 'slideshow' | 'smiley-happy' | 'smiley-joy' | 'smiley-neutral' | 'smiley-sad' | 'social-ad' | 'social-post' | 'sort' | 'sort-ascending' | 'sort-descending' | 'sound' | 'split' | 'sports' | 'star' | 'star-circle' | 'star-filled' | 'star-half' | 'star-list' | 'status' | 'status-active' | 'stop-circle' | 'store' | 'store-import' | 'store-managed' | 'store-online' | 'sun' | 'table' | 'table-masonry' | 'tablet' | 'target' | 'tax' | 'team' | 'text' | 'text-align-center' | 'text-align-left' | 'text-align-right' | 'text-block' | 'text-bold' | 'text-color' | 'text-font' | 'text-font-list' | 'text-grammar' | 'text-in-columns' | 'text-in-rows' | 'text-indent' | 'text-indent-remove' | 'text-italic' | 'text-quote' | 'text-title' | 'text-underline' | 'text-with-image' | 'theme' | 'theme-edit' | 'theme-store' | 'theme-template' | 'three-d-environment' | 'thumbs-down' | 'thumbs-up' | 'tip-jar' | 'toggle-off' | 'toggle-on' | 'transaction' | 'transaction-fee-add' | 'transaction-fee-dollar' | 'transaction-fee-euro' | 'transaction-fee-pound' | 'transaction-fee-rupee' | 'transaction-fee-yen' | 'transfer' | 'transfer-in' | 'transfer-internal' | 'transfer-out' | 'truck' | 'undo' | 'unknown-device' | 'unlock' | 'upload' | 'variant' | 'variant-list' | 'video' | 'video-list' | 'view' | 'viewport-narrow' | 'viewport-short' | 'viewport-tall' | 'viewport-wide' | 'wallet' | 'wand' | 'watch' | 'wifi' | 'work' | 'work-list' | 'wrench' | 'x' | 'x-circle' | 'x-circle-filled'", "description": "", "isPublicDocs": true } @@ -7046,7 +7034,7 @@ "filePath": "src/surfaces/point-of-sale/components.ts", "syntaxKind": "TypeAliasDeclaration", "name": "SupportedIconNames", - "value": "'external' | 'info' | 'alert-circle' | 'apps' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'backspace' | 'barcode' | 'battery-low' | 'bolt-filled' | 'bullet' | 'camera-flip' | 'caret-down' | 'caret-up' | 'cart' | 'cart-down' | 'cart-filled' | 'cart-send' | 'cart-up' | 'chart-line' | 'chart-vertical' | 'check' | 'check-circle-filled' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle' | 'clipboard-checklist' | 'clock' | 'collection' | 'credit-card' | 'credit-card-reader' | 'delete' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'exchange' | 'flag' | 'gift-card' | 'graduation-hat' | 'grid' | 'hide-filled' | 'home' | 'home-filled' | 'image' | 'images' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'keyboard-hide' | 'keypad' | 'link' | 'list-bulleted' | 'list-bulleted-filled' | 'live' | 'live-critical' | 'live-none' | 'location' | 'lock' | 'maximize' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'minimize' | 'minus' | 'mobile' | 'money' | 'money-split' | 'note' | 'order' | 'order-draft' | 'order-filled' | 'package' | 'package-cancel' | 'package-reassign' | 'payment' | 'person' | 'person-add' | 'person-filled' | 'phablet' | 'phone-out' | 'play-circle' | 'plus' | 'point-of-sale' | 'point-of-sale-register' | 'print' | 'product' | 'product-filled' | 'profile' | 'question-circle-filled' | 'receipt' | 'refresh' | 'return' | 'scan-qr-code' | 'search' | 'send' | 'settings' | 'shipping-label-cancel' | 'sort' | 'star-circle' | 'star-filled' | 'store' | 'tablet' | 'transaction-fee-add' | 'unlock' | 'variant' | 'view' | 'wallet' | 'x' | 'x-circle'", + "value": "'info' | 'external' | 'alert-circle' | 'apps' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'backspace' | 'barcode' | 'battery-low' | 'bolt-filled' | 'bullet' | 'camera-flip' | 'caret-down' | 'caret-up' | 'cart' | 'cart-down' | 'cart-filled' | 'cart-send' | 'cart-up' | 'chart-line' | 'chart-vertical' | 'check' | 'check-circle-filled' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle' | 'clipboard-checklist' | 'clock' | 'collection' | 'credit-card' | 'credit-card-reader' | 'delete' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'exchange' | 'flag' | 'gift-card' | 'graduation-hat' | 'grid' | 'hide-filled' | 'home' | 'home-filled' | 'image' | 'images' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'keyboard-hide' | 'keypad' | 'link' | 'list-bulleted' | 'list-bulleted-filled' | 'live' | 'live-critical' | 'live-none' | 'location' | 'lock' | 'maximize' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'minimize' | 'minus' | 'mobile' | 'money' | 'money-split' | 'note' | 'order' | 'order-draft' | 'order-filled' | 'package' | 'package-cancel' | 'package-reassign' | 'payment' | 'person' | 'person-add' | 'person-filled' | 'phablet' | 'phone-out' | 'play-circle' | 'plus' | 'point-of-sale' | 'point-of-sale-register' | 'print' | 'product' | 'product-filled' | 'profile' | 'question-circle-filled' | 'receipt' | 'refresh' | 'return' | 'scan-qr-code' | 'search' | 'send' | 'settings' | 'shipping-label-cancel' | 'sort' | 'star-circle' | 'star-filled' | 'store' | 'tablet' | 'transaction-fee-add' | 'unlock' | 'variant' | 'view' | 'wallet' | 'x' | 'x-circle'", "description": "" } }, @@ -10684,19 +10672,7 @@ "syntaxKind": "PropertySignature", "name": "capabilities", "value": "ReadonlySignalLike", - "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", - "title": "Example" - } - ] - } - ] + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`." } ], "value": "export interface ShopifyGlobal extends CapabilitiesApi {}" @@ -10721,19 +10697,7 @@ "syntaxKind": "PropertySignature", "name": "capabilities", "value": "ReadonlySignalLike", - "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", - "title": "Example" - } - ] - } - ] + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`." }, { "filePath": "src/surfaces/point-of-sale/globals.ts", diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json index 8278732a5b..50828facbc 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json @@ -6,6 +6,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -66,6 +67,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -87,6 +89,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -147,6 +150,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -185,6 +189,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -205,6 +210,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -265,6 +271,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -303,6 +310,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -323,6 +331,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -383,6 +392,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -421,6 +431,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -441,6 +452,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -502,6 +514,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -541,6 +554,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -562,6 +576,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -623,6 +638,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -662,6 +678,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -683,6 +700,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -744,6 +762,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -783,6 +802,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -804,6 +824,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "CustomerApi", @@ -865,6 +886,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "CustomerApi", @@ -904,6 +926,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "ConnectivityApi", "CustomerApi", @@ -925,6 +948,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "CartLineItemApi", "ConnectivityApi", @@ -987,6 +1011,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CartApi", "CartLineItemApi", "ConnectivityApi", @@ -1029,6 +1054,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CashDrawerApi", "ConnectivityApi", "DeviceApi", @@ -1089,6 +1115,7 @@ ], "apis": [ "CameraApi", + "CapabilitiesApi", "CashDrawerApi", "ConnectivityApi", "DeviceApi", @@ -1127,6 +1154,7 @@ "apis": [ "ActionApi", "CameraApi", + "CapabilitiesApi", "CashDrawerApi", "ConnectivityApi", "DeviceApi", @@ -1211,6 +1239,38 @@ "pos.return.post.block.render" ] }, + "CapabilitiesApi": { + "targets": [ + "pos.cart.line-item-details.action.menu-item.render", + "pos.cart.line-item-details.action.render", + "pos.customer-details.action.menu-item.render", + "pos.customer-details.action.render", + "pos.customer-details.block.render", + "pos.draft-order-details.action.menu-item.render", + "pos.draft-order-details.action.render", + "pos.draft-order-details.block.render", + "pos.exchange.post.action.menu-item.render", + "pos.exchange.post.action.render", + "pos.exchange.post.block.render", + "pos.home.modal.render", + "pos.home.tile.render", + "pos.order-details.action.menu-item.render", + "pos.order-details.action.render", + "pos.order-details.block.render", + "pos.product-details.action.menu-item.render", + "pos.product-details.action.render", + "pos.product-details.block.render", + "pos.purchase.post.action.menu-item.render", + "pos.purchase.post.action.render", + "pos.purchase.post.block.render", + "pos.register-details.action.menu-item.render", + "pos.register-details.action.render", + "pos.register-details.block.render", + "pos.return.post.action.menu-item.render", + "pos.return.post.action.render", + "pos.return.post.block.render" + ] + }, "CartApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.test.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.test.ts new file mode 100644 index 0000000000..8b626e83b3 --- /dev/null +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.test.ts @@ -0,0 +1,83 @@ +import type {ReadonlySignalLike} from '../../../../shared'; +import type {DataTargetApi} from '../data-target-api/data-target-api'; +import type {StandardApi} from '../standard/standard-api'; +import type {ShopifyGlobal} from '../../globals'; +import type {InterceptCapability} from './capabilities-api'; + +function createSignal(value: T): ReadonlySignalLike { + return { + value, + subscribe: () => () => undefined, + }; +} + +describe('POS capabilities API', () => { + it('is included in standard target APIs', () => { + const capabilities: StandardApi<'pos.home.tile.render'>['capabilities'] = + createSignal([]); + + expect(capabilities.value).toStrictEqual([]); + }); + + it('is included in data target APIs', () => { + const capabilities: DataTargetApi<'pos.app.ready.data'>['capabilities'] = + createSignal([]); + + expect(capabilities.value).toStrictEqual([]); + }); + + it('is included in the POS global API', () => { + const capabilities: ShopifyGlobal['capabilities'] = createSignal< + InterceptCapability[] + >([]); + + expect(capabilities.value).toStrictEqual([]); + }); + + it('accepts all capabilities implied by an error grant', () => { + const capabilities: InterceptCapability[] = [ + 'beforecheckout.error', + 'beforecheckout.warning', + 'beforecheckout.info', + ]; + + expect(capabilities).toStrictEqual([ + 'beforecheckout.error', + 'beforecheckout.warning', + 'beforecheckout.info', + ]); + }); + + it('accepts a warning grant and info without error', () => { + const capabilities: InterceptCapability[] = [ + 'beforecheckout.warning', + 'beforecheckout.info', + ]; + + expect(capabilities).not.toContain('beforecheckout.error'); + }); + + it('accepts only info with an info grant', () => { + const capabilities: InterceptCapability[] = ['beforecheckout.info']; + + expect(capabilities).not.toContain('beforecheckout.error'); + expect(capabilities).not.toContain('beforecheckout.warning'); + }); + + it('accepts an empty array when no intercept capabilities are granted', () => { + const capabilities: InterceptCapability[] = []; + + expect(capabilities).toStrictEqual([]); + }); + + it('types intercept capabilities from event names and severity suffixes', () => { + const capabilities: InterceptCapability[] = [ + // @ts-expect-error Event names must come from ShopifyInterceptMap. + 'unsupported.error', + // @ts-expect-error Capability suffixes use `warning`, not `warn`. + 'beforecheckout.warn', + ]; + + expect(capabilities).toHaveLength(2); + }); +}); diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts index 1c10e66fce..af23a57961 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts @@ -26,13 +26,6 @@ export interface CapabilitiesApi { * * Grants are cumulative. An `.error` grant includes `.warning` and `.info`, * and a `.warning` grant includes `.info`. - * - * @example - * ```ts - * if (shopify.capabilities.value.includes('beforecheckout.error')) { - * // This interceptor can return ERROR, WARNING, or INFO validations. - * } - * ``` */ capabilities: ReadonlySignalLike; } diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts index c5613158b2..25816ac85e 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts @@ -1,3 +1,4 @@ +import {CapabilitiesApi} from '../capabilities-api/capabilities-api'; import {ReadonlyCartApi} from '../cart-api/cart-api'; import {ConnectivityApi} from '../connectivity-api/connectivity-api'; import {DeviceApi} from '../device-api/device-api'; @@ -19,6 +20,7 @@ export type DataTargetApi = { extensionPoint: T; i18n: I18n; } & ExtensionApi & + CapabilitiesApi & SessionApi & StorageApi & LocaleApi & diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/standard/standard-api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/standard/standard-api.ts index 07bf167494..19fdaf3b8d 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api/standard/standard-api.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/standard/standard-api.ts @@ -1,4 +1,5 @@ import {CameraApi} from '../camera-api/camera-api'; +import {CapabilitiesApi} from '../capabilities-api/capabilities-api'; import {ConnectivityApi} from '../connectivity-api/connectivity-api'; import {DeviceApi} from '../device-api/device-api'; import {ExtensionApi} from '../extension-api/extension-api'; @@ -21,6 +22,7 @@ export type StandardApi = {[key: string]: any} & { extensionPoint: T; i18n: I18n; } & ExtensionApi & + CapabilitiesApi & LocaleApi & ToastApi & SessionApi & diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts b/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts deleted file mode 100644 index 1cb5ddb6a1..0000000000 --- a/packages/ui-extensions/src/surfaces/point-of-sale/globals.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type {ReadonlySignalLike} from '../../shared'; -import type {InterceptCapability} from './api'; -import type {ShopifyGlobal} from './globals'; - -function createSignal(value: T): ReadonlySignalLike { - return { - value, - subscribe: () => () => undefined, - }; -} - -// POS expands cumulative grants at runtime. These tests cover the public type -// and signal shape used to represent the host-provided arrays. -describe('POS intercept capabilities', () => { - it('accepts all capabilities implied by an error grant', () => { - const capabilities: InterceptCapability[] = [ - 'beforecheckout.error', - 'beforecheckout.warning', - 'beforecheckout.info', - ]; - const global: ShopifyGlobal = { - capabilities: createSignal(capabilities), - }; - - expect(global.capabilities.value).toStrictEqual(capabilities); - }); - - it('accepts a warning grant and info without error', () => { - const capabilities: InterceptCapability[] = [ - 'beforecheckout.warning', - 'beforecheckout.info', - ]; - - const global: ShopifyGlobal = { - capabilities: createSignal(capabilities), - }; - - expect(global.capabilities.value).toStrictEqual(capabilities); - expect(global.capabilities.value).not.toContain('beforecheckout.error'); - }); - - it('accepts only info with an info grant', () => { - const global: ShopifyGlobal = { - capabilities: createSignal([ - 'beforecheckout.info', - ]), - }; - - expect(global.capabilities.value).toStrictEqual(['beforecheckout.info']); - expect(global.capabilities.value).not.toContain('beforecheckout.error'); - expect(global.capabilities.value).not.toContain('beforecheckout.warning'); - }); - - it('accepts an empty array when no intercept permissions are granted', () => { - const global: ShopifyGlobal = { - capabilities: createSignal([]), - }; - - expect(global.capabilities.value).toStrictEqual([]); - }); - - it('types capabilities from intercept event names and proposed suffixes', () => { - const capabilities: InterceptCapability[] = [ - // @ts-expect-error Event names must come from ShopifyInterceptMap. - 'unsupported.error', - // @ts-expect-error Capability suffixes use `warning`, not `warn`. - 'beforecheckout.warn', - ]; - - expect(capabilities).toHaveLength(2); - }); -}); From b44210dab500d01bc94a0a0afd08e7589f86b182 Mon Sep 17 00:00:00 2001 From: Henry Stelle Date: Fri, 17 Jul 2026 15:51:17 -0700 Subject: [PATCH 5/6] Document and test POS data target capabilities --- .../src/point-of-sale/factories.ts | 4 +- .../tests/point-of-sale-capabilities.test.ts | 25 ++++++++++- .../point-of-sale/build-docs-targets-json.mjs | 42 +++++++++++++++++-- .../pos_ui_extensions/2026-07-rc/targets.json | 27 ++++++++++++ 4 files changed, 93 insertions(+), 5 deletions(-) diff --git a/packages/ui-extensions-tester/src/point-of-sale/factories.ts b/packages/ui-extensions-tester/src/point-of-sale/factories.ts index c172d206e5..acf0af7188 100644 --- a/packages/ui-extensions-tester/src/point-of-sale/factories.ts +++ b/packages/ui-extensions-tester/src/point-of-sale/factories.ts @@ -497,7 +497,9 @@ function createDataTargetMock( hasNextPage: false, }), }, - ...createMockCartApi(), + cart: { + current: createReadonlySignalLike(createPosCart()), + }, }; } diff --git a/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts b/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts index c52a4f3fe9..01746cfa26 100644 --- a/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts +++ b/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts @@ -24,7 +24,7 @@ describe('POS capabilities mocks', () => { expect(extension.shopify.capabilities.value).toStrictEqual([]); }); - it('provides an empty capabilities signal for data targets', () => { + it('provides an empty capabilities signal and read-only cart for data targets', () => { sandbox.placeToml({target: 'pos.app.ready.data'}); const extension = getExtension('pos.app.ready.data', { configSearchDir: sandbox.tempDir, @@ -33,5 +33,28 @@ describe('POS capabilities mocks', () => { extension.setUp(); expect(extension.shopify.capabilities.value).toStrictEqual([]); + expect(() => Reflect.get(extension.shopify.cart, 'addLineItem')).toThrow( + 'Property "addLineItem" does not exist', + ); + }); + + it('allows tests to configure granted capabilities', () => { + sandbox.placeToml({target: 'pos.app.ready.data'}); + const extension = getExtension('pos.app.ready.data', { + configSearchDir: sandbox.tempDir, + }); + + extension.setUp(); + extension.shopify.capabilities.value = [ + 'beforecheckout.error', + 'beforecheckout.warning', + 'beforecheckout.info', + ]; + + expect(extension.shopify.capabilities.value).toStrictEqual([ + 'beforecheckout.error', + 'beforecheckout.warning', + 'beforecheckout.info', + ]); }); }); diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/build-docs-targets-json.mjs b/packages/ui-extensions/docs/surfaces/point-of-sale/build-docs-targets-json.mjs index 89a24f4e48..66bc05c353 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/build-docs-targets-json.mjs +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/build-docs-targets-json.mjs @@ -203,6 +203,36 @@ function parseEventTargetsFile(content) { return targets; } +/** + * Parse DataExtensionTargets from extension-targets.ts and include their APIs + * without assigning UI components. + */ +function parseDataTargetsFile(content) { + const dataMatch = content.match( + /export interface DataExtensionTargets \{([\s\S]+?)\n\}/, + ); + if (!dataMatch) { + return {}; + } + + const interfaceBody = dataMatch[1]; + const targetRegex = /'([^']+)':\s*RunnableExtension<([\s\S]*?)>;/g; + const targets = {}; + let match; + while ((match = targetRegex.exec(interfaceBody)) !== null) { + const targetName = match[1]; + const runnableExtensionParts = splitByTopLevelComma(match[2]); + const apiString = runnableExtensionParts[0]?.trim(); + + targets[targetName] = { + components: [], + apis: apiString ? parseApis(apiString).sort() : [], + }; + } + + return targets; +} + function getNestedApis(apiName) { // Check if we've already parsed this API if (Object.prototype.hasOwnProperty.call(apiDefinitionsCache, apiName)) { @@ -215,6 +245,7 @@ function getNestedApis(apiName) { './api/standard/standard-api', './render/api/standard/standard-api', ], + DataTargetApi: ['./api/data-target-api/data-target-api'], SmartGridApi: ['./api/smartgrid-api/smartgrid-api'], ActionApi: [ './api/action-api/action-api', @@ -366,7 +397,11 @@ function getNestedApis(apiName) { } // APIs that are composites of other documented APIs - we list their constituent APIs, not these wrapper types -const COMPOSITE_APIS = new Set(['StandardApi', 'ActionTargetApi']); +const COMPOSITE_APIS = new Set([ + 'StandardApi', + 'ActionTargetApi', + 'DataTargetApi', +]); function parseApis(apiString) { const apisSet = new Set(); @@ -503,11 +538,12 @@ function findGeneratedDocsPath() { return docsPath ?? generatedDir; } -// Generate the JSON (render targets + event targets) +// Generate the JSON for every target category. const renderTargets = parseTargetsFile(); const fileContent = fs.readFileSync(TARGETS_FILE_PATH, 'utf-8'); const eventTargets = parseEventTargetsFile(fileContent); -const targetsJson = {...renderTargets, ...eventTargets}; +const dataTargets = parseDataTargetsFile(fileContent); +const targetsJson = {...renderTargets, ...eventTargets, ...dataTargets}; // Create the extended JSON with reverse mappings const extendedJson = createReverseMapping(targetsJson); diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json index 50828facbc..506c4b0ee6 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json @@ -1184,6 +1184,20 @@ "components": [], "apis": [] }, + "pos.app.ready.data": { + "components": [], + "apis": [ + "CapabilitiesApi", + "ConnectivityApi", + "DeviceApi", + "ExtensionApi", + "LocaleApi", + "ProductSearchApi", + "ReadonlyCartApi", + "SessionApi", + "StorageApi" + ] + }, "ActionApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", @@ -1241,6 +1255,7 @@ }, "CapabilitiesApi": { "targets": [ + "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1293,6 +1308,7 @@ }, "ConnectivityApi": { "targets": [ + "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1325,6 +1341,7 @@ }, "DeviceApi": { "targets": [ + "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1357,6 +1374,7 @@ }, "ExtensionApi": { "targets": [ + "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1389,6 +1407,7 @@ }, "LocaleApi": { "targets": [ + "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1485,6 +1504,7 @@ }, "ProductSearchApi": { "targets": [ + "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1517,6 +1537,7 @@ }, "SessionApi": { "targets": [ + "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1549,6 +1570,7 @@ }, "StorageApi": { "targets": [ + "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1677,6 +1699,11 @@ "pos.register-details.block.render" ] }, + "ReadonlyCartApi": { + "targets": [ + "pos.app.ready.data" + ] + }, "Tile": { "targets": [ "pos.home.tile.render" From eac8a534ddb85552d3537d2bb1efa3cc4f76c21e Mon Sep 17 00:00:00 2001 From: Henry Stelle Date: Fri, 17 Jul 2026 16:09:44 -0700 Subject: [PATCH 6/6] Narrow POS capabilities API exposure --- .../src/point-of-sale/factories.ts | 4 +- .../tests/point-of-sale-capabilities.test.ts | 5 +- .../point-of-sale/build-docs-targets-json.mjs | 42 +- .../2026-07-rc/generated_docs_data_v2.json | 4860 +++++++++-------- .../pos_ui_extensions/2026-07-rc/targets.json | 87 - .../src/surfaces/point-of-sale/api.ts | 1 + .../capabilities-api/capabilities-api.test.ts | 15 +- .../api/capabilities-api/capabilities-api.ts | 25 +- .../src/surfaces/point-of-sale/globals.ts | 3 +- 9 files changed, 2473 insertions(+), 2569 deletions(-) diff --git a/packages/ui-extensions-tester/src/point-of-sale/factories.ts b/packages/ui-extensions-tester/src/point-of-sale/factories.ts index acf0af7188..c172d206e5 100644 --- a/packages/ui-extensions-tester/src/point-of-sale/factories.ts +++ b/packages/ui-extensions-tester/src/point-of-sale/factories.ts @@ -497,9 +497,7 @@ function createDataTargetMock( hasNextPage: false, }), }, - cart: { - current: createReadonlySignalLike(createPosCart()), - }, + ...createMockCartApi(), }; } diff --git a/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts b/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts index 01746cfa26..443a2ed412 100644 --- a/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts +++ b/packages/ui-extensions-tester/src/tests/point-of-sale-capabilities.test.ts @@ -24,7 +24,7 @@ describe('POS capabilities mocks', () => { expect(extension.shopify.capabilities.value).toStrictEqual([]); }); - it('provides an empty capabilities signal and read-only cart for data targets', () => { + it('provides an empty capabilities signal for data targets', () => { sandbox.placeToml({target: 'pos.app.ready.data'}); const extension = getExtension('pos.app.ready.data', { configSearchDir: sandbox.tempDir, @@ -33,9 +33,6 @@ describe('POS capabilities mocks', () => { extension.setUp(); expect(extension.shopify.capabilities.value).toStrictEqual([]); - expect(() => Reflect.get(extension.shopify.cart, 'addLineItem')).toThrow( - 'Property "addLineItem" does not exist', - ); }); it('allows tests to configure granted capabilities', () => { diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/build-docs-targets-json.mjs b/packages/ui-extensions/docs/surfaces/point-of-sale/build-docs-targets-json.mjs index 66bc05c353..89a24f4e48 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/build-docs-targets-json.mjs +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/build-docs-targets-json.mjs @@ -203,36 +203,6 @@ function parseEventTargetsFile(content) { return targets; } -/** - * Parse DataExtensionTargets from extension-targets.ts and include their APIs - * without assigning UI components. - */ -function parseDataTargetsFile(content) { - const dataMatch = content.match( - /export interface DataExtensionTargets \{([\s\S]+?)\n\}/, - ); - if (!dataMatch) { - return {}; - } - - const interfaceBody = dataMatch[1]; - const targetRegex = /'([^']+)':\s*RunnableExtension<([\s\S]*?)>;/g; - const targets = {}; - let match; - while ((match = targetRegex.exec(interfaceBody)) !== null) { - const targetName = match[1]; - const runnableExtensionParts = splitByTopLevelComma(match[2]); - const apiString = runnableExtensionParts[0]?.trim(); - - targets[targetName] = { - components: [], - apis: apiString ? parseApis(apiString).sort() : [], - }; - } - - return targets; -} - function getNestedApis(apiName) { // Check if we've already parsed this API if (Object.prototype.hasOwnProperty.call(apiDefinitionsCache, apiName)) { @@ -245,7 +215,6 @@ function getNestedApis(apiName) { './api/standard/standard-api', './render/api/standard/standard-api', ], - DataTargetApi: ['./api/data-target-api/data-target-api'], SmartGridApi: ['./api/smartgrid-api/smartgrid-api'], ActionApi: [ './api/action-api/action-api', @@ -397,11 +366,7 @@ function getNestedApis(apiName) { } // APIs that are composites of other documented APIs - we list their constituent APIs, not these wrapper types -const COMPOSITE_APIS = new Set([ - 'StandardApi', - 'ActionTargetApi', - 'DataTargetApi', -]); +const COMPOSITE_APIS = new Set(['StandardApi', 'ActionTargetApi']); function parseApis(apiString) { const apisSet = new Set(); @@ -538,12 +503,11 @@ function findGeneratedDocsPath() { return docsPath ?? generatedDir; } -// Generate the JSON for every target category. +// Generate the JSON (render targets + event targets) const renderTargets = parseTargetsFile(); const fileContent = fs.readFileSync(TARGETS_FILE_PATH, 'utf-8'); const eventTargets = parseEventTargetsFile(fileContent); -const dataTargets = parseDataTargetsFile(fileContent); -const targetsJson = {...renderTargets, ...eventTargets, ...dataTargets}; +const targetsJson = {...renderTargets, ...eventTargets}; // Create the extended JSON with reverse mappings const extendedJson = createReverseMapping(targetsJson); diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json index fbc1e41392..16a0607af7 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/generated_docs_data_v2.json @@ -1581,1550 +1581,1858 @@ "value": "export interface CameraApi {\n camera: CameraApiContent;\n}" } }, - "PaymentMethod": { - "src/surfaces/point-of-sale/types/payment.ts": { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "ConnectivityStateSeverity": { + "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", "syntaxKind": "TypeAliasDeclaration", - "name": "PaymentMethod", - "value": "'Cash' | 'Custom' | 'CreditCard' | 'CardPresentRefund' | 'StripeCardPresentRefund' | 'GiftCard' | 'StripeCreditCard' | 'ShopPay' | 'StoreCredit' | 'Unknown'", - "description": "The available payment method types for POS transactions.", + "name": "ConnectivityStateSeverity", + "value": "'Connected' | 'Disconnected'", + "description": "", "isPublicDocs": true } }, - "Payment": { - "src/surfaces/point-of-sale/types/payment.ts": { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", - "name": "Payment", - "description": "Represents a payment applied to a transaction, including the amount, currency, and payment method type.", + "ConnectivityState": { + "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "name": "ConnectivityState", + "description": "Represents the current Internet connectivity status of the device. Indicates whether the device is connected or disconnected from the Internet.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", "syntaxKind": "PropertySignature", - "name": "amount", - "value": "number", - "description": "The payment amount." - }, + "name": "internetConnected", + "value": "ConnectivityStateSeverity", + "description": "The Internet connection status of the POS device." + } + ], + "value": "export interface ConnectivityState {\n /**\n * The Internet connection status of the POS device.\n */\n internetConnected: ConnectivityStateSeverity;\n}" + } + }, + "ConnectivityApiContent": { + "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "name": "ConnectivityApiContent", + "description": "Provides access to the current connectivity state for the POS device.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", "syntaxKind": "PropertySignature", - "name": "currency", - "value": "string", - "description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS." - }, + "name": "current", + "value": "ReadonlySignalLike", + "description": "Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling." + } + ], + "value": "export interface ConnectivityApiContent {\n /**\n * Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling.\n */\n current: ReadonlySignalLike;\n}" + } + }, + "ConnectivityApi": { + "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "name": "ConnectivityApi", + "description": "The `ConnectivityApi` object provides access to current connectivity information and change notifications. Access these properties through `shopify.connectivity` to monitor network status.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "PaymentMethod", - "description": "The payment method type." + "name": "connectivity", + "value": "ConnectivityApiContent", + "description": "Provides access to the current connectivity state for the POS device." } ], - "value": "export interface Payment {\n /**\n * The payment amount.\n */\n amount: number;\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: string;\n /**\n * The payment method type.\n */\n type: PaymentMethod;\n}" + "value": "export interface ConnectivityApi {\n connectivity: ConnectivityApiContent;\n}" } }, - "ShippingLine": { - "src/surfaces/point-of-sale/types/shipping-line.ts": { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "name": "ShippingLine", - "description": "Represents a shipping charge applied to an order, including the price and applicable taxes.", + "DeviceApiContent": { + "src/surfaces/point-of-sale/api/device-api/device-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "name": "DeviceApiContent", + "description": "The `DeviceApi` object provides device details and capabilities.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "handle", - "value": "string", - "description": "The handle identifier for the shipping method.", - "isOptional": true + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "syntaxKind": "MethodSignature", + "name": "getDeviceId", + "value": "() => Promise", + "description": "Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations. Note: While Shopify POS attempts to maintain a stable identifier, it is not guaranteed to be permanent and may change." }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "price", - "value": "Money", - "description": "The price of the shipping as a Money object." + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "syntaxKind": "MethodSignature", + "name": "isTablet", + "value": "() => Promise", + "description": "Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences." }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing tax breakdown.", - "isOptional": true + "name": "name", + "value": "string", + "description": "The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful." }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", "syntaxKind": "PropertySignature", - "name": "title", + "name": "registerName", "value": "string", - "description": "The display title of the shipping method.", - "isOptional": true + "description": "A short, unique identifier for the device, assigned by Shopify." } ], - "value": "export interface ShippingLine {\n /**\n * The handle identifier for the shipping method.\n */\n handle?: string;\n /**\n * The price of the shipping as a Money object.\n */\n price: Money;\n /**\n * The display title of the shipping method.\n */\n title?: string;\n /**\n * An array of individual tax lines showing tax breakdown.\n */\n taxLines?: TaxLine[];\n}" + "value": "export interface DeviceApiContent {\n /**\n * The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful.\n */\n name: string;\n /**\n * A short, unique identifier for the device, assigned by Shopify.\n */\n registerName: string;\n /**\n * Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations.\n * Note: While Shopify POS attempts to maintain a stable identifier, it is not guaranteed to be permanent and may change.\n */\n getDeviceId(): Promise;\n /**\n * Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences.\n */\n isTablet(): Promise;\n}" } }, - "CalculatedShippingLine": { - "src/surfaces/point-of-sale/types/shipping-line.ts": { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "name": "CalculatedShippingLine", - "description": "Represents a calculated shipping line with specific shipping or retail method type.", + "DeviceApi": { + "src/surfaces/point-of-sale/api/device-api/device-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "name": "DeviceApi", + "description": "The `DeviceApi` object provides access to device information and capabilities. Access these properties and methods through `shopify.device` to retrieve device details and check device characteristics.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "handle", - "value": "string", - "description": "The handle identifier for the shipping method.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "methodType", - "value": "'SHIPPING' | 'RETAIL'", - "description": "The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:\n- `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.\n- `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location." - }, - { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", "syntaxKind": "PropertySignature", - "name": "price", - "value": "Money", - "description": "The price of the shipping as a Money object." - }, + "name": "device", + "value": "DeviceApiContent", + "description": "The `DeviceApi` object provides device details and capabilities." + } + ], + "value": "export interface DeviceApi {\n device: DeviceApiContent;\n}" + } + }, + "ExtensionApiContent": { + "src/surfaces/point-of-sale/api/extension-api/extension-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "name": "ExtensionApiContent", + "description": "The Extension API lets you read metadata about the currently running extension. Use it to implement version-aware behaviour or to identify which target is active when the same extension module is registered against multiple targets. Access these properties through `shopify.extension`.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing tax breakdown.", - "isOptional": true + "name": "apiVersion", + "value": "ApiVersion", + "description": "The API version that was set in the extension configuration file.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "'2026-01', '2026-04'", + "title": "Example" + } + ] + } + ] }, { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The display title of the shipping method.", - "isOptional": true - }, + "name": "target", + "value": "T", + "description": "The extension target that is currently running, as configured in the extension's `shopify.extension.toml` file.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "'pos.home.tile.render', 'pos.home.modal.render'", + "title": "Example" + } + ] + } + ] + } + ], + "value": "export interface ExtensionApiContent {\n /**\n * The API version that was set in the extension configuration file.\n *\n * @example '2026-01', '2026-04'\n */\n apiVersion: ApiVersion;\n /**\n * The extension target that is currently running, as configured in the\n * extension's `shopify.extension.toml` file.\n *\n * @example 'pos.home.tile.render', 'pos.home.modal.render'\n */\n target: T;\n}" + } + }, + "ApiVersion": { + "src/shared.ts": { + "filePath": "src/shared.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ApiVersion", + "value": "'2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '2025-01' | '2025-04' | 'unstable' | '2025-07' | '2025-10' | '2026-01' | '2026-04' | '2026-07'", + "description": "The supported GraphQL Admin API versions. Use this to specify which API version your GraphQL queries should execute against. Each version includes specific features, bug fixes, and breaking changes. The `unstable` version provides access to the latest features but may change without notice." + } + }, + "ExtensionApi": { + "src/surfaces/point-of-sale/api/extension-api/extension-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "name": "ExtensionApi", + "description": "The `ExtensionApi` object provides metadata about the currently running extension, including the configured API version and the active extension target. Access these properties through `shopify.extension`.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "'Calculated'", - "description": "The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators." + "name": "extension", + "value": "ExtensionApiContent", + "description": "" } ], - "value": "export interface CalculatedShippingLine extends ShippingLine {\n /**\n * The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators.\n */\n type: 'Calculated';\n /**\n * The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:\n * - `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.\n * - `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location.\n */\n methodType: 'SHIPPING' | 'RETAIL';\n}" + "value": "export interface ExtensionApi {\n extension: ExtensionApiContent;\n}" } }, - "CustomShippingLine": { - "src/surfaces/point-of-sale/types/shipping-line.ts": { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "name": "CustomShippingLine", - "description": "Represents a custom shipping line with merchant-defined shipping charges.", + "LocaleApiContent": { + "src/surfaces/point-of-sale/api/locale-api/locale-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "name": "LocaleApiContent", + "description": "The `LocaleApi` object provides the current locale and locale updates.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", "syntaxKind": "PropertySignature", - "name": "handle", - "value": "string", - "description": "The handle identifier for the shipping method.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "price", - "value": "Money", - "description": "The price of the shipping as a Money object." - }, - { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing tax breakdown.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", - "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The display title of the shipping method.", - "isOptional": true - }, + "name": "current", + "value": "ReadonlySignalLike", + "description": "Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings." + } + ], + "value": "export interface LocaleApiContent {\n /**\n * Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings.\n */\n current: ReadonlySignalLike;\n}" + } + }, + "LocaleApi": { + "src/surfaces/point-of-sale/api/locale-api/locale-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "name": "LocaleApi", + "description": "The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `shopify.locale` to retrieve and monitor locale data.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "'Custom'", - "description": "The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems." + "name": "locale", + "value": "LocaleApiContent", + "description": "The `LocaleApi` object provides the current locale and locale updates." } ], - "value": "export interface CustomShippingLine extends ShippingLine {\n /**\n * The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems.\n */\n type: 'Custom';\n}" + "value": "export interface LocaleApi {\n locale: LocaleApiContent;\n}" } }, - "TransactionCompleteEvent": { - "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "TransactionCompleteEvent", - "value": "SaleCompleteEvent | ReturnCompleteEvent | ExchangeCompleteEvent", - "description": "Dispatched when a sale, return, or exchange transaction completes.\n\nNarrow on `transactionType` to access per-type fields.", - "isPublicDocs": true + "StaffMember": { + "src/surfaces/point-of-sale/types/session.ts": { + "filePath": "src/surfaces/point-of-sale/types/session.ts", + "name": "StaffMember", + "description": "Defines a staff member in POS.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/types/session.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "number", + "description": "The staff member ID." + } + ], + "value": "export interface StaffMember {\n /**\n * The staff member ID.\n */\n id: number;\n}" } }, - "SaleCompleteEvent": { - "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "name": "SaleCompleteEvent", - "description": "Dispatched when a sale transaction completes.", + "Session": { + "src/surfaces/point-of-sale/types/session.ts": { + "filePath": "src/surfaces/point-of-sale/types/session.ts", + "name": "Session", + "description": "Defines information about the current POS session.", + "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" + "name": "currency", + "value": "CurrencyCode", + "description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "balanceDue", - "value": "Money", - "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." + "name": "locationId", + "value": "number", + "description": "The location ID associated with the POS device's current location." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "bubbles", - "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + "name": "posVersion", + "value": "string", + "description": "The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" + "name": "shopDomain", + "value": "string", + "description": "The shop domain associated with the shop currently logged into POS." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" + "name": "shopId", + "value": "number", + "description": "The shop ID associated with the shop currently logged into POS." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "cancelBubble", - "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" + "name": "staffMemberId", + "value": "number", + "description": "The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.", + "isOptional": true, + "deprecationMessage": "Use `session.staffMember` on the Session API instead." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/session.ts", "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" - }, + "name": "userId", + "value": "number", + "description": "The user ID associated with the Shopify account currently authenticated on POS." + } + ], + "value": "export interface Session {\n /**\n * The shop ID associated with the shop currently logged into POS.\n */\n shopId: number;\n\n /**\n * The user ID associated with the Shopify account currently authenticated on POS.\n */\n userId: number;\n\n /**\n * The shop domain associated with the shop currently logged into POS.\n */\n shopDomain: string;\n\n /**\n * The location ID associated with the POS device's current location.\n */\n locationId: number;\n\n /**\n * The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.\n *\n * @deprecated Use `session.staffMember` on the Session API instead.\n */\n staffMemberId?: number;\n\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: CurrencyCode;\n\n /**\n * The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running.\n */\n posVersion: string;\n}" + } + }, + "CurrencyCode": { + "src/shared.ts": { + "filePath": "src/shared.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "CurrencyCode", + "value": "'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'", + "description": "" + } + }, + "SessionApiContent": { + "src/surfaces/point-of-sale/api/session-api/session-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "name": "SessionApiContent", + "description": "The `SessionApi` object provides session details and authentication methods.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "cashRoundingAdjustment", - "value": "Money", - "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", - "isOptional": true + "name": "currentSession", + "value": "Session", + "description": "Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "composed", - "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + "name": "deviceId", + "value": "number", + "description": "The numeric ID of the device running this session.\n\nUse this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "123456", + "title": "Example" + } + ] + } + ] }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + "name": "getSessionToken", + "value": "() => Promise", + "description": "Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "customer", - "value": "Customer", - "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", - "isOptional": true - }, + "name": "staffMember", + "value": "ReadonlySignalLike", + "description": "Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in." + } + ], + "value": "export interface SessionApiContent {\n /**\n * Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change.\n */\n currentSession: Session;\n /**\n * Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in.\n */\n staffMember: ReadonlySignalLike;\n /**\n * Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member.\n */\n getSessionToken: () => Promise;\n /**\n * The numeric ID of the device running this session.\n *\n * Use this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.\n *\n * @example 123456\n * @see [Global IDs documentation](/docs/api/usage/gids) for more about GID format and structure\n * @see [device.getDeviceId()](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) for physical device identifier (UUID format)\n */\n deviceId: number;\n}" + } + }, + "SessionApi": { + "src/surfaces/point-of-sale/api/session-api/session-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "name": "SessionApi", + "description": "The `SessionApi` object provides access to current session information and authentication methods. Access these properties and methods through `shopify.session` to retrieve shop data and generate secure tokens. These methods enable secure API calls while maintaining user privacy and [app permissions](https://help.shopify.com/manual/your-account/users/roles/permissions/store-permissions#apps-and-channels-permissions).", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", "syntaxKind": "PropertySignature", - "name": "defaultPrevented", - "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" - }, + "name": "session", + "value": "SessionApiContent", + "description": "The `SessionApi` object provides session details and authentication methods." + } + ], + "value": "export interface SessionApi {\n session: SessionApiContent;\n}" + } + }, + "ToastApiContent": { + "src/surfaces/point-of-sale/api/toast-api/toast-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", + "name": "ToastApiContent", + "description": "The `ToastApi` object provides methods for showing toast notifications.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", "syntaxKind": "PropertySignature", - "name": "discounts", - "value": "Discount[]", - "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." - }, + "name": "show", + "value": "(content: string) => void", + "description": "Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow." + } + ], + "value": "export interface ToastApiContent {\n /**\n * Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow.\n *\n * @param content The text content to display.\n */\n show: (content: string) => void;\n}" + } + }, + "ToastApi": { + "src/surfaces/point-of-sale/api/toast-api/toast-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", + "name": "ToastApi", + "description": "The `ToastApi` object provides methods for displaying temporary notification messages. Access these methods through `shopify.toast` to show user feedback and status updates.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", "syntaxKind": "PropertySignature", - "name": "draftCheckoutUuid", - "value": "string", - "description": "The UUID of the draft order's checkout. Set when the sale originated from a draft order; `undefined` otherwise.", - "isOptional": true - }, + "name": "toast", + "value": "ToastApiContent", + "description": "The `ToastApi` object provides methods for showing toast notifications." + } + ], + "value": "export interface ToastApi {\n toast: ToastApiContent;\n}" + } + }, + "MultipleResourceResult": { + "src/surfaces/point-of-sale/types/multiple-resource-result.ts": { + "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", + "name": "MultipleResourceResult", + "description": "Represents the result of a bulk resource lookup operation. Contains successfully found resources and identifiers for resources that were not found.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", "syntaxKind": "PropertySignature", - "name": "eventPhase", - "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + "name": "fetchedResources", + "value": "T[]", + "description": "The resources that were fetched using the IDs provided." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", "syntaxKind": "PropertySignature", - "name": "executedAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." - }, + "name": "idsForResourcesNotFound", + "value": "number[]", + "description": "The IDs for which a resource was not found." + } + ], + "value": "export interface MultipleResourceResult {\n /**\n * The resources that were fetched using the IDs provided.\n */\n fetchedResources: T[];\n /**\n * The IDs for which a resource was not found.\n */\n idsForResourcesNotFound: number[];\n}" + } + }, + "PaginatedResult": { + "src/surfaces/point-of-sale/types/paginated-result.ts": { + "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", + "name": "PaginatedResult", + "description": "Represents the result of a paginated query. Contains the data items, pagination cursors for navigating pages, and information about whether more results exist.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", "syntaxKind": "PropertySignature", - "name": "grandTotal", - "value": "Money", - "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." + "name": "hasNextPage", + "value": "boolean", + "description": "Whether or not there is another page of results that can be fetched." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", + "syntaxKind": "PropertySignature", + "name": "items", + "value": "T[]", + "description": "The items returned from the fetch." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", "syntaxKind": "PropertySignature", - "name": "isTrusted", - "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + "name": "lastCursor", + "value": "string", + "description": "The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.", + "isOptional": true + } + ], + "value": "export interface PaginatedResult {\n /**\n * The items returned from the fetch.\n */\n items: T[];\n\n /**\n * The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.\n */\n lastCursor?: string;\n\n /**\n * Whether or not there is another page of results that can be fetched.\n */\n hasNextPage: boolean;\n}" + } + }, + "Product": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "name": "Product", + "description": "Represents comprehensive product information including metadata, pricing, variants, and availability. Contains all data needed to display and work with products in the POS interface.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "createdAt", + "value": "string", + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing \"new product\" features, or tracking product catalog growth over time." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "lineItems", - "value": "LineItem[]", - "description": "An array of line items included in the sale transaction." + "name": "description", + "value": "string", + "description": "The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", - "description": "" + "name": "descriptionHtml", + "value": "string", + "description": "The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "orderId", - "value": "number", - "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", + "name": "featuredImage", + "value": "string", + "description": "The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "paymentMethods", - "value": "Payment[]", - "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." + "name": "hasInStockVariants", + "value": "boolean", + "description": "Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", - "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "hasOnlyDefaultVariant", + "value": "boolean", + "description": "Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", + "name": "hasSellingPlanGroups", "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" + "description": "Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "shippingLines", - "value": "ShippingLine[]", - "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." + "name": "id", + "value": "number", + "description": "The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + "name": "isGiftCard", + "value": "boolean", + "description": "Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "maxVariantPrice", + "value": "string", + "description": "The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "minVariantPrice", + "value": "string", + "description": "The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "subtotal", - "value": "Money", - "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." + "name": "numVariants", + "value": "number", + "description": "The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + "name": "onlineStoreUrl", + "value": "string", + "description": "The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." + "name": "options", + "value": "ProductOption[]", + "description": "An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "taxTotal", - "value": "Money", - "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." + "name": "productCategory", + "value": "string", + "description": "The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "name": "productType", + "value": "string", + "description": "The product type category as defined by the merchant (For example, \"T-Shirt,\" \"Electronics,\" \"Books\"). Use for product categorization, filtering, or implementing category-specific business logic." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "tipAmount", - "value": "Money", - "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "name": "requiresSellingPlan", + "value": "boolean", + "description": "Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "transactionType", - "value": "'Sale'", - "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + "name": "tags", + "value": "string[]", + "description": "An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "type", + "name": "title", "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" - } - ], - "value": "interface SaleCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Sale';\n /**\n * The UUID of the draft order's checkout. Set when the sale originated from\n * a draft order; `undefined` otherwise.\n */\n readonly draftCheckoutUuid?: string;\n /**\n * An array of line items included in the sale transaction.\n */\n readonly lineItems: LineItem[];\n}" - } - }, - "ReturnCompleteEvent": { - "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "name": "ReturnCompleteEvent", - "description": "Dispatched when a return transaction completes.", - "members": [ + "description": "The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize." + }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" + "name": "totalAvailableInventory", + "value": "number", + "description": "The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "balanceDue", - "value": "Money", - "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." + "name": "totalInventory", + "value": "number", + "description": "The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "bubbles", + "name": "tracksInventory", "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + "description": "Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" + "name": "updatedAt", + "value": "string", + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" + "name": "variants", + "value": "ProductVariant[]", + "description": "An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "cancelBubble", - "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" - }, + "name": "vendor", + "value": "string", + "description": "The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier." + } + ], + "value": "export interface Product {\n /**\n * The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing \"new product\" features, or tracking product catalog growth over time.\n */\n createdAt: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features.\n */\n updatedAt: string;\n /**\n * The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize.\n */\n title: string;\n /**\n * The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing.\n */\n description: string;\n /**\n * The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface.\n */\n descriptionHtml: string;\n /**\n * The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.\n */\n featuredImage?: string;\n /**\n * Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces.\n */\n isGiftCard: boolean;\n /**\n * Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic.\n */\n tracksInventory: boolean;\n /**\n * The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier.\n */\n vendor: string;\n /**\n * The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings.\n */\n minVariantPrice: string;\n /**\n * The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants.\n */\n maxVariantPrice: string;\n /**\n * The product type category as defined by the merchant (For example, \"T-Shirt,\" \"Electronics,\" \"Books\"). Use for product categorization, filtering, or implementing category-specific business logic.\n */\n productType: string;\n /**\n * The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories.\n */\n productCategory: string;\n /**\n * An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions.\n */\n tags: string[];\n /**\n * The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies.\n */\n numVariants: number;\n /**\n * The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.\n */\n totalAvailableInventory?: number;\n /**\n * The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts.\n */\n totalInventory: number;\n /**\n * An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality.\n */\n variants: ProductVariant[];\n /**\n * An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities.\n */\n options: ProductOption[];\n /**\n * Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products.\n */\n hasOnlyDefaultVariant: boolean;\n /**\n * Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.\n */\n hasInStockVariants?: boolean;\n /**\n * The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.\n */\n onlineStoreUrl?: string;\n /**\n * Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.\n */\n requiresSellingPlan?: boolean;\n /**\n * Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.\n */\n hasSellingPlanGroups?: boolean;\n}" + } + }, + "ProductOption": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "name": "ProductOption", + "description": "Represents a product option definition showing one of the configurable attributes for a product (like Size, Color, Material) along with all the possible values customers can choose from. Products can have up to 3 options.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" + "name": "id", + "value": "number", + "description": "The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "cashRoundingAdjustment", - "value": "Money", - "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", - "isOptional": true + "name": "name", + "value": "string", + "description": "The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "composed", - "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" + "name": "optionValues", + "value": "string[]", + "description": "An array of all available values for this option that customers can choose from (for example, `[\"Small\", \"Medium\", \"Large\", \"X-Large\"]` for a Size option, or `[\"Red\", \"Blue\", \"Green\", \"Black\"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" - }, + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "productId", + "value": "number", + "description": "The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management." + } + ], + "value": "export interface ProductOption {\n /**\n * The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems.\n */\n id: number;\n /**\n * The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type.\n */\n name: string;\n /**\n * An array of all available values for this option that customers can choose from (for example, `[\"Small\", \"Medium\", \"Large\", \"X-Large\"]` for a Size option, or `[\"Red\", \"Blue\", \"Green\", \"Black\"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute.\n */\n optionValues: string[];\n /**\n * The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management.\n */\n productId: number;\n}" + } + }, + "ProductVariant": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "name": "ProductVariant", + "description": "Represents a specific variant of a product with its own SKU, price, and inventory. Contains variant-specific attributes including options, availability, and identification data.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + "name": "barcode", + "value": "string", + "description": "The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "customer", - "value": "Customer", - "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", + "name": "compareAtPrice", + "value": "string", + "description": "The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "defaultPrevented", - "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" + "name": "createdAt", + "value": "string", + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing \"new product\" features, or tracking product catalog changes over time." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "discounts", - "value": "Discount[]", - "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." + "name": "displayName", + "value": "string", + "description": "The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "eventPhase", - "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + "name": "hasInStockVariants", + "value": "boolean", + "description": "Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "exchangeId", + "name": "id", "value": "number", - "description": "The exchange ID when this return is the gift-card side of an exchange; `undefined` for standalone returns.", - "isOptional": true + "description": "The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "executedAt", + "name": "image", "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." + "description": "The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "grandTotal", - "value": "Money", - "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." + "name": "inventoryAtAllLocations", + "value": "number", + "description": "The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "inventoryAtLocation", + "value": "number", + "description": "The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "isTrusted", + "name": "inventoryIsTracked", "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + "description": "Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "lineItems", - "value": "LineItem[]", - "description": "An array of line items included in the return transaction." + "name": "inventoryPolicy", + "value": "ProductVariantInventoryPolicy", + "description": "The inventory policy for this variant, either \"DENY\" (prevent sales when out of stock) or \"CONTINUE\" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", - "description": "" + "name": "options", + "value": "ProductVariantOption[]", + "description": "An array of option name-value pairs that define this variant's configuration. For example, `[{name: \"Size,\" value: \"Large\"}, {name: \"Color,\" value: \"Blue\"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "orderId", + "name": "position", "value": "number", - "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", - "isOptional": true + "description": "The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "paymentMethods", - "value": "Payment[]", - "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", - "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + "name": "price", + "value": "string", + "description": "The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "refundId", - "value": "number", - "description": "The refund ID. `undefined` when the return did not issue a refund (for example, store-credit-only returns).", + "name": "product", + "value": "Product", + "description": "Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "returnId", + "name": "productId", "value": "number", - "description": "The return ID for the completed return transaction.", - "isOptional": true + "description": "The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", - "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" + "name": "sku", + "value": "string", + "description": "The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "shippingLines", - "value": "ShippingLine[]", - "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." + "name": "taxable", + "value": "boolean", + "description": "Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + "name": "title", + "value": "string", + "description": "The variant's display title, typically showing the option combinations. For example, `\"Large / Blue\"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" - }, + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "PropertySignature", + "name": "updatedAt", + "value": "string", + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features." + } + ], + "value": "export interface ProductVariant {\n /**\n * The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing \"new product\" features, or tracking product catalog changes over time.\n */\n createdAt: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features.\n */\n updatedAt: string;\n /**\n * The variant's display title, typically showing the option combinations. For example, `\"Large / Blue\"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants.\n */\n title: string;\n /**\n * The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant.\n */\n price: string;\n /**\n * The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.\n */\n compareAtPrice?: string;\n /**\n * Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling.\n */\n taxable: boolean;\n /**\n * The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.\n */\n sku?: string;\n /**\n * The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.\n */\n barcode?: string;\n /**\n * The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays.\n */\n displayName: string;\n /**\n * The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.\n */\n image?: string;\n /**\n * Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant.\n */\n inventoryIsTracked: boolean;\n /**\n * The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.\n */\n inventoryAtLocation?: number;\n /**\n * The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.\n */\n inventoryAtAllLocations?: number;\n /**\n * The inventory policy for this variant, either \"DENY\" (prevent sales when out of stock) or \"CONTINUE\" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items.\n */\n inventoryPolicy: ProductVariantInventoryPolicy;\n /**\n * Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.\n */\n hasInStockVariants?: boolean;\n /**\n * An array of option name-value pairs that define this variant's configuration. For example, `[{name: \"Size,\" value: \"Large\"}, {name: \"Color,\" value: \"Blue\"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.\n */\n options?: ProductVariantOption[];\n /**\n * Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.\n */\n product?: Product;\n /**\n * The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product.\n */\n productId: number;\n /**\n * The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic.\n */\n position: number;\n}" + } + }, + "ProductVariantInventoryPolicy": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ProductVariantInventoryPolicy", + "value": "'DENY' | 'CONTINUE'", + "description": "The inventory policy determining whether sales can continue when a variant has no inventory available:\n- `'DENY'`: Sales are prevented when inventory reaches zero. Customers can't purchase out-of-stock variants. The \"Add to cart\" action is disabled or shows \"Out of stock\". This is the default and recommended policy for most physical products to prevent overselling.\n- `'CONTINUE'`: Sales are allowed even when inventory is zero or negative. Customers can purchase out-of-stock variants, creating backorders. This enables pre-orders, made-to-order products, or drop-shipped items where inventory tracking is less critical.", + "isPublicDocs": true + } + }, + "ProductVariantOption": { + "src/surfaces/point-of-sale/types/product.ts": { + "filePath": "src/surfaces/point-of-sale/types/product.ts", + "name": "ProductVariantOption", + "description": "Represents a single option selection for a product variant, showing one chosen value from a product's configuration options. For example, if a product has Size and Color options, a variant might have one option for Size=Large and another for Color=Blue.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "subtotal", - "value": "Money", - "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." + "name": "name", + "value": "string", + "description": "The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/product.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" - }, + "name": "value", + "value": "string", + "description": "The selected value for this option that defines this specific variant (for example, \"Large\", \"Blue\", \"Cotton\", \"V-Neck\"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is \"Size\", the `value` might be \"Large\" or \"Small\". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration (\"Size: Large, Color: Blue\"), building variant selection dropdowns, or matching user selections to variants." + } + ], + "value": "export interface ProductVariantOption {\n /**\n * The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type.\n */\n name: string;\n /**\n * The selected value for this option that defines this specific variant (for example, \"Large\", \"Blue\", \"Cotton\", \"V-Neck\"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is \"Size\", the `value` might be \"Large\" or \"Small\". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration (\"Size: Large, Color: Blue\"), building variant selection dropdowns, or matching user selections to variants.\n */\n value: string;\n}" + } + }, + "ProductSortType": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ProductSortType", + "value": "'RECENTLY_ADDED' | 'RECENTLY_ADDED_ASCENDING' | 'ALPHABETICAL_A_TO_Z' | 'ALPHABETICAL_Z_TO_A'", + "description": "", + "isPublicDocs": true + } + }, + "PaginationParams": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "name": "PaginationParams", + "description": "Specifies parameters for cursor-based pagination. Includes the cursor position and the number of results to retrieve per page.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." + "name": "afterCursor", + "value": "string", + "description": "Specifies the page cursor. Items after this cursor will be returned.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "taxTotal", - "value": "Money", - "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." - }, + "name": "first", + "value": "number", + "description": "Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.", + "isOptional": true + } + ], + "value": "export interface PaginationParams {\n /**\n * Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.\n */\n first?: number;\n /**\n * Specifies the page cursor. Items after this cursor will be returned.\n */\n afterCursor?: string;\n}" + } + }, + "ProductSearchParams": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "name": "ProductSearchParams", + "description": "Specifies the parameters for searching products. Includes query text, pagination options, and sorting preferences for product search operations.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "name": "afterCursor", + "value": "string", + "description": "Specifies the page cursor. Items after this cursor will be returned.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "tipAmount", - "value": "Money", - "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "name": "first", + "value": "number", + "description": "Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "transactionType", - "value": "'Return'", - "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + "name": "queryString", + "value": "string", + "description": "The search term to be used to search for POS products.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + "name": "sortType", + "value": "ProductSortType", + "description": "Specifies the order in which products should be sorted. When a `queryString` is provided, sortType will not have any effect, as the results will be returned in order by relevance to the `queryString`.", + "isOptional": true } ], - "value": "interface ReturnCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Return';\n /**\n * The refund ID. `undefined` when the return did not issue a refund\n * (for example, store-credit-only returns).\n */\n readonly refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n readonly returnId?: number;\n /**\n * The exchange ID when this return is the gift-card side of an exchange;\n * `undefined` for standalone returns.\n */\n readonly exchangeId?: number;\n /**\n * An array of line items included in the return transaction.\n */\n readonly lineItems: LineItem[];\n}" + "value": "export interface ProductSearchParams extends PaginationParams {\n /**\n * The search term to be used to search for POS products.\n */\n queryString?: string;\n /**\n * Specifies the order in which products should be sorted. When a `queryString` is provided, sortType will not have any effect, as the results will be returned in order by relevance to the `queryString`.\n */\n sortType?: ProductSortType;\n}" } }, - "ExchangeCompleteEvent": { - "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "name": "ExchangeCompleteEvent", - "description": "Dispatched when an exchange transaction completes.", + "ProductSearchApiContent": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "name": "ProductSearchApiContent", + "description": "The `ProductSearchApi` object provides product search and lookup methods.", + "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchPaginatedProductVariantsWithProductId", + "value": "(productId: number, paginationParams: PaginationParams) => Promise>", + "description": "Retrieves product variants for a specific product with pagination support. Use when a product has many variants and you need to load them incrementally for better performance. Ideal for products with extensive variant collections that would be too large to load at once." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "balanceDue", - "value": "Money", - "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductsWithIds", + "value": "(productIds: number[]) => Promise>", + "description": "Retrieves detailed information for multiple products by their IDs. Limited to 50 products maximum—additional IDs are automatically removed. Returns results with both found and not found products clearly identified. Use for bulk product lookups, building product collections, or validating product lists." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "bubbles", - "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductVariantsWithIds", + "value": "(productVariantIds: number[]) => Promise>", + "description": "Retrieves detailed information for multiple product variants by their IDs. Limited to 50 variants maximum—additional IDs are automatically removed. Returns results with both found and not found variants clearly identified. Use for bulk variant lookups or building variant-specific collections." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductVariantsWithProductId", + "value": "(productId: number) => Promise", + "description": "Retrieves all product variants associated with a specific product ID. Returns all variants at once without pagination. Use for displaying complete variant options, building variant selectors, or analyzing all available configurations for a product." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductVariantWithId", + "value": "(productVariantId: number) => Promise", + "description": "Retrieves detailed information for a single product variant by its ID. Returns `undefined` if the variant doesn't exist or isn't available. Use for displaying variant-specific details like pricing, inventory, or options when working with specific product configurations." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "cancelBubble", - "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "cashRoundingAdjustment", - "value": "Money", - "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "composed", - "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "syntaxKind": "MethodSignature", + "name": "fetchProductWithId", + "value": "(productId: number) => Promise", + "description": "Retrieves detailed information for a single product by its ID. Returns `undefined` if the product doesn't exist or isn't available on the POS device. Use for displaying product details, validating product availability, or building product-specific workflows." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" - }, + "name": "searchProducts", + "value": "(searchParams: ProductSearchParams) => Promise>", + "description": "Searches for products on the POS device using text queries and sorting options. Returns paginated results with up to 50 products per page. When a query string is provided, results are sorted by relevance. Use for implementing custom search interfaces, product discovery features, or filtered product listings." + } + ], + "value": "export interface ProductSearchApiContent {\n /**\n * Searches for products on the POS device using text queries and sorting options. Returns paginated results with up to 50 products per page. When a query string is provided, results are sorted by relevance. Use for implementing custom search interfaces, product discovery features, or filtered product listings.\n *\n * @param searchParams The parameters for the product search.\n */\n searchProducts(\n searchParams: ProductSearchParams,\n ): Promise>;\n\n /**\n * Retrieves detailed information for a single product by its ID. Returns `undefined` if the product doesn't exist or isn't available on the POS device. Use for displaying product details, validating product availability, or building product-specific workflows.\n *\n * @param productId The ID of the product to lookup.\n */\n fetchProductWithId(productId: number): Promise;\n\n /**\n * Retrieves detailed information for multiple products by their IDs. Limited to 50 products maximum—additional IDs are automatically removed. Returns results with both found and not found products clearly identified. Use for bulk product lookups, building product collections, or validating product lists.\n *\n * @param productIds Specifies the array of product IDs to lookup. This is limited to 50 products. All excess requested IDs will be removed from the array.\n */\n fetchProductsWithIds(\n productIds: number[],\n ): Promise>;\n\n /**\n * Retrieves detailed information for a single product variant by its ID. Returns `undefined` if the variant doesn't exist or isn't available. Use for displaying variant-specific details like pricing, inventory, or options when working with specific product configurations.\n *\n * @param productVariantId The ID of the product variant to lookup.\n */\n fetchProductVariantWithId(\n productVariantId: number,\n ): Promise;\n\n /**\n * Retrieves detailed information for multiple product variants by their IDs. Limited to 50 variants maximum—additional IDs are automatically removed. Returns results with both found and not found variants clearly identified. Use for bulk variant lookups or building variant-specific collections.\n *\n * @param productVariantIds Specifies the array of product variant IDs to lookup. This is limited to 50 product variants. All excess requested IDs will be removed from the array.\n */\n fetchProductVariantsWithIds(\n productVariantIds: number[],\n ): Promise>;\n\n /**\n * Retrieves all product variants associated with a specific product ID. Returns all variants at once without pagination. Use for displaying complete variant options, building variant selectors, or analyzing all available configurations for a product.\n *\n * @param productId The product ID. All variants' details associated with this product ID are returned.\n */\n fetchProductVariantsWithProductId(\n productId: number,\n ): Promise;\n\n /**\n * Retrieves product variants for a specific product with pagination support. Use when a product has many variants and you need to load them incrementally for better performance. Ideal for products with extensive variant collections that would be too large to load at once.\n *\n * @param paginationParams The parameters for pagination.\n */\n fetchPaginatedProductVariantsWithProductId(\n productId: number,\n paginationParams: PaginationParams,\n ): Promise>;\n}" + } + }, + "ProductSearchApi": { + "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "name": "ProductSearchApi", + "description": "The `ProductSearchApi` object provides methods for searching and retrieving product information. Access these methods through `shopify.productSearch` to search products and fetch detailed product data.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" - }, + "name": "productSearch", + "value": "ProductSearchApiContent", + "description": "The `ProductSearchApi` object provides product search and lookup methods." + } + ], + "value": "export interface ProductSearchApi {\n productSearch: ProductSearchApiContent;\n}" + } + }, + "PrintApiContent": { + "src/surfaces/point-of-sale/api/print-api/print-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", + "name": "PrintApiContent", + "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "customer", - "value": "Customer", - "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", - "isOptional": true - }, + "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", + "syntaxKind": "MethodSignature", + "name": "print", + "value": "(src: string) => Promise", + "description": "Triggers a print dialog for the specified document source. The `print()` method accepts either:\n\n• A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n\n• A full URL to your app's backend that will be used to return the document to print\n\nReturns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports." + } + ], + "value": "export interface PrintApiContent {\n /**\n * Triggers a print dialog for the specified document source. The `print()` method accepts either:\n *\n * • A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n *\n * • A full URL to your app's backend that will be used to return the document to print\n *\n * Returns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports.\n *\n * @param src the source URL of the content to print.\n * @returns Promise that resolves when content is ready and native print dialog appears.\n */\n print(src: string): Promise;\n}" + } + }, + "PrintApi": { + "src/surfaces/point-of-sale/api/print-api/print-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", + "name": "PrintApi", + "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", "syntaxKind": "PropertySignature", - "name": "defaultPrevented", - "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" - }, + "name": "print", + "value": "PrintApiContent", + "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types." + } + ], + "value": "export interface PrintApi {\n /**\n * The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.\n */\n print: PrintApiContent;\n}" + } + }, + "StorageError": { + "src/surfaces/point-of-sale/types/storage.ts": { + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "name": "StorageError", + "description": "", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "discounts", - "value": "Discount[]", - "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "PropertyDeclaration", + "name": "name", + "value": "string", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "eventPhase", - "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "Parameter", + "name": "code", + "value": "\"RecordsCount\" | \"RecordSize\" | \"KeyType\" | \"KeySize\"", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "PropertySignature", - "name": "exchangeId", - "value": "number", - "description": "The exchange ID linking the return and sale sides of the exchange." + "name": "message", + "value": "string", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "PropertySignature", - "name": "executedAt", + "name": "stack", "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." - }, + "description": "", + "isOptional": true + } + ], + "value": "export class StorageError extends Error {\n public name = 'StorageError';\n constructor(\n public code: 'RecordsCount' | 'RecordSize' | 'KeyType' | 'KeySize',\n message: string,\n ) {\n super(message);\n }\n}" + } + }, + "Storage": { + "src/surfaces/point-of-sale/types/storage.ts": { + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "name": "Storage", + "description": "Defines the storage interface for persisting extension data across sessions.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "PropertySignature", - "name": "grandTotal", - "value": "Money", - "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." + "name": "clear", + "value": "() => Promise", + "description": "Clears all data from storage, removing all key-value pairs." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/storage.ts", "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + "name": "delete", + "value": "(key: Keys) => Promise", + "description": "Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "isTrusted", - "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "MethodSignature", + "name": "entries", + "value": "() => Promise<[Keys, StorageTypes[Keys]][]>", + "description": "Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "lineItemsAdded", - "value": "LineItem[]", - "description": "An array of line items added to the customer in the exchange." + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "MethodSignature", + "name": "get", + "value": "(key: Keys) => Promise", + "description": "Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "lineItemsRemoved", - "value": "LineItem[]", - "description": "An array of line items removed from the customer in the exchange." - }, + "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "syntaxKind": "MethodSignature", + "name": "set", + "value": "(key: Keys, value: StorageTypes[Keys]) => Promise", + "description": "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." + } + ], + "value": "export interface Storage<\n BaseStorageTypes extends Record = Record,\n> {\n /**\n * 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.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set for the key.\n * @throws StorageError when:\n * - Maximum number of records is exceeded (`code: 'RecordsCount'`)\n * - Individual record size exceeds the limit (`code: 'RecordSize'`)\n * - Key is not a string (`code: 'KeyType'`)\n * - Key size exceeds the limit (`code: 'KeySize'`)\n */\n set<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n value: StorageTypes[Keys],\n ): Promise;\n\n /**\n * Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets.\n *\n * @param key - The key to get the value for.\n * @returns The value of the key.\n * @throws StorageError when the key isn't a string or exceeds its allotted size.\n */\n get<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n ): Promise;\n\n /**\n * Clears all data from storage, removing all key-value pairs.\n */\n clear: () => Promise;\n\n /**\n * Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes.\n *\n * @param key - The key to delete.\n */\n delete<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n ): Promise;\n\n /**\n * Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data.\n *\n * @returns An array containing all the keys and values in the storage.\n */\n entries<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(): Promise<[Keys, StorageTypes[Keys]][]>;\n}" + } + }, + "StorageApi": { + "src/surfaces/point-of-sale/api/storage-api/storage-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/storage-api/storage-api.ts", + "name": "StorageApi", + "description": "The `StorageApi` object provides access to persistent local storage methods for your POS UI extension. Access these methods through `shopify.storage` to store, retrieve, and manage data that persists across sessions.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/api/storage-api/storage-api.ts", "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", + "name": "storage", + "value": "Storage", "description": "" - }, + } + ], + "value": "export interface StorageApi {\n storage: Storage;\n}" + } + }, + "PinPadResult": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "name": "PinPadResult", + "description": "Represents the result of a PIN pad interaction, indicating whether PIN entry was completed and providing the entered PIN if available.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "orderId", - "value": "number", - "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", - "isOptional": true + "name": "completed", + "value": "boolean", + "description": "Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "paymentMethods", - "value": "Payment[]", - "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", - "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "PropertySignature", - "name": "returnId", - "value": "number", - "description": "The return-side ID. `undefined` when the exchange has no return side.", + "name": "pin", + "value": "number[]", + "description": "The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN \"1234\"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.", "isOptional": true - }, + } + ], + "value": "export interface PinPadResult {\n /**\n * Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal.\n */\n completed: boolean;\n /**\n * The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN \"1234\"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.\n */\n pin?: number[];\n}" + } + }, + "PinValidationResult": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "PinValidationResult", + "value": "{result: 'accept'} | {result: 'reject'; errorMessage?: string}", + "description": "Represents the validation outcome for an entered PIN. Indicates whether the PIN should be accepted or rejected, with optional error messaging for rejected PINs.", + "isPublicDocs": true + } + }, + "PinLength": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "PinLength", + "value": "4 | 5 | 6 | 7 | 8 | 9 | 10", + "description": "The valid PIN length values (4-10 digits). Commonly used to configure minimum and maximum PIN length requirements.", + "isPublicDocs": true + } + }, + "PinPadActionType": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "name": "PinPadActionType", + "description": "Defines a custom action button for the PIN pad interface with a label and click handler.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", - "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" + "name": "label", + "value": "string", + "description": "The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for." }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "shippingLines", - "value": "ShippingLine[]", - "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." - }, + "name": "onClick", + "value": "() => number[] | Promise", + "description": "Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows." + } + ], + "value": "export interface PinPadActionType {\n /**\n * The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.\n */\n label: string;\n /**\n * Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows.\n */\n onClick: () => Promise | number[];\n}" + } + }, + "PinPadOptions": { + "src/surfaces/point-of-sale/types/pin-pad.ts": { + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "name": "PinPadOptions", + "description": "Specifies configuration options for displaying the PIN pad interface. Includes callback functions for PIN entry events, dismissal handling, and customizable labels and messaging.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + "name": "autoSubmit", + "value": "boolean", + "description": "Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.", + "isOptional": true, + "defaultValue": "false" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "subtotal", - "value": "Money", - "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." + "name": "label", + "value": "string", + "description": "The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + "name": "masked", + "value": "boolean", + "description": "Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.", + "isOptional": true, + "defaultValue": "true" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "taxLines", - "value": "TaxLine[]", - "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." + "name": "maxPinLength", + "value": "PinLength", + "description": "The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.", + "isOptional": true, + "defaultValue": "6" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "taxTotal", - "value": "Money", - "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." + "name": "minPinLength", + "value": "PinLength", + "description": "The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.", + "isOptional": true, + "defaultValue": "4" }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "name": "onDismissed", + "value": "(result: PinPadResult) => void", + "description": "The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "tipAmount", - "value": "Money", - "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "name": "onPinEntry", + "value": "(pin: number[]) => void", + "description": "The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "transactionType", - "value": "'Exchange'", - "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + "name": "pinPadAction", + "value": "PinPadActionType", + "description": "The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", "syntaxKind": "PropertySignature", - "name": "type", + "name": "title", "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + "description": "The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.", + "isOptional": true } ], - "value": "interface ExchangeCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Exchange';\n /**\n * The exchange ID linking the return and sale sides of the exchange.\n */\n readonly exchangeId: number;\n /**\n * The return-side ID. `undefined` when the exchange has no return side.\n */\n readonly returnId?: number;\n /**\n * An array of line items added to the customer in the exchange.\n */\n readonly lineItemsAdded: LineItem[];\n /**\n * An array of line items removed from the customer in the exchange.\n */\n readonly lineItemsRemoved: LineItem[];\n}" + "value": "export interface PinPadOptions {\n /**\n * The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.\n */\n onPinEntry?: (pin: number[]) => void;\n /**\n * The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.\n */\n onDismissed?: (result: PinPadResult) => void;\n /**\n * The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.\n */\n label?: string;\n /**\n * Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.\n *\n * @default true\n */\n masked?: boolean;\n /**\n * The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.\n *\n * @default 4\n */\n minPinLength?: PinLength;\n /**\n * The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.\n *\n * @default 6\n */\n maxPinLength?: PinLength;\n /**\n * The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.\n */\n pinPadAction?: PinPadActionType;\n /**\n * The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.\n */\n title?: string;\n /**\n * Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.\n *\n * @default false\n */\n autoSubmit?: boolean;\n}" } }, - "CashTrackingSessionStartEvent": { - "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts": { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "name": "CashTrackingSessionStartEvent", - "description": "Dispatched when a cash tracking session is opened.", + "PinPadApiContent": { + "src/surfaces/point-of-sale/api/pin-pad-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "name": "PinPadApiContent", + "description": "The `PinPadApi` object provides PIN entry and validation functionality.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" - }, + "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "syntaxKind": "MethodSignature", + "name": "showPinPad", + "value": "(onSubmit: (pin: number[]) => PinValidationResult | Promise, options?: PinPadOptions) => void", + "description": "Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.\n\n• **When accepted**: The modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.\n\n• **When rejected**: Displays the optional `errorMessage` and keeps the modal open.\n\nUse for implementing secure authentication workflows, access control, or PIN-based verification systems." + } + ], + "value": "export interface PinPadApiContent {\n /**\n * Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.\n *\n * • **When accepted**: The modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.\n *\n * • **When rejected**: Displays the optional `errorMessage` and keeps the modal open.\n *\n * Use for implementing secure authentication workflows, access control, or PIN-based verification systems.\n */\n showPinPad(\n onSubmit: (\n pin: number[],\n ) => Promise | PinValidationResult,\n options?: PinPadOptions,\n ): void;\n}" + } + }, + "PinPadApi": { + "src/surfaces/point-of-sale/api/pin-pad-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "name": "PinPadApi", + "description": "The `PinPadApi` object provides methods for displaying secure PIN entry interfaces. Access these methods through `shopify.pinPad` to show PIN pad modals and handle PIN validation.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", "syntaxKind": "PropertySignature", - "name": "bubbles", - "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" - }, + "name": "pinPad", + "value": "PinPadApiContent", + "description": "The `PinPadApi` object provides PIN entry and validation functionality." + } + ], + "value": "export interface PinPadApi {\n pinPad: PinPadApiContent;\n}" + } + }, + "StandardApi": { + "src/surfaces/point-of-sale/api/standard/standard-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/standard/standard-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "StandardApi", + "value": "{[key: string]: any} & {\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & LocaleApi & ToastApi & SessionApi & PrintApi & ProductSearchApi & DeviceApi & ConnectivityApi & StorageApi & PinPadApi & CameraApi", + "description": "", + "isPublicDocs": true + } + }, + "I18n": { + "src/api.ts": { + "filePath": "src/api.ts", + "name": "I18n", + "description": "Internationalization utilities for formatting and translating content according to the user's locale. Use these methods to display numbers, currency, dates, and translated strings that match the merchant's language and regional preferences.", + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/api.ts", "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" + "name": "formatCurrency", + "value": "(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string", + "description": "Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/api.ts", "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" + "name": "formatDate", + "value": "(date: Date, options?: { inExtensionLocale?: boolean; } & DateTimeFormatOptions) => string", + "description": "Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "cancelBubble", - "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "composed", - "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/api.ts", "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + "name": "formatNumber", + "value": "(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string", + "description": "Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/api.ts", "syntaxKind": "PropertySignature", - "name": "defaultPrevented", - "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" - }, + "name": "translate", + "value": "I18nTranslate", + "description": "Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components." + } + ], + "value": "export interface I18n {\n /**\n * Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default.\n *\n * @param number - The number to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.NumberFormatOptions for customizing the number format\n */\n formatNumber: (\n number: number | bigint,\n options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,\n ) => string;\n\n /**\n * Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default.\n *\n * @param number - The currency amount to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.NumberFormatOptions for customizing the currency format, such as the currency code\n */\n formatCurrency: (\n number: number | bigint,\n options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,\n ) => string;\n\n /**\n * Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style.\n *\n * @param date - The Date object to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.DateTimeFormatOptions for customizing the date format\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n formatDate: (\n date: Date,\n options?: {inExtensionLocale?: boolean} & Intl.DateTimeFormatOptions,\n ) => string;\n\n /**\n * Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components.\n */\n translate: I18nTranslate;\n}" + } + }, + "I18nTranslate": { + "src/api.ts": { + "filePath": "src/api.ts", + "name": "I18nTranslate", + "description": "The translation function signature for internationalization. Use this to translate string keys defined in your locale files into localized content for the current user's language.", + "members": [], + "value": "export interface I18nTranslate {\n /**\n * Returns a translated string matching a key in a locale file. Use this to display localized text in your extension based on the merchant's language preferences. Supports interpolation with replacement values and pluralization with the `count` option. Returns a string when replacements are primitives, or an array when replacements include UI components.\n *\n * @param key - The translation key from your locale file (for example, \"banner.title\")\n * @param options - Optional replacement values for interpolation or the special `count` property for pluralization\n *\n * @example translate(\"banner.title\")\n * @example translate(\"items.count\", { count: 5 })\n */\n (\n key: string,\n options?: Record,\n ): ReplacementType extends string | number\n ? string\n : (string | ReplacementType)[];\n}" + } + }, + "ScannerSource": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ScannerSource", + "value": "'camera' | 'external' | 'embedded'", + "description": "The scanner source the POS device supports.", + "isPublicDocs": true + } + }, + "ScannerSubscriptionResult": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerSubscriptionResult", + "description": "Represents the data from a scanner event. Contains the scanned string data and the hardware source that captured the scan.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "eventPhase", - "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + "name": "data", + "value": "string", + "description": "The string data from the last scanner event received. Contains the scanned barcode, QR code, or other scannable data. Returns `undefined` when no scan data is available. Use to process scanned content and implement scan-based business logic.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The numeric identifier for the cash tracking session." - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" - }, + "name": "source", + "value": "ScannerSource", + "description": "The scanning source from which the scan event came. Returns one of the following scanner types:\n\n• `'camera'` - Built-in device camera used for scanning • `'external'` - External scanner hardware connected to the device • `'embedded'` - Embedded scanner hardware built into the device", + "isOptional": true + } + ], + "value": "export interface ScannerSubscriptionResult {\n /**\n * The string data from the last scanner event received. Contains the scanned barcode, QR code, or other scannable data. Returns `undefined` when no scan data is available. Use to process scanned content and implement scan-based business logic.\n */\n data?: string;\n /**\n * The scanning source from which the scan event came. Returns one of the following scanner types:\n *\n * • `'camera'` - Built-in device camera used for scanning\n * • `'external'` - External scanner hardware connected to the device\n * • `'embedded'` - Embedded scanner hardware built into the device\n */\n source?: ScannerSource;\n}" + } + }, + "ScannerSources": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerSources", + "description": "Represents the available scanner hardware sources on the device. Provides reactive access to the list of scanners that can be used for scanning operations.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "isTrusted", - "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" - }, + "name": "current", + "value": "ReadonlySignalLike", + "description": "Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available." + } + ], + "value": "export interface ScannerSources {\n /**\n * Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available.\n */\n current: ReadonlySignalLike;\n}" + } + }, + "ScannerData": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerData", + "description": "Represents the scanner interface for accessing scan events and subscription management. Provides real-time access to scanned data through a reactive signal pattern.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", - "description": "" - }, + "name": "current", + "value": "ReadonlySignalLike", + "description": "Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available." + } + ], + "value": "export interface ScannerData {\n /**\n * Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available.\n */\n current: ReadonlySignalLike;\n}" + } + }, + "ScannerApiContent": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerApiContent", + "description": "The `ScannerApi` object provides scan results and scanner controls.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "openingTime", - "value": "string", - "description": "ISO 8601 timestamp when the session was opened." - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", + "name": "hideCameraScanner", "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + "description": "Hide the camera scanner." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", - "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" + "name": "scannerData", + "value": "ScannerData", + "description": "Access current scan data and subscribe to new scan events. Use to receive real-time scan results." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", + "name": "showCameraScanner", "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + "description": "Show the camera scanner." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" + "name": "sources", + "value": "ScannerSources", + "description": "Access available scanner sources on the device. Use to check which scanners are available (camera, external, or embedded)." } ], - "value": "export interface CashTrackingSessionStartEvent\n extends CashTrackingSessionEvent {}" + "value": "export interface ScannerApiContent {\n /**\n * Access current scan data and subscribe to new scan events. Use to receive real-time scan results.\n */\n scannerData: ScannerData;\n /**\n * Access available scanner sources on the device. Use to check which scanners are available (camera, external, or embedded).\n */\n sources: ScannerSources;\n /**\n * Show the camera scanner.\n */\n showCameraScanner: () => void;\n /**\n * Hide the camera scanner.\n */\n hideCameraScanner: () => void;\n}" } }, - "CashTrackingSessionCompleteEvent": { - "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts": { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "name": "CashTrackingSessionCompleteEvent", - "description": "Dispatched when a cash tracking session is successfully closed via reconciliation.", + "ScannerApi": { + "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "name": "ScannerApi", + "description": "The `ScannerApi` object provides access to scanning functionality and scanner source information. Access these properties through `shopify.scanner` to monitor scan events and available scanner sources.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "AT_TARGET", - "value": "2", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "bubbles", - "value": "boolean", - "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", "syntaxKind": "PropertySignature", - "name": "BUBBLING_PHASE", - "value": "3", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "name": "scanner", + "value": "ScannerApiContent", + "description": "The `ScannerApi` object provides scan results and scanner controls." + } + ], + "value": "export interface ScannerApi {\n scanner: ScannerApiContent;\n}" + } + }, + "ActionTargetApi": { + "src/surfaces/point-of-sale/api/action-target-api/action-target-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/action-target-api/action-target-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "ActionTargetApi", + "value": "{[key: string]: any} & {\n extensionPoint: T;\n} & StandardApi & ScannerApi", + "description": "", + "isPublicDocs": true + } + }, + "DataTargetApi": { + "src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "DataTargetApi", + "value": "{\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & SessionApi & StorageApi & LocaleApi & ConnectivityApi & DeviceApi & ProductSearchApi & ReadonlyCartApi", + "description": "API surface for non-rendering data extension targets.", + "isPublicDocs": true + } + }, + "PaymentMethod": { + "src/surfaces/point-of-sale/types/payment.ts": { + "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "PaymentMethod", + "value": "'Cash' | 'Custom' | 'CreditCard' | 'CardPresentRefund' | 'StripeCardPresentRefund' | 'GiftCard' | 'StripeCreditCard' | 'ShopPay' | 'StoreCredit' | 'Unknown'", + "description": "The available payment method types for POS transactions.", + "isPublicDocs": true + } + }, + "Payment": { + "src/surfaces/point-of-sale/types/payment.ts": { + "filePath": "src/surfaces/point-of-sale/types/payment.ts", + "name": "Payment", + "description": "Represents a payment applied to a transaction, including the amount, currency, and payment method type.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/types/payment.ts", "syntaxKind": "PropertySignature", - "name": "cancelable", - "value": "boolean", - "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" + "name": "amount", + "value": "number", + "description": "The payment amount." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/payment.ts", "syntaxKind": "PropertySignature", - "name": "cancelBubble", - "value": "boolean", - "description": "The **`cancelBubble`** property of the Event interface is deprecated.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" + "name": "currency", + "value": "string", + "description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/payment.ts", "syntaxKind": "PropertySignature", - "name": "CAPTURING_PHASE", - "value": "1", - "description": "" - }, + "name": "type", + "value": "PaymentMethod", + "description": "The payment method type." + } + ], + "value": "export interface Payment {\n /**\n * The payment amount.\n */\n amount: number;\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: string;\n /**\n * The payment method type.\n */\n type: PaymentMethod;\n}" + } + }, + "ShippingLine": { + "src/surfaces/point-of-sale/types/shipping-line.ts": { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "name": "ShippingLine", + "description": "Represents a shipping charge applied to an order, including the price and applicable taxes.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "closingTime", + "name": "handle", "value": "string", - "description": "ISO 8601 timestamp when the session was closed." + "description": "The handle identifier for the shipping method.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "composed", - "value": "boolean", - "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "composedPath", - "value": "() => EventTarget[]", - "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + "name": "price", + "value": "Money", + "description": "The price of the shipping as a Money object." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "currentTarget", - "value": "EventTarget | null", - "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing tax breakdown.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "defaultPrevented", - "value": "boolean", - "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" - }, + "name": "title", + "value": "string", + "description": "The display title of the shipping method.", + "isOptional": true + } + ], + "value": "export interface ShippingLine {\n /**\n * The handle identifier for the shipping method.\n */\n handle?: string;\n /**\n * The price of the shipping as a Money object.\n */\n price: Money;\n /**\n * The display title of the shipping method.\n */\n title?: string;\n /**\n * An array of individual tax lines showing tax breakdown.\n */\n taxLines?: TaxLine[];\n}" + } + }, + "CalculatedShippingLine": { + "src/surfaces/point-of-sale/types/shipping-line.ts": { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "name": "CalculatedShippingLine", + "description": "Represents a calculated shipping line with specific shipping or retail method type.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "eventPhase", - "value": "number", - "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + "name": "handle", + "value": "string", + "description": "The handle identifier for the shipping method.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The numeric identifier for the cash tracking session." - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "initEvent", - "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", - "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + "name": "methodType", + "value": "'SHIPPING' | 'RETAIL'", + "description": "The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:\n- `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.\n- `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "isTrusted", - "value": "boolean", - "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + "name": "price", + "value": "Money", + "description": "The price of the shipping as a Money object." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "NONE", - "value": "0", - "description": "" + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing tax breakdown.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "openingTime", + "name": "title", "value": "string", - "description": "ISO 8601 timestamp when the session was opened." - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "preventDefault", - "value": "() => void", - "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + "description": "The display title of the shipping method.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "returnValue", - "value": "boolean", - "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" - }, + "name": "type", + "value": "'Calculated'", + "description": "The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators." + } + ], + "value": "export interface CalculatedShippingLine extends ShippingLine {\n /**\n * The type identifier for calculated shipping. This is always `'Calculated'` to distinguish from custom shipping lines. Calculated shipping rates are determined by carrier APIs, zone-based rules, or automated shipping calculators.\n */\n type: 'Calculated';\n /**\n * The shipping method category indicating whether this is standard shipping delivery or in-store retail pickup:\n * - `'SHIPPING'`: Traditional carrier-based shipping where items are delivered to a customer address.\n * - `'RETAIL'`: In-store pickup or buy-online-pickup-in-store (BOPIS) where customers collect items at a physical location.\n */\n methodType: 'SHIPPING' | 'RETAIL';\n}" + } + }, + "CustomShippingLine": { + "src/surfaces/point-of-sale/types/shipping-line.ts": { + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "name": "CustomShippingLine", + "description": "Represents a custom shipping line with merchant-defined shipping charges.", + "isPublicDocs": true, + "members": [ { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "srcElement", - "value": "EventTarget | null", - "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", - "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + "name": "handle", + "value": "string", + "description": "The handle identifier for the shipping method.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "stopImmediatePropagation", - "value": "() => void", - "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "syntaxKind": "PropertySignature", + "name": "price", + "value": "Money", + "description": "The price of the shipping as a Money object." }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "MethodSignature", - "name": "stopPropagation", - "value": "() => void", - "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", + "syntaxKind": "PropertySignature", + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing tax breakdown.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "EventTarget | null", - "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + "name": "title", + "value": "string", + "description": "The display title of the shipping method.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", - "syntaxKind": "PropertySignature", - "name": "timeStamp", - "value": "DOMHighResTimeStamp", - "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" - }, - { - "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "filePath": "src/surfaces/point-of-sale/types/shipping-line.ts", "syntaxKind": "PropertySignature", "name": "type", - "value": "string", - "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" - } - ], - "value": "export interface CashTrackingSessionCompleteEvent\n extends CashTrackingSessionEvent {\n /** ISO 8601 timestamp when the session was closed. */\n readonly closingTime: string;\n}" - } - }, - "ShopifyEventMap": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "ShopifyEventMap", - "description": "Maps Shopify POS event names to their corresponding `Event` subclass types.\n\nUsed as the generic type parameter for `shopify.addEventListener` and `shopify.removeEventListener`.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "cashtrackingsessioncomplete", - "value": "CashTrackingSessionCompleteEvent", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "cashtrackingsessionstart", - "value": "CashTrackingSessionStartEvent", - "description": "" - }, - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "transactioncomplete", - "value": "TransactionCompleteEvent", - "description": "Dispatched when a sale, return, or exchange transaction completes.\n\nNarrow on `transactionType` to access per-type fields." + "value": "'Custom'", + "description": "The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems." } ], - "value": "export interface ShopifyEventMap {\n [POS_EVENT_NAMES.TRANSACTION_COMPLETE]: TransactionCompleteEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;\n}" + "value": "export interface CustomShippingLine extends ShippingLine {\n /**\n * The type identifier for custom shipping. This is always `'Custom'` to distinguish from calculated shipping lines. Custom shipping rates are manually set by merchants rather than calculated by carrier APIs or automated systems.\n */\n type: 'Custom';\n}" } }, - "ShopifyInterceptMap": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "ShopifyInterceptMap", - "description": "Maps POS interceptable workflow names to their corresponding `Event` types.\n\nUsed as the generic type parameter for `shopify.intercept`.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "beforecheckout", - "value": "BeforeCheckoutEvent", - "description": "Dispatched when staff attempts to leave the active cart for checkout." - } - ], - "value": "export interface ShopifyInterceptMap {\n [POS_INTERCEPT_NAMES.BEFORE_CHECKOUT]: BeforeCheckoutEvent;\n}" + "TransactionCompleteEvent": { + "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "TransactionCompleteEvent", + "value": "SaleCompleteEvent | ReturnCompleteEvent | ExchangeCompleteEvent", + "description": "Dispatched when a sale, return, or exchange transaction completes.\n\nNarrow on `transactionType` to access per-type fields.", + "isPublicDocs": true } }, - "BeforeCheckoutEvent": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "BeforeCheckoutEvent", - "description": "Dispatched when staff attempts to leave the active cart for checkout.", - "isPublicDocs": true, + "SaleCompleteEvent": { + "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "name": "SaleCompleteEvent", + "description": "Dispatched when a sale transaction completes.", "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "AT_TARGET", "value": "2", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "balanceDue", + "value": "Money", + "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "bubbles", "value": "boolean", "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "BUBBLING_PHASE", "value": "3", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "cancelable", "value": "boolean", "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "cancelBubble", "value": "boolean", @@ -3132,56 +3440,94 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "CAPTURING_PHASE", "value": "1", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "cart", - "value": "Cart", - "description": "The POS cart at the point checkout was requested." + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "composed", "value": "boolean", "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", "name": "composedPath", "value": "() => EventTarget[]", "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "currentTarget", "value": "EventTarget | null", "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "customer", + "value": "Customer", + "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "defaultPrevented", "value": "boolean", "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "discounts", + "value": "Discount[]", + "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "draftCheckoutUuid", + "value": "string", + "description": "The UUID of the draft order's checkout. Set when the sale originated from a draft order; `undefined` otherwise.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "eventPhase", "value": "number", "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "executedAt", + "value": "string", + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "grandTotal", + "value": "Money", + "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", "name": "initEvent", "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", @@ -3189,28 +3535,50 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "isTrusted", "value": "boolean", "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "lineItems", + "value": "LineItem[]", + "description": "An array of line items included in the sale transaction." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "NONE", "value": "0", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "orderId", + "value": "number", + "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "paymentMethods", + "value": "Payment[]", + "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", "name": "preventDefault", "value": "() => void", "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "returnValue", "value": "boolean", @@ -3218,7 +3586,14 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "shippingLines", + "value": "ShippingLine[]", + "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "srcElement", "value": "EventTarget | null", @@ -3226,1837 +3601,1434 @@ "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", "name": "stopImmediatePropagation", "value": "() => void", "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "MethodSignature", "name": "stopPropagation", "value": "() => void", "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "subtotal", + "value": "Money", + "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "target", "value": "EventTarget | null", "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "taxTotal", + "value": "Money", + "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "timeStamp", "value": "DOMHighResTimeStamp", "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "tipAmount", + "value": "Money", + "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "transactionType", + "value": "'Sale'", + "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", "name": "type", - "value": "'beforecheckout'", + "value": "string", "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface BeforeCheckoutEvent extends Event {\n readonly type: typeof POS_INTERCEPT_NAMES.BEFORE_CHECKOUT;\n /** The POS cart at the point checkout was requested. */\n readonly cart: Cart;\n}" + "value": "interface SaleCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Sale';\n /**\n * The UUID of the draft order's checkout. Set when the sale originated from\n * a draft order; `undefined` otherwise.\n */\n readonly draftCheckoutUuid?: string;\n /**\n * An array of line items included in the sale transaction.\n */\n readonly lineItems: LineItem[];\n}" } }, - "ShopifyInterceptor": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "ShopifyInterceptor", - "description": "", - "isPublicDocs": true, - "params": [ - { - "name": "event", - "description": "", - "value": "TEvent", - "filePath": "src/surfaces/point-of-sale/events.ts" - } - ], - "returns": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "description": "", - "name": "InterceptResult", - "value": "InterceptResult" - }, - "value": "(\n event: TEvent,\n) => InterceptResult" - } - }, - "InterceptResult": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "InterceptResult", - "description": "The result an interceptor returns. An empty `operations` list allows the workflow; an `ERROR` validation blocks it.", - "isPublicDocs": true, + "ReturnCompleteEvent": { + "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "name": "ReturnCompleteEvent", + "description": "Dispatched when a return transaction completes.", "members": [ { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "operations", - "value": "Operation[]", + "name": "AT_TARGET", + "value": "2", "description": "" - } - ], - "value": "export interface InterceptResult {\n operations: Operation[];\n}" - } - }, - "Operation": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "Operation", - "description": "A single host operation produced by an interceptor.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "validationAdd", - "value": "ValidationAdd", - "description": "Adds a validation to the workflow being intercepted.", - "isOptional": true - } - ], - "value": "export interface Operation {\n validationAdd?: ValidationAdd;\n}" - } - }, - "ValidationAdd": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "ValidationAdd", - "description": "Adds a validation to the workflow being intercepted.", - "isPublicDocs": true, - "members": [ + }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "handle", - "value": "string", - "description": "Stable identifier for this validation." + "name": "balanceDue", + "value": "Money", + "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "level", - "value": "ValidationLevel", - "description": "`ERROR` blocks the workflow. `WARNING` and `INFO` do not." + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "message", - "value": "string", - "description": "Host-facing message for support, observability, or staff UX." + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "metafields", - "value": "Metafield[]", - "description": "Optional structured data for custom UX or order metadata.", - "isOptional": true + "name": "cancelable", + "value": "boolean", + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "string", - "description": "JSON-path locator for where the validation applies. Defaults to `$.cart`.", - "isOptional": true - } - ], - "value": "export interface ValidationAdd {\n /** `ERROR` blocks the workflow. `WARNING` and `INFO` do not. */\n level: ValidationLevel;\n\n /** Stable identifier for this validation. */\n handle: string;\n\n /** Host-facing message for support, observability, or staff UX. */\n message: string;\n\n /** JSON-path locator for where the validation applies. Defaults to `$.cart`. */\n target?: string;\n\n /** Optional structured data for custom UX or order metadata. */\n metafields?: Metafield[];\n}" - } - }, - "ValidationLevel": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ValidationLevel", - "value": "'INFO' | 'WARNING' | 'ERROR'", - "description": "", - "isPublicDocs": true - } - }, - "Metafield": { - "src/surfaces/point-of-sale/events.ts": { - "filePath": "src/surfaces/point-of-sale/events.ts", - "name": "Metafield", - "description": "Metafield input attached to a validation.", - "isPublicDocs": true, - "members": [ + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" + }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "key", - "value": "string", + "name": "CAPTURING_PHASE", + "value": "1", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "namespace", - "value": "string", - "description": "" + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/events.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "type", - "value": "string", - "description": "" + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/events.ts", - "syntaxKind": "PropertySignature", - "name": "value", - "value": "string", - "description": "" - } - ], - "value": "export interface Metafield {\n namespace: string;\n key: string;\n value: string;\n type: string;\n}" - } - }, - "InterceptCapability": { - "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "InterceptCapability", - "value": "`${Extract<\n keyof ShopifyInterceptMap,\n string\n>}.${'error' | 'warning' | 'info'}`", - "description": "A granted validation severity for a POS intercept event. Event names are derived from `ShopifyInterceptMap`; `warning` corresponds to the `WARNING` validation level.", - "isPublicDocs": true - } - }, - "CapabilitiesApi": { - "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", - "name": "CapabilitiesApi", - "description": "Provides the validation severities granted for POS intercept events.", - "isPublicDocs": true, - "members": [ + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + }, { - "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "capabilities", - "value": "ReadonlySignalLike", - "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`." - } - ], - "value": "export interface CapabilitiesApi {\n /**\n * A read-only list of granted intercept capabilities. The signal is available\n * to every POS target, but only the target that registers an interceptor\n * declares its event in `shopify.extension.toml`.\n *\n * Grants are cumulative. An `.error` grant includes `.warning` and `.info`,\n * and a `.warning` grant includes `.info`.\n */\n capabilities: ReadonlySignalLike;\n}" - } - }, - "ConnectivityStateSeverity": { - "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ConnectivityStateSeverity", - "value": "'Connected' | 'Disconnected'", - "description": "", - "isPublicDocs": true - } - }, - "ConnectivityState": { - "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", - "name": "ConnectivityState", - "description": "Represents the current Internet connectivity status of the device. Indicates whether the device is connected or disconnected from the Internet.", - "isPublicDocs": true, - "members": [ + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" + }, { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "internetConnected", - "value": "ConnectivityStateSeverity", - "description": "The Internet connection status of the POS device." - } - ], - "value": "export interface ConnectivityState {\n /**\n * The Internet connection status of the POS device.\n */\n internetConnected: ConnectivityStateSeverity;\n}" - } - }, - "ConnectivityApiContent": { - "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", - "name": "ConnectivityApiContent", - "description": "Provides access to the current connectivity state for the POS device.", - "isPublicDocs": true, - "members": [ + "name": "customer", + "value": "Customer", + "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", + "isOptional": true + }, { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "current", - "value": "ReadonlySignalLike", - "description": "Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling." - } - ], - "value": "export interface ConnectivityApiContent {\n /**\n * Provides read-only access to the current connectivity state and allows subscribing to connectivity changes. Use for implementing connectivity-aware functionality and reactive connectivity handling.\n */\n current: ReadonlySignalLike;\n}" - } - }, - "ConnectivityApi": { - "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", - "name": "ConnectivityApi", - "description": "The `ConnectivityApi` object provides access to current connectivity information and change notifications. Access these properties through `shopify.connectivity` to monitor network status.", - "isPublicDocs": true, - "members": [ + "name": "defaultPrevented", + "value": "boolean", + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" + }, { - "filePath": "src/surfaces/point-of-sale/api/connectivity-api/connectivity-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "connectivity", - "value": "ConnectivityApiContent", - "description": "Provides access to the current connectivity state for the POS device." - } - ], - "value": "export interface ConnectivityApi {\n connectivity: ConnectivityApiContent;\n}" - } - }, - "DeviceApiContent": { - "src/surfaces/point-of-sale/api/device-api/device-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", - "name": "DeviceApiContent", - "description": "The `DeviceApi` object provides device details and capabilities.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", - "syntaxKind": "MethodSignature", - "name": "getDeviceId", - "value": "() => Promise", - "description": "Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations. Note: While Shopify POS attempts to maintain a stable identifier, it is not guaranteed to be permanent and may change." + "name": "discounts", + "value": "Discount[]", + "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." }, { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", - "syntaxKind": "MethodSignature", - "name": "isTablet", - "value": "() => Promise", - "description": "Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "eventPhase", + "value": "number", + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful." + "name": "exchangeId", + "value": "number", + "description": "The exchange ID when this return is the gift-card side of an exchange; `undefined` for standalone returns.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "registerName", + "name": "executedAt", "value": "string", - "description": "A short, unique identifier for the device, assigned by Shopify." - } - ], - "value": "export interface DeviceApiContent {\n /**\n * The name of the device as configured by the merchant or system. Use for displaying device information in interfaces, logging, or support contexts where device identification is helpful.\n */\n name: string;\n /**\n * A short, unique identifier for the device, assigned by Shopify.\n */\n registerName: string;\n /**\n * Retrieves the unique string identifier for the device. Returns a promise that resolves to the device ID. Use for device-specific data storage, analytics tracking, or implementing device-based permissions and configurations.\n * Note: While Shopify POS attempts to maintain a stable identifier, it is not guaranteed to be permanent and may change.\n */\n getDeviceId(): Promise;\n /**\n * Determines whether the device is a tablet form factor. Returns a promise that resolves to `true` for tablets, `false` for other device types. Use for implementing responsive design, optimizing touch targets, or providing device-appropriate user experiences.\n */\n isTablet(): Promise;\n}" - } - }, - "DeviceApi": { - "src/surfaces/point-of-sale/api/device-api/device-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", - "name": "DeviceApi", - "description": "The `DeviceApi` object provides access to device information and capabilities. Access these properties and methods through `shopify.device` to retrieve device details and check device characteristics.", - "isPublicDocs": true, - "members": [ + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." + }, { - "filePath": "src/surfaces/point-of-sale/api/device-api/device-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "device", - "value": "DeviceApiContent", - "description": "The `DeviceApi` object provides device details and capabilities." - } - ], - "value": "export interface DeviceApi {\n device: DeviceApiContent;\n}" - } - }, - "ExtensionApiContent": { - "src/surfaces/point-of-sale/api/extension-api/extension-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", - "name": "ExtensionApiContent", - "description": "The Extension API lets you read metadata about the currently running extension. Use it to implement version-aware behaviour or to identify which target is active when the same extension module is registered against multiple targets. Access these properties through `shopify.extension`.", - "isPublicDocs": true, - "members": [ + "name": "grandTotal", + "value": "Money", + "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." + }, { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "apiVersion", - "value": "ApiVersion", - "description": "The API version that was set in the extension configuration file.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "'2026-01', '2026-04'", - "title": "Example" - } - ] - } - ] + "name": "isTrusted", + "value": "boolean", + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "target", - "value": "T", - "description": "The extension target that is currently running, as configured in the extension's `shopify.extension.toml` file.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "'pos.home.tile.render', 'pos.home.modal.render'", - "title": "Example" - } - ] - } - ] - } - ], - "value": "export interface ExtensionApiContent {\n /**\n * The API version that was set in the extension configuration file.\n *\n * @example '2026-01', '2026-04'\n */\n apiVersion: ApiVersion;\n /**\n * The extension target that is currently running, as configured in the\n * extension's `shopify.extension.toml` file.\n *\n * @example 'pos.home.tile.render', 'pos.home.modal.render'\n */\n target: T;\n}" - } - }, - "ApiVersion": { - "src/shared.ts": { - "filePath": "src/shared.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ApiVersion", - "value": "'2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '2025-01' | '2025-04' | 'unstable' | '2025-07' | '2025-10' | '2026-01' | '2026-04' | '2026-07'", - "description": "The supported GraphQL Admin API versions. Use this to specify which API version your GraphQL queries should execute against. Each version includes specific features, bug fixes, and breaking changes. The `unstable` version provides access to the latest features but may change without notice." - } - }, - "ExtensionApi": { - "src/surfaces/point-of-sale/api/extension-api/extension-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", - "name": "ExtensionApi", - "description": "The `ExtensionApi` object provides metadata about the currently running extension, including the configured API version and the active extension target. Access these properties through `shopify.extension`.", - "isPublicDocs": true, - "members": [ + "name": "lineItems", + "value": "LineItem[]", + "description": "An array of line items included in the return transaction." + }, { - "filePath": "src/surfaces/point-of-sale/api/extension-api/extension-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "extension", - "value": "ExtensionApiContent", + "name": "NONE", + "value": "0", "description": "" - } - ], - "value": "export interface ExtensionApi {\n extension: ExtensionApiContent;\n}" - } - }, - "LocaleApiContent": { - "src/surfaces/point-of-sale/api/locale-api/locale-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", - "name": "LocaleApiContent", - "description": "The `LocaleApi` object provides the current locale and locale updates.", - "isPublicDocs": true, - "members": [ + }, { - "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "current", - "value": "ReadonlySignalLike", - "description": "Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings." - } - ], - "value": "export interface LocaleApiContent {\n /**\n * Provides read-only access to the current IETF-formatted locale and allows subscribing to locale changes. The `value` property provides the current locale, and `subscribe` allows listening to changes. Use for internationalization, locale-specific formatting, and reactive updates when merchants change language settings.\n */\n current: ReadonlySignalLike;\n}" - } - }, - "LocaleApi": { - "src/surfaces/point-of-sale/api/locale-api/locale-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", - "name": "LocaleApi", - "description": "The `LocaleApi` object provides access to current locale information and change notifications. Access these properties through `shopify.locale` to retrieve and monitor locale data.", - "isPublicDocs": true, - "members": [ + "name": "orderId", + "value": "number", + "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", + "isOptional": true + }, { - "filePath": "src/surfaces/point-of-sale/api/locale-api/locale-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "locale", - "value": "LocaleApiContent", - "description": "The `LocaleApi` object provides the current locale and locale updates." - } - ], - "value": "export interface LocaleApi {\n locale: LocaleApiContent;\n}" - } - }, - "StaffMember": { - "src/surfaces/point-of-sale/types/session.ts": { - "filePath": "src/surfaces/point-of-sale/types/session.ts", - "name": "StaffMember", - "description": "Defines a staff member in POS.", - "isPublicDocs": true, - "members": [ + "name": "paymentMethods", + "value": "Payment[]", + "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." + }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", - "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The staff member ID." - } - ], - "value": "export interface StaffMember {\n /**\n * The staff member ID.\n */\n id: number;\n}" - } - }, - "Session": { - "src/surfaces/point-of-sale/types/session.ts": { - "filePath": "src/surfaces/point-of-sale/types/session.ts", - "name": "Session", - "description": "Defines information about the current POS session.", - "isPublicDocs": true, - "members": [ + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "currency", - "value": "CurrencyCode", - "description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS." + "name": "refundId", + "value": "number", + "description": "The refund ID. `undefined` when the return did not issue a refund (for example, store-credit-only returns).", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "locationId", + "name": "returnId", "value": "number", - "description": "The location ID associated with the POS device's current location." + "description": "The return ID for the completed return transaction.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "posVersion", - "value": "string", - "description": "The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running." + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "shopDomain", - "value": "string", - "description": "The shop domain associated with the shop currently logged into POS." + "name": "shippingLines", + "value": "ShippingLine[]", + "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "shopId", - "value": "number", - "description": "The shop ID associated with the shop currently logged into POS." + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "staffMemberId", - "value": "number", - "description": "The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.", - "isOptional": true, - "deprecationMessage": "Use `session.staffMember` on the Session API instead." + "name": "subtotal", + "value": "Money", + "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." }, { - "filePath": "src/surfaces/point-of-sale/types/session.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "userId", - "value": "number", - "description": "The user ID associated with the Shopify account currently authenticated on POS." - } - ], - "value": "export interface Session {\n /**\n * The shop ID associated with the shop currently logged into POS.\n */\n shopId: number;\n\n /**\n * The user ID associated with the Shopify account currently authenticated on POS.\n */\n userId: number;\n\n /**\n * The shop domain associated with the shop currently logged into POS.\n */\n shopDomain: string;\n\n /**\n * The location ID associated with the POS device's current location.\n */\n locationId: number;\n\n /**\n * The staff ID of the staff member pinned into POS when the extension started. This may differ from the user ID if the pinned staff member is different from the logged in user.\n *\n * @deprecated Use `session.staffMember` on the Session API instead.\n */\n staffMemberId?: number;\n\n /**\n * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code associated with the location currently active on POS.\n */\n currency: CurrencyCode;\n\n /**\n * The version of [the POS app](https://apps.shopify.com/shopify-pos) currently running.\n */\n posVersion: string;\n}" - } - }, - "CurrencyCode": { - "src/shared.ts": { - "filePath": "src/shared.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "CurrencyCode", - "value": "'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'", - "description": "" - } - }, - "SessionApiContent": { - "src/surfaces/point-of-sale/api/session-api/session-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", - "name": "SessionApiContent", - "description": "The `SessionApi` object provides session details and authentication methods.", - "isPublicDocs": true, - "members": [ + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "currentSession", - "value": "Session", - "description": "Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change." + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "deviceId", - "value": "number", - "description": "The numeric ID of the device running this session.\n\nUse this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.", - "examples": [ - { - "title": "Example", - "description": "", - "tabs": [ - { - "code": "123456", - "title": "Example" - } - ] - } - ] + "name": "taxTotal", + "value": "Money", + "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "getSessionToken", - "value": "() => Promise", - "description": "Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member." + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "staffMember", - "value": "ReadonlySignalLike", - "description": "Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in." - } - ], - "value": "export interface SessionApiContent {\n /**\n * Provides comprehensive information about the current POS session including shop details, user authentication, location data, staff member information, currency settings, and POS version. This data is static for the duration of the session and updates when users switch locations or staff members change.\n */\n currentSession: Session;\n /**\n * Provides read-only access to the staff member currently pinned into POS and allows subscribing to staff member changes. The value is `undefined` when no staff member is pinned in.\n */\n staffMember: ReadonlySignalLike;\n /**\n * Generates a fresh session token for secure communication with your app's backend service. Returns `undefined` when the authenticated user lacks proper app permissions. The token is a Shopify OpenID Connect ID Token that should be used in `Authorization` headers for backend API calls. This is based on the authenticated user, not the pinned staff member.\n */\n getSessionToken: () => Promise;\n /**\n * The numeric ID of the device running this session.\n *\n * Use this to construct a [GID](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) to query device details via GraphQL Admin API.\n *\n * @example 123456\n * @see [Global IDs documentation](/docs/api/usage/gids) for more about GID format and structure\n * @see [device.getDeviceId()](/docs/api/pos-ui-extensions/latest/target-apis/platform-apis/device-api) for physical device identifier (UUID format)\n */\n deviceId: number;\n}" - } - }, - "SessionApi": { - "src/surfaces/point-of-sale/api/session-api/session-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", - "name": "SessionApi", - "description": "The `SessionApi` object provides access to current session information and authentication methods. Access these properties and methods through `shopify.session` to retrieve shop data and generate secure tokens. These methods enable secure API calls while maintaining user privacy and [app permissions](https://help.shopify.com/manual/your-account/users/roles/permissions/store-permissions#apps-and-channels-permissions).", - "isPublicDocs": true, - "members": [ + "name": "tipAmount", + "value": "Money", + "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "isOptional": true + }, { - "filePath": "src/surfaces/point-of-sale/api/session-api/session-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "session", - "value": "SessionApiContent", - "description": "The `SessionApi` object provides session details and authentication methods." - } - ], - "value": "export interface SessionApi {\n session: SessionApiContent;\n}" - } - }, - "ToastApiContent": { - "src/surfaces/point-of-sale/api/toast-api/toast-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", - "name": "ToastApiContent", - "description": "The `ToastApi` object provides methods for showing toast notifications.", - "isPublicDocs": true, - "members": [ + "name": "transactionType", + "value": "'Return'", + "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." + }, { - "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "show", - "value": "(content: string) => void", - "description": "Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow." + "name": "type", + "value": "string", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface ToastApiContent {\n /**\n * Displays a toast notification with the specified text content. The message appears as a temporary overlay that automatically dismisses after the specified duration. Use for providing immediate user feedback, confirming actions, or communicating status updates without interrupting the user's workflow.\n *\n * @param content The text content to display.\n */\n show: (content: string) => void;\n}" + "value": "interface ReturnCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Return';\n /**\n * The refund ID. `undefined` when the return did not issue a refund\n * (for example, store-credit-only returns).\n */\n readonly refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n readonly returnId?: number;\n /**\n * The exchange ID when this return is the gift-card side of an exchange;\n * `undefined` for standalone returns.\n */\n readonly exchangeId?: number;\n /**\n * An array of line items included in the return transaction.\n */\n readonly lineItems: LineItem[];\n}" } }, - "ToastApi": { - "src/surfaces/point-of-sale/api/toast-api/toast-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", - "name": "ToastApi", - "description": "The `ToastApi` object provides methods for displaying temporary notification messages. Access these methods through `shopify.toast` to show user feedback and status updates.", - "isPublicDocs": true, + "ExchangeCompleteEvent": { + "src/surfaces/point-of-sale/events/transaction-complete-event.ts": { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "name": "ExchangeCompleteEvent", + "description": "Dispatched when an exchange transaction completes.", "members": [ { - "filePath": "src/surfaces/point-of-sale/api/toast-api/toast-api.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "toast", - "value": "ToastApiContent", - "description": "The `ToastApi` object provides methods for showing toast notifications." - } - ], - "value": "export interface ToastApi {\n toast: ToastApiContent;\n}" - } - }, - "MultipleResourceResult": { - "src/surfaces/point-of-sale/types/multiple-resource-result.ts": { - "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", - "name": "MultipleResourceResult", - "description": "Represents the result of a bulk resource lookup operation. Contains successfully found resources and identifiers for resources that were not found.", - "isPublicDocs": true, - "members": [ + "name": "AT_TARGET", + "value": "2", + "description": "" + }, { - "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "fetchedResources", - "value": "T[]", - "description": "The resources that were fetched using the IDs provided." + "name": "balanceDue", + "value": "Money", + "description": "The remaining balance still owed on this transaction as a `Money` object. Typically zero for fully paid transactions. A positive balance indicates partial payment or layaway scenarios. A negative balance indicates overpayment, where change should be returned to the customer. Calculated as: grandTotal minus sum of all payment amounts." }, { - "filePath": "src/surfaces/point-of-sale/types/multiple-resource-result.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "idsForResourcesNotFound", - "value": "number[]", - "description": "The IDs for which a resource was not found." - } - ], - "value": "export interface MultipleResourceResult {\n /**\n * The resources that were fetched using the IDs provided.\n */\n fetchedResources: T[];\n /**\n * The IDs for which a resource was not found.\n */\n idsForResourcesNotFound: number[];\n}" - } - }, - "PaginatedResult": { - "src/surfaces/point-of-sale/types/paginated-result.ts": { - "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", - "name": "PaginatedResult", - "description": "Represents the result of a paginated query. Contains the data items, pagination cursors for navigating pages, and information about whether more results exist.", - "isPublicDocs": true, - "members": [ + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" + }, { - "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "hasNextPage", + "name": "cancelable", "value": "boolean", - "description": "Whether or not there is another page of results that can be fetched." + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "items", - "value": "T[]", - "description": "The items returned from the fetch." + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/types/paginated-result.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "lastCursor", - "value": "string", - "description": "The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.", - "isOptional": true - } - ], - "value": "export interface PaginatedResult {\n /**\n * The items returned from the fetch.\n */\n items: T[];\n\n /**\n * The cursor of the last item. This can be used to fetch more results. The format of this cursor may look different depending on if POS is fetching results from the remote API, or its local database. However, that should not affect its usage with the search functions.\n */\n lastCursor?: string;\n\n /**\n * Whether or not there is another page of results that can be fetched.\n */\n hasNextPage: boolean;\n}" - } - }, - "Product": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "name": "Product", - "description": "Represents comprehensive product information including metadata, pricing, variants, and availability. Contains all data needed to display and work with products in the POS interface.", - "isPublicDocs": true, - "members": [ + "name": "CAPTURING_PHASE", + "value": "1", + "description": "" + }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "createdAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing \"new product\" features, or tracking product catalog growth over time." + "name": "cashRoundingAdjustment", + "value": "Money", + "description": "The cash rounding adjustment applied to this transaction as a `Money` object. Returns `undefined` when no cash rounding adjustment was applied.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "description", - "value": "string", - "description": "The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing." + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "descriptionHtml", - "value": "string", - "description": "The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "featuredImage", - "value": "string", - "description": "The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.", - "isOptional": true + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "hasInStockVariants", - "value": "boolean", - "description": "Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.", + "name": "customer", + "value": "Customer", + "description": "The customer information if this transaction is associated with a customer account. Contains the customer ID for linking to customer records. Returns `undefined` for guest transactions where no customer was selected or when the transaction doesn't support customer association.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "hasOnlyDefaultVariant", + "name": "defaultPrevented", "value": "boolean", - "description": "Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products." + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "hasSellingPlanGroups", - "value": "boolean", - "description": "Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.", - "isOptional": true + "name": "discounts", + "value": "Discount[]", + "description": "An array of all discounts applied to this transaction, including cart-level discounts, automatic discounts, and discount codes. Each discount entry contains the discount amount, type, and description. Empty when no discounts were applied. The sum of discount amounts reduces the final transaction total." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "id", + "name": "eventPhase", "value": "number", - "description": "The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations." + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "isGiftCard", - "value": "boolean", - "description": "Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces." + "name": "exchangeId", + "value": "number", + "description": "The exchange ID linking the return and sale sides of the exchange." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "maxVariantPrice", + "name": "executedAt", "value": "string", - "description": "The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants." + "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the transaction was executed and completed (for example, `\"2024-05-15T14:30:00Z\"`). This marks the exact moment the transaction was finalized, payment was processed, and the order was created. Commonly used for transaction history, chronological sorting, reporting, audit trails, and synchronization with external systems." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "minVariantPrice", - "value": "string", - "description": "The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings." + "name": "grandTotal", + "value": "Money", + "description": "The final total amount the customer pays for this transaction as a `Money` object. This includes all line items, shipping charges, taxes, and accounts for all discounts. This is the amount that must be tendered through payment methods. Calculated as: subtotal + taxTotal + shipping - discounts." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "numVariants", - "value": "number", - "description": "The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "onlineStoreUrl", - "value": "string", - "description": "The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.", - "isOptional": true + "name": "isTrusted", + "value": "boolean", + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "options", - "value": "ProductOption[]", - "description": "An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities." + "name": "lineItemsAdded", + "value": "LineItem[]", + "description": "An array of line items added to the customer in the exchange." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "productCategory", - "value": "string", - "description": "The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories." + "name": "lineItemsRemoved", + "value": "LineItem[]", + "description": "An array of line items removed from the customer in the exchange." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "productType", - "value": "string", - "description": "The product type category as defined by the merchant (For example, \"T-Shirt,\" \"Electronics,\" \"Books\"). Use for product categorization, filtering, or implementing category-specific business logic." + "name": "NONE", + "value": "0", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "requiresSellingPlan", - "value": "boolean", - "description": "Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.", + "name": "orderId", + "value": "number", + "description": "The unique numeric identifier for the Shopify order created by this transaction. This ID links the POS transaction to the order record in Shopify's system and can be used for order lookups, tracking, and API operations. Returns `undefined` when order creation is pending.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "tags", - "value": "string[]", - "description": "An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions." + "name": "paymentMethods", + "value": "Payment[]", + "description": "An array of all payment methods used to complete this transaction. Each payment entry specifies the payment type (for example, cash, credit card), amount tendered, and currency. Multiple entries indicate split payments where the customer paid using multiple methods (for example, part cash, part credit card). The sum of all payment amounts should equal or exceed the `grandTotal`." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize." + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "totalAvailableInventory", + "name": "returnId", "value": "number", - "description": "The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.", + "description": "The return-side ID. `undefined` when the exchange has no return side.", "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "totalInventory", - "value": "number", - "description": "The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts." + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "tracksInventory", - "value": "boolean", - "description": "Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic." + "name": "shippingLines", + "value": "ShippingLine[]", + "description": "An array of shipping charges applied to this transaction. Each shipping line represents a shipping method with its price and associated taxes. Multiple entries can exist when different shipping methods apply to different items or when combining shipping with pickup. Empty for transactions with no shipping charges (for example, in-store purchases, digital products)." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "subtotal", + "value": "Money", + "description": "The subtotal amount before taxes and after discounts are applied, as a `Money` object. This represents the sum of all line item prices (quantity × unit price) minus any discounts, but before tax is added. This is the taxable base amount for most tax calculations." + }, + { + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", + "syntaxKind": "PropertySignature", + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "updatedAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features." + "name": "taxLines", + "value": "TaxLine[]", + "description": "An array of individual tax lines showing the detailed tax breakdown by jurisdiction and tax type. Each tax line represents a specific tax (for example, state tax, federal tax, VAT, GST) with its rate and calculated amount. Multiple tax lines can apply to a single transaction based on location, product taxability, and tax rules. Empty for tax-exempt transactions or when detailed tax breakdown isn't available." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "variants", - "value": "ProductVariant[]", - "description": "An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality." + "name": "taxTotal", + "value": "Money", + "description": "The total tax amount charged on this transaction as a `Money` object. This is the sum of all tax lines and represents the combined tax from all applicable tax jurisdictions and rules. Tax calculations are based on the location, products, customer, and tax settings configured in Shopify." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "vendor", - "value": "string", - "description": "The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier." - } - ], - "value": "export interface Product {\n /**\n * The unique identifier for the product. Use this ID for product-specific operations, API calls, or linking to product details. This ID is consistent across all Shopify systems and can be used for external integrations.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was created. Use for sorting products by creation date, implementing \"new product\" features, or tracking product catalog growth over time.\n */\n createdAt: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features.\n */\n updatedAt: string;\n /**\n * The product's display name as configured by the merchant. Use for product listings, search results, and customer-facing displays. This is the primary product identifier that customers will recognize.\n */\n title: string;\n /**\n * The product's plain text description without HTML formatting. Use for displaying product information in contexts where HTML is not supported or when you need clean text content for processing.\n */\n description: string;\n /**\n * The product's description with HTML formatting preserved. Use when you need to display rich text content with formatting, links, or other HTML elements in your extension interface.\n */\n descriptionHtml: string;\n /**\n * The URL of the product's featured image, if one is set. Returns `undefined` if no featured image is configured. Use for displaying product images in search results, product listings, or detailed product views.\n */\n featuredImage?: string;\n /**\n * Whether this product is a gift card. Gift cards have special handling requirements and different business logic. Use to implement gift card-specific workflows, validation, or display special gift card interfaces.\n */\n isGiftCard: boolean;\n /**\n * Whether inventory tracking is enabled for this product. When `false`, inventory quantities may not be accurate or meaningful. Use to determine whether to display inventory information or implement inventory-based business logic.\n */\n tracksInventory: boolean;\n /**\n * The product's vendor or brand name as configured by the merchant. Use for filtering products by brand, displaying vendor information, or organizing products by supplier.\n */\n vendor: string;\n /**\n * The lowest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing starting prices in product listings.\n */\n minVariantPrice: string;\n /**\n * The highest price among all product variants, formatted as a string. Use for displaying price ranges, implementing price-based filtering, or showing complete pricing information for products with multiple variants.\n */\n maxVariantPrice: string;\n /**\n * The product type category as defined by the merchant (For example, \"T-Shirt,\" \"Electronics,\" \"Books\"). Use for product categorization, filtering, or implementing category-specific business logic.\n */\n productType: string;\n /**\n * The standardized product category classification. Use for product categorization, implementing category-specific business logic, or organizing products by standardized categories.\n */\n productCategory: string;\n /**\n * An array of tags associated with the product for categorization and organization. Use for product filtering, search enhancement, or implementing tag-based business logic and promotions.\n */\n tags: string[];\n /**\n * The total number of variants available for this product. Use to determine whether to show variant selection interfaces, implement variant-specific logic, or optimize variant loading strategies.\n */\n numVariants: number;\n /**\n * The total available inventory across all variants and locations, if tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for availability checks, stock level displays, or implementing low-stock alerts.\n */\n totalAvailableInventory?: number;\n /**\n * The total inventory count across all variants and locations for this product. Use for inventory management, stock level displays, or implementing low-stock warnings and alerts.\n */\n totalInventory: number;\n /**\n * An array of all product variants associated with this product. Each variant contains detailed information including pricing, inventory, and options. Use for building variant selectors, displaying inventory information, or implementing variant-specific functionality.\n */\n variants: ProductVariant[];\n /**\n * An array of product options that define available variant configurations. For example, size and color. Each option includes available values. Use for building variant selection interfaces or understanding product configuration possibilities.\n */\n options: ProductOption[];\n /**\n * Whether the product has only a default variant (no custom options). When `true`, the product doesn't require variant selection. Use to simplify product interfaces and skip variant selection steps for single-variant products.\n */\n hasOnlyDefaultVariant: boolean;\n /**\n * Whether the product has any variants currently in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability filtering, or implementing out-of-stock product handling.\n */\n hasInStockVariants?: boolean;\n /**\n * The URL of the product on the online store, if available. Returns `undefined` when the product is not published online or the store doesn't have an online presence. Use for linking to online product pages or sharing product information.\n */\n onlineStoreUrl?: string;\n /**\n * Indicates whether this product or line item requires a selling plan (subscription) to be purchased. When `true`, the customer must select a subscription or payment plan before adding to cart. When `false`, the item can be purchased as a one-time purchase without a selling plan.\n */\n requiresSellingPlan?: boolean;\n /**\n * Indicates whether this product or line item has selling plan groups (subscription options) available. When `true`, the product offers subscription or recurring payment options that customers can select. When `false`, the product is only available for one-time purchase without subscription options.\n */\n hasSellingPlanGroups?: boolean;\n}" - } - }, - "ProductOption": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "name": "ProductOption", - "description": "Represents a product option definition showing one of the configurable attributes for a product (like Size, Color, Material) along with all the possible values customers can choose from. Products can have up to 3 options.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems." + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type." + "name": "tipAmount", + "value": "Money", + "description": "The tip amount added to this transaction as a `Money` object. This represents the gratuity the customer chose to add on top of the grand total, typically for service-based businesses or hospitality transactions. Tipping can be enabled through POS settings and may be added as a percentage or fixed amount. Returns `undefined` when no tip was added or when tipping is not enabled for the transaction.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "optionValues", - "value": "string[]", - "description": "An array of all available values for this option that customers can choose from (for example, `[\"Small\", \"Medium\", \"Large\", \"X-Large\"]` for a Size option, or `[\"Red\", \"Blue\", \"Green\", \"Black\"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute." + "name": "transactionType", + "value": "'Exchange'", + "description": "The transaction type identifier indicating which kind of transaction was completed (for example, `'Sale'` for new purchases, `'Return'` for refunds, `'Exchange'` for item swaps). Narrow on this field to access transaction-type-specific properties." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/transaction-complete-event.ts", "syntaxKind": "PropertySignature", - "name": "productId", - "value": "number", - "description": "The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management." + "name": "type", + "value": "string", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface ProductOption {\n /**\n * The unique numeric identifier for this product option configuration. This ID identifies the option definition itself (not a specific option value or variant). Commonly used for option-specific operations, tracking option configurations, or linking options in external systems.\n */\n id: number;\n /**\n * The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type.\n */\n name: string;\n /**\n * An array of all available values for this option that customers can choose from (for example, `[\"Small\", \"Medium\", \"Large\", \"X-Large\"]` for a Size option, or `[\"Red\", \"Blue\", \"Green\", \"Black\"]` for a Color option). The order of values in this array typically represents the display order in variant selectors. Each combination of option values across all options creates a unique variant. For example, a product with Size: [Small, Large] and Color: [Red, Blue] would have 4 variants (Small/Red, Small/Blue, Large/Red, Large/Blue). Commonly used for building variant selection dropdowns, radio buttons, or swatches, validating user selections, or displaying all available choices for an attribute.\n */\n optionValues: string[];\n /**\n * The unique numeric identifier of the parent product to which this option belongs. This links the option definition back to the product it configures. Commonly used for linking options to their parent product, organizing options by product, or implementing product-level option management.\n */\n productId: number;\n}" + "value": "interface ExchangeCompleteEvent extends BaseTransactionCompleteEvent {\n readonly transactionType: 'Exchange';\n /**\n * The exchange ID linking the return and sale sides of the exchange.\n */\n readonly exchangeId: number;\n /**\n * The return-side ID. `undefined` when the exchange has no return side.\n */\n readonly returnId?: number;\n /**\n * An array of line items added to the customer in the exchange.\n */\n readonly lineItemsAdded: LineItem[];\n /**\n * An array of line items removed from the customer in the exchange.\n */\n readonly lineItemsRemoved: LineItem[];\n}" } }, - "ProductVariant": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "name": "ProductVariant", - "description": "Represents a specific variant of a product with its own SKU, price, and inventory. Contains variant-specific attributes including options, availability, and identification data.", + "CashTrackingSessionStartEvent": { + "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts": { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "name": "CashTrackingSessionStartEvent", + "description": "Dispatched when a cash tracking session is opened.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "barcode", - "value": "string", - "description": "The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.", - "isOptional": true + "name": "AT_TARGET", + "value": "2", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "compareAtPrice", - "value": "string", - "description": "The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.", - "isOptional": true + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "createdAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing \"new product\" features, or tracking product catalog changes over time." + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "displayName", - "value": "string", - "description": "The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays." + "name": "cancelable", + "value": "boolean", + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "hasInStockVariants", + "name": "cancelBubble", "value": "boolean", - "description": "Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.", - "isOptional": true + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "id", - "value": "number", - "description": "The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems." + "name": "CAPTURING_PHASE", + "value": "1", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "image", - "value": "string", - "description": "The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.", - "isOptional": true + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "inventoryAtAllLocations", - "value": "number", - "description": "The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.", - "isOptional": true + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "inventoryAtLocation", - "value": "number", - "description": "The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.", - "isOptional": true + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "inventoryIsTracked", + "name": "defaultPrevented", "value": "boolean", - "description": "Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant." - }, - { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "inventoryPolicy", - "value": "ProductVariantInventoryPolicy", - "description": "The inventory policy for this variant, either \"DENY\" (prevent sales when out of stock) or \"CONTINUE\" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items." + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "options", - "value": "ProductVariantOption[]", - "description": "An array of option name-value pairs that define this variant's configuration. For example, `[{name: \"Size,\" value: \"Large\"}, {name: \"Color,\" value: \"Blue\"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.", - "isOptional": true + "name": "eventPhase", + "value": "number", + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "position", + "name": "id", "value": "number", - "description": "The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic." + "description": "The numeric identifier for the cash tracking session." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "PropertySignature", - "name": "price", - "value": "string", - "description": "The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "product", - "value": "Product", - "description": "Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.", - "isOptional": true + "name": "isTrusted", + "value": "boolean", + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "productId", - "value": "number", - "description": "The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product." + "name": "NONE", + "value": "0", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "sku", + "name": "openingTime", "value": "string", - "description": "The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.", - "isOptional": true + "description": "ISO 8601 timestamp when the session was opened." }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "taxable", + "name": "returnValue", "value": "boolean", - "description": "Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling." + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The variant's display title, typically showing the option combinations. For example, `\"Large / Blue\"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants." + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "updatedAt", - "value": "string", - "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features." - } - ], - "value": "export interface ProductVariant {\n /**\n * The unique identifier for the product variant. Use this ID for variant-specific operations, cart additions, or inventory lookups. This ID is consistent across all Shopify systems.\n */\n id: number;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was created. Use for sorting variants by creation date, implementing \"new product\" features, or tracking product catalog changes over time.\n */\n createdAt: string;\n /**\n * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the product variant was last updated. Use for cache invalidation, tracking recent changes, or implementing \"recently updated\" product features.\n */\n updatedAt: string;\n /**\n * The variant's display title, typically showing the option combinations. For example, `\"Large / Blue\"`. Use for variant selection interfaces, cart displays, or anywhere users need to distinguish between variants.\n */\n title: string;\n /**\n * The variant's selling price formatted as a string. Use for price displays, cart calculations, or implementing pricing logic. This represents the current selling price for the variant.\n */\n price: string;\n /**\n * The variant's compare-at price (original or MSRP price) formatted as a string, if set. Returns `undefined` when no compare-at price is configured. Use for displaying discounts, sale pricing, or savings calculations.\n */\n compareAtPrice?: string;\n /**\n * Whether this variant is subject to tax calculations. Use for tax computation logic, pricing displays, or implementing tax-exempt product handling.\n */\n taxable: boolean;\n /**\n * The variant's Stock Keeping Unit (SKU) identifier, if configured. Returns `undefined` when no SKU is set. Use for inventory management, product identification, or integration with external systems that use SKU-based tracking.\n */\n sku?: string;\n /**\n * The variant's barcode identifier, if configured. Returns `undefined` when no barcode is set. Use for barcode scanning functionality, inventory tracking, or integration with barcode-based systems.\n */\n barcode?: string;\n /**\n * The variant's formatted display name for user interfaces. This may differ from the title and is optimized for display purposes. Use for customer-facing variant names in product listings, cart items, or receipt displays.\n */\n displayName: string;\n /**\n * The URL of the variant-specific image, if one is configured. Returns `undefined` when no variant image is set. Use for displaying variant-specific images in selection interfaces or product galleries.\n */\n image?: string;\n /**\n * Whether inventory tracking is enabled for this specific variant. When `false`, inventory quantities may not be accurate. Use to determine whether to display inventory information or implement inventory-based business logic for this variant.\n */\n inventoryIsTracked: boolean;\n /**\n * The inventory quantity available at the current POS location, if inventory tracking is enabled. Returns `undefined` when inventory tracking is disabled. Use for location-specific inventory displays, stock availability checks, or local inventory management.\n */\n inventoryAtLocation?: number;\n /**\n * The total inventory quantity across all locations for this variant, if available. Returns `undefined` when this information is not available. Use for comprehensive inventory views, transfer planning, or multi-location inventory management.\n */\n inventoryAtAllLocations?: number;\n /**\n * The inventory policy for this variant, either \"DENY\" (prevent sales when out of stock) or \"CONTINUE\" (allow sales when out of stock). Use to implement inventory validation logic and determine whether to allow purchases of out-of-stock items.\n */\n inventoryPolicy: ProductVariantInventoryPolicy;\n /**\n * Whether this variant currently has inventory in stock. Returns `undefined` when inventory information is not available. Use for stock status displays, availability checks, or filtering in-stock variants.\n */\n hasInStockVariants?: boolean;\n /**\n * An array of option name-value pairs that define this variant's configuration. For example, `[{name: \"Size,\" value: \"Large\"}, {name: \"Color,\" value: \"Blue\"}]`. Returns `undefined` for products with only default variants. Use for displaying variant options, building variant selectors, or implementing variant-based logic.\n */\n options?: ProductVariantOption[];\n /**\n * Reference to the parent Product object that this variant belongs to. Returns `undefined` in some contexts to avoid circular references. Use when you need access to product-level information from a variant context.\n */\n product?: Product;\n /**\n * The ID of the parent product that this variant belongs to. Use for linking variants back to their parent product, implementing product-level operations, or organizing variants by product.\n */\n productId: number;\n /**\n * The variant's position order within the product's variant list. Use for maintaining consistent variant ordering in selection interfaces or implementing custom variant sorting logic.\n */\n position: number;\n}" - } - }, - "ProductVariantInventoryPolicy": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ProductVariantInventoryPolicy", - "value": "'DENY' | 'CONTINUE'", - "description": "The inventory policy determining whether sales can continue when a variant has no inventory available:\n- `'DENY'`: Sales are prevented when inventory reaches zero. Customers can't purchase out-of-stock variants. The \"Add to cart\" action is disabled or shows \"Out of stock\". This is the default and recommended policy for most physical products to prevent overselling.\n- `'CONTINUE'`: Sales are allowed even when inventory is zero or negative. Customers can purchase out-of-stock variants, creating backorders. This enables pre-orders, made-to-order products, or drop-shipped items where inventory tracking is less critical.", - "isPublicDocs": true - } - }, - "ProductVariantOption": { - "src/surfaces/point-of-sale/types/product.ts": { - "filePath": "src/surfaces/point-of-sale/types/product.ts", - "name": "ProductVariantOption", - "description": "Represents a single option selection for a product variant, showing one chosen value from a product's configuration options. For example, if a product has Size and Color options, a variant might have one option for Size=Large and another for Color=Blue.", - "isPublicDocs": true, - "members": [ + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type." + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" }, { - "filePath": "src/surfaces/point-of-sale/types/product.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "value", + "name": "type", "value": "string", - "description": "The selected value for this option that defines this specific variant (for example, \"Large\", \"Blue\", \"Cotton\", \"V-Neck\"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is \"Size\", the `value` might be \"Large\" or \"Small\". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration (\"Size: Large, Color: Blue\"), building variant selection dropdowns, or matching user selections to variants." + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface ProductVariantOption {\n /**\n * The option category name (for example, \"Size\", \"Color\", \"Material\", \"Style\", \"Flavor\"). This is the attribute or dimension along which the product varies. Each product can have up to 3 option names, and each option name can have multiple values. The name is visible to customers in variant selection interfaces. Commonly used for displaying option labels in variant selectors (\"Select Size:\", \"Choose Color:\"), building dynamic product configuration UI, or organizing product variations by attribute type.\n */\n name: string;\n /**\n * The selected value for this option that defines this specific variant (for example, \"Large\", \"Blue\", \"Cotton\", \"V-Neck\"). This is the specific choice from the available option values that characterizes this variant. For example, if `name` is \"Size\", the `value` might be \"Large\" or \"Small\". Values are set at the variant level—each variant has a unique combination of option values. Commonly used for displaying the variant's configuration (\"Size: Large, Color: Blue\"), building variant selection dropdowns, or matching user selections to variants.\n */\n value: string;\n}" - } - }, - "ProductSortType": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ProductSortType", - "value": "'RECENTLY_ADDED' | 'RECENTLY_ADDED_ASCENDING' | 'ALPHABETICAL_A_TO_Z' | 'ALPHABETICAL_Z_TO_A'", - "description": "", - "isPublicDocs": true + "value": "export interface CashTrackingSessionStartEvent\n extends CashTrackingSessionEvent {}" } }, - "PaginationParams": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "name": "PaginationParams", - "description": "Specifies parameters for cursor-based pagination. Includes the cursor position and the number of results to retrieve per page.", + "CashTrackingSessionCompleteEvent": { + "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts": { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "name": "CashTrackingSessionCompleteEvent", + "description": "Dispatched when a cash tracking session is successfully closed via reconciliation.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "afterCursor", - "value": "string", - "description": "Specifies the page cursor. Items after this cursor will be returned.", - "isOptional": true + "name": "AT_TARGET", + "value": "2", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "PropertySignature", - "name": "first", - "value": "number", - "description": "Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.", - "isOptional": true - } - ], - "value": "export interface PaginationParams {\n /**\n * Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.\n */\n first?: number;\n /**\n * Specifies the page cursor. Items after this cursor will be returned.\n */\n afterCursor?: string;\n}" - } - }, - "ProductSearchParams": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "name": "ProductSearchParams", - "description": "Specifies the parameters for searching products. Includes query text, pagination options, and sorting preferences for product search operations.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "afterCursor", - "value": "string", - "description": "Specifies the page cursor. Items after this cursor will be returned.", - "isOptional": true + "name": "bubbles", + "value": "boolean", + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "first", - "value": "number", - "description": "Specifies the number of results to be returned in this page. The maximum number of items that will be returned is 50.", - "isOptional": true + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "queryString", - "value": "string", - "description": "The search term to be used to search for POS products.", - "isOptional": true + "name": "cancelable", + "value": "boolean", + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "sortType", - "value": "ProductSortType", - "description": "Specifies the order in which products should be sorted. When a `queryString` is provided, sortType will not have any effect, as the results will be returned in order by relevance to the `queryString`.", - "isOptional": true - } - ], - "value": "export interface ProductSearchParams extends PaginationParams {\n /**\n * The search term to be used to search for POS products.\n */\n queryString?: string;\n /**\n * Specifies the order in which products should be sorted. When a `queryString` is provided, sortType will not have any effect, as the results will be returned in order by relevance to the `queryString`.\n */\n sortType?: ProductSortType;\n}" - } - }, - "ProductSearchApiContent": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "name": "ProductSearchApiContent", - "description": "The `ProductSearchApi` object provides product search and lookup methods.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchPaginatedProductVariantsWithProductId", - "value": "(productId: number, paginationParams: PaginationParams) => Promise>", - "description": "Retrieves product variants for a specific product with pagination support. Use when a product has many variants and you need to load them incrementally for better performance. Ideal for products with extensive variant collections that would be too large to load at once." + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchProductsWithIds", - "value": "(productIds: number[]) => Promise>", - "description": "Retrieves detailed information for multiple products by their IDs. Limited to 50 products maximum—additional IDs are automatically removed. Returns results with both found and not found products clearly identified. Use for bulk product lookups, building product collections, or validating product lists." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "CAPTURING_PHASE", + "value": "1", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchProductVariantsWithIds", - "value": "(productVariantIds: number[]) => Promise>", - "description": "Retrieves detailed information for multiple product variants by their IDs. Limited to 50 variants maximum—additional IDs are automatically removed. Returns results with both found and not found variants clearly identified. Use for bulk variant lookups or building variant-specific collections." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "closingTime", + "value": "string", + "description": "ISO 8601 timestamp when the session was closed." }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchProductVariantsWithProductId", - "value": "(productId: number) => Promise", - "description": "Retrieves all product variants associated with a specific product ID. Returns all variants at once without pagination. Use for displaying complete variant options, building variant selectors, or analyzing all available configurations for a product." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "MethodSignature", - "name": "fetchProductVariantWithId", - "value": "(productVariantId: number) => Promise", - "description": "Retrieves detailed information for a single product variant by its ID. Returns `undefined` if the variant doesn't exist or isn't available. Use for displaying variant-specific details like pricing, inventory, or options when working with specific product configurations." + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "fetchProductWithId", - "value": "(productId: number) => Promise", - "description": "Retrieves detailed information for a single product by its ID. Returns `undefined` if the product doesn't exist or isn't available on the POS device. Use for displaying product details, validating product availability, or building product-specific workflows." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "syntaxKind": "MethodSignature", - "name": "searchProducts", - "value": "(searchParams: ProductSearchParams) => Promise>", - "description": "Searches for products on the POS device using text queries and sorting options. Returns paginated results with up to 50 products per page. When a query string is provided, results are sorted by relevance. Use for implementing custom search interfaces, product discovery features, or filtered product listings." - } - ], - "value": "export interface ProductSearchApiContent {\n /**\n * Searches for products on the POS device using text queries and sorting options. Returns paginated results with up to 50 products per page. When a query string is provided, results are sorted by relevance. Use for implementing custom search interfaces, product discovery features, or filtered product listings.\n *\n * @param searchParams The parameters for the product search.\n */\n searchProducts(\n searchParams: ProductSearchParams,\n ): Promise>;\n\n /**\n * Retrieves detailed information for a single product by its ID. Returns `undefined` if the product doesn't exist or isn't available on the POS device. Use for displaying product details, validating product availability, or building product-specific workflows.\n *\n * @param productId The ID of the product to lookup.\n */\n fetchProductWithId(productId: number): Promise;\n\n /**\n * Retrieves detailed information for multiple products by their IDs. Limited to 50 products maximum—additional IDs are automatically removed. Returns results with both found and not found products clearly identified. Use for bulk product lookups, building product collections, or validating product lists.\n *\n * @param productIds Specifies the array of product IDs to lookup. This is limited to 50 products. All excess requested IDs will be removed from the array.\n */\n fetchProductsWithIds(\n productIds: number[],\n ): Promise>;\n\n /**\n * Retrieves detailed information for a single product variant by its ID. Returns `undefined` if the variant doesn't exist or isn't available. Use for displaying variant-specific details like pricing, inventory, or options when working with specific product configurations.\n *\n * @param productVariantId The ID of the product variant to lookup.\n */\n fetchProductVariantWithId(\n productVariantId: number,\n ): Promise;\n\n /**\n * Retrieves detailed information for multiple product variants by their IDs. Limited to 50 variants maximum—additional IDs are automatically removed. Returns results with both found and not found variants clearly identified. Use for bulk variant lookups or building variant-specific collections.\n *\n * @param productVariantIds Specifies the array of product variant IDs to lookup. This is limited to 50 product variants. All excess requested IDs will be removed from the array.\n */\n fetchProductVariantsWithIds(\n productVariantIds: number[],\n ): Promise>;\n\n /**\n * Retrieves all product variants associated with a specific product ID. Returns all variants at once without pagination. Use for displaying complete variant options, building variant selectors, or analyzing all available configurations for a product.\n *\n * @param productId The product ID. All variants' details associated with this product ID are returned.\n */\n fetchProductVariantsWithProductId(\n productId: number,\n ): Promise;\n\n /**\n * Retrieves product variants for a specific product with pagination support. Use when a product has many variants and you need to load them incrementally for better performance. Ideal for products with extensive variant collections that would be too large to load at once.\n *\n * @param paginationParams The parameters for pagination.\n */\n fetchPaginatedProductVariantsWithProductId(\n productId: number,\n paginationParams: PaginationParams,\n ): Promise>;\n}" - } - }, - "ProductSearchApi": { - "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", - "name": "ProductSearchApi", - "description": "The `ProductSearchApi` object provides methods for searching and retrieving product information. Access these methods through `shopify.productSearch` to search products and fetch detailed product data.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/api/product-search-api/product-search-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "productSearch", - "value": "ProductSearchApiContent", - "description": "The `ProductSearchApi` object provides product search and lookup methods." - } - ], - "value": "export interface ProductSearchApi {\n productSearch: ProductSearchApiContent;\n}" - } - }, - "PrintApiContent": { - "src/surfaces/point-of-sale/api/print-api/print-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", - "name": "PrintApiContent", - "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", - "syntaxKind": "MethodSignature", - "name": "print", - "value": "(src: string) => Promise", - "description": "Triggers a print dialog for the specified document source. The `print()` method accepts either:\n\n• A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n\n• A full URL to your app's backend that will be used to return the document to print\n\nReturns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports." - } - ], - "value": "export interface PrintApiContent {\n /**\n * Triggers a print dialog for the specified document source. The `print()` method accepts either:\n *\n * • A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n *\n * • A full URL to your app's backend that will be used to return the document to print\n *\n * Returns a promise that resolves when content is ready and the native print dialog appears. Use for printing custom documents, receipts, labels, or reports.\n *\n * @param src the source URL of the content to print.\n * @returns Promise that resolves when content is ready and native print dialog appears.\n */\n print(src: string): Promise;\n}" - } - }, - "PrintApi": { - "src/surfaces/point-of-sale/api/print-api/print-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", - "name": "PrintApi", - "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.", - "isPublicDocs": true, - "members": [ + "name": "defaultPrevented", + "value": "boolean", + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" + }, { - "filePath": "src/surfaces/point-of-sale/api/print-api/print-api.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "print", - "value": "PrintApiContent", - "description": "The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types." - } - ], - "value": "export interface PrintApi {\n /**\n * The `PrintApi` object provides methods for triggering document printing. Access these methods through `shopify.print` to initiate print operations with various document types.\n */\n print: PrintApiContent;\n}" - } - }, - "StorageError": { - "src/surfaces/point-of-sale/types/storage.ts": { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "name": "StorageError", - "description": "", - "isPublicDocs": true, - "members": [ + "name": "eventPhase", + "value": "number", + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "PropertyDeclaration", - "name": "name", - "value": "string", - "description": "" + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "number", + "description": "The numeric identifier for the cash tracking session." }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "Parameter", - "name": "code", - "value": "\"RecordsCount\" | \"RecordSize\" | \"KeyType\" | \"KeySize\"", - "description": "" + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "message", - "value": "string", + "name": "isTrusted", + "value": "boolean", + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "NONE", + "value": "0", "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "stack", + "name": "openingTime", "value": "string", - "description": "", - "isOptional": true - } - ], - "value": "export class StorageError extends Error {\n public name = 'StorageError';\n constructor(\n public code: 'RecordsCount' | 'RecordSize' | 'KeyType' | 'KeySize',\n message: string,\n ) {\n super(message);\n }\n}" - } - }, - "Storage": { - "src/surfaces/point-of-sale/types/storage.ts": { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "name": "Storage", - "description": "Defines the storage interface for persisting extension data across sessions.", - "isPublicDocs": true, - "members": [ + "description": "ISO 8601 timestamp when the session was opened." + }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "PropertySignature", - "name": "clear", - "value": "() => Promise", - "description": "Clears all data from storage, removing all key-value pairs." + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "MethodSignature", - "name": "delete", - "value": "(key: Keys) => Promise", - "description": "Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "MethodSignature", - "name": "entries", - "value": "() => Promise<[Keys, StorageTypes[Keys]][]>", - "description": "Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data." + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", "syntaxKind": "MethodSignature", - "name": "get", - "value": "(key: Keys) => Promise", - "description": "Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets." + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" }, { - "filePath": "src/surfaces/point-of-sale/types/storage.ts", - "syntaxKind": "MethodSignature", - "name": "set", - "value": "(key: Keys, value: StorageTypes[Keys]) => Promise", - "description": "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." + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" + }, + { + "filePath": "src/surfaces/point-of-sale/events/cash-tracking-session-events.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "string", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface Storage<\n BaseStorageTypes extends Record = Record,\n> {\n /**\n * 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.\n *\n * @param key - The key to set the value for.\n * @param value - The value to set for the key.\n * @throws StorageError when:\n * - Maximum number of records is exceeded (`code: 'RecordsCount'`)\n * - Individual record size exceeds the limit (`code: 'RecordSize'`)\n * - Key is not a string (`code: 'KeyType'`)\n * - Key size exceeds the limit (`code: 'KeySize'`)\n */\n set<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n value: StorageTypes[Keys],\n ): Promise;\n\n /**\n * Retrieves the value associated with a key, returning `undefined` if the key doesn't exist. Always handle the `undefined` case by providing fallback values or conditional logic. Commonly used for loading user preferences, retrieving cached data, or accessing contextual information passed between extension targets.\n *\n * @param key - The key to get the value for.\n * @returns The value of the key.\n * @throws StorageError when the key isn't a string or exceeds its allotted size.\n */\n get<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n ): Promise;\n\n /**\n * Clears all data from storage, removing all key-value pairs.\n */\n clear: () => Promise;\n\n /**\n * Deletes a specific key from storage and returns `true` if the key existed, `false` if it didn't exist. Returns `false` for non-existent keys rather than throwing an error. Commonly used for cleaning up temporary workflow data, removing expired cache entries, or handling user preference changes.\n *\n * @param key - The key to delete.\n */\n delete<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(\n key: Keys,\n ): Promise;\n\n /**\n * Retrieves all stored key-value pairs as an array of tuples, preserving original data types. Returns all data at once which may impact memory usage with large datasets. Commonly used for debugging storage contents, implementing data export features, or performing bulk operations across stored data.\n *\n * @returns An array containing all the keys and values in the storage.\n */\n entries<\n StorageTypes extends BaseStorageTypes = BaseStorageTypes,\n Keys extends keyof StorageTypes = keyof StorageTypes,\n >(): Promise<[Keys, StorageTypes[Keys]][]>;\n}" + "value": "export interface CashTrackingSessionCompleteEvent\n extends CashTrackingSessionEvent {\n /** ISO 8601 timestamp when the session was closed. */\n readonly closingTime: string;\n}" } }, - "StorageApi": { - "src/surfaces/point-of-sale/api/storage-api/storage-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/storage-api/storage-api.ts", - "name": "StorageApi", - "description": "The `StorageApi` object provides access to persistent local storage methods for your POS UI extension. Access these methods through `shopify.storage` to store, retrieve, and manage data that persists across sessions.", + "ShopifyEventMap": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ShopifyEventMap", + "description": "Maps Shopify POS event names to their corresponding `Event` subclass types.\n\nUsed as the generic type parameter for `shopify.addEventListener` and `shopify.removeEventListener`.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/storage-api/storage-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "storage", - "value": "Storage", + "name": "cashtrackingsessioncomplete", + "value": "CashTrackingSessionCompleteEvent", "description": "" - } - ], - "value": "export interface StorageApi {\n storage: Storage;\n}" - } - }, - "PinPadResult": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "name": "PinPadResult", - "description": "Represents the result of a PIN pad interaction, indicating whether PIN entry was completed and providing the entered PIN if available.", - "isPublicDocs": true, - "members": [ + }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "completed", - "value": "boolean", - "description": "Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal." + "name": "cashtrackingsessionstart", + "value": "CashTrackingSessionStartEvent", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "pin", - "value": "number[]", - "description": "The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN \"1234\"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.", - "isOptional": true + "name": "transactioncomplete", + "value": "TransactionCompleteEvent", + "description": "Dispatched when a sale, return, or exchange transaction completes.\n\nNarrow on `transactionType` to access per-type fields." } ], - "value": "export interface PinPadResult {\n /**\n * Whether the PIN entry was completed successfully. When `true`, the user entered a PIN and submitted it (or it was auto-submitted). When `false`, the user canceled the PIN pad modal without completing entry, typically by clicking a cancel button or dismissing the modal.\n */\n completed: boolean;\n /**\n * The entered PIN as an array of individual digits (for example, `[1, 2, 3, 4]` for PIN \"1234\"). Each element is a number from 0-9. This array's length will be between `minPinLength` and `maxPinLength` inclusive. Only present when `completed` is `true`—when `completed` is `false`, this field is `undefined` since no PIN was entered.\n */\n pin?: number[];\n}" - } - }, - "PinValidationResult": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "PinValidationResult", - "value": "{result: 'accept'} | {result: 'reject'; errorMessage?: string}", - "description": "Represents the validation outcome for an entered PIN. Indicates whether the PIN should be accepted or rejected, with optional error messaging for rejected PINs.", - "isPublicDocs": true - } - }, - "PinLength": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "PinLength", - "value": "4 | 5 | 6 | 7 | 8 | 9 | 10", - "description": "The valid PIN length values (4-10 digits). Commonly used to configure minimum and maximum PIN length requirements.", - "isPublicDocs": true + "value": "export interface ShopifyEventMap {\n [POS_EVENT_NAMES.TRANSACTION_COMPLETE]: TransactionCompleteEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;\n}" } }, - "PinPadActionType": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "name": "PinPadActionType", - "description": "Defines a custom action button for the PIN pad interface with a label and click handler.", + "ShopifyInterceptMap": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ShopifyInterceptMap", + "description": "Maps POS interceptable workflow names to their corresponding `Event` types.\n\nUsed as the generic type parameter for `shopify.intercept`.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "syntaxKind": "PropertySignature", - "name": "label", - "value": "string", - "description": "The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for." - }, - { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "onClick", - "value": "() => number[] | Promise", - "description": "Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows." + "name": "beforecheckout", + "value": "BeforeCheckoutEvent", + "description": "Dispatched when staff attempts to leave the active cart for checkout." } ], - "value": "export interface PinPadActionType {\n /**\n * The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.\n */\n label: string;\n /**\n * Called when the action button is clicked. Can return the PIN digits directly as an array of numbers, or return a Promise that resolves to the PIN array. Use for implementing custom PIN retrieval logic or validation workflows.\n */\n onClick: () => Promise | number[];\n}" + "value": "export interface ShopifyInterceptMap {\n [POS_INTERCEPT_NAMES.BEFORE_CHECKOUT]: BeforeCheckoutEvent;\n}" } }, - "PinPadOptions": { - "src/surfaces/point-of-sale/types/pin-pad.ts": { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", - "name": "PinPadOptions", - "description": "Specifies configuration options for displaying the PIN pad interface. Includes callback functions for PIN entry events, dismissal handling, and customizable labels and messaging.", + "BeforeCheckoutEvent": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "BeforeCheckoutEvent", + "description": "Dispatched when staff attempts to leave the active cart for checkout.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "AT_TARGET", + "value": "2", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "autoSubmit", + "name": "bubbles", "value": "boolean", - "description": "Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.", - "isOptional": true, - "defaultValue": "false" + "description": "The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "label", - "value": "string", - "description": "The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.", - "isOptional": true + "name": "BUBBLING_PHASE", + "value": "3", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "masked", + "name": "cancelable", "value": "boolean", - "description": "Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.", - "isOptional": true, - "defaultValue": "true" + "description": "The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "maxPinLength", - "value": "PinLength", - "description": "The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.", - "isOptional": true, - "defaultValue": "6" + "name": "cancelBubble", + "value": "boolean", + "description": "The **`cancelBubble`** property of the Event interface is deprecated.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "minPinLength", - "value": "PinLength", - "description": "The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.", - "isOptional": true, - "defaultValue": "4" + "name": "CAPTURING_PHASE", + "value": "1", + "description": "" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "onDismissed", - "value": "(result: PinPadResult) => void", - "description": "The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.", - "isOptional": true + "name": "cart", + "value": "Cart", + "description": "The POS cart at the point checkout was requested." }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "onPinEntry", - "value": "(pin: number[]) => void", - "description": "The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.", - "isOptional": true + "name": "composed", + "value": "boolean", + "description": "The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "composedPath", + "value": "() => EventTarget[]", + "description": "The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "pinPadAction", - "value": "PinPadActionType", - "description": "The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.", - "isOptional": true + "name": "currentTarget", + "value": "EventTarget | null", + "description": "The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)" }, { - "filePath": "src/surfaces/point-of-sale/types/pin-pad.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "title", - "value": "string", - "description": "The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.", - "isOptional": true - } - ], - "value": "export interface PinPadOptions {\n /**\n * The function to be called when a pin is entered. Use for real-time PIN validation, progress feedback, or implementing custom PIN entry handling logic.\n */\n onPinEntry?: (pin: number[]) => void;\n /**\n * The function to be called when the pin pad modal is dismissed. Receives a `PinPadResult` indicating whether PIN entry was completed and the entered PIN if available. Use for handling modal dismissal and processing final PIN results.\n */\n onDismissed?: (result: PinPadResult) => void;\n /**\n * The content for the prompt on the pin pad. Use to provide clear instructions or context about what the PIN is being used for.\n */\n label?: string;\n /**\n * Whether the entered PIN should be masked for security. When `true`, PIN digits are hidden from view. Use for secure PIN entry where visual privacy is important.\n *\n * @default true\n */\n masked?: boolean;\n /**\n * The minimum length of the PIN (4-10 digits). Use to enforce PIN length requirements based on your security policies or authentication system requirements.\n *\n * @default 4\n */\n minPinLength?: PinLength;\n /**\n * The maximum length of the PIN (4-10 digits). Use to limit PIN length based on your security policies or authentication system constraints.\n *\n * @default 6\n */\n maxPinLength?: PinLength;\n /**\n * The call to action between the entry view and the keypad, consisting of a label and function that returns the pin. Use for custom PIN entry workflows or implementing specific authentication patterns.\n */\n pinPadAction?: PinPadActionType;\n /**\n * The title shown in the modal header. Use to provide context about the PIN entry purpose or identify the specific authentication requirement.\n */\n title?: string;\n /**\n * Whether the pin should be automatically submitted when the user has entered the maximum PIN length. Use for PIN entry experiences where users don't need to manually submit after entering the required digits.\n *\n * @default false\n */\n autoSubmit?: boolean;\n}" - } - }, - "PinPadApiContent": { - "src/surfaces/point-of-sale/api/pin-pad-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", - "name": "PinPadApiContent", - "description": "The `PinPadApi` object provides PIN entry and validation functionality.", - "isPublicDocs": true, - "members": [ + "name": "defaultPrevented", + "value": "boolean", + "description": "The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)" + }, { - "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "eventPhase", + "value": "number", + "description": "The **`eventPhase`** read-only property of the being evaluated.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "MethodSignature", - "name": "showPinPad", - "value": "(onSubmit: (pin: number[]) => PinValidationResult | Promise, options?: PinPadOptions) => void", - "description": "Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.\n\n• **When accepted**: The modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.\n\n• **When rejected**: Displays the optional `errorMessage` and keeps the modal open.\n\nUse for implementing secure authentication workflows, access control, or PIN-based verification systems." - } - ], - "value": "export interface PinPadApiContent {\n /**\n * Shows a PIN pad to the user in a modal dialog. The `onSubmit` function is called when the PIN is submitted and should validate the PIN, returning `'accept'` or `'reject'`.\n *\n * • **When accepted**: The modal dismisses and triggers the `onDismissed` callback—perform any post-validation navigation in this callback rather than in `onSubmit`.\n *\n * • **When rejected**: Displays the optional `errorMessage` and keeps the modal open.\n *\n * Use for implementing secure authentication workflows, access control, or PIN-based verification systems.\n */\n showPinPad(\n onSubmit: (\n pin: number[],\n ) => Promise | PinValidationResult,\n options?: PinPadOptions,\n ): void;\n}" - } - }, - "PinPadApi": { - "src/surfaces/point-of-sale/api/pin-pad-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", - "name": "PinPadApi", - "description": "The `PinPadApi` object provides methods for displaying secure PIN entry interfaces. Access these methods through `shopify.pinPad` to show PIN pad modals and handle PIN validation.", - "isPublicDocs": true, - "members": [ + "name": "initEvent", + "value": "(type: string, bubbles?: boolean, cancelable?: boolean) => void", + "description": "The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)" + }, { - "filePath": "src/surfaces/point-of-sale/api/pin-pad-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "pinPad", - "value": "PinPadApiContent", - "description": "The `PinPadApi` object provides PIN entry and validation functionality." - } - ], - "value": "export interface PinPadApi {\n pinPad: PinPadApiContent;\n}" - } - }, - "StandardApi": { - "src/surfaces/point-of-sale/api/standard/standard-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/standard/standard-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "StandardApi", - "value": "{[key: string]: any} & {\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & CapabilitiesApi & LocaleApi & ToastApi & SessionApi & PrintApi & ProductSearchApi & DeviceApi & ConnectivityApi & StorageApi & PinPadApi & CameraApi", - "description": "", - "isPublicDocs": true - } - }, - "I18n": { - "src/api.ts": { - "filePath": "src/api.ts", - "name": "I18n", - "description": "Internationalization utilities for formatting and translating content according to the user's locale. Use these methods to display numbers, currency, dates, and translated strings that match the merchant's language and regional preferences.", - "members": [ + "name": "isTrusted", + "value": "boolean", + "description": "The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)" + }, { - "filePath": "src/api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "formatCurrency", - "value": "(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string", - "description": "Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default." + "name": "NONE", + "value": "0", + "description": "" }, { - "filePath": "src/api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "preventDefault", + "value": "() => void", + "description": "The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "formatDate", - "value": "(date: Date, options?: { inExtensionLocale?: boolean; } & DateTimeFormatOptions) => string", - "description": "Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style." + "name": "returnValue", + "value": "boolean", + "description": "The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)" }, { - "filePath": "src/api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "formatNumber", - "value": "(number: number | bigint, options?: { inExtensionLocale?: boolean; } & NumberFormatOptions) => string", - "description": "Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default." + "name": "srcElement", + "value": "EventTarget | null", + "description": "The deprecated **`Event.srcElement`** is an alias for the Event.target property.", + "deprecationMessage": "[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)" }, { - "filePath": "src/api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "stopImmediatePropagation", + "value": "() => void", + "description": "The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "MethodSignature", + "name": "stopPropagation", + "value": "() => void", + "description": "The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "translate", - "value": "I18nTranslate", - "description": "Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components." - } - ], - "value": "export interface I18n {\n /**\n * Returns a localized number formatted according to the user's locale. Use this to display numbers like quantities, percentages, or measurements in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. Uses the current user's locale by default.\n *\n * @param number - The number to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.NumberFormatOptions for customizing the number format\n */\n formatNumber: (\n number: number | bigint,\n options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,\n ) => string;\n\n /**\n * Returns a localized currency value formatted according to the user's locale and currency conventions. Use this to display prices, totals, or financial amounts in the appropriate format for the merchant's region. This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. Uses the current user's locale by default.\n *\n * @param number - The currency amount to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.NumberFormatOptions for customizing the currency format, such as the currency code\n */\n formatCurrency: (\n number: number | bigint,\n options?: {inExtensionLocale?: boolean} & Intl.NumberFormatOptions,\n ) => string;\n\n /**\n * Returns a localized date value formatted according to the user's locale and date conventions. Use this to display dates and times in the appropriate format for the merchant's region, such as order dates, timestamps, or schedule information. This function behaves like the standard `Intl.DateTimeFormat()` and uses the current user's locale by default. Formatting options can be passed to customize the date display style.\n *\n * @param date - The Date object to format\n * @param options.inExtensionLocale - If true, use the extension's default locale instead of the user's locale\n * @param options - Additional Intl.DateTimeFormatOptions for customizing the date format\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n formatDate: (\n date: Date,\n options?: {inExtensionLocale?: boolean} & Intl.DateTimeFormatOptions,\n ) => string;\n\n /**\n * Returns translated content in the user's locale, as supported by the extension. Use this to display localized strings from your extension's locale files. The special `options.count` property enables pluralization. Other option keys and values are treated as replacements for interpolation in your translation strings. Returns a single string when replacements are primitives, or an array when replacements contain UI components.\n */\n translate: I18nTranslate;\n}" - } - }, - "I18nTranslate": { - "src/api.ts": { - "filePath": "src/api.ts", - "name": "I18nTranslate", - "description": "The translation function signature for internationalization. Use this to translate string keys defined in your locale files into localized content for the current user's language.", - "members": [], - "value": "export interface I18nTranslate {\n /**\n * Returns a translated string matching a key in a locale file. Use this to display localized text in your extension based on the merchant's language preferences. Supports interpolation with replacement values and pluralization with the `count` option. Returns a string when replacements are primitives, or an array when replacements include UI components.\n *\n * @param key - The translation key from your locale file (for example, \"banner.title\")\n * @param options - Optional replacement values for interpolation or the special `count` property for pluralization\n *\n * @example translate(\"banner.title\")\n * @example translate(\"items.count\", { count: 5 })\n */\n (\n key: string,\n options?: Record,\n ): ReplacementType extends string | number\n ? string\n : (string | ReplacementType)[];\n}" - } - }, - "ScannerSource": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "ScannerSource", - "value": "'camera' | 'external' | 'embedded'", - "description": "The scanner source the POS device supports.", - "isPublicDocs": true - } - }, - "ScannerSubscriptionResult": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerSubscriptionResult", - "description": "Represents the data from a scanner event. Contains the scanned string data and the hardware source that captured the scan.", - "isPublicDocs": true, - "members": [ + "name": "target", + "value": "EventTarget | null", + "description": "The read-only **`target`** property of the dispatched.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)" + }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "data", - "value": "string", - "description": "The string data from the last scanner event received. Contains the scanned barcode, QR code, or other scannable data. Returns `undefined` when no scan data is available. Use to process scanned content and implement scan-based business logic.", - "isOptional": true + "name": "timeStamp", + "value": "DOMHighResTimeStamp", + "description": "The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)" }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "source", - "value": "ScannerSource", - "description": "The scanning source from which the scan event came. Returns one of the following scanner types:\n\n• `'camera'` - Built-in device camera used for scanning • `'external'` - External scanner hardware connected to the device • `'embedded'` - Embedded scanner hardware built into the device", - "isOptional": true + "name": "type", + "value": "'beforecheckout'", + "description": "The **`type`** read-only property of the Event interface returns a string containing the event's type.\n\n[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)" } ], - "value": "export interface ScannerSubscriptionResult {\n /**\n * The string data from the last scanner event received. Contains the scanned barcode, QR code, or other scannable data. Returns `undefined` when no scan data is available. Use to process scanned content and implement scan-based business logic.\n */\n data?: string;\n /**\n * The scanning source from which the scan event came. Returns one of the following scanner types:\n *\n * • `'camera'` - Built-in device camera used for scanning\n * • `'external'` - External scanner hardware connected to the device\n * • `'embedded'` - Embedded scanner hardware built into the device\n */\n source?: ScannerSource;\n}" + "value": "export interface BeforeCheckoutEvent extends Event {\n readonly type: typeof POS_INTERCEPT_NAMES.BEFORE_CHECKOUT;\n /** The POS cart at the point checkout was requested. */\n readonly cart: Cart;\n}" } }, - "ScannerSources": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerSources", - "description": "Represents the available scanner hardware sources on the device. Provides reactive access to the list of scanners that can be used for scanning operations.", + "ShopifyInterceptor": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ShopifyInterceptor", + "description": "", + "isPublicDocs": true, + "params": [ + { + "name": "event", + "description": "", + "value": "TEvent", + "filePath": "src/surfaces/point-of-sale/events.ts" + } + ], + "returns": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "description": "", + "name": "InterceptResult", + "value": "InterceptResult" + }, + "value": "(\n event: TEvent,\n) => InterceptResult" + } + }, + "InterceptResult": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "InterceptResult", + "description": "The result an interceptor returns. An empty `operations` list allows the workflow; an `ERROR` validation blocks it.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "current", - "value": "ReadonlySignalLike", - "description": "Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available." + "name": "operations", + "value": "Operation[]", + "description": "" } ], - "value": "export interface ScannerSources {\n /**\n * Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available.\n */\n current: ReadonlySignalLike;\n}" + "value": "export interface InterceptResult {\n operations: Operation[];\n}" } }, - "ScannerData": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerData", - "description": "Represents the scanner interface for accessing scan events and subscription management. Provides real-time access to scanned data through a reactive signal pattern.", + "Operation": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "Operation", + "description": "A single host operation produced by an interceptor.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "current", - "value": "ReadonlySignalLike", - "description": "Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available." + "name": "validationAdd", + "value": "ValidationAdd", + "description": "Adds a validation to the workflow being intercepted.", + "isOptional": true } ], - "value": "export interface ScannerData {\n /**\n * Current available scanner sources with subscription support. The `value` property provides current sources, and `subscribe` listens for changes. Use to monitor which scanners are available.\n */\n current: ReadonlySignalLike;\n}" + "value": "export interface Operation {\n validationAdd?: ValidationAdd;\n}" } }, - "ScannerApiContent": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerApiContent", - "description": "The `ScannerApi` object provides scan results and scanner controls.", + "ValidationAdd": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "ValidationAdd", + "description": "Adds a validation to the workflow being intercepted.", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "hideCameraScanner", - "value": "() => void", - "description": "Hide the camera scanner." + "name": "handle", + "value": "string", + "description": "Stable identifier for this validation." }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "scannerData", - "value": "ScannerData", - "description": "Access current scan data and subscribe to new scan events. Use to receive real-time scan results." + "name": "level", + "value": "ValidationLevel", + "description": "`ERROR` blocks the workflow. `WARNING` and `INFO` do not." }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "showCameraScanner", - "value": "() => void", - "description": "Show the camera scanner." + "name": "message", + "value": "string", + "description": "Host-facing message for support, observability, or staff UX." }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "sources", - "value": "ScannerSources", - "description": "Access available scanner sources on the device. Use to check which scanners are available (camera, external, or embedded)." - } - ], - "value": "export interface ScannerApiContent {\n /**\n * Access current scan data and subscribe to new scan events. Use to receive real-time scan results.\n */\n scannerData: ScannerData;\n /**\n * Access available scanner sources on the device. Use to check which scanners are available (camera, external, or embedded).\n */\n sources: ScannerSources;\n /**\n * Show the camera scanner.\n */\n showCameraScanner: () => void;\n /**\n * Hide the camera scanner.\n */\n hideCameraScanner: () => void;\n}" - } - }, - "ScannerApi": { - "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", - "name": "ScannerApi", - "description": "The `ScannerApi` object provides access to scanning functionality and scanner source information. Access these properties through `shopify.scanner` to monitor scan events and available scanner sources.", - "isPublicDocs": true, - "members": [ + "name": "metafields", + "value": "Metafield[]", + "description": "Optional structured data for custom UX or order metadata.", + "isOptional": true + }, { - "filePath": "src/surfaces/point-of-sale/api/scanner-api/scanner-api.ts", + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", - "name": "scanner", - "value": "ScannerApiContent", - "description": "The `ScannerApi` object provides scan results and scanner controls." + "name": "target", + "value": "string", + "description": "JSON-path locator for where the validation applies. Defaults to `$.cart`.", + "isOptional": true } ], - "value": "export interface ScannerApi {\n scanner: ScannerApiContent;\n}" + "value": "export interface ValidationAdd {\n /** `ERROR` blocks the workflow. `WARNING` and `INFO` do not. */\n level: ValidationLevel;\n\n /** Stable identifier for this validation. */\n handle: string;\n\n /** Host-facing message for support, observability, or staff UX. */\n message: string;\n\n /** JSON-path locator for where the validation applies. Defaults to `$.cart`. */\n target?: string;\n\n /** Optional structured data for custom UX or order metadata. */\n metafields?: Metafield[];\n}" } }, - "ActionTargetApi": { - "src/surfaces/point-of-sale/api/action-target-api/action-target-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/action-target-api/action-target-api.ts", + "ValidationLevel": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "TypeAliasDeclaration", - "name": "ActionTargetApi", - "value": "{[key: string]: any} & {\n extensionPoint: T;\n} & StandardApi & ScannerApi", + "name": "ValidationLevel", + "value": "'INFO' | 'WARNING' | 'ERROR'", "description": "", "isPublicDocs": true } }, - "DataTargetApi": { - "src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts": { - "filePath": "src/surfaces/point-of-sale/api/data-target-api/data-target-api.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "DataTargetApi", - "value": "{\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & CapabilitiesApi & SessionApi & StorageApi & LocaleApi & ConnectivityApi & DeviceApi & ProductSearchApi & ReadonlyCartApi", - "description": "API surface for non-rendering data extension targets.", - "isPublicDocs": true + "Metafield": { + "src/surfaces/point-of-sale/events.ts": { + "filePath": "src/surfaces/point-of-sale/events.ts", + "name": "Metafield", + "description": "Metafield input attached to a validation.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "key", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "namespace", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "type", + "value": "string", + "description": "" + }, + { + "filePath": "src/surfaces/point-of-sale/events.ts", + "syntaxKind": "PropertySignature", + "name": "value", + "value": "string", + "description": "" + } + ], + "value": "export interface Metafield {\n namespace: string;\n key: string;\n value: string;\n type: string;\n}" } }, "CustomerApi": { @@ -5095,6 +5067,46 @@ "value": "export interface CustomerApiContent {\n /**\n * The unique identifier for the customer. Use for customer lookups, applying customer-specific pricing, enabling personalized features, and integrating with external systems.\n */\n id: number;\n}" } }, + "InterceptCapability": { + "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "syntaxKind": "TypeAliasDeclaration", + "name": "InterceptCapability", + "value": "`${Extract<\n keyof ShopifyInterceptMap,\n string\n>}.${'error' | 'warning' | 'info'}`", + "description": "A granted validation severity for a POS intercept event. Event names are derived from `ShopifyInterceptMap`; `warning` corresponds to the `WARNING` validation level.", + "isPublicDocs": true + } + }, + "CapabilitiesApi": { + "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "name": "CapabilitiesApi", + "description": "Provides the validation severities granted for POS intercept events.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts", + "syntaxKind": "PropertySignature", + "name": "capabilities", + "value": "ReadonlySignalLike", + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", + "title": "Example" + } + ] + } + ] + } + ], + "value": "export interface CapabilitiesApi {\n /**\n * A read-only list of granted intercept capabilities. The signal is available\n * to every POS target, but only the target that registers an interceptor\n * declares its event in `shopify.extension.toml`.\n *\n * Grants are cumulative. An `.error` grant includes `.warning` and `.info`,\n * and a `.warning` grant includes `.info`.\n *\n * @example\n * ```ts\n * if (shopify.capabilities.value.includes('beforecheckout.error')) {\n * // This interceptor can return ERROR, WARNING, or INFO validations.\n * }\n * ```\n */\n capabilities: ReadonlySignalLike;\n}" + } + }, "OrderApi": { "src/surfaces/point-of-sale/api/order-api/order-api.ts": { "filePath": "src/surfaces/point-of-sale/api/order-api/order-api.ts", @@ -5503,7 +5515,7 @@ "filePath": "src/surfaces/point-of-sale/components.ts", "syntaxKind": "TypeAliasDeclaration", "name": "IconType", - "value": "'info' | 'camera' | 'external' | 'adjust' | 'affiliate' | 'airplane' | 'alert-bubble' | 'alert-circle' | 'alert-diamond' | 'alert-location' | 'alert-octagon' | 'alert-octagon-filled' | 'alert-triangle' | 'alert-triangle-filled' | 'align-horizontal-centers' | 'app-extension' | 'apps' | 'archive' | 'arrow-down' | 'arrow-down-circle' | 'arrow-down-right' | 'arrow-left' | 'arrow-left-circle' | 'arrow-right' | 'arrow-right-circle' | 'arrow-up' | 'arrow-up-circle' | 'arrow-up-right' | 'arrows-in-horizontal' | 'arrows-out-horizontal' | 'asterisk' | 'attachment' | 'automation' | 'backspace' | 'bag' | 'bank' | 'barcode' | 'battery-low' | 'bill' | 'blank' | 'blog' | 'bolt' | 'bolt-filled' | 'book' | 'book-open' | 'bug' | 'bullet' | 'business-entity' | 'button' | 'button-press' | 'calculator' | 'calendar' | 'calendar-check' | 'calendar-compare' | 'calendar-list' | 'calendar-time' | 'camera-flip' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'cart' | 'cart-abandoned' | 'cart-discount' | 'cart-down' | 'cart-filled' | 'cart-sale' | 'cart-send' | 'cart-up' | 'cash-dollar' | 'cash-euro' | 'cash-pound' | 'cash-rupee' | 'cash-yen' | 'catalog-product' | 'categories' | 'channels' | 'chart-cohort' | 'chart-donut' | 'chart-funnel' | 'chart-histogram-first' | 'chart-histogram-first-last' | 'chart-histogram-flat' | 'chart-histogram-full' | 'chart-histogram-growth' | 'chart-histogram-last' | 'chart-histogram-second-last' | 'chart-horizontal' | 'chart-line' | 'chart-popular' | 'chart-stacked' | 'chart-vertical' | 'chat' | 'chat-new' | 'chat-referral' | 'check' | 'check-circle' | 'check-circle-filled' | 'checkbox' | 'chevron-down' | 'chevron-down-circle' | 'chevron-left' | 'chevron-left-circle' | 'chevron-right' | 'chevron-right-circle' | 'chevron-up' | 'chevron-up-circle' | 'circle' | 'circle-dashed' | 'clipboard' | 'clipboard-check' | 'clipboard-checklist' | 'clock' | 'clock-list' | 'clock-revert' | 'code' | 'code-add' | 'collection' | 'collection-featured' | 'collection-list' | 'collection-reference' | 'color' | 'color-none' | 'compass' | 'complete' | 'compose' | 'confetti' | 'connect' | 'content' | 'contract' | 'corner-pill' | 'corner-round' | 'corner-square' | 'credit-card' | 'credit-card-cancel' | 'credit-card-percent' | 'credit-card-reader' | 'credit-card-reader-chip' | 'credit-card-reader-tap' | 'credit-card-secure' | 'credit-card-tap-chip' | 'crop' | 'currency-convert' | 'cursor' | 'cursor-banner' | 'cursor-option' | 'data-presentation' | 'data-table' | 'database' | 'database-add' | 'database-connect' | 'delete' | 'delivered' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'dns-settings' | 'dock-floating' | 'dock-side' | 'domain' | 'domain-landing-page' | 'domain-new' | 'domain-redirect' | 'download' | 'drag-drop' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'email-follow-up' | 'email-newsletter' | 'empty' | 'enabled' | 'enter' | 'envelope' | 'envelope-soft-pack' | 'eraser' | 'exchange' | 'exit' | 'export' | 'eye-check-mark' | 'eye-dropper' | 'eye-dropper-list' | 'eye-first' | 'eyeglasses' | 'fav' | 'favicon' | 'file' | 'file-list' | 'filter' | 'filter-active' | 'flag' | 'flip-horizontal' | 'flip-vertical' | 'flower' | 'folder' | 'folder-add' | 'folder-down' | 'folder-remove' | 'folder-up' | 'food' | 'foreground' | 'forklift' | 'forms' | 'games' | 'gauge' | 'geolocation' | 'gift' | 'gift-card' | 'git-branch' | 'git-commit' | 'git-repository' | 'globe' | 'globe-asia' | 'globe-europe' | 'globe-lines' | 'globe-list' | 'graduation-hat' | 'grid' | 'hashtag' | 'hashtag-decimal' | 'hashtag-list' | 'heart' | 'hide' | 'hide-filled' | 'home' | 'home-filled' | 'icons' | 'identity-card' | 'image' | 'image-add' | 'image-alt' | 'image-explore' | 'image-magic' | 'image-none' | 'image-with-text-overlay' | 'images' | 'import' | 'in-progress' | 'incentive' | 'incoming' | 'incomplete' | 'info-filled' | 'inheritance' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'inventory-updated' | 'iq' | 'key' | 'keyboard' | 'keyboard-filled' | 'keyboard-hide' | 'keypad' | 'label-printer' | 'language' | 'language-translate' | 'layout-block' | 'layout-buy-button' | 'layout-buy-button-horizontal' | 'layout-buy-button-vertical' | 'layout-column-1' | 'layout-columns-2' | 'layout-columns-3' | 'layout-footer' | 'layout-header' | 'layout-logo-block' | 'layout-popup' | 'layout-rows-2' | 'layout-section' | 'layout-sidebar-left' | 'layout-sidebar-right' | 'lightbulb' | 'link' | 'link-list' | 'list-bulleted' | 'list-bulleted-filled' | 'list-numbered' | 'live' | 'live-critical' | 'live-none' | 'location' | 'location-none' | 'lock' | 'map' | 'markets' | 'markets-euro' | 'markets-rupee' | 'markets-yen' | 'maximize' | 'measurement-size' | 'measurement-size-list' | 'measurement-volume' | 'measurement-volume-list' | 'measurement-weight' | 'measurement-weight-list' | 'media-receiver' | 'megaphone' | 'mention' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'menu-vertical' | 'merge' | 'metafields' | 'metaobject' | 'metaobject-list' | 'metaobject-reference' | 'microphone' | 'microphone-muted' | 'minimize' | 'minus' | 'minus-circle' | 'mobile' | 'money' | 'money-none' | 'money-split' | 'moon' | 'nature' | 'note' | 'note-add' | 'notification' | 'number-one' | 'order' | 'order-batches' | 'order-draft' | 'order-filled' | 'order-first' | 'order-fulfilled' | 'order-repeat' | 'order-unfulfilled' | 'orders-status' | 'organization' | 'outdent' | 'outgoing' | 'package' | 'package-cancel' | 'package-fulfilled' | 'package-on-hold' | 'package-reassign' | 'package-returned' | 'page' | 'page-add' | 'page-attachment' | 'page-clock' | 'page-down' | 'page-heart' | 'page-list' | 'page-reference' | 'page-remove' | 'page-report' | 'page-up' | 'pagination-end' | 'pagination-start' | 'paint-brush-flat' | 'paint-brush-round' | 'paper-check' | 'partially-complete' | 'passkey' | 'paste' | 'pause-circle' | 'payment' | 'payment-capture' | 'payout' | 'payout-dollar' | 'payout-euro' | 'payout-pound' | 'payout-rupee' | 'payout-yen' | 'person' | 'person-add' | 'person-exit' | 'person-filled' | 'person-list' | 'person-lock' | 'person-remove' | 'person-segment' | 'personalized-text' | 'phablet' | 'phone' | 'phone-down' | 'phone-down-filled' | 'phone-in' | 'phone-out' | 'pin' | 'pin-remove' | 'plan' | 'play' | 'play-circle' | 'plus' | 'plus-circle' | 'plus-circle-down' | 'plus-circle-filled' | 'plus-circle-up' | 'point-of-sale' | 'point-of-sale-register' | 'price-list' | 'print' | 'product' | 'product-add' | 'product-cost' | 'product-filled' | 'product-list' | 'product-reference' | 'product-remove' | 'product-return' | 'product-unavailable' | 'profile' | 'profile-filled' | 'question-circle' | 'question-circle-filled' | 'radio-control' | 'receipt' | 'receipt-dollar' | 'receipt-euro' | 'receipt-folded' | 'receipt-paid' | 'receipt-pound' | 'receipt-refund' | 'receipt-rupee' | 'receipt-yen' | 'receivables' | 'redo' | 'referral-code' | 'refresh' | 'remove-background' | 'reorder' | 'replace' | 'replay' | 'reset' | 'return' | 'reward' | 'rocket' | 'rotate-left' | 'rotate-right' | 'sandbox' | 'save' | 'savings' | 'scan-qr-code' | 'search' | 'search-add' | 'search-list' | 'search-recent' | 'search-resource' | 'select' | 'send' | 'settings' | 'share' | 'shield-check-mark' | 'shield-none' | 'shield-pending' | 'shield-person' | 'shipping-label' | 'shipping-label-cancel' | 'shopcodes' | 'slideshow' | 'smiley-happy' | 'smiley-joy' | 'smiley-neutral' | 'smiley-sad' | 'social-ad' | 'social-post' | 'sort' | 'sort-ascending' | 'sort-descending' | 'sound' | 'split' | 'sports' | 'star' | 'star-circle' | 'star-filled' | 'star-half' | 'star-list' | 'status' | 'status-active' | 'stop-circle' | 'store' | 'store-import' | 'store-managed' | 'store-online' | 'sun' | 'table' | 'table-masonry' | 'tablet' | 'target' | 'tax' | 'team' | 'text' | 'text-align-center' | 'text-align-left' | 'text-align-right' | 'text-block' | 'text-bold' | 'text-color' | 'text-font' | 'text-font-list' | 'text-grammar' | 'text-in-columns' | 'text-in-rows' | 'text-indent' | 'text-indent-remove' | 'text-italic' | 'text-quote' | 'text-title' | 'text-underline' | 'text-with-image' | 'theme' | 'theme-edit' | 'theme-store' | 'theme-template' | 'three-d-environment' | 'thumbs-down' | 'thumbs-up' | 'tip-jar' | 'toggle-off' | 'toggle-on' | 'transaction' | 'transaction-fee-add' | 'transaction-fee-dollar' | 'transaction-fee-euro' | 'transaction-fee-pound' | 'transaction-fee-rupee' | 'transaction-fee-yen' | 'transfer' | 'transfer-in' | 'transfer-internal' | 'transfer-out' | 'truck' | 'undo' | 'unknown-device' | 'unlock' | 'upload' | 'variant' | 'variant-list' | 'video' | 'video-list' | 'view' | 'viewport-narrow' | 'viewport-short' | 'viewport-tall' | 'viewport-wide' | 'wallet' | 'wand' | 'watch' | 'wifi' | 'work' | 'work-list' | 'wrench' | 'x' | 'x-circle' | 'x-circle-filled'", + "value": "'camera' | 'external' | 'info' | 'adjust' | 'affiliate' | 'airplane' | 'alert-bubble' | 'alert-circle' | 'alert-diamond' | 'alert-location' | 'alert-octagon' | 'alert-octagon-filled' | 'alert-triangle' | 'alert-triangle-filled' | 'align-horizontal-centers' | 'app-extension' | 'apps' | 'archive' | 'arrow-down' | 'arrow-down-circle' | 'arrow-down-right' | 'arrow-left' | 'arrow-left-circle' | 'arrow-right' | 'arrow-right-circle' | 'arrow-up' | 'arrow-up-circle' | 'arrow-up-right' | 'arrows-in-horizontal' | 'arrows-out-horizontal' | 'asterisk' | 'attachment' | 'automation' | 'backspace' | 'bag' | 'bank' | 'barcode' | 'battery-low' | 'bill' | 'blank' | 'blog' | 'bolt' | 'bolt-filled' | 'book' | 'book-open' | 'bug' | 'bullet' | 'business-entity' | 'button' | 'button-press' | 'calculator' | 'calendar' | 'calendar-check' | 'calendar-compare' | 'calendar-list' | 'calendar-time' | 'camera-flip' | 'caret-down' | 'caret-left' | 'caret-right' | 'caret-up' | 'cart' | 'cart-abandoned' | 'cart-discount' | 'cart-down' | 'cart-filled' | 'cart-sale' | 'cart-send' | 'cart-up' | 'cash-dollar' | 'cash-euro' | 'cash-pound' | 'cash-rupee' | 'cash-yen' | 'catalog-product' | 'categories' | 'channels' | 'chart-cohort' | 'chart-donut' | 'chart-funnel' | 'chart-histogram-first' | 'chart-histogram-first-last' | 'chart-histogram-flat' | 'chart-histogram-full' | 'chart-histogram-growth' | 'chart-histogram-last' | 'chart-histogram-second-last' | 'chart-horizontal' | 'chart-line' | 'chart-popular' | 'chart-stacked' | 'chart-vertical' | 'chat' | 'chat-new' | 'chat-referral' | 'check' | 'check-circle' | 'check-circle-filled' | 'checkbox' | 'chevron-down' | 'chevron-down-circle' | 'chevron-left' | 'chevron-left-circle' | 'chevron-right' | 'chevron-right-circle' | 'chevron-up' | 'chevron-up-circle' | 'circle' | 'circle-dashed' | 'clipboard' | 'clipboard-check' | 'clipboard-checklist' | 'clock' | 'clock-list' | 'clock-revert' | 'code' | 'code-add' | 'collection' | 'collection-featured' | 'collection-list' | 'collection-reference' | 'color' | 'color-none' | 'compass' | 'complete' | 'compose' | 'confetti' | 'connect' | 'content' | 'contract' | 'corner-pill' | 'corner-round' | 'corner-square' | 'credit-card' | 'credit-card-cancel' | 'credit-card-percent' | 'credit-card-reader' | 'credit-card-reader-chip' | 'credit-card-reader-tap' | 'credit-card-secure' | 'credit-card-tap-chip' | 'crop' | 'currency-convert' | 'cursor' | 'cursor-banner' | 'cursor-option' | 'data-presentation' | 'data-table' | 'database' | 'database-add' | 'database-connect' | 'delete' | 'delivered' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'dns-settings' | 'dock-floating' | 'dock-side' | 'domain' | 'domain-landing-page' | 'domain-new' | 'domain-redirect' | 'download' | 'drag-drop' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'email-follow-up' | 'email-newsletter' | 'empty' | 'enabled' | 'enter' | 'envelope' | 'envelope-soft-pack' | 'eraser' | 'exchange' | 'exit' | 'export' | 'eye-check-mark' | 'eye-dropper' | 'eye-dropper-list' | 'eye-first' | 'eyeglasses' | 'fav' | 'favicon' | 'file' | 'file-list' | 'filter' | 'filter-active' | 'flag' | 'flip-horizontal' | 'flip-vertical' | 'flower' | 'folder' | 'folder-add' | 'folder-down' | 'folder-remove' | 'folder-up' | 'food' | 'foreground' | 'forklift' | 'forms' | 'games' | 'gauge' | 'geolocation' | 'gift' | 'gift-card' | 'git-branch' | 'git-commit' | 'git-repository' | 'globe' | 'globe-asia' | 'globe-europe' | 'globe-lines' | 'globe-list' | 'graduation-hat' | 'grid' | 'hashtag' | 'hashtag-decimal' | 'hashtag-list' | 'heart' | 'hide' | 'hide-filled' | 'home' | 'home-filled' | 'icons' | 'identity-card' | 'image' | 'image-add' | 'image-alt' | 'image-explore' | 'image-magic' | 'image-none' | 'image-with-text-overlay' | 'images' | 'import' | 'in-progress' | 'incentive' | 'incoming' | 'incomplete' | 'info-filled' | 'inheritance' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'inventory-updated' | 'iq' | 'key' | 'keyboard' | 'keyboard-filled' | 'keyboard-hide' | 'keypad' | 'label-printer' | 'language' | 'language-translate' | 'layout-block' | 'layout-buy-button' | 'layout-buy-button-horizontal' | 'layout-buy-button-vertical' | 'layout-column-1' | 'layout-columns-2' | 'layout-columns-3' | 'layout-footer' | 'layout-header' | 'layout-logo-block' | 'layout-popup' | 'layout-rows-2' | 'layout-section' | 'layout-sidebar-left' | 'layout-sidebar-right' | 'lightbulb' | 'link' | 'link-list' | 'list-bulleted' | 'list-bulleted-filled' | 'list-numbered' | 'live' | 'live-critical' | 'live-none' | 'location' | 'location-none' | 'lock' | 'map' | 'markets' | 'markets-euro' | 'markets-rupee' | 'markets-yen' | 'maximize' | 'measurement-size' | 'measurement-size-list' | 'measurement-volume' | 'measurement-volume-list' | 'measurement-weight' | 'measurement-weight-list' | 'media-receiver' | 'megaphone' | 'mention' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'menu-vertical' | 'merge' | 'metafields' | 'metaobject' | 'metaobject-list' | 'metaobject-reference' | 'microphone' | 'microphone-muted' | 'minimize' | 'minus' | 'minus-circle' | 'mobile' | 'money' | 'money-none' | 'money-split' | 'moon' | 'nature' | 'note' | 'note-add' | 'notification' | 'number-one' | 'order' | 'order-batches' | 'order-draft' | 'order-filled' | 'order-first' | 'order-fulfilled' | 'order-repeat' | 'order-unfulfilled' | 'orders-status' | 'organization' | 'outdent' | 'outgoing' | 'package' | 'package-cancel' | 'package-fulfilled' | 'package-on-hold' | 'package-reassign' | 'package-returned' | 'page' | 'page-add' | 'page-attachment' | 'page-clock' | 'page-down' | 'page-heart' | 'page-list' | 'page-reference' | 'page-remove' | 'page-report' | 'page-up' | 'pagination-end' | 'pagination-start' | 'paint-brush-flat' | 'paint-brush-round' | 'paper-check' | 'partially-complete' | 'passkey' | 'paste' | 'pause-circle' | 'payment' | 'payment-capture' | 'payout' | 'payout-dollar' | 'payout-euro' | 'payout-pound' | 'payout-rupee' | 'payout-yen' | 'person' | 'person-add' | 'person-exit' | 'person-filled' | 'person-list' | 'person-lock' | 'person-remove' | 'person-segment' | 'personalized-text' | 'phablet' | 'phone' | 'phone-down' | 'phone-down-filled' | 'phone-in' | 'phone-out' | 'pin' | 'pin-remove' | 'plan' | 'play' | 'play-circle' | 'plus' | 'plus-circle' | 'plus-circle-down' | 'plus-circle-filled' | 'plus-circle-up' | 'point-of-sale' | 'point-of-sale-register' | 'price-list' | 'print' | 'product' | 'product-add' | 'product-cost' | 'product-filled' | 'product-list' | 'product-reference' | 'product-remove' | 'product-return' | 'product-unavailable' | 'profile' | 'profile-filled' | 'question-circle' | 'question-circle-filled' | 'radio-control' | 'receipt' | 'receipt-dollar' | 'receipt-euro' | 'receipt-folded' | 'receipt-paid' | 'receipt-pound' | 'receipt-refund' | 'receipt-rupee' | 'receipt-yen' | 'receivables' | 'redo' | 'referral-code' | 'refresh' | 'remove-background' | 'reorder' | 'replace' | 'replay' | 'reset' | 'return' | 'reward' | 'rocket' | 'rotate-left' | 'rotate-right' | 'sandbox' | 'save' | 'savings' | 'scan-qr-code' | 'search' | 'search-add' | 'search-list' | 'search-recent' | 'search-resource' | 'select' | 'send' | 'settings' | 'share' | 'shield-check-mark' | 'shield-none' | 'shield-pending' | 'shield-person' | 'shipping-label' | 'shipping-label-cancel' | 'shopcodes' | 'slideshow' | 'smiley-happy' | 'smiley-joy' | 'smiley-neutral' | 'smiley-sad' | 'social-ad' | 'social-post' | 'sort' | 'sort-ascending' | 'sort-descending' | 'sound' | 'split' | 'sports' | 'star' | 'star-circle' | 'star-filled' | 'star-half' | 'star-list' | 'status' | 'status-active' | 'stop-circle' | 'store' | 'store-import' | 'store-managed' | 'store-online' | 'sun' | 'table' | 'table-masonry' | 'tablet' | 'target' | 'tax' | 'team' | 'text' | 'text-align-center' | 'text-align-left' | 'text-align-right' | 'text-block' | 'text-bold' | 'text-color' | 'text-font' | 'text-font-list' | 'text-grammar' | 'text-in-columns' | 'text-in-rows' | 'text-indent' | 'text-indent-remove' | 'text-italic' | 'text-quote' | 'text-title' | 'text-underline' | 'text-with-image' | 'theme' | 'theme-edit' | 'theme-store' | 'theme-template' | 'three-d-environment' | 'thumbs-down' | 'thumbs-up' | 'tip-jar' | 'toggle-off' | 'toggle-on' | 'transaction' | 'transaction-fee-add' | 'transaction-fee-dollar' | 'transaction-fee-euro' | 'transaction-fee-pound' | 'transaction-fee-rupee' | 'transaction-fee-yen' | 'transfer' | 'transfer-in' | 'transfer-internal' | 'transfer-out' | 'truck' | 'undo' | 'unknown-device' | 'unlock' | 'upload' | 'variant' | 'variant-list' | 'video' | 'video-list' | 'view' | 'viewport-narrow' | 'viewport-short' | 'viewport-tall' | 'viewport-wide' | 'wallet' | 'wand' | 'watch' | 'wifi' | 'work' | 'work-list' | 'wrench' | 'x' | 'x-circle' | 'x-circle-filled'", "description": "", "isPublicDocs": true } @@ -7034,7 +7046,7 @@ "filePath": "src/surfaces/point-of-sale/components.ts", "syntaxKind": "TypeAliasDeclaration", "name": "SupportedIconNames", - "value": "'info' | 'external' | 'alert-circle' | 'apps' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'backspace' | 'barcode' | 'battery-low' | 'bolt-filled' | 'bullet' | 'camera-flip' | 'caret-down' | 'caret-up' | 'cart' | 'cart-down' | 'cart-filled' | 'cart-send' | 'cart-up' | 'chart-line' | 'chart-vertical' | 'check' | 'check-circle-filled' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle' | 'clipboard-checklist' | 'clock' | 'collection' | 'credit-card' | 'credit-card-reader' | 'delete' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'exchange' | 'flag' | 'gift-card' | 'graduation-hat' | 'grid' | 'hide-filled' | 'home' | 'home-filled' | 'image' | 'images' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'keyboard-hide' | 'keypad' | 'link' | 'list-bulleted' | 'list-bulleted-filled' | 'live' | 'live-critical' | 'live-none' | 'location' | 'lock' | 'maximize' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'minimize' | 'minus' | 'mobile' | 'money' | 'money-split' | 'note' | 'order' | 'order-draft' | 'order-filled' | 'package' | 'package-cancel' | 'package-reassign' | 'payment' | 'person' | 'person-add' | 'person-filled' | 'phablet' | 'phone-out' | 'play-circle' | 'plus' | 'point-of-sale' | 'point-of-sale-register' | 'print' | 'product' | 'product-filled' | 'profile' | 'question-circle-filled' | 'receipt' | 'refresh' | 'return' | 'scan-qr-code' | 'search' | 'send' | 'settings' | 'shipping-label-cancel' | 'sort' | 'star-circle' | 'star-filled' | 'store' | 'tablet' | 'transaction-fee-add' | 'unlock' | 'variant' | 'view' | 'wallet' | 'x' | 'x-circle'", + "value": "'external' | 'info' | 'alert-circle' | 'apps' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'backspace' | 'barcode' | 'battery-low' | 'bolt-filled' | 'bullet' | 'camera-flip' | 'caret-down' | 'caret-up' | 'cart' | 'cart-down' | 'cart-filled' | 'cart-send' | 'cart-up' | 'chart-line' | 'chart-vertical' | 'check' | 'check-circle-filled' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'circle' | 'clipboard-checklist' | 'clock' | 'collection' | 'credit-card' | 'credit-card-reader' | 'delete' | 'delivery' | 'desktop' | 'disabled' | 'disabled-filled' | 'discount' | 'discount-add' | 'discount-automatic' | 'discount-code' | 'discount-remove' | 'drag-handle' | 'drawer' | 'duplicate' | 'edit' | 'email' | 'exchange' | 'flag' | 'gift-card' | 'graduation-hat' | 'grid' | 'hide-filled' | 'home' | 'home-filled' | 'image' | 'images' | 'inventory' | 'inventory-edit' | 'inventory-list' | 'inventory-transfer' | 'keyboard-hide' | 'keypad' | 'link' | 'list-bulleted' | 'list-bulleted-filled' | 'live' | 'live-critical' | 'live-none' | 'location' | 'lock' | 'maximize' | 'menu' | 'menu-filled' | 'menu-horizontal' | 'minimize' | 'minus' | 'mobile' | 'money' | 'money-split' | 'note' | 'order' | 'order-draft' | 'order-filled' | 'package' | 'package-cancel' | 'package-reassign' | 'payment' | 'person' | 'person-add' | 'person-filled' | 'phablet' | 'phone-out' | 'play-circle' | 'plus' | 'point-of-sale' | 'point-of-sale-register' | 'print' | 'product' | 'product-filled' | 'profile' | 'question-circle-filled' | 'receipt' | 'refresh' | 'return' | 'scan-qr-code' | 'search' | 'send' | 'settings' | 'shipping-label-cancel' | 'sort' | 'star-circle' | 'star-filled' | 'store' | 'tablet' | 'transaction-fee-add' | 'unlock' | 'variant' | 'view' | 'wallet' | 'x' | 'x-circle'", "description": "" } }, @@ -10672,7 +10684,19 @@ "syntaxKind": "PropertySignature", "name": "capabilities", "value": "ReadonlySignalLike", - "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`." + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", + "title": "Example" + } + ] + } + ] } ], "value": "export interface ShopifyGlobal extends CapabilitiesApi {}" @@ -10697,7 +10721,19 @@ "syntaxKind": "PropertySignature", "name": "capabilities", "value": "ReadonlySignalLike", - "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`." + "description": "A read-only list of granted intercept capabilities. The signal is available to every POS target, but only the target that registers an interceptor declares its event in `shopify.extension.toml`.\n\nGrants are cumulative. An `.error` grant includes `.warning` and `.info`, and a `.warning` grant includes `.info`.", + "examples": [ + { + "title": "Example", + "description": "", + "tabs": [ + { + "code": "if (shopify.capabilities.value.includes('beforecheckout.error')) {\n // This interceptor can return ERROR, WARNING, or INFO validations.\n}", + "title": "Example" + } + ] + } + ] }, { "filePath": "src/surfaces/point-of-sale/globals.ts", diff --git a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json index 506c4b0ee6..8278732a5b 100644 --- a/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json +++ b/packages/ui-extensions/docs/surfaces/point-of-sale/generated/pos_ui_extensions/2026-07-rc/targets.json @@ -6,7 +6,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -67,7 +66,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -89,7 +87,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -150,7 +147,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -189,7 +185,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -210,7 +205,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -271,7 +265,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -310,7 +303,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -331,7 +323,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -392,7 +383,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -431,7 +421,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "ConnectivityApi", "DeviceApi", "ExtensionApi", @@ -452,7 +441,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -514,7 +502,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -554,7 +541,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -576,7 +562,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -638,7 +623,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -678,7 +662,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -700,7 +683,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -762,7 +744,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -802,7 +783,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "DeviceApi", @@ -824,7 +804,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "CustomerApi", @@ -886,7 +865,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "CustomerApi", @@ -926,7 +904,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "ConnectivityApi", "CustomerApi", @@ -948,7 +925,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "CartLineItemApi", "ConnectivityApi", @@ -1011,7 +987,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CartApi", "CartLineItemApi", "ConnectivityApi", @@ -1054,7 +1029,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CashDrawerApi", "ConnectivityApi", "DeviceApi", @@ -1115,7 +1089,6 @@ ], "apis": [ "CameraApi", - "CapabilitiesApi", "CashDrawerApi", "ConnectivityApi", "DeviceApi", @@ -1154,7 +1127,6 @@ "apis": [ "ActionApi", "CameraApi", - "CapabilitiesApi", "CashDrawerApi", "ConnectivityApi", "DeviceApi", @@ -1184,20 +1156,6 @@ "components": [], "apis": [] }, - "pos.app.ready.data": { - "components": [], - "apis": [ - "CapabilitiesApi", - "ConnectivityApi", - "DeviceApi", - "ExtensionApi", - "LocaleApi", - "ProductSearchApi", - "ReadonlyCartApi", - "SessionApi", - "StorageApi" - ] - }, "ActionApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", @@ -1253,39 +1211,6 @@ "pos.return.post.block.render" ] }, - "CapabilitiesApi": { - "targets": [ - "pos.app.ready.data", - "pos.cart.line-item-details.action.menu-item.render", - "pos.cart.line-item-details.action.render", - "pos.customer-details.action.menu-item.render", - "pos.customer-details.action.render", - "pos.customer-details.block.render", - "pos.draft-order-details.action.menu-item.render", - "pos.draft-order-details.action.render", - "pos.draft-order-details.block.render", - "pos.exchange.post.action.menu-item.render", - "pos.exchange.post.action.render", - "pos.exchange.post.block.render", - "pos.home.modal.render", - "pos.home.tile.render", - "pos.order-details.action.menu-item.render", - "pos.order-details.action.render", - "pos.order-details.block.render", - "pos.product-details.action.menu-item.render", - "pos.product-details.action.render", - "pos.product-details.block.render", - "pos.purchase.post.action.menu-item.render", - "pos.purchase.post.action.render", - "pos.purchase.post.block.render", - "pos.register-details.action.menu-item.render", - "pos.register-details.action.render", - "pos.register-details.block.render", - "pos.return.post.action.menu-item.render", - "pos.return.post.action.render", - "pos.return.post.block.render" - ] - }, "CartApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", @@ -1308,7 +1233,6 @@ }, "ConnectivityApi": { "targets": [ - "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1341,7 +1265,6 @@ }, "DeviceApi": { "targets": [ - "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1374,7 +1297,6 @@ }, "ExtensionApi": { "targets": [ - "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1407,7 +1329,6 @@ }, "LocaleApi": { "targets": [ - "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1504,7 +1425,6 @@ }, "ProductSearchApi": { "targets": [ - "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1537,7 +1457,6 @@ }, "SessionApi": { "targets": [ - "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1570,7 +1489,6 @@ }, "StorageApi": { "targets": [ - "pos.app.ready.data", "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", "pos.customer-details.action.menu-item.render", @@ -1699,11 +1617,6 @@ "pos.register-details.block.render" ] }, - "ReadonlyCartApi": { - "targets": [ - "pos.app.ready.data" - ] - }, "Tile": { "targets": [ "pos.home.tile.render" diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api.ts index 647614b57a..347d31479b 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api.ts @@ -53,6 +53,7 @@ export type {LocaleApi, LocaleApiContent} from './api/locale-api/locale-api'; export type { CapabilitiesApi, + Capability, InterceptCapability, } from './api/capabilities-api/capabilities-api'; diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.test.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.test.ts index 8b626e83b3..71042bf5d2 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.test.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.test.ts @@ -1,8 +1,7 @@ import type {ReadonlySignalLike} from '../../../../shared'; import type {DataTargetApi} from '../data-target-api/data-target-api'; import type {StandardApi} from '../standard/standard-api'; -import type {ShopifyGlobal} from '../../globals'; -import type {InterceptCapability} from './capabilities-api'; +import type {Capability, InterceptCapability} from './capabilities-api'; function createSignal(value: T): ReadonlySignalLike { return { @@ -14,22 +13,14 @@ function createSignal(value: T): ReadonlySignalLike { describe('POS capabilities API', () => { it('is included in standard target APIs', () => { const capabilities: StandardApi<'pos.home.tile.render'>['capabilities'] = - createSignal([]); + createSignal([]); expect(capabilities.value).toStrictEqual([]); }); it('is included in data target APIs', () => { const capabilities: DataTargetApi<'pos.app.ready.data'>['capabilities'] = - createSignal([]); - - expect(capabilities.value).toStrictEqual([]); - }); - - it('is included in the POS global API', () => { - const capabilities: ShopifyGlobal['capabilities'] = createSignal< - InterceptCapability[] - >([]); + createSignal([]); expect(capabilities.value).toStrictEqual([]); }); diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts index af23a57961..de7edaabff 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/capabilities-api/capabilities-api.ts @@ -3,8 +3,10 @@ import type {ShopifyInterceptMap} from '../../events'; /** * A granted validation severity for a POS intercept event. Event names are - * derived from `ShopifyInterceptMap`; `warning` corresponds to the `WARNING` - * validation level. + * derived from `ShopifyInterceptMap`. + * + * Grants are cumulative. An `.error` grant includes `.warning` and `.info`, + * and a `.warning` grant includes `.info`. * * @publicDocs */ @@ -14,18 +16,21 @@ export type InterceptCapability = `${Extract< >}.${'error' | 'warning' | 'info'}`; /** - * Provides the validation severities granted for POS intercept events. + * A capability granted to a POS extension. + * + * @publicDocs + */ +export type Capability = InterceptCapability; + +/** + * Provides the capabilities granted to a POS extension. * * @publicDocs */ export interface CapabilitiesApi { /** - * A read-only list of granted intercept capabilities. The signal is available - * to every POS target, but only the target that registers an interceptor - * declares its event in `shopify.extension.toml`. - * - * Grants are cumulative. An `.error` grant includes `.warning` and `.info`, - * and a `.warning` grant includes `.info`. + * The allowed capabilities of the extension, defined in your + * [`shopify.extension.toml`](/docs/api/pos-ui-extensions/{API_VERSION}/configuration) file. */ - capabilities: ReadonlySignalLike; + capabilities: ReadonlySignalLike; } diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts b/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts index 4bcb0fd77d..bae46a34dc 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/globals.ts @@ -1,4 +1,3 @@ -import type {CapabilitiesApi} from './api/capabilities-api/capabilities-api'; import type {Navigation} from './api/navigation-api/navigation-api'; import type { ShopifyEventMap, @@ -12,7 +11,7 @@ import type { * * @publicDocs */ -export interface ShopifyGlobal extends CapabilitiesApi {} +export interface ShopifyGlobal {} /** * Background-only extension of `ShopifyGlobal`. Adds host-event listener APIs