@wix/auto_sdk_viewer_site-structure-service 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
2
  import { GetSiteStructureOptions, SiteStructureResponse, GetSiteStructureMetadataOptions, GetSiteStructureMetadataResponse } from './index.typings.js';
3
- export { CursorPaging, CursorPagingMetaData, FocalPoint, GetSiteStructureMetadataRequest, LanguageMetadata, MediaItem, MediaItemMediaOneOf, PageSegment, PageSegmentWithLiterals, SitePageType, SiteStructureFetchError, SiteStructureFetchErrorItemTypeOneOf, SiteStructureItem, SiteStructureRequest, SiteStructureRequestFilter, SortOrder, SortOrderWithLiterals, Sorting, VideoResolution } from './index.typings.js';
3
+ export { ChunkMetadata, CursorPaging, CursorPagingMetaData, FocalPoint, GetSiteStructureChunkRequest, GetSiteStructureChunkResponse, GetSiteStructureChunksRequest, GetSiteStructureChunksResponse, GetSiteStructureMetadataRequest, LanguageMetadata, MediaItem, MediaItemMediaOneOf, PageSegment, PageSegmentWithLiterals, SitePageType, SiteStructureFetchError, SiteStructureFetchErrorItemTypeOneOf, SiteStructureItem, SiteStructureRequest, SiteStructureRequestFilter, SortOrder, SortOrderWithLiterals, Sorting, VideoResolution } from './index.typings.js';
4
4
 
5
5
  declare function getSiteStructure$1(httpClient: HttpClient): GetSiteStructureSignature;
6
6
  interface GetSiteStructureSignature {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.universal.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.http.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.public.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.context.ts"],"sourcesContent":["export * from './src/viewer-structure-v1-site-structure-item-site-structure-service.context.js';\n","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 ambassadorWixViewerStructureV1SiteStructureItem from './viewer-structure-v1-site-structure-item-site-structure-service.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTVideoV2ToSDKVideoV2 } from '@wix/sdk-runtime/transformations/video-v2';\nimport { transformRESTVideoToSDKVideo } from '@wix/sdk-runtime/transformations/video';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SiteStructureItem {\n /**\n * The end goal: this field should contain a unique identifier for this site-structure item.\\\n * Currently it contains:\n * - For site-structure integrated TPAs - the unique identifier provided by the TPA.\n * - For all other item types - empty string.\n */\n itemId?: string;\n /**\n * An identifier for the type of the item. One of:\n * - For the site's static pages - \"static_page\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the item type identifier provided by the TPA. Commonly one of that TPA's supported sub-pages.\n * - For items that are the result of a dynamic router - \"dynamic-page\".\n */\n itemTypeIdentifier?: string;\n /**\n * An identifier for the source of the item. One of:\n * - For the site's static pages - \"editor\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the TPA's app-def-id.\n * - For items that are the result of a dynamic router - Wix-Code's app-def-id: '675bbcef-18d8-41f5-800e-131ec9e08762'.\n */\n sourceId?: string;\n /**\n * An identifier for the configuration of the item. Used currently as some sort of a placeholder for further filtering.\n * - For items of type \"dynamic-page\" - The 'prefix' field that is part of the router-config object of the router that is related to this item (see WixCodeDynamicRouterResolver).\n * - For all other items types - empty string.\n */\n configId?: string;\n /**\n * A human readable name string associated with the item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'name' field provided by the TPA for that item.\\\n * This field is not guaranteed to be unique across the item list.\n */\n name?: string | null;\n /**\n * Deprecated. Previously used for media content that is associated with an item.\\\n * See 'image' and 'video' fields of this message.\n * @deprecated\n */\n media?: MediaItem[];\n /** A relative url path that can be used, with the site's base-url, to reach the page represented by this item. */\n path?: string | null;\n /**\n * A timestamp representing the moment that this item was last changed.\n * - For static pages - the site's last publish time.\n * - For all kinds of TPAs - the last-modified field in the respective response item from the TPA.\n * - For items that are the result of a dynamic router - the content of the 'lastModified' optional field in the response item from Wix-Code's RPC endpoint, or, if missing, the site's last publish time. (see WixCodeDynamicRouterResolver).\n */\n _updatedDate?: Date | null;\n /**\n * A value indicating whether the item is inactive or not. E.g. hidden product/finished event etc.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'inactive' field provided by the TPA for that item.\n */\n inactive?: boolean | null;\n /**\n * A general free schema field to include further metadata related to this item.\\\n * Currently exists only for:\\\n * Static pages - a JSON that is the merge of:\n * 1. The advancedSeoData JSON string that exists for the page in the master-page.\n * 2. A JSON of the form:\n * ```javascript\n * {\n * \"seo_legacy\": {\n * \"hidden_from_seo\": true / false\n * },\n * \"password_protected\": true / false\n * }\n * ```\n * New TPA site-structure integration items - the 'metadata' field provided by the TPA for that item.\n */\n metadata?: Record<string, any> | null;\n /**\n * An image media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'image' field provided by the TPA for that item.\n */\n image?: string[];\n /**\n * A video media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'video' field provided by the TPA for that item.\n */\n video?: string[];\n /** A value indicating whether the item is protected or not, by password or login. */\n protected?: boolean | null;\n /**\n * ID of the translations of the item. As same item can have multiple instances, one for each language, we can match them by this ID.\\\n * For example:\n * Blog has one post, translated to 2 languages (EN, FR):\n * - EN item path is `/amazing-post`\n * - FR item path is `/poste-incroyable\n * Both of them might have different `item_id`, but will share the same `translation_id`, to be easily match together\n * Currently only relevant for Blog\n */\n translationId?: string;\n /** A value indicating whether the item is a custom error page or not. */\n isCustomErrorPage?: boolean | null;\n}\n\n/** Deprecated - Copy this message into your service, do not reference it */\nexport interface MediaItem extends MediaItemMediaOneOf {\n /** WixMedia image */\n image?: string;\n /** WixMedia video */\n video?: string;\n /** WixMedia document */\n document?: string;\n}\n\n/** @oneof */\nexport interface MediaItemMediaOneOf {\n /** WixMedia image */\n image?: string;\n /** WixMedia video */\n video?: string;\n /** WixMedia document */\n document?: 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 VideoResolution {\n /** Video URL. */\n url?: string;\n /** Video height. */\n height?: number;\n /** Video width. */\n width?: number;\n /** Video format for example, mp4, hls. */\n format?: string;\n}\n\nexport interface SiteStructureRequest {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport enum PageSegment {\n PUBLISHED = 'PUBLISHED',\n SAVED = 'SAVED',\n}\n\n/** @enumType */\nexport type PageSegmentWithLiterals = PageSegment | 'PUBLISHED' | 'SAVED';\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\n/** A filter metadata type. The filter forces an 'and' logic between all of its comprising parts. */\nexport interface SiteStructureRequestFilter {\n /** In accordance to SiteStructureItem.item_type_identifier */\n itemTypeIdentifier?: string;\n /** In accordance to SiteStructureItem.source_id */\n sourceId?: string;\n /** In accordance to SiteStructureItem.config_id */\n configId?: string;\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 LanguageMetadata {\n /**\n * 2 chars language code (e.g. 'en')\n * @format LANGUAGE\n */\n code?: string;\n /**\n * 4 chars language tag (e.g. 'en-us')\n * @format LANGUAGE_TAG\n */\n tag?: string | null;\n}\n\nexport interface SiteStructureResponse {\n /** The total number of items to be returned, combining all paginated responses. */\n totalResults?: number;\n /** A cursor based paging response metadata, including the item count in the current page and a cursor string to be used for querying of the next page. */\n pageData?: CursorPagingMetaData;\n /** A list of all the result items. */\n results?: SiteStructureItem[];\n /** A list of errors that occurred during the fetch process (if any). */\n errors?: SiteStructureFetchError[];\n}\n\nexport interface CursorPagingMetaData {\n /** The item count in the current page */\n count?: number | null;\n /** The cursor which will be used to query the next page */\n cursor?: string | null;\n}\n\nexport interface SiteStructureFetchError\n extends SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n /**\n * Error message\n * @minLength 1\n * @maxLength 1000\n */\n errorMessage?: string;\n /**\n * if the fetch happened while fetching links from a TPA, this will hold the TPA appDefId\n * @readonly\n * @format GUID\n */\n appId?: string | null;\n}\n\n/** @oneof */\nexport interface SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n}\n\nexport interface GetSiteStructureMetadataRequest {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n\nexport interface GetSiteStructureMetadataResponse {\n /** A list of pages types */\n pageTypes?: SitePageType[];\n}\n\nexport interface SitePageType {\n /** Type identifier */\n itemTypeIdentifier?: string;\n /** Site's page-type sourceId */\n sourceId?: string;\n /** Site's page-type configId */\n configId?: string;\n}\n\n/**\n * Get Site's structure\n * @public\n * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructure\n */\nexport async function getSiteStructure(\n options?: GetSiteStructureOptions\n): Promise<\n NonNullablePaths<\n SiteStructureResponse,\n | `totalResults`\n | `results`\n | `results.${number}.itemId`\n | `results.${number}.itemTypeIdentifier`\n | `results.${number}.sourceId`\n | `results.${number}.configId`\n | `results.${number}.translationId`\n | `errors`\n | `errors.${number}.itemTypeId`\n | `errors.${number}.routerPrefix`\n | `errors.${number}.errorMessage`,\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 pageVersion: options?.pageVersion,\n paging: options?.paging,\n filter: options?.filter,\n sorting: options?.sorting,\n fieldSet: options?.fieldSet,\n languageMetadata: options?.languageMetadata,\n branchId: options?.branchId,\n });\n\n const reqOpts =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructure(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.image', isRepeated: true },\n { path: 'results.media.image' },\n ],\n },\n {\n transformFn: transformRESTVideoV2ToSDKVideoV2,\n paths: [{ path: 'results.video', isRepeated: true }],\n },\n {\n transformFn: transformRESTVideoToSDKVideo,\n paths: [{ path: 'results.media.video' }],\n },\n {\n transformFn: transformRESTDocumentToSDKDocument,\n paths: [{ path: 'results.media.document' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pageVersion: '$[0].pageVersion',\n paging: '$[0].paging',\n filter: '$[0].filter',\n sorting: '$[0].sorting',\n fieldSet: '$[0].fieldSet',\n languageMetadata: '$[0].languageMetadata',\n branchId: '$[0].branchId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteStructureOptions {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\n/**\n * Get Site's structure meta-data\n * @public\n * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata\n */\nexport async function getSiteStructureMetadata(\n options?: GetSiteStructureMetadataOptions\n): Promise<\n NonNullablePaths<\n GetSiteStructureMetadataResponse,\n | `pageTypes`\n | `pageTypes.${number}.itemTypeIdentifier`\n | `pageTypes.${number}.sourceId`\n | `pageTypes.${number}.configId`,\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 pageVersion: options?.pageVersion,\n });\n\n const reqOpts =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructureMetadata(\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: { pageVersion: '$[0].pageVersion' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteStructureMetadataOptions {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveComWixpressStructureApiSiteStructureServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/site-structure-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_viewer_site-structure-service';\n\n/** Get Site's structure */\nexport function getSiteStructure(payload: object): RequestOptionsFactory<any> {\n function __getSiteStructure({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructure',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.updatedDate' },\n { path: 'results.media.image.urlExpirationDate' },\n { path: 'results.media.video.thumbnail.urlExpirationDate' },\n { path: 'results.media.document.urlExpirationDate' },\n { path: 'results.media.document.thumbnail.urlExpirationDate' },\n { path: 'results.image.urlExpirationDate' },\n { path: 'results.video.urlExpirationDate' },\n { path: 'results.video.resolutions.urlExpirationDate' },\n { path: 'results.video.resolutions.poster.urlExpirationDate' },\n { path: 'results.video.posters.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.media.image.focalPoint.x' },\n { path: 'results.media.image.focalPoint.y' },\n { path: 'results.media.video.thumbnail.focalPoint.x' },\n { path: 'results.media.video.thumbnail.focalPoint.y' },\n { path: 'results.media.document.thumbnail.focalPoint.x' },\n { path: 'results.media.document.thumbnail.focalPoint.y' },\n { path: 'results.image.focalPoint.x' },\n { path: 'results.image.focalPoint.y' },\n { path: 'results.video.resolutions.poster.focalPoint.x' },\n { path: 'results.video.resolutions.poster.focalPoint.y' },\n { path: 'results.video.posters.focalPoint.x' },\n { path: 'results.video.posters.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteStructure;\n}\n\n/** Get Site's structure meta-data */\nexport function getSiteStructureMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteStructureMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure-metadata',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getSiteStructureMetadata;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetSiteStructureMetadataOptions,\n GetSiteStructureMetadataResponse,\n GetSiteStructureOptions,\n SiteStructureResponse,\n getSiteStructure as universalGetSiteStructure,\n getSiteStructureMetadata as universalGetSiteStructureMetadata,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/viewer' };\n\nexport function getSiteStructure(\n httpClient: HttpClient\n): GetSiteStructureSignature {\n return (options?: GetSiteStructureOptions) =>\n universalGetSiteStructure(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSiteStructureSignature {\n /**\n * Get Site's structure\n */\n (options?: GetSiteStructureOptions): Promise<\n NonNullablePaths<\n SiteStructureResponse,\n | `totalResults`\n | `results`\n | `results.${number}.itemId`\n | `results.${number}.itemTypeIdentifier`\n | `results.${number}.sourceId`\n | `results.${number}.configId`\n | `results.${number}.translationId`\n | `errors`\n | `errors.${number}.itemTypeId`\n | `errors.${number}.routerPrefix`\n | `errors.${number}.errorMessage`,\n 4\n >\n >;\n}\n\nexport function getSiteStructureMetadata(\n httpClient: HttpClient\n): GetSiteStructureMetadataSignature {\n return (options?: GetSiteStructureMetadataOptions) =>\n universalGetSiteStructureMetadata(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSiteStructureMetadataSignature {\n /**\n * Get Site's structure meta-data\n */\n (options?: GetSiteStructureMetadataOptions): Promise<\n NonNullablePaths<\n GetSiteStructureMetadataResponse,\n | `pageTypes`\n | `pageTypes.${number}.itemTypeIdentifier`\n | `pageTypes.${number}.sourceId`\n | `pageTypes.${number}.configId`,\n 4\n >\n >;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetaData,\n FocalPoint,\n GetSiteStructureMetadataOptions,\n GetSiteStructureMetadataRequest,\n GetSiteStructureMetadataResponse,\n GetSiteStructureOptions,\n LanguageMetadata,\n MediaItem,\n MediaItemMediaOneOf,\n PageSegment,\n SitePageType,\n SiteStructureFetchError,\n SiteStructureFetchErrorItemTypeOneOf,\n SiteStructureItem,\n SiteStructureRequest,\n SiteStructureRequestFilter,\n SiteStructureResponse,\n SortOrder,\n Sorting,\n VideoResolution,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n","import {\n getSiteStructure as publicGetSiteStructure,\n getSiteStructureMetadata as publicGetSiteStructureMetadata,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSiteStructure: MaybeContext<\n BuildRESTFunction<typeof publicGetSiteStructure> &\n typeof publicGetSiteStructure\n> = /*#__PURE__*/ createRESTModule(publicGetSiteStructure);\nexport const getSiteStructureMetadata: MaybeContext<\n BuildRESTFunction<typeof publicGetSiteStructureMetadata> &\n typeof publicGetSiteStructureMetadata\n> = /*#__PURE__*/ createRESTModule(publicGetSiteStructureMetadata);\n\nexport {\n PageSegment,\n SortOrder,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\nexport {\n SiteStructureItem,\n MediaItem,\n MediaItemMediaOneOf,\n FocalPoint,\n VideoResolution,\n SiteStructureRequest,\n CursorPaging,\n SiteStructureRequestFilter,\n Sorting,\n LanguageMetadata,\n SiteStructureResponse,\n CursorPagingMetaData,\n SiteStructureFetchError,\n SiteStructureFetchErrorItemTypeOneOf,\n GetSiteStructureMetadataRequest,\n GetSiteStructureMetadataResponse,\n SitePageType,\n GetSiteStructureOptions,\n GetSiteStructureMetadataOptions,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\nexport {\n PageSegmentWithLiterals,\n SortOrderWithLiterals,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,sDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;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,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,iBAAiB,SAA6C;AAC5E,WAAS,mBAAmB,EAA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AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEveO,SAASE,kBACd,YAC2B;AAC3B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAyBO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnDA,IAAAC,uBAAiC;AAG1B,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,4BAGK,2DAAiBA,yBAA8B;","names":["getSiteStructure","getSiteStructureMetadata","payload","import_transform_paths","PageSegment","SortOrder","getSiteStructure","sdkTransformError","getSiteStructureMetadata","getSiteStructure","getSiteStructureMetadata","import_rest_modules","getSiteStructure","getSiteStructureMetadata"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.universal.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.http.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.public.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.context.ts"],"sourcesContent":["export * from './src/viewer-structure-v1-site-structure-item-site-structure-service.context.js';\n","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 ambassadorWixViewerStructureV1SiteStructureItem from './viewer-structure-v1-site-structure-item-site-structure-service.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTVideoV2ToSDKVideoV2 } from '@wix/sdk-runtime/transformations/video-v2';\nimport { transformRESTVideoToSDKVideo } from '@wix/sdk-runtime/transformations/video';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SiteStructureItem {\n /**\n * The end goal: this field should contain a unique identifier for this site-structure item.\\\n * Currently it contains:\n * - For site-structure integrated TPAs - the unique identifier provided by the TPA.\n * - For all other item types - empty string.\n */\n itemId?: string;\n /**\n * An identifier for the type of the item. One of:\n * - For the site's static pages - \"static_page\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the item type identifier provided by the TPA. Commonly one of that TPA's supported sub-pages.\n * - For items that are the result of a dynamic router - \"dynamic-page\".\n */\n itemTypeIdentifier?: string;\n /**\n * An identifier for the source of the item. One of:\n * - For the site's static pages - \"editor\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the TPA's app-def-id.\n * - For items that are the result of a dynamic router - Wix-Code's app-def-id: '675bbcef-18d8-41f5-800e-131ec9e08762'.\n */\n sourceId?: string;\n /**\n * An identifier for the configuration of the item. Used currently as some sort of a placeholder for further filtering.\n * - For items of type \"dynamic-page\" - The 'prefix' field that is part of the router-config object of the router that is related to this item (see WixCodeDynamicRouterResolver).\n * - For all other items types - empty string.\n */\n configId?: string;\n /**\n * A human readable name string associated with the item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'name' field provided by the TPA for that item.\\\n * This field is not guaranteed to be unique across the item list.\n */\n name?: string | null;\n /**\n * Deprecated. Previously used for media content that is associated with an item.\\\n * See 'image' and 'video' fields of this message.\n * @deprecated\n */\n media?: MediaItem[];\n /** A relative url path that can be used, with the site's base-url, to reach the page represented by this item. */\n path?: string | null;\n /**\n * A timestamp representing the moment that this item was last changed.\n * - For static pages - the site's last publish time.\n * - For all kinds of TPAs - the last-modified field in the respective response item from the TPA.\n * - For items that are the result of a dynamic router - the content of the 'lastModified' optional field in the response item from Wix-Code's RPC endpoint, or, if missing, the site's last publish time. (see WixCodeDynamicRouterResolver).\n */\n _updatedDate?: Date | null;\n /**\n * A value indicating whether the item is inactive or not. E.g. hidden product/finished event etc.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'inactive' field provided by the TPA for that item.\n */\n inactive?: boolean | null;\n /**\n * A general free schema field to include further metadata related to this item.\\\n * Currently exists only for:\\\n * Static pages - a JSON that is the merge of:\n * 1. The advancedSeoData JSON string that exists for the page in the master-page.\n * 2. A JSON of the form:\n * ```javascript\n * {\n * \"seo_legacy\": {\n * \"hidden_from_seo\": true / false\n * },\n * \"password_protected\": true / false\n * }\n * ```\n * New TPA site-structure integration items - the 'metadata' field provided by the TPA for that item.\n */\n metadata?: Record<string, any> | null;\n /**\n * An image media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'image' field provided by the TPA for that item.\n */\n image?: string[];\n /**\n * A video media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'video' field provided by the TPA for that item.\n */\n video?: string[];\n /** A value indicating whether the item is protected or not, by password or login. */\n protected?: boolean | null;\n /**\n * ID of the translations of the item. As same item can have multiple instances, one for each language, we can match them by this ID.\\\n * For example:\n * Blog has one post, translated to 2 languages (EN, FR):\n * - EN item path is `/amazing-post`\n * - FR item path is `/poste-incroyable\n * Both of them might have different `item_id`, but will share the same `translation_id`, to be easily match together\n * Currently only relevant for Blog\n */\n translationId?: string;\n /** A value indicating whether the item is a custom error page or not. */\n isCustomErrorPage?: boolean | null;\n}\n\n/** Deprecated - Copy this message into your service, do not reference it */\nexport interface MediaItem extends MediaItemMediaOneOf {\n /** WixMedia image */\n image?: string;\n /** WixMedia video */\n video?: string;\n /** WixMedia document */\n document?: string;\n}\n\n/** @oneof */\nexport interface MediaItemMediaOneOf {\n /** WixMedia image */\n image?: string;\n /** WixMedia video */\n video?: string;\n /** WixMedia document */\n document?: 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 VideoResolution {\n /** Video URL. */\n url?: string;\n /** Video height. */\n height?: number;\n /** Video width. */\n width?: number;\n /** Video format for example, mp4, hls. */\n format?: string;\n}\n\nexport interface SiteStructureRequest {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport enum PageSegment {\n PUBLISHED = 'PUBLISHED',\n SAVED = 'SAVED',\n}\n\n/** @enumType */\nexport type PageSegmentWithLiterals = PageSegment | 'PUBLISHED' | 'SAVED';\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\n/** A filter metadata type. The filter forces an 'and' logic between all of its comprising parts. */\nexport interface SiteStructureRequestFilter {\n /** In accordance to SiteStructureItem.item_type_identifier */\n itemTypeIdentifier?: string;\n /** In accordance to SiteStructureItem.source_id */\n sourceId?: string;\n /** In accordance to SiteStructureItem.config_id */\n configId?: string;\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 LanguageMetadata {\n /**\n * 2 chars language code (e.g. 'en')\n * @format LANGUAGE\n */\n code?: string;\n /**\n * 4 chars language tag (e.g. 'en-us')\n * @format LANGUAGE_TAG\n */\n tag?: string | null;\n}\n\nexport interface SiteStructureResponse {\n /** The total number of items to be returned, combining all paginated responses. */\n totalResults?: number;\n /** A cursor based paging response metadata, including the item count in the current page and a cursor string to be used for querying of the next page. */\n pageData?: CursorPagingMetaData;\n /** A list of all the result items. */\n results?: SiteStructureItem[];\n /** A list of errors that occurred during the fetch process (if any). */\n errors?: SiteStructureFetchError[];\n}\n\nexport interface CursorPagingMetaData {\n /** The item count in the current page */\n count?: number | null;\n /** The cursor which will be used to query the next page */\n cursor?: string | null;\n}\n\nexport interface SiteStructureFetchError\n extends SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n /**\n * Error message\n * @minLength 1\n * @maxLength 1000\n */\n errorMessage?: string;\n /**\n * if the fetch happened while fetching links from a TPA, this will hold the TPA appDefId\n * @readonly\n * @format GUID\n */\n appId?: string | null;\n}\n\n/** @oneof */\nexport interface SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n}\n\nexport interface GetSiteStructureMetadataRequest {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n\nexport interface GetSiteStructureMetadataResponse {\n /** A list of pages types */\n pageTypes?: SitePageType[];\n}\n\nexport interface SitePageType {\n /** Type identifier */\n itemTypeIdentifier?: string;\n /** Site's page-type sourceId */\n sourceId?: string;\n /** Site's page-type configId */\n configId?: string;\n}\n\nexport interface GetSiteStructureChunksRequest {\n /** @maxLength 8192 */\n siteUrl?: string | null;\n languageMetadata?: LanguageMetadata;\n /** The size of the chunk to split all the entries into. */\n chunkSize?: number;\n pageVersion?: PageSegmentWithLiterals;\n /** @maxLength 255 */\n itemTypeIdentifier?: string | null;\n /** @maxLength 36 */\n sourceId?: string;\n /** @maxLength 2048 */\n configId?: string;\n /** @maxLength 255 */\n pageIdentifier?: string | null;\n}\n\nexport interface GetSiteStructureChunksResponse {\n chunks?: ChunkMetadata[];\n}\n\nexport interface ChunkMetadata {\n /**\n * Chunk ID used in subsequent GetSiteMapChunk request\n * @maxLength 255\n */\n _id?: string;\n /** The most recent date when any of the items in a chunk was updated */\n _updatedDate?: Date | null;\n}\n\nexport interface GetSiteStructureChunkRequest {\n /** @maxLength 8192 */\n siteUrl?: string | null;\n /**\n * Chunk ID previously returned in ChunkMetadata\n * @maxLength 127\n */\n chunkId?: string;\n languageMetadata?: LanguageMetadata;\n /** Chunk size. It will match the chunk size used in GetSiteMapChunksRequest. */\n chunkSize?: number | null;\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n /** @maxLength 255 */\n itemTypeIdentifier?: string | null;\n /** @maxLength 36 */\n sourceId?: string;\n /** @maxLength 2048 */\n configId?: string;\n /** @maxLength 255 */\n pageIdentifier?: string | null;\n}\n\nexport interface GetSiteStructureChunkResponse {\n /** @maxSize 10000 */\n chunk?: SiteStructureItem[];\n}\n\n/**\n * Get Site's structure\n * @public\n * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructure\n */\nexport async function getSiteStructure(\n options?: GetSiteStructureOptions\n): Promise<\n NonNullablePaths<\n SiteStructureResponse,\n | `totalResults`\n | `results`\n | `results.${number}.itemId`\n | `results.${number}.itemTypeIdentifier`\n | `results.${number}.sourceId`\n | `results.${number}.configId`\n | `results.${number}.translationId`\n | `errors`\n | `errors.${number}.itemTypeId`\n | `errors.${number}.routerPrefix`\n | `errors.${number}.errorMessage`,\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 pageVersion: options?.pageVersion,\n paging: options?.paging,\n filter: options?.filter,\n sorting: options?.sorting,\n fieldSet: options?.fieldSet,\n languageMetadata: options?.languageMetadata,\n branchId: options?.branchId,\n });\n\n const reqOpts =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructure(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.image', isRepeated: true },\n { path: 'results.media.image' },\n ],\n },\n {\n transformFn: transformRESTVideoV2ToSDKVideoV2,\n paths: [{ path: 'results.video', isRepeated: true }],\n },\n {\n transformFn: transformRESTVideoToSDKVideo,\n paths: [{ path: 'results.media.video' }],\n },\n {\n transformFn: transformRESTDocumentToSDKDocument,\n paths: [{ path: 'results.media.document' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pageVersion: '$[0].pageVersion',\n paging: '$[0].paging',\n filter: '$[0].filter',\n sorting: '$[0].sorting',\n fieldSet: '$[0].fieldSet',\n languageMetadata: '$[0].languageMetadata',\n branchId: '$[0].branchId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteStructureOptions {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\n/**\n * Get Site's structure meta-data\n * @public\n * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata\n */\nexport async function getSiteStructureMetadata(\n options?: GetSiteStructureMetadataOptions\n): Promise<\n NonNullablePaths<\n GetSiteStructureMetadataResponse,\n | `pageTypes`\n | `pageTypes.${number}.itemTypeIdentifier`\n | `pageTypes.${number}.sourceId`\n | `pageTypes.${number}.configId`,\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 pageVersion: options?.pageVersion,\n });\n\n const reqOpts =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructureMetadata(\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: { pageVersion: '$[0].pageVersion' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteStructureMetadataOptions {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveComWixpressStructureApiSiteStructureServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/site-structure-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_viewer_site-structure-service';\n\n/** Get Site's structure */\nexport function getSiteStructure(payload: object): RequestOptionsFactory<any> {\n function __getSiteStructure({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructure',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.updatedDate' },\n { path: 'results.media.image.urlExpirationDate' },\n { path: 'results.media.video.thumbnail.urlExpirationDate' },\n { path: 'results.media.document.urlExpirationDate' },\n { path: 'results.media.document.thumbnail.urlExpirationDate' },\n { path: 'results.image.urlExpirationDate' },\n { path: 'results.video.urlExpirationDate' },\n { path: 'results.video.resolutions.urlExpirationDate' },\n { path: 'results.video.resolutions.poster.urlExpirationDate' },\n { path: 'results.video.posters.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.media.image.focalPoint.x' },\n { path: 'results.media.image.focalPoint.y' },\n { path: 'results.media.video.thumbnail.focalPoint.x' },\n { path: 'results.media.video.thumbnail.focalPoint.y' },\n { path: 'results.media.document.thumbnail.focalPoint.x' },\n { path: 'results.media.document.thumbnail.focalPoint.y' },\n { path: 'results.image.focalPoint.x' },\n { path: 'results.image.focalPoint.y' },\n { path: 'results.video.resolutions.poster.focalPoint.x' },\n { path: 'results.video.resolutions.poster.focalPoint.y' },\n { path: 'results.video.posters.focalPoint.x' },\n { path: 'results.video.posters.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteStructure;\n}\n\n/** Get Site's structure meta-data */\nexport function getSiteStructureMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteStructureMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure-metadata',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getSiteStructureMetadata;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetSiteStructureMetadataOptions,\n GetSiteStructureMetadataResponse,\n GetSiteStructureOptions,\n SiteStructureResponse,\n getSiteStructure as universalGetSiteStructure,\n getSiteStructureMetadata as universalGetSiteStructureMetadata,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/viewer' };\n\nexport function getSiteStructure(\n httpClient: HttpClient\n): GetSiteStructureSignature {\n return (options?: GetSiteStructureOptions) =>\n universalGetSiteStructure(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSiteStructureSignature {\n /**\n * Get Site's structure\n */\n (options?: GetSiteStructureOptions): Promise<\n NonNullablePaths<\n SiteStructureResponse,\n | `totalResults`\n | `results`\n | `results.${number}.itemId`\n | `results.${number}.itemTypeIdentifier`\n | `results.${number}.sourceId`\n | `results.${number}.configId`\n | `results.${number}.translationId`\n | `errors`\n | `errors.${number}.itemTypeId`\n | `errors.${number}.routerPrefix`\n | `errors.${number}.errorMessage`,\n 4\n >\n >;\n}\n\nexport function getSiteStructureMetadata(\n httpClient: HttpClient\n): GetSiteStructureMetadataSignature {\n return (options?: GetSiteStructureMetadataOptions) =>\n universalGetSiteStructureMetadata(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetSiteStructureMetadataSignature {\n /**\n * Get Site's structure meta-data\n */\n (options?: GetSiteStructureMetadataOptions): Promise<\n NonNullablePaths<\n GetSiteStructureMetadataResponse,\n | `pageTypes`\n | `pageTypes.${number}.itemTypeIdentifier`\n | `pageTypes.${number}.sourceId`\n | `pageTypes.${number}.configId`,\n 4\n >\n >;\n}\n\nexport {\n ChunkMetadata,\n CursorPaging,\n CursorPagingMetaData,\n FocalPoint,\n GetSiteStructureChunkRequest,\n GetSiteStructureChunkResponse,\n GetSiteStructureChunksRequest,\n GetSiteStructureChunksResponse,\n GetSiteStructureMetadataOptions,\n GetSiteStructureMetadataRequest,\n GetSiteStructureMetadataResponse,\n GetSiteStructureOptions,\n LanguageMetadata,\n MediaItem,\n MediaItemMediaOneOf,\n PageSegment,\n SitePageType,\n SiteStructureFetchError,\n SiteStructureFetchErrorItemTypeOneOf,\n SiteStructureItem,\n SiteStructureRequest,\n SiteStructureRequestFilter,\n SiteStructureResponse,\n SortOrder,\n Sorting,\n VideoResolution,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n","import {\n getSiteStructure as publicGetSiteStructure,\n getSiteStructureMetadata as publicGetSiteStructureMetadata,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getSiteStructure: MaybeContext<\n BuildRESTFunction<typeof publicGetSiteStructure> &\n typeof publicGetSiteStructure\n> = /*#__PURE__*/ createRESTModule(publicGetSiteStructure);\nexport const getSiteStructureMetadata: MaybeContext<\n BuildRESTFunction<typeof publicGetSiteStructureMetadata> &\n typeof publicGetSiteStructureMetadata\n> = /*#__PURE__*/ createRESTModule(publicGetSiteStructureMetadata);\n\nexport {\n PageSegment,\n SortOrder,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\nexport {\n SiteStructureItem,\n MediaItem,\n MediaItemMediaOneOf,\n FocalPoint,\n VideoResolution,\n SiteStructureRequest,\n CursorPaging,\n SiteStructureRequestFilter,\n Sorting,\n LanguageMetadata,\n SiteStructureResponse,\n CursorPagingMetaData,\n SiteStructureFetchError,\n SiteStructureFetchErrorItemTypeOneOf,\n GetSiteStructureMetadataRequest,\n GetSiteStructureMetadataResponse,\n SitePageType,\n GetSiteStructureChunksRequest,\n GetSiteStructureChunksResponse,\n ChunkMetadata,\n GetSiteStructureChunkRequest,\n GetSiteStructureChunkResponse,\n GetSiteStructureOptions,\n GetSiteStructureMetadataOptions,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\nexport {\n PageSegmentWithLiterals,\n SortOrderWithLiterals,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,gCAAAC;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A,UACxB,aAAa;AAAA,UACb,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,SAAS;AAAA,UACT,UAAU;AAAA,UACV,kBAAkB;AAAA,UAClB,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA+BA,eAAsBC,0BACpB,SAUA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,aAAa,SAAS;AAAA,EACxB,CAAC;AAED,QAAM,UAC4C;AAAA,IAC9C;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,aAAa,mBAAmB;AAAA,QAC5D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEtiBO,SAASE,kBACd,YAC2B;AAC3B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAyBO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnDA,IAAAC,uBAAiC;AAG1B,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,4BAGK,2DAAiBA,yBAA8B;","names":["getSiteStructure","getSiteStructureMetadata","payload","import_transform_paths","PageSegment","SortOrder","getSiteStructure","sdkTransformError","getSiteStructureMetadata","getSiteStructure","getSiteStructureMetadata","import_rest_modules","getSiteStructure","getSiteStructureMetadata"]}
@@ -293,6 +293,64 @@ interface SitePageType {
293
293
  /** Site's page-type configId */
294
294
  configId?: string;
295
295
  }
296
+ interface GetSiteStructureChunksRequest {
297
+ /** @maxLength 8192 */
298
+ siteUrl?: string | null;
299
+ languageMetadata?: LanguageMetadata;
300
+ /** The size of the chunk to split all the entries into. */
301
+ chunkSize?: number;
302
+ pageVersion?: PageSegmentWithLiterals;
303
+ /** @maxLength 255 */
304
+ itemTypeIdentifier?: string | null;
305
+ /** @maxLength 36 */
306
+ sourceId?: string;
307
+ /** @maxLength 2048 */
308
+ configId?: string;
309
+ /** @maxLength 255 */
310
+ pageIdentifier?: string | null;
311
+ }
312
+ interface GetSiteStructureChunksResponse {
313
+ chunks?: ChunkMetadata[];
314
+ }
315
+ interface ChunkMetadata {
316
+ /**
317
+ * Chunk ID used in subsequent GetSiteMapChunk request
318
+ * @maxLength 255
319
+ */
320
+ _id?: string;
321
+ /** The most recent date when any of the items in a chunk was updated */
322
+ _updatedDate?: Date | null;
323
+ }
324
+ interface GetSiteStructureChunkRequest {
325
+ /** @maxLength 8192 */
326
+ siteUrl?: string | null;
327
+ /**
328
+ * Chunk ID previously returned in ChunkMetadata
329
+ * @maxLength 127
330
+ */
331
+ chunkId?: string;
332
+ languageMetadata?: LanguageMetadata;
333
+ /** Chunk size. It will match the chunk size used in GetSiteMapChunksRequest. */
334
+ chunkSize?: number | null;
335
+ pageVersion?: PageSegmentWithLiterals;
336
+ /**
337
+ * Used to identify the branch of the site for which the structure is requested.
338
+ * @format GUID
339
+ */
340
+ branchId?: string | null;
341
+ /** @maxLength 255 */
342
+ itemTypeIdentifier?: string | null;
343
+ /** @maxLength 36 */
344
+ sourceId?: string;
345
+ /** @maxLength 2048 */
346
+ configId?: string;
347
+ /** @maxLength 255 */
348
+ pageIdentifier?: string | null;
349
+ }
350
+ interface GetSiteStructureChunkResponse {
351
+ /** @maxSize 10000 */
352
+ chunk?: SiteStructureItem[];
353
+ }
296
354
  /**
297
355
  * Get Site's structure
298
356
  * @public
@@ -333,4 +391,4 @@ interface GetSiteStructureMetadataOptions {
333
391
  pageVersion?: PageSegmentWithLiterals;
334
392
  }
335
393
 
336
- export { type CursorPaging, type CursorPagingMetaData, type FocalPoint, type GetSiteStructureMetadataOptions, type GetSiteStructureMetadataRequest, type GetSiteStructureMetadataResponse, type GetSiteStructureOptions, type LanguageMetadata, type MediaItem, type MediaItemMediaOneOf, PageSegment, type PageSegmentWithLiterals, type SitePageType, type SiteStructureFetchError, type SiteStructureFetchErrorItemTypeOneOf, type SiteStructureItem, type SiteStructureRequest, type SiteStructureRequestFilter, type SiteStructureResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type VideoResolution, getSiteStructure, getSiteStructureMetadata };
394
+ export { type ChunkMetadata, type CursorPaging, type CursorPagingMetaData, type FocalPoint, type GetSiteStructureChunkRequest, type GetSiteStructureChunkResponse, type GetSiteStructureChunksRequest, type GetSiteStructureChunksResponse, type GetSiteStructureMetadataOptions, type GetSiteStructureMetadataRequest, type GetSiteStructureMetadataResponse, type GetSiteStructureOptions, type LanguageMetadata, type MediaItem, type MediaItemMediaOneOf, PageSegment, type PageSegmentWithLiterals, type SitePageType, type SiteStructureFetchError, type SiteStructureFetchErrorItemTypeOneOf, type SiteStructureItem, type SiteStructureRequest, type SiteStructureRequestFilter, type SiteStructureResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type VideoResolution, getSiteStructure, getSiteStructureMetadata };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.universal.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.http.ts"],"sourcesContent":["export * from './src/viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n","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 ambassadorWixViewerStructureV1SiteStructureItem from './viewer-structure-v1-site-structure-item-site-structure-service.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTVideoV2ToSDKVideoV2 } from '@wix/sdk-runtime/transformations/video-v2';\nimport { transformRESTVideoToSDKVideo } from '@wix/sdk-runtime/transformations/video';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SiteStructureItem {\n /**\n * The end goal: this field should contain a unique identifier for this site-structure item.\\\n * Currently it contains:\n * - For site-structure integrated TPAs - the unique identifier provided by the TPA.\n * - For all other item types - empty string.\n */\n itemId?: string;\n /**\n * An identifier for the type of the item. One of:\n * - For the site's static pages - \"static_page\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the item type identifier provided by the TPA. Commonly one of that TPA's supported sub-pages.\n * - For items that are the result of a dynamic router - \"dynamic-page\".\n */\n itemTypeIdentifier?: string;\n /**\n * An identifier for the source of the item. One of:\n * - For the site's static pages - \"editor\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the TPA's app-def-id.\n * - For items that are the result of a dynamic router - Wix-Code's app-def-id: '675bbcef-18d8-41f5-800e-131ec9e08762'.\n */\n sourceId?: string;\n /**\n * An identifier for the configuration of the item. Used currently as some sort of a placeholder for further filtering.\n * - For items of type \"dynamic-page\" - The 'prefix' field that is part of the router-config object of the router that is related to this item (see WixCodeDynamicRouterResolver).\n * - For all other items types - empty string.\n */\n configId?: string;\n /**\n * A human readable name string associated with the item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'name' field provided by the TPA for that item.\\\n * This field is not guaranteed to be unique across the item list.\n */\n name?: string | null;\n /**\n * Deprecated. Previously used for media content that is associated with an item.\\\n * See 'image' and 'video' fields of this message.\n * @deprecated\n */\n media?: MediaItem[];\n /** A relative url path that can be used, with the site's base-url, to reach the page represented by this item. */\n path?: string | null;\n /**\n * A timestamp representing the moment that this item was last changed.\n * - For static pages - the site's last publish time.\n * - For all kinds of TPAs - the last-modified field in the respective response item from the TPA.\n * - For items that are the result of a dynamic router - the content of the 'lastModified' optional field in the response item from Wix-Code's RPC endpoint, or, if missing, the site's last publish time. (see WixCodeDynamicRouterResolver).\n */\n _updatedDate?: Date | null;\n /**\n * A value indicating whether the item is inactive or not. E.g. hidden product/finished event etc.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'inactive' field provided by the TPA for that item.\n */\n inactive?: boolean | null;\n /**\n * A general free schema field to include further metadata related to this item.\\\n * Currently exists only for:\\\n * Static pages - a JSON that is the merge of:\n * 1. The advancedSeoData JSON string that exists for the page in the master-page.\n * 2. A JSON of the form:\n * ```javascript\n * {\n * \"seo_legacy\": {\n * \"hidden_from_seo\": true / false\n * },\n * \"password_protected\": true / false\n * }\n * ```\n * New TPA site-structure integration items - the 'metadata' field provided by the TPA for that item.\n */\n metadata?: Record<string, any> | null;\n /**\n * An image media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'image' field provided by the TPA for that item.\n */\n image?: string[];\n /**\n * A video media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'video' field provided by the TPA for that item.\n */\n video?: string[];\n /** A value indicating whether the item is protected or not, by password or login. */\n protected?: boolean | null;\n /**\n * ID of the translations of the item. As same item can have multiple instances, one for each language, we can match them by this ID.\\\n * For example:\n * Blog has one post, translated to 2 languages (EN, FR):\n * - EN item path is `/amazing-post`\n * - FR item path is `/poste-incroyable\n * Both of them might have different `item_id`, but will share the same `translation_id`, to be easily match together\n * Currently only relevant for Blog\n */\n translationId?: string;\n /** A value indicating whether the item is a custom error page or not. */\n isCustomErrorPage?: boolean | null;\n}\n\n/** Deprecated - Copy this message into your service, do not reference it */\nexport interface MediaItem extends MediaItemMediaOneOf {\n /** WixMedia image */\n image?: string;\n /** WixMedia video */\n video?: string;\n /** WixMedia document */\n document?: string;\n}\n\n/** @oneof */\nexport interface MediaItemMediaOneOf {\n /** WixMedia image */\n image?: string;\n /** WixMedia video */\n video?: string;\n /** WixMedia document */\n document?: 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 VideoResolution {\n /** Video URL. */\n url?: string;\n /** Video height. */\n height?: number;\n /** Video width. */\n width?: number;\n /** Video format for example, mp4, hls. */\n format?: string;\n}\n\nexport interface SiteStructureRequest {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport enum PageSegment {\n PUBLISHED = 'PUBLISHED',\n SAVED = 'SAVED',\n}\n\n/** @enumType */\nexport type PageSegmentWithLiterals = PageSegment | 'PUBLISHED' | 'SAVED';\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\n/** A filter metadata type. The filter forces an 'and' logic between all of its comprising parts. */\nexport interface SiteStructureRequestFilter {\n /** In accordance to SiteStructureItem.item_type_identifier */\n itemTypeIdentifier?: string;\n /** In accordance to SiteStructureItem.source_id */\n sourceId?: string;\n /** In accordance to SiteStructureItem.config_id */\n configId?: string;\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 LanguageMetadata {\n /**\n * 2 chars language code (e.g. 'en')\n * @format LANGUAGE\n */\n code?: string;\n /**\n * 4 chars language tag (e.g. 'en-us')\n * @format LANGUAGE_TAG\n */\n tag?: string | null;\n}\n\nexport interface SiteStructureResponse {\n /** The total number of items to be returned, combining all paginated responses. */\n totalResults?: number;\n /** A cursor based paging response metadata, including the item count in the current page and a cursor string to be used for querying of the next page. */\n pageData?: CursorPagingMetaData;\n /** A list of all the result items. */\n results?: SiteStructureItem[];\n /** A list of errors that occurred during the fetch process (if any). */\n errors?: SiteStructureFetchError[];\n}\n\nexport interface CursorPagingMetaData {\n /** The item count in the current page */\n count?: number | null;\n /** The cursor which will be used to query the next page */\n cursor?: string | null;\n}\n\nexport interface SiteStructureFetchError\n extends SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n /**\n * Error message\n * @minLength 1\n * @maxLength 1000\n */\n errorMessage?: string;\n /**\n * if the fetch happened while fetching links from a TPA, this will hold the TPA appDefId\n * @readonly\n * @format GUID\n */\n appId?: string | null;\n}\n\n/** @oneof */\nexport interface SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n}\n\nexport interface GetSiteStructureMetadataRequest {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n\nexport interface GetSiteStructureMetadataResponse {\n /** A list of pages types */\n pageTypes?: SitePageType[];\n}\n\nexport interface SitePageType {\n /** Type identifier */\n itemTypeIdentifier?: string;\n /** Site's page-type sourceId */\n sourceId?: string;\n /** Site's page-type configId */\n configId?: string;\n}\n\n/**\n * Get Site's structure\n * @public\n * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructure\n */\nexport async function getSiteStructure(\n options?: GetSiteStructureOptions\n): Promise<\n NonNullablePaths<\n SiteStructureResponse,\n | `totalResults`\n | `results`\n | `results.${number}.itemId`\n | `results.${number}.itemTypeIdentifier`\n | `results.${number}.sourceId`\n | `results.${number}.configId`\n | `results.${number}.translationId`\n | `errors`\n | `errors.${number}.itemTypeId`\n | `errors.${number}.routerPrefix`\n | `errors.${number}.errorMessage`,\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 pageVersion: options?.pageVersion,\n paging: options?.paging,\n filter: options?.filter,\n sorting: options?.sorting,\n fieldSet: options?.fieldSet,\n languageMetadata: options?.languageMetadata,\n branchId: options?.branchId,\n });\n\n const reqOpts =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructure(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.image', isRepeated: true },\n { path: 'results.media.image' },\n ],\n },\n {\n transformFn: transformRESTVideoV2ToSDKVideoV2,\n paths: [{ path: 'results.video', isRepeated: true }],\n },\n {\n transformFn: transformRESTVideoToSDKVideo,\n paths: [{ path: 'results.media.video' }],\n },\n {\n transformFn: transformRESTDocumentToSDKDocument,\n paths: [{ path: 'results.media.document' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pageVersion: '$[0].pageVersion',\n paging: '$[0].paging',\n filter: '$[0].filter',\n sorting: '$[0].sorting',\n fieldSet: '$[0].fieldSet',\n languageMetadata: '$[0].languageMetadata',\n branchId: '$[0].branchId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteStructureOptions {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\n/**\n * Get Site's structure meta-data\n * @public\n * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata\n */\nexport async function getSiteStructureMetadata(\n options?: GetSiteStructureMetadataOptions\n): Promise<\n NonNullablePaths<\n GetSiteStructureMetadataResponse,\n | `pageTypes`\n | `pageTypes.${number}.itemTypeIdentifier`\n | `pageTypes.${number}.sourceId`\n | `pageTypes.${number}.configId`,\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 pageVersion: options?.pageVersion,\n });\n\n const reqOpts =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructureMetadata(\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: { pageVersion: '$[0].pageVersion' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteStructureMetadataOptions {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveComWixpressStructureApiSiteStructureServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/site-structure-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_viewer_site-structure-service';\n\n/** Get Site's structure */\nexport function getSiteStructure(payload: object): RequestOptionsFactory<any> {\n function __getSiteStructure({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructure',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.updatedDate' },\n { path: 'results.media.image.urlExpirationDate' },\n { path: 'results.media.video.thumbnail.urlExpirationDate' },\n { path: 'results.media.document.urlExpirationDate' },\n { path: 'results.media.document.thumbnail.urlExpirationDate' },\n { path: 'results.image.urlExpirationDate' },\n { path: 'results.video.urlExpirationDate' },\n { path: 'results.video.resolutions.urlExpirationDate' },\n { path: 'results.video.resolutions.poster.urlExpirationDate' },\n { path: 'results.video.posters.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.media.image.focalPoint.x' },\n { path: 'results.media.image.focalPoint.y' },\n { path: 'results.media.video.thumbnail.focalPoint.x' },\n { path: 'results.media.video.thumbnail.focalPoint.y' },\n { path: 'results.media.document.thumbnail.focalPoint.x' },\n { path: 'results.media.document.thumbnail.focalPoint.y' },\n { path: 'results.image.focalPoint.x' },\n { path: 'results.image.focalPoint.y' },\n { path: 'results.video.resolutions.poster.focalPoint.x' },\n { path: 'results.video.resolutions.poster.focalPoint.y' },\n { path: 'results.video.posters.focalPoint.x' },\n { path: 'results.video.posters.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteStructure;\n}\n\n/** Get Site's structure meta-data */\nexport function getSiteStructureMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteStructureMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure-metadata',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getSiteStructureMetadata;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,sDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;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,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA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AC;AAAA,QACzB,0BAA0B,EAAE,aAAa,mBAAmB;AAAA,QAC5D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getSiteStructure","getSiteStructureMetadata","payload","import_transform_paths","PageSegment","SortOrder","getSiteStructure","sdkTransformError","getSiteStructureMetadata"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.universal.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.http.ts"],"sourcesContent":["export * from './src/viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n","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 ambassadorWixViewerStructureV1SiteStructureItem from './viewer-structure-v1-site-structure-item-site-structure-service.http.js';\nimport { transformRESTImageToSDKImage } from '@wix/sdk-runtime/transformations/image';\nimport { transformRESTVideoV2ToSDKVideoV2 } from '@wix/sdk-runtime/transformations/video-v2';\nimport { transformRESTVideoToSDKVideo } from '@wix/sdk-runtime/transformations/video';\nimport { transformRESTDocumentToSDKDocument } from '@wix/sdk-runtime/transformations/document';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface SiteStructureItem {\n /**\n * The end goal: this field should contain a unique identifier for this site-structure item.\\\n * Currently it contains:\n * - For site-structure integrated TPAs - the unique identifier provided by the TPA.\n * - For all other item types - empty string.\n */\n itemId?: string;\n /**\n * An identifier for the type of the item. One of:\n * - For the site's static pages - \"static_page\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the item type identifier provided by the TPA. Commonly one of that TPA's supported sub-pages.\n * - For items that are the result of a dynamic router - \"dynamic-page\".\n */\n itemTypeIdentifier?: string;\n /**\n * An identifier for the source of the item. One of:\n * - For the site's static pages - \"editor\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the TPA's app-def-id.\n * - For items that are the result of a dynamic router - Wix-Code's app-def-id: '675bbcef-18d8-41f5-800e-131ec9e08762'.\n */\n sourceId?: string;\n /**\n * An identifier for the configuration of the item. Used currently as some sort of a placeholder for further filtering.\n * - For items of type \"dynamic-page\" - The 'prefix' field that is part of the router-config object of the router that is related to this item (see WixCodeDynamicRouterResolver).\n * - For all other items types - empty string.\n */\n configId?: string;\n /**\n * A human readable name string associated with the item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'name' field provided by the TPA for that item.\\\n * This field is not guaranteed to be unique across the item list.\n */\n name?: string | null;\n /**\n * Deprecated. Previously used for media content that is associated with an item.\\\n * See 'image' and 'video' fields of this message.\n * @deprecated\n */\n media?: MediaItem[];\n /** A relative url path that can be used, with the site's base-url, to reach the page represented by this item. */\n path?: string | null;\n /**\n * A timestamp representing the moment that this item was last changed.\n * - For static pages - the site's last publish time.\n * - For all kinds of TPAs - the last-modified field in the respective response item from the TPA.\n * - For items that are the result of a dynamic router - the content of the 'lastModified' optional field in the response item from Wix-Code's RPC endpoint, or, if missing, the site's last publish time. (see WixCodeDynamicRouterResolver).\n */\n _updatedDate?: Date | null;\n /**\n * A value indicating whether the item is inactive or not. E.g. hidden product/finished event etc.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'inactive' field provided by the TPA for that item.\n */\n inactive?: boolean | null;\n /**\n * A general free schema field to include further metadata related to this item.\\\n * Currently exists only for:\\\n * Static pages - a JSON that is the merge of:\n * 1. The advancedSeoData JSON string that exists for the page in the master-page.\n * 2. A JSON of the form:\n * ```javascript\n * {\n * \"seo_legacy\": {\n * \"hidden_from_seo\": true / false\n * },\n * \"password_protected\": true / false\n * }\n * ```\n * New TPA site-structure integration items - the 'metadata' field provided by the TPA for that item.\n */\n metadata?: Record<string, any> | null;\n /**\n * An image media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'image' field provided by the TPA for that item.\n */\n image?: string[];\n /**\n * A video media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'video' field provided by the TPA for that item.\n */\n video?: string[];\n /** A value indicating whether the item is protected or not, by password or login. */\n protected?: boolean | null;\n /**\n * ID of the translations of the item. As same item can have multiple instances, one for each language, we can match them by this ID.\\\n * For example:\n * Blog has one post, translated to 2 languages (EN, FR):\n * - EN item path is `/amazing-post`\n * - FR item path is `/poste-incroyable\n * Both of them might have different `item_id`, but will share the same `translation_id`, to be easily match together\n * Currently only relevant for Blog\n */\n translationId?: string;\n /** A value indicating whether the item is a custom error page or not. */\n isCustomErrorPage?: boolean | null;\n}\n\n/** Deprecated - Copy this message into your service, do not reference it */\nexport interface MediaItem extends MediaItemMediaOneOf {\n /** WixMedia image */\n image?: string;\n /** WixMedia video */\n video?: string;\n /** WixMedia document */\n document?: string;\n}\n\n/** @oneof */\nexport interface MediaItemMediaOneOf {\n /** WixMedia image */\n image?: string;\n /** WixMedia video */\n video?: string;\n /** WixMedia document */\n document?: 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 VideoResolution {\n /** Video URL. */\n url?: string;\n /** Video height. */\n height?: number;\n /** Video width. */\n width?: number;\n /** Video format for example, mp4, hls. */\n format?: string;\n}\n\nexport interface SiteStructureRequest {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport enum PageSegment {\n PUBLISHED = 'PUBLISHED',\n SAVED = 'SAVED',\n}\n\n/** @enumType */\nexport type PageSegmentWithLiterals = PageSegment | 'PUBLISHED' | 'SAVED';\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\n/** A filter metadata type. The filter forces an 'and' logic between all of its comprising parts. */\nexport interface SiteStructureRequestFilter {\n /** In accordance to SiteStructureItem.item_type_identifier */\n itemTypeIdentifier?: string;\n /** In accordance to SiteStructureItem.source_id */\n sourceId?: string;\n /** In accordance to SiteStructureItem.config_id */\n configId?: string;\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 LanguageMetadata {\n /**\n * 2 chars language code (e.g. 'en')\n * @format LANGUAGE\n */\n code?: string;\n /**\n * 4 chars language tag (e.g. 'en-us')\n * @format LANGUAGE_TAG\n */\n tag?: string | null;\n}\n\nexport interface SiteStructureResponse {\n /** The total number of items to be returned, combining all paginated responses. */\n totalResults?: number;\n /** A cursor based paging response metadata, including the item count in the current page and a cursor string to be used for querying of the next page. */\n pageData?: CursorPagingMetaData;\n /** A list of all the result items. */\n results?: SiteStructureItem[];\n /** A list of errors that occurred during the fetch process (if any). */\n errors?: SiteStructureFetchError[];\n}\n\nexport interface CursorPagingMetaData {\n /** The item count in the current page */\n count?: number | null;\n /** The cursor which will be used to query the next page */\n cursor?: string | null;\n}\n\nexport interface SiteStructureFetchError\n extends SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n /**\n * Error message\n * @minLength 1\n * @maxLength 1000\n */\n errorMessage?: string;\n /**\n * if the fetch happened while fetching links from a TPA, this will hold the TPA appDefId\n * @readonly\n * @format GUID\n */\n appId?: string | null;\n}\n\n/** @oneof */\nexport interface SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n}\n\nexport interface GetSiteStructureMetadataRequest {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n\nexport interface GetSiteStructureMetadataResponse {\n /** A list of pages types */\n pageTypes?: SitePageType[];\n}\n\nexport interface SitePageType {\n /** Type identifier */\n itemTypeIdentifier?: string;\n /** Site's page-type sourceId */\n sourceId?: string;\n /** Site's page-type configId */\n configId?: string;\n}\n\nexport interface GetSiteStructureChunksRequest {\n /** @maxLength 8192 */\n siteUrl?: string | null;\n languageMetadata?: LanguageMetadata;\n /** The size of the chunk to split all the entries into. */\n chunkSize?: number;\n pageVersion?: PageSegmentWithLiterals;\n /** @maxLength 255 */\n itemTypeIdentifier?: string | null;\n /** @maxLength 36 */\n sourceId?: string;\n /** @maxLength 2048 */\n configId?: string;\n /** @maxLength 255 */\n pageIdentifier?: string | null;\n}\n\nexport interface GetSiteStructureChunksResponse {\n chunks?: ChunkMetadata[];\n}\n\nexport interface ChunkMetadata {\n /**\n * Chunk ID used in subsequent GetSiteMapChunk request\n * @maxLength 255\n */\n _id?: string;\n /** The most recent date when any of the items in a chunk was updated */\n _updatedDate?: Date | null;\n}\n\nexport interface GetSiteStructureChunkRequest {\n /** @maxLength 8192 */\n siteUrl?: string | null;\n /**\n * Chunk ID previously returned in ChunkMetadata\n * @maxLength 127\n */\n chunkId?: string;\n languageMetadata?: LanguageMetadata;\n /** Chunk size. It will match the chunk size used in GetSiteMapChunksRequest. */\n chunkSize?: number | null;\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n /** @maxLength 255 */\n itemTypeIdentifier?: string | null;\n /** @maxLength 36 */\n sourceId?: string;\n /** @maxLength 2048 */\n configId?: string;\n /** @maxLength 255 */\n pageIdentifier?: string | null;\n}\n\nexport interface GetSiteStructureChunkResponse {\n /** @maxSize 10000 */\n chunk?: SiteStructureItem[];\n}\n\n/**\n * Get Site's structure\n * @public\n * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructure\n */\nexport async function getSiteStructure(\n options?: GetSiteStructureOptions\n): Promise<\n NonNullablePaths<\n SiteStructureResponse,\n | `totalResults`\n | `results`\n | `results.${number}.itemId`\n | `results.${number}.itemTypeIdentifier`\n | `results.${number}.sourceId`\n | `results.${number}.configId`\n | `results.${number}.translationId`\n | `errors`\n | `errors.${number}.itemTypeId`\n | `errors.${number}.routerPrefix`\n | `errors.${number}.errorMessage`,\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 pageVersion: options?.pageVersion,\n paging: options?.paging,\n filter: options?.filter,\n sorting: options?.sorting,\n fieldSet: options?.fieldSet,\n languageMetadata: options?.languageMetadata,\n branchId: options?.branchId,\n });\n\n const reqOpts =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructure(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTImageToSDKImage,\n paths: [\n { path: 'results.image', isRepeated: true },\n { path: 'results.media.image' },\n ],\n },\n {\n transformFn: transformRESTVideoV2ToSDKVideoV2,\n paths: [{ path: 'results.video', isRepeated: true }],\n },\n {\n transformFn: transformRESTVideoToSDKVideo,\n paths: [{ path: 'results.media.video' }],\n },\n {\n transformFn: transformRESTDocumentToSDKDocument,\n paths: [{ path: 'results.media.document' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pageVersion: '$[0].pageVersion',\n paging: '$[0].paging',\n filter: '$[0].filter',\n sorting: '$[0].sorting',\n fieldSet: '$[0].fieldSet',\n languageMetadata: '$[0].languageMetadata',\n branchId: '$[0].branchId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteStructureOptions {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\n/**\n * Get Site's structure meta-data\n * @public\n * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata\n */\nexport async function getSiteStructureMetadata(\n options?: GetSiteStructureMetadataOptions\n): Promise<\n NonNullablePaths<\n GetSiteStructureMetadataResponse,\n | `pageTypes`\n | `pageTypes.${number}.itemTypeIdentifier`\n | `pageTypes.${number}.sourceId`\n | `pageTypes.${number}.configId`,\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 pageVersion: options?.pageVersion,\n });\n\n const reqOpts =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructureMetadata(\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: { pageVersion: '$[0].pageVersion' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetSiteStructureMetadataOptions {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveComWixpressStructureApiSiteStructureServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/site-structure-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_viewer_site-structure-service';\n\n/** Get Site's structure */\nexport function getSiteStructure(payload: object): RequestOptionsFactory<any> {\n function __getSiteStructure({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructure',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.updatedDate' },\n { path: 'results.media.image.urlExpirationDate' },\n { path: 'results.media.video.thumbnail.urlExpirationDate' },\n { path: 'results.media.document.urlExpirationDate' },\n { path: 'results.media.document.thumbnail.urlExpirationDate' },\n { path: 'results.image.urlExpirationDate' },\n { path: 'results.video.urlExpirationDate' },\n { path: 'results.video.resolutions.urlExpirationDate' },\n { path: 'results.video.resolutions.poster.urlExpirationDate' },\n { path: 'results.video.posters.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.media.image.focalPoint.x' },\n { path: 'results.media.image.focalPoint.y' },\n { path: 'results.media.video.thumbnail.focalPoint.x' },\n { path: 'results.media.video.thumbnail.focalPoint.y' },\n { path: 'results.media.document.thumbnail.focalPoint.x' },\n { path: 'results.media.document.thumbnail.focalPoint.y' },\n { path: 'results.image.focalPoint.x' },\n { path: 'results.image.focalPoint.y' },\n { path: 'results.video.resolutions.poster.focalPoint.x' },\n { path: 'results.video.resolutions.poster.focalPoint.y' },\n { path: 'results.video.posters.focalPoint.x' },\n { path: 'results.video.posters.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteStructure;\n}\n\n/** Get Site's structure meta-data */\nexport function getSiteStructureMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteStructureMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure-metadata',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getSiteStructureMetadata;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,sDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE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,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,aAAa,mBAAmB;AAAA,QAC5D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getSiteStructure","getSiteStructureMetadata","payload","import_transform_paths","PageSegment","SortOrder","getSiteStructure","sdkTransformError","getSiteStructureMetadata"]}
@@ -359,6 +359,64 @@ interface SitePageType {
359
359
  /** Site's page-type configId */
360
360
  configId?: string;
361
361
  }
362
+ interface GetSiteStructureChunksRequest {
363
+ /** @maxLength 8192 */
364
+ siteUrl?: string | null;
365
+ languageMetadata?: LanguageMetadata;
366
+ /** The size of the chunk to split all the entries into. */
367
+ chunkSize?: number;
368
+ pageVersion?: PageSegmentWithLiterals;
369
+ /** @maxLength 255 */
370
+ itemTypeIdentifier?: string | null;
371
+ /** @maxLength 36 */
372
+ sourceId?: string;
373
+ /** @maxLength 2048 */
374
+ configId?: string;
375
+ /** @maxLength 255 */
376
+ pageIdentifier?: string | null;
377
+ }
378
+ interface GetSiteStructureChunksResponse {
379
+ chunks?: ChunkMetadata[];
380
+ }
381
+ interface ChunkMetadata {
382
+ /**
383
+ * Chunk ID used in subsequent GetSiteMapChunk request
384
+ * @maxLength 255
385
+ */
386
+ id?: string;
387
+ /** The most recent date when any of the items in a chunk was updated */
388
+ updatedDate?: Date | null;
389
+ }
390
+ interface GetSiteStructureChunkRequest {
391
+ /** @maxLength 8192 */
392
+ siteUrl?: string | null;
393
+ /**
394
+ * Chunk ID previously returned in ChunkMetadata
395
+ * @maxLength 127
396
+ */
397
+ chunkId?: string;
398
+ languageMetadata?: LanguageMetadata;
399
+ /** Chunk size. It will match the chunk size used in GetSiteMapChunksRequest. */
400
+ chunkSize?: number | null;
401
+ pageVersion?: PageSegmentWithLiterals;
402
+ /**
403
+ * Used to identify the branch of the site for which the structure is requested.
404
+ * @format GUID
405
+ */
406
+ branchId?: string | null;
407
+ /** @maxLength 255 */
408
+ itemTypeIdentifier?: string | null;
409
+ /** @maxLength 36 */
410
+ sourceId?: string;
411
+ /** @maxLength 2048 */
412
+ configId?: string;
413
+ /** @maxLength 255 */
414
+ pageIdentifier?: string | null;
415
+ }
416
+ interface GetSiteStructureChunkResponse {
417
+ /** @maxSize 10000 */
418
+ chunk?: SiteStructureItem[];
419
+ }
362
420
 
363
421
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
364
422
  getUrl: (context: any) => string;
@@ -373,4 +431,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
373
431
  declare function getSiteStructure(): __PublicMethodMetaInfo<'POST', {}, SiteStructureRequest$1, SiteStructureRequest, SiteStructureResponse$1, SiteStructureResponse>;
374
432
  declare function getSiteStructureMetadata(): __PublicMethodMetaInfo<'POST', {}, GetSiteStructureMetadataRequest$1, GetSiteStructureMetadataRequest, GetSiteStructureMetadataResponse$1, GetSiteStructureMetadataResponse>;
375
433
 
376
- export { type CursorPagingMetaData as CursorPagingMetaDataOriginal, type CursorPaging as CursorPagingOriginal, type Document as DocumentOriginal, type FocalPoint as FocalPointOriginal, type GetSiteStructureMetadataRequest as GetSiteStructureMetadataRequestOriginal, type GetSiteStructureMetadataResponse as GetSiteStructureMetadataResponseOriginal, type Image as ImageOriginal, type LanguageMetadata as LanguageMetadataOriginal, type MediaItemMediaOneOf as MediaItemMediaOneOfOriginal, type MediaItem as MediaItemOriginal, PageSegment as PageSegmentOriginal, type PageSegmentWithLiterals as PageSegmentWithLiteralsOriginal, type SitePageType as SitePageTypeOriginal, type SiteStructureFetchErrorItemTypeOneOf as SiteStructureFetchErrorItemTypeOneOfOriginal, type SiteStructureFetchError as SiteStructureFetchErrorOriginal, type SiteStructureItem as SiteStructureItemOriginal, type SiteStructureRequestFilter as SiteStructureRequestFilterOriginal, type SiteStructureRequest as SiteStructureRequestOriginal, type SiteStructureResponse as SiteStructureResponseOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type Video as VideoOriginal, type VideoResolution as VideoResolutionOriginal, type VideoV2 as VideoV2Original, type __PublicMethodMetaInfo, getSiteStructure, getSiteStructureMetadata };
434
+ export { type ChunkMetadata as ChunkMetadataOriginal, type CursorPagingMetaData as CursorPagingMetaDataOriginal, type CursorPaging as CursorPagingOriginal, type Document as DocumentOriginal, type FocalPoint as FocalPointOriginal, type GetSiteStructureChunkRequest as GetSiteStructureChunkRequestOriginal, type GetSiteStructureChunkResponse as GetSiteStructureChunkResponseOriginal, type GetSiteStructureChunksRequest as GetSiteStructureChunksRequestOriginal, type GetSiteStructureChunksResponse as GetSiteStructureChunksResponseOriginal, type GetSiteStructureMetadataRequest as GetSiteStructureMetadataRequestOriginal, type GetSiteStructureMetadataResponse as GetSiteStructureMetadataResponseOriginal, type Image as ImageOriginal, type LanguageMetadata as LanguageMetadataOriginal, type MediaItemMediaOneOf as MediaItemMediaOneOfOriginal, type MediaItem as MediaItemOriginal, PageSegment as PageSegmentOriginal, type PageSegmentWithLiterals as PageSegmentWithLiteralsOriginal, type SitePageType as SitePageTypeOriginal, type SiteStructureFetchErrorItemTypeOneOf as SiteStructureFetchErrorItemTypeOneOfOriginal, type SiteStructureFetchError as SiteStructureFetchErrorOriginal, type SiteStructureItem as SiteStructureItemOriginal, type SiteStructureRequestFilter as SiteStructureRequestFilterOriginal, type SiteStructureRequest as SiteStructureRequestOriginal, type SiteStructureResponse as SiteStructureResponseOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type Video as VideoOriginal, type VideoResolution as VideoResolutionOriginal, type VideoV2 as VideoV2Original, type __PublicMethodMetaInfo, getSiteStructure, getSiteStructureMetadata };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.http.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.types.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.meta.ts"],"sourcesContent":["export * from './src/viewer-structure-v1-site-structure-item-site-structure-service.meta.js';\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveComWixpressStructureApiSiteStructureServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/site-structure-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_viewer_site-structure-service';\n\n/** Get Site's structure */\nexport function getSiteStructure(payload: object): RequestOptionsFactory<any> {\n function __getSiteStructure({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructure',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.updatedDate' },\n { path: 'results.media.image.urlExpirationDate' },\n { path: 'results.media.video.thumbnail.urlExpirationDate' },\n { path: 'results.media.document.urlExpirationDate' },\n { path: 'results.media.document.thumbnail.urlExpirationDate' },\n { path: 'results.image.urlExpirationDate' },\n { path: 'results.video.urlExpirationDate' },\n { path: 'results.video.resolutions.urlExpirationDate' },\n { path: 'results.video.resolutions.poster.urlExpirationDate' },\n { path: 'results.video.posters.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.media.image.focalPoint.x' },\n { path: 'results.media.image.focalPoint.y' },\n { path: 'results.media.video.thumbnail.focalPoint.x' },\n { path: 'results.media.video.thumbnail.focalPoint.y' },\n { path: 'results.media.document.thumbnail.focalPoint.x' },\n { path: 'results.media.document.thumbnail.focalPoint.y' },\n { path: 'results.image.focalPoint.x' },\n { path: 'results.image.focalPoint.y' },\n { path: 'results.video.resolutions.poster.focalPoint.x' },\n { path: 'results.video.resolutions.poster.focalPoint.y' },\n { path: 'results.video.posters.focalPoint.x' },\n { path: 'results.video.posters.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteStructure;\n}\n\n/** Get Site's structure meta-data */\nexport function getSiteStructureMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteStructureMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure-metadata',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getSiteStructureMetadata;\n}\n","export interface SiteStructureItem {\n /**\n * The end goal: this field should contain a unique identifier for this site-structure item.\\\n * Currently it contains:\n * - For site-structure integrated TPAs - the unique identifier provided by the TPA.\n * - For all other item types - empty string.\n */\n itemId?: string;\n /**\n * An identifier for the type of the item. One of:\n * - For the site's static pages - \"static_page\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the item type identifier provided by the TPA. Commonly one of that TPA's supported sub-pages.\n * - For items that are the result of a dynamic router - \"dynamic-page\".\n */\n itemTypeIdentifier?: string;\n /**\n * An identifier for the source of the item. One of:\n * - For the site's static pages - \"editor\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the TPA's app-def-id.\n * - For items that are the result of a dynamic router - Wix-Code's app-def-id: '675bbcef-18d8-41f5-800e-131ec9e08762'.\n */\n sourceId?: string;\n /**\n * An identifier for the configuration of the item. Used currently as some sort of a placeholder for further filtering.\n * - For items of type \"dynamic-page\" - The 'prefix' field that is part of the router-config object of the router that is related to this item (see WixCodeDynamicRouterResolver).\n * - For all other items types - empty string.\n */\n configId?: string;\n /**\n * A human readable name string associated with the item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'name' field provided by the TPA for that item.\\\n * This field is not guaranteed to be unique across the item list.\n */\n name?: string | null;\n /**\n * Deprecated. Previously used for media content that is associated with an item.\\\n * See 'image' and 'video' fields of this message.\n * @deprecated\n */\n media?: MediaItem[];\n /** A relative url path that can be used, with the site's base-url, to reach the page represented by this item. */\n path?: string | null;\n /**\n * A timestamp representing the moment that this item was last changed.\n * - For static pages - the site's last publish time.\n * - For all kinds of TPAs - the last-modified field in the respective response item from the TPA.\n * - For items that are the result of a dynamic router - the content of the 'lastModified' optional field in the response item from Wix-Code's RPC endpoint, or, if missing, the site's last publish time. (see WixCodeDynamicRouterResolver).\n */\n updatedDate?: Date | null;\n /**\n * A value indicating whether the item is inactive or not. E.g. hidden product/finished event etc.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'inactive' field provided by the TPA for that item.\n */\n inactive?: boolean | null;\n /**\n * A general free schema field to include further metadata related to this item.\\\n * Currently exists only for:\\\n * Static pages - a JSON that is the merge of:\n * 1. The advancedSeoData JSON string that exists for the page in the master-page.\n * 2. A JSON of the form:\n * ```javascript\n * {\n * \"seo_legacy\": {\n * \"hidden_from_seo\": true / false\n * },\n * \"password_protected\": true / false\n * }\n * ```\n * New TPA site-structure integration items - the 'metadata' field provided by the TPA for that item.\n */\n metadata?: Record<string, any> | null;\n /**\n * An image media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'image' field provided by the TPA for that item.\n */\n image?: Image[];\n /**\n * A video media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'video' field provided by the TPA for that item.\n */\n video?: VideoV2[];\n /** A value indicating whether the item is protected or not, by password or login. */\n protected?: boolean | null;\n /**\n * ID of the translations of the item. As same item can have multiple instances, one for each language, we can match them by this ID.\\\n * For example:\n * Blog has one post, translated to 2 languages (EN, FR):\n * - EN item path is `/amazing-post`\n * - FR item path is `/poste-incroyable\n * Both of them might have different `item_id`, but will share the same `translation_id`, to be easily match together\n * Currently only relevant for Blog\n */\n translationId?: string;\n /** A value indicating whether the item is a custom error page or not. */\n isCustomErrorPage?: boolean | null;\n}\n\n/** Deprecated - Copy this message into your service, do not reference it */\nexport interface MediaItem extends MediaItemMediaOneOf {\n /** WixMedia image */\n image?: Image;\n /** WixMedia video */\n video?: Video;\n /** WixMedia document */\n document?: Document;\n}\n\n/** @oneof */\nexport interface MediaItemMediaOneOf {\n /** WixMedia image */\n image?: Image;\n /** WixMedia video */\n video?: Video;\n /** WixMedia document */\n document?: Document;\n}\n\nexport interface Image {\n /** WixMedia image ID. */\n id?: string;\n /** Image URL. */\n url?: string;\n /**\n * Original image height.\n * @readonly\n */\n height?: number;\n /**\n * Original image width.\n * @readonly\n */\n width?: number;\n /** Image alt text. */\n altText?: string | null;\n /**\n * Image filename.\n * @readonly\n */\n filename?: string | null;\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\n/** Deprecated - use VideoV2 */\nexport interface Video {\n /** WixMedia ID */\n id?: string;\n /** URL of video */\n url?: string;\n /**\n * Original image height\n * @readonly\n */\n height?: number;\n /**\n * Original image width\n * @readonly\n */\n width?: number;\n /** Video poster */\n thumbnail?: Image;\n}\n\nexport interface Document {\n /** WixMedia ID. */\n id?: string;\n /** Document URL. */\n url?: string;\n /** Document filename. */\n filename?: string | null;\n}\n\nexport interface VideoV2 {\n /** WixMedia ID. */\n id?: string;\n /**\n * Available resolutions for the video, starting with the optimal resolution.\n * @readonly\n * @maxSize 100\n */\n resolutions?: VideoResolution[];\n /**\n * Video filename.\n * @readonly\n */\n filename?: string | null;\n}\n\nexport interface VideoResolution {\n /** Video URL. */\n url?: string;\n /** Video height. */\n height?: number;\n /** Video width. */\n width?: number;\n /** Video format for example, mp4, hls. */\n format?: string;\n}\n\nexport interface SiteStructureRequest {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport enum PageSegment {\n PUBLISHED = 'PUBLISHED',\n SAVED = 'SAVED',\n}\n\n/** @enumType */\nexport type PageSegmentWithLiterals = PageSegment | 'PUBLISHED' | 'SAVED';\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\n/** A filter metadata type. The filter forces an 'and' logic between all of its comprising parts. */\nexport interface SiteStructureRequestFilter {\n /** In accordance to SiteStructureItem.item_type_identifier */\n itemTypeIdentifier?: string;\n /** In accordance to SiteStructureItem.source_id */\n sourceId?: string;\n /** In accordance to SiteStructureItem.config_id */\n configId?: string;\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 LanguageMetadata {\n /**\n * 2 chars language code (e.g. 'en')\n * @format LANGUAGE\n */\n code?: string;\n /**\n * 4 chars language tag (e.g. 'en-us')\n * @format LANGUAGE_TAG\n */\n tag?: string | null;\n}\n\nexport interface SiteStructureResponse {\n /** The total number of items to be returned, combining all paginated responses. */\n totalResults?: number;\n /** A cursor based paging response metadata, including the item count in the current page and a cursor string to be used for querying of the next page. */\n pageData?: CursorPagingMetaData;\n /** A list of all the result items. */\n results?: SiteStructureItem[];\n /** A list of errors that occurred during the fetch process (if any). */\n errors?: SiteStructureFetchError[];\n}\n\nexport interface CursorPagingMetaData {\n /** The item count in the current page */\n count?: number | null;\n /** The cursor which will be used to query the next page */\n cursor?: string | null;\n}\n\nexport interface SiteStructureFetchError\n extends SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n /**\n * Error message\n * @minLength 1\n * @maxLength 1000\n */\n errorMessage?: string;\n /**\n * if the fetch happened while fetching links from a TPA, this will hold the TPA appDefId\n * @readonly\n * @format GUID\n */\n appId?: string | null;\n}\n\n/** @oneof */\nexport interface SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n}\n\nexport interface GetSiteStructureMetadataRequest {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n\nexport interface GetSiteStructureMetadataResponse {\n /** A list of pages types */\n pageTypes?: SitePageType[];\n}\n\nexport interface SitePageType {\n /** Type identifier */\n itemTypeIdentifier?: string;\n /** Site's page-type sourceId */\n sourceId?: string;\n /** Site's page-type configId */\n configId?: string;\n}\n","import * as ambassadorWixViewerStructureV1SiteStructureItem from './viewer-structure-v1-site-structure-item-site-structure-service.http.js';\nimport * as ambassadorWixViewerStructureV1SiteStructureItemTypes from './viewer-structure-v1-site-structure-item-site-structure-service.types.js';\nimport * as ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getSiteStructure(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes.SiteStructureRequest,\n ambassadorWixViewerStructureV1SiteStructureItemTypes.SiteStructureRequest,\n ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes.SiteStructureResponse,\n ambassadorWixViewerStructureV1SiteStructureItemTypes.SiteStructureResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructure(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/site-structure',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getSiteStructureMetadata(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes.GetSiteStructureMetadataRequest,\n ambassadorWixViewerStructureV1SiteStructureItemTypes.GetSiteStructureMetadataRequest,\n ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes.GetSiteStructureMetadataResponse,\n ambassadorWixViewerStructureV1SiteStructureItemTypes.GetSiteStructureMetadataResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructureMetadata(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/site-structure-metadata',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n SiteStructureItem as SiteStructureItemOriginal,\n MediaItem as MediaItemOriginal,\n MediaItemMediaOneOf as MediaItemMediaOneOfOriginal,\n Image as ImageOriginal,\n FocalPoint as FocalPointOriginal,\n Video as VideoOriginal,\n Document as DocumentOriginal,\n VideoV2 as VideoV2Original,\n VideoResolution as VideoResolutionOriginal,\n SiteStructureRequest as SiteStructureRequestOriginal,\n PageSegment as PageSegmentOriginal,\n PageSegmentWithLiterals as PageSegmentWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n SiteStructureRequestFilter as SiteStructureRequestFilterOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n LanguageMetadata as LanguageMetadataOriginal,\n SiteStructureResponse as SiteStructureResponseOriginal,\n CursorPagingMetaData as CursorPagingMetaDataOriginal,\n SiteStructureFetchError as SiteStructureFetchErrorOriginal,\n SiteStructureFetchErrorItemTypeOneOf as SiteStructureFetchErrorItemTypeOneOfOriginal,\n GetSiteStructureMetadataRequest as GetSiteStructureMetadataRequestOriginal,\n GetSiteStructureMetadataResponse as GetSiteStructureMetadataResponseOriginal,\n SitePageType as SitePageTypeOriginal,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,sDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;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SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getSiteStructure","getSiteStructureMetadata","payload","PageSegment","SortOrder","getSiteStructure","getSiteStructureMetadata"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.http.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.types.ts","../../src/viewer-structure-v1-site-structure-item-site-structure-service.meta.ts"],"sourcesContent":["export * from './src/viewer-structure-v1-site-structure-item-site-structure-service.meta.js';\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveComWixpressStructureApiSiteStructureServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'editor._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/site-structure-server',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/site-structure-server',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_viewer_site-structure-service';\n\n/** Get Site's structure */\nexport function getSiteStructure(payload: object): RequestOptionsFactory<any> {\n function __getSiteStructure({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructure',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.updatedDate' },\n { path: 'results.media.image.urlExpirationDate' },\n { path: 'results.media.video.thumbnail.urlExpirationDate' },\n { path: 'results.media.document.urlExpirationDate' },\n { path: 'results.media.document.thumbnail.urlExpirationDate' },\n { path: 'results.image.urlExpirationDate' },\n { path: 'results.video.urlExpirationDate' },\n { path: 'results.video.resolutions.urlExpirationDate' },\n { path: 'results.video.resolutions.poster.urlExpirationDate' },\n { path: 'results.video.posters.urlExpirationDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.media.image.focalPoint.x' },\n { path: 'results.media.image.focalPoint.y' },\n { path: 'results.media.video.thumbnail.focalPoint.x' },\n { path: 'results.media.video.thumbnail.focalPoint.y' },\n { path: 'results.media.document.thumbnail.focalPoint.x' },\n { path: 'results.media.document.thumbnail.focalPoint.y' },\n { path: 'results.image.focalPoint.x' },\n { path: 'results.image.focalPoint.y' },\n { path: 'results.video.resolutions.poster.focalPoint.x' },\n { path: 'results.video.resolutions.poster.focalPoint.y' },\n { path: 'results.video.posters.focalPoint.x' },\n { path: 'results.video.posters.focalPoint.y' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getSiteStructure;\n}\n\n/** Get Site's structure meta-data */\nexport function getSiteStructureMetadata(\n payload: object\n): RequestOptionsFactory<any> {\n function __getSiteStructureMetadata({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.viewer.structure.v1.site_structure_item',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressStructureApiSiteStructureServiceUrl({\n protoPath: '/v1/site-structure-metadata',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getSiteStructureMetadata;\n}\n","export interface SiteStructureItem {\n /**\n * The end goal: this field should contain a unique identifier for this site-structure item.\\\n * Currently it contains:\n * - For site-structure integrated TPAs - the unique identifier provided by the TPA.\n * - For all other item types - empty string.\n */\n itemId?: string;\n /**\n * An identifier for the type of the item. One of:\n * - For the site's static pages - \"static_page\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the item type identifier provided by the TPA. Commonly one of that TPA's supported sub-pages.\n * - For items that are the result of a dynamic router - \"dynamic-page\".\n */\n itemTypeIdentifier?: string;\n /**\n * An identifier for the source of the item. One of:\n * - For the site's static pages - \"editor\".\n * - For legacy integration TPAs - the TPA's app-def-id.\n * - For TPAs with new site-structure integration - the TPA's app-def-id.\n * - For items that are the result of a dynamic router - Wix-Code's app-def-id: '675bbcef-18d8-41f5-800e-131ec9e08762'.\n */\n sourceId?: string;\n /**\n * An identifier for the configuration of the item. Used currently as some sort of a placeholder for further filtering.\n * - For items of type \"dynamic-page\" - The 'prefix' field that is part of the router-config object of the router that is related to this item (see WixCodeDynamicRouterResolver).\n * - For all other items types - empty string.\n */\n configId?: string;\n /**\n * A human readable name string associated with the item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'name' field provided by the TPA for that item.\\\n * This field is not guaranteed to be unique across the item list.\n */\n name?: string | null;\n /**\n * Deprecated. Previously used for media content that is associated with an item.\\\n * See 'image' and 'video' fields of this message.\n * @deprecated\n */\n media?: MediaItem[];\n /** A relative url path that can be used, with the site's base-url, to reach the page represented by this item. */\n path?: string | null;\n /**\n * A timestamp representing the moment that this item was last changed.\n * - For static pages - the site's last publish time.\n * - For all kinds of TPAs - the last-modified field in the respective response item from the TPA.\n * - For items that are the result of a dynamic router - the content of the 'lastModified' optional field in the response item from Wix-Code's RPC endpoint, or, if missing, the site's last publish time. (see WixCodeDynamicRouterResolver).\n */\n updatedDate?: Date | null;\n /**\n * A value indicating whether the item is inactive or not. E.g. hidden product/finished event etc.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'inactive' field provided by the TPA for that item.\n */\n inactive?: boolean | null;\n /**\n * A general free schema field to include further metadata related to this item.\\\n * Currently exists only for:\\\n * Static pages - a JSON that is the merge of:\n * 1. The advancedSeoData JSON string that exists for the page in the master-page.\n * 2. A JSON of the form:\n * ```javascript\n * {\n * \"seo_legacy\": {\n * \"hidden_from_seo\": true / false\n * },\n * \"password_protected\": true / false\n * }\n * ```\n * New TPA site-structure integration items - the 'metadata' field provided by the TPA for that item.\n */\n metadata?: Record<string, any> | null;\n /**\n * An image media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'image' field provided by the TPA for that item.\n */\n image?: Image[];\n /**\n * A video media metadata the is related to this item.\\\n * Currently exists only for new TPA site-structure integration items, and contains the 'video' field provided by the TPA for that item.\n */\n video?: VideoV2[];\n /** A value indicating whether the item is protected or not, by password or login. */\n protected?: boolean | null;\n /**\n * ID of the translations of the item. As same item can have multiple instances, one for each language, we can match them by this ID.\\\n * For example:\n * Blog has one post, translated to 2 languages (EN, FR):\n * - EN item path is `/amazing-post`\n * - FR item path is `/poste-incroyable\n * Both of them might have different `item_id`, but will share the same `translation_id`, to be easily match together\n * Currently only relevant for Blog\n */\n translationId?: string;\n /** A value indicating whether the item is a custom error page or not. */\n isCustomErrorPage?: boolean | null;\n}\n\n/** Deprecated - Copy this message into your service, do not reference it */\nexport interface MediaItem extends MediaItemMediaOneOf {\n /** WixMedia image */\n image?: Image;\n /** WixMedia video */\n video?: Video;\n /** WixMedia document */\n document?: Document;\n}\n\n/** @oneof */\nexport interface MediaItemMediaOneOf {\n /** WixMedia image */\n image?: Image;\n /** WixMedia video */\n video?: Video;\n /** WixMedia document */\n document?: Document;\n}\n\nexport interface Image {\n /** WixMedia image ID. */\n id?: string;\n /** Image URL. */\n url?: string;\n /**\n * Original image height.\n * @readonly\n */\n height?: number;\n /**\n * Original image width.\n * @readonly\n */\n width?: number;\n /** Image alt text. */\n altText?: string | null;\n /**\n * Image filename.\n * @readonly\n */\n filename?: string | null;\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\n/** Deprecated - use VideoV2 */\nexport interface Video {\n /** WixMedia ID */\n id?: string;\n /** URL of video */\n url?: string;\n /**\n * Original image height\n * @readonly\n */\n height?: number;\n /**\n * Original image width\n * @readonly\n */\n width?: number;\n /** Video poster */\n thumbnail?: Image;\n}\n\nexport interface Document {\n /** WixMedia ID. */\n id?: string;\n /** Document URL. */\n url?: string;\n /** Document filename. */\n filename?: string | null;\n}\n\nexport interface VideoV2 {\n /** WixMedia ID. */\n id?: string;\n /**\n * Available resolutions for the video, starting with the optimal resolution.\n * @readonly\n * @maxSize 100\n */\n resolutions?: VideoResolution[];\n /**\n * Video filename.\n * @readonly\n */\n filename?: string | null;\n}\n\nexport interface VideoResolution {\n /** Video URL. */\n url?: string;\n /** Video height. */\n height?: number;\n /** Video width. */\n width?: number;\n /** Video format for example, mp4, hls. */\n format?: string;\n}\n\nexport interface SiteStructureRequest {\n /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Pagination request metadata, currently applicable for:\\\n * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService)\n * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService)\n */\n paging?: CursorPaging;\n /** Filtering metadata. Only items allowed by the filter will be returned. */\n filter?: SiteStructureRequestFilter;\n /** General sorting metadata. Currently not supported. */\n sorting?: Sorting;\n /** General field mask metadata. Currently not supported. */\n fieldSet?: string[];\n /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */\n languageMetadata?: LanguageMetadata;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n}\n\nexport enum PageSegment {\n PUBLISHED = 'PUBLISHED',\n SAVED = 'SAVED',\n}\n\n/** @enumType */\nexport type PageSegmentWithLiterals = PageSegment | 'PUBLISHED' | 'SAVED';\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\n/** A filter metadata type. The filter forces an 'and' logic between all of its comprising parts. */\nexport interface SiteStructureRequestFilter {\n /** In accordance to SiteStructureItem.item_type_identifier */\n itemTypeIdentifier?: string;\n /** In accordance to SiteStructureItem.source_id */\n sourceId?: string;\n /** In accordance to SiteStructureItem.config_id */\n configId?: string;\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 LanguageMetadata {\n /**\n * 2 chars language code (e.g. 'en')\n * @format LANGUAGE\n */\n code?: string;\n /**\n * 4 chars language tag (e.g. 'en-us')\n * @format LANGUAGE_TAG\n */\n tag?: string | null;\n}\n\nexport interface SiteStructureResponse {\n /** The total number of items to be returned, combining all paginated responses. */\n totalResults?: number;\n /** A cursor based paging response metadata, including the item count in the current page and a cursor string to be used for querying of the next page. */\n pageData?: CursorPagingMetaData;\n /** A list of all the result items. */\n results?: SiteStructureItem[];\n /** A list of errors that occurred during the fetch process (if any). */\n errors?: SiteStructureFetchError[];\n}\n\nexport interface CursorPagingMetaData {\n /** The item count in the current page */\n count?: number | null;\n /** The cursor which will be used to query the next page */\n cursor?: string | null;\n}\n\nexport interface SiteStructureFetchError\n extends SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n /**\n * Error message\n * @minLength 1\n * @maxLength 1000\n */\n errorMessage?: string;\n /**\n * if the fetch happened while fetching links from a TPA, this will hold the TPA appDefId\n * @readonly\n * @format GUID\n */\n appId?: string | null;\n}\n\n/** @oneof */\nexport interface SiteStructureFetchErrorItemTypeOneOf {\n /**\n * item type id of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n itemTypeId?: string;\n /**\n * for dynamic pages: router prefix of the failed fetch\n * @readonly\n * @minLength 1\n * @maxLength 200\n */\n routerPrefix?: string;\n}\n\nexport interface GetSiteStructureMetadataRequest {\n /** Page's version */\n pageVersion?: PageSegmentWithLiterals;\n}\n\nexport interface GetSiteStructureMetadataResponse {\n /** A list of pages types */\n pageTypes?: SitePageType[];\n}\n\nexport interface SitePageType {\n /** Type identifier */\n itemTypeIdentifier?: string;\n /** Site's page-type sourceId */\n sourceId?: string;\n /** Site's page-type configId */\n configId?: string;\n}\n\nexport interface GetSiteStructureChunksRequest {\n /** @maxLength 8192 */\n siteUrl?: string | null;\n languageMetadata?: LanguageMetadata;\n /** The size of the chunk to split all the entries into. */\n chunkSize?: number;\n pageVersion?: PageSegmentWithLiterals;\n /** @maxLength 255 */\n itemTypeIdentifier?: string | null;\n /** @maxLength 36 */\n sourceId?: string;\n /** @maxLength 2048 */\n configId?: string;\n /** @maxLength 255 */\n pageIdentifier?: string | null;\n}\n\nexport interface GetSiteStructureChunksResponse {\n chunks?: ChunkMetadata[];\n}\n\nexport interface ChunkMetadata {\n /**\n * Chunk ID used in subsequent GetSiteMapChunk request\n * @maxLength 255\n */\n id?: string;\n /** The most recent date when any of the items in a chunk was updated */\n updatedDate?: Date | null;\n}\n\nexport interface GetSiteStructureChunkRequest {\n /** @maxLength 8192 */\n siteUrl?: string | null;\n /**\n * Chunk ID previously returned in ChunkMetadata\n * @maxLength 127\n */\n chunkId?: string;\n languageMetadata?: LanguageMetadata;\n /** Chunk size. It will match the chunk size used in GetSiteMapChunksRequest. */\n chunkSize?: number | null;\n pageVersion?: PageSegmentWithLiterals;\n /**\n * Used to identify the branch of the site for which the structure is requested.\n * @format GUID\n */\n branchId?: string | null;\n /** @maxLength 255 */\n itemTypeIdentifier?: string | null;\n /** @maxLength 36 */\n sourceId?: string;\n /** @maxLength 2048 */\n configId?: string;\n /** @maxLength 255 */\n pageIdentifier?: string | null;\n}\n\nexport interface GetSiteStructureChunkResponse {\n /** @maxSize 10000 */\n chunk?: SiteStructureItem[];\n}\n","import * as ambassadorWixViewerStructureV1SiteStructureItem from './viewer-structure-v1-site-structure-item-site-structure-service.http.js';\nimport * as ambassadorWixViewerStructureV1SiteStructureItemTypes from './viewer-structure-v1-site-structure-item-site-structure-service.types.js';\nimport * as ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes from './viewer-structure-v1-site-structure-item-site-structure-service.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function getSiteStructure(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes.SiteStructureRequest,\n ambassadorWixViewerStructureV1SiteStructureItemTypes.SiteStructureRequest,\n ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes.SiteStructureResponse,\n ambassadorWixViewerStructureV1SiteStructureItemTypes.SiteStructureResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructure(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/site-structure',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getSiteStructureMetadata(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes.GetSiteStructureMetadataRequest,\n ambassadorWixViewerStructureV1SiteStructureItemTypes.GetSiteStructureMetadataRequest,\n ambassadorWixViewerStructureV1SiteStructureItemUniversalTypes.GetSiteStructureMetadataResponse,\n ambassadorWixViewerStructureV1SiteStructureItemTypes.GetSiteStructureMetadataResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixViewerStructureV1SiteStructureItem.getSiteStructureMetadata(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/site-structure-metadata',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n SiteStructureItem as SiteStructureItemOriginal,\n MediaItem as MediaItemOriginal,\n MediaItemMediaOneOf as MediaItemMediaOneOfOriginal,\n Image as ImageOriginal,\n FocalPoint as FocalPointOriginal,\n Video as VideoOriginal,\n Document as DocumentOriginal,\n VideoV2 as VideoV2Original,\n VideoResolution as VideoResolutionOriginal,\n SiteStructureRequest as SiteStructureRequestOriginal,\n PageSegment as PageSegmentOriginal,\n PageSegmentWithLiterals as PageSegmentWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n SiteStructureRequestFilter as SiteStructureRequestFilterOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n LanguageMetadata as LanguageMetadataOriginal,\n SiteStructureResponse as SiteStructureResponseOriginal,\n CursorPagingMetaData as CursorPagingMetaDataOriginal,\n SiteStructureFetchError as SiteStructureFetchErrorOriginal,\n SiteStructureFetchErrorItemTypeOneOf as SiteStructureFetchErrorItemTypeOneOfOriginal,\n GetSiteStructureMetadataRequest as GetSiteStructureMetadataRequestOriginal,\n GetSiteStructureMetadataResponse as GetSiteStructureMetadataResponseOriginal,\n SitePageType as SitePageTypeOriginal,\n GetSiteStructureChunksRequest as GetSiteStructureChunksRequestOriginal,\n GetSiteStructureChunksResponse as GetSiteStructureChunksResponseOriginal,\n ChunkMetadata as ChunkMetadataOriginal,\n GetSiteStructureChunkRequest as GetSiteStructureChunkRequestOriginal,\n GetSiteStructureChunkResponse as GetSiteStructureChunkResponseOriginal,\n} from './viewer-structure-v1-site-structure-item-site-structure-service.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,gCAAAC;AAAA;AAAA;;;ACAA,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,sDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;A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AA,EAC1B;AACF;AAEO,SAASC,4BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC4C;AAAA,IAC9C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getSiteStructure","getSiteStructureMetadata","payload","PageSegment","SortOrder","getSiteStructure","getSiteStructureMetadata"]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
2
  import { GetSiteStructureOptions, SiteStructureResponse, GetSiteStructureMetadataOptions, GetSiteStructureMetadataResponse } from './index.typings.mjs';
3
- export { CursorPaging, CursorPagingMetaData, FocalPoint, GetSiteStructureMetadataRequest, LanguageMetadata, MediaItem, MediaItemMediaOneOf, PageSegment, PageSegmentWithLiterals, SitePageType, SiteStructureFetchError, SiteStructureFetchErrorItemTypeOneOf, SiteStructureItem, SiteStructureRequest, SiteStructureRequestFilter, SortOrder, SortOrderWithLiterals, Sorting, VideoResolution } from './index.typings.mjs';
3
+ export { ChunkMetadata, CursorPaging, CursorPagingMetaData, FocalPoint, GetSiteStructureChunkRequest, GetSiteStructureChunkResponse, GetSiteStructureChunksRequest, GetSiteStructureChunksResponse, GetSiteStructureMetadataRequest, LanguageMetadata, MediaItem, MediaItemMediaOneOf, PageSegment, PageSegmentWithLiterals, SitePageType, SiteStructureFetchError, SiteStructureFetchErrorItemTypeOneOf, SiteStructureItem, SiteStructureRequest, SiteStructureRequestFilter, SortOrder, SortOrderWithLiterals, Sorting, VideoResolution } from './index.typings.mjs';
4
4
 
5
5
  declare function getSiteStructure$1(httpClient: HttpClient): GetSiteStructureSignature;
6
6
  interface GetSiteStructureSignature {