Classes
Methods
# async addUserToGroup(groupid, dataopt) → {Promise.<ApiResponse>}
Add a user to a group.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
groupid |
string
|
The group ID |
|
data |
object
|
<optional> |
Payload |
parentid |
string
|
<optional> |
The parent ID |
userrelations |
Array.<object>
|
<optional> |
The user relations of the group |
userrelations[].userid |
string
|
<optional> |
The user ID |
userrelations[].roles |
Array.<string>
|
<optional> |
The roles of the user |
userrelations[].companyid |
string
|
<optional> |
The company ID |
userrelations[].userconfig |
object
|
<optional> |
The user config |
Promise.<ApiResponse>
# async createGroup(projCatId, type, dataopt) → {Promise.<ApiResponse>}
Create a new user group.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
projCatId |
string
|
The project or catalogue ID |
|
type |
string
|
The type of group (project or catalogue) |
|
data |
object
|
<optional> |
Group payload |
name |
string
|
<optional> |
The name of the group |
description |
string
|
<optional> |
The description of the group |
permissions |
object
|
<optional> |
The permissions of the group |
users |
Array.<string>
|
<optional> |
The users of the group |
roles |
Array.<string>
|
<optional> |
The roles of the group |
userrelations |
Array.<string>
|
<optional> |
The user relations of the group |
invitations |
Array.<string>
|
<optional> |
The invitations of the group |
Promise.<ApiResponse>
# async deleteGroup(groupid) → {Promise.<ApiResponse>}
Delete a user group.
Parameters:
Name | Type | Description |
---|---|---|
groupid |
string
|
The group ID |
Promise.<ApiResponse>
# async getGlobalGroups(queryopt) → {Promise.<ApiResponse>}
List global (scope‑wide) groups.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
query |
object
|
<optional> |
The query parameters |
filter |
string
|
<optional> |
The filter |
members |
string
|
<optional> |
The members |
Promise.<ApiResponse>
# async getGroupAvatar(groupid) → {Promise.<ApiResponse>}
Fetch a group's avatar (base64 string).
Parameters:
Name | Type | Description |
---|---|---|
groupid |
string
|
The group ID |
- The response object
Promise.<ApiResponse>
# async getGroupById(groupid, queryopt) → {Promise.<ApiResponse>}
Fetch a single group by ID.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
groupid |
string
|
The group ID |
|
query |
object
|
<optional> |
The query parameters |
filter |
string
|
<optional> |
The filter |
members |
string
|
<optional> |
The members |
- The response object
Promise.<ApiResponse>
# async getGroups(projectList, catalogueList, globalGroups, queryopt, withAvatar) → {Promise.<ApiResponse>}
List groups across projects, catalogues, and/or global scope.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
projectList |
Array.<string>
|
The project ids |
||
catalogueList |
Array.<string>
|
The catalogue ids |
||
globalGroups |
boolean
|
false | Whether to include global user groups |
|
query |
object
|
<optional> |
The query parameters |
|
filter |
string
|
<optional> |
The filter |
|
members |
string
|
<optional> |
The members |
|
withAvatar |
boolean
|
Whether to include the avatar of the groups |
- The response object
Promise.<ApiResponse>
# async getGroupsInCatalogue(catalogueid, queryopt) → {Promise.<ApiResponse>}
List groups in a catalogue.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
catalogueid |
string
|
The catalogue ID |
|
query |
object
|
<optional> |
The query parameters |
filter |
string
|
<optional> |
The filter |
members |
string
|
<optional> |
The members |
Promise.<ApiResponse>
# async getGroupsInProject(projectid, queryopt) → {Promise.<ApiResponse>}
List groups in a project.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
projectid |
string
|
The project ID |
|
query |
object
|
<optional> |
The query parameters |
filter |
string
|
<optional> |
The filter |
members |
string
|
<optional> |
The members |
Promise.<ApiResponse>
# async inviteUserToGroup(groupid, dataopt) → {Promise.<ApiResponse>}
Invite a user to a group (creates a pending invitation).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
groupid |
string
|
The group ID |
|
data |
object
|
<optional> |
Payload |
parentid |
string
|
<optional> |
The parent ID |
message |
string
|
<optional> |
The message |
subject |
string
|
<optional> |
The subject |
userrelations |
Array.<object>
|
<optional> |
The user relations of the group |
userrelations[].userid |
string
|
<optional> |
The user ID |
userrelations[].roles |
Array.<string>
|
<optional> |
The roles of the user |
userrelations[].companyid |
string
|
<optional> |
The company ID |
userrelations[].userconfig |
object
|
<optional> |
The user config |
- The response object
Promise.<ApiResponse>
# async removeUserFromGroup(groupid, dataopt) → {Promise.<ApiResponse>}
Remove a user from a group.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
groupid |
string
|
The group ID |
|
data |
object
|
<optional> |
Payload |
userid |
string
|
<optional> |
The user ID |
roleid |
string
|
<optional> |
The role ID |
companyid |
string
|
<optional> |
The company ID |
- The response object
Promise.<ApiResponse>
# async updateGroup(groupid, dataopt) → {Promise.<ApiResponse>}
Update an existing user group.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
groupid |
string
|
The group ID |
|
data |
object
|
<optional> |
Group payload |
name |
string
|
<optional> |
The name of the group |
description |
string
|
<optional> |
The description of the group |
permissions |
object
|
<optional> |
The permissions of the group |
users |
Array.<string>
|
<optional> |
The users of the group |
roles |
Array.<string>
|
<optional> |
The roles of the group |
userrelations |
Array.<string>
|
<optional> |
The user relations of the group |
invitations |
Array.<string>
|
<optional> |
The invitations of the group |
Promise.<ApiResponse>
# async updateGroupAvatar(groupid, avatar) → {Promise.<ApiResponse>}
Update a group's avatar (base64 string).
Parameters:
Name | Type | Description |
---|---|---|
groupid |
string
|
The group ID |
avatar |
string
|
The avatar base64 string |
- The response object
Promise.<ApiResponse>
# async updateUserInGroup(userrelationId, dataopt) → {Promise.<ApiResponse>}
Update a user's membership in a group.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
userrelationId |
string
|
The user relation ID |
|
data |
object
|
<optional> |
Payload |
userid |
string
|
<optional> |
The user ID |
roles |
Array.<string>
|
<optional> |
The roles of the user |
companyid |
string
|
<optional> |
The company ID |
userconfig |
object
|
<optional> |
The user config |
- The response object
Promise.<ApiResponse>