@newfold/huapi-js 1.731.0 → 1.736.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 CHANGED
@@ -10,7 +10,7 @@
10
10
  "tslib": "2.4.0"
11
11
  },
12
12
  "module": "dist/index.ts",
13
- "version": "1.731.0",
13
+ "version": "1.736.0",
14
14
  "sideEffects": false,
15
15
  "main": "./src/index.js",
16
16
  "types": "./src/index.d.ts",
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.731.0
6
+ * OpenAPI spec version: 1.736.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, 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, SitesDns200, SitesDnsParams, SitesDomain200, SitesDomainUrl200, SitesDomainUrlBody, SitesDomains200, 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, 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, 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, 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, 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
  /**
@@ -1319,6 +1319,35 @@ export declare const useSiteAddonCloudflare: <TError = AxiosError<SiteAddonCloud
1319
1319
  } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<SiteAddonCloudflare200, any>, TError, {
1320
1320
  siteId: number;
1321
1321
  }, TContext>;
1322
+ /**
1323
+ * Get info about site database
1324
+ * @summary site - database info
1325
+ */
1326
+ export declare const sitesDatabaseInfo: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesDatabaseInfo200>>;
1327
+ export declare const getSitesDatabaseInfoQueryKey: (siteId: number) => string[];
1328
+ export declare type SitesDatabaseInfoQueryResult = NonNullable<Awaited<ReturnType<typeof sitesDatabaseInfo>>>;
1329
+ export declare type SitesDatabaseInfoQueryError = AxiosError<unknown>;
1330
+ export declare const useSitesDatabaseInfo: <TData = AxiosResponse<SitesDatabaseInfo200, any>, TError = AxiosError<unknown, any>>(siteId: number, options?: {
1331
+ query?: UseQueryOptions<AxiosResponse<SitesDatabaseInfo200, any>, TError, TData, QueryKey> | undefined;
1332
+ axios?: AxiosRequestConfig<any> | undefined;
1333
+ } | undefined) => UseQueryResult<TData, TError> & {
1334
+ queryKey: QueryKey;
1335
+ };
1336
+ /**
1337
+ * Resync database password with whats in wp-config
1338
+ * @summary site - database - password sync
1339
+ */
1340
+ export declare const sitesDatabasePasswordsync: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesDatabasePasswordsync200>>;
1341
+ export declare type SitesDatabasePasswordsyncMutationResult = NonNullable<Awaited<ReturnType<typeof sitesDatabasePasswordsync>>>;
1342
+ export declare type SitesDatabasePasswordsyncMutationError = AxiosError<unknown>;
1343
+ export declare const useSitesDatabasePasswordsync: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
1344
+ mutation?: UseMutationOptions<AxiosResponse<SitesDatabasePasswordsync200, any>, TError, {
1345
+ siteId: number;
1346
+ }, TContext> | undefined;
1347
+ axios?: AxiosRequestConfig<any> | undefined;
1348
+ } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<SitesDatabasePasswordsync200, any>, TError, {
1349
+ siteId: number;
1350
+ }, TContext>;
1322
1351
  /**
1323
1352
  * Returns a list of DNS records for the site's domain.
1324
1353
  * @summary dns
@@ -1747,6 +1776,56 @@ export declare const useSitesSettingsPhpVersions: <TData = AxiosResponse<SitesSe
1747
1776
  } | undefined) => UseQueryResult<TData, TError> & {
1748
1777
  queryKey: QueryKey;
1749
1778
  };
1779
+ /**
1780
+ * List ssh users
1781
+ * @summary site - ssh - list users
1782
+ */
1783
+ export declare const sitesSshUserList: (siteId: number, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesSshUserList200>>;
1784
+ export declare const getSitesSshUserListQueryKey: (siteId: number) => string[];
1785
+ export declare type SitesSshUserListQueryResult = NonNullable<Awaited<ReturnType<typeof sitesSshUserList>>>;
1786
+ export declare type SitesSshUserListQueryError = AxiosError<unknown>;
1787
+ export declare const useSitesSshUserList: <TData = AxiosResponse<SitesSshUserList200, any>, TError = AxiosError<unknown, any>>(siteId: number, options?: {
1788
+ query?: UseQueryOptions<AxiosResponse<SitesSshUserList200, any>, TError, TData, QueryKey> | undefined;
1789
+ axios?: AxiosRequestConfig<any> | undefined;
1790
+ } | undefined) => UseQueryResult<TData, TError> & {
1791
+ queryKey: QueryKey;
1792
+ };
1793
+ /**
1794
+ * Create ssh user
1795
+ * @summary site - ssh - create user
1796
+ */
1797
+ export declare const sitesSshUserCreate: (siteId: number, sitesSshUserCreateBody: SitesSshUserCreateBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesSshUserCreate200>>;
1798
+ export declare type SitesSshUserCreateMutationResult = NonNullable<Awaited<ReturnType<typeof sitesSshUserCreate>>>;
1799
+ export declare type SitesSshUserCreateMutationBody = SitesSshUserCreateBody;
1800
+ export declare type SitesSshUserCreateMutationError = AxiosError<unknown>;
1801
+ export declare const useSitesSshUserCreate: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
1802
+ mutation?: UseMutationOptions<AxiosResponse<SitesSshUserCreate200, any>, TError, {
1803
+ siteId: number;
1804
+ data: SitesSshUserCreateBody;
1805
+ }, TContext> | undefined;
1806
+ axios?: AxiosRequestConfig<any> | undefined;
1807
+ } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<SitesSshUserCreate200, any>, TError, {
1808
+ siteId: number;
1809
+ data: SitesSshUserCreateBody;
1810
+ }, TContext>;
1811
+ /**
1812
+ * delete ssh user
1813
+ * @summary site - ssh - delete user
1814
+ */
1815
+ export declare const sitesSshUserDelete: (siteId: number, sitesSshUserDeleteBody: SitesSshUserDeleteBody, options?: AxiosRequestConfig) => Promise<AxiosResponse<SitesSshUserDelete200>>;
1816
+ export declare type SitesSshUserDeleteMutationResult = NonNullable<Awaited<ReturnType<typeof sitesSshUserDelete>>>;
1817
+ export declare type SitesSshUserDeleteMutationBody = SitesSshUserDeleteBody;
1818
+ export declare type SitesSshUserDeleteMutationError = AxiosError<unknown>;
1819
+ export declare const useSitesSshUserDelete: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
1820
+ mutation?: UseMutationOptions<AxiosResponse<SitesSshUserDelete200, any>, TError, {
1821
+ siteId: number;
1822
+ data: SitesSshUserDeleteBody;
1823
+ }, TContext> | undefined;
1824
+ axios?: AxiosRequestConfig<any> | undefined;
1825
+ } | undefined) => import("@tanstack/react-query").UseMutationResult<AxiosResponse<SitesSshUserDelete200, any>, TError, {
1826
+ siteId: number;
1827
+ data: SitesSshUserDeleteBody;
1828
+ }, TContext>;
1750
1829
  /**
1751
1830
  * Returns information about the site domain's SSL/TLS certificate
1752
1831
  * @summary Site domain SSL cert 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.731.0
6
+ * OpenAPI spec version: 1.736.0
7
7
  */
8
8
  import axios from 'axios';
9
9
  import { useQuery, useMutation } from '@tanstack/react-query';
@@ -1367,6 +1367,38 @@ export const useSiteAddonCloudflare = (options) => {
1367
1367
  };
1368
1368
  return useMutation(mutationFn, mutationOptions);
1369
1369
  };
1370
+ /**
1371
+ * Get info about site database
1372
+ * @summary site - database info
1373
+ */
1374
+ export const sitesDatabaseInfo = (siteId, options) => {
1375
+ return axios.get(`/v1/sites/${siteId}/database`, options);
1376
+ };
1377
+ export const getSitesDatabaseInfoQueryKey = (siteId) => [`/v1/sites/${siteId}/database`];
1378
+ export const useSitesDatabaseInfo = (siteId, options) => {
1379
+ var _a;
1380
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1381
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesDatabaseInfoQueryKey(siteId);
1382
+ const queryFn = ({ signal }) => sitesDatabaseInfo(siteId, Object.assign({ signal }, axiosOptions));
1383
+ const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions));
1384
+ query.queryKey = queryKey;
1385
+ return query;
1386
+ };
1387
+ /**
1388
+ * Resync database password with whats in wp-config
1389
+ * @summary site - database - password sync
1390
+ */
1391
+ export const sitesDatabasePasswordsync = (siteId, options) => {
1392
+ return axios.post(`/v1/sites/${siteId}/database/password-sync`, undefined, options);
1393
+ };
1394
+ export const useSitesDatabasePasswordsync = (options) => {
1395
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1396
+ const mutationFn = (props) => {
1397
+ const { siteId } = props !== null && props !== void 0 ? props : {};
1398
+ return sitesDatabasePasswordsync(siteId, axiosOptions);
1399
+ };
1400
+ return useMutation(mutationFn, mutationOptions);
1401
+ };
1370
1402
  /**
1371
1403
  * Returns a list of DNS records for the site's domain.
1372
1404
  * @summary dns
@@ -1798,6 +1830,53 @@ export const useSitesSettingsPhpVersions = (siteId, options) => {
1798
1830
  query.queryKey = queryKey;
1799
1831
  return query;
1800
1832
  };
1833
+ /**
1834
+ * List ssh users
1835
+ * @summary site - ssh - list users
1836
+ */
1837
+ export const sitesSshUserList = (siteId, options) => {
1838
+ return axios.get(`/v1/sites/${siteId}/ssh-users`, options);
1839
+ };
1840
+ export const getSitesSshUserListQueryKey = (siteId) => [`/v1/sites/${siteId}/ssh-users`];
1841
+ export const useSitesSshUserList = (siteId, options) => {
1842
+ var _a;
1843
+ const { query: queryOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1844
+ const queryKey = (_a = queryOptions === null || queryOptions === void 0 ? void 0 : queryOptions.queryKey) !== null && _a !== void 0 ? _a : getSitesSshUserListQueryKey(siteId);
1845
+ const queryFn = ({ signal }) => sitesSshUserList(siteId, Object.assign({ signal }, axiosOptions));
1846
+ const query = useQuery(Object.assign({ queryKey, queryFn, enabled: !!(siteId) }, queryOptions));
1847
+ query.queryKey = queryKey;
1848
+ return query;
1849
+ };
1850
+ /**
1851
+ * Create ssh user
1852
+ * @summary site - ssh - create user
1853
+ */
1854
+ export const sitesSshUserCreate = (siteId, sitesSshUserCreateBody, options) => {
1855
+ return axios.post(`/v1/sites/${siteId}/ssh-users`, sitesSshUserCreateBody, options);
1856
+ };
1857
+ export const useSitesSshUserCreate = (options) => {
1858
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1859
+ const mutationFn = (props) => {
1860
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1861
+ return sitesSshUserCreate(siteId, data, axiosOptions);
1862
+ };
1863
+ return useMutation(mutationFn, mutationOptions);
1864
+ };
1865
+ /**
1866
+ * delete ssh user
1867
+ * @summary site - ssh - delete user
1868
+ */
1869
+ export const sitesSshUserDelete = (siteId, sitesSshUserDeleteBody, options) => {
1870
+ return axios.delete(`/v1/sites/${siteId}/ssh-users`, Object.assign({ data: sitesSshUserDeleteBody }, options));
1871
+ };
1872
+ export const useSitesSshUserDelete = (options) => {
1873
+ const { mutation: mutationOptions, axios: axiosOptions } = options !== null && options !== void 0 ? options : {};
1874
+ const mutationFn = (props) => {
1875
+ const { siteId, data } = props !== null && props !== void 0 ? props : {};
1876
+ return sitesSshUserDelete(siteId, data, axiosOptions);
1877
+ };
1878
+ return useMutation(mutationFn, mutationOptions);
1879
+ };
1801
1880
  /**
1802
1881
  * Returns information about the site domain's SSL/TLS certificate
1803
1882
  * @summary Site domain SSL cert info
@@ -520,6 +520,11 @@ export declare const getBackupsJetpackBackupMock: () => {};
520
520
  export declare const getSiteAddonCloudflareMock: () => {
521
521
  addon_id: number | undefined;
522
522
  };
523
+ export declare const getSitesDatabaseInfoMock: () => {
524
+ collation: string | undefined;
525
+ charset: string | undefined;
526
+ };
527
+ export declare const getSitesDatabasePasswordsyncMock: () => {};
523
528
  export declare const getSitesDnsMock: () => {
524
529
  success: boolean | undefined;
525
530
  source: string | undefined;
@@ -655,6 +660,9 @@ export declare const getSitesSettingsPhpVersionUpdateMock: () => {
655
660
  export declare const getSitesSettingsPhpVersionsMock: () => {
656
661
  versions: string[] | undefined;
657
662
  };
663
+ export declare const getSitesSshUserListMock: () => {};
664
+ export declare const getSitesSshUserCreateMock: () => {};
665
+ export declare const getSitesSshUserDeleteMock: () => {};
658
666
  export declare const getSitesSslMock: () => {
659
667
  domain: string | undefined;
660
668
  domain_dns_status: string | undefined;
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.731.0
6
+ * OpenAPI spec version: 1.736.0
7
7
  */
8
8
  import { rest } from 'msw';
9
9
  import { faker } from '@faker-js/faker';
@@ -91,6 +91,8 @@ export const getSitesBackupsDetailsMock = () => ({ codeguard: faker.helpers.arra
91
91
  export const getJetpackBackupStatusMock = () => ({ plugin_exists: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_exists: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_id: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), plan_name: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), can_upgrade: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_plugin: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), has_active_addon: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), addon_back_reference: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), pending_upgrade: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
92
92
  export const getBackupsJetpackBackupMock = () => ({});
93
93
  export const getSiteAddonCloudflareMock = () => ({ addon_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
94
+ export const getSitesDatabaseInfoMock = () => ({ collation: faker.helpers.arrayElement([faker.random.word(), undefined]), charset: faker.helpers.arrayElement([faker.random.word(), undefined]) });
95
+ export const getSitesDatabasePasswordsyncMock = () => ({});
94
96
  export const getSitesDnsMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), source: faker.helpers.arrayElement([faker.random.word(), undefined]), records: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ name: faker.helpers.arrayElement([faker.random.word(), undefined]), value: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
95
97
  export const getSitesDomainMock = () => ({ connected: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), a_match: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), nameserver_match: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]), detected: faker.helpers.arrayElement([{ a: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]) }, undefined]), wanted: faker.helpers.arrayElement([{ a: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]), ns: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]) }, undefined]) });
96
98
  export const getSitesDomainUrlMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
@@ -118,6 +120,9 @@ export const getSitesSettingsDebugMock = () => ({ status: faker.helpers.arrayEle
118
120
  export const getSitesSettingsDebugToggleMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
119
121
  export const getSitesSettingsPhpVersionUpdateMock = () => ({ success: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]) });
120
122
  export const getSitesSettingsPhpVersionsMock = () => ({ versions: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => (faker.random.word())), undefined]) });
123
+ export const getSitesSshUserListMock = () => ({});
124
+ export const getSitesSshUserCreateMock = () => ({});
125
+ export const getSitesSshUserDeleteMock = () => ({});
121
126
  export const getSitesSslMock = () => ({ domain: faker.helpers.arrayElement([faker.random.word(), undefined]), domain_dns_status: faker.helpers.arrayElement([faker.random.word(), undefined]), expiration: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), issuer: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), product: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), provider: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), status: faker.helpers.arrayElement([faker.random.word(), undefined]), type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), upgradeable: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
122
127
  export const getSitesSsoMock = () => ({ sso: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), type: faker.helpers.arrayElement([faker.helpers.arrayElement([faker.random.word(), null]), undefined]), other: faker.helpers.arrayElement([Array.from({ length: faker.datatype.number({ min: 1, max: 10 }) }, (_, i) => i + 1).map(() => ({ addon_id: faker.helpers.arrayElement([faker.datatype.number({ min: undefined, max: undefined }), undefined]), type: faker.helpers.arrayElement([faker.random.word(), undefined]), subtype: faker.helpers.arrayElement([faker.random.word(), undefined]), domain: faker.helpers.arrayElement([faker.random.word(), undefined]), added: faker.helpers.arrayElement([faker.random.word(), undefined]) })), undefined]) });
123
128
  export const getSiteStatusMock = () => ({ url: faker.helpers.arrayElement([faker.random.word(), undefined]), pending_url: faker.helpers.arrayElement([faker.random.word(), undefined]), cloudflare_ready: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]) });
@@ -296,6 +301,10 @@ export const getHostingUAPIMSW = () => [
296
301
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getBackupsJetpackBackupMock()));
297
302
  }), rest.post('*/v1/sites/:siteId/cloudflare', (_req, res, ctx) => {
298
303
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSiteAddonCloudflareMock()));
304
+ }), rest.get('*/v1/sites/:siteId/database', (_req, res, ctx) => {
305
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesDatabaseInfoMock()));
306
+ }), rest.post('*/v1/sites/:siteId/database/password-sync', (_req, res, ctx) => {
307
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesDatabasePasswordsyncMock()));
299
308
  }), rest.get('*/v1/sites/:siteId/dns', (_req, res, ctx) => {
300
309
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesDnsMock()));
301
310
  }), rest.get('*/v1/sites/:siteId/domain', (_req, res, ctx) => {
@@ -350,6 +359,12 @@ export const getHostingUAPIMSW = () => [
350
359
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSettingsPhpVersionUpdateMock()));
351
360
  }), rest.get('*/v1/sites/:siteId/settings/php-versions', (_req, res, ctx) => {
352
361
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSettingsPhpVersionsMock()));
362
+ }), rest.get('*/v1/sites/:siteId/ssh-users', (_req, res, ctx) => {
363
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSshUserListMock()));
364
+ }), rest.post('*/v1/sites/:siteId/ssh-users', (_req, res, ctx) => {
365
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSshUserCreateMock()));
366
+ }), rest.delete('*/v1/sites/:siteId/ssh-users', (_req, res, ctx) => {
367
+ return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSshUserDeleteMock()));
353
368
  }), rest.get('*/v1/sites/:siteId/ssl', (_req, res, ctx) => {
354
369
  return res(ctx.delay(1000), ctx.status(200, 'Mocked status'), ctx.json(getSitesSslMock()));
355
370
  }), rest.get('*/v1/sites/:siteId/sso', (_req, res, ctx) => {
@@ -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.731.0
6
+ * OpenAPI spec version: 1.736.0
7
7
  */
8
8
  export declare type SitesListV2200 = {
9
9
  total?: number;
@@ -168,6 +168,21 @@ export declare type SitesSsl200 = {
168
168
  type?: string | null;
169
169
  upgradeable?: boolean;
170
170
  };
171
+ export declare type SitesSshUserDelete200 = {
172
+ [key: string]: any;
173
+ };
174
+ export declare type SitesSshUserDeleteBody = {
175
+ ssh_user?: string;
176
+ };
177
+ export declare type SitesSshUserCreate200 = {
178
+ [key: string]: any;
179
+ };
180
+ export declare type SitesSshUserCreateBody = {
181
+ ssh_user?: string;
182
+ };
183
+ export declare type SitesSshUserList200 = {
184
+ [key: string]: any;
185
+ };
171
186
  export declare type SitesSettingsPhpVersions200 = {
172
187
  versions?: string[];
173
188
  };
@@ -342,6 +357,8 @@ export declare type SitesDomainUrlBody = {
342
357
  temp_domain?: boolean;
343
358
  /** URL of the site to be updated */
344
359
  url?: string;
360
+ /** Optional to unassign the domain after switching to temporary domain */
361
+ unassign_domain?: boolean;
345
362
  };
346
363
  export declare type SitesDomain200Wanted = {
347
364
  a?: string[];
@@ -371,6 +388,13 @@ export declare type SitesDns200 = {
371
388
  export declare type SitesDnsParams = {
372
389
  type?: string;
373
390
  };
391
+ export declare type SitesDatabasePasswordsync200 = {
392
+ [key: string]: any;
393
+ };
394
+ export declare type SitesDatabaseInfo200 = {
395
+ collation?: string;
396
+ charset?: string;
397
+ };
374
398
  export declare type SiteAddonCloudflare400 = {
375
399
  error?: string;
376
400
  };