Skip to content

Commit 839d13a

Browse files
chore: sdk update
1 parent 86fc34e commit 839d13a

10 files changed

Lines changed: 266 additions & 29 deletions

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## @hostinger/sdk@3.4.3
1+
## @hostinger/sdk@3.5.0
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@3.4.3 --save
8+
npm install @hostinger/sdk@3.5.0 --save
99
```

‎api.ts‎

Lines changed: 165 additions & 17 deletions
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: 3.4.3
6+
* API Version: 3.5.0
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: 3.4.3
6+
* API Version: 3.5.0
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: 3.4.3
6+
* API Version: 3.5.0
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/3.4.3",
51+
'User-Agent': "hostinger-typescript-sdk/3.5.0",
5252
...param.baseOptions?.headers,
5353
},
5454
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# HorizonsV1WebsitesBuildTaskResource
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**id** | **string** | The build task ID, used with the `Get website build task` tool | [default to undefined]
9+
**state** | **string** | The build state. `TASK_STATE_SUBMITTED` and `TASK_STATE_WORKING` mean the build is still running. `TASK_STATE_COMPLETED` means it finished. `TASK_STATE_FAILED` means it broke, and `TASK_STATE_REJECTED` means it never started: the website does not contain the requested changes. `TASK_STATE_CANCELED` means the user stopped it; changes made before that may be kept. | [default to undefined]
10+
**updated_at** | **string** | When the build last changed state | [optional] [default to undefined]
11+
**reason_code** | **string** | Why the build stopped, or null. `insufficient_credits`: the user has no credits left; `execution_error` or `missing_result`: the build broke; `iteration_limit`: the build stopped early and kept the work done so far. | [optional] [default to undefined]
12+
**message** | **string** | Guidance to tell the user about the build outcome, or null | [optional] [default to undefined]
13+
**summary** | **string** | An internal changelog entry describing what the build changed, or null until the build ends. Rewrite it in plain language before showing it to the user. | [optional] [default to undefined]
14+
15+
## Example
16+
17+
```typescript
18+
import { HorizonsV1WebsitesBuildTaskResource } from '@hostinger/sdk';
19+
20+
const instance: HorizonsV1WebsitesBuildTaskResource = {
21+
id,
22+
state,
23+
updated_at,
24+
reason_code,
25+
message,
26+
summary,
27+
};
28+
```
29+
30+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

‎docs/HorizonsV1WebsitesCreatedWebsiteResource.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**website_url** | **string** | The website URL for the user to access their website in Hostinger AI Builder interface | [default to undefined]
99
**website_id** | **string** | The website ID | [default to undefined]
10+
**task** | [**HorizonsV1WebsitesBuildTaskResource**](HorizonsV1WebsitesBuildTaskResource.md) | | [optional] [default to undefined]
1011

1112
## Example
1213

@@ -16,6 +17,7 @@ import { HorizonsV1WebsitesCreatedWebsiteResource } from '@hostinger/sdk';
1617
const instance: HorizonsV1WebsitesCreatedWebsiteResource = {
1718
website_url,
1819
website_id,
20+
task,
1921
};
2022
```
2123

‎docs/HorizonsWebsitesApi.md‎

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All URIs are relative to *https://developers.hostinger.com*
77
|[**cloneWebsiteV1**](#clonewebsitev1) | **POST** /api/horizons/v1/websites/{websiteId}/clone | Clone website|
88
|[**createWebsiteV1**](#createwebsitev1) | **POST** /api/horizons/v1/websites | Create website|
99
|[**editWebsiteV1**](#editwebsitev1) | **POST** /api/horizons/v1/websites/{websiteId}/messages | Edit website|
10+
|[**getWebsiteBuildTaskV1**](#getwebsitebuildtaskv1) | **GET** /api/horizons/v1/websites/{websiteId}/tasks/{taskId} | Get website build task|
1011
|[**getWebsiteListV1**](#getwebsitelistv1) | **GET** /api/horizons/v1/websites | Get website list|
1112
|[**getWebsiteV1**](#getwebsitev1) | **GET** /api/horizons/v1/websites/{websiteId} | Get website|
1213
|[**publishWebsiteV1**](#publishwebsitev1) | **POST** /api/horizons/v1/websites/{websiteId}/publish | Publish website|
@@ -67,7 +68,7 @@ const { status, data } = await apiInstance.cloneWebsiteV1(
6768
# **createWebsiteV1**
6869
> HorizonsV1WebsitesCreatedWebsiteResource createWebsiteV1(horizonsV1WebsitesCreateWebsiteRequest)
6970
70-
Create new Hostinger AI Builder website from the given message.\\n Use this tool when user asks you to create a website, landing page, blog or any other type of application.\\n This tool initiates the website creation process and returns a website URL and ID. The generation happens asynchronously.\\n After invoking this tool, your chat reply must be EXACTLY 1 sentence summarizing that Hostinger AI Builder is now creating their website and it will be ready in a few minutes and you should provide the website URL to the user immediately Do not write code.\\n\\nTo edit afterwards, use the `Edit website` tool with the returned website ID, or the user can go to Hostinger AI Builder interface in the provided website URL. If the tool call fails with an error, you should provide a clear explanation of the error and do not generate code yourself in the chat. \\n TECHNOLOGY STACK CONSTRAINTS (STRICTLY ENFORCED):\\n The environment is limited to the following technologies. You MUST NOT use, suggest, or implement any technology outside this list:\\n \\n - Language: JavaScript ONLY. - Languages like TypeScript, Rust, Python, Java, PHP, etc., are STRICTLY PROHIBITED.\\n - Framework: React.\\n - Navigation: React Router.\\n - Styling: TailwindCSS.\\n - Components: shadcn/ui (built with @radix-ui primitives).\\n - Icons: Lucide React.\\n - Animations: Framer Motion.\\n \\n BACKEND & DATA STORAGE:\\n - Hostinger AI Builder integrated backend is the EXCLUSIVE solution for persistent data storage, authentication, and database needs.\\n - Local databases (SQLite, MySQL, etc.) are STRICTLY PROHIBITED.\\n - Third-party services (Firebase, AWS Amplify) are allowed ONLY if explicitly requested by the user.\\n \\n MAPS:\\n - OpenStreetMap is the default provider.\\n - Alternative providers (Google Maps, Mapbox) are allowed ONLY if explicitly requested by the user.\\n
71+
Create new Hostinger AI Builder website from the given message.\\n Use this tool when user asks you to create a website, landing page, blog or any other type of application.\\n This tool initiates the website creation process and returns a website URL, ID and build `task`. The generation happens asynchronously. To learn whether it succeeded, poll the `Get website build task` tool with `task.id`; `is_generating` turning false on `Get website` happens whether the build completed or failed.\\n After invoking this tool, your chat reply must be EXACTLY 1 sentence summarizing that Hostinger AI Builder is now creating their website and it will be ready in a few minutes and you should provide the website URL to the user immediately Do not write code.\\n\\nTo edit afterwards, use the `Edit website` tool with the returned website ID, or the user can go to Hostinger AI Builder interface in the provided website URL. If the tool call fails with an error, you should provide a clear explanation of the error and do not generate code yourself in the chat. \\n TECHNOLOGY STACK CONSTRAINTS (STRICTLY ENFORCED):\\n The environment is limited to the following technologies. You MUST NOT use, suggest, or implement any technology outside this list:\\n \\n - Language: JavaScript ONLY. - Languages like TypeScript, Rust, Python, Java, PHP, etc., are STRICTLY PROHIBITED.\\n - Framework: React.\\n - Navigation: React Router.\\n - Styling: TailwindCSS.\\n - Components: shadcn/ui (built with @radix-ui primitives).\\n - Icons: Lucide React.\\n - Animations: Framer Motion.\\n \\n BACKEND & DATA STORAGE:\\n - Hostinger AI Builder integrated backend is the EXCLUSIVE solution for persistent data storage, authentication, and database needs.\\n - Local databases (SQLite, MySQL, etc.) are STRICTLY PROHIBITED.\\n - Third-party services (Firebase, AWS Amplify) are allowed ONLY if explicitly requested by the user.\\n \\n MAPS:\\n - OpenStreetMap is the default provider.\\n - Alternative providers (Google Maps, Mapbox) are allowed ONLY if explicitly requested by the user.\\n
7172

7273
### Example
7374

@@ -122,7 +123,7 @@ const { status, data } = await apiInstance.createWebsiteV1(
122123
# **editWebsiteV1**
123124
> HorizonsV1WebsitesCreatedWebsiteResource editWebsiteV1(horizonsV1WebsitesEditWebsiteRequest)
124125
125-
Edit an existing Hostinger AI Builder website with a follow-up message.\\n Use this tool when the user wants to change, extend or fix a website that already exists.\\n This tool queues the requested changes and returns the website URL and ID. The changes are applied asynchronously.\\n After invoking this tool, your chat reply must be EXACTLY 1 sentence summarizing that Hostinger AI Builder is now applying the requested changes and they will be ready in a few minutes, and you should provide the website URL to the user immediately. Do not write code.\\n If the tool call fails with an error, you should provide a clear explanation of the error and do not generate code yourself in the chat.
126+
Edit an existing Hostinger AI Builder website with a follow-up message.\\n Use this tool when the user wants to change, extend or fix a website that already exists.\\n This tool queues the requested changes and returns the website URL, ID and build `task`. The changes are applied asynchronously. To learn whether they were applied, poll the `Get website build task` tool with `task.id`; `is_generating` turning false on `Get website` happens whether the build completed or failed.\\n After invoking this tool, your chat reply must be EXACTLY 1 sentence summarizing that Hostinger AI Builder is now applying the requested changes and they will be ready in a few minutes, and you should provide the website URL to the user immediately. Do not write code.\\n If the tool call fails with an error, you should provide a clear explanation of the error and do not generate code yourself in the chat.
126127

127128
### Example
128129

@@ -177,6 +178,62 @@ const { status, data } = await apiInstance.editWebsiteV1(
177178

178179
[[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)
179180

181+
# **getWebsiteBuildTaskV1**
182+
> HorizonsV1WebsitesBuildTaskResource getWebsiteBuildTaskV1()
183+
184+
Get the state and outcome of a website build started by the `Create website` or `Edit website` tool.\\n Use this tool with the `task.id` those tools return to find out whether the build completed or failed. Poll it every 30 seconds or so while `state` is `TASK_STATE_SUBMITTED` or `TASK_STATE_WORKING`.\\n When `state` is `TASK_STATE_FAILED` or `TASK_STATE_REJECTED`, the website does not contain the requested changes: tell the user, using `message` and `reason_code`, and do not publish it. When `state` is `TASK_STATE_CANCELED`, the user stopped the build and changes made before that may be kept: publish only if the user asks to. `reason_code` `insufficient_credits` means the user must get more credits before building again.\\n When `state` is `TASK_STATE_COMPLETED`, the website can be published. A `reason_code` of `iteration_limit` on a completed build means it stopped early and kept the work done so far.
185+
186+
### Example
187+
188+
```typescript
189+
import {
190+
HorizonsWebsitesApi,
191+
Configuration
192+
} from '@hostinger/sdk';
193+
194+
const configuration = new Configuration();
195+
const apiInstance = new HorizonsWebsitesApi(configuration);
196+
197+
let websiteId: string; //The website ID (default to undefined)
198+
let taskId: string; //The build task ID, returned as `task.id` by the `Create website` and `Edit website` tools (default to undefined)
199+
200+
const { status, data } = await apiInstance.getWebsiteBuildTaskV1(
201+
websiteId,
202+
taskId
203+
);
204+
```
205+
206+
### Parameters
207+
208+
|Name | Type | Description | Notes|
209+
|------------- | ------------- | ------------- | -------------|
210+
| **websiteId** | [**string**] | The website ID | defaults to undefined|
211+
| **taskId** | [**string**] | The build task ID, returned as `task.id` by the `Create website` and `Edit website` tools | defaults to undefined|
212+
213+
214+
### Return type
215+
216+
**HorizonsV1WebsitesBuildTaskResource**
217+
218+
### Authorization
219+
220+
[apiToken](../README.md#apiToken)
221+
222+
### HTTP request headers
223+
224+
- **Content-Type**: Not defined
225+
- **Accept**: application/json
226+
227+
228+
### HTTP response details
229+
| Status code | Description | Response headers |
230+
|-------------|-------------|------------------|
231+
|**200** | Success response | - |
232+
|**401** | Unauthenticated response | - |
233+
|**500** | Error response | - |
234+
235+
[[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)
236+
180237
# **getWebsiteListV1**
181238
> Array<HorizonsV1WebsitesWebsiteResource> getWebsiteListV1()
182239
@@ -226,7 +283,7 @@ This endpoint does not have any parameters.
226283
# **getWebsiteV1**
227284
> HorizonsV1WebsitesWebsiteUrlResource getWebsiteV1()
228285
229-
Get the link for the user to open their website in Hostinger AI Builder interface.\\n Use this tool when the user wants the link to an existing website, or when you need its website URL before or after editing it.\\n `is_in_progress` is true while changes are being generated or the website is being published; wait until it is false before publishing. `is_generating` is true while changes are being generated, and `actions_in_progress` has `website_publish` while the website is being published. `published_at` is when the website was last published, `is_template` is whether its published pages show the \"Use template\" banner, and `has_ecommerce_store` is whether it has an online store.\\n Websites can be edited with the `Edit website` tool, or by the user in Hostinger AI Builder interface in the provided website URL.
286+
Get the link for the user to open their website in Hostinger AI Builder interface.\\n Use this tool when the user wants the link to an existing website, or when you need its website URL before or after editing it.\\n `is_in_progress` is true while changes are being generated or the website is being published; wait until it is false before publishing. `is_generating` is true while changes are being generated, and `actions_in_progress` has `website_publish` while the website is being published. `is_generating` turns false whether the build completed or failed: use the `Get website build task` tool to learn its outcome. `published_at` is when the website was last published, `is_template` is whether its published pages show the \"Use template\" banner, and `has_ecommerce_store` is whether it has an online store.\\n Websites can be edited with the `Edit website` tool, or by the user in Hostinger AI Builder interface in the provided website URL.
230287

231288
### Example
232289

@@ -279,7 +336,7 @@ const { status, data } = await apiInstance.getWebsiteV1(
279336
# **publishWebsiteV1**
280337
> HorizonsV1WebsitesPublishedWebsiteResource publishWebsiteV1()
281338
282-
Publish a Hostinger AI Builder website so its latest changes go live.\\n Use this tool when the user asks to publish, deploy or make their website live.\\n This tool starts the publish process and returns the URL the website will be live on. Publishing happens asynchronously and takes a few minutes.\\n Set `is_template` only when the user explicitly asks to share the website as a template: true adds a \"Use template\" banner to its published pages that copies the website into the visitor\'s own account, and false removes it. Leave it out to keep the current setting.\\n After invoking this tool, your chat reply must be EXACTLY 1 sentence summarizing that the website is being published and you should provide the published URL to the user immediately.
339+
Publish a Hostinger AI Builder website so its latest changes go live.\\n Use this tool when the user asks to publish, deploy or make their website live.\\n If you created or edited the website in this conversation, first check its build with the `Get website build task` tool and publish only when its `state` is `TASK_STATE_COMPLETED`. After a failed build, tell the user instead of publishing.\\n This tool starts the publish process and returns the URL the website will be live on. Publishing happens asynchronously and takes a few minutes.\\n Set `is_template` only when the user explicitly asks to share the website as a template: true adds a \"Use template\" banner to its published pages that copies the website into the visitor\'s own account, and false removes it. Leave it out to keep the current setting.\\n After invoking this tool, your chat reply must be EXACTLY 1 sentence summarizing that the website is being published and you should provide the published URL to the user immediately.
283340

284341
### Example
285342

‎index.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: 3.4.3
6+
* API Version: 3.5.0
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

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hostinger/sdk",
3-
"version": "3.4.3",
3+
"version": "3.5.0",
44
"description": "Hostinger API TypeScript SDK",
55
"author": "Hostinger",
66
"repository": {

0 commit comments

Comments
 (0)