@shopify/app-bridge-core
Version:
**[Join our team and work on libraries like this one.](https://www.shopify.ca/careers)**
30 lines (29 loc) • 986 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 event originated from an application.
* @internal
*/
export declare function isAppMessage(event: any): boolean;
/**
* Function used to determine if an action is in the Performance or WebVitals groups
* @public
*/
export declare function isPerformanceOrWebVitalsAction({ type }: {
type: string;
}): RegExpMatchArray | null;
/**
* 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;