From a26764eda327c57282cc6d4173218bd2860464d5 Mon Sep 17 00:00:00 2001 From: mitrikov Date: Tue, 15 Jul 2025 12:58:50 +1200 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=94=D0=BE=D0=BA=D1=83=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=D1=86=D0=B8=D1=8F=20=D1=83=D1=81=D0=BB=D1=83?= =?UTF-8?q?=D0=B3=20v2=20(Duty)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v2/swagger.yaml | 236 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) diff --git a/v2/swagger.yaml b/v2/swagger.yaml index 43a778f..a87386e 100644 --- a/v2/swagger.yaml +++ b/v2/swagger.yaml @@ -4052,6 +4052,209 @@ paths: 500: description: Server Error. + /duty/index: + get: + tags: + - Duty + summary: Список доступных услуг + operationId: /duty/index + parameters: + - name: id + in: query + description: Идентификатор (UUID), либо их массив через запятую + required: false + schema: + oneOf: + - type: string + format: uuid + - type: array + items: + type: string + format: uuid + - name: not_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 + - name: name + in: query + description: Поиск по имени услуги + schema: + type: string + maxLength: 64 + responses: + 200: + description: Список доступных услуг + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/dataProviderResponse' + - type: object + properties: + data: + $ref: '#/components/schemas/dutyItem' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 404: + description: Not found. + 500: + description: Server Error. + + /user-duty/index: + get: + tags: + - Duty + summary: Список услуг, привязанных к пользователю + operationId: /user-duty/index + parameters: + - name: id + in: query + description: Идентификатор (UUID), либо их массив через запятую + required: false + schema: + oneOf: + - type: string + format: uuid + - type: array + items: + type: string + format: uuid + - name: not_id + in: query + description: Идентификатор (UUID), либо их массив через запятую + required: false + schema: + oneOf: + - type: string + format: uuid + - type: array + items: + type: string + format: uuid + - name: name + in: query + description: Поиск по имени услуги + schema: + type: string + maxLength: 64 + responses: + 200: + description: Список доступных услуг + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/dataProviderResponse' + - type: object + properties: + data: + $ref: '#/components/schemas/dutyItem' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 404: + description: Not found. + 500: + description: Server Error. + + /user-duty/add: + post: + tags: + - Duty + summary: Привязка услуг к пользователю + operationId: /user-duty/index + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + id: + description: Идентификатор (UUID), либо их массив + oneOf: + - type: string + format: uuid + - type: array + items: + type: string + format: uuid + required: + - id + responses: + 200: + description: Ответ сервера + content: + application/json: + schema: + $ref: '#/components/schemas/httpJsonResponse' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 422: + description: Data validation failed. + 500: + description: Server Error. + + /user-duty/remove: + post: + tags: + - Duty + summary: Удаление привязанных услуг у пользователя + operationId: /user-duty/remove + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + id: + description: Идентификатор (UUID), либо их массив + oneOf: + - type: string + format: uuid + - type: array + items: + type: string + format: uuid + required: + - id + responses: + 200: + description: Ответ сервера + content: + application/json: + schema: + $ref: '#/components/schemas/httpJsonResponse' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 422: + description: Data validation failed. + 500: + description: Server Error. + /newbies/index: get: tags: @@ -5382,6 +5585,17 @@ components: nullable: true example: '' + dataProviderResponse: + type: object + properties: + data: + type: object + description: Response data + _links: + $ref: '#/components/schemas/_links' + _meta: + $ref: '#/components/schemas/_meta' + _meta: type: object properties: @@ -9436,6 +9650,28 @@ components: type: string description: Рейтинг цели + dutyItem: + type: object + properties: + id: + type: string + format: uuid + example: "073f11ed-3329-4c95-9966-f25b15846ea2" + name: + type: string + example: "Услуга 1" + status_id: + type: integer + example: 1 + created_at: + type: string + format: date-time + example: "2025-07-11 07:57:19" + created_user_id: + type: string + format: uuid + example: "c73f48dd-ae57-496e-b973-20d048651f70" + parameters: boardDateTypeParam: in: query -- 2.54.0