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