hostinger-api-sdk 2.1.2 → 2.2.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/README.md +2 -2
- package/api.ts +812 -8
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +459 -5
- package/dist/api.js +636 -18
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +459 -5
- package/dist/esm/api.js +626 -8
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/HostingNodeJSApi.md +70 -0
- package/docs/HostingV1NodeJsGetBuildSettingsFromRepositoryRequest.md +26 -0
- package/docs/ReachFormsApi.md +369 -1
- package/docs/ReachV1FormsAssignTagsRequest.md +21 -0
- package/docs/ReachV1FormsFormTemplateVersionResource.md +29 -0
- package/docs/ReachV1FormsRemoveTagRequest.md +21 -0
- package/docs/ReachV1FormsStoreRequest.md +21 -0
- package/docs/ReachV1FormsUpdateRequest.md +23 -0
- package/docs/ReachV1FormsUpdateTemplateRequest.md +21 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.2.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.2.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.2.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.2.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.2.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.2.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
|
@@ -13,7 +13,7 @@ export class Configuration {
|
|
|
13
13
|
var _a;
|
|
14
14
|
this.accessToken = param.accessToken;
|
|
15
15
|
this.basePath = param.basePath;
|
|
16
|
-
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.2.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.2.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.2.0
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
9
9
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.2.0
|
|
5
5
|
*
|
|
6
6
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
7
7
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Hostinger API
|
|
6
6
|
*
|
|
7
|
-
* API Version: 2.
|
|
7
|
+
* API Version: 2.2.0
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
|
|
10
10
|
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
|
package/docs/HostingNodeJSApi.md
CHANGED
|
@@ -9,6 +9,7 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
9
9
|
|[**getNodeJSBuildLogsV1**](#getnodejsbuildlogsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs | Get NodeJS build logs|
|
|
10
10
|
|[**getNodeJsBuildDetailsV1**](#getnodejsbuilddetailsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid} | Get Node.js build details|
|
|
11
11
|
|[**getNodeJsBuildSettingsFromArchiveV1**](#getnodejsbuildsettingsfromarchivev1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-archive | Get Node.js build settings from archive|
|
|
12
|
+
|[**getNodeJsBuildSettingsFromRepositoryV1**](#getnodejsbuildsettingsfromrepositoryv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings/from-repository | Get Node.js build settings from repository|
|
|
12
13
|
|[**getNodeJsBuildSettingsV1**](#getnodejsbuildsettingsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/settings | Get Node.js build settings|
|
|
13
14
|
|[**getNodeJsRuntimeLogsV1**](#getnodejsruntimelogsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/runtime-logs | Get Node.js runtime logs|
|
|
14
15
|
|[**listNodeJSBuildsV1**](#listnodejsbuildsv1) | **GET** /api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds | List NodeJS builds|
|
|
@@ -294,6 +295,75 @@ const { status, data } = await apiInstance.getNodeJsBuildSettingsFromArchiveV1(
|
|
|
294
295
|
| **archivePath** | [**string**] | The path to the archive file relative to the document root of the vhost | defaults to undefined|
|
|
295
296
|
|
|
296
297
|
|
|
298
|
+
### Return type
|
|
299
|
+
|
|
300
|
+
**HostingV1NodeJsBuildSettingsResource**
|
|
301
|
+
|
|
302
|
+
### Authorization
|
|
303
|
+
|
|
304
|
+
[apiToken](../README.md#apiToken)
|
|
305
|
+
|
|
306
|
+
### HTTP request headers
|
|
307
|
+
|
|
308
|
+
- **Content-Type**: Not defined
|
|
309
|
+
- **Accept**: application/json
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
### HTTP response details
|
|
313
|
+
| Status code | Description | Response headers |
|
|
314
|
+
|-------------|-------------|------------------|
|
|
315
|
+
|**200** | Success response | - |
|
|
316
|
+
|**422** | Validation error response | - |
|
|
317
|
+
|**401** | Unauthenticated response | - |
|
|
318
|
+
|**500** | Error response | - |
|
|
319
|
+
|
|
320
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
321
|
+
|
|
322
|
+
# **getNodeJsBuildSettingsFromRepositoryV1**
|
|
323
|
+
> HostingV1NodeJsBuildSettingsResource getNodeJsBuildSettingsFromRepositoryV1()
|
|
324
|
+
|
|
325
|
+
Determine the build settings for a Node.js application from the package.json file of a branch in a Git repository. Use before starting a Git-source build to find out the auto-detected settings instead of guessing them. The repository is read through a Git installation: take `installation_uuid` from `List Git installations` and `owner` and `repository` from `List Git installation repositories`. Returns 422 when the installation is not found, the repository or branch is not found, or the branch has no package.json.
|
|
326
|
+
|
|
327
|
+
### Example
|
|
328
|
+
|
|
329
|
+
```typescript
|
|
330
|
+
import {
|
|
331
|
+
HostingNodeJSApi,
|
|
332
|
+
Configuration
|
|
333
|
+
} from '@hostinger/sdk';
|
|
334
|
+
|
|
335
|
+
const configuration = new Configuration();
|
|
336
|
+
const apiInstance = new HostingNodeJSApi(configuration);
|
|
337
|
+
|
|
338
|
+
let username: string; // (default to undefined)
|
|
339
|
+
let domain: string; //Domain name (default to undefined)
|
|
340
|
+
let owner: string; //Repository owner login. GitLab group paths use slashes. (default to undefined)
|
|
341
|
+
let repository: string; //Repository name without the .git suffix (default to undefined)
|
|
342
|
+
let branch: string; //Branch whose package.json is inspected (default to undefined)
|
|
343
|
+
let installationUuid: string; //Git installation used to access the repository, taken from `List Git installations` (default to undefined)
|
|
344
|
+
|
|
345
|
+
const { status, data } = await apiInstance.getNodeJsBuildSettingsFromRepositoryV1(
|
|
346
|
+
username,
|
|
347
|
+
domain,
|
|
348
|
+
owner,
|
|
349
|
+
repository,
|
|
350
|
+
branch,
|
|
351
|
+
installationUuid
|
|
352
|
+
);
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Parameters
|
|
356
|
+
|
|
357
|
+
|Name | Type | Description | Notes|
|
|
358
|
+
|------------- | ------------- | ------------- | -------------|
|
|
359
|
+
| **username** | [**string**] | | defaults to undefined|
|
|
360
|
+
| **domain** | [**string**] | Domain name | defaults to undefined|
|
|
361
|
+
| **owner** | [**string**] | Repository owner login. GitLab group paths use slashes. | defaults to undefined|
|
|
362
|
+
| **repository** | [**string**] | Repository name without the .git suffix | defaults to undefined|
|
|
363
|
+
| **branch** | [**string**] | Branch whose package.json is inspected | defaults to undefined|
|
|
364
|
+
| **installationUuid** | [**string**] | Git installation used to access the repository, taken from `List Git installations` | defaults to undefined|
|
|
365
|
+
|
|
366
|
+
|
|
297
367
|
### Return type
|
|
298
368
|
|
|
299
369
|
**HostingV1NodeJsBuildSettingsResource**
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# HostingV1NodeJsGetBuildSettingsFromRepositoryRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**owner** | **string** | Repository owner login, as returned by `List Git installation repositories`. GitLab group paths use slashes. | [default to undefined]
|
|
9
|
+
**repository** | **string** | Repository name without the .git suffix | [default to undefined]
|
|
10
|
+
**branch** | **string** | Branch whose package.json is inspected | [default to undefined]
|
|
11
|
+
**installation_uuid** | **string** | Git installation used to access the repository, taken from `List Git installations` | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { HostingV1NodeJsGetBuildSettingsFromRepositoryRequest } from '@hostinger/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: HostingV1NodeJsGetBuildSettingsFromRepositoryRequest = {
|
|
19
|
+
owner,
|
|
20
|
+
repository,
|
|
21
|
+
branch,
|
|
22
|
+
installation_uuid,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/ReachFormsApi.md
CHANGED
|
@@ -4,9 +4,134 @@ All URIs are relative to *https://developers.hostinger.com*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**addFormSubmitterTagsV1**](#addformsubmittertagsv1) | **POST** /api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags | Add form submitter tags|
|
|
8
|
+
|[**createFormV1**](#createformv1) | **POST** /api/reach/v1/profiles/{profileUuid}/forms | Create form|
|
|
7
9
|
|[**deleteFormV1**](#deleteformv1) | **DELETE** /api/reach/v1/profiles/{profileUuid}/forms/{formUuid} | Delete form|
|
|
10
|
+
|[**duplicateFormV1**](#duplicateformv1) | **POST** /api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/duplicate | Duplicate form|
|
|
8
11
|
|[**getFormDetailsV1**](#getformdetailsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/forms/{formUuid} | Get form details|
|
|
9
12
|
|[**listFormsV1**](#listformsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/forms | List forms|
|
|
13
|
+
|[**removeFormSubmitterTagV1**](#removeformsubmittertagv1) | **DELETE** /api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/tags | Remove form submitter tag|
|
|
14
|
+
|[**updateFormTemplateV1**](#updateformtemplatev1) | **PATCH** /api/reach/v1/profiles/{profileUuid}/forms/{formUuid}/template | Update form template|
|
|
15
|
+
|[**updateFormV1**](#updateformv1) | **PATCH** /api/reach/v1/profiles/{profileUuid}/forms/{formUuid} | Update form|
|
|
16
|
+
|
|
17
|
+
# **addFormSubmitterTagsV1**
|
|
18
|
+
> CommonSuccessEmptyResource addFormSubmitterTagsV1(reachV1FormsAssignTagsRequest)
|
|
19
|
+
|
|
20
|
+
Add tags to a form so that every contact who submits it from now on receives them. A tag the form already has is skipped; an unknown tag is rejected. Contacts who submitted earlier are not tagged.
|
|
21
|
+
|
|
22
|
+
### Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import {
|
|
26
|
+
ReachFormsApi,
|
|
27
|
+
Configuration,
|
|
28
|
+
ReachV1FormsAssignTagsRequest
|
|
29
|
+
} from '@hostinger/sdk';
|
|
30
|
+
|
|
31
|
+
const configuration = new Configuration();
|
|
32
|
+
const apiInstance = new ReachFormsApi(configuration);
|
|
33
|
+
|
|
34
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
35
|
+
let formUuid: string; //Form uuid parameter (default to undefined)
|
|
36
|
+
let reachV1FormsAssignTagsRequest: ReachV1FormsAssignTagsRequest; //
|
|
37
|
+
|
|
38
|
+
const { status, data } = await apiInstance.addFormSubmitterTagsV1(
|
|
39
|
+
profileUuid,
|
|
40
|
+
formUuid,
|
|
41
|
+
reachV1FormsAssignTagsRequest
|
|
42
|
+
);
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Parameters
|
|
46
|
+
|
|
47
|
+
|Name | Type | Description | Notes|
|
|
48
|
+
|------------- | ------------- | ------------- | -------------|
|
|
49
|
+
| **reachV1FormsAssignTagsRequest** | **ReachV1FormsAssignTagsRequest**| | |
|
|
50
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
51
|
+
| **formUuid** | [**string**] | Form uuid parameter | defaults to undefined|
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Return type
|
|
55
|
+
|
|
56
|
+
**CommonSuccessEmptyResource**
|
|
57
|
+
|
|
58
|
+
### Authorization
|
|
59
|
+
|
|
60
|
+
[apiToken](../README.md#apiToken)
|
|
61
|
+
|
|
62
|
+
### HTTP request headers
|
|
63
|
+
|
|
64
|
+
- **Content-Type**: application/json
|
|
65
|
+
- **Accept**: application/json
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### HTTP response details
|
|
69
|
+
| Status code | Description | Response headers |
|
|
70
|
+
|-------------|-------------|------------------|
|
|
71
|
+
|**200** | Success empty response | - |
|
|
72
|
+
|**422** | Validation error response | - |
|
|
73
|
+
|**401** | Unauthenticated response | - |
|
|
74
|
+
|**500** | Error response | - |
|
|
75
|
+
|
|
76
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
77
|
+
|
|
78
|
+
# **createFormV1**
|
|
79
|
+
> ReachV1FormsFormResource createFormV1(reachV1FormsStoreRequest)
|
|
80
|
+
|
|
81
|
+
Create an empty draft form. Reach also adds an automatic `form:{name}` tag that every submitter receives. A draft has no design and is not reachable by visitors: save a design with the update form template operation, then take the form live by setting its status to `active`. Creating a form does not consume AI credits.
|
|
82
|
+
|
|
83
|
+
### Example
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import {
|
|
87
|
+
ReachFormsApi,
|
|
88
|
+
Configuration,
|
|
89
|
+
ReachV1FormsStoreRequest
|
|
90
|
+
} from '@hostinger/sdk';
|
|
91
|
+
|
|
92
|
+
const configuration = new Configuration();
|
|
93
|
+
const apiInstance = new ReachFormsApi(configuration);
|
|
94
|
+
|
|
95
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
96
|
+
let reachV1FormsStoreRequest: ReachV1FormsStoreRequest; //
|
|
97
|
+
|
|
98
|
+
const { status, data } = await apiInstance.createFormV1(
|
|
99
|
+
profileUuid,
|
|
100
|
+
reachV1FormsStoreRequest
|
|
101
|
+
);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Parameters
|
|
105
|
+
|
|
106
|
+
|Name | Type | Description | Notes|
|
|
107
|
+
|------------- | ------------- | ------------- | -------------|
|
|
108
|
+
| **reachV1FormsStoreRequest** | **ReachV1FormsStoreRequest**| | |
|
|
109
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### Return type
|
|
113
|
+
|
|
114
|
+
**ReachV1FormsFormResource**
|
|
115
|
+
|
|
116
|
+
### Authorization
|
|
117
|
+
|
|
118
|
+
[apiToken](../README.md#apiToken)
|
|
119
|
+
|
|
120
|
+
### HTTP request headers
|
|
121
|
+
|
|
122
|
+
- **Content-Type**: application/json
|
|
123
|
+
- **Accept**: application/json
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### HTTP response details
|
|
127
|
+
| Status code | Description | Response headers |
|
|
128
|
+
|-------------|-------------|------------------|
|
|
129
|
+
|**200** | Success response | - |
|
|
130
|
+
|**422** | Validation error response | - |
|
|
131
|
+
|**401** | Unauthenticated response | - |
|
|
132
|
+
|**500** | Error response | - |
|
|
133
|
+
|
|
134
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
10
135
|
|
|
11
136
|
# **deleteFormV1**
|
|
12
137
|
> CommonSuccessEmptyResource deleteFormV1()
|
|
@@ -65,6 +190,62 @@ const { status, data } = await apiInstance.deleteFormV1(
|
|
|
65
190
|
|
|
66
191
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
67
192
|
|
|
193
|
+
# **duplicateFormV1**
|
|
194
|
+
> ReachV1FormsFormResource duplicateFormV1()
|
|
195
|
+
|
|
196
|
+
Copy a form into a new draft form with the same name and design. The copy shares the source\'s automatic `form:{name}` tag; other submitter tags are not copied. The copy is not live until its status is set to `active`.
|
|
197
|
+
|
|
198
|
+
### Example
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import {
|
|
202
|
+
ReachFormsApi,
|
|
203
|
+
Configuration
|
|
204
|
+
} from '@hostinger/sdk';
|
|
205
|
+
|
|
206
|
+
const configuration = new Configuration();
|
|
207
|
+
const apiInstance = new ReachFormsApi(configuration);
|
|
208
|
+
|
|
209
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
210
|
+
let formUuid: string; //Form uuid parameter (default to undefined)
|
|
211
|
+
|
|
212
|
+
const { status, data } = await apiInstance.duplicateFormV1(
|
|
213
|
+
profileUuid,
|
|
214
|
+
formUuid
|
|
215
|
+
);
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Parameters
|
|
219
|
+
|
|
220
|
+
|Name | Type | Description | Notes|
|
|
221
|
+
|------------- | ------------- | ------------- | -------------|
|
|
222
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
223
|
+
| **formUuid** | [**string**] | Form uuid parameter | defaults to undefined|
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
### Return type
|
|
227
|
+
|
|
228
|
+
**ReachV1FormsFormResource**
|
|
229
|
+
|
|
230
|
+
### Authorization
|
|
231
|
+
|
|
232
|
+
[apiToken](../README.md#apiToken)
|
|
233
|
+
|
|
234
|
+
### HTTP request headers
|
|
235
|
+
|
|
236
|
+
- **Content-Type**: Not defined
|
|
237
|
+
- **Accept**: application/json
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
### HTTP response details
|
|
241
|
+
| Status code | Description | Response headers |
|
|
242
|
+
|-------------|-------------|------------------|
|
|
243
|
+
|**200** | Success response | - |
|
|
244
|
+
|**401** | Unauthenticated response | - |
|
|
245
|
+
|**500** | Error response | - |
|
|
246
|
+
|
|
247
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
248
|
+
|
|
68
249
|
# **getFormDetailsV1**
|
|
69
250
|
> ReachV1FormsFormDetailsResource getFormDetailsV1()
|
|
70
251
|
|
|
@@ -140,11 +321,13 @@ const apiInstance = new ReachFormsApi(configuration);
|
|
|
140
321
|
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
141
322
|
let page: number; //Page number (optional) (default to undefined)
|
|
142
323
|
let perPage: number; //Number of items per page (optional) (default to 25)
|
|
324
|
+
let status: 'active' | 'paused' | 'draft'; //Return only forms with this status. (optional) (default to undefined)
|
|
143
325
|
|
|
144
326
|
const { status, data } = await apiInstance.listFormsV1(
|
|
145
327
|
profileUuid,
|
|
146
328
|
page,
|
|
147
|
-
perPage
|
|
329
|
+
perPage,
|
|
330
|
+
status
|
|
148
331
|
);
|
|
149
332
|
```
|
|
150
333
|
|
|
@@ -155,6 +338,7 @@ const { status, data } = await apiInstance.listFormsV1(
|
|
|
155
338
|
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
156
339
|
| **page** | [**number**] | Page number | (optional) defaults to undefined|
|
|
157
340
|
| **perPage** | [**number**] | Number of items per page | (optional) defaults to 25|
|
|
341
|
+
| **status** | [**'active' | 'paused' | 'draft'**]**Array<'active' | 'paused' | 'draft'>** | Return only forms with this status. | (optional) defaults to undefined|
|
|
158
342
|
|
|
159
343
|
|
|
160
344
|
### Return type
|
|
@@ -180,3 +364,187 @@ const { status, data } = await apiInstance.listFormsV1(
|
|
|
180
364
|
|
|
181
365
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
182
366
|
|
|
367
|
+
# **removeFormSubmitterTagV1**
|
|
368
|
+
> CommonSuccessEmptyResource removeFormSubmitterTagV1(reachV1FormsRemoveTagRequest)
|
|
369
|
+
|
|
370
|
+
Stop a form from applying a tag to its future submitters. Succeeds also when the form did not have the tag. Contacts who already received the tag keep it, and the tag itself is not deleted. The automatic `form:{name}` tag cannot be removed and is rejected with a conflict.
|
|
371
|
+
|
|
372
|
+
### Example
|
|
373
|
+
|
|
374
|
+
```typescript
|
|
375
|
+
import {
|
|
376
|
+
ReachFormsApi,
|
|
377
|
+
Configuration,
|
|
378
|
+
ReachV1FormsRemoveTagRequest
|
|
379
|
+
} from '@hostinger/sdk';
|
|
380
|
+
|
|
381
|
+
const configuration = new Configuration();
|
|
382
|
+
const apiInstance = new ReachFormsApi(configuration);
|
|
383
|
+
|
|
384
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
385
|
+
let formUuid: string; //Form uuid parameter (default to undefined)
|
|
386
|
+
let reachV1FormsRemoveTagRequest: ReachV1FormsRemoveTagRequest; //
|
|
387
|
+
|
|
388
|
+
const { status, data } = await apiInstance.removeFormSubmitterTagV1(
|
|
389
|
+
profileUuid,
|
|
390
|
+
formUuid,
|
|
391
|
+
reachV1FormsRemoveTagRequest
|
|
392
|
+
);
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Parameters
|
|
396
|
+
|
|
397
|
+
|Name | Type | Description | Notes|
|
|
398
|
+
|------------- | ------------- | ------------- | -------------|
|
|
399
|
+
| **reachV1FormsRemoveTagRequest** | **ReachV1FormsRemoveTagRequest**| | |
|
|
400
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
401
|
+
| **formUuid** | [**string**] | Form uuid parameter | defaults to undefined|
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
### Return type
|
|
405
|
+
|
|
406
|
+
**CommonSuccessEmptyResource**
|
|
407
|
+
|
|
408
|
+
### Authorization
|
|
409
|
+
|
|
410
|
+
[apiToken](../README.md#apiToken)
|
|
411
|
+
|
|
412
|
+
### HTTP request headers
|
|
413
|
+
|
|
414
|
+
- **Content-Type**: application/json
|
|
415
|
+
- **Accept**: application/json
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
### HTTP response details
|
|
419
|
+
| Status code | Description | Response headers |
|
|
420
|
+
|-------------|-------------|------------------|
|
|
421
|
+
|**200** | Success empty response | - |
|
|
422
|
+
|**422** | Validation error response | - |
|
|
423
|
+
|**401** | Unauthenticated response | - |
|
|
424
|
+
|**409** | Error response | - |
|
|
425
|
+
|**500** | Error response | - |
|
|
426
|
+
|
|
427
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
428
|
+
|
|
429
|
+
# **updateFormTemplateV1**
|
|
430
|
+
> ReachV1FormsFormTemplateVersionResource updateFormTemplateV1(reachV1FormsUpdateTemplateRequest)
|
|
431
|
+
|
|
432
|
+
Save `content` as the latest design of a form and return the stored version. The HTML is sanitized and, unless the plan allows removing it, the Reach signature is added. Visitors submit the form with an `email` field (required) and optional `name`, `surname` and `phone`. After sanitizing, the design must contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`); otherwise the request fails with `422` and `errors.content` lists `missing_form_container`, `missing_email_field` and/or `missing_submit_button`. A `draft` or `paused` form stays unreachable until its status is set to `active`, which publishes this design. On a form that is already `active` the saved design is not public until the form is paused and set to `active` again. Saving a design does not consume AI credits.
|
|
433
|
+
|
|
434
|
+
### Example
|
|
435
|
+
|
|
436
|
+
```typescript
|
|
437
|
+
import {
|
|
438
|
+
ReachFormsApi,
|
|
439
|
+
Configuration,
|
|
440
|
+
ReachV1FormsUpdateTemplateRequest
|
|
441
|
+
} from '@hostinger/sdk';
|
|
442
|
+
|
|
443
|
+
const configuration = new Configuration();
|
|
444
|
+
const apiInstance = new ReachFormsApi(configuration);
|
|
445
|
+
|
|
446
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
447
|
+
let formUuid: string; //Form uuid parameter (default to undefined)
|
|
448
|
+
let reachV1FormsUpdateTemplateRequest: ReachV1FormsUpdateTemplateRequest; //
|
|
449
|
+
|
|
450
|
+
const { status, data } = await apiInstance.updateFormTemplateV1(
|
|
451
|
+
profileUuid,
|
|
452
|
+
formUuid,
|
|
453
|
+
reachV1FormsUpdateTemplateRequest
|
|
454
|
+
);
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
### Parameters
|
|
458
|
+
|
|
459
|
+
|Name | Type | Description | Notes|
|
|
460
|
+
|------------- | ------------- | ------------- | -------------|
|
|
461
|
+
| **reachV1FormsUpdateTemplateRequest** | **ReachV1FormsUpdateTemplateRequest**| | |
|
|
462
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
463
|
+
| **formUuid** | [**string**] | Form uuid parameter | defaults to undefined|
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
### Return type
|
|
467
|
+
|
|
468
|
+
**ReachV1FormsFormTemplateVersionResource**
|
|
469
|
+
|
|
470
|
+
### Authorization
|
|
471
|
+
|
|
472
|
+
[apiToken](../README.md#apiToken)
|
|
473
|
+
|
|
474
|
+
### HTTP request headers
|
|
475
|
+
|
|
476
|
+
- **Content-Type**: application/json
|
|
477
|
+
- **Accept**: application/json
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
### HTTP response details
|
|
481
|
+
| Status code | Description | Response headers |
|
|
482
|
+
|-------------|-------------|------------------|
|
|
483
|
+
|**200** | Success response | - |
|
|
484
|
+
|**422** | Validation error response | - |
|
|
485
|
+
|**401** | Unauthenticated response | - |
|
|
486
|
+
|**500** | Error response | - |
|
|
487
|
+
|
|
488
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
489
|
+
|
|
490
|
+
# **updateFormV1**
|
|
491
|
+
> ReachV1FormsFormResource updateFormV1(reachV1FormsUpdateRequest)
|
|
492
|
+
|
|
493
|
+
Rename a form and/or change its status. Setting a `draft` or `paused` form to `active` takes it live: its latest saved design is published and visitors can submit it. `paused` and `draft` stop the form from accepting submissions. A form is not reachable by visitors until it is taken live. Design changes saved while the form is already `active` stay unpublished until the form is paused and set to `active` again. Renaming does not rename the automatic `form:{name}` tag.
|
|
494
|
+
|
|
495
|
+
### Example
|
|
496
|
+
|
|
497
|
+
```typescript
|
|
498
|
+
import {
|
|
499
|
+
ReachFormsApi,
|
|
500
|
+
Configuration,
|
|
501
|
+
ReachV1FormsUpdateRequest
|
|
502
|
+
} from '@hostinger/sdk';
|
|
503
|
+
|
|
504
|
+
const configuration = new Configuration();
|
|
505
|
+
const apiInstance = new ReachFormsApi(configuration);
|
|
506
|
+
|
|
507
|
+
let profileUuid: string; //Profile uuid parameter (default to undefined)
|
|
508
|
+
let formUuid: string; //Form uuid parameter (default to undefined)
|
|
509
|
+
let reachV1FormsUpdateRequest: ReachV1FormsUpdateRequest; //
|
|
510
|
+
|
|
511
|
+
const { status, data } = await apiInstance.updateFormV1(
|
|
512
|
+
profileUuid,
|
|
513
|
+
formUuid,
|
|
514
|
+
reachV1FormsUpdateRequest
|
|
515
|
+
);
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### Parameters
|
|
519
|
+
|
|
520
|
+
|Name | Type | Description | Notes|
|
|
521
|
+
|------------- | ------------- | ------------- | -------------|
|
|
522
|
+
| **reachV1FormsUpdateRequest** | **ReachV1FormsUpdateRequest**| | |
|
|
523
|
+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
|
|
524
|
+
| **formUuid** | [**string**] | Form uuid parameter | defaults to undefined|
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
### Return type
|
|
528
|
+
|
|
529
|
+
**ReachV1FormsFormResource**
|
|
530
|
+
|
|
531
|
+
### Authorization
|
|
532
|
+
|
|
533
|
+
[apiToken](../README.md#apiToken)
|
|
534
|
+
|
|
535
|
+
### HTTP request headers
|
|
536
|
+
|
|
537
|
+
- **Content-Type**: application/json
|
|
538
|
+
- **Accept**: application/json
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
### HTTP response details
|
|
542
|
+
| Status code | Description | Response headers |
|
|
543
|
+
|-------------|-------------|------------------|
|
|
544
|
+
|**200** | Success response | - |
|
|
545
|
+
|**422** | Validation error response | - |
|
|
546
|
+
|**401** | Unauthenticated response | - |
|
|
547
|
+
|**500** | Error response | - |
|
|
548
|
+
|
|
549
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
550
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ReachV1FormsAssignTagsRequest
|
|
2
|
+
|
|
3
|
+
Tags every future submitter of the form receives
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**tag_uuids** | **Array<string>** | | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ReachV1FormsAssignTagsRequest } from '@hostinger/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: ReachV1FormsAssignTagsRequest = {
|
|
17
|
+
tag_uuids,
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ReachV1FormsFormTemplateVersionResource
|
|
2
|
+
|
|
3
|
+
The stored version of a saved form design.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**uuid** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**path** | **string** | Storage path of the template HTML, relative to the storage directory of this profile. | [optional] [default to undefined]
|
|
11
|
+
**edit_type** | **string** | Whether the design was saved by hand or by the AI builder. | [optional] [default to undefined]
|
|
12
|
+
**created_at** | **string** | | [optional] [default to undefined]
|
|
13
|
+
**updated_at** | **string** | | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { ReachV1FormsFormTemplateVersionResource } from '@hostinger/sdk';
|
|
19
|
+
|
|
20
|
+
const instance: ReachV1FormsFormTemplateVersionResource = {
|
|
21
|
+
uuid,
|
|
22
|
+
path,
|
|
23
|
+
edit_type,
|
|
24
|
+
created_at,
|
|
25
|
+
updated_at,
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|