1.0.0-alpha.22 • Published 11 months ago

@kne/fastify-account v1.0.0-alpha.22

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

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

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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": "最大租户用户数量"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodystringtrue租户id
» namebodystringtrue租户名称
» descriptionbodystringfalse租户简介
» serviceStartTimebodystringtrue服务开始时间
» serviceEndTimebodystringtrue服务结束时间
» accountNumberbodynumbertrue最大租户用户数量

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "content": {
      "application/json": {}
    }
  }
}
StatusMeaningDescriptionSchema
200OKDefault ResponseInline

Status Code 200

NameTypeRequiredRestrictionsDescription
» contentanyfalsenonenone

get__api_v1_account_admin_getInviteList

GET /api/v1/account/admin/getInviteList

NameInTypeRequiredDescription
tenantIdquerystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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": []
        }
      }
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantIdbodystringtruenone
» infobodyobjectfalsenone
»» roleIdsbodynumberfalsenone
»» orgIdsbodynumberfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_deleteInviteToken

POST /api/v1/account/admin/deleteInviteToken

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "number"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodynumbertruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_tenant_addOrg

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

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_admin_tenant_orgList

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

NameInTypeRequiredDescription
idquerystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_tenant_editOrg

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

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_tenant_removeOrg

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

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_admin_getRoleList

GET /api/v1/account/admin/getRoleList

NameInTypeRequiredDescription
tenantIdquerystringtruenone
perPagequerynumberfalsenone
currentPagequerynumberfalsenone
filterqueryobjectfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantIdbodystringtruenone
» namebodystringtruenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodynumbertruenone
» namebodystringtruenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_removeRole

POST /api/v1/account/admin/removeRole

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "number"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodynumbertruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_admin_getRolePermissionList

GET /api/v1/account/admin/getRolePermissionList

NameInTypeRequiredDescription
idquerynumbertruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_saveRolePermissionList

POST /api/v1/account/admin/saveRolePermissionList

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_admin_getTenantUserList

GET /api/v1/account/admin/getTenantUserList

NameInTypeRequiredDescription
tenantIdquerystringtruenone
filterqueryobjectfalsenone
currentPagequerynumberfalsenone
perPagequerynumberfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantIdbodystringtruenone
» roleIdsbodynumberfalsenone
» orgIdsbodynumberfalsenone
» userIdbodystringtruenone
» namebodystringtruenone
» avatarbodystringfalsenone
» phonebodystringfalsenone
» emailbodystringfalsenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantIdbodystringtruenone
» roleIdsbodynumberfalsenone
» orgIdsbodynumberfalsenone
» namebodystringtruenone
» avatarbodystringfalsenone
» phonebodystringfalsenone
» emailbodystringfalsenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantIdbodystringtruenone
» tenantUserIdbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantIdbodystringtruenone
» tenantUserIdbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantIdbodystringtruenone
» tenantUserIdbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_tenant_getUserTenant

GET /api/v1/account/tenant/getUserTenant

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_tenant_getTenantUserInfo

GET /api/v1/account/tenant/getTenantUserInfo

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_tenant_addOrg

POST /api/v1/account/tenant/addOrg

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_tenant_orgList

GET /api/v1/account/tenant/orgList

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_tenant_editOrg

POST /api/v1/account/tenant/editOrg

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_tenant_removeOrg

POST /api/v1/account/tenant/removeOrg

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_tenant_getRoleList

GET /api/v1/account/tenant/getRoleList

NameInTypeRequiredDescription
perPagequerynumberfalsenone
currentPagequerynumberfalsenone
filterqueryobjectfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» namebodystringtruenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodynumbertruenone
» namebodystringtruenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_tenant_removeRole

POST /api/v1/account/tenant/removeRole

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "number"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodynumbertruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_tenant_getRolePermissionList

GET /api/v1/account/tenant/getRolePermissionList

NameInTypeRequiredDescription
idquerynumbertruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_tenant_saveRolePermissionList

POST /api/v1/account/tenant/saveRolePermissionList

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_tenant_getTenantUserList

GET /api/v1/account/tenant/getTenantUserList

NameInTypeRequiredDescription
filterqueryobjectfalsenone
currentPagequerynumberfalsenone
perPagequerynumberfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» roleIdsbodynumberfalsenone
» orgIdsbodynumberfalsenone
» userIdbodystringtruenone
» namebodystringtruenone
» avatarbodystringfalsenone
» phonebodystringfalsenone
» emailbodystringfalsenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» roleIdsbodynumberfalsenone
» orgIdsbodynumberfalsenone
» namebodystringtruenone
» avatarbodystringfalsenone
» phonebodystringfalsenone
» emailbodystringfalsenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_tenant_deleteTenantUser

POST /api/v1/account/tenant/deleteTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantUserId"
  ],
  "properties": {
    "tenantUserId": {
      "type": "string"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantUserIdbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_tenant_closeTenantUser

POST /api/v1/account/tenant/closeTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantUserId"
  ],
  "properties": {
    "tenantUserId": {
      "type": "string"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantUserIdbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_tenant_openTenantUser

POST /api/v1/account/tenant/openTenantUser

Body parameter

{
  "type": "object",
  "required": [
    "tenantUserId"
  ],
  "properties": {
    "tenantUserId": {
      "type": "string"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantUserIdbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_getUserInfo

GET /api/v1/account/getUserInfo

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_setCurrentTenantId

POST /api/v1/account/setCurrentTenantId

Body parameter

{
  "type": "object",
  "required": [
    "tenantId"
  ],
  "properties": {
    "tenantId": {
      "type": "string"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tenantIdbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_sendEmailCode

POST /api/v1/account/sendEmailCode

发送登录邮箱验证码

Body parameter

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

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "验证码"
    }
  }
}
StatusMeaningDescriptionSchema
200OKDefault ResponseInline

Status Code 200

NameTypeRequiredRestrictionsDescription
» codestringfalsenone验证码

post__api_v1_account_sendSMSCode

POST /api/v1/account/sendSMSCode

发送登录短信验证码

Body parameter

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

Example responses

200 Response

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "验证码"
    }
  }
}
StatusMeaningDescriptionSchema
200OKDefault ResponseInline

Status Code 200

NameTypeRequiredRestrictionsDescription
» codestringfalsenone验证码

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": "接受到的验证码"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» namebodystringtrue被验证的账号,手机或邮箱
» typebodynumbertrue0:注册,2:登录,4:验证租户管理员,5:忘记密码
» codebodystringtrue接受到的验证码

Example responses

200 Response

{
  "type": "object",
  "properties": {}
}
StatusMeaningDescriptionSchema
200OKDefault ResponseInline

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": "邮箱"
        }
      }
    }
  ]
}
NameInTypeRequiredDescription
bodybodyanyfalsenone

Example responses

200 Response

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

Status Code 200

NameTypeRequiredRestrictionsDescription
» isExistsbooleanfalsenonetrue已存在,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": "个人简介"
        }
      }
    }
  ]
}
NameInTypeRequiredDescription
bodybodyanyfalsenone

Example responses

200 Response

{
  "type": "object",
  "properties": {}
}
StatusMeaningDescriptionSchema
200OKDefault ResponseInline

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": "密码"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» usernamebodystringtrue用户名
» passwordbodystringtrue密码

Example responses

200 Response

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

Status Code 200

NameTypeRequiredRestrictionsDescription
» tokenstringfalsenone用户token
» currentTenantIdstringfalsenone当前租户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": "原密码"
        }
      }
    }
  ]
}
NameInTypeRequiredDescription
bodybodyanyfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» newPwdbodystringtrue新密码
» tokenbodystringtrue验证token
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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": "手机号"
        }
      }
    }
  ]
}
NameInTypeRequiredDescription
bodybodyanyfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_parseResetToken

POST /api/v1/account/parseResetToken

通过token获取name

Body parameter

{
  "type": "object",
  "required": [
    "token"
  ],
  "properties": {
    "token": {
      "type": "string"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» tokenbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_initSuperAdmin

POST /api/v1/account/initSuperAdmin

初始化用户为管理员

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

StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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": "状态"
        }
      }
    }
  }
}
StatusMeaningDescriptionSchema
200OKDefault ResponseInline

Status Code 200

NameTypeRequiredRestrictionsDescription
» userInfoobjectfalsenonenone
»» idstringfalsenone用户id
»» nicknamestringfalsenone用户昵称
»» emailstringfalsenone邮箱
»» phonestringfalsenone电话
»» genderstringfalsenone性别
»» birthdaystring(date)falsenone出生日期
»» descriptionstringfalsenone个人简介
»» currentTenantIdstringfalsenone当前租户ID
»» statusnumberfalsenone状态

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» statusbodybooleantruetrue:将用户设置为超级管理员,false:取消用户超级管理员
» userIdbodystringtrue用户ID
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_addUser

POST /api/v1/account/admin/addUser

添加用户

Body parameter

{
  "type": "object",
  "properties": {}
}
NameInTypeRequiredDescription
bodybodyobjectfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_admin_getAllUserList

GET /api/v1/account/admin/getAllUserList

获取用户列表

NameInTypeRequiredDescription
perPagequerynumberfalsenone
currentPagequerynumberfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» passwordbodystringtruenone
» userIdbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodystringtruenone
» avatarbodystringfalsenone
» nicknamebodystringfalsenone
» phonebodystringfalsenone
» emailbodystringfalsenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_closeUser

POST /api/v1/account/admin/closeUser

关闭用户

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_openUser

POST /api/v1/account/admin/openUser

将用户设置为正常

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_admin_getCompanyInfo

GET /api/v1/account/admin/getCompanyInfo

获取租户管理的公司信息

NameInTypeRequiredDescription
tenantIdquerystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjectfalsenone
» idbodynumberfalsenone
» tenantIdbodystringfalsenone
» namebodystringfalsenone
» shortNamebodystringfalsenone
» themeColorbodystringfalsenone
» logobodystringfalsenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjectfalsenone
» filterbodyobjectfalsenone
» typebodystringfalsenone
» perPagebodynumberfalsenone
» currentPagebodynumberfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjectfalsenone
» filterbodyobjectfalsenone
» typebodystringfalsenone
» perPagebodynumberfalsenone
» currentPagebodynumberfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» namebodystringtruenone
» urlbodystringfalsenone
» avatarbodystringfalsenone
» codebodystringtruenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodystringtruenone
» urlbodystringfalsenone
» namebodystringtruenone
» avatarbodystringfalsenone
» codebodystringtruenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

post__api_v1_account_admin_deleteApplication

POST /api/v1/account/admin/deleteApplication

删除应用

Body parameter

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» idbodystringtruenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_admin_getApplicationList

GET /api/v1/account/admin/getApplicationList

获取应用列表

NameInTypeRequiredDescription
tenantIdquerystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» applicationIdbodystringtruenone
» namebodystringtruenone
» codebodystringtruenone
» typebodynumberfalsenone
» isModulebodynumberfalsenone
» isMustbodynumberfalsenone
» pidbodynumberfalsenone
» descriptionbodystringfalsenone
StatusMeaningDescriptionSchema
200OKDefault ResponseNone

get__api_v1_account_admin_getPermissionList

GET /api/v1/account/admin/getPermissionList

获取应用权限列表

NameInTypeRequiredDescription
applicationIdquerystringtruenone
tenantIdquerystringfalsenone

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"
      }
    }
  }
}
StatusMeaningDescriptionSchema
200OKDefault ResponseInline

Status Code 200

NameTypeRequiredRestrictionsDescription
» idnumberfalsenonenone
» codestringfalsenonenone
» namestringfalsenonenone
» isModulenumberfalsenonenone
» isMustnumberfalsenonenone
» typenumberfalsenonenone
» pidnumberfalsenonenone
» pathsnumberfalsenonenone
» descriptionstringfalsenonenone
» statusnumberfalsenonenone
» createdAtstringfalsenonenone
» updatedAtstringfalsenonenone
» deletedAtstringfalsenonenone

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"
    }
  }
}
NameInTypeRequiredDescription
bodybodyobjecttruenone
» applicationIdsbodystringtruenone
» tenantIdbodystringfalsenone

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"
            }
          }
        }
      }
    }
  }
}
StatusMeaningDescriptionSchema
200OKDefault ResponseInline

Status Code 200

NameTypeRequiredRestrictionsDescription
» codestringfalsenonenone
» namestringfalsenonenone
» urlstringfalsenonenone
» descriptionstringfalsenonenone
» statusnumberfalsenonenone
» permissionsobjectfalsenonenone
»» idnumberfalsenonenone
»» codestringfalsenonenone
»» namestringfalsenonenone
»» isModulenumberfalsenonenone
»» isMustnumberfalsenonenone
»» typenumberfalsenonenone
»» pidnumberfalsenonenone
»» descriptionstringfalsenonenone

|»» s

1.0.0-alpha.22

11 months ago

1.0.0-alpha.21

11 months ago

1.0.0-alpha.20

11 months ago

1.0.0-alpha.19

11 months ago

1.0.0-alpha.18

12 months ago

1.0.0-alpha.17

1 year ago

1.0.0-alpha.16

1 year ago

1.0.0-alpha.15

1 year ago

1.0.0-alpha.14

1 year ago

1.0.0-alpha.12

1 year ago

1.0.0-alpha.11

1 year ago

1.0.0-alpha.10

1 year ago

1.0.0-alpha.9

1 year ago

1.0.0-alpha.8

1 year ago

1.0.0-alpha.7

1 year ago

1.0.0-alpha.6

1 year ago

1.0.0-alpha.5

1 year ago

1.0.0-alpha.4

1 year ago

1.0.0-alpha.3

1 year ago

1.0.0-alpha.2

1 year ago

1.0.0-alpha.1

1 year ago

1.0.0-alpha.0

1 year ago