@tapd/tapd-node-sdk 1.47.1-alpha.0 → 1.47.1-alpha.1
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.
- package/node-sdk/src/index.js +312 -0
- package/package.json +2 -2
package/node-sdk/src/index.js
CHANGED
|
@@ -7917,6 +7917,318 @@ 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/user/update_role.html
|
|
8002
|
+
* @scope user#w
|
|
8003
|
+
|
|
8004
|
+
* @params - {integer} workspace_id 项目ID
|
|
8005
|
+
* @params - {integer} id 角色ID
|
|
8006
|
+
* @params - {string} name 角色名称
|
|
8007
|
+
*/
|
|
8008
|
+
updateRole(...args) {
|
|
8009
|
+
return this.oAuthRequest.apply(
|
|
8010
|
+
this, [
|
|
8011
|
+
'/roles',
|
|
8012
|
+
'POST',
|
|
8013
|
+
...args
|
|
8014
|
+
]
|
|
8015
|
+
);
|
|
8016
|
+
}
|
|
8017
|
+
|
|
8018
|
+
/**
|
|
8019
|
+
* @description 增加角色
|
|
8020
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/add_role.html
|
|
8021
|
+
* @scope user#w
|
|
8022
|
+
|
|
8023
|
+
* @params - {integer} workspace_id 项目ID
|
|
8024
|
+
* @params - {string} name 角色名称
|
|
8025
|
+
*/
|
|
8026
|
+
addRole(...args) {
|
|
8027
|
+
return this.oAuthRequest.apply(
|
|
8028
|
+
this, [
|
|
8029
|
+
'/roles',
|
|
8030
|
+
'POST',
|
|
8031
|
+
...args
|
|
8032
|
+
]
|
|
8033
|
+
);
|
|
8034
|
+
}
|
|
8035
|
+
|
|
8036
|
+
/**
|
|
8037
|
+
* @description 删除角色
|
|
8038
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/remove_role.html
|
|
8039
|
+
* @scope user#w
|
|
8040
|
+
|
|
8041
|
+
* @params - {integer} workspace_id 项目ID
|
|
8042
|
+
* @params - {integer} id 角色ID
|
|
8043
|
+
*/
|
|
8044
|
+
removeRole(...args) {
|
|
8045
|
+
return this.oAuthRequest.apply(
|
|
8046
|
+
this, [
|
|
8047
|
+
'/roles/delete',
|
|
8048
|
+
'POST',
|
|
8049
|
+
...args
|
|
8050
|
+
]
|
|
8051
|
+
);
|
|
8052
|
+
}
|
|
8053
|
+
|
|
8054
|
+
/**
|
|
8055
|
+
* @description 获取角色权限点
|
|
8056
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/get_role_permissions.html
|
|
8057
|
+
* @scope user#r
|
|
8058
|
+
|
|
8059
|
+
* @params - {integer} workspace_id 项目ID
|
|
8060
|
+
* @params - {integer} role_id 角色ID
|
|
8061
|
+
*/
|
|
8062
|
+
getRolePermissions(...args) {
|
|
8063
|
+
return this.oAuthRequest.apply(
|
|
8064
|
+
this, [
|
|
8065
|
+
'/role_permissions/list_role_permissions_with_id',
|
|
8066
|
+
'GET',
|
|
8067
|
+
...args
|
|
8068
|
+
]
|
|
8069
|
+
);
|
|
8070
|
+
}
|
|
8071
|
+
|
|
8072
|
+
/**
|
|
8073
|
+
* @description 获取所有权限点
|
|
8074
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/get_all_permissions.html
|
|
8075
|
+
* @scope user#r
|
|
8076
|
+
|
|
8077
|
+
* @params - {integer} workspace_id 项目ID
|
|
8078
|
+
*/
|
|
8079
|
+
getAllPermissions(...args) {
|
|
8080
|
+
return this.oAuthRequest.apply(
|
|
8081
|
+
this, [
|
|
8082
|
+
'/role_permissions/list_all_permissions',
|
|
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/update_role_permissions.html
|
|
8092
|
+
* @scope user#w
|
|
8093
|
+
|
|
8094
|
+
* @params - {integer} workspace_id 项目ID
|
|
8095
|
+
* @params - {integer} role_id 角色ID
|
|
8096
|
+
* @params - {array} permissions 权限点列表
|
|
8097
|
+
*/
|
|
8098
|
+
updateRolePermissions(...args) {
|
|
8099
|
+
return this.oAuthRequest.apply(
|
|
8100
|
+
this, [
|
|
8101
|
+
'/role_permissions/edit_role_permissions',
|
|
8102
|
+
'POST',
|
|
8103
|
+
...args
|
|
8104
|
+
]
|
|
8105
|
+
);
|
|
8106
|
+
}
|
|
8107
|
+
|
|
8108
|
+
/**
|
|
8109
|
+
* @description 获取用户列表
|
|
8110
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/get_users.html
|
|
8111
|
+
* @scope user#r
|
|
8112
|
+
|
|
8113
|
+
* @params - {integer} workspace_id 项目ID
|
|
8114
|
+
* @params - {integer} id 用户ID
|
|
8115
|
+
* @params - {integer} status 用户状态: 0 未激活 1 正常 2 已禁用 3 冻结用户 4 邀请未确认用户 可以同时传入多个状态: 1,2,3,4
|
|
8116
|
+
* @params - {integer} page 分页页码,默认为1
|
|
8117
|
+
* @params - {integer} limit 单页大小 最大为100, 默认为30
|
|
8118
|
+
*/
|
|
8119
|
+
getUsers(...args) {
|
|
8120
|
+
return this.oAuthRequest.apply(
|
|
8121
|
+
this, [
|
|
8122
|
+
'/users',
|
|
8123
|
+
'GET',
|
|
8124
|
+
...args
|
|
8125
|
+
]
|
|
8126
|
+
);
|
|
8127
|
+
}
|
|
8128
|
+
|
|
8129
|
+
/**
|
|
8130
|
+
* @description 新增用户
|
|
8131
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/add_user.html
|
|
8132
|
+
* @scope user#w
|
|
8133
|
+
|
|
8134
|
+
* @params - {integer} workspace_id 项目ID
|
|
8135
|
+
* @params - {string} name 用户名称
|
|
8136
|
+
* @params - {string} email 用户邮箱,和mobile二选一
|
|
8137
|
+
* @params - {string} mobile 用户手机号,和email二选一
|
|
8138
|
+
* @params - {integer} gender 用户性别: 0 男 1 女
|
|
8139
|
+
* @params - {integer} status 用户状态:1 正常 2 离开公司
|
|
8140
|
+
* @params - {string} position 用户职位
|
|
8141
|
+
*/
|
|
8142
|
+
addUser(...args) {
|
|
8143
|
+
return this.oAuthRequest.apply(
|
|
8144
|
+
this, [
|
|
8145
|
+
'/users/new',
|
|
8146
|
+
'POST',
|
|
8147
|
+
...args
|
|
8148
|
+
]
|
|
8149
|
+
);
|
|
8150
|
+
}
|
|
8151
|
+
|
|
8152
|
+
/**
|
|
8153
|
+
* @description 更新用户所属部门
|
|
8154
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/update_user_organization.html
|
|
8155
|
+
* @scope user#w
|
|
8156
|
+
|
|
8157
|
+
* @params - {integer} workspace_id 项目ID
|
|
8158
|
+
* @params - {integer} user_id 用户ID
|
|
8159
|
+
* @params - {string} organizations 部门列表, 使用|分隔多个部门
|
|
8160
|
+
*/
|
|
8161
|
+
updateUserOrganization(...args) {
|
|
8162
|
+
return this.oAuthRequest.apply(
|
|
8163
|
+
this, [
|
|
8164
|
+
'/users/update_user_organization',
|
|
8165
|
+
'POST',
|
|
8166
|
+
...args
|
|
8167
|
+
]
|
|
8168
|
+
);
|
|
8169
|
+
}
|
|
8170
|
+
|
|
8171
|
+
/**
|
|
8172
|
+
* @description 更新用户所属角色
|
|
8173
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/update_user_role.html
|
|
8174
|
+
* @scope user#w
|
|
8175
|
+
|
|
8176
|
+
* @params - {integer} workspace_id 项目ID
|
|
8177
|
+
* @params - {integer} user_id 用户ID
|
|
8178
|
+
* @params - {string} roles 角色列表, 使用|分隔多个角色
|
|
8179
|
+
*/
|
|
8180
|
+
updateUserRole(...args) {
|
|
8181
|
+
return this.oAuthRequest.apply(
|
|
8182
|
+
this, [
|
|
8183
|
+
'/users/update_user_role',
|
|
8184
|
+
'POST',
|
|
8185
|
+
...args
|
|
8186
|
+
]
|
|
8187
|
+
);
|
|
8188
|
+
}
|
|
8189
|
+
|
|
8190
|
+
/**
|
|
8191
|
+
* @description 更新用户信息
|
|
8192
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/update_user.html
|
|
8193
|
+
* @scope user#w
|
|
8194
|
+
|
|
8195
|
+
* @params - {integer} workspace_id 项目ID
|
|
8196
|
+
* @params - {integer} id 用户ID
|
|
8197
|
+
* @params - {string} name 用户名称
|
|
8198
|
+
* @params - {string} email 用户邮箱,和mobile二选一
|
|
8199
|
+
* @params - {string} mobile 用户手机号,和email二选一
|
|
8200
|
+
* @params - {integer} gender 用户性别: 0 男 1 女
|
|
8201
|
+
* @params - {integer} status 用户状态:1 正常 2 离开公司
|
|
8202
|
+
* @params - {string} position 用户职位
|
|
8203
|
+
*/
|
|
8204
|
+
updateUser(...args) {
|
|
8205
|
+
return this.oAuthRequest.apply(
|
|
8206
|
+
this, [
|
|
8207
|
+
'/users/modify',
|
|
8208
|
+
'POST',
|
|
8209
|
+
...args
|
|
8210
|
+
]
|
|
8211
|
+
);
|
|
8212
|
+
}
|
|
8213
|
+
|
|
8214
|
+
/**
|
|
8215
|
+
* @description 删除用户
|
|
8216
|
+
* @link o.tapd.tencent.com/document/api-doc/API%E6%96%87%E6%A1%A3/api_reference/user/remove_user.html
|
|
8217
|
+
* @scope user#w
|
|
8218
|
+
|
|
8219
|
+
* @params - {integer} workspace_id 项目ID
|
|
8220
|
+
* @params - {integer} id 用户ID
|
|
8221
|
+
*/
|
|
8222
|
+
removeUser(...args) {
|
|
8223
|
+
return this.oAuthRequest.apply(
|
|
8224
|
+
this, [
|
|
8225
|
+
'/users/remove',
|
|
8226
|
+
'POST',
|
|
8227
|
+
...args
|
|
8228
|
+
]
|
|
8229
|
+
);
|
|
8230
|
+
}
|
|
8231
|
+
|
|
7920
8232
|
|
|
7921
8233
|
}
|
|
7922
8234
|
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.
|
|
3
|
+
"version": "1.47.1-alpha.1",
|
|
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": "
|
|
47
|
+
"gitHead": "a797a36c9a601bb4379ddd1d83e1ffcc9819ef08"
|
|
48
48
|
}
|