@newfold/huapi-js 2.1095.0 → 2.1106.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 +126 -1
- package/src/index.js +93 -1
- package/src/index.msw.d.ts +9 -1
- package/src/index.msw.js +49 -1
- package/src/index.schemas.d.ts +29 -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, 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, 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
|
/**
|
|
@@ -1749,6 +1749,131 @@ export declare function useDbList<TData = Awaited<ReturnType<typeof dbList>>, TE
|
|
|
1749
1749
|
}): UseQueryResult<TData, TError> & {
|
|
1750
1750
|
queryKey: QueryKey;
|
|
1751
1751
|
};
|
|
1752
|
+
/**
|
|
1753
|
+
* Returns a list of Remote IP
|
|
1754
|
+
* @summary Returns a list of authorized DB hosts / ips
|
|
1755
|
+
*/
|
|
1756
|
+
export declare const hostingDbAuthorizedHosts: (hostingId: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingDbAuthorizedHosts200>>;
|
|
1757
|
+
export declare const getHostingDbAuthorizedHostsQueryKey: (hostingId: string) => readonly [`/v1/hosting/${string}/db/authorized-hosts`];
|
|
1758
|
+
export declare const getHostingDbAuthorizedHostsQueryOptions: <TData = AxiosResponse<HostingDbAuthorizedHosts200, any>, TError = AxiosError<unknown, any>>(hostingId: string, options?: {
|
|
1759
|
+
query?: Partial<UseQueryOptions<AxiosResponse<HostingDbAuthorizedHosts200, any>, TError, TData, QueryKey>> | undefined;
|
|
1760
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1761
|
+
} | undefined) => UseQueryOptions<AxiosResponse<HostingDbAuthorizedHosts200, any>, TError, TData, QueryKey> & {
|
|
1762
|
+
queryKey: QueryKey;
|
|
1763
|
+
};
|
|
1764
|
+
export declare type HostingDbAuthorizedHostsQueryResult = NonNullable<Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>>;
|
|
1765
|
+
export declare type HostingDbAuthorizedHostsQueryError = AxiosError<unknown>;
|
|
1766
|
+
export declare function useHostingDbAuthorizedHosts<TData = Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>, TError = AxiosError<unknown>>(hostingId: string, options: {
|
|
1767
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>, TError, TData>, 'initialData'>;
|
|
1768
|
+
axios?: AxiosRequestConfig;
|
|
1769
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
1770
|
+
queryKey: QueryKey;
|
|
1771
|
+
};
|
|
1772
|
+
export declare function useHostingDbAuthorizedHosts<TData = Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>, TError = AxiosError<unknown>>(hostingId: string, options?: {
|
|
1773
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>, TError, TData>, 'initialData'>;
|
|
1774
|
+
axios?: AxiosRequestConfig;
|
|
1775
|
+
}): UseQueryResult<TData, TError> & {
|
|
1776
|
+
queryKey: QueryKey;
|
|
1777
|
+
};
|
|
1778
|
+
export declare function useHostingDbAuthorizedHosts<TData = Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>, TError = AxiosError<unknown>>(hostingId: string, options?: {
|
|
1779
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDbAuthorizedHosts>>, TError, TData>>;
|
|
1780
|
+
axios?: AxiosRequestConfig;
|
|
1781
|
+
}): UseQueryResult<TData, TError> & {
|
|
1782
|
+
queryKey: QueryKey;
|
|
1783
|
+
};
|
|
1784
|
+
/**
|
|
1785
|
+
* Adds an authorized DB host / ip and label
|
|
1786
|
+
* @summary Adds an authorized DB host / ip and label
|
|
1787
|
+
*/
|
|
1788
|
+
export declare const hostingDbAuthorizedHostsAdd: (hostingId: string, hostingDbAuthorizedHostsAddBody: HostingDbAuthorizedHostsAddBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingDbAuthorizedHostsAdd200>>;
|
|
1789
|
+
export declare const getHostingDbAuthorizedHostsAddMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1790
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsAdd200, any>, TError, {
|
|
1791
|
+
hostingId: string;
|
|
1792
|
+
data: HostingDbAuthorizedHostsAddBody;
|
|
1793
|
+
}, TContext> | undefined;
|
|
1794
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1795
|
+
} | undefined) => UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsAdd200, any>, TError, {
|
|
1796
|
+
hostingId: string;
|
|
1797
|
+
data: HostingDbAuthorizedHostsAddBody;
|
|
1798
|
+
}, TContext>;
|
|
1799
|
+
export declare type HostingDbAuthorizedHostsAddMutationResult = NonNullable<Awaited<ReturnType<typeof hostingDbAuthorizedHostsAdd>>>;
|
|
1800
|
+
export declare type HostingDbAuthorizedHostsAddMutationBody = HostingDbAuthorizedHostsAddBody;
|
|
1801
|
+
export declare type HostingDbAuthorizedHostsAddMutationError = AxiosError<unknown>;
|
|
1802
|
+
/**
|
|
1803
|
+
* @summary Adds an authorized DB host / ip and label
|
|
1804
|
+
*/
|
|
1805
|
+
export declare const useHostingDbAuthorizedHostsAdd: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1806
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsAdd200, any>, TError, {
|
|
1807
|
+
hostingId: string;
|
|
1808
|
+
data: HostingDbAuthorizedHostsAddBody;
|
|
1809
|
+
}, TContext> | undefined;
|
|
1810
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1811
|
+
} | undefined) => UseMutationResult<AxiosResponse<HostingDbAuthorizedHostsAdd200, any>, TError, {
|
|
1812
|
+
hostingId: string;
|
|
1813
|
+
data: HostingDbAuthorizedHostsAddBody;
|
|
1814
|
+
}, TContext>;
|
|
1815
|
+
/**
|
|
1816
|
+
* Updates an authorized DB host / ip or label
|
|
1817
|
+
* @summary Updates an authorized DB host / ip or label
|
|
1818
|
+
*/
|
|
1819
|
+
export declare const hostingDbAuthorizedHostsUpdate: (hostingId: string, hostingDbAuthorizedHostsUpdateBody: HostingDbAuthorizedHostsUpdateBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingDbAuthorizedHostsUpdate200>>;
|
|
1820
|
+
export declare const getHostingDbAuthorizedHostsUpdateMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1821
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsUpdate200, any>, TError, {
|
|
1822
|
+
hostingId: string;
|
|
1823
|
+
data: HostingDbAuthorizedHostsUpdateBody;
|
|
1824
|
+
}, TContext> | undefined;
|
|
1825
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1826
|
+
} | undefined) => UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsUpdate200, any>, TError, {
|
|
1827
|
+
hostingId: string;
|
|
1828
|
+
data: HostingDbAuthorizedHostsUpdateBody;
|
|
1829
|
+
}, TContext>;
|
|
1830
|
+
export declare type HostingDbAuthorizedHostsUpdateMutationResult = NonNullable<Awaited<ReturnType<typeof hostingDbAuthorizedHostsUpdate>>>;
|
|
1831
|
+
export declare type HostingDbAuthorizedHostsUpdateMutationBody = HostingDbAuthorizedHostsUpdateBody;
|
|
1832
|
+
export declare type HostingDbAuthorizedHostsUpdateMutationError = AxiosError<unknown>;
|
|
1833
|
+
/**
|
|
1834
|
+
* @summary Updates an authorized DB host / ip or label
|
|
1835
|
+
*/
|
|
1836
|
+
export declare const useHostingDbAuthorizedHostsUpdate: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1837
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsUpdate200, any>, TError, {
|
|
1838
|
+
hostingId: string;
|
|
1839
|
+
data: HostingDbAuthorizedHostsUpdateBody;
|
|
1840
|
+
}, TContext> | undefined;
|
|
1841
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1842
|
+
} | undefined) => UseMutationResult<AxiosResponse<HostingDbAuthorizedHostsUpdate200, any>, TError, {
|
|
1843
|
+
hostingId: string;
|
|
1844
|
+
data: HostingDbAuthorizedHostsUpdateBody;
|
|
1845
|
+
}, TContext>;
|
|
1846
|
+
/**
|
|
1847
|
+
* deletes the authorized DB host/ip
|
|
1848
|
+
* @summary Deletes an authorized DB host / ip
|
|
1849
|
+
*/
|
|
1850
|
+
export declare const hostingDbAuthorizedHostsDelete: (hostingId: string, hostingDbAuthorizedHostsDeleteBody: HostingDbAuthorizedHostsDeleteBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingDbAuthorizedHostsDelete200>>;
|
|
1851
|
+
export declare const getHostingDbAuthorizedHostsDeleteMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1852
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsDelete200, any>, TError, {
|
|
1853
|
+
hostingId: string;
|
|
1854
|
+
data: HostingDbAuthorizedHostsDeleteBody;
|
|
1855
|
+
}, TContext> | undefined;
|
|
1856
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1857
|
+
} | undefined) => UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsDelete200, any>, TError, {
|
|
1858
|
+
hostingId: string;
|
|
1859
|
+
data: HostingDbAuthorizedHostsDeleteBody;
|
|
1860
|
+
}, TContext>;
|
|
1861
|
+
export declare type HostingDbAuthorizedHostsDeleteMutationResult = NonNullable<Awaited<ReturnType<typeof hostingDbAuthorizedHostsDelete>>>;
|
|
1862
|
+
export declare type HostingDbAuthorizedHostsDeleteMutationBody = HostingDbAuthorizedHostsDeleteBody;
|
|
1863
|
+
export declare type HostingDbAuthorizedHostsDeleteMutationError = AxiosError<unknown>;
|
|
1864
|
+
/**
|
|
1865
|
+
* @summary Deletes an authorized DB host / ip
|
|
1866
|
+
*/
|
|
1867
|
+
export declare const useHostingDbAuthorizedHostsDelete: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1868
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingDbAuthorizedHostsDelete200, any>, TError, {
|
|
1869
|
+
hostingId: string;
|
|
1870
|
+
data: HostingDbAuthorizedHostsDeleteBody;
|
|
1871
|
+
}, TContext> | undefined;
|
|
1872
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1873
|
+
} | undefined) => UseMutationResult<AxiosResponse<HostingDbAuthorizedHostsDelete200, any>, TError, {
|
|
1874
|
+
hostingId: string;
|
|
1875
|
+
data: HostingDbAuthorizedHostsDeleteBody;
|
|
1876
|
+
}, TContext>;
|
|
1752
1877
|
/**
|
|
1753
1878
|
* Check database.
|
|
1754
1879
|
* @summary Check database.
|
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.1106.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -1365,6 +1365,98 @@ export function useDbList(hostingId, options) {
|
|
|
1365
1365
|
query.queryKey = queryOptions.queryKey;
|
|
1366
1366
|
return query;
|
|
1367
1367
|
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Returns a list of Remote IP
|
|
1370
|
+
* @summary Returns a list of authorized DB hosts / ips
|
|
1371
|
+
*/
|
|
1372
|
+
export const hostingDbAuthorizedHosts = (hostingId, options) => {
|
|
1373
|
+
return axios.get(`/v1/hosting/${hostingId}/db/authorized-hosts`, options);
|
|
1374
|
+
};
|
|
1375
|
+
export const getHostingDbAuthorizedHostsQueryKey = (hostingId) => {
|
|
1376
|
+
return [`/v1/hosting/${hostingId}/db/authorized-hosts`];
|
|
1377
|
+
};
|
|
1378
|
+
export const getHostingDbAuthorizedHostsQueryOptions = (hostingId, options) => {
|
|
1379
|
+
var _a;
|
|
1380
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1381
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingDbAuthorizedHostsQueryKey(hostingId);
|
|
1382
|
+
const queryFn = ({ signal }) => hostingDbAuthorizedHosts(hostingId, Object.assign({ signal }, axiosOptions));
|
|
1383
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
1384
|
+
};
|
|
1385
|
+
/**
|
|
1386
|
+
* @summary Returns a list of authorized DB hosts / ips
|
|
1387
|
+
*/
|
|
1388
|
+
export function useHostingDbAuthorizedHosts(hostingId, options) {
|
|
1389
|
+
const queryOptions = getHostingDbAuthorizedHostsQueryOptions(hostingId, options);
|
|
1390
|
+
const query = useQuery(queryOptions);
|
|
1391
|
+
query.queryKey = queryOptions.queryKey;
|
|
1392
|
+
return query;
|
|
1393
|
+
}
|
|
1394
|
+
/**
|
|
1395
|
+
* Adds an authorized DB host / ip and label
|
|
1396
|
+
* @summary Adds an authorized DB host / ip and label
|
|
1397
|
+
*/
|
|
1398
|
+
export const hostingDbAuthorizedHostsAdd = (hostingId, hostingDbAuthorizedHostsAddBody, options) => {
|
|
1399
|
+
return axios.post(`/v1/hosting/${hostingId}/db/authorized-hosts`, hostingDbAuthorizedHostsAddBody, options);
|
|
1400
|
+
};
|
|
1401
|
+
export const getHostingDbAuthorizedHostsAddMutationOptions = (options) => {
|
|
1402
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1403
|
+
const mutationFn = (props) => {
|
|
1404
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1405
|
+
return hostingDbAuthorizedHostsAdd(hostingId, data, axiosOptions);
|
|
1406
|
+
};
|
|
1407
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
1408
|
+
};
|
|
1409
|
+
/**
|
|
1410
|
+
* @summary Adds an authorized DB host / ip and label
|
|
1411
|
+
*/
|
|
1412
|
+
export const useHostingDbAuthorizedHostsAdd = (options) => {
|
|
1413
|
+
const mutationOptions = getHostingDbAuthorizedHostsAddMutationOptions(options);
|
|
1414
|
+
return useMutation(mutationOptions);
|
|
1415
|
+
};
|
|
1416
|
+
/**
|
|
1417
|
+
* Updates an authorized DB host / ip or label
|
|
1418
|
+
* @summary Updates an authorized DB host / ip or label
|
|
1419
|
+
*/
|
|
1420
|
+
export const hostingDbAuthorizedHostsUpdate = (hostingId, hostingDbAuthorizedHostsUpdateBody, options) => {
|
|
1421
|
+
return axios.put(`/v1/hosting/${hostingId}/db/authorized-hosts`, hostingDbAuthorizedHostsUpdateBody, options);
|
|
1422
|
+
};
|
|
1423
|
+
export const getHostingDbAuthorizedHostsUpdateMutationOptions = (options) => {
|
|
1424
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1425
|
+
const mutationFn = (props) => {
|
|
1426
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1427
|
+
return hostingDbAuthorizedHostsUpdate(hostingId, data, axiosOptions);
|
|
1428
|
+
};
|
|
1429
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
1430
|
+
};
|
|
1431
|
+
/**
|
|
1432
|
+
* @summary Updates an authorized DB host / ip or label
|
|
1433
|
+
*/
|
|
1434
|
+
export const useHostingDbAuthorizedHostsUpdate = (options) => {
|
|
1435
|
+
const mutationOptions = getHostingDbAuthorizedHostsUpdateMutationOptions(options);
|
|
1436
|
+
return useMutation(mutationOptions);
|
|
1437
|
+
};
|
|
1438
|
+
/**
|
|
1439
|
+
* deletes the authorized DB host/ip
|
|
1440
|
+
* @summary Deletes an authorized DB host / ip
|
|
1441
|
+
*/
|
|
1442
|
+
export const hostingDbAuthorizedHostsDelete = (hostingId, hostingDbAuthorizedHostsDeleteBody, options) => {
|
|
1443
|
+
return axios.delete(`/v1/hosting/${hostingId}/db/authorized-hosts`, Object.assign({ data: hostingDbAuthorizedHostsDeleteBody }, options));
|
|
1444
|
+
};
|
|
1445
|
+
export const getHostingDbAuthorizedHostsDeleteMutationOptions = (options) => {
|
|
1446
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1447
|
+
const mutationFn = (props) => {
|
|
1448
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1449
|
+
return hostingDbAuthorizedHostsDelete(hostingId, data, axiosOptions);
|
|
1450
|
+
};
|
|
1451
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
1452
|
+
};
|
|
1453
|
+
/**
|
|
1454
|
+
* @summary Deletes an authorized DB host / ip
|
|
1455
|
+
*/
|
|
1456
|
+
export const useHostingDbAuthorizedHostsDelete = (options) => {
|
|
1457
|
+
const mutationOptions = getHostingDbAuthorizedHostsDeleteMutationOptions(options);
|
|
1458
|
+
return useMutation(mutationOptions);
|
|
1459
|
+
};
|
|
1368
1460
|
/**
|
|
1369
1461
|
* Check database.
|
|
1370
1462
|
* @summary Check database.
|
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, 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, 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;
|
|
@@ -56,6 +56,10 @@ export declare const getCronResponseMock: (overrideResponse?: Partial<Cron200>)
|
|
|
56
56
|
export declare const getDbAddResponseMock: (overrideResponse?: Partial<DbAdd200>) => DbAdd200;
|
|
57
57
|
export declare const getDbResponseMock: (overrideResponse?: Partial<Db200>) => Db200;
|
|
58
58
|
export declare const getDbListResponseMock: (overrideResponse?: Partial<DbList200>) => DbList200;
|
|
59
|
+
export declare const getHostingDbAuthorizedHostsResponseMock: (overrideResponse?: Partial<HostingDbAuthorizedHosts200>) => HostingDbAuthorizedHosts200;
|
|
60
|
+
export declare const getHostingDbAuthorizedHostsAddResponseMock: (overrideResponse?: Partial<HostingDbAuthorizedHostsAdd200>) => HostingDbAuthorizedHostsAdd200;
|
|
61
|
+
export declare const getHostingDbAuthorizedHostsUpdateResponseMock: (overrideResponse?: Partial<HostingDbAuthorizedHostsUpdate200>) => HostingDbAuthorizedHostsUpdate200;
|
|
62
|
+
export declare const getHostingDbAuthorizedHostsDeleteResponseMock: (overrideResponse?: Partial<HostingDbAuthorizedHostsDelete200>) => HostingDbAuthorizedHostsDelete200;
|
|
59
63
|
export declare const getDbCheckDatabaseResponseMock: (overrideResponse?: Partial<DbCheckDatabase200>) => DbCheckDatabase200;
|
|
60
64
|
export declare const getDbUsageResponseMock: (overrideResponse?: Partial<DbUsage200>) => DbUsage200;
|
|
61
65
|
export declare const getDbUserPasswordSetResponseMock: (overrideResponse?: Partial<DbUserPasswordSet200>) => DbUserPasswordSet200;
|
|
@@ -237,6 +241,10 @@ export declare const getCronMockHandler: (overrideResponse?: Cron200 | ((info: P
|
|
|
237
241
|
export declare const getDbAddMockHandler: (overrideResponse?: DbAdd200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<DbAdd200> | DbAdd200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
238
242
|
export declare const getDbMockHandler: (overrideResponse?: Db200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<Db200> | Db200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
239
243
|
export declare const getDbListMockHandler: (overrideResponse?: DbList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbList200> | DbList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
244
|
+
export declare const getHostingDbAuthorizedHostsMockHandler: (overrideResponse?: HostingDbAuthorizedHosts200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingDbAuthorizedHosts200> | HostingDbAuthorizedHosts200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
245
|
+
export declare const getHostingDbAuthorizedHostsAddMockHandler: (overrideResponse?: HostingDbAuthorizedHostsAdd200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingDbAuthorizedHostsAdd200> | HostingDbAuthorizedHostsAdd200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
246
|
+
export declare const getHostingDbAuthorizedHostsUpdateMockHandler: (overrideResponse?: HostingDbAuthorizedHostsUpdate200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<HostingDbAuthorizedHostsUpdate200> | HostingDbAuthorizedHostsUpdate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
247
|
+
export declare const getHostingDbAuthorizedHostsDeleteMockHandler: (overrideResponse?: HostingDbAuthorizedHostsDelete200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<HostingDbAuthorizedHostsDelete200> | HostingDbAuthorizedHostsDelete200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
240
248
|
export declare const getDbCheckDatabaseMockHandler: (overrideResponse?: DbCheckDatabase200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<DbCheckDatabase200> | DbCheckDatabase200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
241
249
|
export declare const getDbUsageMockHandler: (overrideResponse?: DbUsage200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbUsage200> | DbUsage200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
242
250
|
export declare const getDbUserPasswordSetMockHandler: (overrideResponse?: DbUserPasswordSet200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<DbUserPasswordSet200> | DbUserPasswordSet200) | undefined) => 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.1106.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -66,6 +66,10 @@ export const getCronResponseMock = (overrideResponse = {}) => (Object.assign({ s
|
|
|
66
66
|
export const getDbAddResponseMock = (overrideResponse = {}) => (Object.assign({ dbname: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
67
67
|
export const getDbResponseMock = (overrideResponse = {}) => (Object.assign({ dbname: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
68
68
|
export const getDbListResponseMock = (overrideResponse = {}) => (Object.assign({ databases: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ db: faker.helpers.arrayElement([faker.word.sample(), undefined]), sitename: faker.helpers.arrayElement([faker.word.sample(), undefined]), size: faker.helpers.arrayElement([faker.word.sample(), undefined]), sizemeg: faker.helpers.arrayElement([faker.word.sample(), undefined]), usercount: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), userlist: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ db: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) })), undefined]), status: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
69
|
+
export const getHostingDbAuthorizedHostsResponseMock = (overrideResponse = {}) => (Object.assign({ remote_ips: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ label: faker.helpers.arrayElement([faker.word.sample(), undefined]), remote_ip: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
70
|
+
export const getHostingDbAuthorizedHostsAddResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
71
|
+
export const getHostingDbAuthorizedHostsUpdateResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
72
|
+
export const getHostingDbAuthorizedHostsDeleteResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
69
73
|
export const getDbCheckDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({ database: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
70
74
|
export const getDbUsageResponseMock = (overrideResponse = {}) => (Object.assign({ db_count: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), db_limit: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, overrideResponse));
|
|
71
75
|
export const getDbUserPasswordSetResponseMock = (overrideResponse = {}) => (Object.assign({ dbuser: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
@@ -771,6 +775,46 @@ export const getDbListMockHandler = (overrideResponse) => {
|
|
|
771
775
|
});
|
|
772
776
|
}));
|
|
773
777
|
};
|
|
778
|
+
export const getHostingDbAuthorizedHostsMockHandler = (overrideResponse) => {
|
|
779
|
+
return http.get('*/v1/hosting/:hostingId/db/authorized-hosts', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
780
|
+
yield delay(1000);
|
|
781
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
782
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
783
|
+
: getHostingDbAuthorizedHostsResponseMock()), { status: 200,
|
|
784
|
+
headers: { 'Content-Type': 'application/json' }
|
|
785
|
+
});
|
|
786
|
+
}));
|
|
787
|
+
};
|
|
788
|
+
export const getHostingDbAuthorizedHostsAddMockHandler = (overrideResponse) => {
|
|
789
|
+
return http.post('*/v1/hosting/:hostingId/db/authorized-hosts', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
790
|
+
yield delay(1000);
|
|
791
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
792
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
793
|
+
: getHostingDbAuthorizedHostsAddResponseMock()), { status: 200,
|
|
794
|
+
headers: { 'Content-Type': 'application/json' }
|
|
795
|
+
});
|
|
796
|
+
}));
|
|
797
|
+
};
|
|
798
|
+
export const getHostingDbAuthorizedHostsUpdateMockHandler = (overrideResponse) => {
|
|
799
|
+
return http.put('*/v1/hosting/:hostingId/db/authorized-hosts', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
800
|
+
yield delay(1000);
|
|
801
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
802
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
803
|
+
: getHostingDbAuthorizedHostsUpdateResponseMock()), { status: 200,
|
|
804
|
+
headers: { 'Content-Type': 'application/json' }
|
|
805
|
+
});
|
|
806
|
+
}));
|
|
807
|
+
};
|
|
808
|
+
export const getHostingDbAuthorizedHostsDeleteMockHandler = (overrideResponse) => {
|
|
809
|
+
return http.delete('*/v1/hosting/:hostingId/db/authorized-hosts', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
810
|
+
yield delay(1000);
|
|
811
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
812
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
813
|
+
: getHostingDbAuthorizedHostsDeleteResponseMock()), { status: 200,
|
|
814
|
+
headers: { 'Content-Type': 'application/json' }
|
|
815
|
+
});
|
|
816
|
+
}));
|
|
817
|
+
};
|
|
774
818
|
export const getDbCheckDatabaseMockHandler = (overrideResponse) => {
|
|
775
819
|
return http.post('*/v1/hosting/:hostingId/db/check', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
776
820
|
yield delay(1000);
|
|
@@ -2098,6 +2142,10 @@ export const getHostingUAPIMock = () => [
|
|
|
2098
2142
|
getDbAddMockHandler(),
|
|
2099
2143
|
getDbMockHandler(),
|
|
2100
2144
|
getDbListMockHandler(),
|
|
2145
|
+
getHostingDbAuthorizedHostsMockHandler(),
|
|
2146
|
+
getHostingDbAuthorizedHostsAddMockHandler(),
|
|
2147
|
+
getHostingDbAuthorizedHostsUpdateMockHandler(),
|
|
2148
|
+
getHostingDbAuthorizedHostsDeleteMockHandler(),
|
|
2101
2149
|
getDbCheckDatabaseMockHandler(),
|
|
2102
2150
|
getDbUsageMockHandler(),
|
|
2103
2151
|
getDbUserPasswordSetMockHandler(),
|
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.1106.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SitesListV3200 = {
|
|
9
9
|
items?: SiteInfoResponseModelV2[];
|
|
@@ -2204,6 +2204,34 @@ export declare type DbCheckDatabaseBody = {
|
|
|
2204
2204
|
/** Type of database */
|
|
2205
2205
|
type?: DbCheckDatabaseBodyType;
|
|
2206
2206
|
};
|
|
2207
|
+
export declare type HostingDbAuthorizedHostsDelete200 = {
|
|
2208
|
+
success?: number;
|
|
2209
|
+
};
|
|
2210
|
+
export declare type HostingDbAuthorizedHostsDeleteBody = {
|
|
2211
|
+
host: string;
|
|
2212
|
+
};
|
|
2213
|
+
export declare type HostingDbAuthorizedHostsUpdate200 = {
|
|
2214
|
+
success?: number;
|
|
2215
|
+
};
|
|
2216
|
+
export declare type HostingDbAuthorizedHostsUpdateBody = {
|
|
2217
|
+
host: string;
|
|
2218
|
+
label?: string;
|
|
2219
|
+
new_host?: string;
|
|
2220
|
+
};
|
|
2221
|
+
export declare type HostingDbAuthorizedHostsAdd200 = {
|
|
2222
|
+
success?: number;
|
|
2223
|
+
};
|
|
2224
|
+
export declare type HostingDbAuthorizedHostsAddBody = {
|
|
2225
|
+
host: string;
|
|
2226
|
+
label?: string;
|
|
2227
|
+
};
|
|
2228
|
+
export declare type HostingDbAuthorizedHosts200RemoteIpsItem = {
|
|
2229
|
+
label?: string;
|
|
2230
|
+
remote_ip?: string;
|
|
2231
|
+
};
|
|
2232
|
+
export declare type HostingDbAuthorizedHosts200 = {
|
|
2233
|
+
remote_ips?: HostingDbAuthorizedHosts200RemoteIpsItem[];
|
|
2234
|
+
};
|
|
2207
2235
|
export declare type DbList200DatabasesItemUserlistItem = {
|
|
2208
2236
|
db?: string;
|
|
2209
2237
|
user?: string;
|