@newfold/huapi-js 2.1169.0 → 2.1173.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 +32 -1
- package/src/index.js +23 -1
- package/src/index.msw.d.ts +3 -1
- package/src/index.msw.js +14 -2
- package/src/index.schemas.d.ts +51 -34
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, ActivityLogParams, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddPrivacy200, AddPrivacyBody, 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, DbListV2200, DbMultipleUserDatabase200, DbMultipleUserDatabaseBody, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DirectoryPrivacy200, DirectoryPrivacyParams, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsAddBody, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsDeleteBody, HostingDbAuthorizedHostsUpdate200, HostingDbAuthorizedHostsUpdateBody, HostingDomainAvailability200, HostingDomainAvailabilityParams, 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, HostingVisitors200, HostingVisitorsParams, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListFilesV2200, ListFilesV2Params, ListIndex200, ListIndexParams, Privacy200, PrivacyBody, PrivacyUser200, PrivacyUserBody, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteBody, 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, 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, SshKeyImportV3200, SshKeyImportV3Body, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, SshKeyV2Body, Sso200, SsoParams, StagingSitePromote200, StagingSitePromoteBody, 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, ActivityLogParams, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddPrivacy200, AddPrivacyBody, 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, DbListV2200, DbMultipleUserDatabase200, DbMultipleUserDatabaseBody, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DirectoryPrivacy200, DirectoryPrivacyParams, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsAddBody, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsDeleteBody, HostingDbAuthorizedHostsUpdate200, HostingDbAuthorizedHostsUpdateBody, HostingDomainAvailability200, HostingDomainAvailabilityParams, 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, HostingVisitors200, HostingVisitorsParams, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListFilesV2200, ListFilesV2Params, ListIndex200, ListIndexParams, Privacy200, PrivacyBody, PrivacyUser200, PrivacyUserBody, RepairDatabase200, RepairDatabaseBody, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteBody, 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, 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, SshKeyImportV3200, SshKeyImportV3Body, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, SshKeyV2Body, Sso200, SsoParams, StagingSitePromote200, StagingSitePromoteBody, 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
|
/**
|
|
@@ -1906,6 +1906,37 @@ export declare const useDbCheckDatabase: <TError = AxiosError<unknown, any>, TCo
|
|
|
1906
1906
|
hostingId: number;
|
|
1907
1907
|
data: DbCheckDatabaseBody;
|
|
1908
1908
|
}, TContext>;
|
|
1909
|
+
/**
|
|
1910
|
+
* Repair database.
|
|
1911
|
+
* @summary Repair database.
|
|
1912
|
+
*/
|
|
1913
|
+
export declare const repairDatabase: (hostingId: string, repairDatabaseBody: RepairDatabaseBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<RepairDatabase200>>;
|
|
1914
|
+
export declare const getRepairDatabaseMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1915
|
+
mutation?: UseMutationOptions<AxiosResponse<RepairDatabase200, any>, TError, {
|
|
1916
|
+
hostingId: string;
|
|
1917
|
+
data: RepairDatabaseBody;
|
|
1918
|
+
}, TContext> | undefined;
|
|
1919
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1920
|
+
} | undefined) => UseMutationOptions<AxiosResponse<RepairDatabase200, any>, TError, {
|
|
1921
|
+
hostingId: string;
|
|
1922
|
+
data: RepairDatabaseBody;
|
|
1923
|
+
}, TContext>;
|
|
1924
|
+
export declare type RepairDatabaseMutationResult = NonNullable<Awaited<ReturnType<typeof repairDatabase>>>;
|
|
1925
|
+
export declare type RepairDatabaseMutationBody = RepairDatabaseBody;
|
|
1926
|
+
export declare type RepairDatabaseMutationError = AxiosError<unknown>;
|
|
1927
|
+
/**
|
|
1928
|
+
* @summary Repair database.
|
|
1929
|
+
*/
|
|
1930
|
+
export declare const useRepairDatabase: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1931
|
+
mutation?: UseMutationOptions<AxiosResponse<RepairDatabase200, any>, TError, {
|
|
1932
|
+
hostingId: string;
|
|
1933
|
+
data: RepairDatabaseBody;
|
|
1934
|
+
}, TContext> | undefined;
|
|
1935
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1936
|
+
} | undefined) => UseMutationResult<AxiosResponse<RepairDatabase200, any>, TError, {
|
|
1937
|
+
hostingId: string;
|
|
1938
|
+
data: RepairDatabaseBody;
|
|
1939
|
+
}, TContext>;
|
|
1909
1940
|
/**
|
|
1910
1941
|
* Returns a list of db and table limits and usage.
|
|
1911
1942
|
* @summary DB usage
|
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.1173.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -1481,6 +1481,28 @@ export const useDbCheckDatabase = (options) => {
|
|
|
1481
1481
|
const mutationOptions = getDbCheckDatabaseMutationOptions(options);
|
|
1482
1482
|
return useMutation(mutationOptions);
|
|
1483
1483
|
};
|
|
1484
|
+
/**
|
|
1485
|
+
* Repair database.
|
|
1486
|
+
* @summary Repair database.
|
|
1487
|
+
*/
|
|
1488
|
+
export const repairDatabase = (hostingId, repairDatabaseBody, options) => {
|
|
1489
|
+
return axios.post(`/v1/hosting/${hostingId}/db/repair`, repairDatabaseBody, options);
|
|
1490
|
+
};
|
|
1491
|
+
export const getRepairDatabaseMutationOptions = (options) => {
|
|
1492
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1493
|
+
const mutationFn = (props) => {
|
|
1494
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1495
|
+
return repairDatabase(hostingId, data, axiosOptions);
|
|
1496
|
+
};
|
|
1497
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
1498
|
+
};
|
|
1499
|
+
/**
|
|
1500
|
+
* @summary Repair database.
|
|
1501
|
+
*/
|
|
1502
|
+
export const useRepairDatabase = (options) => {
|
|
1503
|
+
const mutationOptions = getRepairDatabaseMutationOptions(options);
|
|
1504
|
+
return useMutation(mutationOptions);
|
|
1505
|
+
};
|
|
1484
1506
|
/**
|
|
1485
1507
|
* Returns a list of db and table limits and usage.
|
|
1486
1508
|
* @summary DB usage
|
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, AddIndex200, AddPrivacy200, 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, DbListV2200, DbMultipleUserDatabase200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainAvailability200, 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, HostingVisitors200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesV2200, ListIndex200, Privacy200, PrivacyUser200, 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, 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, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
2
|
+
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddPrivacy200, 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, DbListV2200, DbMultipleUserDatabase200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainAvailability200, 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, HostingVisitors200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesV2200, ListIndex200, Privacy200, PrivacyUser200, RepairDatabase200, 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, 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, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, 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;
|
|
@@ -61,6 +61,7 @@ export declare const getHostingDbAuthorizedHostsAddResponseMock: (overrideRespon
|
|
|
61
61
|
export declare const getHostingDbAuthorizedHostsUpdateResponseMock: (overrideResponse?: Partial<HostingDbAuthorizedHostsUpdate200>) => HostingDbAuthorizedHostsUpdate200;
|
|
62
62
|
export declare const getHostingDbAuthorizedHostsDeleteResponseMock: (overrideResponse?: Partial<HostingDbAuthorizedHostsDelete200>) => HostingDbAuthorizedHostsDelete200;
|
|
63
63
|
export declare const getDbCheckDatabaseResponseMock: (overrideResponse?: Partial<DbCheckDatabase200>) => DbCheckDatabase200;
|
|
64
|
+
export declare const getRepairDatabaseResponseMock: (overrideResponse?: Partial<RepairDatabase200>) => RepairDatabase200;
|
|
64
65
|
export declare const getDbUsageResponseMock: (overrideResponse?: Partial<DbUsage200>) => DbUsage200;
|
|
65
66
|
export declare const getDbUserPasswordSetResponseMock: (overrideResponse?: Partial<DbUserPasswordSet200>) => DbUserPasswordSet200;
|
|
66
67
|
export declare const getDbUserPrivsGetResponseMock: (overrideResponse?: Partial<DbUserPrivsGet200>) => DbUserPrivsGet200;
|
|
@@ -258,6 +259,7 @@ export declare const getHostingDbAuthorizedHostsAddMockHandler: (overrideRespons
|
|
|
258
259
|
export declare const getHostingDbAuthorizedHostsUpdateMockHandler: (overrideResponse?: HostingDbAuthorizedHostsUpdate200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<HostingDbAuthorizedHostsUpdate200> | HostingDbAuthorizedHostsUpdate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
259
260
|
export declare const getHostingDbAuthorizedHostsDeleteMockHandler: (overrideResponse?: HostingDbAuthorizedHostsDelete200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<HostingDbAuthorizedHostsDelete200> | HostingDbAuthorizedHostsDelete200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
260
261
|
export declare const getDbCheckDatabaseMockHandler: (overrideResponse?: DbCheckDatabase200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<DbCheckDatabase200> | DbCheckDatabase200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
262
|
+
export declare const getRepairDatabaseMockHandler: (overrideResponse?: RepairDatabase200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<RepairDatabase200> | RepairDatabase200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
261
263
|
export declare const getDbUsageMockHandler: (overrideResponse?: DbUsage200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbUsage200> | DbUsage200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
262
264
|
export declare const getDbUserPasswordSetMockHandler: (overrideResponse?: DbUserPasswordSet200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<DbUserPasswordSet200> | DbUserPasswordSet200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
263
265
|
export declare const getDbUserPrivsGetMockHandler: (overrideResponse?: DbUserPrivsGet200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbUserPrivsGet200> | DbUserPrivsGet200) | 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.1173.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -71,6 +71,7 @@ export const getHostingDbAuthorizedHostsAddResponseMock = (overrideResponse = {}
|
|
|
71
71
|
export const getHostingDbAuthorizedHostsUpdateResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
72
72
|
export const getHostingDbAuthorizedHostsDeleteResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
73
73
|
export const getDbCheckDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({ database: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
74
|
+
export const getRepairDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
74
75
|
export const getDbUsageResponseMock = (overrideResponse = {}) => (Object.assign({ db_count: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), db_limit: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, overrideResponse));
|
|
75
76
|
export const getDbUserPasswordSetResponseMock = (overrideResponse = {}) => (Object.assign({ dbuser: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
76
77
|
export const getDbUserPrivsGetResponseMock = (overrideResponse = {}) => (Object.assign({ privileges: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) }, overrideResponse));
|
|
@@ -125,7 +126,7 @@ export const getSshKeyListResponseMock = (overrideResponse = {}) => (Object.assi
|
|
|
125
126
|
export const getSshKeyResponseMock = (overrideResponse = {}) => (Object.assign({ deleted: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), key_name: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
126
127
|
export const getSshKeyGenerateResponseMock = (overrideResponse = {}) => (Object.assign({ key_name: faker.helpers.arrayElement([faker.word.sample(), undefined]), private_key_path: faker.helpers.arrayElement([faker.word.sample(), undefined]), public_key_path: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
127
128
|
export const getSsoResponseMock = (overrideResponse = {}) => (Object.assign({ url: faker.word.sample() }, overrideResponse));
|
|
128
|
-
export const getHostingVisitorsResponseMock = (overrideResponse = {}) => (Object.assign({
|
|
129
|
+
export const getHostingVisitorsResponseMock = (overrideResponse = {}) => (Object.assign({ total_bandwidth: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total_hits: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total_pages: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total_unique_visitors: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total_visitors: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), visitors: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ bandwidth: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), hits: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), interval_end: faker.helpers.arrayElement([faker.word.sample(), undefined]), interval_start: faker.helpers.arrayElement([faker.word.sample(), undefined]), unique_visitors: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), visitors: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) })), undefined]) }, overrideResponse));
|
|
129
130
|
export const getSitesInfoResponseMock = (overrideResponse = {}) => (Object.assign({ 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.helpers.arrayElement([faker.word.sample(), null]), 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]), staging: faker.helpers.arrayElement([{ parent_site_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), promoted_from: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), promoting_from: 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]) }, overrideResponse));
|
|
130
131
|
export const getSiteUpdateResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.datatype.boolean() }, overrideResponse));
|
|
131
132
|
export const getSiteResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.datatype.boolean() }, overrideResponse));
|
|
@@ -837,6 +838,16 @@ export const getDbCheckDatabaseMockHandler = (overrideResponse) => {
|
|
|
837
838
|
});
|
|
838
839
|
}));
|
|
839
840
|
};
|
|
841
|
+
export const getRepairDatabaseMockHandler = (overrideResponse) => {
|
|
842
|
+
return http.post('*/v1/hosting/:hostingId/db/repair', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
843
|
+
yield delay(1000);
|
|
844
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
845
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
846
|
+
: getRepairDatabaseResponseMock()), { status: 200,
|
|
847
|
+
headers: { 'Content-Type': 'application/json' }
|
|
848
|
+
});
|
|
849
|
+
}));
|
|
850
|
+
};
|
|
840
851
|
export const getDbUsageMockHandler = (overrideResponse) => {
|
|
841
852
|
return http.get('*/v1/hosting/:hostingId/db/usage', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
842
853
|
yield delay(1000);
|
|
@@ -2279,6 +2290,7 @@ export const getHostingUAPIMock = () => [
|
|
|
2279
2290
|
getHostingDbAuthorizedHostsUpdateMockHandler(),
|
|
2280
2291
|
getHostingDbAuthorizedHostsDeleteMockHandler(),
|
|
2281
2292
|
getDbCheckDatabaseMockHandler(),
|
|
2293
|
+
getRepairDatabaseMockHandler(),
|
|
2282
2294
|
getDbUsageMockHandler(),
|
|
2283
2295
|
getDbUserPasswordSetMockHandler(),
|
|
2284
2296
|
getDbUserPrivsGetMockHandler(),
|
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.1173.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SshKeyListV4200RowsItem = {
|
|
9
9
|
authorize?: boolean;
|
|
@@ -203,17 +203,6 @@ export declare type SitesDomainsV2200 = {
|
|
|
203
203
|
export declare type SitesDomainsV2Params = {
|
|
204
204
|
scan?: boolean;
|
|
205
205
|
};
|
|
206
|
-
export declare type SitesListV2200 = {
|
|
207
|
-
items?: SitesListV2200ItemsItem[];
|
|
208
|
-
/** page size */
|
|
209
|
-
limit?: number;
|
|
210
|
-
/** current page number */
|
|
211
|
-
page?: number;
|
|
212
|
-
/** total number of pages */
|
|
213
|
-
pages?: number;
|
|
214
|
-
/** total number of sites returned */
|
|
215
|
-
total?: number;
|
|
216
|
-
};
|
|
217
206
|
/**
|
|
218
207
|
* @nullable
|
|
219
208
|
*/
|
|
@@ -362,6 +351,17 @@ export declare type SitesListV2200ItemsItem = {
|
|
|
362
351
|
*/
|
|
363
352
|
version_ptr?: string | null;
|
|
364
353
|
};
|
|
354
|
+
export declare type SitesListV2200 = {
|
|
355
|
+
items?: SitesListV2200ItemsItem[];
|
|
356
|
+
/** page size */
|
|
357
|
+
limit?: number;
|
|
358
|
+
/** current page number */
|
|
359
|
+
page?: number;
|
|
360
|
+
/** total number of pages */
|
|
361
|
+
pages?: number;
|
|
362
|
+
/** total number of sites returned */
|
|
363
|
+
total?: number;
|
|
364
|
+
};
|
|
365
365
|
export declare type SshKeyV2200 = {
|
|
366
366
|
deleted?: number;
|
|
367
367
|
key_name?: string;
|
|
@@ -1004,13 +1004,6 @@ export declare type SitesPerformanceCachepurgeBody = {
|
|
|
1004
1004
|
export declare type SitePendingDomainDelete200 = {
|
|
1005
1005
|
[key: string]: unknown;
|
|
1006
1006
|
};
|
|
1007
|
-
export declare type SitesMetricDimensions200 = {
|
|
1008
|
-
date_end?: string;
|
|
1009
|
-
date_start?: string;
|
|
1010
|
-
dimensions?: SitesMetricDimensions200Dimensions;
|
|
1011
|
-
elapsed?: number;
|
|
1012
|
-
metric?: string;
|
|
1013
|
-
};
|
|
1014
1007
|
export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension = {
|
|
1015
1008
|
[key: string]: number;
|
|
1016
1009
|
};
|
|
@@ -1018,6 +1011,25 @@ export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItem = {
|
|
|
1018
1011
|
dimension?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension;
|
|
1019
1012
|
timestamp?: number;
|
|
1020
1013
|
};
|
|
1014
|
+
export declare type SitesMetricDimensions200Dimensions = {
|
|
1015
|
+
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
1016
|
+
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
1017
|
+
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
1018
|
+
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
1019
|
+
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
1020
|
+
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
1021
|
+
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
1022
|
+
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
1023
|
+
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
1024
|
+
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
1025
|
+
};
|
|
1026
|
+
export declare type SitesMetricDimensions200 = {
|
|
1027
|
+
date_end?: string;
|
|
1028
|
+
date_start?: string;
|
|
1029
|
+
dimensions?: SitesMetricDimensions200Dimensions;
|
|
1030
|
+
elapsed?: number;
|
|
1031
|
+
metric?: string;
|
|
1032
|
+
};
|
|
1021
1033
|
export declare type SitesMetricDimensions200DimensionsVisitorIsCrawlerItemDimension = {
|
|
1022
1034
|
[key: string]: number;
|
|
1023
1035
|
};
|
|
@@ -1060,18 +1072,6 @@ export declare type SitesMetricDimensions200DimensionsHttpVersionItem = {
|
|
|
1060
1072
|
dimension?: SitesMetricDimensions200DimensionsHttpVersionItemDimension;
|
|
1061
1073
|
timestamp?: number;
|
|
1062
1074
|
};
|
|
1063
|
-
export declare type SitesMetricDimensions200Dimensions = {
|
|
1064
|
-
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
1065
|
-
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
1066
|
-
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
1067
|
-
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
1068
|
-
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
1069
|
-
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
1070
|
-
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
1071
|
-
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
1072
|
-
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
1073
|
-
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
1074
|
-
};
|
|
1075
1075
|
export declare type SitesMetricDimensions200DimensionsHttpVerbItemDimension = {
|
|
1076
1076
|
[key: string]: number;
|
|
1077
1077
|
};
|
|
@@ -1644,13 +1644,23 @@ export declare type SitesInfo200 = {
|
|
|
1644
1644
|
*/
|
|
1645
1645
|
version_ptr?: string | null;
|
|
1646
1646
|
};
|
|
1647
|
+
export declare type HostingVisitors200VisitorsItem = {
|
|
1648
|
+
bandwidth?: number;
|
|
1649
|
+
hits?: number;
|
|
1650
|
+
/** end date */
|
|
1651
|
+
interval_end?: string;
|
|
1652
|
+
/** start date */
|
|
1653
|
+
interval_start?: string;
|
|
1654
|
+
unique_visitors?: number;
|
|
1655
|
+
visitors?: number;
|
|
1656
|
+
};
|
|
1647
1657
|
export declare type HostingVisitors200 = {
|
|
1648
|
-
date_end?: string;
|
|
1649
|
-
date_start?: string;
|
|
1650
1658
|
total_bandwidth?: number;
|
|
1651
1659
|
total_hits?: number;
|
|
1660
|
+
total_pages?: number;
|
|
1661
|
+
total_unique_visitors?: number;
|
|
1652
1662
|
total_visitors?: number;
|
|
1653
|
-
|
|
1663
|
+
visitors?: HostingVisitors200VisitorsItem[];
|
|
1654
1664
|
};
|
|
1655
1665
|
export declare type HostingVisitorsSource = typeof HostingVisitorsSource[keyof typeof HostingVisitorsSource];
|
|
1656
1666
|
export declare const HostingVisitorsSource: {
|
|
@@ -2458,6 +2468,13 @@ export declare type DbUsage200 = {
|
|
|
2458
2468
|
/** @nullable */
|
|
2459
2469
|
db_limit?: number | null;
|
|
2460
2470
|
};
|
|
2471
|
+
export declare type RepairDatabase200 = {
|
|
2472
|
+
[key: string]: unknown;
|
|
2473
|
+
};
|
|
2474
|
+
export declare type RepairDatabaseBody = {
|
|
2475
|
+
/** A valid database name. */
|
|
2476
|
+
database: string;
|
|
2477
|
+
};
|
|
2461
2478
|
export declare type DbCheckDatabase200 = {
|
|
2462
2479
|
database?: string;
|
|
2463
2480
|
};
|