dashpresshq/dashpress

View on GitHub
src/shared/configurations/types.ts

Summary

Maintainability
A
35 mins
Test Coverage
A
100%
import type { MessageDescriptor } from "@lingui/core";

export interface IAppConfigurationBag {
  requireEntity?: true;
  defaultValue: unknown;
  guest?: true;
  label: MessageDescriptor;
}

export interface IEntityCrudSettings {
  create: boolean;
  details: boolean;
  update: boolean;
  delete: boolean;
}

export type CrudViewsKeys = keyof IEntityCrudSettings | "table";

export enum DataActionType {
  Create = "create",
  Details = "details",
  Update = "update",
  Delete = "delete",
  List = "list",
  Table = "table",
  Count = "count",
  Reference = "reference",
}