import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; interface Collection { /** * Collection ID. * @readonly * @format GUID */ _id?: string | null; /** * Revision number, which increments by 1 each time the collection is updated. To prevent conflicting changes, the existing revision must be passed when updating the collection object. * @readonly */ revision?: string | null; /** * Collection title. * @maxLength 100 */ title?: string | null; /** Collection description. */ description?: string | null; /** Collection slug. */ slug?: string | null; /** Collection cover image. */ coverImage?: Image; /** Whether the collection is hidden from the portfolio. Default: `false` */ hidden?: boolean | null; /** * Index that determines which position a collection is displayed in the portfolio.
* * Default: [Epoch](https://www.epoch101.com/) timestamp.
*/ sortOrder?: number | null; /** * Date and time the collection was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the collection was updated. * @readonly */ _updatedDate?: Date | null; /** * Collection page URL and relative path. Returned when `includePageUrl` is `true` in the request. * @readonly */ url?: string; /** Collection SEO data. */ seoData?: SeoSchema; } interface Image { /** Information about the Wix Media image. */ imageInfo?: string; /** Focal point of the image. */ focalPoint?: Point; } declare enum ImageType { UNDEFINED = "UNDEFINED", WIX_MEDIA = "WIX_MEDIA", EXTERNAL = "EXTERNAL" } /** @enumType */ type ImageTypeWithLiterals = ImageType | 'UNDEFINED' | 'WIX_MEDIA' | 'EXTERNAL'; interface Point { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; } interface UnsharpMasking { /** * Unsharp masking amount. Controls the sharpening strength.
* * Min: `0`
* Max: `5` * @max 5 */ amount?: number | null; /** Unsharp masking radius in pixels. Controls the sharpening width. */ radius?: number | null; /** * Unsharp masking threshold. Controls how different neighboring pixels must be for shapening to apply.
* * Min: `0`
* Max: `1` * @max 1 */ threshold?: number | null; } /** * 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. */ interface SeoSchema { /** SEO tag information. */ tags?: Tag[]; /** SEO general settings. */ settings?: Settings; } 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. * @maxLength 1000 */ origin?: string | null; } 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 metadata. 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](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). */ custom?: boolean; /** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */ disabled?: boolean; } interface Settings { /** * Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. * * * Default: `false` (automatical redirect is enabled). */ preventAutoRedirect?: boolean; /** * User-selected keyword terms for a specific page. * @maxSize 5 */ keywords?: Keyword[]; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface Empty { } interface AdminRemoveMenuItemsResponse { /** number of items queried for deletion */ numItems?: number; /** number of items sucessfully deleted */ numItemsSuccessfullyDeleted?: number; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface InvalidateCache extends InvalidateCacheGetByOneOf { /** * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ metaSiteId?: string; /** * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ siteId?: string; /** Invalidate by App */ app?: App; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */ customTag?: CustomTag; /** Invalidate by multiple page ids */ pages?: Pages; /** Invalidate by multiple URI paths */ uris?: URIs; /** * tell us why you're invalidating the cache. You don't need to add your app name * @maxLength 256 */ reason?: string | null; /** Is local DS */ localDc?: boolean; hardPurge?: boolean; /** * Optional caller-provided ID for tracking this invalidation through the system. * When set, the corresponding CDN purge completion event will include this ID, * allowing you to confirm when the invalidation has fully propagated. * Example: generate a UUID, pass it here, and later match it in the CDN purge completion event. * @maxLength 256 */ correlationId?: string | null; } /** @oneof */ interface InvalidateCacheGetByOneOf { /** * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ metaSiteId?: string; /** * Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! * @format GUID */ siteId?: string; /** Invalidate by App */ app?: App; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** Invalidate by custom tag. Tags used in BO invalidation are disabled for this endpoint (more info: https://wix-bo.com/dev/clear-ssr-cache) */ customTag?: CustomTag; /** Invalidate by multiple page ids */ pages?: Pages; /** Invalidate by multiple URI paths */ uris?: URIs; } interface App { /** * The AppDefId * @minLength 1 */ appDefId?: string; /** * The instance Id * @format GUID */ instanceId?: string; } interface Page { /** * the msid the page is on * @format GUID */ metaSiteId?: string; /** * Invalidate by Page ID * @minLength 1 */ pageId?: string; } interface URI { /** * the msid the URI is on * @format GUID */ metaSiteId?: string; /** * URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes * @minLength 1 */ uriPath?: string; } interface File { /** * the msid the file is related to * @format GUID */ metaSiteId?: string; /** * Invalidate by filename (for media files such as PDFs) * @minLength 1 * @maxLength 256 */ fileName?: string; } interface CustomTag { /** * the msid the tag is related to * @format GUID */ metaSiteId?: string; /** * Tag to invalidate by * @minLength 1 * @maxLength 256 */ tag?: string; } interface Pages { /** * the msid the pages are on * @format GUID */ metaSiteId?: string; /** * Invalidate by multiple Page IDs in a single message * @maxSize 100 * @minLength 1 */ pageIds?: string[]; } interface URIs { /** * the msid the URIs are on * @format GUID */ metaSiteId?: string; /** * URI paths to invalidate (e.g. page/my/path) - without leading/trailing slashes * @maxSize 100 * @minLength 1 */ uriPaths?: string[]; } interface CreateCollectionRequest { /** Collection to create. */ collection: Collection; } interface CreateCollectionResponse { /** Created collection. */ collection?: Collection; } interface GetCollectionRequest { /** * ID of the collection to retrieve. * @format GUID */ collectionId: string; /** Whether to include the collection's page URL and relative path in the response. Default: `false` */ includePageUrl?: boolean | null; } interface GetCollectionResponse { /** The requested collection. */ collection?: Collection; } interface ListCollectionsRequest { paging?: CursorPaging; /** Whether to include the collection's page URL and relative path in the response. Default: `false` */ includePageUrl?: boolean | null; } 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; } interface ListCollectionsResponse { /** List of collections. */ collections?: Collection[]; /** Paging metadata. */ metadata?: PagingMetadataV2; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface UpdateCollectionRequest { /** Collection to update. */ collection: Collection; } interface UpdateCollectionResponse { /** Updated collection. */ collection?: Collection; } interface DeleteCollectionRequest { /** * ID of the collection to delete. * @format GUID */ collectionId: string; } interface DeleteCollectionResponse { /** * ID of the deleted collection. * @format GUID */ collectionId?: string; } interface QueryCollectionsRequest { /** Query options. */ query: QueryV2; /** Whether to include the collection's page URL and relative path in the response. Default: `false` */ includePageUrl?: boolean | null; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and offset the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). */ sort?: Sorting[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf { /** Paging options to limit and offset the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface QueryCollectionsResponse { /** List of collections. */ collections?: Collection[]; /** Paging metadata. */ metadata?: PagingMetadataV2; } interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface CollectionCreatedEnvelope { entity: Collection; metadata: EventMetadata; } /** * Triggered when a collection is created. * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Portfolio * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO * @permissionId PORTFOLIO.COLLECTION_READ * @webhook * @eventType wix.portfolio.collections.v1.collection_created * @slug created */ declare function onCollectionCreated(handler: (event: CollectionCreatedEnvelope) => void | Promise): void; interface CollectionDeletedEnvelope { metadata: EventMetadata; } /** * Triggered when a collection is deleted. * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Portfolio * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO * @permissionId PORTFOLIO.COLLECTION_READ * @webhook * @eventType wix.portfolio.collections.v1.collection_deleted * @slug deleted */ declare function onCollectionDeleted(handler: (event: CollectionDeletedEnvelope) => void | Promise): void; interface CollectionUpdatedEnvelope { entity: Collection; metadata: EventMetadata; } /** * Triggered when a collection is updated. * @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ * @permissionScope Manage Portfolio * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO * @permissionId PORTFOLIO.COLLECTION_READ * @webhook * @eventType wix.portfolio.collections.v1.collection_updated * @slug updated */ declare function onCollectionUpdated(handler: (event: CollectionUpdatedEnvelope) => void | Promise): void; /** * Creates a collection. * @param collection - Collection to create. * @public * @requiredField collection * @permissionId PORTFOLIO.COLLECTION_CREATE * @applicableIdentity APP * @returns Created collection. * @fqn com.wixpress.portfolio.collections.CollectionsService.CreateCollection */ declare function createCollection(collection: Collection): Promise>; /** * Retrieves a collection. * @param collectionId - ID of the collection to retrieve. * @public * @requiredField collectionId * @permissionId PORTFOLIO.COLLECTION_READ * @applicableIdentity APP * @returns The requested collection. * @fqn com.wixpress.portfolio.collections.CollectionsService.GetCollection */ declare function getCollection(collectionId: string, options?: GetCollectionOptions): Promise>; interface GetCollectionOptions { /** Whether to include the collection's page URL and relative path in the response. Default: `false` */ includePageUrl?: boolean | null; } /** * Retrieves a list all collections in a portfolio. * @public * @permissionId PORTFOLIO.COLLECTION_READ * @applicableIdentity APP * @fqn com.wixpress.portfolio.collections.CollectionsService.ListCollections */ declare function listCollections(options?: ListCollectionsOptions): Promise>; interface ListCollectionsOptions { paging?: CursorPaging; /** Whether to include the collection's page URL and relative path in the response. Default: `false` */ includePageUrl?: boolean | null; } /** * Updates a collection. * @param _id - Collection ID. * @public * @requiredField _id * @requiredField collection * @requiredField collection.revision * @permissionId PORTFOLIO.COLLECTION_UPDATE * @applicableIdentity APP * @returns Updated collection. * @fqn com.wixpress.portfolio.collections.CollectionsService.UpdateCollection */ declare function updateCollection(_id: string, collection: NonNullablePaths): Promise>; interface UpdateCollection { /** * Collection ID. * @readonly * @format GUID */ _id?: string | null; /** * Revision number, which increments by 1 each time the collection is updated. To prevent conflicting changes, the existing revision must be passed when updating the collection object. * @readonly */ revision?: string | null; /** * Collection title. * @maxLength 100 */ title?: string | null; /** Collection description. */ description?: string | null; /** Collection slug. */ slug?: string | null; /** Collection cover image. */ coverImage?: Image; /** Whether the collection is hidden from the portfolio. Default: `false` */ hidden?: boolean | null; /** * Index that determines which position a collection is displayed in the portfolio.
* * Default: [Epoch](https://www.epoch101.com/) timestamp.
*/ sortOrder?: number | null; /** * Date and time the collection was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the collection was updated. * @readonly */ _updatedDate?: Date | null; /** * Collection page URL and relative path. Returned when `includePageUrl` is `true` in the request. * @readonly */ url?: string; /** Collection SEO data. */ seoData?: SeoSchema; } /** * Deletes a collection. * @param collectionId - ID of the collection to delete. * @public * @requiredField collectionId * @permissionId PORTFOLIO.COLLECTION_DELETE * @applicableIdentity APP * @fqn com.wixpress.portfolio.collections.CollectionsService.DeleteCollection */ declare function deleteCollection(collectionId: string): Promise>; /** * Creates a query to retrieve a list of collections. * * The `queryCollections()` method builds a query to retrieve a list of collections and returns a `CollectionsQueryBuilder` object. * * The returned object contains the query definition, which is used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/portfolio/collections/collections-query-builder/find) method. * * You can refine the query by chaining `CollectionsQueryBuilder` methods onto the query. `CollectionsQueryBuilder` methods enable you to filter, sort, and control the results that `queryCollections()` returns. * * `queryCollections()` runs with the following `CollectionsQueryBuilder` defaults which you can override: * * + [`limit(100)`](https://dev.wix.com/docs/sdk/backend-modules/portfolio/collections/collections-query-builder/limit) * + [`ascending('_id')`](https://dev.wix.com/docs/sdk/backend-modules/portfolio/collections/collections-query-builder/ascending) * * The following `CollectionsQueryBuilder` methods are supported for `queryCollections()`. For a full description of the operations object, see the object returned for the [`items`](https://dev.wix.com/docs/sdk/backend-modules/portfolio/collections/collections-query-result/items) property in `CollectionsQueryResult`. * @public * @permissionId PORTFOLIO.COLLECTION_READ * @applicableIdentity APP * @fqn com.wixpress.portfolio.collections.CollectionsService.QueryCollections */ declare function queryCollections(options?: QueryCollectionsOptions): CollectionsQueryBuilder; interface QueryCollectionsOptions { /** Whether to include the collection's page URL and relative path in the response. Default: `false` */ includePageUrl?: boolean | null | undefined; } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface CollectionsQueryResult extends QueryCursorResult { items: Collection[]; query: CollectionsQueryBuilder; next: () => Promise; prev: () => Promise; } interface CollectionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: '_id' | 'title' | 'description' | 'slug', value: string) => CollectionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any[]) => CollectionsQueryBuilder; in: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: any) => CollectionsQueryBuilder; exists: (propertyName: '_id' | 'title' | 'description' | 'slug' | 'hidden' | 'sortOrder' | '_createdDate' | '_updatedDate', value: boolean) => CollectionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate'>) => CollectionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'_id' | 'title' | 'description' | 'slug' | 'sortOrder' | '_createdDate' | '_updatedDate'>) => CollectionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => CollectionsQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => CollectionsQueryBuilder; find: () => Promise; } /** * @hidden * @fqn com.wixpress.portfolio.collections.CollectionsService.QueryCollections * @requiredField query */ declare function typedQueryCollections(query: CollectionQuery, options?: QueryCollectionsOptions): Promise>; interface CollectionQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['_id']; operators: '*'; sort: 'BOTH'; }, { fields: ['description', 'slug', 'title']; operators: '*'; sort: 'BOTH'; }, { fields: ['sortOrder']; operators: '*'; sort: 'BOTH'; }, { fields: ['hidden']; operators: '*'; sort: 'NONE'; }, { fields: ['_createdDate', '_updatedDate']; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type CollectionQuery = { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | 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?: NonNullable['cursor'] | null; }; /** Filter object. Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object. Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AdminRemoveMenuItemsResponse, type App, type BaseEventMetadata, type Collection, type CollectionCreatedEnvelope, type CollectionDeletedEnvelope, type CollectionQuery, type CollectionQuerySpec, type CollectionUpdatedEnvelope, type CollectionsQueryBuilder, type CollectionsQueryResult, type CommonQueryWithEntityContext, type CreateCollectionRequest, type CreateCollectionResponse, type CursorPaging, type Cursors, type CustomTag, type DeleteCollectionRequest, type DeleteCollectionResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type GetCollectionOptions, type GetCollectionRequest, type GetCollectionResponse, type IdentificationData, type IdentificationDataIdOneOf, type Image, ImageType, type ImageTypeWithLiterals, type InvalidateCache, type InvalidateCacheGetByOneOf, type Keyword, type ListCollectionsOptions, type ListCollectionsRequest, type ListCollectionsResponse, type MessageEnvelope, type Page, type Pages, type Paging, type PagingMetadataV2, type Point, type QueryCollectionsOptions, type QueryCollectionsRequest, type QueryCollectionsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RestoreInfo, type SeoSchema, type Settings, SortOrder, type SortOrderWithLiterals, type Sorting, type Tag, type URI, type URIs, type UnsharpMasking, type UpdateCollection, type UpdateCollectionRequest, type UpdateCollectionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createCollection, deleteCollection, getCollection, listCollections, onCollectionCreated, onCollectionDeleted, onCollectionUpdated, queryCollections, typedQueryCollections, updateCollection, utils };