import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types'; import { InsertOptions, InsertResponse, UpdateOptions, UpdateResponse, SaveOptions, SaveResponse, GetOptions, GetResponse, RemoveOptions, RemoveResponse, TruncateOptions, QueryOptions, QueryResponse, AggregateOptions, AggregationResponse, CountOptions, CountResponse, DistinctOptions, DistinctResponse, BulkInsertOptions, BulkInsertResponse, BulkSaveOptions, BulkSaveResponse, BulkUpdateOptions, BulkUpdateResponse, BulkRemoveOptions, BulkRemoveResponse, QueryReferencedOptions, QueryReferencedResponse, BulkInsertReferencesOptions, BulkReplaceReferencesOptions, BulkRemoveReferencesOptions, IsReferencedOptions, IsReferencedResponse } from './index.typings.js'; export { AggregationRequest, ApplicationError, BulkError, BulkInsertReferencesRequest, BulkInsertReferencesResponse, BulkInsertRequest, BulkPatchRequest, BulkPatchResponse, BulkRemoveReferencesRequest, BulkRemoveReferencesResponse, BulkRemoveRequest, BulkRemoveRequestEntry, BulkReplaceReferencesRequest, BulkReplaceReferencesResponse, BulkSaveRequest, BulkUpdateRequest, CountRequest, CursorPaging, Cursors, Details, DistinctRequest, Entry, GetRequest, InsertRequest, IsReferencedRequest, Item, Options, Order, OrderWithLiterals, Paging, PagingMetadataV2, PatchRequest, PatchResponse, PatchWhereRequest, PatchWhereResponse, Query, QueryReferencedRequest, QueryRequest, QueryV2, QueryV2PagingMethodOneOf, ReadOptions, Reference, ReferencedEntity, ReferencedEntityEntityOneOf, RemoveRequest, RestoreFromTrashBinRequest, RestoreFromTrashBinResponse, SaveRequest, Segment, SegmentWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, TruncateRequest, TruncateResponse, UpdateRequest } from './index.typings.js'; /** @internal */ declare function insert$1(httpClient: HttpClient): InsertSignature; interface InsertSignature { /** * Adds an item to a collection. * * When an item is inserted into a collection, the following properties and values are added to it: * * `_id`: A unique identifier for an item in a collection. 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. * * `_createdDate`: The date the item was added to the collection. * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value. * @deprecated */ (options?: InsertOptions): Promise; } /** @internal */ declare function update$1(httpClient: HttpClient): UpdateSignature; interface UpdateSignature { /** * Updates an item in a collection. * * An item ID must be submitted as part of the request, either as a path parameter or within the `item` body parameter. 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 request fails. * * When an item is updated, its `_updatedDate` property is changed to the current date. * * **Note:** * After an item is updated, it only contains the properties included in the Update Data Item request. If the existing item has properties with values and those properties * aren't included in the updated item, their values are lost. * @deprecated */ (options?: NonNullablePaths): Promise; } /** @internal */ declare function save$1(httpClient: HttpClient): SaveSignature; interface SaveSignature { /** * Inserts or updates an item in a collection. * * The Save Data Item endpoint 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 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 `_updatedDate` property is changed to the current date. * * ***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 properties and values are lost. * @deprecated */ (options?: SaveOptions): Promise; } /** @internal */ declare function get$1(httpClient: HttpClient): GetSignature; interface GetSignature { /** * Retrieves an item from a collection. * @param - ID of the item to retrieve. * @deprecated */ (itemId: string, options?: GetOptions): Promise; } /** @internal */ declare function remove$1(httpClient: HttpClient): RemoveSignature; interface RemoveSignature { /** * Removes an item from a collection. * * If any items in other collections reference the removed item in a reference or multi-reference field, the field is cleared. * * **Note:** * Once an item has been removed from a collection, it can't be restored. * @param - ID of the item to remove. * @deprecated */ (itemId: string, options?: RemoveOptions): Promise; } /** @internal */ declare function truncate$1(httpClient: HttpClient): TruncateSignature; interface TruncateSignature { /** * Removes all items from a collection. Site owner (`ADMIN`) permissions are required in order to invoke this operation. * * 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. * @deprecated */ (options?: TruncateOptions): Promise; } declare function query$1(httpClient: HttpClient): QuerySignature; interface QuerySignature { /** * Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide. * * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). * @deprecated */ (options?: QueryOptions): Promise>; } /** @internal */ declare function aggregate$1(httpClient: HttpClient): AggregateSignature; interface AggregateSignature { /** @deprecated */ (options?: AggregateOptions): Promise>; } /** @internal */ declare function count$1(httpClient: HttpClient): CountSignature; interface CountSignature { /** * Returns the number of items in a collection that match a query. * @deprecated */ (options?: CountOptions): Promise>; } /** @internal */ declare function distinct$1(httpClient: HttpClient): DistinctSignature; interface DistinctSignature { /** * Retrieves a list of distinct values for a given property in all items that match a query, without duplicates. * * As with the [Query Data Items]() endpoint, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide. * However, the Query Distinct Values endpoint doesn't return all of the full items that match the query. * Rather, it returns all unique values of the property you specify in `propertyName` for items that match the query. * If more than one item has the same value for that property, 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). * @deprecated */ (options?: NonNullablePaths): Promise>; } /** @internal */ declare function bulkInsert$1(httpClient: HttpClient): BulkInsertSignature; interface BulkInsertSignature { /** * Adds multiple items to a collection. * * When each item is inserted into a collection, the following properties and values are added to it: * * `_id`: A unique identifier for an item in a collection. 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. * * `_createdDate`: The date the item was added to the collection. * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value. * * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds`. * When any items can't be inserted, error details are provided for each failed item in `errors`. * @deprecated */ (options?: NonNullablePaths): Promise>; } /** @internal */ declare function bulkSave$1(httpClient: HttpClient): BulkSaveSignature; interface BulkSaveSignature { /** * Inserts or updates multiple items in a collection. * * The Bulk Save Data Items endpoint inserts or updates each item, 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 `_updatedDate` property is changed to the current date. * * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds` and a list of the IDs of items successfully updated in `updatedItemIds`. * When any items can't be inserted or updated, error details are provided for each failed item in `errors`. * * ***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 properties and values are lost. * @deprecated */ (options?: NonNullablePaths): Promise>; } /** @internal */ declare function bulkUpdate$1(httpClient: HttpClient): BulkUpdateSignature; interface BulkUpdateSignature { /** * Updates multiple items in a collection. * * 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 `_updatedDate` property is changed to the current date. * * The endpoint returns a list of the IDs of items successfully updated in `updatedItemIds`. * When any items can't be inserted, error details are provided for each failed item in `errors`. * * **Note:** * After each item is updated, it only contains the properties included in the Update Data Item request. If the existing item has properties with values and those properties * aren't included in the updated item, their values are lost. * @deprecated */ (options?: NonNullablePaths): Promise>; } /** @internal */ declare function bulkRemove$1(httpClient: HttpClient): BulkRemoveSignature; interface BulkRemoveSignature { /** * Removes multiple items from a collection. * * If any items in other collections reference the removed items in reference or multi-reference fields, the fields are cleared. * * The endpoint returns a list of the IDs of items successfully removed in `removedItemIds`. * When any items can't be removed, error details are provided for each failed item in `errors`. * * **Note:** Once an item has been removed from a collection, it can't be restored. * @deprecated */ (options?: BulkRemoveOptions): Promise>; } /** @internal */ declare function queryReferenced$1(httpClient: HttpClient): QueryReferencedSignature; interface QueryReferencedSignature { /** * Gets the full items referenced in the specified property of an item. * * 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 the Query Referenced Data Items endpoint 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. * @deprecated */ (options?: NonNullablePaths): Promise>; } /** @internal */ declare function bulkInsertReferences$1(httpClient: HttpClient): BulkInsertReferencesSignature; interface BulkInsertReferencesSignature { /** * Inserts one or more references in the specified properties of items in a collection. * * The Bulk Insert References endpoint adds one or more references to a collection. * Each new reference in the `references` field specifies a referring item's ID, the property in which to insert the reference, and the ID of the referenced item. * @deprecated */ (options?: NonNullablePaths): Promise; } /** @internal */ declare function bulkReplaceReferences$1(httpClient: HttpClient): BulkReplaceReferencesSignature; interface BulkReplaceReferencesSignature { /** * Replaces references in a specified property of a specified data item. * * The Bulk Replace References endpoint replaces the existing reference or references contained in the property specified in `propertyName` within the data item specified in `referringItemId`. * The endpoint removes existing references and in their place it adds references to the items specified in `newReferencedItemIds`. * @deprecated */ (options?: NonNullablePaths): Promise; } /** @internal */ declare function bulkRemoveReferences$1(httpClient: HttpClient): BulkRemoveReferencesSignature; interface BulkRemoveReferencesSignature { /** * Removes one or more references. * @deprecated */ (options?: NonNullablePaths): Promise; } /** @internal */ declare function isReferenced$1(httpClient: HttpClient): IsReferencedSignature; interface IsReferencedSignature { /** * Checks if a specific property of a referring item contains a reference to another specific item. * @deprecated */ (options?: NonNullablePaths): Promise>; } /** @internal */ declare const insert: MaybeContext & typeof insert$1>; /** @internal */ declare const update: MaybeContext & typeof update$1>; /** @internal */ declare const save: MaybeContext & typeof save$1>; /** @internal */ declare const get: MaybeContext & typeof get$1>; /** @internal */ declare const remove: MaybeContext & typeof remove$1>; /** @internal */ declare const truncate: MaybeContext & typeof truncate$1>; declare const query: MaybeContext & typeof query$1>; /** @internal */ declare const aggregate: MaybeContext & typeof aggregate$1>; /** @internal */ declare const count: MaybeContext & typeof count$1>; /** @internal */ declare const distinct: MaybeContext & typeof distinct$1>; /** @internal */ declare const bulkInsert: MaybeContext & typeof bulkInsert$1>; /** @internal */ declare const bulkSave: MaybeContext & typeof bulkSave$1>; /** @internal */ declare const bulkUpdate: MaybeContext & typeof bulkUpdate$1>; /** @internal */ declare const bulkRemove: MaybeContext & typeof bulkRemove$1>; /** @internal */ declare const queryReferenced: MaybeContext & typeof queryReferenced$1>; /** @internal */ declare const bulkInsertReferences: MaybeContext & typeof bulkInsertReferences$1>; /** @internal */ declare const bulkReplaceReferences: MaybeContext & typeof bulkReplaceReferences$1>; /** @internal */ declare const bulkRemoveReferences: MaybeContext & typeof bulkRemoveReferences$1>; /** @internal */ declare const isReferenced: MaybeContext & typeof isReferenced$1>; export { AggregateOptions, AggregationResponse, BulkInsertOptions, BulkInsertReferencesOptions, BulkInsertResponse, BulkRemoveOptions, BulkRemoveReferencesOptions, BulkRemoveResponse, BulkReplaceReferencesOptions, BulkSaveOptions, BulkSaveResponse, BulkUpdateOptions, BulkUpdateResponse, CountOptions, CountResponse, DistinctOptions, DistinctResponse, GetOptions, GetResponse, InsertOptions, InsertResponse, IsReferencedOptions, IsReferencedResponse, QueryOptions, QueryReferencedOptions, QueryReferencedResponse, QueryResponse, RemoveOptions, RemoveResponse, SaveOptions, SaveResponse, TruncateOptions, UpdateOptions, UpdateResponse, aggregate, bulkInsert, bulkInsertReferences, bulkRemove, bulkRemoveReferences, bulkReplaceReferences, bulkSave, bulkUpdate, count, distinct, get, insert, isReferenced, query, queryReferenced, remove, save, truncate, update };