hostinger-api-sdk 2.1.1 → 2.1.3
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 +1281 -259
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +566 -9
- package/dist/api.js +874 -29
- 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 +566 -9
- package/dist/esm/api.js +860 -19
- 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/HostingCDNApi.md +238 -0
- package/docs/HostingCacheApi.md +1 -1
- package/docs/HostingV1CdnCdnStatusResource.md +20 -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/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)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ReachV1FormsRemoveTagRequest
|
|
2
|
+
|
|
3
|
+
Tag the form stops applying to future submitters
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**tag_uuid** | **string** | | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ReachV1FormsRemoveTagRequest } from '@hostinger/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: ReachV1FormsRemoveTagRequest = {
|
|
17
|
+
tag_uuid,
|
|
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,21 @@
|
|
|
1
|
+
# ReachV1FormsStoreRequest
|
|
2
|
+
|
|
3
|
+
Create a draft form
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**name** | **string** | Form name. Letters, digits, spaces and - . \' _ only. | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ReachV1FormsStoreRequest } from '@hostinger/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: ReachV1FormsStoreRequest = {
|
|
17
|
+
name,
|
|
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,23 @@
|
|
|
1
|
+
# ReachV1FormsUpdateRequest
|
|
2
|
+
|
|
3
|
+
Rename a form and/or change its status. Send at least one field.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**name** | **string** | Form name. Letters, digits, spaces and - . \' _ only. | [optional] [default to undefined]
|
|
10
|
+
**status** | **string** | `active` takes the form live, `paused` and `draft` stop it accepting submissions. | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { ReachV1FormsUpdateRequest } from '@hostinger/sdk';
|
|
16
|
+
|
|
17
|
+
const instance: ReachV1FormsUpdateRequest = {
|
|
18
|
+
name,
|
|
19
|
+
status,
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[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,21 @@
|
|
|
1
|
+
# ReachV1FormsUpdateTemplateRequest
|
|
2
|
+
|
|
3
|
+
Save the design of a form
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**content** | **string** | HTML of the form design. After sanitizing it must still contain a form container (`data-reach-form`), an email input (`data-reach-field=\"email\"`) and a submit button (`data-reach-submit`). | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ReachV1FormsUpdateTemplateRequest } from '@hostinger/sdk';
|
|
15
|
+
|
|
16
|
+
const instance: ReachV1FormsUpdateTemplateRequest = {
|
|
17
|
+
content,
|
|
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)
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.1.
|
|
6
|
+
* API Version: 2.1.3
|
|
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
|