import type { FilterExpression } from '@wix/sdk-types'; import type { WixDataDistinctOptions, WixDataItem, WixDataQuerySpec } from './types'; import type { SortOrder } from '../types/data-item-types'; /** * Options builder for distinct operations. * * Use this builder to configure distinct behavior such as language, consistency, * filters, ordering, and paging. * @public * @builder * @documentationMaturity preview */ export interface WixDataDistinctOptionsBuilder { /** * Sets whether to suppress distinct hooks. * * When `true`, the distinct operation runs without triggering hooks. */ withSuppressHooks(value: boolean): WixDataDistinctOptionsBuilder; /** * Sets whether to include draft items when retrieving distinct values. * @internal */ withShowDrafts(value: boolean): WixDataDistinctOptionsBuilder; /** * Sets app-specific options for the distinct operation. * @internal */ withAppOptions(value: Record): WixDataDistinctOptionsBuilder; /** * Sets the language used for the distinct operation. */ withLanguage(value: string): WixDataDistinctOptionsBuilder; /** * Sets whether the distinct operation uses a consistent read. */ withConsistentRead(value: boolean): WixDataDistinctOptionsBuilder; /** * Sets whether to return the total count with the distinct results. */ withReturnTotalCount(value: boolean): WixDataDistinctOptionsBuilder; /** * Sets the filter used to retrieve distinct values. */ withFilter(value: FilterExpression): WixDataDistinctOptionsBuilder; /** * Sets the sort order for the distinct results. */ withOrder(value: SortOrder): WixDataDistinctOptionsBuilder; /** * Sets offset-based paging for the distinct results. */ withPaging(value: { limit?: number; offset?: number; }): WixDataDistinctOptionsBuilder; /** * Sets cursor-based paging for the distinct results. */ withCursorPaging(value: { cursor?: string; limit?: number; }): WixDataDistinctOptionsBuilder; /** * Builds the distinct options object. */ build(): WixDataDistinctOptions; } /** * Creates a new distinct options builder. * @public * @documentationMaturity preview * * @example * ```ts title="Create a distinct options builder" * import { items, DistinctOptionsBuilder } from '@wix/data' * * const options = DistinctOptionsBuilder() * .withLanguage('en') * .withConsistentRead(true) * .withReturnTotalCount(true) * .withFilter(Filter('status').eq('active')) * .withOrder([{ fieldName: 'status', order: 'asc' }]) * .withPaging({ limit: 10, offset: 5 }) * .build() * * const result = await items.distinct('myCollection', 'status', options) * ``` */ export declare const DistinctOptionsBuilder: () => WixDataDistinctOptionsBuilder; //# sourceMappingURL=WixDataDistinctOptionsBuilder.d.ts.map