import { NonNullablePaths } from '@wix/sdk-types'; /** * The back in stock settings object holds information related to the state of collecting back in stock * [notification requests](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/other-services/back-in-stock/back-in-stock-notifications/introduction). */ interface BackInStockSettings { /** * Information about collecting customer requests to receive * back in stock notifications. */ collectionStates?: BackInStockCollectionState[]; } interface BackInStockCollectionState { /** * ID of the app to receive notification requests for. * * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores). * The `appId` for Wix Stores is `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`. * @format GUID */ appId?: string; /** Whether to collect requests for items from this app. */ collectingRequests?: boolean; } interface StartCollectingRequestsRequest { /** * ID of the app to start accepting notification requests for. * * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores). * The `appId` for Wix Stores is `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`. * @format GUID */ appId: string; } interface StartCollectingRequestsResponse { /** Back in stock settings info. */ settings?: BackInStockSettings; } interface StopCollectingRequestsRequest { /** * ID of the app to stop accepting notification requests for. * * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores). * The `appId` for Wix Stores is `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`. * @format GUID */ appId: string; } interface StopCollectingRequestsResponse { /** Back in stock settings info. */ settings?: BackInStockSettings; } interface GetSettingsRequest { } interface GetSettingsResponse { /** Retrieved back in stock request settings. */ settings?: BackInStockSettings; } /** @docsIgnore */ type StartCollectingRequestsApplicationErrors = { code?: 'NOT_SUPPORTED_APP_DEF_ID'; description?: string; data?: Record; }; /** * Sets `settings.collectionStates.collectingRequests` to `true` for given `appId`. * * When the collection state is set to `true`, collecting requests is enabled and customers may request * notifications for out of stock products. While collecting is enabled, customers see a "Notify When Available" * button on out-of-stock items. Customers can click the button to enter their email address, which creates the * notification request. * @param appId - ID of the app to start accepting notification requests for. * * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores). * The `appId` for Wix Stores is `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`. * @public * @requiredField appId * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_SETTINGS * @applicableIdentity APP * @fqn com.wixpress.ecom.back.in.stock.BackInStockSettingsService.StartCollectingRequests */ declare function startCollectingRequests(appId: string): Promise & { __applicationErrorsType?: StartCollectingRequestsApplicationErrors; }>; /** * Sets `settings.collectionStates.collectingRequests` to `false` for given `appId`. * * When the collection state is set to `false`, collecting notification requests is disabled. * @param appId - ID of the app to stop accepting notification requests for. * * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores). * The `appId` for Wix Stores is `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`. * @public * @requiredField appId * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_SETTINGS * @applicableIdentity APP * @fqn com.wixpress.ecom.back.in.stock.BackInStockSettingsService.StopCollectingRequests */ declare function stopCollectingRequests(appId: string): Promise>; /** * Retrieves back in stock notification request settings. * @public * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_SETTINGS * @applicableIdentity APP * @fqn com.wixpress.ecom.back.in.stock.BackInStockSettingsService.GetSettings */ declare function getSettings(): Promise>; export { type BackInStockCollectionState, type BackInStockSettings, type GetSettingsRequest, type GetSettingsResponse, type StartCollectingRequestsApplicationErrors, type StartCollectingRequestsRequest, type StartCollectingRequestsResponse, type StopCollectingRequestsRequest, type StopCollectingRequestsResponse, getSettings, startCollectingRequests, stopCollectingRequests };