@newfold/huapi-js 1.949.0 → 1.955.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 +94 -2
- package/src/index.js +98 -1
- package/src/index.msw.d.ts +45 -11
- package/src/index.msw.js +30 -12
- package/src/index.schemas.d.ts +103 -26
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
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.955.0
|
|
7
7
|
*/
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
import type { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';
|
|
10
10
|
import type { UseQueryOptions, UseInfiniteQueryOptions, UseMutationOptions, UseQueryResult, UseInfiniteQueryResult, QueryKey } from '@tanstack/react-query';
|
|
11
|
-
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseList200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteList200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, AddonsSitelockSso200, AddonsCloudflare200, AddonsInfo200, AddonsSpamexpertsSso200, WebzaiSso200, WeeblySso200, DomainInfo200, DomainUnassign200, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, AddonCloudflare200, AddonCloudflareBody, ListCrons200, AddCron200, AddCron400, AddCronBody, UpdateCron200, UpdateCronBody, Cron200, CronBody, DbAdd200, DbAddBody, Db200, DbBody, DbList200, DbUsage200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, Domains200, DomainsParams, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFtpList200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpUpdate200, HostingFtpUpdateBody, HostingFtp200, HostingFtpBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirects200Item, HostingResellerSsoWhm200, HostingShellToggle200, HostingShellToggleBody, HostingShellInfo200, HostingSiteAdd200, HostingSiteAddBody, SitesBatch200, SitesBatchBody, HostingSshInfo200, SshKeyFetch200, SshKeyFetchParams, SshKeyImport200, SshKeyImportBody, SshKeyList200, SshKey200, SshKeyBody, SshKeyGenerate200, SshKeyGenerateBody, Sso200, SsoParams, SitesList200, SitesInfo200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, Site200, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesHasBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, JetpackBackupStatus200, BackupsJetpackBackup200, SiteAddonCloudflare200, SiteAddonCloudflare400, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesAccessLogs200, SitesAccessLogsParams, SitesAccessLogsDownloadParams, SitesErrorLogs200, SitesErrorLogsParams, SitesErrorLogsDownloadParams, SiteMalwareStatus200, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesMetricDimensions200, SitesMetricDimensionsParams, SitePendingDomainDelete200, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsParams, SitePluginUpdate200, SitePluginUpdateBody, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, ResetSite200, ResetSiteBody, SitesSecurityCheckCore200, SitesSecurityResetCoreFiles200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecuritySitelock200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserList200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SiteStatus200, SiteUsers200, SitesVersion200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, HostingNameserversV2200, HostingSitesV2200, SshKeyListV2200, SitesListV2200, SitesDomainsV2200, SitesDomainsV2Params, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesListV3200 } from './index.schemas';
|
|
11
|
+
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKeys200, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyDelete200, AccountPublicKeyDelete404, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseList200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteList200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, AddonsSitelockSso200, AddonsCloudflare200, AddonsInfo200, AddonsSpamexpertsSso200, WebzaiSso200, WeeblySso200, DomainInfo200, DomainUnassign200, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, AddonCloudflare200, AddonCloudflareBody, ListCrons200, AddCron200, AddCron400, AddCronBody, UpdateCron200, UpdateCronBody, Cron200, CronBody, DbAdd200, DbAddBody, Db200, DbBody, DbList200, DbUsage200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, Domains200, DomainsParams, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFtpList200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpUpdate200, HostingFtpUpdateBody, HostingFtp200, HostingFtpBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirects200Item, HostingRedirect200, HostingRedirectBody, HostingResellerSsoWhm200, HostingShellToggle200, HostingShellToggleBody, HostingShellInfo200, HostingSiteAdd200, HostingSiteAddBody, SitesBatch200, SitesBatchBody, HostingSshInfo200, SshKeyFetch200, SshKeyFetchParams, SshKeyImport200, SshKeyImportBody, SshKeyList200, SshKey200, SshKeyBody, SshKeyGenerate200, SshKeyGenerateBody, Sso200, SsoParams, SitesList200, SitesInfo200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, Site200, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesHasBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, JetpackBackupStatus200, BackupsJetpackBackup200, SiteAddonCloudflare200, SiteAddonCloudflare400, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesAccessLogs200, SitesAccessLogsParams, SitesAccessLogsDownloadParams, SitesErrorLogs200, SitesErrorLogsParams, SitesErrorLogsDownloadParams, SiteMalwareStatus200, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesMetricDimensions200, SitesMetricDimensionsParams, SitePendingDomainDelete200, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsParams, SitePluginUpdate200, SitePluginUpdateBody, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, ResetSite200, ResetSiteBody, SitesSecurityCheckCore200, SitesSecurityResetCoreFiles200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecuritySitelock200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserList200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SiteStatus200, SiteUsers200, SitesVersion200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, HostingNameserversV2200, HostingSitesV2200, SshKeyListV2200, SitesListV2200, SitesDomainsV2200, SitesDomainsV2Params, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSshUserListV2200, SitesListV3200 } from './index.schemas';
|
|
12
12
|
declare type AwaitedInput<T> = PromiseLike<T> | T;
|
|
13
13
|
declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
14
14
|
/**
|
|
@@ -39,6 +39,65 @@ export declare const useAccountHostingList: <TData = AxiosResponse<AccountHostin
|
|
|
39
39
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
40
40
|
queryKey: QueryKey;
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* Returns the account public key list
|
|
44
|
+
* @summary Account public key list
|
|
45
|
+
*/
|
|
46
|
+
export declare const accountPublicKeys: (options?: AxiosRequestConfig) => Promise<AxiosResponse<AccountPublicKeys200>>;
|
|
47
|
+
export declare const getAccountPublicKeysQueryKey: () => string[];
|
|
48
|
+
export declare type AccountPublicKeysQueryResult = NonNullable<Awaited<ReturnType<typeof accountPublicKeys>>>;
|
|
49
|
+
export declare type AccountPublicKeysQueryError = AxiosError<unknown>;
|
|
50
|
+
export declare const useAccountPublicKeys: <TData = AxiosResponse<AccountPublicKeys200, any>, TError = AxiosError<unknown, any>>(options?: {
|
|
51
|
+
query?: UseQueryOptions<AxiosResponse<AccountPublicKeys200, any>, TError, TData, QueryKey> | undefined;
|
|
52
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
53
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
54
|
+
queryKey: QueryKey;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Create an account public key
|
|
58
|
+
* @summary Account public key creation
|
|
59
|
+
*/
|
|
60
|
+
export declare const accountPublicKeyCreate: (accountPublicKeyCreateBody: AccountPublicKeyCreateBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<AccountPublicKeyCreate200>>;
|
|
61
|
+
export declare type AccountPublicKeyCreateMutationResult = NonNullable<Awaited<ReturnType<typeof accountPublicKeyCreate>>>;
|
|
62
|
+
export declare type AccountPublicKeyCreateMutationBody = AccountPublicKeyCreateBody;
|
|
63
|
+
export declare type AccountPublicKeyCreateMutationError = AxiosError<AccountPublicKeyCreate409>;
|
|
64
|
+
export declare const useAccountPublicKeyCreate: <TError = AxiosError<AccountPublicKeyCreate409, any>, TContext = unknown>(options?: {
|
|
65
|
+
mutation?: UseMutationOptions<AxiosResponse<AccountPublicKeyCreate200, any>, TError, {
|
|
66
|
+
data: AccountPublicKeyCreateBody;
|
|
67
|
+
}, TContext> | undefined;
|
|
68
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
69
|
+
} | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<AccountPublicKeyCreate200, any>, TError, {
|
|
70
|
+
data: AccountPublicKeyCreateBody;
|
|
71
|
+
}, TContext>;
|
|
72
|
+
/**
|
|
73
|
+
* Returns an account public key
|
|
74
|
+
* @summary Account public key info
|
|
75
|
+
*/
|
|
76
|
+
export declare const accountPublicKey: (publicKeyId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<AccountPublicKey200>>;
|
|
77
|
+
export declare const getAccountPublicKeyQueryKey: (publicKeyId: number) => string[];
|
|
78
|
+
export declare type AccountPublicKeyQueryResult = NonNullable<Awaited<ReturnType<typeof accountPublicKey>>>;
|
|
79
|
+
export declare type AccountPublicKeyQueryError = AxiosError<AccountPublicKey404>;
|
|
80
|
+
export declare const useAccountPublicKey: <TData = AxiosResponse<AccountPublicKey200, any>, TError = AxiosError<AccountPublicKey404, any>>(publicKeyId: number, options?: {
|
|
81
|
+
query?: UseQueryOptions<AxiosResponse<AccountPublicKey200, any>, TError, TData, QueryKey> | undefined;
|
|
82
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
83
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
84
|
+
queryKey: QueryKey;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Delete an account public key
|
|
88
|
+
* @summary Account public key deletion
|
|
89
|
+
*/
|
|
90
|
+
export declare const accountPublicKeyDelete: (publicKeyId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<AccountPublicKeyDelete200>>;
|
|
91
|
+
export declare type AccountPublicKeyDeleteMutationResult = NonNullable<Awaited<ReturnType<typeof accountPublicKeyDelete>>>;
|
|
92
|
+
export declare type AccountPublicKeyDeleteMutationError = AxiosError<AccountPublicKeyDelete404>;
|
|
93
|
+
export declare const useAccountPublicKeyDelete: <TError = AxiosError<AccountPublicKeyDelete404, any>, TContext = unknown>(options?: {
|
|
94
|
+
mutation?: UseMutationOptions<AxiosResponse<AccountPublicKeyDelete200, any>, TError, {
|
|
95
|
+
publicKeyId: number;
|
|
96
|
+
}, TContext> | undefined;
|
|
97
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
98
|
+
} | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<AccountPublicKeyDelete200, any>, TError, {
|
|
99
|
+
publicKeyId: number;
|
|
100
|
+
}, TContext>;
|
|
42
101
|
/**
|
|
43
102
|
* Returns a combined backup list with website commit ids and corresponding database commits
|
|
44
103
|
* @summary backup list
|
|
@@ -1060,6 +1119,24 @@ export declare const useHostingRedirects: <TData = AxiosResponse<HostingRedirect
|
|
|
1060
1119
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
1061
1120
|
queryKey: QueryKey;
|
|
1062
1121
|
};
|
|
1122
|
+
/**
|
|
1123
|
+
* Delete the user site redirect
|
|
1124
|
+
* @summary Delete redirects
|
|
1125
|
+
*/
|
|
1126
|
+
export declare const hostingRedirect: (hostingId: number, hostingRedirectBody: HostingRedirectBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingRedirect200>>;
|
|
1127
|
+
export declare type HostingRedirectMutationResult = NonNullable<Awaited<ReturnType<typeof hostingRedirect>>>;
|
|
1128
|
+
export declare type HostingRedirectMutationBody = HostingRedirectBody;
|
|
1129
|
+
export declare type HostingRedirectMutationError = AxiosError<unknown>;
|
|
1130
|
+
export declare const useHostingRedirect: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1131
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingRedirect200, any>, TError, {
|
|
1132
|
+
hostingId: number;
|
|
1133
|
+
data: HostingRedirectBody;
|
|
1134
|
+
}, TContext> | undefined;
|
|
1135
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1136
|
+
} | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<HostingRedirect200, any>, TError, {
|
|
1137
|
+
hostingId: number;
|
|
1138
|
+
data: HostingRedirectBody;
|
|
1139
|
+
}, TContext>;
|
|
1063
1140
|
/**
|
|
1064
1141
|
* Returns the hosting sso_whm login url
|
|
1065
1142
|
* @summary hosting sso_whm
|
|
@@ -2062,6 +2139,7 @@ export declare const useSitesSettingsPhpVersions: <TData = AxiosResponse<SitesSe
|
|
|
2062
2139
|
};
|
|
2063
2140
|
/**
|
|
2064
2141
|
* List ssh users
|
|
2142
|
+
* @deprecated
|
|
2065
2143
|
* @summary site - ssh - list users
|
|
2066
2144
|
*/
|
|
2067
2145
|
export declare const sitesSshUserList: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesSshUserList200>>;
|
|
@@ -2295,6 +2373,20 @@ export declare const useSitesSecuritySitelockV2: <TData = AxiosResponse<SitesSec
|
|
|
2295
2373
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
2296
2374
|
queryKey: QueryKey;
|
|
2297
2375
|
};
|
|
2376
|
+
/**
|
|
2377
|
+
* List ssh users V2
|
|
2378
|
+
* @summary site - ssh - list users v2
|
|
2379
|
+
*/
|
|
2380
|
+
export declare const sitesSshUserListV2: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesSshUserListV2200>>;
|
|
2381
|
+
export declare const getSitesSshUserListV2QueryKey: (siteId: number) => string[];
|
|
2382
|
+
export declare type SitesSshUserListV2QueryResult = NonNullable<Awaited<ReturnType<typeof sitesSshUserListV2>>>;
|
|
2383
|
+
export declare type SitesSshUserListV2QueryError = AxiosError<unknown>;
|
|
2384
|
+
export declare const useSitesSshUserListV2: <TData = AxiosResponse<SitesSshUserListV2200, any>, TError = AxiosError<unknown, any>>(siteId: number, options?: {
|
|
2385
|
+
query?: UseQueryOptions<AxiosResponse<SitesSshUserListV2200, any>, TError, TData, QueryKey> | undefined;
|
|
2386
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2387
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
2388
|
+
queryKey: QueryKey;
|
|
2389
|
+
};
|
|
2298
2390
|
/**
|
|
2299
2391
|
* Returns site list.
|
|
2300
2392
|
* @summary Site list for an account v3
|
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.955.0
|
|
7
7
|
*/
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
import { useQuery, useInfiniteQuery, useMutation } from '@tanstack/react-query';
|
|
@@ -41,6 +41,70 @@ export const useAccountHostingList = (options) => {
|
|
|
41
41
|
query.queryKey = queryKey;
|
|
42
42
|
return query;
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Returns the account public key list
|
|
46
|
+
* @summary Account public key list
|
|
47
|
+
*/
|
|
48
|
+
export const accountPublicKeys = (options) => {
|
|
49
|
+
return axios.get(`/v1/account/public-keys`, options);
|
|
50
|
+
};
|
|
51
|
+
export const getAccountPublicKeysQueryKey = () => [`/v1/account/public-keys`];
|
|
52
|
+
export const useAccountPublicKeys = (options) => {
|
|
53
|
+
var _a;
|
|
54
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
55
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getAccountPublicKeysQueryKey();
|
|
56
|
+
const queryFn = ({ signal }) => accountPublicKeys(Object.assign({ signal }, axiosOptions));
|
|
57
|
+
const query = useQuery(Object.assign({ queryKey, queryFn }, queryOptions));
|
|
58
|
+
query.queryKey = queryKey;
|
|
59
|
+
return query;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Create an account public key
|
|
63
|
+
* @summary Account public key creation
|
|
64
|
+
*/
|
|
65
|
+
export const accountPublicKeyCreate = (accountPublicKeyCreateBody, options) => {
|
|
66
|
+
return axios.post(`/v1/account/public-keys`, accountPublicKeyCreateBody, options);
|
|
67
|
+
};
|
|
68
|
+
export const useAccountPublicKeyCreate = (options) => {
|
|
69
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
70
|
+
const mutationFn = (props) => {
|
|
71
|
+
const { data } = props !== null && props !== void 0 ? props : {};
|
|
72
|
+
return accountPublicKeyCreate(data, axiosOptions);
|
|
73
|
+
};
|
|
74
|
+
return useMutation(mutationFn, mutationOptions);
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Returns an account public key
|
|
78
|
+
* @summary Account public key info
|
|
79
|
+
*/
|
|
80
|
+
export const accountPublicKey = (publicKeyId, options) => {
|
|
81
|
+
return axios.get(`/v1/account/public-keys/${publicKeyId}`, options);
|
|
82
|
+
};
|
|
83
|
+
export const getAccountPublicKeyQueryKey = (publicKeyId) => [`/v1/account/public-keys/${publicKeyId}`];
|
|
84
|
+
export const useAccountPublicKey = (publicKeyId, options) => {
|
|
85
|
+
var _a;
|
|
86
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
87
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getAccountPublicKeyQueryKey(publicKeyId);
|
|
88
|
+
const queryFn = ({ signal }) => accountPublicKey(publicKeyId, Object.assign({ signal }, axiosOptions));
|
|
89
|
+
const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(publicKeyId) }, queryOptions));
|
|
90
|
+
query.queryKey = queryKey;
|
|
91
|
+
return query;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Delete an account public key
|
|
95
|
+
* @summary Account public key deletion
|
|
96
|
+
*/
|
|
97
|
+
export const accountPublicKeyDelete = (publicKeyId, options) => {
|
|
98
|
+
return axios.delete(`/v1/account/public-keys/${publicKeyId}`, options);
|
|
99
|
+
};
|
|
100
|
+
export const useAccountPublicKeyDelete = (options) => {
|
|
101
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
102
|
+
const mutationFn = (props) => {
|
|
103
|
+
const { publicKeyId } = props !== null && props !== void 0 ? props : {};
|
|
104
|
+
return accountPublicKeyDelete(publicKeyId, axiosOptions);
|
|
105
|
+
};
|
|
106
|
+
return useMutation(mutationFn, mutationOptions);
|
|
107
|
+
};
|
|
44
108
|
/**
|
|
45
109
|
* Returns a combined backup list with website commit ids and corresponding database commits
|
|
46
110
|
* @summary backup list
|
|
@@ -1090,6 +1154,21 @@ export const useHostingRedirects = (hostingId, options) => {
|
|
|
1090
1154
|
query.queryKey = queryKey;
|
|
1091
1155
|
return query;
|
|
1092
1156
|
};
|
|
1157
|
+
/**
|
|
1158
|
+
* Delete the user site redirect
|
|
1159
|
+
* @summary Delete redirects
|
|
1160
|
+
*/
|
|
1161
|
+
export const hostingRedirect = (hostingId, hostingRedirectBody, options) => {
|
|
1162
|
+
return axios.delete(`/v1/hosting/${hostingId}/redirects`, Object.assign({ data: hostingRedirectBody }, options));
|
|
1163
|
+
};
|
|
1164
|
+
export const useHostingRedirect = (options) => {
|
|
1165
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1166
|
+
const mutationFn = (props) => {
|
|
1167
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1168
|
+
return hostingRedirect(hostingId, data, axiosOptions);
|
|
1169
|
+
};
|
|
1170
|
+
return useMutation(mutationFn, mutationOptions);
|
|
1171
|
+
};
|
|
1093
1172
|
/**
|
|
1094
1173
|
* Returns the hosting sso_whm login url
|
|
1095
1174
|
* @summary hosting sso_whm
|
|
@@ -2124,6 +2203,7 @@ export const useSitesSettingsPhpVersions = (siteId, options) => {
|
|
|
2124
2203
|
};
|
|
2125
2204
|
/**
|
|
2126
2205
|
* List ssh users
|
|
2206
|
+
* @deprecated
|
|
2127
2207
|
* @summary site - ssh - list users
|
|
2128
2208
|
*/
|
|
2129
2209
|
export const sitesSshUserList = (siteId, options) => {
|
|
@@ -2387,6 +2467,23 @@ export const useSitesSecuritySitelockV2 = (siteId, params, options) => {
|
|
|
2387
2467
|
query.queryKey = queryKey;
|
|
2388
2468
|
return query;
|
|
2389
2469
|
};
|
|
2470
|
+
/**
|
|
2471
|
+
* List ssh users V2
|
|
2472
|
+
* @summary site - ssh - list users v2
|
|
2473
|
+
*/
|
|
2474
|
+
export const sitesSshUserListV2 = (siteId, options) => {
|
|
2475
|
+
return axios.get(`/v2/sites/${siteId}/ssh-users`, options);
|
|
2476
|
+
};
|
|
2477
|
+
export const getSitesSshUserListV2QueryKey = (siteId) => [`/v2/sites/${siteId}/ssh-users`];
|
|
2478
|
+
export const useSitesSshUserListV2 = (siteId, options) => {
|
|
2479
|
+
var _a;
|
|
2480
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2481
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesSshUserListV2QueryKey(siteId);
|
|
2482
|
+
const queryFn = ({ signal }) => sitesSshUserListV2(siteId, Object.assign({ signal }, axiosOptions));
|
|
2483
|
+
const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions));
|
|
2484
|
+
query.queryKey = queryKey;
|
|
2485
|
+
return query;
|
|
2486
|
+
};
|
|
2390
2487
|
/**
|
|
2391
2488
|
* Returns site list.
|
|
2392
2489
|
* @summary Site list for an account v3
|
package/src/index.msw.d.ts
CHANGED
|
@@ -24,6 +24,30 @@ export declare const getAccountHostingListMock: () => {
|
|
|
24
24
|
max_sites: string | undefined;
|
|
25
25
|
}[] | undefined;
|
|
26
26
|
};
|
|
27
|
+
export declare const getAccountPublicKeysMock: () => {
|
|
28
|
+
public_keys: {
|
|
29
|
+
date_modified: string | null | undefined;
|
|
30
|
+
is_active: boolean | undefined;
|
|
31
|
+
name: string | undefined;
|
|
32
|
+
id: number | undefined;
|
|
33
|
+
public_key: string | undefined;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
};
|
|
36
|
+
export declare const getAccountPublicKeyCreateMock: () => {
|
|
37
|
+
date_modified: string | null | undefined;
|
|
38
|
+
is_active: boolean | undefined;
|
|
39
|
+
name: string | undefined;
|
|
40
|
+
public_key: string | undefined;
|
|
41
|
+
id: number | undefined;
|
|
42
|
+
};
|
|
43
|
+
export declare const getAccountPublicKeyMock: () => {
|
|
44
|
+
date_modified: string | null | undefined;
|
|
45
|
+
is_active: boolean | undefined;
|
|
46
|
+
name: string | undefined;
|
|
47
|
+
public_key: string | undefined;
|
|
48
|
+
id: number | undefined;
|
|
49
|
+
};
|
|
50
|
+
export declare const getAccountPublicKeyDeleteMock: () => {};
|
|
27
51
|
export declare const getCodeguardBackupListMock: () => {
|
|
28
52
|
backups: {
|
|
29
53
|
website_commit_id: string | undefined;
|
|
@@ -426,12 +450,15 @@ export declare const getHostingRedirectsMock: () => {
|
|
|
426
450
|
docroot: string | undefined;
|
|
427
451
|
domain: string | undefined;
|
|
428
452
|
http_status_code: number | undefined;
|
|
429
|
-
|
|
453
|
+
redirect_www: boolean | undefined;
|
|
430
454
|
wildcard: boolean | undefined;
|
|
431
455
|
src: string | undefined;
|
|
432
456
|
type: string | undefined;
|
|
433
457
|
url: string | undefined;
|
|
434
458
|
}[];
|
|
459
|
+
export declare const getHostingRedirectMock: () => {
|
|
460
|
+
success: number | undefined;
|
|
461
|
+
};
|
|
435
462
|
export declare const getHostingResellerSsoWhmMock: () => {
|
|
436
463
|
url: string | undefined;
|
|
437
464
|
};
|
|
@@ -710,61 +737,61 @@ export declare const getSitesMetricDimensionsMock: () => {
|
|
|
710
737
|
dimensions: {
|
|
711
738
|
http_version: {
|
|
712
739
|
dimension: {
|
|
713
|
-
|
|
740
|
+
cm0322r9p00001rli2e7p6qig: number;
|
|
714
741
|
} | undefined;
|
|
715
742
|
timestamp: number | undefined;
|
|
716
743
|
}[] | undefined;
|
|
717
744
|
http_verb: {
|
|
718
745
|
dimension: {
|
|
719
|
-
|
|
746
|
+
cm0322r9p00011rlihgvn0b13: number;
|
|
720
747
|
} | undefined;
|
|
721
748
|
timestamp: number | undefined;
|
|
722
749
|
}[] | undefined;
|
|
723
750
|
http_host: {
|
|
724
751
|
dimension: {
|
|
725
|
-
|
|
752
|
+
cm0322r9q00021rlidqgd13hg: number;
|
|
726
753
|
} | undefined;
|
|
727
754
|
timestamp: number | undefined;
|
|
728
755
|
}[] | undefined;
|
|
729
756
|
http_status: {
|
|
730
757
|
dimension: {
|
|
731
|
-
|
|
758
|
+
cm0322r9q00031rli5r3f3xal: number;
|
|
732
759
|
} | undefined;
|
|
733
760
|
timestamp: number | undefined;
|
|
734
761
|
}[] | undefined;
|
|
735
762
|
page_renderer: {
|
|
736
763
|
dimension: {
|
|
737
|
-
|
|
764
|
+
cm0322r9q00041rlifacl64us: number;
|
|
738
765
|
} | undefined;
|
|
739
766
|
timestamp: number | undefined;
|
|
740
767
|
}[] | undefined;
|
|
741
768
|
page_is_cached: {
|
|
742
769
|
dimension: {
|
|
743
|
-
|
|
770
|
+
cm0322r9q00051rliersp3pr0: number;
|
|
744
771
|
} | undefined;
|
|
745
772
|
timestamp: number | undefined;
|
|
746
773
|
}[] | undefined;
|
|
747
774
|
wp_admin_ajax_action: {
|
|
748
775
|
dimension: {
|
|
749
|
-
|
|
776
|
+
cm0322r9q00061rli6x84eszp: number;
|
|
750
777
|
} | undefined;
|
|
751
778
|
timestamp: number | undefined;
|
|
752
779
|
}[] | undefined;
|
|
753
780
|
visitor_asn: {
|
|
754
781
|
dimension: {
|
|
755
|
-
|
|
782
|
+
cm0322r9q00071rli67mi1y0o: number;
|
|
756
783
|
} | undefined;
|
|
757
784
|
timestamp: number | undefined;
|
|
758
785
|
}[] | undefined;
|
|
759
786
|
visitor_country_code: {
|
|
760
787
|
dimension: {
|
|
761
|
-
|
|
788
|
+
cm0322r9q00081rlievxtg0d6: number;
|
|
762
789
|
} | undefined;
|
|
763
790
|
timestamp: number | undefined;
|
|
764
791
|
}[] | undefined;
|
|
765
792
|
visitor_is_crawler: {
|
|
766
793
|
dimension: {
|
|
767
|
-
|
|
794
|
+
cm0322r9q00091rli27lpc4nr: number;
|
|
768
795
|
} | undefined;
|
|
769
796
|
timestamp: number | undefined;
|
|
770
797
|
}[] | undefined;
|
|
@@ -1110,6 +1137,13 @@ export declare const getSitesSecuritySitelockV2Mock: () => {
|
|
|
1110
1137
|
has_cdn: boolean | undefined;
|
|
1111
1138
|
scope: string | null | undefined;
|
|
1112
1139
|
};
|
|
1140
|
+
export declare const getSitesSshUserListV2Mock: () => {
|
|
1141
|
+
users: {
|
|
1142
|
+
user: string | undefined;
|
|
1143
|
+
public_key_id: number | null | undefined;
|
|
1144
|
+
installed: boolean | undefined;
|
|
1145
|
+
}[] | undefined;
|
|
1146
|
+
};
|
|
1113
1147
|
export declare const getSitesListV3Mock: () => {
|
|
1114
1148
|
total: number | undefined;
|
|
1115
1149
|
page: number | undefined;
|
package/src/index.msw.js
CHANGED
|
@@ -3,12 +3,16 @@
|
|
|
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.955.0
|
|
7
7
|
*/
|
|
8
8
|
import { rest } from 'msw';
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
export const getAccountEventListMock = () => ({ events: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ hosting_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), count: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), date_first: faker.helpers.arrayElement([faker.random.word(), undefined]), date_last: faker.helpers.arrayElement([faker.random.word(), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), event: faker.helpers.arrayElement([faker.random.word(), undefined]), site_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), tenant_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), utc: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
11
11
|
export const getAccountHostingListMock = () => ({ accounts: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ prod_inst_id: faker.helpers.arrayElement([faker.random.word(), undefined]), feature_set: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), hosting_id: faker.helpers.arrayElement([faker.random.word(), undefined]), platform: faker.helpers.arrayElement([faker.random.word(), undefined]), account_id: faker.helpers.arrayElement([faker.random.word(), undefined]), current_sites: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), max_sites: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
|
|
12
|
+
export const getAccountPublicKeysMock = () => ({ public_keys: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ date_modified: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), is_active: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), name: faker.helpers.arrayElement([faker.random.word(), undefined]), id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), public_key: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
|
|
13
|
+
export const getAccountPublicKeyCreateMock = () => ({ date_modified: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), is_active: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), name: faker.helpers.arrayElement([faker.random.word(), undefined]), public_key: faker.helpers.arrayElement([faker.random.word(), undefined]), id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
|
|
14
|
+
export const getAccountPublicKeyMock = () => ({ date_modified: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), is_active: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), name: faker.helpers.arrayElement([faker.random.word(), undefined]), public_key: faker.helpers.arrayElement([faker.random.word(), undefined]), id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
|
|
15
|
+
export const getAccountPublicKeyDeleteMock = () => ({});
|
|
12
16
|
export const getCodeguardBackupListMock = () => ({ backups: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ website_commit_id: faker.helpers.arrayElement([faker.random.word(), undefined]), event_time: faker.helpers.arrayElement([faker.random.word(), undefined]), database_backups: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), commit_id: faker.helpers.arrayElement([faker.random.word(), undefined]), event_time: faker.helpers.arrayElement([faker.random.word(), undefined]), recommended: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) })), undefined]) })), undefined]) });
|
|
13
17
|
export const getCodeguardBackupCreateMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
14
18
|
export const getCodeguardBackupDownloadMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
@@ -73,7 +77,8 @@ export const getHostingMigrationSiteScanStatusMock = () => ({ transferable: fake
|
|
|
73
77
|
export const getHostingNameserversMock = () => ({ nameservers: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())) });
|
|
74
78
|
export const getHostingOnboardingDataMock = () => ({ completed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
75
79
|
export const getHostingOnboardingDataUpdateMock = () => ({ completed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
76
|
-
export const getHostingRedirectsMock = () => (Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ docroot: faker.helpers.arrayElement([faker.random.word(), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]), http_status_code: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]),
|
|
80
|
+
export const getHostingRedirectsMock = () => (Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ docroot: faker.helpers.arrayElement([faker.random.word(), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]), http_status_code: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), redirect_www: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), wildcard: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), src: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), url: faker.helpers.arrayElement([faker.random.word(), undefined]) })));
|
|
81
|
+
export const getHostingRedirectMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
|
|
77
82
|
export const getHostingResellerSsoWhmMock = () => ({ url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
78
83
|
export const getHostingShellToggleMock = () => ({ enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
79
84
|
export const getHostingShellInfoMock = () => ({ enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
@@ -110,25 +115,25 @@ export const getSitesErrorLogsMock = () => ({ datetime_end: faker.helpers.arrayE
|
|
|
110
115
|
export const getSiteMalwareStatusMock = () => ({ malware_status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), scanner_state: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]) });
|
|
111
116
|
export const getSitesMetricsDimensionAveragedMock = () => ({ date_end: faker.helpers.arrayElement([`${faker.date.past().toISOString().split('.')[0]}Z`, undefined]), date_start: faker.helpers.arrayElement([`${faker.date.past().toISOString().split('.')[0]}Z`, undefined]), dimension: faker.helpers.arrayElement([faker.random.word(), undefined]), elapsed: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), unit: faker.helpers.arrayElement([faker.random.word(), undefined]), metrics: faker.helpers.arrayElement([{ requests_persec: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.datatype.number({ min: undefined, max: undefined }))), undefined]), response_bytes_persec: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.datatype.number({ min: undefined, max: undefined }))), undefined]), response_bytes_average: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.datatype.number({ min: undefined, max: undefined }))), undefined]), response_time_average: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.datatype.number({ min: undefined, max: undefined }))), undefined]) }, undefined]) });
|
|
112
117
|
export const getSitesMetricDimensionsMock = () => ({ date_end: faker.helpers.arrayElement([`${faker.date.past().toISOString().split('.')[0]}Z`, undefined]), date_start: faker.helpers.arrayElement([`${faker.date.past().toISOString().split('.')[0]}Z`, undefined]), elapsed: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), metric: faker.helpers.arrayElement([faker.random.word(), undefined]), dimensions: faker.helpers.arrayElement([{ http_version: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
113
|
-
'
|
|
118
|
+
'cm0322r9p00001rli2e7p6qig': faker.datatype.number({ min: undefined, max: undefined })
|
|
114
119
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), http_verb: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
115
|
-
'
|
|
120
|
+
'cm0322r9p00011rlihgvn0b13': faker.datatype.number({ min: undefined, max: undefined })
|
|
116
121
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), http_host: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
117
|
-
'
|
|
122
|
+
'cm0322r9q00021rlidqgd13hg': faker.datatype.number({ min: undefined, max: undefined })
|
|
118
123
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), http_status: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
119
|
-
'
|
|
124
|
+
'cm0322r9q00031rli5r3f3xal': faker.datatype.number({ min: undefined, max: undefined })
|
|
120
125
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), page_renderer: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
121
|
-
'
|
|
126
|
+
'cm0322r9q00041rlifacl64us': faker.datatype.number({ min: undefined, max: undefined })
|
|
122
127
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), page_is_cached: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
123
|
-
'
|
|
128
|
+
'cm0322r9q00051rliersp3pr0': faker.datatype.number({ min: undefined, max: undefined })
|
|
124
129
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), wp_admin_ajax_action: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
125
|
-
'
|
|
130
|
+
'cm0322r9q00061rli6x84eszp': faker.datatype.number({ min: undefined, max: undefined })
|
|
126
131
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), visitor_asn: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
127
|
-
'
|
|
132
|
+
'cm0322r9q00071rli67mi1y0o': faker.datatype.number({ min: undefined, max: undefined })
|
|
128
133
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), visitor_country_code: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
129
|
-
'
|
|
134
|
+
'cm0322r9q00081rlievxtg0d6': faker.datatype.number({ min: undefined, max: undefined })
|
|
130
135
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]), visitor_is_crawler: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dimension: faker.helpers.arrayElement([{
|
|
131
|
-
'
|
|
136
|
+
'cm0322r9q00091rli27lpc4nr': faker.datatype.number({ min: undefined, max: undefined })
|
|
132
137
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]) }, undefined]) });
|
|
133
138
|
export const getSitePendingDomainDeleteMock = () => ({});
|
|
134
139
|
export const getSitesPerformanceCachepurgeMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
@@ -171,12 +176,21 @@ export const getSshKeyListV2Mock = () => ({ rows: faker.helpers.arrayElement([Ar
|
|
|
171
176
|
export const getSitesListV2Mock = () => ({ total: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), page: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), limit: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), items: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), account_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), account_id: faker.helpers.arrayElement([faker.random.word(), undefined]), base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), confirmed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), datacenter: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), date_added: faker.helpers.arrayElement([faker.random.word(), undefined]), date_modified: faker.helpers.arrayElement([faker.random.word(), undefined]), detected_type: faker.helpers.arrayElement([faker.random.word(), undefined]), docroot: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), edge_cache: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), is_primary: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), last_error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), path: faker.helpers.arrayElement([faker.random.word(), undefined]), handler_404: faker.helpers.arrayElement([faker.random.word(), undefined]), migration_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), pending_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), php_version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), subtype: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), url_is_provisional: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), installed_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), pending_url_data: faker.helpers.arrayElement([{ error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), stage: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), job_failed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), is_temp: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, undefined]), version_ptr: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), jobs: faker.helpers.arrayElement([{}, undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.random.word(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]) }, undefined]) })), undefined]) });
|
|
172
177
|
export const getSitesDomainsV2Mock = () => ({ total: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), page: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), limit: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), domains: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), account_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), authoritative: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), autogen_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), back_reference: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), base_domain: faker.helpers.arrayElement([faker.random.word(), undefined]), date_added: faker.helpers.arrayElement([faker.random.word(), undefined]), date_modified: faker.helpers.arrayElement([faker.random.word(), undefined]), date_ssl_exp: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), docroot: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), dns_status: faker.helpers.arrayElement([faker.random.word(), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]), homedir: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), hosting_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), setup_progress: faker.helpers.arrayElement([{ validate_error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), validate_dns: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), validate_ssl: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), validate_cdn: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), ssl_issuer: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), ssl_status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), ssl_type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
|
|
173
178
|
export const getSitesSecuritySitelockV2Mock = () => ({ addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), source: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), plan: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), billing_code: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), platform_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), upgrade_levels: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]), domains: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]), message: faker.helpers.arrayElement([faker.random.word(), undefined]), has_cdn: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), scope: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]) });
|
|
179
|
+
export const getSitesSshUserListV2Mock = () => ({ users: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ user: faker.helpers.arrayElement([faker.random.word(), undefined]), public_key_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), installed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) })), undefined]) });
|
|
174
180
|
export const getSitesListV3Mock = () => ({ total: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), page: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), limit: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), items: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]), account_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), account_id: faker.helpers.arrayElement([faker.random.word(), undefined]), base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), confirmed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), datacenter: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), date_added: faker.helpers.arrayElement([faker.random.word(), undefined]), date_modified: faker.helpers.arrayElement([faker.random.word(), undefined]), detected_type: faker.helpers.arrayElement([faker.random.word(), undefined]), docroot: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), edge_cache: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), is_primary: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), last_error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), path: faker.helpers.arrayElement([faker.random.word(), undefined]), migration_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), pending_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), php_version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), subtype: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), url_is_provisional: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), installed_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), pending_url_data: faker.helpers.arrayElement([{ error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), stage: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), is_temp: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, undefined]), version_ptr: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.random.word(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]) }, undefined]) })), undefined]) });
|
|
175
181
|
export const getHostingUAPIMSW = () => [
|
|
176
182
|
rest.get('*/v1/account/events', (_req, res, ctx) => {
|
|
177
183
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAccountEventListMock()));
|
|
178
184
|
}), rest.get('*/v1/account/hosting', (_req, res, ctx) => {
|
|
179
185
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAccountHostingListMock()));
|
|
186
|
+
}), rest.get('*/v1/account/public-keys', (_req, res, ctx) => {
|
|
187
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAccountPublicKeysMock()));
|
|
188
|
+
}), rest.post('*/v1/account/public-keys', (_req, res, ctx) => {
|
|
189
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAccountPublicKeyCreateMock()));
|
|
190
|
+
}), rest.get('*/v1/account/public-keys/:publicKeyId', (_req, res, ctx) => {
|
|
191
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAccountPublicKeyMock()));
|
|
192
|
+
}), rest.delete('*/v1/account/public-keys/:publicKeyId', (_req, res, ctx) => {
|
|
193
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAccountPublicKeyDeleteMock()));
|
|
180
194
|
}), rest.get('*/v1/addons/codeguard/:addonId/backups', (_req, res, ctx) => {
|
|
181
195
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getCodeguardBackupListMock()));
|
|
182
196
|
}), rest.post('*/v1/addons/codeguard/:addonId/backups', (_req, res, ctx) => {
|
|
@@ -307,6 +321,8 @@ export const getHostingUAPIMSW = () => [
|
|
|
307
321
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingOnboardingDataUpdateMock()));
|
|
308
322
|
}), rest.get('*/v1/hosting/:hostingId/redirects', (_req, res, ctx) => {
|
|
309
323
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingRedirectsMock()));
|
|
324
|
+
}), rest.delete('*/v1/hosting/:hostingId/redirects', (_req, res, ctx) => {
|
|
325
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingRedirectMock()));
|
|
310
326
|
}), rest.get('*/v1/hosting/:hostingId/reseller/sso/whm', (_req, res, ctx) => {
|
|
311
327
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingResellerSsoWhmMock()));
|
|
312
328
|
}), rest.put('*/v1/hosting/:hostingId/shell', (_req, res, ctx) => {
|
|
@@ -465,6 +481,8 @@ export const getHostingUAPIMSW = () => [
|
|
|
465
481
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesDomainsV2Mock()));
|
|
466
482
|
}), rest.get('*/v2/sites/:siteId/security/sitelock', (_req, res, ctx) => {
|
|
467
483
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSecuritySitelockV2Mock()));
|
|
484
|
+
}), rest.get('*/v2/sites/:siteId/ssh-users', (_req, res, ctx) => {
|
|
485
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSshUserListV2Mock()));
|
|
468
486
|
}), rest.get('*/v3/sites', (_req, res, ctx) => {
|
|
469
487
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesListV3Mock()));
|
|
470
488
|
}),
|
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.955.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SitesListV3200 = {
|
|
9
9
|
total?: number;
|
|
@@ -66,6 +66,9 @@ export declare type SitesListV3200ItemsItem = {
|
|
|
66
66
|
version_ptr?: string | null;
|
|
67
67
|
resources?: SitesListV3200ItemsItemResources;
|
|
68
68
|
};
|
|
69
|
+
export declare type SitesSshUserListV2200 = {
|
|
70
|
+
users?: SSHUsersV2Response[];
|
|
71
|
+
};
|
|
69
72
|
export declare type SitesSecuritySitelockV2200 = {
|
|
70
73
|
addon_id?: number | null;
|
|
71
74
|
source?: string | null;
|
|
@@ -216,18 +219,6 @@ export declare type SshKeyListV2200RowsItem = {
|
|
|
216
219
|
export declare type SshKeyListV2200 = {
|
|
217
220
|
rows?: SshKeyListV2200RowsItem[];
|
|
218
221
|
};
|
|
219
|
-
export declare type HostingSitesV2200 = {
|
|
220
|
-
total?: number;
|
|
221
|
-
page?: number;
|
|
222
|
-
limit?: number;
|
|
223
|
-
/** Maximum number of sites the customer can have. Null means 'unlimited'. */
|
|
224
|
-
max_sites?: number | null;
|
|
225
|
-
/** Current number of sites in use by the customer. its normal for this value to be different than the total number of sites in the list. */
|
|
226
|
-
used_sites?: number;
|
|
227
|
-
/** Remaining number of sites the customer can create. Max sites - used sites. Null means 'unlimited'. */
|
|
228
|
-
available_sites?: number | null;
|
|
229
|
-
items?: HostingSitesV2200ItemsItem[];
|
|
230
|
-
};
|
|
231
222
|
export declare type HostingSitesV2200ItemsItemResourcesStorage = {
|
|
232
223
|
available?: number | null;
|
|
233
224
|
total?: number | null;
|
|
@@ -296,6 +287,18 @@ export declare type HostingSitesV2200ItemsItem = {
|
|
|
296
287
|
jobs?: HostingSitesV2200ItemsItemJobs;
|
|
297
288
|
resources?: HostingSitesV2200ItemsItemResources;
|
|
298
289
|
};
|
|
290
|
+
export declare type HostingSitesV2200 = {
|
|
291
|
+
total?: number;
|
|
292
|
+
page?: number;
|
|
293
|
+
limit?: number;
|
|
294
|
+
/** Maximum number of sites the customer can have. Null means 'unlimited'. */
|
|
295
|
+
max_sites?: number | null;
|
|
296
|
+
/** Current number of sites in use by the customer. its normal for this value to be different than the total number of sites in the list. */
|
|
297
|
+
used_sites?: number;
|
|
298
|
+
/** Remaining number of sites the customer can create. Max sites - used sites. Null means 'unlimited'. */
|
|
299
|
+
available_sites?: number | null;
|
|
300
|
+
items?: HostingSitesV2200ItemsItem[];
|
|
301
|
+
};
|
|
299
302
|
export declare type HostingNameserversV2200HostsItem = {
|
|
300
303
|
host?: string;
|
|
301
304
|
ips?: string[];
|
|
@@ -650,18 +653,6 @@ export declare type SitesMetricDimensions200DimensionsPageRendererItem = {
|
|
|
650
653
|
dimension?: SitesMetricDimensions200DimensionsPageRendererItemDimension;
|
|
651
654
|
timestamp?: number;
|
|
652
655
|
};
|
|
653
|
-
export declare type SitesMetricDimensions200Dimensions = {
|
|
654
|
-
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
655
|
-
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
656
|
-
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
657
|
-
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
658
|
-
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
659
|
-
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
660
|
-
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
661
|
-
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
662
|
-
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
663
|
-
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
664
|
-
};
|
|
665
656
|
export declare type SitesMetricDimensions200DimensionsHttpStatusItemDimension = {
|
|
666
657
|
[key: string]: number;
|
|
667
658
|
};
|
|
@@ -690,6 +681,18 @@ export declare type SitesMetricDimensions200DimensionsHttpVersionItem = {
|
|
|
690
681
|
dimension?: SitesMetricDimensions200DimensionsHttpVersionItemDimension;
|
|
691
682
|
timestamp?: number;
|
|
692
683
|
};
|
|
684
|
+
export declare type SitesMetricDimensions200Dimensions = {
|
|
685
|
+
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
686
|
+
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
687
|
+
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
688
|
+
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
689
|
+
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
690
|
+
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
691
|
+
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
692
|
+
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
693
|
+
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
694
|
+
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
695
|
+
};
|
|
693
696
|
export declare type SitesMetricDimensionsParams = {
|
|
694
697
|
start?: string;
|
|
695
698
|
end?: string;
|
|
@@ -1305,11 +1308,22 @@ export declare type HostingShellToggleBody = {
|
|
|
1305
1308
|
export declare type HostingResellerSsoWhm200 = {
|
|
1306
1309
|
url?: string;
|
|
1307
1310
|
};
|
|
1311
|
+
export declare type HostingRedirect200 = {
|
|
1312
|
+
success?: number;
|
|
1313
|
+
};
|
|
1314
|
+
export declare type HostingRedirectBody = {
|
|
1315
|
+
/** domain to redirect */
|
|
1316
|
+
domain: string;
|
|
1317
|
+
/** docroot pointing to directory of redirect. If undefined cpanel looks up this field */
|
|
1318
|
+
redirect?: string;
|
|
1319
|
+
/** path or or sub directory */
|
|
1320
|
+
src?: string;
|
|
1321
|
+
};
|
|
1308
1322
|
export declare type HostingRedirects200Item = {
|
|
1309
1323
|
docroot?: string;
|
|
1310
1324
|
domain?: string;
|
|
1311
1325
|
http_status_code?: number;
|
|
1312
|
-
|
|
1326
|
+
redirect_www?: boolean;
|
|
1313
1327
|
wildcard?: boolean;
|
|
1314
1328
|
src?: string;
|
|
1315
1329
|
type?: string;
|
|
@@ -2061,6 +2075,64 @@ export declare type CodeguardBackupList200 = {
|
|
|
2061
2075
|
export declare type CodeguardBackupListParams = {
|
|
2062
2076
|
website_id: number;
|
|
2063
2077
|
};
|
|
2078
|
+
export declare type AccountPublicKeyDelete404 = {
|
|
2079
|
+
error?: string;
|
|
2080
|
+
};
|
|
2081
|
+
export declare type AccountPublicKeyDelete200 = {
|
|
2082
|
+
[key: string]: any;
|
|
2083
|
+
};
|
|
2084
|
+
export declare type AccountPublicKey404 = {
|
|
2085
|
+
error?: string;
|
|
2086
|
+
};
|
|
2087
|
+
export declare type AccountPublicKey200 = {
|
|
2088
|
+
/** Public key last modified datetime stamp */
|
|
2089
|
+
date_modified?: string | null;
|
|
2090
|
+
/** Public key is active flag */
|
|
2091
|
+
is_active?: boolean;
|
|
2092
|
+
/** Public key nickname */
|
|
2093
|
+
name?: string;
|
|
2094
|
+
/** public key */
|
|
2095
|
+
public_key?: string;
|
|
2096
|
+
/** Public key ID */
|
|
2097
|
+
id?: number;
|
|
2098
|
+
};
|
|
2099
|
+
export declare type AccountPublicKeyCreate409 = {
|
|
2100
|
+
error?: string;
|
|
2101
|
+
};
|
|
2102
|
+
export declare type AccountPublicKeyCreate200 = {
|
|
2103
|
+
/** Public key last modified datetime stamp */
|
|
2104
|
+
date_modified?: string | null;
|
|
2105
|
+
/** Public key is active flag */
|
|
2106
|
+
is_active?: boolean;
|
|
2107
|
+
/** Public key nickname */
|
|
2108
|
+
name?: string;
|
|
2109
|
+
/** Public key */
|
|
2110
|
+
public_key?: string;
|
|
2111
|
+
/** Public key ID */
|
|
2112
|
+
id?: number;
|
|
2113
|
+
};
|
|
2114
|
+
export declare type AccountPublicKeyCreateBody = {
|
|
2115
|
+
/** Public key nickname */
|
|
2116
|
+
name: string;
|
|
2117
|
+
/** Public key */
|
|
2118
|
+
public_key: string;
|
|
2119
|
+
/** Public key flag toggle (default: true) */
|
|
2120
|
+
is_active?: boolean;
|
|
2121
|
+
};
|
|
2122
|
+
export declare type AccountPublicKeys200PublicKeysItem = {
|
|
2123
|
+
/** Public key last modified datetime stamp */
|
|
2124
|
+
date_modified?: string | null;
|
|
2125
|
+
/** Public key is active flag */
|
|
2126
|
+
is_active?: boolean;
|
|
2127
|
+
/** Public key nickname */
|
|
2128
|
+
name?: string;
|
|
2129
|
+
/** Public key ID */
|
|
2130
|
+
id?: number;
|
|
2131
|
+
public_key?: string;
|
|
2132
|
+
};
|
|
2133
|
+
export declare type AccountPublicKeys200 = {
|
|
2134
|
+
public_keys?: AccountPublicKeys200PublicKeysItem[];
|
|
2135
|
+
};
|
|
2064
2136
|
export declare type AccountHostingList200AccountsItem = {
|
|
2065
2137
|
/** HAL Account back_reference */
|
|
2066
2138
|
prod_inst_id?: string;
|
|
@@ -2125,3 +2197,8 @@ export interface SitesAutoupdatesResponse {
|
|
|
2125
2197
|
core?: boolean | null;
|
|
2126
2198
|
themes?: boolean | null;
|
|
2127
2199
|
}
|
|
2200
|
+
export interface SSHUsersV2Response {
|
|
2201
|
+
user?: string;
|
|
2202
|
+
public_key_id?: number | null;
|
|
2203
|
+
installed?: boolean;
|
|
2204
|
+
}
|