File

lib/shared/constants.ts

Description

A class containing static constants representing different user roles.

Index

Properties

Properties

Static Readonly ADMIN
Type : string
Default value : "admin"

Represents the admin role with administrative access.

Static Readonly MANAGER
Type : string
Default value : "manager"

Represents the manager role.

Static Readonly ROOT
Type : string
Default value : "root"

Represents the root role with the highest level of access.

export class Roles {
  /**
   * @constant ROOT
   * Represents the root role with the highest level of access.
   */
  static readonly ROOT = "root";
  /**
   * @constant ADMIN
   * Represents the admin role with administrative access.
   */
  static readonly ADMIN = "admin";
  /**
   * @constant MANAGER
   * Represents the manager role.
   */
  static readonly MANAGER = "manager";
}

/**
 * An object containing properties used for request handling.
 */
export const REQUEST_PROPS = {
  /**
   * @property accessToken
   * The property name for storing the access token in the request.
   */
  accessToken: "accessToken",

  /**
   * @property currentUser
   * The property name for storing the current user in the request.
   */
  currentUser: "currentUser",
};

/**
 * A constant representing the exception identifier for microservices.
 */
export const MS_EXCEPTION_ID = "MsException";

results matching ""

    No results matching ""