cloudflare
Version:
The official TypeScript library for the Cloudflare API
32 lines • 1.09 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 BaseValue = /* @__PURE__ */ (() => {
class BaseValue extends APIResource {
/**
* Roll the Account Owned API token secret.
*
* @example
* ```ts
* const tokenValue =
* await client.accounts.tokens.value.update(
* 'ed17574386854bf78a67040be0a770b0',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
update(tokenID, params, options) {
const { account_id } = params;
return this._client.put(path `/accounts/${account_id}/tokens/${tokenID}/value`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseValue._key = Object.freeze([
'accounts',
'tokens',
'value',
]);
return BaseValue;
})();
export class Value extends BaseValue {
}
//# sourceMappingURL=value.mjs.map