@newfold/huapi-js 2.1286.0 → 2.1289.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 +126 -1
- package/src/index.js +97 -1
- package/src/index.msw.d.ts +9 -1
- package/src/index.msw.js +49 -1
- package/src/index.schemas.d.ts +122 -53
- package/src/index.schemas.js +10 -0
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DefinedInitialDataOptions, DefinedUseInfiniteQueryResult, DefinedUseQueryResult, InfiniteData, QueryKey, UndefinedInitialDataOptions, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
4
|
-
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, ActivityLogParams, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddPrivacy200, AddPrivacyBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsJetpackValidate200, 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, DomainDnsExport200, DomainDnsExportParams, DomainDnsImport200, DomainDnsImportBody, DomainDnsImportParams, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorAddBody, DomainDnseditorBody, DomainDnseditorEdit200, DomainDnseditorEditBody, DomainDnseditorList200Item, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDns200, HostingAdvancedDnsParams, HostingAdvancedDnsUpdate200, HostingAdvancedDnsUpdateBody, 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, HotlinkconfigAdd200, HotlinkconfigAddBody, HotlinkconfigDelete200, HotlinkconfigDeleteBody, HotlinkconfigDetails200, HotlinkconfigDetailsParams, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListFilesV2200, ListFilesV2Params, ListIndex200, ListIndexParams, PasswordGenerate200, PasswordScore200, PasswordScoreParams, PhpErrors200, PhpErrorsParams, 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, SiteQualityMetrics200, SiteQualityMetricsParams, 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, StagingSitePromote409, 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, AddonsJetpackValidate200, 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, CronLastRun200, CronLastRunParams, 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, DomainDnsExport200, DomainDnsExportParams, DomainDnsImport200, DomainDnsImportBody, DomainDnsImportParams, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorAddBody, DomainDnseditorBody, DomainDnseditorEdit200, DomainDnseditorEditBody, DomainDnseditorList200Item, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDns200, HostingAdvancedDnsParams, HostingAdvancedDnsUpdate200, HostingAdvancedDnsUpdateBody, 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, HostingEmailAdd200, HostingEmailAdd400, HostingEmailAdd403, HostingEmailAdd409, HostingEmailAdd512, HostingEmailAddBody, HostingEmailDelete200, HostingEmailDeleteParams, HostingEmailList200, 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, HotlinkconfigAdd200, HotlinkconfigAddBody, HotlinkconfigDelete200, HotlinkconfigDeleteBody, HotlinkconfigDetails200, HotlinkconfigDetailsParams, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListFilesV2200, ListFilesV2Params, ListIndex200, ListIndexParams, PasswordGenerate200, PasswordScore200, PasswordScoreParams, PhpErrors200, PhpErrorsParams, 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, SiteQualityMetrics200, SiteQualityMetricsParams, 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, StagingSitePromote409, 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
|
/**
|
|
@@ -1902,6 +1902,38 @@ export declare const useCron: <TError = AxiosError<unknown, any>, TContext = unk
|
|
|
1902
1902
|
hostingId: number;
|
|
1903
1903
|
data: CronBody;
|
|
1904
1904
|
}, TContext>;
|
|
1905
|
+
/**
|
|
1906
|
+
* Cron last run
|
|
1907
|
+
* @summary Cron last run
|
|
1908
|
+
*/
|
|
1909
|
+
export declare const cronLastRun: (hostingId: number, params: CronLastRunParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<CronLastRun200>>;
|
|
1910
|
+
export declare const getCronLastRunQueryKey: (hostingId: number, params: CronLastRunParams) => readonly [`/v1/hosting/${number}/crontab/last-run`, ...CronLastRunParams[]];
|
|
1911
|
+
export declare const getCronLastRunQueryOptions: <TData = AxiosResponse<CronLastRun200, any>, TError = AxiosError<unknown, any>>(hostingId: number, params: CronLastRunParams, options?: {
|
|
1912
|
+
query?: Partial<UseQueryOptions<AxiosResponse<CronLastRun200, any>, TError, TData, QueryKey>> | undefined;
|
|
1913
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1914
|
+
} | undefined) => UseQueryOptions<AxiosResponse<CronLastRun200, any>, TError, TData, QueryKey> & {
|
|
1915
|
+
queryKey: QueryKey;
|
|
1916
|
+
};
|
|
1917
|
+
export declare type CronLastRunQueryResult = NonNullable<Awaited<ReturnType<typeof cronLastRun>>>;
|
|
1918
|
+
export declare type CronLastRunQueryError = AxiosError<unknown>;
|
|
1919
|
+
export declare function useCronLastRun<TData = Awaited<ReturnType<typeof cronLastRun>>, TError = AxiosError<unknown>>(hostingId: number, params: CronLastRunParams, options: {
|
|
1920
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof cronLastRun>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof cronLastRun>>, TError, TData>, 'initialData'>;
|
|
1921
|
+
axios?: AxiosRequestConfig;
|
|
1922
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
1923
|
+
queryKey: QueryKey;
|
|
1924
|
+
};
|
|
1925
|
+
export declare function useCronLastRun<TData = Awaited<ReturnType<typeof cronLastRun>>, TError = AxiosError<unknown>>(hostingId: number, params: CronLastRunParams, options?: {
|
|
1926
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof cronLastRun>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof cronLastRun>>, TError, TData>, 'initialData'>;
|
|
1927
|
+
axios?: AxiosRequestConfig;
|
|
1928
|
+
}): UseQueryResult<TData, TError> & {
|
|
1929
|
+
queryKey: QueryKey;
|
|
1930
|
+
};
|
|
1931
|
+
export declare function useCronLastRun<TData = Awaited<ReturnType<typeof cronLastRun>>, TError = AxiosError<unknown>>(hostingId: number, params: CronLastRunParams, options?: {
|
|
1932
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof cronLastRun>>, TError, TData>>;
|
|
1933
|
+
axios?: AxiosRequestConfig;
|
|
1934
|
+
}): UseQueryResult<TData, TError> & {
|
|
1935
|
+
queryKey: QueryKey;
|
|
1936
|
+
};
|
|
1905
1937
|
/**
|
|
1906
1938
|
* Add a new db to an account
|
|
1907
1939
|
* @summary Create a database for an account
|
|
@@ -2847,6 +2879,99 @@ export declare function useHostingEcommerceInfo<TData = Awaited<ReturnType<typeo
|
|
|
2847
2879
|
}): UseQueryResult<TData, TError> & {
|
|
2848
2880
|
queryKey: QueryKey;
|
|
2849
2881
|
};
|
|
2882
|
+
/**
|
|
2883
|
+
* Use to add a new email box, domainalias, alias, forwarder, discard, pipe or list
|
|
2884
|
+
* @summary email add
|
|
2885
|
+
*/
|
|
2886
|
+
export declare const hostingEmailAdd: (hostingId: string, hostingEmailAddBody: HostingEmailAddBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingEmailAdd200>>;
|
|
2887
|
+
export declare const getHostingEmailAddMutationOptions: <TError = AxiosError<HostingEmailAdd512 | HostingEmailAdd409 | HostingEmailAdd403 | HostingEmailAdd400, any>, TContext = unknown>(options?: {
|
|
2888
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailAdd200, any>, TError, {
|
|
2889
|
+
hostingId: string;
|
|
2890
|
+
data: HostingEmailAddBody;
|
|
2891
|
+
}, TContext> | undefined;
|
|
2892
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2893
|
+
} | undefined) => UseMutationOptions<AxiosResponse<HostingEmailAdd200, any>, TError, {
|
|
2894
|
+
hostingId: string;
|
|
2895
|
+
data: HostingEmailAddBody;
|
|
2896
|
+
}, TContext>;
|
|
2897
|
+
export declare type HostingEmailAddMutationResult = NonNullable<Awaited<ReturnType<typeof hostingEmailAdd>>>;
|
|
2898
|
+
export declare type HostingEmailAddMutationBody = HostingEmailAddBody;
|
|
2899
|
+
export declare type HostingEmailAddMutationError = AxiosError<HostingEmailAdd400 | HostingEmailAdd403 | HostingEmailAdd409 | HostingEmailAdd512>;
|
|
2900
|
+
/**
|
|
2901
|
+
* @summary email add
|
|
2902
|
+
*/
|
|
2903
|
+
export declare const useHostingEmailAdd: <TError = AxiosError<HostingEmailAdd512 | HostingEmailAdd409 | HostingEmailAdd403 | HostingEmailAdd400, any>, TContext = unknown>(options?: {
|
|
2904
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailAdd200, any>, TError, {
|
|
2905
|
+
hostingId: string;
|
|
2906
|
+
data: HostingEmailAddBody;
|
|
2907
|
+
}, TContext> | undefined;
|
|
2908
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2909
|
+
} | undefined) => UseMutationResult<AxiosResponse<HostingEmailAdd200, any>, TError, {
|
|
2910
|
+
hostingId: string;
|
|
2911
|
+
data: HostingEmailAddBody;
|
|
2912
|
+
}, TContext>;
|
|
2913
|
+
/**
|
|
2914
|
+
* Lists existing email resources by type
|
|
2915
|
+
* @summary email delete
|
|
2916
|
+
*/
|
|
2917
|
+
export declare const hostingEmailDelete: (hostingId: string, params: HostingEmailDeleteParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingEmailDelete200>>;
|
|
2918
|
+
export declare const getHostingEmailDeleteMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2919
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailDelete200, any>, TError, {
|
|
2920
|
+
hostingId: string;
|
|
2921
|
+
params: HostingEmailDeleteParams;
|
|
2922
|
+
}, TContext> | undefined;
|
|
2923
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2924
|
+
} | undefined) => UseMutationOptions<AxiosResponse<HostingEmailDelete200, any>, TError, {
|
|
2925
|
+
hostingId: string;
|
|
2926
|
+
params: HostingEmailDeleteParams;
|
|
2927
|
+
}, TContext>;
|
|
2928
|
+
export declare type HostingEmailDeleteMutationResult = NonNullable<Awaited<ReturnType<typeof hostingEmailDelete>>>;
|
|
2929
|
+
export declare type HostingEmailDeleteMutationError = AxiosError<unknown>;
|
|
2930
|
+
/**
|
|
2931
|
+
* @summary email delete
|
|
2932
|
+
*/
|
|
2933
|
+
export declare const useHostingEmailDelete: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2934
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailDelete200, any>, TError, {
|
|
2935
|
+
hostingId: string;
|
|
2936
|
+
params: HostingEmailDeleteParams;
|
|
2937
|
+
}, TContext> | undefined;
|
|
2938
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2939
|
+
} | undefined) => UseMutationResult<AxiosResponse<HostingEmailDelete200, any>, TError, {
|
|
2940
|
+
hostingId: string;
|
|
2941
|
+
params: HostingEmailDeleteParams;
|
|
2942
|
+
}, TContext>;
|
|
2943
|
+
/**
|
|
2944
|
+
* Lists existing email resources by type
|
|
2945
|
+
* @summary email list
|
|
2946
|
+
*/
|
|
2947
|
+
export declare const hostingEmailList: (hostingId: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingEmailList200>>;
|
|
2948
|
+
export declare const getHostingEmailListQueryKey: (hostingId: string) => readonly [`/v1/hosting/${string}/emails`];
|
|
2949
|
+
export declare const getHostingEmailListQueryOptions: <TData = AxiosResponse<HostingEmailList200, any>, TError = AxiosError<unknown, any>>(hostingId: string, options?: {
|
|
2950
|
+
query?: Partial<UseQueryOptions<AxiosResponse<HostingEmailList200, any>, TError, TData, QueryKey>> | undefined;
|
|
2951
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2952
|
+
} | undefined) => UseQueryOptions<AxiosResponse<HostingEmailList200, any>, TError, TData, QueryKey> & {
|
|
2953
|
+
queryKey: QueryKey;
|
|
2954
|
+
};
|
|
2955
|
+
export declare type HostingEmailListQueryResult = NonNullable<Awaited<ReturnType<typeof hostingEmailList>>>;
|
|
2956
|
+
export declare type HostingEmailListQueryError = AxiosError<unknown>;
|
|
2957
|
+
export declare function useHostingEmailList<TData = Awaited<ReturnType<typeof hostingEmailList>>, TError = AxiosError<unknown>>(hostingId: string, options: {
|
|
2958
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingEmailList>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof hostingEmailList>>, TError, TData>, 'initialData'>;
|
|
2959
|
+
axios?: AxiosRequestConfig;
|
|
2960
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
2961
|
+
queryKey: QueryKey;
|
|
2962
|
+
};
|
|
2963
|
+
export declare function useHostingEmailList<TData = Awaited<ReturnType<typeof hostingEmailList>>, TError = AxiosError<unknown>>(hostingId: string, options?: {
|
|
2964
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingEmailList>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof hostingEmailList>>, TError, TData>, 'initialData'>;
|
|
2965
|
+
axios?: AxiosRequestConfig;
|
|
2966
|
+
}): UseQueryResult<TData, TError> & {
|
|
2967
|
+
queryKey: QueryKey;
|
|
2968
|
+
};
|
|
2969
|
+
export declare function useHostingEmailList<TData = Awaited<ReturnType<typeof hostingEmailList>>, TError = AxiosError<unknown>>(hostingId: string, options?: {
|
|
2970
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingEmailList>>, TError, TData>>;
|
|
2971
|
+
axios?: AxiosRequestConfig;
|
|
2972
|
+
}): UseQueryResult<TData, TError> & {
|
|
2973
|
+
queryKey: QueryKey;
|
|
2974
|
+
};
|
|
2850
2975
|
/**
|
|
2851
2976
|
* List files under the given directory
|
|
2852
2977
|
* @deprecated
|
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.1289.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -1485,6 +1485,32 @@ export const useCron = (options) => {
|
|
|
1485
1485
|
const mutationOptions = getCronMutationOptions(options);
|
|
1486
1486
|
return useMutation(mutationOptions);
|
|
1487
1487
|
};
|
|
1488
|
+
/**
|
|
1489
|
+
* Cron last run
|
|
1490
|
+
* @summary Cron last run
|
|
1491
|
+
*/
|
|
1492
|
+
export const cronLastRun = (hostingId, params, options) => {
|
|
1493
|
+
return axios.get(`/v1/hosting/${hostingId}/crontab/last-run`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
1494
|
+
};
|
|
1495
|
+
export const getCronLastRunQueryKey = (hostingId, params) => {
|
|
1496
|
+
return [`/v1/hosting/${hostingId}/crontab/last-run`, ...(params ? [params] : [])];
|
|
1497
|
+
};
|
|
1498
|
+
export const getCronLastRunQueryOptions = (hostingId, params, options) => {
|
|
1499
|
+
var _a;
|
|
1500
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1501
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getCronLastRunQueryKey(hostingId, params);
|
|
1502
|
+
const queryFn = ({ signal }) => cronLastRun(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
1503
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
1504
|
+
};
|
|
1505
|
+
/**
|
|
1506
|
+
* @summary Cron last run
|
|
1507
|
+
*/
|
|
1508
|
+
export function useCronLastRun(hostingId, params, options) {
|
|
1509
|
+
const queryOptions = getCronLastRunQueryOptions(hostingId, params, options);
|
|
1510
|
+
const query = useQuery(queryOptions);
|
|
1511
|
+
query.queryKey = queryOptions.queryKey;
|
|
1512
|
+
return query;
|
|
1513
|
+
}
|
|
1488
1514
|
/**
|
|
1489
1515
|
* Add a new db to an account
|
|
1490
1516
|
* @summary Create a database for an account
|
|
@@ -2189,6 +2215,76 @@ export function useHostingEcommerceInfo(hostingId, options) {
|
|
|
2189
2215
|
query.queryKey = queryOptions.queryKey;
|
|
2190
2216
|
return query;
|
|
2191
2217
|
}
|
|
2218
|
+
/**
|
|
2219
|
+
* Use to add a new email box, domainalias, alias, forwarder, discard, pipe or list
|
|
2220
|
+
* @summary email add
|
|
2221
|
+
*/
|
|
2222
|
+
export const hostingEmailAdd = (hostingId, hostingEmailAddBody, options) => {
|
|
2223
|
+
return axios.post(`/v1/hosting/${hostingId}/emails`, hostingEmailAddBody, options);
|
|
2224
|
+
};
|
|
2225
|
+
export const getHostingEmailAddMutationOptions = (options) => {
|
|
2226
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2227
|
+
const mutationFn = (props) => {
|
|
2228
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
2229
|
+
return hostingEmailAdd(hostingId, data, axiosOptions);
|
|
2230
|
+
};
|
|
2231
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
2232
|
+
};
|
|
2233
|
+
/**
|
|
2234
|
+
* @summary email add
|
|
2235
|
+
*/
|
|
2236
|
+
export const useHostingEmailAdd = (options) => {
|
|
2237
|
+
const mutationOptions = getHostingEmailAddMutationOptions(options);
|
|
2238
|
+
return useMutation(mutationOptions);
|
|
2239
|
+
};
|
|
2240
|
+
/**
|
|
2241
|
+
* Lists existing email resources by type
|
|
2242
|
+
* @summary email delete
|
|
2243
|
+
*/
|
|
2244
|
+
export const hostingEmailDelete = (hostingId, params, options) => {
|
|
2245
|
+
return axios.delete(`/v1/hosting/${hostingId}/emails`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
2246
|
+
};
|
|
2247
|
+
export const getHostingEmailDeleteMutationOptions = (options) => {
|
|
2248
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2249
|
+
const mutationFn = (props) => {
|
|
2250
|
+
const { hostingId, params } = props !== null && props !== void 0 ? props : {};
|
|
2251
|
+
return hostingEmailDelete(hostingId, params, axiosOptions);
|
|
2252
|
+
};
|
|
2253
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
2254
|
+
};
|
|
2255
|
+
/**
|
|
2256
|
+
* @summary email delete
|
|
2257
|
+
*/
|
|
2258
|
+
export const useHostingEmailDelete = (options) => {
|
|
2259
|
+
const mutationOptions = getHostingEmailDeleteMutationOptions(options);
|
|
2260
|
+
return useMutation(mutationOptions);
|
|
2261
|
+
};
|
|
2262
|
+
/**
|
|
2263
|
+
* Lists existing email resources by type
|
|
2264
|
+
* @summary email list
|
|
2265
|
+
*/
|
|
2266
|
+
export const hostingEmailList = (hostingId, options) => {
|
|
2267
|
+
return axios.get(`/v1/hosting/${hostingId}/emails`, options);
|
|
2268
|
+
};
|
|
2269
|
+
export const getHostingEmailListQueryKey = (hostingId) => {
|
|
2270
|
+
return [`/v1/hosting/${hostingId}/emails`];
|
|
2271
|
+
};
|
|
2272
|
+
export const getHostingEmailListQueryOptions = (hostingId, options) => {
|
|
2273
|
+
var _a;
|
|
2274
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2275
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingEmailListQueryKey(hostingId);
|
|
2276
|
+
const queryFn = ({ signal }) => hostingEmailList(hostingId, Object.assign({ signal }, axiosOptions));
|
|
2277
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
2278
|
+
};
|
|
2279
|
+
/**
|
|
2280
|
+
* @summary email list
|
|
2281
|
+
*/
|
|
2282
|
+
export function useHostingEmailList(hostingId, options) {
|
|
2283
|
+
const queryOptions = getHostingEmailListQueryOptions(hostingId, options);
|
|
2284
|
+
const query = useQuery(queryOptions);
|
|
2285
|
+
query.queryKey = queryOptions.queryKey;
|
|
2286
|
+
return query;
|
|
2287
|
+
}
|
|
2192
2288
|
/**
|
|
2193
2289
|
* List files under the given directory
|
|
2194
2290
|
* @deprecated
|
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, AddonsJetpackValidate200, 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, DomainDnsExport200, DomainDnsImport200, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorEdit200, DomainDnseditorList200Item, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, HostingAccount200, HostingAddons200, HostingAdvancedDns200, HostingAdvancedDnsUpdate200, 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, HotlinkconfigAdd200, HotlinkconfigDelete200, HotlinkconfigDetails200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesV2200, ListIndex200, PasswordGenerate200, PasswordScore200, PhpErrors200, Privacy200, PrivacyUser200, RepairDatabase200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteQualityMetrics200, 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, AddonsJetpackValidate200, 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, CronLastRun200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbListV2200, DbMultipleUserDatabase200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainDnsExport200, DomainDnsImport200, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorEdit200, DomainDnseditorList200Item, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, HostingAccount200, HostingAddons200, HostingAdvancedDns200, HostingAdvancedDnsUpdate200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainAssign200, HostingDomainAvailability200, HostingDomainsUnassign200, HostingDomainsUnassignV2200, HostingEcommerceInfo200, HostingEmailAdd200, HostingEmailDelete200, HostingEmailList200, 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, HotlinkconfigAdd200, HotlinkconfigDelete200, HotlinkconfigDetails200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesV2200, ListIndex200, PasswordGenerate200, PasswordScore200, PhpErrors200, Privacy200, PrivacyUser200, RepairDatabase200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteQualityMetrics200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
3
3
|
export declare const getAccountEventListResponseMock: (overrideResponse?: Partial<AccountEventList200>) => AccountEventList200;
|
|
4
4
|
export declare const getAccountHostingListResponseMock: (overrideResponse?: Partial<AccountHostingList200>) => AccountHostingList200;
|
|
5
5
|
export declare const getAccountPublicKeysResponseMock: (overrideResponse?: Partial<AccountPublicKeys200>) => AccountPublicKeys200;
|
|
@@ -61,6 +61,7 @@ export declare const getListCronsResponseMock: (overrideResponse?: Partial<ListC
|
|
|
61
61
|
export declare const getAddCronResponseMock: (overrideResponse?: Partial<AddCron200>) => AddCron200;
|
|
62
62
|
export declare const getUpdateCronResponseMock: (overrideResponse?: Partial<UpdateCron200>) => UpdateCron200;
|
|
63
63
|
export declare const getCronResponseMock: (overrideResponse?: Partial<Cron200>) => Cron200;
|
|
64
|
+
export declare const getCronLastRunResponseMock: (overrideResponse?: Partial<CronLastRun200>) => CronLastRun200;
|
|
64
65
|
export declare const getDbAddResponseMock: (overrideResponse?: Partial<DbAdd200>) => DbAdd200;
|
|
65
66
|
export declare const getDbResponseMock: (overrideResponse?: Partial<Db200>) => Db200;
|
|
66
67
|
export declare const getDbListResponseMock: (overrideResponse?: Partial<DbList200>) => DbList200;
|
|
@@ -91,6 +92,9 @@ export declare const getDomainDnsExportResponseMock: (overrideResponse?: Partial
|
|
|
91
92
|
export declare const getDomainDnsImportResponseMock: (overrideResponse?: Partial<DomainDnsImport200>) => DomainDnsImport200;
|
|
92
93
|
export declare const getHostingDomainsUnassignResponseMock: (overrideResponse?: Partial<HostingDomainsUnassign200>) => HostingDomainsUnassign200;
|
|
93
94
|
export declare const getHostingEcommerceInfoResponseMock: (overrideResponse?: Partial<HostingEcommerceInfo200>) => HostingEcommerceInfo200;
|
|
95
|
+
export declare const getHostingEmailAddResponseMock: (overrideResponse?: Partial<HostingEmailAdd200>) => HostingEmailAdd200;
|
|
96
|
+
export declare const getHostingEmailDeleteResponseMock: (overrideResponse?: Partial<HostingEmailDelete200>) => HostingEmailDelete200;
|
|
97
|
+
export declare const getHostingEmailListResponseMock: (overrideResponse?: Partial<HostingEmailList200>) => HostingEmailList200;
|
|
94
98
|
export declare const getListFilesResponseMock: (overrideResponse?: Partial<ListFiles200>) => ListFiles200;
|
|
95
99
|
export declare const getHostingFixownershipResponseMock: (overrideResponse?: Partial<HostingFixownership200>) => HostingFixownership200;
|
|
96
100
|
export declare const getHostingFtpListResponseMock: (overrideResponse?: Partial<HostingFtpList200>) => HostingFtpList200;
|
|
@@ -284,6 +288,7 @@ export declare const getListCronsMockHandler: (overrideResponse?: ListCrons200 |
|
|
|
284
288
|
export declare const getAddCronMockHandler: (overrideResponse?: AddCron200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<AddCron200> | AddCron200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
285
289
|
export declare const getUpdateCronMockHandler: (overrideResponse?: UpdateCron200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<UpdateCron200> | UpdateCron200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
286
290
|
export declare const getCronMockHandler: (overrideResponse?: Cron200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<Cron200> | Cron200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
291
|
+
export declare const getCronLastRunMockHandler: (overrideResponse?: CronLastRun200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<CronLastRun200> | CronLastRun200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
287
292
|
export declare const getDbAddMockHandler: (overrideResponse?: DbAdd200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<DbAdd200> | DbAdd200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
288
293
|
export declare const getDbMockHandler: (overrideResponse?: Db200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<Db200> | Db200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
289
294
|
export declare const getDbListMockHandler: (overrideResponse?: DbList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbList200> | DbList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
@@ -314,6 +319,9 @@ export declare const getDomainDnsExportMockHandler: (overrideResponse?: DomainDn
|
|
|
314
319
|
export declare const getDomainDnsImportMockHandler: (overrideResponse?: DomainDnsImport200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<DomainDnsImport200> | DomainDnsImport200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
315
320
|
export declare const getHostingDomainsUnassignMockHandler: (overrideResponse?: HostingDomainsUnassign200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingDomainsUnassign200> | HostingDomainsUnassign200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
316
321
|
export declare const getHostingEcommerceInfoMockHandler: (overrideResponse?: HostingEcommerceInfo200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEcommerceInfo200> | HostingEcommerceInfo200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
322
|
+
export declare const getHostingEmailAddMockHandler: (overrideResponse?: HostingEmailAdd200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingEmailAdd200> | HostingEmailAdd200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
323
|
+
export declare const getHostingEmailDeleteMockHandler: (overrideResponse?: HostingEmailDelete200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<HostingEmailDelete200> | HostingEmailDelete200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
324
|
+
export declare const getHostingEmailListMockHandler: (overrideResponse?: HostingEmailList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEmailList200> | HostingEmailList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
317
325
|
export declare const getListFilesMockHandler: (overrideResponse?: ListFiles200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ListFiles200> | ListFiles200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
318
326
|
export declare const getHostingFixownershipMockHandler: (overrideResponse?: HostingFixownership200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingFixownership200> | HostingFixownership200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
319
327
|
export declare const getHostingFtpListMockHandler: (overrideResponse?: HostingFtpList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingFtpList200> | HostingFtpList200) | 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.1289.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -71,6 +71,7 @@ export const getListCronsResponseMock = (overrideResponse = {}) => (Object.assig
|
|
|
71
71
|
export const getAddCronResponseMock = (overrideResponse = {}) => (Object.assign({ key: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
72
72
|
export const getUpdateCronResponseMock = (overrideResponse = {}) => (Object.assign({ key: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
73
73
|
export const getCronResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
74
|
+
export const getCronLastRunResponseMock = (overrideResponse = {}) => (Object.assign({ last_run: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
74
75
|
export const getDbAddResponseMock = (overrideResponse = {}) => (Object.assign({ dbname: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
75
76
|
export const getDbResponseMock = (overrideResponse = {}) => (Object.assign({ dbname: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
76
77
|
export const getDbListResponseMock = (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]), size: faker.helpers.arrayElement([faker.word.sample(), undefined]), sizemeg: 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]), status: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
@@ -101,6 +102,9 @@ export const getDomainDnsExportResponseMock = (overrideResponse = {}) => (Object
|
|
|
101
102
|
export const getDomainDnsImportResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
102
103
|
export const getHostingDomainsUnassignResponseMock = (overrideResponse = {}) => (Object.assign({ queued: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
103
104
|
export const getHostingEcommerceInfoResponseMock = (overrideResponse = {}) => (Object.assign({ addon_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), back_ref: faker.helpers.arrayElement([faker.word.sample(), undefined]), level: faker.helpers.arrayElement([faker.word.sample(), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), subtype: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
105
|
+
export const getHostingEmailAddResponseMock = (overrideResponse = {}) => (Object.assign({ address: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
106
|
+
export const getHostingEmailDeleteResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
107
|
+
export const getHostingEmailListResponseMock = (overrideResponse = {}) => (Object.assign({ rows: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ address: faker.helpers.arrayElement([faker.word.sample(), undefined]), disk_used_kib: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), files: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
104
108
|
export const getListFilesResponseMock = (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));
|
|
105
109
|
export const getHostingFixownershipResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
106
110
|
export const getHostingFtpListResponseMock = (overrideResponse = {}) => (Object.assign({ ftp_accounts: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain: faker.helpers.arrayElement([faker.word.sample(), undefined]), homedir: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]), server_name: faker.helpers.arrayElement([faker.word.sample(), undefined]), special_ftp_accounts: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain: faker.helpers.arrayElement([faker.word.sample(), undefined]), homedir: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
@@ -863,6 +867,16 @@ export const getCronMockHandler = (overrideResponse) => {
|
|
|
863
867
|
});
|
|
864
868
|
}));
|
|
865
869
|
};
|
|
870
|
+
export const getCronLastRunMockHandler = (overrideResponse) => {
|
|
871
|
+
return http.get('*/v1/hosting/:hostingId/crontab/last-run', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
872
|
+
yield delay(1000);
|
|
873
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
874
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
875
|
+
: getCronLastRunResponseMock()), { status: 200,
|
|
876
|
+
headers: { 'Content-Type': 'application/json' }
|
|
877
|
+
});
|
|
878
|
+
}));
|
|
879
|
+
};
|
|
866
880
|
export const getDbAddMockHandler = (overrideResponse) => {
|
|
867
881
|
return http.post('*/v1/hosting/:hostingId/db', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
868
882
|
yield delay(1000);
|
|
@@ -1163,6 +1177,36 @@ export const getHostingEcommerceInfoMockHandler = (overrideResponse) => {
|
|
|
1163
1177
|
});
|
|
1164
1178
|
}));
|
|
1165
1179
|
};
|
|
1180
|
+
export const getHostingEmailAddMockHandler = (overrideResponse) => {
|
|
1181
|
+
return http.post('*/v1/hosting/:hostingId/emails', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1182
|
+
yield delay(1000);
|
|
1183
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
1184
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
1185
|
+
: getHostingEmailAddResponseMock()), { status: 200,
|
|
1186
|
+
headers: { 'Content-Type': 'application/json' }
|
|
1187
|
+
});
|
|
1188
|
+
}));
|
|
1189
|
+
};
|
|
1190
|
+
export const getHostingEmailDeleteMockHandler = (overrideResponse) => {
|
|
1191
|
+
return http.delete('*/v1/hosting/:hostingId/emails', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1192
|
+
yield delay(1000);
|
|
1193
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
1194
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
1195
|
+
: getHostingEmailDeleteResponseMock()), { status: 200,
|
|
1196
|
+
headers: { 'Content-Type': 'application/json' }
|
|
1197
|
+
});
|
|
1198
|
+
}));
|
|
1199
|
+
};
|
|
1200
|
+
export const getHostingEmailListMockHandler = (overrideResponse) => {
|
|
1201
|
+
return http.get('*/v1/hosting/:hostingId/emails', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1202
|
+
yield delay(1000);
|
|
1203
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
1204
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
1205
|
+
: getHostingEmailListResponseMock()), { status: 200,
|
|
1206
|
+
headers: { 'Content-Type': 'application/json' }
|
|
1207
|
+
});
|
|
1208
|
+
}));
|
|
1209
|
+
};
|
|
1166
1210
|
export const getListFilesMockHandler = (overrideResponse) => {
|
|
1167
1211
|
return http.get('*/v1/hosting/:hostingId/files', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1168
1212
|
yield delay(1000);
|
|
@@ -2565,6 +2609,7 @@ export const getHostingUAPIMock = () => [
|
|
|
2565
2609
|
getAddCronMockHandler(),
|
|
2566
2610
|
getUpdateCronMockHandler(),
|
|
2567
2611
|
getCronMockHandler(),
|
|
2612
|
+
getCronLastRunMockHandler(),
|
|
2568
2613
|
getDbAddMockHandler(),
|
|
2569
2614
|
getDbMockHandler(),
|
|
2570
2615
|
getDbListMockHandler(),
|
|
@@ -2595,6 +2640,9 @@ export const getHostingUAPIMock = () => [
|
|
|
2595
2640
|
getDomainDnsImportMockHandler(),
|
|
2596
2641
|
getHostingDomainsUnassignMockHandler(),
|
|
2597
2642
|
getHostingEcommerceInfoMockHandler(),
|
|
2643
|
+
getHostingEmailAddMockHandler(),
|
|
2644
|
+
getHostingEmailDeleteMockHandler(),
|
|
2645
|
+
getHostingEmailListMockHandler(),
|
|
2598
2646
|
getListFilesMockHandler(),
|
|
2599
2647
|
getHostingFixownershipMockHandler(),
|
|
2600
2648
|
getHostingFtpListMockHandler(),
|
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.1289.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SshKeyListV4200RowsItem = {
|
|
9
9
|
authorize?: boolean;
|
|
@@ -1090,9 +1090,6 @@ export declare type SiteQualityMetrics200AspectScores = {
|
|
|
1090
1090
|
performance?: number;
|
|
1091
1091
|
seo?: number;
|
|
1092
1092
|
};
|
|
1093
|
-
export declare type SiteQualityMetrics200AspectDetails = {
|
|
1094
|
-
performance?: SiteQualityMetrics200AspectDetailsPerformance;
|
|
1095
|
-
};
|
|
1096
1093
|
export declare type SiteQualityMetrics200 = {
|
|
1097
1094
|
aspect_details: SiteQualityMetrics200AspectDetails;
|
|
1098
1095
|
aspect_scores: SiteQualityMetrics200AspectScores;
|
|
@@ -1123,6 +1120,9 @@ export declare type SiteQualityMetrics200AspectDetailsPerformance = {
|
|
|
1123
1120
|
'speed-index'?: SiteQualityMetrics200AspectDetailsPerformanceSpeedIndex;
|
|
1124
1121
|
'total-blocking-time'?: SiteQualityMetrics200AspectDetailsPerformanceTotalBlockingTime;
|
|
1125
1122
|
};
|
|
1123
|
+
export declare type SiteQualityMetrics200AspectDetails = {
|
|
1124
|
+
performance?: SiteQualityMetrics200AspectDetailsPerformance;
|
|
1125
|
+
};
|
|
1126
1126
|
export declare type SiteQualityMetricsStrategy = typeof SiteQualityMetricsStrategy[keyof typeof SiteQualityMetricsStrategy];
|
|
1127
1127
|
export declare const SiteQualityMetricsStrategy: {
|
|
1128
1128
|
readonly MOBILE: "MOBILE";
|
|
@@ -1258,18 +1258,6 @@ export declare type SitesMetricDimensions200DimensionsVisitorAsnItem = {
|
|
|
1258
1258
|
dimension?: SitesMetricDimensions200DimensionsVisitorAsnItemDimension;
|
|
1259
1259
|
timestamp?: number;
|
|
1260
1260
|
};
|
|
1261
|
-
export declare type SitesMetricDimensions200Dimensions = {
|
|
1262
|
-
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
1263
|
-
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
1264
|
-
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
1265
|
-
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
1266
|
-
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
1267
|
-
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
1268
|
-
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
1269
|
-
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
1270
|
-
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
1271
|
-
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
1272
|
-
};
|
|
1273
1261
|
export declare type SitesMetricDimensions200DimensionsPageRendererItemDimension = {
|
|
1274
1262
|
[key: string]: number;
|
|
1275
1263
|
};
|
|
@@ -1312,6 +1300,18 @@ export declare type SitesMetricDimensions200DimensionsHttpHostItem = {
|
|
|
1312
1300
|
dimension?: SitesMetricDimensions200DimensionsHttpHostItemDimension;
|
|
1313
1301
|
timestamp?: number;
|
|
1314
1302
|
};
|
|
1303
|
+
export declare type SitesMetricDimensions200Dimensions = {
|
|
1304
|
+
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
1305
|
+
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
1306
|
+
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
1307
|
+
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
1308
|
+
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
1309
|
+
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
1310
|
+
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
1311
|
+
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
1312
|
+
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
1313
|
+
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
1314
|
+
};
|
|
1315
1315
|
export declare type SitesMetricDimensionsParams = {
|
|
1316
1316
|
start?: string;
|
|
1317
1317
|
end?: string;
|
|
@@ -1898,15 +1898,6 @@ export declare type HostingVisitors200VisitorsItem = {
|
|
|
1898
1898
|
unique_visitors?: number;
|
|
1899
1899
|
visitors?: number;
|
|
1900
1900
|
};
|
|
1901
|
-
export declare type HostingVisitors200 = {
|
|
1902
|
-
daily?: HostingVisitors200Daily;
|
|
1903
|
-
total_bandwidth?: number;
|
|
1904
|
-
total_hits?: number;
|
|
1905
|
-
total_pages?: number;
|
|
1906
|
-
total_unique_visitors?: number;
|
|
1907
|
-
total_visitors?: number;
|
|
1908
|
-
visitors?: HostingVisitors200VisitorsItem[];
|
|
1909
|
-
};
|
|
1910
1901
|
export declare type HostingVisitors200DailyTotal = {
|
|
1911
1902
|
total_bandwidth?: number;
|
|
1912
1903
|
total_hits?: number;
|
|
@@ -1926,6 +1917,15 @@ export declare type HostingVisitors200Daily = {
|
|
|
1926
1917
|
data?: HostingVisitors200DailyDataItem[];
|
|
1927
1918
|
total?: HostingVisitors200DailyTotal;
|
|
1928
1919
|
};
|
|
1920
|
+
export declare type HostingVisitors200 = {
|
|
1921
|
+
daily?: HostingVisitors200Daily;
|
|
1922
|
+
total_bandwidth?: number;
|
|
1923
|
+
total_hits?: number;
|
|
1924
|
+
total_pages?: number;
|
|
1925
|
+
total_unique_visitors?: number;
|
|
1926
|
+
total_visitors?: number;
|
|
1927
|
+
visitors?: HostingVisitors200VisitorsItem[];
|
|
1928
|
+
};
|
|
1929
1929
|
export declare type HostingVisitorsSource = typeof HostingVisitorsSource[keyof typeof HostingVisitorsSource];
|
|
1930
1930
|
export declare const HostingVisitorsSource: {
|
|
1931
1931
|
readonly http: "http";
|
|
@@ -2503,6 +2503,69 @@ export declare type ListFilesParams = {
|
|
|
2503
2503
|
path: string;
|
|
2504
2504
|
showdotfiles?: boolean;
|
|
2505
2505
|
};
|
|
2506
|
+
export declare type HostingEmailList200RowsItem = {
|
|
2507
|
+
/** The email address */
|
|
2508
|
+
address?: string;
|
|
2509
|
+
/** The amount of disk space used by the email */
|
|
2510
|
+
disk_used_kib?: number;
|
|
2511
|
+
/** The number of files in the email */
|
|
2512
|
+
files?: number;
|
|
2513
|
+
/** The type of email */
|
|
2514
|
+
type?: string;
|
|
2515
|
+
};
|
|
2516
|
+
export declare type HostingEmailList200 = {
|
|
2517
|
+
/** List of email resources */
|
|
2518
|
+
rows?: HostingEmailList200RowsItem[];
|
|
2519
|
+
};
|
|
2520
|
+
export declare type HostingEmailDelete200 = {
|
|
2521
|
+
[key: string]: unknown;
|
|
2522
|
+
};
|
|
2523
|
+
export declare type HostingEmailDeleteParams = {
|
|
2524
|
+
address: string;
|
|
2525
|
+
};
|
|
2526
|
+
export declare type HostingEmailAdd512 = {
|
|
2527
|
+
/** Customer error code */
|
|
2528
|
+
error?: string;
|
|
2529
|
+
};
|
|
2530
|
+
export declare type HostingEmailAdd409 = {
|
|
2531
|
+
/** Customer error code */
|
|
2532
|
+
error?: string;
|
|
2533
|
+
};
|
|
2534
|
+
export declare type HostingEmailAdd403 = {
|
|
2535
|
+
/** Customer error code */
|
|
2536
|
+
error?: string;
|
|
2537
|
+
};
|
|
2538
|
+
export declare type HostingEmailAdd400 = {
|
|
2539
|
+
/** Customer error code */
|
|
2540
|
+
error?: string;
|
|
2541
|
+
};
|
|
2542
|
+
export declare type HostingEmailAdd200 = {
|
|
2543
|
+
/** The address that was created */
|
|
2544
|
+
address?: string;
|
|
2545
|
+
};
|
|
2546
|
+
/**
|
|
2547
|
+
* The type of email to add (defaults to 'box')
|
|
2548
|
+
*/
|
|
2549
|
+
export declare type HostingEmailAddBodyType = typeof HostingEmailAddBodyType[keyof typeof HostingEmailAddBodyType];
|
|
2550
|
+
export declare const HostingEmailAddBodyType: {
|
|
2551
|
+
readonly box: "box";
|
|
2552
|
+
readonly domainalias: "domainalias";
|
|
2553
|
+
readonly alias: "alias";
|
|
2554
|
+
readonly forwarder: "forwarder";
|
|
2555
|
+
readonly discard: "discard";
|
|
2556
|
+
readonly pipe: "pipe";
|
|
2557
|
+
readonly list: "list";
|
|
2558
|
+
};
|
|
2559
|
+
export declare type HostingEmailAddBody = {
|
|
2560
|
+
/** The email address to add */
|
|
2561
|
+
address: string;
|
|
2562
|
+
/** The password for the email */
|
|
2563
|
+
password: string;
|
|
2564
|
+
/** The quota for the email (optional) (default: 0 = unlimited) */
|
|
2565
|
+
quota?: number;
|
|
2566
|
+
/** The type of email to add (defaults to 'box') */
|
|
2567
|
+
type?: HostingEmailAddBodyType;
|
|
2568
|
+
};
|
|
2506
2569
|
/**
|
|
2507
2570
|
* @nullable
|
|
2508
2571
|
*/
|
|
@@ -2926,6 +2989,12 @@ export declare type DbAddBody = {
|
|
|
2926
2989
|
/** Type of database to add */
|
|
2927
2990
|
type?: DbAddBodyType;
|
|
2928
2991
|
};
|
|
2992
|
+
export declare type CronLastRun200 = {
|
|
2993
|
+
last_run?: string;
|
|
2994
|
+
};
|
|
2995
|
+
export declare type CronLastRunParams = {
|
|
2996
|
+
command: string;
|
|
2997
|
+
};
|
|
2929
2998
|
export declare type Cron200 = {
|
|
2930
2999
|
success?: boolean;
|
|
2931
3000
|
};
|
|
@@ -3164,23 +3233,6 @@ export declare type ActivityLog200 = {
|
|
|
3164
3233
|
export declare type ActivityLogParams = {
|
|
3165
3234
|
days?: number;
|
|
3166
3235
|
};
|
|
3167
|
-
export declare type HostingAccount200 = {
|
|
3168
|
-
account_id?: string;
|
|
3169
|
-
advanced?: boolean;
|
|
3170
|
-
billing?: HostingAccount200Billing;
|
|
3171
|
-
brand?: string;
|
|
3172
|
-
id?: string;
|
|
3173
|
-
panel?: string;
|
|
3174
|
-
plan_key?: string;
|
|
3175
|
-
platform?: string;
|
|
3176
|
-
/** @nullable */
|
|
3177
|
-
resources?: HostingAccount200Resources;
|
|
3178
|
-
/** @nullable */
|
|
3179
|
-
ssh_hostname?: string | null;
|
|
3180
|
-
status?: string;
|
|
3181
|
-
type?: string;
|
|
3182
|
-
username?: string;
|
|
3183
|
-
};
|
|
3184
3236
|
export declare type HostingAccount200ResourcesWorkers = {
|
|
3185
3237
|
/** @nullable */
|
|
3186
3238
|
available?: number | null;
|
|
@@ -3198,6 +3250,31 @@ export declare type HostingAccount200ResourcesStorage = {
|
|
|
3198
3250
|
/** @nullable */
|
|
3199
3251
|
used?: number | null;
|
|
3200
3252
|
};
|
|
3253
|
+
/**
|
|
3254
|
+
* @nullable
|
|
3255
|
+
*/
|
|
3256
|
+
export declare type HostingAccount200Resources = {
|
|
3257
|
+
staging?: HostingAccount200ResourcesStaging;
|
|
3258
|
+
storage?: HostingAccount200ResourcesStorage;
|
|
3259
|
+
workers?: HostingAccount200ResourcesWorkers;
|
|
3260
|
+
} | null;
|
|
3261
|
+
export declare type HostingAccount200 = {
|
|
3262
|
+
account_id?: string;
|
|
3263
|
+
advanced?: boolean;
|
|
3264
|
+
billing?: HostingAccount200Billing;
|
|
3265
|
+
brand?: string;
|
|
3266
|
+
id?: string;
|
|
3267
|
+
panel?: string;
|
|
3268
|
+
plan_key?: string;
|
|
3269
|
+
platform?: string;
|
|
3270
|
+
/** @nullable */
|
|
3271
|
+
resources?: HostingAccount200Resources;
|
|
3272
|
+
/** @nullable */
|
|
3273
|
+
ssh_hostname?: string | null;
|
|
3274
|
+
status?: string;
|
|
3275
|
+
type?: string;
|
|
3276
|
+
username?: string;
|
|
3277
|
+
};
|
|
3201
3278
|
export declare type HostingAccount200ResourcesStagingWorkers = {
|
|
3202
3279
|
/** @nullable */
|
|
3203
3280
|
available?: number | null;
|
|
@@ -3219,14 +3296,6 @@ export declare type HostingAccount200ResourcesStaging = {
|
|
|
3219
3296
|
storage?: HostingAccount200ResourcesStagingStorage;
|
|
3220
3297
|
workers?: HostingAccount200ResourcesStagingWorkers;
|
|
3221
3298
|
};
|
|
3222
|
-
/**
|
|
3223
|
-
* @nullable
|
|
3224
|
-
*/
|
|
3225
|
-
export declare type HostingAccount200Resources = {
|
|
3226
|
-
staging?: HostingAccount200ResourcesStaging;
|
|
3227
|
-
storage?: HostingAccount200ResourcesStorage;
|
|
3228
|
-
workers?: HostingAccount200ResourcesWorkers;
|
|
3229
|
-
} | null;
|
|
3230
3299
|
export declare type HostingAccount200Billing = {
|
|
3231
3300
|
prod_code?: string;
|
|
3232
3301
|
product_name?: string;
|
|
@@ -3503,6 +3572,9 @@ export declare type AddonsInfo200 = {
|
|
|
3503
3572
|
export declare type AddonsCloudflare200 = {
|
|
3504
3573
|
status?: string;
|
|
3505
3574
|
};
|
|
3575
|
+
export declare type BackupList200 = {
|
|
3576
|
+
home?: BackupList200HomeItem[];
|
|
3577
|
+
};
|
|
3506
3578
|
export declare type BackupList200HomeItemBackupStatus = {
|
|
3507
3579
|
/** @nullable */
|
|
3508
3580
|
download_url?: string | null;
|
|
@@ -3514,9 +3586,6 @@ export declare type BackupList200HomeItem = {
|
|
|
3514
3586
|
backup_status?: BackupList200HomeItemBackupStatus;
|
|
3515
3587
|
time_created?: string;
|
|
3516
3588
|
};
|
|
3517
|
-
export declare type BackupList200 = {
|
|
3518
|
-
home?: BackupList200HomeItem[];
|
|
3519
|
-
};
|
|
3520
3589
|
export declare type BackupListBackupType = typeof BackupListBackupType[keyof typeof BackupListBackupType];
|
|
3521
3590
|
export declare const BackupListBackupType: {
|
|
3522
3591
|
readonly full: "full";
|
package/src/index.schemas.js
CHANGED
|
@@ -159,6 +159,16 @@ export const HostingFtpUpdateBodyUserTypeSet = {
|
|
|
159
159
|
quota: 'quota',
|
|
160
160
|
};
|
|
161
161
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
162
|
+
export const HostingEmailAddBodyType = {
|
|
163
|
+
box: 'box',
|
|
164
|
+
domainalias: 'domainalias',
|
|
165
|
+
alias: 'alias',
|
|
166
|
+
forwarder: 'forwarder',
|
|
167
|
+
discard: 'discard',
|
|
168
|
+
pipe: 'pipe',
|
|
169
|
+
list: 'list',
|
|
170
|
+
};
|
|
171
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
162
172
|
export const DomainsType = {
|
|
163
173
|
addon: 'addon',
|
|
164
174
|
main: 'main',
|