{"version":3,"sources":["../../../src/search-platformized-v1-site-document-wix-site-search.universal.ts","../../../src/search-platformized-v1-site-document-wix-site-search.http.ts","../../../src/search-platformized-v1-site-document-wix-site-search.public.ts","../../../src/search-platformized-v1-site-document-wix-site-search.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n  HttpClient,\n  Search as SearchSdkType,\n  NonNullablePaths,\n  SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixSearchPlatformizedV1SiteDocument from './search-platformized-v1-site-document-wix-site-search.http.js';\nimport { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils';\n\nexport interface SiteDocument {\n  /**\n   * Result ID.\n   * @readonly\n   * @maxLength 120\n   */\n  _id?: string;\n  /** The document payload. */\n  data?: Record<string, any> | null;\n}\n\nexport interface SearchRequest {\n  /** Search query and aggregation information. */\n  search: Search;\n  /** Document type to search in. */\n  documentType: DocumentTypeWithLiterals;\n  /**\n   * Language to search in.\n   * @format LANGUAGE\n   */\n  language?: string | null;\n}\n\nexport interface Search extends SearchPagingMethodOneOf {\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   * @maxSize 10\n   */\n  sort?: Sorting[];\n  /**\n   * A search method for grouping data into various categories (facets) and providing summaries for each category. For example, use aggregations to categorize search results by specific price ranges, brand names, or ratings.\n   * @maxSize 10\n   */\n  aggregations?: Aggregation[];\n  /** Search information. */\n  search?: SearchDetails;\n}\n\n/** @oneof */\nexport interface SearchPagingMethodOneOf {\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @minLength 2\n   * @maxLength 100\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Aggregation extends AggregationKindOneOf {\n  /** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */\n  value?: ValueAggregation;\n  /** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */\n  scalar?: ScalarAggregation;\n  /** Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed. */\n  nested?: NestedAggregation;\n  /**\n   * Aggregation name displayed in the return.\n   * @maxLength 100\n   */\n  name?: string | null;\n  /** Type of aggregation to perform. */\n  type?: AggregationTypeWithLiterals;\n  /**\n   * Field to aggregate by.\n   * @maxLength 200\n   */\n  fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n  /** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */\n  value?: ValueAggregation;\n  /** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */\n  scalar?: ScalarAggregation;\n  /** Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed. */\n  nested?: NestedAggregation;\n}\n\nexport enum ScalarType {\n  /** Unknown scalar type. */\n  UNKNOWN_SCALAR_TYPE = 'UNKNOWN_SCALAR_TYPE',\n  /** Minimum value. */\n  MIN = 'MIN',\n  /** Maximum value. */\n  MAX = 'MAX',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n  | ScalarType\n  | 'UNKNOWN_SCALAR_TYPE'\n  | 'MIN'\n  | 'MAX';\n\nexport enum NestedAggregationType {\n  /** Unknown aggregation type. */\n  UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n  /** An aggregation where result buckets are dynamically built - one per unique value. */\n  VALUE = 'VALUE',\n  /** A single-value metric aggregation - e.g. min, max, sum, avg. */\n  SCALAR = 'SCALAR',\n}\n\n/** @enumType */\nexport type NestedAggregationTypeWithLiterals =\n  | NestedAggregationType\n  | 'UNKNOWN_AGGREGATION_TYPE'\n  | 'VALUE'\n  | 'SCALAR';\n\nexport interface ValueAggregation {\n  /**\n   * Maximum number of aggregation results to return.\n   * Min: `1`\n   * Max: `250`\n   * Default: `10`\n   */\n  limit?: number | null;\n}\n\nexport interface ScalarAggregation {\n  /** Type of scalar aggregation. */\n  type?: ScalarTypeWithLiterals;\n}\n\nexport interface NestedAggregationItem extends NestedAggregationItemKindOneOf {\n  /** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */\n  value?: ValueAggregation;\n  /** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */\n  scalar?: ScalarAggregation;\n  /**\n   * Aggregation name displayed in the return.\n   * @maxLength 100\n   */\n  name?: string | null;\n  /** Type of aggregation to perform. */\n  type?: NestedAggregationTypeWithLiterals;\n  /**\n   * Field to aggregate by.\n   * @maxLength 200\n   */\n  fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n  /** Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store. */\n  value?: ValueAggregation;\n  /** Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store. */\n  scalar?: ScalarAggregation;\n}\n\nexport enum AggregationType {\n  UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n  /** An aggregation where result buckets are dynamically built - one per unique value. */\n  VALUE = 'VALUE',\n  /** A single-value metric aggregation - e.g. min, max, sum, avg. */\n  SCALAR = 'SCALAR',\n  /** Multi-level aggregation, where each next aggregation is nested within previous one. */\n  NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n  | AggregationType\n  | 'UNKNOWN_AGGREGATION_TYPE'\n  | 'VALUE'\n  | 'SCALAR'\n  | 'NESTED';\n\n/** List of aggregations. Each aggregation is nested within the previous one. */\nexport interface NestedAggregation {\n  /**\n   * List of aggregations, where each aggregation is nested within previous one.\n   * @minSize 2\n   * @maxSize 3\n   */\n  nestedAggregations?: NestedAggregationItem[];\n}\n\nexport interface SearchDetails {\n  /**\n   * Search term or expression.\n   * @maxLength 100\n   */\n  expression?: string | null;\n  /**\n   * Fields to search in.\n   * If the array is empty, all fields are searched.\n   * @maxSize 10\n   * @maxLength 50\n   */\n  fields?: string[];\n  /** Whether to allow the search function to automatically correct typos or minor mistakes in the search expression. The search function uses an algorithm to find results that are close to the text provided. */\n  fuzzy?: boolean;\n}\n\nexport interface Paging {\n  /** Number of items to load. */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport enum DocumentType {\n  UNSPECIFIED = 'UNSPECIFIED',\n  BLOG_POSTS = 'BLOG_POSTS',\n  BOOKING_SERVICES = 'BOOKING_SERVICES',\n  EVENTS = 'EVENTS',\n  FORUM_CONTENT = 'FORUM_CONTENT',\n  ONLINE_PROGRAMS = 'ONLINE_PROGRAMS',\n  PROGALLERY_ITEM = 'PROGALLERY_ITEM',\n  STORES_PRODUCTS = 'STORES_PRODUCTS',\n}\n\n/** @enumType */\nexport type DocumentTypeWithLiterals =\n  | DocumentType\n  | 'UNSPECIFIED'\n  | 'BLOG_POSTS'\n  | 'BOOKING_SERVICES'\n  | 'EVENTS'\n  | 'FORUM_CONTENT'\n  | 'ONLINE_PROGRAMS'\n  | 'PROGALLERY_ITEM'\n  | 'STORES_PRODUCTS';\n\nexport interface SearchResponse extends SearchResponsePagingOneOf {\n  /** Paging metadata. */\n  pagingOffsetMetadata?: PagingMetadata;\n  /** Documents matching the search query. */\n  siteDocumentItems?: SiteDocument[];\n  /** Aggregated data. */\n  aggregationData?: AggregationData;\n}\n\n/** @oneof */\nexport interface SearchResponsePagingOneOf {\n  /** Paging metadata. */\n  pagingOffsetMetadata?: PagingMetadata;\n}\n\nexport interface AggregationData {\n  /**\n   * List of the aggregated data results.\n   * @maxSize 10000\n   */\n  results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n  /**\n   * Value contained in the field specified in `fieldPath` for this aggregation in the request.\n   * @maxLength 100\n   */\n  value?: string;\n  /** Number of documents containing the specified value in the specified field. */\n  count?: number;\n}\n\nexport interface ValueResults {\n  /**\n   * List of value aggregation results.\n   * @maxSize 250\n   */\n  results?: ValueAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n  /** Type of scalar aggregation. */\n  type?: ScalarTypeWithLiterals;\n  /** Value of the scalar aggregation. For example, the minimum, maximum, or total value for the specified field. */\n  value?: number;\n}\n\nexport interface ValueResult {\n  /**\n   * Value contained in the field specified in `fieldPath` for this aggregation in the request.\n   * @maxLength 1000\n   */\n  value?: string;\n  /** Number of documents containing the specified value in the specified field. */\n  count?: number | null;\n}\n\nexport interface ScalarResult {\n  /** Scalar aggregation results. */\n  value?: number;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n  /** Value aggregation results. */\n  value?: ValueResult;\n  /** Scalar aggregation results. */\n  scalar?: ScalarResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n  /** Value aggregation results. */\n  value?: ValueResult;\n  /** Scalar aggregation results. */\n  scalar?: ScalarResult;\n}\n\nexport interface Results {\n  /** Aggregation results. */\n  results?: Record<string, NestedResultValue>;\n}\n\n/**\n * Results of `NESTED` aggregation type in a flattened form\n * aggregations in resulting array are keyed by requested aggregation `name`.\n */\nexport interface NestedResults {\n  /**\n   * List of nested aggregation results.\n   * @maxSize 1000\n   */\n  results?: Results[];\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n  /** Value aggregation results. */\n  values?: ValueResults;\n  /** Scalar aggregation results. */\n  scalar?: AggregationResultsScalarResult;\n  /** Nested aggregation results. */\n  nested?: NestedResults;\n  /**\n   * Aggregation name defined in the request.\n   * @maxLength 100\n   */\n  name?: string;\n  /** Type of aggregation that was performed. */\n  type?: AggregationTypeWithLiterals;\n  /**\n   * Field the data was aggregated by.\n   * @maxLength 200\n   */\n  fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n  /** Value aggregation results. */\n  values?: ValueResults;\n  /** Scalar aggregation results. */\n  scalar?: AggregationResultsScalarResult;\n  /** Nested aggregation results. */\n  nested?: NestedResults;\n}\n\nexport interface PagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. */\n  total?: number | null;\n  /** Whether the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n}\n\nexport interface AutocompleteRequest {\n  /**\n   * Query phrase to fetch completions for.\n   * @maxLength 50\n   */\n  query: string | null;\n  /** Document type to use to search for phrases. */\n  documentType: DocumentTypeWithLiterals;\n  /**\n   * Limit of phrases to fetch.\n   * @min 1\n   * @max 100\n   */\n  limit?: number;\n  /**\n   * Language to search in.\n   * @format LANGUAGE\n   */\n  language?: string | null;\n  /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */\n  filter?: Record<string, any> | null;\n  /**\n   * Autocompletable fields to use for query completion. If not provided, all autocompletable fields in schema are used\n   * @maxSize 10\n   * @maxLength 50\n   */\n  searchFields?: string[];\n}\n\nexport interface AutocompleteResponse {\n  /** Suggested phrases. */\n  values?: AutocompleteResponseValue[];\n}\n\nexport interface AutocompleteResponseValue {\n  /**\n   * Suggested phrase.\n   * @maxLength 100\n   */\n  query?: string;\n}\n\nexport interface SuggestRequest {\n  /** Document type of documents to search for. */\n  documentType: DocumentTypeWithLiterals;\n  /** Suggest query information. */\n  suggest: Suggest;\n  /**\n   * Number of suggested document to return.\n   * @min 1\n   * @max 100\n   */\n  limit?: number;\n  /**\n   * Language to search in.\n   * @format LANGUAGE\n   */\n  language?: string | null;\n}\n\nexport interface Suggest extends SuggestPagingMethodOneOf {\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n  /**\n   * Filter object in the following format:\n   * `\"filter\" : {\n   * \"fieldName1\": \"value1\",\n   * \"fieldName2\":{\"$operator\":\"value2\"}\n   * }`\n   * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n   */\n  filter?: Record<string, any> | null;\n  /**\n   * Sort object in the following format:\n   * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n   * @maxSize 10\n   */\n  sort?: Sorting[];\n  /** Search information. */\n  suggest?: SuggestDetails;\n}\n\n/** @oneof */\nexport interface SuggestPagingMethodOneOf {\n  /** Paging options to limit and skip the number of items. */\n  paging?: Paging;\n}\n\nexport interface SuggestDetails {\n  /**\n   * Search term or expression.\n   * @maxLength 100\n   */\n  expression?: string | null;\n  /**\n   * Fields to search in.\n   * If the array is empty, all fields are searched.\n   * @maxSize 10\n   * @maxLength 50\n   */\n  fields?: string[];\n}\n\nexport interface SuggestResponse {\n  /** Suggested documents. */\n  siteDocumentItems?: SiteDocument[];\n}\n\n/**\n * Retrieves a list of site documents that match the provided search query and optionally performs aggregations on the data queried.\n *\n * The `search()` API supports the document types listed in the [Introduction](https://dev.wix.com/docs/sdk/backend-modules/search/wix-site-search/introduction), each with its own schema. These schemas define the fields available for filtering, sorting, and free-text searching.\n *\n * To learn more about working with the search query, see [API Query Language](https://dev.wix.com/docs/sdk/articles/working-with-the-sdk/api-query-language).\n * @param search - Search query and aggregation information.\n * @public\n * @documentationMaturity preview\n * @requiredField options.documentType\n * @requiredField search\n * @permissionId SEARCH.SITE_DOCUMENT_READ\n * @applicableIdentity APP\n * @fqn wix.search.platformized.v1.SiteSearchPlatformizedService.Search\n */\nexport async function search(\n  search: SiteDocumentSearch,\n  options?: NonNullablePaths<SearchOptions, `documentType`, 2>\n): Promise<\n  NonNullablePaths<\n    SearchResponse,\n    | `siteDocumentItems`\n    | `siteDocumentItems.${number}._id`\n    | `aggregationData.results`\n    | `aggregationData.results.${number}.scalar.type`\n    | `aggregationData.results.${number}.scalar.value`\n    | `aggregationData.results.${number}.name`\n    | `aggregationData.results.${number}.type`\n    | `aggregationData.results.${number}.fieldPath`,\n    6\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    search: search,\n    documentType: options?.documentType,\n    language: options?.language,\n  });\n\n  const reqOpts = ambassadorWixSearchPlatformizedV1SiteDocument.search(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          search: '$[0]',\n          documentType: '$[1].documentType',\n          language: '$[1].language',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['search', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface SearchOptions {\n  /** Document type to search in. */\n  documentType: DocumentTypeWithLiterals;\n  /**\n   * Language to search in.\n   * @format LANGUAGE\n   */\n  language?: string | null;\n}\n\nexport interface SiteDocumentSearchSpec extends SearchSpec {\n  paging: 'offset';\n  wql: [];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n  SiteDocument,\n  SiteDocumentSearchSpec\n>;\nexport type SiteDocumentSearch = {\n  /** \n  Paging options to limit and skip the number of items.  \n  */\n  paging?: {\n    /** \n  Number of items to load.  \n  */\n    limit?:\n      | NonNullable<CommonSearchWithEntityContext['paging']>['limit']\n      | null;\n    /** \n  Number of items to skip in the current sort order.  \n  */\n    offset?:\n      | NonNullable<CommonSearchWithEntityContext['paging']>['offset']\n      | null;\n  };\n  /** \n  Filter object in the following format:\n  `\"filter\" : {\n  \"fieldName1\": \"value1\",\n  \"fieldName2\":{\"$operator\":\"value2\"}\n  }`\n  Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`  \n  */\n  filter?: CommonSearchWithEntityContext['filter'] | null;\n  /** \n  Sort object in the following format:\n  `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n  @maxSize: 10 \n  */\n  sort?: {\n    /** \n  Name of the field to sort by. \n  @minLength: 2,\n  @maxLength: 100 \n  */\n    fieldName?: NonNullable<\n      CommonSearchWithEntityContext['sort']\n    >[number]['fieldName'];\n    /** \n  Sort order.  \n  */\n    order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n  }[];\n  /** \n  A search method for grouping data into various categories (facets) and providing summaries for each category. For example, use aggregations to categorize search results by specific price ranges, brand names, or ratings. \n  @maxSize: 10 \n  */\n  aggregations?: {\n    /** \n  Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store.  \n  */\n    value?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['value'];\n    /** \n  Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store.  \n  */\n    scalar?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['scalar'];\n    /** \n  Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed.  \n  */\n    nested?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['nested'];\n    /** \n  Aggregation name displayed in the return. \n  @maxLength: 100 \n  */\n    name?:\n      | NonNullable<\n          CommonSearchWithEntityContext['aggregations']\n        >[number]['name']\n      | null;\n    /** \n  Type of aggregation to perform.  \n  */\n    type?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['type'];\n    /** \n  Field to aggregate by. \n  @maxLength: 200 \n  */\n    fieldPath?: NonNullable<\n      CommonSearchWithEntityContext['aggregations']\n    >[number]['fieldPath'];\n  }[];\n  /** \n  Search information.  \n  */\n  search?: {\n    /** \n  Search term or expression. \n  @maxLength: 100 \n  */\n    expression?:\n      | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n      | null;\n    /** \n  Fields to search in.\n  If the array is empty, all fields are searched. \n  @maxSize: 10,\n  @maxLength: 50 \n  */\n    fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n    /** \n  Whether to allow the search function to automatically correct typos or minor mistakes in the search expression. The search function uses an algorithm to find results that are close to the text provided.  \n  */\n    fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n  };\n};\n\nexport const utils = {\n  search: {\n    ...createSearchUtils<\n      SiteDocument,\n      SiteDocumentSearchSpec,\n      SiteDocumentSearch\n    >(),\n  },\n};\n\n/**\n * Provides phrase completion. For example \"blu\" could return \"blue\", \"blues\" and \"blunt\" as candidate phrases.\n * This operation is resource heavy at index time and is reserved for special use cases.\n * @param query - Query phrase to fetch completions for.\n * @param documentType - Document type to use to search for phrases.\n * @internal\n * @documentationMaturity preview\n * @requiredField documentType\n * @requiredField query\n * @permissionId SEARCH.SITE_DOCUMENT_READ\n * @applicableIdentity APP\n * @fqn wix.search.platformized.v1.SiteSearchPlatformizedService.Autocomplete\n */\nexport async function autocomplete(\n  query: string,\n  documentType: DocumentTypeWithLiterals,\n  options?: AutocompleteOptions\n): Promise<\n  NonNullablePaths<AutocompleteResponse, `values` | `values.${number}.query`, 4>\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[3] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    query: query,\n    documentType: documentType,\n    limit: options?.limit,\n    language: options?.language,\n    filter: options?.filter,\n    searchFields: options?.searchFields,\n  });\n\n  const reqOpts =\n    ambassadorWixSearchPlatformizedV1SiteDocument.autocomplete(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          query: '$[0]',\n          documentType: '$[1]',\n          limit: '$[2].limit',\n          language: '$[2].language',\n          filter: '$[2].filter',\n          searchFields: '$[2].searchFields',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['query', 'documentType', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface AutocompleteOptions {\n  /**\n   * Limit of phrases to fetch.\n   * @min 1\n   * @max 100\n   */\n  limit?: number;\n  /**\n   * Language to search in.\n   * @format LANGUAGE\n   */\n  language?: string | null;\n  /** Filter in platformized query language (for example {'field': {'$eq': 'value'}}) */\n  filter?: Record<string, any> | null;\n  /**\n   * Autocompletable fields to use for query completion. If not provided, all autocompletable fields in schema are used\n   * @maxSize 10\n   * @maxLength 50\n   */\n  searchFields?: string[];\n}\n\n/**\n * Executes search query to fetch suggested items. Unlike search query, suggest will match\n * partial phrases (for example \"blu\" will match documents containing \"blue\", \"blues\" and \"blunt\").\n * Phrase needs to be at least 3 symbols long. Suggestions can also perform optimizations in search\n * results and generally do not guarantee the same level of quality as regular Search endpoint.\n * @param documentType - Document type of documents to search for.\n * @internal\n * @documentationMaturity preview\n * @requiredField documentType\n * @requiredField options.suggest\n * @permissionId SEARCH.SITE_DOCUMENT_READ\n * @applicableIdentity APP\n * @fqn wix.search.platformized.v1.SiteSearchPlatformizedService.Suggest\n */\nexport async function suggest(\n  documentType: DocumentTypeWithLiterals,\n  options?: NonNullablePaths<SuggestOptions, `suggest`, 2>\n): Promise<\n  NonNullablePaths<\n    SuggestResponse,\n    `siteDocumentItems` | `siteDocumentItems.${number}._id`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    documentType: documentType,\n    suggest: options?.suggest,\n    limit: options?.limit,\n    language: options?.language,\n  });\n\n  const reqOpts =\n    ambassadorWixSearchPlatformizedV1SiteDocument.suggest(payload);\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          documentType: '$[0]',\n          suggest: '$[1].suggest',\n          limit: '$[1].limit',\n          language: '$[1].language',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['documentType', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface SuggestOptions {\n  /** Suggest query information. */\n  suggest: Suggest;\n  /**\n   * Number of suggested document to return.\n   * @min 1\n   * @max 100\n   */\n  limit?: number;\n  /**\n   * Language to search in.\n   * @format LANGUAGE\n   */\n  language?: string | null;\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixSearchPlatformizedV1SiteSearchPlatformizedServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/_api/site-search',\n        destPath: '',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/site-search',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/_api/site-search',\n        destPath: '',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/_api/site-search',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_search_wix-site-search';\n\n/**\n * Retrieves a list of site documents that match the provided search query and optionally performs aggregations on the data queried.\n *\n * The `search()` API supports the document types listed in the [Introduction](https://dev.wix.com/docs/sdk/backend-modules/search/wix-site-search/introduction), each with its own schema. These schemas define the fields available for filtering, sorting, and free-text searching.\n *\n * To learn more about working with the search query, see [API Query Language](https://dev.wix.com/docs/sdk/articles/working-with-the-sdk/api-query-language).\n */\nexport function search(payload: object): RequestOptionsFactory<any> {\n  function __search({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.search.platformized.v1.site_document',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.search.platformized.v1.SiteSearchPlatformizedService.Search',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixSearchPlatformizedV1SiteSearchPlatformizedServiceUrl({\n        protoPath: '/v1/search',\n        data: payload,\n        host,\n      }),\n      data: payload,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTFloatToSDKFloat,\n            paths: [\n              { path: 'aggregationData.results.scalar.value' },\n              {\n                path: 'aggregationData.results.nested.results.results.*.scalar.value',\n              },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __search;\n}\n\n/**\n * Provides phrase completion. For example \"blu\" could return \"blue\", \"blues\" and \"blunt\" as candidate phrases.\n * This operation is resource heavy at index time and is reserved for special use cases.\n */\nexport function autocomplete(payload: object): RequestOptionsFactory<any> {\n  function __autocomplete({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.search.platformized.v1.site_document',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.search.platformized.v1.SiteSearchPlatformizedService.Autocomplete',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixSearchPlatformizedV1SiteSearchPlatformizedServiceUrl({\n        protoPath: '/v1/autocomplete',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __autocomplete;\n}\n\n/**\n * Executes search query to fetch suggested items. Unlike search query, suggest will match\n * partial phrases (for example \"blu\" will match documents containing \"blue\", \"blues\" and \"blunt\").\n * Phrase needs to be at least 3 symbols long. Suggestions can also perform optimizations in search\n * results and generally do not guarantee the same level of quality as regular Search endpoint.\n */\nexport function suggest(payload: object): RequestOptionsFactory<any> {\n  function __suggest({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.search.platformized.v1.site_document',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.search.platformized.v1.SiteSearchPlatformizedService.Suggest',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixSearchPlatformizedV1SiteSearchPlatformizedServiceUrl({\n        protoPath: '/v1/suggest',\n        data: payload,\n        host,\n      }),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __suggest;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  AutocompleteOptions,\n  AutocompleteResponse,\n  DocumentTypeWithLiterals,\n  SearchOptions,\n  SearchResponse,\n  SiteDocumentSearch,\n  SuggestOptions,\n  SuggestResponse,\n  autocomplete as universalAutocomplete,\n  search as universalSearch,\n  suggest as universalSuggest,\n} from './search-platformized-v1-site-document-wix-site-search.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/search' };\n\nexport function search(httpClient: HttpClient): SearchSignature {\n  return (\n    search: SiteDocumentSearch,\n    options?: NonNullablePaths<SearchOptions, `documentType`, 2>\n  ) =>\n    universalSearch(\n      search,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface SearchSignature {\n  /**\n   * Retrieves a list of site documents that match the provided search query and optionally performs aggregations on the data queried.\n   *\n   * The `search()` API supports the document types listed in the [Introduction](https://dev.wix.com/docs/sdk/backend-modules/search/wix-site-search/introduction), each with its own schema. These schemas define the fields available for filtering, sorting, and free-text searching.\n   *\n   * To learn more about working with the search query, see [API Query Language](https://dev.wix.com/docs/sdk/articles/working-with-the-sdk/api-query-language).\n   * @param - Search query and aggregation information.\n   */\n  (\n    search: SiteDocumentSearch,\n    options?: NonNullablePaths<SearchOptions, `documentType`, 2>\n  ): Promise<\n    NonNullablePaths<\n      SearchResponse,\n      | `siteDocumentItems`\n      | `siteDocumentItems.${number}._id`\n      | `aggregationData.results`\n      | `aggregationData.results.${number}.scalar.type`\n      | `aggregationData.results.${number}.scalar.value`\n      | `aggregationData.results.${number}.name`\n      | `aggregationData.results.${number}.type`\n      | `aggregationData.results.${number}.fieldPath`,\n      6\n    >\n  >;\n}\n\n/** @internal */\nexport function autocomplete(httpClient: HttpClient): AutocompleteSignature {\n  return (\n    query: string,\n    documentType: DocumentTypeWithLiterals,\n    options?: AutocompleteOptions\n  ) =>\n    universalAutocomplete(\n      query,\n      documentType,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface AutocompleteSignature {\n  /**\n   * Provides phrase completion. For example \"blu\" could return \"blue\", \"blues\" and \"blunt\" as candidate phrases.\n   * This operation is resource heavy at index time and is reserved for special use cases.\n   * @param - Query phrase to fetch completions for.\n   * @param - Document type to use to search for phrases.\n   */\n  (\n    query: string,\n    documentType: DocumentTypeWithLiterals,\n    options?: AutocompleteOptions\n  ): Promise<\n    NonNullablePaths<\n      AutocompleteResponse,\n      `values` | `values.${number}.query`,\n      4\n    >\n  >;\n}\n\n/** @internal */\nexport function suggest(httpClient: HttpClient): SuggestSignature {\n  return (\n    documentType: DocumentTypeWithLiterals,\n    options?: NonNullablePaths<SuggestOptions, `suggest`, 2>\n  ) =>\n    universalSuggest(\n      documentType,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface SuggestSignature {\n  /**\n   * Executes search query to fetch suggested items. Unlike search query, suggest will match\n   * partial phrases (for example \"blu\" will match documents containing \"blue\", \"blues\" and \"blunt\").\n   * Phrase needs to be at least 3 symbols long. Suggestions can also perform optimizations in search\n   * results and generally do not guarantee the same level of quality as regular Search endpoint.\n   * @param - Document type of documents to search for.\n   */\n  (\n    documentType: DocumentTypeWithLiterals,\n    options?: NonNullablePaths<SuggestOptions, `suggest`, 2>\n  ): Promise<\n    NonNullablePaths<\n      SuggestResponse,\n      `siteDocumentItems` | `siteDocumentItems.${number}._id`,\n      4\n    >\n  >;\n}\n\nexport {\n  Aggregation,\n  AggregationData,\n  AggregationKindOneOf,\n  AggregationResults,\n  AggregationResultsResultOneOf,\n  AggregationResultsScalarResult,\n  AggregationType,\n  AutocompleteOptions,\n  AutocompleteRequest,\n  AutocompleteResponse,\n  AutocompleteResponseValue,\n  DocumentType,\n  NestedAggregation,\n  NestedAggregationItem,\n  NestedAggregationItemKindOneOf,\n  NestedAggregationType,\n  NestedResultValue,\n  NestedResultValueResultOneOf,\n  NestedResults,\n  Paging,\n  PagingMetadata,\n  Results,\n  ScalarAggregation,\n  ScalarResult,\n  ScalarType,\n  Search,\n  SearchDetails,\n  SearchOptions,\n  SearchPagingMethodOneOf,\n  SearchRequest,\n  SearchResponse,\n  SearchResponsePagingOneOf,\n  SiteDocument,\n  SiteDocumentSearchSpec,\n  SortOrder,\n  Sorting,\n  Suggest,\n  SuggestDetails,\n  SuggestOptions,\n  SuggestPagingMethodOneOf,\n  SuggestRequest,\n  SuggestResponse,\n  ValueAggregation,\n  ValueAggregationResult,\n  ValueResult,\n  ValueResults,\n  utils,\n} from './search-platformized-v1-site-document-wix-site-search.universal.js';\n","import {\n  search as publicSearch,\n  autocomplete as publicAutocomplete,\n  suggest as publicSuggest,\n} from './search-platformized-v1-site-document-wix-site-search.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const search: MaybeContext<\n  BuildRESTFunction<typeof publicSearch> & typeof publicSearch\n> = /*#__PURE__*/ createRESTModule(publicSearch);\n/** @internal */\nexport const autocomplete: MaybeContext<\n  BuildRESTFunction<typeof publicAutocomplete> & typeof publicAutocomplete\n> = /*#__PURE__*/ createRESTModule(publicAutocomplete);\n/** @internal */\nexport const suggest: MaybeContext<\n  BuildRESTFunction<typeof publicSuggest> & typeof publicSuggest\n> = /*#__PURE__*/ createRESTModule(publicSuggest);\n\nexport {\n  SortOrder,\n  ScalarType,\n  NestedAggregationType,\n  AggregationType,\n  DocumentType,\n} from './search-platformized-v1-site-document-wix-site-search.universal.js';\nexport {\n  SiteDocument,\n  SearchRequest,\n  Search,\n  SearchPagingMethodOneOf,\n  Sorting,\n  Aggregation,\n  AggregationKindOneOf,\n  ValueAggregation,\n  ScalarAggregation,\n  NestedAggregationItem,\n  NestedAggregationItemKindOneOf,\n  NestedAggregation,\n  SearchDetails,\n  Paging,\n  SearchResponse,\n  SearchResponsePagingOneOf,\n  AggregationData,\n  ValueAggregationResult,\n  ValueResults,\n  AggregationResultsScalarResult,\n  ValueResult,\n  ScalarResult,\n  NestedResultValue,\n  NestedResultValueResultOneOf,\n  Results,\n  NestedResults,\n  AggregationResults,\n  AggregationResultsResultOneOf,\n  PagingMetadata,\n  AutocompleteRequest,\n  AutocompleteResponse,\n  AutocompleteResponseValue,\n  SuggestRequest,\n  Suggest,\n  SuggestPagingMethodOneOf,\n  SuggestDetails,\n  SuggestResponse,\n  SearchOptions,\n  SiteDocumentSearchSpec,\n  AutocompleteOptions,\n  SuggestOptions,\n} from './search-platformized-v1-site-document-wix-site-search.universal.js';\nexport { utils } from './search-platformized-v1-site-document-wix-site-search.universal.js';\nexport {\n  SortOrderWithLiterals,\n  ScalarTypeWithLiterals,\n  NestedAggregationTypeWithLiterals,\n  AggregationTypeWithLiterals,\n  DocumentTypeWithLiterals,\n  CommonSearchWithEntityContext,\n  SiteDocumentSearch,\n} from './search-platformized-v1-site-document-wix-site-search.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AASd,SAAS,OAAO,SAA6C;AAClE,WAAS,SAAS,EAAE,KAAK,GAAQ;AAC/B,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,+DAA+D;AAAA,QAClE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,MACN,mBAAmB,CAACA,aAClB,eAAeA,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AS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,cAAc;AAAA,UACd,SAAS;AAAA,UACT,OAAO;AAAA,UACP,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,gBAAgB,SAAS;AAAA,IAC5B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEr2BO,SAASC,QAAO,YAAyC;AAC9D,SAAO,CACLA,SACA,YAEAA;AAAA,IACEA;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA+BO,SAASC,cAAa,YAA+C;AAC1E,SAAO,CACL,OACA,cACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,SAAQ,YAA0C;AAChE,SAAO,CACL,cACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACrGA,SAAS,wBAAwB;AAG1B,IAAMC,UAEK,iCAAiBA,OAAY;AAExC,IAAMC,gBAEK,iCAAiBA,aAAkB;AAE9C,IAAMC,WAEK,iCAAiBA,QAAa;","names":["payload","SortOrder","ScalarType","NestedAggregationType","AggregationType","DocumentType","search","autocomplete","suggest","search","autocomplete","suggest","search","autocomplete","suggest"]}