> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SearchManagerServiceImpl

> Вызов публичных методов сервиса через REST API: searchManagerServiceImpl

<ResponseField name="beanId" type="string">
  Идентификатор Spring bean, который содержит вызываемый сервис.

  searchManagerServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Область действия bean. Для вызовов сервисов используется PROTOTYPE.
</ResponseField>

<ResponseField name="functionName" type="string">
  Имя публичного метода сервиса, указанное в сигнатуре ниже.
</ResponseField>

<ResponseField name="args" type="object[]">
  Массив аргументов метода. Каждый аргумент передаётся объектом с индексом 0, 1 и т. д.; значение должно соответствовать Java-типу параметра.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: ru
Site-Context: my-site
Authorization: Bearer <token>
```

Заголовки `Lang-Context` и `Site-Context` необходимо передавать в каждом запросе. Для защищённых методов передавайте JWT в заголовке `Authorization` в формате `Bearer <token>`.

**Доступ:** GUEST\* / USER или ADMIN. **Bearer Token:** условно для USER/ADMIN.

* GUEST — без логина; доступен только whitelist.
* USER — требуется авторизация; доступны методы с проверкой USER.
* ADMIN — полный доступ к public-методам всех сервисов.
* Если метод проверяет роль внутри логики, GUEST может получить null.

## Методы

<ResponseField name="search" type="SearchResponse">
  | Аргумент       | Тип                             | Описание                      |
  | -------------- | ------------------------------- | ----------------------------- |
  | `requestAsMap` | `LinkedHashMap<String, Object>` | Передаётся через `args[0].0`. |

  ### search

  Пример JSON объекта запроса:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "search",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="countAll" type="long">
  | Аргумент       | Тип                             | Описание                      |
  | -------------- | ------------------------------- | ----------------------------- |
  | `requestAsMap` | `LinkedHashMap<String, Object>` | Передаётся через `args[0].0`. |

  ### countAll

  Пример JSON объекта запроса:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "countAll",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="logicalFilters" type="List<GroupFilter>">
  | Аргумент | Тип | Описание                      |
  | -------- | --- | ----------------------------- |
  | —        | —   | Метод не принимает аргументы. |

  ### logicalFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "logicalFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="rangeFilters" type="List<GroupFilter>">
  | Аргумент | Тип | Описание                      |
  | -------- | --- | ----------------------------- |
  | —        | —   | Метод не принимает аргументы. |

  ### rangeFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "rangeFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="simpleFilters" type="List<GroupFilter>">
  | Аргумент | Тип | Описание                      |
  | -------- | --- | ----------------------------- |
  | —        | —   | Метод не принимает аргументы. |

  ### simpleFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "simpleFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="numericFilters" type="List<GroupFilter>">
  | Аргумент | Тип | Описание                      |
  | -------- | --- | ----------------------------- |
  | —        | —   | Метод не принимает аргументы. |

  ### numericFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "numericFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="listFilters" type="List<GroupFilter>">
  | Аргумент | Тип | Описание                      |
  | -------- | --- | ----------------------------- |
  | —        | —   | Метод не принимает аргументы. |

  ### listFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "listFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="rangeFilterValues" type="List<GroupFilter>">
  | Аргумент   | Тип      | Описание                      |
  | ---------- | -------- | ----------------------------- |
  | `filterId` | `String` | Передаётся через `args[0].0`. |

  ### rangeFilterValues

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "rangeFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="listFilterValues" type="List<GroupFilter>">
  | Аргумент   | Тип      | Описание                      |
  | ---------- | -------- | ----------------------------- |
  | `filterId` | `String` | Передаётся через `args[0].0`. |

  ### listFilterValues

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "listFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="simpleFilterValues" type="List<GroupFilter>">
  | Аргумент   | Тип      | Описание                      |
  | ---------- | -------- | ----------------------------- |
  | `filterId` | `String` | Передаётся через `args[0].0`. |

  ### simpleFilterValues

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "simpleFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="numericFilterValues" type="List<GroupFilter>">
  | Аргумент   | Тип      | Описание                      |
  | ---------- | -------- | ----------------------------- |
  | `filterId` | `String` | Передаётся через `args[0].0`. |

  ### numericFilterValues

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "numericFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="fieldFilterValues" type="List<GroupFilter>">
  | Аргумент       | Тип                             | Описание                      |
  | -------------- | ------------------------------- | ----------------------------- |
  | `requestAsMap` | `LinkedHashMap<String, Object>` | Передаётся через `args[0].0`. |

  ### fieldFilterValues

  Пример JSON объекта запроса:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "fieldFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="listingFeatureFromAttribute" type="GroupFilter">
  | Аргумент      | Тип      | Описание                      |
  | ------------- | -------- | ----------------------------- |
  | `filterId`    | `String` | Передаётся через `args[0].0`. |
  | `sellerSkuId` | `String` | Передаётся через `args[1].1`. |

  ### listingFeatureFromAttribute

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "listingFeatureFromAttribute",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="doProcessSearchTerms" type="String[]">
  | Аргумент      | Тип      | Описание                      |
  | ------------- | -------- | ----------------------------- |
  | `searchTerms` | `String` | Передаётся через `args[0].0`. |

  ### doProcessSearchTerms

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "doProcessSearchTerms",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="aiSearchKeywords" type="List<String>">
  | Аргумент | Тип      | Описание                      |
  | -------- | -------- | ----------------------------- |
  | `query`  | `String` | Передаётся через `args[0].0`. |

  ### aiSearchKeywords

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "aiSearchKeywords",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="aiSearchIsActive" type="boolean">
  | Аргумент | Тип | Описание                      |
  | -------- | --- | ----------------------------- |
  | —        | —   | Метод не принимает аргументы. |

  ### aiSearchIsActive

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "aiSearchIsActive",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="parseSearchQuery" type="List<String>">
  | Аргумент | Тип      | Описание                      |
  | -------- | -------- | ----------------------------- |
  | `query`  | `String` | Передаётся через `args[0].0`. |

  ### parseSearchQuery

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "parseSearchQuery",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>
