diff --git a/v2/swagger.yaml b/v2/swagger.yaml index 0aa21c2..022800c 100644 --- a/v2/swagger.yaml +++ b/v2/swagger.yaml @@ -49,6 +49,12 @@ tags: description: Methods for getting user statuses data - name: comment description: Methods for working with comments + - name: category + description: Methods for working with categories. Требуется право доступа show-content-categories "Видеть категории". + - name: wallet + description: Methods for working with user wallet. + - name: shop + description: Methods for working with corporate shop. Требуется право доступа shop-usage "Магазин". paths: /mobile/bind/{id}/{token}: @@ -299,6 +305,26 @@ paths: 500: description: Server Error + /mobile/tenant-info: + get: + tags: + - mobile + summary: Get tenant info. + operationId: tenantInfo + responses: + 200: + description: Tenant info data. + content: + application/json: + schema: + $ref: '#/components/schemas/tenantInfo' + 401: + description: Unauthorized request. + 403: + description: Unauthorized request. + 500: + description: Server Error. + /user/profile: get: tags: @@ -962,7 +988,6 @@ paths: description: User ID from which the feedback will be created. type: string example: cd1a4391-9fa7-4ae3-80c1-f9b46ad1838d - required: false type: description: Entity type. type: string @@ -970,30 +995,29 @@ paths: - department - user example: department - required: true + # required: true id: description: Entity id. type: string example: cd1a4391-9fa7-4ae3-80c1-f9b46ad1838d - required: true + # required: true score: description: Feedback score. type: number minimum: 1 maximum: 5 example: 5 - required: true + # required: true text: description: Feedback text. type: string example: Example text. - required: true + # required: true isAnonymous: description: Anonymous feedback. type: boolean example: true default: false - required: false responses: 200: description: Returns the success status and data of the generated feedback. @@ -2232,6 +2256,505 @@ paths: 500: description: Server Error. + /category/thumb-style: + get: + tags: + - category + summary: Список вариантов отображения превью категории. + operationId: /category/thumb-style + responses: + 200: + description: Список категорий. + content: + application/json: + schema: + $ref: '#/components/schemas/type' + 401: + description: Unauthorized. + 403: + description: Forbidden. + 500: + description: Internal Server Error. + + /category/content-style: + get: + tags: + - category + summary: Список вариантов отображения содержимого категории. + operationId: /category/thumb-style + responses: + 200: + description: Список категорий. + content: + application/json: + schema: + $ref: '#/components/schemas/type' + 401: + description: Unauthorized. + 403: + description: Forbidden. + 500: + description: Internal Server Error. + + /category/root: + get: + tags: + - category + summary: Список корневых категорий. + operationId: /category/root + responses: + 200: + description: Список категорий. + content: + application/json: + schema: + $ref: '#/components/schemas/categoryRoot' + 401: + description: Unauthorized. + 403: + description: Forbidden. + 500: + description: Internal Server Error. + + /category/index: + get: + tags: + - category + summary: Список категорий. + operationId: /category/index + parameters: + - name: root_id + in: query + description: Category root ID. + required: true + schema: + type: string + responses: + 200: + description: Returns pagination and array of objects. + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/category' + _links: + $ref: '#/components/schemas/_links' + _meta: + $ref: '#/components/schemas/_meta' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 403: + description: Forbidden. Возвращается если tenantInfo.modules.shop.isModuleEnabled равен false. + 500: + description: Internal Server Error. + + /wallet/info: + get: + tags: + - wallet + summary: Данные кошелька пользователя. Требуется право доступа wallet "Кошелек". + operationId: /wallet/info + responses: + 200: + description: Список категорий. + content: + application/json: + schema: + $ref: '#/components/schemas/wallet' + 401: + description: Unauthorized. + 403: + description: Forbidden. + 500: + description: Internal Server Error. + + /shop/product/sort-type: + get: + tags: + - shop + summary: Список типов сортировки товара на странице витрины магазина. + operationId: /shop/product/sort-type + responses: + 200: + description: Список типов сортировки товара. + content: + application/json: + schema: + $ref: '#/components/schemas/shopProductSortType' + 401: + description: Unauthorized. + 403: + description: Forbidden. Возвращается если tenantInfo.modules.shop.isModuleEnabled равен false. + 500: + description: Internal Server Error. + + /shop/product/index: + get: + tags: + - shop + summary: Список товаров. + operationId: /shop/product/index + parameters: + - name: sort + in: query + description: Тип сортировки товара. + schema: + type: string + - name: title + in: query + description: Название товара. + schema: + type: string + - name: category_id + in: query + description: Идентификатор категории. + schema: + type: string + format: uuid + example: 76080562-3a5e-4826-8799-7638b775bcd0 + responses: + 200: + description: Returns pagination and array of objects. + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/shopProductIndex' + _links: + $ref: '#/components/schemas/_links' + _meta: + $ref: '#/components/schemas/_meta' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 403: + description: Forbidden. Возвращается если tenantInfo.modules.shop.isModuleEnabled равен false. + 500: + description: Internal Server Error. + + /shop/product/view: + get: + tags: + - shop + summary: Детали товара. Нужно обязательно передать id либо option_id товара. + operationId: /shop/product/view + parameters: + - name: id + in: query + description: Product ID. + required: true + schema: + type: string + format: uuid + example: 76080562-3a5e-4826-8799-7638b775bcd0 + - name: option_id + in: query + description: Product option ID. + required: true + schema: + type: string + format: uuid + example: e25ea810-bbc2-4b1e-84ca-8ed56d4594ec + responses: + 200: + description: Product object. + content: + application/json: + schema: + $ref: '#/components/schemas/shopProductView' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 403: + description: Forbidden. Возвращается если tenantInfo.modules.shop.isModuleEnabled равен false. + 404: + description: Not found. + 500: + description: Internal Server Error. + + /shop/order/statuses: + get: + tags: + - shop + summary: Получение списка статусов заказа. + operationId: /shop/order/statuses + responses: + 200: + description: Список статусов заказа. + content: + application/json: + schema: + $ref: '#/components/schemas/status' + 401: + description: Unauthorized. + 403: + description: Forbidden. Возвращается если tenantInfo.modules.shop.isModuleEnabled равен false. + 500: + description: Internal Server Error. + + /shop/order/delivery-addresses: + get: + tags: + - shop + summary: Получение списка адресов для доставки заказа. + operationId: /shop/order/delivery-addresses + responses: + 200: + description: Список адресов для доставки заказа. + content: + application/json: + schema: + $ref: '#/components/schemas/shopOrderDeliveryAddresses' + 401: + description: Unauthorized. + 403: + description: Forbidden. Возвращается если tenantInfo.modules.shop.isModuleEnabled равен false. + 500: + description: Internal Server Error. + + /shop/order/index: + get: + tags: + - shop + summary: Список заказов. + operationId: /shop/order/index + parameters: + - name: num + in: query + description: Order number. + schema: + type: string + example: 1 + - name: created_at + in: query + description: Creation date range. + schema: + type: string + example: 2024-01-01|2024-01-01 + - name: order_status_id + in: query + description: Order status ID. + schema: + type: string + example: 1 + responses: + 200: + description: Returns pagination and array of objects. + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/shopOrderIndex' + _links: + $ref: '#/components/schemas/_links' + _meta: + $ref: '#/components/schemas/_meta' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 403: + description: Forbidden. Возвращается если tenantInfo.modules.shop.isModuleEnabled равен false. + 500: + description: Internal Server Error. + + /shop/order/view: + get: + tags: + - shop + summary: Данные заказа. + operationId: /shop/order/view + parameters: + - name: id + in: query + description: Order ID. + required: true + schema: + type: string + format: uuid + example: 0310635d-2c72-4219-9038-bf2ac8f14206 + responses: + 200: + description: Order object. + content: + application/json: + schema: + $ref: '#/components/schemas/shopOrderView' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 403: + description: Forbidden. Возвращается если tenantInfo.modules.shop.isModuleEnabled равен false. + 404: + description: Not found. + 500: + description: Internal Server Error. + + /shop/order/checkout: + post: + tags: + - shop + summary: Создание заказа. + operationId: /shop/order/checkout + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/shopOrderCheckoutRequestBody' + responses: + 200: + description: Text + content: + application/json: + schema: + $ref: '#/components/schemas/shopOrderCheckoutResponse' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 500: + description: Server Error. + + /shop/order/position-remove: + post: + tags: + - shop + summary: Удаление позиции заказа. + operationId: /shop/order/position-remove + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/shopOrderPositionRemoveRequestBody' + responses: + 200: + description: Return success result. + content: + application/json: + schema: + $ref: '#/components/schemas/shopOrderPositionRemoveResponse' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 404: + description: Not found. + 500: + description: Server Error. + + /shop/order/position-restore: + post: + tags: + - shop + summary: Восстановить удаленную позицию заказа. + operationId: /shop/order/position-restore + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/shopOrderPositionRestoreRequestBody' + responses: + 200: + description: Return success result. + content: + application/json: + schema: + $ref: '#/components/schemas/shopOrderPositionRestoreResponse' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 404: + description: Not found. + 500: + description: Server Error. + + /shop/order/position-change-comment: + post: + tags: + - shop + summary: Изменить комментарий к позиции заказа. + operationId: /shop/order/position-change-comment + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/shopOrderPositionChangeCommentRequestBody' + responses: + 200: + description: Return success result. + content: + application/json: + schema: + $ref: '#/components/schemas/shopOrderPositionChangeCommentResponse' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 404: + description: Not found. + 500: + description: Server Error. + + /shop/order/cancel: + post: + tags: + - shop + summary: Отменить заказ. + operationId: /shop/order/cancel + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/shopOrderCancelRequestBody' + responses: + 200: + description: Return success result. + content: + application/json: + schema: + $ref: '#/components/schemas/shopOrderCancelResponse' + 400: + description: Bad Request. + 401: + description: Unauthorized. + 404: + description: Not found. + 500: + description: Server Error. + components: schemas: _meta: @@ -2294,6 +2817,19 @@ components: - '53f2d03c-303a-4a3c-b57f-f7fb62fee538' - '42862a16-affa-4ba5-86c5-61376f46d695' + type: + description: Type model. + type: object + properties: + id: + description: Type ID. + type: integer + example: 1 + name: + description: Type name (localized). + type: string + example: Type name + status: description: Status. type: object @@ -2380,35 +2916,98 @@ components: tenantInfo: type: object properties: - endpoint: - type: string - default: https://demo.hrbox.io/api/v2 tenantId: type: integer format: int64 - default: 101 + example: 2 tenantName: type: string - default: Demo Company + example: HRBOX demo + supportEmail: + type: string + example: help@hrbox.io domain: type: string - default: demo.hrbox.io + example: demo.hrbox.io + endpoint: + type: string + example: https://demo.hrbox.io/api/v2 + authAdditional: + description: Дополнительная авторизация (пин/биометрия) для мобильного приложения + type: boolean + example: true + primaryColor: + type: string + example: "#08D8D2" brandColor: type: string - default: #FF0000 + example: "#FF0000" logoUrl: type: string - default: https://demo.hrbox.io/logo.png + example: https://demo.hrbox.io/file/resize/600x0/f2a84060-d386-4c5f-9290-e3af1ede6334.png logoSqUrl: type: string - default: https://demo.hrbox.io/logo-sq.png + example: https://demo.hrbox.io/file/resize/60x60/f9b0986b-5bd6-4923-8242-a810a20e7918.png + style: + type: object + properties: + colorPrimary: + description: Основной цвет + type: string + example: "#08D8D2" + colorBrand: + description: Цвет шапки + type: string + example: "#FFFFFF" + colorBrand2: + description: Цвет меню + type: string + example: "#08D8D2" + colorAccent: + description: Акцент + type: string + example: "#FFDD5C" + colorBrandText: + description: Цвет текста шапки + type: string + example: "#151B30" + colorBrand2Text: + description: Цвет текста меню + type: string + example: "#FFFFFF" + colorAccentText: + description: Текст на акценте + type: string + example: "#FFFFFF" + logoOnLoginId: + type: string + example: + logoId: + type: string + example: f2a84060-d386-4c5f-9290-e3af1ede6334.png + logoSquareId: + type: string + example: f9b0986b-5bd6-4923-8242-a810a20e7918.png + imagePlaceholderId: + type: string + example: 61e7ef28-f8ba-4c23-bc7c-80a0a792c10e.png + language: + type: string + example: ru + timezone: + type: string + example: Europe/Moscow modules: type: object properties: + currency: + $ref: '#/components/schemas/tenantInfoModuleCurrency' userStatus: $ref: '#/components/schemas/tenantInfoModuleUserStatus' idea: $ref: '#/components/schemas/tenantInfoModuleIdea' + shop: + $ref: '#/components/schemas/tenantInfoModuleShop' xml: name: tenantInfo @@ -4201,6 +4800,26 @@ components: type: boolean example: true + tenantInfoModuleShop: + description: Настройки модуля корпоративного магазина. + type: object + properties: + isModuleEnabled: + description: Модуль корпоративного магазина вкл/выкл. + type: boolean + example: true + default: false + isZeroCountProductsVisible: + description: Отображать на витрине товары с нулевым количеством. + type: boolean + example: true + default: false + isAllowCustomDeliveryAddress: + description: Разрешить пользователям указывать собственный адрес доставки. + type: boolean + example: true + default: false + ideaStatuses: description: > Список статусов идеи: @@ -4528,6 +5147,34 @@ components: - '53f2d03c-303a-4a3c-b57f-f7fb62fee538' - '42862a16-affa-4ba5-86c5-61376f46d695' + tenantInfoModuleCurrency: + description: Настройки модуля корпоративной валюты. + type: object + properties: + isModuleEnabled: + description: Модуль корпоративной валюты вкл/выкл. + type: boolean + example: true + default: false + currencyName: + description: Название корпоративной валюты. + type: string + example: HRенотики + currencyCode: + description: Буквенный код валюты. + type: string + example: HRE + isWalletBalanceVisibleInUserProfile: + description: Отображать баланс кошелька в профиле пользователя. + type: boolean + example: true + default: false + isAllowToUseCurrencyInAchievements: + description: Корпоративная валюта в достижениях. + type: boolean + example: false + default: false + tenantInfoModuleUserStatus: description: Настройки модуля статусов пользователей. type: object @@ -4791,12 +5438,12 @@ components: properties: entity_id: description: Entity ID. - required: true + # required: true type: number example: 1 reference_id: description: Reference ID. - required: true + # required: true type: string format: uuid example: edee4e11-dab5-4aac-93ac-43c379aab6b2 @@ -4807,7 +5454,7 @@ components: default: null message: description: Comment text. - required: true + # required: true type: string example: Test maxLength: 2000 @@ -4845,7 +5492,7 @@ components: example: false comment: $ref: '#/components/schemas/commentView' - + fileIndex: type: object properties: @@ -4904,9 +5551,546 @@ components: example: image/png size: description: File size. - type: int + type: integer example: 7894 shortSize: description: File format size. type: string example: 7,894 КБ + + categoryRoot: + type: array + items: + description: Categories list. + type: object + properties: + id: + description: Category ID. + type: integer + example: 1 + name: + description: Category name (localized). + type: string + example: Category 1 + + category: + type: object + properties: + id: + description: Category ID. + type: string + format: uuid + example: 76080562-3a5e-4826-8799-7638b775bcd0 + title: + description: Category title. + type: string + example: Category 1 + description: + description: Category description. + type: string + example: Description text + status_id: + description: Category status ID. + type: number + example: 1 + root_id: + description: Category root ID. + type: number + example: 1 + hash_id: + description: Category hash ID. + type: string + example: 6c91d43fd9 + thumb_style_id: + description: Category thumb style ID. + type: number + example: 1 + content_style_id: + description: Category content style ID. + type: number + example: 1 + iconUrl: + description: Category icon URL. + type: string + example: http://hr.lh/img/nophoto.png + thumbUrl: + description: Category thumb URL. + type: string + example: http://hr.lh/img/nophoto.png + imageUrl: + description: Category image URL. + type: string + example: http://hr.lh/img/noarticle.png + + wallet: + type: object + properties: + id: + description: Wallet ID. + type: string + format: uuid + example: 485781ba-95a1-4c5c-9210-7a895ac7dc0e + status_id: + description: Wallet status ID. + type: number + example: 1 + user_id: + description: User ID. + type: string + format: uuid + example: 070ca51a-2363-419e-bfe0-48fce85acfa5 + balance: + description: Wallet balance. + type: number + example: 1 + + shopProductSortType: + type: array + items: + description: Sort types. + type: object + properties: + id: + description: Sort type ID. + type: string + example: id + name: + description: Sort type name (localized). + type: string + example: Type name + + shopProductImages: + description: Дополнительное изображение товара. + type: object + properties: + id: + description: FIle ID. + type: string + format: uuid + example: df7784cc-4d19-4c6c-8c7a-403751fec1b8 + url: + description: FIle open URL. + type: string + example: http://hr.lh/file/open/df7784cc-4d19-4c6c-8c7a-403751fec1b8.jpg + + shopProductOption: + description: Shop product option. + type: object + properties: + id: + description: Option ID. + type: string + format: uuid + example: e25ea810-bbc2-4b1e-84ca-8ed56d4594ec + sort_index: + description: Option sort index. + type: number + example: 0 + name: + description: Option name. + type: string + example: Type name + count: + description: Products count. + type: number + example: 1 + entityId: + description: Entity ID. + type: number + example: 1 + + shopProduct: + type: object + properties: + id: + description: Product ID. + type: string + format: uuid + example: 76080562-3a5e-4826-8799-7638b775bcd0 + title: + description: Product title. + type: string + example: Product 1 + description: + description: Product description. + type: string + example: Description text + price: + description: Product price. + type: number + example: 1 + totalCount: + description: Сумма количества товара во всех опциях товара. + type: number + example: 1 + preview: + description: Product preview image. + type: string + example: http://hr.lh/file/resize/1200x1200/158712e1-78ed-4583-b5f1-6a0a083824a6.jpg + images: + description: Дополнительные изображения товара. + type: array + items: + $ref: '#/components/schemas/shopProductImages' + options: + description: Shop product options. + type: array + items: + $ref: '#/components/schemas/shopProductOption' + entityId: + description: Entity ID. + type: number + example: 1 + + shopProductIndex: + $ref: '#/components/schemas/shopProduct' + + shopProductView: + type: object + properties: + id: + description: Product ID. + type: string + format: uuid + example: 76080562-3a5e-4826-8799-7638b775bcd0 + title: + description: Product title. + type: string + example: Product 1 + description: + description: Product description. + type: string + example: Description text + price: + description: Product price. + type: number + example: 1 + totalCount: + description: Сумма количества товара во всех опциях товара. + type: number + example: 1 + shopProductOption: + $ref: '#/components/schemas/shopProductOption' + preview: + description: Product preview image. + type: string + example: http://hr.lh/file/resize/1200x1200/158712e1-78ed-4583-b5f1-6a0a083824a6.jpg + images: + description: Дополнительные изображения товара. + type: array + items: + $ref: '#/components/schemas/shopProductImages' + options: + description: Shop product options. + type: array + items: + $ref: '#/components/schemas/shopProductOption' + entityId: + description: Entity ID. + type: number + example: 1 + + shopOrderDeliveryAddresses: + type: object + properties: + addresses: + description: Array of delivery address strings. + type: array + items: + type: string + example: + - 'Address 1' + - 'Address 2' + + shopOrder: + type: object + properties: + id: + description: Order ID. + type: string + format: uuid + example: 0310635d-2c72-4219-9038-bf2ac8f14206 + created_at: + description: Creation date. + type: string + format: 'date-time' + example: 2024-01-01 00:00:00 + created_user_id: + description: User ID. + type: string + format: uuid + num: + description: Order number. + type: number + example: 1 + order_status_id: + description: Order status ID. See /shop/order/statuses list. + type: number + example: 1 + delivery_address: + description: Delivery address. + type: string + example: Address 1 + default: null + countCartPositions: + description: Count of cart positions. + type: number + example: 1 + countCartTotal: + description: Total count of cart items. + type: number + example: 2 + sumCart: + description: Total cart sum. + type: number + example: 200 + shopCart: + type: array + items: + type: object + properties: + id: + description: Cart item ID. + type: string + format: uuid + example: 195e1707-3f5d-4780-8dc1-b1023e1f974f + status_id: + type: integer + description: 1 - active, 2 - disabled, 3 - deleted + enum: + - 1 + - 2 + - 3 + shop_item_id: + description: Product ID. + type: string + format: uuid + example: 11412fa5-031d-49c8-b7c9-2b5683e54bb8 + shop_product_option_id: + description: Product option ID. + type: string + format: uuid + example: dadbf34e-6c16-4bb8-a19a-4932df2ec116 + price: + description: Product cost at the time of order creation. + type: number + example: 100 + count: + description: Count of product units. + type: number + example: 2 + comment: + description: Comment text. + type: string + example: Example text + shopProductIcon: + description: Product icon. + type: string + example: http://hr.lh/file/resize/64x64/158712e1-78ed-4583-b5f1-6a0a083824a6.jpg + shopProductTitle: + description: Product title. + type: string + example: Example text + shopProductOptionName: + description: Product option name. + type: string + example: Example text + entityId: + description: Entity ID. + type: number + example: 1 + + shopOrderIndex: + $ref: '#/components/schemas/shopOrder' + + shopOrderView: + $ref: '#/components/schemas/shopOrder' + + shopOrderCheckoutRequestBody: + type: object + properties: + selectedAddress: + description: Адрес доставки. Требуется если tenantInfo.modules.shop.isAllowCustomDeliveryAddress равен true и не указан customAddress. + type: string + example: Address 1 + customAddress: + description: Адрес доставки. Требуется если tenantInfo.modules.shop.isAllowCustomDeliveryAddress равен true и не указан selectedAddress. + type: string + default: null + message: + description: Комментарий к заказу. + type: string + maxLength: 512 + example: Example text + cart: + description: Корзина товаров. + type: array + items: + type: object + properties: + id: + description: Product option ID. + type: string + format: uuid + example: e25ea810-bbc2-4b1e-84ca-8ed56d4594ec + cartCount: + description: Количество единиц текущей позиции товара. + type: number + example: 2 + + shopOrderCheckoutResponse: + type: object + properties: + success: + description: Result status. + type: boolean + example: false + message: + description: Message displayed to user (localized). + type: string + default: null + example: Example text + errors: + description: Array of validation errors. + type: array + default: null + data: + type: object + properties: + notFoundProducts: + description: Список идентификаторов товаров которые не были найдены. Возвращается в случае если товар не найден. + type: array + items: + type: string + example: + - 'e25ea810-bbc2-4b1e-84ca-8ed56d4594ec' + - 'ddbbec20-ec4d-42c5-8b11-1bb2d08e6465' + unavailableProducts: + description: Список идентификаторов товаров которых нет в наличии. Возвращается в случае если в корзине присутствуют товары которых больше нет в наличии. + type: array + items: + type: string + example: + - 'e25ea810-bbc2-4b1e-84ca-8ed56d4594ec' + - 'ddbbec20-ec4d-42c5-8b11-1bb2d08e6465' + products: + description: Возвращается в случае если в корзине присутствуют товары которых в наличии меньше чем указано в заказе. + type: array + items: + type: object + properties: + id: + description: Product option ID. + type: string + format: uuid + example: e25ea810-bbc2-4b1e-84ca-8ed56d4594ec + count: + description: Количество товара в наличии. + type: number + example: 1 + balance: + description: Текущий баланс кошелька пользователя. Возвращается в случае успешного совершения заказа. + type: number + example: 100 + shopOrder: + description: Данные заказа. Возвращается в случае успешного совершения заказа. + type: object + properties: + id: + description: Order ID. + type: string + format: uuid + example: 0310635d-2c72-4219-9038-bf2ac8f14206 + created_at: + description: Creation date. + type: string + format: 'date-time' + example: 2024-01-01 00:00:00 + num: + description: Order number. + type: number + example: 1 + delivery_address: + description: Delivery address. + type: string + example: Address 1 + default: null + + shopOrderPositionRemoveRequestBody: + type: object + properties: + id: + description: Cart item ID. + type: string + format: uuid + example: 195e1707-3f5d-4780-8dc1-b1023e1f974f + comment: + description: Comment text. + type: string + example: Example text + + apiDefaultResponse: + type: object + properties: + success: + description: Result status. + type: boolean + example: true + message: + description: Message displayed to user (localized). + type: string + default: null + errors: + description: Array of validation errors. + type: array + default: null + data: + type: object + default: null + + shopOrderPositionRemoveResponse: + $ref: '#/components/schemas/apiDefaultResponse' + + shopOrderPositionRestoreRequestBody: + type: object + properties: + id: + description: Cart item ID. + type: string + format: uuid + example: 195e1707-3f5d-4780-8dc1-b1023e1f974f + + shopOrderPositionRestoreResponse: + $ref: '#/components/schemas/apiDefaultResponse' + + shopOrderPositionChangeCommentRequestBody: + type: object + properties: + id: + description: Cart item ID. + type: string + format: uuid + example: 195e1707-3f5d-4780-8dc1-b1023e1f974f + comment: + description: Comment text. + type: string + example: Example text + + shopOrderPositionChangeCommentResponse: + $ref: '#/components/schemas/apiDefaultResponse' + + shopOrderCancelRequestBody: + type: object + properties: + id: + description: Order ID. + type: string + format: uuid + example: 195e1707-3f5d-4780-8dc1-b1023e1f974f + message: + description: Comment text. + type: string + example: Example text + + shopOrderCancelResponse: + $ref: '#/components/schemas/apiDefaultResponse' \ No newline at end of file