cloudflare
Version:
The official TypeScript library for the Cloudflare API
35 lines • 1.17 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 BaseBulk = /* @__PURE__ */ (() => {
class BaseBulk extends APIResource {
/**
* Creates multiple subscriptions for an account in a single request.
*
* @example
* ```ts
* const bulks =
* await client.accounts.subscriptions.bulk.create({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
create(params, options) {
const { account_id, idemp_key, ...body } = params;
return this._client.post(path `/accounts/${account_id}/bulk/subscriptions`, {
query: { idemp_key },
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseBulk._key = Object.freeze([
'accounts',
'subscriptions',
'bulk',
]);
return BaseBulk;
})();
export class Bulk extends BaseBulk {
}
//# sourceMappingURL=bulk.mjs.map