@newfold/huapi-js 2.1199.0 → 2.1204.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 +159 -1
- package/src/index.js +121 -1
- package/src/index.msw.d.ts +11 -1
- package/src/index.msw.js +62 -2
- package/src/index.schemas.d.ts +112 -39
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DefinedInitialDataOptions, DefinedUseInfiniteQueryResult, DefinedUseQueryResult, InfiniteData, QueryKey, UndefinedInitialDataOptions, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
4
|
-
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, ActivityLogParams, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddPrivacy200, AddPrivacyBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupStatus200, BackupStatusParams, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronBody, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbListV2200, DbMultipleUserDatabase200, DbMultipleUserDatabaseBody, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DirectoryPrivacy200, DirectoryPrivacyParams, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorAddBody, DomainDnseditorBody, DomainDnseditorEdit200, DomainDnseditorEditBody, DomainDnseditorList200Item, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsAddBody, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsDeleteBody, HostingDbAuthorizedHostsUpdate200, HostingDbAuthorizedHostsUpdateBody, HostingDomainAssign200, HostingDomainAssignBody, HostingDomainAvailability200, HostingDomainAvailabilityParams, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingDomainsUnassignV2200, HostingDomainsUnassignV2Body, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpBody, HostingFtpList200, HostingFtpUpdate200, HostingFtpUpdateBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirect200, HostingRedirectBody, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSiteAddV2200, HostingSiteAddV2Body, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, HostingVisitors200, HostingVisitorsParams, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListFilesV2200, ListFilesV2Params, ListIndex200, ListIndexParams, Privacy200, PrivacyBody, PrivacyUser200, PrivacyUserBody, RepairDatabase200, RepairDatabaseBody, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteBody, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SitesAccessLogs200, SitesAccessLogsDownloadParams, SitesAccessLogsParams, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesBatchBody, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesDomainsV2200, SitesDomainsV2Params, SitesErrorLogs200, SitesErrorLogsDownloadParams, SitesErrorLogsParams, SitesHasBackups200, SitesInfo200, SitesListV2200, SitesListV3200, SitesListV3Params, SitesMetricDimensions200, SitesMetricDimensionsParams, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockParams, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSecuritySslStatusParams, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SitesVersion200, SshKey200, SshKeyBody, SshKeyFetch200, SshKeyFetchParams, SshKeyGenerate200, SshKeyGenerateBody, SshKeyImport200, SshKeyImportBody, SshKeyImportV2200, SshKeyImportV2Body, SshKeyImportV3200, SshKeyImportV3Body, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, SshKeyV2Body, Sso200, SsoParams, StagingSitePromote200, StagingSitePromoteBody, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
4
|
+
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, ActivityLogParams, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddPrivacy200, AddPrivacyBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupCreateV2200, BackupCreateV2Body, BackupDownloadV2200, BackupDownloadV2Body, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupListV2200, BackupRestoreV2200, BackupRestoreV2Body, BackupStatus200, BackupStatusParams, BackupStatusV2200, BackupStatusV2Params, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronBody, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbListV2200, DbMultipleUserDatabase200, DbMultipleUserDatabaseBody, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DirectoryPrivacy200, DirectoryPrivacyParams, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorAddBody, DomainDnseditorBody, DomainDnseditorEdit200, DomainDnseditorEditBody, DomainDnseditorList200Item, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsAddBody, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsDeleteBody, HostingDbAuthorizedHostsUpdate200, HostingDbAuthorizedHostsUpdateBody, HostingDomainAssign200, HostingDomainAssignBody, HostingDomainAvailability200, HostingDomainAvailabilityParams, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingDomainsUnassignV2200, HostingDomainsUnassignV2Body, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpBody, HostingFtpList200, HostingFtpUpdate200, HostingFtpUpdateBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirect200, HostingRedirectBody, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSiteAddV2200, HostingSiteAddV2Body, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, HostingVisitors200, HostingVisitorsParams, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListFilesV2200, ListFilesV2Params, ListIndex200, ListIndexParams, Privacy200, PrivacyBody, PrivacyUser200, PrivacyUserBody, RepairDatabase200, RepairDatabaseBody, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteBody, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SitesAccessLogs200, SitesAccessLogsDownloadParams, SitesAccessLogsParams, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesBatchBody, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesDomainsV2200, SitesDomainsV2Params, SitesErrorLogs200, SitesErrorLogsDownloadParams, SitesErrorLogsParams, SitesHasBackups200, SitesInfo200, SitesListV2200, SitesListV3200, SitesListV3Params, SitesMetricDimensions200, SitesMetricDimensionsParams, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockParams, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSecuritySslStatusParams, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SitesVersion200, SshKey200, SshKeyBody, SshKeyFetch200, SshKeyFetchParams, SshKeyGenerate200, SshKeyGenerateBody, SshKeyImport200, SshKeyImportBody, SshKeyImportV2200, SshKeyImportV2Body, SshKeyImportV3200, SshKeyImportV3Body, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, SshKeyV2Body, Sso200, SsoParams, StagingSitePromote200, StagingSitePromoteBody, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
5
5
|
declare type AwaitedInput<T> = PromiseLike<T> | T;
|
|
6
6
|
declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
7
7
|
/**
|
|
@@ -754,6 +754,7 @@ export declare function useBackupStatus<TData = Awaited<ReturnType<typeof backup
|
|
|
754
754
|
};
|
|
755
755
|
/**
|
|
756
756
|
* Returns backup list
|
|
757
|
+
* @deprecated
|
|
757
758
|
* @summary Backup list
|
|
758
759
|
*/
|
|
759
760
|
export declare const backupList: (addonId: string, params: BackupListParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupList200>>;
|
|
@@ -5952,6 +5953,163 @@ export declare function useAddonsSitelockSsoV2<TData = Awaited<ReturnType<typeof
|
|
|
5952
5953
|
}): UseQueryResult<TData, TError> & {
|
|
5953
5954
|
queryKey: QueryKey;
|
|
5954
5955
|
};
|
|
5956
|
+
/**
|
|
5957
|
+
* Backup create
|
|
5958
|
+
* @summary Backup create
|
|
5959
|
+
*/
|
|
5960
|
+
export declare const backupCreateV2: (addonId: number, backupCreateV2Body: BackupCreateV2Body, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupCreateV2200>>;
|
|
5961
|
+
export declare const getBackupCreateV2MutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
5962
|
+
mutation?: UseMutationOptions<AxiosResponse<BackupCreateV2200, any>, TError, {
|
|
5963
|
+
addonId: number;
|
|
5964
|
+
data: BackupCreateV2Body;
|
|
5965
|
+
}, TContext> | undefined;
|
|
5966
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
5967
|
+
} | undefined) => UseMutationOptions<AxiosResponse<BackupCreateV2200, any>, TError, {
|
|
5968
|
+
addonId: number;
|
|
5969
|
+
data: BackupCreateV2Body;
|
|
5970
|
+
}, TContext>;
|
|
5971
|
+
export declare type BackupCreateV2MutationResult = NonNullable<Awaited<ReturnType<typeof backupCreateV2>>>;
|
|
5972
|
+
export declare type BackupCreateV2MutationBody = BackupCreateV2Body;
|
|
5973
|
+
export declare type BackupCreateV2MutationError = AxiosError<unknown>;
|
|
5974
|
+
/**
|
|
5975
|
+
* @summary Backup create
|
|
5976
|
+
*/
|
|
5977
|
+
export declare const useBackupCreateV2: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
5978
|
+
mutation?: UseMutationOptions<AxiosResponse<BackupCreateV2200, any>, TError, {
|
|
5979
|
+
addonId: number;
|
|
5980
|
+
data: BackupCreateV2Body;
|
|
5981
|
+
}, TContext> | undefined;
|
|
5982
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
5983
|
+
} | undefined) => UseMutationResult<AxiosResponse<BackupCreateV2200, any>, TError, {
|
|
5984
|
+
addonId: number;
|
|
5985
|
+
data: BackupCreateV2Body;
|
|
5986
|
+
}, TContext>;
|
|
5987
|
+
/**
|
|
5988
|
+
* Backup download
|
|
5989
|
+
* @summary Backup download
|
|
5990
|
+
*/
|
|
5991
|
+
export declare const backupDownloadV2: (addonId: number, backupDownloadV2Body: BackupDownloadV2Body, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupDownloadV2200>>;
|
|
5992
|
+
export declare const getBackupDownloadV2MutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
5993
|
+
mutation?: UseMutationOptions<AxiosResponse<BackupDownloadV2200, any>, TError, {
|
|
5994
|
+
addonId: number;
|
|
5995
|
+
data: BackupDownloadV2Body;
|
|
5996
|
+
}, TContext> | undefined;
|
|
5997
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
5998
|
+
} | undefined) => UseMutationOptions<AxiosResponse<BackupDownloadV2200, any>, TError, {
|
|
5999
|
+
addonId: number;
|
|
6000
|
+
data: BackupDownloadV2Body;
|
|
6001
|
+
}, TContext>;
|
|
6002
|
+
export declare type BackupDownloadV2MutationResult = NonNullable<Awaited<ReturnType<typeof backupDownloadV2>>>;
|
|
6003
|
+
export declare type BackupDownloadV2MutationBody = BackupDownloadV2Body;
|
|
6004
|
+
export declare type BackupDownloadV2MutationError = AxiosError<unknown>;
|
|
6005
|
+
/**
|
|
6006
|
+
* @summary Backup download
|
|
6007
|
+
*/
|
|
6008
|
+
export declare const useBackupDownloadV2: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
6009
|
+
mutation?: UseMutationOptions<AxiosResponse<BackupDownloadV2200, any>, TError, {
|
|
6010
|
+
addonId: number;
|
|
6011
|
+
data: BackupDownloadV2Body;
|
|
6012
|
+
}, TContext> | undefined;
|
|
6013
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
6014
|
+
} | undefined) => UseMutationResult<AxiosResponse<BackupDownloadV2200, any>, TError, {
|
|
6015
|
+
addonId: number;
|
|
6016
|
+
data: BackupDownloadV2Body;
|
|
6017
|
+
}, TContext>;
|
|
6018
|
+
/**
|
|
6019
|
+
* Backup list
|
|
6020
|
+
* @summary Backup list
|
|
6021
|
+
*/
|
|
6022
|
+
export declare const backupListV2: (addonId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupListV2200>>;
|
|
6023
|
+
export declare const getBackupListV2QueryKey: (addonId: number) => readonly [`/v2/addons/${number}/backup/list`];
|
|
6024
|
+
export declare const getBackupListV2QueryOptions: <TData = AxiosResponse<BackupListV2200, any>, TError = AxiosError<unknown, any>>(addonId: number, options?: {
|
|
6025
|
+
query?: Partial<UseQueryOptions<AxiosResponse<BackupListV2200, any>, TError, TData, QueryKey>> | undefined;
|
|
6026
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
6027
|
+
} | undefined) => UseQueryOptions<AxiosResponse<BackupListV2200, any>, TError, TData, QueryKey> & {
|
|
6028
|
+
queryKey: QueryKey;
|
|
6029
|
+
};
|
|
6030
|
+
export declare type BackupListV2QueryResult = NonNullable<Awaited<ReturnType<typeof backupListV2>>>;
|
|
6031
|
+
export declare type BackupListV2QueryError = AxiosError<unknown>;
|
|
6032
|
+
export declare function useBackupListV2<TData = Awaited<ReturnType<typeof backupListV2>>, TError = AxiosError<unknown>>(addonId: number, options: {
|
|
6033
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof backupListV2>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof backupListV2>>, TError, TData>, 'initialData'>;
|
|
6034
|
+
axios?: AxiosRequestConfig;
|
|
6035
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
6036
|
+
queryKey: QueryKey;
|
|
6037
|
+
};
|
|
6038
|
+
export declare function useBackupListV2<TData = Awaited<ReturnType<typeof backupListV2>>, TError = AxiosError<unknown>>(addonId: number, options?: {
|
|
6039
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof backupListV2>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof backupListV2>>, TError, TData>, 'initialData'>;
|
|
6040
|
+
axios?: AxiosRequestConfig;
|
|
6041
|
+
}): UseQueryResult<TData, TError> & {
|
|
6042
|
+
queryKey: QueryKey;
|
|
6043
|
+
};
|
|
6044
|
+
export declare function useBackupListV2<TData = Awaited<ReturnType<typeof backupListV2>>, TError = AxiosError<unknown>>(addonId: number, options?: {
|
|
6045
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof backupListV2>>, TError, TData>>;
|
|
6046
|
+
axios?: AxiosRequestConfig;
|
|
6047
|
+
}): UseQueryResult<TData, TError> & {
|
|
6048
|
+
queryKey: QueryKey;
|
|
6049
|
+
};
|
|
6050
|
+
/**
|
|
6051
|
+
* Backup restore
|
|
6052
|
+
* @summary Backup restore
|
|
6053
|
+
*/
|
|
6054
|
+
export declare const backupRestoreV2: (addonId: number, backupRestoreV2Body: BackupRestoreV2Body, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupRestoreV2200>>;
|
|
6055
|
+
export declare const getBackupRestoreV2MutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
6056
|
+
mutation?: UseMutationOptions<AxiosResponse<BackupRestoreV2200, any>, TError, {
|
|
6057
|
+
addonId: number;
|
|
6058
|
+
data: BackupRestoreV2Body;
|
|
6059
|
+
}, TContext> | undefined;
|
|
6060
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
6061
|
+
} | undefined) => UseMutationOptions<AxiosResponse<BackupRestoreV2200, any>, TError, {
|
|
6062
|
+
addonId: number;
|
|
6063
|
+
data: BackupRestoreV2Body;
|
|
6064
|
+
}, TContext>;
|
|
6065
|
+
export declare type BackupRestoreV2MutationResult = NonNullable<Awaited<ReturnType<typeof backupRestoreV2>>>;
|
|
6066
|
+
export declare type BackupRestoreV2MutationBody = BackupRestoreV2Body;
|
|
6067
|
+
export declare type BackupRestoreV2MutationError = AxiosError<unknown>;
|
|
6068
|
+
/**
|
|
6069
|
+
* @summary Backup restore
|
|
6070
|
+
*/
|
|
6071
|
+
export declare const useBackupRestoreV2: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
6072
|
+
mutation?: UseMutationOptions<AxiosResponse<BackupRestoreV2200, any>, TError, {
|
|
6073
|
+
addonId: number;
|
|
6074
|
+
data: BackupRestoreV2Body;
|
|
6075
|
+
}, TContext> | undefined;
|
|
6076
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
6077
|
+
} | undefined) => UseMutationResult<AxiosResponse<BackupRestoreV2200, any>, TError, {
|
|
6078
|
+
addonId: number;
|
|
6079
|
+
data: BackupRestoreV2Body;
|
|
6080
|
+
}, TContext>;
|
|
6081
|
+
/**
|
|
6082
|
+
* Backup status
|
|
6083
|
+
* @summary Backup status
|
|
6084
|
+
*/
|
|
6085
|
+
export declare const backupStatusV2: (addonId: number, params: BackupStatusV2Params, options?: AxiosRequestConfig) => Promise<AxiosResponse<BackupStatusV2200>>;
|
|
6086
|
+
export declare const getBackupStatusV2QueryKey: (addonId: number, params: BackupStatusV2Params) => readonly [`/v2/addons/${number}/backup/status`, ...BackupStatusV2Params[]];
|
|
6087
|
+
export declare const getBackupStatusV2QueryOptions: <TData = AxiosResponse<BackupStatusV2200, any>, TError = AxiosError<unknown, any>>(addonId: number, params: BackupStatusV2Params, options?: {
|
|
6088
|
+
query?: Partial<UseQueryOptions<AxiosResponse<BackupStatusV2200, any>, TError, TData, QueryKey>> | undefined;
|
|
6089
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
6090
|
+
} | undefined) => UseQueryOptions<AxiosResponse<BackupStatusV2200, any>, TError, TData, QueryKey> & {
|
|
6091
|
+
queryKey: QueryKey;
|
|
6092
|
+
};
|
|
6093
|
+
export declare type BackupStatusV2QueryResult = NonNullable<Awaited<ReturnType<typeof backupStatusV2>>>;
|
|
6094
|
+
export declare type BackupStatusV2QueryError = AxiosError<unknown>;
|
|
6095
|
+
export declare function useBackupStatusV2<TData = Awaited<ReturnType<typeof backupStatusV2>>, TError = AxiosError<unknown>>(addonId: number, params: BackupStatusV2Params, options: {
|
|
6096
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof backupStatusV2>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof backupStatusV2>>, TError, TData>, 'initialData'>;
|
|
6097
|
+
axios?: AxiosRequestConfig;
|
|
6098
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
6099
|
+
queryKey: QueryKey;
|
|
6100
|
+
};
|
|
6101
|
+
export declare function useBackupStatusV2<TData = Awaited<ReturnType<typeof backupStatusV2>>, TError = AxiosError<unknown>>(addonId: number, params: BackupStatusV2Params, options?: {
|
|
6102
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof backupStatusV2>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof backupStatusV2>>, TError, TData>, 'initialData'>;
|
|
6103
|
+
axios?: AxiosRequestConfig;
|
|
6104
|
+
}): UseQueryResult<TData, TError> & {
|
|
6105
|
+
queryKey: QueryKey;
|
|
6106
|
+
};
|
|
6107
|
+
export declare function useBackupStatusV2<TData = Awaited<ReturnType<typeof backupStatusV2>>, TError = AxiosError<unknown>>(addonId: number, params: BackupStatusV2Params, options?: {
|
|
6108
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof backupStatusV2>>, TError, TData>>;
|
|
6109
|
+
axios?: AxiosRequestConfig;
|
|
6110
|
+
}): UseQueryResult<TData, TError> & {
|
|
6111
|
+
queryKey: QueryKey;
|
|
6112
|
+
};
|
|
5955
6113
|
/**
|
|
5956
6114
|
* List all DB names
|
|
5957
6115
|
* @summary Get list of database names
|
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.1204.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -589,6 +589,7 @@ export function useBackupStatus(addonId, params, options) {
|
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
* Returns backup list
|
|
592
|
+
* @deprecated
|
|
592
593
|
* @summary Backup list
|
|
593
594
|
*/
|
|
594
595
|
export const backupList = (addonId, params, options) => {
|
|
@@ -605,6 +606,7 @@ export const getBackupListQueryOptions = (addonId, params, options) => {
|
|
|
605
606
|
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
606
607
|
};
|
|
607
608
|
/**
|
|
609
|
+
* @deprecated
|
|
608
610
|
* @summary Backup list
|
|
609
611
|
*/
|
|
610
612
|
export function useBackupList(addonId, params, options) {
|
|
@@ -4599,6 +4601,124 @@ export function useAddonsSitelockSsoV2(addonId, params, options) {
|
|
|
4599
4601
|
query.queryKey = queryOptions.queryKey;
|
|
4600
4602
|
return query;
|
|
4601
4603
|
}
|
|
4604
|
+
/**
|
|
4605
|
+
* Backup create
|
|
4606
|
+
* @summary Backup create
|
|
4607
|
+
*/
|
|
4608
|
+
export const backupCreateV2 = (addonId, backupCreateV2Body, options) => {
|
|
4609
|
+
return axios.post(`/v2/addons/${addonId}/backup/create`, backupCreateV2Body, options);
|
|
4610
|
+
};
|
|
4611
|
+
export const getBackupCreateV2MutationOptions = (options) => {
|
|
4612
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4613
|
+
const mutationFn = (props) => {
|
|
4614
|
+
const { addonId, data } = props !== null && props !== void 0 ? props : {};
|
|
4615
|
+
return backupCreateV2(addonId, data, axiosOptions);
|
|
4616
|
+
};
|
|
4617
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
4618
|
+
};
|
|
4619
|
+
/**
|
|
4620
|
+
* @summary Backup create
|
|
4621
|
+
*/
|
|
4622
|
+
export const useBackupCreateV2 = (options) => {
|
|
4623
|
+
const mutationOptions = getBackupCreateV2MutationOptions(options);
|
|
4624
|
+
return useMutation(mutationOptions);
|
|
4625
|
+
};
|
|
4626
|
+
/**
|
|
4627
|
+
* Backup download
|
|
4628
|
+
* @summary Backup download
|
|
4629
|
+
*/
|
|
4630
|
+
export const backupDownloadV2 = (addonId, backupDownloadV2Body, options) => {
|
|
4631
|
+
return axios.post(`/v2/addons/${addonId}/backup/download`, backupDownloadV2Body, options);
|
|
4632
|
+
};
|
|
4633
|
+
export const getBackupDownloadV2MutationOptions = (options) => {
|
|
4634
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4635
|
+
const mutationFn = (props) => {
|
|
4636
|
+
const { addonId, data } = props !== null && props !== void 0 ? props : {};
|
|
4637
|
+
return backupDownloadV2(addonId, data, axiosOptions);
|
|
4638
|
+
};
|
|
4639
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
4640
|
+
};
|
|
4641
|
+
/**
|
|
4642
|
+
* @summary Backup download
|
|
4643
|
+
*/
|
|
4644
|
+
export const useBackupDownloadV2 = (options) => {
|
|
4645
|
+
const mutationOptions = getBackupDownloadV2MutationOptions(options);
|
|
4646
|
+
return useMutation(mutationOptions);
|
|
4647
|
+
};
|
|
4648
|
+
/**
|
|
4649
|
+
* Backup list
|
|
4650
|
+
* @summary Backup list
|
|
4651
|
+
*/
|
|
4652
|
+
export const backupListV2 = (addonId, options) => {
|
|
4653
|
+
return axios.get(`/v2/addons/${addonId}/backup/list`, options);
|
|
4654
|
+
};
|
|
4655
|
+
export const getBackupListV2QueryKey = (addonId) => {
|
|
4656
|
+
return [`/v2/addons/${addonId}/backup/list`];
|
|
4657
|
+
};
|
|
4658
|
+
export const getBackupListV2QueryOptions = (addonId, options) => {
|
|
4659
|
+
var _a;
|
|
4660
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4661
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getBackupListV2QueryKey(addonId);
|
|
4662
|
+
const queryFn = ({ signal }) => backupListV2(addonId, Object.assign({ signal }, axiosOptions));
|
|
4663
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
4664
|
+
};
|
|
4665
|
+
/**
|
|
4666
|
+
* @summary Backup list
|
|
4667
|
+
*/
|
|
4668
|
+
export function useBackupListV2(addonId, options) {
|
|
4669
|
+
const queryOptions = getBackupListV2QueryOptions(addonId, options);
|
|
4670
|
+
const query = useQuery(queryOptions);
|
|
4671
|
+
query.queryKey = queryOptions.queryKey;
|
|
4672
|
+
return query;
|
|
4673
|
+
}
|
|
4674
|
+
/**
|
|
4675
|
+
* Backup restore
|
|
4676
|
+
* @summary Backup restore
|
|
4677
|
+
*/
|
|
4678
|
+
export const backupRestoreV2 = (addonId, backupRestoreV2Body, options) => {
|
|
4679
|
+
return axios.post(`/v2/addons/${addonId}/backup/restore`, backupRestoreV2Body, options);
|
|
4680
|
+
};
|
|
4681
|
+
export const getBackupRestoreV2MutationOptions = (options) => {
|
|
4682
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4683
|
+
const mutationFn = (props) => {
|
|
4684
|
+
const { addonId, data } = props !== null && props !== void 0 ? props : {};
|
|
4685
|
+
return backupRestoreV2(addonId, data, axiosOptions);
|
|
4686
|
+
};
|
|
4687
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
4688
|
+
};
|
|
4689
|
+
/**
|
|
4690
|
+
* @summary Backup restore
|
|
4691
|
+
*/
|
|
4692
|
+
export const useBackupRestoreV2 = (options) => {
|
|
4693
|
+
const mutationOptions = getBackupRestoreV2MutationOptions(options);
|
|
4694
|
+
return useMutation(mutationOptions);
|
|
4695
|
+
};
|
|
4696
|
+
/**
|
|
4697
|
+
* Backup status
|
|
4698
|
+
* @summary Backup status
|
|
4699
|
+
*/
|
|
4700
|
+
export const backupStatusV2 = (addonId, params, options) => {
|
|
4701
|
+
return axios.get(`/v2/addons/${addonId}/backup/status`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
4702
|
+
};
|
|
4703
|
+
export const getBackupStatusV2QueryKey = (addonId, params) => {
|
|
4704
|
+
return [`/v2/addons/${addonId}/backup/status`, ...(params ? [params] : [])];
|
|
4705
|
+
};
|
|
4706
|
+
export const getBackupStatusV2QueryOptions = (addonId, params, options) => {
|
|
4707
|
+
var _a;
|
|
4708
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4709
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getBackupStatusV2QueryKey(addonId, params);
|
|
4710
|
+
const queryFn = ({ signal }) => backupStatusV2(addonId, params, Object.assign({ signal }, axiosOptions));
|
|
4711
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(addonId) }, queryOptions);
|
|
4712
|
+
};
|
|
4713
|
+
/**
|
|
4714
|
+
* @summary Backup status
|
|
4715
|
+
*/
|
|
4716
|
+
export function useBackupStatusV2(addonId, params, options) {
|
|
4717
|
+
const queryOptions = getBackupStatusV2QueryOptions(addonId, params, options);
|
|
4718
|
+
const query = useQuery(queryOptions);
|
|
4719
|
+
query.queryKey = queryOptions.queryKey;
|
|
4720
|
+
return query;
|
|
4721
|
+
}
|
|
4602
4722
|
/**
|
|
4603
4723
|
* List all DB names
|
|
4604
4724
|
* @summary Get list of database names
|
package/src/index.msw.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { http } from 'msw';
|
|
2
|
-
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddPrivacy200, AddSiteIpaddress200, AddonCloudflare200, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupInitiate200, BackupList200, BackupStatus200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbListV2200, DbMultipleUserDatabase200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorEdit200, DomainDnseditorList200Item, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainAssign200, HostingDomainAvailability200, HostingDomainsUnassign200, HostingDomainsUnassignV2200, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsCheck200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSiteAddV2200, HostingSitesV2200, HostingSshInfo200, HostingVisitors200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesV2200, ListIndex200, Privacy200, PrivacyUser200, RepairDatabase200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
2
|
+
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddPrivacy200, AddSiteIpaddress200, AddonCloudflare200, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupCreateV2200, BackupDownloadV2200, BackupInitiate200, BackupList200, BackupListV2200, BackupRestoreV2200, BackupStatus200, BackupStatusV2200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbListV2200, DbMultipleUserDatabase200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorEdit200, DomainDnseditorList200Item, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainAssign200, HostingDomainAvailability200, HostingDomainsUnassign200, HostingDomainsUnassignV2200, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsCheck200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSiteAddV2200, HostingSitesV2200, HostingSshInfo200, HostingVisitors200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesV2200, ListIndex200, Privacy200, PrivacyUser200, RepairDatabase200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
3
3
|
export declare const getAccountEventListResponseMock: (overrideResponse?: Partial<AccountEventList200>) => AccountEventList200;
|
|
4
4
|
export declare const getAccountHostingListResponseMock: (overrideResponse?: Partial<AccountHostingList200>) => AccountHostingList200;
|
|
5
5
|
export declare const getAccountPublicKeysResponseMock: (overrideResponse?: Partial<AccountPublicKeys200>) => AccountPublicKeys200;
|
|
@@ -187,6 +187,11 @@ export declare const getSiteStatusResponseMock: (overrideResponse?: Partial<Site
|
|
|
187
187
|
export declare const getSiteUsersResponseMock: (overrideResponse?: Partial<SiteUsers200>) => SiteUsers200;
|
|
188
188
|
export declare const getSitesVersionResponseMock: (overrideResponse?: Partial<SitesVersion200>) => SitesVersion200;
|
|
189
189
|
export declare const getAddonsSitelockSsoV2ResponseMock: (overrideResponse?: Partial<AddonsSitelockSsoV2200>) => AddonsSitelockSsoV2200;
|
|
190
|
+
export declare const getBackupCreateV2ResponseMock: (overrideResponse?: Partial<BackupCreateV2200>) => BackupCreateV2200;
|
|
191
|
+
export declare const getBackupDownloadV2ResponseMock: (overrideResponse?: Partial<BackupDownloadV2200>) => BackupDownloadV2200;
|
|
192
|
+
export declare const getBackupListV2ResponseMock: (overrideResponse?: Partial<BackupListV2200>) => BackupListV2200;
|
|
193
|
+
export declare const getBackupRestoreV2ResponseMock: (overrideResponse?: Partial<BackupRestoreV2200>) => BackupRestoreV2200;
|
|
194
|
+
export declare const getBackupStatusV2ResponseMock: (overrideResponse?: Partial<BackupStatusV2200>) => BackupStatusV2200;
|
|
190
195
|
export declare const getDbListV2ResponseMock: (overrideResponse?: Partial<DbListV2200>) => DbListV2200;
|
|
191
196
|
export declare const getHostingDomainsUnassignV2ResponseMock: (overrideResponse?: Partial<HostingDomainsUnassignV2200>) => HostingDomainsUnassignV2200;
|
|
192
197
|
export declare const getListFilesV2ResponseMock: (overrideResponse?: Partial<ListFilesV2200>) => ListFilesV2200;
|
|
@@ -395,6 +400,11 @@ export declare const getSiteStatusMockHandler: (overrideResponse?: SiteStatus200
|
|
|
395
400
|
export declare const getSiteUsersMockHandler: (overrideResponse?: SiteUsers200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SiteUsers200> | SiteUsers200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
396
401
|
export declare const getSitesVersionMockHandler: (overrideResponse?: SitesVersion200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SitesVersion200> | SitesVersion200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
397
402
|
export declare const getAddonsSitelockSsoV2MockHandler: (overrideResponse?: AddonsSitelockSsoV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AddonsSitelockSsoV2200> | AddonsSitelockSsoV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
403
|
+
export declare const getBackupCreateV2MockHandler: (overrideResponse?: BackupCreateV2200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<BackupCreateV2200> | BackupCreateV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
404
|
+
export declare const getBackupDownloadV2MockHandler: (overrideResponse?: BackupDownloadV2200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<BackupDownloadV2200> | BackupDownloadV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
405
|
+
export declare const getBackupListV2MockHandler: (overrideResponse?: BackupListV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<BackupListV2200> | BackupListV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
406
|
+
export declare const getBackupRestoreV2MockHandler: (overrideResponse?: BackupRestoreV2200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<BackupRestoreV2200> | BackupRestoreV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
407
|
+
export declare const getBackupStatusV2MockHandler: (overrideResponse?: BackupStatusV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<BackupStatusV2200> | BackupStatusV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
398
408
|
export declare const getDbListV2MockHandler: (overrideResponse?: DbListV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbListV2200> | DbListV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
399
409
|
export declare const getHostingDomainsUnassignV2MockHandler: (overrideResponse?: HostingDomainsUnassignV2200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingDomainsUnassignV2200> | HostingDomainsUnassignV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
400
410
|
export declare const getListFilesV2MockHandler: (overrideResponse?: ListFilesV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ListFilesV2200> | ListFilesV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
package/src/index.msw.js
CHANGED
|
@@ -4,7 +4,7 @@ import { __awaiter } from "tslib";
|
|
|
4
4
|
* Do not edit manually.
|
|
5
5
|
* Hosting UAPI
|
|
6
6
|
* Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
|
|
7
|
-
* OpenAPI spec version: 1.
|
|
7
|
+
* OpenAPI spec version: 1.1204.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -50,7 +50,7 @@ export const getDomainDnseditorEditResponseMock = (overrideResponse = {}) => (Ob
|
|
|
50
50
|
export const getDomainDnszoneResetResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
51
51
|
export const getDomainUnassignResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
52
52
|
export const getDomainZoneeditorUrlResponseMock = (overrideResponse = {}) => (Object.assign({ url: faker.word.sample() }, overrideResponse));
|
|
53
|
-
export const getHostingAccountResponseMock = (overrideResponse = {}) => (Object.assign({ account_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), advanced: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), billing: faker.helpers.arrayElement([{ prod_code: faker.helpers.arrayElement([faker.word.sample(), undefined]), product_name: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, undefined]), brand: faker.helpers.arrayElement([faker.word.sample(), undefined]), id: faker.helpers.arrayElement([faker.word.sample(), undefined]), panel: faker.helpers.arrayElement([faker.word.sample(), undefined]), plan_key: faker.helpers.arrayElement([faker.word.sample(), undefined]), platform: faker.helpers.arrayElement([faker.word.sample(), undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.word.sample(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]) }, undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), username: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
53
|
+
export const getHostingAccountResponseMock = (overrideResponse = {}) => (Object.assign({ account_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), advanced: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), billing: faker.helpers.arrayElement([{ prod_code: faker.helpers.arrayElement([faker.word.sample(), undefined]), product_name: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, undefined]), brand: faker.helpers.arrayElement([faker.word.sample(), undefined]), id: faker.helpers.arrayElement([faker.word.sample(), undefined]), panel: faker.helpers.arrayElement([faker.word.sample(), undefined]), plan_key: faker.helpers.arrayElement([faker.word.sample(), undefined]), platform: faker.helpers.arrayElement([faker.word.sample(), undefined]), resources: faker.helpers.arrayElement([{ staging: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.word.sample(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]) }, undefined]), storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.word.sample(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]) }, undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), username: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
54
54
|
export const getActivityLogResponseMock = (overrideResponse = {}) => (Object.assign({ activity: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), data: faker.helpers.arrayElement([faker.word.sample(), undefined]), date_entry: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), event: faker.helpers.arrayElement([faker.word.sample(), undefined]), site_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), tenant_id: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
55
55
|
export const getHostingAddonsResponseMock = (overrideResponse = {}) => (Object.assign({ rows: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ back_reference: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), id: faker.helpers.arrayElement([faker.word.sample(), undefined]), meta: faker.helpers.arrayElement([{
|
|
56
56
|
[faker.string.alphanumeric(5)]: faker.helpers.arrayElement([faker.word.sample(), faker.number.int({ min: undefined, max: undefined }), faker.datatype.boolean()])
|
|
@@ -217,6 +217,11 @@ export const getSiteStatusResponseMock = (overrideResponse = {}) => (Object.assi
|
|
|
217
217
|
export const getSiteUsersResponseMock = (overrideResponse = {}) => (Object.assign({ users: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ display_name: faker.helpers.arrayElement([faker.word.sample(), undefined]), id: faker.number.int({ min: undefined, max: undefined }), meta: faker.helpers.arrayElement([{ maestro_web_pro: faker.helpers.arrayElement([faker.word.sample(), undefined]), maestro_wpp_identifier: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, undefined]), post_count: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), role: faker.word.sample(), user_email: faker.word.sample(), user_id: faker.number.int({ min: undefined, max: undefined }), user_login: faker.word.sample(), user_nicename: faker.word.sample() })) }, overrideResponse));
|
|
218
218
|
export const getSitesVersionResponseMock = (overrideResponse = {}) => (Object.assign({ current: faker.helpers.arrayElement([faker.word.sample(), undefined]), latest: faker.helpers.arrayElement([faker.word.sample(), undefined]), update: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
219
219
|
export const getAddonsSitelockSsoV2ResponseMock = (overrideResponse = {}) => (Object.assign({ site_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), sitelock_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
220
|
+
export const getBackupCreateV2ResponseMock = (overrideResponse = {}) => (Object.assign({ message: faker.helpers.arrayElement([faker.word.sample(), undefined]), tracking_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
221
|
+
export const getBackupDownloadV2ResponseMock = (overrideResponse = {}) => (Object.assign({ message: faker.helpers.arrayElement([faker.word.sample(), undefined]), tracking_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
222
|
+
export const getBackupListV2ResponseMock = (overrideResponse = {}) => (Object.assign({ backups: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ backup_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), date: faker.helpers.arrayElement([faker.word.sample(), undefined]), dbs: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
223
|
+
export const getBackupRestoreV2ResponseMock = (overrideResponse = {}) => (Object.assign({ message: faker.helpers.arrayElement([faker.word.sample(), undefined]), tracking_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
224
|
+
export const getBackupStatusV2ResponseMock = (overrideResponse = {}) => (Object.assign({ message: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
220
225
|
export const getDbListV2ResponseMock = (overrideResponse = {}) => (Object.assign({ databases: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ db: faker.helpers.arrayElement([faker.word.sample(), undefined]), sitename: faker.helpers.arrayElement([faker.word.sample(), undefined]), sizemib: faker.helpers.arrayElement([faker.word.sample(), undefined]), usercount: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), userlist: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ db: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) })), undefined]) }, overrideResponse));
|
|
221
226
|
export const getHostingDomainsUnassignV2ResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
222
227
|
export const getListFilesV2ResponseMock = (overrideResponse = {}) => (Object.assign({ files: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), path: faker.helpers.arrayElement([faker.word.sample(), undefined]), size: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
@@ -2126,6 +2131,56 @@ export const getAddonsSitelockSsoV2MockHandler = (overrideResponse) => {
|
|
|
2126
2131
|
});
|
|
2127
2132
|
}));
|
|
2128
2133
|
};
|
|
2134
|
+
export const getBackupCreateV2MockHandler = (overrideResponse) => {
|
|
2135
|
+
return http.post('*/v2/addons/:addonId/backup/create', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2136
|
+
yield delay(1000);
|
|
2137
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
2138
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
2139
|
+
: getBackupCreateV2ResponseMock()), { status: 200,
|
|
2140
|
+
headers: { 'Content-Type': 'application/json' }
|
|
2141
|
+
});
|
|
2142
|
+
}));
|
|
2143
|
+
};
|
|
2144
|
+
export const getBackupDownloadV2MockHandler = (overrideResponse) => {
|
|
2145
|
+
return http.post('*/v2/addons/:addonId/backup/download', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2146
|
+
yield delay(1000);
|
|
2147
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
2148
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
2149
|
+
: getBackupDownloadV2ResponseMock()), { status: 200,
|
|
2150
|
+
headers: { 'Content-Type': 'application/json' }
|
|
2151
|
+
});
|
|
2152
|
+
}));
|
|
2153
|
+
};
|
|
2154
|
+
export const getBackupListV2MockHandler = (overrideResponse) => {
|
|
2155
|
+
return http.get('*/v2/addons/:addonId/backup/list', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2156
|
+
yield delay(1000);
|
|
2157
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
2158
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
2159
|
+
: getBackupListV2ResponseMock()), { status: 200,
|
|
2160
|
+
headers: { 'Content-Type': 'application/json' }
|
|
2161
|
+
});
|
|
2162
|
+
}));
|
|
2163
|
+
};
|
|
2164
|
+
export const getBackupRestoreV2MockHandler = (overrideResponse) => {
|
|
2165
|
+
return http.post('*/v2/addons/:addonId/backup/restore', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2166
|
+
yield delay(1000);
|
|
2167
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
2168
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
2169
|
+
: getBackupRestoreV2ResponseMock()), { status: 200,
|
|
2170
|
+
headers: { 'Content-Type': 'application/json' }
|
|
2171
|
+
});
|
|
2172
|
+
}));
|
|
2173
|
+
};
|
|
2174
|
+
export const getBackupStatusV2MockHandler = (overrideResponse) => {
|
|
2175
|
+
return http.get('*/v2/addons/:addonId/backup/status', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2176
|
+
yield delay(1000);
|
|
2177
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
2178
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
2179
|
+
: getBackupStatusV2ResponseMock()), { status: 200,
|
|
2180
|
+
headers: { 'Content-Type': 'application/json' }
|
|
2181
|
+
});
|
|
2182
|
+
}));
|
|
2183
|
+
};
|
|
2129
2184
|
export const getDbListV2MockHandler = (overrideResponse) => {
|
|
2130
2185
|
return http.get('*/v2/hosting/:hostingId/db', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2131
2186
|
yield delay(1000);
|
|
@@ -2506,6 +2561,11 @@ export const getHostingUAPIMock = () => [
|
|
|
2506
2561
|
getSiteUsersMockHandler(),
|
|
2507
2562
|
getSitesVersionMockHandler(),
|
|
2508
2563
|
getAddonsSitelockSsoV2MockHandler(),
|
|
2564
|
+
getBackupCreateV2MockHandler(),
|
|
2565
|
+
getBackupDownloadV2MockHandler(),
|
|
2566
|
+
getBackupListV2MockHandler(),
|
|
2567
|
+
getBackupRestoreV2MockHandler(),
|
|
2568
|
+
getBackupStatusV2MockHandler(),
|
|
2509
2569
|
getDbListV2MockHandler(),
|
|
2510
2570
|
getHostingDomainsUnassignV2MockHandler(),
|
|
2511
2571
|
getListFilesV2MockHandler(),
|
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.1204.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SshKeyListV4200RowsItem = {
|
|
9
9
|
authorize?: boolean;
|
|
@@ -203,6 +203,17 @@ export declare type SitesDomainsV2200 = {
|
|
|
203
203
|
export declare type SitesDomainsV2Params = {
|
|
204
204
|
scan?: boolean;
|
|
205
205
|
};
|
|
206
|
+
export declare type SitesListV2200 = {
|
|
207
|
+
items?: SitesListV2200ItemsItem[];
|
|
208
|
+
/** page size */
|
|
209
|
+
limit?: number;
|
|
210
|
+
/** current page number */
|
|
211
|
+
page?: number;
|
|
212
|
+
/** total number of pages */
|
|
213
|
+
pages?: number;
|
|
214
|
+
/** total number of sites returned */
|
|
215
|
+
total?: number;
|
|
216
|
+
};
|
|
206
217
|
/**
|
|
207
218
|
* @nullable
|
|
208
219
|
*/
|
|
@@ -358,17 +369,6 @@ export declare type SitesListV2200ItemsItem = {
|
|
|
358
369
|
*/
|
|
359
370
|
version_ptr?: string | null;
|
|
360
371
|
};
|
|
361
|
-
export declare type SitesListV2200 = {
|
|
362
|
-
items?: SitesListV2200ItemsItem[];
|
|
363
|
-
/** page size */
|
|
364
|
-
limit?: number;
|
|
365
|
-
/** current page number */
|
|
366
|
-
page?: number;
|
|
367
|
-
/** total number of pages */
|
|
368
|
-
pages?: number;
|
|
369
|
-
/** total number of sites returned */
|
|
370
|
-
total?: number;
|
|
371
|
-
};
|
|
372
372
|
export declare type SshKeyV2200 = {
|
|
373
373
|
deleted?: number;
|
|
374
374
|
key_name?: string;
|
|
@@ -457,29 +457,6 @@ export declare type HostingSiteAddV2Body = {
|
|
|
457
457
|
/** Number of PHP workers */
|
|
458
458
|
workers?: number;
|
|
459
459
|
};
|
|
460
|
-
export declare type HostingSitesV2200 = {
|
|
461
|
-
/**
|
|
462
|
-
* Remaining number of sites the customer can create. Max sites - used sites. Null means 'unlimited'.
|
|
463
|
-
* @nullable
|
|
464
|
-
*/
|
|
465
|
-
available_sites?: number | null;
|
|
466
|
-
items?: HostingSitesV2200ItemsItem[];
|
|
467
|
-
/** page size */
|
|
468
|
-
limit?: number;
|
|
469
|
-
/**
|
|
470
|
-
* Maximum number of sites the customer can have. Null means 'unlimited'.
|
|
471
|
-
* @nullable
|
|
472
|
-
*/
|
|
473
|
-
max_sites?: number | null;
|
|
474
|
-
/** current page number */
|
|
475
|
-
page?: number;
|
|
476
|
-
/** total number of pages */
|
|
477
|
-
pages?: number;
|
|
478
|
-
/** total number of sites returned */
|
|
479
|
-
total?: number;
|
|
480
|
-
/** 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. */
|
|
481
|
-
used_sites?: number;
|
|
482
|
-
};
|
|
483
460
|
/**
|
|
484
461
|
* @nullable
|
|
485
462
|
*/
|
|
@@ -635,6 +612,29 @@ export declare type HostingSitesV2200ItemsItem = {
|
|
|
635
612
|
*/
|
|
636
613
|
version_ptr?: string | null;
|
|
637
614
|
};
|
|
615
|
+
export declare type HostingSitesV2200 = {
|
|
616
|
+
/**
|
|
617
|
+
* Remaining number of sites the customer can create. Max sites - used sites. Null means 'unlimited'.
|
|
618
|
+
* @nullable
|
|
619
|
+
*/
|
|
620
|
+
available_sites?: number | null;
|
|
621
|
+
items?: HostingSitesV2200ItemsItem[];
|
|
622
|
+
/** page size */
|
|
623
|
+
limit?: number;
|
|
624
|
+
/**
|
|
625
|
+
* Maximum number of sites the customer can have. Null means 'unlimited'.
|
|
626
|
+
* @nullable
|
|
627
|
+
*/
|
|
628
|
+
max_sites?: number | null;
|
|
629
|
+
/** current page number */
|
|
630
|
+
page?: number;
|
|
631
|
+
/** total number of pages */
|
|
632
|
+
pages?: number;
|
|
633
|
+
/** total number of sites returned */
|
|
634
|
+
total?: number;
|
|
635
|
+
/** 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. */
|
|
636
|
+
used_sites?: number;
|
|
637
|
+
};
|
|
638
638
|
export declare type HostingSitesV2Params = {
|
|
639
639
|
limit?: number;
|
|
640
640
|
page?: number;
|
|
@@ -700,6 +700,57 @@ export declare type DbListV2200DatabasesItem = {
|
|
|
700
700
|
export declare type DbListV2200 = {
|
|
701
701
|
databases?: DbListV2200DatabasesItem[];
|
|
702
702
|
};
|
|
703
|
+
export declare type BackupStatusV2200 = {
|
|
704
|
+
/** @nullable */
|
|
705
|
+
message?: string | null;
|
|
706
|
+
status?: string;
|
|
707
|
+
};
|
|
708
|
+
export declare type BackupStatusV2Params = {
|
|
709
|
+
tracking_id: number;
|
|
710
|
+
};
|
|
711
|
+
export declare type BackupRestoreV2200 = {
|
|
712
|
+
message?: string;
|
|
713
|
+
tracking_id?: number;
|
|
714
|
+
};
|
|
715
|
+
export declare type BackupRestoreV2Body = {
|
|
716
|
+
/** Backup Volume store ID to get the backup */
|
|
717
|
+
backup_id: number;
|
|
718
|
+
/** Restore type */
|
|
719
|
+
restore_type?: string;
|
|
720
|
+
/** Site id */
|
|
721
|
+
site_id?: number;
|
|
722
|
+
};
|
|
723
|
+
export declare type BackupListV2200BackupsItem = {
|
|
724
|
+
backup_id?: number;
|
|
725
|
+
date?: string;
|
|
726
|
+
/** @nullable */
|
|
727
|
+
dbs?: string[] | null;
|
|
728
|
+
type?: string;
|
|
729
|
+
};
|
|
730
|
+
export declare type BackupListV2200 = {
|
|
731
|
+
backups?: BackupListV2200BackupsItem[];
|
|
732
|
+
};
|
|
733
|
+
export declare type BackupDownloadV2200 = {
|
|
734
|
+
message?: string;
|
|
735
|
+
tracking_id?: number;
|
|
736
|
+
};
|
|
737
|
+
export declare type BackupDownloadV2Body = {
|
|
738
|
+
/** Backup Volume store ID to get the backup */
|
|
739
|
+
backup_id: number;
|
|
740
|
+
/** Type of the backup */
|
|
741
|
+
backup_type?: string;
|
|
742
|
+
dbs?: string[];
|
|
743
|
+
/** Site id */
|
|
744
|
+
site_id?: number;
|
|
745
|
+
};
|
|
746
|
+
export declare type BackupCreateV2200 = {
|
|
747
|
+
message?: string;
|
|
748
|
+
tracking_id?: number;
|
|
749
|
+
};
|
|
750
|
+
export declare type BackupCreateV2Body = {
|
|
751
|
+
/** The type of the backup */
|
|
752
|
+
backup_type?: string[];
|
|
753
|
+
};
|
|
703
754
|
export declare type AddonsSitelockSsoV2200 = {
|
|
704
755
|
/** @nullable */
|
|
705
756
|
site_url?: string | null;
|
|
@@ -2895,13 +2946,10 @@ export declare type HostingAccount200ResourcesStorage = {
|
|
|
2895
2946
|
* @nullable
|
|
2896
2947
|
*/
|
|
2897
2948
|
export declare type HostingAccount200Resources = {
|
|
2949
|
+
staging?: HostingAccount200ResourcesStaging;
|
|
2898
2950
|
storage?: HostingAccount200ResourcesStorage;
|
|
2899
2951
|
workers?: HostingAccount200ResourcesWorkers;
|
|
2900
2952
|
} | null;
|
|
2901
|
-
export declare type HostingAccount200Billing = {
|
|
2902
|
-
prod_code?: string;
|
|
2903
|
-
product_name?: string;
|
|
2904
|
-
};
|
|
2905
2953
|
export declare type HostingAccount200 = {
|
|
2906
2954
|
account_id?: string;
|
|
2907
2955
|
advanced?: boolean;
|
|
@@ -2917,6 +2965,31 @@ export declare type HostingAccount200 = {
|
|
|
2917
2965
|
type?: string;
|
|
2918
2966
|
username?: string;
|
|
2919
2967
|
};
|
|
2968
|
+
export declare type HostingAccount200ResourcesStagingWorkers = {
|
|
2969
|
+
/** @nullable */
|
|
2970
|
+
available?: number | null;
|
|
2971
|
+
/** @nullable */
|
|
2972
|
+
total?: number | null;
|
|
2973
|
+
/** @nullable */
|
|
2974
|
+
used?: number | null;
|
|
2975
|
+
};
|
|
2976
|
+
export declare type HostingAccount200ResourcesStagingStorage = {
|
|
2977
|
+
/** @nullable */
|
|
2978
|
+
available?: number | null;
|
|
2979
|
+
/** @nullable */
|
|
2980
|
+
total?: number | null;
|
|
2981
|
+
unit?: string;
|
|
2982
|
+
/** @nullable */
|
|
2983
|
+
used?: number | null;
|
|
2984
|
+
};
|
|
2985
|
+
export declare type HostingAccount200ResourcesStaging = {
|
|
2986
|
+
storage?: HostingAccount200ResourcesStagingStorage;
|
|
2987
|
+
workers?: HostingAccount200ResourcesStagingWorkers;
|
|
2988
|
+
};
|
|
2989
|
+
export declare type HostingAccount200Billing = {
|
|
2990
|
+
prod_code?: string;
|
|
2991
|
+
product_name?: string;
|
|
2992
|
+
};
|
|
2920
2993
|
export declare type DomainZoneeditorUrl200 = {
|
|
2921
2994
|
url: string;
|
|
2922
2995
|
};
|