@newfold/huapi-js 2.1076.0 → 2.1084.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 +95 -1
- package/src/index.js +71 -1
- package/src/index.msw.d.ts +7 -1
- package/src/index.msw.js +38 -2
- package/src/index.schemas.d.ts +88 -27
- package/src/index.schemas.js +12 -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, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupStatus200, BackupStatusParams, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronBody, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpBody, HostingFtpList200, HostingFtpUpdate200, HostingFtpUpdateBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingRedirect200, HostingRedirectBody, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingShellToggleBody, HostingSiteAdd200, HostingSiteAddBody, HostingSitesV2200, HostingSitesV2Params, HostingSshInfo200, JetpackBackupStatus200, ListCrons200, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SitesAccessLogs200, SitesAccessLogsDownloadParams, SitesAccessLogsParams, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesBatchBody, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesDomainsV2200, SitesDomainsV2Params, SitesErrorLogs200, SitesErrorLogsDownloadParams, SitesErrorLogsParams, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesListV3Params, SitesMetricDimensions200, SitesMetricDimensionsParams, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockParams, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSecuritySslStatusParams, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SitesVersion200, SshKey200, SshKeyBody, SshKeyFetch200, SshKeyFetchParams, SshKeyGenerate200, SshKeyGenerateBody, SshKeyImport200, SshKeyImportBody, SshKeyImportV2200, SshKeyImportV2Body, SshKeyList200, SshKeyListV2200, Sso200, SsoParams, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
4
|
+
import type { AccountEventList200, AccountEventListParams, AccountHostingList200, AccountPublicKey200, AccountPublicKey404, AccountPublicKeyCreate200, AccountPublicKeyCreate409, AccountPublicKeyCreateBody, AccountPublicKeyDelete200, AccountPublicKeyDelete404, AccountPublicKeyToggle200, AccountPublicKeyToggle409, AccountPublicKeyToggleBody, AccountPublicKeys200, ActivityLog200, AddCron200, AddCron400, AddCronBody, AddHostingRedirects200, AddHostingRedirectsBody, AddIndex200, AddIndexBody, AddSiteIpaddress200, AddSiteIpaddressBody, AddonCloudflare200, AddonCloudflareBody, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSitelockSsoV2Params, AddonsSpamexpertsSso200, BackupInitiate200, BackupInitiateBody, BackupList200, BackupListParams, BackupStatus200, BackupStatusParams, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, CronBody, Db200, DbAdd200, DbAddBody, DbBody, DbCheckDatabase200, DbCheckDatabaseBody, DbList200, DbUsage200, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, DbUserPasswordSet200, DbUserPasswordSetBody, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserPrivsSet200, DbUserPrivsSetBody, DbUserRename200, DbUserRenameBody, DomainCertInstall200, DomainCertInstallBody, DomainCertUninstall200, DomainCertUpdate200, DomainCertUpdateBody, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, DomainsParams, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesBody, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, 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, ResetSite200, ResetSiteBody, Site200, SiteAddonCloudflare200, SiteAddonCloudflare400, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressBody, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePluginUpdateBody, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsParams, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, SiteStatus200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, SiteUsers200, SitesAccessLogs200, SitesAccessLogsDownloadParams, SitesAccessLogsParams, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesBatchBody, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesDomainsV2200, SitesDomainsV2Params, SitesErrorLogs200, SitesErrorLogsDownloadParams, SitesErrorLogsParams, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesListV3Params, SitesMetricDimensions200, SitesMetricDimensionsParams, SitesMetricsDimensionAveraged200, SitesMetricsDimensionAveragedParams, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockParams, SitesSecuritySitelockV2200, SitesSecuritySitelockV2Params, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSecuritySslStatusParams, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SitesVersion200, SshKey200, SshKeyBody, SshKeyFetch200, SshKeyFetchParams, SshKeyGenerate200, SshKeyGenerateBody, SshKeyImport200, SshKeyImportBody, SshKeyImportV2200, SshKeyImportV2Body, SshKeyList200, SshKeyListV2200, Sso200, SsoParams, UpdateCron200, UpdateCronBody, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
5
5
|
declare type AwaitedInput<T> = PromiseLike<T> | T;
|
|
6
6
|
declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
7
7
|
/**
|
|
@@ -2126,6 +2126,38 @@ export declare function useHostingEcommerceInfo<TData = Awaited<ReturnType<typeo
|
|
|
2126
2126
|
}): UseQueryResult<TData, TError> & {
|
|
2127
2127
|
queryKey: QueryKey;
|
|
2128
2128
|
};
|
|
2129
|
+
/**
|
|
2130
|
+
* List files under the given directory
|
|
2131
|
+
* @summary List files
|
|
2132
|
+
*/
|
|
2133
|
+
export declare const listFiles: (hostingId: string, params?: ListFilesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<ListFiles200>>;
|
|
2134
|
+
export declare const getListFilesQueryKey: (hostingId: string, params?: ListFilesParams) => readonly [`/v1/hosting/${string}/files`, ...ListFilesParams[]];
|
|
2135
|
+
export declare const getListFilesQueryOptions: <TData = AxiosResponse<ListFiles200, any>, TError = AxiosError<unknown, any>>(hostingId: string, params?: ListFilesParams, options?: {
|
|
2136
|
+
query?: Partial<UseQueryOptions<AxiosResponse<ListFiles200, any>, TError, TData, QueryKey>> | undefined;
|
|
2137
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2138
|
+
} | undefined) => UseQueryOptions<AxiosResponse<ListFiles200, any>, TError, TData, QueryKey> & {
|
|
2139
|
+
queryKey: QueryKey;
|
|
2140
|
+
};
|
|
2141
|
+
export declare type ListFilesQueryResult = NonNullable<Awaited<ReturnType<typeof listFiles>>>;
|
|
2142
|
+
export declare type ListFilesQueryError = AxiosError<unknown>;
|
|
2143
|
+
export declare function useListFiles<TData = Awaited<ReturnType<typeof listFiles>>, TError = AxiosError<unknown>>(hostingId: string, params: undefined | ListFilesParams, options: {
|
|
2144
|
+
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFiles>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listFiles>>, TError, TData>, 'initialData'>;
|
|
2145
|
+
axios?: AxiosRequestConfig;
|
|
2146
|
+
}): DefinedUseQueryResult<TData, TError> & {
|
|
2147
|
+
queryKey: QueryKey;
|
|
2148
|
+
};
|
|
2149
|
+
export declare function useListFiles<TData = Awaited<ReturnType<typeof listFiles>>, TError = AxiosError<unknown>>(hostingId: string, params?: ListFilesParams, options?: {
|
|
2150
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFiles>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listFiles>>, TError, TData>, 'initialData'>;
|
|
2151
|
+
axios?: AxiosRequestConfig;
|
|
2152
|
+
}): UseQueryResult<TData, TError> & {
|
|
2153
|
+
queryKey: QueryKey;
|
|
2154
|
+
};
|
|
2155
|
+
export declare function useListFiles<TData = Awaited<ReturnType<typeof listFiles>>, TError = AxiosError<unknown>>(hostingId: string, params?: ListFilesParams, options?: {
|
|
2156
|
+
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listFiles>>, TError, TData>>;
|
|
2157
|
+
axios?: AxiosRequestConfig;
|
|
2158
|
+
}): UseQueryResult<TData, TError> & {
|
|
2159
|
+
queryKey: QueryKey;
|
|
2160
|
+
};
|
|
2129
2161
|
/**
|
|
2130
2162
|
* Re-enforces correct ownership on user dirs and files
|
|
2131
2163
|
* @summary Fix file ownership
|
|
@@ -2277,6 +2309,68 @@ export declare const useHostingFtp: <TError = AxiosError<unknown, any>, TContext
|
|
|
2277
2309
|
hostingId: number;
|
|
2278
2310
|
data: HostingFtpBody;
|
|
2279
2311
|
}, TContext>;
|
|
2312
|
+
/**
|
|
2313
|
+
* Add index to given file/folder
|
|
2314
|
+
* @summary Add index to file/folder
|
|
2315
|
+
*/
|
|
2316
|
+
export declare const addIndex: (hostingId: string, addIndexBody: AddIndexBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<AddIndex200>>;
|
|
2317
|
+
export declare const getAddIndexMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2318
|
+
mutation?: UseMutationOptions<AxiosResponse<AddIndex200, any>, TError, {
|
|
2319
|
+
hostingId: string;
|
|
2320
|
+
data: AddIndexBody;
|
|
2321
|
+
}, TContext> | undefined;
|
|
2322
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2323
|
+
} | undefined) => UseMutationOptions<AxiosResponse<AddIndex200, any>, TError, {
|
|
2324
|
+
hostingId: string;
|
|
2325
|
+
data: AddIndexBody;
|
|
2326
|
+
}, TContext>;
|
|
2327
|
+
export declare type AddIndexMutationResult = NonNullable<Awaited<ReturnType<typeof addIndex>>>;
|
|
2328
|
+
export declare type AddIndexMutationBody = AddIndexBody;
|
|
2329
|
+
export declare type AddIndexMutationError = AxiosError<unknown>;
|
|
2330
|
+
/**
|
|
2331
|
+
* @summary Add index to file/folder
|
|
2332
|
+
*/
|
|
2333
|
+
export declare const useAddIndex: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2334
|
+
mutation?: UseMutationOptions<AxiosResponse<AddIndex200, any>, TError, {
|
|
2335
|
+
hostingId: string;
|
|
2336
|
+
data: AddIndexBody;
|
|
2337
|
+
}, TContext> | undefined;
|
|
2338
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2339
|
+
} | undefined) => UseMutationResult<AxiosResponse<AddIndex200, any>, TError, {
|
|
2340
|
+
hostingId: string;
|
|
2341
|
+
data: AddIndexBody;
|
|
2342
|
+
}, TContext>;
|
|
2343
|
+
/**
|
|
2344
|
+
* Delete index to given file/folder
|
|
2345
|
+
* @summary Delete index to file/folder
|
|
2346
|
+
*/
|
|
2347
|
+
export declare const index: (hostingId: string, indexBody: IndexBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<Index200>>;
|
|
2348
|
+
export declare const getIndexMutationOptions: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2349
|
+
mutation?: UseMutationOptions<AxiosResponse<Index200, any>, TError, {
|
|
2350
|
+
hostingId: string;
|
|
2351
|
+
data: IndexBody;
|
|
2352
|
+
}, TContext> | undefined;
|
|
2353
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2354
|
+
} | undefined) => UseMutationOptions<AxiosResponse<Index200, any>, TError, {
|
|
2355
|
+
hostingId: string;
|
|
2356
|
+
data: IndexBody;
|
|
2357
|
+
}, TContext>;
|
|
2358
|
+
export declare type IndexMutationResult = NonNullable<Awaited<ReturnType<typeof index>>>;
|
|
2359
|
+
export declare type IndexMutationBody = IndexBody;
|
|
2360
|
+
export declare type IndexMutationError = AxiosError<unknown>;
|
|
2361
|
+
/**
|
|
2362
|
+
* @summary Delete index to file/folder
|
|
2363
|
+
*/
|
|
2364
|
+
export declare const useIndex: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
2365
|
+
mutation?: UseMutationOptions<AxiosResponse<Index200, any>, TError, {
|
|
2366
|
+
hostingId: string;
|
|
2367
|
+
data: IndexBody;
|
|
2368
|
+
}, TContext> | undefined;
|
|
2369
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
2370
|
+
} | undefined) => UseMutationResult<AxiosResponse<Index200, any>, TError, {
|
|
2371
|
+
hostingId: string;
|
|
2372
|
+
data: IndexBody;
|
|
2373
|
+
}, TContext>;
|
|
2280
2374
|
/**
|
|
2281
2375
|
* Returns hosting account info
|
|
2282
2376
|
* @summary Hosting 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.1084.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
|
@@ -1649,6 +1649,32 @@ export function useHostingEcommerceInfo(hostingId, options) {
|
|
|
1649
1649
|
query.queryKey = queryOptions.queryKey;
|
|
1650
1650
|
return query;
|
|
1651
1651
|
}
|
|
1652
|
+
/**
|
|
1653
|
+
* List files under the given directory
|
|
1654
|
+
* @summary List files
|
|
1655
|
+
*/
|
|
1656
|
+
export const listFiles = (hostingId, params, options) => {
|
|
1657
|
+
return axios.get(`/v1/hosting/${hostingId}/files`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
1658
|
+
};
|
|
1659
|
+
export const getListFilesQueryKey = (hostingId, params) => {
|
|
1660
|
+
return [`/v1/hosting/${hostingId}/files`, ...(params ? [params] : [])];
|
|
1661
|
+
};
|
|
1662
|
+
export const getListFilesQueryOptions = (hostingId, params, options) => {
|
|
1663
|
+
var _a;
|
|
1664
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1665
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getListFilesQueryKey(hostingId, params);
|
|
1666
|
+
const queryFn = ({ signal }) => listFiles(hostingId, params, Object.assign({ signal }, axiosOptions));
|
|
1667
|
+
return Object.assign({ queryKey, queryFn, enabled: !!(hostingId) }, queryOptions);
|
|
1668
|
+
};
|
|
1669
|
+
/**
|
|
1670
|
+
* @summary List files
|
|
1671
|
+
*/
|
|
1672
|
+
export function useListFiles(hostingId, params, options) {
|
|
1673
|
+
const queryOptions = getListFilesQueryOptions(hostingId, params, options);
|
|
1674
|
+
const query = useQuery(queryOptions);
|
|
1675
|
+
query.queryKey = queryOptions.queryKey;
|
|
1676
|
+
return query;
|
|
1677
|
+
}
|
|
1652
1678
|
/**
|
|
1653
1679
|
* Re-enforces correct ownership on user dirs and files
|
|
1654
1680
|
* @summary Fix file ownership
|
|
@@ -1763,6 +1789,50 @@ export const useHostingFtp = (options) => {
|
|
|
1763
1789
|
const mutationOptions = getHostingFtpMutationOptions(options);
|
|
1764
1790
|
return useMutation(mutationOptions);
|
|
1765
1791
|
};
|
|
1792
|
+
/**
|
|
1793
|
+
* Add index to given file/folder
|
|
1794
|
+
* @summary Add index to file/folder
|
|
1795
|
+
*/
|
|
1796
|
+
export const addIndex = (hostingId, addIndexBody, options) => {
|
|
1797
|
+
return axios.post(`/v1/hosting/${hostingId}/index`, addIndexBody, options);
|
|
1798
|
+
};
|
|
1799
|
+
export const getAddIndexMutationOptions = (options) => {
|
|
1800
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1801
|
+
const mutationFn = (props) => {
|
|
1802
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1803
|
+
return addIndex(hostingId, data, axiosOptions);
|
|
1804
|
+
};
|
|
1805
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
1806
|
+
};
|
|
1807
|
+
/**
|
|
1808
|
+
* @summary Add index to file/folder
|
|
1809
|
+
*/
|
|
1810
|
+
export const useAddIndex = (options) => {
|
|
1811
|
+
const mutationOptions = getAddIndexMutationOptions(options);
|
|
1812
|
+
return useMutation(mutationOptions);
|
|
1813
|
+
};
|
|
1814
|
+
/**
|
|
1815
|
+
* Delete index to given file/folder
|
|
1816
|
+
* @summary Delete index to file/folder
|
|
1817
|
+
*/
|
|
1818
|
+
export const index = (hostingId, indexBody, options) => {
|
|
1819
|
+
return axios.delete(`/v1/hosting/${hostingId}/index`, Object.assign({ data: indexBody }, options));
|
|
1820
|
+
};
|
|
1821
|
+
export const getIndexMutationOptions = (options) => {
|
|
1822
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1823
|
+
const mutationFn = (props) => {
|
|
1824
|
+
const { hostingId, data } = props !== null && props !== void 0 ? props : {};
|
|
1825
|
+
return index(hostingId, data, axiosOptions);
|
|
1826
|
+
};
|
|
1827
|
+
return Object.assign({ mutationFn }, mutationOptions);
|
|
1828
|
+
};
|
|
1829
|
+
/**
|
|
1830
|
+
* @summary Delete index to file/folder
|
|
1831
|
+
*/
|
|
1832
|
+
export const useIndex = (options) => {
|
|
1833
|
+
const mutationOptions = getIndexMutationOptions(options);
|
|
1834
|
+
return useMutation(mutationOptions);
|
|
1835
|
+
};
|
|
1766
1836
|
/**
|
|
1767
1837
|
* Returns hosting account info
|
|
1768
1838
|
* @summary Hosting 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, AddSiteIpaddress200, AddonCloudflare200, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupInitiate200, BackupList200, BackupStatus200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, HostingDomainsUnassign200, HostingEcommerceInfo200, HostingFixownership200, HostingFtp200, HostingFtpAdd200, HostingFtpList200, HostingFtpUpdate200, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingMigrationInfo200, HostingMigrationSiteScanStatus200, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsCheck200, HostingMigrationsEvent200, HostingNameservers200, HostingNameserversV2200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingRedirect200, HostingRedirects200Item, HostingRedirectsV2200Item, HostingResellerSsoWhm200, HostingShellInfo200, HostingShellToggle200, HostingSiteAdd200, HostingSitesV2200, HostingSshInfo200, JetpackBackupStatus200, ListCrons200, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyList200, SshKeyListV2200, Sso200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
2
|
+
import type { AccountEventList200, AccountHostingList200, AccountPublicKey200, AccountPublicKeyCreate200, AccountPublicKeyDelete200, AccountPublicKeyToggle200, AccountPublicKeys200, ActivityLog200, AddCron200, AddHostingRedirects200, AddIndex200, AddSiteIpaddress200, AddonCloudflare200, AddonsCloudflare200, AddonsInfo200, AddonsSitelockSso200, AddonsSitelockSsoV2200, AddonsSpamexpertsSso200, BackupInitiate200, BackupList200, BackupStatus200, BackupsJetpackBackup200, CodeguardBackupCreate200, CodeguardBackupDownload200, CodeguardBackupList200, CodeguardBackupRestore200, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupRestore200, CodeguardDatabaseList200, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupRestore200, CodeguardWebsiteList200, CreatePhpInfo200, Cron200, Db200, DbAdd200, DbCheckDatabase200, DbList200, DbUsage200, DbUserAdd200, DbUserDelete200, DbUserList200, DbUserPasswordSet200, DbUserPrivsGet200, DbUserPrivsSet200, DbUserRename200, DomainCertInstall200, DomainCertUninstall200, DomainCertUpdate200, DomainCerts200, DomainInfo200, DomainUnassign200, DomainZoneeditorUrl200, Domains200, HostingAccount200, HostingAddons200, HostingAdvancedDomainServices200, HostingAdvancedDomainServicesCheck200, HostingAdvancedPassword200, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, 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, ResetSite200, Site200, SiteAddonCloudflare200, SiteInfoResponseModelV2, SiteIpaddress200, SiteIpaddressList200Item, SiteMalwareStatus200, SitePendingDomainDelete200, SitePluginUpdate200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsToggle200, SitePluginsUpdate200, SiteStatus200, SiteUpdate200, SiteUsers200, SitesAccessLogs200, SitesAutoupdatesResponse, SitesBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, SitesBatch200, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDomain200, SitesDomainUrl200, SitesDomainsCreate200, SitesDomainsV2200, SitesErrorLogs200, SitesHasBackups200, SitesInfo200, SitesList200, SitesListV2200, SitesListV3200, SitesMetricDimensions200, SitesMetricsDimensionAveraged200, SitesPerformanceCachepurge200, SitesPerformanceEdgecache200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEndurancePageCache200, SitesSecurityBundle200, SitesSecurityCheckCore200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityResetCoreFiles200, SitesSecuritySitelock200, SitesSecuritySitelockV2200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersions200, SitesSshUserCreate200, SitesSshUserDelete200, SitesSshUserList200, SitesSshUserListV2200, SitesSshUserUpdate200, SitesSsl200, SitesSso200, SitesVersion200, SshKey200, SshKeyFetch200, SshKeyGenerate200, SshKeyImport200, SshKeyImportV2200, SshKeyList200, SshKeyListV2200, Sso200, UpdateCron200, WebzaiSso200, WeeblySso200 } from './index.schemas';
|
|
3
3
|
export declare const getAccountEventListResponseMock: (overrideResponse?: Partial<AccountEventList200>) => AccountEventList200;
|
|
4
4
|
export declare const getAccountHostingListResponseMock: (overrideResponse?: Partial<AccountHostingList200>) => AccountHostingList200;
|
|
5
5
|
export declare const getAccountPublicKeysResponseMock: (overrideResponse?: Partial<AccountPublicKeys200>) => AccountPublicKeys200;
|
|
@@ -68,11 +68,14 @@ export declare const getDbUserRenameResponseMock: (overrideResponse?: Partial<Db
|
|
|
68
68
|
export declare const getDomainsResponseMock: (overrideResponse?: Partial<Domains200>) => Domains200;
|
|
69
69
|
export declare const getHostingDomainsUnassignResponseMock: (overrideResponse?: Partial<HostingDomainsUnassign200>) => HostingDomainsUnassign200;
|
|
70
70
|
export declare const getHostingEcommerceInfoResponseMock: (overrideResponse?: Partial<HostingEcommerceInfo200>) => HostingEcommerceInfo200;
|
|
71
|
+
export declare const getListFilesResponseMock: (overrideResponse?: Partial<ListFiles200>) => ListFiles200;
|
|
71
72
|
export declare const getHostingFixownershipResponseMock: (overrideResponse?: Partial<HostingFixownership200>) => HostingFixownership200;
|
|
72
73
|
export declare const getHostingFtpListResponseMock: (overrideResponse?: Partial<HostingFtpList200>) => HostingFtpList200;
|
|
73
74
|
export declare const getHostingFtpAddResponseMock: (overrideResponse?: Partial<HostingFtpAdd200>) => HostingFtpAdd200;
|
|
74
75
|
export declare const getHostingFtpUpdateResponseMock: (overrideResponse?: Partial<HostingFtpUpdate200>) => HostingFtpUpdate200;
|
|
75
76
|
export declare const getHostingFtpResponseMock: (overrideResponse?: Partial<HostingFtp200>) => HostingFtp200;
|
|
77
|
+
export declare const getAddIndexResponseMock: (overrideResponse?: Partial<AddIndex200>) => AddIndex200;
|
|
78
|
+
export declare const getIndexResponseMock: (overrideResponse?: Partial<Index200>) => Index200;
|
|
76
79
|
export declare const getHostingInfoResponseMock: (overrideResponse?: Partial<HostingInfo200>) => HostingInfo200;
|
|
77
80
|
export declare const getHostingInfoDiskUsageResponseMock: (overrideResponse?: Partial<HostingInfoDiskUsage200>) => HostingInfoDiskUsage200;
|
|
78
81
|
export declare const getHostingLeadResponseMock: (overrideResponse?: Partial<HostingLead200>) => HostingLead200;
|
|
@@ -243,11 +246,14 @@ export declare const getDbUserRenameMockHandler: (overrideResponse?: DbUserRenam
|
|
|
243
246
|
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;
|
|
244
247
|
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;
|
|
245
248
|
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;
|
|
249
|
+
export declare const getListFilesMockHandler: (overrideResponse?: ListFiles200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ListFiles200> | ListFiles200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
246
250
|
export declare const getHostingFixownershipMockHandler: (overrideResponse?: HostingFixownership200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingFixownership200> | HostingFixownership200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
247
251
|
export declare const getHostingFtpListMockHandler: (overrideResponse?: HostingFtpList200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingFtpList200> | HostingFtpList200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
248
252
|
export declare const getHostingFtpAddMockHandler: (overrideResponse?: HostingFtpAdd200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingFtpAdd200> | HostingFtpAdd200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
249
253
|
export declare const getHostingFtpUpdateMockHandler: (overrideResponse?: HostingFtpUpdate200 | ((info: Parameters<Parameters<typeof http.put>[1]>[0]) => Promise<HostingFtpUpdate200> | HostingFtpUpdate200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
250
254
|
export declare const getHostingFtpMockHandler: (overrideResponse?: HostingFtp200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<HostingFtp200> | HostingFtp200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
255
|
+
export declare const getAddIndexMockHandler: (overrideResponse?: AddIndex200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<AddIndex200> | AddIndex200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
256
|
+
export declare const getIndexMockHandler: (overrideResponse?: Index200 | ((info: Parameters<Parameters<typeof http.delete>[1]>[0]) => Promise<Index200> | Index200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
251
257
|
export declare const getHostingInfoMockHandler: (overrideResponse?: HostingInfo200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingInfo200> | HostingInfo200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
252
258
|
export declare const getHostingInfoDiskUsageMockHandler: (overrideResponse?: HostingInfoDiskUsage200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<HostingInfoDiskUsage200> | HostingInfoDiskUsage200) | undefined) => import("msw/lib/core/handlers/HttpHandler").HttpHandler;
|
|
253
259
|
export declare const getHostingLeadMockHandler: (overrideResponse?: HostingLead200 | ((info: Parameters<Parameters<typeof http.post>[1]>[0]) => Promise<HostingLead200> | HostingLead200) | 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.1084.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -78,11 +78,14 @@ export const getDbUserRenameResponseMock = (overrideResponse = {}) => (Object.as
|
|
|
78
78
|
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));
|
|
79
79
|
export const getHostingDomainsUnassignResponseMock = (overrideResponse = {}) => (Object.assign({ queued: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
80
80
|
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));
|
|
81
|
+
export const getListFilesResponseMock = (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]), fullpath: 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));
|
|
81
82
|
export const getHostingFixownershipResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
82
83
|
export const getHostingFtpListResponseMock = (overrideResponse = {}) => (Object.assign({ ftp_accounts: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain: faker.helpers.arrayElement([faker.word.sample(), undefined]), homedir: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]), server_name: faker.helpers.arrayElement([faker.word.sample(), undefined]), special_ftp_accounts: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ account: faker.helpers.arrayElement([faker.word.sample(), undefined]), domain: faker.helpers.arrayElement([faker.word.sample(), undefined]), homedir: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
83
84
|
export const getHostingFtpAddResponseMock = (overrideResponse = {}) => (Object.assign({ pass: faker.helpers.arrayElement([faker.word.sample(), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
84
85
|
export const getHostingFtpUpdateResponseMock = (overrideResponse = {}) => (Object.assign({ status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
85
86
|
export const getHostingFtpResponseMock = (overrideResponse = {}) => (Object.assign({ status: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), user: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
87
|
+
export const getAddIndexResponseMock = (overrideResponse = {}) => (Object.assign({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
88
|
+
export const getIndexResponseMock = (overrideResponse = {}) => (Object.assign({ file: faker.helpers.arrayElement([faker.word.sample(), undefined]), success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
86
89
|
export const getHostingInfoResponseMock = (overrideResponse = {}) => (Object.assign({ ip: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
87
90
|
export const getHostingInfoDiskUsageResponseMock = (overrideResponse = {}) => (Object.assign({ disklastupdated: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), disklimit: faker.helpers.arrayElement([faker.word.sample(), undefined]), diskused: faker.helpers.arrayElement([faker.word.sample(), undefined]), fileslimit: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]), filesused: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, overrideResponse));
|
|
88
91
|
export const getHostingLeadResponseMock = (overrideResponse = {}) => (Object.assign({ response: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ clientRequestId: faker.helpers.arrayElement([faker.word.sample(), undefined]), data: faker.helpers.arrayElement([{ leadId: faker.helpers.arrayElement([faker.word.sample(), undefined]), message: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, undefined]), errors: faker.helpers.arrayElement([faker.word.sample(), undefined]), messageId: faker.helpers.arrayElement([faker.word.sample(), undefined]), providerApplicationName: faker.helpers.arrayElement([faker.word.sample(), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
@@ -126,7 +129,7 @@ export const getSiteAddonCloudflareResponseMock = (overrideResponse = {}) => (Ob
|
|
|
126
129
|
export const getSitesDatabaseInfoResponseMock = (overrideResponse = {}) => (Object.assign({ charset: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]), collation: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.word.sample(), null]), undefined]) }, overrideResponse));
|
|
127
130
|
export const getSitesDatabasePasswordsyncResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
128
131
|
export const getSitesDnsResponseMock = (overrideResponse = {}) => (Object.assign({ records: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ name: faker.helpers.arrayElement([faker.word.sample(), undefined]), type: faker.helpers.arrayElement([faker.word.sample(), undefined]), value: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]), source: faker.helpers.arrayElement([faker.word.sample(), undefined]), success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
129
|
-
export const getSitesDomainResponseMock = (overrideResponse = {}) => (Object.assign({ a_match: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), connected: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), detected: faker.helpers.arrayElement([{ a: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) }, undefined]), nameserver_match: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), wanted: faker.helpers.arrayElement([{ a: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) }, undefined]) }, overrideResponse));
|
|
132
|
+
export const getSitesDomainResponseMock = (overrideResponse = {}) => (Object.assign({ a_match: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), connected: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), detected: faker.helpers.arrayElement([{ a: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) }, undefined]), is_internal: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), nameserver_match: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), wanted: faker.helpers.arrayElement([{ a: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) }, undefined]) }, overrideResponse));
|
|
130
133
|
export const getSitesDomainUrlResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) }, overrideResponse));
|
|
131
134
|
export const getSitesDomainsCreateResponseMock = (overrideResponse = {}) => (Object.assign({ id: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), status: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
132
135
|
export const getSiteIpaddressListResponseMock = () => (Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ beginning_ip: faker.helpers.arrayElement([faker.word.sample(), undefined]), ending_ip: faker.helpers.arrayElement([faker.word.sample(), undefined]), server_setting: faker.helpers.arrayElement([faker.word.sample(), undefined]) })));
|
|
@@ -885,6 +888,16 @@ export const getHostingEcommerceInfoMockHandler = (overrideResponse) => {
|
|
|
885
888
|
});
|
|
886
889
|
}));
|
|
887
890
|
};
|
|
891
|
+
export const getListFilesMockHandler = (overrideResponse) => {
|
|
892
|
+
return http.get('*/v1/hosting/:hostingId/files', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
893
|
+
yield delay(1000);
|
|
894
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
895
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
896
|
+
: getListFilesResponseMock()), { status: 200,
|
|
897
|
+
headers: { 'Content-Type': 'application/json' }
|
|
898
|
+
});
|
|
899
|
+
}));
|
|
900
|
+
};
|
|
888
901
|
export const getHostingFixownershipMockHandler = (overrideResponse) => {
|
|
889
902
|
return http.post('*/v1/hosting/:hostingId/fixownership', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
890
903
|
yield delay(1000);
|
|
@@ -935,6 +948,26 @@ export const getHostingFtpMockHandler = (overrideResponse) => {
|
|
|
935
948
|
});
|
|
936
949
|
}));
|
|
937
950
|
};
|
|
951
|
+
export const getAddIndexMockHandler = (overrideResponse) => {
|
|
952
|
+
return http.post('*/v1/hosting/:hostingId/index', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
953
|
+
yield delay(1000);
|
|
954
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
955
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
956
|
+
: getAddIndexResponseMock()), { status: 200,
|
|
957
|
+
headers: { 'Content-Type': 'application/json' }
|
|
958
|
+
});
|
|
959
|
+
}));
|
|
960
|
+
};
|
|
961
|
+
export const getIndexMockHandler = (overrideResponse) => {
|
|
962
|
+
return http.delete('*/v1/hosting/:hostingId/index', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
963
|
+
yield delay(1000);
|
|
964
|
+
return new HttpResponse(JSON.stringify(overrideResponse !== undefined
|
|
965
|
+
? (typeof overrideResponse === "function" ? yield overrideResponse(info) : overrideResponse)
|
|
966
|
+
: getIndexResponseMock()), { status: 200,
|
|
967
|
+
headers: { 'Content-Type': 'application/json' }
|
|
968
|
+
});
|
|
969
|
+
}));
|
|
970
|
+
};
|
|
938
971
|
export const getHostingInfoMockHandler = (overrideResponse) => {
|
|
939
972
|
return http.get('*/v1/hosting/:hostingId/info', (info) => __awaiter(void 0, void 0, void 0, function* () {
|
|
940
973
|
yield delay(1000);
|
|
@@ -2044,11 +2077,14 @@ export const getHostingUAPIMock = () => [
|
|
|
2044
2077
|
getDomainsMockHandler(),
|
|
2045
2078
|
getHostingDomainsUnassignMockHandler(),
|
|
2046
2079
|
getHostingEcommerceInfoMockHandler(),
|
|
2080
|
+
getListFilesMockHandler(),
|
|
2047
2081
|
getHostingFixownershipMockHandler(),
|
|
2048
2082
|
getHostingFtpListMockHandler(),
|
|
2049
2083
|
getHostingFtpAddMockHandler(),
|
|
2050
2084
|
getHostingFtpUpdateMockHandler(),
|
|
2051
2085
|
getHostingFtpMockHandler(),
|
|
2086
|
+
getAddIndexMockHandler(),
|
|
2087
|
+
getIndexMockHandler(),
|
|
2052
2088
|
getHostingInfoMockHandler(),
|
|
2053
2089
|
getHostingInfoDiskUsageMockHandler(),
|
|
2054
2090
|
getHostingLeadMockHandler(),
|
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.1084.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SitesListV3200 = {
|
|
9
9
|
items?: SiteInfoResponseModelV2[];
|
|
@@ -169,6 +169,17 @@ export declare type SitesDomainsV2200 = {
|
|
|
169
169
|
export declare type SitesDomainsV2Params = {
|
|
170
170
|
scan?: boolean;
|
|
171
171
|
};
|
|
172
|
+
export declare type SitesListV2200 = {
|
|
173
|
+
items?: SitesListV2200ItemsItem[];
|
|
174
|
+
/** page size */
|
|
175
|
+
limit?: number;
|
|
176
|
+
/** current page number */
|
|
177
|
+
page?: number;
|
|
178
|
+
/** total number of pages */
|
|
179
|
+
pages?: number;
|
|
180
|
+
/** total number of sites returned */
|
|
181
|
+
total?: number;
|
|
182
|
+
};
|
|
172
183
|
export declare type SitesListV2200ItemsItemResourcesStorage = {
|
|
173
184
|
/** @nullable */
|
|
174
185
|
available?: number | null;
|
|
@@ -295,17 +306,6 @@ export declare type SitesListV2200ItemsItem = {
|
|
|
295
306
|
*/
|
|
296
307
|
version_ptr?: string | null;
|
|
297
308
|
};
|
|
298
|
-
export declare type SitesListV2200 = {
|
|
299
|
-
items?: SitesListV2200ItemsItem[];
|
|
300
|
-
/** page size */
|
|
301
|
-
limit?: number;
|
|
302
|
-
/** current page number */
|
|
303
|
-
page?: number;
|
|
304
|
-
/** total number of pages */
|
|
305
|
-
pages?: number;
|
|
306
|
-
/** total number of sites returned */
|
|
307
|
-
total?: number;
|
|
308
|
-
};
|
|
309
309
|
export declare type SshKeyListV2200RowsItem = {
|
|
310
310
|
key?: string;
|
|
311
311
|
mtime?: string;
|
|
@@ -905,6 +905,18 @@ export declare type SitesMetricDimensions200DimensionsVisitorCountryCodeItem = {
|
|
|
905
905
|
dimension?: SitesMetricDimensions200DimensionsVisitorCountryCodeItemDimension;
|
|
906
906
|
timestamp?: number;
|
|
907
907
|
};
|
|
908
|
+
export declare type SitesMetricDimensions200Dimensions = {
|
|
909
|
+
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
910
|
+
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
911
|
+
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
912
|
+
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
913
|
+
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
914
|
+
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
915
|
+
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
916
|
+
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
917
|
+
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
918
|
+
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
919
|
+
};
|
|
908
920
|
export declare type SitesMetricDimensions200DimensionsVisitorAsnItemDimension = {
|
|
909
921
|
[key: string]: number;
|
|
910
922
|
};
|
|
@@ -954,18 +966,6 @@ export declare type SitesMetricDimensions200DimensionsHttpHostItem = {
|
|
|
954
966
|
dimension?: SitesMetricDimensions200DimensionsHttpHostItemDimension;
|
|
955
967
|
timestamp?: number;
|
|
956
968
|
};
|
|
957
|
-
export declare type SitesMetricDimensions200Dimensions = {
|
|
958
|
-
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
959
|
-
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
960
|
-
http_verb?: SitesMetricDimensions200DimensionsHttpVerbItem[];
|
|
961
|
-
http_version?: SitesMetricDimensions200DimensionsHttpVersionItem[];
|
|
962
|
-
page_is_cached?: SitesMetricDimensions200DimensionsPageIsCachedItem[];
|
|
963
|
-
page_renderer?: SitesMetricDimensions200DimensionsPageRendererItem[];
|
|
964
|
-
visitor_asn?: SitesMetricDimensions200DimensionsVisitorAsnItem[];
|
|
965
|
-
visitor_country_code?: SitesMetricDimensions200DimensionsVisitorCountryCodeItem[];
|
|
966
|
-
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
967
|
-
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
968
|
-
};
|
|
969
969
|
export declare type SitesMetricDimensionsParams = {
|
|
970
970
|
start?: string;
|
|
971
971
|
end?: string;
|
|
@@ -1204,6 +1204,8 @@ export declare type SitesDomain200 = {
|
|
|
1204
1204
|
a_match?: boolean;
|
|
1205
1205
|
connected?: boolean;
|
|
1206
1206
|
detected?: SitesDomain200Detected;
|
|
1207
|
+
/** @nullable */
|
|
1208
|
+
is_internal?: boolean | null;
|
|
1207
1209
|
nameserver_match?: boolean;
|
|
1208
1210
|
wanted?: SitesDomain200Wanted;
|
|
1209
1211
|
};
|
|
@@ -1856,6 +1858,52 @@ export declare type HostingInfoDiskUsage200 = {
|
|
|
1856
1858
|
export declare type HostingInfo200 = {
|
|
1857
1859
|
ip?: string;
|
|
1858
1860
|
};
|
|
1861
|
+
export declare type Index200 = {
|
|
1862
|
+
/**
|
|
1863
|
+
* docroot path
|
|
1864
|
+
*/
|
|
1865
|
+
file?: string;
|
|
1866
|
+
/** */
|
|
1867
|
+
success?: number;
|
|
1868
|
+
};
|
|
1869
|
+
export declare type IndexBody = {
|
|
1870
|
+
/** docroot path */
|
|
1871
|
+
docpath: string;
|
|
1872
|
+
};
|
|
1873
|
+
export declare type AddIndex200 = {
|
|
1874
|
+
/**
|
|
1875
|
+
* docroot path
|
|
1876
|
+
*/
|
|
1877
|
+
file?: string;
|
|
1878
|
+
/** */
|
|
1879
|
+
status?: string;
|
|
1880
|
+
};
|
|
1881
|
+
/**
|
|
1882
|
+
* index type
|
|
1883
|
+
*/
|
|
1884
|
+
export declare type AddIndexBodyType = typeof AddIndexBodyType[keyof typeof AddIndexBodyType];
|
|
1885
|
+
export declare const AddIndexBodyType: {
|
|
1886
|
+
readonly fancy: "fancy";
|
|
1887
|
+
readonly standard: "standard";
|
|
1888
|
+
readonly default: "default";
|
|
1889
|
+
};
|
|
1890
|
+
/**
|
|
1891
|
+
* action name
|
|
1892
|
+
*/
|
|
1893
|
+
export declare type AddIndexBodyAction = typeof AddIndexBodyAction[keyof typeof AddIndexBodyAction];
|
|
1894
|
+
export declare const AddIndexBodyAction: {
|
|
1895
|
+
readonly view: "view";
|
|
1896
|
+
readonly enable: "enable";
|
|
1897
|
+
readonly disable: "disable";
|
|
1898
|
+
};
|
|
1899
|
+
export declare type AddIndexBody = {
|
|
1900
|
+
/** action name */
|
|
1901
|
+
action?: AddIndexBodyAction;
|
|
1902
|
+
/** docroot path */
|
|
1903
|
+
docpath: string;
|
|
1904
|
+
/** index type */
|
|
1905
|
+
type?: AddIndexBodyType;
|
|
1906
|
+
};
|
|
1859
1907
|
export declare type HostingFtp200 = {
|
|
1860
1908
|
status?: number;
|
|
1861
1909
|
/** Username */
|
|
@@ -1937,6 +1985,19 @@ export declare type HostingFtpList200 = {
|
|
|
1937
1985
|
export declare type HostingFixownership200 = {
|
|
1938
1986
|
success?: boolean;
|
|
1939
1987
|
};
|
|
1988
|
+
export declare type ListFiles200FilesItem = {
|
|
1989
|
+
file?: string;
|
|
1990
|
+
fullpath?: string;
|
|
1991
|
+
path?: string;
|
|
1992
|
+
size?: number;
|
|
1993
|
+
type?: string;
|
|
1994
|
+
};
|
|
1995
|
+
export declare type ListFiles200 = {
|
|
1996
|
+
files?: ListFiles200FilesItem[];
|
|
1997
|
+
};
|
|
1998
|
+
export declare type ListFilesParams = {
|
|
1999
|
+
directory?: string;
|
|
2000
|
+
};
|
|
1940
2001
|
/**
|
|
1941
2002
|
* @nullable
|
|
1942
2003
|
*/
|
|
@@ -2629,9 +2690,6 @@ export declare type CodeguardWebsiteBackupList200 = {
|
|
|
2629
2690
|
export declare type CodeguardWebsiteBackupListParams = {
|
|
2630
2691
|
website_id?: number;
|
|
2631
2692
|
};
|
|
2632
|
-
export declare type CodeguardWebsiteList200 = {
|
|
2633
|
-
website_list?: CodeguardWebsiteList200WebsiteListItem[];
|
|
2634
|
-
};
|
|
2635
2693
|
export declare type CodeguardWebsiteList200WebsiteListItemWebsite = {
|
|
2636
2694
|
activated?: boolean;
|
|
2637
2695
|
id?: number;
|
|
@@ -2640,6 +2698,9 @@ export declare type CodeguardWebsiteList200WebsiteListItemWebsite = {
|
|
|
2640
2698
|
export declare type CodeguardWebsiteList200WebsiteListItem = {
|
|
2641
2699
|
website?: CodeguardWebsiteList200WebsiteListItemWebsite;
|
|
2642
2700
|
};
|
|
2701
|
+
export declare type CodeguardWebsiteList200 = {
|
|
2702
|
+
website_list?: CodeguardWebsiteList200WebsiteListItem[];
|
|
2703
|
+
};
|
|
2643
2704
|
export declare type CodeguardPlanInfo200SeatsItem = {
|
|
2644
2705
|
activated?: boolean;
|
|
2645
2706
|
url?: string;
|
package/src/index.schemas.js
CHANGED
|
@@ -119,6 +119,18 @@ export const HostingMigrationsEventBodyEventName = {
|
|
|
119
119
|
failedCreate: 'failedCreate',
|
|
120
120
|
};
|
|
121
121
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
122
|
+
export const AddIndexBodyType = {
|
|
123
|
+
fancy: 'fancy',
|
|
124
|
+
standard: 'standard',
|
|
125
|
+
default: 'default',
|
|
126
|
+
};
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
128
|
+
export const AddIndexBodyAction = {
|
|
129
|
+
view: 'view',
|
|
130
|
+
enable: 'enable',
|
|
131
|
+
disable: 'disable',
|
|
132
|
+
};
|
|
133
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
122
134
|
export const HostingFtpUpdateBodyUserTypeSet = {
|
|
123
135
|
password: 'password',
|
|
124
136
|
quota: 'quota',
|