@newfold/huapi-js 2.1039.1-alpha.4 → 2.1041.1-alpha.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/README.md +0 -0
- package/orval.config.d.ts +0 -0
- package/orval.config.js +0 -0
- package/package.json +1 -1
- package/src/index.d.ts +7 -7
- package/src/index.js +10 -10
- package/src/index.msw.d.ts +0 -0
- package/src/index.msw.js +2 -2
- package/src/index.schemas.d.ts +57 -31
- package/src/index.schemas.js +6 -0
package/README.md
CHANGED
|
File without changes
|
package/orval.config.d.ts
CHANGED
|
File without changes
|
package/orval.config.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DefinedInitialDataOptions, DefinedUseInfiniteQueryResult, DefinedUseQueryResult, InfiniteData, QueryKey, UndefinedInitialDataOptions, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
4
|
-
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeys200, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupStatus200, BackupStatusParams, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronBody, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, Domains200, DomainsParams, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFtp200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpBody, HostingFtpList200, HostingFtpUpdate200, HostingFtpUpdateBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirect200, HostingRedirectBody, HostingRedirects200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, JetpackBackupStatus200, ListCrons200, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SitesAccessLogs200, SitesAccessLogsDownloadParams, SitesAccessLogsParams, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesBatchBody, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesDomainsV2200, SitesDomainsV2Params, SitesErrorLogs200, SitesErrorLogsDownloadParams, SitesErrorLogsParams, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesListV3Params, SitesMetricDimensions200, SitesMetricDimensionsParams, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSecuritySslStatusParams, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SitesVersion200, SshKey200, SshKeyBody, SshKeyFetch200, SshKeyFetchParams, SshKeyGenerate200, SshKeyGenerateBody, SshKeyImport200, SshKeyImportBody, SshKeyImportV2200, SshKeyImportV2Body, SshKeyList200, SshKeyListV2200, Sso200, SsoParams, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
4
|
+
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeys200, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupStatus200, BackupStatusParams, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronBody, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, Domains200, DomainsParams, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFtp200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpBody, HostingFtpList200, HostingFtpUpdate200, HostingFtpUpdateBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirect200, HostingRedirectBody, HostingRedirects200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, JetpackBackupStatus200, ListCrons200, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SitesAccessLogs200, SitesAccessLogsDownloadParams, SitesAccessLogsParams, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesBatchBody, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesDomainsV2200, SitesDomainsV2Params, SitesErrorLogs200, SitesErrorLogsDownloadParams, SitesErrorLogsParams, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesListV3Params, SitesMetricDimensions200, SitesMetricDimensionsParams, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockParams, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSecuritySslStatusParams, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SitesVersion200, SshKey200, SshKeyBody, SshKeyFetch200, SshKeyFetchParams, SshKeyGenerate200, SshKeyGenerateBody, SshKeyImport200, SshKeyImportBody, SshKeyImportV2200, SshKeyImportV2Body, SshKeyList200, SshKeyListV2200, Sso200, SsoParams, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
5
5
|
declare type AwaitedInput<T> = PromiseLike<T> | T;
|
|
6
6
|
declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
7
7
|
/**
|
|
@@ -4508,9 +4508,9 @@ export declare const useSitesSecurityHttpsEnableDisableSsl: <TError = AxiosError
|
|
|
4508
4508
|
* Returns the site's sitelock information.
|
|
4509
4509
|
* @summary sitelock info
|
|
4510
4510
|
*/
|
|
4511
|
-
export declare const sitesSecuritySitelock: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesSecuritySitelock200>>;
|
|
4512
|
-
export declare const getSitesSecuritySitelockQueryKey: (siteId: number) => readonly [`/v1/sites/${number}/security/sitelock
|
|
4513
|
-
export declare const getSitesSecuritySitelockQueryOptions: <TData = AxiosResponse<SitesSecuritySitelock200, any>, TError = AxiosError<unknown, any>>(siteId: number, options?: {
|
|
4511
|
+
export declare const sitesSecuritySitelock: (siteId: number, params?: SitesSecuritySitelockParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesSecuritySitelock200>>;
|
|
4512
|
+
export declare const getSitesSecuritySitelockQueryKey: (siteId: number, params?: SitesSecuritySitelockParams) => readonly [`/v1/sites/${number}/security/sitelock`, ...SitesSecuritySitelockParams[]];
|
|
4513
|
+
export declare const getSitesSecuritySitelockQueryOptions: <TData = AxiosResponse<SitesSecuritySitelock200, any>, TError = AxiosError<unknown, any>>(siteId: number, params?: SitesSecuritySitelockParams, options?: {
|
|
4514
4514
|
query?: Partial<UseQueryOptions<AxiosResponse<SitesSecuritySitelock200, any>, TError, TData, QueryKey>> | undefined;
|
|
4515
4515
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
4516
4516
|
} | undefined) => UseQueryOptions<AxiosResponse<SitesSecuritySitelock200, any>, TError, TData, QueryKey> & {
|
|
@@ -4518,19 +4518,19 @@ export declare const getSitesSecuritySitelockQueryOptions: <TData = AxiosRespons
|
|
|
4518
4518
|
};
|
|
4519
4519
|
export declare type SitesSecuritySitelockQueryResult = NonNullable<Awaited<ReturnType<typeof sitesSecuritySitelock>>>;
|
|
4520
4520
|
export declare type SitesSecuritySitelockQueryError = AxiosError<unknown>;
|
|
4521
|
-
export declare function useSitesSecuritySitelock<TData = Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError = AxiosError<unknown>>(siteId: number, options: {
|
|
4521
|
+
export declare function useSitesSecuritySitelock<TData = Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError = AxiosError<unknown>>(siteId: number, params: undefined | SitesSecuritySitelockParams, options: {
|
|
4522
4522
|
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError, TData>, 'initialData'>;
|
|
4523
4523
|
axios?: AxiosRequestConfig;
|
|
4524
4524
|
}): DefinedUseQueryResult<TData, TError> & {
|
|
4525
4525
|
queryKey: QueryKey;
|
|
4526
4526
|
};
|
|
4527
|
-
export declare function useSitesSecuritySitelock<TData = Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError = AxiosError<unknown>>(siteId: number, options?: {
|
|
4527
|
+
export declare function useSitesSecuritySitelock<TData = Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError = AxiosError<unknown>>(siteId: number, params?: SitesSecuritySitelockParams, options?: {
|
|
4528
4528
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError, TData>, 'initialData'>;
|
|
4529
4529
|
axios?: AxiosRequestConfig;
|
|
4530
4530
|
}): UseQueryResult<TData, TError> & {
|
|
4531
4531
|
queryKey: QueryKey;
|
|
4532
4532
|
};
|
|
4533
|
-
export declare function useSitesSecuritySitelock<TData = Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError = AxiosError<unknown>>(siteId: number, options?: {
|
|
4533
|
+
export declare function useSitesSecuritySitelock<TData = Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError = AxiosError<unknown>>(siteId: number, params?: SitesSecuritySitelockParams, options?: {
|
|
4534
4534
|
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof sitesSecuritySitelock>>, TError, TData>>;
|
|
4535
4535
|
axios?: AxiosRequestConfig;
|
|
4536
4536
|
}): UseQueryResult<TData, TError> & {
|
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.1041.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -3498,24 +3498,24 @@ export const useSitesSecurityHttpsEnableDisableSsl = (options) => {
|
|
|
3498
3498
|
* Returns the site's sitelock information.
|
|
3499
3499
|
* @summary sitelock info
|
|
3500
3500
|
*/
|
|
3501
|
-
export const sitesSecuritySitelock = (siteId, options) => {
|
|
3502
|
-
return axios.get(`/v1/sites/${siteId}/security/sitelock`, options);
|
|
3501
|
+
export const sitesSecuritySitelock = (siteId, params, options) => {
|
|
3502
|
+
return axios.get(`/v1/sites/${siteId}/security/sitelock`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
3503
3503
|
};
|
|
3504
|
-
export const getSitesSecuritySitelockQueryKey = (siteId) => {
|
|
3505
|
-
return [`/v1/sites/${siteId}/security/sitelock
|
|
3504
|
+
export const getSitesSecuritySitelockQueryKey = (siteId, params) => {
|
|
3505
|
+
return [`/v1/sites/${siteId}/security/sitelock`, ...(params ? [params] : [])];
|
|
3506
3506
|
};
|
|
3507
|
-
export const getSitesSecuritySitelockQueryOptions = (siteId, options) => {
|
|
3507
|
+
export const getSitesSecuritySitelockQueryOptions = (siteId, params, options) => {
|
|
3508
3508
|
var _a;
|
|
3509
3509
|
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
3510
|
-
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesSecuritySitelockQueryKey(siteId);
|
|
3511
|
-
const queryFn = ({ signal }) => sitesSecuritySitelock(siteId, Object.assign({ signal }, axiosOptions));
|
|
3510
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesSecuritySitelockQueryKey(siteId, params);
|
|
3511
|
+
const queryFn = ({ signal }) => sitesSecuritySitelock(siteId, params, Object.assign({ signal }, axiosOptions));
|
|
3512
3512
|
return Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions);
|
|
3513
3513
|
};
|
|
3514
3514
|
/**
|
|
3515
3515
|
* @summary sitelock info
|
|
3516
3516
|
*/
|
|
3517
|
-
export function useSitesSecuritySitelock(siteId, options) {
|
|
3518
|
-
const queryOptions = getSitesSecuritySitelockQueryOptions(siteId, options);
|
|
3517
|
+
export function useSitesSecuritySitelock(siteId, params, options) {
|
|
3518
|
+
const queryOptions = getSitesSecuritySitelockQueryOptions(siteId, params, options);
|
|
3519
3519
|
const query = useQuery(queryOptions);
|
|
3520
3520
|
query.queryKey = queryOptions.queryKey;
|
|
3521
3521
|
return query;
|
package/src/index.msw.d.ts
CHANGED
|
File without changes
|
package/src/index.msw.js
CHANGED
|
@@ -4,7 +4,7 @@ import { __awaiter } from "tslib";
|
|
|
4
4
|
* Do not edit manually.
|
|
5
5
|
* Hosting UAPI
|
|
6
6
|
* Hosting UAPI is an API to expose Hosting, Addons, and Site functionality to a customer-facing Front End such as (Account Manager).
|
|
7
|
-
* OpenAPI spec version: 1.
|
|
7
|
+
* OpenAPI spec version: 1.1041.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -171,7 +171,7 @@ export const getSitesSecurityCheckCoreResponseMock = (overrideResponse = {}) =>
|
|
|
171
171
|
export const getSitesSecurityResetCoreFilesResponseMock = (overrideResponse = {}) => (Object.assign({ results: faker.helpers.arrayElement([faker.word.sample(), undefined]), success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
172
172
|
export const getSitesSecurityHttpsRedirectionStatusResponseMock = (overrideResponse = {}) => (Object.assign({ message: faker.helpers.arrayElement([faker.word.sample(), undefined]), redirection_status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
173
173
|
export const getSitesSecurityHttpsEnableDisableSslResponseMock = (overrideResponse = {}) => (Object.assign({ message: faker.helpers.arrayElement([faker.word.sample(), undefined]), redirection_status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
174
|
-
export const getSitesSecuritySitelockResponseMock = (overrideResponse = {}) => (Object.assign({ addon_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), billing_code: faker.helpers.arrayElement([faker.word.sample(), undefined]), has_cdn: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), message: faker.helpers.arrayElement([faker.word.sample(), undefined]), plan: faker.helpers.arrayElement([faker.word.sample(), undefined]), platform_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), scope: faker.helpers.arrayElement([faker.word.sample(), undefined]), success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), upgrade_levels: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) }, overrideResponse));
|
|
174
|
+
export const getSitesSecuritySitelockResponseMock = (overrideResponse = {}) => (Object.assign({ addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), billing_code: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domains: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), has_cdn: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), is_migrated: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), message: faker.helpers.arrayElement([faker.word.sample(), undefined]), plan: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), platform_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), scope: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), source: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), upgrade_levels: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) }, overrideResponse));
|
|
175
175
|
export const getSitesSecuritySslAcmeResponseMock = (overrideResponse = {}) => (Object.assign({ message: faker.helpers.arrayElement([faker.word.sample(), undefined]), success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
176
176
|
export const getSitesSecuritySslStatusResponseMock = (overrideResponse = {}) => (Object.assign({ domain: faker.helpers.arrayElement([faker.word.sample(), undefined]), message: faker.helpers.arrayElement([faker.word.sample(), undefined]), product: faker.helpers.arrayElement([faker.word.sample(), undefined]), provider: faker.helpers.arrayElement([faker.word.sample(), undefined]), ssl_status: faker.helpers.arrayElement([faker.word.sample(), undefined]), upgradeable: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
177
177
|
export const getSitesSettingsComingSoonResponseMock = (overrideResponse = {}) => (Object.assign({ enable: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
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.1041.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SitesListV3200 = {
|
|
9
9
|
items?: SitesListV3200ItemsItem[];
|
|
@@ -412,6 +412,29 @@ export declare type SshKeyImportV2Body = {
|
|
|
412
412
|
/** The entity that initiated the GAP call */
|
|
413
413
|
source?: string;
|
|
414
414
|
};
|
|
415
|
+
export declare type HostingSitesV2200 = {
|
|
416
|
+
/**
|
|
417
|
+
* Remaining number of sites the customer can create. Max sites - used sites. Null means 'unlimited'.
|
|
418
|
+
* @nullable
|
|
419
|
+
*/
|
|
420
|
+
available_sites?: number | null;
|
|
421
|
+
items?: HostingSitesV2200ItemsItem[];
|
|
422
|
+
/** page size */
|
|
423
|
+
limit?: number;
|
|
424
|
+
/**
|
|
425
|
+
* Maximum number of sites the customer can have. Null means 'unlimited'.
|
|
426
|
+
* @nullable
|
|
427
|
+
*/
|
|
428
|
+
max_sites?: number | null;
|
|
429
|
+
/** current page number */
|
|
430
|
+
page?: number;
|
|
431
|
+
/** total number of pages */
|
|
432
|
+
pages?: number;
|
|
433
|
+
/** total number of sites returned */
|
|
434
|
+
total?: number;
|
|
435
|
+
/** Current number of sites in use by the customer. its normal for this value to be different than the total number of sites in the list. */
|
|
436
|
+
used_sites?: number;
|
|
437
|
+
};
|
|
415
438
|
export declare type HostingSitesV2200ItemsItemResourcesStorage = {
|
|
416
439
|
/** @nullable */
|
|
417
440
|
available?: number | null;
|
|
@@ -533,29 +556,6 @@ export declare type HostingSitesV2200ItemsItem = {
|
|
|
533
556
|
*/
|
|
534
557
|
version_ptr?: string | null;
|
|
535
558
|
};
|
|
536
|
-
export declare type HostingSitesV2200 = {
|
|
537
|
-
/**
|
|
538
|
-
* Remaining number of sites the customer can create. Max sites - used sites. Null means 'unlimited'.
|
|
539
|
-
* @nullable
|
|
540
|
-
*/
|
|
541
|
-
available_sites?: number | null;
|
|
542
|
-
items?: HostingSitesV2200ItemsItem[];
|
|
543
|
-
/** page size */
|
|
544
|
-
limit?: number;
|
|
545
|
-
/**
|
|
546
|
-
* Maximum number of sites the customer can have. Null means 'unlimited'.
|
|
547
|
-
* @nullable
|
|
548
|
-
*/
|
|
549
|
-
max_sites?: number | null;
|
|
550
|
-
/** current page number */
|
|
551
|
-
page?: number;
|
|
552
|
-
/** total number of pages */
|
|
553
|
-
pages?: number;
|
|
554
|
-
/** total number of sites returned */
|
|
555
|
-
total?: number;
|
|
556
|
-
/** Current number of sites in use by the customer. its normal for this value to be different than the total number of sites in the list. */
|
|
557
|
-
used_sites?: number;
|
|
558
|
-
};
|
|
559
559
|
export declare type HostingSitesV2Params = {
|
|
560
560
|
limit?: number;
|
|
561
561
|
page?: number;
|
|
@@ -773,17 +773,43 @@ export declare type SitesSecuritySslAcme200 = {
|
|
|
773
773
|
success?: number;
|
|
774
774
|
};
|
|
775
775
|
export declare type SitesSecuritySitelock200 = {
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
776
|
+
/** @nullable */
|
|
777
|
+
addon_id?: number | null;
|
|
778
|
+
/** @nullable */
|
|
779
|
+
billing_code?: string | null;
|
|
780
|
+
/** @nullable */
|
|
781
|
+
domain_name?: string | null;
|
|
782
|
+
domains?: string[];
|
|
783
|
+
/** @nullable */
|
|
784
|
+
has_cdn?: boolean | null;
|
|
785
|
+
is_migrated?: boolean;
|
|
779
786
|
message?: string;
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
|
|
787
|
+
/** @nullable */
|
|
788
|
+
plan?: string | null;
|
|
789
|
+
/** @nullable */
|
|
790
|
+
platform_id?: string | null;
|
|
791
|
+
/**
|
|
792
|
+
* Sitelock can be attached directly to a site, or it will fallback and return the sitelock for entire hosting account
|
|
793
|
+
* @nullable
|
|
794
|
+
*/
|
|
795
|
+
scope?: string | null;
|
|
796
|
+
/** @nullable */
|
|
797
|
+
source?: string | null;
|
|
784
798
|
success?: number;
|
|
785
799
|
upgrade_levels?: string[];
|
|
786
800
|
};
|
|
801
|
+
export declare type SitesSecuritySitelockSource = typeof SitesSecuritySitelockSource[keyof typeof SitesSecuritySitelockSource];
|
|
802
|
+
export declare const SitesSecuritySitelockSource: {
|
|
803
|
+
readonly hal: "hal";
|
|
804
|
+
readonly fg: "fg";
|
|
805
|
+
readonly halfg: "halfg";
|
|
806
|
+
};
|
|
807
|
+
export declare type SitesSecuritySitelockParams = {
|
|
808
|
+
/**
|
|
809
|
+
* fetch the sitelock data based on source(fg/hal)
|
|
810
|
+
*/
|
|
811
|
+
source?: SitesSecuritySitelockSource;
|
|
812
|
+
};
|
|
787
813
|
export declare type SitesSecurityHttpsEnableDisableSsl200 = {
|
|
788
814
|
message?: string;
|
|
789
815
|
redirection_status?: number;
|
package/src/index.schemas.js
CHANGED
|
@@ -21,6 +21,12 @@ export const SitesSsoBounceName = {
|
|
|
21
21
|
mypluginsandtools: 'mypluginsandtools',
|
|
22
22
|
};
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
24
|
+
export const SitesSecuritySitelockSource = {
|
|
25
|
+
hal: 'hal',
|
|
26
|
+
fg: 'fg',
|
|
27
|
+
halfg: 'halfg',
|
|
28
|
+
};
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
24
30
|
export const SitesErrorLogsDownloadSort = {
|
|
25
31
|
asc: 'asc',
|
|
26
32
|
desc: 'desc',
|