UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

36 lines • 1.29 kB
// 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 BaseActions = /* @__PURE__ */ (() => { class BaseActions extends APIResource { /** * Smartly applies the incoming subscription into the lifecycle of the * subscription. * * @example * ```ts * const subscription = * await client.accounts.subscriptions.actions.append( * '506e3185e9c882d175a2d0cb0093d9f2', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ append(subscriptionIdentifier, params, options) { const { account_id, ...body } = params; return this._client.post(path `/accounts/${account_id}/subscriptions/${subscriptionIdentifier}/action/append`, { body, ...options, })._thenUnwrap((obj) => obj.result); } } BaseActions._key = Object.freeze([ 'accounts', 'subscriptions', 'actions', ]); return BaseActions; })(); export class Actions extends BaseActions { } //# sourceMappingURL=actions.mjs.map