UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

31 lines • 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Fallthrough = exports.BaseFallthrough = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); const path_1 = require("../../../internal/utils/path.js"); var BaseFallthrough = /* @__PURE__ */ (() => { class BaseFallthrough extends resource_1.APIResource { /** * Generates a WAF expression template that matches fallthrough traffic for the * supplied API hosts. This operation is deprecated and should not be used for new * integrations. * * @deprecated Use the cf.api_gateway.fallthrough_detected field in custom rule for a more customized logic check. */ create(params, options) { const { zone_id, ...body } = params; return this._client.post((0, path_1.path) `/zones/${zone_id}/api_gateway/expression-template/fallthrough`, { body, ...options, })._thenUnwrap((obj) => obj.result); } } BaseFallthrough._key = Object.freeze(['apiGateway', 'expressionTemplate', 'fallthrough']); return BaseFallthrough; })(); exports.BaseFallthrough = BaseFallthrough; class Fallthrough extends BaseFallthrough { } exports.Fallthrough = Fallthrough; //# sourceMappingURL=fallthrough.js.map