import { WixDataUpdateOptions, WixDataCountOptions, WixDataReadOptions, WixDataRemoveOptions, WixDataSaveOptions, WixDataInsertOptions, WixDataOptions, WixDataBulkRemoveOptions, WixDataBulkUpdateOptions, WixDataAggregate, WixDataAggregatePipelineExpressions, WixDataAggregatePipelineStages, WixDataAggregateOptions, FilterStage, ProjectStage, GroupStage, UnwindStage, SortStage, LimitStage, SkipStage, ObjectToArrayStage, WixDataBulkPatch, WixDataBulkResult, WixDataBulkError, WixDataItem, WixDataReadWithProjectionOptions, WithIncludeFieldGroupsOption, WixDataGetOptions, WixDataPatch, WixDataResult, WixDataQuery, WixDataSearch, QueryBase, WixDataFilter, WixDataQueryReferencedOptions, WixDataQueryOptions, WixDataQueryRequest, WixDataPatchOptions, WixDataApi, PipelineStage, pipelineBuilder, PipelineBuilder as _PipelineBuilder, QueryBuilder, Sort, Filter, WixDataBulkInsertOptions, WixDataBulkSaveOptions, WixDataDirectQueryOptions, expressions, stages, FieldExpression, TextExpression, NumericExpression, AddExpression, SubtractExpression, MultiplyExpression, DivideExpression, SumExpression, AbsExpression, ModExpression, FloorExpression, CeilExpression, ConcatExpression, StringifyExpression, ToLowerExpression, ToUpperExpression, SubstringExpression, LengthExpression, AggregationPipeline, AggregatePipelineDataItemsResponse, WixDataDistinctOptions, WixDataSearchRequest, WixDataDirectSearchOptions, SearchBuilder, SearchParams } from '@wix/wix-data-items-common'; import { DataItemCreatedEnvelope, DataItemDeletedEnvelope, DataItemUpdatedEnvelope } from './data-v2-data-item-items.types'; /** * Adds an item to a collection. * * An item can only be inserted into an existing collection. You can create a new collection using the * Data Collections API. * * The `insert()` method returns a Promise that resolves to the inserted item * after it has been added to the specified collection. The Promise is rejected * if the current user does not have "create" permissions for the collection or * the specified item includes an `_id` property whose value matches an * existing ID in the collection. Meaning, `insert()` cannot overwrite an * existing item in the collection. * * Calling the `insert()` method triggers the [`beforeInsert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-insert) and [`afterInsert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-insert) hooks if they have been defined. * * When inserting an item into a collection that has a reference field, set the * value of the reference field to the referenced item's `_id` value or the entire referenced item object. * * The `insert()` method adds the following properties and values to the item * when it adds it to the collection: * - `_id`: A unique identifier for an item in a collection, if the item * doesn't have one or has one that is `undefined`. You can optionally provide * your own ID. Once an ID is assigned to an item it cannot be changed. * - `_createdDate`: The date the item was added to the collection. * - `_updatedDate`: The date the item was modified. When the item is first * added, the `_createdDate` and `_updatedDate` are the same. * * Any valid JavaScript object can be added as a property value. The `insert()` * method maintains the structure of the specified object. For example, objects that contain nested objects, arrays, or arrays with nested objects are all added to the collection as defined. * * * > **Notes:** * > - The maximum size of an item that you can add to a collection is 500kb. * > - If an item's `_id` property value is set to `null` or an empty string, an error is thrown. * > - When creating a [single-item collection](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection), an item with the system field `_id` is pre-inserted into the collection. [Single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection) may contain only one item. * > - If there is a pre-existing item in a [single-item collection](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection), the `insert()` method will not run. To update or change an item in a single-item collection see the `update()` and `save()` methods. * > - The `insert()` method does not support multi-reference fields. For multi-reference fields, use `insertReference()`. * > - [Translatable collections](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content) do not allow insertion and modification of items when working in a non-primary language. For example, if a collection's primary language is English, and the site visitor is viewing the site in French, calling `insert()` fails and issues an error. * @public * @param dataCollectionId - ID of the collection item belongs to. * @param item - Data item to insert. * @param options - Options to use when processing this operation. * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField item * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.InsertDataItem */ export declare function insert(dataCollectionId: string, item: Partial, options?: WixDataInsertOptions): Promise; /** * Updates an item in a collection. * * The `update()` method returns a Promise that resolves to the updated item from * the specified collection. The Promise is rejected if the current user does not * have update permissions for the collection. * * Calling the `update()` method triggers the [`beforeUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-update) and [`afterUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-update) hooks if they have been defined. * * The `update()` method compares the `_id` property of the specified item * with the `_id` property values of the items in the specified collection. If * an item in the collection has that `_id` value, `update()` replaces the * item's property values with the ones in the specified item. If the existing * item had properties with values and those properties were not included in * the specified item, the values in those properties are lost. The item's * `_updatedDate` property is also updated to the current date. * * Any valid JavaScript object can be used as a property value. The `update()` * method maintains the structure of the specified object. For example, * objects that contain nested objects, arrays, or arrays with nested objects * are all added to the collection as defined. * * When updating an item in a collection that has a reference field, set the * value of the reference field to the referenced item's `_id` value or the * entire referenced item object. * * The maximum size of an item that you can update in a collection is 500kb. * * > **Notes:** * > - The specified item must include an `_id` property that already exists in the collection. * > - The `update()` method does not support multi-reference fields. For multi-reference fields, use `replaceReferences()` or `insertReference()`. * > - [Translatable collections](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content) do not allow insertion and modification of items when working in a non-primary language. For example, if a collection's primary language is English, and the site visitor is viewing the site in French, calling `update()` fails and issues an error. * * @param dataCollectionId - ID of the collection item belongs to. * @param item - Data item to update. * @param options - Options to use when processing this operation. * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField item * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.UpdateDataItem */ export declare function update(dataCollectionId: string, item: WixDataItem, options?: WixDataUpdateOptions): Promise; /** * Inserts or updates an item in a collection. * * The `save()` method returns a Promise that resolves to the inserted or * updated item after it has been added or updated in the specified * collection. The Promise is rejected if the current user does not have * the necessary permissions for the collection. * * The `save()` method inserts or updates the specified item, depending on * whether it already exists in the collection. It compares the `_id` property * value of the specified item with the `_id` property values of the items in * the specified collection. If an item in the collection has that `_id` value, * `save()` uses `update()` to update the item in the collection, triggering * the `beforeUpdate()` and `afterUpdate()` hooks if they have been defined. * If none of the items in the collection contain that `_id` value, the * specified item does not have an `_id` property, or if the specified item's * id property is `undefined`, `save()` uses `insert()` to add the specified * item to the collection. This triggers the [`beforeInsert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-insert) and * [`afterInsert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-insert) hooks if they have been defined. * * * When saving an item to a collection that has a reference field, set the * value of the reference field to the referenced item's `_id` value or the * entire referenced item object. * * > **Notes:** * > - The maximum size of an item that you can save to a collection is 500kb. * > - If an item's `_id` property value is set to null or an empty string, an error is thrown. * > - The `save()` method does not support multi-reference fields. For multi-reference fields, use `insertReference() `or `replaceReferences()`. * > - [Translatable collections](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content) do not allow insertion and modification of items when working in a non-primary language. For example, if a collection's primary language is English, and the site visitor is viewing the site in French, calling `save()` fails and issues an error. * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField item * @param dataCollectionId - ID of the collection item belongs to. * @param item - Data item to save. * @param options - Options to use when processing this operation. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.SaveDataItem */ export declare function save(dataCollectionId: string, item: Partial, options?: WixDataSaveOptions): Promise; /** * Retrieves an item from a collection. * * The `get()` method returns a Promise that resolves to the item with ID * `itemId` from the specified collection, or `null` if the `itemId` is not * found. The Promise is rejected if the current user does not have read * permissions for the collection. * * If the specified collection contains reference fields, the ID of the * referenced item is returned. To return the values of the referenced items * use `query()` and `include()`. * * If the `get()` method is passed the ID of [a hidden item](https://support.wix.com/en/article/cms-controlling-live-site-item-visibility-from-your-collection), it returns null. * * Calling the `get()` method triggers the [`beforeGet()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-get) and [`afterGet()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-get) hooks if they have been defined. * * > **Notes:** * > - When using the `query()` or `get()` methods or another data retrieval method immediately following a change to your database collection, the data retrieved may not contain your most recent changes. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency). To solve this, you can use the `setTimeout()` method to delay retrieving data following any changes to your database collection. * > - To speed up data retrieval, the results of certain data queries are cached. Learn more about [caching data query results](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/data-api/about-caching-data-query-results). * > - An `itemId` is required to retrieve an item even from a [single-item collection](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection). * * @param dataCollectionId - ID of the collection item belongs to. * @param itemId - ID of the data item to retrieve. * @param options - Options to use when processing this operation. * @public * @documentationMaturity preview * @requiredField itemId * @requiredField dataCollectionId. * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @returns Retrieved item. * @fqn com.wixpress.cloud.data.api.data.DataItemService.GetDataItem */ export declare function get(dataCollectionId: string, itemId: string, options?: WixDataReadWithProjectionOptions & WithIncludeFieldGroupsOption): Promise; /** * Removes an item from a collection. * * The `remove()` method returns a Promise that resolves to the removed item * after it has been removed from the specified collection. The Promise is * rejected if the current user does not have "delete" permissions for the * collection. * * Calling the `remove()` method triggers the [`beforeRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-remove) and [`afterRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-remove) hooks if they have been defined. * * * > **Note:** The `remove()` method also clears multiple-item reference fields for items in collections referenced by the specified item. For example, suppose you have a **Movies** collection with an **Actors** field that contains multiple references to items in a **People** collection. Removing an item in the **Movies** collection also clears the data in the corresponding multiple-item reference fields in the **People** collection. * * @param dataCollectionId - ID of the collection that contains the item. * @param itemId - ID of the item to remove. * @param options - Object containing options to use when processing this operation. * @public * @documentationMaturity preview * @requiredField itemId * @requiredField dataCollectionId * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.RemoveDataItem */ export declare function remove(dataCollectionId: string, itemId: string, options?: WixDataRemoveOptions): Promise; /** * Removes all items from a collection. * * The `truncate()` method returns a Promise that resolves after all items * have been removed from the specified collection. * * `truncate()` runs when the current user is the site owner, or when the method is called with [elevated permissions](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-elevated-permissions). * * > **Note:** `truncate()` also clears multiple-item reference fields in collections referenced by the specified collection. For example, suppose you have a **Movies** collection with an **Actors** field that contains multiple references to items in a People collection. Truncating the **Movies** collection also clears the data in the corresponding multiple-item reference field in the People collection. * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @param dataCollectionId - ID of the collection to truncate. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.TruncateDataItems */ export declare function truncate(dataCollectionId: string): Promise; /** * Adds a number of items to a collection. * * The `bulkInsert()` method returns a Promise that resolves after the items * have been added to the specified collection. The Promise is rejected if the * current user does not have "create" permissions for the collection. Items * are skipped if they include an `_id` property whose value matches an * existing ID in the collection. This means that `bulkInsert()` cannot overwrite an * existing item in the collection. * * Calling the `bulkInsert()` method triggers the [`beforeInsert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-insert) and [`afterInsert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-insert) events for each item that is inserted, if these events have been defined. * * When inserting items into a collection that has a reference field, set the * values of the reference fields to the referenced item's `_id` value or the * entire referenced item object. * * The `bulkInsert()` method adds the following properties and values to the * item when it adds it to the collection: * - `_id`: A unique identifier for an item in a collection, if the item * doesn't have one or has one that is `undefined`. You can optionally * provide your own ID. Once an ID is assigned to an item it cannot be * changed. * - `_createdDate`: The date the item was added to the collection. * - `_updatedDate`: The date the item was modified. When the item is first * added, the `createdDate` and `updatedDate` are the same. * * Any valid JavaScript object can be added as a property value. The * `bulkInsert()` method maintains the structure of the specified object. For * example, objects that contain nested objects, arrays, or arrays with nested * objects are all added to the collection as defined. * * * > **Notes:** * > - The maximum size of an item that you can add to a collection is 500kb. * > - If an item's `_id` property value is set to `null` or an empty string, an error is thrown. * > - Bulk operations are limited to 1000 items per method call. * > - The `bulkInsert()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection). * > - The `bulkInsert()` method does not support multi-reference fields. For multi-reference fields, use `insertReference()`. * > - [Translatable collections](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content) do not allow insertion and modification of items when working in a non-primary language. For example, if a collection's primary language is English, and the site visitor is viewing the site in French, calling `bulkInsert()` fails and issues an error. * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField items * @param dataCollectionId - ID of the collection to which the items belong. * @param items - Data items to insert. * @param options - Options to use when processing this operation. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.BulkInsertDataItems */ export declare function bulkInsert(dataCollectionId: string, items: Partial[], options?: WixDataBulkInsertOptions): Promise; /** * Updates a number of items in a collection. * * The `bulkUpdate()` method returns a Promise that resolves after the items * have been updated in the specified collection. The Promise is rejected if * the current user does not have update permissions for the collection. Items * are skipped if they include an `_id` property whose value does not match an * existing ID in the collection. Meaning, `bulkUpdate()` cannot add new items * into the collection. * * Calling the `bulkUpdate()` method triggers the [`beforeUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-update) and [`afterUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-update) hooks for each item that is updated if the hooks have been defined. * * The `bulkUpdate()` method compares the `_id` property of the specified items with the `_id` property values of the items in the specified collection. * * > **Warning:** * > If an existing item in the specified collection matches the `_id` of the specified item, `bulkUpdate()` replaces the existing item's property values with the ones in the specified item. If the existing item had properties with values and those properties are not included in the specified item, the values in those properties are lost. * * The item's `_updatedDate` property is also updated to the current date. * * Any valid JavaScript object can be used as a property value. The * `bulkUpdate()` method maintains the structure of the specified object. For * example, objects that contain nested objects, arrays, or arrays with nested * objects are all added to the collection as defined. * * * When updating items in a collection that has a reference field, set the * values of the reference field to the referenced item's `_id` value or the * entire referenced item object. * * > **Notes:** * > - The maximum size of an item that you can update in a collection is 500kb. * > - Bulk operations are limited to 1000 items per method call. * > - The `bulkUpdate()` method does not support multi-reference fields. For multi-reference fields, use `replaceReferences()` or `insertReference()`. * > - [Translatable collections](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content) do not allow insertion and modification of items when working in a non-primary language. For example, if a collection's primary language is English, and the site visitor is viewing the site in French, calling `bulkUpdate()` fails and issues an error. * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField items * @param dataCollectionId - ID of the collection to which the items belong. * @param items - Data items to update. * @param options - Options to use when processing this operation. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.BulkUpdateDataItems */ export declare function bulkUpdate(dataCollectionId: string, items: WixDataItem[], options?: WixDataBulkUpdateOptions): Promise; /** * Inserts or updates a number of items in a collection. * * The `bulkSave()` method returns a Promise that resolves after the items * have been added or updated in the specified collection. The Promise is * rejected if the current user does not have the necessary permissions for the * collection. * * The `bulkSave()` method inserts or updates the specified items, depending * on whether they already exist in the collection. It compares the `_id` * property value of the specified items with the `_id` property values of the * items in the specified collection. * * - If an item in the collection has the specified `_id` value, `bulkSave()` * uses `update()` to update the item in the collection, triggering the * `beforeUpdate()` and `afterUpdate()` hooks for that item if they have been * defined. * - If none of the items in the collection contain that `_id` value, the * specified item does not have an `_id` property, or if the specified item's * `_id` property is `undefined`, `bulkSave()` uses `insert()` to add the * specified item into the collection. This triggers the [`beforeInsert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-insert) and [`afterInsert()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-insert) hooks for that item if they have been defined. * * When saving items to a collection that has a reference field, set the values * of the reference fields to the referenced item's `_id` value or the entire * referenced item object. * * > **Notes:** * > - The maximum size of an item that you can save to a collection is 500kb. * > - If an item's `_id` property value is set to null or an empty string, an error is thrown. * > - Bulk operations are limited to 1000 items per method call. * > - The `bulkSave()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection). * > - The `bulkSave()` method does not support multi-reference fields. For multi-reference fields, use `replaceReferences()` or `insertReference()`. * > - [Translatable collections](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content) do not allow insertion and modification of items when working in a non-primary language. For example, if a collection's primary language is English, and the site visitor is viewing the site in French, calling `bulkSave()` fails and issues an error. * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField items * @param dataCollectionId - ID of the collection to which the items belong. * @param items - Data items to save. * @param options - Options to use when processing this operation. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.BulkSaveDataItems */ export declare function bulkSave(dataCollectionId: string, items: Partial[], options?: WixDataBulkSaveOptions): Promise; /** * Removes a number of items from a collection. * * The `bulkRemove()` method returns a Promise that resolves after the items have been removed from the specified collection. The Promise is rejected if the current user does not have "delete" permissions for the collection. If the delete permissions for the collection are assigned to [**Item's creator**](https://support.wix.com/en/article/cms-collection-permissions-overview#set-custom-permissions-for-more-access-control), the only items that are deleted are those for which the current user is the owner. All other items are skipped. * * Calling the `bulkRemove()` method triggers the [`beforeRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-remove) and [`afterRemove()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-remove) hooks for each item that is deleted if the hooks have been defined. * * > **Notes:** * > - The `bulkRemove()` method also clears multiple-item reference fields * > for items in collections referenced by the specified items. For example, * > suppose you have a **Movies** collection with an **Actors** field that * > contains multiple references to items in a **People** collection. * > Removing items in the **Movies** collection also clears the data in the * > corresponding multiple-item reference fields in the People collection. * > - Bulk operations are limited to 1000 items per method call. * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField dataItemIds * @param dataCollectionId - ID of the collection to which the items belong. * @param itemIds - IDs of the items to remove. The array must contain at least one item. Passing an empty array returns an error. * @param options - Options to use when processing this operation. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.BulkRemoveDataItems */ export declare function bulkRemove(dataCollectionId: string, itemIds: string[], options?: WixDataBulkRemoveOptions): Promise; /** * Checks if a reference to the referenced item exists in the specified field of the referring item. * * The `isReferenced()` method returns a Promise that resolves to true if the referring item contains a reference to the referenced item in the specified field. The Promise is rejected if the current user does not have read permissions for the collection. * * > **Note:** The `isReferenced()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection). * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField referencedItemId * @requiredField referringItemFieldName * @requiredField referringItemId * @requiredField referringItem * @requiredField referencedItem * @requiredField field * @param dataCollectionId - ID of the collection containing the referring item. * @param field - Field to check for a reference to the item that might be referenced. * @param referringItem - Referring item. * @param referencedItem - Item that might be referenced. * @param options - Options for checking whether a field contains a reference to an item. * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @fqn com.wixpress.cloud.data.api.data.DataItemService.IsReferencedDataItem */ export declare function isReferenced(dataCollectionId: string, field: string, referringItem: WixDataItem | string, referencedItem: WixDataItem | string, options?: WixDataReadOptions): Promise; /** * Inserts a reference in the specified property. * * The `insertReference()` method returns a Promise that resolves when a * reference to the referenced item(s) is added to the referring item in the * specified property. The Promise is rejected if the current user does not * have update permissions for the collection. * * > **Notes:** * > - The `insertReference()` method only applies to multi-reference fields. * > - The `insertReference()` method is not supported for Single Item * > Collections. * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField field * @requiredField referringItem * @requiredField referencedItem * @param dataCollectionId - ID of the collection that contains the referring item. * @param field - Field to insert the reference into. * @param referringItem - Referring item or referring item's ID. * @param referencedItem - Referenced item, referenced item's ID, an array of referenced items, or an array of referenced item IDs. * @param options - Options to use when processing this operation. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.InsertDataItemReference */ export declare function insertReference(dataCollectionId: string, field: string, referringItem: WixDataItem | string, referencedItem: WixDataItem | string | WixDataItem[] | string[], options?: WixDataOptions): Promise; /** * Removes a reference from the specified property. * * The `removeReference()` method returns a Promise that resolves when a * reference to the referenced item(s) is removed from the specified property * in the referring item. The Promise is rejected if the current user does not * have update permissions for the collection. * * > **Note:** The `removeReference()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection). * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField field * @requiredField referringItem * @requiredField referencedItem * @param dataCollectionId - ID of the collection that contains the referring item. * @param field - Field from which to remove the reference. * @param referringItem - Referring item or referring item's ID. * @param referencedItem - Referenced item, referenced item's ID, an array of referenced items, or an array of referenced item IDs. * @param options - Options to use when processing this operation. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.RemoveDataItemReference */ export declare function removeReference(dataCollectionId: string, field: string, referringItem: WixDataItem | string, referencedItem: WixDataItem | string | WixDataItem[] | string[], options?: WixDataOptions): Promise; /** * Replaces current references with references in the specified property. * * The `replaceReferences()` method returns a Promise that resolves when the * item's current references in the specified property are removed and * references to the referenced items are added in their place. The Promise is * rejected if the current user does not have update permissions for the * collection. * * * > **Note:** The `replaceReferences()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection). * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField field * @requiredField referringItem * @requiredField referencedItem * @param dataCollectionId - ID of the collection that contains the referring item. * @param field - Field to replaces the references in. * @param referringItem - Referring item or referring item's ID. * @param referencedItem - Referenced item, referenced item's ID, an array of referenced items, or an array of referenced item IDs. * @param options - Options to use when processing this operation. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.ReplaceDataItemReferences */ export declare function replaceReferences(dataCollectionId: string, field: string, referringItem: WixDataItem | string, referencedItem: WixDataItem | string | WixDataItem[] | string[], options?: WixDataOptions): Promise; /** * Creates a patch to modify the specified item. Unlike [`update()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/update), only the fields specified in the request are modified. Data that isn't explicitly modified remains unchanged. * * * The `patch()` method builds a patch to modify a data item in a specified collection. It returns a `WixDataPatch` object that contains the patch definition, which you can further refine by chaining [`WixDataPatch`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-patch/introduction) methods onto it. These methods allow you to clear, set, and increment field values, as well as add or remove items from array fields. The methods are applied in the order in which they are chained. * * Finally, to run the patch, chain [`run()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-patch/run) as the last method. * * If an item is found in the specified collection with the specified ID, that item is patched. If the collection doesn't contain an item with that ID, the request fails. * * Calling the `patch()` method triggers the [`beforeUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-update) and [`afterUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-update) hooks, if they have been defined. * * > **Notes**: * > - When an item is patched, its `data._updatedDate` property is updated to the current date and time. * > - You can only patch items in [collections created by Wix users](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection). Items in [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code) cannot be patched. * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField itemId * @param dataCollectionId - ID of the collection that contains the item to patch. * @param itemId - ID of the data item to patch. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.PatchDataItem */ export declare function patch(dataCollectionId: string, itemId: string): WixDataPatch; /** * Creates a bulk patch to modify the specified items. Unlike [`bulkUpdate()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/bulk-update), only the fields specified in the request are modified. Data that isn't explicitly modified remains unchanged. * * The `bulkPatch()` method builds a bulk patch to modify multiple data items in a collection. It returns a `WixDataBulkPatch` object that contains the bulk patch definition, which you can further refine by chaining [`WixDataBulkPatch`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-bulk-patch/introduction) methods onto it. These methods allow you to clear, set, and increment field values, as well as add or remove items from array fields. The methods are applied in the order in which they are chained. * * Finally, to run the bulk patch, chain [`run()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-bulk-patch/run) as the last method. * * Calling the `bulkPatch()` method triggers the [`beforeUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/before-update) and [`afterUpdate()`](https://dev.wix.com/docs/velo/api-reference/wix-data/hooks/after-update) hooks for each patched item, if the hooks have been defined. * * > **Notes**: * > - This method does not support multi-reference fields. For multi-reference fields, use [`insertReference()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/insert-reference) or [`replaceReferences()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/replace-references). * > - This method is limited to 100 items per method call. * > - You can only patch items in [collections created by Wix users](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection). Items in [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code) cannot be patched. * > - [Translatable collections](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content) do not allow insertion and modification of items when working in a non-primary language. For example, if a collection's primary language is English, and the site visitor is viewing the site in French, calling `bulkPatch()` fails and issues an error. * > - When an item is patched, its `data._updatedDate` field is updated to the current date and time. * > - The maximum size of a patched collection item is 500kb. * > - If an item ID isn't found, the `errors` array in the response returned by [`run()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-bulk-patch/run) contains a corresponding item with details about the error. Learn more about [Wix Data Error Codes](https://dev.wix.com/docs/sdk/backend-modules/data/wix-data-error-codes). * * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField itemIds * @param dataCollectionId - ID of the collection that contains the items to patch. * @param itemIds - IDs of the data items to patch. * @permissionScope Write Data Items * @permissionScopeId SCOPE.DC-DATA.WRITE * @fqn com.wixpress.cloud.data.api.data.DataItemService.BulkPatchDataItems */ export declare function bulkPatch(dataCollectionId: string, itemIds: string[]): WixDataBulkPatch; /** * Creates a query to retrieve items from a database collection. * * The `query()` method builds a query to retrieve data items from a collection and returns a `WixDataQuery` object, which contains the query definition. You can refine the query by chaining [`WixDataQuery` methods](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/introduction) onto the query. `WixDataQuery` methods enable you to sort, filter, and control the query results. * * * The methods chained to `query()` are applied in the order they are called. For example, if you sort by an `age` field in ascending order and then by a `name` field in descending order, the results are sorted first by the age of the items. If there are multiple results with the same age, they are further sorted by name in descending order, per age value. * * Finally, to run the query, chain [`find()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/find) or [`distinct()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/distinct) as the last method. * * The `query()` method runs with the following `WixDataQuery` defaults that you can override: * - `skip`: `0` * - `limit`: `50` * - `descending`: by `_createdDate` * - `include`: `none` * * > **Notes**: * > - When calling `query()` immediately following an update to your collection, the data retrieved might not contain the most recent changes. If you need the most up-to-date data, set the `options.consistentRead` parameter of the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/find) or [`distinct()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-query/distinct) methods to `true`. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency). * > - To speed up data retrieval, the results of certain data queries are cached. Learn more about [caching data query results](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/data-api/about-caching-data-query-results). * > - Items marked [in the CMS as hidden](https://support.wix.com/en/article/cms-controlling-live-site-item-visibility-from-your-collection) are not retrieved. * > - If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To retrieve data from the referenced items, specify them using the `include()` method. * > - When querying [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), make sure the fields you use to refine your query support the intended operations. Learn more about [querying by Wix app collection fields](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections). * * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @param dataCollectionId - ID of the collection to run the query on. * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @applicableIdentity APP * @fqn com.wixpress.cloud.data.api.data.DataItemService.QueryDataItems */ /** * Creates a query on a data collection. * @param dataCollectionId - ID of the collection to run the query on. * @returns A `WixDataQuery` builder object. */ export declare function query(dataCollectionId: string): WixDataQuery; /** * Executes a query directly on a data collection. * @internal * @param dataCollectionId - ID of the collection to run the query on. * @param queryRequest - Query parameters including filter, sort, limit, skip, fields, and include. * @param options - Options for running the query. * @returns Promise that resolves to the query results. */ export declare function query(dataCollectionId: string, queryRequest: WixDataQueryRequest, options?: WixDataQueryOptions): Promise>; /** * Creates a search operation to find items in a database collection. * * The `search()` method builds a search operation to find data items in the specified collection based on text search and filter criteria. It returns a [`WixDataSearch`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-search/introduction) object that defines the search operation, which you can refine by chaining [`WixDataSearch`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-search/introduction) methods onto it. These methods define the search expression and mode, apply filters, and control sorting and pagination of search results. * * The methods chained to `search()` are applied in the order they are called. For example, if you specify an expression, apply filters, and then sort by a field, the search first finds items that match the expression and filters, and then sorts the results. * * Finally, to run the search, chain [`run()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-search/run) as the last method. * * The `search()` method runs with the following [`WixDataSearch`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-search/introduction) defaults that you can override: * - `skip`: `0` * - `limit`: `100` * - `ascending`: by `_id` * * > **Notes**: * > - Search operations are [eventually consistent](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency) and might not reflect recent changes. * > - Searching isn't currently supported for [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections), [external collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site) or [Wix Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/about-wix-blocks). * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @param dataCollectionId - ID of the collection in which to run the search. * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ */ export declare function search(dataCollectionId: string): WixDataSearch; /** * Executes a search directly on a data collection. * @internal * @param dataCollectionId - ID of the collection to run the search on. * @param searchRequest - Search parameters including expression, mode, filter, sort, and paging. * @param options - Options for running the search. * @returns Promise that resolves to the search results. */ export declare function search(dataCollectionId: string, searchRequest: WixDataSearchRequest, options?: WixDataDirectSearchOptions): Promise; /** * Creates an aggregation on a data collection. * * The `aggregate()` method builds an aggregation on the specified collection and returns a `WixDataAggregate` object. * * An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries. * * You can also add paging, filtering, and sorting preferences to your aggregation by chaining [`WixDataAggregate`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate/introduction) methods. The returned object contains the aggregate definition. * * Finally, to run the aggregation, chain [`run()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-aggregate/run) as the last method. * * The `aggregate()` method runs with the following defaults that you can override: * * + `skip`: `0` * + `limit`: `50` * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @param dataCollectionId - ID of the collection to run the aggregation on. * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @applicableIdentity APP * @fqn com.wixpress.cloud.data.api.data.DataItemService.AggregateDataItems */ export declare function aggregate(dataCollectionId: string): WixDataAggregate; /** * Executes an aggregation pipeline directly on a data collection. * @internal * @param dataCollectionId - ID of the collection to run the aggregation on. * @param pipeline - Aggregation pipeline with stages and paging. * @param options - Options for running the aggregation. * @returns Promise that resolves to the aggregation results. */ export declare function aggregate(dataCollectionId: string, pipeline: AggregationPipeline, options?: WixDataAggregateOptions): Promise; /** * Runs an aggregation pipeline on a data collection and returns the results. * * Aggregations enable you to perform advanced data calculations, transformations, and groupings. While [`aggregate()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate) allows you to perform basic aggregations, `aggregatePipeline()` allows you to perform advanced aggregations sequentially in stages, with each stage transforming the results of the previous stage. * * When calling the `aggregatePipeline()` method, specify the collection ID and an aggregation pipeline. To build the pipeline, call the [`pipelineBuilder()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder) method and chain [`PipelineBuilder`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/introduction) methods to add stages and configure paging. * * `aggregatePipeline()` returns the aggregated results and pagination information. * * > **Note**: You can only build an aggregation pipeline for collections [created in the CMS](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection) or with the [Data Collections API](https://dev.wix.com/docs/sdk/backend-modules/data/collections/introduction). They cannot be used on [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) or [external collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site). * * @public * @documentationMaturity preview * @requiredField dataCollectionId * @param dataCollectionId - ID of the collection to run the aggregation pipeline on. * @param pipeline - Aggregation pipeline with data processing stages and paging configuration. Call [`pipelineBuilder()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder) to build the pipeline. * @param options - Options for running the aggregation pipeline. * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @applicableIdentity APP * @fqn com.wixpress.cloud.data.api.data.DataItemService.AggregatePipelineDataItems */ export declare function aggregatePipeline(dataCollectionId: string, pipeline: AggregationPipeline, options?: WixDataAggregateOptions): Promise; /** * Retrieves distinct values for a specified field directly from a data collection. * @internal * @param dataCollectionId - ID of the collection to retrieve distinct values from. * @param fieldName - Field whose distinct values are retrieved. * @param options - Options for running the distinct operation. * @returns Promise that resolves to the distinct results. */ export declare function distinct(dataCollectionId: string, fieldName: string, options?: WixDataDistinctOptions): Promise; /** * Counts the number of items directly in a data collection. * @internal * @param dataCollectionId - ID of the collection to count items in. * @param options - Options for running the count. * @returns Promise that resolves to the number of items. */ export declare function count(dataCollectionId: string, options?: WixDataCountOptions): Promise; /** * Retrieves the full items referenced in the specified field of an item. * * Reference and multi-reference fields refer to items in different collections. Use this method to retrieve the full details of the referenced items. * * For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection. Querying the **Movies** collection using `queryReferenced()` retrieves the relevant **People** items referenced in the **Actors** field of the specified **Movie** item. This gives you information from the **People** collection about each of the actors in the specified movie. * * The `queryReferenced()` method returns a Promise that resolves to the full items referenced in the specified property of the item from the specified collection. The Promise is rejected if the current user does not have read permissions for the specified collection or the collection containing the referenced items. * * > **Notes**: * > - You can only call `queryReferenced()` for [multi-reference fields](https://support.wix.com/en/article/about-referencing-multiple-items-in-one-field). * > - This method does not support [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection). * > - When calling `queryReferenced()` immediately following an update to your collection, the data retrieved [may not contain the most recent changes](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency). If you need the most up-to-date data, set `options.consistentRead` to `true`. * > - To speed up data retrieval, the results of certain data queries are cached. Learn more about [caching data query results](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/data-api/about-caching-data-query-results). * * Learn more about [querying items that reference other items](https://support.wix.com/en/article/including-referenced-data-when-filtering). * @public * @documentationMaturity preview * @requiredField dataCollectionId * @requiredField referringItem * @requiredField field * @param dataCollectionId - ID of the collection that contains the referring item. * @param referringItem - Referring item or referring item's ID. * @param field - Field that contains the references to the referenced items. * @param options - Options for querying referenced data items. * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @applicableIdentity APP * @fqn com.wixpress.cloud.data.api.data.DataItemService.QueryReferencedDataItems */ export declare function queryReferenced(dataCollectionId: string, referringItem: WixDataItem | string, field: string, options?: WixDataQueryReferencedOptions): Promise; /** * Creates a filter for queries and aggregations. * * The `filter()` method builds a filter to be applied to a query or an aggregation. It returns a `WixDataFilter` object, which can be used with other filter methods such as `and()`, `or()` and `not()`, to create complex filter definitions. * * When working with [Wix app collections](https://dev.wix.com/docs/develop-websites/articles/databases/wix-data/collections/working-with-wix-app-collections-and-code), check which fields can be used in a filter. * * @public * @documentationMaturity preview */ export declare function filter(): WixDataFilter; /** * Sets the [collection environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing) for any methods chained to it. * * The `withEnvironment()` method returns a new Wix Data context configured with the specified collection environment. Methods chained to this method run in the specified environment. Methods not chained to `withEnvironment()` run in the environment determined by [the part of the Wix ecosystem that executes the code](https://dev.wix.com/docs/develop-websites/articles/get-started/the-wix-ecosystem). * * > **Notes**: * > - To run methods in a sandbox environment, the site must have [sandbox collections enabled](https://support.wix.com/en/article/cms-accessing-and-syncing-your-sandbox-and-live-collections#enabling-sandbox-collections). * > - You can only set the [sandbox environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#sandbox-collections) for collections [created in the CMS](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection) or with the [Data Collections API](https://dev.wix.com/docs/sdk/backend-modules/data/collections/introduction). The environment of [shared collections](https://support.wix.com/en/article/wix-enterprise-sharing-cms-collections-with-sites-and-templates), [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections), and [external collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site) cannot be set. * * @param environment - Collection environment in which to run the chained methods. Default: `LIVE`. * @public * @requiredField environment * @documentationMaturity preview * @returns Wix Data context configured with the specified environment. */ export declare function withEnvironment(environment: Environment): WixDataApi; export declare enum Environment { /** Collection [live environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#live-collections). */ LIVE = "LIVE", /** Collection [sandbox environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#sandbox-collections). */ SANDBOX = "SANDBOX", /** Collection sandbox environment if [it has been enabled](https://support.wix.com/en/article/cms-accessing-and-syncing-your-sandbox-and-live-collections#enabling-sandbox-collections). Otherwise, chained methods run in the live environment. */ SANDBOX_PREFERRED = "SANDBOX_PREFERRED" } /** * Triggered when a data item is inserted. * @public * @documentationMaturity preview * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @webhook * @eventType wix.data.v2.data_item_created * @serviceIdentifier com.wixpress.cloud.data.api.data.DataItemService * @slug created */ export declare function onDataItemCreated(handler: (event: DataItemCreatedEnvelope) => void | Promise): void; /** * Triggered when a data item is updated or patched. * @public * @documentationMaturity preview * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @webhook * @eventType wix.data.v2.data_item_updated * @serviceIdentifier com.wixpress.cloud.data.api.data.DataItemService * @slug updated */ export declare function onDataItemUpdated(handler: (event: DataItemUpdatedEnvelope) => void | Promise): void; /** * Triggered when a data item is deleted or truncated. * @public * @documentationMaturity preview * @permissionScope Read Data Items * @permissionScopeId SCOPE.DC-DATA.READ * @webhook * @eventType wix.data.v2.data_item_deleted * @serviceIdentifier com.wixpress.cloud.data.api.data.DataItemService * @slug deleted */ export declare function onDataItemDeleted(handler: (event: DataItemDeletedEnvelope) => void | Promise): void; export { WixDataReadOptions, WixDataReadWithProjectionOptions, WithIncludeFieldGroupsOption, WixDataGetOptions, WixDataOptions, WixDataUpdateOptions, WixDataSaveOptions, WixDataItem, WixDataBulkResult, WixDataBulkError, WixDataQuery, WixDataPatch, WixDataBulkPatch, WixDataAggregate, WixDataAggregatePipelineExpressions, WixDataAggregatePipelineStages, FilterStage, ProjectStage, GroupStage, UnwindStage, SortStage, LimitStage, SkipStage, ObjectToArrayStage, QueryBase, WixDataFilter, WixDataResult, WixDataQueryReferencedOptions, WixDataPatchOptions, WixDataSearch, PipelineStage, pipelineBuilder, QueryBuilder, Sort, Filter, WixDataDirectQueryOptions, WixDataSearchRequest, WixDataDirectSearchOptions, SearchBuilder, SearchParams, expressions, stages, FieldExpression, TextExpression, NumericExpression, AddExpression, SubtractExpression, MultiplyExpression, DivideExpression, SumExpression, AbsExpression, ModExpression, FloorExpression, CeilExpression, ConcatExpression, StringifyExpression, ToLowerExpression, ToUpperExpression, SubstringExpression, LengthExpression, WixDataAggregateOptions, WixDataCountOptions, AggregationPipeline, AggregatePipelineDataItemsResponse, WixDataDistinctOptions, }; /** @builder */ export interface PipelineBuilder extends _PipelineBuilder { } /** @hidden */ export declare const PipelineBuilder: () => _PipelineBuilder; /** @hidden */ export declare const Stages: WixDataAggregatePipelineStages; /** @hidden */ export declare const Expressions: WixDataAggregatePipelineExpressions; export { WixDataQueryOptions, WixDataQueryRequest, } from '@wix/wix-data-items-common'; export * from './data-v2-data-item-items.types';