@newfold/huapi-js 2.1067.0 → 2.1074.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.d.ts +33 -1
- package/src/index.js +27 -1
- package/src/index.msw.d.ts +3 -1
- package/src/index.msw.js +14 -2
- package/src/index.schemas.d.ts +12 -2
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DefinedInitialDataOptions, DefinedUseInfiniteQueryResult, DefinedUseQueryResult, InfiniteData, QueryKey, UndefinedInitialDataOptions, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
4
|
-
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupStatus200, BackupStatusParams, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronBody, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpBody, HostingFtpList200, HostingFtpUpdate200, HostingFtpUpdateBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirect200, HostingRedirectBody, HostingRedirects200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, JetpackBackupStatus200, ListCrons200, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SitesAccessLogs200, SitesAccessLogsDownloadParams, SitesAccessLogsParams, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesBatchBody, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesDomainsV2200, SitesDomainsV2Params, SitesErrorLogs200, SitesErrorLogsDownloadParams, SitesErrorLogsParams, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesListV3Params, SitesMetricDimensions200, SitesMetricDimensionsParams, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockParams, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSecuritySslStatusParams, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SitesVersion200, SshKey200, SshKeyBody, SshKeyFetch200, SshKeyFetchParams, SshKeyGenerate200, SshKeyGenerateBody, SshKeyImport200, SshKeyImportBody, SshKeyImportV2200, SshKeyImportV2Body, SshKeyList200, SshKeyListV2200, Sso200, SsoParams, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
4
|
+
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupStatus200, BackupStatusParams, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronBody, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpBody, HostingFtpList200, HostingFtpUpdate200, HostingFtpUpdateBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirect200, HostingRedirectBody, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, JetpackBackupStatus200, ListCrons200, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SitesAccessLogs200, SitesAccessLogsDownloadParams, SitesAccessLogsParams, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesBatchBody, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesDomainsV2200, SitesDomainsV2Params, SitesErrorLogs200, SitesErrorLogsDownloadParams, SitesErrorLogsParams, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesListV3Params, SitesMetricDimensions200, SitesMetricDimensionsParams, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockParams, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSecuritySslStatusParams, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SitesVersion200, SshKey200, SshKeyBody, SshKeyFetch200, SshKeyFetchParams, SshKeyGenerate200, SshKeyGenerateBody, SshKeyImport200, SshKeyImportBody, SshKeyImportV2200, SshKeyImportV2Body, SshKeyList200, SshKeyListV2200, Sso200, SsoParams, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
5
5
|
declare type AwaitedInput<T> = PromiseLike<T> | T;
|
|
6
6
|
declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
7
7
|
/**
|
|
@@ -5254,6 +5254,38 @@ export declare function useHostingNameserversV2<TData = Awaited<ReturnType<typeo
|
|
|
5254
5254
|
}): UseQueryResult<TData, TError> & {
|
|
5255
5255
|
queryKey: QueryKey;
|
|
5256
5256
|
};
|
|
5257
|
+
/**
|
|
5258
|
+
* Returns the list of site's redirects
|
|
5259
|
+
* @summary List redirects
|
|
5260
|
+
*/
|
|
5261
|
+
export declare const hostingRedirectsV2: (hostingId: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingRedirectsV2200Item[]>>;
|
|
5262
|
+
export declare const getHostingRedirectsV2QueryKey: (hostingId: string) => readonly [`/v2/hosting/${string}/redirects`];
|
|
5263
|
+
export declare const getHostingRedirectsV2QueryOptions: <TData = AxiosResponse<HostingRedirectsV2200Item[], any>, TError = AxiosError<unknown, any>>(hostingId: string, options?: {
|
|
5264
|
+
query?: Partial<UseQueryOptions<AxiosResponse<HostingRedirectsV2200Item[], any>, TError, TData, QueryKey>> | undefined;
|
|
5265
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
5266
|
+
} | undefined) => UseQueryOptions<AxiosResponse<HostingRedirectsV2200Item[], any>, TError, TData, QueryKey> & {
|
|
5267
|
+
queryKey: QueryKey;
|
|
5268
|
+
};
|
|
5269
|
+
export declare type HostingRedirectsV2QueryResult = NonNullable<Awaited<ReturnType<typeof hostingRedirectsV2>>>;
|
|
5270
|
+
export declare type HostingRedirectsV2QueryError = AxiosError<unknown>;
|
|
5271
|
+
export declare function useHostingRedirectsV2<TData = Awaited<ReturnType<typeof hostingRedirectsV2>>, TError = AxiosError<unknown>>(hostingId: string, options: {
|
|
5272
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingRedirectsV2>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof hostingRedirectsV2>>, TError, TData>, 'initialData'>;
|
|
5273
|
+
axios?: AxiosRequestConfig;
|
|
5274
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
5275
|
+
queryKey: QueryKey;
|
|
5276
|
+
};
|
|
5277
|
+
export declare function useHostingRedirectsV2<TData = Awaited<ReturnType<typeof hostingRedirectsV2>>, TError = AxiosError<unknown>>(hostingId: string, options?: {
|
|
5278
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingRedirectsV2>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof hostingRedirectsV2>>, TError, TData>, 'initialData'>;
|
|
5279
|
+
axios?: AxiosRequestConfig;
|
|
5280
|
+
}): UseQueryResult<TData, TError> & {
|
|
5281
|
+
queryKey: QueryKey;
|
|
5282
|
+
};
|
|
5283
|
+
export declare function useHostingRedirectsV2<TData = Awaited<ReturnType<typeof hostingRedirectsV2>>, TError = AxiosError<unknown>>(hostingId: string, options?: {
|
|
5284
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingRedirectsV2>>, TError, TData>>;
|
|
5285
|
+
axios?: AxiosRequestConfig;
|
|
5286
|
+
}): UseQueryResult<TData, TError> & {
|
|
5287
|
+
queryKey: QueryKey;
|
|
5288
|
+
};
|
|
5257
5289
|
/**
|
|
5258
5290
|
* Returns a list of sites.
|
|
5259
5291
|
* @summary sites list v2
|
package/src/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Hosting UAPI
|
|
5
5
|
* Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
|
|
6
|
-
* OpenAPI spec version: 1.
|
|
6
|
+
* OpenAPI spec version: 1.1074.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -4085,6 +4085,32 @@ export function useHostingNameserversV2(hostingId, options) {
|
|
|
4085
4085
|
query.queryKey = queryOptions.queryKey;
|
|
4086
4086
|
return query;
|
|
4087
4087
|
}
|
|
4088
|
+
/**
|
|
4089
|
+
* Returns the list of site's redirects
|
|
4090
|
+
* @summary List redirects
|
|
4091
|
+
*/
|
|
4092
|
+
export const hostingRedirectsV2 = (hostingId, options) => {
|
|
4093
|
+
return axios.get(`/v2/hosting/${hostingId}/redirects`, options);
|
|
4094
|
+
};
|
|
4095
|
+
export const getHostingRedirectsV2QueryKey = (hostingId) => {
|
|
4096
|
+
return [`/v2/hosting/${hostingId}/redirects`];
|
|
4097
|
+
};
|
|
4098
|
+
export const getHostingRedirectsV2QueryOptions = (hostingId, options) => {
|
|
4099
|
+
var _a;
|
|
4100
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4101
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingRedirectsV2QueryKey(hostingId);
|
|
4102
|
+
const queryFn = ({ signal }) => hostingRedirectsV2(hostingId, Object.assign({ signal }, axiosOptions));
|
|
4103
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
4104
|
+
};
|
|
4105
|
+
/**
|
|
4106
|
+
* @summary List redirects
|
|
4107
|
+
*/
|
|
4108
|
+
export function useHostingRedirectsV2(hostingId, options) {
|
|
4109
|
+
const queryOptions = getHostingRedirectsV2QueryOptions(hostingId, options);
|
|
4110
|
+
const query = useQuery(queryOptions);
|
|
4111
|
+
query.queryKey = queryOptions.queryKey;
|
|
4112
|
+
return query;
|
|
4113
|
+
}
|
|
4088
4114
|
/**
|
|
4089
4115
|
* Returns a list of sites.
|
|
4090
4116
|
* @summary sites list v2
|
package/src/index.msw.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { http } from 'msw';
|
|
2
|
-
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddSiteIpaddress200, AddonCloudflare200, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupInitiate200, BackupList200, BackupStatus200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDomainsUnassign200, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsCheck200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSitesV2200, HostingSshInfo200, JetpackBackupStatus200, ListCrons200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyList200, SshKeyListV2200, Sso200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
2
|
+
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddSiteIpaddress200, AddonCloudflare200, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupInitiate200, BackupList200, BackupStatus200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDomainsUnassign200, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsCheck200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSitesV2200, HostingSshInfo200, JetpackBackupStatus200, ListCrons200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyList200, SshKeyListV2200, Sso200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
3
3
|
export declare const getAccountEventListResponseMock: (overrideResponse?: Partial<AccountEventList200>) => AccountEventList200;
|
|
4
4
|
export declare const getAccountHostingListResponseMock: (overrideResponse?: Partial<AccountHostingList200>) => AccountHostingList200;
|
|
5
5
|
export declare const getAccountPublicKeysResponseMock: (overrideResponse?: Partial<AccountPublicKeys200>) => AccountPublicKeys200;
|
|
@@ -165,6 +165,7 @@ export declare const getSiteUsersResponseMock: (overrideResponse?: Partial<SiteU
|
|
|
165
165
|
export declare const getSitesVersionResponseMock: (overrideResponse?: Partial<SitesVersion200>) => SitesVersion200;
|
|
166
166
|
export declare const getAddonsSitelockSsoV2ResponseMock: (overrideResponse?: Partial<AddonsSitelockSsoV2200>) => AddonsSitelockSsoV2200;
|
|
167
167
|
export declare const getHostingNameserversV2ResponseMock: (overrideResponse?: Partial<HostingNameserversV2200>) => HostingNameserversV2200;
|
|
168
|
+
export declare const getHostingRedirectsV2ResponseMock: () => HostingRedirectsV2200Item[];
|
|
168
169
|
export declare const getHostingSitesV2ResponseMock: (overrideResponse?: Partial<HostingSitesV2200>) => HostingSitesV2200;
|
|
169
170
|
export declare const getSshKeyImportV2ResponseMock: (overrideResponse?: Partial<SshKeyImportV2200>) => SshKeyImportV2200;
|
|
170
171
|
export declare const getSshKeyListV2ResponseMock: (overrideResponse?: Partial<SshKeyListV2200>) => SshKeyListV2200;
|
|
@@ -341,6 +342,7 @@ export declare const getSiteUsersMockHandler: (overrideResponse?: SiteUsers200 |
|
|
|
341
342
|
export declare const getSitesVersionMockHandler: (overrideResponse?: SitesVersion200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SitesVersion200> | SitesVersion200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
342
343
|
export declare const getAddonsSitelockSsoV2MockHandler: (overrideResponse?: AddonsSitelockSsoV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AddonsSitelockSsoV2200> | AddonsSitelockSsoV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
343
344
|
export declare const getHostingNameserversV2MockHandler: (overrideResponse?: HostingNameserversV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingNameserversV2200> | HostingNameserversV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
345
|
+
export declare const getHostingRedirectsV2MockHandler: (overrideResponse?: HostingRedirectsV2200Item[] | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingRedirectsV2200Item[]> | HostingRedirectsV2200Item[]) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
344
346
|
export declare const getHostingSitesV2MockHandler: (overrideResponse?: HostingSitesV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingSitesV2200> | HostingSitesV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
345
347
|
export declare const getSshKeyImportV2MockHandler: (overrideResponse?: SshKeyImportV2200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<SshKeyImportV2200> | SshKeyImportV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
346
348
|
export declare const getSshKeyListV2MockHandler: (overrideResponse?: SshKeyListV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SshKeyListV2200> | SshKeyListV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
package/src/index.msw.js
CHANGED
|
@@ -4,7 +4,7 @@ import { __awaiter } from "tslib";
|
|
|
4
4
|
* Do not edit manually.
|
|
5
5
|
* Hosting UAPI
|
|
6
6
|
* Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
|
|
7
|
-
* OpenAPI spec version: 1.
|
|
7
|
+
* OpenAPI spec version: 1.1074.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -46,7 +46,7 @@ export const getDomainCertUninstallResponseMock = (overrideResponse = {}) => (Ob
|
|
|
46
46
|
export const getDomainUnassignResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
47
47
|
export const getDomainZoneeditorUrlResponseMock = (overrideResponse = {}) => (Object.assign({ url: faker.word.sample() }, overrideResponse));
|
|
48
48
|
export const getHostingAccountResponseMock = (overrideResponse = {}) => (Object.assign({ account_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), advanced: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), billing: faker.helpers.arrayElement([{ prod_code: faker.helpers.arrayElement([faker.word.sample(), undefined]), product_name: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, undefined]), brand: faker.helpers.arrayElement([faker.word.sample(), undefined]), id: faker.helpers.arrayElement([faker.word.sample(), undefined]), panel: faker.helpers.arrayElement([faker.word.sample(), undefined]), plan_key: faker.helpers.arrayElement([faker.word.sample(), undefined]), platform: faker.helpers.arrayElement([faker.word.sample(), undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.word.sample(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]) }, undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), username: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
49
|
-
export const getActivityLogResponseMock = (overrideResponse = {}) => (Object.assign({ activity: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), data: faker.helpers.arrayElement([faker.word.sample(), undefined]),
|
|
49
|
+
export const getActivityLogResponseMock = (overrideResponse = {}) => (Object.assign({ activity: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), data: faker.helpers.arrayElement([faker.word.sample(), undefined]), date_entry: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), event: faker.helpers.arrayElement([faker.word.sample(), undefined]), site_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), tenant_id: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
50
50
|
export const getHostingAddonsResponseMock = (overrideResponse = {}) => (Object.assign({ rows: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ back_reference: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), id: faker.helpers.arrayElement([faker.word.sample(), undefined]), meta: faker.helpers.arrayElement([{
|
|
51
51
|
[faker.string.alphanumeric(5)]: faker.helpers.arrayElement([faker.word.sample(), faker.number.int({ min: undefined, max: undefined }), faker.datatype.boolean()])
|
|
52
52
|
}, undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), status_user: faker.helpers.arrayElement([faker.word.sample(), undefined]), subtype: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
@@ -195,6 +195,7 @@ export const getSiteUsersResponseMock = (overrideResponse = {}) => (Object.assig
|
|
|
195
195
|
export const getSitesVersionResponseMock = (overrideResponse = {}) => (Object.assign({ current: faker.helpers.arrayElement([faker.word.sample(), undefined]), latest: faker.helpers.arrayElement([faker.word.sample(), undefined]), update: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
196
196
|
export const getAddonsSitelockSsoV2ResponseMock = (overrideResponse = {}) => (Object.assign({ site_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), sitelock_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
197
197
|
export const getHostingNameserversV2ResponseMock = (overrideResponse = {}) => (Object.assign({ brand: faker.word.sample(), hosts: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ host: faker.helpers.arrayElement([faker.word.sample(), undefined]), ips: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) })), id: faker.number.int({ min: undefined, max: undefined }), is_default: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
198
|
+
export const getHostingRedirectsV2ResponseMock = () => (Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ docroot: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain: faker.helpers.arrayElement([faker.word.sample(), undefined]), http_status_code: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), redirect_www: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), src: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.word.sample(), undefined]), wildcard: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) })));
|
|
198
199
|
export const getHostingSitesV2ResponseMock = (overrideResponse = {}) => (Object.assign({ available_sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), items: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), account_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), confirmed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), datacenter: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), date_added: faker.helpers.arrayElement([faker.word.sample(), undefined]), date_modified: faker.helpers.arrayElement([faker.word.sample(), undefined]), detected_type: faker.helpers.arrayElement([faker.word.sample(), undefined]), docroot: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), edge_cache: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), handler_404: faker.helpers.arrayElement([faker.word.sample(), undefined]), id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), installed_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), is_primary: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), jobs: faker.helpers.arrayElement([{}, undefined]), last_error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), migration_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), onboarding: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), path: faker.helpers.arrayElement([faker.word.sample(), undefined]), pending_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), pending_url_data: faker.helpers.arrayElement([{ base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), is_temp: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), job_failed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), stage: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), wp_session: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, undefined]), php_version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.word.sample(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), subtype: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), url_is_provisional: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), version_ptr: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) })), undefined]), limit: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), max_sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), page: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), pages: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), used_sites: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
199
200
|
export const getSshKeyImportV2ResponseMock = (overrideResponse = {}) => (Object.assign({ private_key_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), public_key_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, overrideResponse));
|
|
200
201
|
export const getSshKeyListV2ResponseMock = (overrideResponse = {}) => (Object.assign({ rows: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ key: faker.helpers.arrayElement([faker.word.sample(), undefined]), mtime: faker.helpers.arrayElement([faker.word.sample(), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
@@ -1874,6 +1875,16 @@ export const getHostingNameserversV2MockHandler = (overrideResponse) => {
|
|
|
1874
1875
|
});
|
|
1875
1876
|
}));
|
|
1876
1877
|
};
|
|
1878
|
+
export const getHostingRedirectsV2MockHandler = (overrideResponse) => {
|
|
1879
|
+
return http.get('*/v2/hosting/:hostingId/redirects', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1880
|
+
yield delay(1000);
|
|
1881
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
1882
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
1883
|
+
: getHostingRedirectsV2ResponseMock()), { status: 200,
|
|
1884
|
+
headers: { 'Content-Type': 'application/json' }
|
|
1885
|
+
});
|
|
1886
|
+
}));
|
|
1887
|
+
};
|
|
1877
1888
|
export const getHostingSitesV2MockHandler = (overrideResponse) => {
|
|
1878
1889
|
return http.get('*/v2/hosting/:hostingId/sites', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1879
1890
|
yield delay(1000);
|
|
@@ -2132,6 +2143,7 @@ export const getHostingUAPIMock = () => [
|
|
|
2132
2143
|
getSitesVersionMockHandler(),
|
|
2133
2144
|
getAddonsSitelockSsoV2MockHandler(),
|
|
2134
2145
|
getHostingNameserversV2MockHandler(),
|
|
2146
|
+
getHostingRedirectsV2MockHandler(),
|
|
2135
2147
|
getHostingSitesV2MockHandler(),
|
|
2136
2148
|
getSshKeyImportV2MockHandler(),
|
|
2137
2149
|
getSshKeyListV2MockHandler(),
|
package/src/index.schemas.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Hosting UAPI
|
|
5
5
|
* Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
|
|
6
|
-
* OpenAPI spec version: 1.
|
|
6
|
+
* OpenAPI spec version: 1.1074.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SitesListV3200 = {
|
|
9
9
|
items?: SiteInfoResponseModelV2[];
|
|
@@ -488,6 +488,16 @@ export declare type HostingSitesV2Params = {
|
|
|
488
488
|
page?: number;
|
|
489
489
|
search?: string;
|
|
490
490
|
};
|
|
491
|
+
export declare type HostingRedirectsV2200Item = {
|
|
492
|
+
docroot?: string;
|
|
493
|
+
domain?: string;
|
|
494
|
+
http_status_code?: number;
|
|
495
|
+
redirect_www?: number;
|
|
496
|
+
src?: string;
|
|
497
|
+
type?: string;
|
|
498
|
+
url?: string;
|
|
499
|
+
wildcard?: number;
|
|
500
|
+
};
|
|
491
501
|
export declare type HostingNameserversV2200HostsItem = {
|
|
492
502
|
host?: string;
|
|
493
503
|
ips?: string[];
|
|
@@ -2324,7 +2334,7 @@ export declare type ActivityLog200ActivityItem = {
|
|
|
2324
2334
|
/** @nullable */
|
|
2325
2335
|
addon_id?: string | null;
|
|
2326
2336
|
data?: string;
|
|
2327
|
-
|
|
2337
|
+
date_entry?: string;
|
|
2328
2338
|
/** @nullable */
|
|
2329
2339
|
domain_id?: string | null;
|
|
2330
2340
|
event?: string;
|