Skip to content

Commit

Permalink
fix: transfer-v2 validation
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnh12 committed Dec 11, 2023
1 parent 1eebcc1 commit 1c693ea
Show file tree
Hide file tree
Showing 19 changed files with 658 additions and 431 deletions.
199 changes: 130 additions & 69 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,56 @@ const docTemplate = `{
}
}
},
"/config/command-permissions": {
"get": {
"description": "Get list command permissions",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tono"
],
"summary": "Get list command permissions",
"parameters": [
{
"type": "string",
"name": "code",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.CommandPermissions"
}
}
}
}
},
"/config/install-url": {
"get": {
"description": "Get bot install url",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Command Permission"
],
"summary": "Get bot install url",
"responses": {
"302": {
"description": "Found"
}
}
}
},
"/config/role/{guild_id}/admin": {
"get": {
"description": "Get list admin role config of guild",
Expand Down Expand Up @@ -5091,6 +5141,7 @@ const docTemplate = `{
"Tip"
],
"summary": "OffChain Tip Bot - Transfer token v2",
"operationId": "transferV2",
"parameters": [
{
"description": "Transfer token request",
Expand All @@ -5112,36 +5163,6 @@ const docTemplate = `{
}
}
},
"/tono/command-permissions": {
"get": {
"description": "Get Tono command permissions",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Tono"
],
"summary": "Get Tono command permissions",
"parameters": [
{
"type": "string",
"name": "code",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.TonoCommandPermissions"
}
}
}
}
},
"/users": {
"post": {
"description": "Create User",
Expand Down Expand Up @@ -6344,6 +6365,9 @@ const docTemplate = `{
},
"short_name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -6382,6 +6406,32 @@ const docTemplate = `{
}
}
},
"model.CommandPermission": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"discord_permission_flag": {
"type": "string"
},
"id": {
"type": "integer"
},
"need_dm": {
"type": "boolean"
},
"updated_at": {
"type": "string"
}
}
},
"model.ConfigXpLevel": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -7126,18 +7176,33 @@ const docTemplate = `{
"model.OffchainTipBotToken": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"chain": {
"$ref": "#/definitions/model.Chain"
},
"chain_id": {
"type": "string"
},
"coin_gecko_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"decimal": {
"type": "integer"
},
"icon": {
"type": "string"
},
"id": {
"type": "string"
},
"is_native": {
"type": "boolean"
},
"service_fee": {
"type": "number"
},
Expand All @@ -7150,6 +7215,9 @@ const docTemplate = `{
"token_name": {
"type": "string"
},
"token_price": {
"type": "number"
},
"token_symbol": {
"type": "string"
},
Expand Down Expand Up @@ -7465,32 +7533,6 @@ const docTemplate = `{
}
}
},
"model.TonoCommandPermission": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"created_at": {
"type": "string"
},
"description": {
"type": "string"
},
"discord_permission_flag": {
"type": "string"
},
"id": {
"type": "integer"
},
"need_dm": {
"type": "boolean"
},
"updated_at": {
"type": "string"
}
}
},
"model.User": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -8366,7 +8408,6 @@ const docTemplate = `{
"type": "string"
},
"token": {
"description": "AmountString string ` + "`" + `json:\"amount_string\"` + "`" + `",
"type": "string"
},
"transfer_type": {
Expand Down Expand Up @@ -8521,6 +8562,15 @@ const docTemplate = `{
},
"request.TransferV2Request": {
"type": "object",
"required": [
"amount",
"chain_id",
"platform",
"recipients",
"sender",
"token",
"transfer_type"
],
"properties": {
"all": {
"type": "boolean"
Expand All @@ -8531,6 +8581,9 @@ const docTemplate = `{
"chain_id": {
"type": "string"
},
"channel_avatar": {
"type": "string"
},
"channel_id": {
"type": "string"
},
Expand Down Expand Up @@ -8563,7 +8616,12 @@ const docTemplate = `{
"type": "string"
},
"platform": {
"type": "string"
"type": "string",
"enum": [
"discord",
"telegram",
"web"
]
},
"recipients": {
"type": "array",
Expand All @@ -8574,6 +8632,9 @@ const docTemplate = `{
"sender": {
"type": "string"
},
"theme_id": {
"type": "integer"
},
"token": {
"type": "string"
},
Expand Down Expand Up @@ -9232,6 +9293,17 @@ const docTemplate = `{
}
}
},
"response.CommandPermissions": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/model.CommandPermission"
}
}
}
},
"response.CompareTokenReponseData": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -12337,17 +12409,6 @@ const docTemplate = `{
}
}
},
"response.TonoCommandPermissions": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/model.TonoCommandPermission"
}
}
}
},
"response.TopUser": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 1c693ea

Please sign in to comment.