@newfold/huapi-js 1.2.8 → 1.2.9
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/README.md +51 -3
- package/dist/index.d.ts +197 -41
- package/dist/index.js +226 -44
- package/dist/index.msw.d.ts +71 -8
- package/dist/index.msw.js +57 -17
- package/dist/models/addonsCodeguardBackupRestore200.d.ts +10 -0
- package/dist/models/addonsCodeguardBackupRestore200.js +9 -0
- package/dist/models/addonsCodeguardBackupRestoreBody.d.ts +17 -0
- package/dist/models/addonsCodeguardBackupRestoreBody.js +9 -0
- package/dist/models/addonsCodeguardBackups200.d.ts +11 -0
- package/dist/models/addonsCodeguardBackups200.js +2 -0
- package/dist/models/addonsCodeguardBackups200BackupsItem.d.ts +13 -0
- package/dist/models/addonsCodeguardBackups200BackupsItem.js +2 -0
- package/dist/models/addonsCodeguardBackups200BackupsItemDatabaseBackupsItem.d.ts +13 -0
- package/dist/models/addonsCodeguardBackups200BackupsItemDatabaseBackupsItem.js +9 -0
- package/dist/models/addonsCodeguardBackupsParams.d.ts +10 -0
- package/dist/models/addonsCodeguardBackupsParams.js +9 -0
- package/dist/models/addonsCodeguardDatabaseBackupCreate200.d.ts +10 -0
- package/dist/models/addonsCodeguardDatabaseBackupCreate200.js +9 -0
- package/dist/models/addonsCodeguardDatabaseBackupCreateBody.d.ts +13 -0
- package/dist/models/addonsCodeguardDatabaseBackupCreateBody.js +9 -0
- package/dist/models/addonsCodeguardDatabaseBackupList200.d.ts +11 -0
- package/dist/models/addonsCodeguardDatabaseBackupList200.js +2 -0
- package/dist/models/addonsCodeguardDatabaseBackupList200BackupsItem.d.ts +11 -0
- package/dist/models/addonsCodeguardDatabaseBackupList200BackupsItem.js +9 -0
- package/dist/models/addonsCodeguardDatabaseBackupListParams.d.ts +11 -0
- package/dist/models/addonsCodeguardDatabaseBackupListParams.js +9 -0
- package/dist/models/addonsCodeguardDatabaseBackupRestore200.d.ts +10 -0
- package/dist/models/addonsCodeguardDatabaseBackupRestore200.js +9 -0
- package/dist/models/addonsCodeguardDatabaseBackupRestoreBody.d.ts +15 -0
- package/dist/models/addonsCodeguardDatabaseBackupRestoreBody.js +9 -0
- package/dist/models/addonsCodeguardDatabaseList200.d.ts +12 -0
- package/dist/models/addonsCodeguardDatabaseList200.js +2 -0
- package/dist/models/addonsCodeguardDatabaseList200DatabasesItem.d.ts +11 -0
- package/dist/models/addonsCodeguardDatabaseList200DatabasesItem.js +2 -0
- package/dist/models/addonsCodeguardDatabaseList200DatabasesItemDatabaseBackup.d.ts +13 -0
- package/dist/models/addonsCodeguardDatabaseList200DatabasesItemDatabaseBackup.js +9 -0
- package/dist/models/addonsCodeguardLoginLinkGenerate200.d.ts +10 -0
- package/dist/models/addonsCodeguardLoginLinkGenerate200.js +9 -0
- package/dist/models/addonsCodeguardWebsiteBackupCreate200.d.ts +10 -0
- package/dist/models/addonsCodeguardWebsiteBackupCreate200.js +9 -0
- package/dist/models/addonsCodeguardWebsiteBackupCreateBody.d.ts +11 -0
- package/dist/models/addonsCodeguardWebsiteBackupCreateBody.js +9 -0
- package/dist/models/addonsCodeguardWebsiteBackupList200.d.ts +11 -0
- package/dist/models/addonsCodeguardWebsiteBackupList200.js +2 -0
- package/dist/models/addonsCodeguardWebsiteBackupList200BackupsItem.d.ts +13 -0
- package/dist/models/addonsCodeguardWebsiteBackupList200BackupsItem.js +9 -0
- package/dist/models/addonsCodeguardWebsiteBackupListParams.d.ts +10 -0
- package/dist/models/addonsCodeguardWebsiteBackupListParams.js +9 -0
- package/dist/models/addonsCodeguardWebsiteBackupRestore200.d.ts +10 -0
- package/dist/models/addonsCodeguardWebsiteBackupRestore200.js +9 -0
- package/dist/models/addonsCodeguardWebsiteBackupRestore400.d.ts +12 -0
- package/dist/models/addonsCodeguardWebsiteBackupRestore400.js +2 -0
- package/dist/models/addonsCodeguardWebsiteBackupRestore400Error.d.ts +10 -0
- package/dist/models/addonsCodeguardWebsiteBackupRestore400Error.js +9 -0
- package/dist/models/addonsCodeguardWebsiteBackupRestoreBody.d.ts +13 -0
- package/dist/models/addonsCodeguardWebsiteBackupRestoreBody.js +9 -0
- package/dist/models/addonsCodeguardWebsiteList200.d.ts +11 -0
- package/dist/models/addonsCodeguardWebsiteList200.js +2 -0
- package/dist/models/addonsCodeguardWebsiteList200WebsiteListItem.d.ts +11 -0
- package/dist/models/addonsCodeguardWebsiteList200WebsiteListItem.js +2 -0
- package/dist/models/addonsCodeguardWebsiteList200WebsiteListItemWebsite.d.ts +12 -0
- package/dist/models/addonsCodeguardWebsiteList200WebsiteListItemWebsite.js +9 -0
- package/dist/models/hostingAddons200.d.ts +11 -0
- package/dist/models/hostingAddons200.js +2 -0
- package/dist/models/hostingAddons200RowsItem.d.ts +13 -0
- package/dist/models/hostingAddons200RowsItem.js +9 -0
- package/dist/models/hostingAddonsParams.d.ts +12 -0
- package/dist/models/hostingAddonsParams.js +9 -0
- package/dist/models/hostingFtpList200.d.ts +11 -0
- package/dist/models/hostingFtpList200.js +2 -0
- package/dist/models/hostingFtpList200FtpAccountItem.d.ts +11 -0
- package/dist/models/hostingFtpList200FtpAccountItem.js +9 -0
- package/dist/models/hostingInfo200.d.ts +2 -2
- package/dist/models/hostingInfo200.js +2 -2
- package/dist/models/hostingSites200.d.ts +2 -2
- package/dist/models/hostingSites200RowsItem.d.ts +2 -2
- package/dist/models/hostingSites200RowsItem.js +2 -2
- package/dist/models/index.d.ts +35 -0
- package/dist/models/index.js +35 -0
- package/dist/models/sitesInfo200.d.ts +20 -0
- package/dist/models/sitesInfo200.js +9 -0
- package/dist/models/sitesSso200.d.ts +2 -2
- package/dist/models/sitesSso200.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,12 +14,12 @@ $ yarn add @newfold/huapi-js
|
|
|
14
14
|
### React Hooks
|
|
15
15
|
|
|
16
16
|
```js
|
|
17
|
-
import React from
|
|
17
|
+
import React from 'react';
|
|
18
18
|
|
|
19
|
-
import { useHostingSites } from
|
|
19
|
+
import { useHostingSites } from '@newfold/huapi-js';
|
|
20
20
|
|
|
21
21
|
const MyComponent = () => {
|
|
22
|
-
const hostingId =
|
|
22
|
+
const hostingId = '2';
|
|
23
23
|
const { isLoading, data } = useHostingSites(hostingId);
|
|
24
24
|
|
|
25
25
|
if (isLoading) return <h1>Loading...</h1>;
|
|
@@ -33,3 +33,51 @@ const MyComponent = () => {
|
|
|
33
33
|
);
|
|
34
34
|
};
|
|
35
35
|
```
|
|
36
|
+
|
|
37
|
+
### Mocking with custom handlers
|
|
38
|
+
|
|
39
|
+
Custom [Mock Service Worker](https://mswjs.io/) handlers can be imported directly from `@newfold/huapi-js` to easily manipulate your local application or unit tests in an offline testing setting.
|
|
40
|
+
|
|
41
|
+
First, ensure that [Mock Service Worker](https://mswjs.io/) is configured in your project, then import and add handlers during your `setupWorker` or `setupServer` calls as follows:
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
// import handlers to override data as needed for testing
|
|
45
|
+
import { getHostingSitesHandler } from '@newfold/huapi-js/dist/handlers.msw';
|
|
46
|
+
|
|
47
|
+
// add the handlers to your setupServer call
|
|
48
|
+
const server = setupServer(
|
|
49
|
+
...[
|
|
50
|
+
// mock GET /hosting/:hosting-id/sites
|
|
51
|
+
getHostingSitesHandler(),
|
|
52
|
+
|
|
53
|
+
// add additional handlers here:
|
|
54
|
+
// postHostingSite(),
|
|
55
|
+
],
|
|
56
|
+
);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### Advanced handlers
|
|
60
|
+
|
|
61
|
+
## Building from huapi
|
|
62
|
+
|
|
63
|
+
Eventually we would like to have an automatic CICD pipeline that kicks off when new `huapi` builds change the openapi.json specification file (OAS). For now, we can do this manually by running the build command locally and publishing to npm. This can be done with the following steps:
|
|
64
|
+
|
|
65
|
+
1. Ensure your repo is on the `main` branch and in a clean state locally (no unstaged changes)
|
|
66
|
+
2. Run `yarn build` to pull down the OAS and create new build files
|
|
67
|
+
3. Publish to npm with `yarn publish --public` [or to use `npm` first manually update the version in package.json and git commit/push this change, then use `npm publish --access public` to publish the changes]
|
|
68
|
+
|
|
69
|
+
> NOTE: You may need to request permissions to publish to the npm registry. Please speak to your manager to request access for this through the Hosting Engineering Leadership Team. Please provide your npmjs.com username with your request, and ensure 2FA Authentication is enabled in your npmjs.com dashboard.
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
### Adding Endpoints
|
|
74
|
+
|
|
75
|
+
`@newfold/haupi-js` is based on the OpenAPI specification file that is published by the core `huapi` project. To add new endpoints, update the core project and publish an updated file, then ensure the build script in `package.json` is pointed to it.
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
# run the build command to build a new verions
|
|
79
|
+
$ yarn build
|
|
80
|
+
# building @newfold/huapi-js...
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Adding Custom Mock Handlers
|
package/dist/index.d.ts
CHANGED
|
@@ -2,27 +2,187 @@
|
|
|
2
2
|
* Generated by orval v6.7.1 🍺
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Hosting UAPI
|
|
5
|
-
* Hosting UAPI
|
|
6
|
-
* OpenAPI spec version: 0.0
|
|
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: 0.1.0
|
|
7
7
|
*/
|
|
8
8
|
import { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios';
|
|
9
9
|
import { UseQueryOptions, UseMutationOptions, UseQueryResult, QueryKey } from 'react-query';
|
|
10
|
-
import type {
|
|
10
|
+
import type { AddonsCodeguardWebsiteList200, AddonsCodeguardBackups200, AddonsCodeguardBackupsParams, AddonsCodeguardLoginLinkGenerate200, AddonsCodeguardDatabaseBackupCreate200, AddonsCodeguardDatabaseBackupCreateBody, AddonsCodeguardWebsiteBackupCreate200, AddonsCodeguardWebsiteBackupCreateBody, AddonsCodeguardDatabaseList200, AddonsCodeguardWebsiteBackupList200, AddonsCodeguardWebsiteBackupListParams, AddonsCodeguardDatabaseBackupList200, AddonsCodeguardDatabaseBackupListParams, AddonsCodeguardBackupRestore200, AddonsCodeguardBackupRestoreBody, AddonsCodeguardWebsiteBackupRestore200, AddonsCodeguardWebsiteBackupRestore400, AddonsCodeguardWebsiteBackupRestoreBody, AddonsCodeguardDatabaseBackupRestore200, AddonsCodeguardDatabaseBackupRestoreBody, HostingInfo200, HostingAddons200, HostingAddonsParams, HostingFtpList200, SitesSso200, SitesInfo200, HostingSites200 } from './models';
|
|
11
11
|
declare type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : any;
|
|
12
12
|
/**
|
|
13
13
|
* Return all website records CodeGuard maintains for this user's account.
|
|
14
14
|
* @summary addons codeguard website_list
|
|
15
15
|
*/
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare type
|
|
19
|
-
export declare type
|
|
20
|
-
export declare const
|
|
21
|
-
query?: UseQueryOptions<AxiosResponse<
|
|
16
|
+
export declare const addonsCodeguardWebsiteList: (addonId: number, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardWebsiteList200>>;
|
|
17
|
+
export declare const getAddonsCodeguardWebsiteListQueryKey: (addonId: number) => string[];
|
|
18
|
+
export declare type AddonsCodeguardWebsiteListQueryResult = NonNullable<AsyncReturnType<typeof addonsCodeguardWebsiteList>>;
|
|
19
|
+
export declare type AddonsCodeguardWebsiteListQueryError = AxiosError<unknown>;
|
|
20
|
+
export declare const useAddonsCodeguardWebsiteList: <TData = AxiosResponse<AddonsCodeguardWebsiteList200, any>, TError = AxiosError<unknown, any>>(addonId: number, options?: {
|
|
21
|
+
query?: UseQueryOptions<AxiosResponse<AddonsCodeguardWebsiteList200, any>, TError, TData, QueryKey> | undefined;
|
|
22
22
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
23
23
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
24
24
|
queryKey: QueryKey;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Returns a combined backup list with website commit ids and corresponding database commits
|
|
28
|
+
* @summary addons codeguard backups
|
|
29
|
+
*/
|
|
30
|
+
export declare const addonsCodeguardBackups: (addonId: number, params?: AddonsCodeguardBackupsParams | undefined, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardBackups200>>;
|
|
31
|
+
export declare const getAddonsCodeguardBackupsQueryKey: (addonId: number, params?: AddonsCodeguardBackupsParams | undefined) => (string | AddonsCodeguardBackupsParams)[];
|
|
32
|
+
export declare type AddonsCodeguardBackupsQueryResult = NonNullable<AsyncReturnType<typeof addonsCodeguardBackups>>;
|
|
33
|
+
export declare type AddonsCodeguardBackupsQueryError = AxiosError<unknown>;
|
|
34
|
+
export declare const useAddonsCodeguardBackups: <TData = AxiosResponse<AddonsCodeguardBackups200, any>, TError = AxiosError<unknown, any>>(addonId: number, params?: AddonsCodeguardBackupsParams | undefined, options?: {
|
|
35
|
+
query?: UseQueryOptions<AxiosResponse<AddonsCodeguardBackups200, any>, TError, TData, QueryKey> | undefined;
|
|
36
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
37
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
38
|
+
queryKey: QueryKey;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Returns an oauth login URL that can be used to access CodeGuard dashboard for a user.
|
|
42
|
+
* @summary addons codeguard login_link_generate
|
|
43
|
+
*/
|
|
44
|
+
export declare const addonsCodeguardLoginLinkGenerate: (addonId: number, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardLoginLinkGenerate200>>;
|
|
45
|
+
export declare const getAddonsCodeguardLoginLinkGenerateQueryKey: (addonId: number) => string[];
|
|
46
|
+
export declare type AddonsCodeguardLoginLinkGenerateQueryResult = NonNullable<AsyncReturnType<typeof addonsCodeguardLoginLinkGenerate>>;
|
|
47
|
+
export declare type AddonsCodeguardLoginLinkGenerateQueryError = AxiosError<unknown>;
|
|
48
|
+
export declare const useAddonsCodeguardLoginLinkGenerate: <TData = AxiosResponse<AddonsCodeguardLoginLinkGenerate200, any>, TError = AxiosError<unknown, any>>(addonId: number, options?: {
|
|
49
|
+
query?: UseQueryOptions<AxiosResponse<AddonsCodeguardLoginLinkGenerate200, any>, TError, TData, QueryKey> | undefined;
|
|
50
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
51
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
52
|
+
queryKey: QueryKey;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Queue the creation of a database backup.
|
|
56
|
+
* @summary addons codeguard database_backup_create
|
|
57
|
+
*/
|
|
58
|
+
export declare const addonsCodeguardDatabaseBackupCreate: (addonId: number, addonsCodeguardDatabaseBackupCreateBody: AddonsCodeguardDatabaseBackupCreateBody, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardDatabaseBackupCreate200>>;
|
|
59
|
+
export declare type AddonsCodeguardDatabaseBackupCreateMutationResult = NonNullable<AsyncReturnType<typeof addonsCodeguardDatabaseBackupCreate>>;
|
|
60
|
+
export declare type AddonsCodeguardDatabaseBackupCreateMutationBody = AddonsCodeguardDatabaseBackupCreateBody;
|
|
61
|
+
export declare type AddonsCodeguardDatabaseBackupCreateMutationError = AxiosError<unknown>;
|
|
62
|
+
export declare const useAddonsCodeguardDatabaseBackupCreate: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
63
|
+
mutation?: UseMutationOptions<AxiosResponse<AddonsCodeguardDatabaseBackupCreate200, any>, TError, {
|
|
64
|
+
addonId: number;
|
|
65
|
+
data: AddonsCodeguardDatabaseBackupCreateBody;
|
|
66
|
+
}, TContext> | undefined;
|
|
67
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
68
|
+
} | undefined) => import("react-query").UseMutationResult<AxiosResponse<AddonsCodeguardDatabaseBackupCreate200, any>, TError, {
|
|
69
|
+
addonId: number;
|
|
70
|
+
data: AddonsCodeguardDatabaseBackupCreateBody;
|
|
71
|
+
}, TContext>;
|
|
72
|
+
/**
|
|
73
|
+
* Initiate the creation of a new backup for a given website
|
|
74
|
+
* @summary addons codeguard website_backup_create
|
|
75
|
+
*/
|
|
76
|
+
export declare const addonsCodeguardWebsiteBackupCreate: (addonId: number, addonsCodeguardWebsiteBackupCreateBody: AddonsCodeguardWebsiteBackupCreateBody, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardWebsiteBackupCreate200>>;
|
|
77
|
+
export declare type AddonsCodeguardWebsiteBackupCreateMutationResult = NonNullable<AsyncReturnType<typeof addonsCodeguardWebsiteBackupCreate>>;
|
|
78
|
+
export declare type AddonsCodeguardWebsiteBackupCreateMutationBody = AddonsCodeguardWebsiteBackupCreateBody;
|
|
79
|
+
export declare type AddonsCodeguardWebsiteBackupCreateMutationError = AxiosError<unknown>;
|
|
80
|
+
export declare const useAddonsCodeguardWebsiteBackupCreate: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
81
|
+
mutation?: UseMutationOptions<AxiosResponse<AddonsCodeguardWebsiteBackupCreate200, any>, TError, {
|
|
82
|
+
addonId: number;
|
|
83
|
+
data: AddonsCodeguardWebsiteBackupCreateBody;
|
|
84
|
+
}, TContext> | undefined;
|
|
85
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
86
|
+
} | undefined) => import("react-query").UseMutationResult<AxiosResponse<AddonsCodeguardWebsiteBackupCreate200, any>, TError, {
|
|
87
|
+
addonId: number;
|
|
88
|
+
data: AddonsCodeguardWebsiteBackupCreateBody;
|
|
89
|
+
}, TContext>;
|
|
90
|
+
/**
|
|
91
|
+
* Return all database records CodeGuard maintains for this user's account.
|
|
92
|
+
* @summary addons codeguard database_list
|
|
93
|
+
*/
|
|
94
|
+
export declare const addonsCodeguardDatabaseList: (addonId: number, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardDatabaseList200>>;
|
|
95
|
+
export declare const getAddonsCodeguardDatabaseListQueryKey: (addonId: number) => string[];
|
|
96
|
+
export declare type AddonsCodeguardDatabaseListQueryResult = NonNullable<AsyncReturnType<typeof addonsCodeguardDatabaseList>>;
|
|
97
|
+
export declare type AddonsCodeguardDatabaseListQueryError = AxiosError<unknown>;
|
|
98
|
+
export declare const useAddonsCodeguardDatabaseList: <TData = AxiosResponse<AddonsCodeguardDatabaseList200, any>, TError = AxiosError<unknown, any>>(addonId: number, options?: {
|
|
99
|
+
query?: UseQueryOptions<AxiosResponse<AddonsCodeguardDatabaseList200, any>, TError, TData, QueryKey> | undefined;
|
|
100
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
101
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
102
|
+
queryKey: QueryKey;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Return all website backup records CodeGuard maintains for this user's account.
|
|
106
|
+
* @summary addons codeguard website backup list
|
|
107
|
+
*/
|
|
108
|
+
export declare const addonsCodeguardWebsiteBackupList: (addonId: number, params?: AddonsCodeguardWebsiteBackupListParams | undefined, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardWebsiteBackupList200>>;
|
|
109
|
+
export declare const getAddonsCodeguardWebsiteBackupListQueryKey: (addonId: number, params?: AddonsCodeguardWebsiteBackupListParams | undefined) => (string | AddonsCodeguardWebsiteBackupListParams)[];
|
|
110
|
+
export declare type AddonsCodeguardWebsiteBackupListQueryResult = NonNullable<AsyncReturnType<typeof addonsCodeguardWebsiteBackupList>>;
|
|
111
|
+
export declare type AddonsCodeguardWebsiteBackupListQueryError = AxiosError<unknown>;
|
|
112
|
+
export declare const useAddonsCodeguardWebsiteBackupList: <TData = AxiosResponse<AddonsCodeguardWebsiteBackupList200, any>, TError = AxiosError<unknown, any>>(addonId: number, params?: AddonsCodeguardWebsiteBackupListParams | undefined, options?: {
|
|
113
|
+
query?: UseQueryOptions<AxiosResponse<AddonsCodeguardWebsiteBackupList200, any>, TError, TData, QueryKey> | undefined;
|
|
114
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
115
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
116
|
+
queryKey: QueryKey;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Return all database backup records CodeGuard maintains for this user's account.
|
|
120
|
+
* @summary addons codeguard database backup list
|
|
121
|
+
*/
|
|
122
|
+
export declare const addonsCodeguardDatabaseBackupList: (addonId: number, params?: AddonsCodeguardDatabaseBackupListParams | undefined, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardDatabaseBackupList200>>;
|
|
123
|
+
export declare const getAddonsCodeguardDatabaseBackupListQueryKey: (addonId: number, params?: AddonsCodeguardDatabaseBackupListParams | undefined) => (string | AddonsCodeguardDatabaseBackupListParams)[];
|
|
124
|
+
export declare type AddonsCodeguardDatabaseBackupListQueryResult = NonNullable<AsyncReturnType<typeof addonsCodeguardDatabaseBackupList>>;
|
|
125
|
+
export declare type AddonsCodeguardDatabaseBackupListQueryError = AxiosError<unknown>;
|
|
126
|
+
export declare const useAddonsCodeguardDatabaseBackupList: <TData = AxiosResponse<AddonsCodeguardDatabaseBackupList200, any>, TError = AxiosError<unknown, any>>(addonId: number, params?: AddonsCodeguardDatabaseBackupListParams | undefined, options?: {
|
|
127
|
+
query?: UseQueryOptions<AxiosResponse<AddonsCodeguardDatabaseBackupList200, any>, TError, TData, QueryKey> | undefined;
|
|
128
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
129
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
130
|
+
queryKey: QueryKey;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Restores the website backup
|
|
134
|
+
* @summary addons codeguard website backup restore
|
|
135
|
+
*/
|
|
136
|
+
export declare const addonsCodeguardBackupRestore: (addonId: number, addonsCodeguardBackupRestoreBody: AddonsCodeguardBackupRestoreBody, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardBackupRestore200>>;
|
|
137
|
+
export declare type AddonsCodeguardBackupRestoreMutationResult = NonNullable<AsyncReturnType<typeof addonsCodeguardBackupRestore>>;
|
|
138
|
+
export declare type AddonsCodeguardBackupRestoreMutationBody = AddonsCodeguardBackupRestoreBody;
|
|
139
|
+
export declare type AddonsCodeguardBackupRestoreMutationError = AxiosError<unknown>;
|
|
140
|
+
export declare const useAddonsCodeguardBackupRestore: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
141
|
+
mutation?: UseMutationOptions<AxiosResponse<AddonsCodeguardBackupRestore200, any>, TError, {
|
|
142
|
+
addonId: number;
|
|
143
|
+
data: AddonsCodeguardBackupRestoreBody;
|
|
144
|
+
}, TContext> | undefined;
|
|
145
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
146
|
+
} | undefined) => import("react-query").UseMutationResult<AxiosResponse<AddonsCodeguardBackupRestore200, any>, TError, {
|
|
147
|
+
addonId: number;
|
|
148
|
+
data: AddonsCodeguardBackupRestoreBody;
|
|
149
|
+
}, TContext>;
|
|
150
|
+
/**
|
|
151
|
+
* Restores the website backup
|
|
152
|
+
* @summary addons codeguard website backup restore
|
|
153
|
+
*/
|
|
154
|
+
export declare const addonsCodeguardWebsiteBackupRestore: (addonId: number, addonsCodeguardWebsiteBackupRestoreBody: AddonsCodeguardWebsiteBackupRestoreBody, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardWebsiteBackupRestore200>>;
|
|
155
|
+
export declare type AddonsCodeguardWebsiteBackupRestoreMutationResult = NonNullable<AsyncReturnType<typeof addonsCodeguardWebsiteBackupRestore>>;
|
|
156
|
+
export declare type AddonsCodeguardWebsiteBackupRestoreMutationBody = AddonsCodeguardWebsiteBackupRestoreBody;
|
|
157
|
+
export declare type AddonsCodeguardWebsiteBackupRestoreMutationError = AxiosError<AddonsCodeguardWebsiteBackupRestore400>;
|
|
158
|
+
export declare const useAddonsCodeguardWebsiteBackupRestore: <TError = AxiosError<AddonsCodeguardWebsiteBackupRestore400, any>, TContext = unknown>(options?: {
|
|
159
|
+
mutation?: UseMutationOptions<AxiosResponse<AddonsCodeguardWebsiteBackupRestore200, any>, TError, {
|
|
160
|
+
addonId: number;
|
|
161
|
+
data: AddonsCodeguardWebsiteBackupRestoreBody;
|
|
162
|
+
}, TContext> | undefined;
|
|
163
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
164
|
+
} | undefined) => import("react-query").UseMutationResult<AxiosResponse<AddonsCodeguardWebsiteBackupRestore200, any>, TError, {
|
|
165
|
+
addonId: number;
|
|
166
|
+
data: AddonsCodeguardWebsiteBackupRestoreBody;
|
|
167
|
+
}, TContext>;
|
|
168
|
+
/**
|
|
169
|
+
* Restores the database backup
|
|
170
|
+
* @summary addons codeguard database backup restore
|
|
171
|
+
*/
|
|
172
|
+
export declare const addonsCodeguardDatabaseBackupRestore: (addonId: number, addonsCodeguardDatabaseBackupRestoreBody: AddonsCodeguardDatabaseBackupRestoreBody, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<AddonsCodeguardDatabaseBackupRestore200>>;
|
|
173
|
+
export declare type AddonsCodeguardDatabaseBackupRestoreMutationResult = NonNullable<AsyncReturnType<typeof addonsCodeguardDatabaseBackupRestore>>;
|
|
174
|
+
export declare type AddonsCodeguardDatabaseBackupRestoreMutationBody = AddonsCodeguardDatabaseBackupRestoreBody;
|
|
175
|
+
export declare type AddonsCodeguardDatabaseBackupRestoreMutationError = AxiosError<unknown>;
|
|
176
|
+
export declare const useAddonsCodeguardDatabaseBackupRestore: <TError = AxiosError<unknown, any>, TContext = unknown>(options?: {
|
|
177
|
+
mutation?: UseMutationOptions<AxiosResponse<AddonsCodeguardDatabaseBackupRestore200, any>, TError, {
|
|
178
|
+
addonId: number;
|
|
179
|
+
data: AddonsCodeguardDatabaseBackupRestoreBody;
|
|
180
|
+
}, TContext> | undefined;
|
|
181
|
+
axios?: AxiosRequestConfig<any> | undefined;
|
|
182
|
+
} | undefined) => import("react-query").UseMutationResult<AxiosResponse<AddonsCodeguardDatabaseBackupRestore200, any>, TError, {
|
|
183
|
+
addonId: number;
|
|
184
|
+
data: AddonsCodeguardDatabaseBackupRestoreBody;
|
|
185
|
+
}, TContext>;
|
|
26
186
|
/**
|
|
27
187
|
* Return info about a specific account
|
|
28
188
|
* @summary hosting info
|
|
@@ -38,37 +198,33 @@ export declare const useHostingInfo: <TData = AxiosResponse<HostingInfo200, any>
|
|
|
38
198
|
queryKey: QueryKey;
|
|
39
199
|
};
|
|
40
200
|
/**
|
|
41
|
-
*
|
|
42
|
-
* @summary
|
|
201
|
+
* Obtain a list of addons.
|
|
202
|
+
* @summary hosting addons
|
|
43
203
|
*/
|
|
44
|
-
export declare const
|
|
45
|
-
export declare const
|
|
46
|
-
export declare type
|
|
47
|
-
export declare type
|
|
48
|
-
export declare const
|
|
49
|
-
query?: UseQueryOptions<AxiosResponse<
|
|
204
|
+
export declare const hostingAddons: (hostingId: number, params?: HostingAddonsParams | undefined, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<HostingAddons200>>;
|
|
205
|
+
export declare const getHostingAddonsQueryKey: (hostingId: number, params?: HostingAddonsParams | undefined) => (string | HostingAddonsParams)[];
|
|
206
|
+
export declare type HostingAddonsQueryResult = NonNullable<AsyncReturnType<typeof hostingAddons>>;
|
|
207
|
+
export declare type HostingAddonsQueryError = AxiosError<unknown>;
|
|
208
|
+
export declare const useHostingAddons: <TData = AxiosResponse<HostingAddons200, any>, TError = AxiosError<unknown, any>>(hostingId: number, params?: HostingAddonsParams | undefined, options?: {
|
|
209
|
+
query?: UseQueryOptions<AxiosResponse<HostingAddons200, any>, TError, TData, QueryKey> | undefined;
|
|
50
210
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
51
211
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
52
212
|
queryKey: QueryKey;
|
|
53
213
|
};
|
|
54
214
|
/**
|
|
55
|
-
*
|
|
56
|
-
* @summary
|
|
57
|
-
*/
|
|
58
|
-
export declare const
|
|
59
|
-
export declare
|
|
60
|
-
export declare type
|
|
61
|
-
export declare type
|
|
62
|
-
export declare const
|
|
63
|
-
|
|
64
|
-
hostingId: number;
|
|
65
|
-
data: PostHostingFtpV1Body;
|
|
66
|
-
}, TContext> | undefined;
|
|
215
|
+
* List FTP accounts.
|
|
216
|
+
* @summary hosting ftp list
|
|
217
|
+
*/
|
|
218
|
+
export declare const hostingFtpList: (hostingId: number, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<HostingFtpList200>>;
|
|
219
|
+
export declare const getHostingFtpListQueryKey: (hostingId: number) => string[];
|
|
220
|
+
export declare type HostingFtpListQueryResult = NonNullable<AsyncReturnType<typeof hostingFtpList>>;
|
|
221
|
+
export declare type HostingFtpListQueryError = AxiosError<unknown>;
|
|
222
|
+
export declare const useHostingFtpList: <TData = AxiosResponse<HostingFtpList200, any>, TError = AxiosError<unknown, any>>(hostingId: number, options?: {
|
|
223
|
+
query?: UseQueryOptions<AxiosResponse<HostingFtpList200, any>, TError, TData, QueryKey> | undefined;
|
|
67
224
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
68
|
-
} | undefined) =>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, TContext>;
|
|
225
|
+
} | undefined) => UseQueryResult<TData, TError> & {
|
|
226
|
+
queryKey: QueryKey;
|
|
227
|
+
};
|
|
72
228
|
/**
|
|
73
229
|
* Return an SSO token or login URL for this site (if supported).
|
|
74
230
|
* @summary sites sso
|
|
@@ -85,14 +241,14 @@ export declare const useSitesSso: <TData = AxiosResponse<SitesSso200, any>, TErr
|
|
|
85
241
|
};
|
|
86
242
|
/**
|
|
87
243
|
* Return info about a specific site
|
|
88
|
-
* @summary
|
|
89
|
-
*/
|
|
90
|
-
export declare const
|
|
91
|
-
export declare const
|
|
92
|
-
export declare type
|
|
93
|
-
export declare type
|
|
94
|
-
export declare const
|
|
95
|
-
query?: UseQueryOptions<AxiosResponse<
|
|
244
|
+
* @summary sites info
|
|
245
|
+
*/
|
|
246
|
+
export declare const sitesInfo: (siteId: number, options?: AxiosRequestConfig<any> | undefined) => Promise<AxiosResponse<SitesInfo200>>;
|
|
247
|
+
export declare const getSitesInfoQueryKey: (siteId: number) => string[];
|
|
248
|
+
export declare type SitesInfoQueryResult = NonNullable<AsyncReturnType<typeof sitesInfo>>;
|
|
249
|
+
export declare type SitesInfoQueryError = AxiosError<unknown>;
|
|
250
|
+
export declare const useSitesInfo: <TData = AxiosResponse<SitesInfo200, any>, TError = AxiosError<unknown, any>>(siteId: number, options?: {
|
|
251
|
+
query?: UseQueryOptions<AxiosResponse<SitesInfo200, any>, TError, TData, QueryKey> | undefined;
|
|
96
252
|
axios?: AxiosRequestConfig<any> | undefined;
|
|
97
253
|
} | undefined) => UseQueryResult<TData, TError> & {
|
|
98
254
|
queryKey: QueryKey;
|