diff --git a/v2/swagger.yaml b/v2/swagger.yaml index f579f3a..0a09b4e 100644 --- a/v2/swagger.yaml +++ b/v2/swagger.yaml @@ -428,6 +428,59 @@ paths: 500: description: Server Error + /employment/set-main: + post: + tags: + - employment + summary: Set main employment + operationId: /calendar-event-request + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + employment_id: + type: string + format: uuid + description: User employment ID + responses: + 200: + description: User employments data + content: + application/json: + schema: + type: object + properties: + success: + description: Result status. + type: boolean + example: true + message: + description: Message displayed to user (localized). + type: string + default: null + example: { + "type": "success", + "text": "Запись установлена основной!" + } + errors: + description: Array of validation errors. + type: array + default: null + data: + type: object + default: null + 401: + description: Unauthorized request + 403: + description: Unauthorized request + 404: + description: User not found + 500: + description: Server Error + /user-group/items: get: tags: @@ -1468,6 +1521,365 @@ paths: 500: description: Server Error. + /calendar-event-type: + get: + tags: + - calendarEventType + summary: Calendar event type index. + operationId: /calendar-event-type + parameters: + - name: name + in: query + description: Название типа события (like). + schema: + type: string + example: Тренинг + - name: is_used + in: query + description: Тип события выбран в каком-либо событии + schema: + type: boolean + example: true + - name: type_id + in: query + description: 1 - CORPORATE, 2 - TRAINING, 3 - MEET, 4 - PUBLIC_HOLIDAY, 5 - EVENT (All custom types), 6 - WEBINAR + schema: + type: integer + example: 1 + responses: + 200: + description: Calendar event type index. + content: + application/json: + schema: + properties: + data: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + example: "Корпоративное мероприятие" + background_color: + type: string + example: "#F1D46E" + text_color: + type: string + example: "#000000" + _links: + $ref: '#/components/schemas/_links' + _meta: + $ref: '#/components/schemas/_meta' + 400: + description: Bad Request. + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 404: + description: Calendar event type not found. + 500: + description: Server Error. + + /calendar/view: + get: + tags: + - calendar + summary: Details about calendar event. + operationId: /calendar/view + parameters: + - name: id + in: query + description: Calendar event item ID. + schema: + type: string + - name: parent_id + in: query + description: Calendar event parent item ID. + schema: + type: string + - name: rec_date + in: query + description: Calendar event recurring date. + schema: + type: string + responses: + 200: + description: Calendar event details. + content: + application/json: + schema: + properties: + data: + items: + allOf: + - $ref: '#/components/schemas/calendarEvent' + - type: object + properties: + calendar_event_type_id: + type: string + format: uuid + calendar_event_type: + $ref: '#/components/schemas/calendarEventType' + calendarEventUser: + $ref: '#/components/schemas/calendarEventUser' + calendarEventBid: + $ref: '#/components/schemas/calendarEventBid' + hasCalendarEventBid: + type: boolean + canCreateCalendarEventBid: + type: boolean + 400: + description: Bad Request. + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 404: + description: Calendar event not found. + 500: + description: Server Error. + + /calendar: + get: + tags: + - calendar + summary: Calendar event index. + operationId: /calendar/index + parameters: + - name: title + in: query + schema: + type: string + - name: title_exact + in: query + schema: + type: string + - name: start_date_time + in: query + description: Default current month + schema: + type: string + example: '2023-01-01 10:00:00' + - name: end_date_time + in: query + description: Default current month +3 month + schema: + type: string + example: '2023-04-01 10:00:00' + - name: calendar_event_type_id + in: query + description: ID типа события из `/calendar-event-type` + schema: + type: string + format: uuid + example: '9f7063d1-959e-4c32-b186-313576375739' + - name: entity_id + in: query + description: Communication with entities, for example, is used in meeting places. 1030 - MeetingPlace + schema: + type: integer + - name: calendar_event_entity_item_id + in: query + schema: + type: string + - name: user_id + in: query + schema: + type: string + - name: visible_to + in: query + description: Visible to user group + schema: + type: string + example: '9f7063d1-959e-4c32-b186-313576375739,3a7539cb-d85e-4455-af41-fc505d1ce6dd' + responses: + 200: + description: Calendar event index. + content: + application/json: + schema: + properties: + data: + type: array + items: + allOf: + - $ref: '#/components/schemas/calendarEvent' + - type: object + properties: + calendar_event_type_id: + type: string + format: uuid + calendar_event_type: + $ref: '#/components/schemas/calendarEventType' + 400: + description: Bad Request. + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 404: + description: Calendar event not found. + 500: + description: Server Error. + + /calendar/items: + get: + tags: + - calendar + summary: Calendar event items. + operationId: /calendar/items + parameters: + - name: q + in: query + schema: + type: string + - name: calendar_event_type_id + in: query + description: ID типа события из `/calendar-event-type` + schema: + type: string + format: uuid + example: '9f7063d1-959e-4c32-b186-313576375739' + - name: entity_id + in: query + description: Communication with entities, for example, is used in meeting places. 1030 - MeetingPlace + schema: + type: integer + example: 1030 + - name: calendar_event_entity_item_id + in: query + schema: + type: string + example: 9f7063d1-959e-4c32-b186-313576375739 + - name: user_id + in: query + schema: + type: string + example: 9f7063d1-959e-4c32-b186-313576375739 + - name: visible_to + in: query + description: Visible to user group + schema: + type: string + example: 9f7063d1-959e-4c32-b186-313576375739,3a7539cb-d85e-4455-af41-fc505d1ce6dd + responses: + 200: + description: Calendar event items. + content: + application/json: + schema: + properties: + data: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + title: + type: string + 400: + description: Bad Request. + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 404: + description: Calendar event not found. + 500: + description: Server Error. + + /calendar/my: + get: + tags: + - calendar + summary: Calendar event my. + operationId: /calendar/my + parameters: + - name: title + in: query + schema: + type: string + - name: title_exact + in: query + schema: + type: string + - name: start_date_time + in: query + description: Default current month + schema: + type: string + example: '2023-01-01 10:00:00' + - name: end_date_time + in: query + description: Default current month +3 month + schema: + type: string + example: '2023-04-01 10:00:00' + - name: calendar_event_type_id + in: query + description: ID типа события из `/calendar-event-type` + schema: + type: string + format: uuid + example: '9f7063d1-959e-4c32-b186-313576375739' + - name: entity_id + in: query + example: 1030 + description: Communication with entities, for example, is used in meeting places. 1030 - MeetingPlace + schema: + type: integer + - name: calendar_event_entity_item_id + in: query + schema: + type: string + - name: user_id + in: query + schema: + type: string + example: 9f7063d1-959e-4c32-b186-313576375739 + - name: visible_to + in: query + description: Visible to user group + schema: + type: string + example: '9f7063d1-959e-4c32-b186-313576375739,3a7539cb-d85e-4455-af41-fc505d1ce6dd' + responses: + 200: + description: Calendar event index. + content: + application/json: + schema: + properties: + data: + type: array + items: + allOf: + - $ref: '#/components/schemas/calendarEvent' + - type: object + properties: + calendar_event_type_id: + type: string + format: uuid + calendar_event_type: + $ref: '#/components/schemas/calendarEventType' + 400: + description: Bad Request. + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 404: + description: Calendar event not found. + 500: + description: Server Error. + /moderation: get: tags: @@ -2312,7 +2724,7 @@ paths: tags: - category summary: Список вариантов отображения содержимого категории. - operationId: /category/thumb-style + operationId: /category/content-style responses: 200: description: Список категорий. @@ -3478,6 +3890,22 @@ components: items: $ref: '#/components/schemas/tag' + calendarEventType: + type: object + properties: + id: + type: string + example: "ebe2bc69-b451-4006-8020-cc145eafe60c" + name: + type: string + example: "Тренинг" + background_color: + type: string + example: "#A4D4DE" + text_color: + type: string + example: "#000000" + calendarEvent: type: object properties: