{"version":3,"sources":["../../../src/ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.public.ts","../../../src/ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.universal.ts","../../../src/ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.http.ts","../../../src/ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.context.ts"],"sourcesContent":["import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  BackInStockItemDetails,\n  BackInStockNotificationRequest,\n  BackInStockNotificationRequestCreatedEnvelope,\n  BackInStockNotificationRequestDeletedEnvelope,\n  BackInStockNotificationRequestQuery,\n  BackInStockNotificationRequestUpdatedEnvelope,\n  CatalogReference,\n  CreateBackInStockNotificationRequestApplicationErrors,\n  GetBackInStockNotificationRequestsCountByCatalogReferencesResponse,\n  MarkAsNotificationSentApplicationErrors,\n  MarkAsNotificationSentResponse,\n  QueryBackInStockNotificationRequestsResponse,\n  ReportItemsBackInStockApplicationErrors,\n  ReportItemsBackInStockOptions,\n  RequestsQueryBuilder,\n  createBackInStockNotificationRequest as universalCreateBackInStockNotificationRequest,\n  deleteBackInStockNotificationRequest as universalDeleteBackInStockNotificationRequest,\n  getBackInStockNotificationRequest as universalGetBackInStockNotificationRequest,\n  getBackInStockNotificationRequestsCountByCatalogReferences as universalGetBackInStockNotificationRequestsCountByCatalogReferences,\n  markAsNotificationSent as universalMarkAsNotificationSent,\n  queryBackInStockNotificationRequests as universalQueryBackInStockNotificationRequests,\n  reportItemsBackInStock as universalReportItemsBackInStock,\n  typedQueryBackInStockNotificationRequests as universalTypedQueryBackInStockNotificationRequests,\n} from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function createBackInStockNotificationRequest(\n  httpClient: HttpClient\n): CreateBackInStockNotificationRequestSignature {\n  return (\n    request: NonNullablePaths<\n      BackInStockNotificationRequest,\n      | `catalogReference`\n      | `catalogReference.appId`\n      | `catalogReference.catalogItemId`\n      | `email`,\n      3\n    >,\n    itemDetails: NonNullablePaths<BackInStockItemDetails, `name` | `price`, 2>\n  ) =>\n    universalCreateBackInStockNotificationRequest(\n      request,\n      itemDetails,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreateBackInStockNotificationRequestSignature {\n  /**\n   * Creates a back in stock notification request.\n   *\n   * If a notification request already exists for the same `catalogReference` and `email`,\n   * then a new one isn't created and the existing request is returned.\n   *\n   * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores).\n   * The `appId` for Wix Stores is `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`.\n   * @param - Notification request information.\n   *\n   * Includes details for the out of stock item and the email address\n   * requesting to be notified when it's back in stock.\n   * @param - Item details to include in the notification when the item is back in stock.\n   * @returns Created back in stock notification request.\n   */\n  (\n    request: NonNullablePaths<\n      BackInStockNotificationRequest,\n      | `catalogReference`\n      | `catalogReference.appId`\n      | `catalogReference.catalogItemId`\n      | `email`,\n      3\n    >,\n    itemDetails: NonNullablePaths<BackInStockItemDetails, `name` | `price`, 2>\n  ): Promise<\n    NonNullablePaths<\n      BackInStockNotificationRequest,\n      | `catalogReference.catalogItemId`\n      | `catalogReference.appId`\n      | `email`\n      | `status`,\n      3\n    > & {\n      __applicationErrorsType?: CreateBackInStockNotificationRequestApplicationErrors;\n    }\n  >;\n}\n\nexport function getBackInStockNotificationRequest(\n  httpClient: HttpClient\n): GetBackInStockNotificationRequestSignature {\n  return (_id: string) =>\n    universalGetBackInStockNotificationRequest(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetBackInStockNotificationRequestSignature {\n  /**\n   * Retrieves a back in stock notification request.\n   * @param - ID of the notification request to retrieve.\n   * @returns Retrieved back in stock notification request.\n   */\n  (_id: string): Promise<\n    NonNullablePaths<\n      BackInStockNotificationRequest,\n      | `catalogReference.catalogItemId`\n      | `catalogReference.appId`\n      | `email`\n      | `status`,\n      3\n    >\n  >;\n}\n\nexport function deleteBackInStockNotificationRequest(\n  httpClient: HttpClient\n): DeleteBackInStockNotificationRequestSignature {\n  return (_id: string) =>\n    universalDeleteBackInStockNotificationRequest(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface DeleteBackInStockNotificationRequestSignature {\n  /**\n   * Deletes a back in stock notification request.\n   * @param - ID of the notification request to delete.\n   */\n  (_id: string): Promise<void>;\n}\n\nexport function markAsNotificationSent(\n  httpClient: HttpClient\n): MarkAsNotificationSentSignature {\n  return (_id: string) =>\n    universalMarkAsNotificationSent(\n      _id,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface MarkAsNotificationSentSignature {\n  /**\n   * Sets `status` of a back in stock request to `NOTIFICATION_SENT`.\n   *\n   * Use this endpoint if the notification is sent manually offline. If the notification is sent\n   * automatically or with the Report Items Back In Stock method, then `status` updates on its own.\n   * @param - ID of the notification request to mark.\n   */\n  (_id: string): Promise<\n    NonNullablePaths<\n      MarkAsNotificationSentResponse,\n      | `request.catalogReference.catalogItemId`\n      | `request.catalogReference.appId`\n      | `request.email`\n      | `request.status`,\n      4\n    > & {\n      __applicationErrorsType?: MarkAsNotificationSentApplicationErrors;\n    }\n  >;\n}\n\nexport function queryBackInStockNotificationRequests(\n  httpClient: HttpClient\n): QueryBackInStockNotificationRequestsSignature {\n  return () =>\n    universalQueryBackInStockNotificationRequests(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryBackInStockNotificationRequestsSignature {\n  /**\n   * Creates a query to retrieve a list of back in stock notification requests.\n   *\n   * The `queryBackInStockNotificationRequests()` method builds a query to retrieve a list of back in stock notification requests and returns a `RequestsQueryBuilder` object.\n   *\n   * The returned object contains the query definition, which is typically used to run the query using the `find()` method.\n   *\n   * 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.\n   *\n   * 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`.\"\n   */\n  (): RequestsQueryBuilder;\n}\n\nexport function typedQueryBackInStockNotificationRequests(\n  httpClient: HttpClient\n): TypedQueryBackInStockNotificationRequestsSignature {\n  return (query: BackInStockNotificationRequestQuery) =>\n    universalTypedQueryBackInStockNotificationRequests(\n      query,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface TypedQueryBackInStockNotificationRequestsSignature {\n  /** */\n  (query: BackInStockNotificationRequestQuery): Promise<\n    NonNullablePaths<\n      QueryBackInStockNotificationRequestsResponse,\n      | `requests`\n      | `requests.${number}.catalogReference.catalogItemId`\n      | `requests.${number}.catalogReference.appId`\n      | `requests.${number}.email`\n      | `requests.${number}.status`,\n      5\n    >\n  >;\n}\n\nexport function getBackInStockNotificationRequestsCountByCatalogReferences(\n  httpClient: HttpClient\n): GetBackInStockNotificationRequestsCountByCatalogReferencesSignature {\n  return (catalogReferences: CatalogReference[]) =>\n    universalGetBackInStockNotificationRequestsCountByCatalogReferences(\n      catalogReferences,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetBackInStockNotificationRequestsCountByCatalogReferencesSignature {\n  /**\n   * Retrieves the amount of back in stock requests for a given `catalogReference` item.\n   * @param - `catalogReference` items to retrieve the notification request for.\n   */\n  (catalogReferences: CatalogReference[]): Promise<\n    NonNullablePaths<\n      GetBackInStockNotificationRequestsCountByCatalogReferencesResponse,\n      | `countsPerCatalogReference`\n      | `countsPerCatalogReference.${number}.catalogReference.catalogItemId`\n      | `countsPerCatalogReference.${number}.catalogReference.appId`\n      | `countsPerCatalogReference.${number}.count`,\n      5\n    >\n  >;\n}\n\nexport function reportItemsBackInStock(\n  httpClient: HttpClient\n): ReportItemsBackInStockSignature {\n  return (\n    itemDetails: NonNullablePaths<BackInStockItemDetails, `name` | `price`, 2>,\n    options?: ReportItemsBackInStockOptions\n  ) =>\n    universalReportItemsBackInStock(\n      itemDetails,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ReportItemsBackInStockSignature {\n  /**\n   * Sends notifications for back in stock requests.\n   *\n   * > **Important:**\n   * > 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.\n   *\n   * This endpoint triggers notifications for requests in 1 of 2 ways:\n   * 1. For a specific item, with the `catalogReference` information.\n   * 2. For specific requests, with `requestIds`.\n   *\n   * `itemDetails` are required and may populate dynamic values in the notification template, as follows:\n   * + `itemDetails.name` passes to the template as `item.name`\n   * + `itemDetails.price` passes to the template as `item.price`\n   * + `itemDetails.image.url` passes to the template as `item.image.url`\n   *\n   * If the notification template doesn't include `item.price`, `item.name`, or `item.image.url`, values should\n   * be passed in `extraAutomationTemplateParameters`.\n   *\n   * After this endpoint is called, the `status` for the request will update to `NOTIFICATION_SENT` if it sends\n   * successfully, or to `FAILED` if it fails to send.\n   * @param - Item details to use in notifications.\n   *\n   * `itemDetails` may populate dynamic values in the notification template, as follows:\n   * + `itemDetails.name` passes to the template as `item.name`\n   * + `itemDetails.price` passes to the template as `item.price`\n   * + `itemDetails.image.url` passes to the template as `item.image.url`\n   *\n   * Use `extraAutomationTemplateParameters` to pass additional dynamic values.\n   * @param - Report options.\n   */\n  (\n    itemDetails: NonNullablePaths<BackInStockItemDetails, `name` | `price`, 2>,\n    options?: ReportItemsBackInStockOptions\n  ): Promise<\n    void & {\n      __applicationErrorsType?: ReportItemsBackInStockApplicationErrors;\n    }\n  >;\n}\n\nexport const onBackInStockNotificationRequestCreated = EventDefinition(\n  'wix.ecom.v1.back_in_stock_notification_request_created',\n  true,\n  (event: BackInStockNotificationRequestCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<BackInStockNotificationRequestCreatedEnvelope>();\nexport const onBackInStockNotificationRequestDeleted = EventDefinition(\n  'wix.ecom.v1.back_in_stock_notification_request_deleted',\n  true,\n  (event: BackInStockNotificationRequestDeletedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'undefined.createdDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<BackInStockNotificationRequestDeletedEnvelope>();\nexport const onBackInStockNotificationRequestUpdated = EventDefinition(\n  'wix.ecom.v1.back_in_stock_notification_request_updated',\n  true,\n  (event: BackInStockNotificationRequestUpdatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<BackInStockNotificationRequestUpdatedEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  App,\n  BackInStockItemDetails,\n  BackInStockNotificationRequest,\n  BackInStockNotificationRequestCreatedEnvelope,\n  BackInStockNotificationRequestDeletedEnvelope,\n  BackInStockNotificationRequestQuerySpec,\n  BackInStockNotificationRequestUpdatedEnvelope,\n  BackInStockNotificationRequestsCount,\n  BaseEventMetadata,\n  CatalogReference,\n  CreateBackInStockNotificationRequestRequest,\n  CreateBackInStockNotificationRequestResponse,\n  CursorPaging,\n  Cursors,\n  CustomTag,\n  DeleteBackInStockNotificationRequestRequest,\n  DeleteBackInStockNotificationRequestResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  Empty,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  File,\n  FocalPoint,\n  GetBackInStockNotificationRequestRequest,\n  GetBackInStockNotificationRequestResponse,\n  GetBackInStockNotificationRequestsCountByCatalogReferencesRequest,\n  GetBackInStockNotificationRequestsCountByCatalogReferencesResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  InvalidateCache,\n  InvalidateCacheGetByOneOf,\n  MarkAsNotificationSentRequest,\n  MarkAsNotificationSentResponse,\n  MessageEnvelope,\n  Page,\n  Pages,\n  PlatformPaging,\n  PlatformPagingMetadata,\n  PlatformQuery,\n  PlatformQueryPagingMethodOneOf,\n  QueryBackInStockNotificationRequestsRequest,\n  QueryBackInStockNotificationRequestsResponse,\n  ReportItemsBackInStockOptions,\n  ReportItemsBackInStockRequest,\n  ReportItemsBackInStockResponse,\n  RequestsQueryBuilder,\n  RequestsQueryResult,\n  RestoreInfo,\n  SortOrder,\n  Sorting,\n  Status,\n  URI,\n  URIs,\n  WebhookIdentityType,\n  utils,\n} from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n  HttpClient,\n  HttpResponse,\n  NonNullablePaths,\n  QuerySpec,\n  Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixEcomV1BackInStockNotificationRequest from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.http.js';\n// @ts-ignore\nimport { transformSDKImageToRESTImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * The back in stock notification request allows a customer to receive a notification when a specific item\n * is available again. The request includes information about the person making the request, the item\n * they want to receive a notification for, and the status of the notification.\n */\nexport interface BackInStockNotificationRequest {\n  /**\n   * Notification request ID.\n   * @readonly\n   * @format GUID\n   */\n  _id?: string | null;\n  /**\n   * Catalog and item reference that the notification request is for.\n   *\n   * Includes IDs for the catalog and item it came from, as well as additional, optional information.\n   *\n   * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores).\n   * The `appId` for Wix Stores is `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`.\n   */\n  catalogReference?: CatalogReference;\n  /**\n   * Email address to send notification to about item being back in stock.\n   * @format EMAIL\n   */\n  email?: string;\n  /**\n   * Contact ID for the contact with this `email`.\n   *\n   * If a contact does not already exist with the email address submitted when creating this notification request, then a new contact is created.\n   * For more information about contacts, see the Contacts API.\n   * @readonly\n   * @format GUID\n   */\n  contactId?: string | null;\n  /**\n   * Status of the notification.\n   *\n   * `status` is set to `RECEIVED` when the notification request is created.\n   * The `status` changes once a notification email is sent for this request object:\n   * + 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.\n   * + When a notification email is sent offline, use the Mark As Notification Sent method to set `status` to `NOTIFICATION_SENT`.\n   * @readonly\n   */\n  status?: StatusWithLiterals;\n  /**\n   * Whether a notification was sent automatically.\n   *\n   * `autoNotified` is empty when the notification request is created and is not returned until\n   * the field has a value. `autoNotified` receives a value when a notification email is sent for this request object.\n   *\n   * `autoNotified` sets to `TRUE` if the notification is sent through the site, either automatically or with the Report Items Back In Stock method.\n   * If the notification email is sent offline but the `status` is updated with the Mark As Notification Sent method,\n   * then `autoNotified` sets to `FALSE`.\n   * @readonly\n   */\n  autoNotified?: boolean | null;\n  /**\n   * Date and time the notification request was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Item URL for this notification request.\n   * @format WEB_URL\n   */\n  itemUrl?: string | null;\n}\n\n/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */\nexport interface CatalogReference {\n  /**\n   * ID of the item within the catalog it belongs to.\n   * @minLength 1\n   * @maxLength 36\n   */\n  catalogItemId?: string;\n  /**\n   * ID of the app providing the catalog.\n   *\n   * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n   *\n   * For items from Wix catalogs, the following values always apply:\n   * + Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\n   * + Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\n   * + Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`\n   * @minLength 1\n   */\n  appId?: string;\n  /**\n   * Additional item details in `key:value` pairs.\n   *\n   * 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.\n   *\n   * 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)\n   * 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).\n   */\n  options?: Record<string, any> | null;\n}\n\nexport enum Status {\n  UNSPECIFIED = 'UNSPECIFIED',\n  RECEIVED = 'RECEIVED',\n  PROCESSING = 'PROCESSING',\n  NOTIFICATION_SENT = 'NOTIFICATION_SENT',\n  FAILED = 'FAILED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n  | Status\n  | 'UNSPECIFIED'\n  | 'RECEIVED'\n  | 'PROCESSING'\n  | 'NOTIFICATION_SENT'\n  | 'FAILED';\n\nexport interface InvalidateCache extends InvalidateCacheGetByOneOf {\n  /**\n   * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /**\n   * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n   * @format GUID\n   */\n  siteId?: string;\n  /** Invalidate by App */\n  app?: App;\n  /** Invalidate by page id */\n  page?: Page;\n  /** Invalidate by URI path */\n  uri?: URI;\n  /** Invalidate by file (for media files such as PDFs) */\n  file?: File;\n  /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n  customTag?: CustomTag;\n  /** Invalidate by multiple page ids */\n  pages?: Pages;\n  /** Invalidate by multiple URI paths */\n  uris?: URIs;\n  /**\n   * tell us why you're invalidating the cache. You don't need to add your app name\n   * @maxLength 256\n   */\n  reason?: string | null;\n  /** Is local DS */\n  localDc?: boolean;\n  hardPurge?: boolean;\n  /**\n   * Optional caller-provided ID for tracking this invalidation through the system.\n   * When set, the corresponding CDN purge completion event will include this ID,\n   * allowing you to confirm when the invalidation has fully propagated.\n   * Example: generate a UUID, pass it here, and later match it in the CDN purge completion event.\n   * @maxLength 256\n   */\n  correlationId?: string | null;\n}\n\n/** @oneof */\nexport interface InvalidateCacheGetByOneOf {\n  /**\n   * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /**\n   * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache!\n   * @format GUID\n   */\n  siteId?: string;\n  /** Invalidate by App */\n  app?: App;\n  /** Invalidate by page id */\n  page?: Page;\n  /** Invalidate by URI path */\n  uri?: URI;\n  /** Invalidate by file (for media files such as PDFs) */\n  file?: File;\n  /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */\n  customTag?: CustomTag;\n  /** Invalidate by multiple page ids */\n  pages?: Pages;\n  /** Invalidate by multiple URI paths */\n  uris?: URIs;\n}\n\nexport interface App {\n  /**\n   * The AppDefId\n   * @minLength 1\n   */\n  appDefId?: string;\n  /**\n   * The instance Id\n   * @format GUID\n   */\n  instanceId?: string;\n}\n\nexport interface Page {\n  /**\n   * the msid the page is on\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /**\n   * Invalidate by Page ID\n   * @minLength 1\n   */\n  pageId?: string;\n}\n\nexport interface URI {\n  /**\n   * the msid the URI is on\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /**\n   * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes\n   * @minLength 1\n   */\n  uriPath?: string;\n}\n\nexport interface File {\n  /**\n   * the msid the file is related to\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /**\n   * Invalidate by filename (for media files such as PDFs)\n   * @minLength 1\n   * @maxLength 256\n   */\n  fileName?: string;\n}\n\nexport interface CustomTag {\n  /**\n   * the msid the tag is related to\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /**\n   * Tag to invalidate by\n   * @minLength 1\n   * @maxLength 256\n   */\n  tag?: string;\n}\n\nexport interface Pages {\n  /**\n   * the msid the pages are on\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /**\n   * Invalidate by multiple Page IDs in a single message\n   * @maxSize 100\n   * @minLength 1\n   */\n  pageIds?: string[];\n}\n\nexport interface URIs {\n  /**\n   * the msid the URIs are on\n   * @format GUID\n   */\n  metaSiteId?: string;\n  /**\n   * URI paths to invalidate (e.g. page/my/path) - without leading/trailing slashes\n   * @maxSize 100\n   * @minLength 1\n   */\n  uriPaths?: string[];\n}\n\nexport interface CreateBackInStockNotificationRequestRequest {\n  /**\n   * Notification request information.\n   *\n   * Includes details for the out of stock item and the email address\n   * requesting to be notified when it's back in stock.\n   */\n  request: BackInStockNotificationRequest;\n  /** Item details to include in the notification when the item is back in stock. */\n  itemDetails: BackInStockItemDetails;\n}\n\nexport interface BackInStockItemDetails {\n  /** Item name. */\n  name?: string;\n  /**\n   * Item price.\n   * @decimalValue options { gte:0 }\n   */\n  price?: string;\n  /** Item image. */\n  image?: string;\n}\n\nexport interface FocalPoint {\n  /** X-coordinate of the focal point. */\n  x?: number;\n  /** Y-coordinate of the focal point. */\n  y?: number;\n  /** crop by height */\n  height?: number | null;\n  /** crop by width */\n  width?: number | null;\n}\n\nexport interface CreateBackInStockNotificationRequestResponse {\n  /** Created back in stock notification request. */\n  request?: BackInStockNotificationRequest;\n}\n\nexport interface GetBackInStockNotificationRequestRequest {\n  /**\n   * ID of the notification request to retrieve.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface GetBackInStockNotificationRequestResponse {\n  /** Retrieved back in stock notification request. */\n  request?: BackInStockNotificationRequest;\n}\n\nexport interface DeleteBackInStockNotificationRequestRequest {\n  /**\n   * ID of the notification request to delete.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface DeleteBackInStockNotificationRequestResponse {}\n\nexport interface MarkAsNotificationSentRequest {\n  /**\n   * ID of the notification request to mark.\n   * @format GUID\n   */\n  _id: string;\n}\n\nexport interface MarkAsNotificationSentResponse {\n  /** Marked back in stock notification request. */\n  request?: BackInStockNotificationRequest;\n}\n\nexport interface QueryBackInStockNotificationRequestsRequest {\n  /** Query options. */\n  query?: PlatformQuery;\n}\n\nexport interface PlatformQuery extends PlatformQueryPagingMethodOneOf {\n  /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */\n  paging?: PlatformPaging;\n  /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n  /** Filter object. */\n  filter?: Record<string, any> | null;\n  /** Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`. */\n  sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface PlatformQueryPagingMethodOneOf {\n  /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */\n  paging?: PlatformPaging;\n  /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface PlatformPaging {\n  /**\n   * Number of items to load.\n   * @max 100\n   */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport interface CursorPaging {\n  /**\n   * Maximum number of items to return in the results.\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results.\n   *\n   * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   * @maxLength 16000\n   */\n  cursor?: string | null;\n}\n\nexport interface QueryBackInStockNotificationRequestsResponse {\n  /** Retrieved back in stock requests. */\n  requests?: BackInStockNotificationRequest[];\n  /** Details on the paged set of results returned. */\n  metadata?: PlatformPagingMetadata;\n}\n\nexport interface PlatformPagingMetadata {\n  /** The number of items returned in this response. */\n  count?: number | null;\n  /** The offset which was requested. Returned if offset paging was used. */\n  offset?: number | null;\n  /** The total number of items that match the query. Returned if offset paging was used. */\n  total?: number | null;\n  /** Cursors to navigate through result pages. Returned if cursor paging was used. */\n  cursors?: Cursors;\n}\n\nexport interface Cursors {\n  /**\n   * Cursor string pointing to the next page in the list of results.\n   * @maxLength 16000\n   */\n  next?: string | null;\n  /**\n   * Cursor pointing to the previous page in the list of results.\n   * @maxLength 16000\n   */\n  prev?: string | null;\n}\n\nexport interface GetBackInStockNotificationRequestsCountByCatalogReferencesRequest {\n  /**\n   * `catalogReference` items to retrieve the notification request for.\n   * @minSize 1\n   * @maxSize 100\n   */\n  catalogReferences: CatalogReference[];\n}\n\nexport interface GetBackInStockNotificationRequestsCountByCatalogReferencesResponse {\n  /** Amount of back in stock notifications for each of the retrieved `catalogReference` items. */\n  countsPerCatalogReference?: BackInStockNotificationRequestsCount[];\n}\n\n/** Maps each back in stock CatalogReference to the results (the number of unique occurrences). */\nexport interface BackInStockNotificationRequestsCount {\n  /**\n   * Catalog and item reference.\n   *\n   * Includes IDs and additional, optional information related to the item.\n   */\n  catalogReference?: CatalogReference;\n  /** The number of unique back in stock requests for given `catalogReference`. */\n  count?: number;\n}\n\nexport interface ReportItemsBackInStockRequest {\n  /**\n   * `catalogReference` item to send notifications for.\n   *\n   * Cannot be used with `requestIds`.\n   */\n  catalogReference?: CatalogReference;\n  /**\n   * IDs of requests to send notifications for.\n   *\n   * Cannot be used with `catalogReference`.\n   */\n  requestIds?: string[];\n  /**\n   * Item details to use in notifications.\n   *\n   * `itemDetails` may populate dynamic values in the notification template, as follows:\n   * + `itemDetails.name` passes to the template as `item.name`\n   * + `itemDetails.price` passes to the template as `item.price`\n   * + `itemDetails.image.url` passes to the template as `item.image.url`\n   *\n   * Use `extraAutomationTemplateParameters` to pass additional dynamic values.\n   */\n  itemDetails: BackInStockItemDetails;\n  /** Additional key-value pairs to pass to the back in stock notification template. */\n  extraAutomationTemplateParameters?: Record<string, string>;\n}\n\nexport interface ReportItemsBackInStockResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * 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.\n   * 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.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entity?: string;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateBackInStockNotificationRequestApplicationErrors =\n  | {\n      code?: 'BACK_IN_STOCK_NOTIFICATION_REQUEST_ALREADY_EXISTS';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'REQUEST_COLLECTION_DISABLED';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'INVALID_CATALOG_REFERENCE_OPTIONS';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'INVALID_ITEM_IMAGE_URL';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type MarkAsNotificationSentApplicationErrors = {\n  code?: 'BACK_IN_STOCK_NOTIFICATION_REQUEST_NOT_FOUND';\n  description?: string;\n  data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ReportItemsBackInStockApplicationErrors =\n  | {\n      code?: 'REQUEST_CONTAINS_BOTH_CATALOG_REFERENCE_AND_REQUEST_IDS';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'INVALID_ITEM_IMAGE_URL';\n      description?: string;\n      data?: Record<string, any>;\n    };\n\nexport interface BaseEventMetadata {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * 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.\n   * 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.\n   */\n  entityEventSequence?: string | null;\n  accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n  /** ID of the Wix account associated with the event */\n  accountId: string;\n  /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n  siteId?: string;\n  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n  parentAccountId?: string;\n}\n\nexport interface BackInStockNotificationRequestCreatedEnvelope {\n  entity: BackInStockNotificationRequest;\n  metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @webhook\n * @eventType wix.ecom.v1.back_in_stock_notification_request_created\n * @slug created\n */\nexport declare function onBackInStockNotificationRequestCreated(\n  handler: (\n    event: BackInStockNotificationRequestCreatedEnvelope\n  ) => void | Promise<void>\n): void;\n\nexport interface BackInStockNotificationRequestDeletedEnvelope {\n  metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @webhook\n * @eventType wix.ecom.v1.back_in_stock_notification_request_deleted\n * @slug deleted\n */\nexport declare function onBackInStockNotificationRequestDeleted(\n  handler: (\n    event: BackInStockNotificationRequestDeletedEnvelope\n  ) => void | Promise<void>\n): void;\n\nexport interface BackInStockNotificationRequestUpdatedEnvelope {\n  entity: BackInStockNotificationRequest;\n  metadata: EventMetadata;\n}\n\n/** @permissionScope Manage Stores - all permissions\n * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @webhook\n * @eventType wix.ecom.v1.back_in_stock_notification_request_updated\n * @slug updated\n */\nexport declare function onBackInStockNotificationRequestUpdated(\n  handler: (\n    event: BackInStockNotificationRequestUpdatedEnvelope\n  ) => void | Promise<void>\n): void;\n\n/**\n * Creates a back in stock notification request.\n *\n * If a notification request already exists for the same `catalogReference` and `email`,\n * then a new one isn't created and the existing request is returned.\n *\n * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores).\n * The `appId` for Wix Stores is `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`.\n * @param request - Notification request information.\n *\n * Includes details for the out of stock item and the email address\n * requesting to be notified when it's back in stock.\n * @param itemDetails - Item details to include in the notification when the item is back in stock.\n * @public\n * @requiredField itemDetails\n * @requiredField itemDetails.name\n * @requiredField itemDetails.price\n * @requiredField request\n * @requiredField request.catalogReference\n * @requiredField request.catalogReference.appId\n * @requiredField request.catalogReference.catalogItemId\n * @requiredField request.email\n * @permissionId ECOM.CREATE_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @applicableIdentity APP\n * @returns Created back in stock notification request.\n * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.CreateBackInStockNotificationRequest\n */\nexport async function createBackInStockNotificationRequest(\n  request: NonNullablePaths<\n    BackInStockNotificationRequest,\n    | `catalogReference`\n    | `catalogReference.appId`\n    | `catalogReference.catalogItemId`\n    | `email`,\n    3\n  >,\n  itemDetails: NonNullablePaths<BackInStockItemDetails, `name` | `price`, 2>\n): Promise<\n  NonNullablePaths<\n    BackInStockNotificationRequest,\n    | `catalogReference.catalogItemId`\n    | `catalogReference.appId`\n    | `email`\n    | `status`,\n    3\n  > & {\n    __applicationErrorsType?: CreateBackInStockNotificationRequestApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({\n      request: request,\n      itemDetails: itemDetails,\n    }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [{ path: 'itemDetails.image' }],\n      },\n    ]\n  );\n\n  const reqOpts =\n    ambassadorWixEcomV1BackInStockNotificationRequest.createBackInStockNotificationRequest(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.request!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { request: '$[0]', itemDetails: '$[1]' },\n        singleArgumentUnchanged: false,\n      },\n      ['request', 'itemDetails']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a back in stock notification request.\n * @param _id - ID of the notification request to retrieve.\n * @public\n * @requiredField _id\n * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @applicableIdentity APP\n * @returns Retrieved back in stock notification request.\n * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.GetBackInStockNotificationRequest\n */\nexport async function getBackInStockNotificationRequest(\n  _id: string\n): Promise<\n  NonNullablePaths<\n    BackInStockNotificationRequest,\n    | `catalogReference.catalogItemId`\n    | `catalogReference.appId`\n    | `email`\n    | `status`,\n    3\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts =\n    ambassadorWixEcomV1BackInStockNotificationRequest.getBackInStockNotificationRequest(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)?.request!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Deletes a back in stock notification request.\n * @param _id - ID of the notification request to delete.\n * @public\n * @requiredField _id\n * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @applicableIdentity APP\n * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.DeleteBackInStockNotificationRequest\n */\nexport async function deleteBackInStockNotificationRequest(\n  _id: string\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts =\n    ambassadorWixEcomV1BackInStockNotificationRequest.deleteBackInStockNotificationRequest(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Sets `status` of a back in stock request to `NOTIFICATION_SENT`.\n *\n * Use this endpoint if the notification is sent manually offline. If the notification is sent\n * automatically or with the Report Items Back In Stock method, then `status` updates on its own.\n * @param _id - ID of the notification request to mark.\n * @public\n * @requiredField _id\n * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @applicableIdentity APP\n * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.MarkAsNotificationSent\n */\nexport async function markAsNotificationSent(_id: string): Promise<\n  NonNullablePaths<\n    MarkAsNotificationSentResponse,\n    | `request.catalogReference.catalogItemId`\n    | `request.catalogReference.appId`\n    | `request.email`\n    | `request.status`,\n    4\n  > & {\n    __applicationErrorsType?: MarkAsNotificationSentApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });\n\n  const reqOpts =\n    ambassadorWixEcomV1BackInStockNotificationRequest.markAsNotificationSent(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { id: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['_id']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Creates a query to retrieve a list of back in stock notification requests.\n *\n * The `queryBackInStockNotificationRequests()` method builds a query to retrieve a list of back in stock notification requests and returns a `RequestsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` method.\n *\n * 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.\n *\n * 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`.\"\n * @public\n * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @applicableIdentity APP\n * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.QueryBackInStockNotificationRequests\n */\nexport function queryBackInStockNotificationRequests(): RequestsQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    BackInStockNotificationRequest,\n    'CURSOR',\n    QueryBackInStockNotificationRequestsRequest,\n    QueryBackInStockNotificationRequestsResponse\n  >({\n    func: async (payload: QueryBackInStockNotificationRequestsRequest) => {\n      const reqOpts =\n        ambassadorWixEcomV1BackInStockNotificationRequest.queryBackInStockNotificationRequests(\n          payload\n        );\n\n      sideEffects?.onSiteCall?.();\n      try {\n        const result = await httpClient.request(reqOpts);\n        sideEffects?.onSuccess?.(result);\n        return result;\n      } catch (err) {\n        sideEffects?.onError?.(err);\n        throw err;\n      }\n    },\n    requestTransformer: (\n      query: QueryBackInStockNotificationRequestsRequest['query']\n    ) => {\n      const args = [query, {}] as [\n        QueryBackInStockNotificationRequestsRequest['query'],\n        {}\n      ];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({\n      data,\n    }: HttpResponse<QueryBackInStockNotificationRequestsResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [])\n      );\n\n      return {\n        items: transformedData?.requests,\n        pagingMetadata: transformedData?.metadata,\n      };\n    },\n    errorTransformer: (err: unknown) => {\n      const transformedError = sdkTransformError(err, {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      });\n\n      throw transformedError;\n    },\n    pagingMethod: 'CURSOR',\n    transformationPaths: {},\n  });\n}\n\ninterface QueryCursorResult {\n  cursors: Cursors;\n  hasNext: () => boolean;\n  hasPrev: () => boolean;\n  length: number;\n  pageSize: number;\n}\n\nexport interface RequestsQueryResult extends QueryCursorResult {\n  items: BackInStockNotificationRequest[];\n  query: RequestsQueryBuilder;\n  next: () => Promise<RequestsQueryResult>;\n  prev: () => Promise<RequestsQueryResult>;\n}\n\nexport interface RequestsQueryBuilder {\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  eq: (\n    propertyName:\n      | '_id'\n      | 'contactId'\n      | 'status'\n      | 'autoNotified'\n      | '_createdDate'\n      | 'itemUrl',\n    value: any\n  ) => RequestsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ne: (\n    propertyName:\n      | '_id'\n      | 'contactId'\n      | 'status'\n      | 'autoNotified'\n      | '_createdDate'\n      | 'itemUrl',\n    value: any\n  ) => RequestsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ge: (\n    propertyName: '_id' | 'contactId' | '_createdDate' | 'itemUrl',\n    value: any\n  ) => RequestsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  gt: (\n    propertyName: '_id' | 'contactId' | '_createdDate' | 'itemUrl',\n    value: any\n  ) => RequestsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  le: (\n    propertyName: '_id' | 'contactId' | '_createdDate' | 'itemUrl',\n    value: any\n  ) => RequestsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  lt: (\n    propertyName: '_id' | 'contactId' | '_createdDate' | 'itemUrl',\n    value: any\n  ) => RequestsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `string`.\n   * @param string - String to compare against. Case-insensitive.\n   */\n  startsWith: (\n    propertyName: '_id' | 'contactId' | 'itemUrl',\n    value: string\n  ) => RequestsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   */\n  hasSome: (\n    propertyName:\n      | '_id'\n      | 'contactId'\n      | 'status'\n      | 'autoNotified'\n      | '_createdDate'\n      | 'itemUrl',\n    value: any[]\n  ) => RequestsQueryBuilder;\n  in: (\n    propertyName:\n      | '_id'\n      | 'contactId'\n      | 'status'\n      | 'autoNotified'\n      | '_createdDate'\n      | 'itemUrl',\n    value: any\n  ) => RequestsQueryBuilder;\n  exists: (\n    propertyName:\n      | '_id'\n      | 'contactId'\n      | 'status'\n      | 'autoNotified'\n      | '_createdDate'\n      | 'itemUrl',\n    value: boolean\n  ) => RequestsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n  ascending: (\n    ...propertyNames: Array<\n      | '_id'\n      | 'contactId'\n      | 'status'\n      | 'autoNotified'\n      | '_createdDate'\n      | 'itemUrl'\n    >\n  ) => RequestsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n  descending: (\n    ...propertyNames: Array<\n      | '_id'\n      | 'contactId'\n      | 'status'\n      | 'autoNotified'\n      | '_createdDate'\n      | 'itemUrl'\n    >\n  ) => RequestsQueryBuilder;\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n  limit: (limit: number) => RequestsQueryBuilder;\n  /** @param cursor - A pointer to specific record */\n  skipTo: (cursor: string) => RequestsQueryBuilder;\n  find: () => Promise<RequestsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.QueryBackInStockNotificationRequests\n * @requiredField query\n */\nexport async function typedQueryBackInStockNotificationRequests(\n  query: BackInStockNotificationRequestQuery\n): Promise<\n  NonNullablePaths<\n    QueryBackInStockNotificationRequestsResponse,\n    | `requests`\n    | `requests.${number}.catalogReference.catalogItemId`\n    | `requests.${number}.catalogReference.appId`\n    | `requests.${number}.email`\n    | `requests.${number}.status`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n  const reqOpts =\n    ambassadorWixEcomV1BackInStockNotificationRequest.queryBackInStockNotificationRequests(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['query']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BackInStockNotificationRequestQuerySpec extends QuerySpec {\n  paging: 'cursor';\n  wql: [\n    {\n      fields: [\n        '_createdDate',\n        '_id',\n        'autoNotified',\n        'contactId',\n        'itemUrl',\n        'status'\n      ];\n      operators: '*';\n      sort: 'BOTH';\n    }\n  ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n  BackInStockNotificationRequest,\n  BackInStockNotificationRequestQuerySpec\n>;\nexport type BackInStockNotificationRequestQuery = {\n  /** \n  Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`.  \n  */\n  cursorPaging?: {\n    /** \n  Maximum number of items to return in the results. \n  @max: 100 \n  */\n    limit?:\n      | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n      | null;\n    /** \n  Pointer to the next or previous page in the list of results.\n\n  Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n  Not relevant for the first request. \n  @maxLength: 16000 \n  */\n    cursor?:\n      | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n      | null;\n  };\n  /** \n  Filter object.  \n  */\n  filter?: CommonQueryWithEntityContext['filter'] | null;\n  /** \n  Sorting options. For example, `[{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]`.  \n  */\n  sort?: {\n    /** \n  Name of the field to sort by. \n  @maxLength: 512 \n  */\n    fieldName?: NonNullable<\n      CommonQueryWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n  }[];\n};\n\nexport const utils = {\n  query: {\n    ...createQueryUtils<\n      BackInStockNotificationRequest,\n      BackInStockNotificationRequestQuerySpec,\n      BackInStockNotificationRequestQuery\n    >(),\n  },\n};\n\n/**\n * Retrieves the amount of back in stock requests for a given `catalogReference` item.\n * @param catalogReferences - `catalogReference` items to retrieve the notification request for.\n * @public\n * @requiredField catalogReferences\n * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @applicableIdentity APP\n * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.GetBackInStockNotificationRequestsCountByCatalogReferences\n */\nexport async function getBackInStockNotificationRequestsCountByCatalogReferences(\n  catalogReferences: CatalogReference[]\n): Promise<\n  NonNullablePaths<\n    GetBackInStockNotificationRequestsCountByCatalogReferencesResponse,\n    | `countsPerCatalogReference`\n    | `countsPerCatalogReference.${number}.catalogReference.catalogItemId`\n    | `countsPerCatalogReference.${number}.catalogReference.appId`\n    | `countsPerCatalogReference.${number}.count`,\n    5\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    catalogReferences: catalogReferences,\n  });\n\n  const reqOpts =\n    ambassadorWixEcomV1BackInStockNotificationRequest.getBackInStockNotificationRequestsCountByCatalogReferences(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { catalogReferences: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['catalogReferences']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Sends notifications for back in stock requests.\n *\n * > **Important:**\n * > 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.\n *\n * This endpoint triggers notifications for requests in 1 of 2 ways:\n * 1. For a specific item, with the `catalogReference` information.\n * 2. For specific requests, with `requestIds`.\n *\n * `itemDetails` are required and may populate dynamic values in the notification template, as follows:\n * + `itemDetails.name` passes to the template as `item.name`\n * + `itemDetails.price` passes to the template as `item.price`\n * + `itemDetails.image.url` passes to the template as `item.image.url`\n *\n * If the notification template doesn't include `item.price`, `item.name`, or `item.image.url`, values should\n * be passed in `extraAutomationTemplateParameters`.\n *\n * After this endpoint is called, the `status` for the request will update to `NOTIFICATION_SENT` if it sends\n * successfully, or to `FAILED` if it fails to send.\n * @param itemDetails - Item details to use in notifications.\n *\n * `itemDetails` may populate dynamic values in the notification template, as follows:\n * + `itemDetails.name` passes to the template as `item.name`\n * + `itemDetails.price` passes to the template as `item.price`\n * + `itemDetails.image.url` passes to the template as `item.image.url`\n *\n * Use `extraAutomationTemplateParameters` to pass additional dynamic values.\n * @public\n * @requiredField itemDetails\n * @requiredField itemDetails.name\n * @requiredField itemDetails.price\n * @param options - Report options.\n * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS\n * @applicableIdentity APP\n * @fqn com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.ReportItemsBackInStock\n */\nexport async function reportItemsBackInStock(\n  itemDetails: NonNullablePaths<BackInStockItemDetails, `name` | `price`, 2>,\n  options?: ReportItemsBackInStockOptions\n): Promise<\n  void & {\n    __applicationErrorsType?: ReportItemsBackInStockApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = transformPaths(\n    renameKeysFromSDKRequestToRESTRequest({\n      itemDetails: itemDetails,\n      catalogReference: options?.catalogReference,\n      requestIds: options?.requestIds,\n      extraAutomationTemplateParameters:\n        options?.extraAutomationTemplateParameters,\n    }),\n    [\n      {\n        transformFn: transformSDKImageToRESTImage,\n        paths: [{ path: 'itemDetails.image' }],\n      },\n    ]\n  );\n\n  const reqOpts =\n    ambassadorWixEcomV1BackInStockNotificationRequest.reportItemsBackInStock(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          itemDetails: '$[0]',\n          catalogReference: '$[1].catalogReference',\n          requestIds: '$[1].requestIds',\n          extraAutomationTemplateParameters:\n            '$[1].extraAutomationTemplateParameters',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['itemDetails', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ReportItemsBackInStockOptions {\n  /**\n   * `catalogReference` item to send notifications for.\n   *\n   * Cannot be used with `requestIds`.\n   */\n  catalogReference?: CatalogReference;\n  /**\n   * IDs of requests to send notifications for.\n   *\n   * Cannot be used with `catalogReference`.\n   */\n  requestIds?: string[];\n  /** Additional key-value pairs to pass to the back in stock notification template. */\n  extraAutomationTemplateParameters?: Record<string, string>;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'bo._base_domain_': [\n      {\n        srcPath: '/back-in-stock-service',\n        destPath: '',\n      },\n    ],\n    'wixbo.ai': [\n      {\n        srcPath: '/back-in-stock-service',\n        destPath: '',\n      },\n    ],\n    'wix-bo.com': [\n      {\n        srcPath: '/back-in-stock-service',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/back-in-stock-service',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/v1/back-in-stock-notification-requests',\n        destPath: '/v1/back-in-stock-notification-requests',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/v1/back-in-stock-notification-requests',\n        destPath: '/v1/back-in-stock-notification-requests',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_back-in-stock-notifications';\n\n/**\n * Creates a back in stock notification request.\n *\n * If a notification request already exists for the same `catalogReference` and `email`,\n * then a new one isn't created and the existing request is returned.\n *\n * Back in stock notifications only work for [Wix Stores](https://support.wix.com/en/article/wix-stores-about-wix-stores).\n * The `appId` for Wix Stores is `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`.\n */\nexport function createBackInStockNotificationRequest(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createBackInStockNotificationRequest({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'request.createdDate' },\n          { path: 'itemDetails.image.urlExpirationDate' },\n        ],\n      },\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'itemDetails.image.focalPoint.x' },\n          { path: 'itemDetails.image.focalPoint.y' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.back_in_stock_notification_request',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.CreateBackInStockNotificationRequest',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n        {\n          protoPath: '/v1/back-in-stock-notification-requests',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'request.createdDate' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createBackInStockNotificationRequest;\n}\n\n/** Retrieves a back in stock notification request. */\nexport function getBackInStockNotificationRequest(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getBackInStockNotificationRequest({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.back_in_stock_notification_request',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.GetBackInStockNotificationRequest',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n        {\n          protoPath: '/v1/back-in-stock-notification-requests/{id}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'request.createdDate' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getBackInStockNotificationRequest;\n}\n\n/** Deletes a back in stock notification request. */\nexport function deleteBackInStockNotificationRequest(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __deleteBackInStockNotificationRequest({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.back_in_stock_notification_request',\n      method: 'DELETE' as any,\n      methodFqn:\n        'com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.DeleteBackInStockNotificationRequest',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n        {\n          protoPath: '/v1/back-in-stock-notification-requests/{id}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deleteBackInStockNotificationRequest;\n}\n\n/**\n * Sets `status` of a back in stock request to `NOTIFICATION_SENT`.\n *\n * Use this endpoint if the notification is sent manually offline. If the notification is sent\n * automatically or with the Report Items Back In Stock method, then `status` updates on its own.\n */\nexport function markAsNotificationSent(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __markAsNotificationSent({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.back_in_stock_notification_request',\n      method: 'PUT' as any,\n      methodFqn:\n        'com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.MarkAsNotificationSent',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n        {\n          protoPath:\n            '/v1/back-in-stock-notification-requests/{id}/mark-as-notification-sent',\n          data: payload,\n          host,\n        }\n      ),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'request.createdDate' }],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __markAsNotificationSent;\n}\n\n/**\n * Creates a query to retrieve a list of back in stock notification requests.\n *\n * The `queryBackInStockNotificationRequests()` method builds a query to retrieve a list of back in stock notification requests and returns a `RequestsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the `find()` method.\n *\n * 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.\n *\n * 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`.\"\n */\nexport function queryBackInStockNotificationRequests(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __queryBackInStockNotificationRequests({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.back_in_stock_notification_request',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.QueryBackInStockNotificationRequests',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n        {\n          protoPath: '/v1/back-in-stock-notification-requests',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload, true),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [{ path: 'requests.createdDate' }],\n          },\n        ]),\n      fallback: [\n        {\n          method: 'POST' as any,\n          url: resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n            {\n              protoPath: '/v1/back-in-stock-notification-requests/query',\n              data: payload,\n              host,\n            }\n          ),\n          data: payload,\n        },\n      ],\n    };\n\n    return metadata;\n  }\n\n  return __queryBackInStockNotificationRequests;\n}\n\n/** Retrieves the amount of back in stock requests for a given `catalogReference` item. */\nexport function getBackInStockNotificationRequestsCountByCatalogReferences(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getBackInStockNotificationRequestsCountByCatalogReferences({\n    host,\n  }: any) {\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.back_in_stock_notification_request',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.GetBackInStockNotificationRequestsCountByCatalogReferences',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n        {\n          protoPath:\n            '/v1/back-in-stock-notification-requests/count-by-catalog-reference',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload, true),\n    };\n\n    return metadata;\n  }\n\n  return __getBackInStockNotificationRequestsCountByCatalogReferences;\n}\n\n/**\n * Sends notifications for back in stock requests.\n *\n * > **Important:**\n * > 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.\n *\n * This endpoint triggers notifications for requests in 1 of 2 ways:\n * 1. For a specific item, with the `catalogReference` information.\n * 2. For specific requests, with `requestIds`.\n *\n * `itemDetails` are required and may populate dynamic values in the notification template, as follows:\n * + `itemDetails.name` passes to the template as `item.name`\n * + `itemDetails.price` passes to the template as `item.price`\n * + `itemDetails.image.url` passes to the template as `item.image.url`\n *\n * If the notification template doesn't include `item.price`, `item.name`, or `item.image.url`, values should\n * be passed in `extraAutomationTemplateParameters`.\n *\n * After this endpoint is called, the `status` for the request will update to `NOTIFICATION_SENT` if it sends\n * successfully, or to `FAILED` if it fails to send.\n */\nexport function reportItemsBackInStock(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __reportItemsBackInStock({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [{ path: 'itemDetails.image.urlExpirationDate' }],\n      },\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'itemDetails.image.focalPoint.x' },\n          { path: 'itemDetails.image.focalPoint.y' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.ecom.v1.back_in_stock_notification_request',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.ReportItemsBackInStock',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressEcomBackInStockBackInStockNotificationRequestServiceUrl(\n        {\n          protoPath:\n            '/v1/back-in-stock-notification-requests/report-items-back-in-stock',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n    };\n\n    return metadata;\n  }\n\n  return __reportItemsBackInStock;\n}\n","import {\n  createBackInStockNotificationRequest as publicCreateBackInStockNotificationRequest,\n  getBackInStockNotificationRequest as publicGetBackInStockNotificationRequest,\n  deleteBackInStockNotificationRequest as publicDeleteBackInStockNotificationRequest,\n  markAsNotificationSent as publicMarkAsNotificationSent,\n  queryBackInStockNotificationRequests as publicQueryBackInStockNotificationRequests,\n  typedQueryBackInStockNotificationRequests as publicTypedQueryBackInStockNotificationRequests,\n  getBackInStockNotificationRequestsCountByCatalogReferences as publicGetBackInStockNotificationRequestsCountByCatalogReferences,\n  reportItemsBackInStock as publicReportItemsBackInStock,\n} from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n  BuildRESTFunction,\n  MaybeContext,\n  BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n  BackInStockNotificationRequestQuery,\n  RequestsQueryBuilder,\n  typedQueryBackInStockNotificationRequests as universalTypedQueryBackInStockNotificationRequests,\n} from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.universal.js';\nimport { onBackInStockNotificationRequestCreated as publicOnBackInStockNotificationRequestCreated } from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.public.js';\nimport { onBackInStockNotificationRequestDeleted as publicOnBackInStockNotificationRequestDeleted } from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.public.js';\nimport { onBackInStockNotificationRequestUpdated as publicOnBackInStockNotificationRequestUpdated } from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.public.js';\n\nfunction customQueryBackInStockNotificationRequests(httpClient: HttpClient) {\n  const router = createQueryOverloadRouter({\n    builderQueryFunction: () =>\n      publicQueryBackInStockNotificationRequests(httpClient)(),\n    typedQueryFunction: (query: BackInStockNotificationRequestQuery) =>\n      publicTypedQueryBackInStockNotificationRequests(httpClient)(query),\n    hasOptionsParameter: false,\n  });\n\n  function overloadedQuery(): RequestsQueryBuilder;\n  function overloadedQuery(\n    query: BackInStockNotificationRequestQuery\n  ): ReturnType<typeof universalTypedQueryBackInStockNotificationRequests>;\n  function overloadedQuery(query?: BackInStockNotificationRequestQuery): any {\n    return router(...arguments);\n  }\n\n  return overloadedQuery;\n}\n\nexport const createBackInStockNotificationRequest: MaybeContext<\n  BuildRESTFunction<typeof publicCreateBackInStockNotificationRequest> &\n    typeof publicCreateBackInStockNotificationRequest\n> = /*#__PURE__*/ createRESTModule(publicCreateBackInStockNotificationRequest);\nexport const getBackInStockNotificationRequest: MaybeContext<\n  BuildRESTFunction<typeof publicGetBackInStockNotificationRequest> &\n    typeof publicGetBackInStockNotificationRequest\n> = /*#__PURE__*/ createRESTModule(publicGetBackInStockNotificationRequest);\nexport const deleteBackInStockNotificationRequest: MaybeContext<\n  BuildRESTFunction<typeof publicDeleteBackInStockNotificationRequest> &\n    typeof publicDeleteBackInStockNotificationRequest\n> = /*#__PURE__*/ createRESTModule(publicDeleteBackInStockNotificationRequest);\nexport const markAsNotificationSent: MaybeContext<\n  BuildRESTFunction<typeof publicMarkAsNotificationSent> &\n    typeof publicMarkAsNotificationSent\n> = /*#__PURE__*/ createRESTModule(publicMarkAsNotificationSent);\nexport const getBackInStockNotificationRequestsCountByCatalogReferences: MaybeContext<\n  BuildRESTFunction<\n    typeof publicGetBackInStockNotificationRequestsCountByCatalogReferences\n  > &\n    typeof publicGetBackInStockNotificationRequestsCountByCatalogReferences\n> = /*#__PURE__*/ createRESTModule(\n  publicGetBackInStockNotificationRequestsCountByCatalogReferences\n);\nexport const reportItemsBackInStock: MaybeContext<\n  BuildRESTFunction<typeof publicReportItemsBackInStock> &\n    typeof publicReportItemsBackInStock\n> = /*#__PURE__*/ createRESTModule(publicReportItemsBackInStock);\nexport const queryBackInStockNotificationRequests: MaybeContext<\n  BuildRESTFunction<typeof customQueryBackInStockNotificationRequests> &\n    typeof customQueryBackInStockNotificationRequests\n> = /*#__PURE__*/ createRESTModule(customQueryBackInStockNotificationRequests);\n/** */\nexport const onBackInStockNotificationRequestCreated: BuildEventDefinition<\n  typeof publicOnBackInStockNotificationRequestCreated\n> &\n  typeof publicOnBackInStockNotificationRequestCreated = createEventModule(\n  publicOnBackInStockNotificationRequestCreated\n);\n/** */\nexport const onBackInStockNotificationRequestDeleted: BuildEventDefinition<\n  typeof publicOnBackInStockNotificationRequestDeleted\n> &\n  typeof publicOnBackInStockNotificationRequestDeleted = createEventModule(\n  publicOnBackInStockNotificationRequestDeleted\n);\n/** */\nexport const onBackInStockNotificationRequestUpdated: BuildEventDefinition<\n  typeof publicOnBackInStockNotificationRequestUpdated\n> &\n  typeof publicOnBackInStockNotificationRequestUpdated = createEventModule(\n  publicOnBackInStockNotificationRequestUpdated\n);\n\nexport {\n  Status,\n  SortOrder,\n  WebhookIdentityType,\n} from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.universal.js';\nexport {\n  BackInStockNotificationRequest,\n  CatalogReference,\n  InvalidateCache,\n  InvalidateCacheGetByOneOf,\n  App,\n  Page,\n  URI,\n  File,\n  CustomTag,\n  Pages,\n  URIs,\n  CreateBackInStockNotificationRequestRequest,\n  BackInStockItemDetails,\n  FocalPoint,\n  CreateBackInStockNotificationRequestResponse,\n  GetBackInStockNotificationRequestRequest,\n  GetBackInStockNotificationRequestResponse,\n  DeleteBackInStockNotificationRequestRequest,\n  DeleteBackInStockNotificationRequestResponse,\n  MarkAsNotificationSentRequest,\n  MarkAsNotificationSentResponse,\n  QueryBackInStockNotificationRequestsRequest,\n  PlatformQuery,\n  PlatformQueryPagingMethodOneOf,\n  Sorting,\n  PlatformPaging,\n  CursorPaging,\n  QueryBackInStockNotificationRequestsResponse,\n  PlatformPagingMetadata,\n  Cursors,\n  GetBackInStockNotificationRequestsCountByCatalogReferencesRequest,\n  GetBackInStockNotificationRequestsCountByCatalogReferencesResponse,\n  BackInStockNotificationRequestsCount,\n  ReportItemsBackInStockRequest,\n  ReportItemsBackInStockResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  Empty,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  BackInStockNotificationRequestCreatedEnvelope,\n  BackInStockNotificationRequestDeletedEnvelope,\n  BackInStockNotificationRequestUpdatedEnvelope,\n  RequestsQueryResult,\n  RequestsQueryBuilder,\n  BackInStockNotificationRequestQuerySpec,\n  ReportItemsBackInStockOptions,\n} from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.universal.js';\nexport { utils } from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.universal.js';\nexport {\n  StatusWithLiterals,\n  SortOrderWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n  CreateBackInStockNotificationRequestApplicationErrors,\n  MarkAsNotificationSentApplicationErrors,\n  ReportItemsBackInStockApplicationErrors,\n  CommonQueryWithEntityContext,\n  BackInStockNotificationRequestQuery,\n} from './ecom-v1-back-in-stock-notification-request-back-in-stock-notifications.universal.js';\n"],"mappings":";AAAA,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAWd,SAAS,qCACd,SAC4B;AAC5B,WAAS,uCAAuC,EAAE,KAAK,GAAQ;AAC7D,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,sBAAsB;AAAA,UAC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se","transformRESTTimestampToSDKTimestamp","transformPaths","payload","transformPaths","Status","SortOrder","WebhookIdentityType","createBackInStockNotificationRequest","getBackInStockNotificationRequest","deleteBackInStockNotificationRequest","markAsNotificationSent","queryBackInStockNotificationRequests","getBackInStockNotificationRequestsCountByCatalogReferences","reportItemsBackInStock","createBackInStockNotificationRequest","getBackInStockNotificationRequest","deleteBackInStockNotificationRequest","markAsNotificationSent","queryBackInStockNotificationRequests","typedQueryBackInStockNotificationRequests","getBackInStockNotificationRequestsCountByCatalogReferences","reportItemsBackInStock","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","queryBackInStockNotificationRequests","typedQueryBackInStockNotificationRequests","createBackInStockNotificationRequest","getBackInStockNotificationRequest","deleteBackInStockNotificationRequest","markAsNotificationSent","getBackInStockNotificationRequestsCountByCatalogReferences","reportItemsBackInStock","onBackInStockNotificationRequestCreated","onBackInStockNotificationRequestDeleted","onBackInStockNotificationRequestUpdated"]}