/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Abound from "../../../index"; export declare namespace Mailings { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Mailings { protected readonly _options: Mailings.Options; constructor(_options: Mailings.Options); /** * Returns a list of mailings. Up to 100 mailings are returned per request. * * @param {Abound.MailingsListRequest} request * @param {Mailings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Abound.types.BadRequestErrorSchema} * @throws {@link Abound.types.UnauthorizedErrorSchema} * @throws {@link Abound.types.NotFoundErrorSchema} * @throws {@link Abound.types.InternalServerErrorSchema} * * @example * await client.mailings.list() */ list(request?: Abound.MailingsListRequest, requestOptions?: Mailings.RequestOptions): Promise; /** * Retrieves the details of an existing mailing. * * @param {Abound.types.MailingId} mailingId * @param {Mailings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Abound.types.BadRequestErrorSchema} * @throws {@link Abound.types.UnauthorizedErrorSchema} * @throws {@link Abound.types.NotFoundErrorSchema} * @throws {@link Abound.types.InternalServerErrorSchema} * * @example * await client.mailings.retrieve("mailingId_sampleFV9b73IvAD") */ retrieve(mailingId: Abound.types.MailingId, requestOptions?: Mailings.RequestOptions): Promise; /** * Updates an existing mailing. Once a mailing has reached the `PROCESSING_FOR_DELIVERY` status, it cannot be updated. Any body parameters not provided will be removed. * * @param {Abound.types.MailingId} mailingId * @param {Abound.MailingRequest} request * @param {Mailings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Abound.types.BadRequestErrorSchema} * @throws {@link Abound.types.UnauthorizedErrorSchema} * @throws {@link Abound.types.NotFoundErrorSchema} * @throws {@link Abound.types.InternalServerErrorSchema} * * @example * await client.mailings.update("mailingId_sampleFV9b73IvAD", { * body: { * to: { * address: "1401 N Shoreline Blvd", * address2: "Suite 1", * city: "Mountain View", * state: "CA", * postalCode: "94043", * country: "US", * name: "Ada Lovelace" * }, * from: { * address: "256 Byron Street", * address2: "Suite 32", * city: "Palo Alto", * state: "CA", * postalCode: "94306", * country: "US", * name: "Hooli" * } * } * }) */ update(mailingId: Abound.types.MailingId, request: Abound.MailingRequest, requestOptions?: Mailings.RequestOptions): Promise; /** * Deletes a mailing. Once a mailing has reached the `PROCESSING_FOR_DELIVERY` status, it cannot be deleted. * * @param {Abound.types.MailingId} mailingId * @param {Mailings.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Abound.types.BadRequestErrorSchema} * @throws {@link Abound.types.UnauthorizedErrorSchema} * @throws {@link Abound.types.NotFoundErrorSchema} * @throws {@link Abound.types.InternalServerErrorSchema} * * @example * await client.mailings.delete("mailingId_sampleFV9b73IvAD") */ delete(mailingId: Abound.types.MailingId, requestOptions?: Mailings.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }