@newfold/huapi-js 1.528.0 → 1.538.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 +1 -1
- package/src/index.d.ts +16 -2
- package/src/index.js +18 -1
- package/src/index.msw.d.ts +6 -0
- package/src/index.msw.js +7 -4
- package/src/index.schemas.d.ts +7 -1
package/package.json
CHANGED
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.
|
|
6
|
+
* OpenAPI spec version: 1.538.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, 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
|
/**
|
|
@@ -890,6 +890,20 @@ export declare const useHostingOnboardingDataUpdate: <TError = AxiosError<unknow
|
|
|
890
890
|
hostingId: string;
|
|
891
891
|
data: HostingOnboardingDataUpdateBody;
|
|
892
892
|
}, TContext>;
|
|
893
|
+
/**
|
|
894
|
+
* Returns the hosting sso_whm login url
|
|
895
|
+
* @summary hosting sso_whm
|
|
896
|
+
*/
|
|
897
|
+
export declare const hostingResellerSsoWhm: (hostingId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingResellerSsoWhm200>>;
|
|
898
|
+
export declare const getHostingResellerSsoWhmQueryKey: (hostingId: number) => string[];
|
|
899
|
+
export declare type HostingResellerSsoWhmQueryResult = NonNullable<Awaited<ReturnType<typeof hostingResellerSsoWhm>>>;
|
|
900
|
+
export declare type HostingResellerSsoWhmQueryError = AxiosError<unknown>;
|
|
901
|
+
export declare const useHostingResellerSsoWhm: <TData = AxiosResponse<HostingResellerSsoWhm200, any>, TError = AxiosError<unknown, any>>(hostingId: number, options?: {
|
|
902
|
+
query?: UseQueryOptions<AxiosResponse<HostingResellerSsoWhm200, any>, TError, TData, QueryKey> | undefined;
|
|
903
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
904
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
905
|
+
queryKey: QueryKey;
|
|
906
|
+
};
|
|
893
907
|
/**
|
|
894
908
|
* Enable or disable shell access on an account by setting the shell.SSH key access must be established separately.
|
|
895
909
|
* @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.
|
|
6
|
+
* OpenAPI spec version: 1.538.0
|
|
7
7
|
*/
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
import { useQuery, useMutation } from '@tanstack/react-query';
|
|
@@ -908,6 +908,23 @@ export const useHostingOnboardingDataUpdate = (options) => {
|
|
|
908
908
|
};
|
|
909
909
|
return useMutation(mutationFn, mutationOptions);
|
|
910
910
|
};
|
|
911
|
+
/**
|
|
912
|
+
* Returns the hosting sso_whm login url
|
|
913
|
+
* @summary hosting sso_whm
|
|
914
|
+
*/
|
|
915
|
+
export const hostingResellerSsoWhm = (hostingId, options) => {
|
|
916
|
+
return axios.get(`/v1/hosting/${hostingId}/reseller/sso/whm`, options);
|
|
917
|
+
};
|
|
918
|
+
export const getHostingResellerSsoWhmQueryKey = (hostingId) => [`/v1/hosting/${hostingId}/reseller/sso/whm`];
|
|
919
|
+
export const useHostingResellerSsoWhm = (hostingId, options) => {
|
|
920
|
+
var _a;
|
|
921
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
922
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingResellerSsoWhmQueryKey(hostingId);
|
|
923
|
+
const queryFn = ({ signal }) => hostingResellerSsoWhm(hostingId, Object.assign({ signal }, axiosOptions));
|
|
924
|
+
const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions));
|
|
925
|
+
query.queryKey = queryKey;
|
|
926
|
+
return query;
|
|
927
|
+
};
|
|
911
928
|
/**
|
|
912
929
|
* Enable or disable shell access on an account by setting the shell.SSH key access must be established separately.
|
|
913
930
|
* @summary hosting shell toggle
|
package/src/index.msw.d.ts
CHANGED
|
@@ -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: {
|
|
@@ -320,6 +321,9 @@ export declare const getHostingOnboardingDataMock: () => {
|
|
|
320
321
|
export declare const getHostingOnboardingDataUpdateMock: () => {
|
|
321
322
|
completed: boolean | undefined;
|
|
322
323
|
};
|
|
324
|
+
export declare const getHostingResellerSsoWhmMock: () => {
|
|
325
|
+
url: string | undefined;
|
|
326
|
+
};
|
|
323
327
|
export declare const getHostingShellToggleMock: () => {
|
|
324
328
|
enabled: boolean | undefined;
|
|
325
329
|
};
|
|
@@ -454,6 +458,7 @@ export declare const getSitesBackupsDetailsMock: () => {
|
|
|
454
458
|
can_upgrade: boolean | undefined;
|
|
455
459
|
has_active_plugin: boolean | undefined;
|
|
456
460
|
has_active_addon: boolean | undefined;
|
|
461
|
+
addon_back_reference: string | null | undefined;
|
|
457
462
|
} | undefined;
|
|
458
463
|
};
|
|
459
464
|
export declare const getJetpackBackupStatusMock: () => {
|
|
@@ -465,6 +470,7 @@ export declare const getJetpackBackupStatusMock: () => {
|
|
|
465
470
|
can_upgrade: boolean | undefined;
|
|
466
471
|
has_active_plugin: boolean | undefined;
|
|
467
472
|
has_active_addon: boolean | undefined;
|
|
473
|
+
addon_back_reference: string | null | undefined;
|
|
468
474
|
};
|
|
469
475
|
export declare const getSitesDnsMock: () => {
|
|
470
476
|
success: boolean | 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.
|
|
6
|
+
* OpenAPI spec version: 1.538.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]) });
|
|
@@ -63,6 +63,7 @@ export const getHostingMigrationSiteScanStatusMock = () => ({ transferable: fake
|
|
|
63
63
|
export const getHostingNameserversMock = () => ({ nameservers: Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())) });
|
|
64
64
|
export const getHostingOnboardingDataMock = () => ({ completed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
65
65
|
export const getHostingOnboardingDataUpdateMock = () => ({ completed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
66
|
+
export const getHostingResellerSsoWhmMock = () => ({ url: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
66
67
|
export const getHostingShellToggleMock = () => ({ enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
67
68
|
export const getHostingShellInfoMock = () => ({ enabled: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
68
69
|
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]) });
|
|
@@ -83,8 +84,8 @@ export const getSitesAutoupdatesUpdateMock = () => ({ plugins: faker.helpers.arr
|
|
|
83
84
|
export const getSitesBackupsMock = () => ({ has_backups: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
84
85
|
export const getSitesHasBackupsMock = () => ({ has_backups: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
85
86
|
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]) });
|
|
86
|
-
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]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), plan_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), can_upgrade: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_plugin: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_addon: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, undefined]) });
|
|
87
|
-
export const getJetpackBackupStatusMock = () => ({ plugin_exists: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_exists: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), plan_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), can_upgrade: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_plugin: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_addon: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
87
|
+
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]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), plan_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), can_upgrade: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_plugin: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_addon: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_back_reference: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]) }, undefined]) });
|
|
88
|
+
export const getJetpackBackupStatusMock = () => ({ plugin_exists: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_exists: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), plan_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), can_upgrade: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_plugin: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_addon: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_back_reference: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]) });
|
|
88
89
|
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]) });
|
|
89
90
|
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]) });
|
|
90
91
|
export const getSitesDomainUrlMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
@@ -235,6 +236,8 @@ export const getHostingUAPIMSW = () => [
|
|
|
235
236
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingOnboardingDataMock()));
|
|
236
237
|
}), rest.put('*/v1/hosting/:hostingId/onboarding', (_req, res, ctx) => {
|
|
237
238
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingOnboardingDataUpdateMock()));
|
|
239
|
+
}), rest.get('*/v1/hosting/:hostingId/reseller/sso/whm', (_req, res, ctx) => {
|
|
240
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingResellerSsoWhmMock()));
|
|
238
241
|
}), rest.put('*/v1/hosting/:hostingId/shell', (_req, res, ctx) => {
|
|
239
242
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getHostingShellToggleMock()));
|
|
240
243
|
}), rest.get('*/v1/hosting/:hostingId/shell', (_req, res, ctx) => {
|
package/src/index.schemas.d.ts
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.
|
|
6
|
+
* OpenAPI spec version: 1.538.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SshKeyListV2200RowsItem = {
|
|
9
9
|
name?: string;
|
|
@@ -297,6 +297,7 @@ export declare type JetpackBackupStatus200 = {
|
|
|
297
297
|
can_upgrade?: boolean;
|
|
298
298
|
has_active_plugin?: boolean;
|
|
299
299
|
has_active_addon?: boolean;
|
|
300
|
+
addon_back_reference?: string | null;
|
|
300
301
|
};
|
|
301
302
|
export declare type SitesBackupsDetails200Jetpack = {
|
|
302
303
|
plugin_exists?: boolean;
|
|
@@ -307,6 +308,7 @@ export declare type SitesBackupsDetails200Jetpack = {
|
|
|
307
308
|
can_upgrade?: boolean;
|
|
308
309
|
has_active_plugin?: boolean;
|
|
309
310
|
has_active_addon?: boolean;
|
|
311
|
+
addon_back_reference?: string | null;
|
|
310
312
|
};
|
|
311
313
|
export declare type SitesBackupsDetails200Codeguard = {
|
|
312
314
|
addon_id?: string;
|
|
@@ -561,6 +563,9 @@ export declare type HostingShellToggleBody = {
|
|
|
561
563
|
/** boolean flag to enable or disable hosting shell */
|
|
562
564
|
enabled: boolean;
|
|
563
565
|
};
|
|
566
|
+
export declare type HostingResellerSsoWhm200 = {
|
|
567
|
+
url?: string;
|
|
568
|
+
};
|
|
564
569
|
export declare type HostingOnboardingDataUpdate200 = {
|
|
565
570
|
completed?: boolean;
|
|
566
571
|
};
|
|
@@ -1009,6 +1014,7 @@ export declare type HostingAccount200 = {
|
|
|
1009
1014
|
billing?: HostingAccount200Billing;
|
|
1010
1015
|
panel?: string;
|
|
1011
1016
|
plan_key?: string;
|
|
1017
|
+
server_subtype?: string;
|
|
1012
1018
|
};
|
|
1013
1019
|
export declare type AddonsSpamexpertsSso200 = {
|
|
1014
1020
|
url?: string;
|