UPDATE: Historian module
All checks were successful
Build and Release / release (push) Successful in 1m20s
All checks were successful
Build and Release / release (push) Successful in 1m20s
This commit is contained in:
512
docs/docs.go
512
docs/docs.go
@@ -399,8 +399,322 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/historian/application": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get list of historian applications with filters",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Search historian applications",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "created_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "created_to",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"maximum": 100,
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"asc",
|
||||
"desc"
|
||||
],
|
||||
"type": "string",
|
||||
"name": "order",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "reviewed_by",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"maxLength": 200,
|
||||
"minLength": 2,
|
||||
"type": "string",
|
||||
"name": "search",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"id",
|
||||
"created_at",
|
||||
"reviewed_at",
|
||||
"status"
|
||||
],
|
||||
"type": "string",
|
||||
"name": "sort",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv",
|
||||
"name": "statuses",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv",
|
||||
"name": "user_ids",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv",
|
||||
"name": "verify_types",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Submit application to become historian",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Create historian application",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Application data",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_request.CreateUserVerificationDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/historian/application/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get historian application detail",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Get application by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Verification ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Delete historian application",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Delete application",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Verification ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/historian/application/{id}/status": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Approve or reject historian application",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Update application status",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Verification ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Status update",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_request.UpdateVerificationStatusDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/media": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Search media with filters, pagination",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -414,21 +728,73 @@ const docTemplate = `{
|
||||
"summary": "Search media",
|
||||
"parameters": [
|
||||
{
|
||||
"maximum": 100,
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"description": "Page number",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Items per page",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"name": "max_size",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"maxLength": 100,
|
||||
"type": "string",
|
||||
"description": "Search keyword",
|
||||
"name": "keyword",
|
||||
"name": "mime_type",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"name": "min_size",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"asc",
|
||||
"desc"
|
||||
],
|
||||
"type": "string",
|
||||
"name": "order",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"maxLength": 200,
|
||||
"minLength": 2,
|
||||
"type": "string",
|
||||
"name": "search",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"id",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"size",
|
||||
"original_name",
|
||||
"storage_key",
|
||||
"mime_type"
|
||||
],
|
||||
"type": "string",
|
||||
"name": "sort",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv",
|
||||
"name": "user_ids",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
@@ -518,15 +884,19 @@ const docTemplate = `{
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "File name",
|
||||
"name": "filename",
|
||||
"name": "content_type",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Content type",
|
||||
"name": "contentType",
|
||||
"name": "fileName",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "size",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
@@ -573,11 +943,13 @@ const docTemplate = `{
|
||||
"summary": "Confirm presigned upload",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Storage key",
|
||||
"name": "key",
|
||||
"in": "query",
|
||||
"required": true
|
||||
"description": "Request body",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_request.PreSignedCompleteDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -653,6 +1025,11 @@ const docTemplate = `{
|
||||
},
|
||||
"/media/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Retrieve a media file by its ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -1218,6 +1595,44 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{id}/application": {
|
||||
"get": {
|
||||
"description": "Retrieve media list by specific user ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
],
|
||||
"summary": "Get user's media by user ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "User ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{id}/media": {
|
||||
"get": {
|
||||
"description": "Retrieve media list by specific user ID",
|
||||
@@ -1480,6 +1895,34 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.CreateUserVerificationDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"verify_type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"minLength": 10
|
||||
},
|
||||
"media_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verify_type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID_CARD",
|
||||
"EDUCATION",
|
||||
"EXPERT",
|
||||
"OTHER"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.ForgotPasswordDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -1517,6 +1960,17 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.PreSignedCompleteDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"token_id"
|
||||
],
|
||||
"properties": {
|
||||
"token_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.SignInDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -1602,6 +2056,28 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.UpdateVerificationStatusDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"review_note",
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"review_note": {
|
||||
"type": "string",
|
||||
"maxLength": 3000,
|
||||
"minLength": 5
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PENDING",
|
||||
"APPROVED",
|
||||
"REJECTED"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.VerifyTokenDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
@@ -392,8 +392,322 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/historian/application": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get list of historian applications with filters",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Search historian applications",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "created_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "created_to",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"maximum": 100,
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"asc",
|
||||
"desc"
|
||||
],
|
||||
"type": "string",
|
||||
"name": "order",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "reviewed_by",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"maxLength": 200,
|
||||
"minLength": 2,
|
||||
"type": "string",
|
||||
"name": "search",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"id",
|
||||
"created_at",
|
||||
"reviewed_at",
|
||||
"status"
|
||||
],
|
||||
"type": "string",
|
||||
"name": "sort",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv",
|
||||
"name": "statuses",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv",
|
||||
"name": "user_ids",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv",
|
||||
"name": "verify_types",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Submit application to become historian",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Create historian application",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Application data",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_request.CreateUserVerificationDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/historian/application/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get historian application detail",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Get application by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Verification ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Delete historian application",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Delete application",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Verification ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/historian/application/{id}/status": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Approve or reject historian application",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Historian Application"
|
||||
],
|
||||
"summary": "Update application status",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Verification ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Status update",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_request.UpdateVerificationStatusDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/media": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Search media with filters, pagination",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -407,21 +721,73 @@
|
||||
"summary": "Search media",
|
||||
"parameters": [
|
||||
{
|
||||
"maximum": 100,
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"description": "Page number",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Items per page",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"name": "max_size",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"maxLength": 100,
|
||||
"type": "string",
|
||||
"description": "Search keyword",
|
||||
"name": "keyword",
|
||||
"name": "mime_type",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 0,
|
||||
"type": "integer",
|
||||
"name": "min_size",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"asc",
|
||||
"desc"
|
||||
],
|
||||
"type": "string",
|
||||
"name": "order",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"minimum": 1,
|
||||
"type": "integer",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"maxLength": 200,
|
||||
"minLength": 2,
|
||||
"type": "string",
|
||||
"name": "search",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"id",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
"size",
|
||||
"original_name",
|
||||
"storage_key",
|
||||
"mime_type"
|
||||
],
|
||||
"type": "string",
|
||||
"name": "sort",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"collectionFormat": "csv",
|
||||
"name": "user_ids",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
@@ -511,15 +877,19 @@
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "File name",
|
||||
"name": "filename",
|
||||
"name": "content_type",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Content type",
|
||||
"name": "contentType",
|
||||
"name": "fileName",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "size",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
@@ -566,11 +936,13 @@
|
||||
"summary": "Confirm presigned upload",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Storage key",
|
||||
"name": "key",
|
||||
"in": "query",
|
||||
"required": true
|
||||
"description": "Request body",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_request.PreSignedCompleteDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -646,6 +1018,11 @@
|
||||
},
|
||||
"/media/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Retrieve a media file by its ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -1211,6 +1588,44 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{id}/application": {
|
||||
"get": {
|
||||
"description": "Retrieve media list by specific user ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
],
|
||||
"summary": "Get user's media by user ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "User ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/{id}/media": {
|
||||
"get": {
|
||||
"description": "Retrieve media list by specific user ID",
|
||||
@@ -1473,6 +1888,34 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.CreateUserVerificationDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content",
|
||||
"verify_type"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"minLength": 10
|
||||
},
|
||||
"media_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verify_type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ID_CARD",
|
||||
"EDUCATION",
|
||||
"EXPERT",
|
||||
"OTHER"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.ForgotPasswordDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -1510,6 +1953,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.PreSignedCompleteDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"token_id"
|
||||
],
|
||||
"properties": {
|
||||
"token_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.SignInDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -1595,6 +2049,28 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.UpdateVerificationStatusDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"review_note",
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"review_note": {
|
||||
"type": "string",
|
||||
"maxLength": 3000,
|
||||
"minLength": 5
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"PENDING",
|
||||
"APPROVED",
|
||||
"REJECTED"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.VerifyTokenDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
@@ -43,6 +43,26 @@ definitions:
|
||||
- email
|
||||
- token_type
|
||||
type: object
|
||||
history-api_internal_dtos_request.CreateUserVerificationDto:
|
||||
properties:
|
||||
content:
|
||||
minLength: 10
|
||||
type: string
|
||||
media_ids:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
verify_type:
|
||||
enum:
|
||||
- ID_CARD
|
||||
- EDUCATION
|
||||
- EXPERT
|
||||
- OTHER
|
||||
type: string
|
||||
required:
|
||||
- content
|
||||
- verify_type
|
||||
type: object
|
||||
history-api_internal_dtos_request.ForgotPasswordDto:
|
||||
properties:
|
||||
email:
|
||||
@@ -69,6 +89,13 @@ definitions:
|
||||
required:
|
||||
- media_ids
|
||||
type: object
|
||||
history-api_internal_dtos_request.PreSignedCompleteDto:
|
||||
properties:
|
||||
token_id:
|
||||
type: string
|
||||
required:
|
||||
- token_id
|
||||
type: object
|
||||
history-api_internal_dtos_request.SignInDto:
|
||||
properties:
|
||||
email:
|
||||
@@ -132,6 +159,22 @@ definitions:
|
||||
website:
|
||||
type: string
|
||||
type: object
|
||||
history-api_internal_dtos_request.UpdateVerificationStatusDto:
|
||||
properties:
|
||||
review_note:
|
||||
maxLength: 3000
|
||||
minLength: 5
|
||||
type: string
|
||||
status:
|
||||
enum:
|
||||
- PENDING
|
||||
- APPROVED
|
||||
- REJECTED
|
||||
type: string
|
||||
required:
|
||||
- review_note
|
||||
- status
|
||||
type: object
|
||||
history-api_internal_dtos_request.VerifyTokenDto:
|
||||
properties:
|
||||
email:
|
||||
@@ -451,6 +494,204 @@ paths:
|
||||
summary: Verify a security token
|
||||
tags:
|
||||
- Auth
|
||||
/historian/application:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get list of historian applications with filters
|
||||
parameters:
|
||||
- in: query
|
||||
name: created_from
|
||||
type: string
|
||||
- in: query
|
||||
name: created_to
|
||||
type: string
|
||||
- in: query
|
||||
maximum: 100
|
||||
minimum: 1
|
||||
name: limit
|
||||
type: integer
|
||||
- enum:
|
||||
- asc
|
||||
- desc
|
||||
in: query
|
||||
name: order
|
||||
type: string
|
||||
- in: query
|
||||
minimum: 1
|
||||
name: page
|
||||
type: integer
|
||||
- in: query
|
||||
name: reviewed_by
|
||||
type: string
|
||||
- in: query
|
||||
maxLength: 200
|
||||
minLength: 2
|
||||
name: search
|
||||
type: string
|
||||
- enum:
|
||||
- id
|
||||
- created_at
|
||||
- reviewed_at
|
||||
- status
|
||||
in: query
|
||||
name: sort
|
||||
type: string
|
||||
- collectionFormat: csv
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: statuses
|
||||
type: array
|
||||
- collectionFormat: csv
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: user_ids
|
||||
type: array
|
||||
- collectionFormat: csv
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: verify_types
|
||||
type: array
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Search historian applications
|
||||
tags:
|
||||
- Historian Application
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Submit application to become historian
|
||||
parameters:
|
||||
- description: Application data
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_request.CreateUserVerificationDto'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Create historian application
|
||||
tags:
|
||||
- Historian Application
|
||||
/historian/application/{id}:
|
||||
delete:
|
||||
description: Delete historian application
|
||||
parameters:
|
||||
- description: Verification ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Delete application
|
||||
tags:
|
||||
- Historian Application
|
||||
get:
|
||||
description: Get historian application detail
|
||||
parameters:
|
||||
- description: Verification ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Get application by ID
|
||||
tags:
|
||||
- Historian Application
|
||||
/historian/application/{id}/status:
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Approve or reject historian application
|
||||
parameters:
|
||||
- description: Verification ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: Status update
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_request.UpdateVerificationStatusDto'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Update application status
|
||||
tags:
|
||||
- Historian Application
|
||||
/media:
|
||||
delete:
|
||||
consumes:
|
||||
@@ -484,18 +725,55 @@ paths:
|
||||
- application/json
|
||||
description: Search media with filters, pagination
|
||||
parameters:
|
||||
- description: Page number
|
||||
in: query
|
||||
name: page
|
||||
type: integer
|
||||
- description: Items per page
|
||||
in: query
|
||||
- in: query
|
||||
maximum: 100
|
||||
minimum: 1
|
||||
name: limit
|
||||
type: integer
|
||||
- description: Search keyword
|
||||
in: query
|
||||
name: keyword
|
||||
- in: query
|
||||
minimum: 0
|
||||
name: max_size
|
||||
type: integer
|
||||
- in: query
|
||||
maxLength: 100
|
||||
name: mime_type
|
||||
type: string
|
||||
- in: query
|
||||
minimum: 0
|
||||
name: min_size
|
||||
type: integer
|
||||
- enum:
|
||||
- asc
|
||||
- desc
|
||||
in: query
|
||||
name: order
|
||||
type: string
|
||||
- in: query
|
||||
minimum: 1
|
||||
name: page
|
||||
type: integer
|
||||
- in: query
|
||||
maxLength: 200
|
||||
minLength: 2
|
||||
name: search
|
||||
type: string
|
||||
- enum:
|
||||
- id
|
||||
- created_at
|
||||
- updated_at
|
||||
- size
|
||||
- original_name
|
||||
- storage_key
|
||||
- mime_type
|
||||
in: query
|
||||
name: sort
|
||||
type: string
|
||||
- collectionFormat: csv
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: user_ids
|
||||
type: array
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -511,6 +789,8 @@ paths:
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Search media
|
||||
tags:
|
||||
- Media
|
||||
@@ -562,6 +842,8 @@ paths:
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Get media by ID
|
||||
tags:
|
||||
- Media
|
||||
@@ -571,16 +853,18 @@ paths:
|
||||
- application/json
|
||||
description: Generate a presigned URL for direct upload to storage
|
||||
parameters:
|
||||
- description: File name
|
||||
in: query
|
||||
name: filename
|
||||
- in: query
|
||||
name: content_type
|
||||
required: true
|
||||
type: string
|
||||
- description: Content type
|
||||
in: query
|
||||
name: contentType
|
||||
- in: query
|
||||
name: fileName
|
||||
required: true
|
||||
type: string
|
||||
- in: query
|
||||
name: size
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -607,11 +891,12 @@ paths:
|
||||
- application/json
|
||||
description: Confirm that upload via presigned URL is completed
|
||||
parameters:
|
||||
- description: Storage key
|
||||
in: query
|
||||
name: key
|
||||
- description: Request body
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
type: string
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_request.PreSignedCompleteDto'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -935,6 +1220,31 @@ paths:
|
||||
summary: Update user profile
|
||||
tags:
|
||||
- Users
|
||||
/users/{id}/application:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Retrieve media list by specific user ID
|
||||
parameters:
|
||||
- description: User ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
summary: Get user's media by user ID
|
||||
tags:
|
||||
- Users
|
||||
/users/{id}/media:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user