Skip to content

Commit 59ee7ad

Browse files
vctrchuclaude
andcommitted
chore: mark .observe extension targets as @deprecated
Add @deprecated and @Private JSDoc annotations to all 4 POS observe extension targets: - pos.transaction-complete.event.observe - pos.cash-tracking-session-start.event.observe - pos.cash-tracking-session-complete.event.observe - pos.cart-update.event.observe Each annotation includes the deprecation version (2026-04), migration path to pos.app.ready.data + shopify.addEventListener(), and a link to the new target's documentation. pos.cart-update.event.observe also references shopify.cart.current.subscribe() as an alternative for render targets. Resolves: shop/issues-retail#26066 Epic: shop/issues-retail#26019 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 93d17ac commit 59ee7ad

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

packages/ui-extensions/src/surfaces/point-of-sale/extension-targets.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,48 @@ import type {BasicComponents} from './components/targets/BasicComponents';
2929
import type {TransactionCompleteWithReprintData} from './event/data';
3030

3131
export interface EventExtensionTargets {
32+
/**
33+
* Fires when a transaction completes successfully.
34+
*
35+
* @deprecated Deprecated as of `2026-04`. Use `pos.app.ready.data` target with
36+
* `shopify.addEventListener('transaction_complete', callback)` instead.
37+
* See https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/pos-app-ready-data
38+
* @private
39+
*/
3240
'pos.transaction-complete.event.observe': (
3341
data: TransactionCompleteData,
3442
) => Promise<BaseOutput>;
43+
/**
44+
* Fires when a cash tracking session starts.
45+
*
46+
* @deprecated Deprecated as of `2026-04`. Use `pos.app.ready.data` target with
47+
* `shopify.addEventListener('cash_tracking_session_start', callback)` instead.
48+
* See https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/pos-app-ready-data
49+
* @private
50+
*/
3551
'pos.cash-tracking-session-start.event.observe': (
3652
data: CashTrackingSessionStartData,
3753
) => Promise<BaseOutput>;
54+
/**
55+
* Fires when a cash tracking session completes.
56+
*
57+
* @deprecated Deprecated as of `2026-04`. Use `pos.app.ready.data` target with
58+
* `shopify.addEventListener('cash_tracking_session_complete', callback)` instead.
59+
* See https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/pos-app-ready-data
60+
* @private
61+
*/
3862
'pos.cash-tracking-session-complete.event.observe': (
3963
data: CashTrackingSessionCompleteData,
4064
) => Promise<BaseOutput>;
65+
/**
66+
* Fires when the cart is updated.
67+
*
68+
* @deprecated Deprecated as of `2026-04`. Use `shopify.cart.current.subscribe()` instead,
69+
* available on any render target. For background observation, use `pos.app.ready.data`
70+
* target with `shopify.addEventListener('cart_update', callback)`.
71+
* See https://shopify.dev/docs/api/pos-ui-extensions/unstable/targets/pos-app-ready-data
72+
* @private
73+
*/
4174
'pos.cart-update.event.observe': (
4275
data: CartUpdateEventData,
4376
) => Promise<BaseOutput>;

0 commit comments

Comments
 (0)