import { RpcMethod } from './commonTypes'; export type AccountUsersService_List = RpcMethod; export type AccountUsersService_Delete = RpcMethod; export interface AccountUsersService { /** Lists the team members (dashboard users) of the current account together with a per-group membership map, paged and optionally filtered by email substring or group name. Use to review who has access to the account and which permission groups they belong to. */ List: AccountUsersService_List; /** Removes a team member from the current account by email: revokes their permission-group membership, logs them out, and deletes the user entirely if they belong to no other account. Cannot delete the account owner; a second delete of the same email errors as not-assigned. */ Delete: AccountUsersService_Delete; } export type ListRequest_OrderBy = 'EMAIL'; export type ListRequest_OrderDirection = 'ASC' | 'DESC'; export type ListRequest = { page?: number; perPage?: number; orderBy?: ListRequest_OrderBy; orderDirection?: ListRequest_OrderDirection; /** Case-insensitive substring match on user email (SQL ILIKE '%value%'). */ searchByEmail?: string; /** Keep only users who are members of the permission group with this exact name (e.g. "Admins", "Owner"). */ searchByGroup?: string; }; export type ListResponse_AccountUser = { email: string; /** map with groups with IsMember flag: "Admins": true, "Marketing": false, ...etc */ userGroups: Record; }; export type ListResponse = { accountUsers: ListResponse_AccountUser[]; page: number; perPage: number; total: number; }; export type DeleteRequest = { /** Email of the account team member to remove. */ email?: string; }; export type DeleteResponse = {};