@newfold/huapi-js 1.424.0 → 1.468.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.424.0",
13
+ "version": "1.468.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.424.0
6
+ * OpenAPI spec version: 1.468.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, 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';
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, SitePendingDomainDelete200, 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, SiteStatus200, 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
  /**
@@ -1136,6 +1136,21 @@ export declare const useSitesDomainUrl: <TError = AxiosError<unknown, any>, TCon
1136
1136
  siteId: number;
1137
1137
  data: SitesDomainUrlBody;
1138
1138
  }, TContext>;
1139
+ /**
1140
+ * Delete pending domain
1141
+ * @summary Delete pending domain
1142
+ */
1143
+ export declare const sitePendingDomainDelete: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitePendingDomainDelete200>>;
1144
+ export declare type SitePendingDomainDeleteMutationResult = NonNullable<Awaited<ReturnType<typeof sitePendingDomainDelete>>>;
1145
+ export declare type SitePendingDomainDeleteMutationError = AxiosError<unknown>;
1146
+ export declare const useSitePendingDomainDelete: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
1147
+ mutation?: UseMutationOptions<AxiosResponse<SitePendingDomainDelete200, any>, TError, {
1148
+ siteId: number;
1149
+ }, TContext> | undefined;
1150
+ axios?: AxiosRequestConfig<any> | undefined;
1151
+ } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<SitePendingDomainDelete200, any>, TError, {
1152
+ siteId: number;
1153
+ }, TContext>;
1139
1154
  /**
1140
1155
  * cache purge site and url
1141
1156
  * @summary cache purge url
@@ -1567,6 +1582,19 @@ export declare const useSitesSso: <TData = AxiosResponse<SitesSso200, any>, TErr
1567
1582
  } | undefined) => UseQueryResult<TData, TError> & {
1568
1583
  queryKey: QueryKey;
1569
1584
  };
1585
+ /**
1586
+ * @summary site status
1587
+ */
1588
+ export declare const siteStatus: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SiteStatus200>>;
1589
+ export declare const getSiteStatusQueryKey: (siteId: number) => string[];
1590
+ export declare type SiteStatusQueryResult = NonNullable<Awaited<ReturnType<typeof siteStatus>>>;
1591
+ export declare type SiteStatusQueryError = AxiosError<unknown>;
1592
+ export declare const useSiteStatus: <TData = AxiosResponse<SiteStatus200, any>, TError = AxiosError<unknown, any>>(siteId: number, options?: {
1593
+ query?: UseQueryOptions<AxiosResponse<SiteStatus200, any>, TError, TData, QueryKey> | undefined;
1594
+ axios?: AxiosRequestConfig<any> | undefined;
1595
+ } | undefined) => UseQueryResult<TData, TError> & {
1596
+ queryKey: QueryKey;
1597
+ };
1570
1598
  /**
1571
1599
  * Returns a list of the site's users
1572
1600
  * @summary users
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.424.0
6
+ * OpenAPI spec version: 1.468.0
7
7
  */
8
8
  import axios from 'axios';
9
9
  import { useQuery, useMutation } from '@tanstack/react-query';
@@ -1171,6 +1171,21 @@ export const useSitesDomainUrl = (options) => {
1171
1171
  };
1172
1172
  return useMutation(mutationFn, mutationOptions);
1173
1173
  };
1174
+ /**
1175
+ * Delete pending domain
1176
+ * @summary Delete pending domain
1177
+ */
1178
+ export const sitePendingDomainDelete = (siteId, options) => {
1179
+ return axios.delete(`/v1/sites/${siteId}/pending-domain`, options);
1180
+ };
1181
+ export const useSitePendingDomainDelete = (options) => {
1182
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1183
+ const mutationFn = (props) => {
1184
+ const { siteId } = props !== null && props !== void 0 ? props : {};
1185
+ return sitePendingDomainDelete(siteId, axiosOptions);
1186
+ };
1187
+ return useMutation(mutationFn, mutationOptions);
1188
+ };
1174
1189
  /**
1175
1190
  * cache purge site and url
1176
1191
  * @summary cache purge url
@@ -1605,6 +1620,22 @@ export const useSitesSso = (siteId, params, options) => {
1605
1620
  query.queryKey = queryKey;
1606
1621
  return query;
1607
1622
  };
1623
+ /**
1624
+ * @summary site status
1625
+ */
1626
+ export const siteStatus = (siteId, options) => {
1627
+ return axios.get(`/v1/sites/${siteId}/status`, options);
1628
+ };
1629
+ export const getSiteStatusQueryKey = (siteId) => [`/v1/sites/${siteId}/status`];
1630
+ export const useSiteStatus = (siteId, options) => {
1631
+ var _a;
1632
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1633
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSiteStatusQueryKey(siteId);
1634
+ const queryFn = ({ signal }) => siteStatus(siteId, Object.assign({ signal }, axiosOptions));
1635
+ const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions));
1636
+ query.queryKey = queryKey;
1637
+ return query;
1638
+ };
1608
1639
  /**
1609
1640
  * Returns a list of the site's users
1610
1641
  * @summary users
@@ -354,13 +354,8 @@ export declare const getSitesInfoMock: () => {
354
354
  status: string;
355
355
  url: string;
356
356
  version: string;
357
- versionLatest: string | undefined;
358
357
  php_version: string | null | undefined;
359
- updatable: boolean | undefined;
360
358
  pending_url: string | undefined;
361
- meta: {
362
- pending_url: string | undefined;
363
- } | undefined;
364
359
  };
365
360
  export declare const getSiteUpdateMock: () => {
366
361
  success: boolean;
@@ -434,6 +429,7 @@ export declare const getSitesDomainMock: () => {
434
429
  export declare const getSitesDomainUrlMock: () => {
435
430
  success: boolean | undefined;
436
431
  };
432
+ export declare const getSitePendingDomainDeleteMock: () => {};
437
433
  export declare const getSitesPerformanceCachepurgeMock: () => {
438
434
  success: boolean | undefined;
439
435
  };
@@ -540,6 +536,11 @@ export declare const getSitesSettingsPhpVersionsMock: () => {
540
536
  export declare const getSitesSsoMock: () => {
541
537
  sso: string | undefined;
542
538
  };
539
+ export declare const getSiteStatusMock: () => {
540
+ url: string | undefined;
541
+ pending_url: string | undefined;
542
+ cloudflare_ready: boolean | undefined;
543
+ };
543
544
  export declare const getSiteUsersMock: () => {
544
545
  users: {
545
546
  display_name: 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.424.0
6
+ * OpenAPI spec version: 1.468.0
7
7
  */
8
8
  import { rest } from 'msw';
9
9
  import { faker } from '@faker-js/faker';
@@ -66,7 +66,7 @@ export const getSshKeyMock = () => ({ deleted: faker.helpers.arrayElement([faker
66
66
  export const getSshKeyGenerateMock = () => ({ key_name: faker.helpers.arrayElement([faker.random.word(), undefined]), private_key_path: faker.helpers.arrayElement([faker.random.word(), undefined]), public_key_path: faker.helpers.arrayElement([faker.random.word(), undefined]) });
67
67
  export const getSsoMock = () => ({ url: faker.random.word() });
68
68
  export const getSitesListMock = () => ({ items: 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]), name: faker.helpers.arrayElement([faker.random.word(), undefined]), url: faker.helpers.arrayElement([faker.random.word(), undefined]), docroot: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
69
- export const getSitesInfoMock = () => ({ id: faker.random.word(), docroot: faker.random.word(), uuid: faker.random.word(), date_added: faker.random.word(), date_modified: faker.random.word(), name: faker.random.word(), type: faker.random.word(), subtype: faker.random.word(), status: faker.random.word(), url: faker.random.word(), version: faker.random.word(), versionLatest: faker.helpers.arrayElement([faker.random.word(), undefined]), php_version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), updatable: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), pending_url: faker.helpers.arrayElement([faker.random.word(), undefined]), meta: faker.helpers.arrayElement([{ pending_url: faker.helpers.arrayElement([faker.random.word(), undefined]) }, undefined]) });
69
+ export const getSitesInfoMock = () => ({ id: faker.random.word(), docroot: faker.random.word(), uuid: faker.random.word(), date_added: faker.random.word(), date_modified: faker.random.word(), name: faker.random.word(), type: faker.random.word(), subtype: faker.random.word(), status: faker.random.word(), url: faker.random.word(), version: faker.random.word(), php_version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), pending_url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
70
70
  export const getSiteUpdateMock = () => ({ success: faker.datatype.boolean() });
71
71
  export const getSiteMock = () => ({ success: faker.datatype.boolean() });
72
72
  export const getSitesAutoupdatesInfoMock = () => ({ plugins: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), core: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), themes: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
@@ -79,6 +79,7 @@ export const getJetpackBackupStatusMock = () => ({ has_active_plugin: faker.help
79
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]) });
80
80
  export const getSitesDomainMock = () => ({ connected: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), a_match: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), nameserver_match: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), detected: faker.helpers.arrayElement([{ a: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]) }, undefined]), wanted: faker.helpers.arrayElement([{ a: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]) }, undefined]) });
81
81
  export const getSitesDomainUrlMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
82
+ export const getSitePendingDomainDeleteMock = () => ({});
82
83
  export const getSitesPerformanceCachepurgeMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
83
84
  export const getSitesPerformanceEnduranceCacheLevelStatusMock = () => ({ endurance_cache_level: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
84
85
  export const getSitesPerformanceEnduranceCacheLevelMock = () => ({ options: faker.helpers.arrayElement([{}, undefined]) });
@@ -106,6 +107,7 @@ export const getSitesSettingsDebugToggleMock = () => ({ success: faker.helpers.a
106
107
  export const getSitesSettingsPhpVersionUpdateMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
107
108
  export const getSitesSettingsPhpVersionsMock = () => ({ versions: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]) });
108
109
  export const getSitesSsoMock = () => ({ sso: faker.helpers.arrayElement([faker.random.word(), undefined]) });
110
+ export const getSiteStatusMock = () => ({ url: faker.helpers.arrayElement([faker.random.word(), undefined]), pending_url: faker.helpers.arrayElement([faker.random.word(), undefined]), cloudflare_ready: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
109
111
  export const getSiteUsersMock = () => ({ users: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ display_name: faker.helpers.arrayElement([faker.random.word(), undefined]), id: faker.datatype.number({ min: undefined, max: undefined }), meta: faker.helpers.arrayElement([{ maestro_web_pro: faker.helpers.arrayElement([faker.random.word(), undefined]), maestro_wpp_identifier: faker.helpers.arrayElement([faker.random.word(), undefined]) }, undefined]), post_count: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), role: faker.random.word(), user_email: faker.random.word(), user_id: faker.datatype.number({ min: undefined, max: undefined }), user_login: faker.random.word(), user_nicename: faker.random.word() })) });
110
112
  export const getSitesVersionMock = () => ({ current: faker.helpers.arrayElement([faker.random.word(), undefined]), latest: faker.helpers.arrayElement([faker.random.word(), undefined]), update: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
111
113
  export const getHostingSitesV2Mock = () => ({ total: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), page: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), limit: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), max_sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), used_sites: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), available_sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), items: 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]), name: faker.helpers.arrayElement([faker.random.word(), undefined]), url: faker.helpers.arrayElement([faker.random.word(), undefined]), docroot: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), pending_url: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
@@ -255,6 +257,8 @@ export const getHostingUAPIMSW = () => [
255
257
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesDomainMock()));
256
258
  }), rest.post('*/v1/sites/:siteId/domain', (_req, res, ctx) => {
257
259
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesDomainUrlMock()));
260
+ }), rest.delete('*/v1/sites/:siteId/pending-domain', (_req, res, ctx) => {
261
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitePendingDomainDeleteMock()));
258
262
  }), rest.post('*/v1/sites/:siteId/performance/cachepurge', (_req, res, ctx) => {
259
263
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesPerformanceCachepurgeMock()));
260
264
  }), rest.get('*/v1/sites/:siteId/performance/endurance_cache_level', (_req, res, ctx) => {
@@ -309,6 +313,8 @@ export const getHostingUAPIMSW = () => [
309
313
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSettingsPhpVersionsMock()));
310
314
  }), rest.get('*/v1/sites/:siteId/sso', (_req, res, ctx) => {
311
315
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSsoMock()));
316
+ }), rest.get('*/v1/sites/:siteId/status', (_req, res, ctx) => {
317
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSiteStatusMock()));
312
318
  }), rest.get('*/v1/sites/:siteId/users', (_req, res, ctx) => {
313
319
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSiteUsersMock()));
314
320
  }), rest.get('*/v1/sites/:siteId/version', (_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.424.0
6
+ * OpenAPI spec version: 1.468.0
7
7
  */
8
8
  export declare type SshKeyListV2200RowsItem = {
9
9
  name?: string;
@@ -57,6 +57,11 @@ export declare type SiteUsers200UsersItem = {
57
57
  export declare type SiteUsers200 = {
58
58
  users: SiteUsers200UsersItem[];
59
59
  };
60
+ export declare type SiteStatus200 = {
61
+ url?: string;
62
+ pending_url?: string;
63
+ cloudflare_ready?: boolean | null;
64
+ };
60
65
  export declare type SitesSso200 = {
61
66
  sso?: string;
62
67
  };
@@ -226,6 +231,9 @@ export declare type SitesPerformanceCachepurgeBody = {
226
231
  /** Pass either 0 or 1 */
227
232
  epc?: number;
228
233
  };
234
+ export declare type SitePendingDomainDelete200 = {
235
+ [key: string]: any;
236
+ };
229
237
  export declare type SitesDomainUrl200 = {
230
238
  success?: boolean;
231
239
  };
@@ -329,9 +337,6 @@ export declare type SiteUpdateBody = {
329
337
  /** filesystem path that follows the domain in the url */
330
338
  path?: string;
331
339
  };
332
- export declare type SitesInfo200Meta = {
333
- pending_url?: string;
334
- } | null;
335
340
  export declare type SitesInfo200 = {
336
341
  id: string;
337
342
  docroot: string;
@@ -344,12 +349,9 @@ export declare type SitesInfo200 = {
344
349
  status: string;
345
350
  url: string;
346
351
  version: string;
347
- versionLatest?: string;
348
352
  /** The Php Version. If unable to determine, it will be NULL */
349
353
  php_version?: string | null;
350
- updatable?: boolean;
351
354
  pending_url?: string;
352
- meta?: SitesInfo200Meta;
353
355
  };
354
356
  export declare type SitesList200ItemsItem = {
355
357
  id?: string;
@@ -753,17 +755,15 @@ export declare type Cron200 = {
753
755
  success?: boolean;
754
756
  };
755
757
  export declare type CronBody = {
756
- /** unique key for cron that is being updated (one of key or line is required) */
758
+ /** unique key for cron that is being updated */
757
759
  key: number;
758
760
  };
759
761
  export declare type UpdateCron200 = {
760
762
  key?: number;
761
763
  };
762
764
  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;
765
+ /** unique key for cron that is being updated */
766
+ key: number;
767
767
  /** command to run as a cron, needs to be a valid string */
768
768
  command: string;
769
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. */
@@ -776,7 +776,7 @@ export declare type UpdateCronBody = {
776
776
  month: string;
777
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
778
  weekday: string;
779
- /** Type of line (command, variable, comment, blank, unparsed) */
779
+ /** Type of command (command, variable, comment, blank, unparsed) */
780
780
  type?: string;
781
781
  };
782
782
  export declare type AddCron400 = {
@@ -840,7 +840,7 @@ export declare type HostingAdvancedPassword200 = {
840
840
  };
841
841
  export declare type HostingAdvancedPasswordBody = {
842
842
  /** The username to be updated */
843
- user?: string;
843
+ account_username?: string;
844
844
  /** The password to be updated to */
845
845
  password: string;
846
846
  };