UNPKG

@shopify/app-bridge-host

Version:

App Bridge Host contains components and middleware to be consumed by the app's host, as well as the host itself. The middleware and `Frame` component are responsible for facilitating communication between the client and host, and used to act on actions se

27 lines (26 loc) 1.2 kB
import { Action as BaseAction } from 'redux'; import { Features, Group, MetaAction } from '@shopify/app-bridge-core/actions'; import { RequestUpdateOptions } from '@shopify/app-bridge-core/actions/Features/types'; import type { FeaturesState, FeaturesAvailable } from '@shopify/app-bridge-core/client'; export interface UpdateAction extends MetaAction { group: typeof Group.Features; readonly type: typeof Features.Action.UPDATE; readonly payload: FeaturesState<Partial<FeaturesAvailable>>; } export interface RequestUpdateAction extends MetaAction { group: typeof Group.Features; readonly type: typeof Features.Action.REQUEST_UPDATE; readonly payload: RequestUpdateOptions; } export interface LegacyFeaturesAction { [key: string]: boolean; } export type LegacyFeaturesAvailable = { [key in Group]?: LegacyFeaturesAction; }; export interface LegacyUpdateAction extends BaseAction { readonly type: typeof Features.Action.UPDATE; readonly payload: LegacyFeaturesAvailable; } export declare function update(payload: FeaturesState<Partial<FeaturesAvailable>>): UpdateAction; export declare function requestUpdate(payload: RequestUpdateOptions): RequestUpdateAction;