@tapd/tapd-node-sdk 1.47.1-alpha.0 → 1.47.1-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7917,6 +7917,335 @@ module.exports = class API extends SDK {
7917
7917
  );
7918
7918
  }
7919
7919
 
7920
+ /**
7921
+ * @description 获取组织列表
7922
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/org/get_organizations.html
7923
+ * @scope org#r
7924
+
7925
+ * @params - {integer} workspace_id 项目ID
7926
+ * @params - {integer} org_parent_id 父级节点id
7927
+ * @params - {string} name_like 根据名称模糊搜索
7928
+ * @params - {integer} limit 设置返回数量限制,默认为30
7929
+ * @params - {integer} page "返回当前数量限制下第N页的数据,默认为1(第一页)"
7930
+
7931
+ */
7932
+ getOrganizations(...args) {
7933
+ return this.oAuthRequest.apply(
7934
+ this, [
7935
+ '/organizations/list',
7936
+ 'GET',
7937
+ ...args
7938
+ ]
7939
+ );
7940
+ }
7941
+
7942
+ /**
7943
+ * @description 添加组织架构
7944
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/org/add_organization.html
7945
+ * @scope org#w
7946
+
7947
+ * @params - {integer} workspace_id 项目ID
7948
+ * @params - {string} name 组织名称
7949
+ * @params - {string} parent_id 父级ID
7950
+ */
7951
+ addOrganization(...args) {
7952
+ return this.oAuthRequest.apply(
7953
+ this, [
7954
+ '/organizations/new',
7955
+ 'POST',
7956
+ ...args
7957
+ ]
7958
+ );
7959
+ }
7960
+
7961
+ /**
7962
+ * @description 修改组织架构
7963
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/org/update_organization.html
7964
+ * @scope org#w
7965
+
7966
+ * @params - {integer} workspace_id 项目ID
7967
+ * @params - {integer} id 组织架构ID
7968
+ * @params - {string} name 组织架构新名称
7969
+ * @params - {string} parent_id 新的父级ID
7970
+ */
7971
+ updateOrganization(...args) {
7972
+ return this.oAuthRequest.apply(
7973
+ this, [
7974
+ '/organizations/modify',
7975
+ 'POST',
7976
+ ...args
7977
+ ]
7978
+ );
7979
+ }
7980
+
7981
+ /**
7982
+ * @description 删除组织架构
7983
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/org/remove_organization.html
7984
+ * @scope org#w
7985
+
7986
+ * @params - {integer} workspace_id 项目ID
7987
+ * @params - {integer} id 组织架构ID
7988
+ */
7989
+ removeOrganization(...args) {
7990
+ return this.oAuthRequest.apply(
7991
+ this, [
7992
+ '/organizations/remove',
7993
+ 'POST',
7994
+ ...args
7995
+ ]
7996
+ );
7997
+ }
7998
+
7999
+ /**
8000
+ * @description 删除组织架构
8001
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/org/remove_all_organization.html
8002
+ * @scope org#w
8003
+
8004
+ * @params - {integer} workspace_id 项目ID
8005
+ */
8006
+ removeAllOrganization(...args) {
8007
+ return this.oAuthRequest.apply(
8008
+ this, [
8009
+ '/organizations/remove_all',
8010
+ 'POST',
8011
+ ...args
8012
+ ]
8013
+ );
8014
+ }
8015
+
8016
+ /**
8017
+ * @description 更新角色信息
8018
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/update_role.html
8019
+ * @scope user#w
8020
+
8021
+ * @params - {integer} workspace_id 项目ID
8022
+ * @params - {integer} id 角色ID
8023
+ * @params - {string} name 角色名称
8024
+ */
8025
+ updateRole(...args) {
8026
+ return this.oAuthRequest.apply(
8027
+ this, [
8028
+ '/roles',
8029
+ 'POST',
8030
+ ...args
8031
+ ]
8032
+ );
8033
+ }
8034
+
8035
+ /**
8036
+ * @description 增加角色
8037
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/add_role.html
8038
+ * @scope user#w
8039
+
8040
+ * @params - {integer} workspace_id 项目ID
8041
+ * @params - {string} name 角色名称
8042
+ */
8043
+ addRole(...args) {
8044
+ return this.oAuthRequest.apply(
8045
+ this, [
8046
+ '/roles',
8047
+ 'POST',
8048
+ ...args
8049
+ ]
8050
+ );
8051
+ }
8052
+
8053
+ /**
8054
+ * @description 删除角色
8055
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/remove_role.html
8056
+ * @scope user#w
8057
+
8058
+ * @params - {integer} workspace_id 项目ID
8059
+ * @params - {integer} id 角色ID
8060
+ */
8061
+ removeRole(...args) {
8062
+ return this.oAuthRequest.apply(
8063
+ this, [
8064
+ '/roles/delete',
8065
+ 'POST',
8066
+ ...args
8067
+ ]
8068
+ );
8069
+ }
8070
+
8071
+ /**
8072
+ * @description 获取角色权限点
8073
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/get_role_permissions.html
8074
+ * @scope user#r
8075
+
8076
+ * @params - {integer} workspace_id 项目ID
8077
+ * @params - {integer} role_id 角色ID
8078
+ */
8079
+ getRolePermissions(...args) {
8080
+ return this.oAuthRequest.apply(
8081
+ this, [
8082
+ '/role_permissions/list_role_permissions_with_id',
8083
+ 'GET',
8084
+ ...args
8085
+ ]
8086
+ );
8087
+ }
8088
+
8089
+ /**
8090
+ * @description 获取所有权限点
8091
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/get_all_permissions.html
8092
+ * @scope user#r
8093
+
8094
+ * @params - {integer} workspace_id 项目ID
8095
+ */
8096
+ getAllPermissions(...args) {
8097
+ return this.oAuthRequest.apply(
8098
+ this, [
8099
+ '/role_permissions/list_all_permissions',
8100
+ 'GET',
8101
+ ...args
8102
+ ]
8103
+ );
8104
+ }
8105
+
8106
+ /**
8107
+ * @description 更新角色权限点
8108
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/update_role_permissions.html
8109
+ * @scope user#w
8110
+
8111
+ * @params - {integer} workspace_id 项目ID
8112
+ * @params - {integer} role_id 角色ID
8113
+ * @params - {array} permissions 权限点列表
8114
+ */
8115
+ updateRolePermissions(...args) {
8116
+ return this.oAuthRequest.apply(
8117
+ this, [
8118
+ '/role_permissions/edit_role_permissions',
8119
+ 'POST',
8120
+ ...args
8121
+ ]
8122
+ );
8123
+ }
8124
+
8125
+ /**
8126
+ * @description 获取用户列表
8127
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/get_users.html
8128
+ * @scope user#r
8129
+
8130
+ * @params - {integer} workspace_id 项目ID
8131
+ * @params - {integer} id 用户ID
8132
+ * @params - {integer} status 用户状态: 0 未激活 1 正常 2 已禁用 3 冻结用户 4 邀请未确认用户 可以同时传入多个状态: 1,2,3,4
8133
+ * @params - {integer} page 分页页码,默认为1
8134
+ * @params - {integer} limit 单页大小 最大为100, 默认为30
8135
+ */
8136
+ getUsers(...args) {
8137
+ return this.oAuthRequest.apply(
8138
+ this, [
8139
+ '/users',
8140
+ 'GET',
8141
+ ...args
8142
+ ]
8143
+ );
8144
+ }
8145
+
8146
+ /**
8147
+ * @description 新增用户
8148
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/add_user.html
8149
+ * @scope user#w
8150
+
8151
+ * @params - {integer} workspace_id 项目ID
8152
+ * @params - {string} name 用户名称
8153
+ * @params - {string} email 用户邮箱,和mobile二选一
8154
+ * @params - {string} mobile 用户手机号,和email二选一
8155
+ * @params - {integer} gender 用户性别: 0 男 1 女
8156
+ * @params - {integer} status 用户状态:1 正常 2 离开公司
8157
+ * @params - {string} position 用户职位
8158
+ */
8159
+ addUser(...args) {
8160
+ return this.oAuthRequest.apply(
8161
+ this, [
8162
+ '/users/new',
8163
+ 'POST',
8164
+ ...args
8165
+ ]
8166
+ );
8167
+ }
8168
+
8169
+ /**
8170
+ * @description 更新用户所属部门
8171
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/update_user_organization.html
8172
+ * @scope user#w
8173
+
8174
+ * @params - {integer} workspace_id 项目ID
8175
+ * @params - {integer} user_id 用户ID
8176
+ * @params - {string} organizations 部门列表, 使用|分隔多个部门
8177
+ */
8178
+ updateUserOrganization(...args) {
8179
+ return this.oAuthRequest.apply(
8180
+ this, [
8181
+ '/users/update_user_organization',
8182
+ 'POST',
8183
+ ...args
8184
+ ]
8185
+ );
8186
+ }
8187
+
8188
+ /**
8189
+ * @description 更新用户所属角色
8190
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/update_user_role.html
8191
+ * @scope user#w
8192
+
8193
+ * @params - {integer} workspace_id 项目ID
8194
+ * @params - {integer} user_id 用户ID
8195
+ * @params - {string} roles 角色列表, 使用|分隔多个角色
8196
+ */
8197
+ updateUserRole(...args) {
8198
+ return this.oAuthRequest.apply(
8199
+ this, [
8200
+ '/users/update_user_role',
8201
+ 'POST',
8202
+ ...args
8203
+ ]
8204
+ );
8205
+ }
8206
+
8207
+ /**
8208
+ * @description 更新用户信息
8209
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/update_user.html
8210
+ * @scope user#w
8211
+
8212
+ * @params - {integer} workspace_id 项目ID
8213
+ * @params - {integer} id 用户ID
8214
+ * @params - {string} name 用户名称
8215
+ * @params - {string} email 用户邮箱,和mobile二选一
8216
+ * @params - {string} mobile 用户手机号,和email二选一
8217
+ * @params - {integer} gender 用户性别: 0 男 1 女
8218
+ * @params - {integer} status 用户状态:1 正常 2 离开公司
8219
+ * @params - {string} position 用户职位
8220
+ */
8221
+ updateUser(...args) {
8222
+ return this.oAuthRequest.apply(
8223
+ this, [
8224
+ '/users/modify',
8225
+ 'POST',
8226
+ ...args
8227
+ ]
8228
+ );
8229
+ }
8230
+
8231
+ /**
8232
+ * @description 删除用户
8233
+ * @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/remove_user.html
8234
+ * @scope user#w
8235
+
8236
+ * @params - {integer} workspace_id 项目ID
8237
+ * @params - {integer} id 用户ID
8238
+ */
8239
+ removeUser(...args) {
8240
+ return this.oAuthRequest.apply(
8241
+ this, [
8242
+ '/users/remove',
8243
+ 'POST',
8244
+ ...args
8245
+ ]
8246
+ );
8247
+ }
8248
+
7920
8249
 
7921
8250
  }
7922
8251
  module.exports.FILE = FILE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapd/tapd-node-sdk",
3
- "version": "1.47.1-alpha.0",
3
+ "version": "1.47.1-alpha.2",
4
4
  "description": "node sdk for open tapd ",
5
5
  "main": "node-sdk/src/index.js",
6
6
  "scripts": {
@@ -44,5 +44,5 @@
44
44
  "directories": {
45
45
  "test": "test"
46
46
  },
47
- "gitHead": "8e4a79ba58eb78f750ea278a28e3299fe8d05e90"
47
+ "gitHead": "fee48f9793f5bf410e6e2fc78428838ccb050cba"
48
48
  }