/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { allowedDomainsCreate } from "../funcs/allowedDomainsCreate.js"; import { allowedDomainsDelete } from "../funcs/allowedDomainsDelete.js"; import { allowedDomainsGet } from "../funcs/allowedDomainsGet.js"; import { allowedDomainsList } from "../funcs/allowedDomainsList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class AllowedDomains extends ClientSDK { /** * List Allowed Domains * * @remarks * Lists allowed domains belonging to the account. * * ## Requires api token with one of the following permissions * ``` * Read all data * ``` */ async list( request?: operations.GetAllowedDomainsRequest | undefined, options?: RequestOptions, ): Promise> { return unwrapAsync(allowedDomainsList( this, request, options, )); } /** * Create Allowed Domain * * @remarks * Creates an allowed domain for the account. * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async create( request: operations.PostAllowedDomainsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(allowedDomainsCreate( this, request, options, )); } /** * Show Allowed Domain * * @remarks * Returns the details of an allowed domain. * * ## Requires api token with one of the following permissions * ``` * Read all data * ``` */ async get( request: operations.GetAllowedDomainsDomainRequest, options?: RequestOptions, ): Promise { return unwrapAsync(allowedDomainsGet( this, request, options, )); } /** * Delete Allowed Domain * * @remarks * Deletes an allowed domain from the account. * * ## Requires api token with one of the following permissions * ``` * Read, update & delete anything * ``` */ async delete( request: operations.DeleteAllowedDomainsDomainRequest, options?: RequestOptions, ): Promise { return unwrapAsync(allowedDomainsDelete( this, request, options, )); } }