UNPKG

1.48 kBTypeScriptView Raw
1import { AppConfig, AppMiddleware, ClientApplication, ClientApplicationCreator, ClientApplicationTransportInjector, Params } from './types';
2export declare const WINDOW_UNDEFINED_MESSAGE = "window is not defined. Running an app outside a browser is not supported";
3/**
4 * Extracts the query parameters from the current URL.
5 * @deprecated This function has been deprecated.
6 * @public
7 */
8export declare function getUrlParams(): Params;
9/**
10 * Extracts the `shop` query parameter from the current URL.
11 * @deprecated This function has been deprecated, see {@link https://help.shopify.com/api/embedded-apps/shop-origin}
12 * @public
13 */
14export declare function getShopOrigin(): string;
15/**
16 * @internal
17 */
18export declare const createClientApp: ClientApplicationTransportInjector;
19/**
20 * @public
21 */
22export declare function createAppWrapper(frame: Window, localOrigin?: string, middleware?: AppMiddleware[]): ClientApplicationCreator;
23/**
24 * Creates your application instance.
25 * @param config - Both `apiKey` and `shopOrigin` are required.
26 * @remarks
27 * You will need to store `shopOrigin` 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}.
28 * @public
29 */
30export declare function createApp(config: AppConfig): ClientApplication<any>;
31/**
32 * {@inheritdocs createApp}
33 * @public
34 */
35export default createApp;