auth0
Version:
Auth0 Node.js SDK for the Management API v2.
153 lines (152 loc) • 7.81 kB
TypeScript
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
import * as core from "../../../../core/index.js";
import * as Management from "../../../index.js";
import { ClientGrantsClient } from "../resources/clientGrants/client/Client.js";
import { DiscoveryDomainsClient } from "../resources/discoveryDomains/client/Client.js";
import { EnabledConnectionsClient } from "../resources/enabledConnections/client/Client.js";
import { InvitationsClient } from "../resources/invitations/client/Client.js";
import { MembersClient } from "../resources/members/client/Client.js";
export declare namespace OrganizationsClient {
type Options = BaseClientOptions;
interface RequestOptions extends BaseRequestOptions {
}
}
export declare class OrganizationsClient {
protected readonly _options: NormalizedClientOptionsWithAuth<OrganizationsClient.Options>;
protected _clientGrants: ClientGrantsClient | undefined;
protected _discoveryDomains: DiscoveryDomainsClient | undefined;
protected _enabledConnections: EnabledConnectionsClient | undefined;
protected _invitations: InvitationsClient | undefined;
protected _members: MembersClient | undefined;
constructor(options: OrganizationsClient.Options);
get clientGrants(): ClientGrantsClient;
get discoveryDomains(): DiscoveryDomainsClient;
get enabledConnections(): EnabledConnectionsClient;
get invitations(): InvitationsClient;
get members(): MembersClient;
/**
* Retrieve detailed list of all Organizations available in your tenant. For more information, see Auth0 Organizations.
*
* This endpoint supports two types of pagination:
* <ul>
* <li>Offset pagination</li>
* <li>Checkpoint pagination</li>
* </ul>
*
* Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.
*
* <h2>Checkpoint Pagination</h2>
*
* To search by checkpoint, use the following parameters:
* <ul>
* <li><code>from</code>: Optional id from which to start selection.</li>
* <li><code>take</code>: The total number of entries to retrieve when using the <code>from</code> parameter. Defaults to 50.</li>
* </ul>
*
* <b>Note</b>: The first time you call this endpoint using checkpoint pagination, omit the <code>from</code> parameter. If there are more results, a <code>next</code> value is included in the response. You can use this for subsequent API calls. When <code>next</code> is no longer included in the response, no pages are remaining.
*
* @param {Management.ListOrganizationsRequestParameters} request
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.organizations.list({
* from: "from",
* take: 1,
* sort: "sort"
* })
*/
list(request?: Management.ListOrganizationsRequestParameters, requestOptions?: OrganizationsClient.RequestOptions): Promise<core.Page<Management.Organization, Management.ListOrganizationsPaginatedResponseContent>>;
/**
* Create a new Organization within your tenant. To learn more about Organization settings, behavior, and configuration options, review <a href="https://auth0.com/docs/manage-users/organizations/create-first-organization">Create Your First Organization</a>.
*
* @param {Management.CreateOrganizationRequestContent} request
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.ConflictError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.organizations.create({
* name: "name"
* })
*/
create(request: Management.CreateOrganizationRequestContent, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<Management.CreateOrganizationResponseContent>;
private __create;
/**
* Retrieve details about a single Organization specified by name.
*
* @param {string} name - name of the organization to retrieve.
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.organizations.getByName("name")
*/
getByName(name: string, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<Management.GetOrganizationByNameResponseContent>;
private __getByName;
/**
* Retrieve details about a single Organization specified by ID.
*
* @param {string} id - ID of the organization to retrieve.
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.organizations.get("id")
*/
get(id: string, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<Management.GetOrganizationResponseContent>;
private __get;
/**
* Remove an Organization from your tenant. This action cannot be undone.
*
* <b>Note</b>: Members are automatically disassociated from an Organization when it is deleted. However, this action does <b>not</b> delete these users from your tenant.
*
* @param {string} id - Organization identifier.
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.NotFoundError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.organizations.delete("id")
*/
delete(id: string, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<void>;
private __delete;
/**
* Update the details of a specific <a href="https://auth0.com/docs/manage-users/organizations/configure-organizations/create-organizations">Organization</a>, such as name and display name, branding options, and metadata.
*
* @param {string} id - ID of the organization to update.
* @param {Management.UpdateOrganizationRequestContent} request
* @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.organizations.update("id")
*/
update(id: string, request?: Management.UpdateOrganizationRequestContent, requestOptions?: OrganizationsClient.RequestOptions): core.HttpResponsePromise<Management.UpdateOrganizationResponseContent>;
private __update;
}