@newfold/huapi-js 1.882.0 → 1.883.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/orval.config.js +16 -0
- package/package.json +1 -1
- package/src/index.d.ts +18 -2
- package/src/index.js +22 -4
- package/src/index.msw.js +1 -1
- package/src/index.schemas.d.ts +1 -1
package/orval.config.js
CHANGED
|
@@ -12,6 +12,22 @@ export default defineConfig({
|
|
|
12
12
|
client: 'react-query',
|
|
13
13
|
mock: true,
|
|
14
14
|
clean: false,
|
|
15
|
+
override: {
|
|
16
|
+
operations: {
|
|
17
|
+
sites_error_logs: {
|
|
18
|
+
query: {
|
|
19
|
+
useQuery: true,
|
|
20
|
+
useInfinite: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
sites_access_logs: {
|
|
24
|
+
query: {
|
|
25
|
+
useQuery: true,
|
|
26
|
+
useInfinite: true,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
15
31
|
},
|
|
16
32
|
},
|
|
17
33
|
});
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
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.883.0
|
|
7
7
|
*/
|
|
8
8
|
import axios from 'axios';
|
|
9
9
|
import type { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';
|
|
10
|
-
import type { UseQueryOptions, UseMutationOptions, UseQueryResult, QueryKey } from '@tanstack/react-query';
|
|
10
|
+
import type { UseQueryOptions, UseInfiniteQueryOptions, UseMutationOptions, UseQueryResult, UseInfiniteQueryResult, QueryKey } from '@tanstack/react-query';
|
|
11
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, DomainInfo200, DomainUnassign200, 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, SitesDomainParams, SitesDomainUrl200, SitesDomainUrlBody, SitesDomainsCreate200, SitesDomainsCreateBody, SitesAccessLogs200, SitesAccessLogsParams, SitesErrorLogs200, SitesErrorLogsParams, SiteMalwareStatus200, SitePendingDomainDelete200, SitesPerformanceCachepurge200, SitesPerformanceCachepurgeBody, SitesPerformanceEdgecache200, SitesPerformanceEdgecacheBody, SitesPerformanceEnduranceCacheLevelStatus200, SitesPerformanceEnduranceCacheLevel200, SitesPerformanceEnduranceCacheLevelBody, SitesPerformanceEndurancePageCache200, SitePlugins200, SitePluginsParams, SitePluginUpdate200, SitePluginUpdateBody, 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, SitesDomainsV2200, SitesDomainsV2Params } 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;
|
|
@@ -1465,6 +1465,14 @@ export declare const useSitesDomainsCreate: <TError = AxiosError<unknown, any>,
|
|
|
1465
1465
|
*/
|
|
1466
1466
|
export declare const sitesAccessLogs: (siteId: number, params?: SitesAccessLogsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesAccessLogs200>>;
|
|
1467
1467
|
export declare const getSitesAccessLogsQueryKey: (siteId: number, params?: SitesAccessLogsParams) => (string | SitesAccessLogsParams)[];
|
|
1468
|
+
export declare type SitesAccessLogsInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof sitesAccessLogs>>>;
|
|
1469
|
+
export declare type SitesAccessLogsInfiniteQueryError = AxiosError<unknown>;
|
|
1470
|
+
export declare const useSitesAccessLogsInfinite: <TData = AxiosResponse<SitesAccessLogs200, any>, TError = AxiosError<unknown, any>>(siteId: number, params?: SitesAccessLogsParams, options?: {
|
|
1471
|
+
query?: UseInfiniteQueryOptions<AxiosResponse<SitesAccessLogs200, any>, TError, TData, AxiosResponse<SitesAccessLogs200, any>, QueryKey> | undefined;
|
|
1472
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1473
|
+
} | undefined) => UseInfiniteQueryResult<TData, TError> & {
|
|
1474
|
+
queryKey: QueryKey;
|
|
1475
|
+
};
|
|
1468
1476
|
export declare type SitesAccessLogsQueryResult = NonNullable<Awaited<ReturnType<typeof sitesAccessLogs>>>;
|
|
1469
1477
|
export declare type SitesAccessLogsQueryError = AxiosError<unknown>;
|
|
1470
1478
|
export declare const useSitesAccessLogs: <TData = AxiosResponse<SitesAccessLogs200, any>, TError = AxiosError<unknown, any>>(siteId: number, params?: SitesAccessLogsParams, options?: {
|
|
@@ -1479,6 +1487,14 @@ export declare const useSitesAccessLogs: <TData = AxiosResponse<SitesAccessLogs2
|
|
|
1479
1487
|
*/
|
|
1480
1488
|
export declare const sitesErrorLogs: (siteId: number, params?: SitesErrorLogsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesErrorLogs200>>;
|
|
1481
1489
|
export declare const getSitesErrorLogsQueryKey: (siteId: number, params?: SitesErrorLogsParams) => (string | SitesErrorLogsParams)[];
|
|
1490
|
+
export declare type SitesErrorLogsInfiniteQueryResult = NonNullable<Awaited<ReturnType<typeof sitesErrorLogs>>>;
|
|
1491
|
+
export declare type SitesErrorLogsInfiniteQueryError = AxiosError<unknown>;
|
|
1492
|
+
export declare const useSitesErrorLogsInfinite: <TData = AxiosResponse<SitesErrorLogs200, any>, TError = AxiosError<unknown, any>>(siteId: number, params?: SitesErrorLogsParams, options?: {
|
|
1493
|
+
query?: UseInfiniteQueryOptions<AxiosResponse<SitesErrorLogs200, any>, TError, TData, AxiosResponse<SitesErrorLogs200, any>, QueryKey> | undefined;
|
|
1494
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
1495
|
+
} | undefined) => UseInfiniteQueryResult<TData, TError> & {
|
|
1496
|
+
queryKey: QueryKey;
|
|
1497
|
+
};
|
|
1482
1498
|
export declare type SitesErrorLogsQueryResult = NonNullable<Awaited<ReturnType<typeof sitesErrorLogs>>>;
|
|
1483
1499
|
export declare type SitesErrorLogsQueryError = AxiosError<unknown>;
|
|
1484
1500
|
export declare const useSitesErrorLogs: <TData = AxiosResponse<SitesErrorLogs200, any>, TError = AxiosError<unknown, any>>(siteId: number, params?: SitesErrorLogsParams, options?: {
|
package/src/index.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
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.883.0
|
|
7
7
|
*/
|
|
8
8
|
import axios from 'axios';
|
|
9
|
-
import { useQuery, useMutation } from '@tanstack/react-query';
|
|
9
|
+
import { useQuery, useInfiniteQuery, useMutation } from '@tanstack/react-query';
|
|
10
10
|
/**
|
|
11
11
|
* Returns a hosting account list
|
|
12
12
|
* @summary Hosting account list for a customer
|
|
@@ -1518,11 +1518,20 @@ export const sitesAccessLogs = (siteId, params, options) => {
|
|
|
1518
1518
|
return axios.get(`/v1/sites/${siteId}/logs/access`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
1519
1519
|
};
|
|
1520
1520
|
export const getSitesAccessLogsQueryKey = (siteId, params) => [`/v1/sites/${siteId}/logs/access`, ...(params ? [params] : [])];
|
|
1521
|
+
export const useSitesAccessLogsInfinite = (siteId, params, options) => {
|
|
1522
|
+
var _a;
|
|
1523
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1524
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesAccessLogsQueryKey(siteId, params);
|
|
1525
|
+
const queryFn = () => sitesAccessLogs(siteId, params, axiosOptions);
|
|
1526
|
+
const query = useInfiniteQuery(Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions));
|
|
1527
|
+
query.queryKey = queryKey;
|
|
1528
|
+
return query;
|
|
1529
|
+
};
|
|
1521
1530
|
export const useSitesAccessLogs = (siteId, params, options) => {
|
|
1522
1531
|
var _a;
|
|
1523
1532
|
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1524
1533
|
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesAccessLogsQueryKey(siteId, params);
|
|
1525
|
-
const queryFn = (
|
|
1534
|
+
const queryFn = () => sitesAccessLogs(siteId, params, axiosOptions);
|
|
1526
1535
|
const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions));
|
|
1527
1536
|
query.queryKey = queryKey;
|
|
1528
1537
|
return query;
|
|
@@ -1535,11 +1544,20 @@ export const sitesErrorLogs = (siteId, params, options) => {
|
|
|
1535
1544
|
return axios.get(`/v1/sites/${siteId}/logs/error`, Object.assign(Object.assign({}, options), { params: Object.assign(Object.assign({}, params), options === null || options === void 0 ? void 0 : options.params) }));
|
|
1536
1545
|
};
|
|
1537
1546
|
export const getSitesErrorLogsQueryKey = (siteId, params) => [`/v1/sites/${siteId}/logs/error`, ...(params ? [params] : [])];
|
|
1547
|
+
export const useSitesErrorLogsInfinite = (siteId, params, options) => {
|
|
1548
|
+
var _a;
|
|
1549
|
+
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1550
|
+
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesErrorLogsQueryKey(siteId, params);
|
|
1551
|
+
const queryFn = () => sitesErrorLogs(siteId, params, axiosOptions);
|
|
1552
|
+
const query = useInfiniteQuery(Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions));
|
|
1553
|
+
query.queryKey = queryKey;
|
|
1554
|
+
return query;
|
|
1555
|
+
};
|
|
1538
1556
|
export const useSitesErrorLogs = (siteId, params, options) => {
|
|
1539
1557
|
var _a;
|
|
1540
1558
|
const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
|
|
1541
1559
|
const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesErrorLogsQueryKey(siteId, params);
|
|
1542
|
-
const queryFn = (
|
|
1560
|
+
const queryFn = () => sitesErrorLogs(siteId, params, axiosOptions);
|
|
1543
1561
|
const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions));
|
|
1544
1562
|
query.queryKey = queryKey;
|
|
1545
1563
|
return query;
|
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.883.0
|
|
7
7
|
*/
|
|
8
8
|
import { rest } from 'msw';
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
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.883.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SitesDomainsV2200DomainsItem = {
|
|
9
9
|
id?: number;
|