import { NonNullablePaths } from '@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?: string[]; /** * 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?: string[]; /** 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; } /** Deprecated - Copy this message into your service, do not reference it */ interface MediaItem extends MediaItemMediaOneOf { /** WixMedia image */ image?: string; /** WixMedia video */ video?: string; /** WixMedia document */ document?: string; } /** @oneof */ interface MediaItemMediaOneOf { /** WixMedia image */ image?: string; /** WixMedia video */ video?: string; /** WixMedia document */ document?: string; } interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface VideoResolution { /** Video URL. */ url?: string; /** Video height. */ height?: number; /** Video width. */ width?: number; /** Video format for example, mp4, hls. */ format?: string; } 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; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; /** * 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; } 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[]; } /** * Get Site's structure * @public * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructure */ declare function getSiteStructure(options?: GetSiteStructureOptions): Promise>; interface GetSiteStructureOptions { /** 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; } /** * Get Site's structure meta-data * @public * @fqn com.wixpress.structure.api.SiteStructureService.GetSiteStructureMetadata */ declare function getSiteStructureMetadata(options?: GetSiteStructureMetadataOptions): Promise>; interface GetSiteStructureMetadataOptions { /** Page's version */ pageVersion?: PageSegmentWithLiterals; } export { type AddressLocation, 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 };