cloudflare
Version:
The official TypeScript library for the Cloudflare API
34 lines • 1.52 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { buildHeaders } from "../../internal/headers.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseOrganizationProfileResource = /* @__PURE__ */ (() => {
class BaseOrganizationProfileResource extends APIResource {
/**
* Modify organization profile. (Currently in Public Beta - see
* https://developers.cloudflare.com/fundamentals/organizations/)
*/
update(organizationID, body, options) {
return this._client.put(path `/organizations/${organizationID}/profile`, {
body,
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
});
}
/**
* Get an organizations profile if it exists. (Currently in Public Beta - see
* https://developers.cloudflare.com/fundamentals/organizations/)
*/
get(organizationID, options) {
return this._client.get(path `/organizations/${organizationID}/profile`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseOrganizationProfileResource._key = Object.freeze([
'organizations',
'organizationProfile',
]);
return BaseOrganizationProfileResource;
})();
export class OrganizationProfileResource extends BaseOrganizationProfileResource {
}
//# sourceMappingURL=organization-profile.mjs.map