@454creative/easy-email
Version:
A framework-agnostic email service library for Node.js with observability and monitoring
57 lines • 1.56 kB
JavaScript
;
/**
* SendGrid-specific TypeScript types and constants
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SENDGRID_DEFAULT_CONFIG = exports.SENDGRID_ERROR_CODES = exports.SENDGRID_ERROR_TYPES = void 0;
/**
* SendGrid Error Types Array
*/
exports.SENDGRID_ERROR_TYPES = [
'Unauthorized',
'Forbidden',
'BadRequest',
'NotFound',
'TooManyRequests',
'InternalServerError',
'ServiceUnavailable',
'GatewayTimeout',
'InvalidEmail',
'InvalidSender',
'InvalidRecipient',
'InvalidTemplate',
'InvalidAttachment',
'RateLimitExceeded',
'QuotaExceeded',
'NetworkError',
'TimeoutError',
];
/**
* SendGrid Error Codes
*/
exports.SENDGRID_ERROR_CODES = {
UNAUTHORIZED: 'Unauthorized',
FORBIDDEN: 'Forbidden',
BAD_REQUEST: 'BadRequest',
NOT_FOUND: 'NotFound',
TOO_MANY_REQUESTS: 'TooManyRequests',
INTERNAL_SERVER_ERROR: 'InternalServerError',
SERVICE_UNAVAILABLE: 'ServiceUnavailable',
GATEWAY_TIMEOUT: 'GatewayTimeout',
INVALID_EMAIL: 'InvalidEmail',
INVALID_SENDER: 'InvalidSender',
INVALID_RECIPIENT: 'InvalidRecipient',
INVALID_TEMPLATE: 'InvalidTemplate',
INVALID_ATTACHMENT: 'InvalidAttachment',
RATE_LIMIT_EXCEEDED: 'RateLimitExceeded',
QUOTA_EXCEEDED: 'QuotaExceeded',
NETWORK_ERROR: 'NetworkError',
TIMEOUT_ERROR: 'TimeoutError',
};
/**
* SendGrid Default Configuration
*/
exports.SENDGRID_DEFAULT_CONFIG = {
apiKey: 'SG.your-api-key-here',
};
//# sourceMappingURL=sendgrid.types.js.map