import { Client } from '../client'; import { BaseError } from '../errors/baseError'; import { UriHelper, HandlerQuery } from '../uri-helper'; import { ThBaseHandler } from '../base'; export interface UsersOptions { user?: string; base?: string; configurationId?: string; } export interface UsersQuery { limit?: number; uri?: string; } export interface HandleUsersQuery extends HandlerQuery { query?: UsersQuery; } export interface UsersResponse { data: User[]; metadata: Record; } export interface UserResponse { data?: User; metadata?: { count?: number; patch?: any; }; msg?: string; } export declare type UserRoles = 'admin' | 'manager' | 'serviceaccount' | 'franchisee' | 'franchise' | 'staff'; export interface User { id?: string; user: { id?: string; email?: string; }; description?: string | null; blocked?: boolean; deleted?: boolean; active?: boolean; metadata?: Record; role: UserRoles; user_id?: string; configuration_id: string; groups?: Record | null; scopes?: string[] | null; user_permission_template_id?: string | null; attributes?: Record | null; parents?: string[] | null; children?: string[] | null; api_key?: string | null; key?: Record | null; secret?: string; username?: string; firstname?: string; lastname?: string; locations?: string[] | null; } export declare class Users extends ThBaseHandler { static baseEndpoint: string; endpoint: string; http: Client; options: UsersOptions; configurationId?: string; uriHelper: UriHelper; constructor(options: UsersOptions, http: Client); getAll(query?: HandleUsersQuery): Promise; get(userId: string): Promise; put(userId: string, user: User): Promise; create(user: User): Promise; delete(userId: string): Promise; createToken(userId: string): Promise; } export declare class UsersFetchFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class UserFetchFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class UserPutFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class UserCreationFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class UserDeleteFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); } export declare class UserTokenCreationFailed extends BaseError { message: string; name: string; constructor(message?: string, properties?: Record); }