UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

24 lines 1.02 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Patterns = void 0; const resource_1 = require("cloudflare/resource"); class Patterns extends resource_1.APIResource { /** * Validates whether this pattern is a valid regular expression. Rejects it if the * regular expression is too complex or can match an unbounded-length string. Your * regex will be rejected if it uses the Kleene Star -- be sure to bound the * maximum number of characters that can be matched. */ validate(params, options) { const { account_id, ...body } = params; return this._client.post(`/accounts/${account_id}/dlp/patterns/validate`, { body, ...options, })._thenUnwrap((obj) => obj.result); } } exports.Patterns = Patterns; (function (Patterns) { })(Patterns = exports.Patterns || (exports.Patterns = {})); //# sourceMappingURL=patterns.js.map