/** This is spectacularly generated code by spectacular based on Qlik Cloud Services APIs */ import Auth from '../auth/auth.js'; import type { Config } from '../types/types.js'; export type Email = { /** email body */ body?: string; /** email recipient (email address) */ recipient?: string; /** email subject */ subject?: string; [key: string]: any; }; export type EmailConfigFieldPatch = { /** The operation to be performed. @example "add" */ op: 'replace, remove, add' | string; /** The path for the given resource field to patch. @example "/emailAddress" */ path: '/username' | '/serverAddress' | '/serverPort' | '/securityType' | '/emailAddress' | '/emailPassword' | string; /** The value to be used for this operation. @example "john.smith@company.com" */ value: string; [key: string]: any; }; export type EmailConfigGet = { /** Number of authentication failures */ authFailures?: number; /** used for SMTP authentication @example "john.smith@company.com" */ emailAddress?: string; /** Is the configuration valid @example true */ isValid?: boolean; /** Last modification time. Formatted as a ISO 8601 string. @example "2022-06-30T09:57:40.954Z" */ modificationTime?: string; /** Indicates if password is defined for this smtp config. The password itself is not returned! @example true */ passwordExists?: boolean; /** one of none, StartTLS or SSL/TLS @example "StartTLS" */ securityType?: string; /** domain name or IP address of SMTP server @example "smtp.company.com" */ serverAddress?: string; /** smtp server listening port @example 587 */ serverPort?: number; /** Contains statusCode and statusReason */ status?: SmtpConfigStatus; /** The tenant Id @example "mcdd-mkw_Ebo0fR2vLl8_YsQYFsYrTdP" */ tenantId?: string; /** user name @example "john.smith@company.com" */ username?: string; [key: string]: any; }; export type EmailConfigPatch = Array; export type SmtpCheck = { /** true if smtp config is correct and complete. Will return false if smtp-config does not exist at all */ isValid?: boolean; [key: string]: any; }; export type SmtpConfigStatus = { /** Status code */ statusCode?: number; /** Status reason @example "OK" */ statusReason?: string; [key: string]: any; }; export type SmtpResult = { /** could not resolve domain name, connection refused, connection timed out, SSL mismatch */ connectionFailed?: boolean; /** error message from SMTP middleware .. a bit technical but could be useful to administrator */ message?: string; /** smtp result code string from the SMTP server. eg. "250 2.6.0" */ smtpResponseCode?: number; /** was SMTP operation successful or not. Other fields herein provide more detail */ success?: boolean; [key: string]: any; }; export declare class Transports { auth: Auth; config: Config; constructor(config: Config | Auth); /** Send a test mail with the supplied email info (subject, body, recipient). Email config from database is used for the connection. @param data - */ sendTestEmailEmailConfig(data: Email): Promise; /** Returns the isValid value for the email configuration for the tenant. Will return false if no email configuration exists. */ validateEmailConfig(): Promise; /** Verifies connection to email server for tenant provided via JWT */ verifyConnectionEmailConfig(): Promise; /** Deletes email configuration for a given tenant id (retrieved from JWT). */ deleteEmailConfig(): Promise; /** Returns the email configuration for a given tenant id (retrieved from JWT). */ getEmailConfig(): Promise; /** Patch the email configuration for a given tenant id (retrieved from JWT). @param data - */ patchEmailConfig(data: EmailConfigPatch): Promise; }