vtex
Version:
The platform for e-commerce apps
36 lines (35 loc) • 1.05 kB
TypeScript
/**
* Create the store URL for a specific account + workspace + path
* Examples:
* 1) storeUrl({ account: 'vtex', workspace: 'master', path: '/admin' })
* Will return 'https://master--vtex.myvtex.com/admin'
*
* 2) storeUrl({ account: 'vtex', addWorkspace: false })
* Will return 'https://vtex.myvtex.com
*/
export declare function storeUrl(opts: StoreUrlOptions): string;
interface StoreUrlOptions {
/**
* The store account to be used to create the URL. If not specified, the account the user
* is logged into will be used.
*/
account?: string;
/**
* The workspace to be used to create the URL. If not specified, the workspace the user
* is using will be used.
*
* If the 'addWorkspace' option is false this will not be used
*/
workspace?: string;
/**
* Specifies whether the workspace should be added to the URL
* @default true
*/
addWorkspace?: boolean;
/**
* The path to be added after the host
* @default '''
*/
path?: string;
}
export {};