cloudflare
Version:
The official TypeScript library for the Cloudflare API
43 lines • 1.49 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { V4PagePaginationArray } from "../../core/pagination.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseOrganizations = /* @__PURE__ */ (() => {
class BaseOrganizations extends APIResource {
/**
* Lists organizations the user is associated with.
*
* @deprecated
*/
list(query = {}, options) {
return this._client.getAPIList('/user/organizations', (V4PagePaginationArray), {
query,
...options,
});
}
/**
* Removes association to an organization.
*
* @deprecated
*/
delete(organizationID, options) {
return this._client.delete(path `/user/organizations/${organizationID}`, options);
}
/**
* Gets a specific organization the user is associated with.
*
* @deprecated
*/
get(organizationID, options) {
return this._client.get(path `/user/organizations/${organizationID}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseOrganizations._key = Object.freeze([
'user',
'organizations',
]);
return BaseOrganizations;
})();
export class Organizations extends BaseOrganizations {
}
//# sourceMappingURL=organizations.mjs.map