@shopify/app-bridge
Version:
**Shopify is doubling our engineering staff in 2021! [Join our team and work on libraries like this one.](https://smrtr.io/5GGrc)**
28 lines (27 loc) • 917 B
TypeScript
import { FeaturesAvailable, PermissionType } from '../client/types';
import { MetaAction } from './types';
/**
* Predicate to determine if an action is an App Bridge action.
* @public
*/
export declare function isAppBridgeAction(action: any): action is MetaAction;
/**
* Predicate to determine if an action originated from an application.
* @internal
*/
export declare function isFromApp(action: any): boolean;
/**
* Returns the action type without the prefix and group
* @internal
*/
export declare function getPermissionKey(type: string): string;
/**
* Predicate to determine if an action is permitted
* @internal
*/
export declare function isPermitted(features: FeaturesAvailable, { group, type }: MetaAction, permissionType: PermissionType): boolean;
/**
* Predicate to determine if an event originated from an application.
* @internal
*/
export declare function isAppMessage(event: any): boolean;