import { QueryDataItemsResponse, CountDataItemsResponse, AggregateDataItemsResponse, QueryDistinctValuesResponse, InsertDataItemsResponse, UpdateDataItemsResponse, RemoveDataItemsResponse, TruncateDataItemsResponse, QueryReferencedDataItemsResponse, InsertDataItemReferencesResponse, RemoveDataItemReferencesResponse, ListCollectionsResponse, CreateCollectionResponse, UpdateCollectionResponse, DeleteCollectionResponse, GetCapabilitiesResponse } from './src/service-plugins-types.js'; import { QueryDataItemsEnvelope, CountDataItemsEnvelope, AggregateDataItemsEnvelope, QueryDistinctValuesEnvelope, InsertDataItemsEnvelope, UpdateDataItemsEnvelope, RemoveDataItemsEnvelope, TruncateDataItemsEnvelope, QueryReferencedDataItemsEnvelope, InsertDataItemReferencesEnvelope, RemoveDataItemReferencesEnvelope, ListCollectionsEnvelope, CreateCollectionEnvelope, UpdateCollectionEnvelope, DeleteCollectionEnvelope, GetCapabilitiesEnvelope } from './src/data-externaldatabasespi-v3-main-entity.public.js'; export * from './src/service-plugins-error-classes'; export * from './src/service-plugins-types'; export { QueryDataItemsEnvelope, CountDataItemsEnvelope, AggregateDataItemsEnvelope, QueryDistinctValuesEnvelope, InsertDataItemsEnvelope, UpdateDataItemsEnvelope, RemoveDataItemsEnvelope, TruncateDataItemsEnvelope, QueryReferencedDataItemsEnvelope, InsertDataItemReferencesEnvelope, RemoveDataItemReferencesEnvelope, ListCollectionsEnvelope, CreateCollectionEnvelope, UpdateCollectionEnvelope, DeleteCollectionEnvelope, GetCapabilitiesEnvelope, }; /** * Retrieves a list of items based on the provided filtering, sorting, and paging preferences. * @throws ItemAlreadyExistsWixError * @throws ItemNotFoundWixError * @throws CollectionAlreadyExistsWixError * @throws CollectionNotFoundWixError * @throws ReferenceAlreadyExistsWixError * @throws ReferenceNotFoundWixError * @throws ValidationWixError * @throws CollectionChangeNotSupportedWixError * @throws BadRequestWixError */ export declare function queryDataItems(payload: QueryDataItemsEnvelope): QueryDataItemsResponse | Promise; /** Counts the number of items in the specified data collection that match the filtering preferences. */ export declare function countDataItems(payload: CountDataItemsEnvelope): CountDataItemsResponse | Promise; /** Runs an aggregation query on the specified data collection and returns the resulting list of items. */ export declare function aggregateDataItems(payload: AggregateDataItemsEnvelope): AggregateDataItemsResponse | Promise; /** * Retrieves a list of distinct values for a given field for all items that match the query, without duplicates. * * As with [`queryDataItems()`](/external-database/query-data-items), this function retrieves items based on the filtering, sorting, and paging preferences provided. However, this function does not return the full items that match the query. Rather, for items that match the query, it returns all unique values in the field specified in `fieldName`. If more than one item has the same value in that field, that value appears only once. */ export declare function queryDistinctValues(payload: QueryDistinctValuesEnvelope): QueryDistinctValuesResponse | Promise; /** * Adds one or more items to a collection. * * A data item object contains the `_id` and `_owner` fields. The response array must include the same items that were inserted, and each returned item must be added the `_createdDate` and `_updatedDate` fields. * * However, data items can also be inserted without an `_id` field. In that case, it is the service provider's responsibility to generate a unique ID for each item. */ export declare function insertDataItems(payload: InsertDataItemsEnvelope): InsertDataItemsResponse | Promise; /** * Updates one or more items in a collection. Items must be completely replaced. * * The response array must include the same items that were updated, and each returned item must be added the `_createdDate` and `_updatedDate` fields. */ export declare function updateDataItems(payload: UpdateDataItemsEnvelope): UpdateDataItemsResponse | Promise; /** Removes one or more items from a collection. The response object must contain the removed item. */ export declare function removeDataItems(payload: RemoveDataItemsEnvelope): RemoveDataItemsResponse | Promise; /** Removes all items from a collection. */ export declare function truncateDataItems(payload: TruncateDataItemsEnvelope): TruncateDataItemsResponse | Promise; /** * Retrieves the items referenced in the specified field of a referring item. Reference fields refer to items that exist in different collections. Implement this function so callers can retrieve the full details of the referenced items. * * This service plugin supports item multi-references, which means that data collections can have many-to-many relationships with other collections. For example, consider a scenario where a **Movies** collection includes a multi-reference **Actors** field, which might refer to several **Actor** items in an **Actors** collection. Users can therefore query the **Movies** collection to retrieve the **Actor** items referenced in each **Movie** item. * * > **Notes:** * > - This function does not retrieve the full referenced items of referenced items. For example, the referenced **Actors** collection might itself contain a multi-reference field with references to **Award** items in an **Awards** collection. When calling this function to retrieve the referenced items of any **Movie** item, the response contains the referenced **Actor** items, but only the IDs of the **Award** items. To retrieve the full **Award** items, the user must either call this function for the **Actors** collection, or the [`queryDataItems()`](/external-database/query-data-items) function for the **Awards** collection. * > - This function might also be called when a user calls the [`isReferenced()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/is-referenced-data-item) function of the Data API. */ export declare function queryReferencedDataItems(payload: QueryReferencedDataItemsEnvelope): QueryReferencedDataItemsResponse | Promise; /** Inserts one or more item references into a referring field of the specified item. */ export declare function insertDataItemReferences(payload: InsertDataItemReferencesEnvelope): InsertDataItemReferencesResponse | Promise; /** Removes one or more item references from a referring field of the specified item. */ export declare function removeDataItemReferences(payload: RemoveDataItemReferencesEnvelope): RemoveDataItemReferencesResponse | Promise; /** * Retrieves a list of data collections and their details. * * When `collectionIds` is empty, all existing collections are returned. * If a specified collection does not exist, that collection can be ignored. */ export declare function listCollections(payload: ListCollectionsEnvelope): ListCollectionsResponse | Promise; /** Creates a new data collection. */ export declare function createCollection(payload: CreateCollectionEnvelope): CreateCollectionResponse | Promise; /** * Updates the structure of an existing data collection. * * Some parameters, such as `capabilities` and `pagingMode`, are determined by the service provider. If the collection passed in the request contains these parameters, their values must be ignored. However, these fields must be included in the response collection with relevant values. */ export declare function updateCollection(payload: UpdateCollectionEnvelope): UpdateCollectionResponse | Promise; /** Deletes a data collection. */ export declare function deleteCollection(payload: DeleteCollectionEnvelope): DeleteCollectionResponse | Promise; /** Lists the global capabilities the external database supports. */ export declare function getCapabilities(payload: GetCapabilitiesEnvelope): GetCapabilitiesResponse | Promise;