Skip to content

Commit

Permalink
Remove deprecated fields from doc
Browse files Browse the repository at this point in the history
  • Loading branch information
brianshen1990 committed Nov 3, 2023
1 parent de140b6 commit bb30cc5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/small-phones-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/ui-extensions': patch
'@shopify/ui-extensions-react': patch
---

remove deprecated fields from doc in customer account ui extensions
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {OrderStatusApi} from './order-status/order-status';
import {StandardApi} from './standard-api/standard-api';
import {CartLineItemApi} from './cart-line/cart-line-item';
import {FullPageApi} from '../targets';

export interface Docs_OrderStatus_MetafieldsApi
extends Pick<OrderStatusApi<any>, 'appMetafields' | 'metafields'> {}
Expand Down Expand Up @@ -72,3 +73,7 @@ export interface Docs_Standard_UIApi extends Pick<StandardApi<any>, 'ui'> {}

export interface Docs_Standard_QueryApi
extends Pick<StandardApi<any>, 'query'> {}

export interface Docs_StandardApi extends Omit<StandardApi<any>, 'router'> {}

export interface Docs_FullPageApi extends Omit<FullPageApi, 'location'> {}
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,19 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
*/
i18n: I18n;

/**
* @deprecated This is deprecated. DO NOT USE. This will be removed soon without warning.
*/
router: {
/**
* @deprecated This is deprecated. DO NOT USE. This will be removed soon without warning. use shopify protocol `extension://{{relative_path}} instead.
* @param relative
*/
getExtensionFullPageUrl(relative: string): Promise<string>;
/**
* @deprecated This is deprecated. DO NOT USE. This will be removed soon without warning. use `api.navigate` instead.
* @param to
*/
navigate(to: string): Promise<void>;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ export type AllowedComponentsForRenderExtension<
> = ExtractedAllowedComponentsFromRenderExtension<RenderExtensions[Target]>;

export interface FullPageApi {
/**
* @deprecated This is deprecated. DO NOT USE. This will be removed soon without warning. use `api.navigation.currentEntry` and `api.navigation.addEventListener` instead.
*/
location: StatefulRemoteSubscribable<{
pathname: string;
search: string;
Expand Down

0 comments on commit bb30cc5

Please sign in to comment.