BackstageClient.userAccountRoles
BackstageClient.userAccountRoles in @ticketlayer/backstage.
@ticketlayer/backstage / BackstageClient / userAccountRoles
userAccountRoles: {
assign: (request: {
accountId: string;
roleId: string;
userId: string;
}, requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}>;
list: (requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>;
listByAccount: (accountId: string, requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>;
listByUser: (userId: string, requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>;
remove: (id: string, requestOptions?: RequestOptions) => Promise<boolean>;
update: (request: {
accountId: string;
roleIds: string[];
userId: string;
}, requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>;
};Defined in: client.ts:2290
User Account Roles methods
assign()#
assign: (request: {
accountId: string;
roleId: string;
userId: string;
}, requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}>;Assign role to user Assign a role to a user for a specific account. Creates a new role assignment.
Parameters#
| Parameter | Type | Description |
|---|---|---|
request | { accountId: string; roleId: string; userId: string; } | - |
request.accountId | string | Description Account ID Example acc_abc123 |
request.roleId? | string | Description Role ID (can be a system role or custom role) Example rol_system_event_manager |
request.userId? | string | Description User ID Example usr_abc123 |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}>
Operation Id#
assignRole
list()#
list: (requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>;List all role assignments List all role assignments in the organisation. Shows which users have which roles on which accounts.
Parameters#
| Parameter | Type |
|---|---|
requestOptions? | RequestOptions |
Returns#
Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>
Operation Id#
listUserAccountRoles
listByAccount()#
listByAccount: (accountId: string, requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>;List role assignments for account List all role assignments for a specific account (all users with access).
Parameters#
| Parameter | Type |
|---|---|
accountId | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>
Operation Id#
listUserAccountRolesByAccount
listByUser()#
listByUser: (userId: string, requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>;List role assignments for user List all role assignments for a specific user across all accounts.
Parameters#
| Parameter | Type |
|---|---|
userId | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>
Operation Id#
listUserAccountRolesByUser
remove()#
remove: (id: string, requestOptions?: RequestOptions) => Promise<boolean>;Remove role assignment Remove a specific role assignment from a user.
Parameters#
| Parameter | Type |
|---|---|
id | string |
requestOptions? | RequestOptions |
Returns#
Promise<boolean>
Operation Id#
removeRoleAssignment
update()#
update: (request: {
accountId: string;
roleIds: string[];
userId: string;
}, requestOptions?: RequestOptions) => Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>;Update user roles on account Update the roles for a user on an account. Replaces all existing role assignments for this user-account pair.
Parameters#
| Parameter | Type | Description |
|---|---|---|
request | { accountId: string; roleIds: string[]; userId: string; } | - |
request.accountId | string | Description Account ID Example acc_abc123 |
request.roleIds? | string[] | Description Array of role IDs to assign (replaces existing roles) Example [ "rol_system_event_manager", "rol_system_box_office" ] |
request.userId? | string | Description User ID Example usr_abc123 |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
account?: {
id: string;
name: string;
};
accountId: string;
createdAt: string;
id: string;
organisationId: string;
role?: {
id: string;
isSystemRole: boolean;
name: string;
};
roleId: string;
user?: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
userId: string;
}[]>
Operation Id#
updateUserAccountRoles