From cf3fdd71a6d1b12325d2d7fecd393d8e5c2da385 Mon Sep 17 00:00:00 2001 From: Anton Pomorzin Date: Wed, 7 Aug 2024 23:51:11 +0500 Subject: [PATCH] =?UTF-8?q?feat:=20api=20=D0=BD=D0=BE=D0=B2=D0=B8=D1=87?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2,=20=D0=B4=D1=80,=20=D0=B3=D0=BE=D0=B4=D0=BE?= =?UTF-8?q?=D0=B2=D1=89=D0=B8=D0=BD=20=D0=B2=20=D0=BA=D0=BE=D0=BC=D0=BF?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v2/swagger.yaml | 308 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 307 insertions(+), 1 deletion(-) diff --git a/v2/swagger.yaml b/v2/swagger.yaml index 022800c..0ee813e 100644 --- a/v2/swagger.yaml +++ b/v2/swagger.yaml @@ -2755,6 +2755,206 @@ paths: 500: description: Server Error. + /newbies/index: + get: + tags: + - MdWidgets + summary: Список новичков + operationId: /newbies/index + parameters: + - $ref: '#/components/parameters/boardDateTypeParam' + - $ref: '#/components/parameters/boardDateDayParam' + - $ref: '#/components/parameters/boardDateWeekParam' + - $ref: '#/components/parameters/boardDateMonthParam' + - $ref: '#/components/parameters/boardDateYearParam' + responses: + 200: + description: MdWidget Items. + 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: '' + errors: + description: Array of validation errors. + type: array + default: null + data: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/mdWidgetUserItem' + - type: object + properties: + itemDate: + description: Date Birthday + type: string + format: date + example: 18 july + _links: + $ref: '#/components/schemas/_links' + _meta: + $ref: '#/components/schemas/_meta' + _periodUrls: + $ref: '#/components/schemas/_periodUrls' + 400: + description: Bad Request. + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 500: + description: Server Error. + + /birthday/index: + get: + tags: + - MdWidgets + summary: Список дней рождений + operationId: /birthday/index + parameters: + - $ref: '#/components/parameters/boardDateTypeParam' + - $ref: '#/components/parameters/boardDateDayParam' + - $ref: '#/components/parameters/boardDateWeekParam' + - $ref: '#/components/parameters/boardDateMonthParam' + - $ref: '#/components/parameters/boardDateYearParam' + responses: + 200: + description: MdWidget Items. + 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: '' + errors: + description: Array of validation errors. + type: array + default: null + data: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/mdWidgetUserItem' + - type: object + properties: + itemDate: + description: Employment date + type: string + format: date + example: 1 july + _links: + $ref: '#/components/schemas/_links' + _meta: + $ref: '#/components/schemas/_meta' + _periodUrls: + $ref: '#/components/schemas/_periodUrls' + 400: + description: Bad Request. + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 500: + description: Server Error. + + /experienced/index: + get: + tags: + - MdWidgets + summary: Список годовщин по стажу в компании + operationId: /experienced/index + parameters: + - $ref: '#/components/parameters/boardDateTypeParam' + - $ref: '#/components/parameters/boardDateDayParam' + - $ref: '#/components/parameters/boardDateWeekParam' + - $ref: '#/components/parameters/boardDateMonthParam' + - $ref: '#/components/parameters/boardDateYearParam' + responses: + 200: + description: MdWidget Items. + content: + application/json: + schema: + properties: + success: + description: Result status. + type: boolean + example: true + message: + description: Message displayed to user (localized). + type: string + default: null + example: '' + errors: + description: Array of validation errors. + type: array + default: null + data: + type: array + items: + type: object + allOf: + - $ref: '#/components/schemas/mdWidgetUserItem' + - type: object + properties: + itemDate: + description: Work anniversary date + type: string + format: date + example: 18 july + data: + type: object + properties: + date: + description: Work anniversary date + type: string + format: date + example: 18 july + experience: + description: Number of years of experience + type: string + format: date + example: 18 july + experienceFormat: + description: Number of years of experience formatted + type: string + format: date + example: 2 year + _links: + $ref: '#/components/schemas/_links' + _meta: + $ref: '#/components/schemas/_meta' + _periodUrls: + $ref: '#/components/schemas/_periodUrls' + 400: + description: Bad Request. + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 500: + description: Server Error. + components: schemas: _meta: @@ -2805,6 +3005,28 @@ components: href: type: string + _periodUrls: + type: object + properties: + currentDate: + description: Link to current period. + type: object + properties: + href: + type: string + nextDate: + description: Link to next period. + type: object + properties: + href: + type: string + prevDate: + description: Link to prev period. + type: object + properties: + href: + type: string + arrayOfIds: type: object properties: @@ -6093,4 +6315,88 @@ components: example: Example text shopOrderCancelResponse: - $ref: '#/components/schemas/apiDefaultResponse' \ No newline at end of file + $ref: '#/components/schemas/apiDefaultResponse' + + mdWidgetUserItem: + type: object + properties: + id: + description: User ID + type: string + format: uuid + example: 195e1707-3f5d-4780-8dc1-b1023e1f974f + itemTitle: + description: User name + type: string + itemUrl: + description: User profile URL + type: string + example: https://hrenot.hrnox.io/core/user/view?id=5bc40c54-da74-4d5b-ac24-123374dc1a5a + itemImageUrl: + description: User avatar URL + type: string + example: https://hrenot.hrnox.io/file/user-face/5bc40c54-da74-4d5b-ac24-123374dc1a5a/300.jpg + itemEntityId: + description: Entity ID + type: number + example: 1 + itemTip: + description: User position + type: string + example: CEO + itemDate: + description: Date board item + type: string + format: date + example: 19 july + data: + type: object + properties: + position: + description: User position + type: string + example: CEO + departmentName: + description: User department name + type: string + example: 'New Department' + + parameters: + boardDateTypeParam: + in: query + name: type + description: 1 - За день, 2 - За неделю, 3 - За месяц. + required: true + schema: + type: integer + enum: [1, 2, 3] + example: 2 + boardDateDayParam: + name: day + in: query + description: Число месяца (обязателен для списка за день) + schema: + type: integer + example: 15 + boardDateWeekParam: + name: week + in: query + description: Номер недели в году (обязателен для спика за неделю) + schema: + type: integer + example: 27 + boardDateMonthParam: + name: month + in: query + description: Месяц (обязателен для списка по дням и месяцам) + schema: + type: integer + example: 7 + boardDateYearParam: + name: year + in: query + description: Год (обязателен всегда) + required: true + schema: + type: integer + example: 2024 \ No newline at end of file -- 2.54.0