gmail-node-mailer
Advanced tools
Comparing version 1.6.58 to 1.6.59
@@ -1,2 +0,21 @@ | ||
import { IInitializeClientParams, IInitializeClientResult, ISendEmailResponse } from './types'; | ||
import { google } from 'googleapis'; | ||
export interface ISendEmailResponse { | ||
sent: boolean; | ||
status: number; | ||
message: string; | ||
} | ||
export interface IInitializeClientParams { | ||
gmailServiceAccount?: IGmailServiceAccount; | ||
gmailServiceAccountPath?: string; | ||
gmailSenderEmail?: string; | ||
} | ||
export interface IInitializeClientResult { | ||
status: boolean; | ||
gmailClient: typeof google.gmail_v1.Gmail | null; | ||
message: string; | ||
} | ||
export interface IGmailServiceAccount { | ||
private_key: string; | ||
client_email: string; | ||
} | ||
export declare class GmailMailer { | ||
@@ -3,0 +22,0 @@ private gmailClient; |
@@ -41,2 +41,3 @@ "use strict"; | ||
const isValidEmail_1 = require("./utils/isValidEmail"); | ||
; | ||
class GmailMailer { | ||
@@ -43,0 +44,0 @@ constructor() { |
@@ -1,3 +0,1 @@ | ||
export { sendEmail } from './sendEmail'; | ||
export { initializeClient } from './initializeClient'; | ||
export * from './types'; | ||
export { GmailMailer } from './gmailer'; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.initializeClient = exports.sendEmail = void 0; | ||
exports.GmailMailer = void 0; | ||
// ./src/index.ts | ||
var sendEmail_1 = require("./sendEmail"); | ||
Object.defineProperty(exports, "sendEmail", { enumerable: true, get: function () { return sendEmail_1.sendEmail; } }); | ||
var initializeClient_1 = require("./initializeClient"); | ||
Object.defineProperty(exports, "initializeClient", { enumerable: true, get: function () { return initializeClient_1.initializeClient; } }); | ||
__exportStar(require("./types"), exports); | ||
var gmailer_1 = require("./gmailer"); | ||
Object.defineProperty(exports, "GmailMailer", { enumerable: true, get: function () { return gmailer_1.GmailMailer; } }); |
{ | ||
"name": "gmail-node-mailer", | ||
"version": "1.6.58", | ||
"version": "1.6.59", | ||
"description": "", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
@@ -8,0 +7,0 @@ "build": "tsc", |
@@ -6,4 +6,28 @@ // Importing necessary modules | ||
import { isValidEmail } from './utils/isValidEmail'; | ||
import { IInitializeClientParams, IInitializeClientResult, ISendEmailResponse } from './types'; | ||
export interface ISendEmailResponse { | ||
sent: boolean; | ||
status: number; | ||
message: string; | ||
}; | ||
// Interface for the parameters accepted by the initializeClient function remains the same | ||
export interface IInitializeClientParams { | ||
gmailServiceAccount?: IGmailServiceAccount; | ||
gmailServiceAccountPath?: string; | ||
gmailSenderEmail?: string; | ||
} | ||
// Interface for the function's return type remains the same | ||
export interface IInitializeClientResult { | ||
status: boolean; | ||
gmailClient: typeof google.gmail_v1.Gmail | null; | ||
message: string; | ||
} | ||
// Interface for the Gmail service account credentials | ||
export interface IGmailServiceAccount { | ||
private_key: string; | ||
client_email: string; | ||
} | ||
export class GmailMailer { | ||
@@ -10,0 +34,0 @@ private gmailClient: gmail_v1.Gmail | null = null; |
// ./src/index.ts | ||
export {sendEmail} from './sendEmail'; | ||
export {initializeClient} from './initializeClient'; | ||
export * from './types'; | ||
export { GmailMailer } from './gmailer'; |
6
15387
13
294