@newfold/huapi-js 2.1247.0 → 2.1250.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.js +1 -1
- package/src/index.msw.js +3 -3
- package/src/index.schemas.d.ts +109 -101
package/package.json
CHANGED
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.1250.0
|
|
7
7
|
*/
|
|
8
8
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
|
9
9
|
import axios from 'axios';
|
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.1250.0
|
|
8
8
|
*/
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import { HttpResponse, delay, http } from 'msw';
|
|
@@ -76,8 +76,8 @@ export const getHostingDbAuthorizedHostsResponseMock = (overrideResponse = {}) =
|
|
|
76
76
|
export const getHostingDbAuthorizedHostsAddResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
77
77
|
export const getHostingDbAuthorizedHostsUpdateResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
78
78
|
export const getHostingDbAuthorizedHostsDeleteResponseMock = (overrideResponse = {}) => (Object.assign({ success: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]) }, overrideResponse));
|
|
79
|
-
export const getDbCheckDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({
|
|
80
|
-
export const getRepairDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({}, overrideResponse));
|
|
79
|
+
export const getDbCheckDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({ tables: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ status: faker.helpers.arrayElement([faker.word.sample(), undefined]), table: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
80
|
+
export const getRepairDatabaseResponseMock = (overrideResponse = {}) => (Object.assign({ tables: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ status: faker.helpers.arrayElement([faker.word.sample(), undefined]), table: faker.helpers.arrayElement([faker.word.sample(), undefined]) })), undefined]) }, overrideResponse));
|
|
81
81
|
export const getDbUsageResponseMock = (overrideResponse = {}) => (Object.assign({ db_count: faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), undefined]), db_limit: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.number.int({ min: undefined, max: undefined }), null]), undefined]) }, overrideResponse));
|
|
82
82
|
export const getDbUserPasswordSetResponseMock = (overrideResponse = {}) => (Object.assign({ dbuser: faker.helpers.arrayElement([faker.word.sample(), undefined]) }, overrideResponse));
|
|
83
83
|
export const getDbUserPrivsGetResponseMock = (overrideResponse = {}) => (Object.assign({ privileges: faker.helpers.arrayElement([Array.from({ length: faker.number.int({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.word.sample())), undefined]) }, overrideResponse));
|
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.1250.0
|
|
7
7
|
*/
|
|
8
8
|
export declare type SshKeyListV4200RowsItem = {
|
|
9
9
|
authorize?: boolean;
|
|
@@ -459,6 +459,29 @@ export declare type HostingSiteAddV2Body = {
|
|
|
459
459
|
/** Number of PHP workers */
|
|
460
460
|
workers?: number;
|
|
461
461
|
};
|
|
462
|
+
export declare type HostingSitesV2200 = {
|
|
463
|
+
/**
|
|
464
|
+
* Remaining number of sites the customer can create. Max sites - used sites. Null means 'unlimited'.
|
|
465
|
+
* @nullable
|
|
466
|
+
*/
|
|
467
|
+
available_sites?: number | null;
|
|
468
|
+
items?: HostingSitesV2200ItemsItem[];
|
|
469
|
+
/** page size */
|
|
470
|
+
limit?: number;
|
|
471
|
+
/**
|
|
472
|
+
* Maximum number of sites the customer can have. Null means 'unlimited'.
|
|
473
|
+
* @nullable
|
|
474
|
+
*/
|
|
475
|
+
max_sites?: number | null;
|
|
476
|
+
/** current page number */
|
|
477
|
+
page?: number;
|
|
478
|
+
/** total number of pages */
|
|
479
|
+
pages?: number;
|
|
480
|
+
/** total number of sites returned */
|
|
481
|
+
total?: number;
|
|
482
|
+
/** Current number of sites in use by the customer. its normal for this value to be different than the total number of sites in the list. */
|
|
483
|
+
used_sites?: number;
|
|
484
|
+
};
|
|
462
485
|
/**
|
|
463
486
|
* @nullable
|
|
464
487
|
*/
|
|
@@ -614,29 +637,6 @@ export declare type HostingSitesV2200ItemsItem = {
|
|
|
614
637
|
*/
|
|
615
638
|
version_ptr?: string | null;
|
|
616
639
|
};
|
|
617
|
-
export declare type HostingSitesV2200 = {
|
|
618
|
-
/**
|
|
619
|
-
* Remaining number of sites the customer can create. Max sites - used sites. Null means 'unlimited'.
|
|
620
|
-
* @nullable
|
|
621
|
-
*/
|
|
622
|
-
available_sites?: number | null;
|
|
623
|
-
items?: HostingSitesV2200ItemsItem[];
|
|
624
|
-
/** page size */
|
|
625
|
-
limit?: number;
|
|
626
|
-
/**
|
|
627
|
-
* Maximum number of sites the customer can have. Null means 'unlimited'.
|
|
628
|
-
* @nullable
|
|
629
|
-
*/
|
|
630
|
-
max_sites?: number | null;
|
|
631
|
-
/** current page number */
|
|
632
|
-
page?: number;
|
|
633
|
-
/** total number of pages */
|
|
634
|
-
pages?: number;
|
|
635
|
-
/** total number of sites returned */
|
|
636
|
-
total?: number;
|
|
637
|
-
/** Current number of sites in use by the customer. its normal for this value to be different than the total number of sites in the list. */
|
|
638
|
-
used_sites?: number;
|
|
639
|
-
};
|
|
640
640
|
export declare type HostingSitesV2Params = {
|
|
641
641
|
limit?: number;
|
|
642
642
|
page?: number;
|
|
@@ -1050,6 +1050,9 @@ export declare type SiteQualityMetrics200AspectScores = {
|
|
|
1050
1050
|
performance?: number;
|
|
1051
1051
|
seo?: number;
|
|
1052
1052
|
};
|
|
1053
|
+
export declare type SiteQualityMetrics200AspectDetails = {
|
|
1054
|
+
performance?: SiteQualityMetrics200AspectDetailsPerformance;
|
|
1055
|
+
};
|
|
1053
1056
|
export declare type SiteQualityMetrics200 = {
|
|
1054
1057
|
aspect_details: SiteQualityMetrics200AspectDetails;
|
|
1055
1058
|
aspect_scores: SiteQualityMetrics200AspectScores;
|
|
@@ -1080,9 +1083,6 @@ export declare type SiteQualityMetrics200AspectDetailsPerformance = {
|
|
|
1080
1083
|
'speed-index'?: SiteQualityMetrics200AspectDetailsPerformanceSpeedIndex;
|
|
1081
1084
|
'total-blocking-time'?: SiteQualityMetrics200AspectDetailsPerformanceTotalBlockingTime;
|
|
1082
1085
|
};
|
|
1083
|
-
export declare type SiteQualityMetrics200AspectDetails = {
|
|
1084
|
-
performance?: SiteQualityMetrics200AspectDetailsPerformance;
|
|
1085
|
-
};
|
|
1086
1086
|
export declare type SiteQualityMetricsStrategy = typeof SiteQualityMetricsStrategy[keyof typeof SiteQualityMetricsStrategy];
|
|
1087
1087
|
export declare const SiteQualityMetricsStrategy: {
|
|
1088
1088
|
readonly MOBILE: "MOBILE";
|
|
@@ -1211,13 +1211,6 @@ export declare type SitesMetricDimensions200DimensionsVisitorCountryCodeItem = {
|
|
|
1211
1211
|
dimension?: SitesMetricDimensions200DimensionsVisitorCountryCodeItemDimension;
|
|
1212
1212
|
timestamp?: number;
|
|
1213
1213
|
};
|
|
1214
|
-
export declare type SitesMetricDimensions200DimensionsVisitorAsnItemDimension = {
|
|
1215
|
-
[key: string]: number;
|
|
1216
|
-
};
|
|
1217
|
-
export declare type SitesMetricDimensions200DimensionsVisitorAsnItem = {
|
|
1218
|
-
dimension?: SitesMetricDimensions200DimensionsVisitorAsnItemDimension;
|
|
1219
|
-
timestamp?: number;
|
|
1220
|
-
};
|
|
1221
1214
|
export declare type SitesMetricDimensions200Dimensions = {
|
|
1222
1215
|
http_host?: SitesMetricDimensions200DimensionsHttpHostItem[];
|
|
1223
1216
|
http_status?: SitesMetricDimensions200DimensionsHttpStatusItem[];
|
|
@@ -1230,6 +1223,13 @@ export declare type SitesMetricDimensions200Dimensions = {
|
|
|
1230
1223
|
visitor_is_crawler?: SitesMetricDimensions200DimensionsVisitorIsCrawlerItem[];
|
|
1231
1224
|
wp_admin_ajax_action?: SitesMetricDimensions200DimensionsWpAdminAjaxActionItem[];
|
|
1232
1225
|
};
|
|
1226
|
+
export declare type SitesMetricDimensions200DimensionsVisitorAsnItemDimension = {
|
|
1227
|
+
[key: string]: number;
|
|
1228
|
+
};
|
|
1229
|
+
export declare type SitesMetricDimensions200DimensionsVisitorAsnItem = {
|
|
1230
|
+
dimension?: SitesMetricDimensions200DimensionsVisitorAsnItemDimension;
|
|
1231
|
+
timestamp?: number;
|
|
1232
|
+
};
|
|
1233
1233
|
export declare type SitesMetricDimensions200DimensionsPageRendererItemDimension = {
|
|
1234
1234
|
[key: string]: number;
|
|
1235
1235
|
};
|
|
@@ -1709,6 +1709,71 @@ export declare type SitesInfo200Staging = {
|
|
|
1709
1709
|
/** A list of staging sites of the current site */
|
|
1710
1710
|
sites?: number[];
|
|
1711
1711
|
} | null;
|
|
1712
|
+
export declare type SitesInfo200ResourcesStorage = {
|
|
1713
|
+
/** @nullable */
|
|
1714
|
+
available?: number | null;
|
|
1715
|
+
/** @nullable */
|
|
1716
|
+
total?: number | null;
|
|
1717
|
+
unit?: string;
|
|
1718
|
+
/** @nullable */
|
|
1719
|
+
used?: number | null;
|
|
1720
|
+
};
|
|
1721
|
+
export declare type SitesInfo200Resources = {
|
|
1722
|
+
storage?: SitesInfo200ResourcesStorage;
|
|
1723
|
+
/** @nullable */
|
|
1724
|
+
workers?: number | null;
|
|
1725
|
+
};
|
|
1726
|
+
/**
|
|
1727
|
+
* @nullable
|
|
1728
|
+
*/
|
|
1729
|
+
export declare type SitesInfo200PendingUrlData = {
|
|
1730
|
+
/**
|
|
1731
|
+
* The root domain name
|
|
1732
|
+
* @nullable
|
|
1733
|
+
*/
|
|
1734
|
+
base_domain?: string | null;
|
|
1735
|
+
/**
|
|
1736
|
+
* The Fully Qualified Domain Name (FQDN)
|
|
1737
|
+
* @nullable
|
|
1738
|
+
*/
|
|
1739
|
+
domain?: string | null;
|
|
1740
|
+
/**
|
|
1741
|
+
* The current pending_url's HAL Domain ID
|
|
1742
|
+
* @nullable
|
|
1743
|
+
*/
|
|
1744
|
+
domain_id?: number | null;
|
|
1745
|
+
/** @nullable */
|
|
1746
|
+
error?: string | null;
|
|
1747
|
+
/** Flag indicating whether the pending_url is temporary or not */
|
|
1748
|
+
is_temp?: boolean;
|
|
1749
|
+
/**
|
|
1750
|
+
* Flag indicating whether the url_sync job has run out of attempts
|
|
1751
|
+
* @nullable
|
|
1752
|
+
*/
|
|
1753
|
+
job_failed?: boolean | null;
|
|
1754
|
+
/** @nullable */
|
|
1755
|
+
stage?: string | null;
|
|
1756
|
+
/**
|
|
1757
|
+
* Timestamp for when we will update the WP url, regardless of active sessions
|
|
1758
|
+
* @nullable
|
|
1759
|
+
*/
|
|
1760
|
+
wp_session?: string | null;
|
|
1761
|
+
} | null;
|
|
1762
|
+
/**
|
|
1763
|
+
* @nullable
|
|
1764
|
+
*/
|
|
1765
|
+
export declare type SitesInfo200Pagespeed = {
|
|
1766
|
+
lastrun?: string;
|
|
1767
|
+
performance?: string;
|
|
1768
|
+
strategy?: string;
|
|
1769
|
+
} | null;
|
|
1770
|
+
/**
|
|
1771
|
+
* Job ids for the site
|
|
1772
|
+
* @nullable
|
|
1773
|
+
*/
|
|
1774
|
+
export declare type SitesInfo200Jobs = {
|
|
1775
|
+
[key: string]: unknown;
|
|
1776
|
+
} | null;
|
|
1712
1777
|
export declare type SitesInfo200 = {
|
|
1713
1778
|
/** @nullable */
|
|
1714
1779
|
account_back_ref?: string | null;
|
|
@@ -1783,71 +1848,6 @@ export declare type SitesInfo200 = {
|
|
|
1783
1848
|
*/
|
|
1784
1849
|
version_ptr?: string | null;
|
|
1785
1850
|
};
|
|
1786
|
-
export declare type SitesInfo200ResourcesStorage = {
|
|
1787
|
-
/** @nullable */
|
|
1788
|
-
available?: number | null;
|
|
1789
|
-
/** @nullable */
|
|
1790
|
-
total?: number | null;
|
|
1791
|
-
unit?: string;
|
|
1792
|
-
/** @nullable */
|
|
1793
|
-
used?: number | null;
|
|
1794
|
-
};
|
|
1795
|
-
export declare type SitesInfo200Resources = {
|
|
1796
|
-
storage?: SitesInfo200ResourcesStorage;
|
|
1797
|
-
/** @nullable */
|
|
1798
|
-
workers?: number | null;
|
|
1799
|
-
};
|
|
1800
|
-
/**
|
|
1801
|
-
* @nullable
|
|
1802
|
-
*/
|
|
1803
|
-
export declare type SitesInfo200PendingUrlData = {
|
|
1804
|
-
/**
|
|
1805
|
-
* The root domain name
|
|
1806
|
-
* @nullable
|
|
1807
|
-
*/
|
|
1808
|
-
base_domain?: string | null;
|
|
1809
|
-
/**
|
|
1810
|
-
* The Fully Qualified Domain Name (FQDN)
|
|
1811
|
-
* @nullable
|
|
1812
|
-
*/
|
|
1813
|
-
domain?: string | null;
|
|
1814
|
-
/**
|
|
1815
|
-
* The current pending_url's HAL Domain ID
|
|
1816
|
-
* @nullable
|
|
1817
|
-
*/
|
|
1818
|
-
domain_id?: number | null;
|
|
1819
|
-
/** @nullable */
|
|
1820
|
-
error?: string | null;
|
|
1821
|
-
/** Flag indicating whether the pending_url is temporary or not */
|
|
1822
|
-
is_temp?: boolean;
|
|
1823
|
-
/**
|
|
1824
|
-
* Flag indicating whether the url_sync job has run out of attempts
|
|
1825
|
-
* @nullable
|
|
1826
|
-
*/
|
|
1827
|
-
job_failed?: boolean | null;
|
|
1828
|
-
/** @nullable */
|
|
1829
|
-
stage?: string | null;
|
|
1830
|
-
/**
|
|
1831
|
-
* Timestamp for when we will update the WP url, regardless of active sessions
|
|
1832
|
-
* @nullable
|
|
1833
|
-
*/
|
|
1834
|
-
wp_session?: string | null;
|
|
1835
|
-
} | null;
|
|
1836
|
-
/**
|
|
1837
|
-
* @nullable
|
|
1838
|
-
*/
|
|
1839
|
-
export declare type SitesInfo200Pagespeed = {
|
|
1840
|
-
lastrun?: string;
|
|
1841
|
-
performance?: string;
|
|
1842
|
-
strategy?: string;
|
|
1843
|
-
} | null;
|
|
1844
|
-
/**
|
|
1845
|
-
* Job ids for the site
|
|
1846
|
-
* @nullable
|
|
1847
|
-
*/
|
|
1848
|
-
export declare type SitesInfo200Jobs = {
|
|
1849
|
-
[key: string]: unknown;
|
|
1850
|
-
} | null;
|
|
1851
1851
|
export declare type HostingVisitors200VisitorsItem = {
|
|
1852
1852
|
bandwidth?: number;
|
|
1853
1853
|
hits?: number;
|
|
@@ -2714,15 +2714,23 @@ export declare type DbUsage200 = {
|
|
|
2714
2714
|
/** @nullable */
|
|
2715
2715
|
db_limit?: number | null;
|
|
2716
2716
|
};
|
|
2717
|
+
export declare type RepairDatabase200TablesItem = {
|
|
2718
|
+
status?: string;
|
|
2719
|
+
table?: string;
|
|
2720
|
+
};
|
|
2717
2721
|
export declare type RepairDatabase200 = {
|
|
2718
|
-
[
|
|
2722
|
+
tables?: RepairDatabase200TablesItem[];
|
|
2719
2723
|
};
|
|
2720
2724
|
export declare type RepairDatabaseBody = {
|
|
2721
2725
|
/** A valid database name. */
|
|
2722
2726
|
database: string;
|
|
2723
2727
|
};
|
|
2728
|
+
export declare type DbCheckDatabase200TablesItem = {
|
|
2729
|
+
status?: string;
|
|
2730
|
+
table?: string;
|
|
2731
|
+
};
|
|
2724
2732
|
export declare type DbCheckDatabase200 = {
|
|
2725
|
-
|
|
2733
|
+
tables?: DbCheckDatabase200TablesItem[];
|
|
2726
2734
|
};
|
|
2727
2735
|
/**
|
|
2728
2736
|
* Type of database
|