import { AttachmentNativeBinding } from './AttachmentNativeBinding';
import { MessageHeaderNativeBinding } from './MessageHeaderNativeBinding';

export declare class MessageBuilderNativeBinding {
  get header(): MessageHeaderNativeBinding | undefined;
  set header(msgHeader: MessageHeaderNativeBinding | undefined);
  get htmlBody(): string;
  set htmlBody(bodyVal: string);
  get textBody(): string;
  set textBody(bodyVal: string);
  get attachments(): AttachmentNativeBinding[];
  set attachments(attaches: AttachmentNativeBinding[]);
  public addAttachments(attaches: AttachmentNativeBinding[]): void;
  get relatedAttachments(): AttachmentNativeBinding[];
  set relatedAttachments(attaches: AttachmentNativeBinding[]);
  public addRelatedAttachments(attaches: AttachmentNativeBinding[]): void;
  get boundaryPrefix(): string;
  set boundaryPrefix(prefVal: string);
  get data(): Buffer;
  public getDataAsync(
    done: (error: string | Error | undefined | null, result: Buffer) => void
  ): void;
  public Write(fileName: string): void;
  public WriteAsync(
    fileName: string,
    done: (error: string | Error | undefined | null, result: Buffer) => void
  ): void;
  public SetSignerCert(certData: string, signerMail?: string): void;
  public SetRecipientsCerts(certsData: string[]): void;
  get keyUsagePolicy(): "kupNone" | "kupCheckKeyEnc" | "kupCheckKeyAgree" | "kupCheckOneOf";
  set keyUsagePolicy(policyVal: "kupNone" | "kupCheckKeyEnc" | "kupCheckKeyAgree" | "kupCheckOneOf");
  public SetTempFolder(tmpFolderPath: string): void;
  public static SetLicense(lic: string): void;
}

export declare interface MessageBuilderNativeBindingObject {
  new(bufData?: Buffer, fileName?: string): MessageBuilderNativeBinding;
  strError(errorCode: number): string;
  SetLicense(lic: string): void;
}
