@newfold/huapi-js 1.718.0 → 1.721.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.718.0",
13
+ "version": "1.721.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.718.0
6
+ * OpenAPI spec version: 1.721.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 { AccountHostingList200, 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, AddonsSpamexpertsSso200, WebzaiSso200, WeeblySso200, 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, DbUsage200, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, Domains200, DomainsParams, HostingEcommerceInfo200, HostingFtpList200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpUpdate200, HostingFtpUpdateBody, HostingFtp200, HostingFtpBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingResellerSsoWhm200, HostingShellToggle200, HostingShellToggleBody, HostingShellInfo200, 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, BackupsJetpackBackup200, SiteAddonCloudflare200, SiteAddonCloudflare400, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainUrl200, SitesDomainUrlBody, SitesDomains200, SitePendingDomainDelete200, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, ResetSite200, SitesSecurityCheckCore200, SitesSecurityResetCoreFiles200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecuritySitelock200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSsl200, SitesSso200, SitesSsoParams, SiteStatus200, SiteUsers200, SitesVersion200, HostingNameserversV2200, HostingSitesV2200, SshKeyListV2200, SitesListV2200 } from './index.schemas';
11
+ import type { AccountHostingList200, 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, AddonsSpamexpertsSso200, WebzaiSso200, WeeblySso200, 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, DbUsage200, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, Domains200, DomainsParams, HostingEcommerceInfo200, HostingFtpList200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpUpdate200, HostingFtpUpdateBody, HostingFtp200, HostingFtpBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingResellerSsoWhm200, HostingShellToggle200, HostingShellToggleBody, HostingShellInfo200, 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, BackupsJetpackBackup200, SiteAddonCloudflare200, SiteAddonCloudflare400, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainUrl200, SitesDomainUrlBody, SitesDomains200, SitePendingDomainDelete200, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, ResetSite200, ResetSiteBody, SitesSecurityCheckCore200, SitesSecurityResetCoreFiles200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecuritySitelock200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSsl200, SitesSso200, SitesSsoParams, SiteStatus200, SiteUsers200, SitesVersion200, HostingNameserversV2200, HostingSitesV2200, SshKeyListV2200, SitesListV2200 } 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
  /**
@@ -1532,16 +1532,19 @@ export declare const useSitePluginsUpdate: <TError = AxiosError<unknown, any>, T
1532
1532
  * Resets a site - deletes/reinstalls the site.
1533
1533
  * @summary reset site
1534
1534
  */
1535
- export declare const resetSite: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<ResetSite200>>;
1535
+ export declare const resetSite: (siteId: number, resetSiteBody: ResetSiteBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<ResetSite200>>;
1536
1536
  export declare type ResetSiteMutationResult = NonNullable<Awaited<ReturnType<typeof resetSite>>>;
1537
+ export declare type ResetSiteMutationBody = ResetSiteBody;
1537
1538
  export declare type ResetSiteMutationError = AxiosError<unknown>;
1538
1539
  export declare const useResetSite: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
1539
1540
  mutation?: UseMutationOptions<AxiosResponse<ResetSite200, any>, TError, {
1540
1541
  siteId: number;
1542
+ data: ResetSiteBody;
1541
1543
  }, TContext> | undefined;
1542
1544
  axios?: AxiosRequestConfig<any> | undefined;
1543
1545
  } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<ResetSite200, any>, TError, {
1544
1546
  siteId: number;
1547
+ data: ResetSiteBody;
1545
1548
  }, TContext>;
1546
1549
  /**
1547
1550
  * Performs a checksum of the site's core files to verify integrity.
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.718.0
6
+ * OpenAPI spec version: 1.721.0
7
7
  */
8
8
  import axios from 'axios';
9
9
  import { useQuery, useMutation } from '@tanstack/react-query';
@@ -1577,14 +1577,14 @@ export const useSitePluginsUpdate = (options) => {
1577
1577
  * Resets a site - deletes/reinstalls the site.
1578
1578
  * @summary reset site
1579
1579
  */
1580
- export const resetSite = (siteId, options) => {
1581
- return axios.post(`/v1/sites/${siteId}/reset`, undefined, options);
1580
+ export const resetSite = (siteId, resetSiteBody, options) => {
1581
+ return axios.post(`/v1/sites/${siteId}/reset`, resetSiteBody, options);
1582
1582
  };
1583
1583
  export const useResetSite = (options) => {
1584
1584
  const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1585
1585
  const mutationFn = (props) => {
1586
- const { siteId } = props !== null && props !== void 0 ? props : {};
1587
- return resetSite(siteId, axiosOptions);
1586
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1587
+ return resetSite(siteId, data, axiosOptions);
1588
1588
  };
1589
1589
  return useMutation(mutationFn, mutationOptions);
1590
1590
  };
@@ -527,10 +527,12 @@ export declare const getSitesDomainsMock: () => {
527
527
  id: string | undefined;
528
528
  autogen_id: string | null | undefined;
529
529
  dns_status: string | undefined;
530
- docroot: string | undefined;
530
+ docroot: string | null | undefined;
531
531
  domain: string | undefined;
532
+ base_domain: string | undefined;
532
533
  ssl_type: string | null | undefined;
533
534
  type: string | undefined;
535
+ status: string | undefined;
534
536
  }[] | undefined;
535
537
  };
536
538
  export declare const getSitePendingDomainDeleteMock: () => {};
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.718.0
6
+ * OpenAPI spec version: 1.721.0
7
7
  */
8
8
  import { rest } from 'msw';
9
9
  import { faker } from '@faker-js/faker';
@@ -94,7 +94,7 @@ export const getSiteAddonCloudflareMock = () => ({ addon_id: faker.helpers.array
94
94
  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]) });
95
95
  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]) });
96
96
  export const getSitesDomainUrlMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
97
- export const getSitesDomainsMock = () => ({ domains: 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]), autogen_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), dns_status: faker.helpers.arrayElement([faker.random.word(), undefined]), docroot: faker.helpers.arrayElement([faker.random.word(), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]), ssl_type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
97
+ export const getSitesDomainsMock = () => ({ domains: 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]), autogen_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), dns_status: faker.helpers.arrayElement([faker.random.word(), undefined]), docroot: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]), base_domain: faker.helpers.arrayElement([faker.random.word(), undefined]), ssl_type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
98
98
  export const getSitePendingDomainDeleteMock = () => ({});
99
99
  export const getSitesPerformanceCachepurgeMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
100
100
  export const getSitesPerformanceEnduranceCacheLevelStatusMock = () => ({ endurance_cache_level: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
@@ -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.718.0
6
+ * OpenAPI spec version: 1.721.0
7
7
  */
8
8
  export declare type SitesListV2200ItemsItem = {
9
9
  /** False if site was added by site scanner */
@@ -217,6 +217,12 @@ export declare type ResetSite200 = {
217
217
  previous_status: string;
218
218
  status: string;
219
219
  };
220
+ export declare type ResetSiteBody = {
221
+ /** Site type to morph to */
222
+ type?: string;
223
+ /** Site subtype to morph to */
224
+ subtype?: string;
225
+ };
220
226
  export declare type SitePluginsUpdate200 = {
221
227
  success: boolean;
222
228
  };
@@ -286,10 +292,12 @@ export declare type SitesDomains200DomainsItem = {
286
292
  id?: string;
287
293
  autogen_id?: string | null;
288
294
  dns_status?: string;
289
- docroot?: string;
295
+ docroot?: string | null;
290
296
  domain?: string;
297
+ base_domain?: string;
291
298
  ssl_type?: string | null;
292
299
  type?: string;
300
+ status?: string;
293
301
  };
294
302
  export declare type SitesDomains200 = {
295
303
  domains?: SitesDomains200DomainsItem[];