cloudflare
Version:
The official TypeScript library for the Cloudflare API
47 lines • 1.93 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../../../core/resource.mjs";
import { path } from "../../../../../internal/utils/path.mjs";
export var BaseOrder = /* @__PURE__ */ (() => {
class BaseOrder extends APIResource {
/**
* Updates the order of sensitivity levels in a group.
*
* @example
* ```ts
* const order =
* await client.zeroTrust.dlp.sensitivityGroups.levels.order.update(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* {
* account_id: 'account_id',
* level_ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],
* },
* );
* ```
*/
update(sensitivityGroupID, params, options) {
const { account_id, ...body } = params;
return this._client.put(path `/accounts/${account_id}/dlp/sensitivity_groups/${sensitivityGroupID}/level_order`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Gets the current order of sensitivity levels in a group.
*
* @example
* ```ts
* const order =
* await client.zeroTrust.dlp.sensitivityGroups.levels.order.get(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* { account_id: 'account_id' },
* );
* ```
*/
get(sensitivityGroupID, params, options) {
const { account_id } = params;
return this._client.get(path `/accounts/${account_id}/dlp/sensitivity_groups/${sensitivityGroupID}/level_order`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseOrder._key = Object.freeze(['zeroTrust', 'dlp', 'sensitivityGroups', 'levels', 'order']);
return BaseOrder;
})();
export class Order extends BaseOrder {
}
//# sourceMappingURL=order.mjs.map