@newfold/huapi-js 2.1158.0 → 2.1169.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 +141 -3
- package/src/index.js +111 -9
- package/src/index.msw.d.ts +9 -1
- package/src/index.msw.js +49 -1
- package/src/index.schemas.d.ts +84 -17
- package/src/index.schemas.js +11 -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, 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, DbListV2200, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DirectoryPrivacy200, DirectoryPrivacyParams, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, 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, Privacy200, PrivacyBody, PrivacyUser200, PrivacyUserBody, 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, 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, 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, ActivityLogParams, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddPrivacy200, AddPrivacyBody, 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, 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, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, EditPrivacy200, EditPrivacyBody, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsAddBody, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsDeleteBody, HostingDbAuthorizedHostsUpdate200, HostingDbAuthorizedHostsUpdateBody, HostingDomainAvailability200, HostingDomainAvailabilityParams, 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, HostingVisitors200, HostingVisitorsParams, Index200, IndexBody, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesParams, ListFilesV2200, ListFilesV2Params, ListIndex200, ListIndexParams, Privacy200, PrivacyBody, PrivacyUser200, PrivacyUserBody, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteBody, 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, 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, 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
|
/**
|
|
@@ -2157,6 +2157,37 @@ export declare const useDbUserRename: <TError = AxiosError<unknown, any>, TConte
|
|
|
2157
2157
|
hostingId: number;
|
|
2158
2158
|
data: DbUserRenameBody;
|
|
2159
2159
|
}, TContext>;
|
|
2160
|
+
/**
|
|
2161
|
+
* Delete multiple database users / databases
|
|
2162
|
+
* @summary Delete multiple database users / databases
|
|
2163
|
+
*/
|
|
2164
|
+
export declare const dbMultipleUserDatabase: (hostingId: string, dbMultipleUserDatabaseBody: DbMultipleUserDatabaseBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<DbMultipleUserDatabase200>>;
|
|
2165
|
+
export declare const getDbMultipleUserDatabaseMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2166
|
+
mutation?: UseMutationOptions<AxiosResponse<DbMultipleUserDatabase200, any>, TError, {
|
|
2167
|
+
hostingId: string;
|
|
2168
|
+
data: DbMultipleUserDatabaseBody;
|
|
2169
|
+
}, TContext> | undefined;
|
|
2170
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2171
|
+
} | undefined) => UseMutationOptions<AxiosResponse<DbMultipleUserDatabase200, any>, TError, {
|
|
2172
|
+
hostingId: string;
|
|
2173
|
+
data: DbMultipleUserDatabaseBody;
|
|
2174
|
+
}, TContext>;
|
|
2175
|
+
export declare type DbMultipleUserDatabaseMutationResult = NonNullable<Awaited<ReturnType<typeof dbMultipleUserDatabase>>>;
|
|
2176
|
+
export declare type DbMultipleUserDatabaseMutationBody = DbMultipleUserDatabaseBody;
|
|
2177
|
+
export declare type DbMultipleUserDatabaseMutationError = AxiosError<unknown>;
|
|
2178
|
+
/**
|
|
2179
|
+
* @summary Delete multiple database users / databases
|
|
2180
|
+
*/
|
|
2181
|
+
export declare const useDbMultipleUserDatabase: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2182
|
+
mutation?: UseMutationOptions<AxiosResponse<DbMultipleUserDatabase200, any>, TError, {
|
|
2183
|
+
hostingId: string;
|
|
2184
|
+
data: DbMultipleUserDatabaseBody;
|
|
2185
|
+
}, TContext> | undefined;
|
|
2186
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2187
|
+
} | undefined) => UseMutationResult<AxiosResponse<DbMultipleUserDatabase200, any>, TError, {
|
|
2188
|
+
hostingId: string;
|
|
2189
|
+
data: DbMultipleUserDatabaseBody;
|
|
2190
|
+
}, TContext>;
|
|
2160
2191
|
/**
|
|
2161
2192
|
* Allow user to secure specific folders
|
|
2162
2193
|
* @summary Allow users to secure specific folders on their websites
|
|
@@ -2313,6 +2344,38 @@ export declare const usePrivacyUser: <TError = AxiosError<unknown, any>, TContex
|
|
|
2313
2344
|
hostingId: string;
|
|
2314
2345
|
data: PrivacyUserBody;
|
|
2315
2346
|
}, TContext>;
|
|
2347
|
+
/**
|
|
2348
|
+
* domain availability
|
|
2349
|
+
* @summary Domain availability
|
|
2350
|
+
*/
|
|
2351
|
+
export declare const hostingDomainAvailability: (hostingId: string, params: HostingDomainAvailabilityParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingDomainAvailability200>>;
|
|
2352
|
+
export declare const getHostingDomainAvailabilityQueryKey: (hostingId: string, params: HostingDomainAvailabilityParams) => readonly [`/v1/hosting/${string}/domain/availability`, ...HostingDomainAvailabilityParams[]];
|
|
2353
|
+
export declare const getHostingDomainAvailabilityQueryOptions: <TData = AxiosResponse<HostingDomainAvailability200, any>, TError = AxiosError<unknown, any>>(hostingId: string, params: HostingDomainAvailabilityParams, options?: {
|
|
2354
|
+
query?: Partial<UseQueryOptions<AxiosResponse<HostingDomainAvailability200, any>, TError, TData, QueryKey>> | undefined;
|
|
2355
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2356
|
+
} | undefined) => UseQueryOptions<AxiosResponse<HostingDomainAvailability200, any>, TError, TData, QueryKey> & {
|
|
2357
|
+
queryKey: QueryKey;
|
|
2358
|
+
};
|
|
2359
|
+
export declare type HostingDomainAvailabilityQueryResult = NonNullable<Awaited<ReturnType<typeof hostingDomainAvailability>>>;
|
|
2360
|
+
export declare type HostingDomainAvailabilityQueryError = AxiosError<unknown>;
|
|
2361
|
+
export declare function useHostingDomainAvailability<TData = Awaited<ReturnType<typeof hostingDomainAvailability>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingDomainAvailabilityParams, options: {
|
|
2362
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>, 'initialData'>;
|
|
2363
|
+
axios?: AxiosRequestConfig;
|
|
2364
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
2365
|
+
queryKey: QueryKey;
|
|
2366
|
+
};
|
|
2367
|
+
export declare function useHostingDomainAvailability<TData = Awaited<ReturnType<typeof hostingDomainAvailability>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingDomainAvailabilityParams, options?: {
|
|
2368
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>, 'initialData'>;
|
|
2369
|
+
axios?: AxiosRequestConfig;
|
|
2370
|
+
}): UseQueryResult<TData, TError> & {
|
|
2371
|
+
queryKey: QueryKey;
|
|
2372
|
+
};
|
|
2373
|
+
export declare function useHostingDomainAvailability<TData = Awaited<ReturnType<typeof hostingDomainAvailability>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingDomainAvailabilityParams, options?: {
|
|
2374
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingDomainAvailability>>, TError, TData>>;
|
|
2375
|
+
axios?: AxiosRequestConfig;
|
|
2376
|
+
}): UseQueryResult<TData, TError> & {
|
|
2377
|
+
queryKey: QueryKey;
|
|
2378
|
+
};
|
|
2316
2379
|
/**
|
|
2317
2380
|
* Returns a list of domains
|
|
2318
2381
|
* @summary domain list
|
|
@@ -2410,6 +2473,7 @@ export declare function useHostingEcommerceInfo<TData = Awaited<ReturnType<typeo
|
|
|
2410
2473
|
};
|
|
2411
2474
|
/**
|
|
2412
2475
|
* List files under the given directory
|
|
2476
|
+
* @deprecated
|
|
2413
2477
|
* @summary List files
|
|
2414
2478
|
*/
|
|
2415
2479
|
export declare const listFiles: (hostingId: string, params: ListFilesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<ListFiles200>>;
|
|
@@ -3542,6 +3606,38 @@ export declare function useSso<TData = Awaited<ReturnType<typeof sso>>, TError =
|
|
|
3542
3606
|
}): UseQueryResult<TData, TError> & {
|
|
3543
3607
|
queryKey: QueryKey;
|
|
3544
3608
|
};
|
|
3609
|
+
/**
|
|
3610
|
+
* Returns site x axis for graphical representation
|
|
3611
|
+
* @summary domain visitors
|
|
3612
|
+
*/
|
|
3613
|
+
export declare const hostingVisitors: (hostingId: string, params: HostingVisitorsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<HostingVisitors200>>;
|
|
3614
|
+
export declare const getHostingVisitorsQueryKey: (hostingId: string, params: HostingVisitorsParams) => readonly [`/v1/hosting/${string}/visitors`, ...HostingVisitorsParams[]];
|
|
3615
|
+
export declare const getHostingVisitorsQueryOptions: <TData = AxiosResponse<HostingVisitors200, any>, TError = AxiosError<unknown, any>>(hostingId: string, params: HostingVisitorsParams, options?: {
|
|
3616
|
+
query?: Partial<UseQueryOptions<AxiosResponse<HostingVisitors200, any>, TError, TData, QueryKey>> | undefined;
|
|
3617
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
3618
|
+
} | undefined) => UseQueryOptions<AxiosResponse<HostingVisitors200, any>, TError, TData, QueryKey> & {
|
|
3619
|
+
queryKey: QueryKey;
|
|
3620
|
+
};
|
|
3621
|
+
export declare type HostingVisitorsQueryResult = NonNullable<Awaited<ReturnType<typeof hostingVisitors>>>;
|
|
3622
|
+
export declare type HostingVisitorsQueryError = AxiosError<unknown>;
|
|
3623
|
+
export declare function useHostingVisitors<TData = Awaited<ReturnType<typeof hostingVisitors>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingVisitorsParams, options: {
|
|
3624
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>, 'initialData'>;
|
|
3625
|
+
axios?: AxiosRequestConfig;
|
|
3626
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
3627
|
+
queryKey: QueryKey;
|
|
3628
|
+
};
|
|
3629
|
+
export declare function useHostingVisitors<TData = Awaited<ReturnType<typeof hostingVisitors>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingVisitorsParams, options?: {
|
|
3630
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>, 'initialData'>;
|
|
3631
|
+
axios?: AxiosRequestConfig;
|
|
3632
|
+
}): UseQueryResult<TData, TError> & {
|
|
3633
|
+
queryKey: QueryKey;
|
|
3634
|
+
};
|
|
3635
|
+
export declare function useHostingVisitors<TData = Awaited<ReturnType<typeof hostingVisitors>>, TError = AxiosError<unknown>>(hostingId: string, params: HostingVisitorsParams, options?: {
|
|
3636
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof hostingVisitors>>, TError, TData>>;
|
|
3637
|
+
axios?: AxiosRequestConfig;
|
|
3638
|
+
}): UseQueryResult<TData, TError> & {
|
|
3639
|
+
queryKey: QueryKey;
|
|
3640
|
+
};
|
|
3545
3641
|
/**
|
|
3546
3642
|
* Returns site information.
|
|
3547
3643
|
* @summary info
|
|
@@ -3609,16 +3705,19 @@ export declare const useSiteUpdate: <TError = AxiosError<SiteUpdate400, any>, TC
|
|
|
3609
3705
|
* Allows deleting a site
|
|
3610
3706
|
* @summary site delete
|
|
3611
3707
|
*/
|
|
3612
|
-
export declare const site: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<Site200>>;
|
|
3708
|
+
export declare const site: (siteId: number, siteBody: SiteBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<Site200>>;
|
|
3613
3709
|
export declare const getSiteMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
3614
3710
|
mutation?: UseMutationOptions<AxiosResponse<Site200, any>, TError, {
|
|
3615
3711
|
siteId: number;
|
|
3712
|
+
data: SiteBody;
|
|
3616
3713
|
}, TContext> | undefined;
|
|
3617
3714
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
3618
3715
|
} | undefined) => UseMutationOptions<AxiosResponse<Site200, any>, TError, {
|
|
3619
3716
|
siteId: number;
|
|
3717
|
+
data: SiteBody;
|
|
3620
3718
|
}, TContext>;
|
|
3621
3719
|
export declare type SiteMutationResult = NonNullable<Awaited<ReturnType<typeof site>>>;
|
|
3720
|
+
export declare type SiteMutationBody = SiteBody;
|
|
3622
3721
|
export declare type SiteMutationError = AxiosError<unknown>;
|
|
3623
3722
|
/**
|
|
3624
3723
|
* @summary site delete
|
|
@@ -3626,10 +3725,12 @@ export declare type SiteMutationError = AxiosError<unknown>;
|
|
|
3626
3725
|
export declare const useSite: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
3627
3726
|
mutation?: UseMutationOptions<AxiosResponse<Site200, any>, TError, {
|
|
3628
3727
|
siteId: number;
|
|
3728
|
+
data: SiteBody;
|
|
3629
3729
|
}, TContext> | undefined;
|
|
3630
3730
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
3631
3731
|
} | undefined) => UseMutationResult<AxiosResponse<Site200, any>, TError, {
|
|
3632
3732
|
siteId: number;
|
|
3733
|
+
data: SiteBody;
|
|
3633
3734
|
}, TContext>;
|
|
3634
3735
|
/**
|
|
3635
3736
|
* Returns the autoupdate status of the site's core, themes, and plugins
|
|
@@ -5476,16 +5577,19 @@ export declare function useSitesSso<TData = Awaited<ReturnType<typeof sitesSso>>
|
|
|
5476
5577
|
* Promote a staging site
|
|
5477
5578
|
* @summary Staging site promotion
|
|
5478
5579
|
*/
|
|
5479
|
-
export declare const stagingSitePromote: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<StagingSitePromote200>>;
|
|
5580
|
+
export declare const stagingSitePromote: (siteId: number, stagingSitePromoteBody: StagingSitePromoteBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<StagingSitePromote200>>;
|
|
5480
5581
|
export declare const getStagingSitePromoteMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
5481
5582
|
mutation?: UseMutationOptions<AxiosResponse<StagingSitePromote200, any>, TError, {
|
|
5482
5583
|
siteId: number;
|
|
5584
|
+
data: StagingSitePromoteBody;
|
|
5483
5585
|
}, TContext> | undefined;
|
|
5484
5586
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
5485
5587
|
} | undefined) => UseMutationOptions<AxiosResponse<StagingSitePromote200, any>, TError, {
|
|
5486
5588
|
siteId: number;
|
|
5589
|
+
data: StagingSitePromoteBody;
|
|
5487
5590
|
}, TContext>;
|
|
5488
5591
|
export declare type StagingSitePromoteMutationResult = NonNullable<Awaited<ReturnType<typeof stagingSitePromote>>>;
|
|
5592
|
+
export declare type StagingSitePromoteMutationBody = StagingSitePromoteBody;
|
|
5489
5593
|
export declare type StagingSitePromoteMutationError = AxiosError<unknown>;
|
|
5490
5594
|
/**
|
|
5491
5595
|
* @summary Staging site promotion
|
|
@@ -5493,10 +5597,12 @@ export declare type StagingSitePromoteMutationError = AxiosError<unknown>;
|
|
|
5493
5597
|
export declare const useStagingSitePromote: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
5494
5598
|
mutation?: UseMutationOptions<AxiosResponse<StagingSitePromote200, any>, TError, {
|
|
5495
5599
|
siteId: number;
|
|
5600
|
+
data: StagingSitePromoteBody;
|
|
5496
5601
|
}, TContext> | undefined;
|
|
5497
5602
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
5498
5603
|
} | undefined) => UseMutationResult<AxiosResponse<StagingSitePromote200, any>, TError, {
|
|
5499
5604
|
siteId: number;
|
|
5605
|
+
data: StagingSitePromoteBody;
|
|
5500
5606
|
}, TContext>;
|
|
5501
5607
|
/**
|
|
5502
5608
|
* @summary site status
|
|
@@ -5657,6 +5763,38 @@ export declare function useDbListV2<TData = Awaited<ReturnType<typeof dbListV2>>
|
|
|
5657
5763
|
}): UseQueryResult<TData, TError> & {
|
|
5658
5764
|
queryKey: QueryKey;
|
|
5659
5765
|
};
|
|
5766
|
+
/**
|
|
5767
|
+
* List files under the given directory
|
|
5768
|
+
* @summary List files
|
|
5769
|
+
*/
|
|
5770
|
+
export declare const listFilesV2: (hostingId: string, params: ListFilesV2Params, options?: AxiosRequestConfig) => Promise<AxiosResponse<ListFilesV2200>>;
|
|
5771
|
+
export declare const getListFilesV2QueryKey: (hostingId: string, params: ListFilesV2Params) => readonly [`/v2/hosting/${string}/files`, ...ListFilesV2Params[]];
|
|
5772
|
+
export declare const getListFilesV2QueryOptions: <TData = AxiosResponse<ListFilesV2200, any>, TError = AxiosError<unknown, any>>(hostingId: string, params: ListFilesV2Params, options?: {
|
|
5773
|
+
query?: Partial<UseQueryOptions<AxiosResponse<ListFilesV2200, any>, TError, TData, QueryKey>> | undefined;
|
|
5774
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
5775
|
+
} | undefined) => UseQueryOptions<AxiosResponse<ListFilesV2200, any>, TError, TData, QueryKey> & {
|
|
5776
|
+
queryKey: QueryKey;
|
|
5777
|
+
};
|
|
5778
|
+
export declare type ListFilesV2QueryResult = NonNullable<Awaited<ReturnType<typeof listFilesV2>>>;
|
|
5779
|
+
export declare type ListFilesV2QueryError = AxiosError<unknown>;
|
|
5780
|
+
export declare function useListFilesV2<TData = Awaited<ReturnType<typeof listFilesV2>>, TError = AxiosError<unknown>>(hostingId: string, params: ListFilesV2Params, options: {
|
|
5781
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>, 'initialData'>;
|
|
5782
|
+
axios?: AxiosRequestConfig;
|
|
5783
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
5784
|
+
queryKey: QueryKey;
|
|
5785
|
+
};
|
|
5786
|
+
export declare function useListFilesV2<TData = Awaited<ReturnType<typeof listFilesV2>>, TError = AxiosError<unknown>>(hostingId: string, params: ListFilesV2Params, options?: {
|
|
5787
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>, 'initialData'>;
|
|
5788
|
+
axios?: AxiosRequestConfig;
|
|
5789
|
+
}): UseQueryResult<TData, TError> & {
|
|
5790
|
+
queryKey: QueryKey;
|
|
5791
|
+
};
|
|
5792
|
+
export declare function useListFilesV2<TData = Awaited<ReturnType<typeof listFilesV2>>, TError = AxiosError<unknown>>(hostingId: string, params: ListFilesV2Params, options?: {
|
|
5793
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFilesV2>>, TError, TData>>;
|
|
5794
|
+
axios?: AxiosRequestConfig;
|
|
5795
|
+
}): UseQueryResult<TData, TError> & {
|
|
5796
|
+
queryKey: QueryKey;
|
|
5797
|
+
};
|
|
5660
5798
|
/**
|
|
5661
5799
|
* Returns the hosting server nameservers information
|
|
5662
5800
|
* @summary hosting server nameservers info
|
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.1169.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -1669,6 +1669,28 @@ export const useDbUserRename = (options) => {
|
|
|
1669
1669
|
const mutationOptions = getDbUserRenameMutationOptions(options);
|
|
1670
1670
|
return useMutation(mutationOptions);
|
|
1671
1671
|
};
|
|
1672
|
+
/**
|
|
1673
|
+
* Delete multiple database users / databases
|
|
1674
|
+
* @summary Delete multiple database users / databases
|
|
1675
|
+
*/
|
|
1676
|
+
export const dbMultipleUserDatabase = (hostingId, dbMultipleUserDatabaseBody, options) => {
|
|
1677
|
+
return axios.delete(`/v1/hosting/${hostingId}/db/users/bulk`, Object.assign({ data: dbMultipleUserDatabaseBody }, options));
|
|
1678
|
+
};
|
|
1679
|
+
export const getDbMultipleUserDatabaseMutationOptions = (options) => {
|
|
1680
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1681
|
+
const mutationFn = (props) => {
|
|
1682
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1683
|
+
return dbMultipleUserDatabase(hostingId, data, axiosOptions);
|
|
1684
|
+
};
|
|
1685
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
1686
|
+
};
|
|
1687
|
+
/**
|
|
1688
|
+
* @summary Delete multiple database users / databases
|
|
1689
|
+
*/
|
|
1690
|
+
export const useDbMultipleUserDatabase = (options) => {
|
|
1691
|
+
const mutationOptions = getDbMultipleUserDatabaseMutationOptions(options);
|
|
1692
|
+
return useMutation(mutationOptions);
|
|
1693
|
+
};
|
|
1672
1694
|
/**
|
|
1673
1695
|
* Allow user to secure specific folders
|
|
1674
1696
|
* @summary Allow users to secure specific folders on their websites
|
|
@@ -1783,6 +1805,32 @@ export const usePrivacyUser = (options) => {
|
|
|
1783
1805
|
const mutationOptions = getPrivacyUserMutationOptions(options);
|
|
1784
1806
|
return useMutation(mutationOptions);
|
|
1785
1807
|
};
|
|
1808
|
+
/**
|
|
1809
|
+
* domain availability
|
|
1810
|
+
* @summary Domain availability
|
|
1811
|
+
*/
|
|
1812
|
+
export const hostingDomainAvailability = (hostingId, params, options) => {
|
|
1813
|
+
return axios.get(`/v1/hosting/${hostingId}/domain/availability`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
1814
|
+
};
|
|
1815
|
+
export const getHostingDomainAvailabilityQueryKey = (hostingId, params) => {
|
|
1816
|
+
return [`/v1/hosting/${hostingId}/domain/availability`, ...(params ? [params] : [])];
|
|
1817
|
+
};
|
|
1818
|
+
export const getHostingDomainAvailabilityQueryOptions = (hostingId, params, options) => {
|
|
1819
|
+
var _a;
|
|
1820
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1821
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingDomainAvailabilityQueryKey(hostingId, params);
|
|
1822
|
+
const queryFn = ({ signal }) => hostingDomainAvailability(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
1823
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
1824
|
+
};
|
|
1825
|
+
/**
|
|
1826
|
+
* @summary Domain availability
|
|
1827
|
+
*/
|
|
1828
|
+
export function useHostingDomainAvailability(hostingId, params, options) {
|
|
1829
|
+
const queryOptions = getHostingDomainAvailabilityQueryOptions(hostingId, params, options);
|
|
1830
|
+
const query = useQuery(queryOptions);
|
|
1831
|
+
query.queryKey = queryOptions.queryKey;
|
|
1832
|
+
return query;
|
|
1833
|
+
}
|
|
1786
1834
|
/**
|
|
1787
1835
|
* Returns a list of domains
|
|
1788
1836
|
* @summary domain list
|
|
@@ -1859,6 +1907,7 @@ export function useHostingEcommerceInfo(hostingId, options) {
|
|
|
1859
1907
|
}
|
|
1860
1908
|
/**
|
|
1861
1909
|
* List files under the given directory
|
|
1910
|
+
* @deprecated
|
|
1862
1911
|
* @summary List files
|
|
1863
1912
|
*/
|
|
1864
1913
|
export const listFiles = (hostingId, params, options) => {
|
|
@@ -1875,6 +1924,7 @@ export const getListFilesQueryOptions = (hostingId, params, options) => {
|
|
|
1875
1924
|
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
1876
1925
|
};
|
|
1877
1926
|
/**
|
|
1927
|
+
* @deprecated
|
|
1878
1928
|
* @summary List files
|
|
1879
1929
|
*/
|
|
1880
1930
|
export function useListFiles(hostingId, params, options) {
|
|
@@ -2730,6 +2780,32 @@ export function useSso(hostingId, params, options) {
|
|
|
2730
2780
|
query.queryKey = queryOptions.queryKey;
|
|
2731
2781
|
return query;
|
|
2732
2782
|
}
|
|
2783
|
+
/**
|
|
2784
|
+
* Returns site x axis for graphical representation
|
|
2785
|
+
* @summary domain visitors
|
|
2786
|
+
*/
|
|
2787
|
+
export const hostingVisitors = (hostingId, params, options) => {
|
|
2788
|
+
return axios.get(`/v1/hosting/${hostingId}/visitors`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
2789
|
+
};
|
|
2790
|
+
export const getHostingVisitorsQueryKey = (hostingId, params) => {
|
|
2791
|
+
return [`/v1/hosting/${hostingId}/visitors`, ...(params ? [params] : [])];
|
|
2792
|
+
};
|
|
2793
|
+
export const getHostingVisitorsQueryOptions = (hostingId, params, options) => {
|
|
2794
|
+
var _a;
|
|
2795
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2796
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getHostingVisitorsQueryKey(hostingId, params);
|
|
2797
|
+
const queryFn = ({ signal }) => hostingVisitors(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
2798
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
2799
|
+
};
|
|
2800
|
+
/**
|
|
2801
|
+
* @summary domain visitors
|
|
2802
|
+
*/
|
|
2803
|
+
export function useHostingVisitors(hostingId, params, options) {
|
|
2804
|
+
const queryOptions = getHostingVisitorsQueryOptions(hostingId, params, options);
|
|
2805
|
+
const query = useQuery(queryOptions);
|
|
2806
|
+
query.queryKey = queryOptions.queryKey;
|
|
2807
|
+
return query;
|
|
2808
|
+
}
|
|
2733
2809
|
/**
|
|
2734
2810
|
* Returns site information.
|
|
2735
2811
|
* @summary info
|
|
@@ -2782,14 +2858,14 @@ export const useSiteUpdate = (options) => {
|
|
|
2782
2858
|
* Allows deleting a site
|
|
2783
2859
|
* @summary site delete
|
|
2784
2860
|
*/
|
|
2785
|
-
export const site = (siteId, options) => {
|
|
2786
|
-
return axios.delete(`/v1/sites/${siteId}`, options);
|
|
2861
|
+
export const site = (siteId, siteBody, options) => {
|
|
2862
|
+
return axios.delete(`/v1/sites/${siteId}`, Object.assign({ data: siteBody }, options));
|
|
2787
2863
|
};
|
|
2788
2864
|
export const getSiteMutationOptions = (options) => {
|
|
2789
2865
|
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
2790
2866
|
const mutationFn = (props) => {
|
|
2791
|
-
const { siteId } = props !== null && props !== void 0 ? props : {};
|
|
2792
|
-
return site(siteId, axiosOptions);
|
|
2867
|
+
const { siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
2868
|
+
return site(siteId, data, axiosOptions);
|
|
2793
2869
|
};
|
|
2794
2870
|
return Object.assign({ mutationFn }, mutationOptions);
|
|
2795
2871
|
};
|
|
@@ -4238,14 +4314,14 @@ export function useSitesSso(siteId, params, options) {
|
|
|
4238
4314
|
* Promote a staging site
|
|
4239
4315
|
* @summary Staging site promotion
|
|
4240
4316
|
*/
|
|
4241
|
-
export const stagingSitePromote = (siteId, options) => {
|
|
4242
|
-
return axios.post(`/v1/sites/${siteId}/staging`,
|
|
4317
|
+
export const stagingSitePromote = (siteId, stagingSitePromoteBody, options) => {
|
|
4318
|
+
return axios.post(`/v1/sites/${siteId}/staging`, stagingSitePromoteBody, options);
|
|
4243
4319
|
};
|
|
4244
4320
|
export const getStagingSitePromoteMutationOptions = (options) => {
|
|
4245
4321
|
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4246
4322
|
const mutationFn = (props) => {
|
|
4247
|
-
const { siteId } = props !== null && props !== void 0 ? props : {};
|
|
4248
|
-
return stagingSitePromote(siteId, axiosOptions);
|
|
4323
|
+
const { siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
4324
|
+
return stagingSitePromote(siteId, data, axiosOptions);
|
|
4249
4325
|
};
|
|
4250
4326
|
return Object.assign({ mutationFn }, mutationOptions);
|
|
4251
4327
|
};
|
|
@@ -4385,6 +4461,32 @@ export function useDbListV2(hostingId, options) {
|
|
|
4385
4461
|
query.queryKey = queryOptions.queryKey;
|
|
4386
4462
|
return query;
|
|
4387
4463
|
}
|
|
4464
|
+
/**
|
|
4465
|
+
* List files under the given directory
|
|
4466
|
+
* @summary List files
|
|
4467
|
+
*/
|
|
4468
|
+
export const listFilesV2 = (hostingId, params, options) => {
|
|
4469
|
+
return axios.get(`/v2/hosting/${hostingId}/files`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
4470
|
+
};
|
|
4471
|
+
export const getListFilesV2QueryKey = (hostingId, params) => {
|
|
4472
|
+
return [`/v2/hosting/${hostingId}/files`, ...(params ? [params] : [])];
|
|
4473
|
+
};
|
|
4474
|
+
export const getListFilesV2QueryOptions = (hostingId, params, options) => {
|
|
4475
|
+
var _a;
|
|
4476
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
4477
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getListFilesV2QueryKey(hostingId, params);
|
|
4478
|
+
const queryFn = ({ signal }) => listFilesV2(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
4479
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
4480
|
+
};
|
|
4481
|
+
/**
|
|
4482
|
+
* @summary List files
|
|
4483
|
+
*/
|
|
4484
|
+
export function useListFilesV2(hostingId, params, options) {
|
|
4485
|
+
const queryOptions = getListFilesV2QueryOptions(hostingId, params, options);
|
|
4486
|
+
const query = useQuery(queryOptions);
|
|
4487
|
+
query.queryKey = queryOptions.queryKey;
|
|
4488
|
+
return query;
|
|
4489
|
+
}
|
|
4388
4490
|
/**
|
|
4389
4491
|
* Returns the hosting server nameservers information
|
|
4390
4492
|
* @summary hosting server nameservers info
|
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, AddPrivacy200, 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, DbListV2200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, 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, Privacy200, PrivacyUser200, 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, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
2
|
+
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddPrivacy200, 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, DbListV2200, DbMultipleUserDatabase200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DirectoryPrivacy200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, EditPrivacy200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDbAuthorizedHosts200, HostingDbAuthorizedHostsAdd200, HostingDbAuthorizedHostsDelete200, HostingDbAuthorizedHostsUpdate200, HostingDomainAvailability200, 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, HostingVisitors200, Index200, JetpackBackupStatus200, ListCrons200, ListFiles200, ListFilesV2200, ListIndex200, Privacy200, PrivacyUser200, 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, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyImportV3200, SshKeyList200, SshKeyListV2200, SshKeyListV3200, SshKeyListV4200, SshKeyV2200, Sso200, StagingSitePromote200, 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;
|
|
@@ -69,11 +69,13 @@ export declare const getDbUserAddResponseMock: (overrideResponse?: Partial<DbUse
|
|
|
69
69
|
export declare const getDbUserDeleteResponseMock: (overrideResponse?: Partial<DbUserDelete200>) => DbUserDelete200;
|
|
70
70
|
export declare const getDbUserListResponseMock: (overrideResponse?: Partial<DbUserList200>) => DbUserList200;
|
|
71
71
|
export declare const getDbUserRenameResponseMock: (overrideResponse?: Partial<DbUserRename200>) => DbUserRename200;
|
|
72
|
+
export declare const getDbMultipleUserDatabaseResponseMock: (overrideResponse?: Partial<DbMultipleUserDatabase200>) => DbMultipleUserDatabase200;
|
|
72
73
|
export declare const getDirectoryPrivacyResponseMock: (overrideResponse?: Partial<DirectoryPrivacy200>) => DirectoryPrivacy200;
|
|
73
74
|
export declare const getAddPrivacyResponseMock: (overrideResponse?: Partial<AddPrivacy200>) => AddPrivacy200;
|
|
74
75
|
export declare const getPrivacyResponseMock: (overrideResponse?: Partial<Privacy200>) => Privacy200;
|
|
75
76
|
export declare const getEditPrivacyResponseMock: (overrideResponse?: Partial<EditPrivacy200>) => EditPrivacy200;
|
|
76
77
|
export declare const getPrivacyUserResponseMock: (overrideResponse?: Partial<PrivacyUser200>) => PrivacyUser200;
|
|
78
|
+
export declare const getHostingDomainAvailabilityResponseMock: (overrideResponse?: Partial<HostingDomainAvailability200>) => HostingDomainAvailability200;
|
|
77
79
|
export declare const getDomainsResponseMock: (overrideResponse?: Partial<Domains200>) => Domains200;
|
|
78
80
|
export declare const getHostingDomainsUnassignResponseMock: (overrideResponse?: Partial<HostingDomainsUnassign200>) => HostingDomainsUnassign200;
|
|
79
81
|
export declare const getHostingEcommerceInfoResponseMock: (overrideResponse?: Partial<HostingEcommerceInfo200>) => HostingEcommerceInfo200;
|
|
@@ -113,6 +115,7 @@ export declare const getSshKeyListResponseMock: (overrideResponse?: Partial<SshK
|
|
|
113
115
|
export declare const getSshKeyResponseMock: (overrideResponse?: Partial<SshKey200>) => SshKey200;
|
|
114
116
|
export declare const getSshKeyGenerateResponseMock: (overrideResponse?: Partial<SshKeyGenerate200>) => SshKeyGenerate200;
|
|
115
117
|
export declare const getSsoResponseMock: (overrideResponse?: Partial<Sso200>) => Sso200;
|
|
118
|
+
export declare const getHostingVisitorsResponseMock: (overrideResponse?: Partial<HostingVisitors200>) => HostingVisitors200;
|
|
116
119
|
export declare const getSitesInfoResponseMock: (overrideResponse?: Partial<SitesInfo200>) => SitesInfo200;
|
|
117
120
|
export declare const getSiteUpdateResponseMock: (overrideResponse?: Partial<SiteUpdate200>) => SiteUpdate200;
|
|
118
121
|
export declare const getSiteResponseMock: (overrideResponse?: Partial<Site200>) => Site200;
|
|
@@ -178,6 +181,7 @@ export declare const getSiteUsersResponseMock: (overrideResponse?: Partial<SiteU
|
|
|
178
181
|
export declare const getSitesVersionResponseMock: (overrideResponse?: Partial<SitesVersion200>) => SitesVersion200;
|
|
179
182
|
export declare const getAddonsSitelockSsoV2ResponseMock: (overrideResponse?: Partial<AddonsSitelockSsoV2200>) => AddonsSitelockSsoV2200;
|
|
180
183
|
export declare const getDbListV2ResponseMock: (overrideResponse?: Partial<DbListV2200>) => DbListV2200;
|
|
184
|
+
export declare const getListFilesV2ResponseMock: (overrideResponse?: Partial<ListFilesV2200>) => ListFilesV2200;
|
|
181
185
|
export declare const getHostingNameserversV2ResponseMock: (overrideResponse?: Partial<HostingNameserversV2200>) => HostingNameserversV2200;
|
|
182
186
|
export declare const getHostingRedirectsV2ResponseMock: () => HostingRedirectsV2200Item[];
|
|
183
187
|
export declare const getHostingSitesV2ResponseMock: (overrideResponse?: Partial<HostingSitesV2200>) => HostingSitesV2200;
|
|
@@ -262,11 +266,13 @@ export declare const getDbUserAddMockHandler: (overrideResponse?: DbUserAdd200 |
|
|
|
262
266
|
export declare const getDbUserDeleteMockHandler: (overrideResponse?: DbUserDelete200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<DbUserDelete200> | DbUserDelete200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
263
267
|
export declare const getDbUserListMockHandler: (overrideResponse?: DbUserList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbUserList200> | DbUserList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
264
268
|
export declare const getDbUserRenameMockHandler: (overrideResponse?: DbUserRename200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<DbUserRename200> | DbUserRename200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
269
|
+
export declare const getDbMultipleUserDatabaseMockHandler: (overrideResponse?: DbMultipleUserDatabase200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<DbMultipleUserDatabase200> | DbMultipleUserDatabase200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
265
270
|
export declare const getDirectoryPrivacyMockHandler: (overrideResponse?: DirectoryPrivacy200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DirectoryPrivacy200> | DirectoryPrivacy200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
266
271
|
export declare const getAddPrivacyMockHandler: (overrideResponse?: AddPrivacy200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<AddPrivacy200> | AddPrivacy200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
267
272
|
export declare const getPrivacyMockHandler: (overrideResponse?: Privacy200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<Privacy200> | Privacy200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
268
273
|
export declare const getEditPrivacyMockHandler: (overrideResponse?: EditPrivacy200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<EditPrivacy200> | EditPrivacy200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
269
274
|
export declare const getPrivacyUserMockHandler: (overrideResponse?: PrivacyUser200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<PrivacyUser200> | PrivacyUser200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
275
|
+
export declare const getHostingDomainAvailabilityMockHandler: (overrideResponse?: HostingDomainAvailability200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingDomainAvailability200> | HostingDomainAvailability200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
270
276
|
export declare const getDomainsMockHandler: (overrideResponse?: Domains200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<Domains200> | Domains200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
271
277
|
export declare const getHostingDomainsUnassignMockHandler: (overrideResponse?: HostingDomainsUnassign200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingDomainsUnassign200> | HostingDomainsUnassign200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
272
278
|
export declare const getHostingEcommerceInfoMockHandler: (overrideResponse?: HostingEcommerceInfo200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingEcommerceInfo200> | HostingEcommerceInfo200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
@@ -306,6 +312,7 @@ export declare const getSshKeyListMockHandler: (overrideResponse?: SshKeyList200
|
|
|
306
312
|
export declare const getSshKeyMockHandler: (overrideResponse?: SshKey200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<SshKey200> | SshKey200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
307
313
|
export declare const getSshKeyGenerateMockHandler: (overrideResponse?: SshKeyGenerate200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<SshKeyGenerate200> | SshKeyGenerate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
308
314
|
export declare const getSsoMockHandler: (overrideResponse?: Sso200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<Sso200> | Sso200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
315
|
+
export declare const getHostingVisitorsMockHandler: (overrideResponse?: HostingVisitors200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingVisitors200> | HostingVisitors200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
309
316
|
export declare const getSitesInfoMockHandler: (overrideResponse?: SitesInfo200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SitesInfo200> | SitesInfo200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
310
317
|
export declare const getSiteUpdateMockHandler: (overrideResponse?: SiteUpdate200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<SiteUpdate200> | SiteUpdate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
311
318
|
export declare const getSiteMockHandler: (overrideResponse?: Site200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<Site200> | Site200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
@@ -373,6 +380,7 @@ export declare const getSiteUsersMockHandler: (overrideResponse?: SiteUsers200 |
|
|
|
373
380
|
export declare const getSitesVersionMockHandler: (overrideResponse?: SitesVersion200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<SitesVersion200> | SitesVersion200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
374
381
|
export declare const getAddonsSitelockSsoV2MockHandler: (overrideResponse?: AddonsSitelockSsoV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<AddonsSitelockSsoV2200> | AddonsSitelockSsoV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
375
382
|
export declare const getDbListV2MockHandler: (overrideResponse?: DbListV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<DbListV2200> | DbListV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
383
|
+
export declare const getListFilesV2MockHandler: (overrideResponse?: ListFilesV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ListFilesV2200> | ListFilesV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
376
384
|
export declare const getHostingNameserversV2MockHandler: (overrideResponse?: HostingNameserversV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingNameserversV2200> | HostingNameserversV2200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
377
385
|
export declare const getHostingRedirectsV2MockHandler: (overrideResponse?: HostingRedirectsV2200Item[] | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingRedirectsV2200Item[]> | HostingRedirectsV2200Item[]) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
378
386
|
export declare const getHostingSitesV2MockHandler: (overrideResponse?: HostingSitesV2200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingSitesV2200> | HostingSitesV2200) | 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.1169.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -79,11 +79,13 @@ export const getDbUserAddResponseMock = (overrideResponse = {}) => (Object.assig
|
|
|
79
79
|
export const getDbUserDeleteResponseMock = (overrideResponse = {}) => (Object.assign({ dbuser: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
80
80
|
export const getDbUserListResponseMock = (overrideResponse = {}) => (Object.assign({ users: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ dblist: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), shortuser: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
81
81
|
export const getDbUserRenameResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
82
|
+
export const getDbMultipleUserDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
82
83
|
export const getDirectoryPrivacyResponseMock = (overrideResponse = {}) => (Object.assign({ directory: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ directory_path: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), directory_users: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) })), undefined]) }, overrideResponse));
|
|
83
84
|
export const getAddPrivacyResponseMock = (overrideResponse = {}) => (Object.assign({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
84
85
|
export const getPrivacyResponseMock = (overrideResponse = {}) => (Object.assign({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
85
86
|
export const getEditPrivacyResponseMock = (overrideResponse = {}) => (Object.assign({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
86
87
|
export const getPrivacyUserResponseMock = (overrideResponse = {}) => (Object.assign({ status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
88
|
+
export const getHostingDomainAvailabilityResponseMock = (overrideResponse = {}) => (Object.assign({ domains: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ assignable: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), assigned: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), registered: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) })), undefined]) }, overrideResponse));
|
|
87
89
|
export const getDomainsResponseMock = (overrideResponse = {}) => (Object.assign({ domains: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ date_ssl_exp: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), docroot: faker.word.sample(), domain: faker.word.sample(), id: faker.number.int({ min: undefined, max: undefined }), ssl_issuer: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), ssl_status: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.word.sample() })) }, overrideResponse));
|
|
88
90
|
export const getHostingDomainsUnassignResponseMock = (overrideResponse = {}) => (Object.assign({ queued: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
89
91
|
export const getHostingEcommerceInfoResponseMock = (overrideResponse = {}) => (Object.assign({ addon_id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), back_ref: faker.helpers.arrayElement([faker.word.sample(), undefined]), level: faker.helpers.arrayElement([faker.word.sample(), undefined]), name: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), subtype: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
@@ -123,6 +125,7 @@ export const getSshKeyListResponseMock = (overrideResponse = {}) => (Object.assi
|
|
|
123
125
|
export const getSshKeyResponseMock = (overrideResponse = {}) => (Object.assign({ deleted: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), key_name: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
124
126
|
export const getSshKeyGenerateResponseMock = (overrideResponse = {}) => (Object.assign({ key_name: faker.helpers.arrayElement([faker.word.sample(), undefined]), private_key_path: faker.helpers.arrayElement([faker.word.sample(), undefined]), public_key_path: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
125
127
|
export const getSsoResponseMock = (overrideResponse = {}) => (Object.assign({ url: faker.word.sample() }, overrideResponse));
|
|
128
|
+
export const getHostingVisitorsResponseMock = (overrideResponse = {}) => (Object.assign({ date_end: faker.helpers.arrayElement([`${faker.date.past().toISOString().split('.')[0]}Z`, undefined]), date_start: faker.helpers.arrayElement([`${faker.date.past().toISOString().split('.')[0]}Z`, undefined]), total_bandwidth: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total_hits: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total_visitors: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), unique_visitors: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
126
129
|
export const getSitesInfoResponseMock = (overrideResponse = {}) => (Object.assign({ account_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), account_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), confirmed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), datacenter: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), date_added: faker.helpers.arrayElement([faker.word.sample(), undefined]), date_modified: faker.helpers.arrayElement([faker.word.sample(), undefined]), detected_type: faker.helpers.arrayElement([faker.word.sample(), undefined]), docroot: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), edge_cache: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), handler_404: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), installed_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), is_primary: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), jobs: faker.helpers.arrayElement([{}, undefined]), last_error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), migration_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), onboarding: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), path: faker.helpers.arrayElement([faker.word.sample(), undefined]), pending_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), pending_url_data: faker.helpers.arrayElement([{ base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), is_temp: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), job_failed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), stage: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), wp_session: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, undefined]), php_version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.word.sample(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), staging: faker.helpers.arrayElement([{ parent_site_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), promoted_from: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), promoting_from: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), subtype: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), url_is_provisional: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), version_ptr: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, overrideResponse));
|
|
127
130
|
export const getSiteUpdateResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.datatype.boolean() }, overrideResponse));
|
|
128
131
|
export const getSiteResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.datatype.boolean() }, overrideResponse));
|
|
@@ -208,6 +211,7 @@ export const getSiteUsersResponseMock = (overrideResponse = {}) => (Object.assig
|
|
|
208
211
|
export const getSitesVersionResponseMock = (overrideResponse = {}) => (Object.assign({ current: faker.helpers.arrayElement([faker.word.sample(), undefined]), latest: faker.helpers.arrayElement([faker.word.sample(), undefined]), update: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
209
212
|
export const getAddonsSitelockSsoV2ResponseMock = (overrideResponse = {}) => (Object.assign({ site_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), sitelock_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
210
213
|
export const getDbListV2ResponseMock = (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]), sizemib: 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]) }, overrideResponse));
|
|
214
|
+
export const getListFilesV2ResponseMock = (overrideResponse = {}) => (Object.assign({ files: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), path: faker.helpers.arrayElement([faker.word.sample(), undefined]), size: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
211
215
|
export const getHostingNameserversV2ResponseMock = (overrideResponse = {}) => (Object.assign({ brand: faker.word.sample(), hosts: Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ host: faker.helpers.arrayElement([faker.word.sample(), undefined]), ips: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) })), id: faker.number.int({ min: undefined, max: undefined }), is_default: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
212
216
|
export const getHostingRedirectsV2ResponseMock = () => (Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ docroot: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain: faker.helpers.arrayElement([faker.word.sample(), undefined]), http_status_code: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), redirect_www: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), src: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.word.sample(), undefined]), wildcard: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) })));
|
|
213
217
|
export const getHostingSitesV2ResponseMock = (overrideResponse = {}) => (Object.assign({ available_sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), items: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account_back_ref: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), account_id: faker.helpers.arrayElement([faker.word.sample(), undefined]), base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), confirmed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), datacenter: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), date_added: faker.helpers.arrayElement([faker.word.sample(), undefined]), date_modified: faker.helpers.arrayElement([faker.word.sample(), undefined]), detected_type: faker.helpers.arrayElement([faker.word.sample(), undefined]), docroot: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), edge_cache: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), handler_404: faker.helpers.arrayElement([faker.word.sample(), undefined]), id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), installed_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), is_primary: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), jobs: faker.helpers.arrayElement([{}, undefined]), last_error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), migration_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), onboarding: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), path: faker.helpers.arrayElement([faker.word.sample(), undefined]), pending_url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), pending_url_data: faker.helpers.arrayElement([{ base_domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), domain_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), error: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), is_temp: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), job_failed: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), stage: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), wp_session: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, undefined]), php_version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.word.sample(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), staging: faker.helpers.arrayElement([{ parent_site_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), promoted_from: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), promoting_from: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]), subtype: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), url: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), url_is_provisional: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), version: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), version_ptr: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) })), undefined]), limit: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), max_sites: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), page: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), pages: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), total: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), used_sites: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
@@ -913,6 +917,16 @@ export const getDbUserRenameMockHandler = (overrideResponse) => {
|
|
|
913
917
|
});
|
|
914
918
|
}));
|
|
915
919
|
};
|
|
920
|
+
export const getDbMultipleUserDatabaseMockHandler = (overrideResponse) => {
|
|
921
|
+
return http.delete('*/v1/hosting/:hostingId/db/users/bulk', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
922
|
+
yield delay(1000);
|
|
923
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
924
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
925
|
+
: getDbMultipleUserDatabaseResponseMock()), { status: 200,
|
|
926
|
+
headers: { 'Content-Type': 'application/json' }
|
|
927
|
+
});
|
|
928
|
+
}));
|
|
929
|
+
};
|
|
916
930
|
export const getDirectoryPrivacyMockHandler = (overrideResponse) => {
|
|
917
931
|
return http.get('*/v1/hosting/:hostingId/directoryprivacy', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
918
932
|
yield delay(1000);
|
|
@@ -963,6 +977,16 @@ export const getPrivacyUserMockHandler = (overrideResponse) => {
|
|
|
963
977
|
});
|
|
964
978
|
}));
|
|
965
979
|
};
|
|
980
|
+
export const getHostingDomainAvailabilityMockHandler = (overrideResponse) => {
|
|
981
|
+
return http.get('*/v1/hosting/:hostingId/domain/availability', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
982
|
+
yield delay(1000);
|
|
983
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
984
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
985
|
+
: getHostingDomainAvailabilityResponseMock()), { status: 200,
|
|
986
|
+
headers: { 'Content-Type': 'application/json' }
|
|
987
|
+
});
|
|
988
|
+
}));
|
|
989
|
+
};
|
|
966
990
|
export const getDomainsMockHandler = (overrideResponse) => {
|
|
967
991
|
return http.get('*/v1/hosting/:hostingId/domains', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
968
992
|
yield delay(1000);
|
|
@@ -1353,6 +1377,16 @@ export const getSsoMockHandler = (overrideResponse) => {
|
|
|
1353
1377
|
});
|
|
1354
1378
|
}));
|
|
1355
1379
|
};
|
|
1380
|
+
export const getHostingVisitorsMockHandler = (overrideResponse) => {
|
|
1381
|
+
return http.get('*/v1/hosting/:hostingId/visitors', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1382
|
+
yield delay(1000);
|
|
1383
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
1384
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
1385
|
+
: getHostingVisitorsResponseMock()), { status: 200,
|
|
1386
|
+
headers: { 'Content-Type': 'application/json' }
|
|
1387
|
+
});
|
|
1388
|
+
}));
|
|
1389
|
+
};
|
|
1356
1390
|
export const getSitesInfoMockHandler = (overrideResponse) => {
|
|
1357
1391
|
return http.get('*/v1/sites/:siteId', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1358
1392
|
yield delay(1000);
|
|
@@ -2023,6 +2057,16 @@ export const getDbListV2MockHandler = (overrideResponse) => {
|
|
|
2023
2057
|
});
|
|
2024
2058
|
}));
|
|
2025
2059
|
};
|
|
2060
|
+
export const getListFilesV2MockHandler = (overrideResponse) => {
|
|
2061
|
+
return http.get('*/v2/hosting/:hostingId/files', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2062
|
+
yield delay(1000);
|
|
2063
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
2064
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
2065
|
+
: getListFilesV2ResponseMock()), { status: 200,
|
|
2066
|
+
headers: { 'Content-Type': 'application/json' }
|
|
2067
|
+
});
|
|
2068
|
+
}));
|
|
2069
|
+
};
|
|
2026
2070
|
export const getHostingNameserversV2MockHandler = (overrideResponse) => {
|
|
2027
2071
|
return http.get('*/v2/hosting/:hostingId/nameservers', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2028
2072
|
yield delay(1000);
|
|
@@ -2243,11 +2287,13 @@ export const getHostingUAPIMock = () => [
|
|
|
2243
2287
|
getDbUserDeleteMockHandler(),
|
|
2244
2288
|
getDbUserListMockHandler(),
|
|
2245
2289
|
getDbUserRenameMockHandler(),
|
|
2290
|
+
getDbMultipleUserDatabaseMockHandler(),
|
|
2246
2291
|
getDirectoryPrivacyMockHandler(),
|
|
2247
2292
|
getAddPrivacyMockHandler(),
|
|
2248
2293
|
getPrivacyMockHandler(),
|
|
2249
2294
|
getEditPrivacyMockHandler(),
|
|
2250
2295
|
getPrivacyUserMockHandler(),
|
|
2296
|
+
getHostingDomainAvailabilityMockHandler(),
|
|
2251
2297
|
getDomainsMockHandler(),
|
|
2252
2298
|
getHostingDomainsUnassignMockHandler(),
|
|
2253
2299
|
getHostingEcommerceInfoMockHandler(),
|
|
@@ -2287,6 +2333,7 @@ export const getHostingUAPIMock = () => [
|
|
|
2287
2333
|
getSshKeyMockHandler(),
|
|
2288
2334
|
getSshKeyGenerateMockHandler(),
|
|
2289
2335
|
getSsoMockHandler(),
|
|
2336
|
+
getHostingVisitorsMockHandler(),
|
|
2290
2337
|
getSitesInfoMockHandler(),
|
|
2291
2338
|
getSiteUpdateMockHandler(),
|
|
2292
2339
|
getSiteMockHandler(),
|
|
@@ -2354,6 +2401,7 @@ export const getHostingUAPIMock = () => [
|
|
|
2354
2401
|
getSitesVersionMockHandler(),
|
|
2355
2402
|
getAddonsSitelockSsoV2MockHandler(),
|
|
2356
2403
|
getDbListV2MockHandler(),
|
|
2404
|
+
getListFilesV2MockHandler(),
|
|
2357
2405
|
getHostingNameserversV2MockHandler(),
|
|
2358
2406
|
getHostingRedirectsV2MockHandler(),
|
|
2359
2407
|
getHostingSitesV2MockHandler(),
|
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.1169.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SshKeyListV4200RowsItem = {
|
|
9
9
|
authorize?: boolean;
|
|
@@ -604,6 +604,19 @@ export declare type HostingNameserversV2200 = {
|
|
|
604
604
|
id: number;
|
|
605
605
|
is_default?: string;
|
|
606
606
|
};
|
|
607
|
+
export declare type ListFilesV2200FilesItem = {
|
|
608
|
+
file?: string;
|
|
609
|
+
path?: string;
|
|
610
|
+
size?: number;
|
|
611
|
+
type?: string;
|
|
612
|
+
};
|
|
613
|
+
export declare type ListFilesV2200 = {
|
|
614
|
+
files?: ListFilesV2200FilesItem[];
|
|
615
|
+
};
|
|
616
|
+
export declare type ListFilesV2Params = {
|
|
617
|
+
dir: string;
|
|
618
|
+
showdotfiles?: boolean;
|
|
619
|
+
};
|
|
607
620
|
export declare type DbListV2200DatabasesItemUserlistItem = {
|
|
608
621
|
db?: string;
|
|
609
622
|
user?: string;
|
|
@@ -663,6 +676,10 @@ export declare type StagingSitePromote200 = {
|
|
|
663
676
|
/** @nullable */
|
|
664
677
|
job_id?: number | null;
|
|
665
678
|
};
|
|
679
|
+
export declare type StagingSitePromoteBody = {
|
|
680
|
+
/** Will only run site promote validation checks in hal if passed as true */
|
|
681
|
+
validate_only?: boolean;
|
|
682
|
+
};
|
|
666
683
|
export declare type SitesSso200OtherItem = {
|
|
667
684
|
added?: string;
|
|
668
685
|
addon_id?: number;
|
|
@@ -987,22 +1004,6 @@ export declare type SitesPerformanceCachepurgeBody = {
|
|
|
987
1004
|
export declare type SitePendingDomainDelete200 = {
|
|
988
1005
|
[key: string]: unknown;
|
|
989
1006
|
};
|
|
990
|
-
export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItem = {
|
|
991
|
-
dimension?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension;
|
|
992
|
-
timestamp?: number;
|
|
993
|
-
};
|
|
994
|
-
export declare type SitesMetricDimensions200Dimensions = {
|
|
995
|
-
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
996
|
-
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
997
|
-
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
998
|
-
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
999
|
-
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
1000
|
-
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
1001
|
-
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
1002
|
-
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
1003
|
-
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
1004
|
-
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
1005
|
-
};
|
|
1006
1007
|
export declare type SitesMetricDimensions200 = {
|
|
1007
1008
|
date_end?: string;
|
|
1008
1009
|
date_start?: string;
|
|
@@ -1013,6 +1014,10 @@ export declare type SitesMetricDimensions200 = {
|
|
|
1013
1014
|
export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension = {
|
|
1014
1015
|
[key: string]: number;
|
|
1015
1016
|
};
|
|
1017
|
+
export declare type SitesMetricDimensions200DimensionsWpAdminAjaxActionItem = {
|
|
1018
|
+
dimension?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItemDimension;
|
|
1019
|
+
timestamp?: number;
|
|
1020
|
+
};
|
|
1016
1021
|
export declare type SitesMetricDimensions200DimensionsVisitorIsCrawlerItemDimension = {
|
|
1017
1022
|
[key: string]: number;
|
|
1018
1023
|
};
|
|
@@ -1055,6 +1060,18 @@ export declare type SitesMetricDimensions200DimensionsHttpVersionItem = {
|
|
|
1055
1060
|
dimension?: SitesMetricDimensions200DimensionsHttpVersionItemDimension;
|
|
1056
1061
|
timestamp?: number;
|
|
1057
1062
|
};
|
|
1063
|
+
export declare type SitesMetricDimensions200Dimensions = {
|
|
1064
|
+
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
1065
|
+
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
1066
|
+
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
1067
|
+
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
1068
|
+
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
1069
|
+
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
1070
|
+
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
1071
|
+
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
1072
|
+
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
1073
|
+
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
1074
|
+
};
|
|
1058
1075
|
export declare type SitesMetricDimensions200DimensionsHttpVerbItemDimension = {
|
|
1059
1076
|
[key: string]: number;
|
|
1060
1077
|
};
|
|
@@ -1439,6 +1456,10 @@ export declare type SitesAutoupdatesUpdateBody = {
|
|
|
1439
1456
|
export declare type Site200 = {
|
|
1440
1457
|
success: boolean;
|
|
1441
1458
|
};
|
|
1459
|
+
export declare type SiteBody = {
|
|
1460
|
+
/** Will only run site delete validation checks in hal if passed as true */
|
|
1461
|
+
validate_only?: boolean;
|
|
1462
|
+
};
|
|
1442
1463
|
export declare type SiteUpdate400 = {
|
|
1443
1464
|
error?: string;
|
|
1444
1465
|
};
|
|
@@ -1623,6 +1644,32 @@ export declare type SitesInfo200 = {
|
|
|
1623
1644
|
*/
|
|
1624
1645
|
version_ptr?: string | null;
|
|
1625
1646
|
};
|
|
1647
|
+
export declare type HostingVisitors200 = {
|
|
1648
|
+
date_end?: string;
|
|
1649
|
+
date_start?: string;
|
|
1650
|
+
total_bandwidth?: number;
|
|
1651
|
+
total_hits?: number;
|
|
1652
|
+
total_visitors?: number;
|
|
1653
|
+
unique_visitors?: number;
|
|
1654
|
+
};
|
|
1655
|
+
export declare type HostingVisitorsSource = typeof HostingVisitorsSource[keyof typeof HostingVisitorsSource];
|
|
1656
|
+
export declare const HostingVisitorsSource: {
|
|
1657
|
+
readonly http: "http";
|
|
1658
|
+
readonly https: "https";
|
|
1659
|
+
readonly combined: "combined";
|
|
1660
|
+
};
|
|
1661
|
+
export declare type HostingVisitorsInterval = typeof HostingVisitorsInterval[keyof typeof HostingVisitorsInterval];
|
|
1662
|
+
export declare const HostingVisitorsInterval: {
|
|
1663
|
+
readonly NUMBER_1: 1;
|
|
1664
|
+
readonly NUMBER_24: 24;
|
|
1665
|
+
};
|
|
1666
|
+
export declare type HostingVisitorsParams = {
|
|
1667
|
+
interval?: HostingVisitorsInterval;
|
|
1668
|
+
source?: HostingVisitorsSource;
|
|
1669
|
+
start: string;
|
|
1670
|
+
end: string;
|
|
1671
|
+
domain: string;
|
|
1672
|
+
};
|
|
1626
1673
|
export declare type Sso200 = {
|
|
1627
1674
|
url: string;
|
|
1628
1675
|
};
|
|
@@ -2193,6 +2240,17 @@ export declare const DomainsType: {
|
|
|
2193
2240
|
export declare type DomainsParams = {
|
|
2194
2241
|
type?: DomainsType;
|
|
2195
2242
|
};
|
|
2243
|
+
export declare type HostingDomainAvailability200DomainsItem = {
|
|
2244
|
+
assignable?: boolean;
|
|
2245
|
+
assigned?: boolean;
|
|
2246
|
+
registered?: boolean;
|
|
2247
|
+
};
|
|
2248
|
+
export declare type HostingDomainAvailability200 = {
|
|
2249
|
+
domains?: HostingDomainAvailability200DomainsItem[];
|
|
2250
|
+
};
|
|
2251
|
+
export declare type HostingDomainAvailabilityParams = {
|
|
2252
|
+
domain: string;
|
|
2253
|
+
};
|
|
2196
2254
|
export declare type PrivacyUser200 = {
|
|
2197
2255
|
/** Success/failure status */
|
|
2198
2256
|
status?: number;
|
|
@@ -2292,6 +2350,15 @@ export declare type DirectoryPrivacy200 = {
|
|
|
2292
2350
|
export declare type DirectoryPrivacyParams = {
|
|
2293
2351
|
docpath?: string;
|
|
2294
2352
|
};
|
|
2353
|
+
export declare type DbMultipleUserDatabase200 = {
|
|
2354
|
+
[key: string]: unknown;
|
|
2355
|
+
};
|
|
2356
|
+
export declare type DbMultipleUserDatabaseBody = {
|
|
2357
|
+
/** Database names */
|
|
2358
|
+
db: string[];
|
|
2359
|
+
/** Database usernames */
|
|
2360
|
+
dbuser: string[];
|
|
2361
|
+
};
|
|
2295
2362
|
export declare type DbUserRename200 = {
|
|
2296
2363
|
success?: number;
|
|
2297
2364
|
};
|
package/src/index.schemas.js
CHANGED
|
@@ -59,6 +59,17 @@ export const SiteUpdateBodyVersionPtr = {
|
|
|
59
59
|
beta: 'beta',
|
|
60
60
|
};
|
|
61
61
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
62
|
+
export const HostingVisitorsSource = {
|
|
63
|
+
http: 'http',
|
|
64
|
+
https: 'https',
|
|
65
|
+
combined: 'combined',
|
|
66
|
+
};
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
68
|
+
export const HostingVisitorsInterval = {
|
|
69
|
+
NUMBER_1: 1,
|
|
70
|
+
NUMBER_24: 24,
|
|
71
|
+
};
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
62
73
|
export const SsoApp = {
|
|
63
74
|
phpmyadmin: 'phpmyadmin',
|
|
64
75
|
filemanager: 'filemanager',
|