npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kne/fastify-account

v1.0.0-alpha.22

Published

fastify的用户管理账号等实现

Downloads

53

Readme

fastify-account

描述

fastify的用户管理账号等实现

安装

npm i --save @kne/fastify-account

示例

示例代码

API


title: "@kne/fastify-account v1.0.0-alpha.21" language_tabs:

  • shell: Shell
  • http: HTTP
  • javascript: JavaScript
  • ruby: Ruby
  • python: Python
  • php: PHP
  • java: Java
  • go: Go toc_footers: [] includes: [] search: true highlight_theme: darkula headingLevel: 2

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

fastify的用户管理账号等实现

post__api_v1_account_admin_parsePermissionList

POST /api/v1/account/admin/parsePermissionList

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_saveTenant

POST /api/v1/account/admin/saveTenant

Body parameter

{
  "type": "object",
  "required": [
    "id",
    "name",
    "accountNumber",
    "serviceStartTime",
    "serviceEndTime"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "租户id"
    },
    "name": {
      "type": "string",
      "description": "租户名称"
    },
    "description": {
      "type": "string",
      "description": "租户简介"
    },
    "serviceStartTime": {
      "type": "string",
      "description": "服务开始时间"
    },
    "serviceEndTime": {
      "type": "string",
      "description": "服务结束时间"
    },
    "accountNumber": {
      "type": "number",
      "description": "最大租户用户数量"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|string|true|租户id| |» name|body|string|true|租户名称| |» description|body|string|false|租户简介| |» serviceStartTime|body|string|true|服务开始时间| |» serviceEndTime|body|string|true|服务结束时间| |» accountNumber|body|number|true|最大租户用户数量|

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "content": {
      "application/json": {}
    }
  }
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

Status Code 200

|Name|Type|Required|Restrictions|Description| |---|---|---|---|---| |» content|any|false|none|none|

get__api_v1_account_admin_getInviteList

GET /api/v1/account/admin/getInviteList

|Name|In|Type|Required|Description| |---|---|---|---|---| |tenantId|query|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_addInviteToken

POST /api/v1/account/admin/addInviteToken

Body parameter

{
  "type": "object",
  "required": [
    "tenantId"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "info": {
      "type": "object",
      "properties": {
        "roleIds": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "default": []
        },
        "orgIds": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "default": []
        }
      }
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantId|body|string|true|none| |» info|body|object|false|none| |»» roleIds|body|[number]|false|none| |»» orgIds|body|[number]|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_deleteInviteToken

POST /api/v1/account/admin/deleteInviteToken

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "number"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|number|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_tenant_addOrg

POST /api/v1/account/admin/tenant/addOrg

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_tenant_orgList

GET /api/v1/account/admin/tenant/orgList

|Name|In|Type|Required|Description| |---|---|---|---|---| |id|query|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_tenant_editOrg

POST /api/v1/account/admin/tenant/editOrg

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_tenant_removeOrg

POST /api/v1/account/admin/tenant/removeOrg

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_getRoleList

GET /api/v1/account/admin/getRoleList

|Name|In|Type|Required|Description| |---|---|---|---|---| |tenantId|query|string|true|none| |perPage|query|number|false|none| |currentPage|query|number|false|none| |filter|query|object|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_addRole

POST /api/v1/account/admin/addRole

Body parameter

{
  "type": "object",
  "required": [
    "tenantId",
    "name"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantId|body|string|true|none| |» name|body|string|true|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_saveRole

POST /api/v1/account/admin/saveRole

Body parameter

{
  "type": "object",
  "required": [
    "name",
    "id"
  ],
  "properties": {
    "id": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|number|true|none| |» name|body|string|true|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_removeRole

POST /api/v1/account/admin/removeRole

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "number"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|number|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_getRolePermissionList

GET /api/v1/account/admin/getRolePermissionList

|Name|In|Type|Required|Description| |---|---|---|---|---| |id|query|number|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_saveRolePermissionList

POST /api/v1/account/admin/saveRolePermissionList

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_getTenantUserList

GET /api/v1/account/admin/getTenantUserList

|Name|In|Type|Required|Description| |---|---|---|---|---| |tenantId|query|string|true|none| |filter|query|object|false|none| |currentPage|query|number|false|none| |perPage|query|number|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_addTenantUser

POST /api/v1/account/admin/addTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantId",
    "userId",
    "name"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "roleIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "default": []
    },
    "orgIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "default": []
    },
    "userId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "avatar": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantId|body|string|true|none| |» roleIds|body|[number]|false|none| |» orgIds|body|[number]|false|none| |» userId|body|string|true|none| |» name|body|string|true|none| |» avatar|body|string|false|none| |» phone|body|string|false|none| |» email|body|string|false|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_saveTenantUser

POST /api/v1/account/admin/saveTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantId",
    "name"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "roleIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "default": []
    },
    "orgIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "default": []
    },
    "name": {
      "type": "string"
    },
    "avatar": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantId|body|string|true|none| |» roleIds|body|[number]|false|none| |» orgIds|body|[number]|false|none| |» name|body|string|true|none| |» avatar|body|string|false|none| |» phone|body|string|false|none| |» email|body|string|false|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_deleteTenantUser

POST /api/v1/account/admin/deleteTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantId",
    "tenantUserId"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "tenantUserId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantId|body|string|true|none| |» tenantUserId|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_closeTenantUser

POST /api/v1/account/admin/closeTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantId",
    "tenantUserId"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "tenantUserId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantId|body|string|true|none| |» tenantUserId|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_openTenantUser

POST /api/v1/account/admin/openTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantId",
    "tenantUserId"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    },
    "tenantUserId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantId|body|string|true|none| |» tenantUserId|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_tenant_getUserTenant

GET /api/v1/account/tenant/getUserTenant

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_tenant_getTenantUserInfo

GET /api/v1/account/tenant/getTenantUserInfo

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_addOrg

POST /api/v1/account/tenant/addOrg

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_tenant_orgList

GET /api/v1/account/tenant/orgList

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_editOrg

POST /api/v1/account/tenant/editOrg

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_removeOrg

POST /api/v1/account/tenant/removeOrg

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_tenant_getRoleList

GET /api/v1/account/tenant/getRoleList

|Name|In|Type|Required|Description| |---|---|---|---|---| |perPage|query|number|false|none| |currentPage|query|number|false|none| |filter|query|object|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_addRole

POST /api/v1/account/tenant/addRole

Body parameter

{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» name|body|string|true|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_saveRole

POST /api/v1/account/tenant/saveRole

Body parameter

{
  "type": "object",
  "required": [
    "name",
    "id"
  ],
  "properties": {
    "id": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|number|true|none| |» name|body|string|true|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_removeRole

POST /api/v1/account/tenant/removeRole

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "number"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|number|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_tenant_getRolePermissionList

GET /api/v1/account/tenant/getRolePermissionList

|Name|In|Type|Required|Description| |---|---|---|---|---| |id|query|number|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_saveRolePermissionList

POST /api/v1/account/tenant/saveRolePermissionList

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_tenant_getTenantUserList

GET /api/v1/account/tenant/getTenantUserList

|Name|In|Type|Required|Description| |---|---|---|---|---| |filter|query|object|false|none| |currentPage|query|number|false|none| |perPage|query|number|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_addTenantUser

POST /api/v1/account/tenant/addTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "userId",
    "name"
  ],
  "properties": {
    "roleIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "default": []
    },
    "orgIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "default": []
    },
    "userId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "avatar": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» roleIds|body|[number]|false|none| |» orgIds|body|[number]|false|none| |» userId|body|string|true|none| |» name|body|string|true|none| |» avatar|body|string|false|none| |» phone|body|string|false|none| |» email|body|string|false|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_saveTenantUser

POST /api/v1/account/tenant/saveTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "roleIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "default": []
    },
    "orgIds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "default": []
    },
    "name": {
      "type": "string"
    },
    "avatar": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» roleIds|body|[number]|false|none| |» orgIds|body|[number]|false|none| |» name|body|string|true|none| |» avatar|body|string|false|none| |» phone|body|string|false|none| |» email|body|string|false|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_deleteTenantUser

POST /api/v1/account/tenant/deleteTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantUserId"
  ],
  "properties": {
    "tenantUserId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantUserId|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_closeTenantUser

POST /api/v1/account/tenant/closeTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantUserId"
  ],
  "properties": {
    "tenantUserId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantUserId|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_openTenantUser

POST /api/v1/account/tenant/openTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantUserId"
  ],
  "properties": {
    "tenantUserId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantUserId|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_getUserInfo

GET /api/v1/account/getUserInfo

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_setCurrentTenantId

POST /api/v1/account/setCurrentTenantId

Body parameter

{
  "type": "object",
  "required": [
    "tenantId"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» tenantId|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_sendEmailCode

POST /api/v1/account/sendEmailCode

发送登录邮箱验证码

Body parameter

{
  "type": "object",
  "required": [
    "email"
  ],
  "properties": {
    "email": {
      "type": "string",
      "description": "邮箱"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» email|body|string|true|邮箱|

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "验证码"
    }
  }
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

Status Code 200

|Name|Type|Required|Restrictions|Description| |---|---|---|---|---| |» code|string|false|none|验证码|

post__api_v1_account_sendSMSCode

POST /api/v1/account/sendSMSCode

发送登录短信验证码

Body parameter

{
  "type": "object",
  "required": [
    "phone"
  ],
  "properties": {
    "phone": {
      "type": "string",
      "description": "电话"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» phone|body|string|true|电话|

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "验证码"
    }
  }
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

Status Code 200

|Name|Type|Required|Restrictions|Description| |---|---|---|---|---| |» code|string|false|none|验证码|

post__api_v1_account_validateCode

POST /api/v1/account/validateCode

验证码验证

Body parameter

{
  "type": "object",
  "required": [
    "name",
    "type",
    "code"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "被验证的账号,手机或邮箱"
    },
    "type": {
      "type": "number",
      "description": "0:注册,2:登录,4:验证租户管理员,5:忘记密码"
    },
    "code": {
      "type": "string",
      "description": "接受到的验证码"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» name|body|string|true|被验证的账号,手机或邮箱| |» type|body|number|true|0:注册,2:登录,4:验证租户管理员,5:忘记密码| |» code|body|string|true|接受到的验证码|

Example responses

200 Response

{
  "type": "object",
  "properties": {}
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

post__api_v1_account_accountIsExists

POST /api/v1/account/accountIsExists

账号是否已存在

Body parameter

{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "phone"
      ],
      "properties": {
        "phone": {
          "type": "string",
          "description": "电话"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "email"
      ],
      "properties": {
        "email": {
          "type": "string",
          "description": "邮箱"
        }
      }
    }
  ]
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|any|false|none|

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "isExists": {
      "type": "boolean",
      "description": "true已存在,false不存在"
    }
  }
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

Status Code 200

|Name|Type|Required|Restrictions|Description| |---|---|---|---|---| |» isExists|boolean|false|none|true已存在,false不存在|

post__api_v1_account_register

POST /api/v1/account/register

注册账号

Body parameter

{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "phone",
        "password",
        "code"
      ],
      "properties": {
        "avatar": {
          "type": "string",
          "description": "头像图片id"
        },
        "phone": {
          "type": "string",
          "description": "电话"
        },
        "code": {
          "type": "string",
          "description": "验证码"
        },
        "password": {
          "type": "string",
          "description": "密码(需要md5加密)"
        },
        "invitationCode": {
          "type": "string",
          "description": "邀请码,用来默认加入租户"
        },
        "nickname": {
          "type": "string",
          "description": "昵称"
        },
        "gender": {
          "type": "string",
          "description": "性别"
        },
        "birthday": {
          "type": "string",
          "format": "date",
          "description": "出生日期"
        },
        "description": {
          "type": "string",
          "description": "个人简介"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "email",
        "password",
        "code"
      ],
      "properties": {
        "avatar": {
          "type": "string",
          "description": "头像图片id"
        },
        "email": {
          "type": "string",
          "description": "邮箱"
        },
        "code": {
          "type": "string",
          "description": "验证码"
        },
        "password": {
          "type": "string",
          "description": "密码(需要md5加密)"
        },
        "invitationCode": {
          "type": "string",
          "description": "邀请码,用来默认加入租户"
        },
        "nickname": {
          "type": "string",
          "description": "昵称"
        },
        "gender": {
          "type": "string",
          "description": "性别"
        },
        "birthday": {
          "type": "string",
          "format": "date",
          "description": "出生日期"
        },
        "description": {
          "type": "string",
          "description": "个人简介"
        }
      }
    }
  ]
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|any|false|none|

Example responses

200 Response

{
  "type": "object",
  "properties": {}
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

post__api_v1_account_login

POST /api/v1/account/login

登录

Body parameter

{
  "type": "object",
  "required": [
    "username",
    "password"
  ],
  "properties": {
    "username": {
      "type": "string",
      "description": "用户名"
    },
    "password": {
      "type": "string",
      "description": "密码"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» username|body|string|true|用户名| |» password|body|string|true|密码|

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "用户token"
    },
    "currentTenantId": {
      "type": "string",
      "description": "当前租户id"
    }
  }
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

Status Code 200

|Name|Type|Required|Restrictions|Description| |---|---|---|---|---| |» token|string|false|none|用户token| |» currentTenantId|string|false|none|当前租户id|

post__api_v1_account_modifyPassword

POST /api/v1/account/modifyPassword

新用户重置新密码

Body parameter

{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "email",
        "newPwd",
        "oldPwd"
      ],
      "properties": {
        "email": {
          "type": "string",
          "description": "邮箱"
        },
        "newPwd": {
          "type": "string",
          "description": "新密码"
        },
        "oldPwd": {
          "type": "string",
          "description": "原密码"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "phone",
        "newPwd",
        "oldPwd"
      ],
      "properties": {
        "phone": {
          "type": "string",
          "description": "手机号"
        },
        "newPwd": {
          "type": "string",
          "description": "新密码"
        },
        "oldPwd": {
          "type": "string",
          "description": "原密码"
        }
      }
    }
  ]
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|any|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_resetPassword

POST /api/v1/account/resetPassword

用户重置密码

Body parameter

{
  "type": "object",
  "required": [
    "newPwd",
    "token"
  ],
  "properties": {
    "newPwd": {
      "type": "string",
      "description": "新密码"
    },
    "token": {
      "type": "string",
      "description": "验证token"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» newPwd|body|string|true|新密码| |» token|body|string|true|验证token|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_forgetPwd

POST /api/v1/account/forgetPwd

忘记密码

Body parameter

{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "email"
      ],
      "properties": {
        "email": {
          "type": "string",
          "description": "邮箱"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "phone"
      ],
      "properties": {
        "phone": {
          "type": "string",
          "description": "手机号"
        }
      }
    }
  ]
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|any|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_parseResetToken

POST /api/v1/account/parseResetToken

通过token获取name

Body parameter

{
  "type": "object",
  "required": [
    "token"
  ],
  "properties": {
    "token": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» token|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_initSuperAdmin

POST /api/v1/account/initSuperAdmin

初始化用户为管理员

用于系统初始化时,设置第一个用户,只能使用一次,其他用户由该用户创建

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_getSuperAdminInfo

GET /api/v1/account/admin/getSuperAdminInfo

获取管理员信息

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "userInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "用户id"
        },
        "nickname": {
          "type": "string",
          "description": "用户昵称"
        },
        "email": {
          "type": "string",
          "description": "邮箱"
        },
        "phone": {
          "type": "string",
          "description": "电话"
        },
        "gender": {
          "type": "string",
          "description": "性别"
        },
        "birthday": {
          "type": "string",
          "format": "date",
          "description": "出生日期"
        },
        "description": {
          "type": "string",
          "description": "个人简介"
        },
        "currentTenantId": {
          "type": "string",
          "description": "当前租户ID"
        },
        "status": {
          "type": "number",
          "description": "状态"
        }
      }
    }
  }
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

Status Code 200

|Name|Type|Required|Restrictions|Description| |---|---|---|---|---| |» userInfo|object|false|none|none| |»» id|string|false|none|用户id| |»» nickname|string|false|none|用户昵称| |»» email|string|false|none|邮箱| |»» phone|string|false|none|电话| |»» gender|string|false|none|性别| |»» birthday|string(date)|false|none|出生日期| |»» description|string|false|none|个人简介| |»» currentTenantId|string|false|none|当前租户ID| |»» status|number|false|none|状态|

post__api_v1_account_admin_setSuperAdmin

POST /api/v1/account/admin/setSuperAdmin

设置用户为超级管理员

Body parameter

{
  "type": "object",
  "required": [
    "status",
    "userId"
  ],
  "properties": {
    "status": {
      "type": "boolean",
      "description": "true:将用户设置为超级管理员,false:取消用户超级管理员"
    },
    "userId": {
      "type": "string",
      "description": "用户ID"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» status|body|boolean|true|true:将用户设置为超级管理员,false:取消用户超级管理员| |» userId|body|string|true|用户ID|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_addUser

POST /api/v1/account/admin/addUser

添加用户

Body parameter

{
  "type": "object",
  "properties": {}
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_getAllUserList

GET /api/v1/account/admin/getAllUserList

获取用户列表

|Name|In|Type|Required|Description| |---|---|---|---|---| |perPage|query|number|false|none| |currentPage|query|number|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_resetUserPassword

POST /api/v1/account/admin/resetUserPassword

重置用户账号密码

Body parameter

{
  "type": "object",
  "required": [
    "userId",
    "password"
  ],
  "properties": {
    "password": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» password|body|string|true|none| |» userId|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_saveUser

POST /api/v1/account/admin/saveUser

修改用户信息

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "avatar": {
      "type": "string"
    },
    "nickname": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|string|true|none| |» avatar|body|string|false|none| |» nickname|body|string|false|none| |» phone|body|string|false|none| |» email|body|string|false|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_closeUser

POST /api/v1/account/admin/closeUser

关闭用户

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_openUser

POST /api/v1/account/admin/openUser

将用户设置为正常

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_getCompanyInfo

GET /api/v1/account/admin/getCompanyInfo

获取租户管理的公司信息

|Name|In|Type|Required|Description| |---|---|---|---|---| |tenantId|query|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_saveCompanyInfo

POST /api/v1/account/admin/saveCompanyInfo

修改租户管理的公司信息

Body parameter

{
  "type": "object",
  "properties": {
    "id": {
      "type": "number"
    },
    "tenantId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "shortName": {
      "type": "string"
    },
    "themeColor": {
      "type": "string"
    },
    "logo": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|false|none| |» id|body|number|false|none| |» tenantId|body|string|false|none| |» name|body|string|false|none| |» shortName|body|string|false|none| |» themeColor|body|string|false|none| |» logo|body|string|false|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_getAllOperationLogList

POST /api/v1/account/admin/getAllOperationLogList

获取所有操作日志列表

Body parameter

{
  "type": "object",
  "required": [],
  "properties": {
    "filter": {
      "type": "object"
    },
    "type": {
      "type": "string"
    },
    "perPage": {
      "type": "number"
    },
    "currentPage": {
      "type": "number"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|false|none| |» filter|body|object|false|none| |» type|body|string|false|none| |» perPage|body|number|false|none| |» currentPage|body|number|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_tenant_getTenantOperationLogList

POST /api/v1/account/tenant/getTenantOperationLogList

获取租户操作日志列表

Body parameter

{
  "type": "object",
  "required": [],
  "properties": {
    "filter": {
      "type": "object"
    },
    "type": {
      "type": "string"
    },
    "perPage": {
      "type": "number"
    },
    "currentPage": {
      "type": "number"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|false|none| |» filter|body|object|false|none| |» type|body|string|false|none| |» perPage|body|number|false|none| |» currentPage|body|number|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_addApplication

POST /api/v1/account/admin/addApplication

添加应用

Body parameter

{
  "type": "object",
  "required": [
    "name",
    "code"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "avatar": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» name|body|string|true|none| |» url|body|string|false|none| |» avatar|body|string|false|none| |» code|body|string|true|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_saveApplication

POST /api/v1/account/admin/saveApplication

修改应用

Body parameter

{
  "type": "object",
  "required": [
    "id",
    "name",
    "code"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "avatar": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|string|true|none| |» url|body|string|false|none| |» name|body|string|true|none| |» avatar|body|string|false|none| |» code|body|string|true|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_deleteApplication

POST /api/v1/account/admin/deleteApplication

删除应用

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» id|body|string|true|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_getApplicationList

GET /api/v1/account/admin/getApplicationList

获取应用列表

|Name|In|Type|Required|Description| |---|---|---|---|---| |tenantId|query|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

post__api_v1_account_admin_addPermission

POST /api/v1/account/admin/addPermission

添加应用权限

Body parameter

{
  "type": "object",
  "required": [
    "applicationId",
    "name",
    "code"
  ],
  "properties": {
    "applicationId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "type": {
      "type": "number"
    },
    "isModule": {
      "type": "number"
    },
    "isMust": {
      "type": "number"
    },
    "pid": {
      "type": "number"
    },
    "description": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» applicationId|body|string|true|none| |» name|body|string|true|none| |» code|body|string|true|none| |» type|body|number|false|none| |» isModule|body|number|false|none| |» isMust|body|number|false|none| |» pid|body|number|false|none| |» description|body|string|false|none|

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|None|

get__api_v1_account_admin_getPermissionList

GET /api/v1/account/admin/getPermissionList

获取应用权限列表

|Name|In|Type|Required|Description| |---|---|---|---|---| |applicationId|query|string|true|none| |tenantId|query|string|false|none|

Example responses

200 Response

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "number"
      },
      "code": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "isModule": {
        "type": "number"
      },
      "isMust": {
        "type": "number"
      },
      "type": {
        "type": "number"
      },
      "pid": {
        "type": "number"
      },
      "paths": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "description": {
        "type": "string"
      },
      "status": {
        "type": "number"
      },
      "createdAt": {
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      },
      "deletedAt": {
        "type": "string"
      }
    }
  }
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

Status Code 200

|Name|Type|Required|Restrictions|Description| |---|---|---|---|---| |» id|number|false|none|none| |» code|string|false|none|none| |» name|string|false|none|none| |» isModule|number|false|none|none| |» isMust|number|false|none|none| |» type|number|false|none|none| |» pid|number|false|none|none| |» paths|[number]|false|none|none| |» description|string|false|none|none| |» status|number|false|none|none| |» createdAt|string|false|none|none| |» updatedAt|string|false|none|none| |» deletedAt|string|false|none|none|

post__api_v1_account_admin_exportPermissionList

POST /api/v1/account/admin/exportPermissionList

导出应用权限列表

Body parameter

{
  "type": "object",
  "required": [
    "applicationIds"
  ],
  "properties": {
    "applicationIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tenantId": {
      "type": "string"
    }
  }
}

|Name|In|Type|Required|Description| |---|---|---|---|---| |body|body|object|true|none| |» applicationIds|body|[string]|true|none| |» tenantId|body|string|false|none|

Example responses

200 Response

{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "code": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "status": {
        "type": "number"
      },
      "permissions": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "number"
            },
            "code": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "isModule": {
              "type": "number"
            },
            "isMust": {
              "type": "number"
            },
            "type": {
              "type": "number"
            },
            "pid": {
              "type": "number"
            },
            "description": {
              "type": "string"
            },
            "status": {
              "type": "number"
            }
          }
        }
      }
    }
  }
}

|Status|Meaning|Description|Schema| |---|---|---|---| |200|OK|Default Response|Inline|

Status Code 200

|Name|Type|Required|Restrictions|Description| |---|---|---|---|---| |» code|string|false|none|none| |» name|string|false|none|none| |» url|string|false|none|none| |» description|string|false|none|none| |» status|number|false|none|none| |» permissions|[object]|false|none|none| |»» id|number|false|none|none| |»» code|string|false|none|none| |»» name|string|false|none|none| |»» isModule|number|false|none|none| |»» isMust|number|false|none|none| |»» type|number|false|none|none| |»» pid|number|false|none|none| |»» description|string|false|none|none| |»» s