@hostinger/sdk 1.49.3 → 1.50.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.
@@ -9,7 +9,7 @@ All URIs are relative to *https://developers.hostinger.com*
9
9
  # **createPurchaseOrderV1**
10
10
  > BillingV1OrderOrderResource createPurchaseOrderV1(billingV1OrderPurchaseRequest)
11
11
 
12
- Create a purchase order for any Hostinger product. This unified endpoint places an order for one or more catalog items and works across all Hostinger products, leveraging the existing billing infrastructure. Use the [catalog endpoint](#tag/billing-catalog) to look up the `item_id` values available for purchase. If no payment method is provided, your default payment method will be used automatically. This endpoint only places the order. Product-specific provisioning (e.g. VPS setup or domain registration) is not performed here — once the order completes, use the relevant product endpoints or [hPanel](https://hpanel.hostinger.com/) to finalize setup. Use this endpoint to purchase any product available in the catalog.
12
+ Create a purchase order for any Hostinger product. This unified endpoint places an order for one or more catalog items and works across all Hostinger products, leveraging the existing billing infrastructure. Use the [catalog endpoint](#tag/billing-catalog) to look up the `item_id` values available for purchase. If no payment method is provided, your default payment method will be used automatically. If the response is `202 Accepted`, the payment is still being processed and the order will complete asynchronously once the payment is confirmed. This endpoint only places the order. Product-specific provisioning (e.g. VPS setup or domain registration) is not performed here — once the order completes, use the relevant product endpoints or [hPanel](https://hpanel.hostinger.com/) to finalize setup. Use this endpoint to purchase any product available in the catalog.
13
13
 
14
14
  ### Example
15
15
 
@@ -55,6 +55,7 @@ const { status, data } = await apiInstance.createPurchaseOrderV1(
55
55
  | Status code | Description | Response headers |
56
56
  |-------------|-------------|------------------|
57
57
  |**200** | Success response | - |
58
+ |**202** | Payment is being processed, the order will complete asynchronously | - |
58
59
  |**422** | Validation error response | - |
59
60
  |**401** | Unauthenticated response | - |
60
61
  |**500** | Error response | - |
@@ -164,7 +164,7 @@ This endpoint does not have any parameters.
164
164
  # **renewSubscriptionV1**
165
165
  > BillingV1OrderOrderResource renewSubscriptionV1()
166
166
 
167
- Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to renew any subscription available in your account.
167
+ Create a renewal order for an existing Hostinger subscription. This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the [subscriptions endpoint](#tag/billing-subscriptions) to look up the `subscriptionId` values available for renewal. If no payment method is provided, your default payment method will be used automatically. If the response is `202 Accepted`, the payment is still being processed and the renewal will complete asynchronously once the payment is confirmed. Use this endpoint to renew any subscription available in your account.
168
168
 
169
169
  ### Example
170
170
 
@@ -213,6 +213,7 @@ const { status, data } = await apiInstance.renewSubscriptionV1(
213
213
  | Status code | Description | Response headers |
214
214
  |-------------|-------------|------------------|
215
215
  |**200** | Success response | - |
216
+ |**202** | Payment is being processed, the order will complete asynchronously | - |
216
217
  |**422** | Validation error response | - |
217
218
  |**401** | Unauthenticated response | - |
218
219
  |**500** | Error response | - |
@@ -0,0 +1,26 @@
1
+ # BillingV1OrderPaymentProcessingResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **number** | Order ID | [optional] [default to undefined]
9
+ **subscription_id** | **string** | Subscription ID, use it to find the product once the order completes | [optional] [default to undefined]
10
+ **status** | **string** | | [optional] [default to undefined]
11
+ **message** | **string** | Explanation of what happens next | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { BillingV1OrderPaymentProcessingResource } from '@hostinger/sdk';
17
+
18
+ const instance: BillingV1OrderPaymentProcessingResource = {
19
+ id,
20
+ subscription_id,
21
+ status,
22
+ message,
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)
@@ -491,7 +491,7 @@ const { status, data } = await apiInstance.getDomainRenewalInformationV1(
491
491
  # **purchaseNewDomainV1**
492
492
  > BillingV1OrderOrderResource purchaseNewDomainV1(domainsV1PortfolioPurchaseRequest)
493
493
 
494
- Purchase and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check domain registration status. If no payment method is provided, your default payment method will be used automatically. If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing purchase. Use this endpoint to register new domains for users.
494
+ Purchase and register a new domain name. If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check domain registration status. If no payment method is provided, your default payment method will be used automatically. If the response is `202 Accepted`, the payment is still being processed and the domain was **not** registered. Once the order completes, register the domain from [hPanel](https://hpanel.hostinger.com/). If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account. Some TLDs require `additional_details` to be provided and these will be validated before completing purchase. Use this endpoint to register new domains for users.
495
495
 
496
496
  ### Example
497
497
 
@@ -537,6 +537,7 @@ const { status, data } = await apiInstance.purchaseNewDomainV1(
537
537
  | Status code | Description | Response headers |
538
538
  |-------------|-------------|------------------|
539
539
  |**200** | Success response | - |
540
+ |**202** | Payment is being processed, the order will complete asynchronously | - |
540
541
  |**422** | Validation error response | - |
541
542
  |**401** | Unauthenticated response | - |
542
543
  |**500** | Error response | - |
@@ -372,7 +372,7 @@ const { status, data } = await apiInstance.updateAProductV1(
372
372
  # **uploadAndAttachAProductImageV1**
373
373
  > EcommerceV1ProductProductImageUploadResource uploadAndAttachAProductImageV1(ecommerceV1ProductUploadProductImageRequest)
374
374
 
375
- Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
375
+ Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. Image downloads require HTTPS on port 443 without embedded credentials. At most one redirect is allowed, and its destination must meet the same requirements. Private or reserved network destinations, unsupported URLs and longer redirect chains are rejected. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
376
376
 
377
377
  ### Example
378
378
 
@@ -424,6 +424,8 @@ const { status, data } = await apiInstance.uploadAndAttachAProductImageV1(
424
424
  | Status code | Description | Response headers |
425
425
  |-------------|-------------|------------------|
426
426
  |**200** | Success response | - |
427
+ |**400** | Error response | - |
428
+ |**502** | Error response | - |
427
429
  |**422** | Validation error response | - |
428
430
  |**401** | Unauthenticated response | - |
429
431
  |**500** | Error response | - |
@@ -5,7 +5,7 @@
5
5
 
6
6
  Name | Type | Description | Notes
7
7
  ------------ | ------------- | ------------- | -------------
8
- **image_url** | **string** | Publicly reachable URL of the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name. | [optional] [default to undefined]
8
+ **image_url** | **string** | Publicly reachable URL of a raster image (JPEG, PNG, GIF or WebP), maximum 15MB. Fetching the image requires HTTPS on port 443 without embedded credentials. At most one redirect is allowed; its destination must meet the same URL requirements. Private or reserved network destinations, unsupported URLs and longer redirect chains are rejected. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name. | [optional] [default to undefined]
9
9
  **object_name** | **string** | Key returned by the upload-url endpoint. Provide this instead of image_url to attach an uploaded image. | [optional] [default to undefined]
10
10
  **is_thumbnail** | **boolean** | When true, the image becomes the product\'s thumbnail (primary image). When omitted, it becomes the thumbnail only if the product does not have one yet. | [optional] [default to undefined]
11
11
 
@@ -238,7 +238,7 @@ This endpoint does not have any parameters.
238
238
  # **purchaseNewVirtualMachineV1**
239
239
  > BillingV1OrderVirtualMachineOrderResource purchaseNewVirtualMachineV1(vPSV1VirtualMachinePurchaseRequest)
240
240
 
241
- Purchase and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically. Use this endpoint to create new VPS instances.
241
+ Purchase and setup a new virtual machine. If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. If no payment method is provided, your default payment method will be used automatically. If the response is `202 Accepted`, the payment is still being processed and the virtual machine was not set up. Login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually. Use this endpoint to create new VPS instances.
242
242
 
243
243
  ### Example
244
244
 
@@ -284,6 +284,7 @@ const { status, data } = await apiInstance.purchaseNewVirtualMachineV1(
284
284
  | Status code | Description | Response headers |
285
285
  |-------------|-------------|------------------|
286
286
  |**200** | Success response | - |
287
+ |**202** | Payment is being processed, the order will complete asynchronously | - |
287
288
  |**422** | Validation error response | - |
288
289
  |**401** | Unauthenticated response | - |
289
290
  |**500** | Error response | - |
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.49.3
6
+ * API Version: 1.50.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/sdk",
3
- "version": "1.49.3",
3
+ "version": "1.50.0",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {