@newfold/huapi-js 1.751.0 → 1.761.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 +20 -2
- package/src/index.js +16 -1
- package/src/index.msw.d.ts +2 -1
- package/src/index.msw.js +5 -2
- package/src/index.schemas.d.ts +14 -2
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
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.761.0
|
|
7
7
|
*/
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
import type { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';
|
|
10
10
|
import type { UseQueryOptions, UseMutationOptions, UseQueryResult, QueryKey } from '@tanstack/react-query';
|
|
11
|
-
import type { AccountHostingList200, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseList200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteList200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, AddonsSitelockSso200, AddonsCloudflare200, AddonsInfo200, AddonsSpamexpertsSso200, WebzaiSso200, WeeblySso200, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, AddonCloudflare200, AddonCloudflareBody, ListCrons200, AddCron200, AddCron400, AddCronBody, UpdateCron200, UpdateCronBody, Cron200, CronBody, DbAdd200, DbAddBody, Db200, DbBody, DbList200, DbUsage200, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, Domains200, DomainsParams, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFtpList200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpUpdate200, HostingFtpUpdateBody, HostingFtp200, HostingFtpBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingResellerSsoWhm200, HostingShellToggle200, HostingShellToggleBody, HostingShellInfo200, HostingSiteAdd200, HostingSiteAddBody, HostingSshInfo200, SshKeyFetch200, SshKeyFetchParams, SshKeyImport200, SshKeyImportBody, SshKeyList200, SshKey200, SshKeyBody, SshKeyGenerate200, SshKeyGenerateBody, Sso200, SsoParams, SitesList200, SitesInfo200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, Site200, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesHasBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, JetpackBackupStatus200, BackupsJetpackBackup200, SiteAddonCloudflare200, SiteAddonCloudflare400, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainUrl200, SitesDomainUrlBody, SitesDomains200, SitesDomainsCreate200, SitesDomainsCreateBody, SitePendingDomainDelete200, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, ResetSite200, ResetSiteBody, SitesSecurityCheckCore200, SitesSecurityResetCoreFiles200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecuritySitelock200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserList200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SiteStatus200, SiteUsers200, SitesVersion200, HostingNameserversV2200, HostingSitesV2200, SshKeyListV2200, SitesListV2200 } from './index.schemas';
|
|
11
|
+
import type { AccountHostingList200, CodeguardBackupList200, CodeguardBackupListParams, CodeguardBackupCreate200, CodeguardBackupCreateBody, CodeguardBackupDownload200, CodeguardBackupDownloadBody, CodeguardBackupRestore200, CodeguardBackupRestoreBody, CodeguardDatabaseList200, CodeguardDatabaseBackupList200, CodeguardDatabaseBackupListParams, CodeguardDatabaseBackupCreate200, CodeguardDatabaseBackupCreateBody, CodeguardDatabaseBackupRestore200, CodeguardDatabaseBackupRestoreBody, CodeguardLoginLink200, CodeguardPlanInfo200, CodeguardWebsiteList200, CodeguardWebsiteBackupList200, CodeguardWebsiteBackupListParams, CodeguardWebsiteBackupCreate200, CodeguardWebsiteBackupCreateBody, CodeguardWebsiteBackupRestore200, CodeguardWebsiteBackupRestoreBody, AddonsSitelockSso200, AddonsCloudflare200, AddonsInfo200, AddonsSpamexpertsSso200, WebzaiSso200, WeeblySso200, HostingAccount200, HostingAddons200, HostingAddonsParams, HostingAdvancedServer200, HostingAdvancedServerStatus200, HostingAdvancedServerStatusBody, HostingAdvancedPassword200, HostingAdvancedPasswordBody, HostingAdvancedSsoWhm200, HostingAdvancedSystemConsole200, HostingCapabilities200, AddonCloudflare200, AddonCloudflareBody, ListCrons200, AddCron200, AddCron400, AddCronBody, UpdateCron200, UpdateCronBody, Cron200, CronBody, DbAdd200, DbAddBody, Db200, DbBody, DbList200, DbUsage200, DbUserPrivsGet200, DbUserPrivsGetParams, DbUserAdd200, DbUserAddBody, DbUserDelete200, DbUserDeleteBody, DbUserList200, Domains200, DomainsParams, HostingDomainsUnassign200, HostingDomainsUnassignBody, HostingEcommerceInfo200, HostingFtpList200, HostingFtpAdd200, HostingFtpAddBody, HostingFtpUpdate200, HostingFtpUpdateBody, HostingFtp200, HostingFtpBody, HostingInfo200, HostingInfoDiskUsage200, HostingLead200, HostingLead400, HostingLeadParams, HostingMigrationStatus200, HostingMigrations200, HostingMigrationsBody, HostingMigrationsCheck200, HostingMigrationsCheckParams, HostingMigrationsEvent200, HostingMigrationsEventBody, HostingMigrationInfo200, HostingMigrationInfoParams, HostingMigrationSiteScanStatus200, HostingMigrationSiteScanStatusParams, HostingNameservers200, HostingOnboardingData200, HostingOnboardingDataUpdate200, HostingOnboardingDataUpdateBody, HostingResellerSsoWhm200, HostingShellToggle200, HostingShellToggleBody, HostingShellInfo200, HostingSiteAdd200, HostingSiteAddBody, HostingSshInfo200, SshKeyFetch200, SshKeyFetchParams, SshKeyImport200, SshKeyImportBody, SshKeyList200, SshKey200, SshKeyBody, SshKeyGenerate200, SshKeyGenerateBody, Sso200, SsoParams, SitesList200, SitesInfo200, SiteUpdate200, SiteUpdate400, SiteUpdateBody, Site200, SitesAutoupdatesResponse, SitesAutoupdatesUpdateBody, SitesBackups200, SitesHasBackups200, SitesBackupsCodeguard200, SitesBackupsDetails200, JetpackBackupStatus200, BackupsJetpackBackup200, SiteAddonCloudflare200, SiteAddonCloudflare400, SitesDatabaseInfo200, SitesDatabasePasswordsync200, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainUrl200, SitesDomainUrlBody, SitesDomains200, SitesDomainsCreate200, SitesDomainsCreateBody, SitePendingDomainDelete200, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsAutoupdate200, SitePluginsAutoupdateBody, SitePluginsToggle200, SitePluginsToggleBody, SitePluginsUpdate200, SitePluginsUpdateBody, ResetSite200, ResetSiteBody, SitesSecurityCheckCore200, SitesSecurityResetCoreFiles200, SitesSecurityHttpsRedirectionStatus200, SitesSecurityHttpsEnableDisableSsl200, SitesSecurityHttpsEnableDisableSslBody, SitesSecuritySitelock200, SitesSecuritySslAcme200, SitesSecuritySslStatus200, SitesSettingsComingSoon200, SitesSettingsComingSoonToggle200, SitesSettingsComingSoonToggleBody, SitesSettingsDebug200, SitesSettingsDebugToggle200, SitesSettingsDebugToggleBody, SitesSettingsPhpVersionUpdate200, SitesSettingsPhpVersionUpdateBody, SitesSettingsPhpVersions200, SitesSshUserList200, SitesSshUserCreate200, SitesSshUserCreateBody, SitesSshUserDelete200, SitesSshUserDeleteBody, SitesSshUserUpdate200, SitesSshUserUpdateBody, SitesSsl200, SitesSso200, SitesSsoParams, SiteStatus200, SiteUsers200, SitesVersion200, HostingNameserversV2200, HostingSitesV2200, SshKeyListV2200, SitesListV2200 } from './index.schemas';
|
|
12
12
|
declare type AwaitedInput<T> = PromiseLike<T> | T;
|
|
13
13
|
declare type Awaited<O> = O extends AwaitedInput<infer T> ? T : never;
|
|
14
14
|
/**
|
|
@@ -1477,6 +1477,24 @@ export declare const useSitesPerformanceCachepurge: <TError = AxiosError<unknown
|
|
|
1477
1477
|
siteId: number;
|
|
1478
1478
|
data: SitesPerformanceCachepurgeBody;
|
|
1479
1479
|
}, TContext>;
|
|
1480
|
+
/**
|
|
1481
|
+
* Update the edge cache
|
|
1482
|
+
* @summary edge cache toggle for atomic site
|
|
1483
|
+
*/
|
|
1484
|
+
export declare const sitesPerformanceEdgecache: (siteId: number, sitesPerformanceEdgecacheBody: SitesPerformanceEdgecacheBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesPerformanceEdgecache200>>;
|
|
1485
|
+
export declare type SitesPerformanceEdgecacheMutationResult = NonNullable<Awaited<ReturnType<typeof sitesPerformanceEdgecache>>>;
|
|
1486
|
+
export declare type SitesPerformanceEdgecacheMutationBody = SitesPerformanceEdgecacheBody;
|
|
1487
|
+
export declare type SitesPerformanceEdgecacheMutationError = AxiosError<unknown>;
|
|
1488
|
+
export declare const useSitesPerformanceEdgecache: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
1489
|
+
mutation?: UseMutationOptions<AxiosResponse<SitesPerformanceEdgecache200, any>, TError, {
|
|
1490
|
+
siteId: number;
|
|
1491
|
+
data: SitesPerformanceEdgecacheBody;
|
|
1492
|
+
}, TContext> | undefined;
|
|
1493
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1494
|
+
} | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<SitesPerformanceEdgecache200, any>, TError, {
|
|
1495
|
+
siteId: number;
|
|
1496
|
+
data: SitesPerformanceEdgecacheBody;
|
|
1497
|
+
}, TContext>;
|
|
1480
1498
|
/**
|
|
1481
1499
|
* Returns the status of endurance_cache_level
|
|
1482
1500
|
* @summary Get status of endurance cache level
|
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.761.0
|
|
7
7
|
*/
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
import { useQuery, useMutation } from '@tanstack/react-query';
|
|
@@ -1525,6 +1525,21 @@ export const useSitesPerformanceCachepurge = (options) => {
|
|
|
1525
1525
|
};
|
|
1526
1526
|
return useMutation(mutationFn, mutationOptions);
|
|
1527
1527
|
};
|
|
1528
|
+
/**
|
|
1529
|
+
* Update the edge cache
|
|
1530
|
+
* @summary edge cache toggle for atomic site
|
|
1531
|
+
*/
|
|
1532
|
+
export const sitesPerformanceEdgecache = (siteId, sitesPerformanceEdgecacheBody, options) => {
|
|
1533
|
+
return axios.put(`/v1/sites/${siteId}/performance/edge_cache`, sitesPerformanceEdgecacheBody, options);
|
|
1534
|
+
};
|
|
1535
|
+
export const useSitesPerformanceEdgecache = (options) => {
|
|
1536
|
+
const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1537
|
+
const mutationFn = (props) => {
|
|
1538
|
+
const { siteId, data } = props !== null && props !== void 0 ? props : {};
|
|
1539
|
+
return sitesPerformanceEdgecache(siteId, data, axiosOptions);
|
|
1540
|
+
};
|
|
1541
|
+
return useMutation(mutationFn, mutationOptions);
|
|
1542
|
+
};
|
|
1528
1543
|
/**
|
|
1529
1544
|
* Returns the status of endurance_cache_level
|
|
1530
1545
|
* @summary Get status of endurance cache level
|
package/src/index.msw.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ export declare const getHostingAddonsMock: () => {
|
|
|
151
151
|
subtype: string | undefined;
|
|
152
152
|
status: string | undefined;
|
|
153
153
|
status_user: string | undefined;
|
|
154
|
-
meta:
|
|
154
|
+
meta: {} | undefined;
|
|
155
155
|
}[] | undefined;
|
|
156
156
|
};
|
|
157
157
|
export declare const getHostingAdvancedServerMock: () => {
|
|
@@ -577,6 +577,7 @@ export declare const getSitePendingDomainDeleteMock: () => {};
|
|
|
577
577
|
export declare const getSitesPerformanceCachepurgeMock: () => {
|
|
578
578
|
success: boolean | undefined;
|
|
579
579
|
};
|
|
580
|
+
export declare const getSitesPerformanceEdgecacheMock: () => {};
|
|
580
581
|
export declare const getSitesPerformanceEnduranceCacheLevelStatusMock: () => {
|
|
581
582
|
endurance_cache_level: number | undefined;
|
|
582
583
|
};
|
package/src/index.msw.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.761.0
|
|
7
7
|
*/
|
|
8
8
|
import { rest } from 'msw';
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
@@ -29,7 +29,7 @@ export const getAddonsSpamexpertsSsoMock = () => ({ url: faker.helpers.arrayElem
|
|
|
29
29
|
export const getWebzaiSsoMock = () => ({ sso: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
30
30
|
export const getWeeblySsoMock = () => ({ sso: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
31
31
|
export const getHostingAccountMock = () => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]), account_id: faker.helpers.arrayElement([faker.random.word(), undefined]), brand: faker.helpers.arrayElement([faker.random.word(), undefined]), platform: faker.helpers.arrayElement([faker.random.word(), undefined]), username: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), advanced: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), billing: faker.helpers.arrayElement([{ product_name: faker.helpers.arrayElement([faker.random.word(), undefined]) }, undefined]), panel: faker.helpers.arrayElement([faker.random.word(), undefined]), plan_key: faker.helpers.arrayElement([faker.random.word(), undefined]), resources: faker.helpers.arrayElement([{ storage: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), unit: faker.helpers.arrayElement([faker.random.word(), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]) }, undefined]), workers: faker.helpers.arrayElement([{ available: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), total: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]), used: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), null]), undefined]) }, undefined]) }, undefined]) });
|
|
32
|
-
export const getHostingAddonsMock = () => ({ rows: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), subtype: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), status_user: faker.helpers.arrayElement([faker.random.word(), undefined]), meta: faker.helpers.arrayElement([
|
|
32
|
+
export const getHostingAddonsMock = () => ({ rows: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ id: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), subtype: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), status_user: faker.helpers.arrayElement([faker.random.word(), undefined]), meta: faker.helpers.arrayElement([{}, undefined]) })), undefined]) });
|
|
33
33
|
export const getHostingAdvancedServerMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]), uptime: faker.helpers.arrayElement([faker.random.word(), undefined]), uptime_seconds: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), actions: faker.helpers.arrayElement([{}, undefined]) });
|
|
34
34
|
export const getHostingAdvancedServerStatusMock = () => ({ status: faker.helpers.arrayElement([faker.random.word(), undefined]), uptime: faker.helpers.arrayElement([faker.random.word(), undefined]), uptime_seconds: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), actions: faker.helpers.arrayElement([{}, undefined]) });
|
|
35
35
|
export const getHostingAdvancedPasswordMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
@@ -101,6 +101,7 @@ export const getSitesDomainsMock = () => ({ domains: faker.helpers.arrayElement(
|
|
|
101
101
|
export const getSitesDomainsCreateMock = () => ({ id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
102
102
|
export const getSitePendingDomainDeleteMock = () => ({});
|
|
103
103
|
export const getSitesPerformanceCachepurgeMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
|
|
104
|
+
export const getSitesPerformanceEdgecacheMock = () => ({});
|
|
104
105
|
export const getSitesPerformanceEnduranceCacheLevelStatusMock = () => ({ endurance_cache_level: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
|
|
105
106
|
export const getSitesPerformanceEnduranceCacheLevelMock = () => ({ options: faker.helpers.arrayElement([{}, undefined]) });
|
|
106
107
|
export const getSitesPerformanceEndurancePageCacheMock = () => ({ result: faker.helpers.arrayElement([faker.random.word(), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]) });
|
|
@@ -324,6 +325,8 @@ export const getHostingUAPIMSW = () => [
|
|
|
324
325
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitePendingDomainDeleteMock()));
|
|
325
326
|
}), rest.post('*/v1/sites/:siteId/performance/cachepurge', (_req, res, ctx) => {
|
|
326
327
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesPerformanceCachepurgeMock()));
|
|
328
|
+
}), rest.put('*/v1/sites/:siteId/performance/edge_cache', (_req, res, ctx) => {
|
|
329
|
+
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesPerformanceEdgecacheMock()));
|
|
327
330
|
}), rest.get('*/v1/sites/:siteId/performance/endurance_cache_level', (_req, res, ctx) => {
|
|
328
331
|
return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesPerformanceEnduranceCacheLevelStatusMock()));
|
|
329
332
|
}), rest.post('*/v1/sites/:siteId/performance/endurance_cache_level', (_req, res, ctx) => {
|
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.761.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SitesListV2200ItemsItemResourcesStorage = {
|
|
9
9
|
available?: number | null;
|
|
@@ -377,6 +377,13 @@ export declare type SitesPerformanceEnduranceCacheLevelBody = {
|
|
|
377
377
|
export declare type SitesPerformanceEnduranceCacheLevelStatus200 = {
|
|
378
378
|
endurance_cache_level?: number;
|
|
379
379
|
};
|
|
380
|
+
export declare type SitesPerformanceEdgecache200 = {
|
|
381
|
+
[key: string]: any;
|
|
382
|
+
};
|
|
383
|
+
export declare type SitesPerformanceEdgecacheBody = {
|
|
384
|
+
/** Pass either 0 or 1 */
|
|
385
|
+
edge_cache: number;
|
|
386
|
+
};
|
|
380
387
|
export declare type SitesPerformanceCachepurge200 = {
|
|
381
388
|
success?: boolean;
|
|
382
389
|
};
|
|
@@ -556,6 +563,8 @@ export declare type SiteUpdateBody = {
|
|
|
556
563
|
disk_limit_gib?: number;
|
|
557
564
|
/** Number of PHP workers */
|
|
558
565
|
workers?: number;
|
|
566
|
+
/** Skip FG domain checks for HAL domain */
|
|
567
|
+
skip_fg_checks?: boolean;
|
|
559
568
|
};
|
|
560
569
|
export declare type SitesInfo200ResourcesStorage = {
|
|
561
570
|
available?: number | null;
|
|
@@ -1223,13 +1232,16 @@ export declare type HostingAdvancedServer200 = {
|
|
|
1223
1232
|
uptime_seconds?: number;
|
|
1224
1233
|
actions?: HostingAdvancedServer200Actions;
|
|
1225
1234
|
};
|
|
1235
|
+
export declare type HostingAddons200RowsItemMeta = {
|
|
1236
|
+
[key: string]: any;
|
|
1237
|
+
};
|
|
1226
1238
|
export declare type HostingAddons200RowsItem = {
|
|
1227
1239
|
id?: string;
|
|
1228
1240
|
type?: string;
|
|
1229
1241
|
subtype?: string;
|
|
1230
1242
|
status?: string;
|
|
1231
1243
|
status_user?: string;
|
|
1232
|
-
meta?:
|
|
1244
|
+
meta?: HostingAddons200RowsItemMeta;
|
|
1233
1245
|
};
|
|
1234
1246
|
export declare type HostingAddons200 = {
|
|
1235
1247
|
rows?: HostingAddons200RowsItem[];
|