Files
stream.ui/docs.json
2026-03-11 02:43:33 +00:00

3731 lines
122 KiB
JSON

{
"swagger": "2.0",
"info": {
"description": "This is the API server for Stream application.",
"title": "Stream API",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "http://www.swagger.io/support",
"email": "support@swagger.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
},
"host": "localhost:8080",
"basePath": "/",
"paths": {
"/ad-templates": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get all VAST ad templates for the current user",
"produces": [
"application/json"
],
"tags": [
"ad-templates"
],
"summary": "List Ad Templates",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adtemplates.TemplateListPayload"
}
}
}
]
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a VAST ad template for the current user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ad-templates"
],
"summary": "Create Ad Template",
"parameters": [
{
"description": "Ad template payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adtemplates.SaveAdTemplateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adtemplates.TemplatePayload"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/ad-templates/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update a VAST ad template for the current user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ad-templates"
],
"summary": "Update Ad Template",
"parameters": [
{
"type": "string",
"description": "Ad Template ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Ad template payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adtemplates.SaveAdTemplateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adtemplates.TemplatePayload"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete a VAST ad template for the current user",
"produces": [
"application/json"
],
"tags": [
"ad-templates"
],
"summary": "Delete Ad Template",
"parameters": [
{
"type": "string",
"description": "Ad Template ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/ad-templates": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get paginated list of all ad templates across users (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List All Ad Templates",
"parameters": [
{
"type": "integer",
"default": 1,
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 20,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Search by name",
"name": "search",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create an ad template for any user (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create Ad Template",
"parameters": [
{
"description": "Ad template payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.SaveAdminAdTemplateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/ad-templates/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get ad template detail (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get Ad Template Detail",
"parameters": [
{
"type": "string",
"description": "Ad Template ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update an ad template for any user (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update Ad Template",
"parameters": [
{
"type": "string",
"description": "Ad Template ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Ad template payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.SaveAdminAdTemplateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete any ad template by ID (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete Ad Template (Admin)",
"parameters": [
{
"type": "string",
"description": "Ad Template ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/dashboard": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get system-wide statistics for the admin dashboard",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Admin Dashboard",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/admin.DashboardPayload"
}
}
}
]
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/payments": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get paginated list of all payments across users (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List All Payments",
"parameters": [
{
"type": "integer",
"default": 1,
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 20,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a manual subscription charge for a user (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create Payment",
"parameters": [
{
"description": "Payment payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.CreateAdminPaymentRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/payments/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get payment detail (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get Payment Detail",
"parameters": [
{
"type": "string",
"description": "Payment ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update payment status safely without hard delete (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update Payment",
"parameters": [
{
"type": "string",
"description": "Payment ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Payment update payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.UpdateAdminPaymentRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/plans": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get all plans with usage counts (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List Plans",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a plan (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create Plan",
"parameters": [
{
"description": "Plan payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.SavePlanRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/plans/{id}": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update a plan (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update Plan",
"parameters": [
{
"type": "string",
"description": "Plan ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Plan payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.SavePlanRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete a plan, or deactivate it if already used (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete Plan",
"parameters": [
{
"type": "string",
"description": "Plan ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/users": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get paginated list of all users (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List Users",
"parameters": [
{
"type": "integer",
"default": 1,
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 20,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Search by email or username",
"name": "search",
"in": "query"
},
{
"type": "string",
"description": "Filter by role",
"name": "role",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a user from admin panel (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create User",
"parameters": [
{
"description": "User payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.CreateAdminUserRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/users/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get detailed info about a single user (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get User Detail",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update a user from admin panel (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update User",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "User payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.UpdateAdminUserRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete a user and their data (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete User",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/users/{id}/role": {
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Change user role (admin only). Valid: USER, ADMIN, BLOCK",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update User Role",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Role payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.UpdateUserRoleRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/videos": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get paginated list of all videos across users (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List All Videos",
"parameters": [
{
"type": "integer",
"default": 1,
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 20,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Search by title",
"name": "search",
"in": "query"
},
{
"type": "string",
"description": "Filter by user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by status",
"name": "status",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a manual video record for a user (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Create Video",
"parameters": [
{
"description": "Video payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.SaveAdminVideoRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/videos/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get video detail by ID (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Get Video Detail",
"parameters": [
{
"type": "string",
"description": "Video ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update video metadata and status (admin only)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Update Video",
"parameters": [
{
"type": "string",
"description": "Video ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Video payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.SaveAdminVideoRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete any video by ID (admin only)",
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete Video (Admin)",
"parameters": [
{
"type": "string",
"description": "Video ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/auth/change-password": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Change the authenticated user's local password",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Change Password",
"parameters": [
{
"description": "Password payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.ChangePasswordRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/auth/forgot-password": {
"post": {
"description": "Request password reset link",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Forgot Password",
"parameters": [
{
"description": "Forgot password payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.ForgotPasswordRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/auth/google/callback": {
"get": {
"description": "Callback for Google Login",
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Google Callback",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/auth.UserPayload"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/auth/google/login": {
"get": {
"description": "Redirect to Google for Login",
"tags": [
"auth"
],
"summary": "Google Login",
"responses": {}
}
},
"/auth/login": {
"post": {
"description": "Login with email and password",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Login",
"parameters": [
{
"description": "Login payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.LoginRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/auth.UserPayload"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/auth/logout": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Logout user and clear cookies",
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Logout",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/auth/register": {
"post": {
"description": "Register a new user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Register",
"parameters": [
{
"description": "Registration payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.RegisterRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/auth/reset-password": {
"post": {
"description": "Reset password using token",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Reset Password",
"parameters": [
{
"description": "Reset password payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.ResetPasswordRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/domains": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get all whitelisted domains for the current user",
"produces": [
"application/json"
],
"tags": [
"domains"
],
"summary": "List Domains",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Add a domain to the current user's whitelist",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"domains"
],
"summary": "Create Domain",
"parameters": [
{
"description": "Domain payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/domains.CreateDomainRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/domains/{id}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Remove a domain from the current user's whitelist",
"produces": [
"application/json"
],
"tags": [
"domains"
],
"summary": "Delete Domain",
"parameters": [
{
"type": "string",
"description": "Domain ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/me": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get the authenticated user's profile payload",
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Get Current User",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update the authenticated user's profile information",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Update Current User",
"parameters": [
{
"description": "Profile payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/auth.UpdateMeRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Permanently delete the authenticated user's account and related data",
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Delete My Account",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/me/clear-data": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Remove videos and settings-related resources for the authenticated user",
"produces": [
"application/json"
],
"tags": [
"auth"
],
"summary": "Clear My Data",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/notifications": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get notifications for the current user",
"produces": [
"application/json"
],
"tags": [
"notifications"
],
"summary": "List Notifications",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete all notifications for the current user",
"produces": [
"application/json"
],
"tags": [
"notifications"
],
"summary": "Clear Notifications",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/notifications/read-all": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Mark all notifications as read for the current user",
"produces": [
"application/json"
],
"tags": [
"notifications"
],
"summary": "Mark All Notifications Read",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/notifications/{id}": {
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete a single notification for the current user",
"produces": [
"application/json"
],
"tags": [
"notifications"
],
"summary": "Delete Notification",
"parameters": [
{
"type": "string",
"description": "Notification ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/notifications/{id}/read": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Mark a single notification as read for the current user",
"produces": [
"application/json"
],
"tags": [
"notifications"
],
"summary": "Mark Notification Read",
"parameters": [
{
"type": "string",
"description": "Notification ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/payments": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create a new payment for buying or renewing a plan",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"payment"
],
"summary": "Create Payment",
"parameters": [
{
"description": "Payment Info",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/payment.CreatePaymentRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/payments/history": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get payment history for the current user",
"produces": [
"application/json"
],
"tags": [
"payment"
],
"summary": "List Payment History",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/payments/{id}/invoice": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Download invoice text for a payment or wallet top-up",
"produces": [
"text/plain"
],
"tags": [
"payment"
],
"summary": "Download Invoice",
"parameters": [
{
"type": "string",
"description": "Payment ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/plans": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get all active plans",
"produces": [
"application/json"
],
"tags": [
"plan"
],
"summary": "List Plans",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/model.Plan"
}
}
}
}
]
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/settings/preferences": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get notification, player, and locale preferences for the current user",
"produces": [
"application/json"
],
"tags": [
"settings"
],
"summary": "Get Preferences",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update notification, player, and locale preferences for the current user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"settings"
],
"summary": "Update Preferences",
"parameters": [
{
"description": "Preferences payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/preferences.SettingsPreferencesRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/usage": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get the authenticated user's total video count and total storage usage",
"produces": [
"application/json"
],
"tags": [
"usage"
],
"summary": "Get Usage",
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/usage.UsagePayload"
}
}
}
]
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/videos": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get paginated videos",
"produces": [
"application/json"
],
"tags": [
"video"
],
"summary": "List Videos",
"parameters": [
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Create video record after upload",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"video"
],
"summary": "Create Video",
"parameters": [
{
"description": "Video Info",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/video.CreateVideoRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Video"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/videos/upload-url": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Generate presigned URL for video upload",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"video"
],
"summary": "Get Upload URL",
"parameters": [
{
"description": "File Info",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/video.UploadURLRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/videos/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Get video details by ID",
"produces": [
"application/json"
],
"tags": [
"video"
],
"summary": "Get Video",
"parameters": [
{
"type": "string",
"description": "Video ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/model.Video"
}
}
}
]
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Update title and description for a video owned by the current user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"video"
],
"summary": "Update Video",
"parameters": [
{
"type": "string",
"description": "Video ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Video payload",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/video.UpdateVideoRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Delete a video owned by the current user",
"produces": [
"application/json"
],
"tags": [
"video"
],
"summary": "Delete Video",
"parameters": [
{
"type": "string",
"description": "Video ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/wallet/topups": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Add funds to wallet balance for the current user",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"payment"
],
"summary": "Top Up Wallet",
"parameters": [
{
"description": "Topup Info",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/payment.TopupWalletRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
}
},
"definitions": {
"admin.CreateAdminPaymentRequest": {
"type": "object",
"required": [
"payment_method",
"plan_id",
"term_months",
"user_id"
],
"properties": {
"payment_method": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"term_months": {
"type": "integer"
},
"topup_amount": {
"type": "number"
},
"user_id": {
"type": "string"
}
}
},
"admin.CreateAdminUserRequest": {
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string",
"minLength": 6
},
"plan_id": {
"type": "string"
},
"role": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"admin.DashboardPayload": {
"type": "object",
"properties": {
"active_subscriptions": {
"type": "integer"
},
"new_users_today": {
"type": "integer"
},
"new_videos_today": {
"type": "integer"
},
"total_ad_templates": {
"type": "integer"
},
"total_payments": {
"type": "integer"
},
"total_revenue": {
"type": "number"
},
"total_storage_used": {
"type": "integer"
},
"total_users": {
"type": "integer"
},
"total_videos": {
"type": "integer"
}
}
},
"admin.SaveAdminAdTemplateRequest": {
"type": "object",
"required": [
"name",
"user_id",
"vast_tag_url"
],
"properties": {
"ad_format": {
"type": "string"
},
"description": {
"type": "string"
},
"duration": {
"type": "integer"
},
"is_active": {
"type": "boolean"
},
"is_default": {
"type": "boolean"
},
"name": {
"type": "string"
},
"user_id": {
"type": "string"
},
"vast_tag_url": {
"type": "string"
}
}
},
"admin.SaveAdminVideoRequest": {
"type": "object",
"required": [
"size",
"title",
"url",
"user_id"
],
"properties": {
"ad_template_id": {
"type": "string"
},
"description": {
"type": "string"
},
"duration": {
"type": "integer"
},
"format": {
"type": "string"
},
"size": {
"type": "integer"
},
"status": {
"type": "string"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"admin.SavePlanRequest": {
"type": "object",
"required": [
"cycle",
"name",
"price",
"storage_limit",
"upload_limit"
],
"properties": {
"cycle": {
"type": "string"
},
"description": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"type": "string"
}
},
"is_active": {
"type": "boolean"
},
"name": {
"type": "string"
},
"price": {
"type": "number"
},
"storage_limit": {
"type": "integer"
},
"upload_limit": {
"type": "integer"
}
}
},
"admin.UpdateAdminPaymentRequest": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string"
}
}
},
"admin.UpdateAdminUserRequest": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"role": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"admin.UpdateUserRoleRequest": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string"
}
}
},
"adtemplates.SaveAdTemplateRequest": {
"type": "object",
"required": [
"name",
"vast_tag_url"
],
"properties": {
"ad_format": {
"type": "string"
},
"description": {
"type": "string"
},
"duration": {
"type": "integer"
},
"is_active": {
"type": "boolean"
},
"is_default": {
"type": "boolean"
},
"name": {
"type": "string"
},
"vast_tag_url": {
"type": "string"
}
}
},
"adtemplates.TemplateListPayload": {
"type": "object",
"properties": {
"templates": {
"type": "array",
"items": {
"$ref": "#/definitions/manual.AdTemplate"
}
}
}
},
"adtemplates.TemplatePayload": {
"type": "object",
"properties": {
"template": {
"$ref": "#/definitions/manual.AdTemplate"
}
}
},
"auth.ChangePasswordRequest": {
"type": "object",
"required": [
"current_password",
"new_password"
],
"properties": {
"current_password": {
"type": "string"
},
"new_password": {
"type": "string",
"minLength": 6
}
}
},
"auth.ForgotPasswordRequest": {
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string"
}
}
},
"auth.LoginRequest": {
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"auth.RegisterRequest": {
"type": "object",
"required": [
"email",
"password",
"username"
],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string",
"minLength": 6
},
"username": {
"type": "string"
}
}
},
"auth.ResetPasswordRequest": {
"type": "object",
"required": [
"new_password",
"token"
],
"properties": {
"new_password": {
"type": "string",
"minLength": 6
},
"token": {
"type": "string"
}
}
},
"auth.UpdateMeRequest": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"language": {
"type": "string"
},
"locale": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"auth.UserPayload": {
"type": "object",
"properties": {
"avatar": {
"type": "string"
},
"created_at": {
"type": "string"
},
"email": {
"type": "string"
},
"google_id": {
"type": "string"
},
"id": {
"type": "string"
},
"language": {
"type": "string"
},
"locale": {
"type": "string"
},
"plan_expires_at": {
"type": "string"
},
"plan_expiring_soon": {
"type": "boolean"
},
"plan_id": {
"type": "string"
},
"plan_payment_method": {
"type": "string"
},
"plan_started_at": {
"type": "string"
},
"plan_term_months": {
"type": "integer"
},
"role": {
"type": "string"
},
"storage_used": {
"type": "integer"
},
"updated_at": {
"type": "string"
},
"username": {
"type": "string"
},
"wallet_balance": {
"type": "number"
}
}
},
"domains.CreateDomainRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"manual.AdTemplate": {
"type": "object",
"properties": {
"ad_format": {
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"duration": {
"type": "integer"
},
"id": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"is_default": {
"type": "boolean"
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "string"
},
"vast_tag_url": {
"type": "string"
}
}
},
"model.Plan": {
"type": "object",
"properties": {
"cycle": {
"type": "string"
},
"description": {
"type": "string"
},
"duration_limit": {
"type": "integer"
},
"features": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"name": {
"type": "string"
},
"price": {
"type": "number"
},
"quality_limit": {
"type": "string"
},
"storage_limit": {
"type": "integer"
},
"upload_limit": {
"type": "integer"
}
}
},
"model.Video": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"duration": {
"type": "integer"
},
"format": {
"type": "string"
},
"hls_path": {
"type": "string"
},
"hls_token": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"processing_status": {
"type": "string"
},
"size": {
"type": "integer"
},
"status": {
"type": "string"
},
"storage_type": {
"type": "string"
},
"thumbnail": {
"type": "string"
},
"title": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
},
"user_id": {
"type": "string"
},
"views": {
"type": "integer"
}
}
},
"payment.CreatePaymentRequest": {
"type": "object",
"required": [
"payment_method",
"plan_id",
"term_months"
],
"properties": {
"payment_method": {
"type": "string"
},
"plan_id": {
"type": "string"
},
"term_months": {
"type": "integer"
},
"topup_amount": {
"type": "number"
}
}
},
"payment.TopupWalletRequest": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"type": "number"
}
}
},
"preferences.SettingsPreferencesRequest": {
"type": "object",
"properties": {
"airplay": {
"type": "boolean"
},
"autoplay": {
"type": "boolean"
},
"chromecast": {
"type": "boolean"
},
"email_notifications": {
"type": "boolean"
},
"language": {
"type": "string"
},
"locale": {
"type": "string"
},
"loop": {
"type": "boolean"
},
"marketing_notifications": {
"type": "boolean"
},
"muted": {
"type": "boolean"
},
"pip": {
"type": "boolean"
},
"push_notifications": {
"type": "boolean"
},
"show_controls": {
"type": "boolean"
},
"telegram_notifications": {
"type": "boolean"
}
}
},
"response.Response": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"data": {},
"message": {
"type": "string"
}
}
},
"usage.UsagePayload": {
"type": "object",
"properties": {
"total_storage": {
"type": "integer"
},
"total_videos": {
"type": "integer"
},
"user_id": {
"type": "string"
}
}
},
"video.CreateVideoRequest": {
"type": "object",
"required": [
"size",
"title",
"url"
],
"properties": {
"description": {
"type": "string"
},
"duration": {
"description": "Maybe client knows, or we process later",
"type": "integer"
},
"format": {
"type": "string"
},
"size": {
"type": "integer"
},
"title": {
"type": "string"
},
"url": {
"description": "The S3 Key or Full URL",
"type": "string"
}
}
},
"video.UpdateVideoRequest": {
"type": "object",
"required": [
"title"
],
"properties": {
"ad_template_id": {
"type": "string"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
}
}
},
"video.UploadURLRequest": {
"type": "object",
"required": [
"content_type",
"filename",
"size"
],
"properties": {
"content_type": {
"type": "string"
},
"filename": {
"type": "string"
},
"size": {
"type": "integer"
}
}
}
},
"securityDefinitions": {
"BearerAuth": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}