@wix/wix-data-items-common 1.0.236 → 1.0.237

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/api/PipelineBuilder.js +2 -2
  2. package/dist/cjs/api/PipelineBuilder.js.map +1 -1
  3. package/dist/cjs/api/WixDataAggregate.js.map +1 -1
  4. package/dist/cjs/api/WixDataFilter.js.map +1 -1
  5. package/dist/cjs/api/WixDataQuery.js.map +1 -1
  6. package/dist/cjs/api/WixDataSearch.js.map +1 -1
  7. package/dist/cjs/api/expressions/expressions.js.map +1 -1
  8. package/dist/cjs/api/stages/FilterStage.js.map +1 -1
  9. package/dist/cjs/api/stages/GroupStage.js +3 -1
  10. package/dist/cjs/api/stages/GroupStage.js.map +1 -1
  11. package/dist/cjs/api/stages/ProjectStage.js.map +1 -1
  12. package/dist/cjs/api/stages/SortStage.js.map +1 -1
  13. package/dist/cjs/api/stages/stages.js.map +1 -1
  14. package/dist/cjs/api/types.js.map +1 -1
  15. package/dist/cjs/filter/WithFilter.js.map +1 -1
  16. package/dist/cjs/types/data-item-types.js.map +1 -1
  17. package/dist/esm/api/PipelineBuilder.js +2 -2
  18. package/dist/esm/api/stages/FilterStage.js.map +1 -1
  19. package/dist/esm/api/stages/GroupStage.js +3 -1
  20. package/dist/esm/api/stages/GroupStage.js.map +1 -1
  21. package/dist/esm/api/stages/ProjectStage.js.map +1 -1
  22. package/dist/types/api/PipelineBuilder.d.ts +4 -4
  23. package/dist/types/api/WixDataAggregate.d.ts +7 -7
  24. package/dist/types/api/WixDataFilter.d.ts +50 -84
  25. package/dist/types/api/WixDataFilter.d.ts.map +1 -1
  26. package/dist/types/api/WixDataQuery.d.ts +44 -71
  27. package/dist/types/api/WixDataQuery.d.ts.map +1 -1
  28. package/dist/types/api/WixDataSearch.d.ts +33 -33
  29. package/dist/types/api/expressions/expressions.d.ts +13 -13
  30. package/dist/types/api/stages/FilterStage.d.ts +70 -123
  31. package/dist/types/api/stages/FilterStage.d.ts.map +1 -1
  32. package/dist/types/api/stages/GroupStage.d.ts +20 -19
  33. package/dist/types/api/stages/GroupStage.d.ts.map +1 -1
  34. package/dist/types/api/stages/ProjectStage.d.ts +6 -7
  35. package/dist/types/api/stages/ProjectStage.d.ts.map +1 -1
  36. package/dist/types/api/stages/SortStage.d.ts +2 -2
  37. package/dist/types/api/stages/stages.d.ts +16 -8
  38. package/dist/types/api/stages/stages.d.ts.map +1 -1
  39. package/dist/types/api/types.d.ts +2 -2
  40. package/dist/types/filter/WithFilter.d.ts +26 -42
  41. package/dist/types/filter/WithFilter.d.ts.map +1 -1
  42. package/dist/types/types/data-item-types.d.ts +6 -6
  43. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"names":["Environment","exports","ACTION","BulkActionType","Action","SortOrder","Mode"],"sources":["../../../src/types/data-item-types.ts"],"sourcesContent":["export interface DataItem {\n /** Data item ID. */\n id?: string\n /**\n * ID of the collection to which this item belongs.\n * @readonly\n */\n dataCollectionId?: string\n /**\n * Data item contents.\n *\n * Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:\n *\n * + `_id`: Item ID.\n * + `_createdDate`: Date and time the item was added to the collection.\n * + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.\n * + `_ownerId`: ID of the user who created the item. Can be modified with site owner permissions.\n */\n data?: Record<string, any> | null\n}\n\nexport interface InsertDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert the item. */\n dataCollectionId: string\n /** Item to insert. */\n dataItem: DataItem\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * If true, referenced items will be included.\n * @internal\n */\n includeReferencedItems?: boolean\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport enum Environment {\n LIVE = 'LIVE',\n SANDBOX = 'SANDBOX',\n SANDBOX_PREFERRED = 'SANDBOX_PREFERRED',\n}\n\nexport interface Options {\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: PublishPluginOptions\n}\n\nexport interface PublishPluginOptions {\n showDraftItems?: boolean\n}\n\nexport interface InsertDataItemResponse {\n /** Inserted data item. */\n dataItem?: DataItem\n}\n\nexport interface PatchDataItemRequest {\n /**\n * [Collection environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing) from which to delete item.\n *\n * Default: `LIVE`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection that contains the item to patch. */\n dataCollectionId: string\n /** Patch to apply to the item. */\n patch: Patch\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface Patch {\n /** ID of the item to patch. */\n dataItemId?: string\n /** Modifications to apply. */\n fieldModifications?: FieldModification[]\n}\n\nexport interface FieldModification extends FieldModificationActionOptionsOneOf {\n setFieldOptions?: SetFieldOptions\n incrementFieldOptions?: IncrementFieldOptions\n appendToArrayOptions?: AppendToArrayOptions\n removeFromArrayOptions?: RemoveFromArrayOptions\n /**\n * Path of the field ID to be modified. For example: `title`.\n *\n * Nested fields can be specified using dot notation. For example: `address.street`.\n */\n fieldPath?: string\n /** Patch action to be applied to the specified field. */\n action?: ACTION\n}\n\n/** @oneof */\nexport interface FieldModificationActionOptionsOneOf {\n setFieldOptions?: SetFieldOptions\n incrementFieldOptions?: IncrementFieldOptions\n appendToArrayOptions?: AppendToArrayOptions\n removeFromArrayOptions?: RemoveFromArrayOptions\n}\n\nexport enum ACTION {\n UNKNOWN_ACTION = 'UNKNOWN_ACTION',\n SET_FIELD = 'SET_FIELD',\n REMOVE_FIELD = 'REMOVE_FIELD',\n INCREMENT_FIELD = 'INCREMENT_FIELD',\n APPEND_TO_ARRAY = 'APPEND_TO_ARRAY',\n REMOVE_FROM_ARRAY = 'REMOVE_FROM_ARRAY',\n}\n\nexport interface SetFieldOptions {\n /**\n * Value to set for the specified field. This replaces the existing value.\n */\n value?: any\n}\n\nexport interface IncrementFieldOptions {\n /**\n * Numerical value by which to increment or decrement the current field value.\n */\n value?: number\n}\n\nexport interface AppendToArrayOptions {\n /**\n * Value to append to the specified array.\n */\n value?: any\n}\n\nexport interface RemoveFromArrayOptions {\n /**\n * Value to remove from the specified array.\n */\n value?: any\n}\n\nexport interface DataPublishPluginOptions {\n /**\n * Whether to include draft items.\n *\n * When `true`, the task deletes both published and draft items. Default: `false`.\n */\n includeDraftItems?: boolean\n}\n\nexport interface PatchDataItemResponse {\n /** Patched data item. */\n dataItem?: DataItem\n}\n\nexport interface BulkPatchDataItemsRequest {\n /**\n * [Collection environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing) from which to delete item.\n *\n * Default: `LIVE`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection that contains the items to patch. */\n dataCollectionId: string\n /** Patches to apply to the items. */\n patches: Patch[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Whether to return the updated data items.\n * When `true`, the `results` objects contain a `dataItem` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /**\n * Prevents hooks from running for the operation. Can only be used in the backend code of a Wix site.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface BulkPatchDataItemsResponse {\n /** Information about the updated items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkDataItemResult {\n /** The action attempted for the data item. */\n action?: BulkActionType\n /** Metadata related to the data item for which the action was attempted. */\n itemMetadata?: ItemMetadata\n /** The data item for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */\n dataItem?: DataItem\n}\n\nexport enum BulkActionType {\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n INSERT = 'INSERT',\n UPDATE = 'UPDATE',\n DELETE = 'DELETE',\n PATCH = 'PATCH',\n}\n\nexport interface ItemMetadata {\n /** Item ID. This field doesn't appear if there is no item ID, for example, when item creation fails. */\n id?: string | null\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean\n /** Details about the error in case of failure. */\n error?: ApplicationError\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string\n /** Description of the error. */\n description?: string\n /** Data related to the error. */\n data?: Record<string, any> | null\n}\n\nexport interface BulkActionMetadata {\n /** Number of items successfully processed. */\n totalSuccesses?: number\n /** Number of items that couldn't be processed. */\n totalFailures?: number\n}\n\nexport interface UpdateDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the existing item. */\n dataCollectionId: string\n /** Updated data item content. The existing data item's content is replaced entirely. */\n dataItem: DataItem\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * If true, referenced items will be included.\n * @internal\n */\n includeReferencedItems?: boolean\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface UpdateDataItemResponse {\n /** Updated data item. */\n dataItem?: DataItem\n}\n\nexport interface SaveDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert or update the item. */\n dataCollectionId: string\n /** Data item to insert or update. */\n dataItem: DataItem\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * If true, referenced items will be included.\n * @internal\n */\n includeReferencedItems?: boolean\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface SaveDataItemResponse {\n /**\n * Action carried out for the item.\n *\n * + `INSERTED`: A new item was added to the collection.\n * + `UPDATED`: An existing item in the collection was updated.\n */\n action?: Action\n /** Inserted or updated data item. */\n dataItem?: DataItem\n}\n\nexport enum Action {\n UNKNOWN_ACTION = 'UNKNOWN_ACTION',\n INSERTED = 'INSERTED',\n UPDATED = 'UPDATED',\n}\n\nexport interface GetDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection from which to retrieve the data item. */\n dataCollectionId: string\n /** ID of the data item to retrieve. */\n dataItemId: string\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /**\n * Fields to return for the item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.\n *\n * **Note:** The `_id` system field is always returned.\n */\n fields?: string[]\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface GetDataItemResponse {\n /** Retrieved item. */\n dataItem?: DataItem\n}\n\nexport interface RemoveDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`\n * @internal\n */\n environment?: Environment\n /** ID of the collection from which to remove the item. */\n dataCollectionId: string\n /** ID of the item to remove. */\n dataItemId: string\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface RemoveDataItemResponse {\n /** Removed item. */\n dataItem?: DataItem\n}\n\nexport interface TruncateDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection to truncate. */\n dataCollectionId: string\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n}\n\nexport interface TruncateDataItemsResponse {}\n\nexport interface QueryDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection to query. */\n dataCollectionId: string\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 query?: QueryV2\n /**\n * Whether to return the total count in the response for a query with offset paging.\n * When `true`, the `pagingMetadata` object in the response contains a `total` field.\n *\n * Default: `false`\n */\n returnTotalCount?: 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 * @deprecated\n * @replacedBy referenced_item_options\n * @removalDate 2025-08-01\n */\n includeReferencedItems?: string[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /**\n * Request information about this collection caching\n * @internal\n */\n requestCachingInfo?: boolean\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n /** Options for retrieving referenced items. */\n referencedItemOptions?: ReferencedItemOptions[]\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 *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n *\n * **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\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 /**\n * Fields to return for each item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.\n * **Note:** The `_id` system field is always returned.\n */\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 Sorting {\n /** Name of the field to sort by. */\n fieldName?: string\n /** Sort order. */\n order?: SortOrder\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null\n /** Number of items to skip in the current sort order. */\n offset?: number | null\n}\n\nexport interface CursorPaging {\n /** Number of items to load. */\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 ReferencedItemOptions {\n /** Field containing references in the queried item. */\n fieldName?: string\n /** Maximum number of referenced items to include for each queried item. */\n limit?: number | null\n}\n\nexport interface QueryDataItemsResponse {\n /** Retrieved items. */\n dataItems?: DataItem[]\n /**\n * Caching info. Returned if `request_caching_info` is true in the request and caching is allowed.\n * @internal\n */\n cachingInfo?: CachingInfo\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface CachingInfo {\n /** Caching tags for this collection */\n tags?: string[]\n /** max caching time if set */\n maxAge?: number | null\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, `returnTotalCount` is `true` in the request, and `tooManyToCount` is false. */\n total?: number | null\n /** Whether 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 * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null\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 AggregateDataItemsRequest\n extends AggregateDataItemsRequestPagingMethodOneOf {\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 * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection on which to run the aggregation. */\n dataCollectionId: string\n /**\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 *\n * **Note:** The values you provide for each filter field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n initialFilter?: Record<string, any> | null\n /** Aggregation applied to the data. */\n aggregation?: Aggregation\n /**\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 * **Note:** The values you provide for each filter field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n finalFilter?: 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 /**\n * Whether to return the total count in the response for a query with offset paging.\n * When `true`, the `pagingMetadata` object in the response contains a `total` field.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\n/** @oneof */\nexport interface AggregateDataItemsRequestPagingMethodOneOf {\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 Average {\n /** Name of the field for which to calculate the average value. */\n itemFieldName?: string\n}\n\nexport interface Min {\n /** Name of the field for which to calculate the minimum value. */\n itemFieldName?: string\n}\n\nexport interface Max {\n /** Name of the field for which to calculate the maximum value. */\n itemFieldName?: string\n}\n\nexport interface Sum {\n /** Name of the field for which to calculate the sum. */\n itemFieldName?: string\n}\n\nexport interface Count {}\n\nexport interface Operation extends OperationCalculateOneOf {\n /** Calculate the average value of a specified field for all items in the grouping. */\n average?: Average\n /** Calculate the minimum value of a specified field for all items in the grouping. */\n min?: Min\n /** Calculate the maximum value of a specified field for all items in the grouping. */\n max?: Max\n /** Calculate the sum of values of a specified field for all items in the grouping. */\n sum?: Sum\n /** Calculate the number of items in the grouping. */\n itemCount?: Count\n /** Name of the field containing results of the operation. */\n resultFieldName?: string\n}\n\n/** @oneof */\nexport interface OperationCalculateOneOf {\n /** Calculate the average value of a specified field for all items in the grouping. */\n average?: Average\n /** Calculate the minimum value of a specified field for all items in the grouping. */\n min?: Min\n /** Calculate the maximum value of a specified field for all items in the grouping. */\n max?: Max\n /** Calculate the sum of values of a specified field for all items in the grouping. */\n sum?: Sum\n /** Calculate the number of items in the grouping. */\n itemCount?: Count\n}\n\nexport interface Aggregation {\n /** Fields by which to group items for the aggregation. If empty, the aggregation is carried out on all items in the collection. */\n groupingFields?: string[]\n /** Operations to carry out on the data in each grouping. */\n operations?: Operation[]\n}\n\nexport interface AggregateDataItemsResponse {\n /** Aggregation results. */\n results?: Record<string, any>[] | null\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface CountDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection for which to count query results. */\n dataCollectionId: string\n /**\n * Filter object in the following format:\n *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`.\n *\n * Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n *\n * **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n filter?: Record<string, any> | null\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n */\n language?: string | null\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface CountDataItemsResponse {\n /** Number of items matching the query. */\n totalCount?: number\n}\n\nexport interface QueryDistinctValuesRequest\n extends QueryDistinctValuesRequestPagingMethodOneOf {\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 * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection to query. */\n dataCollectionId: string\n /** Item field name for which to return all distinct values. */\n fieldName?: string\n /**\n * Filter object in the following format:\n *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`.\n *\n * Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n *\n * **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n filter?: Record<string, any> | null\n /** Sort order. */\n order?: SortOrder\n /**\n * Whether to return the total count in the response for a query with offset paging.\n * When `true`, the `pagingMetadata` object in the response contains a `total` field.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * > **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\n/** @oneof */\nexport interface QueryDistinctValuesRequestPagingMethodOneOf {\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 QueryDistinctValuesResponse {\n /** List of distinct values contained in the field specified in `fieldName`. */\n distinctValues?: any[]\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface BulkInsertDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert the items. */\n dataCollectionId: string\n /** Data items to insert. */\n dataItems: DataItem[]\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options.\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to return the inserted data items.\n * When `true`, the `results` objects contain a `dataItem` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface BulkInsertDataItemsResponse {\n /** Information about the inserted items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkUpdateDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to update items. */\n dataCollectionId: string\n /** Data items to update. */\n dataItems: DataItem[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to return the updated data items.\n * When `true`, the `results` objects contain a `dataItem` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface BulkUpdateDataItemsResponse {\n /** Information about the updated items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkSaveDataItemsRequest {\n /**\n * Environment: LIVE or SANDBOX\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert or update the items. */\n dataCollectionId: string\n /** Data items to insert or update. */\n dataItems: DataItem[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to return the saved data item.\n * When `true`, the `results` objects contain a `dataItem` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface BulkSaveDataItemsResponse {\n /** Information about the saved items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkRemoveDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection from which to remove the item. */\n dataCollectionId: string\n /** IDs of data items to remove. */\n dataItemIds: string[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface BulkRemoveDataItemsResponse {\n /** Information about the removed data items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface QueryReferencedDataItemsRequest\n extends QueryReferencedDataItemsRequestPagingMethodOneOf {\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 * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring item. */\n dataCollectionId: string\n /** ID of the referring item. */\n referringItemId?: string\n /** Field containing references in the referring item. */\n referringItemFieldName?: string\n /** Order of the returned referenced items. Sorted by the date each item was referenced. */\n order?: SortOrder\n /**\n * Whether to return the total count in the response.\n * When `true`, the `pagingMetadata` object in the response contains a `total` field.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /**\n * Fields to return for each referenced item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.\n * **Note:** The `_id` system field is always returned.\n */\n fields?: string[]\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\n/** @oneof */\nexport interface QueryReferencedDataItemsRequestPagingMethodOneOf {\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 QueryReferencedDataItemsResponse {\n /** Referenced items and/or IDs. For successfully resolved references, the referenced data item is returned. For references that can't be resolved, the ID is returned. */\n results?: ReferencedResult[]\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface UnresolvedReference {\n /** ID of the referring item. */\n referringItemId?: string\n /** Field specified to query for references. */\n referringItemFieldName?: string\n}\n\nexport interface ReferencedResult extends ReferencedResultEntityOneOf {\n /** Data item referenced. */\n dataItem?: DataItem\n /** Unresolved reference. 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 unresolvedReference?: UnresolvedReference\n}\n\n/** @oneof */\nexport interface ReferencedResultEntityOneOf {\n /** Data item referenced. */\n dataItem?: DataItem\n /** Unresolved reference. 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 unresolvedReference?: UnresolvedReference\n}\n\nexport interface IsReferencedDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring data item. */\n dataCollectionId: string\n /** Field to check for a reference to the item that may be referenced. */\n referringItemFieldName: string\n /** ID of the referring item. */\n referringItemId: string\n /** ID of the item that may be referenced. */\n referencedItemId: string\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface IsReferencedDataItemResponse {\n /** Whether the specified reference exists. */\n isReferenced?: boolean\n}\n\nexport interface InsertDataItemReferenceRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert the reference. */\n dataCollectionId: string\n /** Reference to insert */\n dataItemReference?: DataItemReference\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface DataItemReference {\n /** Referring item field containing the references to the referenced items. */\n referringItemFieldName?: string\n /** ID of the referring item. */\n referringItemId?: string\n /** ID of the referenced item. */\n referencedItemId?: string\n}\n\nexport interface InsertDataItemReferenceResponse {\n /** Inserted reference. */\n dataItemReference?: DataItemReference\n}\n\nexport interface RemoveDataItemReferenceRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring item. */\n dataCollectionId: string\n /** Reference to remove. */\n dataItemReference: DataItemReference\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface RemoveDataItemReferenceResponse {\n /** Removed reference. */\n dataItemReference?: DataItemReference\n}\n\nexport interface BulkInsertDataItemReferencesRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring items. */\n dataCollectionId: string\n /** References to insert. */\n dataItemReferences: DataItemReference[]\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to return the inserted data item references.\n * When `true`, the `results` objects contain a `dataItemReference` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface BulkInsertDataItemReferencesResponse {\n /** Information about the inserted references. */\n results?: BulkDataItemReferenceResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkDataItemReferenceResult {\n /** Action attempted for the reference. */\n action?: BulkActionType\n /** Metadata related to the reference for which the action was attempted. */\n referenceMetadata?: ItemMetadata\n /** Reference for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */\n dataItemReference?: DataItemReference\n}\n\nexport interface BulkRemoveDataItemReferencesRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring items. */\n dataCollectionId: string\n /** References to remove. */\n dataItemReferences: DataItemReference[]\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface BulkRemoveDataItemReferencesResponse {\n /** Information about the removed references. */\n results?: BulkDataItemReferenceResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface ReplaceDataItemReferencesRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring item. */\n dataCollectionId: string\n /** Field containing references in the referring item. */\n referringItemFieldName: 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 /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface ReplaceDataItemReferencesResponse {\n /** Updated references. */\n dataItemReferences?: DataItemReference[]\n}\n\nexport interface SearchDataItemsRequest {\n /**\n * Environment: LIVE or SANDBOX\n * @internal\n */\n environment?: Environment\n /**\n * ID of the collection to query.\n * @maxLength 255\n */\n dataCollectionId: string\n /** Search. */\n search?: Search\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n * @format GUID\n */\n appId?: string | null\n /**\n * NOT IMPLEMENTED!\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language.\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n * If not provided, result text is not translated.\n * @internal\n * @format LANGUAGE_TAG\n */\n language?: string | null\n /**\n * Whether to suppress data hooks.\n * When `true`, data hooks typically triggered by this endpoint don't run.\n *\n * **Note:** This option can only be used in code that runs in [the Wix site backend](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend).\n *\n * Default: `false`\n * @internal\n */\n suppressHooks?: boolean\n /**\n * Options for the Publish plugin.\n * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.\n */\n publishPluginOptions?: DataPublishPluginOptions\n /**\n * Options for retrieving referenced items.\n * @maxSize 100\n */\n referencedItemOptions?: SearchDataItemsRequestReferencedItemOptions[]\n}\n\nexport interface Search extends SearchPagingMethodOneOf {\n /** Pointer to page of results using offset. Can't be used together with 'cursor_paging'. */\n paging?: Paging\n /** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can't be used together with 'filter' or 'sort'. */\n cursorPaging?: CursorPaging\n /**\n * Filter object in the following format:\n *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n *\n * **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\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 * @maxSize 10\n */\n sort?: Sorting[]\n /**\n * Fields to return for each item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.\n * **Note:** The `_id` system field is always returned.\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[]\n /** Free text to match in searchable fields. */\n search?: SearchDetails\n}\n\n/** @oneof */\nexport interface SearchPagingMethodOneOf {\n /** Pointer to page of results using offset. Can't be used together with 'cursor_paging'. */\n paging?: Paging\n /** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can't be used together with 'filter' or 'sort'. */\n cursorPaging?: CursorPaging\n}\n\nexport interface SearchDetails {\n /** Defines how separate search terms in `expression` are combined. */\n mode?: Mode\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null\n /** Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). */\n fuzzy?: boolean\n}\n\nexport enum Mode {\n /** Any of the search terms must be present. */\n OR = 'OR',\n /** All search terms must be present. */\n AND = 'AND',\n}\n\nexport interface SearchDataItemsRequestReferencedItemOptions {\n /**\n * Field containing references in the queried item.\n * @maxLength 1000\n */\n fieldName?: string\n /**\n * Maximum number of referenced items to include for each queried item.\n * @max 1000\n */\n limit?: number | null\n}\n\nexport interface SearchDataItemsResponse {\n /**\n * Retrieved items.\n * @maxSize 1000\n */\n dataItems?: DataItem[]\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface AggregateDataItemsResponse {\n /** Aggregation results. */\n results?: Record<string, any>[] | null\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface AggregatePipelineDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /**\n * ID of the collection to run the aggregation pipeline on.\n * @maxLength 256\n */\n dataCollectionId: string\n /** Aggregation pipeline configuration containing stages and paging options. */\n pipeline?: AggregationPipeline\n /**\n * Whether to return the total result count when running a query with offset paging. When `true`, the `pagingMetadata` property in the response contains a `total` field.\n *\n * Learn more about [offset paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging#paging).\n *\n * Default: `false`.\n */\n returnTotalCount?: boolean\n /**\n * Grid app ID. Optional in Live segment.\n * @internal\n * @format GUID\n */\n appId?: string | null\n /**\n * Whether to read from the primary database for the most current data.\n *\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n *\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`.\n */\n consistentRead?: boolean\n /**\n * Language to run the aggregation on, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n *\n * When provided, the aggregation runs on items in the specified language. When not provided, the aggregation runs on items in the default language.\n *\n * > **Note:** The Wix user must enable translation for the specified language in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n * Learn more about [using Wix Multilingual to translate CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).\n * @format LANGUAGE_TAG\n */\n language?: string | null\n /**\n * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.\n *\n * Learn more about [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).\n */\n appOptions?: Record<string, any> | null\n /**\n * Options for the Publish plugin.\n *\n * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items aren't.\n */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface Expression extends ExpressionValueOneOf {\n /**\n * Path to the field containing the value to resolve.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`.\n * @maxLength 1000\n */\n fieldPath?: string\n /**\n * Text value.\n * @maxLength 1000\n */\n text?: string\n /** Number value. */\n numeric?: number\n /** Adds the specified expressions together. */\n add?: AddOperation\n /** Calculates the total sum of multiple expressions. */\n sum?: SumOperation\n /** Subtracts 1 expression from another. */\n subtract?: SubtractOperation\n /** Multiplies multiple expressions together. */\n multiply?: MultiplyOperation\n /** Divides 1 expression by another. */\n divide?: DivideOperation\n /** Finds the absolute value of an expression. */\n abs?: AbsOperation\n /** Finds the remainder when dividing 1 expression by another. */\n mod?: ModOperation\n /** Rounds an expression down to the nearest whole number. */\n floor?: FloorOperation\n /** Rounds an expression up to the nearest whole number. */\n ceil?: CeilOperation\n /** Joins multiple expressions together to create a string. */\n concat?: ConcatOperation\n /** Converts an expression to a string. */\n stringify?: StringifyOperation\n /** Converts an expression to lowercase. */\n toLower?: ToLowerOperation\n /** Converts an expression to uppercase. */\n toUpper?: ToUpperOperation\n /** Extracts a portion of a string expression. */\n substring?: SubstringOperation\n /** Finds the length of a string expression. */\n length?: LengthOperation\n}\n\n/** @oneof */\nexport interface ExpressionValueOneOf {\n /**\n * Path to the field containing the value to resolve.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`.\n * @maxLength 1000\n */\n fieldPath?: string\n /**\n * Text value.\n * @maxLength 1000\n */\n text?: string\n /** Number value. */\n numeric?: number\n /** Adds the specified expressions together. */\n add?: AddOperation\n /** Calculates the total sum of multiple expressions. */\n sum?: SumOperation\n /** Subtracts 1 expression from another. */\n subtract?: SubtractOperation\n /** Multiplies multiple expressions together. */\n multiply?: MultiplyOperation\n /** Divides 1 expression by another. */\n divide?: DivideOperation\n /** Finds the absolute value of an expression. */\n abs?: AbsOperation\n /** Finds the remainder when dividing 1 expression by another. */\n mod?: ModOperation\n /** Rounds an expression down to the nearest whole number. */\n floor?: FloorOperation\n /** Rounds an expression up to the nearest whole number. */\n ceil?: CeilOperation\n /** Joins multiple expressions together to create a string. */\n concat?: ConcatOperation\n /** Converts an expression to a string. */\n stringify?: StringifyOperation\n /** Converts an expression to lowercase. */\n toLower?: ToLowerOperation\n /** Converts an expression to uppercase. */\n toUpper?: ToUpperOperation\n /** Extracts a portion of a string expression. */\n substring?: SubstringOperation\n /** Finds the length of a string expression. */\n length?: LengthOperation\n}\n\nexport interface AddOperation {\n /**\n * Expressions to add together.\n *\n * All expressions must resolve to numbers.\n * @maxSize 1000\n */\n expressions?: Expression[]\n}\n\nexport interface SumOperation {\n /**\n * Expressions to calculate the total sum of.\n *\n * All expressions must resolve to numbers.\n * @maxSize 1000\n */\n expressions?: Expression[]\n}\n\nexport interface SubtractOperation {\n /**\n * Expression to subtract `secondExpression` from.\n *\n * Expression must resolve to a number.\n */\n firstExpression?: Expression\n /**\n * Expression to subtract from `firstExpression`.\n *\n * Expression must resolve to a number.\n */\n secondExpression?: Expression\n}\n\nexport interface MultiplyOperation {\n /**\n * Expressions to multiply.\n *\n * All expressions must resolve to numbers.\n * @maxSize 1000\n */\n expressions?: Expression[]\n}\n\nexport interface DivideOperation {\n /**\n * Expression to divide by `secondExpression`.\n *\n * Expression must resolve to a number.\n */\n firstExpression?: Expression\n /**\n * Expression to divide `firstExpression` by.\n *\n * Expression must resolve to a non-zero number.\n */\n secondExpression?: Expression\n}\n\nexport interface AbsOperation {\n /**\n * Expression to find the absolute value of.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface ModOperation {\n /**\n * Expression to divide by `secondExpression` to find the remainder.\n *\n * Expression must resolve to a number.\n */\n firstExpression?: Expression\n /**\n * Expression to divide `firstExpression` by.\n *\n * Expression must resolve to a non-zero number.\n */\n secondExpression?: Expression\n}\n\nexport interface FloorOperation {\n /**\n * Expression to round down to the nearest whole number.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface CeilOperation {\n /**\n * Expression to round up to the nearest whole number.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface ConcatOperation {\n /**\n * Expressions to join together.\n *\n * All expressions must resolve to strings.\n * @maxSize 1000\n */\n expressions?: Expression[]\n}\n\nexport interface StringifyOperation {\n /** Expression to convert to a string. */\n expression?: Expression\n}\n\nexport interface ToLowerOperation {\n /**\n * Expression to convert to lowercase.\n *\n * Expression must resolve to a string.\n */\n expression?: Expression\n}\n\nexport interface ToUpperOperation {\n /**\n * Expression to convert to uppercase.\n *\n * Expression must resolve to a string.\n */\n expression?: Expression\n}\n\nexport interface SubstringOperation {\n /**\n * Expression to extract a substring from.\n *\n * Expression must resolve to a string.\n */\n expression?: Expression\n /**\n * Starting position of the substring to extract, specified in zero-based indexing.\n *\n * Expression must resolve to a number.\n */\n startExpression?: Expression\n /**\n * Number of characters to extract from the starting position.\n *\n * Expression must resolve to a number.\n */\n lengthExpression?: Expression\n}\n\nexport interface LengthOperation {\n /**\n * Expression to count the total number of characters of.\n *\n * Expression must resolve to a string.\n */\n expression?: Expression\n}\n\nexport interface Avg {\n /**\n * Expression to calculate the group's average value.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface AccumulatorMin {\n /**\n * Expression to find the group's minimum value.\n *\n * Expression must resolve to a comparable value, such as a number or string.\n */\n expression?: Expression\n}\n\nexport interface AccumulatorMax {\n /**\n * Expression to find the group's maximum value.\n *\n * Expression must resolve to a comparable value, such as a number or string.\n */\n expression?: Expression\n}\n\nexport interface AccumulatorSum {\n /**\n * Expression to calculate the group's total sum.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface First {\n /** Expression to find the first item in the group. */\n expression?: Expression\n}\n\nexport interface Last {\n /** Expression to find the last item in the group. */\n expression?: Expression\n}\n\nexport interface Push {\n /** Expression to collect items into an array. */\n expression?: Expression\n}\n\nexport interface Include {\n /**\n * Key of the field to include in the result.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`. Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n fieldName?: string\n}\n\nexport interface Exclude {\n /**\n * Key of the field to exclude from the result.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`. Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n fieldName?: string\n}\n\nexport interface Reshape {\n /**\n * Key of the field to create in the result item.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n resultFieldName?: string\n /** Expression to resolve. The result of the expression becomes the value of the new field. */\n expression?: Expression\n}\n\nexport interface ProjectNested {\n /**\n * Key of the parent field for the nested fields.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n resultFieldName?: string\n /**\n * Nested fields to include, exclude, or reshape.\n * @maxSize 1000\n */\n fields?: Field[]\n}\n\nexport interface Field extends FieldProjectionOneOf {\n /** When specified, includes only the specified field in the result. All other fields are excluded. */\n include?: Include\n /** When specified, excludes the specified field from the result. All other fields are included. */\n exclude?: Exclude\n /** Reshapes a new field based on the specified expression. */\n reshape?: Reshape\n /** Creates nested fields by including, excluding, or reshaping fields. */\n projectNested?: ProjectNested\n}\n\n/** @oneof */\nexport interface FieldProjectionOneOf {\n /** When specified, includes only the specified field in the result. All other fields are excluded. */\n include?: Include\n /** When specified, excludes the specified field from the result. All other fields are included. */\n exclude?: Exclude\n /** Reshapes a new field based on the specified expression. */\n reshape?: Reshape\n /** Creates nested fields by including, excluding, or reshaping fields. */\n projectNested?: ProjectNested\n}\n\nexport interface GroupId {\n /**\n * Name of the field to group items by.\n *\n * This becomes the field name in the result's `_id` property.\n * @maxLength 1000\n */\n key?: string\n /** Expression to determine the grouping value. Items whose expression resolves to the same value are grouped together in the result item's `_id` property. */\n expression?: Expression\n}\n\nexport interface Accumulator extends AccumulatorExpressionOneOf {\n /** Calculates the average value across all items in the group based on the specified expression. */\n avg?: Avg\n /** Finds the minimum value across all items in the group. */\n min?: AccumulatorMin\n /** Finds the maximum value across all items in the group. */\n max?: AccumulatorMax\n /** Calculates the sum of the specified expression across all items in the group. */\n sum?: AccumulatorSum\n /** Finds the first item in the group. */\n first?: First\n /** Finds the last item in the group. */\n last?: Last\n /** Collects values from all items in the group into an array. */\n push?: Push\n /**\n * Key of the field to create in the output item to contain the aggregation result.\n * @maxLength 1000\n */\n resultFieldName?: string\n}\n\n/** @oneof */\nexport interface AccumulatorExpressionOneOf {\n /** Calculates the average value across all items in the group based on the specified expression. */\n avg?: Avg\n /** Finds the minimum value across all items in the group. */\n min?: AccumulatorMin\n /** Finds the maximum value across all items in the group. */\n max?: AccumulatorMax\n /** Calculates the sum of the specified expression across all items in the group. */\n sum?: AccumulatorSum\n /** Finds the first item in the group. */\n first?: First\n /** Finds the last item in the group. */\n last?: Last\n /** Collects values from all items in the group into an array. */\n push?: Push\n}\n\nexport interface Stage extends StageStageOneOf {\n /** Groups aggregated items to new result items. */\n group?: Group\n /**\n * Aggregation filter. Only collection items that match the filter are processed.\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n *\n * > **Note:** The values you provide for each filter field must adhere to that field's data type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n filter?: Record<string, any> | null\n /**\n * Sorting preferences.\n *\n * Learn more about [sorting and paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\n sort?: AggregatePipelineDataItemsRequestSorting\n /** Transforms collection items by including, excluding, or reshaping fields. */\n projection?: Projection\n /**\n * Converts an object to an array.\n *\n * Each property becomes an element in the new array that includes all other fields from the original object.\n */\n objectToArray?: ObjectToArray\n /**\n * Unwinds an array into separate result items.\n *\n * Creates a new result object for each array element. Each new object contains the array element's value and all other fields from the original object.\n */\n unwindArray?: UnwindArray\n /** Number of results to skip from the beginning of the result set. */\n skip?: number\n /** Maximum number of results to return. */\n limit?: number\n}\n\n/** @oneof */\nexport interface StageStageOneOf {\n /** Groups aggregated items to new result items. */\n group?: Group\n /**\n * Aggregation filter. Only collection items that match the filter are processed.\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language#filters).\n *\n * > **Note:** The values you provide for each filter field must adhere to that field's data type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n filter?: Record<string, any> | null\n /**\n * Sorting preferences.\n *\n * Learn more about [sorting and paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\n sort?: AggregatePipelineDataItemsRequestSorting\n /** Transforms collection items by including, excluding, or reshaping fields. */\n projection?: Projection\n /**\n * Converts an object to an array.\n *\n * Each property becomes an element in the new array that includes all other fields from the original object.\n */\n objectToArray?: ObjectToArray\n /**\n * Unwinds an array into separate result items.\n *\n * Creates a new result object for each array element. Each new object contains the array element's value and all other fields from the original object.\n */\n unwindArray?: UnwindArray\n /** Number of results to skip from the beginning of the result set. */\n skip?: number\n /** Maximum number of results to return. */\n limit?: number\n}\n\nexport interface Group {\n /**\n * Grouping criteria by which to organize items.\n *\n * Each `groupId` specifies a field by which to group items, and serves as the result item's unique `_id` property.\n *\n * Collection items with identical values for the specified `expression` are placed in the same group based on the specified `key`. If empty, all items are treated as a single group.\n * @maxSize 1000\n */\n groupIds?: GroupId[]\n /**\n * Accumulation operations to run on each group.\n *\n * Accumulators aggregate data across all items in the group and return the result in a new field.\n *\n * > **Note:** When using accumulators, the type of expression must match the operation type. For example, when using the `sum` accumulator, the specified expression must resolve to a number.\n * @maxSize 1000\n */\n accumulators?: Accumulator[]\n}\n\nexport interface AggregatePipelineDataItemsRequestSorting {\n /**\n * Fields to sort the results by.\n * @maxSize 1000\n */\n values?: Sorting[]\n}\n\n/** Transforms collection items by including, excluding, or reshaping fields. */\nexport interface Projection {\n /**\n * Fields to include, exclude, or reshape.\n * @maxSize 1000\n */\n fields?: Field[]\n}\n\n/** Converts an object to an array. */\nexport interface ObjectToArray {\n /**\n * Key of the object field to convert to an array.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`. Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n objectFieldName?: string\n /**\n * Key of the new array to create in the result item.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n destinationFieldName?: string\n}\n\n/** Unwinds an array. */\nexport interface UnwindArray {\n /**\n * Key of the array field to unwind.\n *\n * Use dot notation to specify a nested array. For example, `user.products` or `product.colors`. Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n arrayFieldName?: string\n}\n\nexport interface AggregationPipeline\n extends AggregationPipelinePagingMethodOneOf {\n /**\n * Paging options to limit and skip the number of results. Call [`withPaging()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/with-stages) to configure paging.\n *\n * Learn more about [sorting and paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\n paging?: Paging\n /**\n * Cursor token referring to a page of results.\n *\n * Not used in the first request. Subsequent requests use the cursor token and not `filter` or `sort`.\n */\n cursorPaging?: CursorPaging\n /**\n * Sequence of aggregation operations to apply to the data. Stages are processed in order, with each stage operating on the output of the previous stage.\n *\n * Call [`withStages()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/with-stages) to add and configure aggregation stages.\n * @maxSize 100\n */\n stages?: Stage[]\n}\n\n/** @oneof */\nexport interface AggregationPipelinePagingMethodOneOf {\n /**\n * Paging options to limit and skip the number of results.\n *\n * Learn more about [sorting and paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\n paging?: Paging\n /**\n * Cursor token referring to a page of results.\n *\n * Not used in the first request. Subsequent requests use the cursor token and not `filter` or `sort`.\n */\n cursorPaging?: CursorPaging\n}\n\nexport interface AggregatePipelineDataItemsResponse {\n /**\n * Aggregation results.\n * @maxSize 10000\n */\n results?: Record<string, any>[] | null\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n"],"mappings":";;;;IA4DYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAyFvB;AAAA,IAQYE,MAAM,GAAAD,OAAA,CAAAC,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAAA,IAsGNC,cAAc,GAAAF,OAAA,CAAAE,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IAsIdC,MAAM,GAAAH,OAAA,CAAAG,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AA+OlB;AAAA,IAeYC,SAAS,GAAAJ,OAAA,CAAAI,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAuJrB;AA6CA;AAoKA;AAgRA;AA6BA;AA4UA;AAAA,IAoBYC,IAAI,GAAAL,OAAA,CAAAK,IAAA,0BAAJA,IAAI;EACd;EADUA,IAAI;EAGd;EAHUA,IAAI;EAAA,OAAJA,IAAI;AAAA;AAkJhB;AAkUA;AA8CA;AAuDA;AAmEA;AASA;AAkBA;AAkCA","ignoreList":[]}
1
+ {"version":3,"names":["Environment","exports","ACTION","BulkActionType","Action","SortOrder","Mode"],"sources":["../../../src/types/data-item-types.ts"],"sourcesContent":["export interface DataItem {\n /** Data item ID. */\n id?: string\n /**\n * ID of the collection to which this item belongs.\n * @readonly\n */\n dataCollectionId?: string\n /**\n * Data item contents.\n *\n * Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:\n *\n * + `_id`: Item ID.\n * + `_createdDate`: Date and time the item was added to the collection.\n * + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.\n * + `_ownerId`: ID of the user who created the item. Can be modified with site owner permissions.\n */\n data?: Record<string, any> | null\n}\n\nexport interface InsertDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert the item. */\n dataCollectionId: string\n /** Item to insert. */\n dataItem: DataItem\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * If true, referenced items will be included.\n * @internal\n */\n includeReferencedItems?: boolean\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport enum Environment {\n LIVE = 'LIVE',\n SANDBOX = 'SANDBOX',\n SANDBOX_PREFERRED = 'SANDBOX_PREFERRED',\n}\n\nexport interface Options {\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: PublishPluginOptions\n}\n\nexport interface PublishPluginOptions {\n showDraftItems?: boolean\n}\n\nexport interface InsertDataItemResponse {\n /** Inserted data item. */\n dataItem?: DataItem\n}\n\nexport interface PatchDataItemRequest {\n /**\n * [Collection environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing) from which to delete item.\n *\n * Default: `LIVE`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection that contains the item to patch. */\n dataCollectionId: string\n /** Patch to apply to the item. */\n patch: Patch\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface Patch {\n /** ID of the item to patch. */\n dataItemId?: string\n /** Modifications to apply. */\n fieldModifications?: FieldModification[]\n}\n\nexport interface FieldModification extends FieldModificationActionOptionsOneOf {\n setFieldOptions?: SetFieldOptions\n incrementFieldOptions?: IncrementFieldOptions\n appendToArrayOptions?: AppendToArrayOptions\n removeFromArrayOptions?: RemoveFromArrayOptions\n /**\n * Path of the field ID to be modified. For example: `title`.\n *\n * Nested fields can be specified using dot notation. For example: `address.street`.\n */\n fieldPath?: string\n /** Patch action to be applied to the specified field. */\n action?: ACTION\n}\n\n/** @oneof */\nexport interface FieldModificationActionOptionsOneOf {\n setFieldOptions?: SetFieldOptions\n incrementFieldOptions?: IncrementFieldOptions\n appendToArrayOptions?: AppendToArrayOptions\n removeFromArrayOptions?: RemoveFromArrayOptions\n}\n\nexport enum ACTION {\n UNKNOWN_ACTION = 'UNKNOWN_ACTION',\n SET_FIELD = 'SET_FIELD',\n REMOVE_FIELD = 'REMOVE_FIELD',\n INCREMENT_FIELD = 'INCREMENT_FIELD',\n APPEND_TO_ARRAY = 'APPEND_TO_ARRAY',\n REMOVE_FROM_ARRAY = 'REMOVE_FROM_ARRAY',\n}\n\nexport interface SetFieldOptions {\n /**\n * Value to set for the specified field. This replaces the existing value.\n */\n value?: any\n}\n\nexport interface IncrementFieldOptions {\n /**\n * Numerical value by which to increment or decrement the current field value.\n */\n value?: number\n}\n\nexport interface AppendToArrayOptions {\n /**\n * Value to append to the specified array.\n */\n value?: any\n}\n\nexport interface RemoveFromArrayOptions {\n /**\n * Value to remove from the specified array.\n */\n value?: any\n}\n\nexport interface DataPublishPluginOptions {\n /**\n * Whether to include draft items.\n *\n * When `true`, the task deletes both published and draft items. Default: `false`.\n */\n includeDraftItems?: boolean\n}\n\nexport interface PatchDataItemResponse {\n /** Patched data item. */\n dataItem?: DataItem\n}\n\nexport interface BulkPatchDataItemsRequest {\n /**\n * [Collection environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing) from which to delete item.\n *\n * Default: `LIVE`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection that contains the items to patch. */\n dataCollectionId: string\n /** Patches to apply to the items. */\n patches: Patch[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Whether to return the updated data items.\n * When `true`, the `results` objects contain a `dataItem` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /**\n * Prevents hooks from running for the operation. Can only be used in the backend code of a Wix site.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface BulkPatchDataItemsResponse {\n /** Information about the updated items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkDataItemResult {\n /** The action attempted for the data item. */\n action?: BulkActionType\n /** Metadata related to the data item for which the action was attempted. */\n itemMetadata?: ItemMetadata\n /** The data item for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */\n dataItem?: DataItem\n}\n\nexport enum BulkActionType {\n UNKNOWN_ACTION_TYPE = 'UNKNOWN_ACTION_TYPE',\n INSERT = 'INSERT',\n UPDATE = 'UPDATE',\n DELETE = 'DELETE',\n PATCH = 'PATCH',\n}\n\nexport interface ItemMetadata {\n /** Item ID. This field doesn't appear if there is no item ID, for example, when item creation fails. */\n id?: string | null\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean\n /** Details about the error in case of failure. */\n error?: ApplicationError\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string\n /** Description of the error. */\n description?: string\n /** Data related to the error. */\n data?: Record<string, any> | null\n}\n\nexport interface BulkActionMetadata {\n /** Number of items successfully processed. */\n totalSuccesses?: number\n /** Number of items that couldn't be processed. */\n totalFailures?: number\n}\n\nexport interface UpdateDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the existing item. */\n dataCollectionId: string\n /** Updated data item content. The existing data item's content is replaced entirely. */\n dataItem: DataItem\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * If true, referenced items will be included.\n * @internal\n */\n includeReferencedItems?: boolean\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface UpdateDataItemResponse {\n /** Updated data item. */\n dataItem?: DataItem\n}\n\nexport interface SaveDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert or update the item. */\n dataCollectionId: string\n /** Data item to insert or update. */\n dataItem: DataItem\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * If true, referenced items will be included.\n * @internal\n */\n includeReferencedItems?: boolean\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface SaveDataItemResponse {\n /**\n * Action carried out for the item.\n *\n * + `INSERTED`: A new item was added to the collection.\n * + `UPDATED`: An existing item in the collection was updated.\n */\n action?: Action\n /** Inserted or updated data item. */\n dataItem?: DataItem\n}\n\nexport enum Action {\n UNKNOWN_ACTION = 'UNKNOWN_ACTION',\n INSERTED = 'INSERTED',\n UPDATED = 'UPDATED',\n}\n\nexport interface GetDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection from which to retrieve the data item. */\n dataCollectionId: string\n /** ID of the data item to retrieve. */\n dataItemId: string\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /**\n * Fields to return for the item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.\n *\n * **Note:** The `_id` system field is always returned.\n */\n fields?: string[]\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface GetDataItemResponse {\n /** Retrieved item. */\n dataItem?: DataItem\n}\n\nexport interface RemoveDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`\n * @internal\n */\n environment?: Environment\n /** ID of the collection from which to remove the item. */\n dataCollectionId: string\n /** ID of the item to remove. */\n dataItemId: string\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface RemoveDataItemResponse {\n /** Removed item. */\n dataItem?: DataItem\n}\n\nexport interface TruncateDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection to truncate. */\n dataCollectionId: string\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n}\n\nexport interface TruncateDataItemsResponse {}\n\nexport interface QueryDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection to query. */\n dataCollectionId: string\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 query?: QueryV2\n /**\n * Whether to return the total count in the response for a query with offset paging.\n * When `true`, the `pagingMetadata` object in the response contains a `total` field.\n *\n * Default: `false`\n */\n returnTotalCount?: 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 * @deprecated\n * @replacedBy referenced_item_options\n * @removalDate 2025-08-01\n */\n includeReferencedItems?: string[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /**\n * Request information about this collection caching\n * @internal\n */\n requestCachingInfo?: boolean\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n /** Options for retrieving referenced items. */\n referencedItemOptions?: ReferencedItemOptions[]\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 *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n *\n * **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\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 /**\n * Fields to return for each item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.\n * **Note:** The `_id` system field is always returned.\n */\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 Sorting {\n /** Name of the field to sort by. */\n fieldName?: string\n /** Sort order. */\n order?: SortOrder\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null\n /** Number of items to skip in the current sort order. */\n offset?: number | null\n}\n\nexport interface CursorPaging {\n /** Number of items to load. */\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 ReferencedItemOptions {\n /** Field containing references in the queried item. */\n fieldName?: string\n /** Maximum number of referenced items to include for each queried item. */\n limit?: number | null\n}\n\nexport interface QueryDataItemsResponse {\n /** Retrieved items. */\n dataItems?: DataItem[]\n /**\n * Caching info. Returned if `request_caching_info` is true in the request and caching is allowed.\n * @internal\n */\n cachingInfo?: CachingInfo\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface CachingInfo {\n /** Caching tags for this collection */\n tags?: string[]\n /** max caching time if set */\n maxAge?: number | null\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, `returnTotalCount` is `true` in the request, and `tooManyToCount` is false. */\n total?: number | null\n /** Whether 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 * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null\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 AggregateDataItemsRequest\n extends AggregateDataItemsRequestPagingMethodOneOf {\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 * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection on which to run the aggregation. */\n dataCollectionId: string\n /**\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 *\n * **Note:** The values you provide for each filter field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n initialFilter?: Record<string, any> | null\n /** Aggregation applied to the data. */\n aggregation?: Aggregation\n /**\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 * **Note:** The values you provide for each filter field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n finalFilter?: 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 /**\n * Whether to return the total count in the response for a query with offset paging.\n * When `true`, the `pagingMetadata` object in the response contains a `total` field.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\n/** @oneof */\nexport interface AggregateDataItemsRequestPagingMethodOneOf {\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 Average {\n /** Name of the field for which to calculate the average value. */\n itemFieldName?: string\n}\n\nexport interface Min {\n /** Name of the field for which to calculate the minimum value. */\n itemFieldName?: string\n}\n\nexport interface Max {\n /** Name of the field for which to calculate the maximum value. */\n itemFieldName?: string\n}\n\nexport interface Sum {\n /** Name of the field for which to calculate the sum. */\n itemFieldName?: string\n}\n\nexport interface Count {}\n\nexport interface Operation extends OperationCalculateOneOf {\n /** Calculate the average value of a specified field for all items in the grouping. */\n average?: Average\n /** Calculate the minimum value of a specified field for all items in the grouping. */\n min?: Min\n /** Calculate the maximum value of a specified field for all items in the grouping. */\n max?: Max\n /** Calculate the sum of values of a specified field for all items in the grouping. */\n sum?: Sum\n /** Calculate the number of items in the grouping. */\n itemCount?: Count\n /** Name of the field containing results of the operation. */\n resultFieldName?: string\n}\n\n/** @oneof */\nexport interface OperationCalculateOneOf {\n /** Calculate the average value of a specified field for all items in the grouping. */\n average?: Average\n /** Calculate the minimum value of a specified field for all items in the grouping. */\n min?: Min\n /** Calculate the maximum value of a specified field for all items in the grouping. */\n max?: Max\n /** Calculate the sum of values of a specified field for all items in the grouping. */\n sum?: Sum\n /** Calculate the number of items in the grouping. */\n itemCount?: Count\n}\n\nexport interface Aggregation {\n /** Fields by which to group items for the aggregation. If empty, the aggregation is carried out on all items in the collection. */\n groupingFields?: string[]\n /** Operations to carry out on the data in each grouping. */\n operations?: Operation[]\n}\n\nexport interface AggregateDataItemsResponse {\n /** Aggregation results. */\n results?: Record<string, any>[] | null\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface CountDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection for which to count query results. */\n dataCollectionId: string\n /**\n * Filter object in the following format:\n *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`.\n *\n * Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n *\n * **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n filter?: Record<string, any> | null\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n */\n language?: string | null\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface CountDataItemsResponse {\n /** Number of items matching the query. */\n totalCount?: number\n}\n\nexport interface QueryDistinctValuesRequest\n extends QueryDistinctValuesRequestPagingMethodOneOf {\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 * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection to query. */\n dataCollectionId: string\n /** Item field name for which to return all distinct values. */\n fieldName?: string\n /**\n * Filter object in the following format:\n *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`.\n *\n * Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n *\n * **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n filter?: Record<string, any> | null\n /** Sort order. */\n order?: SortOrder\n /**\n * Whether to return the total count in the response for a query with offset paging.\n * When `true`, the `pagingMetadata` object in the response contains a `total` field.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * > **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\n/** @oneof */\nexport interface QueryDistinctValuesRequestPagingMethodOneOf {\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 QueryDistinctValuesResponse {\n /** List of distinct values contained in the field specified in `fieldName`. */\n distinctValues?: any[]\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface BulkInsertDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert the items. */\n dataCollectionId: string\n /** Data items to insert. */\n dataItems: DataItem[]\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options.\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to return the inserted data items.\n * When `true`, the `results` objects contain a `dataItem` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface BulkInsertDataItemsResponse {\n /** Information about the inserted items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkUpdateDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to update items. */\n dataCollectionId: string\n /** Data items to update. */\n dataItems: DataItem[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to return the updated data items.\n * When `true`, the `results` objects contain a `dataItem` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface BulkUpdateDataItemsResponse {\n /** Information about the updated items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkSaveDataItemsRequest {\n /**\n * Environment: LIVE or SANDBOX\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert or update the items. */\n dataCollectionId: string\n /** Data items to insert or update. */\n dataItems: DataItem[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to return the saved data item.\n * When `true`, the `results` objects contain a `dataItem` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface BulkSaveDataItemsResponse {\n /** Information about the saved items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkRemoveDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection from which to remove the item. */\n dataCollectionId: string\n /** IDs of data items to remove. */\n dataItemIds: string[]\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Should hooks execution be suppressed.\n * This option can only be used with Corvid backend\n * code identity.\n * @internal\n */\n suppressHooks?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface BulkRemoveDataItemsResponse {\n /** Information about the removed data items. */\n results?: BulkDataItemResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface QueryReferencedDataItemsRequest\n extends QueryReferencedDataItemsRequestPagingMethodOneOf {\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 * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring item. */\n dataCollectionId: string\n /** ID of the referring item. */\n referringItemId?: string\n /** Field containing references in the referring item. */\n referringItemFieldName?: string\n /** Order of the returned referenced items. Sorted by the date each item was referenced. */\n order?: SortOrder\n /**\n * Whether to return the total count in the response.\n * When `true`, the `pagingMetadata` object in the response contains a `total` field.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string | null\n /**\n * Fields to return for each referenced item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.\n * **Note:** The `_id` system field is always returned.\n */\n fields?: string[]\n /** @internal */\n appOptions?: Record<string, any> | null\n /** @internal */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\n/** @oneof */\nexport interface QueryReferencedDataItemsRequestPagingMethodOneOf {\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 QueryReferencedDataItemsResponse {\n /** Referenced items and/or IDs. For successfully resolved references, the referenced data item is returned. For references that can't be resolved, the ID is returned. */\n results?: ReferencedResult[]\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface UnresolvedReference {\n /** ID of the referring item. */\n referringItemId?: string\n /** Field specified to query for references. */\n referringItemFieldName?: string\n}\n\nexport interface ReferencedResult extends ReferencedResultEntityOneOf {\n /** Data item referenced. */\n dataItem?: DataItem\n /** Unresolved reference. 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 unresolvedReference?: UnresolvedReference\n}\n\n/** @oneof */\nexport interface ReferencedResultEntityOneOf {\n /** Data item referenced. */\n dataItem?: DataItem\n /** Unresolved reference. 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 unresolvedReference?: UnresolvedReference\n}\n\nexport interface IsReferencedDataItemRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring data item. */\n dataCollectionId: string\n /** Field to check for a reference to the item that may be referenced. */\n referringItemFieldName: string\n /** ID of the referring item. */\n referringItemId: string\n /** ID of the item that may be referenced. */\n referencedItemId: string\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to retrieve data from the primary database instance.\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`\n */\n consistentRead?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface IsReferencedDataItemResponse {\n /** Whether the specified reference exists. */\n isReferenced?: boolean\n}\n\nexport interface InsertDataItemReferenceRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection in which to insert the reference. */\n dataCollectionId: string\n /** Reference to insert */\n dataItemReference?: DataItemReference\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface DataItemReference {\n /** Referring item field containing the references to the referenced items. */\n referringItemFieldName?: string\n /** ID of the referring item. */\n referringItemId?: string\n /** ID of the referenced item. */\n referencedItemId?: string\n}\n\nexport interface InsertDataItemReferenceResponse {\n /** Inserted reference. */\n dataItemReference?: DataItemReference\n}\n\nexport interface RemoveDataItemReferenceRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring item. */\n dataCollectionId: string\n /** Reference to remove. */\n dataItemReference: DataItemReference\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface RemoveDataItemReferenceResponse {\n /** Removed reference. */\n dataItemReference?: DataItemReference\n}\n\nexport interface BulkInsertDataItemReferencesRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring items. */\n dataCollectionId: string\n /** References to insert. */\n dataItemReferences: DataItemReference[]\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /**\n * Whether to return the inserted data item references.\n * When `true`, the `results` objects contain a `dataItemReference` field.\n *\n * Default: `false`\n */\n returnEntity?: boolean\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface BulkInsertDataItemReferencesResponse {\n /** Information about the inserted references. */\n results?: BulkDataItemReferenceResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface BulkDataItemReferenceResult {\n /** Action attempted for the reference. */\n action?: BulkActionType\n /** Metadata related to the reference for which the action was attempted. */\n referenceMetadata?: ItemMetadata\n /** Reference for which the action was attempted. Only returned if `returnEntity` is `true` in the request and the action is successful. */\n dataItemReference?: DataItemReference\n}\n\nexport interface BulkRemoveDataItemReferencesRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring items. */\n dataCollectionId: string\n /** References to remove. */\n dataItemReferences: DataItemReference[]\n /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface BulkRemoveDataItemReferencesResponse {\n /** Information about the removed references. */\n results?: BulkDataItemReferenceResult[]\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata\n}\n\nexport interface ReplaceDataItemReferencesRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /** ID of the collection containing the referring item. */\n dataCollectionId: string\n /** Field containing references in the referring item. */\n referringItemFieldName: 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 /**\n * Grid app ID. Optional in `LIVE` segment.\n * @internal\n */\n appId?: string | null\n /**\n * Data access options\n * @internal\n * @deprecated\n * @replacedBy inlined\n * @removalDate 2024-07-12\n */\n options?: Options\n /** @internal */\n appOptions?: Record<string, any> | null\n}\n\nexport interface ReplaceDataItemReferencesResponse {\n /** Updated references. */\n dataItemReferences?: DataItemReference[]\n}\n\nexport interface SearchDataItemsRequest {\n /**\n * Environment: LIVE or SANDBOX\n * @internal\n */\n environment?: Environment\n /**\n * ID of the collection to query.\n * @maxLength 255\n */\n dataCollectionId: string\n /** Search. */\n search?: Search\n /**\n * Grid app id. Optional in Live segment.\n * @internal\n * @format GUID\n */\n appId?: string | null\n /**\n * NOT IMPLEMENTED!\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language.\n * **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n * If not provided, result text is not translated.\n * @internal\n * @format LANGUAGE_TAG\n */\n language?: string | null\n /**\n * Whether to suppress data hooks.\n * When `true`, data hooks typically triggered by this endpoint don't run.\n *\n * **Note:** This option can only be used in code that runs in [the Wix site backend](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend).\n *\n * Default: `false`\n * @internal\n */\n suppressHooks?: boolean\n /**\n * Options for the Publish plugin.\n * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.\n */\n publishPluginOptions?: DataPublishPluginOptions\n /**\n * Options for retrieving referenced items.\n * @maxSize 100\n */\n referencedItemOptions?: SearchDataItemsRequestReferencedItemOptions[]\n}\n\nexport interface Search extends SearchPagingMethodOneOf {\n /** Pointer to page of results using offset. Can't be used together with 'cursor_paging'. */\n paging?: Paging\n /** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can't be used together with 'filter' or 'sort'. */\n cursorPaging?: CursorPaging\n /**\n * Filter object in the following format:\n *\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * Examples of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n *\n * **Note:** The values you provide for each field must adhere to that field's type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\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 * @maxSize 10\n */\n sort?: Sorting[]\n /**\n * Fields to return for each item. Only fields specified in the array are included in the response. If the array is empty, all fields are returned.\n * **Note:** The `_id` system field is always returned.\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[]\n /** Free text to match in searchable fields. */\n search?: SearchDetails\n}\n\n/** @oneof */\nexport interface SearchPagingMethodOneOf {\n /** Pointer to page of results using offset. Can't be used together with 'cursor_paging'. */\n paging?: Paging\n /** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can't be used together with 'filter' or 'sort'. */\n cursorPaging?: CursorPaging\n}\n\nexport interface SearchDetails {\n /** Defines how separate search terms in `expression` are combined. */\n mode?: Mode\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null\n /** Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). */\n fuzzy?: boolean\n}\n\nexport enum Mode {\n /** Any of the search terms must be present. */\n OR = 'OR',\n /** All search terms must be present. */\n AND = 'AND',\n}\n\nexport interface SearchDataItemsRequestReferencedItemOptions {\n /**\n * Field containing references in the queried item.\n * @maxLength 1000\n */\n fieldName?: string\n /**\n * Maximum number of referenced items to include for each queried item.\n * @max 1000\n */\n limit?: number | null\n}\n\nexport interface SearchDataItemsResponse {\n /**\n * Retrieved items.\n * @maxSize 1000\n */\n dataItems?: DataItem[]\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface AggregateDataItemsResponse {\n /** Aggregation results. */\n results?: Record<string, any>[] | null\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n\nexport interface AggregatePipelineDataItemsRequest {\n /**\n * Environment: `LIVE` or `SANDBOX`.\n * @internal\n */\n environment?: Environment\n /**\n * ID of the collection to run the aggregation pipeline on.\n * @maxLength 256\n */\n dataCollectionId: string\n /** Aggregation pipeline configuration containing stages and paging options. */\n pipeline?: AggregationPipeline\n /**\n * Whether to return the total result count when running a query with offset paging. When `true`, the `pagingMetadata` property in the response contains a `total` field.\n *\n * Learn more about [offset paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging#paging).\n *\n * Default: `false`.\n */\n returnTotalCount?: boolean\n /**\n * Grid app ID. Optional in Live segment.\n * @internal\n * @format GUID\n */\n appId?: string | null\n /**\n * Whether to read from the primary database for the most current data.\n *\n * This decreases performance but ensures data retrieved is up to date even immediately after an update.\n *\n * Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).\n *\n * Default: `false`.\n */\n consistentRead?: boolean\n /**\n * Language to run the aggregation on, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n *\n * When provided, the aggregation runs on items in the specified language. When not provided, the aggregation runs on items in the default language.\n *\n * > **Note:** The Wix user must enable translation for the specified language in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n * Learn more about [using Wix Multilingual to translate CMS content](https://support.wix.com/en/article/wix-multilingual-translating-cms-collection-content).\n * @format LANGUAGE_TAG\n */\n language?: string | null\n /**\n * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.\n *\n * Learn more about [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).\n */\n appOptions?: Record<string, any> | null\n /**\n * Options for the Publish plugin.\n *\n * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items aren't.\n */\n publishPluginOptions?: DataPublishPluginOptions\n}\n\nexport interface Expression extends ExpressionValueOneOf {\n /**\n * Path to the field containing the value to resolve.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`.\n * @maxLength 1000\n */\n fieldPath?: string\n /**\n * Text value.\n * @maxLength 1000\n */\n text?: string\n /** Number value. */\n numeric?: number\n /** Adds the specified expressions together. */\n add?: AddOperation\n /** Calculates the total sum of multiple expressions. */\n sum?: SumOperation\n /** Subtracts 1 expression from another. */\n subtract?: SubtractOperation\n /** Multiplies multiple expressions together. */\n multiply?: MultiplyOperation\n /** Divides 1 expression by another. */\n divide?: DivideOperation\n /** Finds the absolute value of an expression. */\n abs?: AbsOperation\n /** Finds the remainder when dividing 1 expression by another. */\n mod?: ModOperation\n /** Rounds an expression down to the nearest whole number. */\n floor?: FloorOperation\n /** Rounds an expression up to the nearest whole number. */\n ceil?: CeilOperation\n /** Joins multiple expressions together to create a string. */\n concat?: ConcatOperation\n /** Converts an expression to a string. */\n stringify?: StringifyOperation\n /** Converts an expression to lowercase. */\n toLower?: ToLowerOperation\n /** Converts an expression to uppercase. */\n toUpper?: ToUpperOperation\n /** Extracts a portion of a string expression. */\n substring?: SubstringOperation\n /** Finds the length of a string expression. */\n length?: LengthOperation\n}\n\n/** @oneof */\nexport interface ExpressionValueOneOf {\n /**\n * Path to the field containing the value to resolve.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`.\n * @maxLength 1000\n */\n fieldPath?: string\n /**\n * Text value.\n * @maxLength 1000\n */\n text?: string\n /** Number value. */\n numeric?: number\n /** Adds the specified expressions together. */\n add?: AddOperation\n /** Calculates the total sum of multiple expressions. */\n sum?: SumOperation\n /** Subtracts 1 expression from another. */\n subtract?: SubtractOperation\n /** Multiplies multiple expressions together. */\n multiply?: MultiplyOperation\n /** Divides 1 expression by another. */\n divide?: DivideOperation\n /** Finds the absolute value of an expression. */\n abs?: AbsOperation\n /** Finds the remainder when dividing 1 expression by another. */\n mod?: ModOperation\n /** Rounds an expression down to the nearest whole number. */\n floor?: FloorOperation\n /** Rounds an expression up to the nearest whole number. */\n ceil?: CeilOperation\n /** Joins multiple expressions together to create a string. */\n concat?: ConcatOperation\n /** Converts an expression to a string. */\n stringify?: StringifyOperation\n /** Converts an expression to lowercase. */\n toLower?: ToLowerOperation\n /** Converts an expression to uppercase. */\n toUpper?: ToUpperOperation\n /** Extracts a portion of a string expression. */\n substring?: SubstringOperation\n /** Finds the length of a string expression. */\n length?: LengthOperation\n}\n\nexport interface AddOperation {\n /**\n * Expressions to add together.\n *\n * All expressions must resolve to numbers.\n * @maxSize 1000\n */\n expressions?: Expression[]\n}\n\nexport interface SumOperation {\n /**\n * Expressions to calculate the total sum of.\n *\n * All expressions must resolve to numbers.\n * @maxSize 1000\n */\n expressions?: Expression[]\n}\n\nexport interface SubtractOperation {\n /**\n * Expression to subtract `secondExpression` from.\n *\n * Expression must resolve to a number.\n */\n firstExpression?: Expression\n /**\n * Expression to subtract from `firstExpression`.\n *\n * Expression must resolve to a number.\n */\n secondExpression?: Expression\n}\n\nexport interface MultiplyOperation {\n /**\n * Expressions to multiply.\n *\n * All expressions must resolve to numbers.\n * @maxSize 1000\n */\n expressions?: Expression[]\n}\n\nexport interface DivideOperation {\n /**\n * Expression to divide by `secondExpression`.\n *\n * Expression must resolve to a number.\n */\n firstExpression?: Expression\n /**\n * Expression to divide `firstExpression` by.\n *\n * Expression must resolve to a non-zero number.\n */\n secondExpression?: Expression\n}\n\nexport interface AbsOperation {\n /**\n * Expression to find the absolute value of.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface ModOperation {\n /**\n * Expression to divide by `secondExpression` to find the remainder.\n *\n * Expression must resolve to a number.\n */\n firstExpression?: Expression\n /**\n * Expression to divide `firstExpression` by.\n *\n * Expression must resolve to a non-zero number.\n */\n secondExpression?: Expression\n}\n\nexport interface FloorOperation {\n /**\n * Expression to round down to the nearest whole number.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface CeilOperation {\n /**\n * Expression to round up to the nearest whole number.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface ConcatOperation {\n /**\n * Expressions to join together.\n *\n * All expressions must resolve to strings.\n * @maxSize 1000\n */\n expressions?: Expression[]\n}\n\nexport interface StringifyOperation {\n /** Expression to convert to a string. */\n expression?: Expression\n}\n\nexport interface ToLowerOperation {\n /**\n * Expression to convert to lowercase.\n *\n * Expression must resolve to a string.\n */\n expression?: Expression\n}\n\nexport interface ToUpperOperation {\n /**\n * Expression to convert to uppercase.\n *\n * Expression must resolve to a string.\n */\n expression?: Expression\n}\n\nexport interface SubstringOperation {\n /**\n * Expression to extract a substring from.\n *\n * Expression must resolve to a string.\n */\n expression?: Expression\n /**\n * Starting position of the substring to extract, specified in zero-based indexing.\n *\n * Expression must resolve to a number.\n */\n startExpression?: Expression\n /**\n * Number of characters to extract from the starting position.\n *\n * Expression must resolve to a number.\n */\n lengthExpression?: Expression\n}\n\nexport interface LengthOperation {\n /**\n * Expression to count the total number of characters of.\n *\n * Expression must resolve to a string.\n */\n expression?: Expression\n}\n\nexport interface Avg {\n /**\n * Expression to calculate the group's average value.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface AccumulatorMin {\n /**\n * Expression to find the group's minimum value.\n *\n * Expression must resolve to a comparable value, such as a number or string.\n */\n expression?: Expression\n}\n\nexport interface AccumulatorMax {\n /**\n * Expression to find the group's maximum value.\n *\n * Expression must resolve to a comparable value, such as a number or string.\n */\n expression?: Expression\n}\n\nexport interface AccumulatorSum {\n /**\n * Expression to calculate the group's total sum.\n *\n * Expression must resolve to a number.\n */\n expression?: Expression\n}\n\nexport interface First {\n /** Expression to find the first item in the group. */\n expression?: Expression\n}\n\nexport interface Last {\n /** Expression to find the last item in the group. */\n expression?: Expression\n}\n\nexport interface Push {\n /** Expression to collect items into an array. */\n expression?: Expression\n}\n\nexport interface Include {\n /**\n * Field to include in the result.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`. Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n fieldName?: string\n}\n\nexport interface Exclude {\n /**\n * Field to exclude from the result.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`. Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n fieldName?: string\n}\n\nexport interface Reshape {\n /**\n * Field to create in the result item.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n resultFieldName?: string\n /** Expression to resolve. The result of the expression becomes the value of the new field. */\n expression?: Expression\n}\n\nexport interface ProjectNested {\n /**\n * Key of the parent field for the nested fields.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n resultFieldName?: string\n /**\n * Nested fields to include, exclude, or reshape.\n * @maxSize 1000\n */\n fields?: Field[]\n}\n\nexport interface Field extends FieldProjectionOneOf {\n /** When specified, includes only the specified field in the result. All other fields are excluded. */\n include?: Include\n /** When specified, excludes the specified field from the result. All other fields are included. */\n exclude?: Exclude\n /** Reshapes a new field based on the specified expression. */\n reshape?: Reshape\n /** Creates nested fields by including, excluding, or reshaping fields. */\n projectNested?: ProjectNested\n}\n\n/** @oneof */\nexport interface FieldProjectionOneOf {\n /** When specified, includes only the specified field in the result. All other fields are excluded. */\n include?: Include\n /** When specified, excludes the specified field from the result. All other fields are included. */\n exclude?: Exclude\n /** Reshapes a new field based on the specified expression. */\n reshape?: Reshape\n /** Creates nested fields by including, excluding, or reshaping fields. */\n projectNested?: ProjectNested\n}\n\nexport interface GroupId {\n /**\n * Name of the field to group items by.\n *\n * This becomes the field name in the result's `_id` property.\n * @maxLength 1000\n */\n key?: string\n /** Expression to determine the grouping value. Items whose expression resolves to the same value are grouped together in the result item's `_id` property. */\n expression?: Expression\n}\n\nexport interface Accumulator extends AccumulatorExpressionOneOf {\n /** Calculates the average value across all items in the group based on the specified expression. */\n avg?: Avg\n /** Finds the minimum value across all items in the group. */\n min?: AccumulatorMin\n /** Finds the maximum value across all items in the group. */\n max?: AccumulatorMax\n /** Calculates the sum of the specified expression across all items in the group. */\n sum?: AccumulatorSum\n /** Finds the first item in the group. */\n first?: First\n /** Finds the last item in the group. */\n last?: Last\n /** Collects values from all items in the group into an array. */\n push?: Push\n /**\n * Field to create in the output item to contain the aggregation result.\n * @maxLength 1000\n */\n resultFieldName?: string\n}\n\n/** @oneof */\nexport interface AccumulatorExpressionOneOf {\n /** Calculates the average value across all items in the group based on the specified expression. */\n avg?: Avg\n /** Finds the minimum value across all items in the group. */\n min?: AccumulatorMin\n /** Finds the maximum value across all items in the group. */\n max?: AccumulatorMax\n /** Calculates the sum of the specified expression across all items in the group. */\n sum?: AccumulatorSum\n /** Finds the first item in the group. */\n first?: First\n /** Finds the last item in the group. */\n last?: Last\n /** Collects values from all items in the group into an array. */\n push?: Push\n}\n\nexport interface Stage extends StageStageOneOf {\n /** Groups aggregated items to new result items. */\n group?: Group\n /**\n * Aggregation filter. Only collection items that match the filter are processed.\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters).\n *\n * > **Note:** The values you provide for each filter field must adhere to that field's data type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n filter?: Record<string, any> | null\n /**\n * Sorting preferences.\n *\n * Learn more about [sorting and paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\n sort?: AggregatePipelineDataItemsRequestSorting\n /** Transforms collection items by including, excluding, or reshaping fields. */\n projection?: Projection\n /**\n * Converts an object to an array.\n *\n * Each property becomes an element in the new array that includes all other fields from the original object.\n */\n objectToArray?: ObjectToArray\n /**\n * Unwinds an array into separate result items.\n *\n * Creates a new result object for each array element. Each new object contains the array element's value and all other fields from the original object.\n */\n unwindArray?: UnwindArray\n /** Number of results to skip from the beginning of the result set. */\n skip?: number\n /** Maximum number of results to return. */\n limit?: number\n}\n\n/** @oneof */\nexport interface StageStageOneOf {\n /** Groups aggregated items to new result items. */\n group?: Group\n /**\n * Aggregation filter. Only collection items that match the filter are processed.\n *\n * Learn more about [filters in API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters).\n *\n * > **Note:** The values you provide for each filter field must adhere to that field's data type. For example, when filtering by a field whose type is Date and Time, use an object in the following format: `\"someDateAndTimeFieldKey\": { \"$date\": \"YYYY-MM-DDTHH:mm:ss.sssZ\"}`. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/data-types-in-wix-data).\n */\n filter?: Record<string, any> | null\n /**\n * Sorting preferences.\n *\n * Learn more about [sorting and paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\n sort?: AggregatePipelineDataItemsRequestSorting\n /** Transforms collection items by including, excluding, or reshaping fields. */\n projection?: Projection\n /**\n * Converts an object to an array.\n *\n * Each property becomes an element in the new array that includes all other fields from the original object.\n */\n objectToArray?: ObjectToArray\n /**\n * Unwinds an array into separate result items.\n *\n * Creates a new result object for each array element. Each new object contains the array element's value and all other fields from the original object.\n */\n unwindArray?: UnwindArray\n /** Number of results to skip from the beginning of the result set. */\n skip?: number\n /** Maximum number of results to return. */\n limit?: number\n}\n\nexport interface Group {\n /**\n * Grouping criteria by which to organize items.\n *\n * Each `groupId` specifies a field by which to group items, and serves as the result item's unique `_id` property.\n *\n * Collection items with identical values for the specified `expression` are placed in the same group based on the specified `key`. If empty, all items are treated as a single group.\n * @maxSize 1000\n */\n groupIds?: GroupId[]\n /**\n * Accumulation operations to run on each group.\n *\n * Accumulators aggregate data across all items in the group and return the result in a new field.\n *\n * > **Note:** When using accumulators, the type of expression must match the operation type. For example, when using the `sum` accumulator, the specified expression must resolve to a number.\n * @maxSize 1000\n */\n accumulators?: Accumulator[]\n}\n\nexport interface AggregatePipelineDataItemsRequestSorting {\n /**\n * Fields to sort the results by.\n * @maxSize 1000\n */\n values?: Sorting[]\n}\n\n/** Transforms collection items by including, excluding, or reshaping fields. */\nexport interface Projection {\n /**\n * Fields to include, exclude, or reshape.\n * @maxSize 1000\n */\n fields?: Field[]\n}\n\n/** Converts an object to an array. */\nexport interface ObjectToArray {\n /**\n * Key of the object field to convert to an array.\n *\n * Use dot notation to specify nested fields. For example, `user.name` or `product.price`. Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n objectFieldName?: string\n /**\n * Key of the new array to create in the result item.\n *\n * Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n destinationFieldName?: string\n}\n\n/** Unwinds an array. */\nexport interface UnwindArray {\n /**\n * Key of the array field to unwind.\n *\n * Use dot notation to specify a nested array. For example, `user.products` or `product.colors`. Learn more about [field keys](https://support.wix.com/en/article/cms-formerly-content-manager-about-your-collection-fields#field-id-velo-by-wix-only).\n * @maxLength 1000\n */\n arrayFieldName?: string\n}\n\nexport interface AggregationPipeline\n extends AggregationPipelinePagingMethodOneOf {\n /**\n * Paging options to limit and skip the number of results. Call [`withPaging()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/with-stages) to configure paging.\n *\n * Learn more about [sorting and paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\n paging?: Paging\n /**\n * Cursor token referring to a page of results.\n *\n * Not used in the first request. Subsequent requests use the cursor token and not `filter` or `sort`.\n */\n cursorPaging?: CursorPaging\n /**\n * Sequence of aggregation operations to apply to the data. Stages are processed in order, with each stage operating on the output of the previous stage.\n *\n * Call [`withStages()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/with-stages) to add and configure aggregation stages.\n * @maxSize 100\n */\n stages?: Stage[]\n}\n\n/** @oneof */\nexport interface AggregationPipelinePagingMethodOneOf {\n /**\n * Paging options to limit and skip the number of results.\n *\n * Learn more about [sorting and paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging).\n */\n paging?: Paging\n /**\n * Cursor token referring to a page of results.\n *\n * Not used in the first request. Subsequent requests use the cursor token and not `filter` or `sort`.\n */\n cursorPaging?: CursorPaging\n}\n\nexport interface AggregatePipelineDataItemsResponse {\n /**\n * Aggregation results.\n * @maxSize 10000\n */\n results?: Record<string, any>[] | null\n /** Paging information. */\n pagingMetadata?: PagingMetadataV2\n}\n"],"mappings":";;;;IA4DYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAyFvB;AAAA,IAQYE,MAAM,GAAAD,OAAA,CAAAC,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAAA,IAsGNC,cAAc,GAAAF,OAAA,CAAAE,cAAA,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IAsIdC,MAAM,GAAAH,OAAA,CAAAG,MAAA,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AA+OlB;AAAA,IAeYC,SAAS,GAAAJ,OAAA,CAAAI,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAuJrB;AA6CA;AAoKA;AAgRA;AA6BA;AA4UA;AAAA,IAoBYC,IAAI,GAAAL,OAAA,CAAAK,IAAA,0BAAJA,IAAI;EACd;EADUA,IAAI;EAGd;EAHUA,IAAI;EAAA,OAAJA,IAAI;AAAA;AAkJhB;AAkUA;AA8CA;AAuDA;AAmEA;AASA;AAkBA;AAkCA","ignoreList":[]}
@@ -21,9 +21,9 @@ class PipelineBuilderImpl {
21
21
  }
22
22
  }
23
23
  /**
24
- * Builds an aggregation pipeline.
24
+ * Builds an aggregation pipeline for use with [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline).
25
25
  *
26
- * Configure the pipeline by calling `pipelineBuilder()` and chaining [`PipelineBuilder`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/introduction) methods. Then, specify the pipeline as the `pipeline` parameter to the [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline) method.
26
+ * Configure the pipeline by calling `pipelineBuilder()` and chaining [`PipelineBuilder`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/introduction) methods. Then, specify the pipeline as the `pipeline` parameter when calling the [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline) method.
27
27
  *
28
28
  * > **Note**: You can only build an aggregation pipeline for collections [created in the CMS](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection) or with the [Data Collections API](https://dev.wix.com/docs/sdk/backend-modules/data/collections/introduction). They cannot be used on [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) or [external collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site).
29
29
  *
@@ -1 +1 @@
1
- {"version":3,"file":"FilterStage.js","sourceRoot":"","sources":["../../../../src/api/stages/FilterStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAmcxC,MAAM,OAAO,eACX,SAAQ,SAA0B;IAGlC,YAAY,MAGX;QACC,KAAK,CAAC;YACJ,cAAc,EAAE,MAAM,EAAE,cAAc,IAAI,EAAE;YAC5C,aAAa,EAAE,MAAM,EAAE,aAAa;SACrC,CAAC,CAAA;IACJ,CAAC;IAES,IAAI,CAAC,MAAW;QACxB,OAAO,IAAI,eAAe,CAAC;YACzB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;SAC1D,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,gBAAgB;QAClB,OAAO,EAAE,CAAA;IACX,CAAC;IAED,eAAe;IACf,KAAK;QACH,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,CAAA;IAC/C,CAAC;CACF"}
1
+ {"version":3,"file":"FilterStage.js","sourceRoot":"","sources":["../../../../src/api/stages/FilterStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AA8YxC,MAAM,OAAO,eACX,SAAQ,SAA0B;IAGlC,YAAY,MAGX;QACC,KAAK,CAAC;YACJ,cAAc,EAAE,MAAM,EAAE,cAAc,IAAI,EAAE;YAC5C,aAAa,EAAE,MAAM,EAAE,aAAa;SACrC,CAAC,CAAA;IACJ,CAAC;IAES,IAAI,CAAC,MAAW;QACxB,OAAO,IAAI,eAAe,CAAC;YACzB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;SAC1D,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,gBAAgB;QAClB,OAAO,EAAE,CAAA;IACX,CAAC;IAED,eAAe;IACf,KAAK;QACH,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,CAAA;IAC/C,CAAC;CACF"}
@@ -36,7 +36,9 @@ export class GroupStageImpl {
36
36
  this.accumulators.push({ type, expression, resultFieldName });
37
37
  return this;
38
38
  }
39
- /** @private */
39
+ /**
40
+ * @internal
41
+ */
40
42
  build() {
41
43
  return {
42
44
  group: {
@@ -1 +1 @@
1
- {"version":3,"file":"GroupStage.js","sourceRoot":"","sources":["../../../../src/api/stages/GroupStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAsI7E,MAAM,OAAO,cAAc;IAA3B;QACU,QAAG,GAAS,EAAE,CAAA;QACd,iBAAY,GAAkB,EAAE,CAAA;IAqE1C,CAAC;IAnEC,EAAE,CAAC,UAAsB,EAAE,GAAW;QACpC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAA;QAClC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,GAAG,CAAC,UAAsB,EAAE,eAAuB;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IAED,GAAG,CAAC,UAAsB,EAAE,eAAuB;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IAED,GAAG,CAAC,UAAsB,EAAE,eAAuB;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IAED,GAAG,CAAC,UAAsB,EAAE,eAAuB;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IAED,KAAK,CAAC,eAAuB;QAC3B,OAAO,IAAI,CAAC,cAAc,CACxB,IAAI,qBAAqB,CAAC,CAAC,CAAC,EAC5B,KAAK,EACL,eAAe,CAChB,CAAA;IACH,CAAC;IAED,KAAK,CAAC,UAAsB,EAAE,eAAuB;QACnD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,eAAe,CAAC,CAAA;IAClE,CAAC;IAED,IAAI,CAAC,UAAsB,EAAE,eAAuB;QAClD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC,CAAA;IACjE,CAAC;IAED,IAAI,CAAC,UAAsB,EAAE,eAAuB;QAClD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC,CAAA;IACjE,CAAC;IAEO,cAAc,CACpB,UAAsB,EACtB,IAAqB,EACrB,eAAuB;QAEvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC,CAAA;QAC7D,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;IACf,KAAK;QACH,OAAO;YACL,KAAK,EAAE;gBACL,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;oBAC9B,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE;oBACjC,GAAG,EAAE,EAAE,CAAC,GAAG;iBACZ,CAAC,CAAC;gBACH,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;oBACpD,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;wBAClB,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE;qBAC3C;oBACD,eAAe,EAAE,WAAW,CAAC,eAAe;iBAC7C,CAAC,CAAC;aACJ;SACF,CAAA;IACH,CAAC;CACF"}
1
+ {"version":3,"file":"GroupStage.js","sourceRoot":"","sources":["../../../../src/api/stages/GroupStage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAqI7E,MAAM,OAAO,cAAc;IAA3B;QACU,QAAG,GAAS,EAAE,CAAA;QACd,iBAAY,GAAkB,EAAE,CAAA;IAuE1C,CAAC;IArEC,EAAE,CAAC,UAAsB,EAAE,GAAW;QACpC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAA;QAClC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,GAAG,CAAC,UAAsB,EAAE,eAAuB;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IAED,GAAG,CAAC,UAAsB,EAAE,eAAuB;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IAED,GAAG,CAAC,UAAsB,EAAE,eAAuB;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IAED,GAAG,CAAC,UAAsB,EAAE,eAAuB;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,eAAe,CAAC,CAAA;IAChE,CAAC;IAED,KAAK,CAAC,eAAuB;QAC3B,OAAO,IAAI,CAAC,cAAc,CACxB,IAAI,qBAAqB,CAAC,CAAC,CAAC,EAC5B,KAAK,EACL,eAAe,CAChB,CAAA;IACH,CAAC;IAED,KAAK,CAAC,UAAsB,EAAE,eAAuB;QACnD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,eAAe,CAAC,CAAA;IAClE,CAAC;IAED,IAAI,CAAC,UAAsB,EAAE,eAAuB;QAClD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC,CAAA;IACjE,CAAC;IAED,IAAI,CAAC,UAAsB,EAAE,eAAuB;QAClD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC,CAAA;IACjE,CAAC;IAEO,cAAc,CACpB,UAAsB,EACtB,IAAqB,EACrB,eAAuB;QAEvB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC,CAAA;QAC7D,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO;YACL,KAAK,EAAE;gBACL,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;oBAC9B,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE;oBACjC,GAAG,EAAE,EAAE,CAAC,GAAG;iBACZ,CAAC,CAAC;gBACH,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;oBACpD,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;wBAClB,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE;qBAC3C;oBACD,eAAe,EAAE,WAAW,CAAC,eAAe;iBAC7C,CAAC,CAAC;aACJ;SACF,CAAA;IACH,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectStage.js","sourceRoot":"","sources":["../../../../src/api/stages/ProjectStage.ts"],"names":[],"mappings":"AAiEA,MAAM,OAAO,gBAAgB;IAA7B;QACE,WAAM,GAAqB,EAAE,CAAA;IA+C/B,CAAC;IA7CC,OAAO,CAAC,GAAG,UAAoB;QAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,GAAG,UAAoB;QAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,UAAsB,EAAE,eAAuB;QACrD,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC,CAAA;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;IAED,aAAa,CAAC,KAAmB,EAAE,eAAuB;QACxD,OAAO,IAAI,CAAC,wBAAwB,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACrE,CAAC;IAEO,QAAQ,CACd,UAAsB,EACtB,eAAuB;QAEvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACf,OAAO,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,EAAE;SAC7D,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,wBAAwB,CAC9B,eAAuB,EACvB,MAAwB;QAExB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;QAChE,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;IACf,KAAK;QACH,OAAO,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAA;IAChD,CAAC;CACF"}
1
+ {"version":3,"file":"ProjectStage.js","sourceRoot":"","sources":["../../../../src/api/stages/ProjectStage.ts"],"names":[],"mappings":"AAgEA,MAAM,OAAO,gBAAgB;IAA7B;QACE,WAAM,GAAqB,EAAE,CAAA;IA+C/B,CAAC;IA7CC,OAAO,CAAC,GAAG,UAAoB;QAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,GAAG,UAAoB;QAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,UAAsB,EAAE,eAAuB;QACrD,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC,CAAA;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;IAED,aAAa,CAAC,KAAmB,EAAE,eAAuB;QACxD,OAAO,IAAI,CAAC,wBAAwB,CAAC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACrE,CAAC;IAEO,QAAQ,CACd,UAAsB,EACtB,eAAuB;QAEvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACf,OAAO,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,EAAE;SAC7D,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,wBAAwB,CAC9B,eAAuB,EACvB,MAAwB;QAExB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;QAChE,OAAO,IAAI,CAAA;IACb,CAAC;IAED,eAAe;IACf,KAAK;QACH,OAAO,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAA;IAChD,CAAC;CACF"}
@@ -27,9 +27,9 @@ export interface PipelineBuilder {
27
27
  */
28
28
  withPaging(paging: Paging | CursorPaging): PipelineBuilder;
29
29
  /**
30
- * Builds the aggregation pipeline configuration.
30
+ * Builds the aggregation pipeline.
31
31
  *
32
- * Run this method after configuring stages and pagination to build the aggregation pipeline. Specify the pipeline as the `pipeline` parameter to the [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline) method.
32
+ * Run this method after configuring stages and pagination to build the aggregation pipeline. Specify the pipeline as the `pipeline` parameter when calling the [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline) method.
33
33
  *
34
34
  * @public
35
35
  * @documentationMaturity preview
@@ -38,9 +38,9 @@ export interface PipelineBuilder {
38
38
  build(): AggregationPipeline;
39
39
  }
40
40
  /**
41
- * Builds an aggregation pipeline.
41
+ * Builds an aggregation pipeline for use with [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline).
42
42
  *
43
- * Configure the pipeline by calling `pipelineBuilder()` and chaining [`PipelineBuilder`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/introduction) methods. Then, specify the pipeline as the `pipeline` parameter to the [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline) method.
43
+ * Configure the pipeline by calling `pipelineBuilder()` and chaining [`PipelineBuilder`](https://dev.wix.com/docs/sdk/backend-modules/data/items/pipeline-builder/introduction) methods. Then, specify the pipeline as the `pipeline` parameter when calling the [`aggregatePipeline()`](https://dev.wix.com/docs/sdk/backend-modules/data/items/aggregate-pipeline) method.
44
44
  *
45
45
  * > **Note**: You can only build an aggregation pipeline for collections [created in the CMS](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection) or with the [Data Collections API](https://dev.wix.com/docs/sdk/backend-modules/data/collections/introduction). They cannot be used on [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) or [external collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site).
46
46
  *
@@ -13,7 +13,7 @@ export interface WixDataAggregate {
13
13
  * whole collection if no group is defined.
14
14
  *
15
15
  * When the aggregation is `run()`, the returned `WixDataAggregateResult`
16
- * object contains an item for each group with the following key:value pairs:
16
+ * object contains an item for each group with the following key-value pairs:
17
17
  * - If a value was passed for the optional `projectedField`, the key is named
18
18
  * using that value. Otherwise, the key is named using the following format:
19
19
  * `"fieldSum"`, where `field` is the name of the specified field.
@@ -39,7 +39,7 @@ export interface WixDataAggregate {
39
39
  * whole collection if no group is defined.
40
40
  *
41
41
  * When the aggregation is `run()`, the returned `WixDataAggregateResult`
42
- * object contains an item for each group with the following key:value pairs:
42
+ * object contains an item for each group with the following key-value pairs:
43
43
  * - If a value was passed for the optional `projectedField`, the key is named
44
44
  * using that value. Otherwise, the key is named using the following format:
45
45
  * `"fieldAvg"`, where `field` is the name of the specified field.
@@ -65,7 +65,7 @@ export interface WixDataAggregate {
65
65
  * whole collection if no group is defined.
66
66
  *
67
67
  * When the aggregation is `run()`, the returned `WixDataAggregateResult`
68
- * object contains an item for each group with the following key:value pairs:
68
+ * object contains an item for each group with the following key-value pairs:
69
69
  * - If a value was passed for the optional `projectedField`, the key is named
70
70
  * using that value. Otherwise, the key is named using the following format:
71
71
  * `"fieldMin"`, where `field` is the name of the specified field.
@@ -100,7 +100,7 @@ export interface WixDataAggregate {
100
100
  * whole collection if no group is defined.
101
101
  *
102
102
  * When the aggregation is `run()`, the returned `WixDataAggregateResult`
103
- * object contains an item for each group with the following key:value pairs:
103
+ * object contains an item for each group with the following key-value pairs:
104
104
  * - If a value was passed for the optional `projectedField`, the key is named
105
105
  * using that value. Otherwise, the key is named using the following format:
106
106
  * `"fieldMax"`, where `field` is the name of the specified field.
@@ -133,7 +133,7 @@ export interface WixDataAggregate {
133
133
  * The `count()` method refines a `WixDataAggregate` contains the item count in each of the aggregate's groups.
134
134
  *
135
135
  * When the aggregation is `run()`, the returned `WixDataAggregateResult`
136
- * object contains items with the following additional key:value pair:
136
+ * object contains items with the following additional key-value pair:
137
137
  * - The key is named `count`. You can set a custom key using the `projectedField` parameter.
138
138
  * - The value is the count of items aggregated in the group.
139
139
  *
@@ -271,7 +271,7 @@ export interface WixDataAggregate {
271
271
  * > **Note**: Aggregations can only be used on collections you have created. They cannot be used on [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections).
272
272
  * @public
273
273
  * @documentationMaturity preview
274
- * @param fields - Fields used in the sort.
274
+ * @param fields - Fields to sort by.
275
275
  * @requiredField fields
276
276
  * @returns Refined query.
277
277
  */
@@ -296,7 +296,7 @@ export interface WixDataAggregate {
296
296
  * > **Note**: Aggregations can only be used on collections you have created. They cannot be used on [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections).
297
297
  * @public
298
298
  * @documentationMaturity preview
299
- * @param fields - Fields used in the sort.
299
+ * @param fields - Fields to sort by.
300
300
  * @requiredField fields
301
301
  * @returns Refined query.
302
302
  */