@newfold/huapi-js 2.1288.0 → 2.1296.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 CHANGED
@@ -10,7 +10,7 @@
10
10
  "tslib": "2.7.0"
11
11
  },
12
12
  "module": "dist/index.ts",
13
- "version": "2.1288.0",
13
+ "version": "2.1296.0",
14
14
  "sideEffects": false,
15
15
  "main": "./src/index.js",
16
16
  "types": "./src/index.d.ts",
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, 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';
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
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.1288.0
6
+ * OpenAPI spec version: 1.1296.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
@@ -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, 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';
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;
@@ -287,6 +288,7 @@ export declare const getListCronsMockHandler: (overrideResponse?: ListCrons200 |
287
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;
288
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;
289
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;
290
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;
291
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;
292
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;
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.1288.0
7
+ * OpenAPI spec version: 1.1296.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));
@@ -103,7 +104,7 @@ export const getHostingDomainsUnassignResponseMock = (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));
104
105
  export const getHostingEmailAddResponseMock = (overrideResponse = {}) => (Object.assign({ address: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
105
106
  export const getHostingEmailDeleteResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
106
- 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));
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.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), files: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
107
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));
108
109
  export const getHostingFixownershipResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
109
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));
@@ -866,6 +867,16 @@ export const getCronMockHandler = (overrideResponse) => {
866
867
  });
867
868
  }));
868
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
+ };
869
880
  export const getDbAddMockHandler = (overrideResponse) => {
870
881
  return http.post('*/v1/hosting/:hostingId/db', (info) => __awaiter(void 0, void 0, void 0, function* () {
871
882
  yield delay(1000);
@@ -2598,6 +2609,7 @@ export const getHostingUAPIMock = () => [
2598
2609
  getAddCronMockHandler(),
2599
2610
  getUpdateCronMockHandler(),
2600
2611
  getCronMockHandler(),
2612
+ getCronLastRunMockHandler(),
2601
2613
  getDbAddMockHandler(),
2602
2614
  getDbMockHandler(),
2603
2615
  getDbListMockHandler(),
@@ -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.1288.0
6
+ * OpenAPI spec version: 1.1296.0
7
7
  */
8
8
  export declare type SshKeyListV4200RowsItem = {
9
9
  authorize?: boolean;
@@ -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;
@@ -2506,10 +2506,16 @@ export declare type ListFilesParams = {
2506
2506
  export declare type HostingEmailList200RowsItem = {
2507
2507
  /** The email address */
2508
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;
2509
+ /**
2510
+ * The amount of disk space used by the email
2511
+ * @nullable
2512
+ */
2513
+ disk_used_kib?: number | null;
2514
+ /**
2515
+ * The number of files in the email
2516
+ * @nullable
2517
+ */
2518
+ files?: number | null;
2513
2519
  /** The type of email */
2514
2520
  type?: string;
2515
2521
  };
@@ -2989,6 +2995,12 @@ export declare type DbAddBody = {
2989
2995
  /** Type of database to add */
2990
2996
  type?: DbAddBodyType;
2991
2997
  };
2998
+ export declare type CronLastRun200 = {
2999
+ last_run?: string;
3000
+ };
3001
+ export declare type CronLastRunParams = {
3002
+ command: string;
3003
+ };
2992
3004
  export declare type Cron200 = {
2993
3005
  success?: boolean;
2994
3006
  };
@@ -3227,31 +3239,6 @@ export declare type ActivityLog200 = {
3227
3239
  export declare type ActivityLogParams = {
3228
3240
  days?: number;
3229
3241
  };
3230
- export declare type HostingAccount200ResourcesWorkers = {
3231
- /** @nullable */
3232
- available?: number | null;
3233
- /** @nullable */
3234
- total?: number | null;
3235
- /** @nullable */
3236
- used?: number | null;
3237
- };
3238
- export declare type HostingAccount200ResourcesStorage = {
3239
- /** @nullable */
3240
- available?: number | null;
3241
- /** @nullable */
3242
- total?: number | null;
3243
- unit?: string;
3244
- /** @nullable */
3245
- used?: number | null;
3246
- };
3247
- /**
3248
- * @nullable
3249
- */
3250
- export declare type HostingAccount200Resources = {
3251
- staging?: HostingAccount200ResourcesStaging;
3252
- storage?: HostingAccount200ResourcesStorage;
3253
- workers?: HostingAccount200ResourcesWorkers;
3254
- } | null;
3255
3242
  export declare type HostingAccount200 = {
3256
3243
  account_id?: string;
3257
3244
  advanced?: boolean;
@@ -3269,6 +3256,23 @@ export declare type HostingAccount200 = {
3269
3256
  type?: string;
3270
3257
  username?: string;
3271
3258
  };
3259
+ export declare type HostingAccount200ResourcesWorkers = {
3260
+ /** @nullable */
3261
+ available?: number | null;
3262
+ /** @nullable */
3263
+ total?: number | null;
3264
+ /** @nullable */
3265
+ used?: number | null;
3266
+ };
3267
+ export declare type HostingAccount200ResourcesStorage = {
3268
+ /** @nullable */
3269
+ available?: number | null;
3270
+ /** @nullable */
3271
+ total?: number | null;
3272
+ unit?: string;
3273
+ /** @nullable */
3274
+ used?: number | null;
3275
+ };
3272
3276
  export declare type HostingAccount200ResourcesStagingWorkers = {
3273
3277
  /** @nullable */
3274
3278
  available?: number | null;
@@ -3290,6 +3294,14 @@ export declare type HostingAccount200ResourcesStaging = {
3290
3294
  storage?: HostingAccount200ResourcesStagingStorage;
3291
3295
  workers?: HostingAccount200ResourcesStagingWorkers;
3292
3296
  };
3297
+ /**
3298
+ * @nullable
3299
+ */
3300
+ export declare type HostingAccount200Resources = {
3301
+ staging?: HostingAccount200ResourcesStaging;
3302
+ storage?: HostingAccount200ResourcesStorage;
3303
+ workers?: HostingAccount200ResourcesWorkers;
3304
+ } | null;
3293
3305
  export declare type HostingAccount200Billing = {
3294
3306
  prod_code?: string;
3295
3307
  product_name?: string;
@@ -3306,7 +3318,7 @@ export declare type DomainDnszoneReset200 = {
3306
3318
  export declare type DomainDnseditorEdit200 = {
3307
3319
  success?: number;
3308
3320
  };
3309
- export declare type DomainDnseditorEditBodyRecordsItem = {
3321
+ export declare type DomainDnseditorEditBody = {
3310
3322
  /** It describes dns point value for each type of record */
3311
3323
  content?: string;
3312
3324
  /** mail server that domain of DNS record points to */
@@ -3317,6 +3329,10 @@ export declare type DomainDnseditorEditBodyRecordsItem = {
3317
3329
  name?: string;
3318
3330
  /** mail server that domain of DNS record points to */
3319
3331
  nsdname?: string;
3332
+ /** actual cotent on which the records points to */
3333
+ orig_content?: string;
3334
+ /** actual name that records holds */
3335
+ orig_name?: string;
3320
3336
  /** Port of SRV DNS record */
3321
3337
  port?: string;
3322
3338
  /** Priority of each DNS record, Default priority would be set to one */
@@ -3336,9 +3352,6 @@ export declare type DomainDnseditorEditBodyRecordsItem = {
3336
3352
  /** Weight of each DNS record it holds */
3337
3353
  weight?: string;
3338
3354
  };
3339
- export declare type DomainDnseditorEditBody = {
3340
- records?: DomainDnseditorEditBodyRecordsItem[];
3341
- };
3342
3355
  export declare type DomainDnseditorAdd200 = {
3343
3356
  success?: number;
3344
3357
  };