import type { IAuthentication } from "./authentication"; import type { IIdentityDocument, ILegalPerson } from './legalPerson'; import { ILicenseData } from "./license"; export interface IModel { created_at: string; updated_at: string; deleted_at?: string; note?: string; } export interface IWorkgroup extends IModel { uuid: string; name: string; ownerUuid: string; owner?: IUser; legalPersons?: ILegalPerson[]; integrationClients?: IIntegrationClient[]; identityDocuments?: IIdentityDocument[]; usersGroups?: IUsersGroup[]; workgroupUnits?: IWorkgroupUnit[]; licenseData?: ILicenseData; } export interface IWorkgroupUnit extends IModel { legalPersonUuid: string; legalPerson?: ILegalPerson; workgroupUuid: string; workgroup?: IWorkgroup; usersGroups?: IUsersGroup[]; } export interface IUser extends IModel { uuid: string; name: string; login: string; email: string; pwd: string; imageUrl?: string; validated?: boolean; legalPersonUuid?: string; legalPerson?: ILegalPerson; groups?: IUserGroup[]; receivedInvites?: IUsersGroupInvite[]; sentInvites?: IUsersGroupInvite[]; authentications?: IAuthentication[]; workgroups?: IWorkgroup[]; } export declare class User implements IUser { uuid: any; name: string; login: string; email: string; validated?: boolean | undefined; pwd: string; imageUrl?: string | undefined; legalPersonUuid?: string | undefined; legalPerson?: ILegalPerson | undefined; groups?: IUserGroup[] | undefined; created_at: string; updated_at: string; deleted_at?: string | undefined; constructor(data: { uuid: string; name: string; login: string; email: string; validated?: boolean; pwd: string; imageUrl?: string | undefined; legalPersonUuid?: string | undefined; legalPerson?: ILegalPerson | undefined; groups?: IUserGroup[] | undefined; created_at: string; updated_at: string; deleted_at?: string | undefined; }); toUserSharedData(): IUserSharedData; static toUserSharedData(input: any): any; } export interface IUserSharedData { uuid: string; name: string; login: string; email: string; validated?: boolean; imageUrl?: string; } export interface IUsersGroup extends IModel { uuid: string; name: string; workgroupUnitUuid?: string; workgroupUnit?: IWorkgroupUnit; workgroupUuid: string; workgroup?: IWorkgroup; users?: IUserGroup[]; authorizations?: IUsersGroupAuthorization[]; usersInvites?: IUsersGroupInvite[]; } export interface IUserGroup extends IModel { uuid: string; userUuid: string; user?: IUser; userGroupUuid: string; userGroup?: IUsersGroup; } export declare const UsersGroupInviteStatus: { readonly pending: 0; readonly accepted: 1; readonly refused: 2; }; export type UsersGroupInviteStatus = typeof UsersGroupInviteStatus[keyof typeof UsersGroupInviteStatus]; export declare class UsersGroupInviteStatusUtils { static UsersGroupInviteStatusGetDescription: (status: UsersGroupInviteStatus) => "Pendente" | "Aceito" | "Negado"; static UsersGroupInviteStatusGetUiMaterialChipColor: (status: UsersGroupInviteStatus) => "warning" | "success" | "error"; } export interface IUsersGroupInvite extends IModel { uuid: string; userUuid: string; user?: IUser; targetUserUuid: string; targetUser?: IUser; userGroupUuid: string; userGroup?: IUsersGroup; dtUnix: number; status: UsersGroupInviteStatus; } export interface IAuthorization extends IModel { key: string; description: string; usersGroups?: IUsersGroupAuthorization[]; } export interface IUsersGroupAuthorization extends IModel { uuid: string; authorizationKey: string; authorization?: IAuthorization; userGroupUuid: string; userGroup?: IUsersGroup; } export interface IIntegrationClient extends IModel { uuid: string; workgroupUuid: string; workgroup?: IWorkgroup; name: string; secret: string; active?: boolean; authorizations?: IIntegrationClientAuthorization[]; } export interface IIntegrationClientAuthorization extends IModel { uuid: string; authorizationKey: string; authorization?: IAuthorization; integrationClientUuid: string; integrationClient?: IIntegrationClient; } export declare const AgentType: { readonly user: 0; readonly integrationClient: 1; }; export type AgentType = typeof AgentType[keyof typeof AgentType]; export type Agent = { uuid: string; type: AgentType; data?: IUserSharedData | IIntegrationClient; };