@newfold/huapi-js 2.1317.0 → 2.1340.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 +227 -6
- package/src/index.js +174 -2
- package/src/index.msw.d.ts +17 -3
- package/src/index.msw.js +89 -5
- package/src/index.schemas.d.ts +304 -42
- package/src/index.schemas.js +35 -0
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, ActivityLogParams, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddPrivacy200, AddPrivacyBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsJetpackValidate200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupCreateV2200, BackupCreateV2Body, BackupDownloadV2200, BackupDownloadV2Body, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupListV2200, BackupRestoreV2200, BackupRestoreV2Body, BackupStatus200, BackupStatusParams, BackupStatusV2200, BackupStatusV2Params, 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, CronLastRun200, CronLastRunParams, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbListV2200, DbMultipleUserDatabase200, DbMultipleUserDatabaseBody, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DirectoryPrivacy200, DirectoryPrivacyParams, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainDnsExport200, DomainDnsExportParams, DomainDnsImport200, DomainDnsImportBody, DomainDnsImportParams, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorAddBody, DomainDnseditorBody, DomainDnseditorEdit200, DomainDnseditorEditBody,
|
|
4
|
+
import type { AccessLogs200, AccessLogsParams, AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, ActivityLogParams, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddPrivacy200, AddPrivacyBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsJetpackValidate200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupCreateV2200, BackupCreateV2Body, BackupDownloadV2200, BackupDownloadV2Body, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupListV2200, BackupRestoreV2200, BackupRestoreV2Body, BackupStatus200, BackupStatusParams, BackupStatusV2200, BackupStatusV2Params, 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, CronLastRun200, CronLastRunParams, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbListV2200, DbMultipleUserDatabase200, DbMultipleUserDatabaseBody, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DirectoryPrivacy200, DirectoryPrivacyParams, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainDnsExport200, DomainDnsExportParams, DomainDnsImport200, DomainDnsImportBody, DomainDnsImportParams, DomainDnseditor200, DomainDnseditorAdd200, DomainDnseditorAddBody, DomainDnseditorBody, DomainDnseditorEdit200, DomainDnseditorEditBody, DomainDnseditorList200, DomainDnszoneReset200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDns200, HostingAdvancedDnsParams, HostingAdvancedDnsUpdate200, HostingAdvancedDnsUpdateBody, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsAddBody, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsDeleteBody, HostingDbAuthorizedHostsUpdate200, HostingDbAuthorizedHostsUpdateBody, HostingDomainAssign200, HostingDomainAssignBody, HostingDomainAvailability200, HostingDomainAvailabilityParams, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingDomainsUnassignV2200, HostingDomainsUnassignV2Body, HostingEcommerceInfo200, HostingEmailAdd200, HostingEmailAdd400, HostingEmailAdd403, HostingEmailAdd409, HostingEmailAdd512, HostingEmailAddBody, HostingEmailDelete200, HostingEmailDeleteParams, HostingEmailForwarderAdd200, HostingEmailForwarderAdd400, HostingEmailForwarderAdd403, HostingEmailForwarderAdd409, HostingEmailForwarderAdd512, HostingEmailForwarderAddBody, HostingEmailForwarderDelete200, HostingEmailForwarderDelete400, HostingEmailForwarderDeleteParams, HostingEmailForwardersList200, HostingEmailForwardersListParams, HostingEmailList200, HostingEmailSuspend200, HostingEmailSuspend403, HostingEmailSuspend512, HostingEmailSuspendBody, HostingEmailUpdate200, HostingEmailUpdate400, HostingEmailUpdate403, HostingEmailUpdate512, HostingEmailUpdateBody, 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, HostingServerHits200, HostingServerHitsParams, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSiteAddV2200, HostingSiteAddV2Body, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, HostingVisitors200, HostingVisitorsParams, HotlinkconfigAdd200, HotlinkconfigAddBody, HotlinkconfigDelete200, HotlinkconfigDeleteBody, HotlinkconfigDetails200, HotlinkconfigDetailsParams, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListFilesV2200, ListFilesV2Params, ListIndex200, ListIndexParams, PasswordGenerate200, PasswordScore200, PasswordScoreParams, PhpErrors200, PhpErrorsParams, Privacy200, PrivacyBody, PrivacyUser200, PrivacyUserBody, ProductLicenseDetails200, ProductLicenseDetailsParams, RepairDatabase200, RepairDatabaseBody, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteAddonWpsolution200, SiteAddonWpsolution400, SiteAddonWpsolutionBody, SiteBody, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SiteMalwareStatusV2200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteQualityMetrics200, SiteQualityMetricsParams, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SiteUsersV2200, SiteUsersV2Params, 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, 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, SshKeyV2200, SshKeyV2Body, Sso200, SsoParams, StagingSitePromote200, StagingSitePromote409, StagingSitePromoteBody, 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
|
/**
|
|
@@ -1152,12 +1152,12 @@ export declare const useDomainDnseditor: <TError = AxiosError<unknown, any>, TCo
|
|
|
1152
1152
|
* Returns all the types of DNS records that are managable to that domain or id
|
|
1153
1153
|
* @summary Manage your nameservers and advanced DNS records.
|
|
1154
1154
|
*/
|
|
1155
|
-
export declare const domainDnseditorList: (domainId: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<
|
|
1155
|
+
export declare const domainDnseditorList: (domainId: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<DomainDnseditorList200>>;
|
|
1156
1156
|
export declare const getDomainDnseditorListQueryKey: (domainId: string) => readonly [`/v1/domains/${string}/dns-editor`];
|
|
1157
|
-
export declare const getDomainDnseditorListQueryOptions: <TData = AxiosResponse<
|
|
1158
|
-
query?: Partial<UseQueryOptions<AxiosResponse<
|
|
1157
|
+
export declare const getDomainDnseditorListQueryOptions: <TData = AxiosResponse<DomainDnseditorList200, any>, TError = AxiosError<unknown, any>>(domainId: string, options?: {
|
|
1158
|
+
query?: Partial<UseQueryOptions<AxiosResponse<DomainDnseditorList200, any>, TError, TData, QueryKey>> | undefined;
|
|
1159
1159
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
1160
|
-
} | undefined) => UseQueryOptions<AxiosResponse<
|
|
1160
|
+
} | undefined) => UseQueryOptions<AxiosResponse<DomainDnseditorList200, any>, TError, TData, QueryKey> & {
|
|
1161
1161
|
queryKey: QueryKey;
|
|
1162
1162
|
};
|
|
1163
1163
|
export declare type DomainDnseditorListQueryResult = NonNullable<Awaited<ReturnType<typeof domainDnseditorList>>>;
|
|
@@ -1274,6 +1274,38 @@ export declare function useDomainDnszoneReset<TData = Awaited<ReturnType<typeof
|
|
|
1274
1274
|
}): UseQueryResult<TData, TError> & {
|
|
1275
1275
|
queryKey: QueryKey;
|
|
1276
1276
|
};
|
|
1277
|
+
/**
|
|
1278
|
+
* Access logs
|
|
1279
|
+
* @summary Access logs
|
|
1280
|
+
*/
|
|
1281
|
+
export declare const accessLogs: (domainId: number, params?: AccessLogsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<AccessLogs200>>;
|
|
1282
|
+
export declare const getAccessLogsQueryKey: (domainId: number, params?: AccessLogsParams) => readonly [`/v1/domains/${number}/logs/access`, ...AccessLogsParams[]];
|
|
1283
|
+
export declare const getAccessLogsQueryOptions: <TData = AxiosResponse<AccessLogs200, any>, TError = AxiosError<unknown, any>>(domainId: number, params?: AccessLogsParams, options?: {
|
|
1284
|
+
query?: Partial<UseQueryOptions<AxiosResponse<AccessLogs200, any>, TError, TData, QueryKey>> | undefined;
|
|
1285
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1286
|
+
} | undefined) => UseQueryOptions<AxiosResponse<AccessLogs200, any>, TError, TData, QueryKey> & {
|
|
1287
|
+
queryKey: QueryKey;
|
|
1288
|
+
};
|
|
1289
|
+
export declare type AccessLogsQueryResult = NonNullable<Awaited<ReturnType<typeof accessLogs>>>;
|
|
1290
|
+
export declare type AccessLogsQueryError = AxiosError<unknown>;
|
|
1291
|
+
export declare function useAccessLogs<TData = Awaited<ReturnType<typeof accessLogs>>, TError = AxiosError<unknown>>(domainId: number, params: undefined | AccessLogsParams, options: {
|
|
1292
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof accessLogs>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof accessLogs>>, TError, TData>, 'initialData'>;
|
|
1293
|
+
axios?: AxiosRequestConfig;
|
|
1294
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
1295
|
+
queryKey: QueryKey;
|
|
1296
|
+
};
|
|
1297
|
+
export declare function useAccessLogs<TData = Awaited<ReturnType<typeof accessLogs>>, TError = AxiosError<unknown>>(domainId: number, params?: AccessLogsParams, options?: {
|
|
1298
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof accessLogs>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof accessLogs>>, TError, TData>, 'initialData'>;
|
|
1299
|
+
axios?: AxiosRequestConfig;
|
|
1300
|
+
}): UseQueryResult<TData, TError> & {
|
|
1301
|
+
queryKey: QueryKey;
|
|
1302
|
+
};
|
|
1303
|
+
export declare function useAccessLogs<TData = Awaited<ReturnType<typeof accessLogs>>, TError = AxiosError<unknown>>(domainId: number, params?: AccessLogsParams, options?: {
|
|
1304
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof accessLogs>>, TError, TData>>;
|
|
1305
|
+
axios?: AxiosRequestConfig;
|
|
1306
|
+
}): UseQueryResult<TData, TError> & {
|
|
1307
|
+
queryKey: QueryKey;
|
|
1308
|
+
};
|
|
1277
1309
|
/**
|
|
1278
1310
|
* Unassign a domain name
|
|
1279
1311
|
* @summary domain unassign
|
|
@@ -2911,7 +2943,7 @@ export declare const useHostingEmailAdd: <TError = AxiosError<HostingEmailAdd512
|
|
|
2911
2943
|
data: HostingEmailAddBody;
|
|
2912
2944
|
}, TContext>;
|
|
2913
2945
|
/**
|
|
2914
|
-
*
|
|
2946
|
+
* Deletes an email account by address
|
|
2915
2947
|
* @summary email delete
|
|
2916
2948
|
*/
|
|
2917
2949
|
export declare const hostingEmailDelete: (hostingId: string, params: HostingEmailDeleteParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingEmailDelete200>>;
|
|
@@ -3003,6 +3035,130 @@ export declare const useHostingEmailUpdate: <TError = AxiosError<HostingEmailUpd
|
|
|
3003
3035
|
hostingId: string;
|
|
3004
3036
|
data: HostingEmailUpdateBody;
|
|
3005
3037
|
}, TContext>;
|
|
3038
|
+
/**
|
|
3039
|
+
* Lists existing email account and domain forwarders
|
|
3040
|
+
* @summary email forwarders lists
|
|
3041
|
+
*/
|
|
3042
|
+
export declare const hostingEmailForwardersList: (hostingId: string, params: HostingEmailForwardersListParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingEmailForwardersList200>>;
|
|
3043
|
+
export declare const getHostingEmailForwardersListQueryKey: (hostingId: string, params: HostingEmailForwardersListParams) => readonly [`/v1/hosting/${string}/emails/forwarders`, ...HostingEmailForwardersListParams[]];
|
|
3044
|
+
export declare const getHostingEmailForwardersListQueryOptions: <TData = AxiosResponse<HostingEmailForwardersList200, any>, TError = AxiosError<unknown, any>>(hostingId: string, params: HostingEmailForwardersListParams, options?: {
|
|
3045
|
+
query?: Partial<UseQueryOptions<AxiosResponse<HostingEmailForwardersList200, any>, TError, TData, QueryKey>> | undefined;
|
|
3046
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3047
|
+
} | undefined) => UseQueryOptions<AxiosResponse<HostingEmailForwardersList200, any>, TError, TData, QueryKey> & {
|
|
3048
|
+
queryKey: QueryKey;
|
|
3049
|
+
};
|
|
3050
|
+
export declare type HostingEmailForwardersListQueryResult = NonNullable<Awaited<ReturnType<typeof hostingEmailForwardersList>>>;
|
|
3051
|
+
export declare type HostingEmailForwardersListQueryError = AxiosError<unknown>;
|
|
3052
|
+
export declare function useHostingEmailForwardersList<TData = Awaited<ReturnType<typeof hostingEmailForwardersList>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingEmailForwardersListParams, options: {
|
|
3053
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingEmailForwardersList>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof hostingEmailForwardersList>>, TError, TData>, 'initialData'>;
|
|
3054
|
+
axios?: AxiosRequestConfig;
|
|
3055
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
3056
|
+
queryKey: QueryKey;
|
|
3057
|
+
};
|
|
3058
|
+
export declare function useHostingEmailForwardersList<TData = Awaited<ReturnType<typeof hostingEmailForwardersList>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingEmailForwardersListParams, options?: {
|
|
3059
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingEmailForwardersList>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof hostingEmailForwardersList>>, TError, TData>, 'initialData'>;
|
|
3060
|
+
axios?: AxiosRequestConfig;
|
|
3061
|
+
}): UseQueryResult<TData, TError> & {
|
|
3062
|
+
queryKey: QueryKey;
|
|
3063
|
+
};
|
|
3064
|
+
export declare function useHostingEmailForwardersList<TData = Awaited<ReturnType<typeof hostingEmailForwardersList>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingEmailForwardersListParams, options?: {
|
|
3065
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingEmailForwardersList>>, TError, TData>>;
|
|
3066
|
+
axios?: AxiosRequestConfig;
|
|
3067
|
+
}): UseQueryResult<TData, TError> & {
|
|
3068
|
+
queryKey: QueryKey;
|
|
3069
|
+
};
|
|
3070
|
+
/**
|
|
3071
|
+
* Add a new forwarder by either account or domain
|
|
3072
|
+
* @summary NOT YET IMPLEMENTED - email forwarder add
|
|
3073
|
+
*/
|
|
3074
|
+
export declare const hostingEmailForwarderAdd: (hostingId: string, hostingEmailForwarderAddBody: HostingEmailForwarderAddBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingEmailForwarderAdd200>>;
|
|
3075
|
+
export declare const getHostingEmailForwarderAddMutationOptions: <TError = AxiosError<HostingEmailForwarderAdd512 | HostingEmailForwarderAdd409 | HostingEmailForwarderAdd403 | HostingEmailForwarderAdd400, any>, TContext = unknown>(options?: {
|
|
3076
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailForwarderAdd200, any>, TError, {
|
|
3077
|
+
hostingId: string;
|
|
3078
|
+
data: HostingEmailForwarderAddBody;
|
|
3079
|
+
}, TContext> | undefined;
|
|
3080
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3081
|
+
} | undefined) => UseMutationOptions<AxiosResponse<HostingEmailForwarderAdd200, any>, TError, {
|
|
3082
|
+
hostingId: string;
|
|
3083
|
+
data: HostingEmailForwarderAddBody;
|
|
3084
|
+
}, TContext>;
|
|
3085
|
+
export declare type HostingEmailForwarderAddMutationResult = NonNullable<Awaited<ReturnType<typeof hostingEmailForwarderAdd>>>;
|
|
3086
|
+
export declare type HostingEmailForwarderAddMutationBody = HostingEmailForwarderAddBody;
|
|
3087
|
+
export declare type HostingEmailForwarderAddMutationError = AxiosError<HostingEmailForwarderAdd400 | HostingEmailForwarderAdd403 | HostingEmailForwarderAdd409 | HostingEmailForwarderAdd512>;
|
|
3088
|
+
/**
|
|
3089
|
+
* @summary NOT YET IMPLEMENTED - email forwarder add
|
|
3090
|
+
*/
|
|
3091
|
+
export declare const useHostingEmailForwarderAdd: <TError = AxiosError<HostingEmailForwarderAdd512 | HostingEmailForwarderAdd409 | HostingEmailForwarderAdd403 | HostingEmailForwarderAdd400, any>, TContext = unknown>(options?: {
|
|
3092
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailForwarderAdd200, any>, TError, {
|
|
3093
|
+
hostingId: string;
|
|
3094
|
+
data: HostingEmailForwarderAddBody;
|
|
3095
|
+
}, TContext> | undefined;
|
|
3096
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3097
|
+
} | undefined) => UseMutationResult<AxiosResponse<HostingEmailForwarderAdd200, any>, TError, {
|
|
3098
|
+
hostingId: string;
|
|
3099
|
+
data: HostingEmailForwarderAddBody;
|
|
3100
|
+
}, TContext>;
|
|
3101
|
+
/**
|
|
3102
|
+
* Delete email forwarder
|
|
3103
|
+
* @summary NOT YET IMPLEMENTED - email forwarder delete
|
|
3104
|
+
*/
|
|
3105
|
+
export declare const hostingEmailForwarderDelete: (hostingId: string, params: HostingEmailForwarderDeleteParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingEmailForwarderDelete200>>;
|
|
3106
|
+
export declare const getHostingEmailForwarderDeleteMutationOptions: <TError = AxiosError<HostingEmailForwarderDelete400, any>, TContext = unknown>(options?: {
|
|
3107
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailForwarderDelete200, any>, TError, {
|
|
3108
|
+
hostingId: string;
|
|
3109
|
+
params: HostingEmailForwarderDeleteParams;
|
|
3110
|
+
}, TContext> | undefined;
|
|
3111
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3112
|
+
} | undefined) => UseMutationOptions<AxiosResponse<HostingEmailForwarderDelete200, any>, TError, {
|
|
3113
|
+
hostingId: string;
|
|
3114
|
+
params: HostingEmailForwarderDeleteParams;
|
|
3115
|
+
}, TContext>;
|
|
3116
|
+
export declare type HostingEmailForwarderDeleteMutationResult = NonNullable<Awaited<ReturnType<typeof hostingEmailForwarderDelete>>>;
|
|
3117
|
+
export declare type HostingEmailForwarderDeleteMutationError = AxiosError<HostingEmailForwarderDelete400>;
|
|
3118
|
+
/**
|
|
3119
|
+
* @summary NOT YET IMPLEMENTED - email forwarder delete
|
|
3120
|
+
*/
|
|
3121
|
+
export declare const useHostingEmailForwarderDelete: <TError = AxiosError<HostingEmailForwarderDelete400, any>, TContext = unknown>(options?: {
|
|
3122
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailForwarderDelete200, any>, TError, {
|
|
3123
|
+
hostingId: string;
|
|
3124
|
+
params: HostingEmailForwarderDeleteParams;
|
|
3125
|
+
}, TContext> | undefined;
|
|
3126
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3127
|
+
} | undefined) => UseMutationResult<AxiosResponse<HostingEmailForwarderDelete200, any>, TError, {
|
|
3128
|
+
hostingId: string;
|
|
3129
|
+
params: HostingEmailForwarderDeleteParams;
|
|
3130
|
+
}, TContext>;
|
|
3131
|
+
/**
|
|
3132
|
+
* Suspend or unsuspend an email accounts ability to send and receive email
|
|
3133
|
+
* @summary email suspend
|
|
3134
|
+
*/
|
|
3135
|
+
export declare const hostingEmailSuspend: (hostingId: string, hostingEmailSuspendBody: HostingEmailSuspendBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingEmailSuspend200>>;
|
|
3136
|
+
export declare const getHostingEmailSuspendMutationOptions: <TError = AxiosError<HostingEmailSuspend512 | HostingEmailSuspend403, any>, TContext = unknown>(options?: {
|
|
3137
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailSuspend200, any>, TError, {
|
|
3138
|
+
hostingId: string;
|
|
3139
|
+
data: HostingEmailSuspendBody;
|
|
3140
|
+
}, TContext> | undefined;
|
|
3141
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3142
|
+
} | undefined) => UseMutationOptions<AxiosResponse<HostingEmailSuspend200, any>, TError, {
|
|
3143
|
+
hostingId: string;
|
|
3144
|
+
data: HostingEmailSuspendBody;
|
|
3145
|
+
}, TContext>;
|
|
3146
|
+
export declare type HostingEmailSuspendMutationResult = NonNullable<Awaited<ReturnType<typeof hostingEmailSuspend>>>;
|
|
3147
|
+
export declare type HostingEmailSuspendMutationBody = HostingEmailSuspendBody;
|
|
3148
|
+
export declare type HostingEmailSuspendMutationError = AxiosError<HostingEmailSuspend403 | HostingEmailSuspend512>;
|
|
3149
|
+
/**
|
|
3150
|
+
* @summary email suspend
|
|
3151
|
+
*/
|
|
3152
|
+
export declare const useHostingEmailSuspend: <TError = AxiosError<HostingEmailSuspend512 | HostingEmailSuspend403, any>, TContext = unknown>(options?: {
|
|
3153
|
+
mutation?: UseMutationOptions<AxiosResponse<HostingEmailSuspend200, any>, TError, {
|
|
3154
|
+
hostingId: string;
|
|
3155
|
+
data: HostingEmailSuspendBody;
|
|
3156
|
+
}, TContext> | undefined;
|
|
3157
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3158
|
+
} | undefined) => UseMutationResult<AxiosResponse<HostingEmailSuspend200, any>, TError, {
|
|
3159
|
+
hostingId: string;
|
|
3160
|
+
data: HostingEmailSuspendBody;
|
|
3161
|
+
}, TContext>;
|
|
3006
3162
|
/**
|
|
3007
3163
|
* List files under the given directory
|
|
3008
3164
|
* @deprecated
|
|
@@ -6457,6 +6613,7 @@ export declare function useSiteStatus<TData = Awaited<ReturnType<typeof siteStat
|
|
|
6457
6613
|
};
|
|
6458
6614
|
/**
|
|
6459
6615
|
* Returns a list of the site's users
|
|
6616
|
+
* @deprecated
|
|
6460
6617
|
* @summary users
|
|
6461
6618
|
*/
|
|
6462
6619
|
export declare const siteUsers: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SiteUsers200>>;
|
|
@@ -7155,6 +7312,38 @@ export declare function useSitesDomainsV2<TData = Awaited<ReturnType<typeof site
|
|
|
7155
7312
|
}): UseQueryResult<TData, TError> & {
|
|
7156
7313
|
queryKey: QueryKey;
|
|
7157
7314
|
};
|
|
7315
|
+
/**
|
|
7316
|
+
* Returns malware status of atomic site
|
|
7317
|
+
* @summary malware status of atomic site
|
|
7318
|
+
*/
|
|
7319
|
+
export declare const siteMalwareStatusV2: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SiteMalwareStatusV2200>>;
|
|
7320
|
+
export declare const getSiteMalwareStatusV2QueryKey: (siteId: number) => readonly [`/v2/sites/${number}/malware-status`];
|
|
7321
|
+
export declare const getSiteMalwareStatusV2QueryOptions: <TData = AxiosResponse<SiteMalwareStatusV2200, any>, TError = AxiosError<unknown, any>>(siteId: number, options?: {
|
|
7322
|
+
query?: Partial<UseQueryOptions<AxiosResponse<SiteMalwareStatusV2200, any>, TError, TData, QueryKey>> | undefined;
|
|
7323
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
7324
|
+
} | undefined) => UseQueryOptions<AxiosResponse<SiteMalwareStatusV2200, any>, TError, TData, QueryKey> & {
|
|
7325
|
+
queryKey: QueryKey;
|
|
7326
|
+
};
|
|
7327
|
+
export declare type SiteMalwareStatusV2QueryResult = NonNullable<Awaited<ReturnType<typeof siteMalwareStatusV2>>>;
|
|
7328
|
+
export declare type SiteMalwareStatusV2QueryError = AxiosError<unknown>;
|
|
7329
|
+
export declare function useSiteMalwareStatusV2<TData = Awaited<ReturnType<typeof siteMalwareStatusV2>>, TError = AxiosError<unknown>>(siteId: number, options: {
|
|
7330
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof siteMalwareStatusV2>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof siteMalwareStatusV2>>, TError, TData>, 'initialData'>;
|
|
7331
|
+
axios?: AxiosRequestConfig;
|
|
7332
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
7333
|
+
queryKey: QueryKey;
|
|
7334
|
+
};
|
|
7335
|
+
export declare function useSiteMalwareStatusV2<TData = Awaited<ReturnType<typeof siteMalwareStatusV2>>, TError = AxiosError<unknown>>(siteId: number, options?: {
|
|
7336
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof siteMalwareStatusV2>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof siteMalwareStatusV2>>, TError, TData>, 'initialData'>;
|
|
7337
|
+
axios?: AxiosRequestConfig;
|
|
7338
|
+
}): UseQueryResult<TData, TError> & {
|
|
7339
|
+
queryKey: QueryKey;
|
|
7340
|
+
};
|
|
7341
|
+
export declare function useSiteMalwareStatusV2<TData = Awaited<ReturnType<typeof siteMalwareStatusV2>>, TError = AxiosError<unknown>>(siteId: number, options?: {
|
|
7342
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof siteMalwareStatusV2>>, TError, TData>>;
|
|
7343
|
+
axios?: AxiosRequestConfig;
|
|
7344
|
+
}): UseQueryResult<TData, TError> & {
|
|
7345
|
+
queryKey: QueryKey;
|
|
7346
|
+
};
|
|
7158
7347
|
/**
|
|
7159
7348
|
* Returns the site's sitelock information.
|
|
7160
7349
|
* @summary sitelock info
|
|
@@ -7219,6 +7408,38 @@ export declare function useSitesSshUserListV2<TData = Awaited<ReturnType<typeof
|
|
|
7219
7408
|
}): UseQueryResult<TData, TError> & {
|
|
7220
7409
|
queryKey: QueryKey;
|
|
7221
7410
|
};
|
|
7411
|
+
/**
|
|
7412
|
+
* Returns a list of the site's users with additional information like limit,offset, and total count
|
|
7413
|
+
* @summary users info
|
|
7414
|
+
*/
|
|
7415
|
+
export declare const siteUsersV2: (siteId: number, params?: SiteUsersV2Params, options?: AxiosRequestConfig) => Promise<AxiosResponse<SiteUsersV2200>>;
|
|
7416
|
+
export declare const getSiteUsersV2QueryKey: (siteId: number, params?: SiteUsersV2Params) => readonly [`/v2/sites/${number}/users`, ...SiteUsersV2Params[]];
|
|
7417
|
+
export declare const getSiteUsersV2QueryOptions: <TData = AxiosResponse<SiteUsersV2200, any>, TError = AxiosError<unknown, any>>(siteId: number, params?: SiteUsersV2Params, options?: {
|
|
7418
|
+
query?: Partial<UseQueryOptions<AxiosResponse<SiteUsersV2200, any>, TError, TData, QueryKey>> | undefined;
|
|
7419
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
7420
|
+
} | undefined) => UseQueryOptions<AxiosResponse<SiteUsersV2200, any>, TError, TData, QueryKey> & {
|
|
7421
|
+
queryKey: QueryKey;
|
|
7422
|
+
};
|
|
7423
|
+
export declare type SiteUsersV2QueryResult = NonNullable<Awaited<ReturnType<typeof siteUsersV2>>>;
|
|
7424
|
+
export declare type SiteUsersV2QueryError = AxiosError<unknown>;
|
|
7425
|
+
export declare function useSiteUsersV2<TData = Awaited<ReturnType<typeof siteUsersV2>>, TError = AxiosError<unknown>>(siteId: number, params: undefined | SiteUsersV2Params, options: {
|
|
7426
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof siteUsersV2>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof siteUsersV2>>, TError, TData>, 'initialData'>;
|
|
7427
|
+
axios?: AxiosRequestConfig;
|
|
7428
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
7429
|
+
queryKey: QueryKey;
|
|
7430
|
+
};
|
|
7431
|
+
export declare function useSiteUsersV2<TData = Awaited<ReturnType<typeof siteUsersV2>>, TError = AxiosError<unknown>>(siteId: number, params?: SiteUsersV2Params, options?: {
|
|
7432
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof siteUsersV2>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof siteUsersV2>>, TError, TData>, 'initialData'>;
|
|
7433
|
+
axios?: AxiosRequestConfig;
|
|
7434
|
+
}): UseQueryResult<TData, TError> & {
|
|
7435
|
+
queryKey: QueryKey;
|
|
7436
|
+
};
|
|
7437
|
+
export declare function useSiteUsersV2<TData = Awaited<ReturnType<typeof siteUsersV2>>, TError = AxiosError<unknown>>(siteId: number, params?: SiteUsersV2Params, options?: {
|
|
7438
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof siteUsersV2>>, TError, TData>>;
|
|
7439
|
+
axios?: AxiosRequestConfig;
|
|
7440
|
+
}): UseQueryResult<TData, TError> & {
|
|
7441
|
+
queryKey: QueryKey;
|
|
7442
|
+
};
|
|
7222
7443
|
/**
|
|
7223
7444
|
* Import public ssh key
|
|
7224
7445
|
* @summary Import ssh key
|
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.1340.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -999,6 +999,32 @@ export function useDomainDnszoneReset(domainId, options) {
|
|
|
999
999
|
query.queryKey = queryOptions.queryKey;
|
|
1000
1000
|
return query;
|
|
1001
1001
|
}
|
|
1002
|
+
/**
|
|
1003
|
+
* Access logs
|
|
1004
|
+
* @summary Access logs
|
|
1005
|
+
*/
|
|
1006
|
+
export const accessLogs = (domainId, params, options) => {
|
|
1007
|
+
return axios.get(`/v1/domains/${domainId}/logs/access`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
1008
|
+
};
|
|
1009
|
+
export const getAccessLogsQueryKey = (domainId, params) => {
|
|
1010
|
+
return [`/v1/domains/${domainId}/logs/access`, ...(params ? [params] : [])];
|
|
1011
|
+
};
|
|
1012
|
+
export const getAccessLogsQueryOptions = (domainId, params, options) => {
|
|
1013
|
+
var _a;
|
|
1014
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1015
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getAccessLogsQueryKey(domainId, params);
|
|
1016
|
+
const queryFn = ({ signal }) => accessLogs(domainId, params, Object.assign({ signal }, axiosOptions));
|
|
1017
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(domainId) }, queryOptions);
|
|
1018
|
+
};
|
|
1019
|
+
/**
|
|
1020
|
+
* @summary Access logs
|
|
1021
|
+
*/
|
|
1022
|
+
export function useAccessLogs(domainId, params, options) {
|
|
1023
|
+
const queryOptions = getAccessLogsQueryOptions(domainId, params, options);
|
|
1024
|
+
const query = useQuery(queryOptions);
|
|
1025
|
+
query.queryKey = queryOptions.queryKey;
|
|
1026
|
+
return query;
|
|
1027
|
+
}
|
|
1002
1028
|
/**
|
|
1003
1029
|
* Unassign a domain name
|
|
1004
1030
|
* @summary domain unassign
|
|
@@ -2238,7 +2264,7 @@ export const useHostingEmailAdd = (options) => {
|
|
|
2238
2264
|
return useMutation(mutationOptions);
|
|
2239
2265
|
};
|
|
2240
2266
|
/**
|
|
2241
|
-
*
|
|
2267
|
+
* Deletes an email account by address
|
|
2242
2268
|
* @summary email delete
|
|
2243
2269
|
*/
|
|
2244
2270
|
export const hostingEmailDelete = (hostingId, params, options) => {
|
|
@@ -2307,6 +2333,98 @@ export const useHostingEmailUpdate = (options) => {
|
|
|
2307
2333
|
const mutationOptions = getHostingEmailUpdateMutationOptions(options);
|
|
2308
2334
|
return useMutation(mutationOptions);
|
|
2309
2335
|
};
|
|
2336
|
+
/**
|
|
2337
|
+
* Lists existing email account and domain forwarders
|
|
2338
|
+
* @summary email forwarders lists
|
|
2339
|
+
*/
|
|
2340
|
+
export const hostingEmailForwardersList = (hostingId, params, options) => {
|
|
2341
|
+
return axios.get(`/v1/hosting/${hostingId}/emails/forwarders`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
2342
|
+
};
|
|
2343
|
+
export const getHostingEmailForwardersListQueryKey = (hostingId, params) => {
|
|
2344
|
+
return [`/v1/hosting/${hostingId}/emails/forwarders`, ...(params ? [params] : [])];
|
|
2345
|
+
};
|
|
2346
|
+
export const getHostingEmailForwardersListQueryOptions = (hostingId, params, options) => {
|
|
2347
|
+
var _a;
|
|
2348
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2349
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingEmailForwardersListQueryKey(hostingId, params);
|
|
2350
|
+
const queryFn = ({ signal }) => hostingEmailForwardersList(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
2351
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
2352
|
+
};
|
|
2353
|
+
/**
|
|
2354
|
+
* @summary email forwarders lists
|
|
2355
|
+
*/
|
|
2356
|
+
export function useHostingEmailForwardersList(hostingId, params, options) {
|
|
2357
|
+
const queryOptions = getHostingEmailForwardersListQueryOptions(hostingId, params, options);
|
|
2358
|
+
const query = useQuery(queryOptions);
|
|
2359
|
+
query.queryKey = queryOptions.queryKey;
|
|
2360
|
+
return query;
|
|
2361
|
+
}
|
|
2362
|
+
/**
|
|
2363
|
+
* Add a new forwarder by either account or domain
|
|
2364
|
+
* @summary NOT YET IMPLEMENTED - email forwarder add
|
|
2365
|
+
*/
|
|
2366
|
+
export const hostingEmailForwarderAdd = (hostingId, hostingEmailForwarderAddBody, options) => {
|
|
2367
|
+
return axios.post(`/v1/hosting/${hostingId}/emails/forwarders`, hostingEmailForwarderAddBody, options);
|
|
2368
|
+
};
|
|
2369
|
+
export const getHostingEmailForwarderAddMutationOptions = (options) => {
|
|
2370
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2371
|
+
const mutationFn = (props) => {
|
|
2372
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
2373
|
+
return hostingEmailForwarderAdd(hostingId, data, axiosOptions);
|
|
2374
|
+
};
|
|
2375
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
2376
|
+
};
|
|
2377
|
+
/**
|
|
2378
|
+
* @summary NOT YET IMPLEMENTED - email forwarder add
|
|
2379
|
+
*/
|
|
2380
|
+
export const useHostingEmailForwarderAdd = (options) => {
|
|
2381
|
+
const mutationOptions = getHostingEmailForwarderAddMutationOptions(options);
|
|
2382
|
+
return useMutation(mutationOptions);
|
|
2383
|
+
};
|
|
2384
|
+
/**
|
|
2385
|
+
* Delete email forwarder
|
|
2386
|
+
* @summary NOT YET IMPLEMENTED - email forwarder delete
|
|
2387
|
+
*/
|
|
2388
|
+
export const hostingEmailForwarderDelete = (hostingId, params, options) => {
|
|
2389
|
+
return axios.delete(`/v1/hosting/${hostingId}/emails/forwarders`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
2390
|
+
};
|
|
2391
|
+
export const getHostingEmailForwarderDeleteMutationOptions = (options) => {
|
|
2392
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2393
|
+
const mutationFn = (props) => {
|
|
2394
|
+
const { hostingId, params } = props !== null && props !== void 0 ? props : {};
|
|
2395
|
+
return hostingEmailForwarderDelete(hostingId, params, axiosOptions);
|
|
2396
|
+
};
|
|
2397
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
2398
|
+
};
|
|
2399
|
+
/**
|
|
2400
|
+
* @summary NOT YET IMPLEMENTED - email forwarder delete
|
|
2401
|
+
*/
|
|
2402
|
+
export const useHostingEmailForwarderDelete = (options) => {
|
|
2403
|
+
const mutationOptions = getHostingEmailForwarderDeleteMutationOptions(options);
|
|
2404
|
+
return useMutation(mutationOptions);
|
|
2405
|
+
};
|
|
2406
|
+
/**
|
|
2407
|
+
* Suspend or unsuspend an email accounts ability to send and receive email
|
|
2408
|
+
* @summary email suspend
|
|
2409
|
+
*/
|
|
2410
|
+
export const hostingEmailSuspend = (hostingId, hostingEmailSuspendBody, options) => {
|
|
2411
|
+
return axios.post(`/v1/hosting/${hostingId}/emails/suspend`, hostingEmailSuspendBody, options);
|
|
2412
|
+
};
|
|
2413
|
+
export const getHostingEmailSuspendMutationOptions = (options) => {
|
|
2414
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2415
|
+
const mutationFn = (props) => {
|
|
2416
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
2417
|
+
return hostingEmailSuspend(hostingId, data, axiosOptions);
|
|
2418
|
+
};
|
|
2419
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
2420
|
+
};
|
|
2421
|
+
/**
|
|
2422
|
+
* @summary email suspend
|
|
2423
|
+
*/
|
|
2424
|
+
export const useHostingEmailSuspend = (options) => {
|
|
2425
|
+
const mutationOptions = getHostingEmailSuspendMutationOptions(options);
|
|
2426
|
+
return useMutation(mutationOptions);
|
|
2427
|
+
};
|
|
2310
2428
|
/**
|
|
2311
2429
|
* List files under the given directory
|
|
2312
2430
|
* @deprecated
|
|
@@ -4989,6 +5107,7 @@ export function useSiteStatus(siteId, options) {
|
|
|
4989
5107
|
}
|
|
4990
5108
|
/**
|
|
4991
5109
|
* Returns a list of the site's users
|
|
5110
|
+
* @deprecated
|
|
4992
5111
|
* @summary users
|
|
4993
5112
|
*/
|
|
4994
5113
|
export const siteUsers = (siteId, options) => {
|
|
@@ -5005,6 +5124,7 @@ export const getSiteUsersQueryOptions = (siteId, options) => {
|
|
|
5005
5124
|
return Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions);
|
|
5006
5125
|
};
|
|
5007
5126
|
/**
|
|
5127
|
+
* @deprecated
|
|
5008
5128
|
* @summary users
|
|
5009
5129
|
*/
|
|
5010
5130
|
export function useSiteUsers(siteId, options) {
|
|
@@ -5533,6 +5653,32 @@ export function useSitesDomainsV2(siteId, params, options) {
|
|
|
5533
5653
|
query.queryKey = queryOptions.queryKey;
|
|
5534
5654
|
return query;
|
|
5535
5655
|
}
|
|
5656
|
+
/**
|
|
5657
|
+
* Returns malware status of atomic site
|
|
5658
|
+
* @summary malware status of atomic site
|
|
5659
|
+
*/
|
|
5660
|
+
export const siteMalwareStatusV2 = (siteId, options) => {
|
|
5661
|
+
return axios.get(`/v2/sites/${siteId}/malware-status`, options);
|
|
5662
|
+
};
|
|
5663
|
+
export const getSiteMalwareStatusV2QueryKey = (siteId) => {
|
|
5664
|
+
return [`/v2/sites/${siteId}/malware-status`];
|
|
5665
|
+
};
|
|
5666
|
+
export const getSiteMalwareStatusV2QueryOptions = (siteId, options) => {
|
|
5667
|
+
var _a;
|
|
5668
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
5669
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSiteMalwareStatusV2QueryKey(siteId);
|
|
5670
|
+
const queryFn = ({ signal }) => siteMalwareStatusV2(siteId, Object.assign({ signal }, axiosOptions));
|
|
5671
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions);
|
|
5672
|
+
};
|
|
5673
|
+
/**
|
|
5674
|
+
* @summary malware status of atomic site
|
|
5675
|
+
*/
|
|
5676
|
+
export function useSiteMalwareStatusV2(siteId, options) {
|
|
5677
|
+
const queryOptions = getSiteMalwareStatusV2QueryOptions(siteId, options);
|
|
5678
|
+
const query = useQuery(queryOptions);
|
|
5679
|
+
query.queryKey = queryOptions.queryKey;
|
|
5680
|
+
return query;
|
|
5681
|
+
}
|
|
5536
5682
|
/**
|
|
5537
5683
|
* Returns the site's sitelock information.
|
|
5538
5684
|
* @summary sitelock info
|
|
@@ -5585,6 +5731,32 @@ export function useSitesSshUserListV2(siteId, options) {
|
|
|
5585
5731
|
query.queryKey = queryOptions.queryKey;
|
|
5586
5732
|
return query;
|
|
5587
5733
|
}
|
|
5734
|
+
/**
|
|
5735
|
+
* Returns a list of the site's users with additional information like limit,offset, and total count
|
|
5736
|
+
* @summary users info
|
|
5737
|
+
*/
|
|
5738
|
+
export const siteUsersV2 = (siteId, params, options) => {
|
|
5739
|
+
return axios.get(`/v2/sites/${siteId}/users`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
5740
|
+
};
|
|
5741
|
+
export const getSiteUsersV2QueryKey = (siteId, params) => {
|
|
5742
|
+
return [`/v2/sites/${siteId}/users`, ...(params ? [params] : [])];
|
|
5743
|
+
};
|
|
5744
|
+
export const getSiteUsersV2QueryOptions = (siteId, params, options) => {
|
|
5745
|
+
var _a;
|
|
5746
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
5747
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSiteUsersV2QueryKey(siteId, params);
|
|
5748
|
+
const queryFn = ({ signal }) => siteUsersV2(siteId, params, Object.assign({ signal }, axiosOptions));
|
|
5749
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions);
|
|
5750
|
+
};
|
|
5751
|
+
/**
|
|
5752
|
+
* @summary users info
|
|
5753
|
+
*/
|
|
5754
|
+
export function useSiteUsersV2(siteId, params, options) {
|
|
5755
|
+
const queryOptions = getSiteUsersV2QueryOptions(siteId, params, options);
|
|
5756
|
+
const query = useQuery(queryOptions);
|
|
5757
|
+
query.queryKey = queryOptions.queryKey;
|
|
5758
|
+
return query;
|
|
5759
|
+
}
|
|
5588
5760
|
/**
|
|
5589
5761
|
* Import public ssh key
|
|
5590
5762
|
* @summary Import ssh key
|