{"version":3,"sources":["../../../src/data-v1-data-service-data.universal.ts","../../../src/data-v1-data-service-data.http.ts","../../../src/data-v1-data-service-data.public.ts","../../../src/data-v1-data-service-data.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV1DataService from './data-v1-data-service-data.http.js';\n\nexport interface Item {\n  item?: Record<string, any> | null;\n}\n\nexport interface InsertRequest {\n  /** Item to insert. */\n  item?: Record<string, any> | null;\n  /** ID of the collection in which to insert the item. */\n  dataCollectionId?: string;\n}\n\nexport enum Segment {\n  /** Access database used in the Live site. */\n  LIVE = 'LIVE',\n  /** Access staging (sandbox) database used in the editor. */\n  SANDBOX = 'SANDBOX',\n  /** Access deleted database used in the Live site. */\n  TRASH_LIVE = 'TRASH_LIVE',\n}\n\n/** @enumType */\nexport type SegmentWithLiterals = Segment | 'LIVE' | 'SANDBOX' | 'TRASH_LIVE';\n\nexport interface Options {}\n\nexport interface InsertResponse {\n  /** Inserted item. */\n  item?: Record<string, any> | null;\n}\n\nexport interface UpdateRequest {\n  /** Item to update. The existing item is replaced with this version. */\n  item: Record<string, any> | null;\n  /** ID of the collection containing the existing item. */\n  dataCollectionId?: string;\n}\n\nexport interface UpdateResponse {\n  /** Updated item */\n  item?: Record<string, any> | null;\n}\n\nexport interface SaveRequest {\n  /** Item to insert or update. */\n  item?: Record<string, any> | null;\n  /** ID of the collection in which to insert or update the item. */\n  dataCollectionId?: string;\n}\n\nexport interface SaveResponse {\n  /** Inserted or updated item. */\n  item?: Record<string, any> | null;\n}\n\nexport interface PatchRequest {\n  /** item id to patch */\n  itemId?: string;\n  /** Patch data */\n  patch?: Record<string, any> | null;\n  /** Data access options */\n  options?: Options;\n  /** ID of the collection */\n  dataCollectionId?: string;\n}\n\nexport interface PatchResponse {\n  /** Patched item */\n  item?: Record<string, any> | null;\n}\n\nexport interface PatchWhereRequest {\n  /** Data segment */\n  segment?: SegmentWithLiterals;\n  /** filter items to patch */\n  filter?: any;\n  /** Patch data */\n  patch?: Record<string, any> | null;\n  /** Data access options */\n  options?: Options;\n  /** ID of the collection */\n  dataCollectionId?: string;\n}\n\nexport interface PatchWhereResponse {\n  /** Number of patched items */\n  totalCount?: number;\n  totalAffectedValues?: number;\n}\n\nexport interface GetRequest {\n  /** ID of the item to retrieve. */\n  itemId: string;\n  /** ID of the collection from which to retrieve the item. */\n  dataCollectionId?: string;\n}\n\nexport interface ReadOptions {}\n\nexport interface GetResponse {\n  /** Retrieved item. */\n  item?: Record<string, any> | null;\n}\n\nexport interface RemoveRequest {\n  /** ID of the item to remove. */\n  itemId: string;\n  /** ID of the collection from which to remove the item. */\n  dataCollectionId?: string;\n}\n\nexport interface RemoveResponse {\n  /** Removed item. */\n  item?: Record<string, any> | null;\n}\n\nexport interface TruncateRequest {\n  /** ID of the collection to truncate. */\n  dataCollectionId?: string;\n}\n\nexport interface TruncateResponse {}\n\nexport interface QueryRequest {\n  /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */\n  dataQuery?: QueryV2;\n  /**\n   * Whether to omit the total count in the response.\n   * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.\n   *\n   * Default: `false`\n   */\n  omitTotalCount?: boolean;\n  /**\n   * Properties for which to include referenced items in the query's results.\n   * Up to 50 referenced items can be included for each item that matches the query.\n   * If more than 50 items are referenced, `partialIncludes` in the response is `true`.\n   */\n  includeReferencedItems?: string[];\n  /** ID of the collection to query. */\n  dataCollectionId?: string;\n}\n\nexport interface Query {\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: any;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   */\n  sort?: Sorting[];\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n  /** Array of projected fields. A list of specific field names to return. */\n  fields?: string[];\n}\n\nexport interface Sorting {\n  /** Name of the field to sort by. */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n  /**\n   * Number of items to load.\n   * @max 1000\n   */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   */\n  sort?: Sorting[];\n  /** Array of projected fields. A list of specific field names to return. */\n  fields?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n  cursorPaging?: CursorPaging;\n}\n\nexport interface CursorPaging {\n  /**\n   * Number of items to load.\n   * @max 1000\n   */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results.\n   *\n   * You can get the relevant cursor token\n   * from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   */\n  cursor?: string | null;\n}\n\nexport interface QueryResponse {\n  /** Retrieved items. */\n  items?: Record<string, any>[] | null;\n  /**\n   * *Deprecated.** Refer to 'pagingMetadata' instead. Total number of items satisfying the query.\n   * @deprecated\n   */\n  totalCount?: number;\n  /**\n   * *Deprecated.** Refer to 'pagingMetadata' instead. Total number of items satisfying the query.\n   * @deprecated\n   */\n  totalResults?: number;\n  /** Whether referenced items are trimmed from the results. This occurs when there are more than 50 referenced items. */\n  partialIncludes?: boolean;\n  /** Paging information. */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n  total?: number | null;\n  /** Flag that indicates the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n  cursors?: Cursors;\n}\n\nexport interface Cursors {\n  /** Cursor pointing to next page in the list of results. */\n  next?: string | null;\n  /** Cursor pointing to previous page in the list of results. */\n  prev?: string | null;\n}\n\nexport interface AggregationRequest {\n  /** Paging preferences. */\n  paging?: Paging;\n  /** Filter applied to the collection's data prior to running the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object. */\n  initialFilter?: Record<string, any> | null;\n  /**\n   * Object defining the steps of the aggregation to be This is an object defining aggregation itself.\n   *\n   * * Grouping rule is defined as _id field. It takes a form of:\n   * {\n   * \"_id\": \"$field\"\n   * }\n   *\n   * If multiple fields are used for grouping, Group takes a form of:\n   * {\n   * \"_id\": {\n   * \"field1\": \"$field1\"\n   * \"field2\": \"$field2\"\n   * }\n   * }\n   *\n   * * Aggregation functions are defined as special field definitions.\n   *\n   * Average:\n   * {\n   * \"_id\": \"$field\"\n   * \"my_avg\": {\n   * \"$avg\": \"$other_field\"\n   * }\n   * }\n   *\n   * Max:\n   * {\n   * \"_id\": \"$field\"\n   * \"my_max\": {\n   * \"$max\": \"$other_field\"\n   * }\n   * }\n   *\n   * Min:\n   * {\n   * \"_id\": \"$field\"\n   * \"my_min\": {\n   * \"$min\": \"$other_field\"\n   * }\n   * }\n   *\n   * Sum:\n   * {\n   * \"_id\": \"$field\"\n   * \"my_sum\": {\n   * \"$sum\": \"$other_field\"\n   * }\n   * }\n   */\n  aggregation?: Record<string, any> | null;\n  /** Filter applied to the processed data following the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object. */\n  finalFilter?: Record<string, any> | null;\n  /** Sorting preferences. */\n  sort?: Sorting[];\n  /** ID of the collection on which to run the aggregation. */\n  dataCollectionId?: string;\n}\n\nexport interface AggregationResponse {\n  /** Aggregation results. */\n  items?: Record<string, any>[] | null;\n  /** Paging information. */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface CountRequest {\n  /** Filter preferences defining the query. For more information on how to structure a filter object, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section). */\n  filter?: Record<string, any> | null;\n  /** ID of the collection for which to count query results. */\n  dataCollectionId?: string;\n}\n\nexport interface CountResponse {\n  /** Count of items matching the query. */\n  totalCount?: number;\n  /**\n   * *Deprecated.** Refer to `totalCount` instead.\n   * @deprecated\n   */\n  totalResults?: number;\n}\n\nexport interface DistinctRequest {\n  /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */\n  dataQuery?: QueryV2;\n  /** Property name for which to return all distinct values. */\n  propertyName: string;\n  /** ID of the collection to query. */\n  dataCollectionId?: string;\n  /**\n   * Whether to omit the total count in the response.\n   * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.\n   *\n   * Default: `false`\n   */\n  omitTotalCount?: boolean;\n}\n\nexport interface DistinctResponse {\n  /** List of distinct values contained in the property specified in `propertyName`. */\n  items?: any[];\n  /** Paging information. */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface BulkInsertRequest {\n  /** Items to insert. */\n  items: Record<string, any>[] | null;\n  /** ID of the collection in which to insert the items. */\n  dataCollectionId?: string;\n}\n\nexport interface BulkInsertResponse {\n  /** IDs of items inserted. */\n  insertedItemIds?: string[];\n  /** Error details for items that couldn't be inserted. */\n  errors?: BulkError[];\n}\n\nexport interface BulkError {\n  /** ID of the item that couldn't be inserted. */\n  itemId?: string | null;\n  /** Error message. */\n  message?: string;\n  /** Error details. */\n  details?: Details;\n  /** Index of the failed item in the `items` paramater of the request. */\n  originalIndex?: number;\n}\n\nexport interface ApplicationError {\n  /** Error code. */\n  code?: string;\n  /** Error description. */\n  description?: string;\n  /** Error data. */\n  data?: Record<string, any> | null;\n}\n\nexport interface Details {\n  /** Application error. */\n  applicationError?: ApplicationError;\n}\n\nexport interface BulkSaveRequest {\n  /** Items to insert or update. */\n  items: Record<string, any>[] | null;\n  /** ID of the collection in which to insert or update the items. */\n  dataCollectionId?: string;\n}\n\nexport interface BulkSaveResponse {\n  /** IDs of items inserted. */\n  insertedItemIds?: string[];\n  /** IDs of items updated. */\n  updatedItemIds?: string[];\n  /** Errors for items that couldn't be inserted or updated. */\n  errors?: BulkError[];\n}\n\nexport interface BulkUpdateRequest {\n  /** Items to update. */\n  items: Record<string, any>[] | null;\n  /** ID of the collection in which to update items. */\n  dataCollectionId?: string;\n}\n\nexport interface BulkUpdateResponse {\n  /** IDs of items updated. */\n  updatedItemIds?: string[];\n  /** Errors for items that couldn't be updated. */\n  errors?: BulkError[];\n}\n\nexport interface BulkPatchRequest {\n  /** List of items and their patches */\n  entries?: Entry[];\n  /** Data access options */\n  options?: Options;\n  /** ID of the collection */\n  dataCollectionId?: string;\n}\n\nexport interface Entry {\n  /** item id to patch */\n  itemId?: string;\n  /** Patch data */\n  patch?: Record<string, any> | null;\n}\n\nexport interface BulkPatchResponse {\n  /** Patched item ids */\n  patchedItemIds?: string[];\n  /** Errors */\n  errors?: BulkError[];\n}\n\nexport interface BulkRemoveRequest {\n  /** IDs of items to remove. */\n  entries?: BulkRemoveRequestEntry[];\n  /** ID of the collection from which to remove the items. */\n  dataCollectionId?: string;\n}\n\nexport interface BulkRemoveRequestEntry {\n  /** ID of item to remove. */\n  itemId?: string;\n}\n\nexport interface BulkRemoveResponse {\n  /** IDs of items removed. */\n  removedItemIds?: string[];\n  /** Errors for items that couldn't be removed. */\n  errors?: BulkError[];\n}\n\nexport interface QueryReferencedRequest {\n  /** ID of the referring item. */\n  referringItemId: string;\n  /** Property containing the references to the referenced items. */\n  propertyName: string;\n  /** Paging preferences. */\n  paging?: Paging;\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n  /**\n   * Whether to omit the total count in the response.\n   * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.\n   *\n   * Default: `false`\n   */\n  omitTotalCount?: boolean;\n}\n\nexport enum Order {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type OrderWithLiterals = Order | 'ASC' | 'DESC';\n\nexport interface QueryReferencedResponse {\n  /**\n   * *Deprecated.** Refer to `entities` instead. List of referenced items.\n   * @deprecated\n   */\n  items?: Record<string, any>[] | null;\n  /**\n   * *Deprecated**. Refer to 'pagingMetadata' instead. Total number of referenced items satisfying the query.\n   * @deprecated\n   */\n  totalCount?: number;\n  /**\n   * *Deprecated**. Refer to 'pagingMetadata' instead. Total number of referenced items satisfying the query.\n   * @deprecated\n   */\n  totalResults?: number;\n  /** List of referenced items and/or IDs. For successfully resolved references, the referenced data item appears. For references that can't be resolved, the ID appears. */\n  entities?: ReferencedEntity[];\n  /** Paging information. */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface ReferencedEntity extends ReferencedEntityEntityOneOf {\n  /** Data item referenced. */\n  item?: Record<string, any> | null;\n  /** Unresolved ID. Appears instead of the data item when the reference doesn't resolve. For example, when an ID isn't found or if an item is in draft state. */\n  referenceId?: string;\n}\n\n/** @oneof */\nexport interface ReferencedEntityEntityOneOf {\n  /** Data item referenced. */\n  item?: Record<string, any> | null;\n  /** Unresolved ID. Appears instead of the data item when the reference doesn't resolve. For example, when an ID isn't found or if an item is in draft state. */\n  referenceId?: string;\n}\n\nexport interface BulkInsertReferencesRequest {\n  /**\n   * References to insert.\n   * @minSize 1\n   */\n  references: Reference[];\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n}\n\nexport interface Reference {\n  /** Property containing the references to the referenced items. */\n  propertyName?: string;\n  /** ID of the referring item. */\n  referringItemId?: string;\n  /** ID of the referenced item. */\n  referencedItemId?: string;\n}\n\nexport interface BulkInsertReferencesResponse {}\n\nexport interface BulkReplaceReferencesRequest {\n  /** Property containing the references to the referenced items. */\n  propertyName: string;\n  /** ID of the referring item. */\n  referringItemId: string;\n  /** List of new referenced item IDs to replace the existing ones. */\n  newReferencedItemIds?: string[];\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n}\n\nexport interface BulkReplaceReferencesResponse {}\n\nexport interface BulkRemoveReferencesRequest {\n  /**\n   * References to be removed.\n   * @minSize 1\n   */\n  references: Reference[];\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n}\n\nexport interface BulkRemoveReferencesResponse {}\n\nexport interface IsReferencedRequest {\n  /** Property that may contain a reference to the specified item. */\n  propertyName: string;\n  /** ID of the referring item. */\n  referringItemId: string;\n  /** ID of the item that may be referenced. */\n  referencedItemId: string;\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n}\n\nexport interface IsReferencedResponse {\n  /** Whether the specified property of the referring item contains a reference to the specified referenced item. */\n  isReferenced?: boolean;\n}\n\nexport interface RestoreFromTrashBinRequest {\n  /**\n   * Deprecated, use dataCollectionId instead.\n   * Collection name\n   * @deprecated Deprecated, use dataCollectionId instead.\n   * Collection name\n   * @replacedBy data_collection_id\n   */\n  collectionName?: string;\n  /** Item id */\n  itemId?: string;\n  /** Data access options */\n  options?: Options;\n  /** ID of the collection */\n  dataCollectionId?: string;\n}\n\nexport interface RestoreFromTrashBinResponse {\n  item?: Record<string, any> | null;\n}\n\n/**\n * Adds an item to a collection.\n *\n * When an item is inserted into a collection, the following properties and values are added to it:\n * * `_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.\n * * `_createdDate`: The date the item was added to the collection.\n * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.\n * @internal\n * @documentationMaturity preview\n * @permissionId WIX_DATA.INSERT\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Insert\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function insert(options?: InsertOptions): Promise<InsertResponse> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    item: options?.item,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.insert(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          item: '$[0].item',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface InsertOptions {\n  /** Item to insert. */\n  item?: Record<string, any> | null;\n  /** ID of the collection in which to insert the item. */\n  dataCollectionId?: string;\n}\n\n/**\n * Updates an item in a collection.\n *\n * 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\n * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the request fails.\n *\n * When an item is updated, its `_updatedDate` property is changed to the current date.\n *\n * **Note:**\n * 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\n * aren't included in the updated item, their values are lost.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.item\n * @permissionId WIX_DATA.UPDATE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Update\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function update(\n  options?: NonNullablePaths<UpdateOptions, `item`, 2>\n): Promise<UpdateResponse> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    item: options?.item,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.update(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          item: '$[0].item',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpdateOptions {\n  /** Item to update. The existing item is replaced with this version. */\n  item: Record<string, any> | null;\n  /** ID of the collection containing the existing item. */\n  dataCollectionId?: string;\n}\n\n/**\n * Inserts or updates an item in a collection.\n *\n * The Save Data Item endpoint inserts or updates the specified item, depending on whether it already exists in the collection.\n *\n * * If you don't provide an ID, a new item is created.\n *\n * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.\n *\n * * 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.\n *\n * ***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.\n * This means that all of the item's previous properties and values are lost.\n * @internal\n * @documentationMaturity preview\n * @permissionId WIX_DATA.UPDATE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Save\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function save(options?: SaveOptions): Promise<SaveResponse> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    item: options?.item,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.save(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          item: '$[0].item',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface SaveOptions {\n  /** Item to insert or update. */\n  item?: Record<string, any> | null;\n  /** ID of the collection in which to insert or update the item. */\n  dataCollectionId?: string;\n}\n\n/**\n * Retrieves an item from a collection.\n * @param itemId - ID of the item to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId WIX_DATA.FIND\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Get\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function get(\n  itemId: string,\n  options?: GetOptions\n): Promise<GetResponse> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    itemId: itemId,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.get(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          itemId: '$[0]',\n          dataCollectionId: '$[1].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['itemId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GetOptions {\n  /** ID of the collection from which to retrieve the item. */\n  dataCollectionId?: string;\n}\n\n/**\n * Removes an item from a collection.\n *\n * If any items in other collections reference the removed item in a reference or multi-reference field, the field is cleared.\n *\n * **Note:**\n * Once an item has been removed from a collection, it can't be restored.\n * @param itemId - ID of the item to remove.\n * @internal\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId WIX_DATA.REMOVE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Remove\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function remove(\n  itemId: string,\n  options?: RemoveOptions\n): Promise<RemoveResponse> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    itemId: itemId,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.remove(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          itemId: '$[0]',\n          dataCollectionId: '$[1].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['itemId', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface RemoveOptions {\n  /** ID of the collection from which to remove the item. */\n  dataCollectionId?: string;\n}\n\n/**\n * Removes all items from a collection. Site owner (`ADMIN`) permissions are required in order to invoke this operation.\n *\n * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.\n *\n * **Note:**\n * Once items have been removed from a collection, they can't be restored.\n * @internal\n * @documentationMaturity preview\n * @permissionId WIX_DATA.TRUNCATE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Truncate\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function truncate(options?: TruncateOptions): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.truncate(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { dataCollectionId: '$[0].dataCollectionId' },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface TruncateOptions {\n  /** ID of the collection to truncate. */\n  dataCollectionId?: string;\n}\n\n/**\n * Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide.\n *\n * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_DATA.FIND\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Query\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function query(\n  options?: QueryOptions\n): Promise<\n  NonNullablePaths<\n    QueryResponse,\n    `items` | `totalCount` | `totalResults` | `partialIncludes`,\n    2\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    dataQuery: options?.dataQuery,\n    omitTotalCount: options?.omitTotalCount,\n    includeReferencedItems: options?.includeReferencedItems,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.query(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          dataQuery: '$[0].dataQuery',\n          omitTotalCount: '$[0].omitTotalCount',\n          includeReferencedItems: '$[0].includeReferencedItems',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface QueryOptions {\n  /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */\n  dataQuery?: QueryV2;\n  /**\n   * Whether to omit the total count in the response.\n   * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.\n   *\n   * Default: `false`\n   */\n  omitTotalCount?: boolean;\n  /**\n   * Properties for which to include referenced items in the query's results.\n   * Up to 50 referenced items can be included for each item that matches the query.\n   * If more than 50 items are referenced, `partialIncludes` in the response is `true`.\n   */\n  includeReferencedItems?: string[];\n  /** ID of the collection to query. */\n  dataCollectionId?: string;\n}\n\n/** @internal\n * @documentationMaturity preview\n * @permissionId WIX_DATA.AGGREGATE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Aggregate\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function aggregate(\n  options?: AggregateOptions\n): Promise<NonNullablePaths<AggregationResponse, `items`, 2>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    paging: options?.paging,\n    initialFilter: options?.initialFilter,\n    aggregation: options?.aggregation,\n    finalFilter: options?.finalFilter,\n    sort: options?.sort,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.aggregate(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          paging: '$[0].paging',\n          initialFilter: '$[0].initialFilter',\n          aggregation: '$[0].aggregation',\n          finalFilter: '$[0].finalFilter',\n          sort: '$[0].sort',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface AggregateOptions {\n  /** Paging preferences. */\n  paging?: Paging;\n  /** Filter applied to the collection's data prior to running the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object. */\n  initialFilter?: Record<string, any> | null;\n  /**\n   * Object defining the steps of the aggregation to be This is an object defining aggregation itself.\n   *\n   * * Grouping rule is defined as _id field. It takes a form of:\n   * {\n   * \"_id\": \"$field\"\n   * }\n   *\n   * If multiple fields are used for grouping, Group takes a form of:\n   * {\n   * \"_id\": {\n   * \"field1\": \"$field1\"\n   * \"field2\": \"$field2\"\n   * }\n   * }\n   *\n   * * Aggregation functions are defined as special field definitions.\n   *\n   * Average:\n   * {\n   * \"_id\": \"$field\"\n   * \"my_avg\": {\n   * \"$avg\": \"$other_field\"\n   * }\n   * }\n   *\n   * Max:\n   * {\n   * \"_id\": \"$field\"\n   * \"my_max\": {\n   * \"$max\": \"$other_field\"\n   * }\n   * }\n   *\n   * Min:\n   * {\n   * \"_id\": \"$field\"\n   * \"my_min\": {\n   * \"$min\": \"$other_field\"\n   * }\n   * }\n   *\n   * Sum:\n   * {\n   * \"_id\": \"$field\"\n   * \"my_sum\": {\n   * \"$sum\": \"$other_field\"\n   * }\n   * }\n   */\n  aggregation?: Record<string, any> | null;\n  /** Filter applied to the processed data following the aggregation. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section) for information on how to structure a filter object. */\n  finalFilter?: Record<string, any> | null;\n  /** Sorting preferences. */\n  sort?: Sorting[];\n  /** ID of the collection on which to run the aggregation. */\n  dataCollectionId?: string;\n}\n\n/**\n * Returns the number of items in a collection that match a query.\n * @internal\n * @documentationMaturity preview\n * @permissionId WIX_DATA.FIND\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Count\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function count(\n  options?: CountOptions\n): Promise<NonNullablePaths<CountResponse, `totalCount` | `totalResults`, 2>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    filter: options?.filter,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.count(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          filter: '$[0].filter',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CountOptions {\n  /** Filter preferences defining the query. For more information on how to structure a filter object, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_the-filter-section). */\n  filter?: Record<string, any> | null;\n  /** ID of the collection for which to count query results. */\n  dataCollectionId?: string;\n}\n\n/**\n * Retrieves a list of distinct values for a given property in all items that match a query, without duplicates.\n *\n * As with the [Query Data Items]() endpoint, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.\n * However, the Query Distinct Values endpoint doesn't return all of the full items that match the query.\n * Rather, it returns all unique values of the property you specify in `propertyName` for items that match the query.\n * If more than one item has the same value for that property, that value appears only once.\n *\n * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @internal\n * @documentationMaturity preview\n * @requiredField options.propertyName\n * @permissionId WIX_DATA.FIND\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.Distinct\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function distinct(\n  options?: NonNullablePaths<DistinctOptions, `propertyName`, 2>\n): Promise<NonNullablePaths<DistinctResponse, `items`, 2>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    dataQuery: options?.dataQuery,\n    propertyName: options?.propertyName,\n    dataCollectionId: options?.dataCollectionId,\n    omitTotalCount: options?.omitTotalCount,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.distinct(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          dataQuery: '$[0].dataQuery',\n          propertyName: '$[0].propertyName',\n          dataCollectionId: '$[0].dataCollectionId',\n          omitTotalCount: '$[0].omitTotalCount',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface DistinctOptions {\n  /** Query preferences. For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). */\n  dataQuery?: QueryV2;\n  /** Property name for which to return all distinct values. */\n  propertyName: string;\n  /** ID of the collection to query. */\n  dataCollectionId?: string;\n  /**\n   * Whether to omit the total count in the response.\n   * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.\n   *\n   * Default: `false`\n   */\n  omitTotalCount?: boolean;\n}\n\n/**\n * Adds multiple items to a collection.\n *\n * When each item is inserted into a collection, the following properties and values are added to it:\n * * `_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.\n * * `_createdDate`: The date the item was added to the collection.\n * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.\n *\n * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds`.\n * When any items can't be inserted, error details are provided for each failed item in `errors`.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.items\n * @permissionId WIX_DATA.INSERT\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsert\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function bulkInsert(\n  options?: NonNullablePaths<BulkInsertOptions, `items`, 2>\n): Promise<\n  NonNullablePaths<\n    BulkInsertResponse,\n    | `insertedItemIds`\n    | `errors`\n    | `errors.${number}.message`\n    | `errors.${number}.details.applicationError.code`\n    | `errors.${number}.details.applicationError.description`\n    | `errors.${number}.originalIndex`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    items: options?.items,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.bulkInsert(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          items: '$[0].items',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkInsertOptions {\n  /** Items to insert. */\n  items: Record<string, any>[] | null;\n  /** ID of the collection in which to insert the items. */\n  dataCollectionId?: string;\n}\n\n/**\n * Inserts or updates multiple items in a collection.\n *\n * The Bulk Save Data Items endpoint inserts or updates each item, depending on whether it already exists in the collection. For each item:\n *\n * * If you don't provide an ID, a new item is created.\n *\n * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.\n *\n * * 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.\n *\n * 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`.\n * When any items can't be inserted or updated, error details are provided for each failed item in `errors`.\n *\n * ***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.\n * This means that all of the item's previous properties and values are lost.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.items\n * @permissionId WIX_DATA.UPDATE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkSave\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function bulkSave(\n  options?: NonNullablePaths<BulkSaveOptions, `items`, 2>\n): Promise<\n  NonNullablePaths<\n    BulkSaveResponse,\n    | `insertedItemIds`\n    | `updatedItemIds`\n    | `errors`\n    | `errors.${number}.message`\n    | `errors.${number}.details.applicationError.code`\n    | `errors.${number}.details.applicationError.description`\n    | `errors.${number}.originalIndex`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    items: options?.items,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.bulkSave(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          items: '$[0].items',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkSaveOptions {\n  /** Items to insert or update. */\n  items: Record<string, any>[] | null;\n  /** ID of the collection in which to insert or update the items. */\n  dataCollectionId?: string;\n}\n\n/**\n * Updates multiple items in a collection.\n *\n * Each item in the request must include an ID. If an item is found in the specified collection with\n * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.\n *\n * When an item is updated, its `_updatedDate` property is changed to the current date.\n *\n * The endpoint returns a list of the IDs of items successfully updated in `updatedItemIds`.\n * When any items can't be inserted, error details are provided for each failed item in `errors`.\n *\n * **Note:**\n * 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\n * aren't included in the updated item, their values are lost.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.items\n * @permissionId WIX_DATA.UPDATE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkUpdate\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function bulkUpdate(\n  options?: NonNullablePaths<BulkUpdateOptions, `items`, 2>\n): Promise<\n  NonNullablePaths<\n    BulkUpdateResponse,\n    | `updatedItemIds`\n    | `errors`\n    | `errors.${number}.message`\n    | `errors.${number}.details.applicationError.code`\n    | `errors.${number}.details.applicationError.description`\n    | `errors.${number}.originalIndex`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    items: options?.items,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.bulkUpdate(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          items: '$[0].items',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkUpdateOptions {\n  /** Items to update. */\n  items: Record<string, any>[] | null;\n  /** ID of the collection in which to update items. */\n  dataCollectionId?: string;\n}\n\n/**\n * Removes multiple items from a collection.\n *\n * If any items in other collections reference the removed items in reference or multi-reference fields, the fields are cleared.\n *\n * The endpoint returns a list of the IDs of items successfully removed in `removedItemIds`.\n * When any items can't be removed, error details are provided for each failed item in `errors`.\n *\n * **Note:** Once an item has been removed from a collection, it can't be restored.\n * @internal\n * @documentationMaturity preview\n * @permissionId WIX_DATA.REMOVE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemove\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function bulkRemove(\n  options?: BulkRemoveOptions\n): Promise<\n  NonNullablePaths<\n    BulkRemoveResponse,\n    | `removedItemIds`\n    | `errors`\n    | `errors.${number}.message`\n    | `errors.${number}.details.applicationError.code`\n    | `errors.${number}.details.applicationError.description`\n    | `errors.${number}.originalIndex`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    entries: options?.entries,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.bulkRemove(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          entries: '$[0].entries',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkRemoveOptions {\n  /** IDs of items to remove. */\n  entries?: BulkRemoveRequestEntry[];\n  /** ID of the collection from which to remove the items. */\n  dataCollectionId?: string;\n}\n\n/**\n * Gets the full items referenced in the specified property of an item.\n *\n * For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.\n * 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.\n * This gives you information from the **People** collection about each of the actors in the specified movie.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.propertyName\n * @requiredField options.referringItemId\n * @permissionId WIX_DATA.FIND\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.QueryReferenced\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function queryReferenced(\n  options?: NonNullablePaths<\n    QueryReferencedOptions,\n    `propertyName` | `referringItemId`,\n    2\n  >\n): Promise<\n  NonNullablePaths<\n    QueryReferencedResponse,\n    | `items`\n    | `totalCount`\n    | `totalResults`\n    | `entities`\n    | `entities.${number}.referenceId`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    referringItemId: options?.referringItemId,\n    propertyName: options?.propertyName,\n    paging: options?.paging,\n    dataCollectionId: options?.dataCollectionId,\n    omitTotalCount: options?.omitTotalCount,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.queryReferenced(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          referringItemId: '$[0].referringItemId',\n          propertyName: '$[0].propertyName',\n          paging: '$[0].paging',\n          dataCollectionId: '$[0].dataCollectionId',\n          omitTotalCount: '$[0].omitTotalCount',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface QueryReferencedOptions {\n  /** ID of the referring item. */\n  referringItemId: string;\n  /** Property containing the references to the referenced items. */\n  propertyName: string;\n  /** Paging preferences. */\n  paging?: Paging;\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n  /**\n   * Whether to omit the total count in the response.\n   * When `true`, the `pagingMetadata` object in the response doesn't contain a `total` field.\n   *\n   * Default: `false`\n   */\n  omitTotalCount?: boolean;\n}\n\n/**\n * Inserts one or more references in the specified properties of items in a collection.\n *\n * The Bulk Insert References endpoint adds one or more references to a collection.\n * 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.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.references\n * @requiredField options.references.propertyName\n * @requiredField options.references.referencedItemId\n * @requiredField options.references.referringItemId\n * @permissionId WIX_DATA.INSERT\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsertReferences\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function bulkInsertReferences(\n  options?: NonNullablePaths<\n    BulkInsertReferencesOptions,\n    | `references`\n    | `references.${number}.propertyName`\n    | `references.${number}.referencedItemId`\n    | `references.${number}.referringItemId`,\n    4\n  >\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    references: options?.references,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.bulkInsertReferences(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          references: '$[0].references',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkInsertReferencesOptions {\n  /**\n   * References to insert.\n   * @minSize 1\n   */\n  references: Reference[];\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n}\n\n/**\n * Replaces references in a specified property of a specified data item.\n *\n * 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`.\n * The endpoint removes existing references and in their place it adds references to the items specified in `newReferencedItemIds`.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.propertyName\n * @requiredField options.referringItemId\n * @permissionId WIX_DATA.UPDATE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkReplaceReferences\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function bulkReplaceReferences(\n  options?: NonNullablePaths<\n    BulkReplaceReferencesOptions,\n    `propertyName` | `referringItemId`,\n    2\n  >\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    propertyName: options?.propertyName,\n    referringItemId: options?.referringItemId,\n    newReferencedItemIds: options?.newReferencedItemIds,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.bulkReplaceReferences(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          propertyName: '$[0].propertyName',\n          referringItemId: '$[0].referringItemId',\n          newReferencedItemIds: '$[0].newReferencedItemIds',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkReplaceReferencesOptions {\n  /** Property containing the references to the referenced items. */\n  propertyName: string;\n  /** ID of the referring item. */\n  referringItemId: string;\n  /** List of new referenced item IDs to replace the existing ones. */\n  newReferencedItemIds?: string[];\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n}\n\n/**\n * Removes one or more references.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.references\n * @requiredField options.references.propertyName\n * @permissionId WIX_DATA.REMOVE\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemoveReferences\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function bulkRemoveReferences(\n  options?: NonNullablePaths<\n    BulkRemoveReferencesOptions,\n    `references` | `references.${number}.propertyName`,\n    4\n  >\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    references: options?.references,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.bulkRemoveReferences(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          references: '$[0].references',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface BulkRemoveReferencesOptions {\n  /**\n   * References to be removed.\n   * @minSize 1\n   */\n  references: Reference[];\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n}\n\n/**\n * Checks if a specific property of a referring item contains a reference to another specific item.\n * @internal\n * @documentationMaturity preview\n * @requiredField options.propertyName\n * @requiredField options.referencedItemId\n * @requiredField options.referringItemId\n * @permissionId WIX_DATA.FIND\n * @fqn com.wixpress.cloud.data.api.dataservice.WixDataService.IsReferenced\n * @deprecated\n * @targetRemovalDate 2025-06-01\n */\nexport async function isReferenced(\n  options?: NonNullablePaths<\n    IsReferencedOptions,\n    `propertyName` | `referencedItemId` | `referringItemId`,\n    2\n  >\n): Promise<NonNullablePaths<IsReferencedResponse, `isReferenced`, 2>> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    propertyName: options?.propertyName,\n    referringItemId: options?.referringItemId,\n    referencedItemId: options?.referencedItemId,\n    dataCollectionId: options?.dataCollectionId,\n  });\n\n  const reqOpts = ambassadorWixDataV1DataService.isReferenced(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          propertyName: '$[0].propertyName',\n          referringItemId: '$[0].referringItemId',\n          referencedItemId: '$[0].referencedItemId',\n          dataCollectionId: '$[0].dataCollectionId',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface IsReferencedOptions {\n  /** Property that may contain a reference to the specified item. */\n  propertyName: string;\n  /** ID of the referring item. */\n  referringItemId: string;\n  /** ID of the item that may be referenced. */\n  referencedItemId: string;\n  /** ID of the collection containing the referring item. */\n  dataCollectionId?: string;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/cloud-data',\n        destPath: '',\n      },\n    ],\n    'code._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/connector',\n        destPath: '/v1/connector',\n      },\n      {\n        srcPath: '/_api/data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/data/v1/connector',\n        destPath: '/v1/connector',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/wix-data',\n        destPath: '/v1/wix-data',\n      },\n    ],\n    'cloud-data.wix-code.com': [\n      {\n        srcPath: '',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n    ],\n    'www._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/data',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n    ],\n    'dev._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n    ],\n    'bo._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data/v1',\n        destPath: '/v1',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2',\n        destPath: '/v2',\n      },\n    ],\n    'wixbo.ai': [\n      {\n        srcPath: '/_api/cloud-data/v1',\n        destPath: '/v1',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2',\n        destPath: '/v2',\n      },\n    ],\n    'wix-bo.com': [\n      {\n        srcPath: '/_api/cloud-data/v1',\n        destPath: '/v1',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2',\n        destPath: '/v2',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/data',\n        destPath: '',\n      },\n      {\n        srcPath: '/_api/cloud-data',\n        destPath: '',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/cloud-data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/wix-data',\n        destPath: '/v1/wix-data',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/_api/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/collections',\n        destPath: '/v2/collections',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/bulk',\n        destPath: '/v2/bulk',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/items',\n        destPath: '/v2/items',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/dbs/tasks',\n        destPath: '/v2/dbs/tasks',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/cloud-data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/cloud-data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/wix-data',\n        destPath: '/v1/wix-data',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/_api/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/collections',\n        destPath: '/v2/collections',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/bulk',\n        destPath: '/v2/bulk',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/items',\n        destPath: '/v2/items',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/dbs/tasks',\n        destPath: '/v2/dbs/tasks',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/cloud-data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/cloud-data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/data/v1/schemas',\n        destPath: '/v1/schemas',\n      },\n      {\n        srcPath: '/_api/data/dbs/tasks',\n        destPath: '/dbs/tasks',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/wix-data',\n        destPath: '/v1/wix-data',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/data-settings',\n        destPath: '/v1/data-settings',\n      },\n      {\n        srcPath: '/_api/data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/_api/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/collections',\n        destPath: '/v2/collections',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/bulk',\n        destPath: '/v2/bulk',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/items',\n        destPath: '/v2/items',\n      },\n      {\n        srcPath: '/_api/cloud-data/v2/dbs/tasks',\n        destPath: '/v2/dbs/tasks',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/wix-data/v1/collections',\n        destPath: '/v1/wix-data/collections',\n      },\n      {\n        srcPath: '/wix-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/wix-data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/wix-data/v1/items',\n        destPath: '/v1/items',\n      },\n      {\n        srcPath: '/wix-data/v1/bulk',\n        destPath: '/v1/bulk',\n      },\n      {\n        srcPath: '/wix-data/v1/external-databases',\n        destPath: '/v1/external-databases',\n      },\n      {\n        srcPath: '/wix-data/v2',\n        destPath: '/v2',\n      },\n      {\n        srcPath: '/data/v2/collections',\n        destPath: '/v2/collections',\n      },\n      {\n        srcPath: '/data/v2/items',\n        destPath: '/v2/items',\n      },\n      {\n        srcPath: '/data/v2/bulk/items',\n        destPath: '/v2/bulk/items',\n      },\n      {\n        srcPath: '/data/v2/indexes',\n        destPath: '/v2/indexes',\n      },\n      {\n        srcPath: '/data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n    ],\n    'www.wixgateway.com': [\n      {\n        srcPath: '/wix-data/v1/items',\n        destPath: '/v1/items',\n      },\n      {\n        srcPath: '/wix-data/v1/bulk',\n        destPath: '/v1/bulk',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/cloud-data/v2',\n        destPath: '/v2',\n      },\n      {\n        srcPath: '/_api/cloud-data/v1/external-database-connections',\n        destPath: '/v1/external-database-connections',\n      },\n      {\n        srcPath: '/data/v1/data-collection-sharing',\n        destPath: '/v1/data-collection-sharing',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data-backend-public-sdk-poc_data';\n\n/**\n * Adds an item to a collection.\n *\n * When an item is inserted into a collection, the following properties and values are added to it:\n * * `_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.\n * * `_createdDate`: The date the item was added to the collection.\n * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function insert(payload: object): RequestOptionsFactory<any> {\n  function __insert({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.Insert',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __insert;\n}\n\n/**\n * Updates an item in a collection.\n *\n * 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\n * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the request fails.\n *\n * When an item is updated, its `_updatedDate` property is changed to the current date.\n *\n * **Note:**\n * 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\n * aren't included in the updated item, their values are lost.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function update(payload: object): RequestOptionsFactory<any> {\n  function __update({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'PUT' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.Update',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/{itemId}',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __update;\n}\n\n/**\n * Inserts or updates an item in a collection.\n *\n * The Save Data Item endpoint inserts or updates the specified item, depending on whether it already exists in the collection.\n *\n * * If you don't provide an ID, a new item is created.\n *\n * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.\n *\n * * 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.\n *\n * ***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.\n * This means that all of the item's previous properties and values are lost.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function save(payload: object): RequestOptionsFactory<any> {\n  function __save({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Save',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/save',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __save;\n}\n\n/**\n * Retrieves an item from a collection.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function get(payload: object): RequestOptionsFactory<any> {\n  function __get({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'GET' as any,\n      methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Get',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/{itemId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload, true),\n    };\n\n    return metadata;\n  }\n\n  return __get;\n}\n\n/**\n * Removes an item from a collection.\n *\n * If any items in other collections reference the removed item in a reference or multi-reference field, the field is cleared.\n *\n * **Note:**\n * Once an item has been removed from a collection, it can't be restored.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function remove(payload: object): RequestOptionsFactory<any> {\n  function __remove({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'DELETE' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.Remove',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/{itemId}',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __remove;\n}\n\n/**\n * Removes all items from a collection. Site owner (`ADMIN`) permissions are required in order to invoke this operation.\n *\n * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.\n *\n * **Note:**\n * Once items have been removed from a collection, they can't be restored.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function truncate(payload: object): RequestOptionsFactory<any> {\n  function __truncate({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.Truncate',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/truncate',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __truncate;\n}\n\n/**\n * Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide.\n *\n * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function query(payload: object): RequestOptionsFactory<any> {\n  function __query({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'GET' as any,\n      methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Query',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/query',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload, true),\n\n      fallback: [\n        {\n          method: 'POST' as any,\n          url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n            protoPath: '/v1/items/query',\n            data: payload,\n            host,\n          }),\n          data: payload,\n        },\n      ],\n    };\n\n    return metadata;\n  }\n\n  return __query;\n}\n\n/** @deprecated Will be removed on 2025-06-01. */\nexport function aggregate(payload: object): RequestOptionsFactory<any> {\n  function __aggregate({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.Aggregate',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/aggregate',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __aggregate;\n}\n\n/**\n * Returns the number of items in a collection that match a query.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function count(payload: object): RequestOptionsFactory<any> {\n  function __count({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.cloud.data.api.dataservice.WixDataService.Count',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/count',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __count;\n}\n\n/**\n * Retrieves a list of distinct values for a given property in all items that match a query, without duplicates.\n *\n * As with the [Query Data Items]() endpoint, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.\n * However, the Query Distinct Values endpoint doesn't return all of the full items that match the query.\n * Rather, it returns all unique values of the property you specify in `propertyName` for items that match the query.\n * If more than one item has the same value for that property, that value appears only once.\n *\n * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function distinct(payload: object): RequestOptionsFactory<any> {\n  function __distinct({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.Distinct',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/distinct',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __distinct;\n}\n\n/**\n * Adds multiple items to a collection.\n *\n * When each item is inserted into a collection, the following properties and values are added to it:\n * * `_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.\n * * `_createdDate`: The date the item was added to the collection.\n * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.\n *\n * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds`.\n * When any items can't be inserted, error details are provided for each failed item in `errors`.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function bulkInsert(payload: object): RequestOptionsFactory<any> {\n  function __bulkInsert({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsert',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/bulk/items/insert',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkInsert;\n}\n\n/**\n * Inserts or updates multiple items in a collection.\n *\n * The Bulk Save Data Items endpoint inserts or updates each item, depending on whether it already exists in the collection. For each item:\n *\n * * If you don't provide an ID, a new item is created.\n *\n * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.\n *\n * * 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.\n *\n * 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`.\n * When any items can't be inserted or updated, error details are provided for each failed item in `errors`.\n *\n * ***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.\n * This means that all of the item's previous properties and values are lost.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function bulkSave(payload: object): RequestOptionsFactory<any> {\n  function __bulkSave({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkSave',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/bulk/items/save',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkSave;\n}\n\n/**\n * Updates multiple items in a collection.\n *\n * Each item in the request must include an ID. If an item is found in the specified collection with\n * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.\n *\n * When an item is updated, its `_updatedDate` property is changed to the current date.\n *\n * The endpoint returns a list of the IDs of items successfully updated in `updatedItemIds`.\n * When any items can't be inserted, error details are provided for each failed item in `errors`.\n *\n * **Note:**\n * 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\n * aren't included in the updated item, their values are lost.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function bulkUpdate(payload: object): RequestOptionsFactory<any> {\n  function __bulkUpdate({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkUpdate',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/bulk/items/update',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkUpdate;\n}\n\n/**\n * Removes multiple items from a collection.\n *\n * If any items in other collections reference the removed items in reference or multi-reference fields, the fields are cleared.\n *\n * The endpoint returns a list of the IDs of items successfully removed in `removedItemIds`.\n * When any items can't be removed, error details are provided for each failed item in `errors`.\n *\n * **Note:** Once an item has been removed from a collection, it can't be restored.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function bulkRemove(payload: object): RequestOptionsFactory<any> {\n  function __bulkRemove({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemove',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/bulk/items/remove',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkRemove;\n}\n\n/**\n * Gets the full items referenced in the specified property of an item.\n *\n * For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.\n * 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.\n * This gives you information from the **People** collection about each of the actors in the specified movie.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function queryReferenced(payload: object): RequestOptionsFactory<any> {\n  function __queryReferenced({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.QueryReferenced',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/query-referenced',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __queryReferenced;\n}\n\n/**\n * Inserts one or more references in the specified properties of items in a collection.\n *\n * The Bulk Insert References endpoint adds one or more references to a collection.\n * 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.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function bulkInsertReferences(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkInsertReferences({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkInsertReferences',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/bulk/references/insert',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkInsertReferences;\n}\n\n/**\n * Replaces references in a specified property of a specified data item.\n *\n * 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`.\n * The endpoint removes existing references and in their place it adds references to the items specified in `newReferencedItemIds`.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function bulkReplaceReferences(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkReplaceReferences({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkReplaceReferences',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/bulk/references/replace',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkReplaceReferences;\n}\n\n/**\n * Removes one or more references.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function bulkRemoveReferences(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __bulkRemoveReferences({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.BulkRemoveReferences',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/bulk/references/remove',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __bulkRemoveReferences;\n}\n\n/**\n * Checks if a specific property of a referring item contains a reference to another specific item.\n * @deprecated Will be removed on 2025-06-01.\n */\nexport function isReferenced(payload: object): RequestOptionsFactory<any> {\n  function __isReferenced({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.data.v1.data_service',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.cloud.data.api.dataservice.WixDataService.IsReferenced',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressCloudDataApiDataserviceWixDataServiceUrl({\n        protoPath: '/v1/items/is-referenced',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __isReferenced;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  AggregateOptions,\n  AggregationResponse,\n  BulkInsertOptions,\n  BulkInsertReferencesOptions,\n  BulkInsertResponse,\n  BulkRemoveOptions,\n  BulkRemoveReferencesOptions,\n  BulkRemoveResponse,\n  BulkReplaceReferencesOptions,\n  BulkSaveOptions,\n  BulkSaveResponse,\n  BulkUpdateOptions,\n  BulkUpdateResponse,\n  CountOptions,\n  CountResponse,\n  DistinctOptions,\n  DistinctResponse,\n  GetOptions,\n  GetResponse,\n  InsertOptions,\n  InsertResponse,\n  IsReferencedOptions,\n  IsReferencedResponse,\n  QueryOptions,\n  QueryReferencedOptions,\n  QueryReferencedResponse,\n  QueryResponse,\n  RemoveOptions,\n  RemoveResponse,\n  SaveOptions,\n  SaveResponse,\n  TruncateOptions,\n  UpdateOptions,\n  UpdateResponse,\n  aggregate as universalAggregate,\n  bulkInsert as universalBulkInsert,\n  bulkInsertReferences as universalBulkInsertReferences,\n  bulkRemove as universalBulkRemove,\n  bulkRemoveReferences as universalBulkRemoveReferences,\n  bulkReplaceReferences as universalBulkReplaceReferences,\n  bulkSave as universalBulkSave,\n  bulkUpdate as universalBulkUpdate,\n  count as universalCount,\n  distinct as universalDistinct,\n  get as universalGet,\n  insert as universalInsert,\n  isReferenced as universalIsReferenced,\n  query as universalQuery,\n  queryReferenced as universalQueryReferenced,\n  remove as universalRemove,\n  save as universalSave,\n  truncate as universalTruncate,\n  update as universalUpdate,\n} from './data-v1-data-service-data.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/data-backend-public-sdk-poc' };\n\n/** @internal */\nexport function insert(httpClient: HttpClient): InsertSignature {\n  return (options?: InsertOptions) =>\n    universalInsert(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface InsertSignature {\n  /**\n   * Adds an item to a collection.\n   *\n   * When an item is inserted into a collection, the following properties and values are added to it:\n   * * `_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.\n   * * `_createdDate`: The date the item was added to the collection.\n   * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.\n   * @deprecated\n   */\n  (options?: InsertOptions): Promise<InsertResponse>;\n}\n\n/** @internal */\nexport function update(httpClient: HttpClient): UpdateSignature {\n  return (options?: NonNullablePaths<UpdateOptions, `item`, 2>) =>\n    universalUpdate(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdateSignature {\n  /**\n   * Updates an item in a collection.\n   *\n   * 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\n   * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the request fails.\n   *\n   * When an item is updated, its `_updatedDate` property is changed to the current date.\n   *\n   * **Note:**\n   * 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\n   * aren't included in the updated item, their values are lost.\n   * @deprecated\n   */\n  (\n    options?: NonNullablePaths<UpdateOptions, `item`, 2>\n  ): Promise<UpdateResponse>;\n}\n\n/** @internal */\nexport function save(httpClient: HttpClient): SaveSignature {\n  return (options?: SaveOptions) =>\n    universalSave(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface SaveSignature {\n  /**\n   * Inserts or updates an item in a collection.\n   *\n   * The Save Data Item endpoint inserts or updates the specified item, depending on whether it already exists in the collection.\n   *\n   * * If you don't provide an ID, a new item is created.\n   *\n   * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.\n   *\n   * * 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.\n   *\n   * ***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.\n   * This means that all of the item's previous properties and values are lost.\n   * @deprecated\n   */\n  (options?: SaveOptions): Promise<SaveResponse>;\n}\n\n/** @internal */\nexport function get(httpClient: HttpClient): GetSignature {\n  return (itemId: string, options?: GetOptions) =>\n    universalGet(\n      itemId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetSignature {\n  /**\n   * Retrieves an item from a collection.\n   * @param - ID of the item to retrieve.\n   * @deprecated\n   */\n  (itemId: string, options?: GetOptions): Promise<GetResponse>;\n}\n\n/** @internal */\nexport function remove(httpClient: HttpClient): RemoveSignature {\n  return (itemId: string, options?: RemoveOptions) =>\n    universalRemove(\n      itemId,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface RemoveSignature {\n  /**\n   * Removes an item from a collection.\n   *\n   * If any items in other collections reference the removed item in a reference or multi-reference field, the field is cleared.\n   *\n   * **Note:**\n   * Once an item has been removed from a collection, it can't be restored.\n   * @param - ID of the item to remove.\n   * @deprecated\n   */\n  (itemId: string, options?: RemoveOptions): Promise<RemoveResponse>;\n}\n\n/** @internal */\nexport function truncate(httpClient: HttpClient): TruncateSignature {\n  return (options?: TruncateOptions) =>\n    universalTruncate(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface TruncateSignature {\n  /**\n   * Removes all items from a collection. Site owner (`ADMIN`) permissions are required in order to invoke this operation.\n   *\n   * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.\n   *\n   * **Note:**\n   * Once items have been removed from a collection, they can't be restored.\n   * @deprecated\n   */\n  (options?: TruncateOptions): Promise<void>;\n}\n\nexport function query(httpClient: HttpClient): QuerySignature {\n  return (options?: QueryOptions) =>\n    universalQuery(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QuerySignature {\n  /**\n   * Retrieves a list of items, on the basis of the filtering, sorting, and paging preferences you provide.\n   *\n   * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n   * @deprecated\n   */\n  (options?: QueryOptions): Promise<\n    NonNullablePaths<\n      QueryResponse,\n      `items` | `totalCount` | `totalResults` | `partialIncludes`,\n      2\n    >\n  >;\n}\n\n/** @internal */\nexport function aggregate(httpClient: HttpClient): AggregateSignature {\n  return (options?: AggregateOptions) =>\n    universalAggregate(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface AggregateSignature {\n  /** @deprecated */\n  (options?: AggregateOptions): Promise<\n    NonNullablePaths<AggregationResponse, `items`, 2>\n  >;\n}\n\n/** @internal */\nexport function count(httpClient: HttpClient): CountSignature {\n  return (options?: CountOptions) =>\n    universalCount(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CountSignature {\n  /**\n   * Returns the number of items in a collection that match a query.\n   * @deprecated\n   */\n  (options?: CountOptions): Promise<\n    NonNullablePaths<CountResponse, `totalCount` | `totalResults`, 2>\n  >;\n}\n\n/** @internal */\nexport function distinct(httpClient: HttpClient): DistinctSignature {\n  return (options?: NonNullablePaths<DistinctOptions, `propertyName`, 2>) =>\n    universalDistinct(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface DistinctSignature {\n  /**\n   * Retrieves a list of distinct values for a given property in all items that match a query, without duplicates.\n   *\n   * As with the [Query Data Items]() endpoint, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.\n   * However, the Query Distinct Values endpoint doesn't return all of the full items that match the query.\n   * Rather, it returns all unique values of the property you specify in `propertyName` for items that match the query.\n   * If more than one item has the same value for that property, that value appears only once.\n   *\n   * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n   * @deprecated\n   */\n  (options?: NonNullablePaths<DistinctOptions, `propertyName`, 2>): Promise<\n    NonNullablePaths<DistinctResponse, `items`, 2>\n  >;\n}\n\n/** @internal */\nexport function bulkInsert(httpClient: HttpClient): BulkInsertSignature {\n  return (options?: NonNullablePaths<BulkInsertOptions, `items`, 2>) =>\n    universalBulkInsert(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkInsertSignature {\n  /**\n   * Adds multiple items to a collection.\n   *\n   * When each item is inserted into a collection, the following properties and values are added to it:\n   * * `_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.\n   * * `_createdDate`: The date the item was added to the collection.\n   * * `_updatedDate`: The date the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.\n   *\n   * The endpoint returns a list of the IDs of items successfully inserted in `insertedItemIds`.\n   * When any items can't be inserted, error details are provided for each failed item in `errors`.\n   * @deprecated\n   */\n  (options?: NonNullablePaths<BulkInsertOptions, `items`, 2>): Promise<\n    NonNullablePaths<\n      BulkInsertResponse,\n      | `insertedItemIds`\n      | `errors`\n      | `errors.${number}.message`\n      | `errors.${number}.details.applicationError.code`\n      | `errors.${number}.details.applicationError.description`\n      | `errors.${number}.originalIndex`,\n      6\n    >\n  >;\n}\n\n/** @internal */\nexport function bulkSave(httpClient: HttpClient): BulkSaveSignature {\n  return (options?: NonNullablePaths<BulkSaveOptions, `items`, 2>) =>\n    universalBulkSave(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkSaveSignature {\n  /**\n   * Inserts or updates multiple items in a collection.\n   *\n   * The Bulk Save Data Items endpoint inserts or updates each item, depending on whether it already exists in the collection. For each item:\n   *\n   * * If you don't provide an ID, a new item is created.\n   *\n   * * If you provide an ID that doesn't exist in the collection, a new item is created with that ID.\n   *\n   * * 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.\n   *\n   * 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`.\n   * When any items can't be inserted or updated, error details are provided for each failed item in `errors`.\n   *\n   * ***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.\n   * This means that all of the item's previous properties and values are lost.\n   * @deprecated\n   */\n  (options?: NonNullablePaths<BulkSaveOptions, `items`, 2>): Promise<\n    NonNullablePaths<\n      BulkSaveResponse,\n      | `insertedItemIds`\n      | `updatedItemIds`\n      | `errors`\n      | `errors.${number}.message`\n      | `errors.${number}.details.applicationError.code`\n      | `errors.${number}.details.applicationError.description`\n      | `errors.${number}.originalIndex`,\n      6\n    >\n  >;\n}\n\n/** @internal */\nexport function bulkUpdate(httpClient: HttpClient): BulkUpdateSignature {\n  return (options?: NonNullablePaths<BulkUpdateOptions, `items`, 2>) =>\n    universalBulkUpdate(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkUpdateSignature {\n  /**\n   * Updates multiple items in a collection.\n   *\n   * Each item in the request must include an ID. If an item is found in the specified collection with\n   * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.\n   *\n   * When an item is updated, its `_updatedDate` property is changed to the current date.\n   *\n   * The endpoint returns a list of the IDs of items successfully updated in `updatedItemIds`.\n   * When any items can't be inserted, error details are provided for each failed item in `errors`.\n   *\n   * **Note:**\n   * 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\n   * aren't included in the updated item, their values are lost.\n   * @deprecated\n   */\n  (options?: NonNullablePaths<BulkUpdateOptions, `items`, 2>): Promise<\n    NonNullablePaths<\n      BulkUpdateResponse,\n      | `updatedItemIds`\n      | `errors`\n      | `errors.${number}.message`\n      | `errors.${number}.details.applicationError.code`\n      | `errors.${number}.details.applicationError.description`\n      | `errors.${number}.originalIndex`,\n      6\n    >\n  >;\n}\n\n/** @internal */\nexport function bulkRemove(httpClient: HttpClient): BulkRemoveSignature {\n  return (options?: BulkRemoveOptions) =>\n    universalBulkRemove(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkRemoveSignature {\n  /**\n   * Removes multiple items from a collection.\n   *\n   * If any items in other collections reference the removed items in reference or multi-reference fields, the fields are cleared.\n   *\n   * The endpoint returns a list of the IDs of items successfully removed in `removedItemIds`.\n   * When any items can't be removed, error details are provided for each failed item in `errors`.\n   *\n   * **Note:** Once an item has been removed from a collection, it can't be restored.\n   * @deprecated\n   */\n  (options?: BulkRemoveOptions): Promise<\n    NonNullablePaths<\n      BulkRemoveResponse,\n      | `removedItemIds`\n      | `errors`\n      | `errors.${number}.message`\n      | `errors.${number}.details.applicationError.code`\n      | `errors.${number}.details.applicationError.description`\n      | `errors.${number}.originalIndex`,\n      6\n    >\n  >;\n}\n\n/** @internal */\nexport function queryReferenced(\n  httpClient: HttpClient\n): QueryReferencedSignature {\n  return (\n    options?: NonNullablePaths<\n      QueryReferencedOptions,\n      `propertyName` | `referringItemId`,\n      2\n    >\n  ) =>\n    universalQueryReferenced(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryReferencedSignature {\n  /**\n   * Gets the full items referenced in the specified property of an item.\n   *\n   * For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.\n   * 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.\n   * This gives you information from the **People** collection about each of the actors in the specified movie.\n   * @deprecated\n   */\n  (\n    options?: NonNullablePaths<\n      QueryReferencedOptions,\n      `propertyName` | `referringItemId`,\n      2\n    >\n  ): Promise<\n    NonNullablePaths<\n      QueryReferencedResponse,\n      | `items`\n      | `totalCount`\n      | `totalResults`\n      | `entities`\n      | `entities.${number}.referenceId`,\n      4\n    >\n  >;\n}\n\n/** @internal */\nexport function bulkInsertReferences(\n  httpClient: HttpClient\n): BulkInsertReferencesSignature {\n  return (\n    options?: NonNullablePaths<\n      BulkInsertReferencesOptions,\n      | `references`\n      | `references.${number}.propertyName`\n      | `references.${number}.referencedItemId`\n      | `references.${number}.referringItemId`,\n      4\n    >\n  ) =>\n    universalBulkInsertReferences(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkInsertReferencesSignature {\n  /**\n   * Inserts one or more references in the specified properties of items in a collection.\n   *\n   * The Bulk Insert References endpoint adds one or more references to a collection.\n   * 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.\n   * @deprecated\n   */\n  (\n    options?: NonNullablePaths<\n      BulkInsertReferencesOptions,\n      | `references`\n      | `references.${number}.propertyName`\n      | `references.${number}.referencedItemId`\n      | `references.${number}.referringItemId`,\n      4\n    >\n  ): Promise<void>;\n}\n\n/** @internal */\nexport function bulkReplaceReferences(\n  httpClient: HttpClient\n): BulkReplaceReferencesSignature {\n  return (\n    options?: NonNullablePaths<\n      BulkReplaceReferencesOptions,\n      `propertyName` | `referringItemId`,\n      2\n    >\n  ) =>\n    universalBulkReplaceReferences(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkReplaceReferencesSignature {\n  /**\n   * Replaces references in a specified property of a specified data item.\n   *\n   * 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`.\n   * The endpoint removes existing references and in their place it adds references to the items specified in `newReferencedItemIds`.\n   * @deprecated\n   */\n  (\n    options?: NonNullablePaths<\n      BulkReplaceReferencesOptions,\n      `propertyName` | `referringItemId`,\n      2\n    >\n  ): Promise<void>;\n}\n\n/** @internal */\nexport function bulkRemoveReferences(\n  httpClient: HttpClient\n): BulkRemoveReferencesSignature {\n  return (\n    options?: NonNullablePaths<\n      BulkRemoveReferencesOptions,\n      `references` | `references.${number}.propertyName`,\n      4\n    >\n  ) =>\n    universalBulkRemoveReferences(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface BulkRemoveReferencesSignature {\n  /**\n   * Removes one or more references.\n   * @deprecated\n   */\n  (\n    options?: NonNullablePaths<\n      BulkRemoveReferencesOptions,\n      `references` | `references.${number}.propertyName`,\n      4\n    >\n  ): Promise<void>;\n}\n\n/** @internal */\nexport function isReferenced(httpClient: HttpClient): IsReferencedSignature {\n  return (\n    options?: NonNullablePaths<\n      IsReferencedOptions,\n      `propertyName` | `referencedItemId` | `referringItemId`,\n      2\n    >\n  ) =>\n    universalIsReferenced(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface IsReferencedSignature {\n  /**\n   * Checks if a specific property of a referring item contains a reference to another specific item.\n   * @deprecated\n   */\n  (\n    options?: NonNullablePaths<\n      IsReferencedOptions,\n      `propertyName` | `referencedItemId` | `referringItemId`,\n      2\n    >\n  ): Promise<NonNullablePaths<IsReferencedResponse, `isReferenced`, 2>>;\n}\n\nexport {\n  AggregateOptions,\n  AggregationRequest,\n  AggregationResponse,\n  ApplicationError,\n  BulkError,\n  BulkInsertOptions,\n  BulkInsertReferencesOptions,\n  BulkInsertReferencesRequest,\n  BulkInsertReferencesResponse,\n  BulkInsertRequest,\n  BulkInsertResponse,\n  BulkPatchRequest,\n  BulkPatchResponse,\n  BulkRemoveOptions,\n  BulkRemoveReferencesOptions,\n  BulkRemoveReferencesRequest,\n  BulkRemoveReferencesResponse,\n  BulkRemoveRequest,\n  BulkRemoveRequestEntry,\n  BulkRemoveResponse,\n  BulkReplaceReferencesOptions,\n  BulkReplaceReferencesRequest,\n  BulkReplaceReferencesResponse,\n  BulkSaveOptions,\n  BulkSaveRequest,\n  BulkSaveResponse,\n  BulkUpdateOptions,\n  BulkUpdateRequest,\n  BulkUpdateResponse,\n  CountOptions,\n  CountRequest,\n  CountResponse,\n  CursorPaging,\n  Cursors,\n  Details,\n  DistinctOptions,\n  DistinctRequest,\n  DistinctResponse,\n  Entry,\n  GetOptions,\n  GetRequest,\n  GetResponse,\n  InsertOptions,\n  InsertRequest,\n  InsertResponse,\n  IsReferencedOptions,\n  IsReferencedRequest,\n  IsReferencedResponse,\n  Item,\n  Options,\n  Order,\n  Paging,\n  PagingMetadataV2,\n  PatchRequest,\n  PatchResponse,\n  PatchWhereRequest,\n  PatchWhereResponse,\n  Query,\n  QueryOptions,\n  QueryReferencedOptions,\n  QueryReferencedRequest,\n  QueryReferencedResponse,\n  QueryRequest,\n  QueryResponse,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  ReadOptions,\n  Reference,\n  ReferencedEntity,\n  ReferencedEntityEntityOneOf,\n  RemoveOptions,\n  RemoveRequest,\n  RemoveResponse,\n  RestoreFromTrashBinRequest,\n  RestoreFromTrashBinResponse,\n  SaveOptions,\n  SaveRequest,\n  SaveResponse,\n  Segment,\n  SortOrder,\n  Sorting,\n  TruncateOptions,\n  TruncateRequest,\n  TruncateResponse,\n  UpdateOptions,\n  UpdateRequest,\n  UpdateResponse,\n} from './data-v1-data-service-data.universal.js';\n","import {\n  insert as publicInsert,\n  update as publicUpdate,\n  save as publicSave,\n  get as publicGet,\n  remove as publicRemove,\n  truncate as publicTruncate,\n  query as publicQuery,\n  aggregate as publicAggregate,\n  count as publicCount,\n  distinct as publicDistinct,\n  bulkInsert as publicBulkInsert,\n  bulkSave as publicBulkSave,\n  bulkUpdate as publicBulkUpdate,\n  bulkRemove as publicBulkRemove,\n  queryReferenced as publicQueryReferenced,\n  bulkInsertReferences as publicBulkInsertReferences,\n  bulkReplaceReferences as publicBulkReplaceReferences,\n  bulkRemoveReferences as publicBulkRemoveReferences,\n  isReferenced as publicIsReferenced,\n} from './data-v1-data-service-data.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\n/** @internal */\nexport const insert: MaybeContext<\n  BuildRESTFunction<typeof publicInsert> & typeof publicInsert\n> = /*#__PURE__*/ createRESTModule(publicInsert);\n/** @internal */\nexport const update: MaybeContext<\n  BuildRESTFunction<typeof publicUpdate> & typeof publicUpdate\n> = /*#__PURE__*/ createRESTModule(publicUpdate);\n/** @internal */\nexport const save: MaybeContext<\n  BuildRESTFunction<typeof publicSave> & typeof publicSave\n> = /*#__PURE__*/ createRESTModule(publicSave);\n/** @internal */\nexport const get: MaybeContext<\n  BuildRESTFunction<typeof publicGet> & typeof publicGet\n> = /*#__PURE__*/ createRESTModule(publicGet);\n/** @internal */\nexport const remove: MaybeContext<\n  BuildRESTFunction<typeof publicRemove> & typeof publicRemove\n> = /*#__PURE__*/ createRESTModule(publicRemove);\n/** @internal */\nexport const truncate: MaybeContext<\n  BuildRESTFunction<typeof publicTruncate> & typeof publicTruncate\n> = /*#__PURE__*/ createRESTModule(publicTruncate);\nexport const query: MaybeContext<\n  BuildRESTFunction<typeof publicQuery> & typeof publicQuery\n> = /*#__PURE__*/ createRESTModule(publicQuery);\n/** @internal */\nexport const aggregate: MaybeContext<\n  BuildRESTFunction<typeof publicAggregate> & typeof publicAggregate\n> = /*#__PURE__*/ createRESTModule(publicAggregate);\n/** @internal */\nexport const count: MaybeContext<\n  BuildRESTFunction<typeof publicCount> & typeof publicCount\n> = /*#__PURE__*/ createRESTModule(publicCount);\n/** @internal */\nexport const distinct: MaybeContext<\n  BuildRESTFunction<typeof publicDistinct> & typeof publicDistinct\n> = /*#__PURE__*/ createRESTModule(publicDistinct);\n/** @internal */\nexport const bulkInsert: MaybeContext<\n  BuildRESTFunction<typeof publicBulkInsert> & typeof publicBulkInsert\n> = /*#__PURE__*/ createRESTModule(publicBulkInsert);\n/** @internal */\nexport const bulkSave: MaybeContext<\n  BuildRESTFunction<typeof publicBulkSave> & typeof publicBulkSave\n> = /*#__PURE__*/ createRESTModule(publicBulkSave);\n/** @internal */\nexport const bulkUpdate: MaybeContext<\n  BuildRESTFunction<typeof publicBulkUpdate> & typeof publicBulkUpdate\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdate);\n/** @internal */\nexport const bulkRemove: MaybeContext<\n  BuildRESTFunction<typeof publicBulkRemove> & typeof publicBulkRemove\n> = /*#__PURE__*/ createRESTModule(publicBulkRemove);\n/** @internal */\nexport const queryReferenced: MaybeContext<\n  BuildRESTFunction<typeof publicQueryReferenced> & typeof publicQueryReferenced\n> = /*#__PURE__*/ createRESTModule(publicQueryReferenced);\n/** @internal */\nexport const bulkInsertReferences: MaybeContext<\n  BuildRESTFunction<typeof publicBulkInsertReferences> &\n    typeof publicBulkInsertReferences\n> = /*#__PURE__*/ createRESTModule(publicBulkInsertReferences);\n/** @internal */\nexport const bulkReplaceReferences: MaybeContext<\n  BuildRESTFunction<typeof publicBulkReplaceReferences> &\n    typeof publicBulkReplaceReferences\n> = /*#__PURE__*/ createRESTModule(publicBulkReplaceReferences);\n/** @internal */\nexport const bulkRemoveReferences: MaybeContext<\n  BuildRESTFunction<typeof publicBulkRemoveReferences> &\n    typeof publicBulkRemoveReferences\n> = /*#__PURE__*/ createRESTModule(publicBulkRemoveReferences);\n/** @internal */\nexport const isReferenced: MaybeContext<\n  BuildRESTFunction<typeof publicIsReferenced> & typeof publicIsReferenced\n> = /*#__PURE__*/ createRESTModule(publicIsReferenced);\n\nexport {\n  Segment,\n  SortOrder,\n  Order,\n} from './data-v1-data-service-data.universal.js';\nexport {\n  Item,\n  InsertRequest,\n  Options,\n  InsertResponse,\n  UpdateRequest,\n  UpdateResponse,\n  SaveRequest,\n  SaveResponse,\n  PatchRequest,\n  PatchResponse,\n  PatchWhereRequest,\n  PatchWhereResponse,\n  GetRequest,\n  ReadOptions,\n  GetResponse,\n  RemoveRequest,\n  RemoveResponse,\n  TruncateRequest,\n  TruncateResponse,\n  QueryRequest,\n  Query,\n  Sorting,\n  Paging,\n  QueryV2,\n  QueryV2PagingMethodOneOf,\n  CursorPaging,\n  QueryResponse,\n  PagingMetadataV2,\n  Cursors,\n  AggregationRequest,\n  AggregationResponse,\n  CountRequest,\n  CountResponse,\n  DistinctRequest,\n  DistinctResponse,\n  BulkInsertRequest,\n  BulkInsertResponse,\n  BulkError,\n  ApplicationError,\n  Details,\n  BulkSaveRequest,\n  BulkSaveResponse,\n  BulkUpdateRequest,\n  BulkUpdateResponse,\n  BulkPatchRequest,\n  Entry,\n  BulkPatchResponse,\n  BulkRemoveRequest,\n  BulkRemoveRequestEntry,\n  BulkRemoveResponse,\n  QueryReferencedRequest,\n  QueryReferencedResponse,\n  ReferencedEntity,\n  ReferencedEntityEntityOneOf,\n  BulkInsertReferencesRequest,\n  Reference,\n  BulkInsertReferencesResponse,\n  BulkReplaceReferencesRequest,\n  BulkReplaceReferencesResponse,\n  BulkRemoveReferencesRequest,\n  BulkRemoveReferencesResponse,\n  IsReferencedRequest,\n  IsReferencedResponse,\n  RestoreFromTrashBinRequest,\n  RestoreFromTrashBinResponse,\n  InsertOptions,\n  UpdateOptions,\n  SaveOptions,\n  GetOptions,\n  RemoveOptions,\n  TruncateOptions,\n  QueryOptions,\n  AggregateOptions,\n  CountOptions,\n  DistinctOptions,\n  BulkInsertOptions,\n  BulkSaveOptions,\n  BulkUpdateOptions,\n  BulkRemoveOptions,\n  QueryReferencedOptions,\n  BulkInsertReferencesOptions,\n  BulkReplaceReferencesOptions,\n  BulkRemoveReferencesOptions,\n  IsReferencedOptions,\n} from './data-v1-data-service-data.universal.js';\nexport {\n  SegmentWithLiterals,\n  SortOrderWithLiterals,\n  OrderWithLiterals,\n} from './data-v1-data-service-data.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,2DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ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AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,uBACd,YACgC;AAChC,SAAO,CACL,YAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoBO,SAASC,sBACd,YAC+B;AAC/B,SAAO,CACL,YAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiBO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CACL,YAMAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC1lBA,SAAS,wBAAwB;AAI1B,IAAMC,UAEK,iCAAiBA,OAAY;AAExC,IAAMC,UAEK,iCAAiBA,OAAY;AAExC,IAAMC,QAEK,iCAAiBA,KAAU;AAEtC,IAAMC,OAEK,iCAAiBA,IAAS;AAErC,IAAMC,UAEK,iCAAiBA,OAAY;AAExC,IAAMC,YAEK,iCAAiBA,SAAc;AAC1C,IAAMC,SAEK,iCAAiBA,MAAW;AAEvC,IAAMC,aAEK,iCAAiBA,UAAe;AAE3C,IAAMC,SAEK,iCAAiBA,MAAW;AAEvC,IAAMC,YAEK,iCAAiBA,SAAc;AAE1C,IAAMC,cAEK,iCAAiBA,WAAgB;AAE5C,IAAMC,YAEK,iCAAiBA,SAAc;AAE1C,IAAMC,cAEK,iCAAiBA,WAAgB;AAE5C,IAAMC,cAEK,iCAAiBA,WAAgB;AAE5C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AAEjD,IAAMC,wBAGK,iCAAiBA,qBAA0B;AAEtD,IAAMC,yBAGK,iCAAiBA,sBAA2B;AAEvD,IAAMC,wBAGK,iCAAiBA,qBAA0B;AAEtD,IAAMC,gBAEK,iCAAiBA,aAAkB;","names":["Segment","SortOrder","Order","insert","update","save","get","remove","truncate","query","aggregate","count","distinct","bulkInsert","bulkSave","bulkUpdate","bulkRemove","queryReferenced","bulkInsertReferences","bulkReplaceReferences","bulkRemoveReferences","isReferenced","insert","update","save","get","remove","truncate","query","aggregate","count","distinct","bulkInsert","bulkSave","bulkUpdate","bulkRemove","queryReferenced","bulkInsertReferences","bulkReplaceReferences","bulkRemoveReferences","isReferenced","insert","update","save","get","remove","truncate","query","aggregate","count","distinct","bulkInsert","bulkSave","bulkUpdate","bulkRemove","queryReferenced","bulkInsertReferences","bulkReplaceReferences","bulkRemoveReferences","isReferenced"]}