Skip to content

Commit 96bdbb0

Browse files
chore: sdk update
1 parent 124a1a6 commit 96bdbb0

14 files changed

Lines changed: 816 additions & 9 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## @hostinger/sdk@1.46.3
1+
## @hostinger/sdk@1.46.4
22

33
For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
44

55
### Usage
66

77
```
8-
npm install @hostinger/sdk@1.46.3 --save
8+
npm install @hostinger/sdk@1.46.4 --save
99
```

api.ts

Lines changed: 483 additions & 1 deletion
Large diffs are not rendered by default.

base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 1.46.2
6+
* API Version: 1.46.3
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 1.46.2
6+
* API Version: 1.46.3
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api

configuration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 1.46.2
6+
* API Version: 1.46.3
77
*
88
* NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
99
* If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -48,7 +48,7 @@ export class Configuration {
4848
this.baseOptions = {
4949
...param.baseOptions,
5050
headers: {
51-
'User-Agent': "hostinger-typescript-sdk/1.46.3",
51+
'User-Agent': "hostinger-typescript-sdk/1.46.4",
5252
...param.baseOptions?.headers,
5353
},
5454
};

docs/ReachCampaignsApi.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,69 @@ All URIs are relative to *https://developers.hostinger.com*
44

55
|Method | HTTP request | Description|
66
|------------- | ------------- | -------------|
7+
|[**createADraftCampaignV1**](#createadraftcampaignv1) | **POST** /api/reach/v1/profiles/{profileUuid}/campaigns | Create a draft campaign|
78
|[**getCampaignDetailsV1**](#getcampaigndetailsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid} | Get campaign details|
89
|[**getCampaignPerformanceV1**](#getcampaignperformancev1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns/{campaignUuid}/statistics | Get campaign performance|
910
|[**listCampaignsV1**](#listcampaignsv1) | **GET** /api/reach/v1/profiles/{profileUuid}/campaigns | List campaigns|
1011

12+
# **createADraftCampaignV1**
13+
> ReachV1CampaignsCreatedCampaignResource createADraftCampaignV1(reachV1CampaignsStoreRequest)
14+
15+
Create a campaign in a profile. The campaign is created as a draft, so nothing is sent and no contact is touched. It has no audience yet either - targeting and scheduling are not part of this request, the draft is finished and sent from the Reach interface.
16+
17+
### Example
18+
19+
```typescript
20+
import {
21+
ReachCampaignsApi,
22+
Configuration,
23+
ReachV1CampaignsStoreRequest
24+
} from '@hostinger/sdk';
25+
26+
const configuration = new Configuration();
27+
const apiInstance = new ReachCampaignsApi(configuration);
28+
29+
let profileUuid: string; //Profile uuid parameter (default to undefined)
30+
let reachV1CampaignsStoreRequest: ReachV1CampaignsStoreRequest; //
31+
32+
const { status, data } = await apiInstance.createADraftCampaignV1(
33+
profileUuid,
34+
reachV1CampaignsStoreRequest
35+
);
36+
```
37+
38+
### Parameters
39+
40+
|Name | Type | Description | Notes|
41+
|------------- | ------------- | ------------- | -------------|
42+
| **reachV1CampaignsStoreRequest** | **ReachV1CampaignsStoreRequest**| | |
43+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
44+
45+
46+
### Return type
47+
48+
**ReachV1CampaignsCreatedCampaignResource**
49+
50+
### Authorization
51+
52+
[apiToken](../README.md#apiToken)
53+
54+
### HTTP request headers
55+
56+
- **Content-Type**: application/json
57+
- **Accept**: application/json
58+
59+
60+
### HTTP response details
61+
| Status code | Description | Response headers |
62+
|-------------|-------------|------------------|
63+
|**200** | Success response | - |
64+
|**422** | Validation error response | - |
65+
|**401** | Unauthenticated response | - |
66+
|**500** | Error response | - |
67+
68+
[[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)
69+
1170
# **getCampaignDetailsV1**
1271
> ReachV1CampaignsCampaignDetailsResource getCampaignDetailsV1()
1372

docs/ReachTemplatesApi.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# ReachTemplatesApi
2+
3+
All URIs are relative to *https://developers.hostinger.com*
4+
5+
|Method | HTTP request | Description|
6+
|------------- | ------------- | -------------|
7+
|[**createAnEmailTemplateV1**](#createanemailtemplatev1) | **POST** /api/reach/v1/profiles/{profileUuid}/templates | Create an email template|
8+
|[**listEmailTemplatesV1**](#listemailtemplatesv1) | **GET** /api/reach/v1/profiles/{profileUuid}/templates | List email templates|
9+
10+
# **createAnEmailTemplateV1**
11+
> ReachV1TemplatesTemplateResource createAnEmailTemplateV1(reachV1TemplatesStoreRequest)
12+
13+
Create an email template in a profile. The template holds the HTML body a campaign reuses, so it can be created before any campaign exists. Only the template metadata comes back - keep the returned `uuid` to reference it as the `template_uuid` of a campaign.
14+
15+
### Example
16+
17+
```typescript
18+
import {
19+
ReachTemplatesApi,
20+
Configuration,
21+
ReachV1TemplatesStoreRequest
22+
} from '@hostinger/sdk';
23+
24+
const configuration = new Configuration();
25+
const apiInstance = new ReachTemplatesApi(configuration);
26+
27+
let profileUuid: string; //Profile uuid parameter (default to undefined)
28+
let reachV1TemplatesStoreRequest: ReachV1TemplatesStoreRequest; //
29+
30+
const { status, data } = await apiInstance.createAnEmailTemplateV1(
31+
profileUuid,
32+
reachV1TemplatesStoreRequest
33+
);
34+
```
35+
36+
### Parameters
37+
38+
|Name | Type | Description | Notes|
39+
|------------- | ------------- | ------------- | -------------|
40+
| **reachV1TemplatesStoreRequest** | **ReachV1TemplatesStoreRequest**| | |
41+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
42+
43+
44+
### Return type
45+
46+
**ReachV1TemplatesTemplateResource**
47+
48+
### Authorization
49+
50+
[apiToken](../README.md#apiToken)
51+
52+
### HTTP request headers
53+
54+
- **Content-Type**: application/json
55+
- **Accept**: application/json
56+
57+
58+
### HTTP response details
59+
| Status code | Description | Response headers |
60+
|-------------|-------------|------------------|
61+
|**200** | Success response | - |
62+
|**422** | Validation error response | - |
63+
|**401** | Unauthenticated response | - |
64+
|**500** | Error response | - |
65+
66+
[[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+
68+
# **listEmailTemplatesV1**
69+
> Array<ReachV1TemplatesTemplateResource> listEmailTemplatesV1()
70+
71+
Get a list of the email templates in a profile, most recently updated first. Templates are the reusable email bodies a campaign is built from. The list is not paginated and only the metadata is returned - the template content itself is not exposed. Use the `uuid` of a template as the `template_uuid` when creating a campaign.
72+
73+
### Example
74+
75+
```typescript
76+
import {
77+
ReachTemplatesApi,
78+
Configuration
79+
} from '@hostinger/sdk';
80+
81+
const configuration = new Configuration();
82+
const apiInstance = new ReachTemplatesApi(configuration);
83+
84+
let profileUuid: string; //Profile uuid parameter (default to undefined)
85+
86+
const { status, data } = await apiInstance.listEmailTemplatesV1(
87+
profileUuid
88+
);
89+
```
90+
91+
### Parameters
92+
93+
|Name | Type | Description | Notes|
94+
|------------- | ------------- | ------------- | -------------|
95+
| **profileUuid** | [**string**] | Profile uuid parameter | defaults to undefined|
96+
97+
98+
### Return type
99+
100+
**Array<ReachV1TemplatesTemplateResource>**
101+
102+
### Authorization
103+
104+
[apiToken](../README.md#apiToken)
105+
106+
### HTTP request headers
107+
108+
- **Content-Type**: Not defined
109+
- **Accept**: application/json
110+
111+
112+
### HTTP response details
113+
| Status code | Description | Response headers |
114+
|-------------|-------------|------------------|
115+
|**200** | Success response | - |
116+
|**401** | Unauthenticated response | - |
117+
|**500** | Error response | - |
118+
119+
[[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)
120+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# ReachV1CampaignsCreatedCampaignResource
2+
3+
The campaign as it was stored, without targeting or delivery progress
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**uuid** | **string** | | [optional] [default to undefined]
10+
**title** | **string** | | [optional] [default to undefined]
11+
**subject** | **string** | | [optional] [default to undefined]
12+
**sender_name** | **string** | | [optional] [default to undefined]
13+
**sender_email** | **string** | | [optional] [default to undefined]
14+
**template_uuid** | **string** | | [optional] [default to undefined]
15+
**status** | **string** | Always &#x60;draft&#x60; for a campaign that was just created. | [optional] [default to undefined]
16+
**type** | **string** | | [optional] [default to undefined]
17+
**is_all_contacts** | **boolean** | Whether the campaign targets every contact instead of selected segments. | [optional] [default to undefined]
18+
**metadata** | **{ [key: string]: string; }** | The stored extra fields, including the ones Reach sets itself. | [optional] [default to undefined]
19+
**created_at** | **string** | | [optional] [default to undefined]
20+
**updated_at** | **string** | | [optional] [default to undefined]
21+
22+
## Example
23+
24+
```typescript
25+
import { ReachV1CampaignsCreatedCampaignResource } from '@hostinger/sdk';
26+
27+
const instance: ReachV1CampaignsCreatedCampaignResource = {
28+
uuid,
29+
title,
30+
subject,
31+
sender_name,
32+
sender_email,
33+
template_uuid,
34+
status,
35+
type,
36+
is_all_contacts,
37+
metadata,
38+
created_at,
39+
updated_at,
40+
};
41+
```
42+
43+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# ReachV1CampaignsStoreRequest
2+
3+
Create a campaign in draft status
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**sender_name** | **string** | From name shown to the recipients. | [default to undefined]
10+
**sender_email** | **string** | From address of the campaign. Its domain has to be verified on the profile before the campaign can be sent. | [default to undefined]
11+
**title** | **string** | Name the campaign is listed under. Not shown to the recipients. | [optional] [default to undefined]
12+
**subject** | **string** | Subject line of the email. | [optional] [default to undefined]
13+
**template_uuid** | **string** | Template to send, as returned by the template endpoints. Can be left out and attached later, but the campaign cannot be sent without one. | [optional] [default to undefined]
14+
**metadata** | [**ReachV1CampaignsStoreRequestMetadata**](ReachV1CampaignsStoreRequestMetadata.md) | | [optional] [default to undefined]
15+
16+
## Example
17+
18+
```typescript
19+
import { ReachV1CampaignsStoreRequest } from '@hostinger/sdk';
20+
21+
const instance: ReachV1CampaignsStoreRequest = {
22+
sender_name,
23+
sender_email,
24+
title,
25+
subject,
26+
template_uuid,
27+
metadata,
28+
};
29+
```
30+
31+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ReachV1CampaignsStoreRequestMetadata
2+
3+
Extra campaign fields. Any key outside the listed ones is rejected.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**preheader** | **string** | Preview text shown after the subject line in the inbox. | [optional] [default to undefined]
10+
**source** | **string** | Where the campaign was created from. | [optional] [default to undefined]
11+
12+
## Example
13+
14+
```typescript
15+
import { ReachV1CampaignsStoreRequestMetadata } from '@hostinger/sdk';
16+
17+
const instance: ReachV1CampaignsStoreRequestMetadata = {
18+
preheader,
19+
source,
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 commit comments

Comments
 (0)