import { EventDefinition, HttpClient } from '@wix/sdk-types'; import { AggregateDataItemsOptions, AggregateDataItemsResponse, BulkInsertDataItemReferencesOptions, BulkInsertDataItemReferencesResponse, BulkInsertDataItemReferencesResponseNonNullableFields, BulkInsertDataItemsOptions, BulkInsertDataItemsResponse, BulkInsertDataItemsResponseNonNullableFields, BulkRemoveDataItemReferencesOptions, BulkRemoveDataItemReferencesResponse, BulkRemoveDataItemReferencesResponseNonNullableFields, BulkRemoveDataItemsOptions, BulkRemoveDataItemsResponse, BulkRemoveDataItemsResponseNonNullableFields, BulkSaveDataItemsOptions, BulkSaveDataItemsResponse, BulkSaveDataItemsResponseNonNullableFields, BulkUpdateDataItemsOptions, BulkUpdateDataItemsResponse, BulkUpdateDataItemsResponseNonNullableFields, CountDataItemsOptions, CountDataItemsResponse, CountDataItemsResponseNonNullableFields, DataItem, DataItemCreatedEnvelope, DataItemDeletedEnvelope, DataItemNonNullableFields, DataItemUpdatedEnvelope, DataItemsQueryBuilder, GetDataItemOptions, InsertDataItemOptions, InsertDataItemReferenceOptions, InsertDataItemReferenceResponse, InsertDataItemReferenceResponseNonNullableFields, InsertDataItemResponse, InsertDataItemResponseNonNullableFields, IsReferencedDataItemOptions, IsReferencedDataItemResponse, IsReferencedDataItemResponseNonNullableFields, QueryDataItemsOptions, QueryDistinctValuesOptions, QueryDistinctValuesResponse, QueryReferencedDataItemsOptions, QueryReferencedDataItemsResponse, QueryReferencedDataItemsResponseNonNullableFields, RemoveDataItemOptions, RemoveDataItemReferenceOptions, RemoveDataItemReferenceResponse, RemoveDataItemReferenceResponseNonNullableFields, RemoveDataItemResponse, RemoveDataItemResponseNonNullableFields, ReplaceDataItemReferencesOptions, ReplaceDataItemReferencesResponse, ReplaceDataItemReferencesResponseNonNullableFields, SaveDataItemOptions, SaveDataItemResponse, SaveDataItemResponseNonNullableFields, TruncateDataItemsOptions, UpdateDataItemOptions, UpdateDataItemResponse, UpdateDataItemResponseNonNullableFields } from './data-v2-data-item-items.universal.js'; export declare const __metadata: { PACKAGE_NAME: string; }; export declare function insertDataItem(httpClient: HttpClient): InsertDataItemSignature; interface InsertDataItemSignature { /** * Adds an item to a collection. * * * An item can only be inserted into an existing connection. * You can create a new collection using the Data Collections API. * * When an item is inserted into a collection, the item's ID is automatically assigned a random value. * You can optionally provide a custom ID in `dataItem.id` when inserting the item. * If you specify an ID that already exists in the collection, the insertion will fail. * * If `options.dataItem.data` is empty, a new item is created with no data fields. * @param - Options for adding an item to a collection. */ (options?: InsertDataItemOptions | undefined): Promise; } export declare function updateDataItem(httpClient: HttpClient): UpdateDataItemSignature; interface UpdateDataItemSignature { /** * Updates an item in a collection. * * * This function replaces the data item's existing data with the payload provided in `options.dataItem.data` in the request. * * To update an item, you need to specify an item ID and a collection ID. * If an item is found in the specified collection with the specified ID, that item is updated. * If the collection doesn't contain an item with that ID, the request fails. * * When an item is updated, its `data._updatedDate` field is changed to the current date and time. * * > **Note:** * > After an item is updated, it only contains the fields included in the `options.dataItem.data` payload in the `updateDataItem()` call. * > If the existing item has fields with values and those fields aren't included in the updated item, their values are lost. * @param - Data item ID. * @param - Options for updating an item in a collection. */ (_id: string, options?: UpdateDataItemOptions | undefined): Promise; } export declare function saveDataItem(httpClient: HttpClient): SaveDataItemSignature; interface SaveDataItemSignature { /** * Inserts or updates an item in a collection. * * * The `saveDataItem()` function inserts or updates the specified item, depending on whether it already exists in the collection. * * + If you don't provide an ID, a new item is created. * * + If you provide an ID that does not exist in the collection, a new item is created with that ID. * * + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time. * * > **Note:** When you provide an item with an ID that already exists in the collection, the payload you provide in `options.dataItem.data` replaces the existing item with that ID. * > This means that the item's previous fields and values are lost. * @param - Options for saving an item in a collection. */ (options?: SaveDataItemOptions | undefined): Promise; } export declare function getDataItem(httpClient: HttpClient): GetDataItemSignature; interface GetDataItemSignature { /** * Retrieves an item from a collection. * * * > **Note**: When calling `getDataItem()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`. * @param - ID of the data item to retrieve. * @param - Options for retrieving an item from a collection. * @returns Retrieved item. */ (dataItemId: string, options?: GetDataItemOptions | undefined): Promise; } export declare function removeDataItem(httpClient: HttpClient): RemoveDataItemSignature; interface RemoveDataItemSignature { /** * Removes an item from a collection. * * * If any items in other collections reference the removed item in reference or multi-reference fields, those fields are cleared. * * > **Note:** * > Once an item has been removed from a collection, it can't be restored. * @param - ID of the item to remove. * @param - Options for removing an item from a collection. */ (dataItemId: string, options?: RemoveDataItemOptions | undefined): Promise; } export declare function truncateDataItems(httpClient: HttpClient): TruncateDataItemsSignature; interface TruncateDataItemsSignature { /** * Removes all items from a collection. * * * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared. * * > **Note:** * > Once items have been removed from a collection, they can't be restored. * @param - Options for truncating data items from a collection. */ (options: TruncateDataItemsOptions): Promise; } export declare function queryDataItems(httpClient: HttpClient): QueryDataItemsSignature; interface QueryDataItemsSignature { /** * Creates a query to retrieve items from a database collection. * * The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a `DataItemsQueryBuilder` object. * * The returned object contains the query definition which is typically used to run the query using the `find()` function. * * You can refine the query by chaining `DataItemsQueryBuilder` functions onto the query. `DataItemsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDataItems()` returns. * * The `queryDataItems()` function runs with the following `DataItemsQueryBuilder` defaults that you can override: * * + `skip`: 0 * + `limit`: 50 * + `descending`: by `_createdDate` * * The functions that are chained to `queryDataItems()` are applied in the order they are called. For example, if you sort on an `age` field in ascending order and then on a `name` field in descending order, the results are sorted first by the age of the items and then, if there are multiple results with the same age, the items are sorted by name in descending order, per age value. * * If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To get the data from referenced items, specify them in the `options.includeReferencedItems` parameter. * * > **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`. * * * @param - Options for querying data items. */ (options: QueryDataItemsOptions): DataItemsQueryBuilder; } export declare function aggregateDataItems(httpClient: HttpClient): AggregateDataItemsSignature; interface AggregateDataItemsSignature { /** * Runs an aggregation on a data collection and returns the resulting list of items. * * * 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 to retrieve exactly what you need. * @param - Options for running an aggregation. */ (options?: AggregateDataItemsOptions | undefined): Promise; } export declare function countDataItems(httpClient: HttpClient): CountDataItemsSignature; interface CountDataItemsSignature { /** * Counts the number of items in a data collection that match the provided filtering preferences. * * > **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`. * @param - Options for counting the number of items in a data collection. */ (options?: CountDataItemsOptions | undefined): Promise; } export declare function queryDistinctValues(httpClient: HttpClient): QueryDistinctValuesSignature; interface QueryDistinctValuesSignature { /** * Retrieves a list of distinct values for a given field in all items that match a query, without duplicates. * * * As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide. * However, `queryDistinctValues()` doesn't return all of the full items that match the query. * Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query. * If more than one item has the same value for that field, that value appears only once. * * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). * * > **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`. * @param - Options for querying distinct values. */ (options?: QueryDistinctValuesOptions | undefined): Promise; } export declare function bulkInsertDataItems(httpClient: HttpClient): BulkInsertDataItemsSignature; interface BulkInsertDataItemsSignature { /** * Adds multiple items to a collection. * * * When each item is inserted into a collection, its ID is automatically assigned a random value. * You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail. * @param - Options for adding multiple items to a collection. */ (options?: BulkInsertDataItemsOptions | undefined): Promise; } export declare function bulkUpdateDataItems(httpClient: HttpClient): BulkUpdateDataItemsSignature; interface BulkUpdateDataItemsSignature { /** * Updates multiple items in a collection. * * * This function replaces each specified data item's existing data with the payload provided in the request. * * Each item in the request must include an ID. If an item is found in the specified collection with * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails. * * When an item is updated, its `data._updatedDate` field is changed to the current date and time. * * > **Note:** * > After each item is updated, it only contains the fields included in the request. If the existing item has fields with values and those fields * > aren't included in the updated item, their values are lost. * @param - Options for updating multiple items in a collection. */ (options?: BulkUpdateDataItemsOptions | undefined): Promise; } export declare function bulkSaveDataItems(httpClient: HttpClient): BulkSaveDataItemsSignature; interface BulkSaveDataItemsSignature { /** * Inserts or updates multiple items in a collection. * * * This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item: * * + If you don't provide an ID, a new item is created. * * + If you provide an ID that doesn't exist in the collection, a new item is created with that ID. * * + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time. * * > **Note:** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID. * > This means that all of the item's previous fields and values are lost. * @param - Options for saving multiple items in a collection. */ (options?: BulkSaveDataItemsOptions | undefined): Promise; } export declare function bulkRemoveDataItems(httpClient: HttpClient): BulkRemoveDataItemsSignature; interface BulkRemoveDataItemsSignature { /** * Removes multiple items from a collection. * * * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared. * * > **Note:** Once an item has been removed from a collection, it can't be restored. * @param - Options for removing multiple items from a collection. */ (options?: BulkRemoveDataItemsOptions | undefined): Promise; } export declare function queryReferencedDataItems(httpClient: HttpClient): QueryReferencedDataItemsSignature; interface QueryReferencedDataItemsSignature { /** * 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 function to retrieve the full details of the referenced items themselves. * * 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 `queryReferencedDataItems()` returns 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. * * > **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`. * @param - Options for querying referenced data items. */ (options?: QueryReferencedDataItemsOptions | undefined): Promise; } export declare function isReferencedDataItem(httpClient: HttpClient): IsReferencedDataItemSignature; interface IsReferencedDataItemSignature { /** * Checks whether a field in a referring item contains a reference to a specified item. * * > **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`. * @param - Options for checking whether a field contains a reference to an item. */ (options?: IsReferencedDataItemOptions | undefined): Promise; } export declare function insertDataItemReference(httpClient: HttpClient): InsertDataItemReferenceSignature; interface InsertDataItemReferenceSignature { /** * Inserts a reference in the specified field in an item in a collection. * * * A reference in `options.dataItemReference` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item. * @param - Options for inserting a reference. */ (options?: InsertDataItemReferenceOptions | undefined): Promise; } export declare function removeDataItemReference(httpClient: HttpClient): RemoveDataItemReferenceSignature; interface RemoveDataItemReferenceSignature { /** * Removes the specified reference from the specified field. * @param - Options for removing a reference. */ (options: RemoveDataItemReferenceOptions): Promise; } export declare function bulkInsertDataItemReferences(httpClient: HttpClient): BulkInsertDataItemReferencesSignature; interface BulkInsertDataItemReferencesSignature { /** * Inserts one or more references in the specified fields of items in a collection. * * * This endpoint adds one or more references to a collection. * Each new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item. * @param - Options for inserting one or more references. */ (options?: BulkInsertDataItemReferencesOptions | undefined): Promise; } export declare function bulkRemoveDataItemReferences(httpClient: HttpClient): BulkRemoveDataItemReferencesSignature; interface BulkRemoveDataItemReferencesSignature { /** * Removes one or more references. * @param - Options for removing one or more references. */ (options: BulkRemoveDataItemReferencesOptions): Promise; } export declare function replaceDataItemReferences(httpClient: HttpClient): ReplaceDataItemReferencesSignature; interface ReplaceDataItemReferencesSignature { /** * Replaces references in a specified field of a specified data item. * * * This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`. * The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`. * * > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed. * @param - Options for replacing references. */ (options?: ReplaceDataItemReferencesOptions | undefined): Promise; } export declare const onDataItemCreated: EventDefinition; export declare const onDataItemDeleted: EventDefinition; export declare const onDataItemUpdated: EventDefinition; export { ACTION, Action, ActionEvent, AggregateDataItemsOptions, AggregateDataItemsRequest, AggregateDataItemsRequestPagingMethodOneOf, AggregateDataItemsResponse, Aggregation, AppendToArray, ApplicationError, Average, BaseEventMetadata, BulkActionMetadata, BulkActionType, BulkDataItemReferenceResult, BulkDataItemResult, BulkInsertDataItemReferencesOptions, BulkInsertDataItemReferencesRequest, BulkInsertDataItemReferencesResponse, BulkInsertDataItemReferencesResponseNonNullableFields, BulkInsertDataItemsOptions, BulkInsertDataItemsRequest, BulkInsertDataItemsResponse, BulkInsertDataItemsResponseNonNullableFields, BulkPatchDataItemsRequest, BulkPatchDataItemsResponse, BulkRemoveDataItemReferencesOptions, BulkRemoveDataItemReferencesRequest, BulkRemoveDataItemReferencesResponse, BulkRemoveDataItemReferencesResponseNonNullableFields, BulkRemoveDataItemsOptions, BulkRemoveDataItemsRequest, BulkRemoveDataItemsResponse, BulkRemoveDataItemsResponseNonNullableFields, BulkSaveDataItemsOptions, BulkSaveDataItemsRequest, BulkSaveDataItemsResponse, BulkSaveDataItemsResponseNonNullableFields, BulkUpdateDataItemsOptions, BulkUpdateDataItemsRequest, BulkUpdateDataItemsResponse, BulkUpdateDataItemsResponseNonNullableFields, CachingInfo, Count, CountDataItemsOptions, CountDataItemsRequest, CountDataItemsResponse, CountDataItemsResponseNonNullableFields, CursorPaging, Cursors, DataItem, DataItemCreatedEnvelope, DataItemDeletedEnvelope, DataItemNonNullableFields, DataItemReference, DataItemUpdatedEnvelope, DataItemsQueryBuilder, DataItemsQueryResult, DataPublishPluginOptions, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Environment, EventMetadata, FieldUpdate, FieldUpdateActionOptionsOneOf, GetDataItemOptions, GetDataItemRequest, GetDataItemResponse, GetDataItemResponseNonNullableFields, IdentificationData, IdentificationDataIdOneOf, IncrementField, InsertDataItemOptions, InsertDataItemReferenceOptions, InsertDataItemReferenceRequest, InsertDataItemReferenceResponse, InsertDataItemReferenceResponseNonNullableFields, InsertDataItemRequest, InsertDataItemResponse, InsertDataItemResponseNonNullableFields, IsReferencedDataItemOptions, IsReferencedDataItemRequest, IsReferencedDataItemResponse, IsReferencedDataItemResponseNonNullableFields, ItemMetadata, Max, MessageEnvelope, Min, Operation, OperationCalculateOneOf, Options, Paging, PagingMetadataV2, PatchDataItemRequest, PatchDataItemResponse, PatchSet, PublishPluginOptions, QueryDataItemsOptions, QueryDataItemsRequest, QueryDataItemsResponse, QueryDataItemsResponseNonNullableFields, QueryDistinctValuesOptions, QueryDistinctValuesRequest, QueryDistinctValuesRequestPagingMethodOneOf, QueryDistinctValuesResponse, QueryReferencedDataItemsOptions, QueryReferencedDataItemsRequest, QueryReferencedDataItemsRequestPagingMethodOneOf, QueryReferencedDataItemsResponse, QueryReferencedDataItemsResponseNonNullableFields, QueryV2, QueryV2PagingMethodOneOf, ReferencedItemOptions, ReferencedResult, ReferencedResultEntityOneOf, RemoveDataItemOptions, RemoveDataItemReferenceOptions, RemoveDataItemReferenceRequest, RemoveDataItemReferenceResponse, RemoveDataItemReferenceResponseNonNullableFields, RemoveDataItemRequest, RemoveDataItemResponse, RemoveDataItemResponseNonNullableFields, RemoveFromArray, ReplaceDataItemReferencesOptions, ReplaceDataItemReferencesRequest, ReplaceDataItemReferencesResponse, ReplaceDataItemReferencesResponseNonNullableFields, RestoreInfo, SaveDataItemOptions, SaveDataItemRequest, SaveDataItemResponse, SaveDataItemResponseNonNullableFields, SetField, SortOrder, Sorting, Sum, TruncateDataItemsOptions, TruncateDataItemsRequest, TruncateDataItemsResponse, UnresolvedReference, UpdateDataItemOptions, UpdateDataItemRequest, UpdateDataItemResponse, UpdateDataItemResponseNonNullableFields, WebhookIdentityType, } from './data-v2-data-item-items.universal.js';