UNPKG

1.05 kBTypeScriptView Raw
1import type { AppConfig, AppMiddleware, ClientApplication, ClientApplicationCreator, ClientApplicationTransportInjector } from './types';
2export declare const WINDOW_UNDEFINED_MESSAGE = "window is not defined. Running an app outside a browser is not supported";
3/**
4 * @internal
5 */
6export declare const createClientApp: ClientApplicationTransportInjector;
7/**
8 * @public
9 */
10export declare function createAppWrapper(frame: Window, localOrigin?: string, middleware?: AppMiddleware[]): ClientApplicationCreator;
11/**
12 * Creates your application instance.
13 * @param config - `apiKey` and `host` are both required.
14 * @remarks
15 * You will need to store `host` during the authentication process and then retrieve it for the code to work properly. To learn more about this process, see {@link https://help.shopify.com/api/embedded-apps/shop-origin | Getting and storing the shop origin}.
16 * @public
17 */
18export declare function createApp(config: AppConfig): ClientApplication<any>;
19/**
20 * {@inheritdocs createApp}
21 * @public
22 */
23export default createApp;