google-authenticator-util
Version:
Google authenticator tool for backend development / automation
61 lines (60 loc) • 4.32 kB
TypeScript
import { gmail_v1 } from 'googleapis';
import { emailMessage } from './types';
/**
* Retrieving a list of emails
* @param parameters The parameters to filter emails by
* @param parameters.auth Auth client or API Key for the request
* @param parameters.includeSpamTrash Include messages from SPAM and TRASH in the results.
* @param parameters.labelIds Only return messages with labels that match all of the specified label IDs.
* @param parameters.maxResults Maximum number of messages to return.
* @param parameters.pageToken Page token to retrieve a specific page of results in the list.
* @param parameters.q Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid:<somemsgid@example.com> is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.
* @param parameters.userId The user's email address. The special value me can be used to indicate the authenticated user.
*/
export declare function filterEmails(parameters: gmail_v1.Params$Resource$Users$Messages$List): Promise<gmail_v1.Schema$Message[]>;
/**
* Retrieve an email's contents
* @param parameters The parameters to filter the email by
* @param parameters.auth Auth client or API Key for the request
* @param parameters.format The format to return the message in.
* @param parameters.id The ID of the message to retrieve.
* @param parameters.metadataHeaders When given and format is METADATA, only include headers specified.
* @param parameters.userId The user's email address. The special value me can be used to indicate the authenticated user.
*/
export declare function getEmail(parameters: gmail_v1.Params$Resource$Users$Messages$Get): Promise<import("gaxios").GaxiosResponse<gmail_v1.Schema$Message>>;
/**
* Waiting for email to appear
* @param parameters The parameters to filter emails by
* @param parameters.auth Auth client or API Key for the request
* @param parameters.includeSpamTrash Include messages from SPAM and TRASH in the results.
* @param parameters.labelIds Only return messages with labels that match all of the specified label IDs.
* @param parameters.maxResults Maximum number of messages to return.
* @param parameters.pageToken Page token to retrieve a specific page of results in the list.
* @param parameters.q Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid:<somemsgid@example.com> is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.
* @param parameters.userId The user's email address. The special value me can be used to indicate the authenticated user.
* @param timeoutInSeconds The amount of time to wait for the email. Default: 5 seconds
*/
export declare function waitForEmail(parameters: gmail_v1.Params$Resource$Users$Messages$List, timeoutInSeconds?: number): Promise<gmail_v1.Schema$Message[]>;
/**
* Sending an email
* @param parameters The parameters of send email message
* @param parameters.to The email address to recieve the email
* @param parameters.from The email address to send the email from
* @param parameters.subject The subject of the email address
* @param parameters.message The message of the email address
* @param parameters.auth Auth client or API Key for the request
* @param parameters.userId The user's email address. The special value me can be used to indicate the authenticated user.
* @param parameters.requestBody Request body metadata
* @param parameters.media Media metadata
* @param parameters.media.mimeType Media mime-type
* @param parameters.media.body Media body contents
*/
export declare function sendEmail(parameters: emailMessage): Promise<void>;
/**
* Deleting an email
* @param parameters The parameters of email deletion
* @param parameters.auth Auth client or API Key for the request
* @param parameters.id The ID of the message to delete.
* @param parameters.userId The user's email address. The special value me can be used to indicate the authenticated user.
*/
export declare function deleteEmail(parameters: gmail_v1.Params$Resource$Users$Messages$Delete): Promise<void>;