UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

43 lines 1.6 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Queries = void 0; const resource_1 = require("../../resource.js"); class Queries extends resource_1.APIResource { /** * Return a success message after creating new saved string queries */ create(params, options) { const { account_id, id, query_scan, query_tag, ...body } = params; return this._client.post(`/accounts/${account_id}/brand-protection/queries`, { query: { id, scan: query_scan, tag: query_tag }, body, ...options, headers: { Accept: '*/*', ...options?.headers }, }); } /** * Return a success message after deleting saved string queries by ID */ delete(params, options) { const { account_id, id, scan, tag } = params; return this._client.delete(`/accounts/${account_id}/brand-protection/queries`, { query: { id, scan, tag }, ...options, headers: { Accept: '*/*', ...options?.headers }, }); } /** * Return a success message after creating new saved string queries in bulk */ bulk(params, options) { const { account_id, ...body } = params; return this._client.post(`/accounts/${account_id}/brand-protection/queries/bulk`, { body, ...options, headers: { Accept: '*/*', ...options?.headers }, }); } } exports.Queries = Queries; //# sourceMappingURL=queries.js.map