basePath: /api/widget definitions: donat-widget_internal_model.AllWidgets: properties: url_widget: type: string widgets: items: $ref: '#/definitions/donat-widget_internal_model.WidgetWithFileLink' type: array type: object donat-widget_internal_model.CreateDonatBody: properties: amount: type: integer donatUser: type: string targetID: type: integer text: type: string type: object donat-widget_internal_model.CreateDonatResponse: properties: order_id: type: string payment_url: type: string type: object donat-widget_internal_model.CreateWidgetBody: properties: audio: example: 550e8400-e29b-41d4-a716-446655440001 format: uuid type: string duration: example: 30 type: integer image: example: 550e8400-e29b-41d4-a716-446655440000 format: uuid type: string is_active: example: true type: boolean max_amount: example: 100 type: integer min_amount: example: 10 type: integer name: example: My GetWidgetDb type: string template_id: example: 1 type: integer required: - audio - duration - image - max_amount - min_amount - name - template_id type: object donat-widget_internal_model.DataFile: properties: created_at: type: string entity: type: string extension: type: string file_link: type: string file_name: type: string file_type: type: string id: type: string size: type: number streamer_id: type: integer type: object donat-widget_internal_model.Donat: properties: accepted_time: example: "2025-03-12T15:04:05Z" format: date-time type: string amount: example: 500 type: integer donat_user: example: Anonymous type: string id: example: 1 type: integer order_id: example: 550e8400-e29b-41d4-a716-446655440000 format: uuid type: string paid_time: example: "2025-03-12T15:05:10Z" format: date-time type: string play_content: example: true type: boolean show_name: example: true type: boolean show_text: example: true type: boolean showed_time: example: "2025-03-12T15:05:10Z" format: date-time type: string status: example: pending type: string target_id: example: 2002 type: integer text: example: Thank you for the stream! type: string widget_id: example: 5 type: integer type: object donat-widget_internal_model.DonationModeration: properties: accepted_time: description: Донат принят на модерации example: "2025-03-09T12:49:21.75005Z" type: string amount: description: Сумма доната example: 2000 type: integer created_at: description: Дата создания example: "2025-03-09T12:49:21.75005Z" type: string donat_user: description: Имя пользователя, сделавшего донат example: Петр type: string id: description: Уникальный идентификатор доната example: 123 type: integer play_content: description: Проигрывать контент example: true type: boolean show_name: description: Показывать имя пользователя example: true type: boolean show_text: description: Показывать текст доната example: true type: boolean status: description: Статус доната (moderation, pending, viewed и т.д.) example: moderation type: string target_id: description: ID цели (если есть) example: 0 type: integer text: description: Текст доната example: Пиздатый стрим type: string updated_at: description: Дата последнего обновления example: "2025-03-09T12:49:21.75005Z" type: string type: object donat-widget_internal_model.DonationStatResponse: properties: amount_collected: type: integer date: type: string donations_count: type: integer type: object donat-widget_internal_model.DonationSummary: properties: donations_count: description: Общее количество донатов type: integer total_amount: description: Общая сумма донатов type: integer type: object donat-widget_internal_model.DonationSummaryResponse: properties: donation_sum: $ref: '#/definitions/donat-widget_internal_model.DonationSummary' donations: items: $ref: '#/definitions/donat-widget_internal_model.DonationStatResponse' type: array type: object donat-widget_internal_model.FilterSettingResponse: properties: enable_links: type: boolean filtered_words: items: type: string type: array type: object donat-widget_internal_model.GetWidgetDb: properties: audio_file_name: example: alert.mp3 type: string audio_id: description: Поля для аудио example: 123e4567-e89b-12d3-a456-426614174000 format: uuid type: string audio_link: example: https://cdn.example.com/audio/123e4567-e89b-12d3-a456-426614174000 type: string audio_type: example: audio/mp3 type: string created_at: example: "2025-03-06T13:37:36Z" format: date-time type: string duration: example: 30 format: int64 type: integer group_id: example: 2 format: int64 type: integer id: example: 1 format: int64 type: integer image_file_name: example: background.png type: string image_id: description: Поля для изображения example: 550e8400-e29b-41d4-a716-446655440000 format: uuid type: string image_link: example: https://cdn.example.com/images/550e8400-e29b-41d4-a716-446655440000 type: string image_type: example: image/png type: string is_active: example: true type: boolean max_amount: example: 1000 format: int64 type: integer min_amount: example: 100 format: int64 type: integer name: example: Мой виджет 10 format: string type: string streamer_id: example: 1001 format: int64 type: integer template_id: example: 5 format: int64 type: integer updated_at: example: "2025-03-07T10:15:30Z" format: date-time type: string type: object donat-widget_internal_model.InitNewStreamerBody: properties: login: example: admin type: string streamer_id: example: 1 type: integer required: - login - streamer_id type: object donat-widget_internal_model.InnerDonatePageResponse: properties: avatar: $ref: '#/definitions/donat-widget_internal_model.InnerFile' background_img: $ref: '#/definitions/donat-widget_internal_model.InnerFile' description: type: string head_img: $ref: '#/definitions/donat-widget_internal_model.InnerFile' page_background: type: string profile_avatar: type: boolean text_after_donat: type: string type: object donat-widget_internal_model.InnerFile: properties: file_id: example: 550e8400-e29b-41d4-a716-446655440000 type: string file_link: example: https://cdn.example.com/images/550e8400-e29b-41d4-a716-446655440000 type: string file_name: example: header.png type: string file_size: example: 1024 type: integer file_type: example: image/png type: string type: object donat-widget_internal_model.Language: properties: en_name: type: string id: type: integer iso_code: type: string ru_name: type: string type: object donat-widget_internal_model.MarkDonatPaidBody: properties: order_id: type: string type: object donat-widget_internal_model.MarkDonatViewed: properties: order_id: type: string type: object donat-widget_internal_model.ModerationDonat: properties: accepted: type: boolean play_content: type: boolean show_name: type: boolean show_text: type: boolean type: object donat-widget_internal_model.ModerationResponse: properties: duration: type: integer enable: type: boolean type: object donat-widget_internal_model.OuterDonatePageResponse: properties: avatar_img: example: https://cdn.example.com/images/avatar.png type: string background_img: example: https://cdn.example.com/images/background.png type: string description: example: Поддержи этого стримера type: string head_img: example: https://cdn.example.com/images/header.png type: string login: example: streamer123 type: string online: example: online type: string type: object donat-widget_internal_model.PlayingDonatResponse: properties: amount: type: integer audio_link: type: string donat_user: type: string duration: example: 30 type: integer image_link: type: string languages: items: $ref: '#/definitions/donat-widget_internal_model.Language' type: array min_price: type: integer order_id: type: string play_content: type: boolean scenery: type: string show_name: type: boolean show_text: type: boolean text: type: string voice_enabled: type: boolean voice_sound_percent: type: integer voice_speed: description: Добавляем новые поля для настроек голоса type: string type: object donat-widget_internal_model.TextAfterPaidDonat: properties: text_after_donat: type: string type: object donat-widget_internal_model.UpdateFilterSettings: properties: add_words: items: type: string type: array enable_links: type: boolean remove_words: items: type: string type: array type: object donat-widget_internal_model.UpdateLoginBody: properties: account_id: type: integer login: type: string type: object donat-widget_internal_model.UpdateModeration: properties: duration: type: integer enable: type: boolean type: object donat-widget_internal_model.UpdateVoiceSettings: properties: enable: type: boolean languages: items: type: string type: array min_price: type: integer scenery: type: string voice_sound_percent: type: integer voice_speed: enum: - low - medium - high type: string type: object donat-widget_internal_model.UpdateWidget: properties: audio: example: a0f9e244-f61f-4bfe-a7a0-3b5e91fe7364 type: string duration: example: 120 type: integer image: example: d2c2f03f-3fe5-4bfc-b963-5478a057149e type: string is_active: example: true type: boolean max_amount: example: 100 type: integer min_amount: example: 10 type: integer name: example: Awesome Widget type: string type: object donat-widget_internal_model.VoiceSettingsResponse: properties: enable: type: boolean languages: description: Новое поле items: $ref: '#/definitions/donat-widget_internal_model.Language' type: array min_price: type: integer scenery: type: string voice_sound_percent: type: integer voice_speed: enum: - low - medium - high type: string type: object donat-widget_internal_model.WidgetWithFileLink: properties: group_id: type: integer widgets: items: $ref: '#/definitions/donat-widget_internal_model.GetWidgetDb' type: array type: object echo.HTTPError: properties: message: {} type: object info: contact: {} description: Donate auth service docs. title: Donate Auth Documentation version: "3.0" paths: /donat: get: consumes: - application/json description: Получает список донатов для указанного стримера с пагинацией parameters: - default: 1 description: Номер страницы (по умолчанию 1) in: query name: page type: integer - default: 10 description: Количество элементов на странице (по умолчанию 10) in: query name: limit type: integer produces: - application/json responses: "200": description: Успешный возврат списка донатов schema: items: $ref: '#/definitions/donat-widget_internal_model.Donat' type: array "400": description: Некорректный формат streamerID schema: $ref: '#/definitions/echo.HTTPError' "500": description: Внутренняя ошибка сервера schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get donats tags: - Donate /donat-moderate/{donat-id}: patch: consumes: - application/json description: Update donat settings such as accepted, show_text, play_content, show_name parameters: - description: ID доната in: path name: donat-id required: true type: integer - description: Update fields in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.ModerationDonat' produces: - application/json responses: "200": description: Donat settings updated successfully schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Update donat settings tags: - Donate /donat-moderate/latest-moderation: get: consumes: - application/json description: Get the latest donation with status 'moderation' sorted by updated_at produces: - application/json responses: "200": description: Latest donation in moderation schema: $ref: '#/definitions/donat-widget_internal_model.DonationModeration' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "404": description: No donations in moderation found schema: $ref: '#/definitions/echo.HTTPError' "500": description: Internal server error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get the latest donation in moderation tags: - Donate /donat-page: patch: description: Update personal streamer donate page with optional background and head image files. parameters: - example: A great donation page in: formData name: description type: string - example: '#13161E' in: formData name: page_background type: string - example: true in: formData name: profile_avatar type: boolean - example: Thank you for your support! in: formData name: text_after_donat type: string - description: Background image in: formData name: background type: file - description: Head image in: formData name: head_img type: file - description: Avatar image in: formData name: avatar type: file responses: "200": description: Donat page updated successfully schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Update personal streamer donate page tags: - Donate /donat/{streamer-login}: post: consumes: - application/json description: Create donat parameters: - description: Login стримера in: path name: streamer-login required: true type: string - description: Create donat body json in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.CreateDonatBody' produces: - application/json responses: "200": description: Donat page updated successfully schema: $ref: '#/definitions/donat-widget_internal_model.CreateDonatResponse' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' summary: Create donat tags: - Donate /donat/paid: post: consumes: - application/json description: Mark donat as paid parameters: - description: order id body in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.MarkDonatPaidBody' produces: - application/json responses: "200": description: Ok schema: type: string "400": description: Некорректный формат streamerID schema: $ref: '#/definitions/echo.HTTPError' "500": description: Внутренняя ошибка сервера schema: $ref: '#/definitions/echo.HTTPError' summary: Mark donat as paid tags: - Donate /donat/period-stat: get: consumes: - application/json description: Get donations statistics for a given period parameters: - description: Period for statistics enum: - 24h - 7d - 1m - 1y in: query name: period required: true type: string produces: - application/json responses: "200": description: Donations statistics schema: items: $ref: '#/definitions/donat-widget_internal_model.DonationSummaryResponse' type: array "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get donations statistics tags: - Donate /donat/viewed: post: consumes: - application/json description: Mark donat as viewed parameters: - description: order id body in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.MarkDonatViewed' produces: - application/json responses: "200": description: Ok schema: type: string "500": description: Внутренняя ошибка сервера schema: $ref: '#/definitions/echo.HTTPError' summary: Mark donat as viewed tags: - Donate /files: post: consumes: - multipart/form-data description: Add new File. The entity type defaults to 'widget' if not specified. parameters: - description: New file to upload (max 20 MB) in: formData name: new_file required: true type: file - description: Optional entity type (defaults to 'widget') in: formData name: entity type: string produces: - application/json responses: "200": description: File has been uploaded successfully! schema: $ref: '#/definitions/donat-widget_internal_model.DataFile' "400": description: Bad request (e.g., missing file, invalid form data) schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "413": description: File size exceeds 20 MB limit schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error (specific cases, might overlap with 400/500) schema: $ref: '#/definitions/echo.HTTPError' "500": description: Internal server error (e.g., failed to save file, DB error) schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Add new File tags: - Files /files/{file_id}: get: consumes: - application/json description: Retrieve a file by its ID parameters: - description: File ID in: path name: file_id required: true type: string produces: - application/octet-stream responses: "200": description: File content schema: type: file "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "404": description: File not found schema: $ref: '#/definitions/echo.HTTPError' summary: Get a file tags: - Files /files/widgets: get: consumes: - application/json description: Retrieve all widget files, filtered by type if specified parameters: - description: File type (audio or image) enum: - audio - image in: query name: type type: string produces: - application/json responses: "200": description: List of files schema: items: $ref: '#/definitions/donat-widget_internal_model.DataFile' type: array "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get all widget files tags: - Files /filters-settings: get: consumes: - application/json description: Get donat filters settings produces: - application/json responses: "200": description: Current filters settings schema: $ref: '#/definitions/donat-widget_internal_model.FilterSettingResponse' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get donat filters settings tags: - Donate patch: consumes: - application/json description: Update donat filters settings. parameters: - description: Update fields in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.UpdateFilterSettings' produces: - application/json responses: "200": description: Voice settings updated successfully schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Update donat filters settings. tags: - Donate /get-donat-for-playing/{streamer-id}: get: consumes: - application/json description: Creates initial records for new streamer in related tables parameters: - description: Login стримера in: path name: streamer-id required: true type: string produces: - application/json responses: "200": description: Donat data schema: $ref: '#/definitions/donat-widget_internal_model.PlayingDonatResponse' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' summary: Initialize new streamer tags: - Donate /get-widget-html/{widget-page-id}: get: consumes: - application/json description: Get generated HTML widget for streamer parameters: - description: Widget Page ID in: path name: widget-page-id required: true type: string produces: - text/html responses: "200": description: HTML widget content schema: type: string "400": description: Invalid streamer ID or background URL schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "500": description: Internal server error schema: $ref: '#/definitions/echo.HTTPError' summary: Get widget HTML content tags: - Widget /init-streamer: post: consumes: - application/json description: Creates initial records for new streamer in related tables parameters: - description: Streamer initialization data in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.InitNewStreamerBody' produces: - application/json responses: "200": description: Streamer initialized successfully schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' summary: Initialize new streamer tags: - Donate /inner-donate-page: get: consumes: - application/json description: Get inner donate page info produces: - application/json responses: "200": description: Current donate page state schema: $ref: '#/definitions/donat-widget_internal_model.InnerDonatePageResponse' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get inner donate page info tags: - Donate /moderation-settings: get: consumes: - application/json description: Get donat moderation settings produces: - application/json responses: "200": description: Current moderation settings schema: $ref: '#/definitions/donat-widget_internal_model.ModerationResponse' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get donat moderation settings tags: - Donate patch: consumes: - application/json description: Update donat moderation settings parameters: - description: Update fields in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.UpdateModeration' produces: - application/json responses: "200": description: Moderation settings updated successfully schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Update donat moderation settings tags: - Donate /outer-donate-page/{streamer-login}: get: consumes: - application/json description: Get outer donate page info parameters: - description: Login стримера in: path name: streamer-login required: true type: string produces: - application/json responses: "200": description: Current donate page state schema: $ref: '#/definitions/donat-widget_internal_model.OuterDonatePageResponse' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' summary: Get outer donate page info tags: - Donate /test-donat: post: consumes: - application/json description: Create donat parameters: - description: Create donat body json in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.CreateDonatBody' produces: - application/json responses: "200": description: Donat page updated successfully schema: $ref: '#/definitions/donat-widget_internal_model.CreateDonatResponse' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Create donat tags: - Donate /text-after-donat/{order-id}: get: consumes: - application/json description: Получает список донатов для указанного стримера с пагинацией parameters: - description: OrderID стримера in: path name: order-id required: true type: string produces: - application/json responses: "200": description: Успешный возврат списка донатов schema: $ref: '#/definitions/donat-widget_internal_model.TextAfterPaidDonat' "400": description: Некорректный формат streamerID schema: $ref: '#/definitions/echo.HTTPError' "500": description: Внутренняя ошибка сервера schema: $ref: '#/definitions/echo.HTTPError' summary: Get message after donat tags: - Donate /update-login-donate: post: consumes: - application/json description: Updates the streamer login associated with the donate page parameters: - description: Update data in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.UpdateLoginBody' produces: - application/json responses: "200": description: Successfully updated streamer login schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "500": description: Internal server error schema: $ref: '#/definitions/echo.HTTPError' summary: Update streamer login tags: - Donate /update-streamer-online/{streamer-id}: put: consumes: - application/json description: Marks streamer as online in the system parameters: - description: Streamer ID (numeric) in: path name: streamer-id required: true type: string produces: - application/json responses: "200": description: Success status schema: additionalProperties: true type: object "400": description: Invalid streamer ID schema: $ref: '#/definitions/echo.HTTPError' "500": description: Internal server error schema: $ref: '#/definitions/echo.HTTPError' summary: Update streamer online status tags: - Donate /voice-settings: get: consumes: - application/json description: Get donat voice settings produces: - application/json responses: "200": description: Current voice settings schema: $ref: '#/definitions/donat-widget_internal_model.VoiceSettingsResponse' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get donat voice settings tags: - Donate patch: consumes: - application/json description: Update donat voice settings. parameters: - description: Update fields in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.UpdateVoiceSettings' produces: - application/json responses: "200": description: Voice settings updated successfully schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Update donat voice settings. tags: - Donate /widgets: get: consumes: - application/json description: Get all streamer's widgets produces: - application/json responses: "200": description: Success widgets response schema: $ref: '#/definitions/donat-widget_internal_model.AllWidgets' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Get all streamer's widgets tags: - Widget post: consumes: - application/json description: Create new widget parameters: - description: Create widget in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.CreateWidgetBody' produces: - application/json responses: "200": description: GetWidgetDb has been created successfully! schema: $ref: '#/definitions/donat-widget_internal_model.GetWidgetDb' "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Create new widget tags: - Widget /widgets/{widget_id}: delete: consumes: - application/json description: Update an existing widget parameters: - description: Widget ID in: path name: widget_id required: true type: integer produces: - application/json responses: "200": description: Widget has been deleted successfully! schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "404": description: Widget not found schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Update an existing widget tags: - Widget patch: consumes: - application/json description: Update an existing widget parameters: - description: Widget ID in: path name: widget_id required: true type: integer - description: Update widget in: body name: request required: true schema: $ref: '#/definitions/donat-widget_internal_model.UpdateWidget' produces: - application/json responses: "200": description: Widget has been updated successfully! schema: type: string "400": description: Bad request schema: $ref: '#/definitions/echo.HTTPError' "401": description: Unauthorized or expired token schema: $ref: '#/definitions/echo.HTTPError' "404": description: Widget not found schema: $ref: '#/definitions/echo.HTTPError' "422": description: Validation error schema: $ref: '#/definitions/echo.HTTPError' security: - BearerAuth: [] summary: Update an existing widget tags: - Widget securityDefinitions: BearerAuth: in: header name: Authorization type: apiKey swagger: "2.0"