From 5df0d6990fedcd220718ed2f50a0aa9f2d868f38 Mon Sep 17 00:00:00 2001 From: mitrikov Date: Thu, 2 Oct 2025 15:35:15 +1200 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B7=D0=B0=D0=BC=D0=B5=D1=82=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=BE=20=D1=81=D0=BE=D1=82=D1=80=D1=83=D0=B4?= =?UTF-8?q?=D0=BD=D0=B8=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v2/swagger.yaml | 253 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) diff --git a/v2/swagger.yaml b/v2/swagger.yaml index eb8826d..b1d7008 100644 --- a/v2/swagger.yaml +++ b/v2/swagger.yaml @@ -4235,6 +4235,13 @@ paths: items: type: string format: uuid + - name: without_added + in: query + description: Исключить из выдачи уже добавленные к пользователю услуги + required: false + schema: + type: integer + enum: [ 0, 1 ] - name: not_id in: query description: Идентификатор (UUID), либо их массив через запятую @@ -6147,6 +6154,173 @@ paths: 500: description: Server Error + /user-note: + get: + tags: + - UserNote + summary: Список заметок о пользователях + operationId: /user-note/index + parameters: + - name: id + in: query + description: Идентификатор заметки (UUID), либо их массив через запятую + required: false + schema: + oneOf: + - type: string + format: uuid + - type: array + items: + type: string + format: uuid + - name: user_id + in: query + description: Идентификатор пользователя (UUID) либо их массив + required: false + schema: + type: string + format: uuid + responses: + 200: + description: Список заметок о пользователях + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/dataProviderResponse' + - type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/userNoteItem' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 404: + description: Not found. + 500: + description: Server Error. + + /user-note/add: + post: + tags: + - UserNote + summary: Создание новой заметки о пользователе + operationId: /user-note/add + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/userNoteUpdateRequest' + responses: + 200: + description: Заметка успешно создана + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/httpJsonResponse' + - type: object + properties: + data: + type: object + properties: + note: + $ref: '#/components/schemas/userNoteItem' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 403: + description: Forbidden. + 422: + description: Validation Error. + 500: + description: Server Error. + + /user-note/update: + post: + tags: + - UserNote + summary: Обновление заметки о пользователе + operationId: /user-note/update + parameters: + - name: id + in: query + description: Идентификатор заметки (UUID) + required: true + schema: + type: string + format: uuid + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/userNoteUpdateRequest' + responses: + 200: + description: Заметка успешно обновлена + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/httpJsonResponse' + - type: object + properties: + data: + type: object + properties: + note: + $ref: '#/components/schemas/userNoteItem' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 403: + description: Forbidden. + 404: + description: Note not found. + 422: + description: Validation Error. + 500: + description: Server Error. + + /user-note/delete: + post: + tags: + - UserNote + summary: Удаление заметки о пользователе + operationId: /user-note/delete + parameters: + - name: id + in: query + description: Идентификатор заметки (UUID) + required: true + schema: + type: string + format: uuid + responses: + 200: + description: Заметка успешно удалена + content: + application/json: + schema: + $ref: '#/components/schemas/httpJsonResponse' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 403: + description: Forbidden. + 404: + description: Note not found. + 500: + description: Server Error. + components: securitySchemes: SessionAuth: @@ -10714,6 +10888,85 @@ components: nullable: true example: 'Покупка в магазине' + userNoteItem: + type: object + properties: + id: + type: string + format: uuid + description: Идентификатор заметки + example: "123e4567-e89b-12d3-a456-426614174000" + created_at: + type: string + format: date-time + description: Дата создания + example: "2023-10-01 10:30:00" + updated_at: + type: string + format: date-time + description: Дата обновления + example: "2023-10-01 10:30:00" + created_user_id: + type: string + format: uuid + description: Идентификатор автора заметки + example: "123e4567-e89b-12d3-a456-426614174001" + updated_user_id: + type: string + format: uuid + description: Идентификатор пользователя, обновившего заметку + example: "123e4567-e89b-12d3-a456-426614174001" + user_id: + type: string + format: uuid + description: Идентификатор пользователя, о котором заметка + example: "123e4567-e89b-12d3-a456-426614174002" + text: + type: string + nullable: true + description: Текстовое содержимое заметки (устаревшее поле) + example: "Важная заметка о пользователе" + content_json: + type: object + content_html: + type: string + nullable: true + description: Рендеренный HTML контент + example: "

Важная заметка о пользователе

" + files: + type: array + items: + $ref: '#/components/schemas/fileObject' + description: Прикрепленные файлы (извлеченные из content_json) + createdAt: + type: string + nullable: true + description: Локализованная дата создания + example: "01.10.2023 10:30" + createdUser: + $ref: '#/components/schemas/userInfo' + createdUserLabel: + type: string + description: HTML ссылка на автора заметки + example: 'Иван Иванов' + + userNoteUpdateRequest: + type: object + required: + - message + properties: + message: + type: string + maxLength: 2000 + description: Текст заметки + example: "Заметка о пользователе" + files: + type: array + items: + $ref: '#/components/schemas/fileObject' + description: Прикрепляемые файлы + maxItems: 10 + parameters: boardDateTypeParam: in: query