archetecture security fix
This commit is contained in:
+94
@@ -0,0 +1,94 @@
|
||||
type EmployeeRole = 'OWNER' | 'MANAGER' | 'AGENT';
|
||||
type Plan = 'STARTER' | 'GROWTH' | 'PRO';
|
||||
type MenuItemType = 'INTERNAL_PAGE' | 'EXTERNAL_LINK' | 'PARENT_MENU' | 'SECTION_LABEL' | 'DIVIDER';
|
||||
type AdminActor = {
|
||||
id: string;
|
||||
role: string;
|
||||
};
|
||||
type MenuItemInput = {
|
||||
systemKey?: string | null;
|
||||
label: string;
|
||||
itemType: MenuItemType;
|
||||
routeOrUrl?: string | null;
|
||||
icon?: string | null;
|
||||
parentId?: string | null;
|
||||
displayOrder?: number;
|
||||
openInNewTab?: boolean;
|
||||
isRequired?: boolean;
|
||||
isActive?: boolean;
|
||||
roles?: EmployeeRole[];
|
||||
subscriptionPlans?: Array<{
|
||||
plan: Plan;
|
||||
displayOrder?: number;
|
||||
isActive?: boolean;
|
||||
}>;
|
||||
companyAssignments?: Array<{
|
||||
companyId: string;
|
||||
displayOrder?: number;
|
||||
isActive?: boolean;
|
||||
}>;
|
||||
};
|
||||
type MenuPreviewInput = {
|
||||
companyId: string;
|
||||
role: EmployeeRole;
|
||||
};
|
||||
type MenuAuditQuery = {
|
||||
page: number;
|
||||
pageSize: number;
|
||||
};
|
||||
type EvaluatedMenuItem = {
|
||||
id: string;
|
||||
systemKey: string | null;
|
||||
label: string;
|
||||
itemType: MenuItemType;
|
||||
routeOrUrl: string | null;
|
||||
icon: string | null;
|
||||
parentId: string | null;
|
||||
openInNewTab: boolean;
|
||||
isRequired: boolean;
|
||||
isActive: boolean;
|
||||
displayOrder: number;
|
||||
source: 'company' | 'subscription' | 'none';
|
||||
visible: boolean;
|
||||
reasons: string[];
|
||||
};
|
||||
export declare function listMenuItems(): Promise<any>;
|
||||
export declare function getMenuItem(id: string): Promise<any>;
|
||||
export declare function createMenuItem(input: MenuItemInput, admin: AdminActor): Promise<any>;
|
||||
export declare function updateMenuItem(id: string, input: MenuItemInput, admin: AdminActor): Promise<any>;
|
||||
export declare function setMenuItemStatus(id: string, isActive: boolean, admin: AdminActor): Promise<any>;
|
||||
export declare function deleteMenuItem(id: string, admin: AdminActor): Promise<void>;
|
||||
export declare function assignMenuItemToPlans(id: string, assignments: Array<{
|
||||
plan: Plan;
|
||||
displayOrder?: number;
|
||||
isActive?: boolean;
|
||||
}>, admin: AdminActor): Promise<any>;
|
||||
export declare function removeMenuItemFromPlan(id: string, plan: Plan, admin: AdminActor): Promise<any>;
|
||||
export declare function assignMenuItemToCompanies(id: string, assignments: Array<{
|
||||
companyId: string;
|
||||
displayOrder?: number;
|
||||
isActive?: boolean;
|
||||
}>, admin: AdminActor): Promise<any>;
|
||||
export declare function removeMenuItemFromCompany(id: string, companyId: string, admin: AdminActor): Promise<any>;
|
||||
export declare function previewCompanyMenu(input: MenuPreviewInput): Promise<{
|
||||
company: any;
|
||||
role: EmployeeRole;
|
||||
subscriptionPlan: Plan | null;
|
||||
items: EvaluatedMenuItem[];
|
||||
finalMenu: any[];
|
||||
}>;
|
||||
export declare function getEmployeeMenu(employeeId: string): Promise<{
|
||||
companyId: any;
|
||||
role: any;
|
||||
subscriptionPlan: Plan | null;
|
||||
items: any[];
|
||||
}>;
|
||||
export declare function listMenuAuditLogs(query: MenuAuditQuery): Promise<{
|
||||
data: any;
|
||||
total: any;
|
||||
page: number;
|
||||
pageSize: number;
|
||||
totalPages: number;
|
||||
}>;
|
||||
export {};
|
||||
//# sourceMappingURL=menu.service.d.ts.map
|
||||
Reference in New Issue
Block a user