import { APIResource } from "../../../core/resource.js"; import * as DNSAPI from "./dns.js"; import { BaseDNS, DNS, DNSGetParams } from "./dns.js"; import { APIPromise } from "../../../core/api-promise.js"; import { PagePromise, SinglePage } from "../../../core/pagination.js"; import { RequestOptions } from "../../../internal/request-options.js"; export declare class BaseSubdomains extends APIResource { static readonly _key: readonly ['emailSending', 'subdomains']; /** * Creates a new sending subdomain or re-enables sending on an existing subdomain * that had it disabled. If zone-level Email Sending has not been enabled yet, the * zone flag is automatically set when the entitlement is present. * * @example * ```ts * const subdomain = * await client.emailSending.subdomains.create({ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * name: 'sub.example.com', * }); * ``` */ create(params: SubdomainCreateParams, options?: RequestOptions): APIPromise; /** * Lists all sending-enabled subdomains for the zone. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const subdomainListResponse of client.emailSending.subdomains.list( * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ list(params: SubdomainListParams, options?: RequestOptions): PagePromise; /** * Disables sending on a subdomain and removes its DNS records. If routing is still * active on the subdomain, only sending is disabled. * * @example * ```ts * const subdomain = * await client.emailSending.subdomains.delete( * 'aabbccdd11223344aabbccdd11223344', * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ delete(subdomainID: string, params: SubdomainDeleteParams, options?: RequestOptions): APIPromise; /** * Gets information for a specific sending subdomain. * * @example * ```ts * const subdomain = await client.emailSending.subdomains.get( * 'aabbccdd11223344aabbccdd11223344', * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(subdomainID: string, params: SubdomainGetParams, options?: RequestOptions): APIPromise; } export declare class Subdomains extends BaseSubdomains { dns: DNSAPI.DNS; } export type SubdomainListResponsesSinglePage = SinglePage; export interface SubdomainCreateResponse { /** * Whether Email Sending is enabled on this subdomain. */ enabled: boolean; /** * The subdomain domain name. */ name: string; /** * Sending subdomain identifier. */ tag: string; /** * The date and time the destination address has been created. */ created?: string; /** * The DKIM selector used for email signing. */ dkim_selector?: string; /** * The date and time the destination address was last modified. */ modified?: string; /** * The return-path domain used for bounce handling. */ return_path_domain?: string; } export interface SubdomainListResponse { /** * Whether Email Sending is enabled on this subdomain. */ enabled: boolean; /** * The subdomain domain name. */ name: string; /** * Sending subdomain identifier. */ tag: string; /** * The date and time the destination address has been created. */ created?: string; /** * The DKIM selector used for email signing. */ dkim_selector?: string; /** * The date and time the destination address was last modified. */ modified?: string; /** * The return-path domain used for bounce handling. */ return_path_domain?: string; } export interface SubdomainDeleteResponse { errors: Array; messages: Array; /** * Whether the API call was successful. */ success: true; } export declare namespace SubdomainDeleteResponse { interface Error { code: number; message: string; documentation_url?: string; source?: Error.Source; } namespace Error { interface Source { pointer?: string; } } interface Message { code: number; message: string; documentation_url?: string; source?: Message.Source; } namespace Message { interface Source { pointer?: string; } } } export interface SubdomainGetResponse { /** * Whether Email Sending is enabled on this subdomain. */ enabled: boolean; /** * The subdomain domain name. */ name: string; /** * Sending subdomain identifier. */ tag: string; /** * The date and time the destination address has been created. */ created?: string; /** * The DKIM selector used for email signing. */ dkim_selector?: string; /** * The date and time the destination address was last modified. */ modified?: string; /** * The return-path domain used for bounce handling. */ return_path_domain?: string; } export interface SubdomainCreateParams { /** * Path param: Identifier. */ zone_id: string; /** * Body param: The subdomain name. Must be within the zone. */ name: string; } export interface SubdomainListParams { /** * Identifier. */ zone_id: string; } export interface SubdomainDeleteParams { /** * Identifier. */ zone_id: string; } export interface SubdomainGetParams { /** * Identifier. */ zone_id: string; } export declare namespace Subdomains { export { type SubdomainCreateResponse as SubdomainCreateResponse, type SubdomainListResponse as SubdomainListResponse, type SubdomainDeleteResponse as SubdomainDeleteResponse, type SubdomainGetResponse as SubdomainGetResponse, type SubdomainListResponsesSinglePage as SubdomainListResponsesSinglePage, type SubdomainCreateParams as SubdomainCreateParams, type SubdomainListParams as SubdomainListParams, type SubdomainDeleteParams as SubdomainDeleteParams, type SubdomainGetParams as SubdomainGetParams, }; export { DNS as DNS, BaseDNS as BaseDNS, type DNSGetParams as DNSGetParams }; } //# sourceMappingURL=subdomains.d.ts.map