client.rolesOperation methods
Parameter declarations below are taken from the pinned TypeScript source. Request fields and responses are summarized from the matching OpenAPI operation; follow the API link for every field, constraint, example, and error description.
/rolesroles.list
Use this operation to list workspace roles. It returns only resources visible to the credential and applies the documented filters before producing a bounded, stable page. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.
client.roles.list(options: ListOptions = {})- Return form
Promise- Operation ID
listRoles- Required scopes
roles:read- SDK parameters
options: ListOptions- Query request fields
cursor?: stringlimit?: integer- Success
200 Array<Role> envelope
/rolesroles.create
Use this operation to create a workspace role. The server validates the complete payload and derives workspace ownership from the authenticated credential. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request. Use a stable Idempotency-Key when retrying so a transport timeout cannot create duplicate work.
client.roles.create(data: RoleCreate, options: MutationOptions = {})- Return form
Promise- Operation ID
createRole- Required scopes
roles:write- SDK parameters
data: RoleCreateoptions: MutationOptions- Header request fields
Idempotency-Key: string- Request body
RoleCreateapplication/json- Success
201 Role envelope
/roles/{id}roles.get
Use this operation to get a workspace role. It returns the resource only when it belongs to the authenticated workspace and is visible to the credential. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.
client.roles.get(id: string, options?: RequestOptions)- Return form
Promise- Operation ID
getRole- Required scopes
roles:read- SDK parameters
id: stringoptions: RequestOptions- Path request fields
id: string- Success
200 Role envelope
/roles/{id}roles.update
Use this operation to update a workspace role. Only documented mutable fields are accepted; omitted fields retain their current values unless the request schema states replacement semantics. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request. Send the latest strong ETag in If-Match; stale revisions fail without overwriting a concurrent change.
client.roles.update(id: string, data: RoleUpdate, options: AdministrationMutationOptions)- Return form
Promise- Operation ID
updateRole- Required scopes
roles:write- SDK parameters
id: stringdata: RoleUpdateoptions: AdministrationMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Request body
RoleUpdateapplication/json- Success
200 Role envelope
/roles/{id}roles.remove
Use this operation to delete a workspace role. The operation preserves TeamGrid lifecycle and permission rules instead of bypassing them with a direct data deletion. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request. Send the latest strong ETag in If-Match; stale revisions fail without overwriting a concurrent change.
client.roles.remove(id: string, options: AdministrationMutationOptions)- Return form
Promise- Operation ID
deleteRole- Required scopes
roles:write- SDK parameters
id: stringoptions: AdministrationMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Success
204
Convenience helpers
These typed helpers compose mapped operations. They do not grant scopes or bypass API limits.
roles.pages
Iterate cursor pages with a bounded PaginationOptions policy.
client.roles.pages(options: ListOptions = {}, pagination?: PaginationOptions)Returns AsyncGeneratorErrors and transport metadata
HTTP failures reject with TeamGridApiError, including the status, stable error documents, request ID, optional retry delay, and transport metadata. Local validation, routing, timeout, response-size, and pagination failures reject withTeamGridClientError and a stable client error code. Successful envelopes expose non-enumerable transport metadata.
See pagination and errors andclient configuration for handling guidance.