{"version":3,"sources":["../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.http.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.public.ts","../../src/promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPromoteSeoV1HeadlessSitemapEntry from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.http.js';\n\n/** Sitemap entry containing page information */\nexport interface SitemapEntry {\n  /**\n   * Entity identifier (e.g., productId, pageId)\n   * @minLength 1\n   * @maxLength 255\n   */\n  _id?: string;\n  /** Indicates if the entry should be included in the generated sitemap. */\n  shouldBeIncludedInSitemap?: boolean;\n  /**\n   * Optional last modification date in ISO 8601 format\n   * @maxLength 50\n   */\n  _updatedDate?: string;\n  /**\n   * Optional list of images\n   * @maxSize 1000\n   */\n  images?: Image[];\n  /**\n   * Optional list of video data\n   * @maxSize 100\n   */\n  videos?: Video[];\n}\n\n/** Image information for sitemap entries */\nexport interface Image {\n  /**\n   * Image URL\n   * @format WEB_URL\n   * @maxLength 2048\n   * @minLength 1\n   */\n  url?: string;\n  /**\n   * Optional image alt text\n   * @maxLength 2048\n   */\n  altText?: string;\n}\n\n/** Video information for sitemap entries */\nexport interface Video {\n  /**\n   * Video content location URL\n   * @format WEB_URL\n   * @maxLength 2048\n   * @minLength 1\n   */\n  url?: string;\n  /**\n   * Video thumbnail location URL\n   * @format WEB_URL\n   * @maxLength 2048\n   * @minLength 1\n   */\n  thumbnailUrl?: string;\n  /**\n   * Optional video title\n   * @maxLength 255\n   */\n  title?: string;\n  /**\n   * Optional video description\n   * @maxLength 1000\n   */\n  description?: string;\n}\n\n/** Request message for getting sitemap pages */\nexport interface ListSitemapPagesRequest {\n  /** Item type identifier - must be a valid enum value */\n  itemType?: ItemTypeWithLiterals;\n  /** Optional cursor for pagination */\n  paging?: CursorPaging;\n}\n\n/** Enum representing different types of items that can have sitemap entries */\nexport enum ItemType {\n  /** Stores products */\n  STORES_PRODUCT = 'STORES_PRODUCT',\n  /** Blog posts */\n  BLOG_POST = 'BLOG_POST',\n  /** Blog categories */\n  BLOG_CATEGORY = 'BLOG_CATEGORY',\n  /** Blog tags */\n  BLOG_TAGS = 'BLOG_TAGS',\n  /** Blog archives */\n  BLOG_ARCHIVE = 'BLOG_ARCHIVE',\n  /** Forum posts */\n  FORUM_POST = 'FORUM_POST',\n  /** Forum categories */\n  FORUM_CATEGORY = 'FORUM_CATEGORY',\n  /** Groups posts */\n  GROUPS_POST = 'GROUPS_POST',\n  /** Groups pages */\n  GROUPS_PAGE = 'GROUPS_PAGE',\n  /** Events pages */\n  EVENTS_PAGE = 'EVENTS_PAGE',\n  /** Bookings services */\n  BOOKINGS_SERVICE = 'BOOKINGS_SERVICE',\n  /** Members area profiles */\n  MEMBERS_AREA_PROFILE = 'MEMBERS_AREA_PROFILE',\n  /** Challenges/online programs pages */\n  CHALLENGES_PAGE = 'CHALLENGES_PAGE',\n  /** Store categories */\n  STORES_CATEGORY = 'STORES_CATEGORY',\n  /** Store sub-categories */\n  STORES_SUB_CATEGORY = 'STORES_SUB_CATEGORY',\n  /** Portfolio collections */\n  PORTFOLIO_COLLECTIONS = 'PORTFOLIO_COLLECTIONS',\n  /** Portfolio projects */\n  PORTFOLIO_PROJECTS = 'PORTFOLIO_PROJECTS',\n  /** Pricing plans */\n  PRICING_PLANS = 'PRICING_PLANS',\n  /** Restaurant menu pages */\n  RESTAURANTS_MENU_PAGE = 'RESTAURANTS_MENU_PAGE',\n}\n\n/** @enumType */\nexport type ItemTypeWithLiterals =\n  | ItemType\n  | 'STORES_PRODUCT'\n  | 'BLOG_POST'\n  | 'BLOG_CATEGORY'\n  | 'BLOG_TAGS'\n  | 'BLOG_ARCHIVE'\n  | 'FORUM_POST'\n  | 'FORUM_CATEGORY'\n  | 'GROUPS_POST'\n  | 'GROUPS_PAGE'\n  | 'EVENTS_PAGE'\n  | 'BOOKINGS_SERVICE'\n  | 'MEMBERS_AREA_PROFILE'\n  | 'CHALLENGES_PAGE'\n  | 'STORES_CATEGORY'\n  | 'STORES_SUB_CATEGORY'\n  | 'PORTFOLIO_COLLECTIONS'\n  | 'PORTFOLIO_PROJECTS'\n  | 'PRICING_PLANS'\n  | 'RESTAURANTS_MENU_PAGE';\n\nexport interface CursorPaging {\n  /**\n   * Maximum number of items to return in the results.\n   * @max 200\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\n/** Response message for getting sitemap pages */\nexport interface ListSitemapPagesResponse {\n  /** List of sitemap entries */\n  pages?: SitemapEntry[];\n  /** Paging metadata for next page of results */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n  total?: number | null;\n  /** Flag that indicates the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is 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\n/** Request message for getting static sitemap pages */\nexport interface ListStaticSitemapPagesRequest {\n  /** Optional cursor for pagination */\n  paging?: CursorPaging;\n}\n\n/** Response message for getting sitemap pages */\nexport interface ListStaticSitemapPagesResponse {\n  /** List of sitemap entries */\n  pages?: SitemapEntry[];\n  /** Paging metadata for next page of results */\n  pagingMetadata?: PagingMetadataV2;\n}\n\n/**\n * Lists sitemap pages for a given item type with optional pagination\n * @public\n * @permissionId WIX.SEO_SITEMAP_ENTRIES_READ\n * @applicableIdentity APP\n * @returns Response message for getting sitemap pages\n * @fqn wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.ListSitemapPages\n */\nexport async function listSitemapPages(\n  options?: ListSitemapPagesOptions\n): Promise<\n  NonNullablePaths<\n    ListSitemapPagesResponse,\n    | `pages`\n    | `pages.${number}._id`\n    | `pages.${number}.shouldBeIncludedInSitemap`\n    | `pages.${number}._updatedDate`,\n    4\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    itemType: options?.itemType,\n    paging: options?.paging,\n  });\n\n  const reqOpts =\n    ambassadorWixPromoteSeoV1HeadlessSitemapEntry.listSitemapPages(payload);\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          itemType: '$[0].itemType',\n          paging: '$[0].paging',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ListSitemapPagesOptions {\n  /** Item type identifier - must be a valid enum value */\n  itemType?: ItemTypeWithLiterals;\n  /** Optional cursor for pagination */\n  paging?: CursorPaging;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/seo-headless-sitemap/v1/list-static-sitemap-pages',\n        destPath: '/v1/list-static-sitemap-pages',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/seo-headless-sitemap/v1/list-sitemap-pages',\n        destPath: '/v1/list-sitemap-pages',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/seo-headless-sitemap/v1/list-sitemap-pages',\n        destPath: '/v1/list-sitemap-pages',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/v1/list-sitemap-pages',\n        destPath: '/v1/list-sitemap-pages',\n      },\n    ],\n    'api._api_base_domain_': [\n      {\n        srcPath: '/seo-headless-sitemap',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_seo-sitemap-entries';\n\n/** Lists sitemap pages for a given item type with optional pagination */\nexport function listSitemapPages(payload: object): RequestOptionsFactory<any> {\n  function __listSitemapPages({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.promote.seo.v1.headless_sitemap_entry',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.promote.seo.headless.sitemap.service.v1.SeoHeadlessSitemapService.ListSitemapPages',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixPromoteSeoHeadlessSitemapServiceV1SeoHeadlessSitemapServiceUrl(\n        { protoPath: '/v1/list-sitemap-pages', data: payload, host }\n      ),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __listSitemapPages;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  ListSitemapPagesOptions,\n  ListSitemapPagesResponse,\n  listSitemapPages as universalListSitemapPages,\n} from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\nexport function listSitemapPages(\n  httpClient: HttpClient\n): ListSitemapPagesSignature {\n  return (options?: ListSitemapPagesOptions) =>\n    universalListSitemapPages(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListSitemapPagesSignature {\n  /**\n   * Lists sitemap pages for a given item type with optional pagination\n   * @returns Response message for getting sitemap pages\n   */\n  (options?: ListSitemapPagesOptions): Promise<\n    NonNullablePaths<\n      ListSitemapPagesResponse,\n      | `pages`\n      | `pages.${number}._id`\n      | `pages.${number}.shouldBeIncludedInSitemap`\n      | `pages.${number}._updatedDate`,\n      4\n    >\n  >;\n}\n\nexport {\n  CursorPaging,\n  Cursors,\n  Image,\n  ItemType,\n  ListSitemapPagesOptions,\n  ListSitemapPagesRequest,\n  ListSitemapPagesResponse,\n  ListStaticSitemapPagesRequest,\n  ListStaticSitemapPagesResponse,\n  PagingMetadataV2,\n  SitemapEntry,\n  Video,\n} from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\n","import { listSitemapPages as publicListSitemapPages } from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const listSitemapPages: MaybeContext<\n  BuildRESTFunction<typeof publicListSitemapPages> &\n    typeof publicListSitemapPages\n> = /*#__PURE__*/ createRESTModule(publicListSitemapPages);\n\nexport { ItemType } from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\nexport {\n  SitemapEntry,\n  Image,\n  Video,\n  ListSitemapPagesRequest,\n  CursorPaging,\n  ListSitemapPagesResponse,\n  PagingMetadataV2,\n  Cursors,\n  ListStaticSitemapPagesRequest,\n  ListStaticSitemapPagesResponse,\n  ListSitemapPagesOptions,\n} from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\nexport { ItemTypeWithLiterals } from './promote-seo-v1-headless-sitemap-entry-seo-sitemap-entries.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,yEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;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,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;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;AAGd,SAAS,iBAAiB,SAA6C;AAC5E,WAAS,mBAAmB,EAAE,KAAK,GAAQ;AACzC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK;AAAA,QACH,EAAE,WAAW,0BAA0B,MAAM,SAAS,KAAK;AAAA,MAC7D;AAAA,MACA,QAAQ,kBAAkB,OAAO;AAAA,IACnC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