@newfold/huapi-js 1.413.0 → 1.424.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.4.0"
11
11
  },
12
12
  "module": "dist/index.ts",
13
- "version": "1.413.0",
13
+ "version": "1.424.0",
14
14
  "sideEffects": false,
15
15
  "main": "./src/index.js",
16
16
  "types": "./src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -3,12 +3,12 @@
3
3
  * Do not edit manually.
4
4
  * Hosting UAPI
5
5
  * Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
6
- * OpenAPI spec version: 1.413.0
6
+ * OpenAPI spec version: 1.424.0
7
7
  */
8
8
  import axios from 'axios';
9
9
  import type { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';
10
10
  import type { UseQueryOptions, UseMutationOptions, UseQueryResult, QueryKey } from '@tanstack/react-query';
11
- import type { CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseList200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteList200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, AddonsSitelockSso200, AddonsCloudflare200, AddonsInfo200, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedCrontab200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, AddonCloudflare200, AddonCloudflareBody, DbAdd200, DbAddBody, Db200, DbBody, DbList200, Domains200, DomainsParams, HostingFtpList200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpUpdate200, HostingFtpUpdateBody, HostingFtp200, HostingFtpBody, HostingInfo200, HostingInfoDiskUsage200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingShellToggle200, HostingShellToggleBody, HostingShellInfo200, HostingSites200, HostingSiteAdd200, HostingSiteAddBody, HostingSshInfo200, SshKeyFetch200, SshKeyFetchParams, SshKeyImport200, SshKeyImportBody, SshKeyList200, SshKey200, SshKeyBody, SshKeyGenerate200, SshKeyGenerateBody, Sso200, SsoParams, SitesList200, SitesInfo200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, Site200, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesHasBackups200, SitesBackupsDetails200, JetpackBackupStatus200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainUrl200, SitesDomainUrlBody, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, ResetSite200, SitesSecurityCheckCore200, SitesSecurityResetCoreFiles200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecuritySitelock200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SiteSettingsAutoupdatePlugins200, SitesSettingsAutoupdates200, SitesSettingsAutoupdatesCore200, SitesSettingsAutoupdatesCoreBody, SitesSettingsAutoupdatesTheme200, SitesSettingsAutoupdatesThemeBody, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSso200, SitesSsoParams, SiteUsers200, SitesVersion200, HostingSitesV2200, SshKeyListV2200 } from './index.schemas';
11
+ import type { CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseList200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteList200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, AddonsSitelockSso200, AddonsCloudflare200, AddonsInfo200, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, AddonCloudflare200, AddonCloudflareBody, ListCrons200, AddCron200, AddCron400, AddCronBody, UpdateCron200, UpdateCronBody, Cron200, CronBody, DbAdd200, DbAddBody, Db200, DbBody, DbList200, DbUserList200, Domains200, DomainsParams, HostingFtpList200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpUpdate200, HostingFtpUpdateBody, HostingFtp200, HostingFtpBody, HostingInfo200, HostingInfoDiskUsage200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingShellToggle200, HostingShellToggleBody, HostingShellInfo200, HostingSites200, HostingSiteAdd200, HostingSiteAddBody, HostingSshInfo200, SshKeyFetch200, SshKeyFetchParams, SshKeyImport200, SshKeyImportBody, SshKeyList200, SshKey200, SshKeyBody, SshKeyGenerate200, SshKeyGenerateBody, Sso200, SsoParams, SitesList200, SitesInfo200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, Site200, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesHasBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, JetpackBackupStatus200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainUrl200, SitesDomainUrlBody, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, ResetSite200, SitesSecurityCheckCore200, SitesSecurityResetCoreFiles200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecuritySitelock200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SiteSettingsAutoupdatePlugins200, SitesSettingsAutoupdates200, SitesSettingsAutoupdatesCore200, SitesSettingsAutoupdatesCoreBody, SitesSettingsAutoupdatesTheme200, SitesSettingsAutoupdatesThemeBody, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSso200, SitesSsoParams, SiteUsers200, SitesVersion200, HostingSitesV2200, SshKeyListV2200 } from './index.schemas';
12
12
  declare type AwaitedInput<T> = PromiseLike<T> | T;
13
13
  declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
14
14
  /**
@@ -306,20 +306,6 @@ export declare const useHostingAddons: <TData = AxiosResponse<HostingAddons200,
306
306
  } | undefined) => UseQueryResult<TData, TError> & {
307
307
  queryKey: QueryKey;
308
308
  };
309
- /**
310
- * Returns a list of cron jobs
311
- * @summary cron_list
312
- */
313
- export declare const hostingAdvancedCrontab: (hostingId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingAdvancedCrontab200>>;
314
- export declare const getHostingAdvancedCrontabQueryKey: (hostingId: number) => string[];
315
- export declare type HostingAdvancedCrontabQueryResult = NonNullable<Awaited<ReturnType<typeof hostingAdvancedCrontab>>>;
316
- export declare type HostingAdvancedCrontabQueryError = AxiosError<unknown>;
317
- export declare const useHostingAdvancedCrontab: <TData = AxiosResponse<HostingAdvancedCrontab200, any>, TError = AxiosError<unknown, any>>(hostingId: number, options?: {
318
- query?: UseQueryOptions<AxiosResponse<HostingAdvancedCrontab200, any>, TError, TData, QueryKey> | undefined;
319
- axios?: AxiosRequestConfig<any> | undefined;
320
- } | undefined) => UseQueryResult<TData, TError> & {
321
- queryKey: QueryKey;
322
- };
323
309
  /**
324
310
  * Returns the hosting server info
325
311
  * @summary server status/info
@@ -430,6 +416,74 @@ export declare const useAddonCloudflare: <TError = AxiosError<unknown, any>, TCo
430
416
  hostingId: number;
431
417
  data: AddonCloudflareBody;
432
418
  }, TContext>;
419
+ /**
420
+ * Returns a list of cron jobs
421
+ * @summary cron_list
422
+ */
423
+ export declare const listCrons: (hostingId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<ListCrons200>>;
424
+ export declare const getListCronsQueryKey: (hostingId: number) => string[];
425
+ export declare type ListCronsQueryResult = NonNullable<Awaited<ReturnType<typeof listCrons>>>;
426
+ export declare type ListCronsQueryError = AxiosError<unknown>;
427
+ export declare const useListCrons: <TData = AxiosResponse<ListCrons200, any>, TError = AxiosError<unknown, any>>(hostingId: number, options?: {
428
+ query?: UseQueryOptions<AxiosResponse<ListCrons200, any>, TError, TData, QueryKey> | undefined;
429
+ axios?: AxiosRequestConfig<any> | undefined;
430
+ } | undefined) => UseQueryResult<TData, TError> & {
431
+ queryKey: QueryKey;
432
+ };
433
+ /**
434
+ * Adds a new cron job
435
+ * @summary cron_add
436
+ */
437
+ export declare const addCron: (hostingId: number, addCronBody: AddCronBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<AddCron200>>;
438
+ export declare type AddCronMutationResult = NonNullable<Awaited<ReturnType<typeof addCron>>>;
439
+ export declare type AddCronMutationBody = AddCronBody;
440
+ export declare type AddCronMutationError = AxiosError<AddCron400>;
441
+ export declare const useAddCron: <TError = AxiosError<AddCron400, any>, TContext = unknown>(options?: {
442
+ mutation?: UseMutationOptions<AxiosResponse<AddCron200, any>, TError, {
443
+ hostingId: number;
444
+ data: AddCronBody;
445
+ }, TContext> | undefined;
446
+ axios?: AxiosRequestConfig<any> | undefined;
447
+ } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<AddCron200, any>, TError, {
448
+ hostingId: number;
449
+ data: AddCronBody;
450
+ }, TContext>;
451
+ /**
452
+ * Updates a cron job
453
+ * @summary cron_update
454
+ */
455
+ export declare const updateCron: (hostingId: number, updateCronBody: UpdateCronBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<UpdateCron200>>;
456
+ export declare type UpdateCronMutationResult = NonNullable<Awaited<ReturnType<typeof updateCron>>>;
457
+ export declare type UpdateCronMutationBody = UpdateCronBody;
458
+ export declare type UpdateCronMutationError = AxiosError<unknown>;
459
+ export declare const useUpdateCron: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
460
+ mutation?: UseMutationOptions<AxiosResponse<UpdateCron200, any>, TError, {
461
+ hostingId: number;
462
+ data: UpdateCronBody;
463
+ }, TContext> | undefined;
464
+ axios?: AxiosRequestConfig<any> | undefined;
465
+ } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<UpdateCron200, any>, TError, {
466
+ hostingId: number;
467
+ data: UpdateCronBody;
468
+ }, TContext>;
469
+ /**
470
+ * Deletes a cron job
471
+ * @summary cron_delete
472
+ */
473
+ export declare const cron: (hostingId: number, cronBody: CronBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<Cron200>>;
474
+ export declare type CronMutationResult = NonNullable<Awaited<ReturnType<typeof cron>>>;
475
+ export declare type CronMutationBody = CronBody;
476
+ export declare type CronMutationError = AxiosError<unknown>;
477
+ export declare const useCron: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
478
+ mutation?: UseMutationOptions<AxiosResponse<Cron200, any>, TError, {
479
+ hostingId: number;
480
+ data: CronBody;
481
+ }, TContext> | undefined;
482
+ axios?: AxiosRequestConfig<any> | undefined;
483
+ } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<Cron200, any>, TError, {
484
+ hostingId: number;
485
+ data: CronBody;
486
+ }, TContext>;
433
487
  /**
434
488
  * Add a new db to an account
435
489
  * @summary Create a database for an account
@@ -480,6 +534,20 @@ export declare const useDbList: <TData = AxiosResponse<DbList200, any>, TError =
480
534
  } | undefined) => UseQueryResult<TData, TError> & {
481
535
  queryKey: QueryKey;
482
536
  };
537
+ /**
538
+ * List all DB users
539
+ * @summary Get list of db users
540
+ */
541
+ export declare const dbUserList: (hostingId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<DbUserList200>>;
542
+ export declare const getDbUserListQueryKey: (hostingId: number) => string[];
543
+ export declare type DbUserListQueryResult = NonNullable<Awaited<ReturnType<typeof dbUserList>>>;
544
+ export declare type DbUserListQueryError = AxiosError<unknown>;
545
+ export declare const useDbUserList: <TData = AxiosResponse<DbUserList200, any>, TError = AxiosError<unknown, any>>(hostingId: number, options?: {
546
+ query?: UseQueryOptions<AxiosResponse<DbUserList200, any>, TError, TData, QueryKey> | undefined;
547
+ axios?: AxiosRequestConfig<any> | undefined;
548
+ } | undefined) => UseQueryResult<TData, TError> & {
549
+ queryKey: QueryKey;
550
+ };
483
551
  /**
484
552
  * Returns a list of domains
485
553
  * @summary domain list
@@ -979,6 +1047,21 @@ export declare const useSitesHasBackups: <TData = AxiosResponse<SitesHasBackups2
979
1047
  } | undefined) => UseQueryResult<TData, TError> & {
980
1048
  queryKey: QueryKey;
981
1049
  };
1050
+ /**
1051
+ * Adds the site to the codeguard
1052
+ * @summary Add additional sites to codeguard
1053
+ */
1054
+ export declare const sitesBackupsCodeguard: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesBackupsCodeguard200>>;
1055
+ export declare type SitesBackupsCodeguardMutationResult = NonNullable<Awaited<ReturnType<typeof sitesBackupsCodeguard>>>;
1056
+ export declare type SitesBackupsCodeguardMutationError = AxiosError<unknown>;
1057
+ export declare const useSitesBackupsCodeguard: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
1058
+ mutation?: UseMutationOptions<AxiosResponse<SitesBackupsCodeguard200, any>, TError, {
1059
+ siteId: number;
1060
+ }, TContext> | undefined;
1061
+ axios?: AxiosRequestConfig<any> | undefined;
1062
+ } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<SitesBackupsCodeguard200, any>, TError, {
1063
+ siteId: number;
1064
+ }, TContext>;
982
1065
  /**
983
1066
  * Returns details about the backup options available for the site, i.e. details about the codeguard backup addon and the jetpack based on if one or both of them are added to the account.
984
1067
  * @summary site backup details
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.413.0
6
+ * OpenAPI spec version: 1.424.0
7
7
  */
8
8
  import axios from 'axios';
9
9
  import { useQuery, useMutation } from '@tanstack/react-query';
@@ -314,23 +314,6 @@ export const useHostingAddons = (hostingId, params, options) => {
314
314
  query.queryKey = queryKey;
315
315
  return query;
316
316
  };
317
- /**
318
- * Returns a list of cron jobs
319
- * @summary cron_list
320
- */
321
- export const hostingAdvancedCrontab = (hostingId, options) => {
322
- return axios.get(`/v1/hosting/${hostingId}/advanced/crontab`, options);
323
- };
324
- export const getHostingAdvancedCrontabQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/advanced/crontab`];
325
- export const useHostingAdvancedCrontab = (hostingId, options) => {
326
- var _a;
327
- const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
328
- const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingAdvancedCrontabQueryKey(hostingId);
329
- const queryFn = ({ signal }) => hostingAdvancedCrontab(hostingId, Object.assign({ signal }, axiosOptions));
330
- const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions));
331
- query.queryKey = queryKey;
332
- return query;
333
- };
334
317
  /**
335
318
  * Returns the hosting server info
336
319
  * @summary server status/info
@@ -444,6 +427,68 @@ export const useAddonCloudflare = (options) => {
444
427
  };
445
428
  return useMutation(mutationFn, mutationOptions);
446
429
  };
430
+ /**
431
+ * Returns a list of cron jobs
432
+ * @summary cron_list
433
+ */
434
+ export const listCrons = (hostingId, options) => {
435
+ return axios.get(`/v1/hosting/${hostingId}/crontab`, options);
436
+ };
437
+ export const getListCronsQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/crontab`];
438
+ export const useListCrons = (hostingId, options) => {
439
+ var _a;
440
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
441
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getListCronsQueryKey(hostingId);
442
+ const queryFn = ({ signal }) => listCrons(hostingId, Object.assign({ signal }, axiosOptions));
443
+ const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions));
444
+ query.queryKey = queryKey;
445
+ return query;
446
+ };
447
+ /**
448
+ * Adds a new cron job
449
+ * @summary cron_add
450
+ */
451
+ export const addCron = (hostingId, addCronBody, options) => {
452
+ return axios.post(`/v1/hosting/${hostingId}/crontab`, addCronBody, options);
453
+ };
454
+ export const useAddCron = (options) => {
455
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
456
+ const mutationFn = (props) => {
457
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
458
+ return addCron(hostingId, data, axiosOptions);
459
+ };
460
+ return useMutation(mutationFn, mutationOptions);
461
+ };
462
+ /**
463
+ * Updates a cron job
464
+ * @summary cron_update
465
+ */
466
+ export const updateCron = (hostingId, updateCronBody, options) => {
467
+ return axios.put(`/v1/hosting/${hostingId}/crontab`, updateCronBody, options);
468
+ };
469
+ export const useUpdateCron = (options) => {
470
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
471
+ const mutationFn = (props) => {
472
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
473
+ return updateCron(hostingId, data, axiosOptions);
474
+ };
475
+ return useMutation(mutationFn, mutationOptions);
476
+ };
477
+ /**
478
+ * Deletes a cron job
479
+ * @summary cron_delete
480
+ */
481
+ export const cron = (hostingId, cronBody, options) => {
482
+ return axios.delete(`/v1/hosting/${hostingId}/crontab`, Object.assign({ data: cronBody }, options));
483
+ };
484
+ export const useCron = (options) => {
485
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
486
+ const mutationFn = (props) => {
487
+ const { hostingId, data } = props !== null && props !== void 0 ? props : {};
488
+ return cron(hostingId, data, axiosOptions);
489
+ };
490
+ return useMutation(mutationFn, mutationOptions);
491
+ };
447
492
  /**
448
493
  * Add a new db to an account
449
494
  * @summary Create a database for an account
@@ -491,6 +536,23 @@ export const useDbList = (hostingId, options) => {
491
536
  query.queryKey = queryKey;
492
537
  return query;
493
538
  };
539
+ /**
540
+ * List all DB users
541
+ * @summary Get list of db users
542
+ */
543
+ export const dbUserList = (hostingId, options) => {
544
+ return axios.get(`/v1/hosting/${hostingId}/db/users`, options);
545
+ };
546
+ export const getDbUserListQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/db/users`];
547
+ export const useDbUserList = (hostingId, options) => {
548
+ var _a;
549
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
550
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getDbUserListQueryKey(hostingId);
551
+ const queryFn = ({ signal }) => dbUserList(hostingId, Object.assign({ signal }, axiosOptions));
552
+ const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions));
553
+ query.queryKey = queryKey;
554
+ return query;
555
+ };
494
556
  /**
495
557
  * Returns a list of domains
496
558
  * @summary domain list
@@ -1011,6 +1073,21 @@ export const useSitesHasBackups = (siteId, options) => {
1011
1073
  query.queryKey = queryKey;
1012
1074
  return query;
1013
1075
  };
1076
+ /**
1077
+ * Adds the site to the codeguard
1078
+ * @summary Add additional sites to codeguard
1079
+ */
1080
+ export const sitesBackupsCodeguard = (siteId, options) => {
1081
+ return axios.post(`/v1/sites/${siteId}/backups/codeguard`, undefined, options);
1082
+ };
1083
+ export const useSitesBackupsCodeguard = (options) => {
1084
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1085
+ const mutationFn = (props) => {
1086
+ const { siteId } = props !== null && props !== void 0 ? props : {};
1087
+ return sitesBackupsCodeguard(siteId, axiosOptions);
1088
+ };
1089
+ return useMutation(mutationFn, mutationOptions);
1090
+ };
1014
1091
  /**
1015
1092
  * Returns details about the backup options available for the site, i.e. details about the codeguard backup addon and the jetpack based on if one or both of them are added to the account.
1016
1093
  * @summary site backup details
@@ -113,19 +113,6 @@ export declare const getHostingAddonsMock: () => {
113
113
  status_user: string | undefined;
114
114
  }[] | undefined;
115
115
  };
116
- export declare const getHostingAdvancedCrontabMock: () => {
117
- rows: {
118
- command: string | undefined;
119
- day: string | undefined;
120
- hour: string | undefined;
121
- key: string | undefined;
122
- line: string | undefined;
123
- minute: string | undefined;
124
- month: string | undefined;
125
- type: string | undefined;
126
- weekday: string | undefined;
127
- }[] | undefined;
128
- };
129
116
  export declare const getHostingAdvancedServerMock: () => {
130
117
  status: string | undefined;
131
118
  uptime: string | undefined;
@@ -158,6 +145,29 @@ export declare const getAddonCloudflareMock: () => {
158
145
  status: string | undefined;
159
146
  addon_id: number | undefined;
160
147
  };
148
+ export declare const getListCronsMock: () => {
149
+ rows: {
150
+ command: string | undefined;
151
+ day: string | undefined;
152
+ hour: string | undefined;
153
+ key: string | undefined;
154
+ line: string | undefined;
155
+ minute: string | undefined;
156
+ month: string | undefined;
157
+ type: string | undefined;
158
+ weekday: string | undefined;
159
+ email: string | undefined;
160
+ }[] | undefined;
161
+ };
162
+ export declare const getAddCronMock: () => {
163
+ key: string | undefined;
164
+ };
165
+ export declare const getUpdateCronMock: () => {
166
+ key: number | undefined;
167
+ };
168
+ export declare const getCronMock: () => {
169
+ success: boolean | undefined;
170
+ };
161
171
  export declare const getDbAddMock: () => {
162
172
  dbname: string | undefined;
163
173
  status: number | undefined;
@@ -181,6 +191,13 @@ export declare const getDbListMock: () => {
181
191
  }[] | undefined;
182
192
  }[] | undefined;
183
193
  };
194
+ export declare const getDbUserListMock: () => {
195
+ users: {
196
+ dblist: string[] | undefined;
197
+ shortuser: string | undefined;
198
+ user: string | undefined;
199
+ }[] | undefined;
200
+ };
184
201
  export declare const getDomainsMock: () => {
185
202
  domains: {
186
203
  docroot: string;
@@ -367,6 +384,11 @@ export declare const getSitesBackupsMock: () => {
367
384
  export declare const getSitesHasBackupsMock: () => {
368
385
  has_backups: boolean | undefined;
369
386
  };
387
+ export declare const getSitesBackupsCodeguardMock: () => {
388
+ website_id: number | undefined;
389
+ database_id: number | undefined;
390
+ success: number | undefined;
391
+ };
370
392
  export declare const getSitesBackupsDetailsMock: () => {
371
393
  codeguard: {
372
394
  addon_id: string | undefined;
@@ -470,6 +492,7 @@ export declare const getSitesSecurityHttpsEnableDisableSslMock: () => {
470
492
  export declare const getSitesSecuritySitelockMock: () => {
471
493
  addon_id: number | undefined;
472
494
  plan: string | undefined;
495
+ billing_code: string | undefined;
473
496
  success: number | undefined;
474
497
  subscription_id: string | undefined;
475
498
  upgrade_levels: string[] | undefined;
package/src/index.msw.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  * Hosting UAPI
5
5
  * Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
6
- * OpenAPI spec version: 1.413.0
6
+ * OpenAPI spec version: 1.424.0
7
7
  */
8
8
  import { rest } from 'msw';
9
9
  import { faker } from '@faker-js/faker';
@@ -26,7 +26,6 @@ export const getAddonsCloudflareMock = () => ({ status: faker.helpers.arrayEleme
26
26
  export const getAddonsInfoMock = () => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]) });
27
27
  export const getHostingAccountMock = () => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]), account_id: faker.helpers.arrayElement([faker.random.word(), undefined]), brand: faker.helpers.arrayElement([faker.random.word(), undefined]), platform: faker.helpers.arrayElement([faker.random.word(), undefined]), username: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), advanced: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), plan: faker.helpers.arrayElement([faker.random.word(), undefined]) });
28
28
  export const getHostingAddonsMock = () => ({ rows: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), subtype: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), status_user: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
29
- export const getHostingAdvancedCrontabMock = () => ({ rows: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ command: faker.helpers.arrayElement([faker.random.word(), undefined]), day: faker.helpers.arrayElement([faker.random.word(), undefined]), hour: faker.helpers.arrayElement([faker.random.word(), undefined]), key: faker.helpers.arrayElement([faker.random.word(), undefined]), line: faker.helpers.arrayElement([faker.random.word(), undefined]), minute: faker.helpers.arrayElement([faker.random.word(), undefined]), month: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), weekday: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
30
29
  export const getHostingAdvancedServerMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]), uptime: faker.helpers.arrayElement([faker.random.word(), undefined]), uptime_seconds: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), actions: faker.helpers.arrayElement([{}, undefined]) });
31
30
  export const getHostingAdvancedServerStatusMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]), uptime: faker.helpers.arrayElement([faker.random.word(), undefined]), uptime_seconds: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), actions: faker.helpers.arrayElement([{}, undefined]) });
32
31
  export const getHostingAdvancedPasswordMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
@@ -34,9 +33,14 @@ export const getHostingAdvancedSsoWhmMock = () => ({ url: faker.helpers.arrayEle
34
33
  export const getHostingAdvancedSystemConsoleMock = () => ({ url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
35
34
  export const getHostingCapabilitiesMock = () => ({ server_controls: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), sites: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), cpanel: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), whm: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), advanced_hosting: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
36
35
  export const getAddonCloudflareMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]), addon_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
36
+ export const getListCronsMock = () => ({ rows: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ command: faker.helpers.arrayElement([faker.random.word(), undefined]), day: faker.helpers.arrayElement([faker.random.word(), undefined]), hour: faker.helpers.arrayElement([faker.random.word(), undefined]), key: faker.helpers.arrayElement([faker.random.word(), undefined]), line: faker.helpers.arrayElement([faker.random.word(), undefined]), minute: faker.helpers.arrayElement([faker.random.word(), undefined]), month: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), weekday: faker.helpers.arrayElement([faker.random.word(), undefined]), email: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
37
+ export const getAddCronMock = () => ({ key: faker.helpers.arrayElement([faker.random.word(), undefined]) });
38
+ export const getUpdateCronMock = () => ({ key: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
39
+ export const getCronMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
37
40
  export const getDbAddMock = () => ({ dbname: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]) });
38
41
  export const getDbMock = () => ({ dbname: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]) });
39
42
  export const getDbListMock = () => ({ status: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), databases: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ db: faker.helpers.arrayElement([faker.random.word(), undefined]), size: faker.helpers.arrayElement([faker.random.word(), undefined]), sizemeg: faker.helpers.arrayElement([faker.random.word(), undefined]), usercount: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), userlist: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ db: faker.helpers.arrayElement([faker.random.word(), undefined]), user: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) })), undefined]) });
43
+ export const getDbUserListMock = () => ({ users: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dblist: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]), shortuser: faker.helpers.arrayElement([faker.random.word(), undefined]), user: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
40
44
  export const getDomainsMock = () => ({ domains: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ docroot: faker.random.word(), domain: faker.random.word(), type: faker.random.word(), id: faker.datatype.number({ min: undefined, max: undefined }) })) });
41
45
  export const getHostingFtpListMock = () => ({ ftp_accounts: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ user: faker.helpers.arrayElement([faker.random.word(), undefined]), homedir: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), account: faker.helpers.arrayElement([faker.random.word(), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]), special_ftp_accounts: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ user: faker.helpers.arrayElement([faker.random.word(), undefined]), homedir: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), account: faker.helpers.arrayElement([faker.random.word(), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
42
46
  export const getHostingFtpAddMock = () => ({ user: faker.helpers.arrayElement([faker.random.word(), undefined]), pass: faker.helpers.arrayElement([faker.random.word(), undefined]) });
@@ -69,6 +73,7 @@ export const getSitesAutoupdatesInfoMock = () => ({ plugins: faker.helpers.array
69
73
  export const getSitesAutoupdatesUpdateMock = () => ({ plugins: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), core: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), themes: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
70
74
  export const getSitesBackupsMock = () => ({ has_backups: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
71
75
  export const getSitesHasBackupsMock = () => ({ has_backups: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
76
+ export const getSitesBackupsCodeguardMock = () => ({ website_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), database_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
72
77
  export const getSitesBackupsDetailsMock = () => ({ codeguard: faker.helpers.arrayElement([{ addon_id: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), seats_available: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), seats_count: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), website_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), database_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), activated: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]) }, undefined]), jetpack: faker.helpers.arrayElement([{ plugin_exists: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_exists: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, undefined]) });
73
78
  export const getJetpackBackupStatusMock = () => ({ has_active_plugin: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_addon: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
74
79
  export const getSitesDnsMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), source: faker.helpers.arrayElement([faker.random.word(), undefined]), records: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ name: faker.helpers.arrayElement([faker.random.word(), undefined]), value: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
@@ -87,7 +92,7 @@ export const getSitesSecurityCheckCoreMock = () => ({ results: faker.helpers.arr
87
92
  export const getSitesSecurityResetCoreFilesMock = () => ({ results: faker.helpers.arrayElement([faker.random.word(), undefined]), success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
88
93
  export const getSitesSecurityHttpsRedirectionStatusMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), redirection_status: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), message: faker.helpers.arrayElement([faker.random.word(), undefined]) });
89
94
  export const getSitesSecurityHttpsEnableDisableSslMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), redirection_status: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), message: faker.helpers.arrayElement([faker.random.word(), undefined]) });
90
- export const getSitesSecuritySitelockMock = () => ({ addon_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), plan: faker.helpers.arrayElement([faker.random.word(), undefined]), success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), subscription_id: faker.helpers.arrayElement([faker.random.word(), undefined]), upgrade_levels: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]) });
95
+ export const getSitesSecuritySitelockMock = () => ({ addon_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), plan: faker.helpers.arrayElement([faker.random.word(), undefined]), billing_code: faker.helpers.arrayElement([faker.random.word(), undefined]), success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), subscription_id: faker.helpers.arrayElement([faker.random.word(), undefined]), upgrade_levels: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]) });
91
96
  export const getSitesSecuritySslAcmeMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), message: faker.helpers.arrayElement([faker.random.word(), undefined]) });
92
97
  export const getSitesSecuritySslStatusMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]), message: faker.helpers.arrayElement([faker.random.word(), undefined]) });
93
98
  export const getSiteSettingsAutoupdatePluginsMock = () => ({ status: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
@@ -144,8 +149,6 @@ export const getHostingUAPIMSW = () => [
144
149
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingAccountMock()));
145
150
  }), rest.get('*/v1/hosting/:hostingId/addons', (_req, res, ctx) => {
146
151
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingAddonsMock()));
147
- }), rest.get('*/v1/hosting/:hostingId/advanced/crontab', (_req, res, ctx) => {
148
- return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingAdvancedCrontabMock()));
149
152
  }), rest.get('*/v1/hosting/:hostingId/advanced/server', (_req, res, ctx) => {
150
153
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingAdvancedServerMock()));
151
154
  }), rest.put('*/v1/hosting/:hostingId/advanced/server', (_req, res, ctx) => {
@@ -160,12 +163,22 @@ export const getHostingUAPIMSW = () => [
160
163
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingCapabilitiesMock()));
161
164
  }), rest.post('*/v1/hosting/:hostingId/cloudflare', (_req, res, ctx) => {
162
165
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAddonCloudflareMock()));
166
+ }), rest.get('*/v1/hosting/:hostingId/crontab', (_req, res, ctx) => {
167
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getListCronsMock()));
168
+ }), rest.post('*/v1/hosting/:hostingId/crontab', (_req, res, ctx) => {
169
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getAddCronMock()));
170
+ }), rest.put('*/v1/hosting/:hostingId/crontab', (_req, res, ctx) => {
171
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getUpdateCronMock()));
172
+ }), rest.delete('*/v1/hosting/:hostingId/crontab', (_req, res, ctx) => {
173
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getCronMock()));
163
174
  }), rest.post('*/v1/hosting/:hostingId/db', (_req, res, ctx) => {
164
175
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getDbAddMock()));
165
176
  }), rest.delete('*/v1/hosting/:hostingId/db', (_req, res, ctx) => {
166
177
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getDbMock()));
167
178
  }), rest.get('*/v1/hosting/:hostingId/db', (_req, res, ctx) => {
168
179
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getDbListMock()));
180
+ }), rest.get('*/v1/hosting/:hostingId/db/users', (_req, res, ctx) => {
181
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getDbUserListMock()));
169
182
  }), rest.get('*/v1/hosting/:hostingId/domains', (_req, res, ctx) => {
170
183
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getDomainsMock()));
171
184
  }), rest.get('*/v1/hosting/:hostingId/ftp', (_req, res, ctx) => {
@@ -230,6 +243,8 @@ export const getHostingUAPIMSW = () => [
230
243
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesBackupsMock()));
231
244
  }), rest.get('*/v1/sites/:siteId/backups/check', (_req, res, ctx) => {
232
245
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesHasBackupsMock()));
246
+ }), rest.post('*/v1/sites/:siteId/backups/codeguard', (_req, res, ctx) => {
247
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesBackupsCodeguardMock()));
233
248
  }), rest.get('*/v1/sites/:siteId/backups/details', (_req, res, ctx) => {
234
249
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesBackupsDetailsMock()));
235
250
  }), rest.get('*/v1/sites/:siteId/backups/jetpack', (_req, res, ctx) => {
@@ -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.413.0
6
+ * OpenAPI spec version: 1.424.0
7
7
  */
8
8
  export declare type SshKeyListV2200RowsItem = {
9
9
  name?: string;
@@ -132,6 +132,7 @@ export declare type SitesSecuritySslAcme200 = {
132
132
  export declare type SitesSecuritySitelock200 = {
133
133
  addon_id?: number;
134
134
  plan?: string;
135
+ billing_code?: string;
135
136
  success?: number;
136
137
  subscription_id?: string;
137
138
  upgrade_levels?: string[];
@@ -285,6 +286,11 @@ export declare type SitesBackupsDetails200 = {
285
286
  codeguard?: SitesBackupsDetails200Codeguard;
286
287
  jetpack?: SitesBackupsDetails200Jetpack;
287
288
  };
289
+ export declare type SitesBackupsCodeguard200 = {
290
+ website_id?: number;
291
+ database_id?: number;
292
+ success?: number;
293
+ };
288
294
  export declare type SitesHasBackups200 = {
289
295
  has_backups?: boolean;
290
296
  };
@@ -486,6 +492,9 @@ export declare type HostingSiteAddBody = {
486
492
  /** title of the site to be added */
487
493
  title: string;
488
494
  };
495
+ export declare type HostingSites200RowsItemMeta = {
496
+ pending_url?: string;
497
+ } | null;
489
498
  export declare type HostingSites200RowsItem = {
490
499
  id?: string;
491
500
  name?: string;
@@ -507,9 +516,6 @@ export declare type HostingSites200 = {
507
516
  available_sites?: number;
508
517
  rows?: HostingSites200RowsItem[];
509
518
  };
510
- export declare type HostingSites200RowsItemMeta = {
511
- pending_url?: string;
512
- } | null;
513
519
  export declare type HostingShellInfo200 = {
514
520
  enabled?: boolean;
515
521
  };
@@ -682,6 +688,14 @@ export declare const DomainsType: {
682
688
  export declare type DomainsParams = {
683
689
  type?: DomainsType;
684
690
  };
691
+ export declare type DbUserList200UsersItem = {
692
+ dblist?: string[];
693
+ shortuser?: string;
694
+ user?: string;
695
+ };
696
+ export declare type DbUserList200 = {
697
+ users?: DbUserList200UsersItem[];
698
+ };
685
699
  export declare type DbList200DatabasesItemUserlistItem = {
686
700
  db?: string;
687
701
  user?: string;
@@ -735,6 +749,71 @@ export declare type DbAddBody = {
735
749
  /** Type of database to add */
736
750
  type?: DbAddBodyType;
737
751
  };
752
+ export declare type Cron200 = {
753
+ success?: boolean;
754
+ };
755
+ export declare type CronBody = {
756
+ /** unique key for cron that is being updated (one of key or line is required) */
757
+ key: number;
758
+ };
759
+ export declare type UpdateCron200 = {
760
+ key?: number;
761
+ };
762
+ export declare type UpdateCronBody = {
763
+ /** unique key for cron that is being updated (one of key or line is required) */
764
+ key?: number;
765
+ /** line number for cron that is being updated (one of key or line is required) */
766
+ line?: number;
767
+ /** command to run as a cron, needs to be a valid string */
768
+ command: string;
769
+ /** The day of the month on which the cron job runs. An integer between 1 and 31. * - Every day. *\/2 - Every other day. 1,15 - On the 1st and 15th of the month. */
770
+ day: string;
771
+ /** The hour of the day on which the cron job runs. An integer between 0 and 23. * - Every hour. *\/2 - Every other hour. 0,12 - Every 12 hours. */
772
+ hour: string;
773
+ /** The minute of the hour on which the cron job runs. An integer between 0 and 59. * - Once per minute. *\/2 - Every other minute. *\/10 - Every 10 minutes. 0,30 - Every 30 minutes. */
774
+ minute: string;
775
+ /** The month of the year on which the cron job runs. An integer between 1 and 12. * - Every month. *\/2 - Every other month. *\/6 - Every six months. */
776
+ month: string;
777
+ /** The day of the week on which the cron job runs, 0-6. 0 - Sunday. 1 - Monday. 2 - Tuesday. 3 - Wednesday. 4 - Thursday. 5 - Friday. 6 - Saturday. * - Every day. */
778
+ weekday: string;
779
+ /** Type of line (command, variable, comment, blank, unparsed) */
780
+ type?: string;
781
+ };
782
+ export declare type AddCron400 = {
783
+ error?: string;
784
+ };
785
+ export declare type AddCron200 = {
786
+ key?: string;
787
+ };
788
+ export declare type AddCronBody = {
789
+ /** command to run as a cron, needs to be a valid string */
790
+ command: string;
791
+ /** The day of the month on which the cron job runs. An integer between 1 and 31. * - Every day. *\/2 - Every other day. 1,15 - On the 1st and 15th of the month. */
792
+ day?: string;
793
+ /** The hour of the day on which the cron job runs. An integer between 0 and 23. * - Every hour. *\/2 - Every other hour. 0,12 - Every 12 hours. */
794
+ hour?: string;
795
+ /** The minute of the hour on which the cron job runs. An integer between 0 and 59. * - Once per minute. *\/2 - Every other minute. *\/10 - Every 10 minutes. 0,30 - Every 30 minutes. */
796
+ minute?: string;
797
+ /** The month of the year on which the cron job runs. An integer between 1 and 12. * - Every month. *\/2 - Every other month. *\/6 - Every six months. */
798
+ month?: string;
799
+ /** The day of the week on which the cron job runs, 0-6. 0 - Sunday. 1 - Monday. 2 - Tuesday. 3 - Wednesday. 4 - Thursday. 5 - Friday. 6 - Saturday. * - Every day. */
800
+ weekday?: string;
801
+ };
802
+ export declare type ListCrons200RowsItem = {
803
+ command?: string;
804
+ day?: string;
805
+ hour?: string;
806
+ key?: string;
807
+ line?: string;
808
+ minute?: string;
809
+ month?: string;
810
+ type?: string;
811
+ weekday?: string;
812
+ email?: string;
813
+ };
814
+ export declare type ListCrons200 = {
815
+ rows?: ListCrons200RowsItem[];
816
+ };
738
817
  export declare type AddonCloudflare200 = {
739
818
  status?: string;
740
819
  addon_id?: number;
@@ -787,20 +866,6 @@ export declare type HostingAdvancedServer200 = {
787
866
  uptime_seconds?: number;
788
867
  actions?: HostingAdvancedServer200Actions;
789
868
  };
790
- export declare type HostingAdvancedCrontab200RowsItem = {
791
- command?: string;
792
- day?: string;
793
- hour?: string;
794
- key?: string;
795
- line?: string;
796
- minute?: string;
797
- month?: string;
798
- type?: string;
799
- weekday?: string;
800
- };
801
- export declare type HostingAdvancedCrontab200 = {
802
- rows?: HostingAdvancedCrontab200RowsItem[];
803
- };
804
869
  export declare type HostingAddons200RowsItem = {
805
870
  id?: string;
806
871
  type?: string;