All files / lib/models Enums.ts

95.92% Statements 47/49
100% Branches 12/12
80% Functions 8/10
95.92% Lines 47/49
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75  3x 3x   3x 3x 3x 3x 3x 3x     3x 3x 3x 3x 3x 3x 3x 3x     3x 3x 3x 3x 3x     3x 3x 3x     3x 3x 3x     3x 3x 3x 3x 3x 3x       12x 12x 12x           3x 3x 3x 3x 3x     6x 6x 6x           3x 3x 3x  
import { awsConfig, globalConst } from '../config/db/appVariables';
export enum QUOTE_STATUS_ENUM {
    NEW = 'NEW',
    PENDING = 'PENDING',
    ESTIMATED = 'ESTIMATED',
    CLOSED = 'CLOSED',
    CANCELED = 'CANCELED',
}
 
export enum ORDER_STATUS_ENUM {
    NEW = 'NEW',
    PENDING = 'PENDING',
    PROCESSING = 'PROCESSING',
    CANCELED = 'CANCELED',    
    OUT_FOR_DELIVERY = 'OUT_FOR_DELIVERY',
    DELIVERED = 'DELIVERED',
    CLOSED = 'CLOSED',    
}
 
export enum USER_ROLES_ENUM {
    PATIENT = 'PATIENT',
    PHARMACY = 'PHARMACY',
    DOCTOR = 'DOCTOR',
    ADMIN = 'ADMIN'
}
 
export enum LOGIN_SESSION_STATUS {
    ACTIVE = 'ACTIVE',
    INACTIVE = 'INACTIVE'
}
 
export enum STATUS_ENUM {
    ACTIVE = 'ACTIVE',
    INACTIVE = 'INACTIVE',
}
 
export enum CATEGORY_ENUM {
    MEDICINE = 'MEDICINE',
    HYGIENE = 'HYGIENE',
    COSMETIC = 'COSMETIC',
    FOOD_DRINK = 'FOOD_DRINK',
    NATURAL = 'NATURAL',
}
export class PUSH_NOTIFICATIONS_TOPICS {
    private arn: string ;
    public static PATIENT_NEW_QUOTE_ESTIMATED: PUSH_NOTIFICATIONS_TOPICS = new PUSH_NOTIFICATIONS_TOPICS('PATIENT_NEW_QUOTE_ESTIMATED');
    public static PATIENT_NOT_AVAILABLE_STORES: PUSH_NOTIFICATIONS_TOPICS = new PUSH_NOTIFICATIONS_TOPICS('PATIENT_NOT_AVAILABLE_STORES');    
    public static PATIENT_AVAILABLE_STORES: PUSH_NOTIFICATIONS_TOPICS = new PUSH_NOTIFICATIONS_TOPICS('PATIENT_AVAILABLE_STORES');    
    public static NEW_PRESCRIPTION: PUSH_NOTIFICATIONS_TOPICS = new PUSH_NOTIFICATIONS_TOPICS('NEW_PRESCRIPTION'); 
 
    constructor(public type: string) {
        this.arn = `arn:aws:sns:${awsConfig.region}:${awsConfig.arn}:${globalConst.stage}-push-notifications`;
        this.type = type
    }
    
    public toString(): string {
        return this.type + this.arn;
    }
}
 
export class EMAILS_TOPICS {
    public arn : string;
    public static RECOVERY_PASSWORD: EMAILS_TOPICS = new EMAILS_TOPICS('RECOVERY_PASSWORD');
    public static SEND_PRESCRIPTION: EMAILS_TOPICS = new EMAILS_TOPICS('SEND_PRESCRIPTION');    
    
    constructor(public type: string) {
        this.arn = `arn:aws:sns:${awsConfig.region}:${awsConfig.arn}:${globalConst.stage}-email-notifications`;
        this.type = type;
    }
    
    public toString(): string {
        return this.type + this.arn;
    }
}