UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

34 lines • 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Value = exports.BaseValue = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../core/resource.js"); const path_1 = require("../../../internal/utils/path.js"); var BaseValue = /* @__PURE__ */ (() => { class BaseValue extends resource_1.APIResource { /** * Roll the token secret. * * @example * ```ts * const tokenValue = await client.user.tokens.value.update( * 'ed17574386854bf78a67040be0a770b0', * ); * ``` */ update(tokenID, options) { return this._client.put((0, path_1.path) `/user/tokens/${tokenID}/value`, options)._thenUnwrap((obj) => obj.result); } } BaseValue._key = Object.freeze([ 'user', 'tokens', 'value', ]); return BaseValue; })(); exports.BaseValue = BaseValue; class Value extends BaseValue { } exports.Value = Value; //# sourceMappingURL=value.js.map