@wix/wix-data-items-common 1.0.161 → 1.0.163

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.
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/api/WixDataSearch.ts"],"sourcesContent":["import { WixDataResult } from './WixDataResult'\nimport { WixDataReadOptions } from './types'\nimport { WixDataFilter } from './WixDataFilter'\n\n/**\n * @builder\n * Represents a search operation to be performed on a Wix Data collection.\n * Allows for building complex search requests by specifying search expressions, modes, filters, sorting, and pagination.\n */\nexport interface WixDataSearch {\n /**\n * Specifies the text to search for in the collection.\n *\n * The `expression()` method sets the search query. Search terms are separated by whitespace.\n *\n * @param queryText - Text to search for across all fields in the collection.\n * @returns Current WixDataSearch object for method chaining.\n */\n expression(queryText: string): WixDataSearch\n\n /**\n * Enables fuzzy search for approximate text matching.\n *\n * The `fuzzy()` method enables fuzzy search, which allows for approximate matches of the search expression. When fuzzy search is enabled, the search will return results that closely match the search expression even if they don't exactly match.\n *\n * @returns The current WixDataSearch instance for method chaining.\n */\n fuzzy(): WixDataSearch\n\n /**\n * Sets the search mode to **AND** for expression terms.\n *\n * When in **AND** mode, all specified search term or filter conditions must be present for an item to be included in the results. For example, with expression \"red car\" in AND mode, only items that include both \"red\" and \"car\" are included in the results.\n *\n * @returns Current WixDataSearch object.\n */\n andMode(): WixDataSearch\n\n /**\n * Sets the search mode to **OR** for expression terms.\n *\n * When in **OR** mode, an item is included in the results if it contains any of the specified search terms in the expression.\n *\n * For example, with expression \"red car\" in **OR** mode, items that include either \"red\" or \"car\" (or both) are included in the results.\n *\n * @returns Current WixDataSearch object.\n */\n orMode(): WixDataSearch\n\n /**\n * Runs the search operation.\n *\n * The `run()` method searches the collection for the specified expression. It returns a Promise that resolves to a `WixDataResult` that contains the matching items and search metadata.\n *\n * Search operations are [eventually consistent](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency) and may not reflect recent changes.\n * @param options - Configuration options for building the search operation.\n * @returns A Promise that resolves to a WixDataResult containing the matching items and search metadata.\n */\n run(options?: WixDataReadOptions): Promise<WixDataResult>\n\n /**\n * Sorts search results by the specified fields in descending order.\n *\n * The `descending()` method refines the search to sort results in descending order of the specified fields.\n * If you specify more than one field, `descending()` sorts the results in descending order by each field in the order they are listed.\n *\n * You can sort the following types:\n * - **Number**: Sorts numerically.\n * - **Date**: Sorts by date and time.\n * - **String**: Sorts lexicographically, so `\"abc\"` comes before `\"XYZ\"`.\n * - **Reference**: Compares by the ID of the referenced item as a String.\n *\n * If a property contains a number as a String, that value is sorted alphabetically and not numerically.\n * Items that do not have a value for the specified sort property are ranked lowest.\n *\n * @public\n * @documentationMaturity preview\n * @param fields - Fields by which to sort results in descending order.\n * @requiredField fields\n * @returns The current WixDataSearch instance, refined with the specified sort order.\n */\n descending(...fields: string[]): WixDataSearch\n /**\n * @param fields - An array of fields to sort by in descending order.\n * @returns The current WixDataSearch instance, refined with the specified sort order.\n */\n descending(fields: string[]): WixDataSearch\n /**\n * @param fields - Fields used in the sort.\n * @returns The current WixDataSearch instance, refined with the specified sort order.\n */\n descending(...fields: any): WixDataSearch\n\n /**\n * Sorts search results by the specified fields in ascending order.\n *\n * The `ascending()` method refines the search to sort results in ascending order of the specified fields.\n * If you specify more than one field, `ascending()` sorts the results in ascending order by each field in the order they are listed.\n *\n * You can sort the following types:\n * - **Number**: Sorts numerically.\n * - **Date**: Sorts by date and time.\n * - **String**: Sorts lexicographically, so `\"abc\"` comes after `\"XYZ\"`.\n * - **Reference**: Compares by the ID of the referenced item as a String.\n *\n * If a property contains a number as a String, that value is sorted alphabetically and not numerically.\n * Items that do not have a value for the specified sort property are ranked lowest.\n *\n * @public\n * @documentationMaturity preview\n * @param fields - Fields by which to sort results in ascending order.\n * @requiredField fields\n * @returns The current WixDataSearch instance, refined with the specified sort order.\n */\n ascending(...fields: string[]): WixDataSearch\n /**\n * @param fields - An array of fields to sort by in ascending order.\n * @returns The current WixDataSearch instance, refined with the specified sort order.\n */\n ascending(fields: string[]): WixDataSearch\n /**\n * @param fields - Fields used in the sort.\n * @returns The current WixDataSearch instance, refined with the specified sort order.\n */\n ascending(...fields: any): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value equals the specified value.\n *\n * The `eq()` method refines the search to only match items where the value of the specified field equals the specified `value`. The method only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.\n *\n * Matching strings with `eq()` is case-sensitive, so `\"text\"` is not equal to `\"Text\"`.\n *\n * If the field contains an array, `eq()` matches the item if at least one array element equals the specified `value`.\n *\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to match.\n * @requiredField value\n * @returns Current WixDataSearch object, refined with the equality filter.\n */\n eq(field: string, value: any): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property value does not equal the specified value.\n *\n * The `ne()` method refines this search to only\n * match items where the value of the specified property does not equal the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored\n * as a String type is considered not equal to the same number stored as a Number type.\n *\n * Matching strings with `ne()` is case sensitive, so `\"text\"` is not equal to `\"Text\"`.\n *\n * If the value of the `field` property is an array, `ne()` includes items\n * in which none of the elements of the array match the specified `value`.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to not match.\n * @requiredField value\n * @returns The current WixDataSearch instance, refined with the inequality filter.\n */\n ne(field: string, value: any): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property value is greater than or equal to the specified\n * value.\n *\n * The `ge()` method refines this search to only\n * match items where the value of the specified property is greater than or\n * equal to the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored\n * as a String type does not match the same number stored as a Number type.\n *\n * If a property contains a number as a String, that value is compared\n * alphabetically and not numerically. Items that do not have a value for the\n * specified property are ranked lowest.\n *\n * The following types of properties can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically,\n * so `\"abc\"` is greater than or equal to `\"ABC\"` (because of the greater than),\n * but `\"ABC\"` is not greater than or equal to `\"abc\"`.\n * - Reference: Compares by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to compare against.\n * @requiredField value\n * @returns The current WixDataSearch instance, refined with the 'greater than or equal' filter.\n */\n ge(field: string, value: string | number | Date): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property value is greater than the specified value.\n *\n * The `gt()` method refines this search to only match\n * items where the value of the specified property is greater than the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored\n * as a String type does not match the same number stored as a Number type.\n *\n * If a property contains a number as a String, that value is compared\n * alphabetically and not numerically. Items that do not have a value for the\n * specified property are ranked lowest.\n *\n * The following types of properties can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically, so `\"text\"` is greater than `\"Text\"`.\n * - Reference: Compares by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to compare against.\n * @requiredField value\n * @returns The current WixDataSearch instance, refined with the 'greater than' filter.\n */\n gt(field: string, value: string | number | Date): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property value is less than or equal to the specified\n * value.\n *\n * The `le()` method refines this search to only match\n * items where the value of the specified property is less than or equal to the\n * specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored\n * as a String type does not match the same number stored as a Number type.\n *\n * If a property contains a number as a String, that value is compared\n * alphabetically and not numerically. Items that do not have a value for the\n * specified property are ranked lowest.\n *\n * The following types of properties can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically,\n * so `\"ABC\"` is less than or equal to `\"abc\"` (because of the less than),\n * but `\"abc\"` is not less than or equal to `\"ABC\"`.\n * - Reference: Compares by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to compare against.\n * @requiredField value\n * @returns The current WixDataSearch instance, refined with the 'less than or equal' filter.\n */\n le(field: string, value: string | number | Date): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property value is less than the specified value.\n *\n * The `lt()` method refines this search to only match\n * items where the value of the specified property is less than the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored\n * as a String type does not match the same number stored as a Number type.\n *\n * If a property contains a number as a String, that value is compared\n * alphabetically and not numerically. Items that do not have a value for the\n * specified property are ranked lowest.\n *\n * The following types of properties can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically, so `\"Text\"` is less than `\"text\"`.\n * - Reference: Compares by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to compare against.\n * @requiredField value\n * @returns The current WixDataSearch instance, refined with the 'less than' filter.\n */\n lt(field: string, value: string | number | Date): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property has any value (is not null or undefined).\n *\n * The `isNotEmpty()` method refines this search to only match items where the\n * value of the specified property is not `null` or `undefined`.\n *\n * If the property contains any value at all for a given item, including the\n * empty string or an invalid value, that item will match the search filter.\n * @public\n * @documentationMaturity preview\n * @param field - Field in which to check for a non-empty value.\n * @requiredField field\n * @returns The current WixDataSearch instance, refined with the 'is not empty' filter.\n */\n isNotEmpty(field: string): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property does not exist or does not have any value (is null or undefined).\n *\n * The `isEmpty()` method refines this search to only match items where the\n * value of the specified property is `null` or `undefined` or the property does\n * not exist.\n *\n * If the property contains any value at all for a given item, including the\n * empty string or an invalid value, that item will not match the search filter.\n * @public\n * @documentationMaturity preview\n * @param field - Field in which to check for an empty or non-existent value.\n * @requiredField field\n * @returns The current WixDataSearch instance, refined with the 'is empty' filter.\n */\n isEmpty(field: string): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property value starts with a specified string.\n *\n * The `startsWith()` method refines this search to\n * only match items where the value of the specified property starts with the\n * defined `string`. Matching with `startsWith()` is case-sensitive, so `\"TEXT\"` does not start\n * with `\"tex\"`.\n *\n * You can only use `startsWith()` with a property whose value is a String or Reference.\n * When using a Reference, `startsWith()` matches by the ID of the referenced item as Strings.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with the `value` parameter.\n * @requiredField field\n * @param value - String to look for at the beginning of the specified property value.\n * @requiredField value\n * @returns The current `WixDataSearch` instance, refined with the 'starts with' filter.\n */\n startsWith(field: string, value: string): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value equals any of the specified values.\n *\n * The `hasSome()` method refines the search to only match items where the value of the specified field equals any of the specified values.\n *\n * Matching strings with `hasSome()` is case-sensitive, so `\"text\"` is not equal to `\"Text\"`.\n *\n * If the specified field contains an array, `hasSome()` matches if any of the elements in that array match any of the specified values.\n *\n * If the specified field contains multiple references, pass item IDs as the values. `hasSome()` matches if any of the multiple references match any of the specified ID values.\n *\n * You can specify multiple values to match by providing an array of String, Number, or Date types as the `value` parameters.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param values - Values to match.\n * @requiredField values\n * @returns The current WixDataSearch instance, refined with the 'has some' filter.\n */\n hasSome(field: string, ...values: string[] | number[] | Date[]): WixDataSearch\n\n /**\n * Overload for `hasSome()`. Refines a search to match items whose specified property value equals any of the specified values.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with the provided values.\n * @requiredField field\n * @param values - An array of values to match.\n * @requiredField values\n * @returns The current WixDataSearch instance, refined with the 'has some' filter.\n */\n hasSome(field: string, values: string[] | number[] | Date[]): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property values equals all of the specified `value`\n * parameters.\n *\n * The `hasAll()` method refines this search to\n * only match items where the value of the specified property equals all of\n * the specified values.\n *\n * Matching strings with `hasAll()` is case sensitive, so `\"text\"` is not equal to `\"Text\"`.\n *\n * If the value of the specified property is an array, `hasAll()` will match\n * if there is a match in the elements of that array for all of the specified\n * values.\n *\n * You can specify a list of values to match by providing an array of\n * String, Number, or Date types as the `value` parameters.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param values - Values to match. All specified values must be present.\n * @requiredField values\n * @returns The current WixDataSearch instance, refined with the 'has all' filter.\n */\n hasAll(field: string, ...values: string[] | number[] | Date[]): WixDataSearch\n\n /**\n * Overload for `hasAll()`. Refines a search to match items whose specified property values equals all of the specified values.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with the provided values.\n * @requiredField field\n * @param values - An array of values to match. All values in the array must be present.\n * @requiredField values\n * @returns The current WixDataSearch instance, refined with the 'has all' filter.\n */\n hasAll(field: string, values: string[] | number[] | Date[]): WixDataSearch\n\n /**\n * Adds an `or` condition to the search filter.\n *\n * The `or()` method adds an inclusive `or` condition to this search filter. The search returns all the items that match the filter as defined up to the `or()` method, the items that match the filter passed to the `or()` method, and the items that match both.\n *\n * > **Note**: The `or()` method is designed to work with 2 or more filters. Used on its own, it might produce unexpected results.\n * @public\n * @documentationMaturity preview\n * @param filter - Filter to add to the initial filter as an `or` condition.\n * @requiredField filter\n * @returns The current WixDataSearch instance, refined with the 'or' condition.\n */\n or(filter: WixDataFilter): WixDataSearch\n\n /**\n * Adds an `and` condition to the search filter.\n *\n * The `and()` method adds an `and` condition to the search filter. A search with an `and` returns all the items that match the filter as defined up to the `and()` method, as well as the filter passed to the `and()` method.\n *\n * When chaining multiple filter methods to a search, an `and` condition is often assumed by default. For example, this search returns results whose status is active **and** age is greater than 25:\n *\n * ```javascript\n * items.search(\"myCollection\").expression(\"some text\").eq(\"status\", \"active\").gt(\"age\", 25);\n * ```\n *\n * The `and()` method is needed when performing compound filters. For example, the final search in this set of operations returns results whose status is either pending or rejected **and** age is either less than 25 or greater than 65:\n *\n * ```javascript\n * let statusFilter = items.filter().eq(\"status\", \"pending\").or(items.filter().eq(\"status\", \"rejected\"));\n *\n * let ageFilter = items.filter().lt(\"age\", 25).or(items.filter().gt(\"age\", 65));\n *\n * let finalSearch = items.search(\"myCollection\").expression(\"some text\").and(statusFilter).and(ageFilter);\n * ```\n *\n * > **Note**: The `and()` method is designed to work with 2 or more filters.\n *\n * @public\n * @documentationMaturity preview\n * @param filter - Filter to add to the initial search filter as an `and` condition.\n * @requiredField filter\n * @returns The current WixDataSearch instance, refined with the 'and' condition.\n */\n and(filter: WixDataFilter): WixDataSearch\n\n /**\n * Adds a `not` condition to the search filter.\n *\n * The `not()` method adds a `not` condition to the search filter. A search with a `not` returns all the items that match the filter as defined up to the `not()` method and don't match the filter passed to the `not()` method.\n *\n * If the search filter only contains a `not()` method, it returns all the items that don't match the filter specified to the method.\n *\n * @public\n * @documentationMaturity preview\n * @param filter - Filter to add to the initial filter as a `not` condition.\n * @requiredField filter\n * @returns The current WixDataSearch instance, refined with the 'not' condition.\n */\n not(filter: WixDataFilter): WixDataSearch\n\n /**\n * Refines a search to match items whose specified property value is within a specified range.\n *\n * The `between()` method refines this search to only match items where the value of the specified property is\n * greater than or equal to `rangeStart` and less than `rangeEnd`.\n *\n * It only matches values of the same type. For example, a number value stored as a String type does not match the\n * same number stored as a Number type.\n *\n * If a property contains a number as a String, that value is compared alphabetically and not numerically. Items\n * that do not have a value for the specified property are ranked lowest.\n *\n * The following types of properties can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically, so\n * - `\"A\"` and `\"M\"` are between `\"A\"` and `\"Z\"`, but `\"a\"`, `\"m\"`, `\"z\"` and `\"Z\"` are not.\n * - `\"A\"`, `\"M\"`, `\"Z\"`, and `\"a\"` are between `\"A\"` and `\"z\"`, but `\"z\"` is not.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with rangeStart and rangeEnd.\n * @requiredField field\n * @param rangeStart - Starting value of the range to match (inclusive).\n * @requiredField rangeStart\n * @param rangeEnd - Ending value of the range to match (exclusive).\n * @requiredField rangeEnd\n * @returns The current WixDataSearch instance, refined with the 'between' filter.\n */\n between(\n field: string,\n rangeStart: string | number | Date,\n rangeEnd: string | number | Date\n ): WixDataSearch\n\n /**\n * Lists the fields to return in a search's results.\n *\n * The `fields()` method specifies which fields to return in the search results.\n *\n * You can use `include()` in conjunction with `fields()` to get referenced items.\n *\n * When `fields()` receives an empty or invalid property, the search behaves as follows:\n * - When no fields are specified, the search returns all fields.\n * - When multiple fields are specified but some are invalid, invalid fields are ignored and valid fields are returned.\n * - When only invalid fields are specified, only the default `_id` field is returned.\n * @public\n * @documentationMaturity preview\n * @param fields - Properties to return.\n * @requiredField fields\n * @returns The current `WixDataSearch` instance, configured to return specified fields.\n */\n fields(...fields: string[]): WixDataSearch\n\n /**\n * Limits the number of items the search returns.\n *\n * The `limit()` method defines the number of results a search returns in each\n * page. Only one page of results is retrieved at a time. The `next()`\n * and `prev()` methods of the `WixDataResult` object are used to\n * navigate the pages of a search result.\n *\n * By default, `limit` is set to `100`.\n *\n * The maximum value that `limit()` can accept is `1000`.\n *\n * @public\n * @documentationMaturity preview\n * @param limitNumber - Number of items to return, which is also the `pageSize` of the results object.\n * @requiredField limitNumber\n * @returns The current `WixDataSearch` instance, refined with the specified limit.\n */\n limit(limitNumber: number): WixDataSearch\n\n /**\n * Sets the number of items to skip before returning search results.\n *\n * The `skip()` method defines the number of results to skip in the search\n * results before returning new search results.\n *\n * For example, if your search matches 50 items, but\n * you set `skip` to 10, the results returned will skip the first 10 items\n * that match and return the 11th through 50th items.\n *\n * By default, `skip` is set to 0.\n * @public\n * @documentationMaturity preview\n * @param skipCount - Number of items to skip in the search results before returning the results.\n * @requiredField skipCount\n * @returns The current `WixDataSearch` instance, refined with the specified skip count.\n */\n skip(skipCount: number): WixDataSearch\n\n /**\n * Includes referenced items for the specified properties in a search's results.\n *\n * The `include()` method refines a search so that the items returned in the\n * search's results include the full referenced items for the specified properties.\n *\n * For example, suppose you have a **books** collection with an **author**\n * field that references an **authors** collection. Searching the **books**\n * collection with an `include(\"author\")` returns the relevant book items\n * and each item will include the full referenced author item in the book's\n * `author` property.\n *\n * When searching a collection that contains a reference field without using the\n * `include()` method:\n * - Single reference field: returned items contain only the ID of the\n * referenced item, and not the full referenced items.\n * - Multiple reference field: returned items do not contain the multiple\n * reference field at all.\n *\n * When including a property with multiple references, the following limitations\n * apply:\n * - Only one property with multiple references can be included.\n * - The search will return an error if more than 50 items are returned, regardless\n * of any search limit set using the `limit()` method.\n * - Each returned item can include up to 50 referenced items. If there are more\n * than 50 referenced items, only 50 are returned when the search is run\n * and the `partialIncludes` property of the returned `WixDataResult` is `true`.\n *\n * > **Note:** The `include()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection).\n *\n * @public\n * @documentationMaturity preview\n * @param fields - Fields for which to include referenced items.\n * @requiredField fields\n * @returns The current `WixDataSearch` instance, configured to include referenced items.\n */\n include(...fields: string[]): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified property in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field - Field for which to include referenced items.\n * @param limit - Optional limit for the number of referenced items to include (behavior may vary).\n * @returns The current `WixDataSearch` instance.\n */\n include(field: string, limit?: number): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified properties in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field1 - First field for which to include referenced items.\n * @param field2 - Second field for which to include referenced items.\n * @param limit - Optional limit for the number of referenced items to include (behavior may vary).\n * @returns The current `WixDataSearch` instance.\n */\n include(field1: string, field2: string, limit?: number): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified properties in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field1 - First field.\n * @param field2 - Second field.\n * @param field3 - Third field.\n * @param limit - Optional limit.\n * @returns The current `WixDataSearch` instance.\n */\n include(\n field1: string,\n field2: string,\n field3: string,\n limit?: number\n ): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified properties in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field1 - First field.\n * @param field2 - Second field.\n * @param field3 - Third field.\n * @param field4 - Fourth field.\n * @param limit - Optional limit.\n * @returns The current `WixDataSearch` instance.\n */\n include(\n field1: string,\n field2: string,\n field3: string,\n field4: string,\n limit?: number\n ): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified properties in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field1 - First field.\n * @param field2 - Second field.\n * @param field3 - Third field.\n * @param field4 - Fourth field.\n * @param field5 - Fifth field.\n * @param limit - Optional limit.\n * @returns The current `WixDataSearch` instance.\n */\n include(\n field1: string,\n field2: string,\n field3: string,\n field4: string,\n field5: string,\n limit?: number\n ): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified properties in a search's results.\n * Allows specifying multiple field names and an optional limit.\n * @public\n * @documentationMaturity preview\n * @param fieldNamesAndLimit - An array of field names, optionally followed by a limit number.\n * @returns The current `WixDataSearch` instance.\n */\n include(...fieldNamesAndLimit: [...string[], number]): WixDataSearch\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/api/WixDataSearch.ts"],"sourcesContent":["import { WixDataResult } from './WixDataResult'\nimport { WixDataReadOptions } from './types'\nimport { WixDataFilter } from './WixDataFilter'\n\n/**\n * @builder\n * Represents a search operation to be performed on a Wix Data collection.\n * Allows for building complex search requests by specifying search expressions, modes, filters, sorting, and pagination.\n */\nexport interface WixDataSearch {\n /**\n * Specifies the text to search in the collection.\n *\n * The `expression()` method sets the search query. Search terms are separated by whitespace.\n *\n * @param queryText - Text to search in the collection.\n * @returns Refined WixDataSearch object.\n */\n expression(queryText: string): WixDataSearch\n\n /**\n * Enables fuzzy search for approximate text matching.\n *\n * The `fuzzy()` method enables fuzzy search. This allows for approximate matches that closely resemble the search expression even if they don't exactly match.\n *\n * @returns Refined WixDataSearch object.\n */\n fuzzy(): WixDataSearch\n\n /**\n * Sets the search mode to **AND**.\n *\n * When in **AND** mode, an item must include all specified search terms to be included in the results. For example, the search expression \"red car\" in **AND** mode only retrieves items that include both \"red\" and \"car\".\n *\n * @returns Refined WixDataSearch object.\n */\n andMode(): WixDataSearch\n\n /**\n * Sets the search mode to **OR**.\n *\n * When in **OR** mode, an item must include at least one of the specified search terms to be included in the results. For example, the search expression \"red car\" in **OR** mode retrieves items that include \"red\", \"car\", or both.\n *\n * @returns Refined WixDataSearch object.\n */\n orMode(): WixDataSearch\n\n /**\n * Runs the search operation.\n *\n * The `run()` method searches the collection for the specified expression. It returns a Promise that resolves to a [`WixDataResult`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-result/introduction) that contains the matching items and search metadata.\n *\n * Search operations are [eventually consistent](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency) and might not reflect recent changes.\n * @param options - Options for building the search operation.\n * @returns Promise that resolves to a [`WixDataResult`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-result/introduction) containing the matching items and search metadata.\n */\n run(options?: WixDataReadOptions): Promise<WixDataResult>\n\n /**\n * Sorts search results by the specified fields in descending order.\n *\n * The `descending()` method refines the search to sort results by the specified fields in descending order. If you specify more than one field, `descending()` sorts the results in descending order by each field in the order they are listed.\n *\n * You can sort the following types:\n * - **Number**: Sorts numerically.\n * - **Date**: Sorts by date and time.\n * - **String**: Sorts lexicographically, so `\"abc\"` comes before `\"XYZ\"`.\n * - **Reference**: Compares by the ID of the referenced item as a String.\n *\n * If a field contains a number as a String, that value is sorted alphabetically and not numerically.\n * Items that do not have a value for the specified sort field are ranked lowest.\n *\n * @public\n * @documentationMaturity preview\n * @param fields - Fields by which to sort results in descending order.\n * @requiredField fields\n * @returns Refined WixDataSearch object.\n */\n descending(...fields: string[]): WixDataSearch\n /**\n * @param fields - Array of fields by which to sort results in descending order.\n * @returns Refined WixDataSearch object.\n */\n descending(fields: string[]): WixDataSearch\n /**\n * @param fields - Fields by which to sort results in descending order.\n * @returns Refined WixDataSearch object.\n */\n descending(...fields: any): WixDataSearch\n\n /**\n * Sorts search results in ascending order by the specified fields.\n *\n * The `ascending()` method refines the search to sort results by the specified fields in ascending order. If you specify more than one field, `ascending()` sorts the results in ascending order by each field in the order they are listed.\n *\n * You can sort the following types:\n * - **Number**: Sorts numerically.\n * - **Date**: Sorts by date and time.\n * - **String**: Sorts lexicographically, so `\"abc\"` comes before `\"XYZ\"`.\n * - **Reference**: Compares by the ID of the referenced item as a String.\n *\n * If a field contains a number as a String, that value is sorted alphabetically and not numerically.\n * Items that do not have a value for the specified sort field are ranked lowest.\n *\n * @public\n * @documentationMaturity preview\n * @param fields - Fields by which to sort results in ascending order.\n * @requiredField fields\n * @returns Refined WixDataSearch object.\n */\n ascending(...fields: string[]): WixDataSearch\n /**\n * @param fields - Array of fields by which to sort results in ascending order.\n * @returns Refined WixDataSearch object.\n */\n ascending(fields: string[]): WixDataSearch\n /**\n * @param fields - Fields by which to sort results in ascending order.\n * @returns Refined WixDataSearch object.\n */\n ascending(...fields: any): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value equals the specified value.\n *\n * The `eq()` method refines the search to only match items where the value of the specified field equals the specified `value`. It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.\n *\n * Matching strings with `eq()` is case-sensitive, so `\"text\"` is not considered equal to `\"Text\"`.\n *\n * If the field contains an array, `eq()` matches the item if at least one array element equals the specified `value`.\n *\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to match.\n * @requiredField value\n * @returns Refined WixDataSearch object.\n */\n eq(field: string, value: any): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value does not equal the specified value.\n *\n * The `ne()` method refines the search to only match items where the value of the specified field does not equal the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored as a String type is considered not equal to the same number stored as a Number type.\n *\n * Matching strings with `ne()` is case-sensitive, so `\"text\"` is not equal to `\"Text\"`.\n *\n * If the value of `field` is an array, `ne()` includes items in which none of the elements of the array match the specified `value`.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to not match.\n * @requiredField value\n * @returns Refined WixDataSearch object.\n */\n ne(field: string, value: any): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value is greater than or equal to the specified value.\n *\n * The `ge()` method refines the search to only match items where the value of the specified field is greater than or equal to the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored\n * as a String type does not match the same number stored as a Number type.\n *\n * If a field contains a number as a String, that value is compared\n * alphabetically and not numerically. Items that do not have a value for the\n * specified field are ranked lowest.\n *\n * The following types of fields can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically, so `\"abc\"` is greater than or equal to `\"ABC\"`, but `\"ABC\"` is not greater than or equal to `\"abc\"`.\n * - Reference: Compares by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to compare against.\n * @requiredField value\n * @returns Refined WixDataSearch object.\n */\n ge(field: string, value: string | number | Date): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value is greater than the specified value.\n *\n * The `gt()` method refines the search to only match items where the value of the specified field is greater than the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.\n *\n * If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest.\n *\n * The following types of fields can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically, so `\"text\"` is greater than `\"Text\"`.\n * - Reference: Compares by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to compare against.\n * @requiredField value\n * @returns Refined WixDataSearch object.\n */\n gt(field: string, value: string | number | Date): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value is less than or equal to the specified value.\n *\n * The `le()` method refines the search to only match items where the value of the specified field is less than or equal to the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.\n *\n * If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest.\n *\n * The following types of fields can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically, so `\"ABC\"` is less than or equal to `\"abc\"`, but `\"abc\"` is not less than or equal to `\"ABC\"`.\n * - Reference: Compares by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to compare with.\n * @requiredField value\n * @returns Refined WixDataSearch object.\n */\n le(field: string, value: string | number | Date): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value is less than the specified value.\n *\n * The `lt()` method refines the search to only match items where the value of the specified field is less than the specified `value`.\n *\n * It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.\n *\n * If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest.\n *\n * The following types of fields can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically, so `\"Text\"` is less than `\"text\"`.\n * - Reference: Compares by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `value`.\n * @requiredField field\n * @param value - Value to compare with.\n * @requiredField value\n * @returns Refined WixDataSearch object.\n */\n lt(field: string, value: string | number | Date): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field has a value that isn't `null` or `undefined`.\n *\n * The `isNotEmpty()` method refines the search to only match items where the value of the specified field is not `null` or `undefined`.\n *\n * If the field contains any value at all for a given item, including an empty string or an invalid value, that item matches the search filter.\n * @public\n * @documentationMaturity preview\n * @param field - Field in which to check for a non-empty value.\n * @requiredField field\n * @returns Refined WixDataSearch object.\n */\n isNotEmpty(field: string): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field does not exist or does not have any value (is null or undefined).\n *\n * The `isEmpty()` method refines the search to only match items where the specified field does not exist or where its value is `null` or `undefined`.\n *\n * If the field contains any value at all for a given item, including an empty string or an invalid value, that item does not match the search filter.\n * @public\n * @documentationMaturity preview\n * @param field - Field in which to check for an empty or non-existent value.\n * @requiredField field\n * @returns Refined WixDataSearch object.\n */\n isEmpty(field: string): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value starts with a specified string.\n *\n * The `startsWith()` method refines the search to only match items where the value of the specified field starts with the specified `string`. Matching with `startsWith()` is case-sensitive, so searching for `\"Sun\"` does not match an item that contains the text `\"sunshine\"`.\n *\n * You can only use `startsWith()` with a field whose value is a String or Reference. When using a Reference, `startsWith()` matches by the ID of the referenced item as a String.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with the `value` parameter.\n * @requiredField field\n * @param value - String to look for at the beginning of the specified field value.\n * @requiredField value\n * @returns Refined WixDataSearch object.\n */\n startsWith(field: string, value: string): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value equals any of the specified values.\n *\n * The `hasSome()` method refines the search to only match items where the value of the specified field equals any of the specified values.\n *\n * Matching strings with `hasSome()` is case-sensitive, so `\"text\"` is not equal to `\"Text\"`.\n *\n * If the specified field contains an array, `hasSome()` matches if any of the elements in that array match any of the specified values.\n *\n * If the specified field contains multiple references, pass item IDs as the values. `hasSome()` matches if any of the multiple references match any of the specified ID values.\n *\n * You can specify multiple values to match by providing an array of String, Number, or Date types as the `values` parameters.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `values`.\n * @requiredField field\n * @param values - Values to match.\n * @requiredField values\n * @returns Refined WixDataSearch object.\n */\n hasSome(field: string, ...values: string[] | number[] | Date[]): WixDataSearch\n\n /**\n * Overload for `hasSome()`. Refines a search to match items whose specified field value equals any of the specified values.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with the provided values.\n * @requiredField field\n * @param values - An array of values to match.\n * @requiredField values\n * @returns Refined WixDataSearch object.\n */\n hasSome(field: string, values: string[] | number[] | Date[]): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value equals all of the specified values.\n *\n * The `hasAll()` method refines the search to only match items where the value of the specified field equals all of the specified values.\n *\n * Matching strings with `hasAll()` is case-sensitive, so `\"text\"` is not equal to `\"Text\"`.\n *\n * If the value of the specified field is an array, `hasAll()` matches if there is a match in the elements of that array for all of the specified values.\n *\n * You can specify a list of values to match by providing an array of String, Number, or Date types as the `values` parameters.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `values`.\n * @requiredField field\n * @param values - Values to match. All specified values must be present.\n * @requiredField values\n * @returns Refined WixDataSearch object.\n */\n hasAll(field: string, ...values: string[] | number[] | Date[]): WixDataSearch\n\n /**\n * Overload for `hasAll()`. Refines a search to match items whose specified field values equals all of the specified values.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with the provided values.\n * @requiredField field\n * @param values - Array of values to match. All elements in the array must be present.\n * @requiredField values\n * @returns Refined WixDataSearch object.\n */\n hasAll(field: string, values: string[] | number[] | Date[]): WixDataSearch\n\n /**\n * Adds an `or` condition to the search filter.\n *\n * The `or()` method adds an inclusive `or` condition to the search filter. The search returns all the items that match the filter as defined up to the `or()` method, the items that match the filter passed to the `or()` method, and the items that match both.\n *\n * > **Note**: The `or()` method requires 2 or more filters. Used on its own, it might produce unexpected results.\n * @public\n * @documentationMaturity preview\n * @param filter - Filter to add to the initial filter as an `or` condition.\n * @requiredField filter\n * @returns Refined WixDataSearch object.\n */\n or(filter: WixDataFilter): WixDataSearch\n\n /**\n * Adds an `and` condition to the search filter.\n *\n * The `and()` method adds an `and` condition to the search filter. A search with an `and` returns all the items that match both the filter as defined up to the `and()` method, and the filter passed to the `and()` method.\n *\n * When chaining multiple filter methods to a search, an `and` condition is often assumed by default. For example, the search returns results whose status is active **and** age is greater than 25:\n *\n * ```javascript\n * items\n * .search(\"myCollection\")\n * .expression(\"some text\")\n * .eq(\"status\", \"active\")\n * .gt(\"age\", 25);\n * ```\n *\n * The `and()` method is needed when using compound filters. For example, the final search in this set of operations returns results whose status is either pending or rejected **and** age is either less than 25 or greater than 65:\n *\n * ```javascript\n * let statusFilter = items\n * .filter()\n * .eq(\"status\", \"pending\")\n * .or(items.filter().eq(\"status\", \"rejected\"));\n *\n * let ageFilter = items\n * .filter()\n * .lt(\"age\", 25)\n * .or(items.filter().gt(\"age\", 65));\n *\n * let finalSearch = items\n * .search(\"myCollection\")\n * .expression(\"some text\")\n * .and(statusFilter)\n * .and(ageFilter);\n * ```\n *\n * > **Note**: The `and()` method requires 2 or more filters.\n *\n * @public\n * @documentationMaturity preview\n * @param filter - Filter to add to the initial search filter as an `and` condition.\n * @requiredField filter\n * @returns Refined WixDataSearch object.\n */\n and(filter: WixDataFilter): WixDataSearch\n\n /**\n * Adds a `not` condition to the search filter.\n *\n * The `not()` method adds a `not` condition to the search filter. A search with a `not` returns all the items that match the filter as defined up to the `not()` method and don't match the filter passed to the `not()` method.\n *\n * If the search filter only contains a `not()` method, it returns all the items that don't match the filter specified to the method.\n *\n * @public\n * @documentationMaturity preview\n * @param filter - Filter to add to the initial filter as a `not` condition.\n * @requiredField filter\n * @returns Refined WixDataSearch object.\n */\n not(filter: WixDataFilter): WixDataSearch\n\n /**\n * Refines a search to match items whose specified field value is within a specified range.\n *\n * The `between()` method refines the search to only match items where the value of the specified field is greater than or equal to `rangeStart` and less than `rangeEnd`.\n *\n * It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.\n *\n * If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest.\n *\n * The following types of fields can be compared:\n * - Number: Compares numerically.\n * - Date: Compares JavaScript Date objects.\n * - String: Compares lexicographically, so\n * - `\"A\"` and `\"M\"` are between `\"A\"` and `\"Z\"`, but `\"a\"`, `\"m\"`, `\"z\"` and `\"Z\"` are not.\n * - `\"A\"`, `\"M\"`, `\"Z\"`, and `\"a\"` are between `\"A\"` and `\"z\"`, but `\"z\"` is not.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is compared with `rangeStart` and `rangeEnd`.\n * @requiredField field\n * @param rangeStart - Starting value of the range to match (inclusive).\n * @requiredField rangeStart\n * @param rangeEnd - Ending value of the range to match (exclusive).\n * @requiredField rangeEnd\n * @returns Refined WixDataSearch object.\n */\n between(\n field: string,\n rangeStart: string | number | Date,\n rangeEnd: string | number | Date\n ): WixDataSearch\n\n /**\n * Lists the fields to return in the search results.\n *\n * The `fields()` method specifies which fields to return in the search results.\n *\n * You can use `include()` together with `fields()` to get referenced items.\n *\n * When `fields()` receives an empty or an invalid field, the search behaves as follows:\n * - When no fields are specified, the search returns all fields.\n * - When multiple fields are specified but some are invalid, invalid fields are ignored and valid fields are returned.\n * - When only invalid fields are specified, only the default `_id` field is returned.\n * @public\n * @documentationMaturity preview\n * @param fields - Fields to return.\n * @requiredField fields\n * @returns Refined WixDataSearch object.\n */\n fields(...fields: string[]): WixDataSearch\n\n /**\n * Limits the number of items the search returns.\n *\n * The `limit()` method defines the number of results a search operation returns in each page. Only one page of results is retrieved at a time. The `next()` and `prev()` methods of the [`WixDataResult`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-result/introduction) object are used to navigate the pages of a search result.\n *\n * By default, `limit` is set to `100`.\n *\n * The maximum value that `limit()` can accept is `1000`.\n *\n * @public\n * @documentationMaturity preview\n * @param limitNumber - Number of items to return, which is also the `pageSize` of the results object.\n * @requiredField limitNumber\n * @returns Refined WixDataSearch object.\n */\n limit(limitNumber: number): WixDataSearch\n\n /**\n * Sets the number of items to skip before returning search results.\n *\n * The `skip()` method defines the number of results to skip in the search results before returning new search results.\n *\n * For example, if your search matches 50 items, but you set `skip` to 10, the results returned skips the first 10 items that match and return the 11th through 50th items.\n *\n * By default, `skip()` is set to 0.\n * @public\n * @documentationMaturity preview\n * @param skipCount - Number of items to skip before returning the results.\n * @requiredField skipCount\n * @returns Refined WixDataSearch object.\n */\n skip(skipCount: number): WixDataSearch\n\n /**\n * Includes referenced items for the specified fields.\n *\n * The `include()` method refines a search so that the items returned in the search results include the full referenced items for the specified fields.\n *\n * For example, suppose you have a **books** collection with an **author** field that references an **authors** collection. Searching the **books** collection with an `include(\"author\")` returns the relevant book items, and each item includes the full referenced author item in the book's `author` field.\n *\n * When searching a collection that contains a reference field without using the `include()` method:\n * - Single reference field: returned items contain only the ID of the referenced item, and not the full referenced items.\n * - Multiple reference field: returned items do not contain the multiple reference field at all.\n *\n * When including a field with multiple references, the following limitations apply:\n * - Only one field with multiple references can be included.\n * - The search returns an error if more than 50 items are returned, regardless of any search limit set using the `limit()` method.\n * - Each returned item can include up to 50 referenced items. If there are more than 50 referenced items, only 50 are returned, and the `partialIncludes` field of the returned `WixDataResult` is `true`.\n *\n * > **Note:** The `include()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection).\n *\n * @public\n * @documentationMaturity preview\n * @param fields - Fields for which to include referenced items.\n * @requiredField fields\n * @returns Refined WixDataSearch object.\n */\n include(...fields: string[]): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified field in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field - Field for which to include referenced items.\n * @param limit - Optional limit for the number of referenced items to include (behavior may vary).\n * @returns Refined WixDataSearch object.\n */\n include(field: string, limit?: number): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified fields in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field1 - First field for which to include referenced items.\n * @param field2 - Second field for which to include referenced items.\n * @param limit - Optional limit for the number of referenced items to include (behavior may vary).\n * @returns Refined WixDataSearch object.\n */\n include(field1: string, field2: string, limit?: number): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified fields in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field1 - First field.\n * @param field2 - Second field.\n * @param field3 - Third field.\n * @param limit - Optional limit.\n * @returns Refined WixDataSearch object.\n */\n include(\n field1: string,\n field2: string,\n field3: string,\n limit?: number\n ): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified fields in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field1 - First field.\n * @param field2 - Second field.\n * @param field3 - Third field.\n * @param field4 - Fourth field.\n * @param limit - Optional limit.\n * @returns Refined WixDataSearch object.\n */\n include(\n field1: string,\n field2: string,\n field3: string,\n field4: string,\n limit?: number\n ): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified fields in a search's results.\n * @public\n * @documentationMaturity preview\n * @param field1 - First field.\n * @param field2 - Second field.\n * @param field3 - Third field.\n * @param field4 - Fourth field.\n * @param field5 - Fifth field.\n * @param limit - Optional limit.\n * @returns Refined WixDataSearch object.\n */\n include(\n field1: string,\n field2: string,\n field3: string,\n field4: string,\n field5: string,\n limit?: number\n ): WixDataSearch\n\n /**\n * Overload for `include()`. Includes referenced items for the specified fields in a search's results.\n * Allows specifying multiple field names and an optional limit.\n * @public\n * @documentationMaturity preview\n * @param fieldNamesAndLimit - Array of field names, optionally followed by a limit number.\n * @returns Refined WixDataSearch object.\n */\n include(...fieldNamesAndLimit: [...string[], number]): WixDataSearch\n}\n"],"mappings":"","ignoreList":[]}
@@ -8,55 +8,52 @@ import { WixDataFilter } from './WixDataFilter';
8
8
  */
9
9
  export interface WixDataSearch {
10
10
  /**
11
- * Specifies the text to search for in the collection.
11
+ * Specifies the text to search in the collection.
12
12
  *
13
13
  * The `expression()` method sets the search query. Search terms are separated by whitespace.
14
14
  *
15
- * @param queryText - Text to search for across all fields in the collection.
16
- * @returns Current WixDataSearch object for method chaining.
15
+ * @param queryText - Text to search in the collection.
16
+ * @returns Refined WixDataSearch object.
17
17
  */
18
18
  expression(queryText: string): WixDataSearch;
19
19
  /**
20
20
  * Enables fuzzy search for approximate text matching.
21
21
  *
22
- * The `fuzzy()` method enables fuzzy search, which allows for approximate matches of the search expression. When fuzzy search is enabled, the search will return results that closely match the search expression even if they don't exactly match.
22
+ * The `fuzzy()` method enables fuzzy search. This allows for approximate matches that closely resemble the search expression even if they don't exactly match.
23
23
  *
24
- * @returns The current WixDataSearch instance for method chaining.
24
+ * @returns Refined WixDataSearch object.
25
25
  */
26
26
  fuzzy(): WixDataSearch;
27
27
  /**
28
- * Sets the search mode to **AND** for expression terms.
28
+ * Sets the search mode to **AND**.
29
29
  *
30
- * When in **AND** mode, all specified search term or filter conditions must be present for an item to be included in the results. For example, with expression "red car" in AND mode, only items that include both "red" and "car" are included in the results.
30
+ * When in **AND** mode, an item must include all specified search terms to be included in the results. For example, the search expression "red car" in **AND** mode only retrieves items that include both "red" and "car".
31
31
  *
32
- * @returns Current WixDataSearch object.
32
+ * @returns Refined WixDataSearch object.
33
33
  */
34
34
  andMode(): WixDataSearch;
35
35
  /**
36
- * Sets the search mode to **OR** for expression terms.
36
+ * Sets the search mode to **OR**.
37
37
  *
38
- * When in **OR** mode, an item is included in the results if it contains any of the specified search terms in the expression.
38
+ * When in **OR** mode, an item must include at least one of the specified search terms to be included in the results. For example, the search expression "red car" in **OR** mode retrieves items that include "red", "car", or both.
39
39
  *
40
- * For example, with expression "red car" in **OR** mode, items that include either "red" or "car" (or both) are included in the results.
41
- *
42
- * @returns Current WixDataSearch object.
40
+ * @returns Refined WixDataSearch object.
43
41
  */
44
42
  orMode(): WixDataSearch;
45
43
  /**
46
44
  * Runs the search operation.
47
45
  *
48
- * The `run()` method searches the collection for the specified expression. It returns a Promise that resolves to a `WixDataResult` that contains the matching items and search metadata.
46
+ * The `run()` method searches the collection for the specified expression. It returns a Promise that resolves to a [`WixDataResult`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-result/introduction) that contains the matching items and search metadata.
49
47
  *
50
- * Search operations are [eventually consistent](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency) and may not reflect recent changes.
51
- * @param options - Configuration options for building the search operation.
52
- * @returns A Promise that resolves to a WixDataResult containing the matching items and search metadata.
48
+ * Search operations are [eventually consistent](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency) and might not reflect recent changes.
49
+ * @param options - Options for building the search operation.
50
+ * @returns Promise that resolves to a [`WixDataResult`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-result/introduction) containing the matching items and search metadata.
53
51
  */
54
52
  run(options?: WixDataReadOptions): Promise<WixDataResult>;
55
53
  /**
56
54
  * Sorts search results by the specified fields in descending order.
57
55
  *
58
- * The `descending()` method refines the search to sort results in descending order of the specified fields.
59
- * If you specify more than one field, `descending()` sorts the results in descending order by each field in the order they are listed.
56
+ * The `descending()` method refines the search to sort results by the specified fields in descending order. If you specify more than one field, `descending()` sorts the results in descending order by each field in the order they are listed.
60
57
  *
61
58
  * You can sort the following types:
62
59
  * - **Number**: Sorts numerically.
@@ -64,64 +61,63 @@ export interface WixDataSearch {
64
61
  * - **String**: Sorts lexicographically, so `"abc"` comes before `"XYZ"`.
65
62
  * - **Reference**: Compares by the ID of the referenced item as a String.
66
63
  *
67
- * If a property contains a number as a String, that value is sorted alphabetically and not numerically.
68
- * Items that do not have a value for the specified sort property are ranked lowest.
64
+ * If a field contains a number as a String, that value is sorted alphabetically and not numerically.
65
+ * Items that do not have a value for the specified sort field are ranked lowest.
69
66
  *
70
67
  * @public
71
68
  * @documentationMaturity preview
72
69
  * @param fields - Fields by which to sort results in descending order.
73
70
  * @requiredField fields
74
- * @returns The current WixDataSearch instance, refined with the specified sort order.
71
+ * @returns Refined WixDataSearch object.
75
72
  */
76
73
  descending(...fields: string[]): WixDataSearch;
77
74
  /**
78
- * @param fields - An array of fields to sort by in descending order.
79
- * @returns The current WixDataSearch instance, refined with the specified sort order.
75
+ * @param fields - Array of fields by which to sort results in descending order.
76
+ * @returns Refined WixDataSearch object.
80
77
  */
81
78
  descending(fields: string[]): WixDataSearch;
82
79
  /**
83
- * @param fields - Fields used in the sort.
84
- * @returns The current WixDataSearch instance, refined with the specified sort order.
80
+ * @param fields - Fields by which to sort results in descending order.
81
+ * @returns Refined WixDataSearch object.
85
82
  */
86
83
  descending(...fields: any): WixDataSearch;
87
84
  /**
88
- * Sorts search results by the specified fields in ascending order.
85
+ * Sorts search results in ascending order by the specified fields.
89
86
  *
90
- * The `ascending()` method refines the search to sort results in ascending order of the specified fields.
91
- * If you specify more than one field, `ascending()` sorts the results in ascending order by each field in the order they are listed.
87
+ * The `ascending()` method refines the search to sort results by the specified fields in ascending order. If you specify more than one field, `ascending()` sorts the results in ascending order by each field in the order they are listed.
92
88
  *
93
89
  * You can sort the following types:
94
90
  * - **Number**: Sorts numerically.
95
91
  * - **Date**: Sorts by date and time.
96
- * - **String**: Sorts lexicographically, so `"abc"` comes after `"XYZ"`.
92
+ * - **String**: Sorts lexicographically, so `"abc"` comes before `"XYZ"`.
97
93
  * - **Reference**: Compares by the ID of the referenced item as a String.
98
94
  *
99
- * If a property contains a number as a String, that value is sorted alphabetically and not numerically.
100
- * Items that do not have a value for the specified sort property are ranked lowest.
95
+ * If a field contains a number as a String, that value is sorted alphabetically and not numerically.
96
+ * Items that do not have a value for the specified sort field are ranked lowest.
101
97
  *
102
98
  * @public
103
99
  * @documentationMaturity preview
104
100
  * @param fields - Fields by which to sort results in ascending order.
105
101
  * @requiredField fields
106
- * @returns The current WixDataSearch instance, refined with the specified sort order.
102
+ * @returns Refined WixDataSearch object.
107
103
  */
108
104
  ascending(...fields: string[]): WixDataSearch;
109
105
  /**
110
- * @param fields - An array of fields to sort by in ascending order.
111
- * @returns The current WixDataSearch instance, refined with the specified sort order.
106
+ * @param fields - Array of fields by which to sort results in ascending order.
107
+ * @returns Refined WixDataSearch object.
112
108
  */
113
109
  ascending(fields: string[]): WixDataSearch;
114
110
  /**
115
- * @param fields - Fields used in the sort.
116
- * @returns The current WixDataSearch instance, refined with the specified sort order.
111
+ * @param fields - Fields by which to sort results in ascending order.
112
+ * @returns Refined WixDataSearch object.
117
113
  */
118
114
  ascending(...fields: any): WixDataSearch;
119
115
  /**
120
116
  * Refines a search to match items whose specified field value equals the specified value.
121
117
  *
122
- * The `eq()` method refines the search to only match items where the value of the specified field equals the specified `value`. The method only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.
118
+ * The `eq()` method refines the search to only match items where the value of the specified field equals the specified `value`. It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.
123
119
  *
124
- * Matching strings with `eq()` is case-sensitive, so `"text"` is not equal to `"Text"`.
120
+ * Matching strings with `eq()` is case-sensitive, so `"text"` is not considered equal to `"Text"`.
125
121
  *
126
122
  * If the field contains an array, `eq()` matches the item if at least one array element equals the specified `value`.
127
123
  *
@@ -131,52 +127,44 @@ export interface WixDataSearch {
131
127
  * @requiredField field
132
128
  * @param value - Value to match.
133
129
  * @requiredField value
134
- * @returns Current WixDataSearch object, refined with the equality filter.
130
+ * @returns Refined WixDataSearch object.
135
131
  */
136
132
  eq(field: string, value: any): WixDataSearch;
137
133
  /**
138
- * Refines a search to match items whose specified property value does not equal the specified value.
134
+ * Refines a search to match items whose specified field value does not equal the specified value.
139
135
  *
140
- * The `ne()` method refines this search to only
141
- * match items where the value of the specified property does not equal the specified `value`.
136
+ * The `ne()` method refines the search to only match items where the value of the specified field does not equal the specified `value`.
142
137
  *
143
- * It only matches values of the same type. For example, a number value stored
144
- * as a String type is considered not equal to the same number stored as a Number type.
138
+ * It only matches values of the same type. For example, a number value stored as a String type is considered not equal to the same number stored as a Number type.
145
139
  *
146
- * Matching strings with `ne()` is case sensitive, so `"text"` is not equal to `"Text"`.
140
+ * Matching strings with `ne()` is case-sensitive, so `"text"` is not equal to `"Text"`.
147
141
  *
148
- * If the value of the `field` property is an array, `ne()` includes items
149
- * in which none of the elements of the array match the specified `value`.
142
+ * If the value of `field` is an array, `ne()` includes items in which none of the elements of the array match the specified `value`.
150
143
  * @public
151
144
  * @documentationMaturity preview
152
145
  * @param field - Field whose value is compared with `value`.
153
146
  * @requiredField field
154
147
  * @param value - Value to not match.
155
148
  * @requiredField value
156
- * @returns The current WixDataSearch instance, refined with the inequality filter.
149
+ * @returns Refined WixDataSearch object.
157
150
  */
158
151
  ne(field: string, value: any): WixDataSearch;
159
152
  /**
160
- * Refines a search to match items whose specified property value is greater than or equal to the specified
161
- * value.
153
+ * Refines a search to match items whose specified field value is greater than or equal to the specified value.
162
154
  *
163
- * The `ge()` method refines this search to only
164
- * match items where the value of the specified property is greater than or
165
- * equal to the specified `value`.
155
+ * The `ge()` method refines the search to only match items where the value of the specified field is greater than or equal to the specified `value`.
166
156
  *
167
157
  * It only matches values of the same type. For example, a number value stored
168
158
  * as a String type does not match the same number stored as a Number type.
169
159
  *
170
- * If a property contains a number as a String, that value is compared
160
+ * If a field contains a number as a String, that value is compared
171
161
  * alphabetically and not numerically. Items that do not have a value for the
172
- * specified property are ranked lowest.
162
+ * specified field are ranked lowest.
173
163
  *
174
- * The following types of properties can be compared:
164
+ * The following types of fields can be compared:
175
165
  * - Number: Compares numerically.
176
166
  * - Date: Compares JavaScript Date objects.
177
- * - String: Compares lexicographically,
178
- * so `"abc"` is greater than or equal to `"ABC"` (because of the greater than),
179
- * but `"ABC"` is not greater than or equal to `"abc"`.
167
+ * - String: Compares lexicographically, so `"abc"` is greater than or equal to `"ABC"`, but `"ABC"` is not greater than or equal to `"abc"`.
180
168
  * - Reference: Compares by the ID of the referenced item as a String.
181
169
  * @public
182
170
  * @documentationMaturity preview
@@ -184,23 +172,19 @@ export interface WixDataSearch {
184
172
  * @requiredField field
185
173
  * @param value - Value to compare against.
186
174
  * @requiredField value
187
- * @returns The current WixDataSearch instance, refined with the 'greater than or equal' filter.
175
+ * @returns Refined WixDataSearch object.
188
176
  */
189
177
  ge(field: string, value: string | number | Date): WixDataSearch;
190
178
  /**
191
- * Refines a search to match items whose specified property value is greater than the specified value.
179
+ * Refines a search to match items whose specified field value is greater than the specified value.
192
180
  *
193
- * The `gt()` method refines this search to only match
194
- * items where the value of the specified property is greater than the specified `value`.
181
+ * The `gt()` method refines the search to only match items where the value of the specified field is greater than the specified `value`.
195
182
  *
196
- * It only matches values of the same type. For example, a number value stored
197
- * as a String type does not match the same number stored as a Number type.
183
+ * It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.
198
184
  *
199
- * If a property contains a number as a String, that value is compared
200
- * alphabetically and not numerically. Items that do not have a value for the
201
- * specified property are ranked lowest.
185
+ * If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest.
202
186
  *
203
- * The following types of properties can be compared:
187
+ * The following types of fields can be compared:
204
188
  * - Number: Compares numerically.
205
189
  * - Date: Compares JavaScript Date objects.
206
190
  * - String: Compares lexicographically, so `"text"` is greater than `"Text"`.
@@ -211,54 +195,42 @@ export interface WixDataSearch {
211
195
  * @requiredField field
212
196
  * @param value - Value to compare against.
213
197
  * @requiredField value
214
- * @returns The current WixDataSearch instance, refined with the 'greater than' filter.
198
+ * @returns Refined WixDataSearch object.
215
199
  */
216
200
  gt(field: string, value: string | number | Date): WixDataSearch;
217
201
  /**
218
- * Refines a search to match items whose specified property value is less than or equal to the specified
219
- * value.
202
+ * Refines a search to match items whose specified field value is less than or equal to the specified value.
220
203
  *
221
- * The `le()` method refines this search to only match
222
- * items where the value of the specified property is less than or equal to the
223
- * specified `value`.
204
+ * The `le()` method refines the search to only match items where the value of the specified field is less than or equal to the specified `value`.
224
205
  *
225
- * It only matches values of the same type. For example, a number value stored
226
- * as a String type does not match the same number stored as a Number type.
206
+ * It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.
227
207
  *
228
- * If a property contains a number as a String, that value is compared
229
- * alphabetically and not numerically. Items that do not have a value for the
230
- * specified property are ranked lowest.
208
+ * If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest.
231
209
  *
232
- * The following types of properties can be compared:
210
+ * The following types of fields can be compared:
233
211
  * - Number: Compares numerically.
234
212
  * - Date: Compares JavaScript Date objects.
235
- * - String: Compares lexicographically,
236
- * so `"ABC"` is less than or equal to `"abc"` (because of the less than),
237
- * but `"abc"` is not less than or equal to `"ABC"`.
213
+ * - String: Compares lexicographically, so `"ABC"` is less than or equal to `"abc"`, but `"abc"` is not less than or equal to `"ABC"`.
238
214
  * - Reference: Compares by the ID of the referenced item as a String.
239
215
  * @public
240
216
  * @documentationMaturity preview
241
217
  * @param field - Field whose value is compared with `value`.
242
218
  * @requiredField field
243
- * @param value - Value to compare against.
219
+ * @param value - Value to compare with.
244
220
  * @requiredField value
245
- * @returns The current WixDataSearch instance, refined with the 'less than or equal' filter.
221
+ * @returns Refined WixDataSearch object.
246
222
  */
247
223
  le(field: string, value: string | number | Date): WixDataSearch;
248
224
  /**
249
- * Refines a search to match items whose specified property value is less than the specified value.
225
+ * Refines a search to match items whose specified field value is less than the specified value.
250
226
  *
251
- * The `lt()` method refines this search to only match
252
- * items where the value of the specified property is less than the specified `value`.
227
+ * The `lt()` method refines the search to only match items where the value of the specified field is less than the specified `value`.
253
228
  *
254
- * It only matches values of the same type. For example, a number value stored
255
- * as a String type does not match the same number stored as a Number type.
229
+ * It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.
256
230
  *
257
- * If a property contains a number as a String, that value is compared
258
- * alphabetically and not numerically. Items that do not have a value for the
259
- * specified property are ranked lowest.
231
+ * If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest.
260
232
  *
261
- * The following types of properties can be compared:
233
+ * The following types of fields can be compared:
262
234
  * - Number: Compares numerically.
263
235
  * - Date: Compares JavaScript Date objects.
264
236
  * - String: Compares lexicographically, so `"Text"` is less than `"text"`.
@@ -267,59 +239,50 @@ export interface WixDataSearch {
267
239
  * @documentationMaturity preview
268
240
  * @param field - Field whose value is compared with `value`.
269
241
  * @requiredField field
270
- * @param value - Value to compare against.
242
+ * @param value - Value to compare with.
271
243
  * @requiredField value
272
- * @returns The current WixDataSearch instance, refined with the 'less than' filter.
244
+ * @returns Refined WixDataSearch object.
273
245
  */
274
246
  lt(field: string, value: string | number | Date): WixDataSearch;
275
247
  /**
276
- * Refines a search to match items whose specified property has any value (is not null or undefined).
248
+ * Refines a search to match items whose specified field has a value that isn't `null` or `undefined`.
277
249
  *
278
- * The `isNotEmpty()` method refines this search to only match items where the
279
- * value of the specified property is not `null` or `undefined`.
250
+ * The `isNotEmpty()` method refines the search to only match items where the value of the specified field is not `null` or `undefined`.
280
251
  *
281
- * If the property contains any value at all for a given item, including the
282
- * empty string or an invalid value, that item will match the search filter.
252
+ * If the field contains any value at all for a given item, including an empty string or an invalid value, that item matches the search filter.
283
253
  * @public
284
254
  * @documentationMaturity preview
285
255
  * @param field - Field in which to check for a non-empty value.
286
256
  * @requiredField field
287
- * @returns The current WixDataSearch instance, refined with the 'is not empty' filter.
257
+ * @returns Refined WixDataSearch object.
288
258
  */
289
259
  isNotEmpty(field: string): WixDataSearch;
290
260
  /**
291
- * Refines a search to match items whose specified property does not exist or does not have any value (is null or undefined).
261
+ * Refines a search to match items whose specified field does not exist or does not have any value (is null or undefined).
292
262
  *
293
- * The `isEmpty()` method refines this search to only match items where the
294
- * value of the specified property is `null` or `undefined` or the property does
295
- * not exist.
263
+ * The `isEmpty()` method refines the search to only match items where the specified field does not exist or where its value is `null` or `undefined`.
296
264
  *
297
- * If the property contains any value at all for a given item, including the
298
- * empty string or an invalid value, that item will not match the search filter.
265
+ * If the field contains any value at all for a given item, including an empty string or an invalid value, that item does not match the search filter.
299
266
  * @public
300
267
  * @documentationMaturity preview
301
268
  * @param field - Field in which to check for an empty or non-existent value.
302
269
  * @requiredField field
303
- * @returns The current WixDataSearch instance, refined with the 'is empty' filter.
270
+ * @returns Refined WixDataSearch object.
304
271
  */
305
272
  isEmpty(field: string): WixDataSearch;
306
273
  /**
307
- * Refines a search to match items whose specified property value starts with a specified string.
274
+ * Refines a search to match items whose specified field value starts with a specified string.
308
275
  *
309
- * The `startsWith()` method refines this search to
310
- * only match items where the value of the specified property starts with the
311
- * defined `string`. Matching with `startsWith()` is case-sensitive, so `"TEXT"` does not start
312
- * with `"tex"`.
276
+ * The `startsWith()` method refines the search to only match items where the value of the specified field starts with the specified `string`. Matching with `startsWith()` is case-sensitive, so searching for `"Sun"` does not match an item that contains the text `"sunshine"`.
313
277
  *
314
- * You can only use `startsWith()` with a property whose value is a String or Reference.
315
- * When using a Reference, `startsWith()` matches by the ID of the referenced item as Strings.
278
+ * You can only use `startsWith()` with a field whose value is a String or Reference. When using a Reference, `startsWith()` matches by the ID of the referenced item as a String.
316
279
  * @public
317
280
  * @documentationMaturity preview
318
281
  * @param field - Field whose value is compared with the `value` parameter.
319
282
  * @requiredField field
320
- * @param value - String to look for at the beginning of the specified property value.
283
+ * @param value - String to look for at the beginning of the specified field value.
321
284
  * @requiredField value
322
- * @returns The current `WixDataSearch` instance, refined with the 'starts with' filter.
285
+ * @returns Refined WixDataSearch object.
323
286
  */
324
287
  startsWith(field: string, value: string): WixDataSearch;
325
288
  /**
@@ -333,104 +296,112 @@ export interface WixDataSearch {
333
296
  *
334
297
  * If the specified field contains multiple references, pass item IDs as the values. `hasSome()` matches if any of the multiple references match any of the specified ID values.
335
298
  *
336
- * You can specify multiple values to match by providing an array of String, Number, or Date types as the `value` parameters.
299
+ * You can specify multiple values to match by providing an array of String, Number, or Date types as the `values` parameters.
337
300
  * @public
338
301
  * @documentationMaturity preview
339
- * @param field - Field whose value is compared with `value`.
302
+ * @param field - Field whose value is compared with `values`.
340
303
  * @requiredField field
341
304
  * @param values - Values to match.
342
305
  * @requiredField values
343
- * @returns The current WixDataSearch instance, refined with the 'has some' filter.
306
+ * @returns Refined WixDataSearch object.
344
307
  */
345
308
  hasSome(field: string, ...values: string[] | number[] | Date[]): WixDataSearch;
346
309
  /**
347
- * Overload for `hasSome()`. Refines a search to match items whose specified property value equals any of the specified values.
310
+ * Overload for `hasSome()`. Refines a search to match items whose specified field value equals any of the specified values.
348
311
  * @public
349
312
  * @documentationMaturity preview
350
313
  * @param field - Field whose value is compared with the provided values.
351
314
  * @requiredField field
352
315
  * @param values - An array of values to match.
353
316
  * @requiredField values
354
- * @returns The current WixDataSearch instance, refined with the 'has some' filter.
317
+ * @returns Refined WixDataSearch object.
355
318
  */
356
319
  hasSome(field: string, values: string[] | number[] | Date[]): WixDataSearch;
357
320
  /**
358
- * Refines a search to match items whose specified property values equals all of the specified `value`
359
- * parameters.
321
+ * Refines a search to match items whose specified field value equals all of the specified values.
360
322
  *
361
- * The `hasAll()` method refines this search to
362
- * only match items where the value of the specified property equals all of
363
- * the specified values.
323
+ * The `hasAll()` method refines the search to only match items where the value of the specified field equals all of the specified values.
364
324
  *
365
- * Matching strings with `hasAll()` is case sensitive, so `"text"` is not equal to `"Text"`.
325
+ * Matching strings with `hasAll()` is case-sensitive, so `"text"` is not equal to `"Text"`.
366
326
  *
367
- * If the value of the specified property is an array, `hasAll()` will match
368
- * if there is a match in the elements of that array for all of the specified
369
- * values.
327
+ * If the value of the specified field is an array, `hasAll()` matches if there is a match in the elements of that array for all of the specified values.
370
328
  *
371
- * You can specify a list of values to match by providing an array of
372
- * String, Number, or Date types as the `value` parameters.
329
+ * You can specify a list of values to match by providing an array of String, Number, or Date types as the `values` parameters.
373
330
  * @public
374
331
  * @documentationMaturity preview
375
- * @param field - Field whose value is compared with `value`.
332
+ * @param field - Field whose value is compared with `values`.
376
333
  * @requiredField field
377
334
  * @param values - Values to match. All specified values must be present.
378
335
  * @requiredField values
379
- * @returns The current WixDataSearch instance, refined with the 'has all' filter.
336
+ * @returns Refined WixDataSearch object.
380
337
  */
381
338
  hasAll(field: string, ...values: string[] | number[] | Date[]): WixDataSearch;
382
339
  /**
383
- * Overload for `hasAll()`. Refines a search to match items whose specified property values equals all of the specified values.
340
+ * Overload for `hasAll()`. Refines a search to match items whose specified field values equals all of the specified values.
384
341
  * @public
385
342
  * @documentationMaturity preview
386
343
  * @param field - Field whose value is compared with the provided values.
387
344
  * @requiredField field
388
- * @param values - An array of values to match. All values in the array must be present.
345
+ * @param values - Array of values to match. All elements in the array must be present.
389
346
  * @requiredField values
390
- * @returns The current WixDataSearch instance, refined with the 'has all' filter.
347
+ * @returns Refined WixDataSearch object.
391
348
  */
392
349
  hasAll(field: string, values: string[] | number[] | Date[]): WixDataSearch;
393
350
  /**
394
351
  * Adds an `or` condition to the search filter.
395
352
  *
396
- * The `or()` method adds an inclusive `or` condition to this search filter. The search returns all the items that match the filter as defined up to the `or()` method, the items that match the filter passed to the `or()` method, and the items that match both.
353
+ * The `or()` method adds an inclusive `or` condition to the search filter. The search returns all the items that match the filter as defined up to the `or()` method, the items that match the filter passed to the `or()` method, and the items that match both.
397
354
  *
398
- * > **Note**: The `or()` method is designed to work with 2 or more filters. Used on its own, it might produce unexpected results.
355
+ * > **Note**: The `or()` method requires 2 or more filters. Used on its own, it might produce unexpected results.
399
356
  * @public
400
357
  * @documentationMaturity preview
401
358
  * @param filter - Filter to add to the initial filter as an `or` condition.
402
359
  * @requiredField filter
403
- * @returns The current WixDataSearch instance, refined with the 'or' condition.
360
+ * @returns Refined WixDataSearch object.
404
361
  */
405
362
  or(filter: WixDataFilter): WixDataSearch;
406
363
  /**
407
364
  * Adds an `and` condition to the search filter.
408
365
  *
409
- * The `and()` method adds an `and` condition to the search filter. A search with an `and` returns all the items that match the filter as defined up to the `and()` method, as well as the filter passed to the `and()` method.
366
+ * The `and()` method adds an `and` condition to the search filter. A search with an `and` returns all the items that match both the filter as defined up to the `and()` method, and the filter passed to the `and()` method.
410
367
  *
411
- * When chaining multiple filter methods to a search, an `and` condition is often assumed by default. For example, this search returns results whose status is active **and** age is greater than 25:
368
+ * When chaining multiple filter methods to a search, an `and` condition is often assumed by default. For example, the search returns results whose status is active **and** age is greater than 25:
412
369
  *
413
370
  * ```javascript
414
- * items.search("myCollection").expression("some text").eq("status", "active").gt("age", 25);
371
+ * items
372
+ * .search("myCollection")
373
+ * .expression("some text")
374
+ * .eq("status", "active")
375
+ * .gt("age", 25);
415
376
  * ```
416
377
  *
417
- * The `and()` method is needed when performing compound filters. For example, the final search in this set of operations returns results whose status is either pending or rejected **and** age is either less than 25 or greater than 65:
378
+ * The `and()` method is needed when using compound filters. For example, the final search in this set of operations returns results whose status is either pending or rejected **and** age is either less than 25 or greater than 65:
418
379
  *
419
380
  * ```javascript
420
- * let statusFilter = items.filter().eq("status", "pending").or(items.filter().eq("status", "rejected"));
421
- *
422
- * let ageFilter = items.filter().lt("age", 25).or(items.filter().gt("age", 65));
423
- *
424
- * let finalSearch = items.search("myCollection").expression("some text").and(statusFilter).and(ageFilter);
381
+ * let statusFilter = items
382
+ * .filter()
383
+ * .eq("status", "pending")
384
+ * .or(items.filter().eq("status", "rejected"));
385
+ *
386
+ * let ageFilter = items
387
+ * .filter()
388
+ * .lt("age", 25)
389
+ * .or(items.filter().gt("age", 65));
390
+ *
391
+ * let finalSearch = items
392
+ * .search("myCollection")
393
+ * .expression("some text")
394
+ * .and(statusFilter)
395
+ * .and(ageFilter);
425
396
  * ```
426
397
  *
427
- * > **Note**: The `and()` method is designed to work with 2 or more filters.
398
+ * > **Note**: The `and()` method requires 2 or more filters.
428
399
  *
429
400
  * @public
430
401
  * @documentationMaturity preview
431
402
  * @param filter - Filter to add to the initial search filter as an `and` condition.
432
403
  * @requiredField filter
433
- * @returns The current WixDataSearch instance, refined with the 'and' condition.
404
+ * @returns Refined WixDataSearch object.
434
405
  */
435
406
  and(filter: WixDataFilter): WixDataSearch;
436
407
  /**
@@ -444,22 +415,19 @@ export interface WixDataSearch {
444
415
  * @documentationMaturity preview
445
416
  * @param filter - Filter to add to the initial filter as a `not` condition.
446
417
  * @requiredField filter
447
- * @returns The current WixDataSearch instance, refined with the 'not' condition.
418
+ * @returns Refined WixDataSearch object.
448
419
  */
449
420
  not(filter: WixDataFilter): WixDataSearch;
450
421
  /**
451
- * Refines a search to match items whose specified property value is within a specified range.
422
+ * Refines a search to match items whose specified field value is within a specified range.
452
423
  *
453
- * The `between()` method refines this search to only match items where the value of the specified property is
454
- * greater than or equal to `rangeStart` and less than `rangeEnd`.
424
+ * The `between()` method refines the search to only match items where the value of the specified field is greater than or equal to `rangeStart` and less than `rangeEnd`.
455
425
  *
456
- * It only matches values of the same type. For example, a number value stored as a String type does not match the
457
- * same number stored as a Number type.
426
+ * It only matches values of the same type. For example, a number value stored as a String type does not match the same number stored as a Number type.
458
427
  *
459
- * If a property contains a number as a String, that value is compared alphabetically and not numerically. Items
460
- * that do not have a value for the specified property are ranked lowest.
428
+ * If a field contains a number as a String, that value is compared alphabetically and not numerically. Items that do not have a value for the specified field are ranked lowest.
461
429
  *
462
- * The following types of properties can be compared:
430
+ * The following types of fields can be compared:
463
431
  * - Number: Compares numerically.
464
432
  * - Date: Compares JavaScript Date objects.
465
433
  * - String: Compares lexicographically, so
@@ -467,40 +435,37 @@ export interface WixDataSearch {
467
435
  * - `"A"`, `"M"`, `"Z"`, and `"a"` are between `"A"` and `"z"`, but `"z"` is not.
468
436
  * @public
469
437
  * @documentationMaturity preview
470
- * @param field - Field whose value is compared with rangeStart and rangeEnd.
438
+ * @param field - Field whose value is compared with `rangeStart` and `rangeEnd`.
471
439
  * @requiredField field
472
440
  * @param rangeStart - Starting value of the range to match (inclusive).
473
441
  * @requiredField rangeStart
474
442
  * @param rangeEnd - Ending value of the range to match (exclusive).
475
443
  * @requiredField rangeEnd
476
- * @returns The current WixDataSearch instance, refined with the 'between' filter.
444
+ * @returns Refined WixDataSearch object.
477
445
  */
478
446
  between(field: string, rangeStart: string | number | Date, rangeEnd: string | number | Date): WixDataSearch;
479
447
  /**
480
- * Lists the fields to return in a search's results.
448
+ * Lists the fields to return in the search results.
481
449
  *
482
450
  * The `fields()` method specifies which fields to return in the search results.
483
451
  *
484
- * You can use `include()` in conjunction with `fields()` to get referenced items.
452
+ * You can use `include()` together with `fields()` to get referenced items.
485
453
  *
486
- * When `fields()` receives an empty or invalid property, the search behaves as follows:
454
+ * When `fields()` receives an empty or an invalid field, the search behaves as follows:
487
455
  * - When no fields are specified, the search returns all fields.
488
456
  * - When multiple fields are specified but some are invalid, invalid fields are ignored and valid fields are returned.
489
457
  * - When only invalid fields are specified, only the default `_id` field is returned.
490
458
  * @public
491
459
  * @documentationMaturity preview
492
- * @param fields - Properties to return.
460
+ * @param fields - Fields to return.
493
461
  * @requiredField fields
494
- * @returns The current `WixDataSearch` instance, configured to return specified fields.
462
+ * @returns Refined WixDataSearch object.
495
463
  */
496
464
  fields(...fields: string[]): WixDataSearch;
497
465
  /**
498
466
  * Limits the number of items the search returns.
499
467
  *
500
- * The `limit()` method defines the number of results a search returns in each
501
- * page. Only one page of results is retrieved at a time. The `next()`
502
- * and `prev()` methods of the `WixDataResult` object are used to
503
- * navigate the pages of a search result.
468
+ * The `limit()` method defines the number of results a search operation returns in each page. Only one page of results is retrieved at a time. The `next()` and `prev()` methods of the [`WixDataResult`](https://dev.wix.com/docs/sdk/backend-modules/data/items/wix-data-result/introduction) object are used to navigate the pages of a search result.
504
469
  *
505
470
  * By default, `limit` is set to `100`.
506
471
  *
@@ -510,54 +475,39 @@ export interface WixDataSearch {
510
475
  * @documentationMaturity preview
511
476
  * @param limitNumber - Number of items to return, which is also the `pageSize` of the results object.
512
477
  * @requiredField limitNumber
513
- * @returns The current `WixDataSearch` instance, refined with the specified limit.
478
+ * @returns Refined WixDataSearch object.
514
479
  */
515
480
  limit(limitNumber: number): WixDataSearch;
516
481
  /**
517
482
  * Sets the number of items to skip before returning search results.
518
483
  *
519
- * The `skip()` method defines the number of results to skip in the search
520
- * results before returning new search results.
484
+ * The `skip()` method defines the number of results to skip in the search results before returning new search results.
521
485
  *
522
- * For example, if your search matches 50 items, but
523
- * you set `skip` to 10, the results returned will skip the first 10 items
524
- * that match and return the 11th through 50th items.
486
+ * For example, if your search matches 50 items, but you set `skip` to 10, the results returned skips the first 10 items that match and return the 11th through 50th items.
525
487
  *
526
- * By default, `skip` is set to 0.
488
+ * By default, `skip()` is set to 0.
527
489
  * @public
528
490
  * @documentationMaturity preview
529
- * @param skipCount - Number of items to skip in the search results before returning the results.
491
+ * @param skipCount - Number of items to skip before returning the results.
530
492
  * @requiredField skipCount
531
- * @returns The current `WixDataSearch` instance, refined with the specified skip count.
493
+ * @returns Refined WixDataSearch object.
532
494
  */
533
495
  skip(skipCount: number): WixDataSearch;
534
496
  /**
535
- * Includes referenced items for the specified properties in a search's results.
536
- *
537
- * The `include()` method refines a search so that the items returned in the
538
- * search's results include the full referenced items for the specified properties.
539
- *
540
- * For example, suppose you have a **books** collection with an **author**
541
- * field that references an **authors** collection. Searching the **books**
542
- * collection with an `include("author")` returns the relevant book items
543
- * and each item will include the full referenced author item in the book's
544
- * `author` property.
545
- *
546
- * When searching a collection that contains a reference field without using the
547
- * `include()` method:
548
- * - Single reference field: returned items contain only the ID of the
549
- * referenced item, and not the full referenced items.
550
- * - Multiple reference field: returned items do not contain the multiple
551
- * reference field at all.
552
- *
553
- * When including a property with multiple references, the following limitations
554
- * apply:
555
- * - Only one property with multiple references can be included.
556
- * - The search will return an error if more than 50 items are returned, regardless
557
- * of any search limit set using the `limit()` method.
558
- * - Each returned item can include up to 50 referenced items. If there are more
559
- * than 50 referenced items, only 50 are returned when the search is run
560
- * and the `partialIncludes` property of the returned `WixDataResult` is `true`.
497
+ * Includes referenced items for the specified fields.
498
+ *
499
+ * The `include()` method refines a search so that the items returned in the search results include the full referenced items for the specified fields.
500
+ *
501
+ * For example, suppose you have a **books** collection with an **author** field that references an **authors** collection. Searching the **books** collection with an `include("author")` returns the relevant book items, and each item includes the full referenced author item in the book's `author` field.
502
+ *
503
+ * When searching a collection that contains a reference field without using the `include()` method:
504
+ * - Single reference field: returned items contain only the ID of the referenced item, and not the full referenced items.
505
+ * - Multiple reference field: returned items do not contain the multiple reference field at all.
506
+ *
507
+ * When including a field with multiple references, the following limitations apply:
508
+ * - Only one field with multiple references can be included.
509
+ * - The search returns an error if more than 50 items are returned, regardless of any search limit set using the `limit()` method.
510
+ * - Each returned item can include up to 50 referenced items. If there are more than 50 referenced items, only 50 are returned, and the `partialIncludes` field of the returned `WixDataResult` is `true`.
561
511
  *
562
512
  * > **Note:** The `include()` method is not supported for [single-item collections](https://support.wix.com/en/article/cms-adding-and-setting-up-a-single-item-collection).
563
513
  *
@@ -565,41 +515,41 @@ export interface WixDataSearch {
565
515
  * @documentationMaturity preview
566
516
  * @param fields - Fields for which to include referenced items.
567
517
  * @requiredField fields
568
- * @returns The current `WixDataSearch` instance, configured to include referenced items.
518
+ * @returns Refined WixDataSearch object.
569
519
  */
570
520
  include(...fields: string[]): WixDataSearch;
571
521
  /**
572
- * Overload for `include()`. Includes referenced items for the specified property in a search's results.
522
+ * Overload for `include()`. Includes referenced items for the specified field in a search's results.
573
523
  * @public
574
524
  * @documentationMaturity preview
575
525
  * @param field - Field for which to include referenced items.
576
526
  * @param limit - Optional limit for the number of referenced items to include (behavior may vary).
577
- * @returns The current `WixDataSearch` instance.
527
+ * @returns Refined WixDataSearch object.
578
528
  */
579
529
  include(field: string, limit?: number): WixDataSearch;
580
530
  /**
581
- * Overload for `include()`. Includes referenced items for the specified properties in a search's results.
531
+ * Overload for `include()`. Includes referenced items for the specified fields in a search's results.
582
532
  * @public
583
533
  * @documentationMaturity preview
584
534
  * @param field1 - First field for which to include referenced items.
585
535
  * @param field2 - Second field for which to include referenced items.
586
536
  * @param limit - Optional limit for the number of referenced items to include (behavior may vary).
587
- * @returns The current `WixDataSearch` instance.
537
+ * @returns Refined WixDataSearch object.
588
538
  */
589
539
  include(field1: string, field2: string, limit?: number): WixDataSearch;
590
540
  /**
591
- * Overload for `include()`. Includes referenced items for the specified properties in a search's results.
541
+ * Overload for `include()`. Includes referenced items for the specified fields in a search's results.
592
542
  * @public
593
543
  * @documentationMaturity preview
594
544
  * @param field1 - First field.
595
545
  * @param field2 - Second field.
596
546
  * @param field3 - Third field.
597
547
  * @param limit - Optional limit.
598
- * @returns The current `WixDataSearch` instance.
548
+ * @returns Refined WixDataSearch object.
599
549
  */
600
550
  include(field1: string, field2: string, field3: string, limit?: number): WixDataSearch;
601
551
  /**
602
- * Overload for `include()`. Includes referenced items for the specified properties in a search's results.
552
+ * Overload for `include()`. Includes referenced items for the specified fields in a search's results.
603
553
  * @public
604
554
  * @documentationMaturity preview
605
555
  * @param field1 - First field.
@@ -607,11 +557,11 @@ export interface WixDataSearch {
607
557
  * @param field3 - Third field.
608
558
  * @param field4 - Fourth field.
609
559
  * @param limit - Optional limit.
610
- * @returns The current `WixDataSearch` instance.
560
+ * @returns Refined WixDataSearch object.
611
561
  */
612
562
  include(field1: string, field2: string, field3: string, field4: string, limit?: number): WixDataSearch;
613
563
  /**
614
- * Overload for `include()`. Includes referenced items for the specified properties in a search's results.
564
+ * Overload for `include()`. Includes referenced items for the specified fields in a search's results.
615
565
  * @public
616
566
  * @documentationMaturity preview
617
567
  * @param field1 - First field.
@@ -620,16 +570,16 @@ export interface WixDataSearch {
620
570
  * @param field4 - Fourth field.
621
571
  * @param field5 - Fifth field.
622
572
  * @param limit - Optional limit.
623
- * @returns The current `WixDataSearch` instance.
573
+ * @returns Refined WixDataSearch object.
624
574
  */
625
575
  include(field1: string, field2: string, field3: string, field4: string, field5: string, limit?: number): WixDataSearch;
626
576
  /**
627
- * Overload for `include()`. Includes referenced items for the specified properties in a search's results.
577
+ * Overload for `include()`. Includes referenced items for the specified fields in a search's results.
628
578
  * Allows specifying multiple field names and an optional limit.
629
579
  * @public
630
580
  * @documentationMaturity preview
631
- * @param fieldNamesAndLimit - An array of field names, optionally followed by a limit number.
632
- * @returns The current `WixDataSearch` instance.
581
+ * @param fieldNamesAndLimit - Array of field names, optionally followed by a limit number.
582
+ * @returns Refined WixDataSearch object.
633
583
  */
634
584
  include(...fieldNamesAndLimit: [...string[], number]): WixDataSearch;
635
585
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WixDataSearch.d.ts","sourceRoot":"","sources":["../../../src/api/WixDataSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CA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@@
1
1
  {
2
2
  "name": "@wix/wix-data-items-common",
3
- "version": "1.0.161",
3
+ "version": "1.0.163",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Rimvydas Gimbutas",
@@ -85,5 +85,5 @@
85
85
  "wallaby": {
86
86
  "autoDetect": true
87
87
  },
88
- "falconPackageHash": "a8490e8b8489b5c728f028eb6b7905c3e769d89b2e1c713958e8d6e0"
88
+ "falconPackageHash": "5f099bdffd83c802edcac4e35295df68c219fbf19eb511b6a3a1db93"
89
89
  }