auth0
Version:
Auth0 Node.js SDK for the Management API v2.
181 lines (180 loc) • 8.14 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";
export declare namespace CustomDomainsClient {
type Options = BaseClientOptions;
interface RequestOptions extends BaseRequestOptions {
}
}
export declare class CustomDomainsClient {
protected readonly _options: NormalizedClientOptionsWithAuth<CustomDomainsClient.Options>;
constructor(options: CustomDomainsClient.Options);
/**
* Retrieve details on <a href="https://auth0.com/docs/custom-domains">custom domains</a>.
*
* @param {Management.ListCustomDomainsRequestParameters} request
* @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.customDomains.list({
* q: "q",
* fields: "fields",
* include_fields: true,
* sort: "sort"
* })
*/
list(request?: Management.ListCustomDomainsRequestParameters, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.ListCustomDomainsResponseContent>;
private __list;
/**
* Create a new custom domain.
*
* Note: The custom domain will need to be verified before it will accept
* requests.
*
* Optional attributes that can be updated:
*
* - custom_client_ip_header
* - tls_policy
*
*
* TLS Policies:
*
* - recommended - for modern usage this includes TLS 1.2 only
*
* @param {Management.CreateCustomDomainRequestContent} request
* @param {CustomDomainsClient.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.customDomains.create({
* domain: "domain",
* type: "auth0_managed_certs"
* })
*/
create(request: Management.CreateCustomDomainRequestContent, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.CreateCustomDomainResponseContent>;
private __create;
/**
* Retrieve a custom domain configuration and status.
*
* @param {string} id - ID of the custom domain to retrieve.
* @param {CustomDomainsClient.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.customDomains.get("id")
*/
get(id: string, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.GetCustomDomainResponseContent>;
private __get;
/**
* Delete a custom domain and stop serving requests for it.
*
* @param {string} id - ID of the custom domain to delete.
* @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.customDomains.delete("id")
*/
delete(id: string, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<void>;
private __delete;
/**
* Update a custom domain.
*
* These are the attributes that can be updated:
*
* - custom_client_ip_header
* - tls_policy
*
* <h5>Updating CUSTOM_CLIENT_IP_HEADER for a custom domain</h5>To update the <code>custom_client_ip_header</code> for a domain, the body to
* send should be:
* <pre><code>{ "custom_client_ip_header": "cf-connecting-ip" }</code></pre>
*
* <h5>Updating TLS_POLICY for a custom domain</h5>To update the <code>tls_policy</code> for a domain, the body to send should be:
* <pre><code>{ "tls_policy": "recommended" }</code></pre>
*
*
* TLS Policies:
*
* - recommended - for modern usage this includes TLS 1.2 only
*
*
* Some considerations:
*
* - The TLS ciphers and protocols available in each TLS policy follow industry recommendations, and may be updated occasionally.
* - The <code>compatible</code> TLS policy is no longer supported.
*
* @param {string} id - The id of the custom domain to update
* @param {Management.UpdateCustomDomainRequestContent} request
* @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.TooManyRequestsError}
*
* @example
* await client.customDomains.update("id")
*/
update(id: string, request?: Management.UpdateCustomDomainRequestContent, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.UpdateCustomDomainResponseContent>;
private __update;
/**
* Run the test process on a custom domain.
*
* @param {string} id - ID of the custom domain to test.
* @param {CustomDomainsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Management.BadRequestError}
* @throws {@link Management.UnauthorizedError}
* @throws {@link Management.ForbiddenError}
* @throws {@link Management.NotFoundError}
* @throws {@link Management.ConflictError}
*
* @example
* await client.customDomains.test("id")
*/
test(id: string, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.TestCustomDomainResponseContent>;
private __test;
/**
* Run the verification process on a custom domain.
*
* Note: Check the <code>status</code> field to see its verification status. Once verification is complete, it may take up to 10 minutes before the custom domain can start accepting requests.
*
* For <code>self_managed_certs</code>, when the custom domain is verified for the first time, the response will also include the <code>cname_api_key</code> which you will need to configure your proxy. This key must be kept secret, and is used to validate the proxy requests.
*
* <a href="https://auth0.com/docs/custom-domains#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Auth0 Managed certificates.
* <a href="https://auth0.com/docs/custom-domains/self-managed-certificates#step-2-verify-ownership">Learn more</a> about verifying custom domains that use Self Managed certificates.
*
* @param {string} id - ID of the custom domain to verify.
* @param {CustomDomainsClient.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.customDomains.verify("id")
*/
verify(id: string, requestOptions?: CustomDomainsClient.RequestOptions): core.HttpResponsePromise<Management.VerifyCustomDomainResponseContent>;
private __verify;
}