import type { RatePlanId } from './ratePlan'; import type { Subscription } from './subscription'; /** * Each zone in Cloudflare has an application services plan ("the Cloudflare * zone plan"). * * The Cloudflare zone plan has a `subscription` whose `product` has the * following properties: * ``` * "product": { * "name": "prod_cloudflare", * "public_name": "CloudFlare Services" * } * ``` * * The Cloudflare zone plan is offered at six (increasing) levels of service. * - Free * - Lite * - Pro * - Pro Plus * - Business * - Enterprise * * This file exports an enum for each service level grouping together all the * ids for the same level of service. Each id in the enum is either * `typeof PlanId` or (lowercase) `typeof CfPlanId`. */ /** * Enum includes the Cloudflare zone plan ids for the "Free" service tier. * * Each entry is `typeof PlanId` or (lowercase) `typeof CfPlanId`. */ declare enum FREE { cf_free = "cf_free", free = "free", partners_free = "partners_free" } /** * Enum includes the Cloudflare zone plan ids for the "Lite" service tier. * * Each entry is `typeof PlanId` or (lowercase) `typeof CfPlanId`. */ declare enum LITE { cf_lite = "cf_lite", lite = "lite" } /** * Enum includes the Cloudflare zone plan ids for the "Pro" service tier. * * Each entry is `typeof PlanId` or (lowercase) `typeof CfPlanId`. */ declare enum PRO { cf_pro_20_20 = "cf_pro_20_20", cf_pro_20_5 = "cf_pro_20_5", cf_pro_free = "cf_pro_free", partners_pro = "partners_pro", pro = "pro", pro_trial = "pro_trial" } /** * Enum includes the Cloudflare zone plan ids for the "Pro Plus" service tier. * * Each entry is `typeof PlanId` or (lowercase) `typeof CfPlanId`. */ declare enum PRO_PLUS { cf_pro_plus = "cf_pro_plus", pro_plus = "pro_plus" } /** * Enum includes the Cloudflare zone plan ids for the "Business" service tier. * * Each entry is `typeof PlanId` or (lowercase) `typeof CfPlanId`. */ declare enum BUSINESS { business = "business", business_trial = "business_trial", cf_biz = "cf_biz", cf_biz_emp = "cf_biz_emp", cf_biz_free = "cf_biz_free", cf_biz_galileo = "cf_biz_galileo", cf_biz_plus = "cf_biz_plus", partners_biz = "partners_biz" } /** * Enum includes the Cloudflare zone plan ids for the "Enterprise" service * tier. * * Each entry is `typeof PlanId` or (lowercase) `typeof CfPlanId`. */ declare enum ENTERPRISE { cf_ent = "cf_ent", cf_ent_app_sec_adv = "cf_ent_app_sec_adv", cf_ent_app_sec_core = "cf_ent_app_sec_core", cf_ent_trial = "cf_ent_trial", enterprise = "enterprise", enterprise_trial = "enterprise_trial", ibm_ent = "ibm_ent", partners_ent = "partners_ent", sfcc_ent = "sfcc_ent" } type PlanIdOrSubscription = RatePlanId | Subscription | null | undefined; export declare const ServicesPlan: { FREE: typeof FREE; LITE: typeof LITE; PRO: typeof PRO; PRO_PLUS: typeof PRO_PLUS; BUSINESS: typeof BUSINESS; ENTERPRISE: typeof ENTERPRISE; /** * Returns true if the given Cloudflare zone plan id or subscription is for * the "Free" service tier. * @param plan a `Subscription` object, or `RatePlanId` */ isFree: (plan: PlanIdOrSubscription) => boolean; /** * Returns true if the given Cloudflare zone plan id or subscription is for * the "Lite" service tier. * @param plan a `Subscription` object, or `RatePlanId` */ isLite: (plan: PlanIdOrSubscription) => boolean; /** * Returns true if the given Cloudflare zone plan id or subscription is for * the "Pro" service tier. * @param plan a `Subscription` object, or `RatePlanId` */ isPro: (plan: PlanIdOrSubscription) => boolean; /** * Returns true if the given Cloudflare zone plan id or subscription is for * the "Pro Plus" service tier. * @param plan a `Subscription` object, or `RatePlanId` */ isProPlus: (plan: PlanIdOrSubscription) => boolean; /** * Returns true if the given Cloudflare zone plan id or subscription is for * the "Business" service tier. * @param plan a `Subscription` object, or `RatePlanId` */ isBusiness: (plan: PlanIdOrSubscription) => boolean; /** * Returns true if the given Cloudflare zone plan id or subscription is for * the "Enterprise" service tier. * @param plan a `Subscription` object, or `RatePlanId` */ isEnterprise: (plan: PlanIdOrSubscription) => boolean; }; export {};