UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

40 lines 1.93 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; import * as AddressesAPI from 'cloudflare/resources/email-routing/addresses'; import * as DNSAPI from 'cloudflare/resources/email-routing/dns'; import * as RulesAPI from 'cloudflare/resources/email-routing/rules/rules'; export class EmailRouting extends APIResource { constructor() { super(...arguments); this.dns = new DNSAPI.DNS(this._client); this.rules = new RulesAPI.Rules(this._client); this.addresses = new AddressesAPI.Addresses(this._client); } /** * Disable your Email Routing zone. Also removes additional MX records previously * required for Email Routing to work. */ disable(zoneIdentifier, options) { return this._client.post(`/zones/${zoneIdentifier}/email/routing/disable`, options)._thenUnwrap((obj) => obj.result); } /** * Enable you Email Routing zone. Add and lock the necessary MX and SPF records. */ enable(zoneIdentifier, options) { return this._client.post(`/zones/${zoneIdentifier}/email/routing/enable`, options)._thenUnwrap((obj) => obj.result); } /** * Get information about the settings for your Email Routing zone. */ get(zoneIdentifier, options) { return this._client.get(`/zones/${zoneIdentifier}/email/routing`, options)._thenUnwrap((obj) => obj.result); } } (function (EmailRouting) { EmailRouting.DNS = DNSAPI.DNS; EmailRouting.Rules = RulesAPI.Rules; EmailRouting.RuleListResponsesV4PagePaginationArray = RulesAPI.RuleListResponsesV4PagePaginationArray; EmailRouting.Addresses = AddressesAPI.Addresses; EmailRouting.AddressListResponsesV4PagePaginationArray = AddressesAPI.AddressListResponsesV4PagePaginationArray; })(EmailRouting || (EmailRouting = {})); //# sourceMappingURL=email-routing.mjs.map