@newfold/huapi-js 2.1158.0 → 2.1171.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 +172 -3
- package/src/index.js +133 -9
- package/src/index.msw.d.ts +11 -1
- package/src/index.msw.js +61 -1
- package/src/index.schemas.d.ts +99 -15
- package/src/index.schemas.js +11 -0
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, 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, 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, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListIndex200, ListIndexParams, Privacy200, PrivacyBody, PrivacyUser200, PrivacyUserBody, 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, 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, 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
|
|
@@ -2157,6 +2188,37 @@ export declare const useDbUserRename: <TError = AxiosError<unknown, any>, TConte
|
|
|
2157
2188
|
hostingId: number;
|
|
2158
2189
|
data: DbUserRenameBody;
|
|
2159
2190
|
}, TContext>;
|
|
2191
|
+
/**
|
|
2192
|
+
* Delete multiple database users / databases
|
|
2193
|
+
* @summary Delete multiple database users / databases
|
|
2194
|
+
*/
|
|
2195
|
+
export declare const dbMultipleUserDatabase: (hostingId: string, dbMultipleUserDatabaseBody: DbMultipleUserDatabaseBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<DbMultipleUserDatabase200>>;
|
|
2196
|
+
export declare const getDbMultipleUserDatabaseMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2197
|
+
mutation?: UseMutationOptions<AxiosResponse<DbMultipleUserDatabase200, any>, TError, {
|
|
2198
|
+
hostingId: string;
|
|
2199
|
+
data: DbMultipleUserDatabaseBody;
|
|
2200
|
+
}, TContext> | undefined;
|
|
2201
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2202
|
+
} | undefined) => UseMutationOptions<AxiosResponse<DbMultipleUserDatabase200, any>, TError, {
|
|
2203
|
+
hostingId: string;
|
|
2204
|
+
data: DbMultipleUserDatabaseBody;
|
|
2205
|
+
}, TContext>;
|
|
2206
|
+
export declare type DbMultipleUserDatabaseMutationResult = NonNullable<Awaited<ReturnType<typeof dbMultipleUserDatabase>>>;
|
|
2207
|
+
export declare type DbMultipleUserDatabaseMutationBody = DbMultipleUserDatabaseBody;
|
|
2208
|
+
export declare type DbMultipleUserDatabaseMutationError = AxiosError<unknown>;
|
|
2209
|
+
/**
|
|
2210
|
+
* @summary Delete multiple database users / databases
|
|
2211
|
+
*/
|
|
2212
|
+
export declare const useDbMultipleUserDatabase: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2213
|
+
mutation?: UseMutationOptions<AxiosResponse<DbMultipleUserDatabase200, any>, TError, {
|
|
2214
|
+
hostingId: string;
|
|
2215
|
+
data: DbMultipleUserDatabaseBody;
|
|
2216
|
+
}, TContext> | undefined;
|
|
2217
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2218
|
+
} | undefined) => UseMutationResult<AxiosResponse<DbMultipleUserDatabase200, any>, TError, {
|
|
2219
|
+
hostingId: string;
|
|
2220
|
+
data: DbMultipleUserDatabaseBody;
|
|
2221
|
+
}, TContext>;
|
|
2160
2222
|
/**
|
|
2161
2223
|
* Allow user to secure specific folders
|
|
2162
2224
|
* @summary Allow users to secure specific folders on their websites
|
|
@@ -2313,6 +2375,38 @@ export declare const usePrivacyUser: <TError = AxiosError<unknown, any>, TContex
|
|
|
2313
2375
|
hostingId: string;
|
|
2314
2376
|
data: PrivacyUserBody;
|
|
2315
2377
|
}, TContext>;
|
|
2378
|
+
/**
|
|
2379
|
+
* domain availability
|
|
2380
|
+
* @summary Domain availability
|
|
2381
|
+
*/
|
|
2382
|
+
export declare const hostingDomainAvailability: (hostingId: string, params: HostingDomainAvailabilityParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingDomainAvailability200>>;
|
|
2383
|
+
export declare const getHostingDomainAvailabilityQueryKey: (hostingId: string, params: HostingDomainAvailabilityParams) => readonly [`/v1/hosting/${string}/domain/availability`, ...HostingDomainAvailabilityParams[]];
|
|
2384
|
+
export declare const getHostingDomainAvailabilityQueryOptions: <TData = AxiosResponse<HostingDomainAvailability200, any>, TError = AxiosError<unknown, any>>(hostingId: string, params: HostingDomainAvailabilityParams, options?: {
|
|
2385
|
+
query?: Partial<UseQueryOptions<AxiosResponse<HostingDomainAvailability200, any>, TError, TData, QueryKey>> | undefined;
|
|
2386
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2387
|
+
} | undefined) => UseQueryOptions<AxiosResponse<HostingDomainAvailability200, any>, TError, TData, QueryKey> & {
|
|
2388
|
+
queryKey: QueryKey;
|
|
2389
|
+
};
|
|
2390
|
+
export declare type HostingDomainAvailabilityQueryResult = NonNullable<Awaited<ReturnType<typeof hostingDomainAvailability>>>;
|
|
2391
|
+
export declare type HostingDomainAvailabilityQueryError = AxiosError<unknown>;
|
|
2392
|
+
export declare function useHostingDomainAvailability<TData = Awaited<ReturnType<typeof hostingDomainAvailability>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingDomainAvailabilityParams, options: {
|
|
2393
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>, 'initialData'>;
|
|
2394
|
+
axios?: AxiosRequestConfig;
|
|
2395
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
2396
|
+
queryKey: QueryKey;
|
|
2397
|
+
};
|
|
2398
|
+
export declare function useHostingDomainAvailability<TData = Awaited<ReturnType<typeof hostingDomainAvailability>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingDomainAvailabilityParams, options?: {
|
|
2399
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>, 'initialData'>;
|
|
2400
|
+
axios?: AxiosRequestConfig;
|
|
2401
|
+
}): UseQueryResult<TData, TError> & {
|
|
2402
|
+
queryKey: QueryKey;
|
|
2403
|
+
};
|
|
2404
|
+
export declare function useHostingDomainAvailability<TData = Awaited<ReturnType<typeof hostingDomainAvailability>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingDomainAvailabilityParams, options?: {
|
|
2405
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>>;
|
|
2406
|
+
axios?: AxiosRequestConfig;
|
|
2407
|
+
}): UseQueryResult<TData, TError> & {
|
|
2408
|
+
queryKey: QueryKey;
|
|
2409
|
+
};
|
|
2316
2410
|
/**
|
|
2317
2411
|
* Returns a list of domains
|
|
2318
2412
|
* @summary domain list
|
|
@@ -2410,6 +2504,7 @@ export declare function useHostingEcommerceInfo<TData = Awaited<ReturnType<typeo
|
|
|
2410
2504
|
};
|
|
2411
2505
|
/**
|
|
2412
2506
|
* List files under the given directory
|
|
2507
|
+
* @deprecated
|
|
2413
2508
|
* @summary List files
|
|
2414
2509
|
*/
|
|
2415
2510
|
export declare const listFiles: (hostingId: string, params: ListFilesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<ListFiles200>>;
|
|
@@ -3542,6 +3637,38 @@ export declare function useSso<TData = Awaited<ReturnType<typeof sso>>, TError =
|
|
|
3542
3637
|
}): UseQueryResult<TData, TError> & {
|
|
3543
3638
|
queryKey: QueryKey;
|
|
3544
3639
|
};
|
|
3640
|
+
/**
|
|
3641
|
+
* Returns site x axis for graphical representation
|
|
3642
|
+
* @summary domain visitors
|
|
3643
|
+
*/
|
|
3644
|
+
export declare const hostingVisitors: (hostingId: string, params: HostingVisitorsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingVisitors200>>;
|
|
3645
|
+
export declare const getHostingVisitorsQueryKey: (hostingId: string, params: HostingVisitorsParams) => readonly [`/v1/hosting/${string}/visitors`, ...HostingVisitorsParams[]];
|
|
3646
|
+
export declare const getHostingVisitorsQueryOptions: <TData = AxiosResponse<HostingVisitors200, any>, TError = AxiosError<unknown, any>>(hostingId: string, params: HostingVisitorsParams, options?: {
|
|
3647
|
+
query?: Partial<UseQueryOptions<AxiosResponse<HostingVisitors200, any>, TError, TData, QueryKey>> | undefined;
|
|
3648
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3649
|
+
} | undefined) => UseQueryOptions<AxiosResponse<HostingVisitors200, any>, TError, TData, QueryKey> & {
|
|
3650
|
+
queryKey: QueryKey;
|
|
3651
|
+
};
|
|
3652
|
+
export declare type HostingVisitorsQueryResult = NonNullable<Awaited<ReturnType<typeof hostingVisitors>>>;
|
|
3653
|
+
export declare type HostingVisitorsQueryError = AxiosError<unknown>;
|
|
3654
|
+
export declare function useHostingVisitors<TData = Awaited<ReturnType<typeof hostingVisitors>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingVisitorsParams, options: {
|
|
3655
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>, 'initialData'>;
|
|
3656
|
+
axios?: AxiosRequestConfig;
|
|
3657
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
3658
|
+
queryKey: QueryKey;
|
|
3659
|
+
};
|
|
3660
|
+
export declare function useHostingVisitors<TData = Awaited<ReturnType<typeof hostingVisitors>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingVisitorsParams, options?: {
|
|
3661
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>, 'initialData'>;
|
|
3662
|
+
axios?: AxiosRequestConfig;
|
|
3663
|
+
}): UseQueryResult<TData, TError> & {
|
|
3664
|
+
queryKey: QueryKey;
|
|
3665
|
+
};
|
|
3666
|
+
export declare function useHostingVisitors<TData = Awaited<ReturnType<typeof hostingVisitors>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingVisitorsParams, options?: {
|
|
3667
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>>;
|
|
3668
|
+
axios?: AxiosRequestConfig;
|
|
3669
|
+
}): UseQueryResult<TData, TError> & {
|
|
3670
|
+
queryKey: QueryKey;
|
|
3671
|
+
};
|
|
3545
3672
|
/**
|
|
3546
3673
|
* Returns site information.
|
|
3547
3674
|
* @summary info
|
|
@@ -3609,16 +3736,19 @@ export declare const useSiteUpdate: <TError = AxiosError<SiteUpdate400, any>, TC
|
|
|
3609
3736
|
* Allows deleting a site
|
|
3610
3737
|
* @summary site delete
|
|
3611
3738
|
*/
|
|
3612
|
-
export declare const site: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<Site200>>;
|
|
3739
|
+
export declare const site: (siteId: number, siteBody: SiteBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<Site200>>;
|
|
3613
3740
|
export declare const getSiteMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
3614
3741
|
mutation?: UseMutationOptions<AxiosResponse<Site200, any>, TError, {
|
|
3615
3742
|
siteId: number;
|
|
3743
|
+
data: SiteBody;
|
|
3616
3744
|
}, TContext> | undefined;
|
|
3617
3745
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
3618
3746
|
} | undefined) => UseMutationOptions<AxiosResponse<Site200, any>, TError, {
|
|
3619
3747
|
siteId: number;
|
|
3748
|
+
data: SiteBody;
|
|
3620
3749
|
}, TContext>;
|
|
3621
3750
|
export declare type SiteMutationResult = NonNullable<Awaited<ReturnType<typeof site>>>;
|
|
3751
|
+
export declare type SiteMutationBody = SiteBody;
|
|
3622
3752
|
export declare type SiteMutationError = AxiosError<unknown>;
|
|
3623
3753
|
/**
|
|
3624
3754
|
* @summary site delete
|
|
@@ -3626,10 +3756,12 @@ export declare type SiteMutationError = AxiosError<unknown>;
|
|
|
3626
3756
|
export declare const useSite: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
3627
3757
|
mutation?: UseMutationOptions<AxiosResponse<Site200, any>, TError, {
|
|
3628
3758
|
siteId: number;
|
|
3759
|
+
data: SiteBody;
|
|
3629
3760
|
}, TContext> | undefined;
|
|
3630
3761
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
3631
3762
|
} | undefined) => UseMutationResult<AxiosResponse<Site200, any>, TError, {
|
|
3632
3763
|
siteId: number;
|
|
3764
|
+
data: SiteBody;
|
|
3633
3765
|
}, TContext>;
|
|
3634
3766
|
/**
|
|
3635
3767
|
* Returns the autoupdate status of the site's core, themes, and plugins
|
|
@@ -5476,16 +5608,19 @@ export declare function useSitesSso<TData = Awaited<ReturnType<typeof sitesSso>>
|
|
|
5476
5608
|
* Promote a staging site
|
|
5477
5609
|
* @summary Staging site promotion
|
|
5478
5610
|
*/
|
|
5479
|
-
export declare const stagingSitePromote: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<StagingSitePromote200>>;
|
|
5611
|
+
export declare const stagingSitePromote: (siteId: number, stagingSitePromoteBody: StagingSitePromoteBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<StagingSitePromote200>>;
|
|
5480
5612
|
export declare const getStagingSitePromoteMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
5481
5613
|
mutation?: UseMutationOptions<AxiosResponse<StagingSitePromote200, any>, TError, {
|
|
5482
5614
|
siteId: number;
|
|
5615
|
+
data: StagingSitePromoteBody;
|
|
5483
5616
|
}, TContext> | undefined;
|
|
5484
5617
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
5485
5618
|
} | undefined) => UseMutationOptions<AxiosResponse<StagingSitePromote200, any>, TError, {
|
|
5486
5619
|
siteId: number;
|
|
5620
|
+
data: StagingSitePromoteBody;
|
|
5487
5621
|
}, TContext>;
|
|
5488
5622
|
export declare type StagingSitePromoteMutationResult = NonNullable<Awaited<ReturnType<typeof stagingSitePromote>>>;
|
|
5623
|
+
export declare type StagingSitePromoteMutationBody = StagingSitePromoteBody;
|
|
5489
5624
|
export declare type StagingSitePromoteMutationError = AxiosError<unknown>;
|
|
5490
5625
|
/**
|
|
5491
5626
|
* @summary Staging site promotion
|
|
@@ -5493,10 +5628,12 @@ export declare type StagingSitePromoteMutationError = AxiosError<unknown>;
|
|
|
5493
5628
|
export declare const useStagingSitePromote: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
5494
5629
|
mutation?: UseMutationOptions<AxiosResponse<StagingSitePromote200, any>, TError, {
|
|
5495
5630
|
siteId: number;
|
|
5631
|
+
data: StagingSitePromoteBody;
|
|
5496
5632
|
}, TContext> | undefined;
|
|
5497
5633
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
5498
5634
|
} | undefined) => UseMutationResult<AxiosResponse<StagingSitePromote200, any>, TError, {
|
|
5499
5635
|
siteId: number;
|
|
5636
|
+
data: StagingSitePromoteBody;
|
|
5500
5637
|
}, TContext>;
|
|
5501
5638
|
/**
|
|
5502
5639
|
* @summary site status
|
|
@@ -5657,6 +5794,38 @@ export declare function useDbListV2<TData = Awaited<ReturnType<typeof dbListV2>>
|
|
|
5657
5794
|
}): UseQueryResult<TData, TError> & {
|
|
5658
5795
|
queryKey: QueryKey;
|
|
5659
5796
|
};
|
|
5797
|
+
/**
|
|
5798
|
+
* List files under the given directory
|
|
5799
|
+
* @summary List files
|
|
5800
|
+
*/
|
|
5801
|
+
export declare const listFilesV2: (hostingId: string, params: ListFilesV2Params, options?: AxiosRequestConfig) => Promise<AxiosResponse<ListFilesV2200>>;
|
|
5802
|
+
export declare const getListFilesV2QueryKey: (hostingId: string, params: ListFilesV2Params) => readonly [`/v2/hosting/${string}/files`, ...ListFilesV2Params[]];
|
|
5803
|
+
export declare const getListFilesV2QueryOptions: <TData = AxiosResponse<ListFilesV2200, any>, TError = AxiosError<unknown, any>>(hostingId: string, params: ListFilesV2Params, options?: {
|
|
5804
|
+
query?: Partial<UseQueryOptions<AxiosResponse<ListFilesV2200, any>, TError, TData, QueryKey>> | undefined;
|
|
5805
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
5806
|
+
} | undefined) => UseQueryOptions<AxiosResponse<ListFilesV2200, any>, TError, TData, QueryKey> & {
|
|
5807
|
+
queryKey: QueryKey;
|
|
5808
|
+
};
|
|
5809
|
+
export declare type ListFilesV2QueryResult = NonNullable<Awaited<ReturnType<typeof listFilesV2>>>;
|
|
5810
|
+
export declare type ListFilesV2QueryError = AxiosError<unknown>;
|
|
5811
|
+
export declare function useListFilesV2<TData = Awaited<ReturnType<typeof listFilesV2>>, TError = AxiosError<unknown>>(hostingId: string, params: ListFilesV2Params, options: {
|
|
5812
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>, 'initialData'>;
|
|
5813
|
+
axios?: AxiosRequestConfig;
|
|
5814
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
5815
|
+
queryKey: QueryKey;
|
|
5816
|
+
};
|
|
5817
|
+
export declare function useListFilesV2<TData = Awaited<ReturnType<typeof listFilesV2>>, TError = AxiosError<unknown>>(hostingId: string, params: ListFilesV2Params, options?: {
|
|
5818
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>, 'initialData'>;
|
|
5819
|
+
axios?: AxiosRequestConfig;
|
|
5820
|
+
}): UseQueryResult<TData, TError> & {
|
|
5821
|
+
queryKey: QueryKey;
|
|
5822
|
+
};
|
|
5823
|
+
export declare function useListFilesV2<TData = Awaited<ReturnType<typeof listFilesV2>>, TError = AxiosError<unknown>>(hostingId: string, params: ListFilesV2Params, options?: {
|
|
5824
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>>;
|
|
5825
|
+
axios?: AxiosRequestConfig;
|
|
5826
|
+
}): UseQueryResult<TData, TError> & {
|
|
5827
|
+
queryKey: QueryKey;
|
|
5828
|
+
};
|
|
5660
5829
|
/**
|
|
5661
5830
|
* Returns the hosting server nameservers information
|
|
5662
5831
|
* @summary hosting server nameservers info
|
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.1171.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
|
|
@@ -1669,6 +1691,28 @@ export const useDbUserRename = (options) => {
|
|
|
1669
1691
|
const mutationOptions = getDbUserRenameMutationOptions(options);
|
|
1670
1692
|
return useMutation(mutationOptions);
|
|
1671
1693
|
};
|
|
1694
|
+
/**
|
|
1695
|
+
* Delete multiple database users / databases
|
|
1696
|
+
* @summary Delete multiple database users / databases
|
|
1697
|
+
*/
|
|
1698
|
+
export const dbMultipleUserDatabase = (hostingId, dbMultipleUserDatabaseBody, options) => {
|
|
1699
|
+
return axios.delete(`/v1/hosting/${hostingId}/db/users/bulk`, Object.assign({ data: dbMultipleUserDatabaseBody }, options));
|
|
1700
|
+
};
|
|
1701
|
+
export const getDbMultipleUserDatabaseMutationOptions = (options) => {
|
|
1702
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1703
|
+
const mutationFn = (props) => {
|
|
1704
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1705
|
+
return dbMultipleUserDatabase(hostingId, data, axiosOptions);
|
|
1706
|
+
};
|
|
1707
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
1708
|
+
};
|
|
1709
|
+
/**
|
|
1710
|
+
* @summary Delete multiple database users / databases
|
|
1711
|
+
*/
|
|
1712
|
+
export const useDbMultipleUserDatabase = (options) => {
|
|
1713
|
+
const mutationOptions = getDbMultipleUserDatabaseMutationOptions(options);
|
|
1714
|
+
return useMutation(mutationOptions);
|
|
1715
|
+
};
|
|
1672
1716
|
/**
|
|
1673
1717
|
* Allow user to secure specific folders
|
|
1674
1718
|
* @summary Allow users to secure specific folders on their websites
|
|
@@ -1783,6 +1827,32 @@ export const usePrivacyUser = (options) => {
|
|
|
1783
1827
|
const mutationOptions = getPrivacyUserMutationOptions(options);
|
|
1784
1828
|
return useMutation(mutationOptions);
|
|
1785
1829
|
};
|
|
1830
|
+
/**
|
|
1831
|
+
* domain availability
|
|
1832
|
+
* @summary Domain availability
|
|
1833
|
+
*/
|
|
1834
|
+
export const hostingDomainAvailability = (hostingId, params, options) => {
|
|
1835
|
+
return axios.get(`/v1/hosting/${hostingId}/domain/availability`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
1836
|
+
};
|
|
1837
|
+
export const getHostingDomainAvailabilityQueryKey = (hostingId, params) => {
|
|
1838
|
+
return [`/v1/hosting/${hostingId}/domain/availability`, ...(params ? [params] : [])];
|
|
1839
|
+
};
|
|
1840
|
+
export const getHostingDomainAvailabilityQueryOptions = (hostingId, params, options) => {
|
|
1841
|
+
var _a;
|
|
1842
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1843
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingDomainAvailabilityQueryKey(hostingId, params);
|
|
1844
|
+
const queryFn = ({ signal }) => hostingDomainAvailability(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
1845
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
1846
|
+
};
|
|
1847
|
+
/**
|
|
1848
|
+
* @summary Domain availability
|
|
1849
|
+
*/
|
|
1850
|
+
export function useHostingDomainAvailability(hostingId, params, options) {
|
|
1851
|
+
const queryOptions = getHostingDomainAvailabilityQueryOptions(hostingId, params, options);
|
|
1852
|
+
const query = useQuery(queryOptions);
|
|
1853
|
+
query.queryKey = queryOptions.queryKey;
|
|
1854
|
+
return query;
|
|
1855
|
+
}
|
|
1786
1856
|
/**
|
|
1787
1857
|
* Returns a list of domains
|
|
1788
1858
|
* @summary domain list
|
|
@@ -1859,6 +1929,7 @@ export function useHostingEcommerceInfo(hostingId, options) {
|
|
|
1859
1929
|
}
|
|
1860
1930
|
/**
|
|
1861
1931
|
* List files under the given directory
|
|
1932
|
+
* @deprecated
|
|
1862
1933
|
* @summary List files
|
|
1863
1934
|
*/
|
|
1864
1935
|
export const listFiles = (hostingId, params, options) => {
|
|
@@ -1875,6 +1946,7 @@ export const getListFilesQueryOptions = (hostingId, params, options) => {
|
|
|
1875
1946
|
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
1876
1947
|
};
|
|
1877
1948
|
/**
|
|
1949
|
+
* @deprecated
|
|
1878
1950
|
* @summary List files
|
|
1879
1951
|
*/
|
|
1880
1952
|
export function useListFiles(hostingId, params, options) {
|
|
@@ -2730,6 +2802,32 @@ export function useSso(hostingId, params, options) {
|
|
|
2730
2802
|
query.queryKey = queryOptions.queryKey;
|
|
2731
2803
|
return query;
|
|
2732
2804
|
}
|
|
2805
|
+
/**
|
|
2806
|
+
* Returns site x axis for graphical representation
|
|
2807
|
+
* @summary domain visitors
|
|
2808
|
+
*/
|
|
2809
|
+
export const hostingVisitors = (hostingId, params, options) => {
|
|
2810
|
+
return axios.get(`/v1/hosting/${hostingId}/visitors`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
2811
|
+
};
|
|
2812
|
+
export const getHostingVisitorsQueryKey = (hostingId, params) => {
|
|
2813
|
+
return [`/v1/hosting/${hostingId}/visitors`, ...(params ? [params] : [])];
|
|
2814
|
+
};
|
|
2815
|
+
export const getHostingVisitorsQueryOptions = (hostingId, params, options) => {
|
|
2816
|
+
var _a;
|
|
2817
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2818
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingVisitorsQueryKey(hostingId, params);
|
|
2819
|
+
const queryFn = ({ signal }) => hostingVisitors(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
2820
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
2821
|
+
};
|
|
2822
|
+
/**
|
|
2823
|
+
* @summary domain visitors
|
|
2824
|
+
*/
|
|
2825
|
+
export function useHostingVisitors(hostingId, params, options) {
|
|
2826
|
+
const queryOptions = getHostingVisitorsQueryOptions(hostingId, params, options);
|
|
2827
|
+
const query = useQuery(queryOptions);
|
|
2828
|
+
query.queryKey = queryOptions.queryKey;
|
|
2829
|
+
return query;
|
|
2830
|
+
}
|
|
2733
2831
|
/**
|
|
2734
2832
|
* Returns site information.
|
|
2735
2833
|
* @summary info
|
|
@@ -2782,14 +2880,14 @@ export const useSiteUpdate = (options) => {
|
|
|
2782
2880
|
* Allows deleting a site
|
|
2783
2881
|
* @summary site delete
|
|
2784
2882
|
*/
|
|
2785
|
-
export const site = (siteId, options) => {
|
|
2786
|
-
return axios.delete(`/v1/sites/${siteId}`, options);
|
|
2883
|
+
export const site = (siteId, siteBody, options) => {
|
|
2884
|
+
return axios.delete(`/v1/sites/${siteId}`, Object.assign({ data: siteBody }, options));
|
|
2787
2885
|
};
|
|
2788
2886
|
export const getSiteMutationOptions = (options) => {
|
|
2789
2887
|
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2790
2888
|
const mutationFn = (props) => {
|
|
2791
|
-
const { siteId } = props !== null && props !== void 0 ? props : {};
|
|
2792
|
-
return site(siteId, axiosOptions);
|
|
2889
|
+
const { siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
2890
|
+
return site(siteId, data, axiosOptions);
|
|
2793
2891
|
};
|
|
2794
2892
|
return Object.assign({ mutationFn }, mutationOptions);
|
|
2795
2893
|
};
|
|
@@ -4238,14 +4336,14 @@ export function useSitesSso(siteId, params, options) {
|
|
|
4238
4336
|
* Promote a staging site
|
|
4239
4337
|
* @summary Staging site promotion
|
|
4240
4338
|
*/
|
|
4241
|
-
export const stagingSitePromote = (siteId, options) => {
|
|
4242
|
-
return axios.post(`/v1/sites/${siteId}/staging`,
|
|
4339
|
+
export const stagingSitePromote = (siteId, stagingSitePromoteBody, options) => {
|
|
4340
|
+
return axios.post(`/v1/sites/${siteId}/staging`, stagingSitePromoteBody, options);
|
|
4243
4341
|
};
|
|
4244
4342
|
export const getStagingSitePromoteMutationOptions = (options) => {
|
|
4245
4343
|
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4246
4344
|
const mutationFn = (props) => {
|
|
4247
|
-
const { siteId } = props !== null && props !== void 0 ? props : {};
|
|
4248
|
-
return stagingSitePromote(siteId, axiosOptions);
|
|
4345
|
+
const { siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
4346
|
+
return stagingSitePromote(siteId, data, axiosOptions);
|
|
4249
4347
|
};
|
|
4250
4348
|
return Object.assign({ mutationFn }, mutationOptions);
|
|
4251
4349
|
};
|
|
@@ -4385,6 +4483,32 @@ export function useDbListV2(hostingId, options) {
|
|
|
4385
4483
|
query.queryKey = queryOptions.queryKey;
|
|
4386
4484
|
return query;
|
|
4387
4485
|
}
|
|
4486
|
+
/**
|
|
4487
|
+
* List files under the given directory
|
|
4488
|
+
* @summary List files
|
|
4489
|
+
*/
|
|
4490
|
+
export const listFilesV2 = (hostingId, params, options) => {
|
|
4491
|
+
return axios.get(`/v2/hosting/${hostingId}/files`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
4492
|
+
};
|
|
4493
|
+
export const getListFilesV2QueryKey = (hostingId, params) => {
|
|
4494
|
+
return [`/v2/hosting/${hostingId}/files`, ...(params ? [params] : [])];
|
|
4495
|
+
};
|
|
4496
|
+
export const getListFilesV2QueryOptions = (hostingId, params, options) => {
|
|
4497
|
+
var _a;
|
|
4498
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4499
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getListFilesV2QueryKey(hostingId, params);
|
|
4500
|
+
const queryFn = ({ signal }) => listFilesV2(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
4501
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
4502
|
+
};
|
|
4503
|
+
/**
|
|
4504
|
+
* @summary List files
|
|
4505
|
+
*/
|
|
4506
|
+
export function useListFilesV2(hostingId, params, options) {
|
|
4507
|
+
const queryOptions = getListFilesV2QueryOptions(hostingId, params, options);
|
|
4508
|
+
const query = useQuery(queryOptions);
|
|
4509
|
+
query.queryKey = queryOptions.queryKey;
|
|
4510
|
+
return query;
|
|
4511
|
+
}
|
|
4388
4512
|
/**
|
|
4389
4513
|
* Returns the hosting server nameservers information
|
|
4390
4514
|
* @summary hosting server nameservers info
|
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, 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, 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, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, 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;
|
|
@@ -69,11 +70,13 @@ export declare const getDbUserAddResponseMock: (overrideResponse?: Partial<DbUse
|
|
|
69
70
|
export declare const getDbUserDeleteResponseMock: (overrideResponse?: Partial<DbUserDelete200>) => DbUserDelete200;
|
|
70
71
|
export declare const getDbUserListResponseMock: (overrideResponse?: Partial<DbUserList200>) => DbUserList200;
|
|
71
72
|
export declare const getDbUserRenameResponseMock: (overrideResponse?: Partial<DbUserRename200>) => DbUserRename200;
|
|
73
|
+
export declare const getDbMultipleUserDatabaseResponseMock: (overrideResponse?: Partial<DbMultipleUserDatabase200>) => DbMultipleUserDatabase200;
|
|
72
74
|
export declare const getDirectoryPrivacyResponseMock: (overrideResponse?: Partial<DirectoryPrivacy200>) => DirectoryPrivacy200;
|
|
73
75
|
export declare const getAddPrivacyResponseMock: (overrideResponse?: Partial<AddPrivacy200>) => AddPrivacy200;
|
|
74
76
|
export declare const getPrivacyResponseMock: (overrideResponse?: Partial<Privacy200>) => Privacy200;
|
|
75
77
|
export declare const getEditPrivacyResponseMock: (overrideResponse?: Partial<EditPrivacy200>) => EditPrivacy200;
|
|
76
78
|
export declare const getPrivacyUserResponseMock: (overrideResponse?: Partial<PrivacyUser200>) => PrivacyUser200;
|
|
79
|
+
export declare const getHostingDomainAvailabilityResponseMock: (overrideResponse?: Partial<HostingDomainAvailability200>) => HostingDomainAvailability200;
|
|
77
80
|
export declare const getDomainsResponseMock: (overrideResponse?: Partial<Domains200>) => Domains200;
|
|
78
81
|
export declare const getHostingDomainsUnassignResponseMock: (overrideResponse?: Partial<HostingDomainsUnassign200>) => HostingDomainsUnassign200;
|
|
79
82
|
export declare const getHostingEcommerceInfoResponseMock: (overrideResponse?: Partial<HostingEcommerceInfo200>) => HostingEcommerceInfo200;
|
|
@@ -113,6 +116,7 @@ export declare const getSshKeyListResponseMock: (overrideResponse?: Partial<SshK
|
|
|
113
116
|
export declare const getSshKeyResponseMock: (overrideResponse?: Partial<SshKey200>) => SshKey200;
|
|
114
117
|
export declare const getSshKeyGenerateResponseMock: (overrideResponse?: Partial<SshKeyGenerate200>) => SshKeyGenerate200;
|
|
115
118
|
export declare const getSsoResponseMock: (overrideResponse?: Partial<Sso200>) => Sso200;
|
|
119
|
+
export declare const getHostingVisitorsResponseMock: (overrideResponse?: Partial<HostingVisitors200>) => HostingVisitors200;
|
|
116
120
|
export declare const getSitesInfoResponseMock: (overrideResponse?: Partial<SitesInfo200>) => SitesInfo200;
|
|
117
121
|
export declare const getSiteUpdateResponseMock: (overrideResponse?: Partial<SiteUpdate200>) => SiteUpdate200;
|
|
118
122
|
export declare const getSiteResponseMock: (overrideResponse?: Partial<Site200>) => Site200;
|
|
@@ -178,6 +182,7 @@ export declare const getSiteUsersResponseMock: (overrideResponse?: Partial<SiteU
|
|
|
178
182
|
export declare const getSitesVersionResponseMock: (overrideResponse?: Partial<SitesVersion200>) => SitesVersion200;
|
|
179
183
|
export declare const getAddonsSitelockSsoV2ResponseMock: (overrideResponse?: Partial<AddonsSitelockSsoV2200>) => AddonsSitelockSsoV2200;
|
|
180
184
|
export declare const getDbListV2ResponseMock: (overrideResponse?: Partial<DbListV2200>) => DbListV2200;
|
|
185
|
+
export declare const getListFilesV2ResponseMock: (overrideResponse?: Partial<ListFilesV2200>) => ListFilesV2200;
|
|
181
186
|
export declare const getHostingNameserversV2ResponseMock: (overrideResponse?: Partial<HostingNameserversV2200>) => HostingNameserversV2200;
|
|
182
187
|
export declare const getHostingRedirectsV2ResponseMock: () => HostingRedirectsV2200Item[];
|
|
183
188
|
export declare const getHostingSitesV2ResponseMock: (overrideResponse?: Partial<HostingSitesV2200>) => HostingSitesV2200;
|
|
@@ -254,6 +259,7 @@ export declare const getHostingDbAuthorizedHostsAddMockHandler: (overrideRespons
|
|
|
254
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;
|
|
255
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;
|
|
256
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;
|
|
257
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;
|
|
258
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;
|
|
259
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;
|
|
@@ -262,11 +268,13 @@ export declare const getDbUserAddMockHandler: (overrideResponse?: DbUserAdd200 |
|
|
|
262
268
|
export declare const getDbUserDeleteMockHandler: (overrideResponse?: DbUserDelete200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<DbUserDelete200> | DbUserDelete200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
263
269
|
export declare const getDbUserListMockHandler: (overrideResponse?: DbUserList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbUserList200> | DbUserList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
264
270
|
export declare const getDbUserRenameMockHandler: (overrideResponse?: DbUserRename200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<DbUserRename200> | DbUserRename200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
271
|
+
export declare const getDbMultipleUserDatabaseMockHandler: (overrideResponse?: DbMultipleUserDatabase200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<DbMultipleUserDatabase200> | DbMultipleUserDatabase200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
265
272
|
export declare const getDirectoryPrivacyMockHandler: (overrideResponse?: DirectoryPrivacy200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DirectoryPrivacy200> | DirectoryPrivacy200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
266
273
|
export declare const getAddPrivacyMockHandler: (overrideResponse?: AddPrivacy200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<AddPrivacy200> | AddPrivacy200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
267
274
|
export declare const getPrivacyMockHandler: (overrideResponse?: Privacy200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<Privacy200> | Privacy200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
268
275
|
export declare const getEditPrivacyMockHandler: (overrideResponse?: EditPrivacy200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<EditPrivacy200> | EditPrivacy200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
269
276
|
export declare const getPrivacyUserMockHandler: (overrideResponse?: PrivacyUser200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<PrivacyUser200> | PrivacyUser200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
277
|
+
export declare const getHostingDomainAvailabilityMockHandler: (overrideResponse?: HostingDomainAvailability200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingDomainAvailability200> | HostingDomainAvailability200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
270
278
|
export declare const getDomainsMockHandler: (overrideResponse?: Domains200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<Domains200> | Domains200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
271
279
|
export declare const getHostingDomainsUnassignMockHandler: (overrideResponse?: HostingDomainsUnassign200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingDomainsUnassign200> | HostingDomainsUnassign200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
272
280
|
export declare const getHostingEcommerceInfoMockHandler: (overrideResponse?: HostingEcommerceInfo200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEcommerceInfo200> | HostingEcommerceInfo200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
@@ -306,6 +314,7 @@ export declare const getSshKeyListMockHandler: (overrideResponse?: SshKeyList200
|
|
|
306
314
|
export declare const getSshKeyMockHandler: (overrideResponse?: SshKey200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<SshKey200> | SshKey200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
307
315
|
export declare const getSshKeyGenerateMockHandler: (overrideResponse?: SshKeyGenerate200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<SshKeyGenerate200> | SshKeyGenerate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
308
316
|
export declare const getSsoMockHandler: (overrideResponse?: Sso200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<Sso200> | Sso200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
317
|
+
export declare const getHostingVisitorsMockHandler: (overrideResponse?: HostingVisitors200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingVisitors200> | HostingVisitors200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
309
318
|
export declare const getSitesInfoMockHandler: (overrideResponse?: SitesInfo200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SitesInfo200> | SitesInfo200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
310
319
|
export declare const getSiteUpdateMockHandler: (overrideResponse?: SiteUpdate200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<SiteUpdate200> | SiteUpdate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
311
320
|
export declare const getSiteMockHandler: (overrideResponse?: Site200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<Site200> | Site200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
@@ -373,6 +382,7 @@ export declare const getSiteUsersMockHandler: (overrideResponse?: SiteUsers200 |
|
|
|
373
382
|
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;
|
|
374
383
|
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;
|
|
375
384
|
export declare const getDbListV2MockHandler: (overrideResponse?: DbListV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbListV2200> | DbListV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
385
|
+
export declare const getListFilesV2MockHandler: (overrideResponse?: ListFilesV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ListFilesV2200> | ListFilesV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
376
386
|
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;
|
|
377
387
|
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;
|
|
378
388
|
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;
|
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.1171.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));
|
|
@@ -79,11 +80,13 @@ export const getDbUserAddResponseMock = (overrideResponse = {}) => (Object.assig
|
|
|
79
80
|
export const getDbUserDeleteResponseMock = (overrideResponse = {}) => (Object.assign({ dbuser: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
80
81
|
export const getDbUserListResponseMock = (overrideResponse = {}) => (Object.assign({ users: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dblist: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), shortuser: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
81
82
|
export const getDbUserRenameResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
83
|
+
export const getDbMultipleUserDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
82
84
|
export const getDirectoryPrivacyResponseMock = (overrideResponse = {}) => (Object.assign({ directory: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ directory_path: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), directory_users: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) })), undefined]) }, overrideResponse));
|
|
83
85
|
export const getAddPrivacyResponseMock = (overrideResponse = {}) => (Object.assign({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
84
86
|
export const getPrivacyResponseMock = (overrideResponse = {}) => (Object.assign({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
85
87
|
export const getEditPrivacyResponseMock = (overrideResponse = {}) => (Object.assign({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
86
88
|
export const getPrivacyUserResponseMock = (overrideResponse = {}) => (Object.assign({ status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
89
|
+
export const getHostingDomainAvailabilityResponseMock = (overrideResponse = {}) => (Object.assign({ domains: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ assignable: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), assigned: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), registered: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) })), undefined]) }, overrideResponse));
|
|
87
90
|
export const getDomainsResponseMock = (overrideResponse = {}) => (Object.assign({ domains: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ date_ssl_exp: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), docroot: faker.word.sample(), domain: faker.word.sample(), id: faker.number.int({ min: undefined, max: undefined }), ssl_issuer: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), ssl_status: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.word.sample() })) }, overrideResponse));
|
|
88
91
|
export const getHostingDomainsUnassignResponseMock = (overrideResponse = {}) => (Object.assign({ queued: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
89
92
|
export const getHostingEcommerceInfoResponseMock = (overrideResponse = {}) => (Object.assign({ addon_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), back_ref: faker.helpers.arrayElement([faker.word.sample(), undefined]), level: faker.helpers.arrayElement([faker.word.sample(), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), subtype: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
@@ -123,6 +126,7 @@ export const getSshKeyListResponseMock = (overrideResponse = {}) => (Object.assi
|
|
|
123
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));
|
|
124
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));
|
|
125
128
|
export const getSsoResponseMock = (overrideResponse = {}) => (Object.assign({ url: faker.word.sample() }, overrideResponse));
|
|
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));
|
|
126
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));
|
|
127
131
|
export const getSiteUpdateResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.datatype.boolean() }, overrideResponse));
|
|
128
132
|
export const getSiteResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.datatype.boolean() }, overrideResponse));
|
|
@@ -208,6 +212,7 @@ export const getSiteUsersResponseMock = (overrideResponse = {}) => (Object.assig
|
|
|
208
212
|
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));
|
|
209
213
|
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));
|
|
210
214
|
export const getDbListV2ResponseMock = (overrideResponse = {}) => (Object.assign({ databases: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ db: faker.helpers.arrayElement([faker.word.sample(), undefined]), sitename: faker.helpers.arrayElement([faker.word.sample(), undefined]), sizemib: faker.helpers.arrayElement([faker.word.sample(), undefined]), usercount: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), userlist: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ db: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) })), undefined]) }, overrideResponse));
|
|
215
|
+
export const getListFilesV2ResponseMock = (overrideResponse = {}) => (Object.assign({ files: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), path: faker.helpers.arrayElement([faker.word.sample(), undefined]), size: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
211
216
|
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));
|
|
212
217
|
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]) })));
|
|
213
218
|
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]), 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]) })), 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));
|
|
@@ -833,6 +838,16 @@ export const getDbCheckDatabaseMockHandler = (overrideResponse) => {
|
|
|
833
838
|
});
|
|
834
839
|
}));
|
|
835
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
|
+
};
|
|
836
851
|
export const getDbUsageMockHandler = (overrideResponse) => {
|
|
837
852
|
return http.get('*/v1/hosting/:hostingId/db/usage', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
838
853
|
yield delay(1000);
|
|
@@ -913,6 +928,16 @@ export const getDbUserRenameMockHandler = (overrideResponse) => {
|
|
|
913
928
|
});
|
|
914
929
|
}));
|
|
915
930
|
};
|
|
931
|
+
export const getDbMultipleUserDatabaseMockHandler = (overrideResponse) => {
|
|
932
|
+
return http.delete('*/v1/hosting/:hostingId/db/users/bulk', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
933
|
+
yield delay(1000);
|
|
934
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
935
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
936
|
+
: getDbMultipleUserDatabaseResponseMock()), { status: 200,
|
|
937
|
+
headers: { 'Content-Type': 'application/json' }
|
|
938
|
+
});
|
|
939
|
+
}));
|
|
940
|
+
};
|
|
916
941
|
export const getDirectoryPrivacyMockHandler = (overrideResponse) => {
|
|
917
942
|
return http.get('*/v1/hosting/:hostingId/directoryprivacy', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
918
943
|
yield delay(1000);
|
|
@@ -963,6 +988,16 @@ export const getPrivacyUserMockHandler = (overrideResponse) => {
|
|
|
963
988
|
});
|
|
964
989
|
}));
|
|
965
990
|
};
|
|
991
|
+
export const getHostingDomainAvailabilityMockHandler = (overrideResponse) => {
|
|
992
|
+
return http.get('*/v1/hosting/:hostingId/domain/availability', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
993
|
+
yield delay(1000);
|
|
994
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
995
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
996
|
+
: getHostingDomainAvailabilityResponseMock()), { status: 200,
|
|
997
|
+
headers: { 'Content-Type': 'application/json' }
|
|
998
|
+
});
|
|
999
|
+
}));
|
|
1000
|
+
};
|
|
966
1001
|
export const getDomainsMockHandler = (overrideResponse) => {
|
|
967
1002
|
return http.get('*/v1/hosting/:hostingId/domains', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
968
1003
|
yield delay(1000);
|
|
@@ -1353,6 +1388,16 @@ export const getSsoMockHandler = (overrideResponse) => {
|
|
|
1353
1388
|
});
|
|
1354
1389
|
}));
|
|
1355
1390
|
};
|
|
1391
|
+
export const getHostingVisitorsMockHandler = (overrideResponse) => {
|
|
1392
|
+
return http.get('*/v1/hosting/:hostingId/visitors', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1393
|
+
yield delay(1000);
|
|
1394
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
1395
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
1396
|
+
: getHostingVisitorsResponseMock()), { status: 200,
|
|
1397
|
+
headers: { 'Content-Type': 'application/json' }
|
|
1398
|
+
});
|
|
1399
|
+
}));
|
|
1400
|
+
};
|
|
1356
1401
|
export const getSitesInfoMockHandler = (overrideResponse) => {
|
|
1357
1402
|
return http.get('*/v1/sites/:siteId', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1358
1403
|
yield delay(1000);
|
|
@@ -2023,6 +2068,16 @@ export const getDbListV2MockHandler = (overrideResponse) => {
|
|
|
2023
2068
|
});
|
|
2024
2069
|
}));
|
|
2025
2070
|
};
|
|
2071
|
+
export const getListFilesV2MockHandler = (overrideResponse) => {
|
|
2072
|
+
return http.get('*/v2/hosting/:hostingId/files', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2073
|
+
yield delay(1000);
|
|
2074
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
2075
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
2076
|
+
: getListFilesV2ResponseMock()), { status: 200,
|
|
2077
|
+
headers: { 'Content-Type': 'application/json' }
|
|
2078
|
+
});
|
|
2079
|
+
}));
|
|
2080
|
+
};
|
|
2026
2081
|
export const getHostingNameserversV2MockHandler = (overrideResponse) => {
|
|
2027
2082
|
return http.get('*/v2/hosting/:hostingId/nameservers', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2028
2083
|
yield delay(1000);
|
|
@@ -2235,6 +2290,7 @@ export const getHostingUAPIMock = () => [
|
|
|
2235
2290
|
getHostingDbAuthorizedHostsUpdateMockHandler(),
|
|
2236
2291
|
getHostingDbAuthorizedHostsDeleteMockHandler(),
|
|
2237
2292
|
getDbCheckDatabaseMockHandler(),
|
|
2293
|
+
getRepairDatabaseMockHandler(),
|
|
2238
2294
|
getDbUsageMockHandler(),
|
|
2239
2295
|
getDbUserPasswordSetMockHandler(),
|
|
2240
2296
|
getDbUserPrivsGetMockHandler(),
|
|
@@ -2243,11 +2299,13 @@ export const getHostingUAPIMock = () => [
|
|
|
2243
2299
|
getDbUserDeleteMockHandler(),
|
|
2244
2300
|
getDbUserListMockHandler(),
|
|
2245
2301
|
getDbUserRenameMockHandler(),
|
|
2302
|
+
getDbMultipleUserDatabaseMockHandler(),
|
|
2246
2303
|
getDirectoryPrivacyMockHandler(),
|
|
2247
2304
|
getAddPrivacyMockHandler(),
|
|
2248
2305
|
getPrivacyMockHandler(),
|
|
2249
2306
|
getEditPrivacyMockHandler(),
|
|
2250
2307
|
getPrivacyUserMockHandler(),
|
|
2308
|
+
getHostingDomainAvailabilityMockHandler(),
|
|
2251
2309
|
getDomainsMockHandler(),
|
|
2252
2310
|
getHostingDomainsUnassignMockHandler(),
|
|
2253
2311
|
getHostingEcommerceInfoMockHandler(),
|
|
@@ -2287,6 +2345,7 @@ export const getHostingUAPIMock = () => [
|
|
|
2287
2345
|
getSshKeyMockHandler(),
|
|
2288
2346
|
getSshKeyGenerateMockHandler(),
|
|
2289
2347
|
getSsoMockHandler(),
|
|
2348
|
+
getHostingVisitorsMockHandler(),
|
|
2290
2349
|
getSitesInfoMockHandler(),
|
|
2291
2350
|
getSiteUpdateMockHandler(),
|
|
2292
2351
|
getSiteMockHandler(),
|
|
@@ -2354,6 +2413,7 @@ export const getHostingUAPIMock = () => [
|
|
|
2354
2413
|
getSitesVersionMockHandler(),
|
|
2355
2414
|
getAddonsSitelockSsoV2MockHandler(),
|
|
2356
2415
|
getDbListV2MockHandler(),
|
|
2416
|
+
getListFilesV2MockHandler(),
|
|
2357
2417
|
getHostingNameserversV2MockHandler(),
|
|
2358
2418
|
getHostingRedirectsV2MockHandler(),
|
|
2359
2419
|
getHostingSitesV2MockHandler(),
|
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.1171.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;
|
|
@@ -604,6 +604,19 @@ export declare type HostingNameserversV2200 = {
|
|
|
604
604
|
id: number;
|
|
605
605
|
is_default?: string;
|
|
606
606
|
};
|
|
607
|
+
export declare type ListFilesV2200FilesItem = {
|
|
608
|
+
file?: string;
|
|
609
|
+
path?: string;
|
|
610
|
+
size?: number;
|
|
611
|
+
type?: string;
|
|
612
|
+
};
|
|
613
|
+
export declare type ListFilesV2200 = {
|
|
614
|
+
files?: ListFilesV2200FilesItem[];
|
|
615
|
+
};
|
|
616
|
+
export declare type ListFilesV2Params = {
|
|
617
|
+
dir: string;
|
|
618
|
+
showdotfiles?: boolean;
|
|
619
|
+
};
|
|
607
620
|
export declare type DbListV2200DatabasesItemUserlistItem = {
|
|
608
621
|
db?: string;
|
|
609
622
|
user?: string;
|
|
@@ -663,6 +676,10 @@ export declare type StagingSitePromote200 = {
|
|
|
663
676
|
/** @nullable */
|
|
664
677
|
job_id?: number | null;
|
|
665
678
|
};
|
|
679
|
+
export declare type StagingSitePromoteBody = {
|
|
680
|
+
/** Will only run site promote validation checks in hal if passed as true */
|
|
681
|
+
validate_only?: boolean;
|
|
682
|
+
};
|
|
666
683
|
export declare type SitesSso200OtherItem = {
|
|
667
684
|
added?: string;
|
|
668
685
|
addon_id?: number;
|
|
@@ -987,6 +1004,9 @@ export declare type SitesPerformanceCachepurgeBody = {
|
|
|
987
1004
|
export declare type SitePendingDomainDelete200 = {
|
|
988
1005
|
[key: string]: unknown;
|
|
989
1006
|
};
|
|
1007
|
+
export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension = {
|
|
1008
|
+
[key: string]: number;
|
|
1009
|
+
};
|
|
990
1010
|
export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItem = {
|
|
991
1011
|
dimension?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension;
|
|
992
1012
|
timestamp?: number;
|
|
@@ -1010,9 +1030,6 @@ export declare type SitesMetricDimensions200 = {
|
|
|
1010
1030
|
elapsed?: number;
|
|
1011
1031
|
metric?: string;
|
|
1012
1032
|
};
|
|
1013
|
-
export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension = {
|
|
1014
|
-
[key: string]: number;
|
|
1015
|
-
};
|
|
1016
1033
|
export declare type SitesMetricDimensions200DimensionsVisitorIsCrawlerItemDimension = {
|
|
1017
1034
|
[key: string]: number;
|
|
1018
1035
|
};
|
|
@@ -1439,6 +1456,10 @@ export declare type SitesAutoupdatesUpdateBody = {
|
|
|
1439
1456
|
export declare type Site200 = {
|
|
1440
1457
|
success: boolean;
|
|
1441
1458
|
};
|
|
1459
|
+
export declare type SiteBody = {
|
|
1460
|
+
/** Will only run site delete validation checks in hal if passed as true */
|
|
1461
|
+
validate_only?: boolean;
|
|
1462
|
+
};
|
|
1442
1463
|
export declare type SiteUpdate400 = {
|
|
1443
1464
|
error?: string;
|
|
1444
1465
|
};
|
|
@@ -1623,6 +1644,42 @@ export declare type SitesInfo200 = {
|
|
|
1623
1644
|
*/
|
|
1624
1645
|
version_ptr?: string | null;
|
|
1625
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
|
+
};
|
|
1657
|
+
export declare type HostingVisitors200 = {
|
|
1658
|
+
total_bandwidth?: number;
|
|
1659
|
+
total_hits?: number;
|
|
1660
|
+
total_pages?: number;
|
|
1661
|
+
total_unique_visitors?: number;
|
|
1662
|
+
total_visitors?: number;
|
|
1663
|
+
visitors?: HostingVisitors200VisitorsItem[];
|
|
1664
|
+
};
|
|
1665
|
+
export declare type HostingVisitorsSource = typeof HostingVisitorsSource[keyof typeof HostingVisitorsSource];
|
|
1666
|
+
export declare const HostingVisitorsSource: {
|
|
1667
|
+
readonly http: "http";
|
|
1668
|
+
readonly https: "https";
|
|
1669
|
+
readonly combined: "combined";
|
|
1670
|
+
};
|
|
1671
|
+
export declare type HostingVisitorsInterval = typeof HostingVisitorsInterval[keyof typeof HostingVisitorsInterval];
|
|
1672
|
+
export declare const HostingVisitorsInterval: {
|
|
1673
|
+
readonly NUMBER_1: 1;
|
|
1674
|
+
readonly NUMBER_24: 24;
|
|
1675
|
+
};
|
|
1676
|
+
export declare type HostingVisitorsParams = {
|
|
1677
|
+
interval?: HostingVisitorsInterval;
|
|
1678
|
+
source?: HostingVisitorsSource;
|
|
1679
|
+
start: string;
|
|
1680
|
+
end: string;
|
|
1681
|
+
domain: string;
|
|
1682
|
+
};
|
|
1626
1683
|
export declare type Sso200 = {
|
|
1627
1684
|
url: string;
|
|
1628
1685
|
};
|
|
@@ -2193,6 +2250,17 @@ export declare const DomainsType: {
|
|
|
2193
2250
|
export declare type DomainsParams = {
|
|
2194
2251
|
type?: DomainsType;
|
|
2195
2252
|
};
|
|
2253
|
+
export declare type HostingDomainAvailability200DomainsItem = {
|
|
2254
|
+
assignable?: boolean;
|
|
2255
|
+
assigned?: boolean;
|
|
2256
|
+
registered?: boolean;
|
|
2257
|
+
};
|
|
2258
|
+
export declare type HostingDomainAvailability200 = {
|
|
2259
|
+
domains?: HostingDomainAvailability200DomainsItem[];
|
|
2260
|
+
};
|
|
2261
|
+
export declare type HostingDomainAvailabilityParams = {
|
|
2262
|
+
domain: string;
|
|
2263
|
+
};
|
|
2196
2264
|
export declare type PrivacyUser200 = {
|
|
2197
2265
|
/** Success/failure status */
|
|
2198
2266
|
status?: number;
|
|
@@ -2292,6 +2360,15 @@ export declare type DirectoryPrivacy200 = {
|
|
|
2292
2360
|
export declare type DirectoryPrivacyParams = {
|
|
2293
2361
|
docpath?: string;
|
|
2294
2362
|
};
|
|
2363
|
+
export declare type DbMultipleUserDatabase200 = {
|
|
2364
|
+
[key: string]: unknown;
|
|
2365
|
+
};
|
|
2366
|
+
export declare type DbMultipleUserDatabaseBody = {
|
|
2367
|
+
/** Database names */
|
|
2368
|
+
db: string[];
|
|
2369
|
+
/** Database usernames */
|
|
2370
|
+
dbuser: string[];
|
|
2371
|
+
};
|
|
2295
2372
|
export declare type DbUserRename200 = {
|
|
2296
2373
|
success?: number;
|
|
2297
2374
|
};
|
|
@@ -2391,6 +2468,13 @@ export declare type DbUsage200 = {
|
|
|
2391
2468
|
/** @nullable */
|
|
2392
2469
|
db_limit?: number | null;
|
|
2393
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
|
+
};
|
|
2394
2478
|
export declare type DbCheckDatabase200 = {
|
|
2395
2479
|
database?: string;
|
|
2396
2480
|
};
|
package/src/index.schemas.js
CHANGED
|
@@ -59,6 +59,17 @@ export const SiteUpdateBodyVersionPtr = {
|
|
|
59
59
|
beta: 'beta',
|
|
60
60
|
};
|
|
61
61
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
62
|
+
export const HostingVisitorsSource = {
|
|
63
|
+
http: 'http',
|
|
64
|
+
https: 'https',
|
|
65
|
+
combined: 'combined',
|
|
66
|
+
};
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
68
|
+
export const HostingVisitorsInterval = {
|
|
69
|
+
NUMBER_1: 1,
|
|
70
|
+
NUMBER_24: 24,
|
|
71
|
+
};
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
62
73
|
export const SsoApp = {
|
|
63
74
|
phpmyadmin: 'phpmyadmin',
|
|
64
75
|
filemanager: 'filemanager',
|