cloudflare
Version:
The official TypeScript library for the Cloudflare API
39 lines • 1.86 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrganizationProfileResource = exports.BaseOrganizationProfileResource = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../core/resource.js");
const headers_1 = require("../../internal/headers.js");
const path_1 = require("../../internal/utils/path.js");
var BaseOrganizationProfileResource = /* @__PURE__ */ (() => {
class BaseOrganizationProfileResource extends resource_1.APIResource {
/**
* Modify organization profile. (Currently in Public Beta - see
* https://developers.cloudflare.com/fundamentals/organizations/)
*/
update(organizationID, body, options) {
return this._client.put((0, path_1.path) `/organizations/${organizationID}/profile`, {
body,
...options,
headers: (0, headers_1.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((0, path_1.path) `/organizations/${organizationID}/profile`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseOrganizationProfileResource._key = Object.freeze([
'organizations',
'organizationProfile',
]);
return BaseOrganizationProfileResource;
})();
exports.BaseOrganizationProfileResource = BaseOrganizationProfileResource;
class OrganizationProfileResource extends BaseOrganizationProfileResource {
}
exports.OrganizationProfileResource = OrganizationProfileResource;
//# sourceMappingURL=organization-profile.js.map