UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

48 lines • 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Organizations = exports.BaseOrganizations = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../core/resource.js"); const pagination_1 = require("../../core/pagination.js"); const path_1 = require("../../internal/utils/path.js"); var BaseOrganizations = /* @__PURE__ */ (() => { class BaseOrganizations extends resource_1.APIResource { /** * Lists organizations the user is associated with. * * @deprecated */ list(query = {}, options) { return this._client.getAPIList('/user/organizations', (pagination_1.V4PagePaginationArray), { query, ...options, }); } /** * Removes association to an organization. * * @deprecated */ delete(organizationID, options) { return this._client.delete((0, path_1.path) `/user/organizations/${organizationID}`, options); } /** * Gets a specific organization the user is associated with. * * @deprecated */ get(organizationID, options) { return this._client.get((0, path_1.path) `/user/organizations/${organizationID}`, options)._thenUnwrap((obj) => obj.result); } } BaseOrganizations._key = Object.freeze([ 'user', 'organizations', ]); return BaseOrganizations; })(); exports.BaseOrganizations = BaseOrganizations; class Organizations extends BaseOrganizations { } exports.Organizations = Organizations; //# sourceMappingURL=organizations.js.map