import { a$ as QueryDataItemsEnvelope, d as QueryDataItemsResponse, b0 as CountDataItemsEnvelope, q as CountDataItemsResponse, b1 as AggregateDataItemsEnvelope, z as AggregateDataItemsResponse, b2 as QueryDistinctValuesEnvelope, E as QueryDistinctValuesResponse, b3 as InsertDataItemsEnvelope, G as InsertDataItemsResponse, b4 as UpdateDataItemsEnvelope, L as UpdateDataItemsResponse, b5 as RemoveDataItemsEnvelope, T as RemoveDataItemsResponse, b6 as TruncateDataItemsEnvelope, X as TruncateDataItemsResponse, b7 as QueryReferencedDataItemsEnvelope, _ as QueryReferencedDataItemsResponse, b8 as InsertDataItemReferencesEnvelope, a2 as InsertDataItemReferencesResponse, b9 as RemoveDataItemReferencesEnvelope, a6 as RemoveDataItemReferencesResponse, ba as ListCollectionsEnvelope, a8 as ListCollectionsResponse, bb as CreateCollectionEnvelope, at as CreateCollectionResponse, bc as UpdateCollectionEnvelope, av as UpdateCollectionResponse, bd as DeleteCollectionEnvelope, ax as DeleteCollectionResponse, be as GetCapabilitiesEnvelope, az as GetCapabilitiesResponse } from './service-plugins-error-classes-mEaPq0c_.js'; export { A as AggregateDataItemsRequest, r as AggregateDataItemsRequestPagingMethodOneOf, y as Aggregation, aN as AlternativeUri, ah as ArrayOptions, ai as ArrayOptionsTypeOptionsOneOf, t as Average, a_ as BadRequestWixError, a9 as Collection, h as CollectionAlreadyExistsError, aU as CollectionAlreadyExistsWixError, an as CollectionCapabilities, m as CollectionChangeNotSupported, n as CollectionChangeNotSupportedError, aZ as CollectionChangeNotSupportedWixError, i as CollectionNotFoundError, aV as CollectionNotFoundWixError, aO as Context, x as Count, o as CountDataItemsRequest, as as CreateCollectionRequest, aH as CreateIndexRequest, aI as CreateIndexResponse, C as CursorPaging, f as Cursors, H as DataItemModificationResult, J as DataItemModificationResultResultOneOf, ao as DataOperation, aw as DeleteCollectionRequest, K as Error, aL as ExternalDatabaseSpiConfig, aa as Field, ad as FieldCapabilities, ac as FieldType, ab as FieldTypeOptionsOneOf, ay as GetCapabilitiesRequest, aQ as IdentificationData, aR as IdentificationDataIdOneOf, aP as IdentityType, aD as Index, aF as IndexField, aA as IndexOptions, a0 as InsertDataItemReferencesRequest, F as InsertDataItemsRequest, I as ItemAlreadyExistsError, aS as ItemAlreadyExistsWixError, g as ItemNotFoundError, aT as ItemNotFoundWixError, a7 as ListCollectionsRequest, aB as ListIndexesRequest, aC as ListIndexesResponse, M as MainEntity, v as Max, u as Min, ag as MultiReferenceOptions, al as ObjectField, am as ObjectFieldTypeOptionsOneOf, aj as ObjectOptions, O as Operation, s as OperationCalculateOneOf, aE as Order, P as Paging, e as PagingMetadataV2, ar as PagingMode, ap as Permissions, Q as QueryDataItemsRequest, B as QueryDistinctValuesRequest, D as QueryDistinctValuesRequestPagingMethodOneOf, ae as QueryOperator, Y as QueryReferencedDataItemsRequest, Z as QueryReferencedDataItemsRequestPagingMethodOneOf, a as QueryV2, b as QueryV2PagingMethodOneOf, j as ReferenceAlreadyExistsError, aW as ReferenceAlreadyExistsWixError, a1 as ReferenceId, a3 as ReferenceModificationResult, a4 as ReferenceModificationResultResultOneOf, k as ReferenceNotFoundError, aX as ReferenceNotFoundWixError, $ as ReferencedItem, R as ReferencedItemToInclude, a5 as RemoveDataItemReferencesRequest, N as RemoveDataItemsRequest, aJ as RemoveIndexRequest, aK as RemoveIndexResponse, aq as Role, af as SingleReferenceOptions, ak as SlugOptions, c as SortOrder, S as Sorting, aM as SpiBaseUri, aG as Status, w as Sum, W as TruncateDataItemsRequest, au as UpdateCollectionRequest, U as UpdateDataItemsRequest, V as ValidationError, l as ValidationViolation, aY as ValidationWixError } from './service-plugins-error-classes-mEaPq0c_.js'; import '@wix/sdk-types'; /** * 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 */ declare function queryDataItems(payload: QueryDataItemsEnvelope): QueryDataItemsResponse | Promise; /** Counts the number of items in the specified data collection that match the filtering preferences. */ declare function countDataItems(payload: CountDataItemsEnvelope): CountDataItemsResponse | Promise; /** Runs an aggregation query on the specified data collection and returns the resulting list of items. */ 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. */ 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. */ 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. */ declare function updateDataItems(payload: UpdateDataItemsEnvelope): UpdateDataItemsResponse | Promise; /** Removes one or more items from a collection. The response object must contain the removed item. */ declare function removeDataItems(payload: RemoveDataItemsEnvelope): RemoveDataItemsResponse | Promise; /** Removes all items from a collection. */ 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. */ declare function queryReferencedDataItems(payload: QueryReferencedDataItemsEnvelope): QueryReferencedDataItemsResponse | Promise; /** Inserts one or more item references into a referring field of the specified item. */ declare function insertDataItemReferences(payload: InsertDataItemReferencesEnvelope): InsertDataItemReferencesResponse | Promise; /** Removes one or more item references from a referring field of the specified item. */ 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. */ declare function listCollections(payload: ListCollectionsEnvelope): ListCollectionsResponse | Promise; /** Creates a new data collection. */ 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. */ declare function updateCollection(payload: UpdateCollectionEnvelope): UpdateCollectionResponse | Promise; /** Deletes a data collection. */ declare function deleteCollection(payload: DeleteCollectionEnvelope): DeleteCollectionResponse | Promise; /** Lists the global capabilities the external database supports. */ declare function getCapabilities(payload: GetCapabilitiesEnvelope): GetCapabilitiesResponse | Promise; export { AggregateDataItemsEnvelope, AggregateDataItemsResponse, CountDataItemsEnvelope, CountDataItemsResponse, CreateCollectionEnvelope, CreateCollectionResponse, DeleteCollectionEnvelope, DeleteCollectionResponse, GetCapabilitiesEnvelope, GetCapabilitiesResponse, InsertDataItemReferencesEnvelope, InsertDataItemReferencesResponse, InsertDataItemsEnvelope, InsertDataItemsResponse, ListCollectionsEnvelope, ListCollectionsResponse, QueryDataItemsEnvelope, QueryDataItemsResponse, QueryDistinctValuesEnvelope, QueryDistinctValuesResponse, QueryReferencedDataItemsEnvelope, QueryReferencedDataItemsResponse, RemoveDataItemReferencesEnvelope, RemoveDataItemReferencesResponse, RemoveDataItemsEnvelope, RemoveDataItemsResponse, TruncateDataItemsEnvelope, TruncateDataItemsResponse, UpdateCollectionEnvelope, UpdateCollectionResponse, UpdateDataItemsEnvelope, UpdateDataItemsResponse, aggregateDataItems, countDataItems, createCollection, deleteCollection, getCapabilities, insertDataItemReferences, insertDataItems, listCollections, queryDataItems, queryDistinctValues, queryReferencedDataItems, removeDataItemReferences, removeDataItems, truncateDataItems, updateCollection, updateDataItems };