UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

50 lines • 2 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import { buildHeaders } from "../../internal/headers.mjs"; import { path } from "../../internal/utils/path.mjs"; export var BaseQueries = /* @__PURE__ */ (() => { class BaseQueries extends 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(path `/accounts/${account_id}/brand-protection/queries`, { query: { id, scan: query_scan, tag: query_tag }, body, ...options, headers: buildHeaders([{ 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(path `/accounts/${account_id}/brand-protection/queries`, { query: { id, scan, tag }, ...options, headers: buildHeaders([{ 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(path `/accounts/${account_id}/brand-protection/queries/bulk`, { body, ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), }); } } BaseQueries._key = Object.freeze([ 'brandProtection', 'queries', ]); return BaseQueries; })(); export class Queries extends BaseQueries { } //# sourceMappingURL=queries.mjs.map