cloudflare
Version:
The official TypeScript library for the Cloudflare API
54 lines • 2.04 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 BaseAccounts = /* @__PURE__ */ (() => {
class BaseAccounts extends APIResource {
/**
* Add an account as a member of a particular address map.
*
* @example
* ```ts
* const account =
* await client.addressing.addressMaps.accounts.update(
* '258def64c72dae45f3e4c8516e2111f2',
* {
* account_id: '258def64c72dae45f3e4c8516e2111f2',
* address_map_id: '055817b111884e0227e1be16a0be6ee0',
* },
* );
* ```
*/
update(memberAccountID, params, options) {
const { account_id, address_map_id } = params;
return this._client.put(path `/accounts/${account_id}/addressing/address_maps/${address_map_id}/accounts/${memberAccountID}`, options);
}
/**
* Remove an account as a member of a particular address map.
*
* @example
* ```ts
* const account =
* await client.addressing.addressMaps.accounts.delete(
* '258def64c72dae45f3e4c8516e2111f2',
* {
* account_id: '258def64c72dae45f3e4c8516e2111f2',
* address_map_id: '055817b111884e0227e1be16a0be6ee0',
* },
* );
* ```
*/
delete(memberAccountID, params, options) {
const { account_id, address_map_id } = params;
return this._client.delete(path `/accounts/${account_id}/addressing/address_maps/${address_map_id}/accounts/${memberAccountID}`, options);
}
}
BaseAccounts._key = Object.freeze([
'addressing',
'addressMaps',
'accounts',
]);
return BaseAccounts;
})();
export class Accounts extends BaseAccounts {
}
//# sourceMappingURL=accounts.mjs.map