@newfold/huapi-js 1.955.0 → 1.956.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 +48 -2
- package/src/index.js +50 -1
- package/src/index.msw.d.ts +25 -10
- package/src/index.msw.js +20 -11
- package/src/index.schemas.d.ts +47 -13
- package/src/index.schemas.js +6 -0
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.956.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, 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';
|
|
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, BackupInitiate200, BackupInitiateBody, BackupStatus200, BackupStatusParams, BackupList200, BackupListParams, 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
|
/**
|
|
@@ -336,6 +336,52 @@ export declare const useAddonsSitelockSso: <TData = AxiosResponse<AddonsSitelock
|
|
|
336
336
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
337
337
|
queryKey: QueryKey;
|
|
338
338
|
};
|
|
339
|
+
/**
|
|
340
|
+
* Backup initiate
|
|
341
|
+
* @summary Backup initiate
|
|
342
|
+
*/
|
|
343
|
+
export declare const backupInitiate: (addonId: string, backupInitiateBody: BackupInitiateBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupInitiate200>>;
|
|
344
|
+
export declare type BackupInitiateMutationResult = NonNullable<Awaited<ReturnType<typeof backupInitiate>>>;
|
|
345
|
+
export declare type BackupInitiateMutationBody = BackupInitiateBody;
|
|
346
|
+
export declare type BackupInitiateMutationError = AxiosError<unknown>;
|
|
347
|
+
export declare const useBackupInitiate: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
348
|
+
mutation?: UseMutationOptions<AxiosResponse<BackupInitiate200, any>, TError, {
|
|
349
|
+
addonId: string;
|
|
350
|
+
data: BackupInitiateBody;
|
|
351
|
+
}, TContext> | undefined;
|
|
352
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
353
|
+
} | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<BackupInitiate200, any>, TError, {
|
|
354
|
+
addonId: string;
|
|
355
|
+
data: BackupInitiateBody;
|
|
356
|
+
}, TContext>;
|
|
357
|
+
/**
|
|
358
|
+
* Backup status
|
|
359
|
+
* @summary Backup status
|
|
360
|
+
*/
|
|
361
|
+
export declare const backupStatus: (addonId: string, params: BackupStatusParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupStatus200>>;
|
|
362
|
+
export declare const getBackupStatusQueryKey: (addonId: string, params: BackupStatusParams) => (string | BackupStatusParams)[];
|
|
363
|
+
export declare type BackupStatusQueryResult = NonNullable<Awaited<ReturnType<typeof backupStatus>>>;
|
|
364
|
+
export declare type BackupStatusQueryError = AxiosError<unknown>;
|
|
365
|
+
export declare const useBackupStatus: <TData = AxiosResponse<BackupStatus200, any>, TError = AxiosError<unknown, any>>(addonId: string, params: BackupStatusParams, options?: {
|
|
366
|
+
query?: UseQueryOptions<AxiosResponse<BackupStatus200, any>, TError, TData, QueryKey> | undefined;
|
|
367
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
368
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
369
|
+
queryKey: QueryKey;
|
|
370
|
+
};
|
|
371
|
+
/**
|
|
372
|
+
* Returns backup list
|
|
373
|
+
* @summary Backup list
|
|
374
|
+
*/
|
|
375
|
+
export declare const backupList: (addonId: string, params: BackupListParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupList200>>;
|
|
376
|
+
export declare const getBackupListQueryKey: (addonId: string, params: BackupListParams) => (string | BackupListParams)[];
|
|
377
|
+
export declare type BackupListQueryResult = NonNullable<Awaited<ReturnType<typeof backupList>>>;
|
|
378
|
+
export declare type BackupListQueryError = AxiosError<unknown>;
|
|
379
|
+
export declare const useBackupList: <TData = AxiosResponse<BackupList200, any>, TError = AxiosError<unknown, any>>(addonId: string, params: BackupListParams, options?: {
|
|
380
|
+
query?: UseQueryOptions<AxiosResponse<BackupList200, any>, TError, TData, QueryKey> | undefined;
|
|
381
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
382
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
383
|
+
queryKey: QueryKey;
|
|
384
|
+
};
|
|
339
385
|
/**
|
|
340
386
|
* Decom and delete cloudflare basic addon
|
|
341
387
|
* @summary Uninstall cloudflare basic addon
|
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.956.0
|
|
7
7
|
*/
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
import { useQuery, useInfiniteQuery, useMutation } from '@tanstack/react-query';
|
|
@@ -346,6 +346,55 @@ export const useAddonsSitelockSso = (addonId, options) => {
|
|
|
346
346
|
query.queryKey = queryKey;
|
|
347
347
|
return query;
|
|
348
348
|
};
|
|
349
|
+
/**
|
|
350
|
+
* Backup initiate
|
|
351
|
+
* @summary Backup initiate
|
|
352
|
+
*/
|
|
353
|
+
export const backupInitiate = (addonId, backupInitiateBody, options) => {
|
|
354
|
+
return axios.post(`/v1/addons/${addonId}/backup`, backupInitiateBody, options);
|
|
355
|
+
};
|
|
356
|
+
export const useBackupInitiate = (options) => {
|
|
357
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
358
|
+
const mutationFn = (props) => {
|
|
359
|
+
const { addonId, data } = props !== null && props !== void 0 ? props : {};
|
|
360
|
+
return backupInitiate(addonId, data, axiosOptions);
|
|
361
|
+
};
|
|
362
|
+
return useMutation(mutationFn, mutationOptions);
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* Backup status
|
|
366
|
+
* @summary Backup status
|
|
367
|
+
*/
|
|
368
|
+
export const backupStatus = (addonId, params, options) => {
|
|
369
|
+
return axios.get(`/v1/addons/${addonId}/backup`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
370
|
+
};
|
|
371
|
+
export const getBackupStatusQueryKey = (addonId, params) => [`/v1/addons/${addonId}/backup`, ...(params ? [params] : [])];
|
|
372
|
+
export const useBackupStatus = (addonId, params, options) => {
|
|
373
|
+
var _a;
|
|
374
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
375
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getBackupStatusQueryKey(addonId, params);
|
|
376
|
+
const queryFn = ({ signal }) => backupStatus(addonId, params, Object.assign({ signal }, axiosOptions));
|
|
377
|
+
const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions));
|
|
378
|
+
query.queryKey = queryKey;
|
|
379
|
+
return query;
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Returns backup list
|
|
383
|
+
* @summary Backup list
|
|
384
|
+
*/
|
|
385
|
+
export const backupList = (addonId, params, options) => {
|
|
386
|
+
return axios.get(`/v1/addons/${addonId}/backup/list`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
387
|
+
};
|
|
388
|
+
export const getBackupListQueryKey = (addonId, params) => [`/v1/addons/${addonId}/backup/list`, ...(params ? [params] : [])];
|
|
389
|
+
export const useBackupList = (addonId, params, options) => {
|
|
390
|
+
var _a;
|
|
391
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
392
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getBackupListQueryKey(addonId, params);
|
|
393
|
+
const queryFn = ({ signal }) => backupList(addonId, params, Object.assign({ signal }, axiosOptions));
|
|
394
|
+
const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions));
|
|
395
|
+
query.queryKey = queryKey;
|
|
396
|
+
return query;
|
|
397
|
+
};
|
|
349
398
|
/**
|
|
350
399
|
* Decom and delete cloudflare basic addon
|
|
351
400
|
* @summary Uninstall cloudflare basic addon
|
package/src/index.msw.d.ts
CHANGED
|
@@ -139,6 +139,21 @@ export declare const getAddonsSitelockSsoMock: () => {
|
|
|
139
139
|
sitelock_id: string | undefined;
|
|
140
140
|
url: string | undefined;
|
|
141
141
|
};
|
|
142
|
+
export declare const getBackupInitiateMock: () => {
|
|
143
|
+
message: string | undefined;
|
|
144
|
+
tracking_id: string | undefined;
|
|
145
|
+
};
|
|
146
|
+
export declare const getBackupStatusMock: () => {
|
|
147
|
+
message: string | null | undefined;
|
|
148
|
+
download_url: string | null | undefined;
|
|
149
|
+
status: string | undefined;
|
|
150
|
+
};
|
|
151
|
+
export declare const getBackupListMock: () => {
|
|
152
|
+
home: {
|
|
153
|
+
backup_id: string | undefined;
|
|
154
|
+
time_created: string | undefined;
|
|
155
|
+
}[] | undefined;
|
|
156
|
+
};
|
|
142
157
|
export declare const getAddonsCloudflareMock: () => {
|
|
143
158
|
status: string | undefined;
|
|
144
159
|
};
|
|
@@ -737,61 +752,61 @@ export declare const getSitesMetricDimensionsMock: () => {
|
|
|
737
752
|
dimensions: {
|
|
738
753
|
http_version: {
|
|
739
754
|
dimension: {
|
|
740
|
-
|
|
755
|
+
cm053e9d600001rli7hhe74mu: number;
|
|
741
756
|
} | undefined;
|
|
742
757
|
timestamp: number | undefined;
|
|
743
758
|
}[] | undefined;
|
|
744
759
|
http_verb: {
|
|
745
760
|
dimension: {
|
|
746
|
-
|
|
761
|
+
cm053e9d600011rliat09drbe: number;
|
|
747
762
|
} | undefined;
|
|
748
763
|
timestamp: number | undefined;
|
|
749
764
|
}[] | undefined;
|
|
750
765
|
http_host: {
|
|
751
766
|
dimension: {
|
|
752
|
-
|
|
767
|
+
cm053e9d600021rliejvrdxi5: number;
|
|
753
768
|
} | undefined;
|
|
754
769
|
timestamp: number | undefined;
|
|
755
770
|
}[] | undefined;
|
|
756
771
|
http_status: {
|
|
757
772
|
dimension: {
|
|
758
|
-
|
|
773
|
+
cm053e9d600031rli8kl402or: number;
|
|
759
774
|
} | undefined;
|
|
760
775
|
timestamp: number | undefined;
|
|
761
776
|
}[] | undefined;
|
|
762
777
|
page_renderer: {
|
|
763
778
|
dimension: {
|
|
764
|
-
|
|
779
|
+
cm053e9d600041rli85bz0d0p: number;
|
|
765
780
|
} | undefined;
|
|
766
781
|
timestamp: number | undefined;
|
|
767
782
|
}[] | undefined;
|
|
768
783
|
page_is_cached: {
|
|
769
784
|
dimension: {
|
|
770
|
-
|
|
785
|
+
cm053e9d700051rli0ucpghyu: number;
|
|
771
786
|
} | undefined;
|
|
772
787
|
timestamp: number | undefined;
|
|
773
788
|
}[] | undefined;
|
|
774
789
|
wp_admin_ajax_action: {
|
|
775
790
|
dimension: {
|
|
776
|
-
|
|
791
|
+
cm053e9d700061rli291kejfs: number;
|
|
777
792
|
} | undefined;
|
|
778
793
|
timestamp: number | undefined;
|
|
779
794
|
}[] | undefined;
|
|
780
795
|
visitor_asn: {
|
|
781
796
|
dimension: {
|
|
782
|
-
|
|
797
|
+
cm053e9d700071rligzducxgs: number;
|
|
783
798
|
} | undefined;
|
|
784
799
|
timestamp: number | undefined;
|
|
785
800
|
}[] | undefined;
|
|
786
801
|
visitor_country_code: {
|
|
787
802
|
dimension: {
|
|
788
|
-
|
|
803
|
+
cm053e9d700081rliavb5ggm9: number;
|
|
789
804
|
} | undefined;
|
|
790
805
|
timestamp: number | undefined;
|
|
791
806
|
}[] | undefined;
|
|
792
807
|
visitor_is_crawler: {
|
|
793
808
|
dimension: {
|
|
794
|
-
|
|
809
|
+
cm053e9d700091rli6qmt2mx2: number;
|
|
795
810
|
} | undefined;
|
|
796
811
|
timestamp: number | undefined;
|
|
797
812
|
}[] | undefined;
|
package/src/index.msw.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.956.0
|
|
7
7
|
*/
|
|
8
8
|
import { rest } from 'msw';
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
@@ -28,6 +28,9 @@ export const getCodeguardWebsiteBackupListMock = () => ({ backups: faker.helpers
|
|
|
28
28
|
export const getCodeguardWebsiteBackupCreateMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
29
29
|
export const getCodeguardWebsiteBackupRestoreMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
30
30
|
export const getAddonsSitelockSsoMock = () => ({ site_url: faker.helpers.arrayElement([faker.random.word(), undefined]), sitelock_id: faker.helpers.arrayElement([faker.random.word(), undefined]), url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
31
|
+
export const getBackupInitiateMock = () => ({ message: faker.helpers.arrayElement([faker.random.word(), undefined]), tracking_id: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
32
|
+
export const getBackupStatusMock = () => ({ message: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), download_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
33
|
+
export const getBackupListMock = () => ({ home: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ backup_id: faker.helpers.arrayElement([faker.random.word(), undefined]), time_created: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
|
|
31
34
|
export const getAddonsCloudflareMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
32
35
|
export const getAddonsInfoMock = () => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
33
36
|
export const getAddonsSpamexpertsSsoMock = () => ({ url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
@@ -115,25 +118,25 @@ export const getSitesErrorLogsMock = () => ({ datetime_end: faker.helpers.arrayE
|
|
|
115
118
|
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]) });
|
|
116
119
|
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]) });
|
|
117
120
|
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([{
|
|
118
|
-
'
|
|
121
|
+
'cm053e9d600001rli7hhe74mu': faker.datatype.number({ min: undefined, max: undefined })
|
|
119
122
|
}, 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([{
|
|
120
|
-
'
|
|
123
|
+
'cm053e9d600011rliat09drbe': faker.datatype.number({ min: undefined, max: undefined })
|
|
121
124
|
}, 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([{
|
|
122
|
-
'
|
|
125
|
+
'cm053e9d600021rliejvrdxi5': faker.datatype.number({ min: undefined, max: undefined })
|
|
123
126
|
}, 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([{
|
|
124
|
-
'
|
|
127
|
+
'cm053e9d600031rli8kl402or': faker.datatype.number({ min: undefined, max: undefined })
|
|
125
128
|
}, 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([{
|
|
126
|
-
'
|
|
129
|
+
'cm053e9d600041rli85bz0d0p': faker.datatype.number({ min: undefined, max: undefined })
|
|
127
130
|
}, 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([{
|
|
128
|
-
'
|
|
131
|
+
'cm053e9d700051rli0ucpghyu': faker.datatype.number({ min: undefined, max: undefined })
|
|
129
132
|
}, 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([{
|
|
130
|
-
'
|
|
133
|
+
'cm053e9d700061rli291kejfs': faker.datatype.number({ min: undefined, max: undefined })
|
|
131
134
|
}, 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([{
|
|
132
|
-
'
|
|
135
|
+
'cm053e9d700071rligzducxgs': faker.datatype.number({ min: undefined, max: undefined })
|
|
133
136
|
}, 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([{
|
|
134
|
-
'
|
|
137
|
+
'cm053e9d700081rliavb5ggm9': faker.datatype.number({ min: undefined, max: undefined })
|
|
135
138
|
}, 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([{
|
|
136
|
-
'
|
|
139
|
+
'cm053e9d700091rli6qmt2mx2': faker.datatype.number({ min: undefined, max: undefined })
|
|
137
140
|
}, undefined]), timestamp: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) })), undefined]) }, undefined]) });
|
|
138
141
|
export const getSitePendingDomainDeleteMock = () => ({});
|
|
139
142
|
export const getSitesPerformanceCachepurgeMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
@@ -221,6 +224,12 @@ export const getHostingUAPIMSW = () => [
|
|
|
221
224
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getCodeguardWebsiteBackupRestoreMock()));
|
|
222
225
|
}), rest.get('*/v1/addons/sitelock/:addonId/sso', (_req, res, ctx) => {
|
|
223
226
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAddonsSitelockSsoMock()));
|
|
227
|
+
}), rest.post('*/v1/addons/:addonId/backup', (_req, res, ctx) => {
|
|
228
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getBackupInitiateMock()));
|
|
229
|
+
}), rest.get('*/v1/addons/:addonId/backup', (_req, res, ctx) => {
|
|
230
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getBackupStatusMock()));
|
|
231
|
+
}), rest.get('*/v1/addons/:addonId/backup/list', (_req, res, ctx) => {
|
|
232
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getBackupListMock()));
|
|
224
233
|
}), rest.delete('*/v1/addons/:addonId/cloudflare', (_req, res, ctx) => {
|
|
225
234
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAddonsCloudflareMock()));
|
|
226
235
|
}), rest.get('*/v1/addons/:addonId/info', (_req, res, ctx) => {
|
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.956.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SitesListV3200 = {
|
|
9
9
|
total?: number;
|
|
@@ -639,6 +639,18 @@ export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItem = {
|
|
|
639
639
|
dimension?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension;
|
|
640
640
|
timestamp?: number;
|
|
641
641
|
};
|
|
642
|
+
export declare type SitesMetricDimensions200Dimensions = {
|
|
643
|
+
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
644
|
+
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
645
|
+
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
646
|
+
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
647
|
+
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
648
|
+
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
649
|
+
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
650
|
+
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
651
|
+
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
652
|
+
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
653
|
+
};
|
|
642
654
|
export declare type SitesMetricDimensions200DimensionsPageIsCachedItemDimension = {
|
|
643
655
|
[key: string]: number;
|
|
644
656
|
};
|
|
@@ -681,18 +693,6 @@ export declare type SitesMetricDimensions200DimensionsHttpVersionItem = {
|
|
|
681
693
|
dimension?: SitesMetricDimensions200DimensionsHttpVersionItemDimension;
|
|
682
694
|
timestamp?: number;
|
|
683
695
|
};
|
|
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
|
-
};
|
|
696
696
|
export declare type SitesMetricDimensionsParams = {
|
|
697
697
|
start?: string;
|
|
698
698
|
end?: string;
|
|
@@ -1917,6 +1917,40 @@ export declare type AddonsInfo200 = {
|
|
|
1917
1917
|
export declare type AddonsCloudflare200 = {
|
|
1918
1918
|
status?: string;
|
|
1919
1919
|
};
|
|
1920
|
+
export declare type BackupList200HomeItem = {
|
|
1921
|
+
backup_id?: string;
|
|
1922
|
+
time_created?: string;
|
|
1923
|
+
};
|
|
1924
|
+
export declare type BackupList200 = {
|
|
1925
|
+
home?: BackupList200HomeItem[];
|
|
1926
|
+
};
|
|
1927
|
+
export declare type BackupListBackupType = typeof BackupListBackupType[keyof typeof BackupListBackupType];
|
|
1928
|
+
export declare const BackupListBackupType: {
|
|
1929
|
+
readonly full: "full";
|
|
1930
|
+
readonly home: "home";
|
|
1931
|
+
readonly mysql: "mysql";
|
|
1932
|
+
};
|
|
1933
|
+
export declare type BackupListParams = {
|
|
1934
|
+
backup_type: BackupListBackupType;
|
|
1935
|
+
};
|
|
1936
|
+
export declare type BackupStatus200 = {
|
|
1937
|
+
message?: string | null;
|
|
1938
|
+
download_url?: string | null;
|
|
1939
|
+
status?: string;
|
|
1940
|
+
};
|
|
1941
|
+
export declare type BackupStatusParams = {
|
|
1942
|
+
tracking_id: string;
|
|
1943
|
+
};
|
|
1944
|
+
export declare type BackupInitiate200 = {
|
|
1945
|
+
message?: string;
|
|
1946
|
+
tracking_id?: string;
|
|
1947
|
+
};
|
|
1948
|
+
export declare type BackupInitiateBody = {
|
|
1949
|
+
/** Backup Volume store ID to get the backup */
|
|
1950
|
+
backup_volume_store_id: string;
|
|
1951
|
+
/** The type of the backup */
|
|
1952
|
+
backup_type: string;
|
|
1953
|
+
};
|
|
1920
1954
|
export declare type AddonsSitelockSso200 = {
|
|
1921
1955
|
site_url?: string;
|
|
1922
1956
|
sitelock_id?: string;
|
package/src/index.schemas.js
CHANGED