1 Commits
Author SHA1 Message Date
antonandClaude Opus 5.5 (1M context) 20c0b7dc9c H-3729: GET /system-notifications/active
Co-Authored-By: Claude Opus 5.5 (1M context)
2026-10-19 14:02:25 +05:00
+154 -119
View File
@@ -79,6 +79,8 @@ tags:
description: Methods for admin oversight of personal API tokens. Requires "api-tokens-admin" permission.
- name: admin-employment
description: Methods for administrative read-only access to employee employments, including external identifiers used by integrations. Requires "user-edit" permission.
- name: system-notifications
description: Methods for reading active HRBox system announcements (home page banner for portal administrators). Requires "admin-controls" permission.
paths:
/mobile/bind/{id}/{token}:
@@ -5686,7 +5688,6 @@ paths:
responses:
200:
description: Список опросов
content:
application/json:
schema:
@@ -6022,16 +6023,7 @@ paths:
- $ref: '#/components/parameters/noDraft'
- $ref: '#/components/parameters/goalParentId'
responses:
200:
$ref: '#/components/responses/GoalIndexResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
$ref: '#/components/responses/GoalActionResponse'
/goal/supervise:
get:
@@ -6051,16 +6043,7 @@ paths:
- $ref: '#/components/parameters/noDraft'
- $ref: '#/components/parameters/goalParentId'
responses:
200:
$ref: '#/components/responses/GoalIndexResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
$ref: '#/components/responses/GoalActionResponse'
/goal/archive:
get:
@@ -6079,16 +6062,7 @@ paths:
- $ref: '#/components/parameters/goalParentId'
- $ref: '#/components/parameters/goalIntervalTypeId'
responses:
200:
$ref: '#/components/responses/GoalIndexResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
$ref: '#/components/responses/GoalActionResponse'
/goal/view:
get:
@@ -6190,16 +6164,7 @@ paths:
items:
$ref: '#/components/schemas/GoalItem'
responses:
200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/approve:
post:
@@ -6220,16 +6185,7 @@ paths:
items:
$ref: '#/components/schemas/GoalItem'
responses:
200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/reject:
post:
@@ -6250,16 +6206,7 @@ paths:
items:
$ref: '#/components/schemas/GoalItem'
responses:
200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/finish:
post:
@@ -6280,16 +6227,7 @@ paths:
items:
$ref: '#/components/schemas/GoalItem'
responses:
200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/remove:
post:
@@ -6310,16 +6248,7 @@ paths:
type: string
format: uuid
responses:
200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/bind:
post:
@@ -6349,16 +6278,7 @@ paths:
format: uuid
description: Цели которые необходимо привязать
responses:
200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal/unbind:
post:
@@ -6380,16 +6300,7 @@ paths:
type: string
format: uuid
responses:
200:
$ref: '#/components/responses/GoalActionResponse'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
/goal-report/users:
post:
@@ -6539,7 +6450,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/GoalActionResponse'
$ref: '#/components/responses/GoalActionResponse'
422:
description: Bad Request
403:
@@ -8355,6 +8266,101 @@ paths:
Запись не найдена. Включает случаи обращения к записям,
принадлежащим другим тенантам.
/system-notifications/active:
get:
tags: [system-notifications]
summary: Получить активные системные объявления
description: |
Возвращает постраничный список активных системных объявлений HRBox
(по умолчанию 20 на страницу, максимум 50). По умолчанию сортировка
по дате публикации, сначала новые. Используется для баннера
на главной странице портала.
Тело каждого объявления (`body_html`) рендерится из markdown на языке
профиля текущего пользователя с откатом на русский, если перевод
отсутствует, и очищается до ограниченного набора тегов: `p`, `br`,
`strong`, `em`, `del`, `ul`, `ol`, `li`, `a` (внешние `http`/`https` —
с `target="_blank" rel="noopener noreferrer"`; пути портала от корня
`/…` и `mailto:` — без `target`). Если после очистки
текста не осталось, объявление всё равно попадает в выдачу
с пустым `body_html` — клиенты такие объявления не показывают.
Объявления, скрытые текущим пользователем
(`POST /system-notifications/dismiss`), в выдачу не попадают.
operationId: systemNotificationsActive
parameters:
- name: per-page
in: query
schema: { type: integer, minimum: 1, maximum: 50, default: 20 }
description: Значение больше 50 урезается до 50.
- name: page
in: query
schema: { type: integer, minimum: 1, default: 1 }
- name: sort
in: query
schema:
type: string
enum:
- published_at
- -published_at
description: По умолчанию `-published_at`.
responses:
200:
description: Список активных объявлений.
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SystemNotification'
_links:
$ref: '#/components/schemas/_links'
_meta:
$ref: '#/components/schemas/_meta'
403:
description: |
У текущего пользователя отсутствует право `admin-controls`.
/system-notifications/dismiss:
post:
tags: [system-notifications]
summary: Скрыть системное объявление
description: |
Скрывает активное системное объявление для текущего пользователя
на всех устройствах и во всех интерфейсах. Скрытое объявление
перестаёт возвращаться методом `GET /system-notifications/active`.
Метод идемпотентен: повторный вызов для уже скрытого объявления
также возвращает 204.
operationId: systemNotificationsDismiss
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id: { type: string, format: uuid, description: ID объявления. }
application/x-www-form-urlencoded:
schema:
type: object
required: [id]
properties:
id: { type: string, format: uuid }
responses:
204:
description: Объявление скрыто (или уже было скрыто ранее).
422:
description: |
Ошибка валидации (`success: false`, список в `errors`): id не UUID
или объявление сейчас не активно (не опубликовано, истекло, отозвано).
403:
description: |
У текущего пользователя отсутствует право `admin-controls`.
components:
securitySchemes:
SessionAuth:
@@ -13921,27 +13927,31 @@ components:
_meta:
$ref: '#/components/schemas/_meta'
GoalActionResponse:
description: Goal object
SystemNotification:
type: object
description: Системное объявление HRBox в баннере на главной странице портала.
properties:
success:
type: boolean
deleted:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые были удалены
updated:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые были обновлены
skipped:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые не были обработаны
id:
type: string
format: uuid
description: Идентификатор объявления.
body_html:
type: string
description: |
Текст объявления, отрендеренный из markdown в HTML на языке
профиля пользователя (откат на русский, если перевод отсутствует)
и очищенный до ограниченного набора тегов: `p`, `br`, `strong`,
`em`, `del`, `ul`, `ol`, `li`, `a` (внешние `http`/`https` —
с `target="_blank" rel="noopener noreferrer"`; пути портала от корня
`/…` и `mailto:` — без `target`). Пустая строка,
если после очистки текста не осталось — такие объявления клиенты
не показывают.
example: "<p>Плановые работы <strong>1 октября</strong> с 02:00 до 04:00 МСК.</p>"
published_at:
type: string
format: date-time
description: Дата и время публикации, ISO 8601 со смещением.
example: "2026-09-24T16:30:04+03:00"
parameters:
boardDateTypeParam:
@@ -14078,6 +14088,7 @@ components:
responses:
GoalIndexResponse:
200:
description: Список целей
content:
application/json:
@@ -14094,12 +14105,36 @@ components:
$ref: '#/components/schemas/_links'
_meta:
$ref: '#/components/schemas/_meta'
400:
description: Bad Request.
403:
description: Unauthorized.
404:
description: Not found.
500:
description: Server Error.
GoalActionResponse:
description: Результат действия над целями
content:
application/json:
schema:
$ref: '#/components/schemas/GoalActionResponse'
description: Goal object
type: object
properties:
success:
type: boolean
deleted:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые были удалены
updated:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые были обновлены
skipped:
type: array
items:
$ref: '#/components/schemas/GoalItem'
description: Цели которые не были обработаны
security:
- SessionAuth: [ ]