cloudflare
Version:
The official TypeScript library for the Cloudflare API
41 lines • 1.49 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Actions = exports.BaseActions = 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 BaseActions = /* @__PURE__ */ (() => {
class BaseActions extends resource_1.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((0, path_1.path) `/accounts/${account_id}/subscriptions/${subscriptionIdentifier}/action/append`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseActions._key = Object.freeze([
'accounts',
'subscriptions',
'actions',
]);
return BaseActions;
})();
exports.BaseActions = BaseActions;
class Actions extends BaseActions {
}
exports.Actions = Actions;
//# sourceMappingURL=actions.js.map