export const BASE_URL = "https://api.instantly.ai/api/v2";
export function getApiKey(): string {
const key = process.env.INSTANTLY_API_KEY;
if (!key) {
throw new Error('INSTANTLY_API_KEY environment variable is not set');
}
return key;
}
export const PROVIDER_CODES = {
CUSTOM_IMAP: 1,
GOOGLE: 2,
MICROSOFT: 3,
AWS: 4
} as const;
export const WARMUP_STATUS = {
PAUSED: 0,
ACTIVE: 1,
BANNED: -1,
SPAM_UNKNOWN: -2,
PERMANENT_SUSPENSION: -3
} as const;
export function getProviderNameFromCode(code: number): string {
switch (code) {
case 1: return 'Custom IMAP/SMTP';
case 2: return 'Google';
case 3: return 'Microsoft';
case 4: return 'AWS';
default: return 'Unknown';
}
}
export function getWarmupStatusFromCode(code: number): string {
switch (code) {
case 0: return 'Paused';
case 1: return 'Active';
case -1: return 'Banned';
case -2: return 'Spam Folder Unknown';
case -3: return 'Permanent Suspension';
default: return 'Unknown';
}
}