import type { DomainType } from "@/@types/types/domain.types"; import type { ModuleType } from "@/@types/types/module.types"; import type { Operation } from "@/@types/types/operation.types"; import type { PermissionType } from "@/@types/types/permission.types"; const PermissionValuesTypes = { all: "*", none: "none", } as const; export type PermissionFieldType = | keyof (T & typeof PermissionValuesTypes) | (keyof (T & typeof PermissionValuesTypes))[]; export interface IPermission { domain: PermissionFieldType; module: PermissionFieldType; operation: PermissionFieldType; type: keyof typeof PermissionType; }