@newfold/huapi-js 1.537.0 → 1.542.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.537.0",
13
+ "version": "1.542.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.537.0
6
+ * OpenAPI spec version: 1.542.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, AddonsSpamexpertsSso200, 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, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, 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, SitesSsl200, SitesSso200, SitesSsoParams, SiteStatus200, 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, AddonsSpamexpertsSso200, 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, 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, SitesSsl200, 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
  /**
@@ -799,6 +799,20 @@ export declare const useHostingMigrations: <TError = AxiosError<unknown, any>, T
799
799
  hostingId: string;
800
800
  data: HostingMigrationsBody;
801
801
  }, TContext>;
802
+ /**
803
+ * Checks if Migration ID exists, indicating the site migration is in progress or completed
804
+ * @summary Migration ID check
805
+ */
806
+ export declare const hostingMigrationsCheck: (hostingId: number, params: HostingMigrationsCheckParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingMigrationsCheck200>>;
807
+ export declare const getHostingMigrationsCheckQueryKey: (hostingId: number, params: HostingMigrationsCheckParams) => (string | HostingMigrationsCheckParams)[];
808
+ export declare type HostingMigrationsCheckQueryResult = NonNullable<Awaited<ReturnType<typeof hostingMigrationsCheck>>>;
809
+ export declare type HostingMigrationsCheckQueryError = AxiosError<unknown>;
810
+ export declare const useHostingMigrationsCheck: <TData = AxiosResponse<HostingMigrationsCheck200, any>, TError = AxiosError<unknown, any>>(hostingId: number, params: HostingMigrationsCheckParams, options?: {
811
+ query?: UseQueryOptions<AxiosResponse<HostingMigrationsCheck200, any>, TError, TData, QueryKey> | undefined;
812
+ axios?: AxiosRequestConfig<any> | undefined;
813
+ } | undefined) => UseQueryResult<TData, TError> & {
814
+ queryKey: QueryKey;
815
+ };
802
816
  /**
803
817
  * Post migration event to CWM
804
818
  * @summary hosting migrations event
@@ -890,6 +904,20 @@ export declare const useHostingOnboardingDataUpdate: <TError = AxiosError<unknow
890
904
  hostingId: string;
891
905
  data: HostingOnboardingDataUpdateBody;
892
906
  }, TContext>;
907
+ /**
908
+ * Returns the hosting sso_whm login url
909
+ * @summary hosting sso_whm
910
+ */
911
+ export declare const hostingResellerSsoWhm: (hostingId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingResellerSsoWhm200>>;
912
+ export declare const getHostingResellerSsoWhmQueryKey: (hostingId: number) => string[];
913
+ export declare type HostingResellerSsoWhmQueryResult = NonNullable<Awaited<ReturnType<typeof hostingResellerSsoWhm>>>;
914
+ export declare type HostingResellerSsoWhmQueryError = AxiosError<unknown>;
915
+ export declare const useHostingResellerSsoWhm: <TData = AxiosResponse<HostingResellerSsoWhm200, any>, TError = AxiosError<unknown, any>>(hostingId: number, options?: {
916
+ query?: UseQueryOptions<AxiosResponse<HostingResellerSsoWhm200, any>, TError, TData, QueryKey> | undefined;
917
+ axios?: AxiosRequestConfig<any> | undefined;
918
+ } | undefined) => UseQueryResult<TData, TError> & {
919
+ queryKey: QueryKey;
920
+ };
893
921
  /**
894
922
  * Enable or disable shell access on an account by setting the shell.SSH key access must be established separately.
895
923
  * @summary hosting shell toggle
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.537.0
6
+ * OpenAPI spec version: 1.542.0
7
7
  */
8
8
  import axios from 'axios';
9
9
  import { useQuery, useMutation } from '@tanstack/react-query';
@@ -811,6 +811,23 @@ export const useHostingMigrations = (options) => {
811
811
  };
812
812
  return useMutation(mutationFn, mutationOptions);
813
813
  };
814
+ /**
815
+ * Checks if Migration ID exists, indicating the site migration is in progress or completed
816
+ * @summary Migration ID check
817
+ */
818
+ export const hostingMigrationsCheck = (hostingId, params, options) => {
819
+ return axios.get(`/v1/hosting/${hostingId}/migrations/check`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
820
+ };
821
+ export const getHostingMigrationsCheckQueryKey = (hostingId, params) => [`/v1/hosting/${hostingId}/migrations/check`, ...(params ? [params] : [])];
822
+ export const useHostingMigrationsCheck = (hostingId, params, options) => {
823
+ var _a;
824
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
825
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingMigrationsCheckQueryKey(hostingId, params);
826
+ const queryFn = ({ signal }) => hostingMigrationsCheck(hostingId, params, Object.assign({ signal }, axiosOptions));
827
+ const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions));
828
+ query.queryKey = queryKey;
829
+ return query;
830
+ };
814
831
  /**
815
832
  * Post migration event to CWM
816
833
  * @summary hosting migrations event
@@ -908,6 +925,23 @@ export const useHostingOnboardingDataUpdate = (options) => {
908
925
  };
909
926
  return useMutation(mutationFn, mutationOptions);
910
927
  };
928
+ /**
929
+ * Returns the hosting sso_whm login url
930
+ * @summary hosting sso_whm
931
+ */
932
+ export const hostingResellerSsoWhm = (hostingId, options) => {
933
+ return axios.get(`/v1/hosting/${hostingId}/reseller/sso/whm`, options);
934
+ };
935
+ export const getHostingResellerSsoWhmQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/reseller/sso/whm`];
936
+ export const useHostingResellerSsoWhm = (hostingId, options) => {
937
+ var _a;
938
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
939
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingResellerSsoWhmQueryKey(hostingId);
940
+ const queryFn = ({ signal }) => hostingResellerSsoWhm(hostingId, Object.assign({ signal }, axiosOptions));
941
+ const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions));
942
+ query.queryKey = queryKey;
943
+ return query;
944
+ };
911
945
  /**
912
946
  * Enable or disable shell access on an account by setting the shell.SSH key access must be established separately.
913
947
  * @summary hosting shell toggle
@@ -112,6 +112,7 @@ export declare const getHostingAccountMock: () => {
112
112
  } | undefined;
113
113
  panel: string | undefined;
114
114
  plan_key: string | undefined;
115
+ server_subtype: string | undefined;
115
116
  };
116
117
  export declare const getHostingAddonsMock: () => {
117
118
  rows: {
@@ -296,6 +297,10 @@ export declare const getHostingMigrationStatusMock: () => {
296
297
  export declare const getHostingMigrationsMock: () => {
297
298
  success: boolean | undefined;
298
299
  };
300
+ export declare const getHostingMigrationsCheckMock: () => {
301
+ transferable: boolean | undefined;
302
+ description: string | undefined;
303
+ };
299
304
  export declare const getHostingMigrationsEventMock: () => {
300
305
  success: boolean | undefined;
301
306
  };
@@ -320,6 +325,9 @@ export declare const getHostingOnboardingDataMock: () => {
320
325
  export declare const getHostingOnboardingDataUpdateMock: () => {
321
326
  completed: boolean | undefined;
322
327
  };
328
+ export declare const getHostingResellerSsoWhmMock: () => {
329
+ url: string | undefined;
330
+ };
323
331
  export declare const getHostingShellToggleMock: () => {
324
332
  enabled: boolean | undefined;
325
333
  };
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.537.0
6
+ * OpenAPI spec version: 1.542.0
7
7
  */
8
8
  import { rest } from 'msw';
9
9
  import { faker } from '@faker-js/faker';
@@ -25,7 +25,7 @@ export const getAddonsSitelockSsoMock = () => ({ site_url: faker.helpers.arrayEl
25
25
  export const getAddonsCloudflareMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
26
26
  export const getAddonsInfoMock = () => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]) });
27
27
  export const getAddonsSpamexpertsSsoMock = () => ({ url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
28
- 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]), billing: faker.helpers.arrayElement([{ product_name: faker.helpers.arrayElement([faker.random.word(), undefined]) }, undefined]), panel: faker.helpers.arrayElement([faker.random.word(), undefined]), plan_key: faker.helpers.arrayElement([faker.random.word(), undefined]) });
28
+ 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]), billing: faker.helpers.arrayElement([{ product_name: faker.helpers.arrayElement([faker.random.word(), undefined]) }, undefined]), panel: faker.helpers.arrayElement([faker.random.word(), undefined]), plan_key: faker.helpers.arrayElement([faker.random.word(), undefined]), server_subtype: faker.helpers.arrayElement([faker.random.word(), undefined]) });
29
29
  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]) });
30
30
  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
31
  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]) });
@@ -57,12 +57,14 @@ export const getHostingInfoDiskUsageMock = () => ({ diskused: faker.helpers.arra
57
57
  export const getHostingLeadMock = () => ({ response: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ providerApplicationName: faker.helpers.arrayElement([faker.random.word(), undefined]), clientRequestId: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), errors: faker.helpers.arrayElement([faker.random.word(), undefined]), data: faker.helpers.arrayElement([{ leadId: faker.helpers.arrayElement([faker.random.word(), undefined]), message: faker.helpers.arrayElement([faker.random.word(), undefined]) }, undefined]), messageId: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
58
58
  export const getHostingMigrationStatusMock = () => ({ 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]) })), undefined]) });
59
59
  export const getHostingMigrationsMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
60
+ export const getHostingMigrationsCheckMock = () => ({ transferable: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), description: faker.helpers.arrayElement([faker.random.word(), undefined]) });
60
61
  export const getHostingMigrationsEventMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
61
62
  export const getHostingMigrationInfoMock = () => ({ migration_id: faker.helpers.arrayElement([faker.random.word(), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]), site_url: faker.helpers.arrayElement([faker.random.word(), undefined]), hostname: faker.helpers.arrayElement([faker.random.word(), undefined]), feasible: faker.helpers.arrayElement([faker.random.word(), undefined]), incoming_domain: faker.helpers.arrayElement([faker.random.word(), undefined]) });
62
63
  export const getHostingMigrationSiteScanStatusMock = () => ({ transferable: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), callback_url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
63
64
  export const getHostingNameserversMock = () => ({ nameservers: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())) });
64
65
  export const getHostingOnboardingDataMock = () => ({ completed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
65
66
  export const getHostingOnboardingDataUpdateMock = () => ({ completed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
67
+ export const getHostingResellerSsoWhmMock = () => ({ url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
66
68
  export const getHostingShellToggleMock = () => ({ enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
67
69
  export const getHostingShellInfoMock = () => ({ enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
68
70
  export const getHostingSitesMock = () => ({ n_rows: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), n_pages: 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.datatype.number({ min: undefined, max: undefined }), undefined]), 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]), 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]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), pending_url: faker.helpers.arrayElement([faker.random.word(), undefined]), meta: faker.helpers.arrayElement([{ pending_url: faker.helpers.arrayElement([faker.random.word(), undefined]) }, undefined]) })), undefined]) });
@@ -223,6 +225,8 @@ export const getHostingUAPIMSW = () => [
223
225
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingMigrationStatusMock()));
224
226
  }), rest.post('*/v1/hosting/:hostingId/migrations', (_req, res, ctx) => {
225
227
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingMigrationsMock()));
228
+ }), rest.get('*/v1/hosting/:hostingId/migrations/check', (_req, res, ctx) => {
229
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingMigrationsCheckMock()));
226
230
  }), rest.post('*/v1/hosting/:hostingId/migrations/event', (_req, res, ctx) => {
227
231
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingMigrationsEventMock()));
228
232
  }), rest.get('*/v1/hosting/:hostingId/migrations/info', (_req, res, ctx) => {
@@ -235,6 +239,8 @@ export const getHostingUAPIMSW = () => [
235
239
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingOnboardingDataMock()));
236
240
  }), rest.put('*/v1/hosting/:hostingId/onboarding', (_req, res, ctx) => {
237
241
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingOnboardingDataUpdateMock()));
242
+ }), rest.get('*/v1/hosting/:hostingId/reseller/sso/whm', (_req, res, ctx) => {
243
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingResellerSsoWhmMock()));
238
244
  }), rest.put('*/v1/hosting/:hostingId/shell', (_req, res, ctx) => {
239
245
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingShellToggleMock()));
240
246
  }), rest.get('*/v1/hosting/:hostingId/shell', (_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.537.0
6
+ * OpenAPI spec version: 1.542.0
7
7
  */
8
8
  export declare type SshKeyListV2200RowsItem = {
9
9
  name?: string;
@@ -563,6 +563,9 @@ export declare type HostingShellToggleBody = {
563
563
  /** boolean flag to enable or disable hosting shell */
564
564
  enabled: boolean;
565
565
  };
566
+ export declare type HostingResellerSsoWhm200 = {
567
+ url?: string;
568
+ };
566
569
  export declare type HostingOnboardingDataUpdate200 = {
567
570
  completed?: boolean;
568
571
  };
@@ -614,6 +617,16 @@ export declare type HostingMigrationsEventBody = {
614
617
  migration_id: string;
615
618
  event_name: HostingMigrationsEventBodyEventName;
616
619
  };
620
+ export declare type HostingMigrationsCheck200 = {
621
+ transferable?: boolean;
622
+ description?: string;
623
+ };
624
+ export declare type HostingMigrationsCheckParams = {
625
+ /**
626
+ * Migration ID to be checked if already used to migrate site on the hosting account
627
+ */
628
+ migration_id: string;
629
+ };
617
630
  export declare type HostingMigrations200 = {
618
631
  success?: boolean;
619
632
  };
@@ -1011,6 +1024,7 @@ export declare type HostingAccount200 = {
1011
1024
  billing?: HostingAccount200Billing;
1012
1025
  panel?: string;
1013
1026
  plan_key?: string;
1027
+ server_subtype?: string;
1014
1028
  };
1015
1029
  export declare type AddonsSpamexpertsSso200 = {
1016
1030
  url?: string;