From 8d9e606b4ce281c42add35087db60fa4dc5a64d1 Mon Sep 17 00:00:00 2001 From: Victor Chu Date: Thu, 2 Jul 2026 16:43:33 -0700 Subject: [PATCH 1/6] docs(pos): regenerate 2026-07-rc pos ui extension reference Assisted-By: devx/8ba453a3-96d0-4701-a8cc-43c4651bd027 --- .../2026-07-rc/generated_docs_data_v2.json | 743 +++++++----------- .../pos_ui_extensions/2026-07-rc/targets.json | 76 +- 2 files changed, 337 insertions(+), 482 deletions(-) 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 a33a44fa5b..7ab8ddd4e1 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 @@ -610,6 +610,25 @@ "value": "export interface CartUpdateInput {\n /**\n * The cart note to set during bulk update. Replaces existing note or sets new note if none exists. Set to `undefined` to remove current note.\n */\n note?: string;\n /**\n * The cart-level discount to apply during bulk update. Replaces existing cart discount. Set to `undefined` to remove current discount.\n */\n cartDiscount?: Discount;\n /**\n * An array of cart-level discounts to apply during bulk update. Replaces all existing cart discounts with the provided array.\n */\n cartDiscounts: Discount[];\n /**\n * The customer to associate with the cart during bulk update. Replaces existing customer or converts guest cart to customer cart.\n */\n customer?: Customer;\n /**\n * An array of line items to set during bulk update. Completely replaces existing cart contents—removes all current items and adds the provided ones.\n */\n lineItems: LineItem[];\n /**\n * The custom key-value properties to apply to the line item. Merged with existing properties—duplicate keys overwrite existing values.\n */\n properties: Record;\n}" } }, + "AddLineItemOptions": { + "src/surfaces/point-of-sale/types/cart.ts": { + "filePath": "src/surfaces/point-of-sale/types/cart.ts", + "name": "AddLineItemOptions", + "description": "Optional configuration for `addLineItem`. Lets a single call create a line item and decorate it with line-item properties, avoiding the extra native call and cart sync of a separate `addLineItemProperties` call.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/types/cart.ts", + "syntaxKind": "PropertySignature", + "name": "properties", + "value": "Record", + "description": "Custom key-value properties to attach to the newly created line item. Equivalent to calling `addLineItemProperties` with the returned `UUID`, but applied in the same operation.", + "isOptional": true + } + ], + "value": "export interface AddLineItemOptions {\n /**\n * Custom key-value properties to attach to the newly created line item. Equivalent to calling `addLineItemProperties` with the returned `UUID`, but applied in the same operation.\n */\n properties?: Record;\n}" + } + }, "SetLineItemPropertiesInput": { "src/surfaces/point-of-sale/types/cart.ts": { "filePath": "src/surfaces/point-of-sale/types/cart.ts", @@ -936,8 +955,8 @@ "filePath": "src/surfaces/point-of-sale/api/cart-api/cart-api.ts", "syntaxKind": "MethodSignature", "name": "addLineItem", - "value": "(variantId: number, quantity: number) => Promise", - "description": "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." + "value": "(variantId: number, quantity: number, options?: AddLineItemOptions) => Promise", + "description": "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\nPass `options` to attach line-item properties in the same operation, instead of following up with a separate `addLineItemProperties` call." }, { "filePath": "src/surfaces/point-of-sale/api/cart-api/cart-api.ts", @@ -1216,8 +1235,8 @@ "filePath": "src/surfaces/point-of-sale/api/cart-api/cart-api.ts", "syntaxKind": "MethodSignature", "name": "addLineItem", - "value": "(variantId: number, quantity: number) => Promise", - "description": "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." + "value": "(variantId: number, quantity: number, options?: AddLineItemOptions) => Promise", + "description": "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\nPass `options` to attach line-item properties in the same operation, instead of following up with a separate `addLineItemProperties` call." }, { "filePath": "src/surfaces/point-of-sale/api/cart-api/cart-api.ts", @@ -1367,7 +1386,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. `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}" + "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 * Pass `options` to attach line-item properties in the same operation, instead of following up with a separate `addLineItemProperties` call.\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 * @param options optional line-item properties to apply to the new line item in the same operation\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(\n variantId: number,\n quantity: number,\n options?: AddLineItemOptions,\n ): 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": { @@ -2694,6 +2713,100 @@ "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}" } }, + "PrintingApiContent": { + "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "name": "PrintingApiContent", + "description": "The Printing API provides methods for triggering document printing and discovering available hardware printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "syntaxKind": "MethodSignature", + "name": "getPrinters", + "value": "() => Promise", + "description": "Returns the list of hardware printers currently available to the device. Each printer includes its connection status and a reference that can be passed to `print()`.\n\nWhen no hardware printers are available, returns an empty array. The system print dialog is not included in this list — it is the default behavior when no `printer` option is provided to `print()`." + }, + { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "syntaxKind": "MethodSignature", + "name": "print", + "value": "(src: string, options?: PrintOptions) => Promise", + "description": "Triggers a print operation for the specified document source.\n\nWhen called without a `printer` option, opens the device's system print dialog (e.g., AirPrint on iOS, Android print service). When a `printer` reference is provided (from `getPrinters()`), sends the content directly to that printer without showing a dialog.\n\nThe `src` parameter accepts either:\n- A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n- A full URL to your app's backend\n\nThe content at the URL is fetched with the extension's session token for authentication. HTML, PDFs, and images are supported content types. PDFs can only be printed via the system print dialog: selecting a `printer` with a PDF `src` throws, because hardware (receipt) printers render HTML and image content only." + } + ], + "value": "export interface PrintingApiContent {\n /**\n * Returns the list of hardware printers currently available to the\n * device. Each printer includes its connection status and a reference\n * that can be passed to `print()`.\n *\n * When no hardware printers are available, returns an empty array.\n * The system print dialog is not included in this list — it is the\n * default behavior when no `printer` option is provided to `print()`.\n *\n * @see {@link https://github.com/WICG/web-printing | WICG Web Printing}\n * for the emerging web standard this aligns with.\n * @returns A promise that resolves with the list of available hardware printers.\n */\n getPrinters(): Promise;\n\n /**\n * Triggers a print operation for the specified document source.\n *\n * When called without a `printer` option, opens the device's system\n * print dialog (e.g., AirPrint on iOS, Android print service). When\n * a `printer` reference is provided (from `getPrinters()`), sends\n * the content directly to that printer without showing a dialog.\n *\n * The `src` parameter accepts either:\n * - A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n * - A full URL to your app's backend\n *\n * The content at the URL is fetched with the extension's session token\n * for authentication. HTML, PDFs, and images are supported content types.\n * PDFs can only be printed via the system print dialog: selecting a\n * `printer` with a PDF `src` throws, because hardware (receipt) printers\n * render HTML and image content only.\n *\n * @param src the source URL of the content to print.\n * @param options optional configuration for the print operation.\n * @returns A promise that resolves when the print job has been\n * successfully sent. For hardware printers, this means the rasterized\n * content has been dispatched — it does not wait for physical printing\n * to complete. For the system print dialog, this resolves when the\n * content is ready and the dialog appears.\n * @throws {Error} when the content cannot be fetched from `src`.\n * @throws {Error} when the specified `printer` is not connected.\n * @throws {Error} when `src` is a PDF and a `printer` is selected, since\n * receipt printers render HTML and image content only.\n */\n print(src: string, options?: PrintOptions): Promise;\n}" + } + }, + "Printer": { + "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "name": "Printer", + "description": "A hardware printer available to the device, as returned by `shopify.printing.getPrinters()`.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "syntaxKind": "PropertySignature", + "name": "connected", + "value": "boolean", + "description": "Whether the printer is currently able to accept print jobs." + }, + { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "syntaxKind": "PropertySignature", + "name": "id", + "value": "string", + "description": "Unique identifier for this printer." + }, + { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "syntaxKind": "PropertySignature", + "name": "name", + "value": "string", + "description": "Human-readable display name (e.g., \"Star TSP143\" or \"Front Counter Printer\")." + } + ], + "value": "export interface Printer {\n /** Unique identifier for this printer. */\n id: string;\n\n /** Human-readable display name (e.g., \"Star TSP143\" or \"Front Counter Printer\"). */\n name: string;\n\n /** Whether the printer is currently able to accept print jobs. */\n connected: boolean;\n}" + } + }, + "PrintOptions": { + "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "name": "PrintOptions", + "description": "Options for `shopify.printing.print()`.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "syntaxKind": "PropertySignature", + "name": "printer", + "value": "Printer", + "description": "A printer reference obtained from `getPrinters()`. When provided, the print job is sent directly to this printer without showing a system print dialog.\n\nWhen omitted, the system print dialog is shown, allowing the user to select a printer and configure print settings.", + "isOptional": true + } + ], + "value": "export interface PrintOptions {\n /**\n * A printer reference obtained from `getPrinters()`. When provided,\n * the print job is sent directly to this printer without showing\n * a system print dialog.\n *\n * When omitted, the system print dialog is shown, allowing the\n * user to select a printer and configure print settings.\n */\n printer?: Printer;\n}" + } + }, + "PrintingApi": { + "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "name": "PrintingApi", + "description": "The `PrintingApi` object provides methods for triggering document printing and discovering available hardware printers. Access these methods through `shopify.printing`.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", + "syntaxKind": "PropertySignature", + "name": "printing", + "value": "PrintingApiContent", + "description": "The Printing API provides methods for triggering document printing and discovering available hardware printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal." + } + ], + "value": "export interface PrintingApi {\n printing: PrintingApiContent;\n}" + } + }, "StorageError": { "src/surfaces/point-of-sale/types/storage.ts": { "filePath": "src/surfaces/point-of-sale/types/storage.ts", @@ -2997,7 +3110,7 @@ "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", + "value": "{[key: string]: any} & {\n /**\n * @deprecated Use `extension.target` instead.\n */\n extensionPoint: T;\n i18n: I18n;\n} & ExtensionApi & LocaleApi & ToastApi & SessionApi & PrintApi & PrintingApi & ProductSearchApi & DeviceApi & ConnectivityApi & StorageApi & PinPadApi & CameraApi", "description": "", "isPublicDocs": true } @@ -7557,6 +7670,66 @@ "value": "interface Divider {\n /** A unique identifier for the element. */\n id?: string;\n /**\n * Specify the direction of the divider. This uses [logical properties](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values).\n * @default 'inline'\n */\n direction?: 'inline' | 'block';\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 + } + }, "BaseOutput": { "src/surfaces/point-of-sale/event/output/BaseOutput.ts": { "filePath": "src/surfaces/point-of-sale/event/output/BaseOutput.ts", @@ -7615,6 +7788,77 @@ "value": "interface ExtensionError extends Error {\n /**\n * The severity level of this error:\n * - `'error'`: A critical error that prevents the extension from completing successfully. Errors typically block the user workflow and require resolution before proceeding.\n * - `'warning'`: A non-critical issue that doesn't prevent extension execution but indicates a problem or unexpected condition. Warnings allow the workflow to continue but should be logged or displayed to users.\n */\n level: 'error' | 'warning';\n /**\n * The human-readable error message describing what went wrong. This message should be clear and actionable, helping merchants understand the issue and how to resolve it (for example, \"Product not found\", \"Invalid discount code\", \"Insufficient inventory\"). The message may be displayed to users in the POS interface depending on the error severity and context.\n */\n message: string;\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}" + } + }, + "Device": { + "src/surfaces/point-of-sale/types/device.ts": { + "filePath": "src/surfaces/point-of-sale/types/device.ts", + "name": "Device", + "description": "Defines information about the POS device where the extension is running.", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/types/device.ts", + "syntaxKind": "PropertySignature", + "name": "deviceId", + "value": "number", + "description": "The unique identifier for the POS device." + }, + { + "filePath": "src/surfaces/point-of-sale/types/device.ts", + "syntaxKind": "PropertySignature", + "name": "isTablet", + "value": "boolean", + "description": "Whether the device is a tablet form factor." + }, + { + "filePath": "src/surfaces/point-of-sale/types/device.ts", + "syntaxKind": "PropertySignature", + "name": "name", + "value": "string", + "description": "The name of the POS device." + } + ], + "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}" + } + }, "BaseApi": { "src/surfaces/point-of-sale/event/data/BaseApi.ts": { "filePath": "src/surfaces/point-of-sale/event/data/BaseApi.ts", @@ -8347,11 +8591,11 @@ "value": "export interface ReturnTransactionData extends BaseTransactionComplete {\n /**\n * The transaction type identifier, always 'Sale' for sale transactions.\n */\n transactionType: 'Return';\n /**\n * The refund ID if a refund was issued for the return.\n */\n refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n returnId?: number;\n /**\n * The exchange ID if the return is part of an exchange transaction.\n */\n exchangeId?: number;\n /**\n * An array of line items included in the sale transaction.\n */\n lineItems: LineItem[];\n}" } }, - "TransactionCompleteData": { + "TransactionCompleteWithReprintData": { "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts": { "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", - "name": "TransactionCompleteData", - "description": "The data object provided to receipt targets containing transaction details.", + "name": "TransactionCompleteWithReprintData", + "description": "The data object provided to receipt targets containing transaction details and reprint information.", "isPublicDocs": true, "members": [ { @@ -8393,433 +8637,46 @@ "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", "syntaxKind": "PropertySignature", "name": "transaction", - "value": "| SaleTransactionData\n | ReturnTransactionData\n | ExchangeTransactionData", - "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." + "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 TransactionCompleteData 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 */\n transaction:\n | SaleTransactionData\n | ReturnTransactionData\n | ExchangeTransactionData;\n}" + "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}" } }, - "Device": { - "src/surfaces/point-of-sale/types/device.ts": { - "filePath": "src/surfaces/point-of-sale/types/device.ts", - "name": "Device", - "description": "Defines information about the POS device where the extension is running.", + "DataExtensionTargets": { + "src/surfaces/point-of-sale/extension-targets.ts": { + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "name": "DataExtensionTargets", + "description": "", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/device.ts", - "syntaxKind": "PropertySignature", - "name": "deviceId", - "value": "number", - "description": "The unique identifier for the POS device." - }, - { - "filePath": "src/surfaces/point-of-sale/types/device.ts", - "syntaxKind": "PropertySignature", - "name": "isTablet", - "value": "boolean", - "description": "Whether the device is a tablet form factor." - }, - { - "filePath": "src/surfaces/point-of-sale/types/device.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "name", - "value": "string", - "description": "The name of the POS device." + "name": "pos.app.ready.data", + "value": "RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >", + "description": "A persistent background extension that starts when POS loads and runs for the session's lifetime. Use this target to observe POS events without rendering UI." } ], - "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}" + "value": "export interface DataExtensionTargets {\n /**\n * A persistent background extension that starts when POS loads and runs for\n * the session's lifetime. Use this target to observe POS events without\n * rendering UI.\n */\n 'pos.app.ready.data': RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >;\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.", - "isPublicDocs": true, + "RunnableExtension": { + "src/extension.ts": { + "filePath": "src/extension.ts", + "name": "RunnableExtension", + "description": "Defines the structure of a runnable extension, which executes logic and returns data without rendering UI.", "members": [ { - "filePath": "src/surfaces/point-of-sale/event/data/TransactionCompleteData.ts", + "filePath": "src/extension.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." + "name": "api", + "value": "Api", + "description": "The API object providing access to extension capabilities and methods. The specific API type depends on the extension target and determines what functionality is available to your extension." }, { - "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/extension-targets.ts", - "syntaxKind": "PropertySignature", - "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/extension-targets.ts", - "syntaxKind": "PropertySignature", - "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/extension-targets.ts", - "syntaxKind": "PropertySignature", - "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/extension-targets.ts", - "syntaxKind": "PropertySignature", - "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 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": { - "src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts": { - "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.", - "members": [ - { - "filePath": "src/surfaces/point-of-sale/event/data/CartUpdateEventData.ts", - "syntaxKind": "PropertySignature", - "name": "cart", - "value": "Cart", - "description": "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." - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/CartUpdateEventData.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/CartUpdateEventData.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/CartUpdateEventData.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/CartUpdateEventData.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/CartUpdateEventData.ts", - "syntaxKind": "PropertySignature", - "name": "storage", - "value": "Storage", - "description": "" - } - ], - "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}" - } - }, - "CashTrackingSessionCompleteData": { - "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.", - "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." - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.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/CashTrackingSessionData.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/CashTrackingSessionData.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/CashTrackingSessionData.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/CashTrackingSessionData.ts", - "syntaxKind": "PropertySignature", - "name": "storage", - "value": "Storage", - "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}" - } - }, - "CashTrackingSessionStartData": { - "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.", - "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." - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/CashTrackingSessionData.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/CashTrackingSessionData.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/CashTrackingSessionData.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/CashTrackingSessionData.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/CashTrackingSessionData.ts", - "syntaxKind": "PropertySignature", - "name": "storage", - "value": "Storage", - "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}" - } - }, - "DataExtensionTargets": { - "src/surfaces/point-of-sale/extension-targets.ts": { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "name": "DataExtensionTargets", - "description": "", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.app.ready.data", - "value": "RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >", - "description": "A persistent background extension that starts when POS loads and runs for the session's lifetime. Use this target to observe POS events without rendering UI." - } - ], - "value": "export interface DataExtensionTargets {\n /**\n * A persistent background extension that starts when POS loads and runs for\n * the session's lifetime. Use this target to observe POS events without\n * rendering UI.\n */\n 'pos.app.ready.data': RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >;\n}" - } - }, - "RunnableExtension": { - "src/extension.ts": { - "filePath": "src/extension.ts", - "name": "RunnableExtension", - "description": "Defines the structure of a runnable extension, which executes logic and returns data without rendering UI.", - "members": [ - { - "filePath": "src/extension.ts", - "syntaxKind": "PropertySignature", - "name": "api", - "value": "Api", - "description": "The API object providing access to extension capabilities and methods. The specific API type depends on the extension target and determines what functionality is available to your extension." - }, - { - "filePath": "src/extension.ts", + "filePath": "src/extension.ts", "syntaxKind": "PropertySignature", "name": "output", "value": "Output | Promise", @@ -9095,15 +8952,6 @@ "value": "RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >", "description": "A persistent background extension that starts when POS loads and runs for the session's lifetime. Use this target to observe POS events without rendering UI." }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "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/extension-targets.ts", "syntaxKind": "PropertySignature", @@ -9118,24 +8966,6 @@ "value": "RenderExtension<\n ActionTargetApi<'pos.cart.line-item-details.action.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n BasicComponents\n >", "description": "Renders a full-screen modal interface launched from cart line item menu items. Use this target for complex line item workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to detailed line item data through the Cart Line Item API and support workflows with multiple screens, navigation, and interactive components." }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "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/extension-targets.ts", - "syntaxKind": "PropertySignature", - "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/extension-targets.ts", "syntaxKind": "PropertySignature", @@ -9331,18 +9161,9 @@ "name": "pos.return.post.block.render", "value": "RenderExtension<\n StandardApi<'pos.return.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >", "description": "Renders a custom information section within the post-return screen. Use this target for displaying supplementary return data like completion status, refund confirmations, or follow-up workflows alongside standard return details.\n\nExtensions at this target appear as persistent blocks within the post-return interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-return operations." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "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 ExtensionTargets\n extends RenderExtensionTargets,\n EventExtensionTargets,\n DataExtensionTargets {}" + "value": "export interface ExtensionTargets\n extends RenderExtensionTargets,\n DataExtensionTargets {}" } }, "RenderExtensionTarget": { @@ -9355,16 +9176,6 @@ "isPublicDocs": true } }, - "EventExtensionTarget": { - "src/surfaces/point-of-sale/extension-targets.ts": { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "TypeAliasDeclaration", - "name": "EventExtensionTarget", - "value": "keyof EventExtensionTargets", - "description": "", - "isPublicDocs": true - } - }, "DataExtensionTarget": { "src/surfaces/point-of-sale/extension-targets.ts": { "filePath": "src/surfaces/point-of-sale/extension-targets.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..b606d6a3d6 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 @@ -13,6 +13,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -73,6 +74,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -94,6 +96,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -154,6 +157,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -192,6 +196,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -212,6 +217,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -272,6 +278,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -310,6 +317,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -330,6 +338,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -390,6 +399,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -428,6 +438,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -448,6 +459,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductApi", "ProductSearchApi", "SessionApi", @@ -509,6 +521,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductApi", "ProductSearchApi", "ScannerApi", @@ -548,6 +561,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductApi", "ProductSearchApi", "SessionApi", @@ -570,6 +584,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -631,6 +646,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -670,6 +686,7 @@ "OrderApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -691,6 +708,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -752,6 +770,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -791,6 +810,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -812,6 +832,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -873,6 +894,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -912,6 +934,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -933,6 +956,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -995,6 +1019,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -1036,6 +1061,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", @@ -1096,6 +1122,7 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "ScannerApi", "SessionApi", @@ -1134,28 +1161,13 @@ "LocaleApi", "PinPadApi", "PrintApi", + "PrintingApi", "ProductSearchApi", "SessionApi", "StorageApi", "ToastApi" ] }, - "pos.transaction-complete.event.observe": { - "components": [], - "apis": [] - }, - "pos.cash-tracking-session-start.event.observe": { - "components": [], - "apis": [] - }, - "pos.cash-tracking-session-complete.event.observe": { - "components": [], - "apis": [] - }, - "pos.cart-update.event.observe": { - "components": [], - "apis": [] - }, "ActionApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", @@ -1423,6 +1435,38 @@ "pos.return.post.block.render" ] }, + "PrintingApi": { + "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" + ] + }, "ProductSearchApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", From 6ad9eb98a075de4d600aecd914ab56cde71cd7c2 Mon Sep 17 00:00:00 2001 From: Victor Chu Date: Fri, 3 Jul 2026 11:10:23 -0700 Subject: [PATCH 2/6] docs(pos): update printing and background target data Assisted-By: devx/8ba453a3-96d0-4701-a8cc-43c4651bd027 --- .../point-of-sale/build-docs-targets-json.mjs | 40 ++++++- .../2026-07-rc/generated_docs_data_v2.json | 14 +-- .../pos_ui_extensions/2026-07-rc/targets.json | 101 +++++++++++------- .../api/printing-api/printing-api.ts | 18 ++-- 4 files changed, 117 insertions(+), 56 deletions(-) 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..311a39a8c7 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 @@ -177,6 +177,40 @@ function parseTargetsFile() { return targets; } +/** + * Parse DataExtensionTargets from extension-targets.ts and return + * a map of target name -> { components: [], apis } so non-rendering + * background targets appear in the JSON. + */ +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 runnableExtensionContent = match[2] + .trim() + .replace(/\/\/[^\n]*/g, '') + .replace(/\/\*[\s\S]*?\*\//g, ''); + const [apiString] = splitByTopLevelComma(runnableExtensionContent); + + targets[targetName] = { + components: [], + apis: parseApis(apiString ?? '').sort(), + }; + } + + return targets; +} + /** * Parse EventExtensionTargets from extension-targets.ts and return * a map of target name -> { components: [], apis: [] } so all extension @@ -272,6 +306,7 @@ function getNestedApis(apiName) { CartLineItemApi: ['./api/cart-line-item-api/cart-line-item-api'], CashDrawerApi: ['./api/cash-drawer-api/cash-drawer-api'], PinPadApi: ['./api/pin-pad-api'], + DataTargetApi: ['./api/data-target-api/data-target-api'], }; const relativePaths = apiFilePaths[apiName]; @@ -366,7 +401,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']); +const COMPOSITE_APIS = new Set(['StandardApi', 'ActionTargetApi', 'DataTargetApi']); function parseApis(apiString) { const apisSet = new Set(); @@ -506,8 +541,9 @@ function findGeneratedDocsPath() { // Generate the JSON (render targets + event targets) const renderTargets = parseTargetsFile(); const fileContent = fs.readFileSync(TARGETS_FILE_PATH, 'utf-8'); +const dataTargets = parseDataTargetsFile(fileContent); const eventTargets = parseEventTargetsFile(fileContent); -const targetsJson = {...renderTargets, ...eventTargets}; +const targetsJson = {...dataTargets, ...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 7ab8ddd4e1..50e3a5d592 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 @@ -2717,7 +2717,7 @@ "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", "name": "PrintingApiContent", - "description": "The Printing API provides methods for triggering document printing and discovering available hardware printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal.", + "description": "The Printing API provides methods for triggering document printing and discovering available receipt printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal.", "isPublicDocs": true, "members": [ { @@ -2725,24 +2725,24 @@ "syntaxKind": "MethodSignature", "name": "getPrinters", "value": "() => Promise", - "description": "Returns the list of hardware printers currently available to the device. Each printer includes its connection status and a reference that can be passed to `print()`.\n\nWhen no hardware printers are available, returns an empty array. The system print dialog is not included in this list — it is the default behavior when no `printer` option is provided to `print()`." + "description": "Returns the list of receipt printers currently available to the device. Each printer includes its connection status and a reference that can be passed to `print()`.\n\nWhen no receipt printers are available, returns an empty array. The system print dialog is not included in this list — it is the default behavior when no `printer` option is provided to `print()`." }, { "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", "syntaxKind": "MethodSignature", "name": "print", "value": "(src: string, options?: PrintOptions) => Promise", - "description": "Triggers a print operation for the specified document source.\n\nWhen called without a `printer` option, opens the device's system print dialog (e.g., AirPrint on iOS, Android print service). When a `printer` reference is provided (from `getPrinters()`), sends the content directly to that printer without showing a dialog.\n\nThe `src` parameter accepts either:\n- A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n- A full URL to your app's backend\n\nThe content at the URL is fetched with the extension's session token for authentication. HTML, PDFs, and images are supported content types. PDFs can only be printed via the system print dialog: selecting a `printer` with a PDF `src` throws, because hardware (receipt) printers render HTML and image content only." + "description": "Triggers a print operation for the specified document source.\n\nWhen called without a `printer` option, opens the device's system print dialog (e.g., AirPrint on iOS, Android print service). When a `printer` reference is provided (from `getPrinters()`), sends the content directly to that printer without showing a dialog.\n\nThe `src` parameter accepts either:\n- A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n- A full URL to your app's backend\n\nThe content at the URL is fetched with the extension's session token for authentication. HTML, PDFs, and images are supported content types. PDFs can only be printed via the system print dialog: selecting a `printer` with a PDF `src` throws, because receipt printers render HTML and image content only." } ], - "value": "export interface PrintingApiContent {\n /**\n * Returns the list of hardware printers currently available to the\n * device. Each printer includes its connection status and a reference\n * that can be passed to `print()`.\n *\n * When no hardware printers are available, returns an empty array.\n * The system print dialog is not included in this list — it is the\n * default behavior when no `printer` option is provided to `print()`.\n *\n * @see {@link https://github.com/WICG/web-printing | WICG Web Printing}\n * for the emerging web standard this aligns with.\n * @returns A promise that resolves with the list of available hardware printers.\n */\n getPrinters(): Promise;\n\n /**\n * Triggers a print operation for the specified document source.\n *\n * When called without a `printer` option, opens the device's system\n * print dialog (e.g., AirPrint on iOS, Android print service). When\n * a `printer` reference is provided (from `getPrinters()`), sends\n * the content directly to that printer without showing a dialog.\n *\n * The `src` parameter accepts either:\n * - A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n * - A full URL to your app's backend\n *\n * The content at the URL is fetched with the extension's session token\n * for authentication. HTML, PDFs, and images are supported content types.\n * PDFs can only be printed via the system print dialog: selecting a\n * `printer` with a PDF `src` throws, because hardware (receipt) printers\n * render HTML and image content only.\n *\n * @param src the source URL of the content to print.\n * @param options optional configuration for the print operation.\n * @returns A promise that resolves when the print job has been\n * successfully sent. For hardware printers, this means the rasterized\n * content has been dispatched — it does not wait for physical printing\n * to complete. For the system print dialog, this resolves when the\n * content is ready and the dialog appears.\n * @throws {Error} when the content cannot be fetched from `src`.\n * @throws {Error} when the specified `printer` is not connected.\n * @throws {Error} when `src` is a PDF and a `printer` is selected, since\n * receipt printers render HTML and image content only.\n */\n print(src: string, options?: PrintOptions): Promise;\n}" + "value": "export interface PrintingApiContent {\n /**\n * Returns the list of receipt printers currently available to the\n * device. Each printer includes its connection status and a reference\n * that can be passed to `print()`.\n *\n * When no receipt printers are available, returns an empty array.\n * The system print dialog is not included in this list — it is the\n * default behavior when no `printer` option is provided to `print()`.\n *\n * @see {@link https://github.com/WICG/web-printing | WICG Web Printing}\n * for the emerging web standard this aligns with.\n * @returns A promise that resolves with the list of available receipt printers.\n */\n getPrinters(): Promise;\n\n /**\n * Triggers a print operation for the specified document source.\n *\n * When called without a `printer` option, opens the device's system\n * print dialog (e.g., AirPrint on iOS, Android print service). When\n * a `printer` reference is provided (from `getPrinters()`), sends\n * the content directly to that printer without showing a dialog.\n *\n * The `src` parameter accepts either:\n * - A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n * - A full URL to your app's backend\n *\n * The content at the URL is fetched with the extension's session token\n * for authentication. HTML, PDFs, and images are supported content types.\n * PDFs can only be printed via the system print dialog: selecting a\n * `printer` with a PDF `src` throws, because receipt printers render HTML\n * and image content only.\n *\n * @param src the source URL of the content to print.\n * @param options optional configuration for the print operation.\n * @returns A promise that resolves when the print job has been\n * successfully sent. For receipt printers, this means the rasterized\n * content has been dispatched — it does not wait for physical printing\n * to complete. For the system print dialog, this resolves when the\n * content is ready and the dialog appears.\n * @throws {Error} when the content cannot be fetched from `src`.\n * @throws {Error} when the specified `printer` is not connected.\n * @throws {Error} when `src` is a PDF and a `printer` is selected, since\n * receipt printers render HTML and image content only.\n */\n print(src: string, options?: PrintOptions): Promise;\n}" } }, "Printer": { "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", "name": "Printer", - "description": "A hardware printer available to the device, as returned by `shopify.printing.getPrinters()`.", + "description": "A receipt printer available to the device, as returned by `shopify.printing.getPrinters()`.", "isPublicDocs": true, "members": [ { @@ -2793,7 +2793,7 @@ "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", "name": "PrintingApi", - "description": "The `PrintingApi` object provides methods for triggering document printing and discovering available hardware printers. Access these methods through `shopify.printing`.", + "description": "The `PrintingApi` object provides methods for triggering document printing and discovering available receipt printers. Access these methods through `shopify.printing`.", "isPublicDocs": true, "members": [ { @@ -2801,7 +2801,7 @@ "syntaxKind": "PropertySignature", "name": "printing", "value": "PrintingApiContent", - "description": "The Printing API provides methods for triggering document printing and discovering available hardware printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal." + "description": "The Printing API provides methods for triggering document printing and discovering available receipt printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal." } ], "value": "export interface PrintingApi {\n printing: PrintingApiContent;\n}" 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 b606d6a3d6..ba846d9f94 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 @@ -1,4 +1,17 @@ { + "pos.app.ready.data": { + "components": [], + "apis": [ + "ConnectivityApi", + "DeviceApi", + "ExtensionApi", + "LocaleApi", + "ProductSearchApi", + "ReadonlyCartApi", + "SessionApi", + "StorageApi" + ] + }, "pos.home.tile.render": { "components": [ "Tile" @@ -1168,31 +1181,42 @@ "ToastApi" ] }, - "ActionApi": { + "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", + "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" ] }, - "CameraApi": { + "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", @@ -1223,8 +1247,9 @@ "pos.return.post.block.render" ] }, - "CartApi": { + "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", @@ -1233,6 +1258,9 @@ "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", @@ -1240,11 +1268,21 @@ "pos.order-details.block.render", "pos.product-details.action.menu-item.render", "pos.product-details.action.render", - "pos.product-details.block.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" ] }, - "ConnectivityApi": { + "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", @@ -1275,8 +1313,9 @@ "pos.return.post.block.render" ] }, - "DeviceApi": { + "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", @@ -1307,8 +1346,14 @@ "pos.return.post.block.render" ] }, - "ExtensionApi": { + "ReadonlyCartApi": { "targets": [ + "pos.app.ready.data" + ] + }, + "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", @@ -1339,8 +1384,9 @@ "pos.return.post.block.render" ] }, - "LocaleApi": { + "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", @@ -1363,6 +1409,8 @@ "pos.purchase.post.action.menu-item.render", "pos.purchase.post.action.render", "pos.purchase.post.block.render", + "pos.receipt-footer.block.render", + "pos.receipt-header.block.render", "pos.register-details.action.menu-item.render", "pos.register-details.action.render", "pos.register-details.block.render", @@ -1371,39 +1419,30 @@ "pos.return.post.block.render" ] }, - "PinPadApi": { + "ActionApi": { "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" ] }, - "PrintApi": { + "CameraApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", @@ -1435,7 +1474,7 @@ "pos.return.post.block.render" ] }, - "PrintingApi": { + "CartApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", @@ -1445,9 +1484,6 @@ "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", @@ -1455,19 +1491,10 @@ "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" + "pos.product-details.block.render" ] }, - "ProductSearchApi": { + "PinPadApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", @@ -1499,7 +1526,7 @@ "pos.return.post.block.render" ] }, - "SessionApi": { + "PrintApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", @@ -1531,7 +1558,7 @@ "pos.return.post.block.render" ] }, - "StorageApi": { + "PrintingApi": { "targets": [ "pos.cart.line-item-details.action.menu-item.render", "pos.cart.line-item-details.action.render", @@ -1555,8 +1582,6 @@ "pos.purchase.post.action.menu-item.render", "pos.purchase.post.action.render", "pos.purchase.post.block.render", - "pos.receipt-footer.block.render", - "pos.receipt-header.block.render", "pos.register-details.action.menu-item.render", "pos.register-details.action.render", "pos.register-details.block.render", diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/printing-api/printing-api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/printing-api/printing-api.ts index 3ed54272d2..2f7db84fb0 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api/printing-api/printing-api.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/printing-api/printing-api.ts @@ -1,6 +1,6 @@ /** * The Printing API provides methods for triggering document printing and - * discovering available hardware printers. Content is fetched from a URL + * discovering available receipt printers. Content is fetched from a URL * and can be sent to a specific printer or to the system print dialog. * * Accessed via `shopify.printing`, aligning with the web platform's @@ -16,17 +16,17 @@ */ export interface PrintingApiContent { /** - * Returns the list of hardware printers currently available to the + * Returns the list of receipt printers currently available to the * device. Each printer includes its connection status and a reference * that can be passed to `print()`. * - * When no hardware printers are available, returns an empty array. + * When no receipt printers are available, returns an empty array. * The system print dialog is not included in this list — it is the * default behavior when no `printer` option is provided to `print()`. * * @see {@link https://github.com/WICG/web-printing | WICG Web Printing} * for the emerging web standard this aligns with. - * @returns A promise that resolves with the list of available hardware printers. + * @returns A promise that resolves with the list of available receipt printers. */ getPrinters(): Promise; @@ -45,13 +45,13 @@ export interface PrintingApiContent { * The content at the URL is fetched with the extension's session token * for authentication. HTML, PDFs, and images are supported content types. * PDFs can only be printed via the system print dialog: selecting a - * `printer` with a PDF `src` throws, because hardware (receipt) printers - * render HTML and image content only. + * `printer` with a PDF `src` throws, because receipt printers render HTML + * and image content only. * * @param src the source URL of the content to print. * @param options optional configuration for the print operation. * @returns A promise that resolves when the print job has been - * successfully sent. For hardware printers, this means the rasterized + * successfully sent. For receipt printers, this means the rasterized * content has been dispatched — it does not wait for physical printing * to complete. For the system print dialog, this resolves when the * content is ready and the dialog appears. @@ -80,7 +80,7 @@ export interface PrintOptions { } /** - * A hardware printer available to the device, as returned by `shopify.printing.getPrinters()`. + * A receipt printer available to the device, as returned by `shopify.printing.getPrinters()`. * @publicDocs */ export interface Printer { @@ -96,7 +96,7 @@ export interface Printer { /** * The `PrintingApi` object provides methods for triggering document printing - * and discovering available hardware printers. Access these methods through + * and discovering available receipt printers. Access these methods through * `shopify.printing`. * @publicDocs */ From 2bf4d30ca69c4a071691dc49c3eede974fbe0e45 Mon Sep 17 00:00:00 2001 From: Victor Chu Date: Fri, 3 Jul 2026 14:36:33 -0700 Subject: [PATCH 3/6] docs(pos): restore hardware printer wording Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4 --- .../2026-07-rc/generated_docs_data_v2.json | 14 +++++++------- .../api/printing-api/printing-api.ts | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) 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 50e3a5d592..8df9d957f9 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 @@ -2717,7 +2717,7 @@ "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", "name": "PrintingApiContent", - "description": "The Printing API provides methods for triggering document printing and discovering available receipt printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal.", + "description": "The Printing API provides methods for triggering document printing and discovering available hardware printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal.", "isPublicDocs": true, "members": [ { @@ -2725,24 +2725,24 @@ "syntaxKind": "MethodSignature", "name": "getPrinters", "value": "() => Promise", - "description": "Returns the list of receipt printers currently available to the device. Each printer includes its connection status and a reference that can be passed to `print()`.\n\nWhen no receipt printers are available, returns an empty array. The system print dialog is not included in this list — it is the default behavior when no `printer` option is provided to `print()`." + "description": "Returns the list of hardware printers currently available to the device. Each printer includes its connection status and a reference that can be passed to `print()`.\n\nWhen no hardware printers are available, returns an empty array. The system print dialog is not included in this list — it is the default behavior when no `printer` option is provided to `print()`." }, { "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", "syntaxKind": "MethodSignature", "name": "print", "value": "(src: string, options?: PrintOptions) => Promise", - "description": "Triggers a print operation for the specified document source.\n\nWhen called without a `printer` option, opens the device's system print dialog (e.g., AirPrint on iOS, Android print service). When a `printer` reference is provided (from `getPrinters()`), sends the content directly to that printer without showing a dialog.\n\nThe `src` parameter accepts either:\n- A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n- A full URL to your app's backend\n\nThe content at the URL is fetched with the extension's session token for authentication. HTML, PDFs, and images are supported content types. PDFs can only be printed via the system print dialog: selecting a `printer` with a PDF `src` throws, because receipt printers render HTML and image content only." + "description": "Triggers a print operation for the specified document source.\n\nWhen called without a `printer` option, opens the device's system print dialog (e.g., AirPrint on iOS, Android print service). When a `printer` reference is provided (from `getPrinters()`), sends the content directly to that printer without showing a dialog.\n\nThe `src` parameter accepts either:\n- A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n- A full URL to your app's backend\n\nThe content at the URL is fetched with the extension's session token for authentication. HTML, PDFs, and images are supported content types. PDFs can only be printed via the system print dialog: selecting a `printer` with a PDF `src` throws, because hardware (receipt) printers render HTML and image content only." } ], - "value": "export interface PrintingApiContent {\n /**\n * Returns the list of receipt printers currently available to the\n * device. Each printer includes its connection status and a reference\n * that can be passed to `print()`.\n *\n * When no receipt printers are available, returns an empty array.\n * The system print dialog is not included in this list — it is the\n * default behavior when no `printer` option is provided to `print()`.\n *\n * @see {@link https://github.com/WICG/web-printing | WICG Web Printing}\n * for the emerging web standard this aligns with.\n * @returns A promise that resolves with the list of available receipt printers.\n */\n getPrinters(): Promise;\n\n /**\n * Triggers a print operation for the specified document source.\n *\n * When called without a `printer` option, opens the device's system\n * print dialog (e.g., AirPrint on iOS, Android print service). When\n * a `printer` reference is provided (from `getPrinters()`), sends\n * the content directly to that printer without showing a dialog.\n *\n * The `src` parameter accepts either:\n * - A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n * - A full URL to your app's backend\n *\n * The content at the URL is fetched with the extension's session token\n * for authentication. HTML, PDFs, and images are supported content types.\n * PDFs can only be printed via the system print dialog: selecting a\n * `printer` with a PDF `src` throws, because receipt printers render HTML\n * and image content only.\n *\n * @param src the source URL of the content to print.\n * @param options optional configuration for the print operation.\n * @returns A promise that resolves when the print job has been\n * successfully sent. For receipt printers, this means the rasterized\n * content has been dispatched — it does not wait for physical printing\n * to complete. For the system print dialog, this resolves when the\n * content is ready and the dialog appears.\n * @throws {Error} when the content cannot be fetched from `src`.\n * @throws {Error} when the specified `printer` is not connected.\n * @throws {Error} when `src` is a PDF and a `printer` is selected, since\n * receipt printers render HTML and image content only.\n */\n print(src: string, options?: PrintOptions): Promise;\n}" + "value": "export interface PrintingApiContent {\n /**\n * Returns the list of hardware printers currently available to the\n * device. Each printer includes its connection status and a reference\n * that can be passed to `print()`.\n *\n * When no hardware printers are available, returns an empty array.\n * The system print dialog is not included in this list — it is the\n * default behavior when no `printer` option is provided to `print()`.\n *\n * @see {@link https://github.com/WICG/web-printing | WICG Web Printing}\n * for the emerging web standard this aligns with.\n * @returns A promise that resolves with the list of available hardware printers.\n */\n getPrinters(): Promise;\n\n /**\n * Triggers a print operation for the specified document source.\n *\n * When called without a `printer` option, opens the device's system\n * print dialog (e.g., AirPrint on iOS, Android print service). When\n * a `printer` reference is provided (from `getPrinters()`), sends\n * the content directly to that printer without showing a dialog.\n *\n * The `src` parameter accepts either:\n * - A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n * - A full URL to your app's backend\n *\n * The content at the URL is fetched with the extension's session token\n * for authentication. HTML, PDFs, and images are supported content types.\n * PDFs can only be printed via the system print dialog: selecting a\n * `printer` with a PDF `src` throws, because receipt printers render HTML\n * and image content only.\n *\n * @param src the source URL of the content to print.\n * @param options optional configuration for the print operation.\n * @returns A promise that resolves when the print job has been\n * successfully sent. For hardware printers, this means the rasterized\n * content has been dispatched — it does not wait for physical printing\n * to complete. For the system print dialog, this resolves when the\n * content is ready and the dialog appears.\n * @throws {Error} when the content cannot be fetched from `src`.\n * @throws {Error} when the specified `printer` is not connected.\n * @throws {Error} when `src` is a PDF and a `printer` is selected, since\n * receipt printers render HTML and image content only.\n */\n print(src: string, options?: PrintOptions): Promise;\n}" } }, "Printer": { "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", "name": "Printer", - "description": "A receipt printer available to the device, as returned by `shopify.printing.getPrinters()`.", + "description": "A hardware printer available to the device, as returned by `shopify.printing.getPrinters()`.", "isPublicDocs": true, "members": [ { @@ -2793,7 +2793,7 @@ "src/surfaces/point-of-sale/api/printing-api/printing-api.ts": { "filePath": "src/surfaces/point-of-sale/api/printing-api/printing-api.ts", "name": "PrintingApi", - "description": "The `PrintingApi` object provides methods for triggering document printing and discovering available receipt printers. Access these methods through `shopify.printing`.", + "description": "The `PrintingApi` object provides methods for triggering document printing and discovering available hardware printers. Access these methods through `shopify.printing`.", "isPublicDocs": true, "members": [ { @@ -2801,7 +2801,7 @@ "syntaxKind": "PropertySignature", "name": "printing", "value": "PrintingApiContent", - "description": "The Printing API provides methods for triggering document printing and discovering available receipt printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal." + "description": "The Printing API provides methods for triggering document printing and discovering available hardware printers. Content is fetched from a URL and can be sent to a specific printer or to the system print dialog.\n\nAccessed via `shopify.printing`, aligning with the web platform's `navigator.printing` namespace from the WICG Web Printing proposal." } ], "value": "export interface PrintingApi {\n printing: PrintingApiContent;\n}" diff --git a/packages/ui-extensions/src/surfaces/point-of-sale/api/printing-api/printing-api.ts b/packages/ui-extensions/src/surfaces/point-of-sale/api/printing-api/printing-api.ts index 2f7db84fb0..3ed54272d2 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/api/printing-api/printing-api.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/api/printing-api/printing-api.ts @@ -1,6 +1,6 @@ /** * The Printing API provides methods for triggering document printing and - * discovering available receipt printers. Content is fetched from a URL + * discovering available hardware printers. Content is fetched from a URL * and can be sent to a specific printer or to the system print dialog. * * Accessed via `shopify.printing`, aligning with the web platform's @@ -16,17 +16,17 @@ */ export interface PrintingApiContent { /** - * Returns the list of receipt printers currently available to the + * Returns the list of hardware printers currently available to the * device. Each printer includes its connection status and a reference * that can be passed to `print()`. * - * When no receipt printers are available, returns an empty array. + * When no hardware printers are available, returns an empty array. * The system print dialog is not included in this list — it is the * default behavior when no `printer` option is provided to `print()`. * * @see {@link https://github.com/WICG/web-printing | WICG Web Printing} * for the emerging web standard this aligns with. - * @returns A promise that resolves with the list of available receipt printers. + * @returns A promise that resolves with the list of available hardware printers. */ getPrinters(): Promise; @@ -45,13 +45,13 @@ export interface PrintingApiContent { * The content at the URL is fetched with the extension's session token * for authentication. HTML, PDFs, and images are supported content types. * PDFs can only be printed via the system print dialog: selecting a - * `printer` with a PDF `src` throws, because receipt printers render HTML - * and image content only. + * `printer` with a PDF `src` throws, because hardware (receipt) printers + * render HTML and image content only. * * @param src the source URL of the content to print. * @param options optional configuration for the print operation. * @returns A promise that resolves when the print job has been - * successfully sent. For receipt printers, this means the rasterized + * successfully sent. For hardware printers, this means the rasterized * content has been dispatched — it does not wait for physical printing * to complete. For the system print dialog, this resolves when the * content is ready and the dialog appears. @@ -80,7 +80,7 @@ export interface PrintOptions { } /** - * A receipt printer available to the device, as returned by `shopify.printing.getPrinters()`. + * A hardware printer available to the device, as returned by `shopify.printing.getPrinters()`. * @publicDocs */ export interface Printer { @@ -96,7 +96,7 @@ export interface Printer { /** * The `PrintingApi` object provides methods for triggering document printing - * and discovering available receipt printers. Access these methods through + * and discovering available hardware printers. Access these methods through * `shopify.printing`. * @publicDocs */ From 745715f75eb375a01f0566d25f684460397d685a Mon Sep 17 00:00:00 2001 From: Victor Chu Date: Fri, 3 Jul 2026 14:43:48 -0700 Subject: [PATCH 4/6] docs(pos): regenerate event listener docs data Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4 --- .../2026-07-rc/generated_docs_data_v2.json | 12 ++++++------ .../src/surfaces/point-of-sale/events.ts | 8 +++++++- 2 files changed, 13 insertions(+), 7 deletions(-) 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 8df9d957f9..df26c59f7b 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 @@ -2735,7 +2735,7 @@ "description": "Triggers a print operation for the specified document source.\n\nWhen called without a `printer` option, opens the device's system print dialog (e.g., AirPrint on iOS, Android print service). When a `printer` reference is provided (from `getPrinters()`), sends the content directly to that printer without showing a dialog.\n\nThe `src` parameter accepts either:\n- A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n- A full URL to your app's backend\n\nThe content at the URL is fetched with the extension's session token for authentication. HTML, PDFs, and images are supported content types. PDFs can only be printed via the system print dialog: selecting a `printer` with a PDF `src` throws, because hardware (receipt) printers render HTML and image content only." } ], - "value": "export interface PrintingApiContent {\n /**\n * Returns the list of hardware printers currently available to the\n * device. Each printer includes its connection status and a reference\n * that can be passed to `print()`.\n *\n * When no hardware printers are available, returns an empty array.\n * The system print dialog is not included in this list — it is the\n * default behavior when no `printer` option is provided to `print()`.\n *\n * @see {@link https://github.com/WICG/web-printing | WICG Web Printing}\n * for the emerging web standard this aligns with.\n * @returns A promise that resolves with the list of available hardware printers.\n */\n getPrinters(): Promise;\n\n /**\n * Triggers a print operation for the specified document source.\n *\n * When called without a `printer` option, opens the device's system\n * print dialog (e.g., AirPrint on iOS, Android print service). When\n * a `printer` reference is provided (from `getPrinters()`), sends\n * the content directly to that printer without showing a dialog.\n *\n * The `src` parameter accepts either:\n * - A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n * - A full URL to your app's backend\n *\n * The content at the URL is fetched with the extension's session token\n * for authentication. HTML, PDFs, and images are supported content types.\n * PDFs can only be printed via the system print dialog: selecting a\n * `printer` with a PDF `src` throws, because receipt printers render HTML\n * and image content only.\n *\n * @param src the source URL of the content to print.\n * @param options optional configuration for the print operation.\n * @returns A promise that resolves when the print job has been\n * successfully sent. For hardware printers, this means the rasterized\n * content has been dispatched — it does not wait for physical printing\n * to complete. For the system print dialog, this resolves when the\n * content is ready and the dialog appears.\n * @throws {Error} when the content cannot be fetched from `src`.\n * @throws {Error} when the specified `printer` is not connected.\n * @throws {Error} when `src` is a PDF and a `printer` is selected, since\n * receipt printers render HTML and image content only.\n */\n print(src: string, options?: PrintOptions): Promise;\n}" + "value": "export interface PrintingApiContent {\n /**\n * Returns the list of hardware printers currently available to the\n * device. Each printer includes its connection status and a reference\n * that can be passed to `print()`.\n *\n * When no hardware printers are available, returns an empty array.\n * The system print dialog is not included in this list — it is the\n * default behavior when no `printer` option is provided to `print()`.\n *\n * @see {@link https://github.com/WICG/web-printing | WICG Web Printing}\n * for the emerging web standard this aligns with.\n * @returns A promise that resolves with the list of available hardware printers.\n */\n getPrinters(): Promise;\n\n /**\n * Triggers a print operation for the specified document source.\n *\n * When called without a `printer` option, opens the device's system\n * print dialog (e.g., AirPrint on iOS, Android print service). When\n * a `printer` reference is provided (from `getPrinters()`), sends\n * the content directly to that printer without showing a dialog.\n *\n * The `src` parameter accepts either:\n * - A relative path that will be appended to your app's [`application_url`](/docs/apps/build/cli-for-apps/app-configuration)\n * - A full URL to your app's backend\n *\n * The content at the URL is fetched with the extension's session token\n * for authentication. HTML, PDFs, and images are supported content types.\n * PDFs can only be printed via the system print dialog: selecting a\n * `printer` with a PDF `src` throws, because hardware (receipt) printers\n * render HTML and image content only.\n *\n * @param src the source URL of the content to print.\n * @param options optional configuration for the print operation.\n * @returns A promise that resolves when the print job has been\n * successfully sent. For hardware printers, this means the rasterized\n * content has been dispatched — it does not wait for physical printing\n * to complete. For the system print dialog, this resolves when the\n * content is ready and the dialog appears.\n * @throws {Error} when the content cannot be fetched from `src`.\n * @throws {Error} when the specified `printer` is not connected.\n * @throws {Error} when `src` is a PDF and a `printer` is selected, since\n * receipt printers render HTML and image content only.\n */\n print(src: string, options?: PrintOptions): Promise;\n}" } }, "Printer": { @@ -3983,7 +3983,7 @@ "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`.", + "description": "Maps Shopify POS event names to their corresponding payload types.\n\nUsed as the generic type parameter for `shopify.addEventListener` and `shopify.removeEventListener`.", "isPublicDocs": true, "members": [ { @@ -3991,24 +3991,24 @@ "syntaxKind": "PropertySignature", "name": "cashtrackingsessioncomplete", "value": "CashTrackingSessionCompleteEvent", - "description": "" + "description": "Dispatched when a cash tracking session closes after reconciliation." }, { "filePath": "src/surfaces/point-of-sale/events.ts", "syntaxKind": "PropertySignature", "name": "cashtrackingsessionstart", "value": "CashTrackingSessionStartEvent", - "description": "" + "description": "Dispatched when a cash tracking session opens." }, { "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." + "description": "Dispatched when a sale, return, or exchange transaction completes. Narrow 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}" + "value": "export interface ShopifyEventMap {\n /**\n * Dispatched when a sale, return, or exchange transaction completes.\n * Narrow on `transactionType` to access per-type fields.\n */\n [POS_EVENT_NAMES.TRANSACTION_COMPLETE]: TransactionCompleteEvent;\n /** Dispatched when a cash tracking session opens. */\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent;\n /** Dispatched when a cash tracking session closes after reconciliation. */\n [POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent;\n}" } }, "CustomerApi": { 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 f8100cb31a..2cb0150cda 100644 --- a/packages/ui-extensions/src/surfaces/point-of-sale/events.ts +++ b/packages/ui-extensions/src/surfaces/point-of-sale/events.ts @@ -17,7 +17,7 @@ export const POS_EVENT_NAMES = { } as const; /** - * Maps Shopify POS event names to their corresponding `Event` subclass types. + * Maps Shopify POS event names to their corresponding payload types. * * Used as the generic type parameter for `shopify.addEventListener` and * `shopify.removeEventListener`. @@ -25,8 +25,14 @@ export const POS_EVENT_NAMES = { * @publicDocs */ export interface ShopifyEventMap { + /** + * Dispatched when a sale, return, or exchange transaction completes. + * Narrow on `transactionType` to access per-type fields. + */ [POS_EVENT_NAMES.TRANSACTION_COMPLETE]: TransactionCompleteEvent; + /** Dispatched when a cash tracking session opens. */ [POS_EVENT_NAMES.CASH_TRACKING_SESSION_START]: CashTrackingSessionStartEvent; + /** Dispatched when a cash tracking session closes after reconciliation. */ [POS_EVENT_NAMES.CASH_TRACKING_SESSION_COMPLETE]: CashTrackingSessionCompleteEvent; } From 811ca2320d169c956d5516e9bc8ac5e4469e9b9a Mon Sep 17 00:00:00 2001 From: Victor Chu Date: Fri, 3 Jul 2026 14:54:03 -0700 Subject: [PATCH 5/6] docs(pos): regenerate after receipt target removal Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4 --- .../2026-07-rc/generated_docs_data_v2.json | 960 ++++++++---------- .../pos_ui_extensions/2026-07-rc/targets.json | 76 -- 2 files changed, 421 insertions(+), 615 deletions(-) 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 df26c59f7b..c1f120365c 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 @@ -7700,22 +7700,12 @@ "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'", + "value": "'Badge' | 'Banner' | 'Box' | 'Button' | 'Choice' | 'ChoiceList' | 'Clickable' | 'DateField' | 'DatePicker' | 'DateSpinner' | 'Divider' | 'EmailField' | 'Embed' | 'EmptyState' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Modal' | 'NumberField' | 'Page' | 'POSBlock' | 'PosBlock' | 'Route' | 'Router' | 'ScrollBox' | 'SearchField' | 'Section' | 'Spinner' | 'Stack' | 'Switch' | 'Tab' | 'TabList' | 'TabPanel' | 'Tabs' | 'Text' | 'TextArea' | 'TextField' | 'Tile' | 'TimeField' | 'TimePicker'", "description": "", "isPublicDocs": true } @@ -7725,7 +7715,7 @@ "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'", + "value": "'Badge' | 'Banner' | 'Box' | 'Button' | 'Choice' | 'ChoiceList' | 'Clickable' | 'DateField' | 'DatePicker' | 'DateSpinner' | 'Divider' | 'EmailField' | 'Embed' | 'EmptyState' | 'Heading' | 'Icon' | 'Image' | 'Link' | 'Modal' | 'NumberField' | 'Page' | 'POSBlock' | 'PosBlock' | 'Route' | 'Router' | 'ScrollBox' | 'SearchField' | 'Section' | 'Spinner' | 'Stack' | 'Switch' | 'Tab' | 'TabList' | 'TabPanel' | 'Tabs' | 'Text' | 'TextArea' | 'TextField' | 'TimeField' | 'TimePicker'", "description": "", "isPublicDocs": true } @@ -7888,283 +7878,352 @@ "isPublicDocs": true } }, - "BaseTransactionComplete": { - "src/surfaces/point-of-sale/types/base-transaction-complete.ts": { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", - "name": "BaseTransactionComplete", - "description": "Base interface for completed transaction data shared across all transaction types.", + "DataExtensionTargets": { + "src/surfaces/point-of-sale/extension-targets.ts": { + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "name": "DataExtensionTargets", + "description": "", "isPublicDocs": true, "members": [ { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "balanceDue", - "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." - }, + "name": "pos.app.ready.data", + "value": "RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >", + "description": "A persistent background extension that starts when POS loads and runs for the session's lifetime. Use this target to observe POS events without rendering UI." + } + ], + "value": "export interface DataExtensionTargets {\n /**\n * A persistent background extension that starts when POS loads and runs for\n * the session's lifetime. Use this target to observe POS events without\n * rendering UI.\n */\n 'pos.app.ready.data': RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >;\n}" + } + }, + "RunnableExtension": { + "src/extension.ts": { + "filePath": "src/extension.ts", + "name": "RunnableExtension", + "description": "Defines the structure of a runnable extension, which executes logic and returns data without rendering UI.", + "members": [ { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/extension.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": "api", + "value": "Api", + "description": "The API object providing access to extension capabilities and methods. The specific API type depends on the extension target and determines what functionality is available to your extension." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/extension.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": "output", + "value": "Output | Promise", + "description": "The function output. Your extension function should return the expected output type or a Promise that resolves to that type. The output type is determined by your specific extension target and use case." + } + ], + "value": "export interface RunnableExtension {\n /**\n * The API object providing access to extension capabilities and methods. The specific API type depends on the extension target and determines what functionality is available to your extension.\n */\n api: Api;\n /**\n * The function output. Your extension function should return the expected output type or a Promise that resolves to that type. The output type is determined by your specific extension target and use case.\n */\n output: Output | Promise;\n}" + } + }, + "RenderExtensionTargets": { + "src/surfaces/point-of-sale/extension-targets.ts": { + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "name": "RenderExtensionTargets", + "description": "", + "isPublicDocs": true, + "members": [ + { + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "syntaxKind": "PropertySignature", + "name": "pos.cart.line-item-details.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.cart.line-item-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the cart line item action menu. Use this target for item-specific operations like applying discounts, adding custom properties, or launching verification workflows for individual cart items.\n\nExtensions at this target can access detailed line item information including title, quantity, price, discounts, properties, and product metadata through the Cart Line Item API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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. Returns `undefined` or empty array when no discounts were applied. The sum of discount amounts reduces the final transaction total.", - "isOptional": true + "name": "pos.cart.line-item-details.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.cart.line-item-details.action.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from cart line item menu items. Use this target for complex line item workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to detailed line item data through the Cart Line Item API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.customer-details.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.customer-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n CustomerApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the customer details action menu. Use this target for customer-specific operations like applying customer discounts, processing loyalty redemptions, or launching profile update workflows.\n\nExtensions at this target can access the customer identifier through the Customer API to perform customer-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete customer workflows." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.customer-details.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.customer-details.action.render'> &\n CartApi &\n CustomerApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from customer details menu items. Use this target for complex customer workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to customer data through the Customer API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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` for transactions that don't create orders (for example, reprints) or when order creation is pending.", - "isOptional": true + "name": "pos.customer-details.block.render", + "value": "RenderExtension<\n StandardApi<'pos.customer-details.block.render'> &\n CartApi &\n CustomerApi &\n ActionApi,\n BlockExtensionComponents\n >", + "description": "Renders a custom information section within the customer details screen. Use this target for displaying supplementary customer data like loyalty status, points balance, or personalized information alongside standard customer details.\n\nExtensions at this target appear as persistent blocks within the customer details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex customer operations." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.draft-order-details.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.draft-order-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n DraftOrderApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the draft order details action menu. Use this target for draft order-specific operations like sending invoices, updating payment status, or launching custom workflow processes for pending orders.\n\nExtensions at this target can access draft order information including order ID, name, and associated customer through the Draft Order API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete draft order workflows." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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. Returns `undefined` or empty array for transactions with no shipping charges (for example, in-store purchases, digital products).", - "isOptional": true + "name": "pos.draft-order-details.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.draft-order-details.action.render'> &\n DraftOrderApi &\n CartApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from draft order details menu items. Use this target for complex draft order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to draft order data through the Draft Order API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.draft-order-details.block.render", + "value": "RenderExtension<\n StandardApi<'pos.draft-order-details.block.render'> &\n ActionApi &\n CartApi &\n DraftOrderApi,\n BlockExtensionComponents\n >", + "description": "Renders a custom information section within the draft order details screen. Use this target for displaying supplementary order information like processing status, payment status, or workflow indicators alongside standard draft order details.\n\nExtensions at this target appear as persistent blocks within the draft order interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex draft order operations." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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. Returns `undefined` or empty array for tax-exempt transactions or when detailed tax breakdown isn't available.", - "isOptional": true + "name": "pos.exchange.post.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.exchange.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the post-exchange action menu. Use this target for post-exchange operations like generating exchange receipts, processing restocking workflows, or collecting exchange feedback.\n\nExtensions at this target can access the order identifier through the Order API to perform exchange-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-exchange workflows." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.exchange.post.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.exchange.post.action.render'> & OrderApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from post-exchange menu items. Use this target for complex post-exchange workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.exchange.post.block.render", + "value": "RenderExtension<\n StandardApi<'pos.exchange.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >", + "description": "Renders a custom information section within the post-exchange screen. Use this target for displaying supplementary exchange data like completion status, payment adjustments, or follow-up workflows alongside standard exchange details.\n\nExtensions at this target appear as persistent blocks within the post-exchange interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-exchange operations." }, { - "filePath": "src/surfaces/point-of-sale/types/base-transaction-complete.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "transactionType", - "value": "TransactionType", - "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 /**\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": { - "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts": { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", - "name": "ReprintReceiptData", - "description": "Defines the data structure for receipt reprint requests.", - "isPublicDocs": true, - "members": [ + "name": "pos.home.modal.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.home.modal.render'> & CartApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from smart grid tiles. The modal appears when users tap a companion tile. Use this target for complete workflow experiences that require more space and functionality than the tile interface provides, such as multi-step processes, detailed information displays, or complex user interactions.\n\nExtensions at this target support full navigation hierarchies with multiple screens, scroll views, and interactive components to handle sophisticated workflows." + }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "balanceDue", - "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." + "name": "pos.home.tile.render", + "value": "RenderExtension<\n StandardApi<'pos.home.tile.render'> & ActionApi & CartApi,\n SmartGridComponents\n >", + "description": "Renders a single interactive tile component on the POS home screen's smart grid. The tile appears once during home screen initialization and remains persistent until navigation occurs. Use this target for high-frequency actions, status displays, or entry points to workflows that merchants need daily.\n\nExtensions at this target can dynamically update properties like enabled state and badge values in response to cart changes or device conditions. Tiles typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.order-details.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.order-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n OrderApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the order details action menu. Use this target for order-specific operations like reprints, refunds, exchanges, or launching fulfillment workflows.\n\nExtensions at this target can access the order identifier through the Order API to perform order-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete order workflows." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.order-details.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.order-details.action.render'> & CartApi & OrderApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from order details menu items. Use this target for complex order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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. Returns `undefined` or empty array when no discounts were applied. The sum of discount amounts reduces the final transaction total.", - "isOptional": true + "name": "pos.order-details.block.render", + "value": "RenderExtension<\n StandardApi<'pos.order-details.block.render'> &\n CartApi &\n OrderApi &\n ActionApi,\n BlockExtensionComponents\n >", + "description": "Renders a custom information section within the order details screen. Use this target for displaying supplementary order data like fulfillment status, tracking numbers, or custom order analytics alongside standard order details.\n\nExtensions at this target appear as persistent blocks within the order details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex order operations." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "exchangeId", - "value": "number", - "description": "The exchange ID if the return is part of an exchange transaction.", - "isOptional": true + "name": "pos.product-details.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.product-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n ProductApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the product details action menu. Use this target for product-specific operations like inventory adjustments, product analytics, or integration with external product management systems.\n\nExtensions at this target can access the product identifier through the Product API to perform product-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete product workflows." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.product-details.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.product-details.action.render'> & CartApi & ProductApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from product details menu items. Use this target for complex product workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to product and cart data through the Product API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.product-details.block.render", + "value": "RenderExtension<\n StandardApi<'pos.product-details.block.render'> &\n CartApi &\n ProductApi &\n ActionApi,\n BlockExtensionComponents\n >", + "description": "Renders a custom information section within the product details screen. Use this target for displaying supplementary product data like detailed specifications, inventory status, or related product recommendations alongside standard product details.\n\nExtensions at this target appear as persistent blocks within the product details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex product operations." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "lineItems", - "value": "OrderLineItem[]", - "description": "An array of line items included in the transaction." + "name": "pos.purchase.post.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.purchase.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the post-purchase action menu. Use this target for post-purchase operations like sending receipts, collecting customer feedback, or launching follow-up workflows after completing a sale.\n\nExtensions at this target can access the order identifier through the Order API to perform purchase-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-purchase workflows." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "lineItemsAdded", - "value": "LineItem[]", - "description": "An array of line items added to the customer in the exchange.", - "isOptional": true + "name": "pos.purchase.post.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.purchase.post.action.render'> & OrderApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from post-purchase menu items. Use this target for complex post-purchase workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "lineItemsRemoved", - "value": "LineItem[]", - "description": "An array of line items removed from the customer in the exchange.", - "isOptional": true + "name": "pos.purchase.post.block.render", + "value": "RenderExtension<\n StandardApi<'pos.purchase.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >", + "description": "Renders a custom information section within the post-purchase screen. Use this target for displaying supplementary purchase data like completion status, customer feedback prompts, or next-step workflows alongside standard purchase details.\n\nExtensions at this target appear as persistent blocks within the post-purchase interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-purchase operations." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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` for transactions that don't create orders (for example, reprints) or when order creation is pending.", - "isOptional": true + "name": "pos.receipt-footer.block.render", + "value": "RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >", + "description": "Renders a custom section in the footer of printed receipts. Use this target for adding contact details, return policies, social media links, or customer engagement elements like survey links or marketing campaigns at the bottom of receipts.\n\nExtensions at this target appear in the receipt footer area and support limited components optimized for print formatting, including text content for information display.", + "isPrivate": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.receipt-header.block.render", + "value": "RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >", + "description": "Renders a custom section in the header of printed receipts. Use this target for adding custom branding, logos, promotional messages, or store-specific information at the top of receipts.\n\nExtensions at this target appear in the receipt header area and support limited components optimized for print formatting, including text content for information display.", + "isPrivate": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "refundId", - "value": "number", - "description": "The refund ID if a refund was issued for the return.", - "isOptional": true + "name": "pos.register-details.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.register-details.action.menu-item.render'> &\n ActionApi &\n CashDrawerApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the register details action menu. Use this target for register-specific operations like cash drawer management, shift reports, or launching cash reconciliation workflows.\n\nExtensions at this target can access cash drawer functionality through the Cash Drawer API to perform register-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete register workflows." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", - "name": "returnId", - "value": "number", - "description": "The return ID for the completed return transaction.", - "isOptional": true + "name": "pos.register-details.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.register-details.action.render'> & CashDrawerApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from register details menu items. Use this target for complex register workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to cash drawer functionality through the Cash Drawer API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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. Returns `undefined` or empty array for transactions with no shipping charges (for example, in-store purchases, digital products).", - "isOptional": true + "name": "pos.register-details.block.render", + "value": "RenderExtension<\n StandardApi<'pos.register-details.block.render'> &\n ActionApi &\n CashDrawerApi,\n BlockExtensionComponents\n >", + "description": "Renders a custom information section within the register details screen. Use this target for displaying supplementary register data like cash drawer status, transaction summaries, or shift analytics alongside standard register details.\n\nExtensions at this target appear as persistent blocks within the register details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex register operations." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.return.post.action.menu-item.render", + "value": "RenderExtension<\n StandardApi<'pos.return.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >", + "description": "Renders a single interactive button component as a menu item in the post-return action menu. Use this target for post-return operations like generating return receipts, processing restocking workflows, or collecting return feedback.\n\nExtensions at this target can access the order identifier through the Order API to perform return-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-return workflows." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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. Returns `undefined` or empty array for tax-exempt transactions or when detailed tax breakdown isn't available.", - "isOptional": true + "name": "pos.return.post.action.render", + "value": "RenderExtension<\n ActionTargetApi<'pos.return.post.action.render'> & OrderApi,\n BasicComponents\n >", + "description": "Renders a full-screen modal interface launched from post-return menu items. Use this target for complex post-return workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/surfaces/point-of-sale/extension-targets.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": "pos.return.post.block.render", + "value": "RenderExtension<\n StandardApi<'pos.return.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >", + "description": "Renders a custom information section within the post-return screen. Use this target for displaying supplementary return data like completion status, refund confirmations, or follow-up workflows alongside standard return details.\n\nExtensions at this target appear as persistent blocks within the post-return interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-return operations." + } + ], + "value": "export interface RenderExtensionTargets {\n /**\n * Renders a single interactive tile component on the POS home screen's smart grid. The tile appears once during home screen initialization and remains persistent until navigation occurs. Use this target for high-frequency actions, status displays, or entry points to workflows that merchants need daily.\n *\n * Extensions at this target can dynamically update properties like enabled state and badge values in response to cart changes or device conditions. Tiles typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows.\n */\n 'pos.home.tile.render': RenderExtension<\n StandardApi<'pos.home.tile.render'> & ActionApi & CartApi,\n SmartGridComponents\n >;\n /**\n * Renders a full-screen modal interface launched from smart grid tiles. The modal appears when users tap a companion tile. Use this target for complete workflow experiences that require more space and functionality than the tile interface provides, such as multi-step processes, detailed information displays, or complex user interactions.\n *\n * Extensions at this target support full navigation hierarchies with multiple screens, scroll views, and interactive components to handle sophisticated workflows.\n */\n 'pos.home.modal.render': RenderExtension<\n ActionTargetApi<'pos.home.modal.render'> & CartApi,\n BasicComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the post-return action menu. Use this target for post-return operations like generating return receipts, processing restocking workflows, or collecting return feedback.\n *\n * Extensions at this target can access the order identifier through the Order API to perform return-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-return workflows.\n */\n 'pos.return.post.action.menu-item.render': RenderExtension<\n StandardApi<'pos.return.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from post-return menu items. Use this target for complex post-return workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.return.post.action.render': RenderExtension<\n ActionTargetApi<'pos.return.post.action.render'> & OrderApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the post-return screen. Use this target for displaying supplementary return data like completion status, refund confirmations, or follow-up workflows alongside standard return details.\n *\n * Extensions at this target appear as persistent blocks within the post-return interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-return operations.\n */\n 'pos.return.post.block.render': RenderExtension<\n StandardApi<'pos.return.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the post-exchange action menu. Use this target for post-exchange operations like generating exchange receipts, processing restocking workflows, or collecting exchange feedback.\n *\n * Extensions at this target can access the order identifier through the Order API to perform exchange-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-exchange workflows.\n */\n 'pos.exchange.post.action.menu-item.render': RenderExtension<\n StandardApi<'pos.exchange.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from post-exchange menu items. Use this target for complex post-exchange workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.exchange.post.action.render': RenderExtension<\n ActionTargetApi<'pos.exchange.post.action.render'> & OrderApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the post-exchange screen. Use this target for displaying supplementary exchange data like completion status, payment adjustments, or follow-up workflows alongside standard exchange details.\n *\n * Extensions at this target appear as persistent blocks within the post-exchange interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-exchange operations.\n */\n 'pos.exchange.post.block.render': RenderExtension<\n StandardApi<'pos.exchange.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the post-purchase action menu. Use this target for post-purchase operations like sending receipts, collecting customer feedback, or launching follow-up workflows after completing a sale.\n *\n * Extensions at this target can access the order identifier through the Order API to perform purchase-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-purchase workflows.\n */\n 'pos.purchase.post.action.menu-item.render': RenderExtension<\n StandardApi<'pos.purchase.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from post-purchase menu items. Use this target for complex post-purchase workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.purchase.post.action.render': RenderExtension<\n ActionTargetApi<'pos.purchase.post.action.render'> & OrderApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the post-purchase screen. Use this target for displaying supplementary purchase data like completion status, customer feedback prompts, or next-step workflows alongside standard purchase details.\n *\n * Extensions at this target appear as persistent blocks within the post-purchase interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-purchase operations.\n */\n 'pos.purchase.post.block.render': RenderExtension<\n StandardApi<'pos.purchase.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the product details action menu. Use this target for product-specific operations like inventory adjustments, product analytics, or integration with external product management systems.\n *\n * Extensions at this target can access the product identifier through the Product API to perform product-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete product workflows.\n */\n 'pos.product-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.product-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n ProductApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from product details menu items. Use this target for complex product workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to product and cart data through the Product API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.product-details.action.render': RenderExtension<\n ActionTargetApi<'pos.product-details.action.render'> & CartApi & ProductApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the product details screen. Use this target for displaying supplementary product data like detailed specifications, inventory status, or related product recommendations alongside standard product details.\n *\n * Extensions at this target appear as persistent blocks within the product details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex product operations.\n */\n 'pos.product-details.block.render': RenderExtension<\n StandardApi<'pos.product-details.block.render'> &\n CartApi &\n ProductApi &\n ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the order details action menu. Use this target for order-specific operations like reprints, refunds, exchanges, or launching fulfillment workflows.\n *\n * Extensions at this target can access the order identifier through the Order API to perform order-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete order workflows.\n */\n 'pos.order-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.order-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n OrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from order details menu items. Use this target for complex order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.order-details.action.render': RenderExtension<\n ActionTargetApi<'pos.order-details.action.render'> & CartApi & OrderApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the order details screen. Use this target for displaying supplementary order data like fulfillment status, tracking numbers, or custom order analytics alongside standard order details.\n *\n * Extensions at this target appear as persistent blocks within the order details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex order operations.\n */\n 'pos.order-details.block.render': RenderExtension<\n StandardApi<'pos.order-details.block.render'> &\n CartApi &\n OrderApi &\n ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the draft order details action menu. Use this target for draft order-specific operations like sending invoices, updating payment status, or launching custom workflow processes for pending orders.\n *\n * Extensions at this target can access draft order information including order ID, name, and associated customer through the Draft Order API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete draft order workflows.\n */\n 'pos.draft-order-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.draft-order-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n DraftOrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from draft order details menu items. Use this target for complex draft order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to draft order data through the Draft Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.draft-order-details.action.render': RenderExtension<\n ActionTargetApi<'pos.draft-order-details.action.render'> &\n DraftOrderApi &\n CartApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the draft order details screen. Use this target for displaying supplementary order information like processing status, payment status, or workflow indicators alongside standard draft order details.\n *\n * Extensions at this target appear as persistent blocks within the draft order interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex draft order operations.\n */\n 'pos.draft-order-details.block.render': RenderExtension<\n StandardApi<'pos.draft-order-details.block.render'> &\n ActionApi &\n CartApi &\n DraftOrderApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the customer details action menu. Use this target for customer-specific operations like applying customer discounts, processing loyalty redemptions, or launching profile update workflows.\n *\n * Extensions at this target can access the customer identifier through the Customer API to perform customer-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete customer workflows.\n */\n 'pos.customer-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.customer-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n CustomerApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from customer details menu items. Use this target for complex customer workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to customer data through the Customer API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.customer-details.action.render': RenderExtension<\n ActionTargetApi<'pos.customer-details.action.render'> &\n CartApi &\n CustomerApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the customer details screen. Use this target for displaying supplementary customer data like loyalty status, points balance, or personalized information alongside standard customer details.\n *\n * Extensions at this target appear as persistent blocks within the customer details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex customer operations.\n */\n 'pos.customer-details.block.render': RenderExtension<\n StandardApi<'pos.customer-details.block.render'> &\n CartApi &\n CustomerApi &\n ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the cart line item action menu. Use this target for item-specific operations like applying discounts, adding custom properties, or launching verification workflows for individual cart items.\n *\n * Extensions at this target can access detailed line item information including title, quantity, price, discounts, properties, and product metadata through the Cart Line Item API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows.\n */\n 'pos.cart.line-item-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.cart.line-item-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from cart line item menu items. Use this target for complex line item workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to detailed line item data through the Cart Line Item API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.cart.line-item-details.action.render': RenderExtension<\n ActionTargetApi<'pos.cart.line-item-details.action.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n BasicComponents\n >;\n /**\n * Renders a custom section in the footer of printed receipts. Use this target for adding contact details, return policies, social media links, or customer engagement elements like survey links or marketing campaigns at the bottom of receipts.\n *\n * Extensions at this target appear in the receipt footer area and support limited components optimized for print formatting, including text content for information display.\n *\n * @private\n */\n 'pos.receipt-footer.block.render': RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >;\n /**\n * Renders a custom section in the header of printed receipts. Use this target for adding custom branding, logos, promotional messages, or store-specific information at the top of receipts.\n *\n * Extensions at this target appear in the receipt header area and support limited components optimized for print formatting, including text content for information display.\n *\n * @private\n */\n 'pos.receipt-header.block.render': RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the register details action menu. Use this target for register-specific operations like cash drawer management, shift reports, or launching cash reconciliation workflows.\n *\n * Extensions at this target can access cash drawer functionality through the Cash Drawer API to perform register-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete register workflows.\n */\n 'pos.register-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.register-details.action.menu-item.render'> &\n ActionApi &\n CashDrawerApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from register details menu items. Use this target for complex register workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to cash drawer functionality through the Cash Drawer API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.register-details.action.render': RenderExtension<\n ActionTargetApi<'pos.register-details.action.render'> & CashDrawerApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the register details screen. Use this target for displaying supplementary register data like cash drawer status, transaction summaries, or shift analytics alongside standard register details.\n *\n * Extensions at this target appear as persistent blocks within the register details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex register operations.\n */\n 'pos.register-details.block.render': RenderExtension<\n StandardApi<'pos.register-details.block.render'> &\n ActionApi &\n CashDrawerApi,\n BlockExtensionComponents\n >;\n}" + } + }, + "RenderExtension": { + "src/extension.ts": { + "filePath": "src/extension.ts", + "name": "RenderExtension", + "description": "Defines the structure of a render extension, which displays UI in the Shopify admin.", + "members": [ + { + "filePath": "src/extension.ts", + "syntaxKind": "PropertySignature", + "name": "api", + "value": "Api", + "description": "The API object providing access to extension capabilities, data, and methods. The specific API type depends on the extension target and determines what functionality is available to your extension, such as authentication, storage, data access, and GraphQL querying." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/extension.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": "components", + "value": "ComponentsSet", + "description": "The set of UI components available for rendering your extension. This defines which Polaris components and custom components can be used to build your extension's interface. The available components vary by extension target." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "filePath": "src/extension.ts", "syntaxKind": "PropertySignature", - "name": "transactionType", - "value": "'Reprint'", - "description": "The transaction type identifier, always 'Reprint' for reprint transactions." + "name": "output", + "value": "void | Promise", + "description": "The render function output. Your extension's render function should return void or a Promise that resolves to void. Use this to perform any necessary setup, rendering, or async operations when your extension loads." } ], - "value": "export interface ReprintReceiptData extends BaseTransactionComplete {\n /**\n * The transaction type identifier, always 'Reprint' for reprint transactions.\n */\n transactionType: 'Reprint';\n /**\n * An array of line items included in the transaction.\n */\n lineItems: OrderLineItem[];\n /**\n * The refund ID if a refund was issued for the return.\n */\n refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n returnId?: number;\n /**\n * The exchange ID if the return is part of an exchange transaction.\n */\n exchangeId?: number;\n /**\n * An array of line items added to the customer in the exchange.\n */\n lineItemsAdded?: LineItem[];\n /**\n * An array of line items removed from the customer in the exchange.\n */\n lineItemsRemoved?: LineItem[];\n}" + "value": "export interface RenderExtension {\n /**\n * The API object providing access to extension capabilities, data, and methods. The specific API type depends on the extension target and determines what functionality is available to your extension, such as authentication, storage, data access, and GraphQL querying.\n */\n api: Api;\n /**\n * The set of UI components available for rendering your extension. This defines which Polaris components and custom components can be used to build your extension's interface. The available components vary by extension target.\n */\n components: ComponentsSet;\n /**\n * The render function output. Your extension's render function should return void or a Promise that resolves to void. Use this to perform any necessary setup, rendering, or async operations when your extension loads.\n */\n output: void | Promise;\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.", + "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}" } }, "SaleTransactionData": { @@ -8172,7 +8231,6 @@ "filePath": "src/surfaces/point-of-sale/event/data/SaleTransactionData.ts", "name": "SaleTransactionData", "description": "Defines the data structure for completed sale transactions.", - "isPublicDocs": true, "members": [ { "filePath": "src/surfaces/point-of-sale/event/data/SaleTransactionData.ts", @@ -8298,22 +8356,21 @@ "value": "export interface SaleTransactionData extends BaseTransactionComplete {\n /**\n * The transaction type identifier, always 'Sale' for sale transactions.\n */\n transactionType: 'Sale';\n /**\n * The UUID of the draft checkout if the sale originated from a draft order.\n */\n draftCheckoutUuid?: string;\n /**\n * An array of line items included in the sale transaction.\n */\n lineItems: LineItem[];\n}" } }, - "ExchangeTransactionData": { - "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts": { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", - "name": "ExchangeTransactionData", - "description": "Defines the data structure for completed exchange transactions.", - "isPublicDocs": true, + "ReturnTransactionData": { + "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts": { + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "name": "ReturnTransactionData", + "description": "Defines the data structure for completed return transactions.", "members": [ { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "balanceDue", "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", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "cashRoundingAdjustment", "value": "Money", @@ -8321,7 +8378,7 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "customer", "value": "Customer", @@ -8329,7 +8386,7 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "discounts", "value": "Discount[]", @@ -8337,7 +8394,7 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "exchangeId", "value": "number", @@ -8345,35 +8402,28 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.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/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.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/event/data/ExchangeTransactionData.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/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", - "name": "lineItemsRemoved", + "name": "lineItems", "value": "LineItem[]", - "description": "An array of line items removed from the customer in the exchange." + "description": "An array of line items included in the sale transaction." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "orderId", "value": "number", @@ -8381,14 +8431,22 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.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/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "syntaxKind": "PropertySignature", + "name": "refundId", + "value": "number", + "description": "The refund ID if a refund was issued for the return.", + "isOptional": true + }, + { + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "returnId", "value": "number", @@ -8396,7 +8454,7 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "shippingLines", "value": "ShippingLine[]", @@ -8404,14 +8462,14 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.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/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "taxLines", "value": "TaxLine[]", @@ -8419,14 +8477,14 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.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/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "tipAmount", "value": "Money", @@ -8434,32 +8492,31 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", "syntaxKind": "PropertySignature", "name": "transactionType", - "value": "'Exchange'", + "value": "'Return'", "description": "The transaction type identifier, always 'Sale' for sale transactions." } ], - "value": "export interface ExchangeTransactionData extends BaseTransactionComplete {\n /**\n * The transaction type identifier, always 'Sale' for sale transactions.\n */\n transactionType: 'Exchange';\n /**\n * The return ID for the completed return transaction.\n */\n returnId?: number;\n /**\n * The exchange ID if the return is part of an exchange transaction.\n */\n exchangeId?: number;\n /**\n * An array of line items added to the customer in the exchange.\n */\n lineItemsAdded: LineItem[];\n /**\n * An array of line items removed from the customer in the exchange.\n */\n lineItemsRemoved: LineItem[];\n}" + "value": "export interface ReturnTransactionData extends BaseTransactionComplete {\n /**\n * The transaction type identifier, always 'Sale' for sale transactions.\n */\n transactionType: 'Return';\n /**\n * The refund ID if a refund was issued for the return.\n */\n refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n returnId?: number;\n /**\n * The exchange ID if the return is part of an exchange transaction.\n */\n exchangeId?: number;\n /**\n * An array of line items included in the sale transaction.\n */\n lineItems: LineItem[];\n}" } }, - "ReturnTransactionData": { - "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts": { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", - "name": "ReturnTransactionData", - "description": "Defines the data structure for completed return transactions.", - "isPublicDocs": true, + "ExchangeTransactionData": { + "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts": { + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", + "name": "ExchangeTransactionData", + "description": "Defines the data structure for completed exchange transactions.", "members": [ { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "balanceDue", "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", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "cashRoundingAdjustment", "value": "Money", @@ -8467,7 +8524,7 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "customer", "value": "Customer", @@ -8475,7 +8532,7 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "discounts", "value": "Discount[]", @@ -8483,7 +8540,7 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "exchangeId", "value": "number", @@ -8491,28 +8548,35 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.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/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.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/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", - "name": "lineItems", + "name": "lineItemsAdded", "value": "LineItem[]", - "description": "An array of line items included in the sale transaction." + "description": "An array of line items added to the customer in the exchange." }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.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/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "orderId", "value": "number", @@ -8520,22 +8584,14 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.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/event/data/ReturnTransactionData.ts", - "syntaxKind": "PropertySignature", - "name": "refundId", - "value": "number", - "description": "The refund ID if a refund was issued for the return.", - "isOptional": true - }, - { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "returnId", "value": "number", @@ -8543,7 +8599,7 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "shippingLines", "value": "ShippingLine[]", @@ -8551,14 +8607,14 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.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/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "taxLines", "value": "TaxLine[]", @@ -8566,14 +8622,14 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.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/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "tipAmount", "value": "Money", @@ -8581,361 +8637,185 @@ "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/event/data/ReturnTransactionData.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ExchangeTransactionData.ts", "syntaxKind": "PropertySignature", "name": "transactionType", - "value": "'Return'", + "value": "'Exchange'", "description": "The transaction type identifier, always 'Sale' for sale transactions." } ], - "value": "export interface ReturnTransactionData extends BaseTransactionComplete {\n /**\n * The transaction type identifier, always 'Sale' for sale transactions.\n */\n transactionType: 'Return';\n /**\n * The refund ID if a refund was issued for the return.\n */\n refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n returnId?: number;\n /**\n * The exchange ID if the return is part of an exchange transaction.\n */\n exchangeId?: number;\n /**\n * An array of line items included in the sale transaction.\n */\n lineItems: LineItem[];\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.", - "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}" - } - }, - "DataExtensionTargets": { - "src/surfaces/point-of-sale/extension-targets.ts": { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "name": "DataExtensionTargets", - "description": "", - "isPublicDocs": true, - "members": [ - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.app.ready.data", - "value": "RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >", - "description": "A persistent background extension that starts when POS loads and runs for the session's lifetime. Use this target to observe POS events without rendering UI." - } - ], - "value": "export interface DataExtensionTargets {\n /**\n * A persistent background extension that starts when POS loads and runs for\n * the session's lifetime. Use this target to observe POS events without\n * rendering UI.\n */\n 'pos.app.ready.data': RunnableExtension<\n DataTargetApi<'pos.app.ready.data'>,\n undefined\n >;\n}" - } - }, - "RunnableExtension": { - "src/extension.ts": { - "filePath": "src/extension.ts", - "name": "RunnableExtension", - "description": "Defines the structure of a runnable extension, which executes logic and returns data without rendering UI.", - "members": [ - { - "filePath": "src/extension.ts", - "syntaxKind": "PropertySignature", - "name": "api", - "value": "Api", - "description": "The API object providing access to extension capabilities and methods. The specific API type depends on the extension target and determines what functionality is available to your extension." - }, - { - "filePath": "src/extension.ts", - "syntaxKind": "PropertySignature", - "name": "output", - "value": "Output | Promise", - "description": "The function output. Your extension function should return the expected output type or a Promise that resolves to that type. The output type is determined by your specific extension target and use case." - } - ], - "value": "export interface RunnableExtension {\n /**\n * The API object providing access to extension capabilities and methods. The specific API type depends on the extension target and determines what functionality is available to your extension.\n */\n api: Api;\n /**\n * The function output. Your extension function should return the expected output type or a Promise that resolves to that type. The output type is determined by your specific extension target and use case.\n */\n output: Output | Promise;\n}" + "value": "export interface ExchangeTransactionData extends BaseTransactionComplete {\n /**\n * The transaction type identifier, always 'Sale' for sale transactions.\n */\n transactionType: 'Exchange';\n /**\n * The return ID for the completed return transaction.\n */\n returnId?: number;\n /**\n * The exchange ID if the return is part of an exchange transaction.\n */\n exchangeId?: number;\n /**\n * An array of line items added to the customer in the exchange.\n */\n lineItemsAdded: LineItem[];\n /**\n * An array of line items removed from the customer in the exchange.\n */\n lineItemsRemoved: LineItem[];\n}" } }, - "RenderExtensionTargets": { - "src/surfaces/point-of-sale/extension-targets.ts": { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "name": "RenderExtensionTargets", - "description": "", - "isPublicDocs": true, + "ReprintReceiptData": { + "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts": { + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", + "name": "ReprintReceiptData", + "description": "Defines the data structure for receipt reprint requests.", "members": [ { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.cart.line-item-details.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.cart.line-item-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the cart line item action menu. Use this target for item-specific operations like applying discounts, adding custom properties, or launching verification workflows for individual cart items.\n\nExtensions at this target can access detailed line item information including title, quantity, price, discounts, properties, and product metadata through the Cart Line Item API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.cart.line-item-details.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.cart.line-item-details.action.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from cart line item menu items. Use this target for complex line item workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to detailed line item data through the Cart Line Item API and support workflows with multiple screens, navigation, and interactive components." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.customer-details.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.customer-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n CustomerApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the customer details action menu. Use this target for customer-specific operations like applying customer discounts, processing loyalty redemptions, or launching profile update workflows.\n\nExtensions at this target can access the customer identifier through the Customer API to perform customer-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete customer workflows." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.customer-details.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.customer-details.action.render'> &\n CartApi &\n CustomerApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from customer details menu items. Use this target for complex customer workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to customer data through the Customer API and support workflows with multiple screens, navigation, and interactive components." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.customer-details.block.render", - "value": "RenderExtension<\n StandardApi<'pos.customer-details.block.render'> &\n CartApi &\n CustomerApi &\n ActionApi,\n BlockExtensionComponents\n >", - "description": "Renders a custom information section within the customer details screen. Use this target for displaying supplementary customer data like loyalty status, points balance, or personalized information alongside standard customer details.\n\nExtensions at this target appear as persistent blocks within the customer details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex customer operations." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.draft-order-details.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.draft-order-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n DraftOrderApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the draft order details action menu. Use this target for draft order-specific operations like sending invoices, updating payment status, or launching custom workflow processes for pending orders.\n\nExtensions at this target can access draft order information including order ID, name, and associated customer through the Draft Order API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete draft order workflows." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.draft-order-details.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.draft-order-details.action.render'> &\n DraftOrderApi &\n CartApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from draft order details menu items. Use this target for complex draft order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to draft order data through the Draft Order API and support workflows with multiple screens, navigation, and interactive components." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.draft-order-details.block.render", - "value": "RenderExtension<\n StandardApi<'pos.draft-order-details.block.render'> &\n ActionApi &\n CartApi &\n DraftOrderApi,\n BlockExtensionComponents\n >", - "description": "Renders a custom information section within the draft order details screen. Use this target for displaying supplementary order information like processing status, payment status, or workflow indicators alongside standard draft order details.\n\nExtensions at this target appear as persistent blocks within the draft order interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex draft order operations." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.exchange.post.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.exchange.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the post-exchange action menu. Use this target for post-exchange operations like generating exchange receipts, processing restocking workflows, or collecting exchange feedback.\n\nExtensions at this target can access the order identifier through the Order API to perform exchange-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-exchange workflows." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", - "syntaxKind": "PropertySignature", - "name": "pos.exchange.post.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.exchange.post.action.render'> & OrderApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from post-exchange menu items. Use this target for complex post-exchange workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components." - }, - { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.exchange.post.block.render", - "value": "RenderExtension<\n StandardApi<'pos.exchange.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >", - "description": "Renders a custom information section within the post-exchange screen. Use this target for displaying supplementary exchange data like completion status, payment adjustments, or follow-up workflows alongside standard exchange details.\n\nExtensions at this target appear as persistent blocks within the post-exchange interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-exchange operations." + "name": "balanceDue", + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.home.modal.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.home.modal.render'> & CartApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from smart grid tiles. The modal appears when users tap a companion tile. Use this target for complete workflow experiences that require more space and functionality than the tile interface provides, such as multi-step processes, detailed information displays, or complex user interactions.\n\nExtensions at this target support full navigation hierarchies with multiple screens, scroll views, and interactive components to handle sophisticated workflows." + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.home.tile.render", - "value": "RenderExtension<\n StandardApi<'pos.home.tile.render'> & ActionApi & CartApi,\n SmartGridComponents\n >", - "description": "Renders a single interactive tile component on the POS home screen's smart grid. The tile appears once during home screen initialization and remains persistent until navigation occurs. Use this target for high-frequency actions, status displays, or entry points to workflows that merchants need daily.\n\nExtensions at this target can dynamically update properties like enabled state and badge values in response to cart changes or device conditions. Tiles typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows." + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.order-details.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.order-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n OrderApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the order details action menu. Use this target for order-specific operations like reprints, refunds, exchanges, or launching fulfillment workflows.\n\nExtensions at this target can access the order identifier through the Order API to perform order-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete order workflows." + "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. Returns `undefined` or empty array when no discounts were applied. The sum of discount amounts reduces the final transaction total.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.order-details.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.order-details.action.render'> & CartApi & OrderApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from order details menu items. Use this target for complex order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components." + "name": "exchangeId", + "value": "number", + "description": "The exchange ID if the return is part of an exchange transaction.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.order-details.block.render", - "value": "RenderExtension<\n StandardApi<'pos.order-details.block.render'> &\n CartApi &\n OrderApi &\n ActionApi,\n BlockExtensionComponents\n >", - "description": "Renders a custom information section within the order details screen. Use this target for displaying supplementary order data like fulfillment status, tracking numbers, or custom order analytics alongside standard order details.\n\nExtensions at this target appear as persistent blocks within the order details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex order operations." + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.product-details.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.product-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n ProductApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the product details action menu. Use this target for product-specific operations like inventory adjustments, product analytics, or integration with external product management systems.\n\nExtensions at this target can access the product identifier through the Product API to perform product-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete product workflows." + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.product-details.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.product-details.action.render'> & CartApi & ProductApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from product details menu items. Use this target for complex product workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to product and cart data through the Product API and support workflows with multiple screens, navigation, and interactive components." + "name": "lineItems", + "value": "OrderLineItem[]", + "description": "An array of line items included in the transaction." }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.product-details.block.render", - "value": "RenderExtension<\n StandardApi<'pos.product-details.block.render'> &\n CartApi &\n ProductApi &\n ActionApi,\n BlockExtensionComponents\n >", - "description": "Renders a custom information section within the product details screen. Use this target for displaying supplementary product data like detailed specifications, inventory status, or related product recommendations alongside standard product details.\n\nExtensions at this target appear as persistent blocks within the product details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex product operations." + "name": "lineItemsAdded", + "value": "LineItem[]", + "description": "An array of line items added to the customer in the exchange.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.purchase.post.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.purchase.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the post-purchase action menu. Use this target for post-purchase operations like sending receipts, collecting customer feedback, or launching follow-up workflows after completing a sale.\n\nExtensions at this target can access the order identifier through the Order API to perform purchase-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-purchase workflows." + "name": "lineItemsRemoved", + "value": "LineItem[]", + "description": "An array of line items removed from the customer in the exchange.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.purchase.post.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.purchase.post.action.render'> & OrderApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from post-purchase menu items. Use this target for complex post-purchase workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components." + "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` for transactions that don't create orders (for example, reprints) or when order creation is pending.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.purchase.post.block.render", - "value": "RenderExtension<\n StandardApi<'pos.purchase.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >", - "description": "Renders a custom information section within the post-purchase screen. Use this target for displaying supplementary purchase data like completion status, customer feedback prompts, or next-step workflows alongside standard purchase details.\n\nExtensions at this target appear as persistent blocks within the post-purchase interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-purchase operations." + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.receipt-footer.block.render", - "value": "RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >", - "description": "Renders a custom section in the footer of printed receipts. Use this target for adding contact details, return policies, social media links, or customer engagement elements like survey links or marketing campaigns at the bottom of receipts.\n\nExtensions at this target appear in the receipt footer area and support limited components optimized for print formatting, including text content for information display." + "name": "refundId", + "value": "number", + "description": "The refund ID if a refund was issued for the return.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.receipt-header.block.render", - "value": "RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >", - "description": "Renders a custom section in the header of printed receipts. Use this target for adding custom branding, logos, promotional messages, or store-specific information at the top of receipts.\n\nExtensions at this target appear in the receipt header area and support limited components optimized for print formatting, including text content for information display." + "name": "returnId", + "value": "number", + "description": "The return ID for the completed return transaction.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.register-details.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.register-details.action.menu-item.render'> &\n ActionApi &\n CashDrawerApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the register details action menu. Use this target for register-specific operations like cash drawer management, shift reports, or launching cash reconciliation workflows.\n\nExtensions at this target can access cash drawer functionality through the Cash Drawer API to perform register-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete register workflows." + "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. Returns `undefined` or empty array for transactions with no shipping charges (for example, in-store purchases, digital products).", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.register-details.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.register-details.action.render'> & CashDrawerApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from register details menu items. Use this target for complex register workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to cash drawer functionality through the Cash Drawer API and support workflows with multiple screens, navigation, and interactive components." + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.register-details.block.render", - "value": "RenderExtension<\n StandardApi<'pos.register-details.block.render'> &\n ActionApi &\n CashDrawerApi,\n BlockExtensionComponents\n >", - "description": "Renders a custom information section within the register details screen. Use this target for displaying supplementary register data like cash drawer status, transaction summaries, or shift analytics alongside standard register details.\n\nExtensions at this target appear as persistent blocks within the register details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex register operations." + "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. Returns `undefined` or empty array for tax-exempt transactions or when detailed tax breakdown isn't available.", + "isOptional": true }, { - "filePath": "src/surfaces/point-of-sale/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.return.post.action.menu-item.render", - "value": "RenderExtension<\n StandardApi<'pos.return.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >", - "description": "Renders a single interactive button component as a menu item in the post-return action menu. Use this target for post-return operations like generating return receipts, processing restocking workflows, or collecting return feedback.\n\nExtensions at this target can access the order identifier through the Order API to perform return-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-return workflows." + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.return.post.action.render", - "value": "RenderExtension<\n ActionTargetApi<'pos.return.post.action.render'> & OrderApi,\n BasicComponents\n >", - "description": "Renders a full-screen modal interface launched from post-return menu items. Use this target for complex post-return workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n\nExtensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components." + "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/extension-targets.ts", + "filePath": "src/surfaces/point-of-sale/event/data/ReprintReceiptData.ts", "syntaxKind": "PropertySignature", - "name": "pos.return.post.block.render", - "value": "RenderExtension<\n StandardApi<'pos.return.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >", - "description": "Renders a custom information section within the post-return screen. Use this target for displaying supplementary return data like completion status, refund confirmations, or follow-up workflows alongside standard return details.\n\nExtensions at this target appear as persistent blocks within the post-return interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-return operations." + "name": "transactionType", + "value": "'Reprint'", + "description": "The transaction type identifier, always 'Reprint' for reprint transactions." } ], - "value": "export interface RenderExtensionTargets {\n /**\n * Renders a single interactive tile component on the POS home screen's smart grid. The tile appears once during home screen initialization and remains persistent until navigation occurs. Use this target for high-frequency actions, status displays, or entry points to workflows that merchants need daily.\n *\n * Extensions at this target can dynamically update properties like enabled state and badge values in response to cart changes or device conditions. Tiles typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows.\n */\n 'pos.home.tile.render': RenderExtension<\n StandardApi<'pos.home.tile.render'> & ActionApi & CartApi,\n SmartGridComponents\n >;\n /**\n * Renders a full-screen modal interface launched from smart grid tiles. The modal appears when users tap a companion tile. Use this target for complete workflow experiences that require more space and functionality than the tile interface provides, such as multi-step processes, detailed information displays, or complex user interactions.\n *\n * Extensions at this target support full navigation hierarchies with multiple screens, scroll views, and interactive components to handle sophisticated workflows.\n */\n 'pos.home.modal.render': RenderExtension<\n ActionTargetApi<'pos.home.modal.render'> & CartApi,\n BasicComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the post-return action menu. Use this target for post-return operations like generating return receipts, processing restocking workflows, or collecting return feedback.\n *\n * Extensions at this target can access the order identifier through the Order API to perform return-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-return workflows.\n */\n 'pos.return.post.action.menu-item.render': RenderExtension<\n StandardApi<'pos.return.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from post-return menu items. Use this target for complex post-return workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.return.post.action.render': RenderExtension<\n ActionTargetApi<'pos.return.post.action.render'> & OrderApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the post-return screen. Use this target for displaying supplementary return data like completion status, refund confirmations, or follow-up workflows alongside standard return details.\n *\n * Extensions at this target appear as persistent blocks within the post-return interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-return operations.\n */\n 'pos.return.post.block.render': RenderExtension<\n StandardApi<'pos.return.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the post-exchange action menu. Use this target for post-exchange operations like generating exchange receipts, processing restocking workflows, or collecting exchange feedback.\n *\n * Extensions at this target can access the order identifier through the Order API to perform exchange-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-exchange workflows.\n */\n 'pos.exchange.post.action.menu-item.render': RenderExtension<\n StandardApi<'pos.exchange.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from post-exchange menu items. Use this target for complex post-exchange workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.exchange.post.action.render': RenderExtension<\n ActionTargetApi<'pos.exchange.post.action.render'> & OrderApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the post-exchange screen. Use this target for displaying supplementary exchange data like completion status, payment adjustments, or follow-up workflows alongside standard exchange details.\n *\n * Extensions at this target appear as persistent blocks within the post-exchange interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-exchange operations.\n */\n 'pos.exchange.post.block.render': RenderExtension<\n StandardApi<'pos.exchange.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the post-purchase action menu. Use this target for post-purchase operations like sending receipts, collecting customer feedback, or launching follow-up workflows after completing a sale.\n *\n * Extensions at this target can access the order identifier through the Order API to perform purchase-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete post-purchase workflows.\n */\n 'pos.purchase.post.action.menu-item.render': RenderExtension<\n StandardApi<'pos.purchase.post.action.menu-item.render'> &\n ActionApi &\n OrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from post-purchase menu items. Use this target for complex post-purchase workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.purchase.post.action.render': RenderExtension<\n ActionTargetApi<'pos.purchase.post.action.render'> & OrderApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the post-purchase screen. Use this target for displaying supplementary purchase data like completion status, customer feedback prompts, or next-step workflows alongside standard purchase details.\n *\n * Extensions at this target appear as persistent blocks within the post-purchase interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex post-purchase operations.\n */\n 'pos.purchase.post.block.render': RenderExtension<\n StandardApi<'pos.purchase.post.block.render'> & OrderApi & ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the product details action menu. Use this target for product-specific operations like inventory adjustments, product analytics, or integration with external product management systems.\n *\n * Extensions at this target can access the product identifier through the Product API to perform product-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete product workflows.\n */\n 'pos.product-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.product-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n ProductApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from product details menu items. Use this target for complex product workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to product and cart data through the Product API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.product-details.action.render': RenderExtension<\n ActionTargetApi<'pos.product-details.action.render'> & CartApi & ProductApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the product details screen. Use this target for displaying supplementary product data like detailed specifications, inventory status, or related product recommendations alongside standard product details.\n *\n * Extensions at this target appear as persistent blocks within the product details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex product operations.\n */\n 'pos.product-details.block.render': RenderExtension<\n StandardApi<'pos.product-details.block.render'> &\n CartApi &\n ProductApi &\n ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the order details action menu. Use this target for order-specific operations like reprints, refunds, exchanges, or launching fulfillment workflows.\n *\n * Extensions at this target can access the order identifier through the Order API to perform order-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete order workflows.\n */\n 'pos.order-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.order-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n OrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from order details menu items. Use this target for complex order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to order data through the Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.order-details.action.render': RenderExtension<\n ActionTargetApi<'pos.order-details.action.render'> & CartApi & OrderApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the order details screen. Use this target for displaying supplementary order data like fulfillment status, tracking numbers, or custom order analytics alongside standard order details.\n *\n * Extensions at this target appear as persistent blocks within the order details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex order operations.\n */\n 'pos.order-details.block.render': RenderExtension<\n StandardApi<'pos.order-details.block.render'> &\n CartApi &\n OrderApi &\n ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the draft order details action menu. Use this target for draft order-specific operations like sending invoices, updating payment status, or launching custom workflow processes for pending orders.\n *\n * Extensions at this target can access draft order information including order ID, name, and associated customer through the Draft Order API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete draft order workflows.\n */\n 'pos.draft-order-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.draft-order-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n DraftOrderApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from draft order details menu items. Use this target for complex draft order workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to draft order data through the Draft Order API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.draft-order-details.action.render': RenderExtension<\n ActionTargetApi<'pos.draft-order-details.action.render'> &\n DraftOrderApi &\n CartApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the draft order details screen. Use this target for displaying supplementary order information like processing status, payment status, or workflow indicators alongside standard draft order details.\n *\n * Extensions at this target appear as persistent blocks within the draft order interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex draft order operations.\n */\n 'pos.draft-order-details.block.render': RenderExtension<\n StandardApi<'pos.draft-order-details.block.render'> &\n ActionApi &\n CartApi &\n DraftOrderApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the customer details action menu. Use this target for customer-specific operations like applying customer discounts, processing loyalty redemptions, or launching profile update workflows.\n *\n * Extensions at this target can access the customer identifier through the Customer API to perform customer-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete customer workflows.\n */\n 'pos.customer-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.customer-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n CustomerApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from customer details menu items. Use this target for complex customer workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to customer data through the Customer API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.customer-details.action.render': RenderExtension<\n ActionTargetApi<'pos.customer-details.action.render'> &\n CartApi &\n CustomerApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the customer details screen. Use this target for displaying supplementary customer data like loyalty status, points balance, or personalized information alongside standard customer details.\n *\n * Extensions at this target appear as persistent blocks within the customer details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex customer operations.\n */\n 'pos.customer-details.block.render': RenderExtension<\n StandardApi<'pos.customer-details.block.render'> &\n CartApi &\n CustomerApi &\n ActionApi,\n BlockExtensionComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the cart line item action menu. Use this target for item-specific operations like applying discounts, adding custom properties, or launching verification workflows for individual cart items.\n *\n * Extensions at this target can access detailed line item information including title, quantity, price, discounts, properties, and product metadata through the Cart Line Item API. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete workflows.\n */\n 'pos.cart.line-item-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.cart.line-item-details.action.menu-item.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from cart line item menu items. Use this target for complex line item workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to detailed line item data through the Cart Line Item API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.cart.line-item-details.action.render': RenderExtension<\n ActionTargetApi<'pos.cart.line-item-details.action.render'> &\n ActionApi &\n CartApi &\n CartLineItemApi,\n BasicComponents\n >;\n /**\n * Renders a custom section in the footer of printed receipts. Use this target for adding contact details, return policies, social media links, or customer engagement elements like survey links or marketing campaigns at the bottom of receipts.\n *\n * Extensions at this target appear in the receipt footer area and support limited components optimized for print formatting, including text content for information display.\n */\n 'pos.receipt-footer.block.render': RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >;\n /**\n * Renders a custom section in the header of printed receipts. Use this target for adding custom branding, logos, promotional messages, or store-specific information at the top of receipts.\n *\n * Extensions at this target appear in the receipt header area and support limited components optimized for print formatting, including text content for information display.\n */\n 'pos.receipt-header.block.render': RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >;\n /**\n * Renders a single interactive button component as a menu item in the register details action menu. Use this target for register-specific operations like cash drawer management, shift reports, or launching cash reconciliation workflows.\n *\n * Extensions at this target can access cash drawer functionality through the Cash Drawer API to perform register-specific operations. Menu items typically invoke `shopify.action.presentModal()` to launch the companion modal for complete register workflows.\n */\n 'pos.register-details.action.menu-item.render': RenderExtension<\n StandardApi<'pos.register-details.action.menu-item.render'> &\n ActionApi &\n CashDrawerApi,\n ActionExtensionComponents\n >;\n /**\n * Renders a full-screen modal interface launched from register details menu items. Use this target for complex register workflows that require forms, multi-step processes, or detailed information displays beyond what a simple button can provide.\n *\n * Extensions at this target have access to cash drawer functionality through the Cash Drawer API and support workflows with multiple screens, navigation, and interactive components.\n */\n 'pos.register-details.action.render': RenderExtension<\n ActionTargetApi<'pos.register-details.action.render'> & CashDrawerApi,\n BasicComponents\n >;\n /**\n * Renders a custom information section within the register details screen. Use this target for displaying supplementary register data like cash drawer status, transaction summaries, or shift analytics alongside standard register details.\n *\n * Extensions at this target appear as persistent blocks within the register details interface and support interactive elements that can launch modal workflows using `shopify.action.presentModal()` for more complex register operations.\n */\n 'pos.register-details.block.render': RenderExtension<\n StandardApi<'pos.register-details.block.render'> &\n ActionApi &\n CashDrawerApi,\n BlockExtensionComponents\n >;\n}" + "value": "export interface ReprintReceiptData extends BaseTransactionComplete {\n /**\n * The transaction type identifier, always 'Reprint' for reprint transactions.\n */\n transactionType: 'Reprint';\n /**\n * An array of line items included in the transaction.\n */\n lineItems: OrderLineItem[];\n /**\n * The refund ID if a refund was issued for the return.\n */\n refundId?: number;\n /**\n * The return ID for the completed return transaction.\n */\n returnId?: number;\n /**\n * The exchange ID if the return is part of an exchange transaction.\n */\n exchangeId?: number;\n /**\n * An array of line items added to the customer in the exchange.\n */\n lineItemsAdded?: LineItem[];\n /**\n * An array of line items removed from the customer in the exchange.\n */\n lineItemsRemoved?: LineItem[];\n}" } }, - "RenderExtension": { - "src/extension.ts": { - "filePath": "src/extension.ts", - "name": "RenderExtension", - "description": "Defines the structure of a render extension, which displays UI in the Shopify admin.", - "members": [ - { - "filePath": "src/extension.ts", - "syntaxKind": "PropertySignature", - "name": "api", - "value": "Api", - "description": "The API object providing access to extension capabilities, data, and methods. The specific API type depends on the extension target and determines what functionality is available to your extension, such as authentication, storage, data access, and GraphQL querying." - }, - { - "filePath": "src/extension.ts", - "syntaxKind": "PropertySignature", - "name": "components", - "value": "ComponentsSet", - "description": "The set of UI components available for rendering your extension. This defines which Polaris components and custom components can be used to build your extension's interface. The available components vary by extension target." - }, - { - "filePath": "src/extension.ts", - "syntaxKind": "PropertySignature", - "name": "output", - "value": "void | Promise", - "description": "The render function output. Your extension's render function should return void or a Promise that resolves to void. Use this to perform any necessary setup, rendering, or async operations when your extension loads." - } - ], - "value": "export interface RenderExtension {\n /**\n * The API object providing access to extension capabilities, data, and methods. The specific API type depends on the extension target and determines what functionality is available to your extension, such as authentication, storage, data access, and GraphQL querying.\n */\n api: Api;\n /**\n * The set of UI components available for rendering your extension. This defines which Polaris components and custom components can be used to build your extension's interface. The available components vary by extension target.\n */\n components: ComponentsSet;\n /**\n * The render function output. Your extension's render function should return void or a Promise that resolves to void. Use this to perform any necessary setup, rendering, or async operations when your extension loads.\n */\n output: void | Promise;\n}" + "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": "" } }, "ExtensionTargets": { @@ -9111,14 +8991,16 @@ "syntaxKind": "PropertySignature", "name": "pos.receipt-footer.block.render", "value": "RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >", - "description": "Renders a custom section in the footer of printed receipts. Use this target for adding contact details, return policies, social media links, or customer engagement elements like survey links or marketing campaigns at the bottom of receipts.\n\nExtensions at this target appear in the receipt footer area and support limited components optimized for print formatting, including text content for information display." + "description": "Renders a custom section in the footer of printed receipts. Use this target for adding contact details, return policies, social media links, or customer engagement elements like survey links or marketing campaigns at the bottom of receipts.\n\nExtensions at this target appear in the receipt footer area and support limited components optimized for print formatting, including text content for information display.", + "isPrivate": true }, { "filePath": "src/surfaces/point-of-sale/extension-targets.ts", "syntaxKind": "PropertySignature", "name": "pos.receipt-header.block.render", "value": "RenderExtension<\n {[key: string]: any} & StorageApi & TransactionCompleteWithReprintData,\n ReceiptComponents\n >", - "description": "Renders a custom section in the header of printed receipts. Use this target for adding custom branding, logos, promotional messages, or store-specific information at the top of receipts.\n\nExtensions at this target appear in the receipt header area and support limited components optimized for print formatting, including text content for information display." + "description": "Renders a custom section in the header of printed receipts. Use this target for adding custom branding, logos, promotional messages, or store-specific information at the top of receipts.\n\nExtensions at this target appear in the receipt header area and support limited components optimized for print formatting, including text content for information display.", + "isPrivate": true }, { "filePath": "src/surfaces/point-of-sale/extension-targets.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 ba846d9f94..00883c40cd 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 @@ -58,8 +58,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -141,8 +139,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -262,8 +258,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -383,8 +377,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -505,8 +497,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -629,8 +619,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -753,8 +741,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -877,8 +863,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -1001,8 +985,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -1040,26 +1022,6 @@ "ToastApi" ] }, - "pos.receipt-footer.block.render": { - "components": [ - "PosBlock", - "QrCode", - "Text" - ], - "apis": [ - "StorageApi" - ] - }, - "pos.receipt-header.block.render": { - "components": [ - "PosBlock", - "QrCode", - "Text" - ], - "apis": [ - "StorageApi" - ] - }, "pos.register-details.action.menu-item.render": { "components": [ "Button" @@ -1106,8 +1068,6 @@ "POSBlock", "Page", "PosBlock", - "QRCode", - "QrCode", "Route", "Router", "ScrollBox", @@ -1409,8 +1369,6 @@ "pos.purchase.post.action.menu-item.render", "pos.purchase.post.action.render", "pos.purchase.post.block.render", - "pos.receipt-footer.block.render", - "pos.receipt-header.block.render", "pos.register-details.action.menu-item.render", "pos.register-details.action.render", "pos.register-details.block.render", @@ -2104,44 +2062,12 @@ "pos.product-details.block.render", "pos.purchase.post.action.render", "pos.purchase.post.block.render", - "pos.receipt-footer.block.render", - "pos.receipt-header.block.render", "pos.register-details.action.render", "pos.register-details.block.render", "pos.return.post.action.render", "pos.return.post.block.render" ] }, - "QRCode": { - "targets": [ - "pos.cart.line-item-details.action.render", - "pos.customer-details.action.render", - "pos.draft-order-details.action.render", - "pos.exchange.post.action.render", - "pos.home.modal.render", - "pos.order-details.action.render", - "pos.product-details.action.render", - "pos.purchase.post.action.render", - "pos.register-details.action.render", - "pos.return.post.action.render" - ] - }, - "QrCode": { - "targets": [ - "pos.cart.line-item-details.action.render", - "pos.customer-details.action.render", - "pos.draft-order-details.action.render", - "pos.exchange.post.action.render", - "pos.home.modal.render", - "pos.order-details.action.render", - "pos.product-details.action.render", - "pos.purchase.post.action.render", - "pos.receipt-footer.block.render", - "pos.receipt-header.block.render", - "pos.register-details.action.render", - "pos.return.post.action.render" - ] - }, "Route": { "targets": [ "pos.cart.line-item-details.action.render", @@ -2342,8 +2268,6 @@ "pos.product-details.block.render", "pos.purchase.post.action.render", "pos.purchase.post.block.render", - "pos.receipt-footer.block.render", - "pos.receipt-header.block.render", "pos.register-details.action.render", "pos.register-details.block.render", "pos.return.post.action.render", From 03ad107c0a80fb683483bded6664df4a14dabcca Mon Sep 17 00:00:00 2001 From: Victor Chu Date: Fri, 3 Jul 2026 15:25:32 -0700 Subject: [PATCH 6/6] docs(pos): remove event target parser Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4 --- .../point-of-sale/build-docs-targets-json.mjs | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) 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 311a39a8c7..bad0606780 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 @@ -211,32 +211,6 @@ function parseDataTargetsFile(content) { return targets; } -/** - * Parse EventExtensionTargets from extension-targets.ts and return - * a map of target name -> { components: [], apis: [] } so all extension - * targets (render + event) appear in the JSON. - */ -function parseEventTargetsFile(content) { - const eventMatch = content.match( - /export interface EventExtensionTargets \{([\s\S]+?)\n\}/, - ); - if (!eventMatch) { - return {}; - } - const interfaceBody = eventMatch[1]; - const targetRegex = /'([^']+)':\s*\(/g; - const targets = {}; - let match; - while ((match = targetRegex.exec(interfaceBody)) !== null) { - const targetName = match[1]; - targets[targetName] = { - components: [], - apis: [], - }; - } - return targets; -} - function getNestedApis(apiName) { // Check if we've already parsed this API if (Object.prototype.hasOwnProperty.call(apiDefinitionsCache, apiName)) { @@ -538,12 +512,11 @@ function findGeneratedDocsPath() { return docsPath ?? generatedDir; } -// Generate the JSON (render targets + event targets) +// Generate the JSON (data targets + render targets) const renderTargets = parseTargetsFile(); const fileContent = fs.readFileSync(TARGETS_FILE_PATH, 'utf-8'); const dataTargets = parseDataTargetsFile(fileContent); -const eventTargets = parseEventTargetsFile(fileContent); -const targetsJson = {...dataTargets, ...renderTargets, ...eventTargets}; +const targetsJson = {...dataTargets, ...renderTargets}; // Create the extended JSON with reverse mappings const extendedJson = createReverseMapping(targetsJson);