/* tslint:disable */ /* eslint-disable */ /** * WP Engine API * The API described in this document is subject to change. * * The version of the OpenAPI document: 1.6.7 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; import type { RequestArgs } from './base'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** * * @export * @interface Account */ export interface Account { /** * * @type {string} * @memberof Account */ 'id': string; /** * The account name * @type {string} * @memberof Account */ 'name': string; } /** * * @export * @interface AccountUser */ export interface AccountUser { /** * The user ID * @type {string} * @memberof AccountUser */ 'user_id': string; /** * The account ID * @type {string} * @memberof AccountUser */ 'account_id': string; /** * The first name of the user * @type {string} * @memberof AccountUser */ 'first_name': string; /** * The last name of the user * @type {string} * @memberof AccountUser */ 'last_name': string; /** * The email of the user * @type {string} * @memberof AccountUser */ 'email': string; /** * The phone number of the user * @type {string} * @memberof AccountUser */ 'phone': string | null; /** * Whether or not the user has accepted their invitation * @type {boolean} * @memberof AccountUser */ 'invite_accepted': boolean; /** * Whether or not the user has multi-factor authentication enabled * @type {boolean} * @memberof AccountUser */ 'mfa_enabled': boolean; /** * The user roles * @type {string} * @memberof AccountUser */ 'roles': string; /** * Whether or not this owner is the last on the account. Only shows with users that have owner level roles. * @type {boolean} * @memberof AccountUser */ 'last_owner'?: boolean | null; /** * An array of installs tied to a partial user. * @type {Array} * @memberof AccountUser */ 'installs'?: Array | null; } /** * * @export * @interface AccountUserInstallsInner */ export interface AccountUserInstallsInner { /** * The ID of the install * @type {string} * @memberof AccountUserInstallsInner */ 'id'?: string; /** * The name of the install * @type {string} * @memberof AccountUserInstallsInner */ 'name'?: string; } /** * * @export * @interface AuthenticationErrorResponse */ export interface AuthenticationErrorResponse { /** * A message regarding the error that occurred on the server * @type {string} * @memberof AuthenticationErrorResponse */ 'message': string; /** * (Optional) A URL where documentation regarding this specific error can be found * @type {string} * @memberof AuthenticationErrorResponse */ 'documentation_url'?: string; } /** * * @export * @interface Backup */ export interface Backup { /** * * @type {string} * @memberof Backup */ 'id'?: string; /** * * @type {string} * @memberof Backup */ 'status'?: string; } /** * * @export * @interface BadRequestErrorResponse */ export interface BadRequestErrorResponse { /** * A message regarding the error that occurred on the server * @type {string} * @memberof BadRequestErrorResponse */ 'message': string; /** * (Optional) A URL where documentation regarding this specific error can be found * @type {string} * @memberof BadRequestErrorResponse */ 'documentation_url'?: string; /** * An array of error objects describing specific errors that arose when servicing the request * @type {Array} * @memberof BadRequestErrorResponse */ 'errors'?: Array; } /** * * @export * @interface CheckStatus429Response */ export interface CheckStatus429Response { /** * A message regarding the error that occurred on the server * @type {string} * @memberof CheckStatus429Response */ 'message': string; } /** * * @export * @interface CreateAccountUser201Response */ export interface CreateAccountUser201Response { /** * * @type {string} * @memberof CreateAccountUser201Response */ 'message'?: string; /** * * @type {AccountUser} * @memberof CreateAccountUser201Response */ 'account_user'?: AccountUser; } /** * * @export * @interface CreateAccountUserRequest */ export interface CreateAccountUserRequest { /** * * @type {CreateAccountUserRequestUser} * @memberof CreateAccountUserRequest */ 'user': CreateAccountUserRequestUser; } /** * The user that will be created * @export * @interface CreateAccountUserRequestUser */ export interface CreateAccountUserRequestUser { /** * The account ID * @type {string} * @memberof CreateAccountUserRequestUser */ 'account_id': string; /** * * @type {string} * @memberof CreateAccountUserRequestUser */ 'first_name': string; /** * * @type {string} * @memberof CreateAccountUserRequestUser */ 'last_name': string; /** * * @type {string} * @memberof CreateAccountUserRequestUser */ 'email': string; /** * choose from \'owner\', \'full,billing\', \'full\', \'partial,billing\', and \'partial\' * @type {string} * @memberof CreateAccountUserRequestUser */ 'roles': string; /** * * @type {Array} * @memberof CreateAccountUserRequestUser */ 'install_ids'?: Array; } /** * * @export * @interface CreateBackupRequest */ export interface CreateBackupRequest { /** * A description of this backup. * @type {string} * @memberof CreateBackupRequest */ 'description': string; /** * The email address(es) that will receive an email once the backup has completed. * @type {Array} * @memberof CreateBackupRequest */ 'notification_emails': Array; } /** * * @export * @interface CreateBulkDomainsRequest */ export interface CreateBulkDomainsRequest { /** * * @type {Array} * @memberof CreateBulkDomainsRequest */ 'domains': Array; } /** * * @export * @interface CreateBulkDomainsRequestDomainsInner */ export interface CreateBulkDomainsRequestDomainsInner { /** * * @type {string} * @memberof CreateBulkDomainsRequestDomainsInner */ 'name': string; /** * * @type {string} * @memberof CreateBulkDomainsRequestDomainsInner */ 'redirect_to'?: string; } /** * * @export * @interface CreateDomainRequest */ export interface CreateDomainRequest { /** * * @type {string} * @memberof CreateDomainRequest */ 'name': string; /** * * @type {boolean} * @memberof CreateDomainRequest */ 'primary'?: boolean; /** * * @type {string} * @memberof CreateDomainRequest */ 'redirect_to'?: string; } /** * * @export * @interface CreateInstallRequest */ export interface CreateInstallRequest { /** * The name of the install * @type {string} * @memberof CreateInstallRequest */ 'name': string; /** * The ID of the account that the install will belong to * @type {string} * @memberof CreateInstallRequest */ 'account_id': string; /** * The ID of the site that the install will belong to * @type {string} * @memberof CreateInstallRequest */ 'site_id'?: string | null; /** * The site environment that the install will fill * @type {string} * @memberof CreateInstallRequest */ 'environment'?: CreateInstallRequestEnvironmentEnum | null; } export const CreateInstallRequestEnvironmentEnum = { Production: 'production', Staging: 'staging', Development: 'development' } as const; export type CreateInstallRequestEnvironmentEnum = typeof CreateInstallRequestEnvironmentEnum[keyof typeof CreateInstallRequestEnvironmentEnum]; /** * * @export * @interface CreateSiteRequest */ export interface CreateSiteRequest { /** * * @type {string} * @memberof CreateSiteRequest */ 'name': string; /** * The account ID * @type {string} * @memberof CreateSiteRequest */ 'account_id': string; } /** * * @export * @interface CreateSshKeyRequest */ export interface CreateSshKeyRequest { /** * * @type {string} * @memberof CreateSshKeyRequest */ 'public_key': string; } /** * * @export * @interface Domain */ export interface Domain { /** * * @type {string} * @memberof Domain */ 'name': string; /** * * @type {boolean} * @memberof Domain */ 'duplicate': boolean; /** * * @type {boolean} * @memberof Domain */ 'primary': boolean; /** * * @type {string} * @memberof Domain */ 'id': string; /** * * @type {Array} * @memberof Domain */ 'redirects_to'?: Array; } /** * * @export * @interface DomainOrRedirect */ export interface DomainOrRedirect { /** * * @type {string} * @memberof DomainOrRedirect */ 'id': string; /** * * @type {string} * @memberof DomainOrRedirect */ 'name': string; /** * * @type {boolean} * @memberof DomainOrRedirect */ 'duplicate': boolean; /** * * @type {boolean} * @memberof DomainOrRedirect */ 'primary': boolean; /** * * @type {DomainRedirectsToInner} * @memberof DomainOrRedirect */ 'redirects_to'?: DomainRedirectsToInner; } /** * * @export * @interface DomainRedirectsToInner */ export interface DomainRedirectsToInner { /** * * @type {string} * @memberof DomainRedirectsToInner */ 'id'?: string; /** * * @type {string} * @memberof DomainRedirectsToInner */ 'name'?: string; } /** * * @export * @interface ForbiddenErrorResponse */ export interface ForbiddenErrorResponse { /** * A message regarding the error that occurred on the server * @type {string} * @memberof ForbiddenErrorResponse */ 'message': string; /** * (Optional) A URL where documentation regarding this specific error can be found * @type {string} * @memberof ForbiddenErrorResponse */ 'documentation_url'?: string; } /** * * @export * @interface Installation */ export interface Installation { /** * * @type {string} * @memberof Installation */ 'id': string; /** * * @type {string} * @memberof Installation */ 'name': string; /** * * @type {InstallationAccount} * @memberof Installation */ 'account': InstallationAccount; /** * The PHP version used to run WordPress (read-only) * @type {string} * @memberof Installation */ 'php_version': string | null; /** * * @type {string} * @memberof Installation */ 'status'?: InstallationStatusEnum; /** * * @type {InstallationSite} * @memberof Installation */ 'site'?: InstallationSite | null; /** * Returns the CNAME of the install * @type {string} * @memberof Installation */ 'cname'?: string; /** * A list of stable IPs bound to the install. This will only apply to some premium/enterprise plans * @type {Array} * @memberof Installation */ 'stable_ips'?: Array | null; /** * * @type {string} * @memberof Installation */ 'environment'?: InstallationEnvironmentEnum | null; /** * The primary domain for the install. * @type {string} * @memberof Installation */ 'primary_domain'?: string | null; /** * * @type {boolean} * @memberof Installation */ 'is_multisite'?: boolean | null; } export const InstallationStatusEnum = { Active: 'active', Pending: 'pending' } as const; export type InstallationStatusEnum = typeof InstallationStatusEnum[keyof typeof InstallationStatusEnum]; export const InstallationEnvironmentEnum = { Production: 'production', Staging: 'staging', Development: 'development' } as const; export type InstallationEnvironmentEnum = typeof InstallationEnvironmentEnum[keyof typeof InstallationEnvironmentEnum]; /** * * @export * @interface InstallationAccount */ export interface InstallationAccount { /** * The account ID * @type {string} * @memberof InstallationAccount */ 'id'?: string; } /** * * @export * @interface InstallationSite */ export interface InstallationSite { /** * * @type {string} * @memberof InstallationSite */ 'id'?: string; } /** * * @export * @interface InternalServerErrorResponse */ export interface InternalServerErrorResponse { /** * A message regarding the error that occurred on the server * @type {string} * @memberof InternalServerErrorResponse */ 'message': string; } /** * * @export * @interface ListAccountUsers200Response */ export interface ListAccountUsers200Response { /** * * @type {Array} * @memberof ListAccountUsers200Response */ 'results'?: Array; } /** * * @export * @interface ListAccounts200Response */ export interface ListAccounts200Response { /** * Path to the previous page of results * @type {string} * @memberof ListAccounts200Response */ 'previous'?: string | null; /** * Path to the next page of results * @type {string} * @memberof ListAccounts200Response */ 'next'?: string | null; /** * The total number of results * @type {number} * @memberof ListAccounts200Response */ 'count'?: number; /** * * @type {Array} * @memberof ListAccounts200Response */ 'results'?: Array; } /** * * @export * @interface ListDomains200Response */ export interface ListDomains200Response { /** * Path to the previous page of results * @type {string} * @memberof ListDomains200Response */ 'previous'?: string | null; /** * Path to the next page of results * @type {string} * @memberof ListDomains200Response */ 'next'?: string | null; /** * The total number of results * @type {number} * @memberof ListDomains200Response */ 'count'?: number; /** * * @type {Array} * @memberof ListDomains200Response */ 'results'?: Array; } /** * * @export * @interface ListInstalls200Response */ export interface ListInstalls200Response { /** * Path to the previous page of results * @type {string} * @memberof ListInstalls200Response */ 'previous'?: string | null; /** * Path to the next page of results * @type {string} * @memberof ListInstalls200Response */ 'next'?: string | null; /** * The total number of results * @type {number} * @memberof ListInstalls200Response */ 'count'?: number; /** * * @type {Array} * @memberof ListInstalls200Response */ 'results'?: Array; } /** * * @export * @interface ListSites200Response */ export interface ListSites200Response { /** * Path to the previous page of results * @type {string} * @memberof ListSites200Response */ 'previous'?: string | null; /** * Path to the next page of results * @type {string} * @memberof ListSites200Response */ 'next'?: string | null; /** * The total number of results * @type {number} * @memberof ListSites200Response */ 'count'?: number; /** * * @type {Array} * @memberof ListSites200Response */ 'results'?: Array; } /** * * @export * @interface ListSshKeys200Response */ export interface ListSshKeys200Response { /** * Path to the previous page of results * @type {string} * @memberof ListSshKeys200Response */ 'previous'?: string | null; /** * Path to the next page of results * @type {string} * @memberof ListSshKeys200Response */ 'next'?: string | null; /** * The total number of results * @type {number} * @memberof ListSshKeys200Response */ 'count'?: number; /** * * @type {Array} * @memberof ListSshKeys200Response */ 'results'?: Array; } /** * * @export * @interface NotFoundErrorResponse */ export interface NotFoundErrorResponse { /** * A message regarding the error that occurred on the server * @type {string} * @memberof NotFoundErrorResponse */ 'message': string; /** * (Optional) A URL where documentation regarding this specific error can be found * @type {string} * @memberof NotFoundErrorResponse */ 'documentation_url'?: string; } /** * * @export * @interface PurgeCache429Response */ export interface PurgeCache429Response { /** * A message regarding the error that occurred on the server * @type {string} * @memberof PurgeCache429Response */ 'message': string; } /** * * @export * @interface PurgeCacheRequest */ export interface PurgeCacheRequest { /** * * @type {string} * @memberof PurgeCacheRequest */ 'type': PurgeCacheRequestTypeEnum; } export const PurgeCacheRequestTypeEnum = { Object: 'object', Page: 'page', Cdn: 'cdn' } as const; export type PurgeCacheRequestTypeEnum = typeof PurgeCacheRequestTypeEnum[keyof typeof PurgeCacheRequestTypeEnum]; /** * * @export * @interface ResourceError */ export interface ResourceError { /** * The name of the resource that was being processed when the error occurred * @type {string} * @memberof ResourceError */ 'resource': string; /** * (Optional) The specific field associated with the error * @type {string} * @memberof ResourceError */ 'field': string; /** * (Optional) A type associated with the error. `invalid_value`, `access_error`, `value_unavailable` * @type {string} * @memberof ResourceError */ 'type': string; /** * (Optional) A machine code relating to the error that occurred with the field and resource * @type {string} * @memberof ResourceError */ 'code': string; /** * (Optional) A human-readable message relating to the error that occurred with the field and resource * @type {string} * @memberof ResourceError */ 'message': string; } /** * * @export * @interface Site */ export interface Site { /** * * @type {string} * @memberof Site */ 'id': string; /** * * @type {string} * @memberof Site */ 'name': string; /** * * @type {InstallationAccount} * @memberof Site */ 'account': InstallationAccount; /** * * @type {string} * @memberof Site */ 'group_name'?: string | null; /** * * @type {Array} * @memberof Site */ 'tags'?: Array; /** * * @type {Array} * @memberof Site */ 'installs'?: Array; } /** * * @export * @interface SiteInstallsInner */ export interface SiteInstallsInner { /** * * @type {string} * @memberof SiteInstallsInner */ 'id'?: string; /** * * @type {string} * @memberof SiteInstallsInner */ 'name'?: string; /** * * @type {string} * @memberof SiteInstallsInner */ 'environment'?: SiteInstallsInnerEnvironmentEnum | null; /** * Returns the CNAME of the install * @type {string} * @memberof SiteInstallsInner */ 'cname'?: string; /** * The PHP version used to run WordPress * @type {string} * @memberof SiteInstallsInner */ 'php_version'?: string | null; /** * * @type {boolean} * @memberof SiteInstallsInner */ 'is_multisite'?: boolean | null; } export const SiteInstallsInnerEnvironmentEnum = { Production: 'production', Staging: 'staging', Development: 'development' } as const; export type SiteInstallsInnerEnvironmentEnum = typeof SiteInstallsInnerEnvironmentEnum[keyof typeof SiteInstallsInnerEnvironmentEnum]; /** * * @export * @interface SshKey */ export interface SshKey { /** * * @type {string} * @memberof SshKey */ 'comment'?: string; /** * * @type {string} * @memberof SshKey */ 'created_at'?: string; /** * * @type {string} * @memberof SshKey */ 'fingerprint'?: string; /** * * @type {string} * @memberof SshKey */ 'uuid'?: string; } /** * * @export * @interface Status */ export interface Status { /** * * @type {boolean} * @memberof Status */ 'success'?: boolean; /** * The time when the status was requested in rfc3339 format * @type {string} * @memberof Status */ 'created_on'?: string; } /** * * @export * @interface UpdateAccountUserRequest */ export interface UpdateAccountUserRequest { /** * choose from \'owner\', \'full,billing\', \'full\', \'partial,billing\', and \'partial\' * @type {string} * @memberof UpdateAccountUserRequest */ 'roles': string; /** * * @type {Array} * @memberof UpdateAccountUserRequest */ 'install_ids'?: Array; } /** * * @export * @interface UpdateDomainRequest */ export interface UpdateDomainRequest { /** * * @type {boolean} * @memberof UpdateDomainRequest */ 'primary'?: boolean; /** * * @type {string} * @memberof UpdateDomainRequest */ 'redirect_to'?: string; } /** * * @export * @interface UpdateInstallRequest */ export interface UpdateInstallRequest { /** * The site ID * @type {string} * @memberof UpdateInstallRequest */ 'site_id'?: string; /** * * @type {string} * @memberof UpdateInstallRequest */ 'environment'?: UpdateInstallRequestEnvironmentEnum | null; } export const UpdateInstallRequestEnvironmentEnum = { Production: 'production', Staging: 'staging', Development: 'development' } as const; export type UpdateInstallRequestEnvironmentEnum = typeof UpdateInstallRequestEnvironmentEnum[keyof typeof UpdateInstallRequestEnvironmentEnum]; /** * * @export * @interface UpdateSiteRequest */ export interface UpdateSiteRequest { /** * The new site name * @type {string} * @memberof UpdateSiteRequest */ 'name'?: string; } /** * * @export * @interface User */ export interface User { /** * * @type {string} * @memberof User */ 'id': string; /** * * @type {string} * @memberof User */ 'first_name'?: string; /** * * @type {string} * @memberof User */ 'last_name'?: string; /** * * @type {string} * @memberof User */ 'email': string; /** * * @type {string} * @memberof User */ 'phone_number'?: string | null; } /** * AccountApi - axios parameter creator * @export */ export const AccountApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Returns a single Account * @summary Get an account by ID * @param {string} accountId ID of account * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAccount: async (accountId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'accountId' is not null or undefined assertParamExists('getAccount', 'accountId', accountId) const localVarPath = `/accounts/{account_id}` .replace(`{${"account_id"}}`, encodeURIComponent(String(accountId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * # Description Use this to list your WP Engine accounts. * @summary List your WP Engine accounts * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ listAccounts: async (authorization?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/accounts`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * AccountApi - functional programming interface * @export */ export const AccountApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AccountApiAxiosParamCreator(configuration) return { /** * Returns a single Account * @summary Get an account by ID * @param {string} accountId ID of account * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAccount(accountId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAccount(accountId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountApi.getAccount']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * # Description Use this to list your WP Engine accounts. * @summary List your WP Engine accounts * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listAccounts(authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listAccounts(authorization, limit, offset, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountApi.listAccounts']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * AccountApi - factory interface * @export */ export const AccountApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AccountApiFp(configuration) return { /** * Returns a single Account * @summary Get an account by ID * @param {string} accountId ID of account * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAccount(accountId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getAccount(accountId, authorization, options).then((request) => request(axios, basePath)); }, /** * # Description Use this to list your WP Engine accounts. * @summary List your WP Engine accounts * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ listAccounts(authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listAccounts(authorization, limit, offset, options).then((request) => request(axios, basePath)); }, }; }; /** * AccountApi - object-oriented interface * @export * @class AccountApi * @extends {BaseAPI} */ export class AccountApi extends BaseAPI { /** * Returns a single Account * @summary Get an account by ID * @param {string} accountId ID of account * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountApi */ public getAccount(accountId: string, authorization?: string, options?: RawAxiosRequestConfig) { return AccountApiFp(this.configuration).getAccount(accountId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * # Description Use this to list your WP Engine accounts. * @summary List your WP Engine accounts * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountApi */ public listAccounts(authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { return AccountApiFp(this.configuration).listAccounts(authorization, limit, offset, options).then((request) => request(this.axios, this.basePath)); } } /** * AccountUserApi - axios parameter creator * @export */ export const AccountUserApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Create a new account user * @param {string} accountId ID of account * @param {CreateAccountUserRequest} body ##### Properties * user - **required** - The user that will be created * account_id - **required** - The ID of the account that the account_user will belong to * first_name - **required** - The first name of the user * last_name - **required** - The last name of the user * email - **required** - The email of the user * roles -- **required** - The roles the user is allowed. The following roles are valid * owner * full * full,billing * partial * partial,billing * install_ids - **optional** - Used with partial role selection. The ids of the installs the user will have access to. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createAccountUser: async (accountId: string, body: CreateAccountUserRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'accountId' is not null or undefined assertParamExists('createAccountUser', 'accountId', accountId) // verify required parameter 'body' is not null or undefined assertParamExists('createAccountUser', 'body', body) const localVarPath = `/accounts/{account_id}/account_users` .replace(`{${"account_id"}}`, encodeURIComponent(String(accountId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will remove the association this user has to this account. This delete is permanent and there is no confirmation prompt. * @summary Delete an account user * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteAccountUser: async (accountId: string, userId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'accountId' is not null or undefined assertParamExists('deleteAccountUser', 'accountId', accountId) // verify required parameter 'userId' is not null or undefined assertParamExists('deleteAccountUser', 'userId', userId) const localVarPath = `/accounts/{account_id}/account_users/{user_id}` .replace(`{${"account_id"}}`, encodeURIComponent(String(accountId))) .replace(`{${"user_id"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a single account user * @summary Get an account user by ID * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAccountUser: async (accountId: string, userId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'accountId' is not null or undefined assertParamExists('getAccountUser', 'accountId', accountId) // verify required parameter 'userId' is not null or undefined assertParamExists('getAccountUser', 'userId', userId) const localVarPath = `/accounts/{account_id}/account_users/{user_id}` .replace(`{${"account_id"}}`, encodeURIComponent(String(accountId))) .replace(`{${"user_id"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary List your account users * @param {string} accountId ID of account * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listAccountUsers: async (accountId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'accountId' is not null or undefined assertParamExists('listAccountUsers', 'accountId', accountId) const localVarPath = `/accounts/{account_id}/account_users` .replace(`{${"account_id"}}`, encodeURIComponent(String(accountId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update an account user * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {UpdateAccountUserRequest} body ##### Properties * roles -- **required** - The roles the user is allowed. The following roles are valid * owner * full * full,billing * partial * partial,billing * install_ids - **optional** - Used with partial role selection. The ids of the installs the user will have access to. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateAccountUser: async (accountId: string, userId: string, body: UpdateAccountUserRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'accountId' is not null or undefined assertParamExists('updateAccountUser', 'accountId', accountId) // verify required parameter 'userId' is not null or undefined assertParamExists('updateAccountUser', 'userId', userId) // verify required parameter 'body' is not null or undefined assertParamExists('updateAccountUser', 'body', body) const localVarPath = `/accounts/{account_id}/account_users/{user_id}` .replace(`{${"account_id"}}`, encodeURIComponent(String(accountId))) .replace(`{${"user_id"}}`, encodeURIComponent(String(userId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * AccountUserApi - functional programming interface * @export */ export const AccountUserApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = AccountUserApiAxiosParamCreator(configuration) return { /** * * @summary Create a new account user * @param {string} accountId ID of account * @param {CreateAccountUserRequest} body ##### Properties * user - **required** - The user that will be created * account_id - **required** - The ID of the account that the account_user will belong to * first_name - **required** - The first name of the user * last_name - **required** - The last name of the user * email - **required** - The email of the user * roles -- **required** - The roles the user is allowed. The following roles are valid * owner * full * full,billing * partial * partial,billing * install_ids - **optional** - Used with partial role selection. The ids of the installs the user will have access to. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createAccountUser(accountId: string, body: CreateAccountUserRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createAccountUser(accountId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountUserApi.createAccountUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This will remove the association this user has to this account. This delete is permanent and there is no confirmation prompt. * @summary Delete an account user * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteAccountUser(accountId: string, userId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccountUser(accountId, userId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountUserApi.deleteAccountUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a single account user * @summary Get an account user by ID * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getAccountUser(accountId: string, userId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountUser(accountId, userId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountUserApi.getAccountUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary List your account users * @param {string} accountId ID of account * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listAccountUsers(accountId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountUsers(accountId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountUserApi.listAccountUsers']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update an account user * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {UpdateAccountUserRequest} body ##### Properties * roles -- **required** - The roles the user is allowed. The following roles are valid * owner * full * full,billing * partial * partial,billing * install_ids - **optional** - Used with partial role selection. The ids of the installs the user will have access to. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateAccountUser(accountId: string, userId: string, body: UpdateAccountUserRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccountUser(accountId, userId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['AccountUserApi.updateAccountUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * AccountUserApi - factory interface * @export */ export const AccountUserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = AccountUserApiFp(configuration) return { /** * * @summary Create a new account user * @param {string} accountId ID of account * @param {CreateAccountUserRequest} body ##### Properties * user - **required** - The user that will be created * account_id - **required** - The ID of the account that the account_user will belong to * first_name - **required** - The first name of the user * last_name - **required** - The last name of the user * email - **required** - The email of the user * roles -- **required** - The roles the user is allowed. The following roles are valid * owner * full * full,billing * partial * partial,billing * install_ids - **optional** - Used with partial role selection. The ids of the installs the user will have access to. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createAccountUser(accountId: string, body: CreateAccountUserRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createAccountUser(accountId, body, authorization, options).then((request) => request(axios, basePath)); }, /** * This will remove the association this user has to this account. This delete is permanent and there is no confirmation prompt. * @summary Delete an account user * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteAccountUser(accountId: string, userId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteAccountUser(accountId, userId, authorization, options).then((request) => request(axios, basePath)); }, /** * Returns a single account user * @summary Get an account user by ID * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAccountUser(accountId: string, userId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getAccountUser(accountId, userId, authorization, options).then((request) => request(axios, basePath)); }, /** * * @summary List your account users * @param {string} accountId ID of account * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ listAccountUsers(accountId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listAccountUsers(accountId, authorization, options).then((request) => request(axios, basePath)); }, /** * * @summary Update an account user * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {UpdateAccountUserRequest} body ##### Properties * roles -- **required** - The roles the user is allowed. The following roles are valid * owner * full * full,billing * partial * partial,billing * install_ids - **optional** - Used with partial role selection. The ids of the installs the user will have access to. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateAccountUser(accountId: string, userId: string, body: UpdateAccountUserRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateAccountUser(accountId, userId, body, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * AccountUserApi - object-oriented interface * @export * @class AccountUserApi * @extends {BaseAPI} */ export class AccountUserApi extends BaseAPI { /** * * @summary Create a new account user * @param {string} accountId ID of account * @param {CreateAccountUserRequest} body ##### Properties * user - **required** - The user that will be created * account_id - **required** - The ID of the account that the account_user will belong to * first_name - **required** - The first name of the user * last_name - **required** - The last name of the user * email - **required** - The email of the user * roles -- **required** - The roles the user is allowed. The following roles are valid * owner * full * full,billing * partial * partial,billing * install_ids - **optional** - Used with partial role selection. The ids of the installs the user will have access to. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountUserApi */ public createAccountUser(accountId: string, body: CreateAccountUserRequest, authorization?: string, options?: RawAxiosRequestConfig) { return AccountUserApiFp(this.configuration).createAccountUser(accountId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * This will remove the association this user has to this account. This delete is permanent and there is no confirmation prompt. * @summary Delete an account user * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountUserApi */ public deleteAccountUser(accountId: string, userId: string, authorization?: string, options?: RawAxiosRequestConfig) { return AccountUserApiFp(this.configuration).deleteAccountUser(accountId, userId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a single account user * @summary Get an account user by ID * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountUserApi */ public getAccountUser(accountId: string, userId: string, authorization?: string, options?: RawAxiosRequestConfig) { return AccountUserApiFp(this.configuration).getAccountUser(accountId, userId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary List your account users * @param {string} accountId ID of account * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountUserApi */ public listAccountUsers(accountId: string, authorization?: string, options?: RawAxiosRequestConfig) { return AccountUserApiFp(this.configuration).listAccountUsers(accountId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Update an account user * @param {string} accountId ID of account * @param {string} userId ID of the user * @param {UpdateAccountUserRequest} body ##### Properties * roles -- **required** - The roles the user is allowed. The following roles are valid * owner * full * full,billing * partial * partial,billing * install_ids - **optional** - Used with partial role selection. The ids of the installs the user will have access to. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AccountUserApi */ public updateAccountUser(accountId: string, userId: string, body: UpdateAccountUserRequest, authorization?: string, options?: RawAxiosRequestConfig) { return AccountUserApiFp(this.configuration).updateAccountUser(accountId, userId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } } /** * BackupApi - axios parameter creator * @export */ export const BackupApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Kicks off a backup of a WordPress installation. * @summary Requests a new backup of a WordPress installation * @param {string} installId ID of install * @param {CreateBackupRequest} body ##### Properties * description - **required** - A description of this backup. * notification_emails - **required** - The email address(es) that will receive an email once the backup has completed. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBackup: async (installId: string, body: CreateBackupRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('createBackup', 'installId', installId) // verify required parameter 'body' is not null or undefined assertParamExists('createBackup', 'body', body) const localVarPath = `/installs/{install_id}/backups` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Retrieves the status of a backup of a WordPress installation. * @summary Retreives the status of a backup of a WordPress installation * @param {string} installId ID of install * @param {string} backupId ID of backup * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ showBackup: async (installId: string, backupId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('showBackup', 'installId', installId) // verify required parameter 'backupId' is not null or undefined assertParamExists('showBackup', 'backupId', backupId) const localVarPath = `/installs/{install_id}/backups/{backup_id}` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))) .replace(`{${"backup_id"}}`, encodeURIComponent(String(backupId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * BackupApi - functional programming interface * @export */ export const BackupApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = BackupApiAxiosParamCreator(configuration) return { /** * Kicks off a backup of a WordPress installation. * @summary Requests a new backup of a WordPress installation * @param {string} installId ID of install * @param {CreateBackupRequest} body ##### Properties * description - **required** - A description of this backup. * notification_emails - **required** - The email address(es) that will receive an email once the backup has completed. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createBackup(installId: string, body: CreateBackupRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createBackup(installId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.createBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Retrieves the status of a backup of a WordPress installation. * @summary Retreives the status of a backup of a WordPress installation * @param {string} installId ID of install * @param {string} backupId ID of backup * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async showBackup(installId: string, backupId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.showBackup(installId, backupId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['BackupApi.showBackup']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * BackupApi - factory interface * @export */ export const BackupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = BackupApiFp(configuration) return { /** * Kicks off a backup of a WordPress installation. * @summary Requests a new backup of a WordPress installation * @param {string} installId ID of install * @param {CreateBackupRequest} body ##### Properties * description - **required** - A description of this backup. * notification_emails - **required** - The email address(es) that will receive an email once the backup has completed. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBackup(installId: string, body: CreateBackupRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createBackup(installId, body, authorization, options).then((request) => request(axios, basePath)); }, /** * Retrieves the status of a backup of a WordPress installation. * @summary Retreives the status of a backup of a WordPress installation * @param {string} installId ID of install * @param {string} backupId ID of backup * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ showBackup(installId: string, backupId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.showBackup(installId, backupId, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * BackupApi - object-oriented interface * @export * @class BackupApi * @extends {BaseAPI} */ export class BackupApi extends BaseAPI { /** * Kicks off a backup of a WordPress installation. * @summary Requests a new backup of a WordPress installation * @param {string} installId ID of install * @param {CreateBackupRequest} body ##### Properties * description - **required** - A description of this backup. * notification_emails - **required** - The email address(es) that will receive an email once the backup has completed. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public createBackup(installId: string, body: CreateBackupRequest, authorization?: string, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).createBackup(installId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Retrieves the status of a backup of a WordPress installation. * @summary Retreives the status of a backup of a WordPress installation * @param {string} installId ID of install * @param {string} backupId ID of backup * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof BackupApi */ public showBackup(installId: string, backupId: string, authorization?: string, options?: RawAxiosRequestConfig) { return BackupApiFp(this.configuration).showBackup(installId, backupId, authorization, options).then((request) => request(this.axios, this.basePath)); } } /** * CacheApi - axios parameter creator * @export */ export const CacheApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This will purge the specified cache associated with the install * @summary Purge an install\'s cache * @param {string} installId ID of install * @param {PurgeCacheRequest} body ##### Properties * type - **required** - The type of cache to be purged * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ purgeCache: async (installId: string, body: PurgeCacheRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('purgeCache', 'installId', installId) // verify required parameter 'body' is not null or undefined assertParamExists('purgeCache', 'body', body) const localVarPath = `/installs/{install_id}/purge_cache` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CacheApi - functional programming interface * @export */ export const CacheApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CacheApiAxiosParamCreator(configuration) return { /** * This will purge the specified cache associated with the install * @summary Purge an install\'s cache * @param {string} installId ID of install * @param {PurgeCacheRequest} body ##### Properties * type - **required** - The type of cache to be purged * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async purgeCache(installId: string, body: PurgeCacheRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.purgeCache(installId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CacheApi.purgeCache']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * CacheApi - factory interface * @export */ export const CacheApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CacheApiFp(configuration) return { /** * This will purge the specified cache associated with the install * @summary Purge an install\'s cache * @param {string} installId ID of install * @param {PurgeCacheRequest} body ##### Properties * type - **required** - The type of cache to be purged * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ purgeCache(installId: string, body: PurgeCacheRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.purgeCache(installId, body, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * CacheApi - object-oriented interface * @export * @class CacheApi * @extends {BaseAPI} */ export class CacheApi extends BaseAPI { /** * This will purge the specified cache associated with the install * @summary Purge an install\'s cache * @param {string} installId ID of install * @param {PurgeCacheRequest} body ##### Properties * type - **required** - The type of cache to be purged * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CacheApi */ public purgeCache(installId: string, body: PurgeCacheRequest, authorization?: string, options?: RawAxiosRequestConfig) { return CacheApiFp(this.configuration).purgeCache(installId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } } /** * CdnApi - axios parameter creator * @export */ export const CdnApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Submits a request to check the status of the domain * @summary Check the status of a domain * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkStatus: async (installId: string, domainId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('checkStatus', 'installId', installId) // verify required parameter 'domainId' is not null or undefined assertParamExists('checkStatus', 'domainId', domainId) const localVarPath = `/installs/{install_id}/domains/{domain_id}/check_status` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))) .replace(`{${"domain_id"}}`, encodeURIComponent(String(domainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CdnApi - functional programming interface * @export */ export const CdnApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CdnApiAxiosParamCreator(configuration) return { /** * Submits a request to check the status of the domain * @summary Check the status of a domain * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async checkStatus(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.checkStatus(installId, domainId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['CdnApi.checkStatus']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * CdnApi - factory interface * @export */ export const CdnApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CdnApiFp(configuration) return { /** * Submits a request to check the status of the domain * @summary Check the status of a domain * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkStatus(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.checkStatus(installId, domainId, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * CdnApi - object-oriented interface * @export * @class CdnApi * @extends {BaseAPI} */ export class CdnApi extends BaseAPI { /** * Submits a request to check the status of the domain * @summary Check the status of a domain * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CdnApi */ public checkStatus(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig) { return CdnApiFp(this.configuration).checkStatus(installId, domainId, authorization, options).then((request) => request(this.axios, this.basePath)); } } /** * DomainApi - axios parameter creator * @export */ export const DomainApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Submits a request to check the status of the domain * @summary Check the status of a domain * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkStatus: async (installId: string, domainId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('checkStatus', 'installId', installId) // verify required parameter 'domainId' is not null or undefined assertParamExists('checkStatus', 'domainId', domainId) const localVarPath = `/installs/{install_id}/domains/{domain_id}/check_status` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))) .replace(`{${"domain_id"}}`, encodeURIComponent(String(domainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Adds multiple domains and redirects to a specific install * @summary Add multiple domains and redirects to an existing install * @param {string} installId ID of install * @param {CreateBulkDomainsRequest} body ##### Properties * domains - **required** - array of domains to be created, min size: 1, max size: 20 * items: * name - **required** - The name of the new domain (or redirect) * redirect_to - **optional** - Name of the domain to set redirect to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBulkDomains: async (installId: string, body: CreateBulkDomainsRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('createBulkDomains', 'installId', installId) // verify required parameter 'body' is not null or undefined assertParamExists('createBulkDomains', 'body', body) const localVarPath = `/installs/{install_id}/domains/bulk` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Adds a domain or redirect to a specific install and optionally sets it as the primary domain * @summary Add a new domain or redirect to an existing install * @param {string} installId ID of install * @param {CreateDomainRequest} body ##### Properties * name - **required** - The name of the new domain * primary - **optional** - Sets the domain as the primary domain on the install * redirect_to - **optional** - ID of a domain to create a redirect to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createDomain: async (installId: string, body: CreateDomainRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('createDomain', 'installId', installId) // verify required parameter 'body' is not null or undefined assertParamExists('createDomain', 'body', body) const localVarPath = `/installs/{install_id}/domains` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Delete specific domain for an install * @summary Delete a specific domain for an install * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteDomain: async (installId: string, domainId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('deleteDomain', 'installId', installId) // verify required parameter 'domainId' is not null or undefined assertParamExists('deleteDomain', 'domainId', domainId) const localVarPath = `/installs/{install_id}/domains/{domain_id}` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))) .replace(`{${"domain_id"}}`, encodeURIComponent(String(domainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns specific domain for an install * @summary Get a specific domain for an install * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getDomain: async (installId: string, domainId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('getDomain', 'installId', installId) // verify required parameter 'domainId' is not null or undefined assertParamExists('getDomain', 'domainId', domainId) const localVarPath = `/installs/{install_id}/domains/{domain_id}` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))) .replace(`{${"domain_id"}}`, encodeURIComponent(String(domainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns domains for a specific install * @summary Get the domains for an install by install id * @param {string} installId ID of install * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ listDomains: async (installId: string, authorization?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('listDomains', 'installId', installId) const localVarPath = `/installs/{install_id}/domains` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Sets a domain as the primary. Cannot set a duplicate, wildcard, or redirected domain as the primary. * @summary Set an existing domain as primary * @param {string} installId The install ID * @param {string} domainId ID of domain * @param {UpdateDomainRequest} body ##### Properties * primary - **optional** - Boolean value to make the domain primary on the given install * redirect_to - **optional** - The UUID of another Domain record, or \"nil\" to remove an existing redirect. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateDomain: async (installId: string, domainId: string, body: UpdateDomainRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('updateDomain', 'installId', installId) // verify required parameter 'domainId' is not null or undefined assertParamExists('updateDomain', 'domainId', domainId) // verify required parameter 'body' is not null or undefined assertParamExists('updateDomain', 'body', body) const localVarPath = `/installs/{install_id}/domains/{domain_id}` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))) .replace(`{${"domain_id"}}`, encodeURIComponent(String(domainId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * DomainApi - functional programming interface * @export */ export const DomainApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = DomainApiAxiosParamCreator(configuration) return { /** * Submits a request to check the status of the domain * @summary Check the status of a domain * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async checkStatus(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.checkStatus(installId, domainId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DomainApi.checkStatus']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Adds multiple domains and redirects to a specific install * @summary Add multiple domains and redirects to an existing install * @param {string} installId ID of install * @param {CreateBulkDomainsRequest} body ##### Properties * domains - **required** - array of domains to be created, min size: 1, max size: 20 * items: * name - **required** - The name of the new domain (or redirect) * redirect_to - **optional** - Name of the domain to set redirect to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createBulkDomains(installId: string, body: CreateBulkDomainsRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createBulkDomains(installId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DomainApi.createBulkDomains']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Adds a domain or redirect to a specific install and optionally sets it as the primary domain * @summary Add a new domain or redirect to an existing install * @param {string} installId ID of install * @param {CreateDomainRequest} body ##### Properties * name - **required** - The name of the new domain * primary - **optional** - Sets the domain as the primary domain on the install * redirect_to - **optional** - ID of a domain to create a redirect to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createDomain(installId: string, body: CreateDomainRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createDomain(installId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DomainApi.createDomain']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Delete specific domain for an install * @summary Delete a specific domain for an install * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteDomain(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDomain(installId, domainId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DomainApi.deleteDomain']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns specific domain for an install * @summary Get a specific domain for an install * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getDomain(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getDomain(installId, domainId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DomainApi.getDomain']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns domains for a specific install * @summary Get the domains for an install by install id * @param {string} installId ID of install * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listDomains(installId: string, authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listDomains(installId, authorization, limit, offset, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DomainApi.listDomains']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Sets a domain as the primary. Cannot set a duplicate, wildcard, or redirected domain as the primary. * @summary Set an existing domain as primary * @param {string} installId The install ID * @param {string} domainId ID of domain * @param {UpdateDomainRequest} body ##### Properties * primary - **optional** - Boolean value to make the domain primary on the given install * redirect_to - **optional** - The UUID of another Domain record, or \"nil\" to remove an existing redirect. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateDomain(installId: string, domainId: string, body: UpdateDomainRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateDomain(installId, domainId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['DomainApi.updateDomain']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * DomainApi - factory interface * @export */ export const DomainApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = DomainApiFp(configuration) return { /** * Submits a request to check the status of the domain * @summary Check the status of a domain * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ checkStatus(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.checkStatus(installId, domainId, authorization, options).then((request) => request(axios, basePath)); }, /** * Adds multiple domains and redirects to a specific install * @summary Add multiple domains and redirects to an existing install * @param {string} installId ID of install * @param {CreateBulkDomainsRequest} body ##### Properties * domains - **required** - array of domains to be created, min size: 1, max size: 20 * items: * name - **required** - The name of the new domain (or redirect) * redirect_to - **optional** - Name of the domain to set redirect to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createBulkDomains(installId: string, body: CreateBulkDomainsRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createBulkDomains(installId, body, authorization, options).then((request) => request(axios, basePath)); }, /** * Adds a domain or redirect to a specific install and optionally sets it as the primary domain * @summary Add a new domain or redirect to an existing install * @param {string} installId ID of install * @param {CreateDomainRequest} body ##### Properties * name - **required** - The name of the new domain * primary - **optional** - Sets the domain as the primary domain on the install * redirect_to - **optional** - ID of a domain to create a redirect to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createDomain(installId: string, body: CreateDomainRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createDomain(installId, body, authorization, options).then((request) => request(axios, basePath)); }, /** * Delete specific domain for an install * @summary Delete a specific domain for an install * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteDomain(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteDomain(installId, domainId, authorization, options).then((request) => request(axios, basePath)); }, /** * Returns specific domain for an install * @summary Get a specific domain for an install * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getDomain(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getDomain(installId, domainId, authorization, options).then((request) => request(axios, basePath)); }, /** * Returns domains for a specific install * @summary Get the domains for an install by install id * @param {string} installId ID of install * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ listDomains(installId: string, authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listDomains(installId, authorization, limit, offset, options).then((request) => request(axios, basePath)); }, /** * Sets a domain as the primary. Cannot set a duplicate, wildcard, or redirected domain as the primary. * @summary Set an existing domain as primary * @param {string} installId The install ID * @param {string} domainId ID of domain * @param {UpdateDomainRequest} body ##### Properties * primary - **optional** - Boolean value to make the domain primary on the given install * redirect_to - **optional** - The UUID of another Domain record, or \"nil\" to remove an existing redirect. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateDomain(installId: string, domainId: string, body: UpdateDomainRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateDomain(installId, domainId, body, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * DomainApi - object-oriented interface * @export * @class DomainApi * @extends {BaseAPI} */ export class DomainApi extends BaseAPI { /** * Submits a request to check the status of the domain * @summary Check the status of a domain * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DomainApi */ public checkStatus(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig) { return DomainApiFp(this.configuration).checkStatus(installId, domainId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Adds multiple domains and redirects to a specific install * @summary Add multiple domains and redirects to an existing install * @param {string} installId ID of install * @param {CreateBulkDomainsRequest} body ##### Properties * domains - **required** - array of domains to be created, min size: 1, max size: 20 * items: * name - **required** - The name of the new domain (or redirect) * redirect_to - **optional** - Name of the domain to set redirect to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DomainApi */ public createBulkDomains(installId: string, body: CreateBulkDomainsRequest, authorization?: string, options?: RawAxiosRequestConfig) { return DomainApiFp(this.configuration).createBulkDomains(installId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Adds a domain or redirect to a specific install and optionally sets it as the primary domain * @summary Add a new domain or redirect to an existing install * @param {string} installId ID of install * @param {CreateDomainRequest} body ##### Properties * name - **required** - The name of the new domain * primary - **optional** - Sets the domain as the primary domain on the install * redirect_to - **optional** - ID of a domain to create a redirect to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DomainApi */ public createDomain(installId: string, body: CreateDomainRequest, authorization?: string, options?: RawAxiosRequestConfig) { return DomainApiFp(this.configuration).createDomain(installId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Delete specific domain for an install * @summary Delete a specific domain for an install * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DomainApi */ public deleteDomain(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig) { return DomainApiFp(this.configuration).deleteDomain(installId, domainId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Returns specific domain for an install * @summary Get a specific domain for an install * @param {string} installId ID of install * @param {string} domainId ID of domain * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DomainApi */ public getDomain(installId: string, domainId: string, authorization?: string, options?: RawAxiosRequestConfig) { return DomainApiFp(this.configuration).getDomain(installId, domainId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Returns domains for a specific install * @summary Get the domains for an install by install id * @param {string} installId ID of install * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DomainApi */ public listDomains(installId: string, authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { return DomainApiFp(this.configuration).listDomains(installId, authorization, limit, offset, options).then((request) => request(this.axios, this.basePath)); } /** * Sets a domain as the primary. Cannot set a duplicate, wildcard, or redirected domain as the primary. * @summary Set an existing domain as primary * @param {string} installId The install ID * @param {string} domainId ID of domain * @param {UpdateDomainRequest} body ##### Properties * primary - **optional** - Boolean value to make the domain primary on the given install * redirect_to - **optional** - The UUID of another Domain record, or \"nil\" to remove an existing redirect. * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DomainApi */ public updateDomain(installId: string, domainId: string, body: UpdateDomainRequest, authorization?: string, options?: RawAxiosRequestConfig) { return DomainApiFp(this.configuration).updateDomain(installId, domainId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } } /** * InstallApi - axios parameter creator * @export */ export const InstallApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Create a new WordPress installation * @param {CreateInstallRequest} body ##### Properties * name - **required** - The name of the install * account_id - **required** - The ID of the account that the install will belong to * site_id - **required for accounts with sites enabled** - The ID of the site that the install will belong to * environment - **required for accounts with sites enabled** - The site environment that the install will fill * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createInstall: async (body: CreateInstallRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createInstall', 'body', body) const localVarPath = `/installs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will delete the install, The delete is permanent and there is no confirmation prompt. * @summary Delete an install by ID * @param {string} installId ID of install * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteInstall: async (installId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('deleteInstall', 'installId', installId) const localVarPath = `/installs/{install_id}` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a single Install * @summary Get an install by ID * @param {string} installId ID of install * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInstall: async (installId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('getInstall', 'installId', installId) const localVarPath = `/installs/{install_id}` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary List your WordPress installations * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {string} [accountId] (Optional) The uuid of an account * @param {*} [options] Override http request option. * @throws {RequiredError} */ listInstalls: async (authorization?: string, limit?: number, offset?: number, accountId?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/installs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (accountId !== undefined) { localVarQueryParameter['account_id'] = accountId; } if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Update a WordPress installation * @param {string} installId The install ID * @param {UpdateInstallRequest} body ##### Properties * site_id - **optional** - The ID of the site that the install will belong to *(For accounts with sites enabled)* * environment - **optional** - The site environment that the install will fill *(For accounts with sites enabled)* * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateInstall: async (installId: string, body: UpdateInstallRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'installId' is not null or undefined assertParamExists('updateInstall', 'installId', installId) // verify required parameter 'body' is not null or undefined assertParamExists('updateInstall', 'body', body) const localVarPath = `/installs/{install_id}` .replace(`{${"install_id"}}`, encodeURIComponent(String(installId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * InstallApi - functional programming interface * @export */ export const InstallApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = InstallApiAxiosParamCreator(configuration) return { /** * * @summary Create a new WordPress installation * @param {CreateInstallRequest} body ##### Properties * name - **required** - The name of the install * account_id - **required** - The ID of the account that the install will belong to * site_id - **required for accounts with sites enabled** - The ID of the site that the install will belong to * environment - **required for accounts with sites enabled** - The site environment that the install will fill * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createInstall(body: CreateInstallRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createInstall(body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['InstallApi.createInstall']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This will delete the install, The delete is permanent and there is no confirmation prompt. * @summary Delete an install by ID * @param {string} installId ID of install * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteInstall(installId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteInstall(installId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['InstallApi.deleteInstall']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a single Install * @summary Get an install by ID * @param {string} installId ID of install * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getInstall(installId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getInstall(installId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['InstallApi.getInstall']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary List your WordPress installations * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {string} [accountId] (Optional) The uuid of an account * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listInstalls(authorization?: string, limit?: number, offset?: number, accountId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listInstalls(authorization, limit, offset, accountId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['InstallApi.listInstalls']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Update a WordPress installation * @param {string} installId The install ID * @param {UpdateInstallRequest} body ##### Properties * site_id - **optional** - The ID of the site that the install will belong to *(For accounts with sites enabled)* * environment - **optional** - The site environment that the install will fill *(For accounts with sites enabled)* * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateInstall(installId: string, body: UpdateInstallRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateInstall(installId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['InstallApi.updateInstall']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * InstallApi - factory interface * @export */ export const InstallApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = InstallApiFp(configuration) return { /** * * @summary Create a new WordPress installation * @param {CreateInstallRequest} body ##### Properties * name - **required** - The name of the install * account_id - **required** - The ID of the account that the install will belong to * site_id - **required for accounts with sites enabled** - The ID of the site that the install will belong to * environment - **required for accounts with sites enabled** - The site environment that the install will fill * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createInstall(body: CreateInstallRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createInstall(body, authorization, options).then((request) => request(axios, basePath)); }, /** * This will delete the install, The delete is permanent and there is no confirmation prompt. * @summary Delete an install by ID * @param {string} installId ID of install * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteInstall(installId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteInstall(installId, authorization, options).then((request) => request(axios, basePath)); }, /** * Returns a single Install * @summary Get an install by ID * @param {string} installId ID of install * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getInstall(installId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getInstall(installId, authorization, options).then((request) => request(axios, basePath)); }, /** * * @summary List your WordPress installations * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {string} [accountId] (Optional) The uuid of an account * @param {*} [options] Override http request option. * @throws {RequiredError} */ listInstalls(authorization?: string, limit?: number, offset?: number, accountId?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listInstalls(authorization, limit, offset, accountId, options).then((request) => request(axios, basePath)); }, /** * * @summary Update a WordPress installation * @param {string} installId The install ID * @param {UpdateInstallRequest} body ##### Properties * site_id - **optional** - The ID of the site that the install will belong to *(For accounts with sites enabled)* * environment - **optional** - The site environment that the install will fill *(For accounts with sites enabled)* * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateInstall(installId: string, body: UpdateInstallRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateInstall(installId, body, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * InstallApi - object-oriented interface * @export * @class InstallApi * @extends {BaseAPI} */ export class InstallApi extends BaseAPI { /** * * @summary Create a new WordPress installation * @param {CreateInstallRequest} body ##### Properties * name - **required** - The name of the install * account_id - **required** - The ID of the account that the install will belong to * site_id - **required for accounts with sites enabled** - The ID of the site that the install will belong to * environment - **required for accounts with sites enabled** - The site environment that the install will fill * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InstallApi */ public createInstall(body: CreateInstallRequest, authorization?: string, options?: RawAxiosRequestConfig) { return InstallApiFp(this.configuration).createInstall(body, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * This will delete the install, The delete is permanent and there is no confirmation prompt. * @summary Delete an install by ID * @param {string} installId ID of install * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InstallApi */ public deleteInstall(installId: string, authorization?: string, options?: RawAxiosRequestConfig) { return InstallApiFp(this.configuration).deleteInstall(installId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a single Install * @summary Get an install by ID * @param {string} installId ID of install * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InstallApi */ public getInstall(installId: string, authorization?: string, options?: RawAxiosRequestConfig) { return InstallApiFp(this.configuration).getInstall(installId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary List your WordPress installations * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {string} [accountId] (Optional) The uuid of an account * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InstallApi */ public listInstalls(authorization?: string, limit?: number, offset?: number, accountId?: string, options?: RawAxiosRequestConfig) { return InstallApiFp(this.configuration).listInstalls(authorization, limit, offset, accountId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Update a WordPress installation * @param {string} installId The install ID * @param {UpdateInstallRequest} body ##### Properties * site_id - **optional** - The ID of the site that the install will belong to *(For accounts with sites enabled)* * environment - **optional** - The site environment that the install will fill *(For accounts with sites enabled)* * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InstallApi */ public updateInstall(installId: string, body: UpdateInstallRequest, authorization?: string, options?: RawAxiosRequestConfig) { return InstallApiFp(this.configuration).updateInstall(installId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } } /** * SiteApi - axios parameter creator * @export */ export const SiteApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * * @summary Create a new site * @param {CreateSiteRequest} body ##### Properties * name - **required** - The name of the site * account_id - **required** - The ID of the account that the site will belong to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSite: async (body: CreateSiteRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createSite', 'body', body) const localVarPath = `/sites`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This will delete the site and any installs associated with this site. This delete is permanent and there is no confirmation prompt. * @summary Delete a site * @param {string} siteId The ID of the site to delete *(For accounts with sites enabled)* * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSite: async (siteId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'siteId' is not null or undefined assertParamExists('deleteSite', 'siteId', siteId) const localVarPath = `/sites/{site_id}` .replace(`{${"site_id"}}`, encodeURIComponent(String(siteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a single site * @summary Get a site by ID * @param {string} siteId The site ID * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSite: async (siteId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'siteId' is not null or undefined assertParamExists('getSite', 'siteId', siteId) const localVarPath = `/sites/{site_id}` .replace(`{${"site_id"}}`, encodeURIComponent(String(siteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary List your sites * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {string} [accountId] (Optional) The uuid of an account * @param {*} [options] Override http request option. * @throws {RequiredError} */ listSites: async (authorization?: string, limit?: number, offset?: number, accountId?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/sites`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (accountId !== undefined) { localVarQueryParameter['account_id'] = accountId; } if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * * @summary Change a site name * @param {string} siteId The ID of the site to change the name of *(For accounts with sites enabled)* * @param {UpdateSiteRequest} body ##### Properties * name - The new name for the site * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateSite: async (siteId: string, body: UpdateSiteRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'siteId' is not null or undefined assertParamExists('updateSite', 'siteId', siteId) // verify required parameter 'body' is not null or undefined assertParamExists('updateSite', 'body', body) const localVarPath = `/sites/{site_id}` .replace(`{${"site_id"}}`, encodeURIComponent(String(siteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * SiteApi - functional programming interface * @export */ export const SiteApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = SiteApiAxiosParamCreator(configuration) return { /** * * @summary Create a new site * @param {CreateSiteRequest} body ##### Properties * name - **required** - The name of the site * account_id - **required** - The ID of the account that the site will belong to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createSite(body: CreateSiteRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createSite(body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SiteApi.createSite']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * This will delete the site and any installs associated with this site. This delete is permanent and there is no confirmation prompt. * @summary Delete a site * @param {string} siteId The ID of the site to delete *(For accounts with sites enabled)* * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteSite(siteId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSite(siteId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SiteApi.deleteSite']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a single site * @summary Get a site by ID * @param {string} siteId The site ID * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getSite(siteId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getSite(siteId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SiteApi.getSite']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary List your sites * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {string} [accountId] (Optional) The uuid of an account * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listSites(authorization?: string, limit?: number, offset?: number, accountId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listSites(authorization, limit, offset, accountId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SiteApi.listSites']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * * @summary Change a site name * @param {string} siteId The ID of the site to change the name of *(For accounts with sites enabled)* * @param {UpdateSiteRequest} body ##### Properties * name - The new name for the site * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async updateSite(siteId: string, body: UpdateSiteRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.updateSite(siteId, body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SiteApi.updateSite']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * SiteApi - factory interface * @export */ export const SiteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = SiteApiFp(configuration) return { /** * * @summary Create a new site * @param {CreateSiteRequest} body ##### Properties * name - **required** - The name of the site * account_id - **required** - The ID of the account that the site will belong to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSite(body: CreateSiteRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createSite(body, authorization, options).then((request) => request(axios, basePath)); }, /** * This will delete the site and any installs associated with this site. This delete is permanent and there is no confirmation prompt. * @summary Delete a site * @param {string} siteId The ID of the site to delete *(For accounts with sites enabled)* * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSite(siteId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteSite(siteId, authorization, options).then((request) => request(axios, basePath)); }, /** * Returns a single site * @summary Get a site by ID * @param {string} siteId The site ID * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getSite(siteId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getSite(siteId, authorization, options).then((request) => request(axios, basePath)); }, /** * * @summary List your sites * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {string} [accountId] (Optional) The uuid of an account * @param {*} [options] Override http request option. * @throws {RequiredError} */ listSites(authorization?: string, limit?: number, offset?: number, accountId?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listSites(authorization, limit, offset, accountId, options).then((request) => request(axios, basePath)); }, /** * * @summary Change a site name * @param {string} siteId The ID of the site to change the name of *(For accounts with sites enabled)* * @param {UpdateSiteRequest} body ##### Properties * name - The new name for the site * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateSite(siteId: string, body: UpdateSiteRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.updateSite(siteId, body, authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * SiteApi - object-oriented interface * @export * @class SiteApi * @extends {BaseAPI} */ export class SiteApi extends BaseAPI { /** * * @summary Create a new site * @param {CreateSiteRequest} body ##### Properties * name - **required** - The name of the site * account_id - **required** - The ID of the account that the site will belong to * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SiteApi */ public createSite(body: CreateSiteRequest, authorization?: string, options?: RawAxiosRequestConfig) { return SiteApiFp(this.configuration).createSite(body, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * This will delete the site and any installs associated with this site. This delete is permanent and there is no confirmation prompt. * @summary Delete a site * @param {string} siteId The ID of the site to delete *(For accounts with sites enabled)* * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SiteApi */ public deleteSite(siteId: string, authorization?: string, options?: RawAxiosRequestConfig) { return SiteApiFp(this.configuration).deleteSite(siteId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a single site * @summary Get a site by ID * @param {string} siteId The site ID * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SiteApi */ public getSite(siteId: string, authorization?: string, options?: RawAxiosRequestConfig) { return SiteApiFp(this.configuration).getSite(siteId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary List your sites * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {string} [accountId] (Optional) The uuid of an account * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SiteApi */ public listSites(authorization?: string, limit?: number, offset?: number, accountId?: string, options?: RawAxiosRequestConfig) { return SiteApiFp(this.configuration).listSites(authorization, limit, offset, accountId, options).then((request) => request(this.axios, this.basePath)); } /** * * @summary Change a site name * @param {string} siteId The ID of the site to change the name of *(For accounts with sites enabled)* * @param {UpdateSiteRequest} body ##### Properties * name - The new name for the site * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SiteApi */ public updateSite(siteId: string, body: UpdateSiteRequest, authorization?: string, options?: RawAxiosRequestConfig) { return SiteApiFp(this.configuration).updateSite(siteId, body, authorization, options).then((request) => request(this.axios, this.basePath)); } } /** * SshKeyApi - axios parameter creator * @export */ export const SshKeyApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * # Description Use this to add a new SSH key to WP Engine. * @summary Add a new SSH key * @param {CreateSshKeyRequest} body ##### Properties * public_key - **required** - The public key you want to add * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSshKey: async (body: CreateSshKeyRequest, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'body' is not null or undefined assertParamExists('createSshKey', 'body', body) const localVarPath = `/ssh_keys`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * # Description This will delete the SSH key. * @summary Delete an existing SSH key * @param {string} sshKeyId The ID of the SSH key to delete * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSshKey: async (sshKeyId: string, authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'sshKeyId' is not null or undefined assertParamExists('deleteSshKey', 'sshKeyId', sshKeyId) const localVarPath = `/ssh_keys/{ssh_key_id}` .replace(`{${"ssh_key_id"}}`, encodeURIComponent(String(sshKeyId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * # Description Use this to list the SSH keys that you\'ve added to WP Engine. * @summary Get your SSH keys * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ listSshKeys: async (authorization?: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/ssh_keys`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * SshKeyApi - functional programming interface * @export */ export const SshKeyApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = SshKeyApiAxiosParamCreator(configuration) return { /** * # Description Use this to add a new SSH key to WP Engine. * @summary Add a new SSH key * @param {CreateSshKeyRequest} body ##### Properties * public_key - **required** - The public key you want to add * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createSshKey(body: CreateSshKeyRequest, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createSshKey(body, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SshKeyApi.createSshKey']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * # Description This will delete the SSH key. * @summary Delete an existing SSH key * @param {string} sshKeyId The ID of the SSH key to delete * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteSshKey(sshKeyId: string, authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSshKey(sshKeyId, authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SshKeyApi.deleteSshKey']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * # Description Use this to list the SSH keys that you\'ve added to WP Engine. * @summary Get your SSH keys * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ async listSshKeys(authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.listSshKeys(authorization, limit, offset, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SshKeyApi.listSshKeys']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * SshKeyApi - factory interface * @export */ export const SshKeyApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = SshKeyApiFp(configuration) return { /** * # Description Use this to add a new SSH key to WP Engine. * @summary Add a new SSH key * @param {CreateSshKeyRequest} body ##### Properties * public_key - **required** - The public key you want to add * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createSshKey(body: CreateSshKeyRequest, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createSshKey(body, authorization, options).then((request) => request(axios, basePath)); }, /** * # Description This will delete the SSH key. * @summary Delete an existing SSH key * @param {string} sshKeyId The ID of the SSH key to delete * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteSshKey(sshKeyId: string, authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteSshKey(sshKeyId, authorization, options).then((request) => request(axios, basePath)); }, /** * # Description Use this to list the SSH keys that you\'ve added to WP Engine. * @summary Get your SSH keys * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} */ listSshKeys(authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.listSshKeys(authorization, limit, offset, options).then((request) => request(axios, basePath)); }, }; }; /** * SshKeyApi - object-oriented interface * @export * @class SshKeyApi * @extends {BaseAPI} */ export class SshKeyApi extends BaseAPI { /** * # Description Use this to add a new SSH key to WP Engine. * @summary Add a new SSH key * @param {CreateSshKeyRequest} body ##### Properties * public_key - **required** - The public key you want to add * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SshKeyApi */ public createSshKey(body: CreateSshKeyRequest, authorization?: string, options?: RawAxiosRequestConfig) { return SshKeyApiFp(this.configuration).createSshKey(body, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * # Description This will delete the SSH key. * @summary Delete an existing SSH key * @param {string} sshKeyId The ID of the SSH key to delete * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SshKeyApi */ public deleteSshKey(sshKeyId: string, authorization?: string, options?: RawAxiosRequestConfig) { return SshKeyApiFp(this.configuration).deleteSshKey(sshKeyId, authorization, options).then((request) => request(this.axios, this.basePath)); } /** * # Description Use this to list the SSH keys that you\'ve added to WP Engine. * @summary Get your SSH keys * @param {string} [authorization] * @param {number} [limit] (Optional) The number of records to return * @param {number} [offset] (Optional) The first record of the result set to be retrieved * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SshKeyApi */ public listSshKeys(authorization?: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { return SshKeyApiFp(this.configuration).listSshKeys(authorization, limit, offset, options).then((request) => request(this.axios, this.basePath)); } } /** * StatusApi - axios parameter creator * @export */ export const StatusApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * # Description This endpoint will report the system status and any outages that might be occurring. * @summary The status of the WP Engine Public API * @param {*} [options] Override http request option. * @throws {RequiredError} */ status: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/status`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * StatusApi - functional programming interface * @export */ export const StatusApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = StatusApiAxiosParamCreator(configuration) return { /** * # Description This endpoint will report the system status and any outages that might be occurring. * @summary The status of the WP Engine Public API * @param {*} [options] Override http request option. * @throws {RequiredError} */ async status(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.status(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['StatusApi.status']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * StatusApi - factory interface * @export */ export const StatusApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = StatusApiFp(configuration) return { /** * # Description This endpoint will report the system status and any outages that might be occurring. * @summary The status of the WP Engine Public API * @param {*} [options] Override http request option. * @throws {RequiredError} */ status(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.status(options).then((request) => request(axios, basePath)); }, }; }; /** * StatusApi - object-oriented interface * @export * @class StatusApi * @extends {BaseAPI} */ export class StatusApi extends BaseAPI { /** * # Description This endpoint will report the system status and any outages that might be occurring. * @summary The status of the WP Engine Public API * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StatusApi */ public status(options?: RawAxiosRequestConfig) { return StatusApiFp(this.configuration).status(options).then((request) => request(this.axios, this.basePath)); } } /** * SwaggerApi - axios parameter creator * @export */ export const SwaggerApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * # Description This will output the current swagger specification * @summary The current swagger specification * @param {*} [options] Override http request option. * @throws {RequiredError} */ swagger: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/swagger`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * SwaggerApi - functional programming interface * @export */ export const SwaggerApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = SwaggerApiAxiosParamCreator(configuration) return { /** * # Description This will output the current swagger specification * @summary The current swagger specification * @param {*} [options] Override http request option. * @throws {RequiredError} */ async swagger(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.swagger(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['SwaggerApi.swagger']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * SwaggerApi - factory interface * @export */ export const SwaggerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = SwaggerApiFp(configuration) return { /** * # Description This will output the current swagger specification * @summary The current swagger specification * @param {*} [options] Override http request option. * @throws {RequiredError} */ swagger(options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.swagger(options).then((request) => request(axios, basePath)); }, }; }; /** * SwaggerApi - object-oriented interface * @export * @class SwaggerApi * @extends {BaseAPI} */ export class SwaggerApi extends BaseAPI { /** * # Description This will output the current swagger specification * @summary The current swagger specification * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SwaggerApi */ public swagger(options?: RawAxiosRequestConfig) { return SwaggerApiFp(this.configuration).swagger(options).then((request) => request(this.axios, this.basePath)); } } /** * UserApi - axios parameter creator * @export */ export const UserApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Returns the currently authenticated user * @summary Get the current user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCurrentUser: async (authorization?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/user`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) if (authorization != null) { localVarHeaderParameter['Authorization'] = String(authorization); } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * UserApi - functional programming interface * @export */ export const UserApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration) return { /** * Returns the currently authenticated user * @summary Get the current user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCurrentUser(authorization?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUser(authorization, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['UserApi.getCurrentUser']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * UserApi - factory interface * @export */ export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = UserApiFp(configuration) return { /** * Returns the currently authenticated user * @summary Get the current user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCurrentUser(authorization?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getCurrentUser(authorization, options).then((request) => request(axios, basePath)); }, }; }; /** * UserApi - object-oriented interface * @export * @class UserApi * @extends {BaseAPI} */ export class UserApi extends BaseAPI { /** * Returns the currently authenticated user * @summary Get the current user * @param {string} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof UserApi */ public getCurrentUser(authorization?: string, options?: RawAxiosRequestConfig) { return UserApiFp(this.configuration).getCurrentUser(authorization, options).then((request) => request(this.axios, this.basePath)); } }