107 lines
2.4 KiB
TypeScript
107 lines
2.4 KiB
TypeScript
export interface ICompany {
|
|
id?: string;
|
|
name: string;
|
|
slug: string;
|
|
description: string;
|
|
categoryId: number;
|
|
ownerId: string;
|
|
banned?: boolean;
|
|
// ... we don't need all the properties in the proxy model, just what we return/use
|
|
}
|
|
|
|
export type PaginateCompaniesParams = {
|
|
_id?: string;
|
|
name?: string;
|
|
ownerId?: string;
|
|
banned?: boolean;
|
|
page: number;
|
|
limit: number;
|
|
};
|
|
|
|
export type PaginateCompaniesResults = {
|
|
data: any[];
|
|
page: number;
|
|
pages: number;
|
|
};
|
|
|
|
export type UpdateCompanyParams = {
|
|
id: string;
|
|
name?: string;
|
|
description?: string;
|
|
categoryId?: number;
|
|
};
|
|
|
|
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;
|
|
};
|
|
};
|