go-meow
Version:
A modular microservice template built with TypeScript, Express, and Prisma (MongoDB). It includes service scaffolding tools, consistent query utilities with data grouping, Zod validation, structured logging, comprehensive seeding system, and Swagger/OpenA
140 lines (139 loc) • 5.64 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0;
exports.config = {
ERROR: {
AUTH: {
UNAUTHORIZED: "Unauthorized",
INVALID_TOKEN: "Invalid token",
REGISTRATION_VALIDATION_FAILED: "Registration validation failed",
LOGIN_VALIDATION_FAILED: "Login validation failed",
PASSWORD_UPDATE_VALIDATION_FAILED: "Password update validation failed",
FIRST_NAME_LAST_NAME_REQUIRED: "First name and last name are required",
INVALID_ORGANIZATION_ID_FORMAT: "Invalid organization ID format",
ORGANIZATION_NOT_FOUND: "Organization not found",
USER_ALREADY_EXISTS: "User already exists",
ERROR_DURING_REGISTRATION: "Error during registration",
INVALID_CREDENTIALS: "Invalid credentials",
ERROR_DURING_LOGIN: "Error during login",
USER_ID_PASSWORD_REQUIRED: "User ID and new password are required",
PASSWORD_MIN_LENGTH: "Password must be at least 6 characters long",
ERROR_UPDATING_PASSWORD: "Error updating password",
USER_NOT_FOUND: "User not found",
FAILED_TO_CREATE_OR_FIND_PERSON: "Failed to create or find person",
},
TEMPLATE: {
VALIDATION_FAILED: "Template validation failed",
INVALID_ID_FORMAT: "Invalid template ID format",
NOT_FOUND: "Template not found",
CREATE_FAILED: "Error creating template",
UPDATE_FAILED: "Error updating template",
DELETE_FAILED: "Error deleting template",
GET_FAILED: "Error getting template",
GET_ALL_FAILED: "Error getting templates",
},
COMMON: {
INTERNAL_SERVER_ERROR: "Internal server error",
VALIDATION_ERROR: "Validation error",
NOT_FOUND: "Resource not found",
UNAUTHORIZED: "Unauthorized access",
},
},
SUCCESS: {
AUTH: {
REGISTRATION_SUCCESSFUL: "Registration successful",
LOGGED_IN_SUCCESSFULLY: "Logged in successfully",
PASSWORD_UPDATED_SUCCESSFULLY: "Password updated successfully",
USER_CREATED: "User created successfully",
TOKEN_GENERATED: "Token generated successfully",
ORGANIZATION_VERIFIED: "Organization verified successfully",
USER_LOGGED_IN: "User logged in successfully",
},
TEMPLATE: {
CREATED: "Template created successfully",
UPDATED: "Template updated successfully",
DELETED: "Template deleted successfully",
RETRIEVED: "Template retrieved successfully",
RETRIEVED_ALL: "Templates retrieved successfully",
},
COMMON: {
OPERATION_SUCCESSFUL: "Operation completed successfully",
},
},
ACTIVITY_LOG: {
TEMPLATE: {
ACTIONS: {
CREATE_TEMPLATE: "CREATE_TEMPLATE",
GET_ALL_TEMPLATE: "GET_ALL_TEMPLATE",
GET_TEMPLATE: "GET_TEMPLATE",
UPDATE_TEMPLATE: "UPDATE_TEMPLATE",
DELETE_TEMPLATE: "DELETE_TEMPLATE",
USER_LOGIN: "USER_LOGIN",
USER_LOGOUT: "USER_LOGOUT",
USER_REGISTRATION: "USER_REGISTRATION",
PASSWORD_UPDATE: "PASSWORD_UPDATE",
},
DESCRIPTIONS: {
TEMPLATE_CREATED: "Created new template",
TEMPLATE_UPDATED: "Updated template",
TEMPLATE_DELETED: "Deleted template",
TEMPLATE_RETRIEVED: "Retrieved template details",
TEMPLATES_RETRIEVED: "Retrieved template list",
USER_LOGGED_IN: "User logged in",
USER_LOGGED_OUT: "User logged out",
USER_REGISTERED: "User registered",
PASSWORD_CHANGED: "Password changed",
},
PAGES: {
TEMPLATE_CREATION: "Template Creation",
TEMPLATE_UPDATE: "Template Update",
TEMPLATE_DELETION: "Template Deletion",
TEMPLATE_DETAILS: "Template Details",
TEMPLATE_LIST: "Template List",
USER_LOGIN: "User Login",
USER_REGISTRATION: "User Registration",
PASSWORD_CHANGE: "Password Change",
},
},
},
AUDIT_LOG: {
ACTIONS: {
CREATE: "CREATE",
READ: "READ",
UPDATE: "UPDATE",
DELETE: "DELETE",
LOGIN: "LOGIN",
LOGOUT: "LOGOUT",
REGISTER: "REGISTER",
},
RESOURCES: {
TEMPLATE: "templates",
USERS: "users",
ORGANIZATIONS: "organizations",
AUTH: "auth",
},
SEVERITY: {
LOW: "LOW",
MEDIUM: "MEDIUM",
HIGH: "HIGH",
CRITICAL: "CRITICAL",
},
ENTITY_TYPES: {
TEMPLATE: "template",
USER: "user",
ORGANIZATION: "organization",
},
TEMPLATE: {
DESCRIPTIONS: {
TEMPLATE_CREATED: "Created new template",
TEMPLATE_UPDATED: "Updated template",
TEMPLATE_DELETED: "Deleted template",
USER_CREATED: "Created new user",
USER_UPDATED: "Updated user",
USER_DELETED: "Deleted user",
USER_LOGGED_IN: "User logged in",
USER_LOGGED_OUT: "User logged out",
},
},
},
};