export interface Collection { /** * Collection ID (generated automatically by the catalog). * @readonly */ _id?: string | null; /** Collection name. */ name?: string | null; /** * Media items (images, videos etc) associated with this collection. Read only. * @readonly */ media?: Media; /** * Number of products in the collection. Read only. * @readonly */ numberOfProducts?: number; /** Collection description. */ description?: string | null; /** Collection slug. */ slug?: string | null; /** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */ visible?: boolean | null; } export interface Media { /** Primary media (image, video etc) associated with this product. */ mainMedia?: MediaItem; /** Media (images, videos etc) associated with this product. */ items?: MediaItem[]; } export interface MediaItem extends MediaItemItemOneOf { /** Image data (URL, size). */ image?: MediaItemUrlAndSize; /** Video data (URL, size). */ video?: MediaItemVideo; /** Media item thumbnail details. */ thumbnail?: MediaItemUrlAndSize; /** Media item type (image, video, etc.). */ mediaType?: MediaItemType; /** Media item title. */ title?: string; /** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */ _id?: string; } /** @oneof */ export interface MediaItemItemOneOf { /** Image data (URL, size). */ image?: MediaItemUrlAndSize; /** Video data (URL, size). */ video?: MediaItemVideo; } export interface MediaItemUrlAndSize { /** Media item URL. */ url?: string; /** Media item width. */ width?: number; /** Media item height. */ height?: number; /** Media format (mp4, png, etc.). */ format?: string | null; /** Alt text. This text will be shown in case the image is not available. */ altText?: string | null; } export declare enum MediaItemType { unspecified_media_item_type = "unspecified_media_item_type", /** Image media type. */ image = "image", /** Video media type. */ video = "video", /** Audio media type. */ audio = "audio", /** Document media type. */ document = "document", /** Zip media type. */ zip = "zip" } export interface MediaItemVideo { /** Data (URL, size) about each resolution for which this video is available. */ files?: MediaItemUrlAndSize[]; /** ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. */ stillFrameMediaId?: string; } /** * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines. * The search engines use this information for ranking purposes, or to display snippets in the search results. * This data will override other sources of tags (for example patterns) and will be included in the section of the HTML document, while not being displayed on the page itself. */ export interface SeoSchema { /** SEO tag information. */ tags?: Tag[]; /** SEO general settings. */ settings?: Settings; } export interface Keyword { /** Keyword value. */ term?: string; /** Whether the keyword is the main focus keyword. */ isMain?: boolean; /** The source that added the keyword terms to the SEO settings. */ origin?: string | null; } export interface Tag { /** * SEO tag type. * * * Supported values: `title`, `meta`, `script`, `link`. */ type?: string; /** * A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. * For example: `{"name": "description", "content": "the description itself"}`. */ props?: Record | null; /** SEO tag meta data. For example, `{"height": 300, "width": 240}`. */ meta?: Record | null; /** SEO tag inner content. For example, ` inner content `. */ children?: string; /** Whether the tag is a custom tag. */ custom?: boolean; /** Whether the tag is disabled. */ disabled?: boolean; } export interface Settings { /** * Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled. * * * Default: `false` (Auto Redirect is enabled.) */ preventAutoRedirect?: boolean; /** User-selected keyword terms for a specific page. */ keywords?: Keyword[]; } export interface QueryCollectionsRequest { query?: PlatformQuery; } export interface PlatformQuery extends PlatformQueryPagingMethodOneOf { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging; /** Filter object. */ filter?: Record | null; /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Sorting[]; } /** @oneof */ export interface PlatformQueryPagingMethodOneOf { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface PlatformPaging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } export interface CursorPaging { /** Maximum number of items to return in the results. */ 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. */ cursor?: string | null; } export interface QueryCollectionsResponse { collections?: Collection[]; metadata?: PlatformPagingMetadata; } export interface PlatformPagingMetadata { /** The number of items returned in this response. */ count?: number | null; /** The offset which was requested. Returned if offset paging was used. */ offset?: number | null; /** The total number of items that match the query. Returned if offset paging was used. */ total?: number | null; /** Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: Cursors; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export interface GetCollectionRequest { /** Requested collection ID. */ _id: string; } export interface GetCollectionResponse { collection?: Collection; } export interface GetCollectionBySlugRequest { /** Slug of the collection to retrieve. */ slug: string; } export interface GetCollectionBySlugResponse { /** The requested collection. */ collection?: Collection; } interface MediaItemUrlAndSizeNonNullableFields { url: string; width: number; height: number; } interface MediaItemVideoNonNullableFields { files: MediaItemUrlAndSizeNonNullableFields[]; stillFrameMediaId: string; } interface MediaItemNonNullableFields { image?: MediaItemUrlAndSizeNonNullableFields; video?: MediaItemVideoNonNullableFields; thumbnail?: MediaItemUrlAndSizeNonNullableFields; mediaType: MediaItemType; title: string; _id: string; } interface MediaNonNullableFields { mainMedia?: MediaItemNonNullableFields; items: MediaItemNonNullableFields[]; } interface TagNonNullableFields { type: string; children: string; custom: boolean; disabled: boolean; } interface KeywordNonNullableFields { term: string; isMain: boolean; } interface SettingsNonNullableFields { preventAutoRedirect: boolean; keywords: KeywordNonNullableFields[]; } interface SeoSchemaNonNullableFields { tags: TagNonNullableFields[]; settings?: SettingsNonNullableFields; } export interface CollectionNonNullableFields { media?: MediaNonNullableFields; numberOfProducts: number; seoSchema?: SeoSchemaNonNullableFields; } export interface QueryCollectionsResponseNonNullableFields { collections: CollectionNonNullableFields[]; } export interface GetCollectionResponseNonNullableFields { collection?: CollectionNonNullableFields; } export interface GetCollectionBySlugResponseNonNullableFields { collection?: CollectionNonNullableFields; } /** * Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering. * See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information. * @public * @fqn wix.catalog.api.v2.CollectionReadApi.QueryCollections */ export declare function queryCollections(): CollectionsQueryBuilder; interface QueryOffsetResult { currentPage: number | undefined; totalPages: number | undefined; totalCount: number | undefined; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } export interface CollectionsQueryResult extends QueryOffsetResult { items: Collection[]; query: CollectionsQueryBuilder; next: () => Promise; prev: () => Promise; } export interface CollectionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: '_id' | 'name', value: string) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: '_id' | 'name', value: any[]) => CollectionsQueryBuilder; in: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder; exists: (propertyName: '_id' | 'name', value: boolean) => CollectionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'_id' | 'name'>) => CollectionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'_id' | 'name'>) => CollectionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => CollectionsQueryBuilder; /** @param skip - Number of items to skip in the query results before returning the results. */ skip: (skip: number) => CollectionsQueryBuilder; find: () => Promise; } /** * Retrieves a collection with the provided ID. * @param _id - Requested collection ID. * @public * @requiredField _id * @fqn wix.catalog.api.v2.CollectionReadApi.GetCollection */ export declare function getCollection(_id: string): Promise; /** * Retrieves a collection with the provided slug. * @param slug - Slug of the collection to retrieve. * @public * @requiredField slug * @fqn wix.catalog.api.v2.CollectionReadApi.GetCollectionBySlug */ export declare function getCollectionBySlug(slug: string): Promise; export {};