UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

31 lines (25 loc) 841 B
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import * as Core from "../../../core"; import { APIResource } from "../../../resource"; import * as ValueAPI from "./value"; export class ValueResource extends APIResource { /** * Roll the token secret. */ update(tokenId: unknown, body: ValueUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Value> { return ( this._client.put(`/user/tokens/${tokenId}/value`, { body, ...options }) as Core.APIPromise<{ result: Value; }> )._thenUnwrap((obj) => obj.result); } } /** * The token value. */ export type Value = string; export type ValueUpdateParams = unknown; export namespace ValueResource { export import Value = ValueAPI.Value; export import ValueUpdateParams = ValueAPI.ValueUpdateParams; }