@@ -11,6 +11,39 @@ export interface NavigationApiContent {
11
11
12
12
/** Dismisses the extension. */
13
13
dismiss ( ) : void ;
14
+
15
+ /**
16
+ * Open POS screens. Resource screens open in a modal. Tabs close all modals before navigating to the tab.
17
+ * Available screens:
18
+ * - `gid://shopify/Product/<productId>` to open product details.
19
+ * - `gid://shopify/ProductVariant/<variantId>` to open product details for variant.
20
+ * - `gid://shopify/Customer/<customerId>` to open customer details.
21
+ * - `gid://shopify/Order/<orderId>` to open order details.
22
+ * - `gid://shopify/DraftOrder/<draftOrderId>` to open draft order details.
23
+ * - `gid://shopify/StaffMember/<staffMemberId>` to open staff details.
24
+ * - `pos://home-tab` to open the home tab.
25
+ * - `pos://cart-tab` to open the cart tab. Opens home tab on tablets.
26
+ * - `pos://products-tab` to open the products tab.
27
+ * - `pos://orders-tab` to open the orders tab.
28
+ * - `pos://customers-tab` to open the customers tab. Available only on tablets, and throws error on phones.
29
+ * - `pos://more-tab` to open the more tab.
30
+ *
31
+ * @example
32
+ * // Open product details screen for product id 123
33
+ * openUrl('gid://shopify/Product/123');
34
+ *
35
+ * @example
36
+ * // Open home tab
37
+ * openUrl('pos://home-tab');
38
+ *
39
+ * @example
40
+ * // Open home tab
41
+ * openUrl(new URL('pos://home-tab'));
42
+ *
43
+ * @param url - The POS screen to open
44
+ * @returns A promise that resolves when the POS screen is opened, rejects when an error occurs like an unsupported GID or POS screen.
45
+ */
46
+ open ( url : string | URL ) : Promise < void > ;
14
47
}
15
48
16
49
/**
0 commit comments