import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; /** * The back in stock notification request allows a customer to receive a notification when a specific item * is available again. The request includes information about the person making the request, the item * they want to receive a notification for, and the status of the notification. */ interface BackInStockNotificationRequest { /** * Notification request ID. * @readonly * @format GUID */ _id?: string | null; /** * Catalog and item reference that the notification request is for. * * Includes IDs for the catalog and item it came from, as well as additional, optional information. * * 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"`. */ catalogReference?: CatalogReference; /** * Email address to send notification to about item being back in stock. * @format EMAIL */ email?: string; /** * Contact ID for the contact with this `email`. * * If a contact does not already exist with the email address submitted when creating this notification request, then a new contact is created. * For more information about contacts, see the Contacts API. * @readonly * @format GUID */ contactId?: string | null; /** * Status of the notification. * * `status` is set to `RECEIVED` when the notification request is created. * The `status` changes once a notification email is sent for this request object: * + When a notification email is sent through the site, either automatically or with the Report Items Back In Stock method, then the `status` is briefly set to `PROCESSING` and then set to `NOTIFICATION_SENT` if the email is successful, and `FAILED` if it fails. * + When a notification email is sent offline, use the Mark As Notification Sent method to set `status` to `NOTIFICATION_SENT`. * @readonly */ status?: StatusWithLiterals; /** * Whether a notification was sent automatically. * * `autoNotified` is empty when the notification request is created and is not returned until * the field has a value. `autoNotified` receives a value when a notification email is sent for this request object. * * `autoNotified` sets to `TRUE` if the notification is sent through the site, either automatically or with the Report Items Back In Stock method. * If the notification email is sent offline but the `status` is updated with the Mark As Notification Sent method, * then `autoNotified` sets to `FALSE`. * @readonly */ autoNotified?: boolean | null; /** * Date and time the notification request was created. * @readonly */ _createdDate?: Date | null; /** * Item URL for this notification request. * @format WEB_URL */ itemUrl?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference { /** * ID of the item within the catalog it belongs to. * @minLength 1 * @maxLength 36 */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` * @minLength 1 */ appId?: string; /** * Additional item details in `key:value` pairs. * * Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items. * * For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration) * or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction). */ options?: Record | null; } declare enum Status { UNSPECIFIED = "UNSPECIFIED", RECEIVED = "RECEIVED", PROCESSING = "PROCESSING", NOTIFICATION_SENT = "NOTIFICATION_SENT", FAILED = "FAILED" } /** @enumType */ type StatusWithLiterals = Status | 'UNSPECIFIED' | 'RECEIVED' | 'PROCESSING' | 'NOTIFICATION_SENT' | 'FAILED'; interface InvalidateCache extends InvalidateCacheGetByOneOf { /** * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ metaSiteId?: string; /** * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ siteId?: string; /** Invalidate by App */ app?: App; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */ customTag?: CustomTag; /** Invalidate by multiple page ids */ pages?: Pages; /** Invalidate by multiple URI paths */ uris?: URIs; /** * tell us why you're invalidating the cache. You don't need to add your app name * @maxLength 256 */ reason?: string | null; /** Is local DS */ localDc?: boolean; hardPurge?: boolean; /** * Optional caller-provided ID for tracking this invalidation through the system. * When set, the corresponding CDN purge completion event will include this ID, * allowing you to confirm when the invalidation has fully propagated. * Example: generate a UUID, pass it here, and later match it in the CDN purge completion event. * @maxLength 256 */ correlationId?: string | null; } /** @oneof */ interface InvalidateCacheGetByOneOf { /** * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ metaSiteId?: string; /** * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ siteId?: string; /** Invalidate by App */ app?: App; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */ customTag?: CustomTag; /** Invalidate by multiple page ids */ pages?: Pages; /** Invalidate by multiple URI paths */ uris?: URIs; } interface App { /** * The AppDefId * @minLength 1 */ appDefId?: string; /** * The instance Id * @format GUID */ instanceId?: string; } interface Page { /** * the msid the page is on * @format GUID */ metaSiteId?: string; /** * Invalidate by Page ID * @minLength 1 */ pageId?: string; } interface URI { /** * the msid the URI is on * @format GUID */ metaSiteId?: string; /** * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes * @minLength 1 */ uriPath?: string; } interface File { /** * the msid the file is related to * @format GUID */ metaSiteId?: string; /** * Invalidate by filename (for media files such as PDFs) * @minLength 1 * @maxLength 256 */ fileName?: string; } interface CustomTag { /** * the msid the tag is related to * @format GUID */ metaSiteId?: string; /** * Tag to invalidate by * @minLength 1 * @maxLength 256 */ tag?: string; } interface Pages { /** * the msid the pages are on * @format GUID */ metaSiteId?: string; /** * Invalidate by multiple Page IDs in a single message * @maxSize 100 * @minLength 1 */ pageIds?: string[]; } interface URIs { /** * the msid the URIs are on * @format GUID */ metaSiteId?: string; /** * URI paths to invalidate (e.g. page/my/path) - without leading/trailing slashes * @maxSize 100 * @minLength 1 */ uriPaths?: string[]; } interface CreateBackInStockNotificationRequestRequest { /** * Notification request information. * * Includes details for the out of stock item and the email address * requesting to be notified when it's back in stock. */ request: BackInStockNotificationRequest; /** Item details to include in the notification when the item is back in stock. */ itemDetails: BackInStockItemDetails; } interface BackInStockItemDetails { /** Item name. */ name?: string; /** * Item price. * @decimalValue options { gte:0 } */ price?: string; /** Item image. */ image?: string; } interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface CreateBackInStockNotificationRequestResponse { /** Created back in stock notification request. */ request?: BackInStockNotificationRequest; } interface GetBackInStockNotificationRequestRequest { /** * ID of the notification request to retrieve. * @format GUID */ _id: string; } interface GetBackInStockNotificationRequestResponse { /** Retrieved back in stock notification request. */ request?: BackInStockNotificationRequest; } interface DeleteBackInStockNotificationRequestRequest { /** * ID of the notification request to delete. * @format GUID */ _id: string; } interface DeleteBackInStockNotificationRequestResponse { } interface MarkAsNotificationSentRequest { /** * ID of the notification request to mark. * @format GUID */ _id: string; } interface MarkAsNotificationSentResponse { /** Marked back in stock notification request. */ request?: BackInStockNotificationRequest; } interface QueryBackInStockNotificationRequestsRequest { /** Query options. */ query?: PlatformQuery; } interface PlatformQuery extends PlatformQueryPagingMethodOneOf { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging; /** Filter object. */ filter?: Record | null; /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Sorting[]; } /** @oneof */ interface PlatformQueryPagingMethodOneOf { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface PlatformPaging { /** * Number of items to load. * @max 100 */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryBackInStockNotificationRequestsResponse { /** Retrieved back in stock requests. */ requests?: BackInStockNotificationRequest[]; /** Details on the paged set of results returned. */ metadata?: PlatformPagingMetadata; } interface PlatformPagingMetadata { /** The number of items returned in this response. */ count?: number | null; /** The offset which was requested. Returned if offset paging was used. */ offset?: number | null; /** The total number of items that match the query. Returned if offset paging was used. */ total?: number | null; /** Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: Cursors; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface GetBackInStockNotificationRequestsCountByCatalogReferencesRequest { /** * `catalogReference` items to retrieve the notification request for. * @minSize 1 * @maxSize 100 */ catalogReferences: CatalogReference[]; } interface GetBackInStockNotificationRequestsCountByCatalogReferencesResponse { /** Amount of back in stock notifications for each of the retrieved `catalogReference` items. */ countsPerCatalogReference?: BackInStockNotificationRequestsCount[]; } /** Maps each back in stock CatalogReference to the results (the number of unique occurrences). */ interface BackInStockNotificationRequestsCount { /** * Catalog and item reference. * * Includes IDs and additional, optional information related to the item. */ catalogReference?: CatalogReference; /** The number of unique back in stock requests for given `catalogReference`. */ count?: number; } interface ReportItemsBackInStockRequest { /** * `catalogReference` item to send notifications for. * * Cannot be used with `requestIds`. */ catalogReference?: CatalogReference; /** * IDs of requests to send notifications for. * * Cannot be used with `catalogReference`. */ requestIds?: string[]; /** * Item details to use in notifications. * * `itemDetails` may populate dynamic values in the notification template, as follows: * + `itemDetails.name` passes to the template as `item.name` * + `itemDetails.price` passes to the template as `item.price` * + `itemDetails.image.url` passes to the template as `item.image.url` * * Use `extraAutomationTemplateParameters` to pass additional dynamic values. */ itemDetails: BackInStockItemDetails; /** Additional key-value pairs to pass to the back in stock notification template. */ extraAutomationTemplateParameters?: Record; } interface ReportItemsBackInStockResponse { } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface Empty { } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type CreateBackInStockNotificationRequestApplicationErrors = { code?: 'BACK_IN_STOCK_NOTIFICATION_REQUEST_ALREADY_EXISTS'; description?: string; data?: Record; } | { code?: 'REQUEST_COLLECTION_DISABLED'; description?: string; data?: Record; } | { code?: 'INVALID_CATALOG_REFERENCE_OPTIONS'; description?: string; data?: Record; } | { code?: 'INVALID_ITEM_IMAGE_URL'; description?: string; data?: Record; }; /** @docsIgnore */ type MarkAsNotificationSentApplicationErrors = { code?: 'BACK_IN_STOCK_NOTIFICATION_REQUEST_NOT_FOUND'; description?: string; data?: Record; }; /** @docsIgnore */ type ReportItemsBackInStockApplicationErrors = { code?: 'REQUEST_CONTAINS_BOTH_CATALOG_REFERENCE_AND_REQUEST_IDS'; description?: string; data?: Record; } | { code?: 'INVALID_ITEM_IMAGE_URL'; description?: string; data?: Record; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface BackInStockNotificationRequestCreatedEnvelope { entity: BackInStockNotificationRequest; metadata: EventMetadata; } /** @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @webhook * @eventType wix.ecom.v1.back_in_stock_notification_request_created * @slug created */ declare function onBackInStockNotificationRequestCreated(handler: (event: BackInStockNotificationRequestCreatedEnvelope) => void | Promise): void; interface BackInStockNotificationRequestDeletedEnvelope { metadata: EventMetadata; } /** @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @webhook * @eventType wix.ecom.v1.back_in_stock_notification_request_deleted * @slug deleted */ declare function onBackInStockNotificationRequestDeleted(handler: (event: BackInStockNotificationRequestDeletedEnvelope) => void | Promise): void; interface BackInStockNotificationRequestUpdatedEnvelope { entity: BackInStockNotificationRequest; metadata: EventMetadata; } /** @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @webhook * @eventType wix.ecom.v1.back_in_stock_notification_request_updated * @slug updated */ declare function onBackInStockNotificationRequestUpdated(handler: (event: BackInStockNotificationRequestUpdatedEnvelope) => void | Promise): void; /** * Creates a back in stock notification request. * * If a notification request already exists for the same `catalogReference` and `email`, * then a new one isn't created and the existing request is returned. * * 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"`. * @param request - Notification request information. * * Includes details for the out of stock item and the email address * requesting to be notified when it's back in stock. * @param itemDetails - Item details to include in the notification when the item is back in stock. * @public * @requiredField itemDetails * @requiredField itemDetails.name * @requiredField itemDetails.price * @requiredField request * @requiredField request.catalogReference * @requiredField request.catalogReference.appId * @requiredField request.catalogReference.catalogItemId * @requiredField request.email * @permissionId ECOM.CREATE_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @applicableIdentity APP * @returns Created back in stock notification request. * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.CreateBackInStockNotificationRequest */ declare function createBackInStockNotificationRequest(request: NonNullablePaths, itemDetails: NonNullablePaths): Promise & { __applicationErrorsType?: CreateBackInStockNotificationRequestApplicationErrors; }>; /** * Retrieves a back in stock notification request. * @param _id - ID of the notification request to retrieve. * @public * @requiredField _id * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @applicableIdentity APP * @returns Retrieved back in stock notification request. * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.GetBackInStockNotificationRequest */ declare function getBackInStockNotificationRequest(_id: string): Promise>; /** * Deletes a back in stock notification request. * @param _id - ID of the notification request to delete. * @public * @requiredField _id * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @applicableIdentity APP * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.DeleteBackInStockNotificationRequest */ declare function deleteBackInStockNotificationRequest(_id: string): Promise; /** * Sets `status` of a back in stock request to `NOTIFICATION_SENT`. * * Use this endpoint if the notification is sent manually offline. If the notification is sent * automatically or with the Report Items Back In Stock method, then `status` updates on its own. * @param _id - ID of the notification request to mark. * @public * @requiredField _id * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @applicableIdentity APP * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.MarkAsNotificationSent */ declare function markAsNotificationSent(_id: string): Promise & { __applicationErrorsType?: MarkAsNotificationSentApplicationErrors; }>; /** * Creates a query to retrieve a list of back in stock notification requests. * * The `queryBackInStockNotificationRequests()` method builds a query to retrieve a list of back in stock notification requests and returns a `RequestsQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the `find()` method. * * You can refine the query by chaining `RequestsQueryBuilder` methods onto the query. `RequestsQueryBuilder` methods enable you to sort, filter, and control the results that `queryBackInStockNotificationRequests()` returns. * * The following `RequestsQueryBuilder` methods are supported for `queryBackInStockNotificationRequests()`. For a full description of the Requests object, see the object returned for the `items` property in `RequestsQueryResult`." * @public * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @applicableIdentity APP * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.QueryBackInStockNotificationRequests */ declare function queryBackInStockNotificationRequests(): RequestsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface RequestsQueryResult extends QueryCursorResult { items: BackInStockNotificationRequest[]; query: RequestsQueryBuilder; next: () => Promise; prev: () => Promise; } interface RequestsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: '_id' | 'contactId' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_id' | 'contactId' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_id' | 'contactId' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_id' | 'contactId' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: '_id' | 'contactId' | 'itemUrl', value: string) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: any[]) => RequestsQueryBuilder; in: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; exists: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: boolean) => RequestsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl'>) => RequestsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl'>) => RequestsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => RequestsQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => RequestsQueryBuilder; find: () => Promise; } /** * @hidden * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.QueryBackInStockNotificationRequests * @requiredField query */ declare function typedQueryBackInStockNotificationRequests(query: BackInStockNotificationRequestQuery): Promise>; interface BackInStockNotificationRequestQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: [ '_createdDate', '_id', 'autoNotified', 'contactId', 'itemUrl', 'status' ]; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type BackInStockNotificationRequestQuery = { /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. @maxLength: 16000 */ cursor?: NonNullable['cursor'] | null; }; /** Filter object. */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; /** * Retrieves the amount of back in stock requests for a given `catalogReference` item. * @param catalogReferences - `catalogReference` items to retrieve the notification request for. * @public * @requiredField catalogReferences * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @applicableIdentity APP * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.GetBackInStockNotificationRequestsCountByCatalogReferences */ declare function getBackInStockNotificationRequestsCountByCatalogReferences(catalogReferences: CatalogReference[]): Promise>; /** * Sends notifications for back in stock requests. * * > **Important:** * > Automations must be turned on in a [Wix user's dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Go%20to%20Back-in-Stock&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/store/back-in-stock) for notifications to send. * * This endpoint triggers notifications for requests in 1 of 2 ways: * 1. For a specific item, with the `catalogReference` information. * 2. For specific requests, with `requestIds`. * * `itemDetails` are required and may populate dynamic values in the notification template, as follows: * + `itemDetails.name` passes to the template as `item.name` * + `itemDetails.price` passes to the template as `item.price` * + `itemDetails.image.url` passes to the template as `item.image.url` * * If the notification template doesn't include `item.price`, `item.name`, or `item.image.url`, values should * be passed in `extraAutomationTemplateParameters`. * * After this endpoint is called, the `status` for the request will update to `NOTIFICATION_SENT` if it sends * successfully, or to `FAILED` if it fails to send. * @param itemDetails - Item details to use in notifications. * * `itemDetails` may populate dynamic values in the notification template, as follows: * + `itemDetails.name` passes to the template as `item.name` * + `itemDetails.price` passes to the template as `item.price` * + `itemDetails.image.url` passes to the template as `item.image.url` * * Use `extraAutomationTemplateParameters` to pass additional dynamic values. * @public * @requiredField itemDetails * @requiredField itemDetails.name * @requiredField itemDetails.price * @param options - Report options. * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @applicableIdentity APP * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.ReportItemsBackInStock */ declare function reportItemsBackInStock(itemDetails: NonNullablePaths, options?: ReportItemsBackInStockOptions): Promise; interface ReportItemsBackInStockOptions { /** * `catalogReference` item to send notifications for. * * Cannot be used with `requestIds`. */ catalogReference?: CatalogReference; /** * IDs of requests to send notifications for. * * Cannot be used with `catalogReference`. */ requestIds?: string[]; /** Additional key-value pairs to pass to the back in stock notification template. */ extraAutomationTemplateParameters?: Record; } export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type App, type BackInStockItemDetails, type BackInStockNotificationRequest, type BackInStockNotificationRequestCreatedEnvelope, type BackInStockNotificationRequestDeletedEnvelope, type BackInStockNotificationRequestQuery, type BackInStockNotificationRequestQuerySpec, type BackInStockNotificationRequestUpdatedEnvelope, type BackInStockNotificationRequestsCount, type BaseEventMetadata, type CatalogReference, type CommonQueryWithEntityContext, type CreateBackInStockNotificationRequestApplicationErrors, type CreateBackInStockNotificationRequestRequest, type CreateBackInStockNotificationRequestResponse, type CursorPaging, type Cursors, type CustomTag, type DeleteBackInStockNotificationRequestRequest, type DeleteBackInStockNotificationRequestResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type FocalPoint, type GetBackInStockNotificationRequestRequest, type GetBackInStockNotificationRequestResponse, type GetBackInStockNotificationRequestsCountByCatalogReferencesRequest, type GetBackInStockNotificationRequestsCountByCatalogReferencesResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type MarkAsNotificationSentApplicationErrors, type MarkAsNotificationSentRequest, type MarkAsNotificationSentResponse, type MessageEnvelope, type Page, type Pages, type PlatformPaging, type PlatformPagingMetadata, type PlatformQuery, type PlatformQueryPagingMethodOneOf, type QueryBackInStockNotificationRequestsRequest, type QueryBackInStockNotificationRequestsResponse, type ReportItemsBackInStockApplicationErrors, type ReportItemsBackInStockOptions, type ReportItemsBackInStockRequest, type ReportItemsBackInStockResponse, type RequestsQueryBuilder, type RequestsQueryResult, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type URI, type URIs, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createBackInStockNotificationRequest, deleteBackInStockNotificationRequest, getBackInStockNotificationRequest, getBackInStockNotificationRequestsCountByCatalogReferences, markAsNotificationSent, onBackInStockNotificationRequestCreated, onBackInStockNotificationRequestDeleted, onBackInStockNotificationRequestUpdated, queryBackInStockNotificationRequests, reportItemsBackInStock, typedQueryBackInStockNotificationRequests, utils };