Add POS shopify.printing API (getPrinters + printer selection)#4515
Open
aaronschubert0 wants to merge 4 commits into
Open
Add POS shopify.printing API (getPrinters + printer selection)#4515aaronschubert0 wants to merge 4 commits into
aaronschubert0 wants to merge 4 commits into
Conversation
Introduces the `shopify.printing` API for the 2026-07 POS surface:
- printing-api.ts: PrintingApi / PrintingApiContent with getPrinters() and
print(src, options?), plus PrintOptions { printer?: Printer } and
Printer { id, name, connected }. Mirrors the approved TAG spec
(Shopify/ui-api-design#1413) and aligns with the WICG Web Printing model.
- standard-api.ts: add PrintingApi to StandardApi.
- api.ts: export the new public types.
- print-api.ts: deprecate PrintApi / PrintApiContent in favor of shopify.printing.
shopify.print remains as a deprecated alias; shopify.printing supersedes it.
… mock - standard-api.ts: PrintApi is intentionally kept in the StandardApi intersection so shopify.print keeps working as a deprecated alias of shopify.printing.print(). Suppress import/no-deprecated at the import and the intersection use (eslint runs with --max-warnings 0). - factories.ts: add the now-required `printing` property to the POS StandardApi test mock (getPrinters + print). Assisted-By: devx/8a5a23f1-0153-4f26-8b62-47e474da9689
a1dac9f to
9d6b253
Compare
Aligns the schema with the host-plugin behavior: receipt printers render
HTML/image content only, so print(src, {printer}) with a PDF src throws.
Adds the @throws entry and clarifies that PDFs print via the system dialog.
Assisted-By: devx/8a5a23f1-0153-4f26-8b62-47e474da9689
js-goupil
approved these changes
Jun 19, 2026
Assisted-By: devx/8a5a23f1-0153-4f26-8b62-47e474da9689
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the POS
shopify.printingAPI to the 2026-07 surface, per the approved TAG specShopify/ui-api-design#1413. This is the types layer of the cross-repo Printing API work.Changes
api/printing-api/printing-api.ts(new):PrintingApiContent—getPrinters(): Promise<Printer[]>andprint(src, options?): Promise<void>PrintOptions—{ printer?: Printer }Printer—{ id: string; name: string; connected: boolean }PrintingApi—{ printing: PrintingApiContent }(theshopify.printingnamespace)@publicDocsfor shopify.dev generation.standard-api.ts: addPrintingApitoStandardApi.api.ts: export the new public types.print-api.ts:@deprecatePrintApi/PrintApiContentin favor ofshopify.printing.shopify.printstays as a deprecated alias.minor.Notes
>= 2026-07,getPrinters()returning the connected receipt printer, and routingprint(src, {printer})to it) lands in the extensibility plugin (PR A2) and the pos-mobile bridge (PR B2).Printerfollows the committed spec exactly —{ id, name, connected }, notypefield.Testing
tsc --noEmitover@shopify/ui-extensions: 0 errors.Related
printingPlugin: Shopify/extensibility#1457getPrinters+ receipt routing): shop/world#837111🤖 Drafted with pi.