import { SiteStructureRequest as SiteStructureRequest$1, SiteStructureResponse as SiteStructureResponse$1, GetSiteStructureMetadataRequest as GetSiteStructureMetadataRequest$1, GetSiteStructureMetadataResponse as GetSiteStructureMetadataResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface SiteStructureItem { /** * The end goal: this field should contain a unique identifier for this site-structure item.\ * Currently it contains: * - For site-structure integrated TPAs - the unique identifier provided by the TPA. * - For all other item types - empty string. */ itemId?: string; /** * An identifier for the type of the item. One of: * - For the site's static pages - "static_page". * - For legacy integration TPAs - the TPA's app-def-id. * - For TPAs with new site-structure integration - the item type identifier provided by the TPA. Commonly one of that TPA's supported sub-pages. * - For items that are the result of a dynamic router - "dynamic-page". */ itemTypeIdentifier?: string; /** * An identifier for the source of the item. One of: * - For the site's static pages - "editor". * - For legacy integration TPAs - the TPA's app-def-id. * - For TPAs with new site-structure integration - the TPA's app-def-id. * - For items that are the result of a dataBinding router - Wix-Data's app-def-id: 'e593b0bd-b783-45b8-97c2-873d42aacaf4'. * - For items that are the result of a dynamic router - Wix-Code's app-def-id: '675bbcef-18d8-41f5-800e-131ec9e08762'. */ sourceId?: string; /** * An identifier for the configuration of the item. Used currently as some sort of a placeholder for further filtering. * - 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). * - For all other items types - empty string. */ configId?: string; /** * A human readable name string associated with the item.\ * Currently exists only for new TPA site-structure integration items, and contains the 'name' field provided by the TPA for that item.\ * This field is not guaranteed to be unique across the item list. */ name?: string | null; /** * Deprecated. Previously used for media content that is associated with an item.\ * See 'image' and 'video' fields of this message. * @deprecated */ media?: MediaItem[]; /** A relative url path that can be used, with the site's base-url, to reach the page represented by this item. */ path?: string | null; /** * A timestamp representing the moment that this item was last changed. * - For static pages - the site's last publish time. * - For all kinds of TPAs - the last-modified field in the respective response item from the TPA. * - 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). */ updatedDate?: Date | null; /** * A value indicating whether the item is inactive or not. E.g. hidden product/finished event etc.\ * Currently exists only for new TPA site-structure integration items, and contains the 'inactive' field provided by the TPA for that item. */ inactive?: boolean | null; /** * A general free schema field to include further metadata related to this item.\ * Currently exists only for:\ * Static pages - a JSON that is the merge of: * 1. The advancedSeoData JSON string that exists for the page in the master-page. * 2. A JSON of the form: * ```javascript * { * "seo_legacy": { * "hidden_from_seo": true / false * }, * "password_protected": true / false * } * ``` * New TPA site-structure integration items - the 'metadata' field provided by the TPA for that item. */ metadata?: Record | null; /** * An image media metadata the is related to this item.\ * Currently exists only for new TPA site-structure integration items, and contains the 'image' field provided by the TPA for that item. */ image?: Image[]; /** * A video media metadata the is related to this item.\ * Currently exists only for new TPA site-structure integration items, and contains the 'video' field provided by the TPA for that item. */ video?: VideoV2[]; /** A value indicating whether the item is protected or not, by password or login. */ protected?: boolean | null; /** * 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.\ * For example: * Blog has one post, translated to 2 languages (EN, FR): * - EN item path is `/amazing-post` * - FR item path is `/poste-incroyable * Both of them might have different `item_id`, but will share the same `translation_id`, to be easily match together * Currently only relevant for Blog */ translationId?: string; /** A value indicating whether the item is a custom error page or not. */ isCustomErrorPage?: boolean | null; /** * An page identifier. * For items that are the result of a dynamic router - page key * @internal */ pageIdentifier?: string | null; } /** Deprecated - Copy this message into your service, do not reference it */ interface MediaItem extends MediaItemMediaOneOf { /** WixMedia image */ image?: Image; /** WixMedia video */ video?: Video; /** WixMedia document */ document?: Document; } /** @oneof */ interface MediaItemMediaOneOf { /** WixMedia image */ image?: Image; /** WixMedia video */ video?: Video; /** WixMedia document */ document?: Document; } interface Image { /** WixMedia image ID. */ id?: string; /** Image URL. */ url?: string; /** * Original image height. * @readonly */ height?: number; /** * Original image width. * @readonly */ width?: number; /** Image alt text. */ altText?: string | null; /** * Image URL expiration date (when relevant). * @internal * @readonly */ urlExpirationDate?: Date | null; /** * Image filename. * @readonly */ filename?: string | null; /** * Image size in bytes. * @internal * @readonly * @format DECIMAL_VALUE */ sizeInBytes?: string | null; /** * Focal point of the image. * @internal */ focalPoint?: FocalPoint; } interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } /** Deprecated - use VideoV2 */ interface Video { /** WixMedia ID */ id?: string; /** URL of video */ url?: string; /** * Original image height * @readonly */ height?: number; /** * Original image width * @readonly */ width?: number; /** Video poster */ thumbnail?: Image; } interface Document { /** WixMedia ID. */ id?: string; /** Document URL. */ url?: string; /** * Document URL expiration date (when relevant). * @internal */ urlExpirationDate?: Date | null; /** * Document size in bytes. * @internal * @format DECIMAL_VALUE */ sizeInBytes?: string | null; /** Document filename. */ filename?: string | null; /** * Document thumbnail. * @internal * @readonly */ thumbnail?: Image; } interface VideoV2 { /** WixMedia ID. */ id?: string; /** * Original video URL. * @internal */ url?: string; /** * Available resolutions for the video, starting with the optimal resolution. * @readonly * @maxSize 100 */ resolutions?: VideoResolution[]; /** * Video filename. * @readonly */ filename?: string | null; /** * Video posters. * @internal * @readonly */ posters?: Image[]; /** * Original video size in bytes. * @internal * @readonly * @format DECIMAL_VALUE */ sizeInBytes?: string | null; /** * Video URL expiration date (when relevant). * @internal * @readonly */ urlExpirationDate?: Date | null; /** * Original video duration in milliseconds. * @internal * @readonly */ durationInMilliseconds?: number | null; /** * A short title for the video. will be used for SEO purposes. * @internal * @maxLength 300 */ title?: string | null; /** * A long description for the video. will be used for SEO purposes. * @internal * @maxLength 2000 */ description?: string | null; /** * Original video height. * @internal * @readonly */ height?: number | null; /** * Original video width. * @internal * @readonly */ width?: number | null; } interface VideoResolution { /** Video URL. */ url?: string; /** Video height. */ height?: number; /** Video width. */ width?: number; /** * Deprecated. Use the `posters` property in the parent entity instead. * @internal * @deprecated */ poster?: Image; /** Video format for example, mp4, hls. */ format?: string; /** * Deprecated. Use the `urlExpirationDate` property in the parent entity instead. * @internal * @deprecated */ urlExpirationDate?: Date | null; /** * Deprecated. Use the `sizeInBytes` property in the parent entity instead. Size cannot be provided per resolution. * @internal * @format DECIMAL_VALUE * @deprecated */ sizeInBytes?: string | null; /** * Video quality. For example: 480p, 720p. * @internal */ quality?: string | null; /** * Video filename. * @internal */ filename?: string | null; /** * Video duration in seconds. * @internal * @readonly * @deprecated Video duration in seconds. * @replacedBy duration_in_milliseconds * @targetRemovalDate 2024-08-01 */ durationInSeconds?: number | null; /** * Video duration in milliseconds. * @internal * @readonly */ durationInMilliseconds?: number | null; /** * When true, this is a protected asset, and calling the URL will return a 403 error. * In order to access private assets, make a request to: * `GenerateFileDownloadUrl` with the WixMedia id and specify the asset_key in the request * @internal * @readonly */ private?: boolean | null; /** * Key to identify the video resolution's relationship to the original media in WixMedia. * Can be used to request a download for the specific video resolution. * For example: 480p.mp4, 720p.mp4, 1080p.mp4, trailer-720p.mp4, clip-720p.mp4 * @internal * @readonly */ assetKey?: string | null; } interface SiteStructureRequest { /** An enum indicating whether the request is for the latest published version (0) or the latest saved version (1) of the site */ pageVersion?: PageSegmentWithLiterals; /** * Pagination request metadata, currently applicable for:\ * - Queries filtered for items from a TPA that is part of the new-integration (TpaSiteStructureService) * - Queries filtered for dynamic router items from the new dynamic-pages-router integration (DynamicSiteStructureService) */ paging?: CursorPaging; /** Filtering metadata. Only items allowed by the filter will be returned. */ filter?: SiteStructureRequestFilter; /** General sorting metadata. Currently not supported. */ sorting?: Sorting; /** General field mask metadata. Currently not supported. */ fieldSet?: string[]; /** Language metadata. Contains 2 chars language code and/or 4 chars language tag. */ languageMetadata?: LanguageMetadata; /** * Used to identify the branch of the site for which the structure is requested. * @format GUID */ branchId?: string | null; } declare enum PageSegment { PUBLISHED = "PUBLISHED", SAVED = "SAVED" } /** @enumType */ type PageSegmentWithLiterals = PageSegment | 'PUBLISHED' | 'SAVED'; interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } /** A filter metadata type. The filter forces an 'and' logic between all of its comprising parts. */ interface SiteStructureRequestFilter { /** In accordance to SiteStructureItem.item_type_identifier */ itemTypeIdentifier?: string; /** In accordance to SiteStructureItem.source_id */ sourceId?: string; /** In accordance to SiteStructureItem.config_id */ configId?: string; /** * In accordance to SiteStructureItem.page_identifier * @internal */ pageIdentifier?: string | null; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal * @maxSize 10 */ selectItemsBy?: Record[] | null; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface LanguageMetadata { /** * 2 chars language code (e.g. 'en') * @format LANGUAGE */ code?: string; /** * 4 chars language tag (e.g. 'en-us') * @format LANGUAGE_TAG */ tag?: string | null; } interface SiteStructureResponse { /** The total number of items to be returned, combining all paginated responses. */ totalResults?: number; /** 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. */ pageData?: CursorPagingMetaData; /** A list of all the result items. */ results?: SiteStructureItem[]; /** A list of errors that occurred during the fetch process (if any). */ errors?: SiteStructureFetchError[]; } interface CursorPagingMetaData { /** The item count in the current page */ count?: number | null; /** The cursor which will be used to query the next page */ cursor?: string | null; } interface SiteStructureFetchError extends SiteStructureFetchErrorItemTypeOneOf { /** * item type id of the failed fetch * @readonly * @minLength 1 * @maxLength 200 */ itemTypeId?: string; /** * for dynamic pages: router prefix of the failed fetch * @readonly * @minLength 1 * @maxLength 200 */ routerPrefix?: string; /** * Error message * @minLength 1 * @maxLength 1000 */ errorMessage?: string; /** * if the fetch happened while fetching links from a TPA, this will hold the TPA appDefId * @readonly * @format GUID */ appId?: string | null; } /** @oneof */ interface SiteStructureFetchErrorItemTypeOneOf { /** * item type id of the failed fetch * @readonly * @minLength 1 * @maxLength 200 */ itemTypeId?: string; /** * for dynamic pages: router prefix of the failed fetch * @readonly * @minLength 1 * @maxLength 200 */ routerPrefix?: string; } interface GetSiteStructureMetadataRequest { /** Page's version */ pageVersion?: PageSegmentWithLiterals; } interface GetSiteStructureMetadataResponse { /** A list of pages types */ pageTypes?: SitePageType[]; } interface SitePageType { /** Type identifier */ itemTypeIdentifier?: string; /** Site's page-type sourceId */ sourceId?: string; /** Site's page-type configId */ configId?: string; /** * Site's pages identifiers * @internal */ pageIdentifiers?: string[]; } interface GetSiteStructureChunksRequest { /** @maxLength 8192 */ siteUrl?: string | null; languageMetadata?: LanguageMetadata; /** The size of the chunk to split all the entries into. */ chunkSize?: number; pageVersion?: PageSegmentWithLiterals; /** @maxLength 255 */ itemTypeIdentifier?: string | null; /** @maxLength 36 */ sourceId?: string; /** @maxLength 2048 */ configId?: string; /** @maxLength 255 */ pageIdentifier?: string | null; } interface GetSiteStructureChunksResponse { chunks?: ChunkMetadata[]; } interface ChunkMetadata { /** * Chunk ID used in subsequent GetSiteMapChunk request. * Opaque provider-generated token; 1024 accommodates the largest known format (e.g. an Elasticsearch cursor). * @maxLength 1024 */ id?: string; /** The most recent date when any of the items in a chunk was updated */ updatedDate?: Date | null; /** * Page identifier of the items in a chunk. * @maxLength 255 */ pageIdentifier?: string | null; } interface GetSiteStructureChunkRequest { /** @maxLength 8192 */ siteUrl?: string | null; /** * Chunk ID previously returned in ChunkMetadata * @maxLength 1024 */ chunkId?: string; languageMetadata?: LanguageMetadata; /** Chunk size. It will match the chunk size used in GetSiteMapChunksRequest. */ chunkSize?: number | null; pageVersion?: PageSegmentWithLiterals; /** * Used to identify the branch of the site for which the structure is requested. * @format GUID */ branchId?: string | null; /** @maxLength 255 */ itemTypeIdentifier?: string | null; /** @maxLength 36 */ sourceId?: string; /** @maxLength 2048 */ configId?: string; /** @maxLength 255 */ pageIdentifier?: string | null; } interface GetSiteStructureChunkResponse { /** @maxSize 10000 */ chunk?: SiteStructureItem[]; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getSiteStructure(): __PublicMethodMetaInfo<'POST', {}, SiteStructureRequest$1, SiteStructureRequest, SiteStructureResponse$1, SiteStructureResponse>; declare function getSiteStructureMetadata(): __PublicMethodMetaInfo<'POST', {}, GetSiteStructureMetadataRequest$1, GetSiteStructureMetadataRequest, GetSiteStructureMetadataResponse$1, GetSiteStructureMetadataResponse>; export { type AddressLocation as AddressLocationOriginal, 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 };