hostinger-api-sdk 0.0.23 → 0.0.24

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.20.0
4
+ * API Version: 0.21.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: 0.20.0
6
+ * API Version: 0.21.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: 0.20.0
4
+ * API Version: 0.21.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: 0.20.0
6
+ * API Version: 0.21.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/0.0.23" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
16
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/0.0.24" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
17
17
  this.formDataCtor = param.formDataCtor;
18
18
  }
19
19
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 0.20.0
4
+ * API Version: 0.21.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: 0.20.0
6
+ * API Version: 0.21.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: 0.20.0
4
+ * API Version: 0.21.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: 0.20.0
7
+ * API Version: 0.21.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
@@ -0,0 +1,234 @@
1
+ # HostingCronJobsApi
2
+
3
+ All URIs are relative to *https://developers.hostinger.com*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**createAccountCronJobV1**](#createaccountcronjobv1) | **POST** /api/hosting/v1/accounts/{username}/cron-jobs | Create account cron job|
8
+ |[**deleteAccountCronJobV1**](#deleteaccountcronjobv1) | **DELETE** /api/hosting/v1/accounts/{username}/cron-jobs/{uid} | Delete account cron job|
9
+ |[**getCronJobOutputV1**](#getcronjoboutputv1) | **GET** /api/hosting/v1/accounts/{username}/cron-jobs/{uid}/output | Get cron job output|
10
+ |[**listAccountCronJobsV1**](#listaccountcronjobsv1) | **GET** /api/hosting/v1/accounts/{username}/cron-jobs | List account cron jobs|
11
+
12
+ # **createAccountCronJobV1**
13
+ > HostingV1CronJobsCronJobResource createAccountCronJobV1(hostingV1CronJobsCreateCronJobRequest)
14
+
15
+ Creates a cron job for the specified account from a schedule expression and a command. Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.
16
+
17
+ ### Example
18
+
19
+ ```typescript
20
+ import {
21
+ HostingCronJobsApi,
22
+ Configuration,
23
+ HostingV1CronJobsCreateCronJobRequest
24
+ } from 'hostinger-api-sdk';
25
+
26
+ const configuration = new Configuration();
27
+ const apiInstance = new HostingCronJobsApi(configuration);
28
+
29
+ let username: string; // (default to undefined)
30
+ let hostingV1CronJobsCreateCronJobRequest: HostingV1CronJobsCreateCronJobRequest; //
31
+
32
+ const { status, data } = await apiInstance.createAccountCronJobV1(
33
+ username,
34
+ hostingV1CronJobsCreateCronJobRequest
35
+ );
36
+ ```
37
+
38
+ ### Parameters
39
+
40
+ |Name | Type | Description | Notes|
41
+ |------------- | ------------- | ------------- | -------------|
42
+ | **hostingV1CronJobsCreateCronJobRequest** | **HostingV1CronJobsCreateCronJobRequest**| | |
43
+ | **username** | [**string**] | | defaults to undefined|
44
+
45
+
46
+ ### Return type
47
+
48
+ **HostingV1CronJobsCronJobResource**
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
+
70
+ # **deleteAccountCronJobV1**
71
+ > CommonSuccessEmptyResource deleteAccountCronJobV1()
72
+
73
+ Permanently deletes the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
74
+
75
+ ### Example
76
+
77
+ ```typescript
78
+ import {
79
+ HostingCronJobsApi,
80
+ Configuration
81
+ } from 'hostinger-api-sdk';
82
+
83
+ const configuration = new Configuration();
84
+ const apiInstance = new HostingCronJobsApi(configuration);
85
+
86
+ let username: string; // (default to undefined)
87
+ let uid: string; //Unique identifier of the cron job as returned by the list cron jobs endpoint. (default to undefined)
88
+
89
+ const { status, data } = await apiInstance.deleteAccountCronJobV1(
90
+ username,
91
+ uid
92
+ );
93
+ ```
94
+
95
+ ### Parameters
96
+
97
+ |Name | Type | Description | Notes|
98
+ |------------- | ------------- | ------------- | -------------|
99
+ | **username** | [**string**] | | defaults to undefined|
100
+ | **uid** | [**string**] | Unique identifier of the cron job as returned by the list cron jobs endpoint. | defaults to undefined|
101
+
102
+
103
+ ### Return type
104
+
105
+ **CommonSuccessEmptyResource**
106
+
107
+ ### Authorization
108
+
109
+ [apiToken](../README.md#apiToken)
110
+
111
+ ### HTTP request headers
112
+
113
+ - **Content-Type**: Not defined
114
+ - **Accept**: application/json
115
+
116
+
117
+ ### HTTP response details
118
+ | Status code | Description | Response headers |
119
+ |-------------|-------------|------------------|
120
+ |**200** | Success empty response | - |
121
+ |**401** | Unauthenticated response | - |
122
+ |**500** | Error response | - |
123
+
124
+ [[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)
125
+
126
+ # **getCronJobOutputV1**
127
+ > HostingV1CronJobsCronJobOutputResource getCronJobOutputV1()
128
+
129
+ Returns the output captured from the last execution of the cron job identified by its uid. The uid is returned by the list cron jobs endpoint.
130
+
131
+ ### Example
132
+
133
+ ```typescript
134
+ import {
135
+ HostingCronJobsApi,
136
+ Configuration
137
+ } from 'hostinger-api-sdk';
138
+
139
+ const configuration = new Configuration();
140
+ const apiInstance = new HostingCronJobsApi(configuration);
141
+
142
+ let username: string; // (default to undefined)
143
+ let uid: string; //Unique identifier of the cron job as returned by the list cron jobs endpoint. (default to undefined)
144
+
145
+ const { status, data } = await apiInstance.getCronJobOutputV1(
146
+ username,
147
+ uid
148
+ );
149
+ ```
150
+
151
+ ### Parameters
152
+
153
+ |Name | Type | Description | Notes|
154
+ |------------- | ------------- | ------------- | -------------|
155
+ | **username** | [**string**] | | defaults to undefined|
156
+ | **uid** | [**string**] | Unique identifier of the cron job as returned by the list cron jobs endpoint. | defaults to undefined|
157
+
158
+
159
+ ### Return type
160
+
161
+ **HostingV1CronJobsCronJobOutputResource**
162
+
163
+ ### Authorization
164
+
165
+ [apiToken](../README.md#apiToken)
166
+
167
+ ### HTTP request headers
168
+
169
+ - **Content-Type**: Not defined
170
+ - **Accept**: application/json
171
+
172
+
173
+ ### HTTP response details
174
+ | Status code | Description | Response headers |
175
+ |-------------|-------------|------------------|
176
+ |**200** | Success response | - |
177
+ |**401** | Unauthenticated response | - |
178
+ |**500** | Error response | - |
179
+
180
+ [[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)
181
+
182
+ # **listAccountCronJobsV1**
183
+ > Array<HostingV1CronJobsCronJobResource> listAccountCronJobsV1()
184
+
185
+ Returns the list of cron jobs configured for the specified account, including their schedule and command.
186
+
187
+ ### Example
188
+
189
+ ```typescript
190
+ import {
191
+ HostingCronJobsApi,
192
+ Configuration
193
+ } from 'hostinger-api-sdk';
194
+
195
+ const configuration = new Configuration();
196
+ const apiInstance = new HostingCronJobsApi(configuration);
197
+
198
+ let username: string; // (default to undefined)
199
+
200
+ const { status, data } = await apiInstance.listAccountCronJobsV1(
201
+ username
202
+ );
203
+ ```
204
+
205
+ ### Parameters
206
+
207
+ |Name | Type | Description | Notes|
208
+ |------------- | ------------- | ------------- | -------------|
209
+ | **username** | [**string**] | | defaults to undefined|
210
+
211
+
212
+ ### Return type
213
+
214
+ **Array<HostingV1CronJobsCronJobResource>**
215
+
216
+ ### Authorization
217
+
218
+ [apiToken](../README.md#apiToken)
219
+
220
+ ### HTTP request headers
221
+
222
+ - **Content-Type**: Not defined
223
+ - **Accept**: application/json
224
+
225
+
226
+ ### HTTP response details
227
+ | Status code | Description | Response headers |
228
+ |-------------|-------------|------------------|
229
+ |**200** | Success response | - |
230
+ |**401** | Unauthenticated response | - |
231
+ |**500** | Error response | - |
232
+
233
+ [[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)
234
+
@@ -0,0 +1,22 @@
1
+ # HostingV1CronJobsCreateCronJobRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **time** | **string** | Cron schedule expression (for example \&quot;0 2 * * *\&quot; runs daily at 02:00). | [default to undefined]
9
+ **command** | **string** | Command to execute on the schedule. | [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { HostingV1CronJobsCreateCronJobRequest } from 'hostinger-api-sdk';
15
+
16
+ const instance: HostingV1CronJobsCreateCronJobRequest = {
17
+ time,
18
+ command,
19
+ };
20
+ ```
21
+
22
+ [[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,20 @@
1
+ # HostingV1CronJobsCronJobOutputResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **output** | **string** | Output captured from the last cron job execution. Empty when the cron job has not run yet. | [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { HostingV1CronJobsCronJobOutputResource } from 'hostinger-api-sdk';
14
+
15
+ const instance: HostingV1CronJobsCronJobOutputResource = {
16
+ output,
17
+ };
18
+ ```
19
+
20
+ [[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,26 @@
1
+ # HostingV1CronJobsCronJobResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **uid** | **string** | Unique identifier of the cron job. Use it to delete the cron job or fetch its output. | [optional] [default to undefined]
9
+ **username** | **string** | Username of the account that owns the cron job. | [optional] [default to undefined]
10
+ **time** | **string** | Cron schedule expression. | [optional] [default to undefined]
11
+ **command** | **string** | Command executed on the schedule. | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { HostingV1CronJobsCronJobResource } from 'hostinger-api-sdk';
17
+
18
+ const instance: HostingV1CronJobsCronJobResource = {
19
+ uid,
20
+ username,
21
+ time,
22
+ command,
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/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 0.20.0
6
+ * API Version: 0.21.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-sdk",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {