{
  "swagger": "2.0",
  "info": {
    "title": "common API",
    "description": "API for ppanel",
    "version": "0.0.1"
  },
  "schemes": [
    "http",
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1/auth/check": {
      "get": {
        "summary": "Check user is exist",
        "operationId": "CheckUser",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/CheckUserResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "auth"
        ],
        "consumes": [
          "multipart/form-data"
        ]
      }
    },
    "/v1/auth/check/telephone": {
      "get": {
        "summary": "Check user telephone is exist",
        "operationId": "CheckUserTelephone",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/TelephoneCheckUserResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "telephone",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "telephone_area_code",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "auth"
        ],
        "consumes": [
          "multipart/form-data"
        ]
      }
    },
    "/v1/auth/login": {
      "post": {
        "summary": "User login",
        "operationId": "UserLogin",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "X-Original-Forwarded-For",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "Login-Type",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "description": " User login request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserLoginRequest"
            }
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/login/device": {
      "post": {
        "summary": "Device Login",
        "operationId": "DeviceLogin",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "X-Original-Forwarded-For",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/DeviceLoginRequest"
            }
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/login/telephone": {
      "post": {
        "summary": "User Telephone login",
        "operationId": "TelephoneLogin",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "X-Original-Forwarded-For",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "Login-Type",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "description": " login request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TelephoneLoginRequest"
            }
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/oauth/callback/apple": {
      "post": {
        "summary": "Apple Login Callback",
        "operationId": "AppleLoginCallback",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {}
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/AppleLoginCallbackRequest"
            }
          }
        ],
        "tags": [
          "auth/oauth"
        ],
        "consumes": [
          "multipart/form-data"
        ]
      }
    },
    "/v1/auth/oauth/login": {
      "post": {
        "summary": "OAuth login",
        "operationId": "OAuthLogin",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/OAuthLoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/OAthLoginRequest"
            }
          }
        ],
        "tags": [
          "auth/oauth"
        ]
      }
    },
    "/v1/auth/oauth/login/token": {
      "post": {
        "summary": "OAuth login get token",
        "operationId": "OAuthLoginGetToken",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/OAuthLoginGetTokenRequest"
            }
          }
        ],
        "tags": [
          "auth/oauth"
        ]
      }
    },
    "/v1/auth/register": {
      "post": {
        "summary": "User register",
        "operationId": "UserRegister",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "X-Original-Forwarded-For",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "Login-Type",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "description": " User login response",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserRegisterRequest"
            }
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/register/telephone": {
      "post": {
        "summary": "User Telephone register",
        "operationId": "TelephoneUserRegister",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "X-Original-Forwarded-For",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "Login-Type",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "description": " User login response",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TelephoneRegisterRequest"
            }
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/reset": {
      "post": {
        "summary": "Reset password",
        "operationId": "ResetPassword",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "X-Original-Forwarded-For",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "Login-Type",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "description": " User login response",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ResetPasswordRequest"
            }
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/auth/reset/telephone": {
      "post": {
        "summary": "Reset password",
        "operationId": "TelephoneResetPassword",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/LoginResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "X-Original-Forwarded-For",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "Login-Type",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "body",
            "description": " User login response",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TelephoneResetPasswordRequest"
            }
          }
        ],
        "tags": [
          "auth"
        ]
      }
    },
    "/v1/common/ads": {
      "get": {
        "summary": "Get Ads",
        "operationId": "GetAds",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetAdsResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "device",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "position",
            "in": "query",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "common"
        ],
        "consumes": [
          "multipart/form-data"
        ]
      }
    },
    "/v1/common/check_verification_code": {
      "post": {
        "summary": "Check verification code",
        "operationId": "CheckVerificationCode",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/CheckVerificationCodeRespone"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CheckVerificationCodeRequest"
            }
          }
        ],
        "tags": [
          "common"
        ]
      }
    },
    "/v1/common/client": {
      "get": {
        "summary": "Get Client",
        "operationId": "GetClient",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetSubscribeClientResponse"
            }
          }
        },
        "tags": [
          "common"
        ]
      }
    },
    "/v1/common/heartbeat": {
      "get": {
        "summary": "Heartbeat",
        "operationId": "Heartbeat",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/HeartbeatResponse"
            }
          }
        },
        "tags": [
          "common"
        ]
      }
    },
    "/v1/common/send_code": {
      "post": {
        "summary": "Get verification code",
        "operationId": "SendEmailCode",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SendCodeResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "description": " GetCodeRequest Get code request",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SendCodeRequest"
            }
          }
        ],
        "tags": [
          "common"
        ]
      }
    },
    "/v1/common/send_sms_code": {
      "post": {
        "summary": "Get sms verification code",
        "operationId": "SendSmsCode",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/SendCodeResponse"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SendSmsCodeRequest"
            }
          }
        ],
        "tags": [
          "common"
        ]
      }
    },
    "/v1/common/site/config": {
      "get": {
        "summary": "Get global config",
        "operationId": "GetGlobalConfig",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetGlobalConfigResponse"
            }
          }
        },
        "tags": [
          "common"
        ]
      }
    },
    "/v1/common/site/privacy": {
      "get": {
        "summary": "Get Privacy Policy",
        "operationId": "GetPrivacyPolicy",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/PrivacyPolicyConfig"
            }
          }
        },
        "tags": [
          "common"
        ]
      }
    },
    "/v1/common/site/stat": {
      "get": {
        "summary": "Get stat",
        "operationId": "GetStat",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetStatResponse"
            }
          }
        },
        "tags": [
          "common"
        ]
      }
    },
    "/v1/common/site/tos": {
      "get": {
        "summary": "Get Tos Content",
        "operationId": "GetTos",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetTosResponse"
            }
          }
        },
        "tags": [
          "common"
        ]
      }
    }
  },
  "definitions": {
    "Ads": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "title": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "target_url": {
          "type": "string"
        },
        "start_time": {
          "type": "integer",
          "format": "int64"
        },
        "end_time": {
          "type": "integer",
          "format": "int64"
        },
        "status": {
          "type": "integer",
          "format": "int32"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Ads",
      "required": [
        "id",
        "title",
        "type",
        "content",
        "description",
        "target_url",
        "start_time",
        "end_time",
        "status",
        "created_at",
        "updated_at"
      ]
    },
    "AlipayNotifyResponse": {
      "type": "object",
      "properties": {
        "return_code": {
          "type": "string"
        }
      },
      "title": "AlipayNotifyResponse",
      "required": [
        "return_code"
      ]
    },
    "Announcement": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "title": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "show": {
          "type": "boolean",
          "format": "boolean"
        },
        "pinned": {
          "type": "boolean",
          "format": "boolean"
        },
        "popup": {
          "type": "boolean",
          "format": "boolean"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Announcement",
      "required": [
        "id",
        "title",
        "content",
        "show",
        "pinned",
        "popup",
        "created_at",
        "updated_at"
      ]
    },
    "AnyTLS": {
      "type": "object",
      "properties": {
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "security_config": {
          "$ref": "#/definitions/SecurityConfig"
        }
      },
      "title": "AnyTLS",
      "required": [
        "port",
        "security_config"
      ]
    },
    "AppUserSubcbribe": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "upload": {
          "type": "integer",
          "format": "int64"
        },
        "traffic": {
          "type": "integer",
          "format": "int64"
        },
        "download": {
          "type": "integer",
          "format": "int64"
        },
        "device_limit": {
          "type": "integer",
          "format": "int64"
        },
        "start_time": {
          "type": "string"
        },
        "expire_time": {
          "type": "string"
        },
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/AppUserSubscbribeNode"
          }
        }
      },
      "title": "AppUserSubcbribe",
      "required": [
        "id",
        "name",
        "upload",
        "traffic",
        "download",
        "device_limit",
        "start_time",
        "expire_time",
        "list"
      ]
    },
    "AppUserSubscbribeNode": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "uuid": {
          "type": "string"
        },
        "protocol": {
          "type": "string"
        },
        "relay_mode": {
          "type": "string"
        },
        "relay_node": {
          "type": "string"
        },
        "server_addr": {
          "type": "string"
        },
        "speed_limit": {
          "type": "integer",
          "format": "int32"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "traffic": {
          "type": "integer",
          "format": "int64"
        },
        "traffic_ratio": {
          "type": "number",
          "format": "double"
        },
        "upload": {
          "type": "integer",
          "format": "int64"
        },
        "config": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "latitude": {
          "type": "string"
        },
        "longitude": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "download": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "AppUserSubscbribeNode",
      "required": [
        "id",
        "name",
        "uuid",
        "protocol",
        "relay_mode",
        "relay_node",
        "server_addr",
        "speed_limit",
        "tags",
        "traffic",
        "traffic_ratio",
        "upload",
        "config",
        "country",
        "city",
        "latitude",
        "longitude",
        "created_at",
        "download"
      ]
    },
    "AppleLoginCallbackRequest": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "id_token": {
          "type": "string"
        },
        "state": {
          "type": "string"
        }
      },
      "title": "AppleLoginCallbackRequest",
      "required": [
        "code",
        "id_token",
        "state"
      ]
    },
    "Application": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "icon": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "subscribe_type": {
          "type": "string"
        }
      },
      "title": "Application",
      "required": [
        "id",
        "icon",
        "name",
        "description",
        "subscribe_type"
      ]
    },
    "ApplicationPlatform": {
      "type": "object",
      "properties": {
        "ios": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApplicationVersion"
          }
        },
        "macos": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApplicationVersion"
          }
        },
        "linux": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApplicationVersion"
          }
        },
        "android": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApplicationVersion"
          }
        },
        "windows": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApplicationVersion"
          }
        },
        "harmony": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApplicationVersion"
          }
        }
      },
      "title": "ApplicationPlatform"
    },
    "ApplicationResponse": {
      "type": "object",
      "properties": {
        "applications": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ApplicationResponseInfo"
          }
        }
      },
      "title": "ApplicationResponse",
      "required": [
        "applications"
      ]
    },
    "ApplicationResponseInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "icon": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "subscribe_type": {
          "type": "string"
        },
        "platform": {
          "$ref": "#/definitions/ApplicationPlatform"
        }
      },
      "title": "ApplicationResponseInfo",
      "required": [
        "id",
        "name",
        "icon",
        "description",
        "subscribe_type",
        "platform"
      ]
    },
    "ApplicationVersion": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "url": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "is_default": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "ApplicationVersion",
      "required": [
        "id",
        "url",
        "version",
        "description",
        "is_default"
      ]
    },
    "AttachAppleTransactionByIdRequest": {
      "type": "object",
      "properties": {
        "order_no": {
          "type": "string"
        },
        "transaction_id": {
          "type": "string"
        },
        "sandbox": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "AttachAppleTransactionByIdRequest",
      "required": [
        "order_no",
        "transaction_id"
      ]
    },
    "AttachAppleTransactionRequest": {
      "type": "object",
      "properties": {
        "order_no": {
          "type": "string"
        },
        "signed_transaction_jws": {
          "type": "string"
        },
        "subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "duration_days": {
          "type": "integer",
          "format": "int64"
        },
        "tier": {
          "type": "string"
        }
      },
      "title": "AttachAppleTransactionRequest",
      "required": [
        "order_no",
        "signed_transaction_jws"
      ]
    },
    "AttachAppleTransactionResponse": {
      "type": "object",
      "properties": {
        "expires_at": {
          "type": "integer",
          "format": "int64"
        },
        "tier": {
          "type": "string"
        }
      },
      "title": "AttachAppleTransactionResponse",
      "required": [
        "expires_at",
        "tier"
      ]
    },
    "AuthConfig": {
      "type": "object",
      "properties": {
        "mobile": {
          "$ref": "#/definitions/MobileAuthenticateConfig"
        },
        "email": {
          "$ref": "#/definitions/EmailAuthticateConfig"
        },
        "device": {
          "$ref": "#/definitions/DeviceAuthticateConfig"
        },
        "register": {
          "$ref": "#/definitions/PubilcRegisterConfig"
        }
      },
      "title": "AuthConfig",
      "required": [
        "mobile",
        "email",
        "device",
        "register"
      ]
    },
    "AuthMethodConfig": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "method": {
          "type": "string"
        },
        "config": {
          "type": "object"
        },
        "enabled": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "AuthMethodConfig",
      "required": [
        "id",
        "method",
        "config",
        "enabled"
      ]
    },
    "BalanceLog": {
      "type": "object",
      "properties": {
        "type": {
          "type": "integer",
          "format": "uin16"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "amount": {
          "type": "integer",
          "format": "int64"
        },
        "order_no": {
          "type": "string"
        },
        "balance": {
          "type": "integer",
          "format": "int64"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "BalanceLog",
      "required": [
        "type",
        "user_id",
        "amount",
        "balance",
        "timestamp"
      ]
    },
    "CheckUserRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        }
      },
      "title": "CheckUserRequest",
      "required": [
        "email"
      ]
    },
    "CheckUserResponse": {
      "type": "object",
      "properties": {
        "exist": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "CheckUserResponse",
      "required": [
        "exist"
      ]
    },
    "CheckVerificationCodeRequest": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "account": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "type": {
          "type": "integer",
          "format": "uint8"
        }
      },
      "title": "CheckVerificationCodeRequest",
      "required": [
        "method",
        "account",
        "code",
        "type"
      ]
    },
    "CheckVerificationCodeRespone": {
      "type": "object",
      "properties": {
        "status": {
          "type": "boolean",
          "format": "boolean"
        },
        "exist": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "CheckVerificationCodeRespone",
      "required": [
        "status",
        "exist"
      ]
    },
    "CheckoutOrderRequest": {
      "type": "object",
      "properties": {
        "orderNo": {
          "type": "string"
        },
        "returnUrl": {
          "type": "string"
        }
      },
      "title": "CheckoutOrderRequest",
      "required": [
        "orderNo"
      ]
    },
    "CheckoutOrderResponse": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "checkout_url": {
          "type": "string"
        },
        "stripe": {
          "$ref": "#/definitions/StripePayment"
        },
        "product_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "CheckoutOrderResponse",
      "required": [
        "type"
      ]
    },
    "CloseOrderRequest": {
      "type": "object",
      "properties": {
        "orderNo": {
          "type": "string"
        }
      },
      "title": "CloseOrderRequest",
      "required": [
        "orderNo"
      ]
    },
    "CommissionLog": {
      "type": "object",
      "properties": {
        "type": {
          "type": "integer",
          "format": "uin16"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "amount": {
          "type": "integer",
          "format": "int64"
        },
        "order_no": {
          "type": "string"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "CommissionLog",
      "required": [
        "type",
        "user_id",
        "amount",
        "order_no",
        "timestamp"
      ]
    },
    "Coupon": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "count": {
          "type": "integer",
          "format": "int64"
        },
        "type": {
          "type": "integer",
          "format": "uint8"
        },
        "discount": {
          "type": "integer",
          "format": "int64"
        },
        "start_time": {
          "type": "integer",
          "format": "int64"
        },
        "expire_time": {
          "type": "integer",
          "format": "int64"
        },
        "user_limit": {
          "type": "integer",
          "format": "int64"
        },
        "subscribe": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "used_count": {
          "type": "integer",
          "format": "int64"
        },
        "enable": {
          "type": "boolean",
          "format": "boolean"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Coupon",
      "required": [
        "id",
        "name",
        "code",
        "count",
        "type",
        "discount",
        "start_time",
        "expire_time",
        "user_limit",
        "subscribe",
        "used_count",
        "enable",
        "created_at",
        "updated_at"
      ]
    },
    "Currency": {
      "type": "object",
      "properties": {
        "currency_unit": {
          "type": "string"
        },
        "currency_symbol": {
          "type": "string"
        }
      },
      "title": "Currency",
      "required": [
        "currency_unit",
        "currency_symbol"
      ]
    },
    "CurrencyConfig": {
      "type": "object",
      "properties": {
        "access_key": {
          "type": "string"
        },
        "currency_unit": {
          "type": "string"
        },
        "currency_symbol": {
          "type": "string"
        }
      },
      "title": "CurrencyConfig",
      "required": [
        "access_key",
        "currency_unit",
        "currency_symbol"
      ]
    },
    "DeviceAuthticateConfig": {
      "type": "object",
      "properties": {
        "enable": {
          "type": "boolean",
          "format": "boolean"
        },
        "show_ads": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_security": {
          "type": "boolean",
          "format": "boolean"
        },
        "only_real_device": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "DeviceAuthticateConfig",
      "required": [
        "enable",
        "show_ads",
        "enable_security",
        "only_real_device"
      ]
    },
    "DeviceLoginRequest": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "user_agent": {
          "type": "string"
        },
        "cf_token": {
          "type": "string"
        },
        "short_code": {
          "type": "string"
        }
      },
      "title": "DeviceLoginRequest",
      "required": [
        "identifier",
        "user_agent"
      ]
    },
    "Document": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "title": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "show": {
          "type": "boolean",
          "format": "boolean"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Document",
      "required": [
        "id",
        "title",
        "content",
        "tags",
        "show",
        "created_at",
        "updated_at"
      ]
    },
    "DownloadLink": {
      "type": "object",
      "properties": {
        "ios": {
          "type": "string"
        },
        "android": {
          "type": "string"
        },
        "windows": {
          "type": "string"
        },
        "mac": {
          "type": "string"
        },
        "linux": {
          "type": "string"
        },
        "harmony": {
          "type": "string"
        }
      },
      "title": "DownloadLink"
    },
    "EPayNotifyRequest": {
      "type": "object",
      "properties": {
        "pid": {
          "type": "integer",
          "format": "int64"
        },
        "trade_no": {
          "type": "string"
        },
        "out_trade_no": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "money": {
          "type": "string"
        },
        "trade_status": {
          "type": "string"
        },
        "param": {
          "type": "string"
        },
        "sign": {
          "type": "string"
        },
        "sign_type": {
          "type": "string"
        }
      },
      "title": "EPayNotifyRequest",
      "required": [
        "pid",
        "trade_no",
        "out_trade_no",
        "type",
        "name",
        "money",
        "trade_status",
        "param",
        "sign",
        "sign_type"
      ]
    },
    "EmailAuthticateConfig": {
      "type": "object",
      "properties": {
        "enable": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_verify": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_domain_suffix": {
          "type": "boolean",
          "format": "boolean"
        },
        "domain_suffix_list": {
          "type": "string"
        }
      },
      "title": "EmailAuthticateConfig",
      "required": [
        "enable",
        "enable_verify",
        "enable_domain_suffix",
        "domain_suffix_list"
      ]
    },
    "FamilyDetail": {
      "type": "object",
      "properties": {
        "summary": {
          "$ref": "#/definitions/FamilySummary"
        },
        "members": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/FamilyMemberItem"
          }
        }
      },
      "title": "FamilyDetail",
      "required": [
        "summary",
        "members"
      ]
    },
    "FamilyMemberItem": {
      "type": "object",
      "properties": {
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "identifier": {
          "type": "string"
        },
        "role": {
          "type": "integer",
          "format": "uint8"
        },
        "role_name": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "uint8"
        },
        "status_name": {
          "type": "string"
        },
        "join_source": {
          "type": "string"
        },
        "joined_at": {
          "type": "integer",
          "format": "int64"
        },
        "left_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "FamilyMemberItem",
      "required": [
        "user_id",
        "identifier",
        "role",
        "role_name",
        "status",
        "status_name",
        "join_source",
        "joined_at"
      ]
    },
    "FamilySummary": {
      "type": "object",
      "properties": {
        "family_id": {
          "type": "integer",
          "format": "int64"
        },
        "owner_user_id": {
          "type": "integer",
          "format": "int64"
        },
        "owner_identifier": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "active_member_count": {
          "type": "integer",
          "format": "int64"
        },
        "max_members": {
          "type": "integer",
          "format": "int64"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "FamilySummary",
      "required": [
        "family_id",
        "owner_user_id",
        "owner_identifier",
        "status",
        "active_member_count",
        "max_members",
        "created_at",
        "updated_at"
      ]
    },
    "Follow": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "ticket_id": {
          "type": "integer",
          "format": "int64"
        },
        "from": {
          "type": "string"
        },
        "type": {
          "type": "integer",
          "format": "uint8"
        },
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Follow",
      "required": [
        "id",
        "ticket_id",
        "from",
        "type",
        "content",
        "created_at"
      ]
    },
    "GetAdsRequest": {
      "type": "object",
      "properties": {
        "device": {
          "type": "string"
        },
        "position": {
          "type": "string"
        }
      },
      "title": "GetAdsRequest",
      "required": [
        "device",
        "position"
      ]
    },
    "GetAdsResponse": {
      "type": "object",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Ads"
          }
        }
      },
      "title": "GetAdsResponse",
      "required": [
        "list"
      ]
    },
    "GetAppleStatusResponse": {
      "type": "object",
      "properties": {
        "active": {
          "type": "boolean",
          "format": "boolean"
        },
        "expires_at": {
          "type": "integer",
          "format": "int64"
        },
        "tier": {
          "type": "string"
        }
      },
      "title": "GetAppleStatusResponse",
      "required": [
        "active",
        "expires_at",
        "tier"
      ]
    },
    "GetAvailablePaymentMethodsResponse": {
      "type": "object",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PaymentMethod"
          }
        }
      },
      "title": "GetAvailablePaymentMethodsResponse",
      "required": [
        "list"
      ]
    },
    "GetGlobalConfigResponse": {
      "type": "object",
      "properties": {
        "site": {
          "$ref": "#/definitions/SiteConfig"
        },
        "verify": {
          "$ref": "#/definitions/VeifyConfig"
        },
        "auth": {
          "$ref": "#/definitions/AuthConfig"
        },
        "invite": {
          "$ref": "#/definitions/InviteConfig"
        },
        "currency": {
          "$ref": "#/definitions/Currency"
        },
        "subscribe": {
          "$ref": "#/definitions/SubscribeConfig"
        },
        "signature": {
          "$ref": "#/definitions/SignatureConfig"
        },
        "verify_code": {
          "$ref": "#/definitions/PubilcVerifyCodeConfig"
        },
        "oauth_methods": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "web_ad": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "GetGlobalConfigResponse",
      "required": [
        "site",
        "verify",
        "auth",
        "invite",
        "currency",
        "subscribe",
        "signature",
        "verify_code",
        "oauth_methods",
        "web_ad"
      ]
    },
    "GetStatResponse": {
      "type": "object",
      "properties": {
        "user": {
          "type": "integer",
          "format": "int64"
        },
        "node": {
          "type": "integer",
          "format": "int64"
        },
        "country": {
          "type": "integer",
          "format": "int64"
        },
        "protocol": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "GetStatResponse",
      "required": [
        "user",
        "node",
        "country",
        "protocol"
      ]
    },
    "GetSubscribeClientResponse": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SubscribeClient"
          }
        }
      },
      "title": "GetSubscribeClientResponse",
      "required": [
        "total",
        "list"
      ]
    },
    "GetTosResponse": {
      "type": "object",
      "properties": {
        "tos_content": {
          "type": "string"
        }
      },
      "title": "GetTosResponse",
      "required": [
        "tos_content"
      ]
    },
    "GetUserSubscribeTrafficLogsRequest": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "format": "int32"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "start_time": {
          "type": "integer",
          "format": "int64"
        },
        "end_time": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "GetUserSubscribeTrafficLogsRequest",
      "required": [
        "page",
        "size",
        "user_id",
        "subscribe_id",
        "start_time",
        "end_time"
      ]
    },
    "GetUserSubscribeTrafficLogsResponse": {
      "type": "object",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/TrafficLog"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "GetUserSubscribeTrafficLogsResponse",
      "required": [
        "list",
        "total"
      ]
    },
    "GoogleLoginCallbackRequest": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "state": {
          "type": "string"
        }
      },
      "title": "GoogleLoginCallbackRequest",
      "required": [
        "code",
        "state"
      ]
    },
    "HeartbeatResponse": {
      "type": "object",
      "properties": {
        "status": {
          "type": "boolean",
          "format": "boolean"
        },
        "message": {
          "type": "string"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "HeartbeatResponse",
      "required": [
        "status"
      ]
    },
    "Hysteria2": {
      "type": "object",
      "properties": {
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "hop_ports": {
          "type": "string"
        },
        "hop_interval": {
          "type": "integer",
          "format": "int32"
        },
        "obfs_password": {
          "type": "string"
        },
        "security_config": {
          "$ref": "#/definitions/SecurityConfig"
        }
      },
      "title": "Hysteria2",
      "required": [
        "port",
        "hop_ports",
        "hop_interval",
        "obfs_password",
        "security_config"
      ]
    },
    "InviteConfig": {
      "type": "object",
      "properties": {
        "forced_invite": {
          "type": "boolean",
          "format": "boolean"
        },
        "referral_percentage": {
          "type": "integer",
          "format": "int64"
        },
        "only_first_purchase": {
          "type": "boolean",
          "format": "boolean"
        },
        "gift_days": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "InviteConfig",
      "required": [
        "forced_invite",
        "referral_percentage",
        "only_first_purchase",
        "gift_days"
      ]
    },
    "LoginResponse": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        }
      },
      "title": "LoginResponse",
      "required": [
        "token"
      ]
    },
    "MessageLog": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "type": {
          "type": "integer",
          "format": "uint8"
        },
        "platform": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "content": {
          "type": "object"
        },
        "status": {
          "type": "integer",
          "format": "uint8"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "MessageLog",
      "required": [
        "id",
        "type",
        "platform",
        "to",
        "subject",
        "content",
        "status",
        "created_at"
      ]
    },
    "MobileAuthenticateConfig": {
      "type": "object",
      "properties": {
        "enable": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_whitelist": {
          "type": "boolean",
          "format": "boolean"
        },
        "whitelist": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "MobileAuthenticateConfig",
      "required": [
        "enable",
        "enable_whitelist",
        "whitelist"
      ]
    },
    "NodeConfig": {
      "type": "object",
      "properties": {
        "node_secret": {
          "type": "string"
        },
        "node_pull_interval": {
          "type": "integer",
          "format": "int64"
        },
        "node_push_interval": {
          "type": "integer",
          "format": "int64"
        },
        "traffic_report_threshold": {
          "type": "integer",
          "format": "int64"
        },
        "ip_strategy": {
          "type": "string"
        },
        "dns": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/NodeDNS"
          }
        },
        "block": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "outbound": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/NodeOutbound"
          }
        }
      },
      "title": "NodeConfig",
      "required": [
        "node_secret",
        "node_pull_interval",
        "node_push_interval",
        "traffic_report_threshold",
        "ip_strategy",
        "dns",
        "block",
        "outbound"
      ]
    },
    "NodeDNS": {
      "type": "object",
      "properties": {
        "proto": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "domains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "NodeDNS",
      "required": [
        "proto",
        "address",
        "domains"
      ]
    },
    "NodeOutbound": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "protocol": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "int64"
        },
        "password": {
          "type": "string"
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "NodeOutbound",
      "required": [
        "name",
        "protocol",
        "address",
        "port",
        "password",
        "rules"
      ]
    },
    "NodeRelay": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "prefix": {
          "type": "string"
        }
      },
      "title": "NodeRelay",
      "required": [
        "host",
        "port",
        "prefix"
      ]
    },
    "OAthLoginRequest": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string",
          "description": " google, facebook, apple, telegram, github etc."
        },
        "redirect": {
          "type": "string"
        }
      },
      "title": "OAthLoginRequest",
      "required": [
        "method",
        "redirect"
      ]
    },
    "OAuthLoginGetTokenRequest": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string",
          "description": " google, facebook, apple, telegram, github etc."
        },
        "callback": {
          "type": "object"
        }
      },
      "title": "OAuthLoginGetTokenRequest",
      "required": [
        "method",
        "callback"
      ]
    },
    "OAuthLoginResponse": {
      "type": "object",
      "properties": {
        "redirect": {
          "type": "string"
        }
      },
      "title": "OAuthLoginResponse",
      "required": [
        "redirect"
      ]
    },
    "Order": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "order_no": {
          "type": "string"
        },
        "type": {
          "type": "integer",
          "format": "uint8"
        },
        "quantity": {
          "type": "integer",
          "format": "int64"
        },
        "price": {
          "type": "integer",
          "format": "int64"
        },
        "amount": {
          "type": "integer",
          "format": "int64"
        },
        "gift_amount": {
          "type": "integer",
          "format": "int64"
        },
        "discount": {
          "type": "integer",
          "format": "int64"
        },
        "coupon": {
          "type": "string"
        },
        "coupon_discount": {
          "type": "integer",
          "format": "int64"
        },
        "commission": {
          "type": "integer",
          "format": "int64"
        },
        "payment": {
          "$ref": "#/definitions/PaymentMethod"
        },
        "fee_amount": {
          "type": "integer",
          "format": "int64"
        },
        "trade_no": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "uint8"
        },
        "subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Order",
      "required": [
        "id",
        "user_id",
        "order_no",
        "type",
        "quantity",
        "price",
        "amount",
        "gift_amount",
        "discount",
        "coupon",
        "coupon_discount",
        "payment",
        "fee_amount",
        "trade_no",
        "status",
        "subscribe_id",
        "created_at",
        "updated_at"
      ]
    },
    "OrderDetail": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "order_no": {
          "type": "string"
        },
        "type": {
          "type": "integer",
          "format": "uint8"
        },
        "quantity": {
          "type": "integer",
          "format": "int64"
        },
        "price": {
          "type": "integer",
          "format": "int64"
        },
        "amount": {
          "type": "integer",
          "format": "int64"
        },
        "gift_amount": {
          "type": "integer",
          "format": "int64"
        },
        "discount": {
          "type": "integer",
          "format": "int64"
        },
        "coupon": {
          "type": "string"
        },
        "coupon_discount": {
          "type": "integer",
          "format": "int64"
        },
        "commission": {
          "type": "integer",
          "format": "int64"
        },
        "payment": {
          "$ref": "#/definitions/PaymentMethod"
        },
        "method": {
          "type": "string"
        },
        "fee_amount": {
          "type": "integer",
          "format": "int64"
        },
        "trade_no": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "uint8"
        },
        "subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "subscribe": {
          "$ref": "#/definitions/Subscribe"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "OrderDetail",
      "required": [
        "id",
        "user_id",
        "order_no",
        "type",
        "quantity",
        "price",
        "amount",
        "gift_amount",
        "discount",
        "coupon",
        "coupon_discount",
        "payment",
        "method",
        "fee_amount",
        "trade_no",
        "status",
        "subscribe_id",
        "subscribe",
        "created_at",
        "updated_at"
      ]
    },
    "PaymentConfig": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "icon": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "config": {
          "type": "object"
        },
        "fee_mode": {
          "type": "integer",
          "format": "uint32"
        },
        "fee_percent": {
          "type": "integer",
          "format": "int64"
        },
        "fee_amount": {
          "type": "integer",
          "format": "int64"
        },
        "enable": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "PaymentConfig",
      "required": [
        "id",
        "name",
        "platform",
        "description",
        "config",
        "fee_mode",
        "enable"
      ]
    },
    "PaymentMethod": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "icon": {
          "type": "string"
        },
        "fee_mode": {
          "type": "integer",
          "format": "uint32"
        },
        "fee_percent": {
          "type": "integer",
          "format": "int64"
        },
        "fee_amount": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "PaymentMethod",
      "required": [
        "id",
        "name",
        "platform",
        "description",
        "icon",
        "fee_mode",
        "fee_percent",
        "fee_amount"
      ]
    },
    "PaymentMethodDetail": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "icon": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "config": {
          "type": "object"
        },
        "fee_mode": {
          "type": "integer",
          "format": "uint32"
        },
        "fee_percent": {
          "type": "integer",
          "format": "int64"
        },
        "fee_amount": {
          "type": "integer",
          "format": "int64"
        },
        "enable": {
          "type": "boolean",
          "format": "boolean"
        },
        "notify_url": {
          "type": "string"
        }
      },
      "title": "PaymentMethodDetail",
      "required": [
        "id",
        "name",
        "platform",
        "description",
        "icon",
        "domain",
        "config",
        "fee_mode",
        "fee_percent",
        "fee_amount",
        "enable",
        "notify_url"
      ]
    },
    "PlatformInfo": {
      "type": "object",
      "properties": {
        "platform": {
          "type": "string"
        },
        "platform_url": {
          "type": "string"
        },
        "platform_field_description": {
          "type": "object"
        }
      },
      "title": "PlatformInfo",
      "required": [
        "platform",
        "platform_url",
        "platform_field_description"
      ]
    },
    "PlatformResponse": {
      "type": "object",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PlatformInfo"
          }
        }
      },
      "title": "PlatformResponse",
      "required": [
        "list"
      ]
    },
    "PreOrderResponse": {
      "type": "object",
      "properties": {
        "price": {
          "type": "integer",
          "format": "int64"
        },
        "amount": {
          "type": "integer",
          "format": "int64"
        },
        "discount": {
          "type": "integer",
          "format": "int64"
        },
        "gift_amount": {
          "type": "integer",
          "format": "int64"
        },
        "coupon": {
          "type": "string"
        },
        "coupon_discount": {
          "type": "integer",
          "format": "int64"
        },
        "fee_amount": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "PreOrderResponse",
      "required": [
        "price",
        "amount",
        "discount",
        "gift_amount",
        "coupon",
        "coupon_discount",
        "fee_amount"
      ]
    },
    "PreRenewalOrderResponse": {
      "type": "object",
      "properties": {
        "orderNo": {
          "type": "string"
        }
      },
      "title": "PreRenewalOrderResponse",
      "required": [
        "orderNo"
      ]
    },
    "PrivacyPolicyConfig": {
      "type": "object",
      "properties": {
        "privacy_policy": {
          "type": "string"
        }
      },
      "title": "PrivacyPolicyConfig",
      "required": [
        "privacy_policy"
      ]
    },
    "Protocol": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "uin16"
        },
        "enable": {
          "type": "boolean",
          "format": "boolean"
        },
        "security": {
          "type": "string"
        },
        "sni": {
          "type": "string"
        },
        "allow_insecure": {
          "type": "boolean",
          "format": "boolean"
        },
        "fingerprint": {
          "type": "string"
        },
        "reality_server_addr": {
          "type": "string"
        },
        "reality_server_port": {
          "type": "integer",
          "format": "int32"
        },
        "reality_private_key": {
          "type": "string"
        },
        "reality_public_key": {
          "type": "string"
        },
        "reality_short_id": {
          "type": "string"
        },
        "transport": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "path": {
          "type": "string"
        },
        "service_name": {
          "type": "string"
        },
        "cipher": {
          "type": "string"
        },
        "server_key": {
          "type": "string"
        },
        "flow": {
          "type": "string"
        },
        "hop_ports": {
          "type": "string"
        },
        "hop_interval": {
          "type": "integer",
          "format": "int32"
        },
        "obfs_password": {
          "type": "string"
        },
        "disable_sni": {
          "type": "boolean",
          "format": "boolean"
        },
        "reduce_rtt": {
          "type": "boolean",
          "format": "boolean"
        },
        "udp_relay_mode": {
          "type": "string"
        },
        "congestion_controller": {
          "type": "string"
        },
        "multiplex": {
          "type": "string",
          "description": " mux, eg: off/low/medium/high"
        },
        "padding_scheme": {
          "type": "string",
          "description": " padding scheme"
        },
        "up_mbps": {
          "type": "integer",
          "format": "int32",
          "description": " upload speed limit"
        },
        "down_mbps": {
          "type": "integer",
          "format": "int32",
          "description": " download speed limit"
        },
        "obfs": {
          "type": "string",
          "description": " obfs, 'none', 'http', 'tls'"
        },
        "obfs_host": {
          "type": "string",
          "description": " obfs host"
        },
        "obfs_path": {
          "type": "string",
          "description": " obfs path"
        },
        "xhttp_mode": {
          "type": "string",
          "description": " xhttp mode"
        },
        "xhttp_extra": {
          "type": "string",
          "description": " xhttp extra path"
        },
        "encryption": {
          "type": "string",
          "description": " encryption，'none', 'mlkem768x25519plus'"
        },
        "encryption_mode": {
          "type": "string",
          "description": " encryption mode，'native', 'xorpub', 'random'"
        },
        "encryption_rtt": {
          "type": "string",
          "description": " encryption rtt，'0rtt', '1rtt'"
        },
        "encryption_ticket": {
          "type": "string",
          "description": " encryption ticket"
        },
        "encryption_server_padding": {
          "type": "string",
          "description": " encryption server padding"
        },
        "encryption_private_key": {
          "type": "string",
          "description": " encryption private key"
        },
        "encryption_client_padding": {
          "type": "string",
          "description": " encryption client padding"
        },
        "encryption_password": {
          "type": "string",
          "description": " encryption password"
        },
        "ratio": {
          "type": "number",
          "format": "double",
          "description": " Traffic ratio, default is 1"
        },
        "cert_mode": {
          "type": "string",
          "description": " Certificate mode, `none`｜`http`｜`dns`｜`self`"
        },
        "cert_dns_provider": {
          "type": "string",
          "description": " DNS provider for certificate"
        },
        "cert_dns_env": {
          "type": "string",
          "description": " Environment for DNS provider"
        }
      },
      "title": "Protocol",
      "required": [
        "type",
        "port",
        "enable"
      ]
    },
    "PubilcRegisterConfig": {
      "type": "object",
      "properties": {
        "stop_register": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_ip_register_limit": {
          "type": "boolean",
          "format": "boolean"
        },
        "ip_register_limit": {
          "type": "integer",
          "format": "int64"
        },
        "ip_register_limit_duration": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "PubilcRegisterConfig",
      "required": [
        "stop_register",
        "enable_ip_register_limit",
        "ip_register_limit",
        "ip_register_limit_duration"
      ]
    },
    "PubilcVerifyCodeConfig": {
      "type": "object",
      "properties": {
        "verify_code_interval": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "PubilcVerifyCodeConfig",
      "required": [
        "verify_code_interval"
      ]
    },
    "PurchaseOrderRequest": {
      "type": "object",
      "properties": {
        "subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "quantity": {
          "type": "integer",
          "format": "int64"
        },
        "payment": {
          "type": "integer",
          "format": "int64"
        },
        "coupon": {
          "type": "string"
        }
      },
      "title": "PurchaseOrderRequest",
      "required": [
        "subscribe_id",
        "quantity"
      ]
    },
    "PurchaseOrderResponse": {
      "type": "object",
      "properties": {
        "order_no": {
          "type": "string"
        }
      },
      "title": "PurchaseOrderResponse",
      "required": [
        "order_no"
      ]
    },
    "QueryAnnouncementRequest": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "format": "int32"
        },
        "size": {
          "type": "integer",
          "format": "int32",
          "default": "15"
        },
        "pinned": {
          "type": "boolean",
          "format": "boolean"
        },
        "popup": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "QueryAnnouncementRequest",
      "required": [
        "page",
        "size",
        "pinned",
        "popup"
      ]
    },
    "QueryAnnouncementResponse": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "announcements": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Announcement"
          }
        }
      },
      "title": "QueryAnnouncementResponse",
      "required": [
        "total",
        "announcements"
      ]
    },
    "QueryDocumentDetailRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "QueryDocumentDetailRequest",
      "required": [
        "id"
      ]
    },
    "QueryDocumentListResponse": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Document"
          }
        }
      },
      "title": "QueryDocumentListResponse",
      "required": [
        "total",
        "list"
      ]
    },
    "QueryOrderDetailRequest": {
      "type": "object",
      "properties": {
        "order_no": {
          "type": "string"
        }
      },
      "title": "QueryOrderDetailRequest",
      "required": [
        "order_no"
      ]
    },
    "QueryOrderListRequest": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "format": "int32"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        },
        "status": {
          "type": "integer",
          "format": "int32"
        },
        "search": {
          "type": "string"
        }
      },
      "title": "QueryOrderListRequest",
      "required": [
        "page",
        "size"
      ]
    },
    "QueryOrderListResponse": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderDetail"
          }
        }
      },
      "title": "QueryOrderListResponse",
      "required": [
        "total",
        "list"
      ]
    },
    "QuerySubscribeGroupListResponse": {
      "type": "object",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SubscribeGroup"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "QuerySubscribeGroupListResponse",
      "required": [
        "list",
        "total"
      ]
    },
    "QuerySubscribeListResponse": {
      "type": "object",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Subscribe"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "QuerySubscribeListResponse",
      "required": [
        "list",
        "total"
      ]
    },
    "QueryUserAffiliateCountResponse": {
      "type": "object",
      "properties": {
        "registers": {
          "type": "integer",
          "format": "int64"
        },
        "total_commission": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "QueryUserAffiliateCountResponse",
      "required": [
        "registers",
        "total_commission"
      ]
    },
    "QueryUserAffiliateListRequest": {
      "type": "object",
      "properties": {
        "page": {
          "type": "integer",
          "format": "int32"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      },
      "title": "QueryUserAffiliateListRequest",
      "required": [
        "page",
        "size"
      ]
    },
    "QueryUserAffiliateListResponse": {
      "type": "object",
      "properties": {
        "list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UserAffiliate"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "QueryUserAffiliateListResponse",
      "required": [
        "list",
        "total"
      ]
    },
    "RechargeOrderRequest": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "integer",
          "format": "int64"
        },
        "payment": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RechargeOrderRequest",
      "required": [
        "amount",
        "payment"
      ]
    },
    "RechargeOrderResponse": {
      "type": "object",
      "properties": {
        "order_no": {
          "type": "string"
        }
      },
      "title": "RechargeOrderResponse",
      "required": [
        "order_no"
      ]
    },
    "RedemptionCode": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "code": {
          "type": "string"
        },
        "total_count": {
          "type": "integer",
          "format": "int64"
        },
        "used_count": {
          "type": "integer",
          "format": "int64"
        },
        "subscribe_plan": {
          "type": "integer",
          "format": "int64"
        },
        "unit_time": {
          "type": "string"
        },
        "quantity": {
          "type": "integer",
          "format": "int64"
        },
        "status": {
          "type": "integer",
          "format": "int64"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RedemptionCode",
      "required": [
        "id",
        "code",
        "total_count",
        "used_count",
        "subscribe_plan",
        "unit_time",
        "quantity",
        "status",
        "created_at",
        "updated_at"
      ]
    },
    "RedemptionRecord": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "redemption_code_id": {
          "type": "integer",
          "format": "int64"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "unit_time": {
          "type": "string"
        },
        "quantity": {
          "type": "integer",
          "format": "int64"
        },
        "redeemed_at": {
          "type": "integer",
          "format": "int64"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RedemptionRecord",
      "required": [
        "id",
        "redemption_code_id",
        "user_id",
        "subscribe_id",
        "unit_time",
        "quantity",
        "redeemed_at",
        "created_at"
      ]
    },
    "RegisterConfig": {
      "type": "object",
      "properties": {
        "stop_register": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_trial": {
          "type": "boolean",
          "format": "boolean"
        },
        "trial_subscribe": {
          "type": "integer",
          "format": "int64"
        },
        "trial_time": {
          "type": "integer",
          "format": "int64"
        },
        "trial_time_unit": {
          "type": "string"
        },
        "enable_ip_register_limit": {
          "type": "boolean",
          "format": "boolean"
        },
        "ip_register_limit": {
          "type": "integer",
          "format": "int64"
        },
        "ip_register_limit_duration": {
          "type": "integer",
          "format": "int64"
        },
        "device_limit": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "RegisterConfig",
      "required": [
        "stop_register",
        "enable_trial",
        "trial_subscribe",
        "trial_time",
        "trial_time_unit",
        "enable_ip_register_limit",
        "ip_register_limit",
        "ip_register_limit_duration",
        "device_limit"
      ]
    },
    "RenewalOrderRequest": {
      "type": "object",
      "properties": {
        "user_subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "quantity": {
          "type": "integer",
          "format": "int64"
        },
        "payment": {
          "type": "integer",
          "format": "int64"
        },
        "coupon": {
          "type": "string"
        }
      },
      "title": "RenewalOrderRequest",
      "required": [
        "user_subscribe_id",
        "quantity",
        "payment"
      ]
    },
    "RenewalOrderResponse": {
      "type": "object",
      "properties": {
        "order_no": {
          "type": "string"
        }
      },
      "title": "RenewalOrderResponse",
      "required": [
        "order_no"
      ]
    },
    "ResetPasswordRequest": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "cf_token": {
          "type": "string"
        }
      },
      "title": "ResetPasswordRequest",
      "required": [
        "identifier",
        "email",
        "password"
      ]
    },
    "ResetSubscribeTrafficLog": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "type": {
          "type": "integer",
          "format": "uin16"
        },
        "user_subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "order_no": {
          "type": "string"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ResetSubscribeTrafficLog",
      "required": [
        "id",
        "type",
        "user_subscribe_id",
        "timestamp"
      ]
    },
    "ResetTrafficOrderRequest": {
      "type": "object",
      "properties": {
        "user_subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "payment": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ResetTrafficOrderRequest",
      "required": [
        "user_subscribe_id",
        "payment"
      ]
    },
    "ResetTrafficOrderResponse": {
      "type": "object",
      "properties": {
        "order_no": {
          "type": "string"
        }
      },
      "title": "ResetTrafficOrderResponse",
      "required": [
        "order_no"
      ]
    },
    "ResetUserSubscribeTokenRequest": {
      "type": "object",
      "properties": {
        "user_subscribe_id": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ResetUserSubscribeTokenRequest",
      "required": [
        "user_subscribe_id"
      ]
    },
    "RestoreAppleTransactionsRequest": {
      "type": "object",
      "properties": {
        "transactions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "RestoreAppleTransactionsRequest",
      "required": [
        "transactions"
      ]
    },
    "SecurityConfig": {
      "type": "object",
      "properties": {
        "sni": {
          "type": "string"
        },
        "allow_insecure": {
          "type": "boolean",
          "format": "boolean"
        },
        "fingerprint": {
          "type": "string"
        },
        "reality_server_addr": {
          "type": "string"
        },
        "reality_server_port": {
          "type": "integer",
          "format": "int32"
        },
        "reality_private_key": {
          "type": "string"
        },
        "reality_public_key": {
          "type": "string"
        },
        "reality_short_id": {
          "type": "string"
        }
      },
      "title": "SecurityConfig",
      "required": [
        "sni",
        "allow_insecure",
        "fingerprint",
        "reality_server_addr",
        "reality_server_port",
        "reality_private_key",
        "reality_public_key",
        "reality_short_id"
      ]
    },
    "SendCodeRequest": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "type": {
          "type": "integer",
          "format": "uint8"
        }
      },
      "title": "SendCodeRequest",
      "required": [
        "email",
        "type"
      ]
    },
    "SendCodeResponse": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "status": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "SendCodeResponse",
      "required": [
        "status"
      ]
    },
    "SendSmsCodeRequest": {
      "type": "object",
      "properties": {
        "type": {
          "type": "integer",
          "format": "uint8"
        },
        "telephone": {
          "type": "string"
        },
        "telephone_area_code": {
          "type": "string"
        }
      },
      "title": "SendSmsCodeRequest",
      "required": [
        "type",
        "telephone",
        "telephone_area_code"
      ]
    },
    "ServerGroup": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ServerGroup",
      "required": [
        "id",
        "name",
        "description",
        "created_at",
        "updated_at"
      ]
    },
    "ServerRuleGroup": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "icon": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rules": {
          "type": "string"
        },
        "enable": {
          "type": "boolean",
          "format": "boolean"
        },
        "default": {
          "type": "boolean",
          "format": "boolean"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "ServerRuleGroup",
      "required": [
        "id",
        "icon",
        "name",
        "type",
        "tags",
        "rules",
        "enable",
        "default",
        "created_at",
        "updated_at"
      ]
    },
    "Shadowsocks": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "server_key": {
          "type": "string"
        }
      },
      "title": "Shadowsocks",
      "required": [
        "method",
        "port",
        "server_key"
      ]
    },
    "SignatureConfig": {
      "type": "object",
      "properties": {
        "enable_signature": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "SignatureConfig",
      "required": [
        "enable_signature"
      ]
    },
    "SiteConfig": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "site_name": {
          "type": "string"
        },
        "site_desc": {
          "type": "string"
        },
        "site_logo": {
          "type": "string"
        },
        "keywords": {
          "type": "string"
        },
        "custom_html": {
          "type": "string"
        },
        "custom_data": {
          "type": "string"
        }
      },
      "title": "SiteConfig",
      "required": [
        "host",
        "site_name",
        "site_desc",
        "site_logo",
        "keywords",
        "custom_html",
        "custom_data"
      ]
    },
    "SiteCustomDataContacts": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "telephone": {
          "type": "string"
        },
        "address": {
          "type": "string"
        }
      },
      "title": "SiteCustomDataContacts",
      "required": [
        "email",
        "telephone",
        "address"
      ]
    },
    "SortItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "sort": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "SortItem",
      "required": [
        "id",
        "sort"
      ]
    },
    "StripePayment": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "client_secret": {
          "type": "string"
        },
        "publishable_key": {
          "type": "string"
        }
      },
      "title": "StripePayment",
      "required": [
        "method",
        "client_secret",
        "publishable_key"
      ]
    },
    "Subscribe": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "unit_price": {
          "type": "integer",
          "format": "int64"
        },
        "unit_time": {
          "type": "string"
        },
        "discount": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SubscribeDiscount"
          }
        },
        "node_count": {
          "type": "integer",
          "format": "int64"
        },
        "replacement": {
          "type": "integer",
          "format": "int64"
        },
        "inventory": {
          "type": "integer",
          "format": "int64"
        },
        "traffic": {
          "type": "integer",
          "format": "int64"
        },
        "speed_limit": {
          "type": "integer",
          "format": "int64"
        },
        "device_limit": {
          "type": "integer",
          "format": "int64"
        },
        "quota": {
          "type": "integer",
          "format": "int64"
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64"
          }
        },
        "node_tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "show": {
          "type": "boolean",
          "format": "boolean"
        },
        "sell": {
          "type": "boolean",
          "format": "boolean"
        },
        "sort": {
          "type": "integer",
          "format": "int64"
        },
        "deduction_ratio": {
          "type": "integer",
          "format": "int64"
        },
        "allow_deduction": {
          "type": "boolean",
          "format": "boolean"
        },
        "reset_cycle": {
          "type": "integer",
          "format": "int64"
        },
        "renewal_reset": {
          "type": "boolean",
          "format": "boolean"
        },
        "show_original_price": {
          "type": "boolean",
          "format": "boolean"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Subscribe",
      "required": [
        "id",
        "name",
        "language",
        "description",
        "unit_price",
        "unit_time",
        "discount",
        "node_count",
        "replacement",
        "inventory",
        "traffic",
        "speed_limit",
        "device_limit",
        "quota",
        "nodes",
        "node_tags",
        "show",
        "sell",
        "sort",
        "deduction_ratio",
        "allow_deduction",
        "reset_cycle",
        "renewal_reset",
        "show_original_price",
        "created_at",
        "updated_at"
      ]
    },
    "SubscribeClient": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "icon": {
          "type": "string"
        },
        "scheme": {
          "type": "string"
        },
        "is_default": {
          "type": "boolean",
          "format": "boolean"
        },
        "download_link": {
          "$ref": "#/definitions/DownloadLink"
        }
      },
      "title": "SubscribeClient",
      "required": [
        "id",
        "name",
        "is_default"
      ]
    },
    "SubscribeConfig": {
      "type": "object",
      "properties": {
        "single_model": {
          "type": "boolean",
          "format": "boolean"
        },
        "subscribe_path": {
          "type": "string"
        },
        "subscribe_domain": {
          "type": "string"
        },
        "pan_domain": {
          "type": "boolean",
          "format": "boolean"
        },
        "user_agent_limit": {
          "type": "boolean",
          "format": "boolean"
        },
        "user_agent_list": {
          "type": "string"
        }
      },
      "title": "SubscribeConfig",
      "required": [
        "single_model",
        "subscribe_path",
        "subscribe_domain",
        "pan_domain",
        "user_agent_limit",
        "user_agent_list"
      ]
    },
    "SubscribeDiscount": {
      "type": "object",
      "properties": {
        "quantity": {
          "type": "integer",
          "format": "int64"
        },
        "discount": {
          "type": "number",
          "format": "double"
        }
      },
      "title": "SubscribeDiscount",
      "required": [
        "quantity",
        "discount"
      ]
    },
    "SubscribeGroup": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "SubscribeGroup",
      "required": [
        "id",
        "name",
        "description",
        "created_at",
        "updated_at"
      ]
    },
    "SubscribeType": {
      "type": "object",
      "properties": {
        "subscribe_types": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "SubscribeType",
      "required": [
        "subscribe_types"
      ]
    },
    "TelegramConfig": {
      "type": "object",
      "properties": {
        "telegram_bot_token": {
          "type": "string"
        },
        "telegram_group_url": {
          "type": "string"
        },
        "telegram_notify": {
          "type": "boolean",
          "format": "boolean"
        },
        "telegram_web_hook_domain": {
          "type": "string"
        }
      },
      "title": "TelegramConfig",
      "required": [
        "telegram_bot_token",
        "telegram_group_url",
        "telegram_notify",
        "telegram_web_hook_domain"
      ]
    },
    "TelephoneCheckUserRequest": {
      "type": "object",
      "properties": {
        "telephone": {
          "type": "string"
        },
        "telephone_area_code": {
          "type": "string"
        }
      },
      "title": "TelephoneCheckUserRequest",
      "required": [
        "telephone",
        "telephone_area_code"
      ]
    },
    "TelephoneCheckUserResponse": {
      "type": "object",
      "properties": {
        "exist": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "TelephoneCheckUserResponse",
      "required": [
        "exist"
      ]
    },
    "TelephoneLoginRequest": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "telephone": {
          "type": "string"
        },
        "telephone_code": {
          "type": "string"
        },
        "telephone_area_code": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "cf_token": {
          "type": "string"
        }
      },
      "title": "TelephoneLoginRequest",
      "required": [
        "identifier",
        "telephone",
        "telephone_code",
        "telephone_area_code",
        "password"
      ]
    },
    "TelephoneRegisterRequest": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "telephone": {
          "type": "string"
        },
        "telephone_area_code": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "invite": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "cf_token": {
          "type": "string"
        }
      },
      "title": "TelephoneRegisterRequest",
      "required": [
        "identifier",
        "telephone",
        "telephone_area_code",
        "password"
      ]
    },
    "TelephoneResetPasswordRequest": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "telephone": {
          "type": "string"
        },
        "telephone_area_code": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "cf_token": {
          "type": "string"
        }
      },
      "title": "TelephoneResetPasswordRequest",
      "required": [
        "identifier",
        "telephone",
        "telephone_area_code",
        "password"
      ]
    },
    "Ticket": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "follow": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Follow"
          }
        },
        "status": {
          "type": "integer",
          "format": "uint8"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "Ticket",
      "required": [
        "id",
        "title",
        "description",
        "user_id",
        "status",
        "created_at",
        "updated_at"
      ]
    },
    "TimePeriod": {
      "type": "object",
      "properties": {
        "start_time": {
          "type": "string"
        },
        "end_time": {
          "type": "string"
        },
        "multiplier": {
          "type": "number",
          "format": "float"
        }
      },
      "title": "TimePeriod",
      "required": [
        "start_time",
        "end_time",
        "multiplier"
      ]
    },
    "TosConfig": {
      "type": "object",
      "properties": {
        "tos_content": {
          "type": "string"
        }
      },
      "title": "TosConfig",
      "required": [
        "tos_content"
      ]
    },
    "TrafficLog": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "server_id": {
          "type": "integer",
          "format": "int64"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "download": {
          "type": "integer",
          "format": "int64"
        },
        "upload": {
          "type": "integer",
          "format": "int64"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "TrafficLog",
      "required": [
        "id",
        "server_id",
        "user_id",
        "subscribe_id",
        "download",
        "upload",
        "timestamp"
      ]
    },
    "TransportConfig": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "service_name": {
          "type": "string"
        }
      },
      "title": "TransportConfig",
      "required": [
        "path",
        "host",
        "service_name"
      ]
    },
    "Trojan": {
      "type": "object",
      "properties": {
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "transport": {
          "type": "string"
        },
        "transport_config": {
          "$ref": "#/definitions/TransportConfig"
        },
        "security": {
          "type": "string"
        },
        "security_config": {
          "$ref": "#/definitions/SecurityConfig"
        }
      },
      "title": "Trojan",
      "required": [
        "port",
        "transport",
        "transport_config",
        "security",
        "security_config"
      ]
    },
    "Tuic": {
      "type": "object",
      "properties": {
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "disable_sni": {
          "type": "boolean",
          "format": "boolean"
        },
        "reduce_rtt": {
          "type": "boolean",
          "format": "boolean"
        },
        "udp_relay_mode": {
          "type": "string"
        },
        "congestion_controller": {
          "type": "string"
        },
        "security_config": {
          "$ref": "#/definitions/SecurityConfig"
        }
      },
      "title": "Tuic",
      "required": [
        "port",
        "disable_sni",
        "reduce_rtt",
        "udp_relay_mode",
        "congestion_controller",
        "security_config"
      ]
    },
    "User": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "avatar": {
          "type": "string"
        },
        "balance": {
          "type": "integer",
          "format": "int64"
        },
        "commission": {
          "type": "integer",
          "format": "int64"
        },
        "referral_percentage": {
          "type": "integer",
          "format": "uint8"
        },
        "only_first_purchase": {
          "type": "boolean",
          "format": "boolean"
        },
        "gift_amount": {
          "type": "integer",
          "format": "int64"
        },
        "telegram": {
          "type": "integer",
          "format": "int64"
        },
        "refer_code": {
          "type": "string"
        },
        "referer_id": {
          "type": "integer",
          "format": "int64"
        },
        "share_link": {
          "type": "string"
        },
        "enable": {
          "type": "boolean",
          "format": "boolean"
        },
        "is_admin": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_balance_notify": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_login_notify": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_subscribe_notify": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_trade_notify": {
          "type": "boolean",
          "format": "boolean"
        },
        "auth_methods": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UserAuthMethod"
          }
        },
        "user_devices": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/UserDevice"
          }
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "last_login_time": {
          "type": "integer",
          "format": "int64"
        },
        "member_status": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        },
        "deleted_at": {
          "type": "integer",
          "format": "int64"
        },
        "is_del": {
          "type": "boolean",
          "format": "boolean"
        },
        "remark": {
          "type": "string"
        },
        "purchased_package": {
          "type": "string"
        },
        "family_joined": {
          "type": "boolean",
          "format": "boolean"
        },
        "family_id": {
          "type": "integer",
          "format": "int64"
        },
        "family_role": {
          "type": "integer",
          "format": "uint8"
        },
        "family_role_name": {
          "type": "string"
        },
        "family_owner_user_id": {
          "type": "integer",
          "format": "int64"
        },
        "family_status": {
          "type": "string"
        },
        "family_member_count": {
          "type": "integer",
          "format": "int64"
        },
        "family_max_members": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "User",
      "required": [
        "id",
        "avatar",
        "balance",
        "commission",
        "referral_percentage",
        "only_first_purchase",
        "gift_amount",
        "telegram",
        "refer_code",
        "referer_id",
        "enable",
        "enable_balance_notify",
        "enable_login_notify",
        "enable_subscribe_notify",
        "enable_trade_notify",
        "auth_methods",
        "user_devices",
        "rules",
        "created_at",
        "updated_at"
      ]
    },
    "UserAffiliate": {
      "type": "object",
      "properties": {
        "avatar": {
          "type": "string"
        },
        "identifier": {
          "type": "string"
        },
        "registered_at": {
          "type": "integer",
          "format": "int64"
        },
        "enable": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "UserAffiliate",
      "required": [
        "avatar",
        "identifier",
        "registered_at",
        "enable"
      ]
    },
    "UserAuthMethod": {
      "type": "object",
      "properties": {
        "auth_type": {
          "type": "string"
        },
        "auth_identifier": {
          "type": "string"
        },
        "verified": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "UserAuthMethod",
      "required": [
        "auth_type",
        "auth_identifier",
        "verified"
      ]
    },
    "UserDevice": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "ip": {
          "type": "string"
        },
        "identifier": {
          "type": "string"
        },
        "user_agent": {
          "type": "string"
        },
        "online": {
          "type": "boolean",
          "format": "boolean"
        },
        "enabled": {
          "type": "boolean",
          "format": "boolean"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "UserDevice",
      "required": [
        "id",
        "ip",
        "identifier",
        "user_agent",
        "online",
        "enabled",
        "created_at",
        "updated_at"
      ]
    },
    "UserLoginLog": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "login_ip": {
          "type": "string"
        },
        "user_agent": {
          "type": "string"
        },
        "success": {
          "type": "boolean",
          "format": "boolean"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "UserLoginLog",
      "required": [
        "id",
        "user_id",
        "login_ip",
        "user_agent",
        "success",
        "timestamp"
      ]
    },
    "UserLoginRequest": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "cf_token": {
          "type": "string"
        }
      },
      "title": "UserLoginRequest",
      "required": [
        "identifier",
        "email",
        "password"
      ]
    },
    "UserRegisterRequest": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "invite": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "cf_token": {
          "type": "string"
        }
      },
      "title": "UserRegisterRequest",
      "required": [
        "identifier",
        "email",
        "password"
      ]
    },
    "UserSubscribe": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "order_id": {
          "type": "integer",
          "format": "int64"
        },
        "subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "subscribe": {
          "$ref": "#/definitions/Subscribe"
        },
        "start_time": {
          "type": "integer",
          "format": "int64"
        },
        "expire_time": {
          "type": "integer",
          "format": "int64"
        },
        "finished_at": {
          "type": "integer",
          "format": "int64"
        },
        "reset_time": {
          "type": "integer",
          "format": "int64"
        },
        "traffic": {
          "type": "integer",
          "format": "int64"
        },
        "download": {
          "type": "integer",
          "format": "int64"
        },
        "upload": {
          "type": "integer",
          "format": "int64"
        },
        "token": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "uint8"
        },
        "entitlement_source": {
          "type": "string"
        },
        "entitlement_owner_user_id": {
          "type": "integer",
          "format": "int64"
        },
        "read_only": {
          "type": "boolean",
          "format": "boolean"
        },
        "is_gift": {
          "type": "boolean",
          "format": "boolean"
        },
        "short": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "format": "int64"
        },
        "updated_at": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "UserSubscribe",
      "required": [
        "id",
        "user_id",
        "order_id",
        "subscribe_id",
        "subscribe",
        "start_time",
        "expire_time",
        "finished_at",
        "reset_time",
        "traffic",
        "download",
        "upload",
        "token",
        "status",
        "entitlement_source",
        "entitlement_owner_user_id",
        "read_only",
        "is_gift",
        "short",
        "created_at",
        "updated_at"
      ]
    },
    "UserSubscribeLog": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "user_id": {
          "type": "integer",
          "format": "int64"
        },
        "user_subscribe_id": {
          "type": "integer",
          "format": "int64"
        },
        "token": {
          "type": "string"
        },
        "ip": {
          "type": "string"
        },
        "user_agent": {
          "type": "string"
        },
        "timestamp": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "UserSubscribeLog",
      "required": [
        "id",
        "user_id",
        "user_subscribe_id",
        "token",
        "ip",
        "user_agent",
        "timestamp"
      ]
    },
    "VeifyConfig": {
      "type": "object",
      "properties": {
        "turnstile_site_key": {
          "type": "string"
        },
        "enable_login_verify": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_register_verify": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_reset_password_verify": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "VeifyConfig",
      "required": [
        "turnstile_site_key",
        "enable_login_verify",
        "enable_register_verify",
        "enable_reset_password_verify"
      ]
    },
    "VerifyCodeConfig": {
      "type": "object",
      "properties": {
        "verify_code_expire_time": {
          "type": "integer",
          "format": "int64"
        },
        "verify_code_limit": {
          "type": "integer",
          "format": "int64"
        },
        "verify_code_interval": {
          "type": "integer",
          "format": "int64"
        }
      },
      "title": "VerifyCodeConfig",
      "required": [
        "verify_code_expire_time",
        "verify_code_limit",
        "verify_code_interval"
      ]
    },
    "VerifyConfig": {
      "type": "object",
      "properties": {
        "turnstile_site_key": {
          "type": "string"
        },
        "turnstile_secret": {
          "type": "string"
        },
        "enable_login_verify": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_register_verify": {
          "type": "boolean",
          "format": "boolean"
        },
        "enable_reset_password_verify": {
          "type": "boolean",
          "format": "boolean"
        }
      },
      "title": "VerifyConfig",
      "required": [
        "turnstile_site_key",
        "turnstile_secret",
        "enable_login_verify",
        "enable_register_verify",
        "enable_reset_password_verify"
      ]
    },
    "Vless": {
      "type": "object",
      "properties": {
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "flow": {
          "type": "string"
        },
        "transport": {
          "type": "string"
        },
        "transport_config": {
          "$ref": "#/definitions/TransportConfig"
        },
        "security": {
          "type": "string"
        },
        "security_config": {
          "$ref": "#/definitions/SecurityConfig"
        }
      },
      "title": "Vless",
      "required": [
        "port",
        "flow",
        "transport",
        "transport_config",
        "security",
        "security_config"
      ]
    },
    "Vmess": {
      "type": "object",
      "properties": {
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "transport": {
          "type": "string"
        },
        "transport_config": {
          "$ref": "#/definitions/TransportConfig"
        },
        "security": {
          "type": "string"
        },
        "security_config": {
          "$ref": "#/definitions/SecurityConfig"
        }
      },
      "title": "Vmess",
      "required": [
        "port",
        "transport",
        "transport_config",
        "security",
        "security_config"
      ]
    }
  },
  "securityDefinitions": {
    "apiKey": {
      "type": "apiKey",
      "description": "Enter JWT Bearer token **_only_**",
      "name": "Authorization",
      "in": "header"
    }
  }
}
