@scayle/storefront-nuxt
Version:
Nuxt integration for the SCAYLE Commerce Engine and Storefront API
68 lines (65 loc) • 5 kB
text/typescript
import * as _nuxt_schema from '@nuxt/schema';
import { HookResult } from '@nuxt/schema';
export * from '../dist/runtime/types/module.js';
/**
* Definition of a custom RPC import
*/
interface CustomRpcImport {
/** The location from which to import the RPC method(s) */
source: string;
/** The specifiers to import as RPC methods */
names: string[];
}
/**
* Build-time hooks used by the module
*/
interface ModuleHooks {
'storefront:custom-rpc:extend': (customRpcImports: CustomRpcImport[]) => HookResult;
}
declare module '@nuxt/schema' {
interface NuxtHooks extends ModuleHooks {
}
}
/**
* Defines the Storefront Nuxt module (`@scayle/storefront-nuxt`).
*
* @param options Module base options.
* @param options.session The session configuration.
* @param options.session.cookieName The name of the session cookie.
* @param options.session.sameSite The SameSite attribute for the session cookie.
* @param options.shopSelector The shop selector.
* @param options.oauth The OAuth configuration.
* @param options.oauth.apiHost The API host.
* @param options.oauth.clientId The client ID.
* @param options.oauth.clientSecret The client secret.
* @param options.idp The IDP configuration.
* @param options.idp.enabled Whether IDP is enabled.
* @param options.idp.idpKeys The IDP keys.
* @param options.idp.idpRedirectURL The IDP redirect URL.
* @param options.appKeys The application keys configuration.
* @param options.appKeys.wishlistKey The wishlist key.
* @param options.appKeys.basketKey The basket key.
* @param options.appKeys.hashAlgorithm The hash algorithm.
* @param options.legacy The legacy configuration.
* @param options.legacy.enableSessionMigration Whether session migration is enabled.
* @param options.rpcMethodNames The RPC method names.
* @param options.rpcDir The RPC directory.
* @param options.rpcMethodOverrides RPC method overrides.
* @param options.shops The shops configuration.
* @param options.storage The storage configuration.
*
* @returns The Nuxt module.
*/
declare const _default: _nuxt_schema.NuxtModule<{
rpcDir?: string | undefined;
rpcMethodNames?: string[] | undefined;
rpcMethodOverrides?: ("getProductById" | "getProductsByIds" | "getProductsByReferenceKeys" | "getProductsCount" | "fetchAllFiltersForCategory" | "getFilters" | "getProductsByCategory" | "oauthForgetPassword" | "oauthGuestLogin" | "oauthLogin" | "oauthRegister" | "oauthRevokeToken" | "refreshAccessToken" | "updatePasswordByHash" | "addItemToBasket" | "addItemsToBasket" | "getBasket" | "removeItemFromBasket" | "clearBasket" | "mergeBaskets" | "updateBasketItem" | "getApplicablePromotionsByCode" | "updatePromotions" | "getBrands" | "getBrandById" | "getRootCategories" | "getCategoryByPath" | "getCategoriesByPath" | "getCategoryById" | "getCategoryTree" | "getCampaign" | "getCampaignKey" | "getOrderDataByCbd" | "getSearchSuggestions" | "resolveSearch" | "getShopConfiguration" | "getUser" | "fetchUser" | "refreshUser" | "getAccessToken" | "getWishlist" | "addItemToWishlist" | "removeItemFromWishlist" | "clearWishlist" | "getOrderById" | "getOrderCustomData" | "getShopUserAddresses" | "updateShopUser" | "updatePassword" | "getCheckoutToken" | "getVariantById" | "fetchAllNavigationTrees" | "fetchNavigationTreeById" | "fetchNavigationTreeByName" | "getPromotions" | "getCurrentPromotions" | "getPromotionsByIds" | "getExternalIdpRedirect" | "handleIDPLoginCallback")[] | undefined;
apiBasePath?: string | undefined;
}, {
rpcDir?: string | undefined;
rpcMethodNames?: string[] | undefined;
rpcMethodOverrides?: ("getProductById" | "getProductsByIds" | "getProductsByReferenceKeys" | "getProductsCount" | "fetchAllFiltersForCategory" | "getFilters" | "getProductsByCategory" | "oauthForgetPassword" | "oauthGuestLogin" | "oauthLogin" | "oauthRegister" | "oauthRevokeToken" | "refreshAccessToken" | "updatePasswordByHash" | "addItemToBasket" | "addItemsToBasket" | "getBasket" | "removeItemFromBasket" | "clearBasket" | "mergeBaskets" | "updateBasketItem" | "getApplicablePromotionsByCode" | "updatePromotions" | "getBrands" | "getBrandById" | "getRootCategories" | "getCategoryByPath" | "getCategoriesByPath" | "getCategoryById" | "getCategoryTree" | "getCampaign" | "getCampaignKey" | "getOrderDataByCbd" | "getSearchSuggestions" | "resolveSearch" | "getShopConfiguration" | "getUser" | "fetchUser" | "refreshUser" | "getAccessToken" | "getWishlist" | "addItemToWishlist" | "removeItemFromWishlist" | "clearWishlist" | "getOrderById" | "getOrderCustomData" | "getShopUserAddresses" | "updateShopUser" | "updatePassword" | "getCheckoutToken" | "getVariantById" | "fetchAllNavigationTrees" | "fetchNavigationTreeById" | "fetchNavigationTreeByName" | "getPromotions" | "getCurrentPromotions" | "getPromotionsByIds" | "getExternalIdpRedirect" | "handleIDPLoginCallback")[] | undefined;
apiBasePath?: string | undefined;
}, false>;
export { _default as default };
export type { ModuleHooks };