cloudflare
Version:
The official TypeScript library for the Cloudflare API
39 lines • 1.47 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../resource.mjs";
export class Queries 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(`/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 },
});
}
}
//# sourceMappingURL=queries.mjs.map