cloudflare
Version:
The official TypeScript library for the Cloudflare API
50 lines • 1.69 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Seats = exports.BaseSeats = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../core/resource.js");
const pagination_1 = require("../../core/pagination.js");
const path_1 = require("../../internal/utils/path.js");
var BaseSeats = /* @__PURE__ */ (() => {
class BaseSeats extends resource_1.APIResource {
/**
* Removes a user from a Zero Trust seat when both `access_seat` and `gateway_seat`
* are set to false.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const seat of client.zeroTrust.seats.edit({
* account_id: '699d98642c564d2e855e9661899b7252',
* body: [
* {
* access_seat: false,
* gateway_seat: false,
* seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
* },
* ],
* })) {
* // ...
* }
* ```
*/
edit(params, options) {
const { account_id, body } = params;
return this._client.getAPIList((0, path_1.path) `/accounts/${account_id}/access/seats`, (pagination_1.SinglePage), {
body: body,
method: 'patch',
...options,
});
}
}
BaseSeats._key = Object.freeze([
'zeroTrust',
'seats',
]);
return BaseSeats;
})();
exports.BaseSeats = BaseSeats;
class Seats extends BaseSeats {
}
exports.Seats = Seats;
//# sourceMappingURL=seats.js.map