feat: implement organization insights dashboard with detailed metrics and collaboration data in sysadmin-cli

This commit is contained in:
2026-07-30 17:33:57 -03:00
parent 781310e36c
commit 146770a55d
14 changed files with 595 additions and 62 deletions
+69
View File
@@ -35,3 +35,72 @@ export type SetCompanyBannedParams = {
id: string;
banned: boolean;
};
export type OrganizationInsightsParams = {
companyId: string;
};
export type OrganizationInsightsResult = {
organization: {
id: string;
name: string;
slug: string;
description: string;
categoryId: number;
banned: boolean;
published?: string;
onboardingStep?: number;
onboardingCompleted?: boolean;
};
owner: {
id: string;
firstName?: string;
lastName?: string;
email?: string;
verificated?: boolean;
phoneCountryCode?: string;
phoneAreaCode?: string;
phoneNumber?: string;
} | null;
collaborators: {
id: string;
userId?: string;
firstName?: string;
lastName?: string;
fullName?: string;
email?: string;
roles?: string[];
removed?: boolean;
active: boolean;
avatar?: string;
}[];
subscription: {
id: string;
startDate: string;
endDate: string;
isActive: boolean;
autoRenew: boolean;
mpStatus?: string;
pendingPaymentType?: "extension" | "upgrade";
plan: {
id: string;
name: string;
code: string;
price: number;
limitOrganizations: number;
limitEmployees: number;
limitServices: number;
limitAppointments: number;
limitClients: number;
} | null;
} | null;
stats: {
employeesCount: number;
activeEmployeesCount: number;
servicesCount: number;
activeServicesCount: number;
clientsCount: number;
activeClientsCount: number;
reservationsLast30Days: number;
};
};