export const RoleCode = {
  USER: "USER",
  ADMIN: "ADMIN",
} as const;
export type RoleCode = (typeof RoleCode)[keyof typeof RoleCode];

export const AllowedModule = {
  DOCUMENT_BROWSER: "DOCUMENT_BROWSER",
  BACKEND_MANAGEMENT: "BACKEND_MANAGEMENT",
  AUDIT_LOG: "AUDIT_LOG",
} as const;
export type AllowedModule = (typeof AllowedModule)[keyof typeof AllowedModule];

export const DocumentType = {
  MAIN: "MAIN",
  SUB_PLAN: "SUB_PLAN",
  ATTACHMENT: "ATTACHMENT",
} as const;
export type DocumentType = (typeof DocumentType)[keyof typeof DocumentType];

export const DocumentStatus = {
  DRAFT: "DRAFT",
  PUBLISHED: "PUBLISHED",
  ARCHIVED: "ARCHIVED",
} as const;
export type DocumentStatus = (typeof DocumentStatus)[keyof typeof DocumentStatus];

export const SecurityLevel = {
  PUBLIC: "PUBLIC",
  INTERNAL: "INTERNAL",
  SECRET: "SECRET",
  CONFIDENTIAL: "CONFIDENTIAL",
  TOP_SECRET: "TOP_SECRET",
} as const;
export type SecurityLevel = (typeof SecurityLevel)[keyof typeof SecurityLevel];

export const VisibilityType = {
  ALL_AUTHENTICATED: "ALL_AUTHENTICATED",
  ORGANIZATION: "ORGANIZATION",
  CUSTOM: "CUSTOM",
} as const;
export type VisibilityType = (typeof VisibilityType)[keyof typeof VisibilityType];

export const AttachmentType = {
  POLICY: "POLICY",
  WORK_STANDARD: "WORK_STANDARD",
  TABLE: "TABLE",
  DIAGRAM: "DIAGRAM",
  OTHER: "OTHER",
} as const;
export type AttachmentType = (typeof AttachmentType)[keyof typeof AttachmentType];

export const SubjectType = {
  ORG: "ORG",
  USER: "USER",
} as const;
export type SubjectType = (typeof SubjectType)[keyof typeof SubjectType];

export const AllowedAction = {
  VIEW: "VIEW",
  DOWNLOAD: "DOWNLOAD",
  EDIT: "EDIT",
  CONFIG_PERMISSION: "CONFIG_PERMISSION",
  DELETE: "DELETE",
  BIND_ATTACHMENT: "BIND_ATTACHMENT",
  UNBIND_ATTACHMENT: "UNBIND_ATTACHMENT",
} as const;
export type AllowedAction = (typeof AllowedAction)[keyof typeof AllowedAction];

export const CategoryType = {
  SCENE: "SCENE",
  STYLE: "STYLE",
  SITUATION: "SITUATION",
  VERSION: "VERSION",
  OTHER: "OTHER",
} as const;
export type CategoryType = (typeof CategoryType)[keyof typeof CategoryType];

export const EnabledStatus = {
  ENABLED: "ENABLED",
  DISABLED: "DISABLED",
} as const;
export type EnabledStatus = (typeof EnabledStatus)[keyof typeof EnabledStatus];

export const AuditOperationResult = {
  SUCCESS: "SUCCESS",
  FAILURE: "FAILURE",
} as const;
export type AuditOperationResult =
  (typeof AuditOperationResult)[keyof typeof AuditOperationResult];

export const AuditActionType = {
  LOGIN: "LOGIN",
  LOGOUT: "LOGOUT",
  VIEW_DOCUMENT: "VIEW_DOCUMENT",
  DOWNLOAD_DOCUMENT: "DOWNLOAD_DOCUMENT",
  UPLOAD_DOCUMENT: "UPLOAD_DOCUMENT",
  BATCH_IMPORT: "BATCH_IMPORT",
  EDIT_DOCUMENT: "EDIT_DOCUMENT",
  DELETE_DOCUMENT: "DELETE_DOCUMENT",
  CREATE_CATEGORY: "CREATE_CATEGORY",
  EDIT_CATEGORY: "EDIT_CATEGORY",
  DELETE_CATEGORY: "DELETE_CATEGORY",
  CHANGE_PERMISSION: "CHANGE_PERMISSION",
  BIND_ATTACHMENT: "BIND_ATTACHMENT",
  UNBIND_ATTACHMENT: "UNBIND_ATTACHMENT",
  RESTORE_DOCUMENT: "RESTORE_DOCUMENT",
} as const;
export type AuditActionType =
  (typeof AuditActionType)[keyof typeof AuditActionType];

export const AuditTargetType = {
  AUTH: "AUTH",
  CATEGORY: "CATEGORY",
  DOCUMENT: "DOCUMENT",
  ATTACHMENT: "ATTACHMENT",
  PERMISSION: "PERMISSION",
  ATTACHMENT_BINDING: "ATTACHMENT_BINDING",
} as const;
export type AuditTargetType =
  (typeof AuditTargetType)[keyof typeof AuditTargetType];
