@newfold/huapi-js 2.1106.0 → 2.1118.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 +34 -1
- package/src/index.js +29 -1
- package/src/index.msw.d.ts +3 -1
- package/src/index.msw.js +14 -2
- package/src/index.schemas.d.ts +11 -1
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, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, 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, DomainZoneeditorUrl200, Domains200, DomainsParams, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsAddBody, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsDeleteBody, HostingDbAuthorizedHostsUpdate200, HostingDbAuthorizedHostsUpdateBody, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFixownership200, 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, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListIndex200, ListIndexParams, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteInfoResponseModelV2, 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, SshKeyImportV3200, SshKeyImportV3Body, SshKeyList200, SshKeyListV2200, SshKeyListV3200, Sso200, SsoParams, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
4
|
+
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, 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, DomainZoneeditorUrl200, Domains200, DomainsParams, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsAddBody, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsDeleteBody, HostingDbAuthorizedHostsUpdate200, HostingDbAuthorizedHostsUpdateBody, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFixownership200, 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, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListIndex200, ListIndexParams, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteInfoResponseModelV2, 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, SshKeyImportV3200, SshKeyImportV3Body, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, 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
|
/**
|
|
@@ -5829,6 +5829,7 @@ export declare const useSshKeyImportV3: <TError = AxiosError<unknown, any>, TCon
|
|
|
5829
5829
|
}, TContext>;
|
|
5830
5830
|
/**
|
|
5831
5831
|
* List all SSH keys on a server or account. Finds all keys in user's .ssh/ directory.
|
|
5832
|
+
* @deprecated
|
|
5832
5833
|
* @summary ssh keys list
|
|
5833
5834
|
*/
|
|
5834
5835
|
export declare const sshKeyListV3: (hostingId: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<SshKeyListV3200>>;
|
|
@@ -5891,4 +5892,36 @@ export declare function useSitesListV3<TData = Awaited<ReturnType<typeof sitesLi
|
|
|
5891
5892
|
}): UseQueryResult<TData, TError> & {
|
|
5892
5893
|
queryKey: QueryKey;
|
|
5893
5894
|
};
|
|
5895
|
+
/**
|
|
5896
|
+
* List all SSH keys on a server or account. Finds all keys in user's .ssh/ directory.
|
|
5897
|
+
* @summary ssh keys list
|
|
5898
|
+
*/
|
|
5899
|
+
export declare const sshKeyListV4: (hostingId: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<SshKeyListV4200>>;
|
|
5900
|
+
export declare const getSshKeyListV4QueryKey: (hostingId: string) => readonly [`/v4/hosting/${string}/ssh/keys`];
|
|
5901
|
+
export declare const getSshKeyListV4QueryOptions: <TData = AxiosResponse<SshKeyListV4200, any>, TError = AxiosError<unknown, any>>(hostingId: string, options?: {
|
|
5902
|
+
query?: Partial<UseQueryOptions<AxiosResponse<SshKeyListV4200, any>, TError, TData, QueryKey>> | undefined;
|
|
5903
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
5904
|
+
} | undefined) => UseQueryOptions<AxiosResponse<SshKeyListV4200, any>, TError, TData, QueryKey> & {
|
|
5905
|
+
queryKey: QueryKey;
|
|
5906
|
+
};
|
|
5907
|
+
export declare type SshKeyListV4QueryResult = NonNullable<Awaited<ReturnType<typeof sshKeyListV4>>>;
|
|
5908
|
+
export declare type SshKeyListV4QueryError = AxiosError<unknown>;
|
|
5909
|
+
export declare function useSshKeyListV4<TData = Awaited<ReturnType<typeof sshKeyListV4>>, TError = AxiosError<unknown>>(hostingId: string, options: {
|
|
5910
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof sshKeyListV4>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof sshKeyListV4>>, TError, TData>, 'initialData'>;
|
|
5911
|
+
axios?: AxiosRequestConfig;
|
|
5912
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
5913
|
+
queryKey: QueryKey;
|
|
5914
|
+
};
|
|
5915
|
+
export declare function useSshKeyListV4<TData = Awaited<ReturnType<typeof sshKeyListV4>>, TError = AxiosError<unknown>>(hostingId: string, options?: {
|
|
5916
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof sshKeyListV4>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof sshKeyListV4>>, TError, TData>, 'initialData'>;
|
|
5917
|
+
axios?: AxiosRequestConfig;
|
|
5918
|
+
}): UseQueryResult<TData, TError> & {
|
|
5919
|
+
queryKey: QueryKey;
|
|
5920
|
+
};
|
|
5921
|
+
export declare function useSshKeyListV4<TData = Awaited<ReturnType<typeof sshKeyListV4>>, TError = AxiosError<unknown>>(hostingId: string, options?: {
|
|
5922
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof sshKeyListV4>>, TError, TData>>;
|
|
5923
|
+
axios?: AxiosRequestConfig;
|
|
5924
|
+
}): UseQueryResult<TData, TError> & {
|
|
5925
|
+
queryKey: QueryKey;
|
|
5926
|
+
};
|
|
5894
5927
|
export {};
|
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.1118.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -4533,6 +4533,7 @@ export const useSshKeyImportV3 = (options) => {
|
|
|
4533
4533
|
};
|
|
4534
4534
|
/**
|
|
4535
4535
|
* List all SSH keys on a server or account. Finds all keys in user's .ssh/ directory.
|
|
4536
|
+
* @deprecated
|
|
4536
4537
|
* @summary ssh keys list
|
|
4537
4538
|
*/
|
|
4538
4539
|
export const sshKeyListV3 = (hostingId, options) => {
|
|
@@ -4549,6 +4550,7 @@ export const getSshKeyListV3QueryOptions = (hostingId, options) => {
|
|
|
4549
4550
|
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
4550
4551
|
};
|
|
4551
4552
|
/**
|
|
4553
|
+
* @deprecated
|
|
4552
4554
|
* @summary ssh keys list
|
|
4553
4555
|
*/
|
|
4554
4556
|
export function useSshKeyListV3(hostingId, options) {
|
|
@@ -4583,3 +4585,29 @@ export function useSitesListV3(params, options) {
|
|
|
4583
4585
|
query.queryKey = queryOptions.queryKey;
|
|
4584
4586
|
return query;
|
|
4585
4587
|
}
|
|
4588
|
+
/**
|
|
4589
|
+
* List all SSH keys on a server or account. Finds all keys in user's .ssh/ directory.
|
|
4590
|
+
* @summary ssh keys list
|
|
4591
|
+
*/
|
|
4592
|
+
export const sshKeyListV4 = (hostingId, options) => {
|
|
4593
|
+
return axios.get(`/v4/hosting/${hostingId}/ssh/keys`, options);
|
|
4594
|
+
};
|
|
4595
|
+
export const getSshKeyListV4QueryKey = (hostingId) => {
|
|
4596
|
+
return [`/v4/hosting/${hostingId}/ssh/keys`];
|
|
4597
|
+
};
|
|
4598
|
+
export const getSshKeyListV4QueryOptions = (hostingId, options) => {
|
|
4599
|
+
var _a;
|
|
4600
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4601
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSshKeyListV4QueryKey(hostingId);
|
|
4602
|
+
const queryFn = ({ signal }) => sshKeyListV4(hostingId, Object.assign({ signal }, axiosOptions));
|
|
4603
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
4604
|
+
};
|
|
4605
|
+
/**
|
|
4606
|
+
* @summary ssh keys list
|
|
4607
|
+
*/
|
|
4608
|
+
export function useSshKeyListV4(hostingId, options) {
|
|
4609
|
+
const queryOptions = getSshKeyListV4QueryOptions(hostingId, options);
|
|
4610
|
+
const query = useQuery(queryOptions);
|
|
4611
|
+
query.queryKey = queryOptions.queryKey;
|
|
4612
|
+
return query;
|
|
4613
|
+
}
|
package/src/index.msw.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { http } from 'msw';
|
|
2
|
-
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddSiteIpaddress200, AddonCloudflare200, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupInitiate200, BackupList200, BackupStatus200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainsUnassign200, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsCheck200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSitesV2200, HostingSshInfo200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListIndex200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, Sso200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
2
|
+
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddSiteIpaddress200, AddonCloudflare200, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupInitiate200, BackupList200, BackupStatus200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainsUnassign200, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsCheck200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSitesV2200, HostingSshInfo200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListIndex200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, Sso200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
3
3
|
export declare const getAccountEventListResponseMock: (overrideResponse?: Partial<AccountEventList200>) => AccountEventList200;
|
|
4
4
|
export declare const getAccountHostingListResponseMock: (overrideResponse?: Partial<AccountHostingList200>) => AccountHostingList200;
|
|
5
5
|
export declare const getAccountPublicKeysResponseMock: (overrideResponse?: Partial<AccountPublicKeys200>) => AccountPublicKeys200;
|
|
@@ -185,6 +185,7 @@ export declare const getSitesSshUserListV2ResponseMock: (overrideResponse?: Part
|
|
|
185
185
|
export declare const getSshKeyImportV3ResponseMock: (overrideResponse?: Partial<SshKeyImportV3200>) => SshKeyImportV3200;
|
|
186
186
|
export declare const getSshKeyListV3ResponseMock: (overrideResponse?: Partial<SshKeyListV3200>) => SshKeyListV3200;
|
|
187
187
|
export declare const getSitesListV3ResponseMock: (overrideResponse?: Partial<SitesListV3200>) => SitesListV3200;
|
|
188
|
+
export declare const getSshKeyListV4ResponseMock: (overrideResponse?: Partial<SshKeyListV4200>) => SshKeyListV4200;
|
|
188
189
|
export declare const getAccountEventListMockHandler: (overrideResponse?: AccountEventList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AccountEventList200> | AccountEventList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
189
190
|
export declare const getAccountHostingListMockHandler: (overrideResponse?: AccountHostingList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AccountHostingList200> | AccountHostingList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
190
191
|
export declare const getAccountPublicKeysMockHandler: (overrideResponse?: AccountPublicKeys200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AccountPublicKeys200> | AccountPublicKeys200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
@@ -372,4 +373,5 @@ export declare const getSitesSshUserListV2MockHandler: (overrideResponse?: Sites
|
|
|
372
373
|
export declare const getSshKeyImportV3MockHandler: (overrideResponse?: SshKeyImportV3200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<SshKeyImportV3200> | SshKeyImportV3200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
373
374
|
export declare const getSshKeyListV3MockHandler: (overrideResponse?: SshKeyListV3200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SshKeyListV3200> | SshKeyListV3200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
374
375
|
export declare const getSitesListV3MockHandler: (overrideResponse?: SitesListV3200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SitesListV3200> | SitesListV3200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
376
|
+
export declare const getSshKeyListV4MockHandler: (overrideResponse?: SshKeyListV4200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SshKeyListV4200> | SshKeyListV4200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
375
377
|
export declare const getHostingUAPIMock: () => import("msw/lib/core/handlers/HttpHandler").HttpHandler[];
|
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.1118.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -215,6 +215,7 @@ export const getSitesSshUserListV2ResponseMock = (overrideResponse = {}) => (Obj
|
|
|
215
215
|
export const getSshKeyImportV3ResponseMock = (overrideResponse = {}) => (Object.assign({ public_key_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, overrideResponse));
|
|
216
216
|
export const getSshKeyListV3ResponseMock = (overrideResponse = {}) => (Object.assign({ rows: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ authorize: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), mtime: faker.helpers.arrayElement([faker.word.sample(), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
217
217
|
export const getSitesListV3ResponseMock = (overrideResponse = {}) => (Object.assign({ items: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), account_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), confirmed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), datacenter: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), date_added: faker.helpers.arrayElement([faker.word.sample(), undefined]), date_modified: faker.helpers.arrayElement([faker.word.sample(), undefined]), detected_type: faker.helpers.arrayElement([faker.word.sample(), undefined]), docroot: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain_ptrs: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({})), undefined]), edge_cache: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), handler_404: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), id: faker.helpers.arrayElement([faker.word.sample(), undefined]), installed_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), is_primary: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), jobs: faker.helpers.arrayElement([{}, undefined]), last_error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), migration_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), onboarding: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), path: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), pending_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), pending_url_data: faker.helpers.arrayElement([{ base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), is_temp: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), job_failed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), stage: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), wp_session: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, undefined]), php_version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.word.sample(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), subtype: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), url_is_provisional: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), version_ptr: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) })), undefined]), limit: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), page: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), pages: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
218
|
+
export const getSshKeyListV4ResponseMock = (overrideResponse = {}) => (Object.assign({ rows: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ authorize: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), created_at: faker.helpers.arrayElement([faker.word.sample(), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
218
219
|
export const getAccountEventListMockHandler = (overrideResponse) => {
|
|
219
220
|
return http.get('*/v1/account/events', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
220
221
|
yield delay(1000);
|
|
@@ -2085,6 +2086,16 @@ export const getSitesListV3MockHandler = (overrideResponse) => {
|
|
|
2085
2086
|
});
|
|
2086
2087
|
}));
|
|
2087
2088
|
};
|
|
2089
|
+
export const getSshKeyListV4MockHandler = (overrideResponse) => {
|
|
2090
|
+
return http.get('*/v4/hosting/:hostingId/ssh/keys', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2091
|
+
yield delay(1000);
|
|
2092
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
2093
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
2094
|
+
: getSshKeyListV4ResponseMock()), { status: 200,
|
|
2095
|
+
headers: { 'Content-Type': 'application/json' }
|
|
2096
|
+
});
|
|
2097
|
+
}));
|
|
2098
|
+
};
|
|
2088
2099
|
export const getHostingUAPIMock = () => [
|
|
2089
2100
|
getAccountEventListMockHandler(),
|
|
2090
2101
|
getAccountHostingListMockHandler(),
|
|
@@ -2272,5 +2283,6 @@ export const getHostingUAPIMock = () => [
|
|
|
2272
2283
|
getSitesSshUserListV2MockHandler(),
|
|
2273
2284
|
getSshKeyImportV3MockHandler(),
|
|
2274
2285
|
getSshKeyListV3MockHandler(),
|
|
2275
|
-
getSitesListV3MockHandler()
|
|
2286
|
+
getSitesListV3MockHandler(),
|
|
2287
|
+
getSshKeyListV4MockHandler()
|
|
2276
2288
|
];
|
package/src/index.schemas.d.ts
CHANGED
|
@@ -3,8 +3,17 @@
|
|
|
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.1118.0
|
|
7
7
|
*/
|
|
8
|
+
export declare type SshKeyListV4200RowsItem = {
|
|
9
|
+
authorize?: boolean;
|
|
10
|
+
created_at?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare type SshKeyListV4200 = {
|
|
15
|
+
rows?: SshKeyListV4200RowsItem[];
|
|
16
|
+
};
|
|
8
17
|
export declare type SitesListV3200 = {
|
|
9
18
|
items?: SiteInfoResponseModelV2[];
|
|
10
19
|
/** page size */
|
|
@@ -1557,6 +1566,7 @@ export declare type SsoParams = {
|
|
|
1557
1566
|
dir?: string;
|
|
1558
1567
|
domain?: string;
|
|
1559
1568
|
db_name?: string;
|
|
1569
|
+
bounce?: string;
|
|
1560
1570
|
};
|
|
1561
1571
|
export declare type SshKeyGenerate200 = {
|
|
1562
1572
|
key_name?: string;
|