Skip to content

Commit 82b4584

Browse files
chore: sdk update
1 parent 7ac1a09 commit 82b4584

16 files changed

Lines changed: 226 additions & 19 deletions

‎README.md‎

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

‎api.ts‎

Lines changed: 115 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Hostinger API
55
*
6-
* API Version: 2.0.0
6+
* API Version: 2.1.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
@@ -5424,6 +5424,37 @@ export interface EcommerceV1ProductCreatePhysicalProductRequest {
54245424
* @memberof EcommerceV1ProductCreatePhysicalProductRequest
54255425
*/
54265426
'currency': string | null;
5427+
/**
5428+
*
5429+
* @type {EcommerceV1ProductCreatePhysicalProductRequestSeoSettings}
5430+
* @memberof EcommerceV1ProductCreatePhysicalProductRequest
5431+
*/
5432+
'seo_settings': EcommerceV1ProductCreatePhysicalProductRequestSeoSettings;
5433+
}
5434+
/**
5435+
* Search-engine settings. Omitted fields are generated from the name and description; a slug already in use gets a numeric suffix. Send at least one field.
5436+
* @export
5437+
* @interface EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
5438+
*/
5439+
export interface EcommerceV1ProductCreatePhysicalProductRequestSeoSettings {
5440+
/**
5441+
* Search-engine title for the product page.
5442+
* @type {string}
5443+
* @memberof EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
5444+
*/
5445+
'title': string;
5446+
/**
5447+
* Search-engine description for the product page.
5448+
* @type {string}
5449+
* @memberof EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
5450+
*/
5451+
'description': string;
5452+
/**
5453+
* URL slug of the product page. Lowercase letters, digits and dashes.
5454+
* @type {string}
5455+
* @memberof EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
5456+
*/
5457+
'slug': string;
54275458
}
54285459
/**
54295460
*
@@ -5835,6 +5866,18 @@ export interface EcommerceV1ProductUpdateRequest {
58355866
* @memberof EcommerceV1ProductUpdateRequest
58365867
*/
58375868
'status': EcommerceV1ProductUpdateRequestStatusEnum;
5869+
/**
5870+
*
5871+
* @type {EcommerceV1ProductUpdateRequestSeoSettings}
5872+
* @memberof EcommerceV1ProductUpdateRequest
5873+
*/
5874+
'seo_settings': EcommerceV1ProductUpdateRequestSeoSettings;
5875+
/**
5876+
*
5877+
* @type {EcommerceV1ProductUpdateRequestCollectionChanges}
5878+
* @memberof EcommerceV1ProductUpdateRequest
5879+
*/
5880+
'collection_changes': EcommerceV1ProductUpdateRequestCollectionChanges;
58385881
}
58395882

58405883
export const EcommerceV1ProductUpdateRequestStatusEnum = {
@@ -5845,6 +5888,63 @@ export const EcommerceV1ProductUpdateRequestStatusEnum = {
58455888

58465889
export type EcommerceV1ProductUpdateRequestStatusEnum = typeof EcommerceV1ProductUpdateRequestStatusEnum[keyof typeof EcommerceV1ProductUpdateRequestStatusEnum];
58475890

5891+
/**
5892+
* Adds the product to or removes it from collections without touching its other collections. Send at least one collection in add or remove.
5893+
* @export
5894+
* @interface EcommerceV1ProductUpdateRequestCollectionChanges
5895+
*/
5896+
export interface EcommerceV1ProductUpdateRequestCollectionChanges {
5897+
/**
5898+
* Collections to add the product to. Every id must exist in the store.
5899+
* @type {Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>}
5900+
* @memberof EcommerceV1ProductUpdateRequestCollectionChanges
5901+
*/
5902+
'add': Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>;
5903+
/**
5904+
* Collections to take the product out of. Ids the product is not in are ignored.
5905+
* @type {Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>}
5906+
* @memberof EcommerceV1ProductUpdateRequestCollectionChanges
5907+
*/
5908+
'remove': Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>;
5909+
}
5910+
/**
5911+
*
5912+
* @export
5913+
* @interface EcommerceV1ProductUpdateRequestCollectionChangesAddInner
5914+
*/
5915+
export interface EcommerceV1ProductUpdateRequestCollectionChangesAddInner {
5916+
/**
5917+
* The collection id.
5918+
* @type {string}
5919+
* @memberof EcommerceV1ProductUpdateRequestCollectionChangesAddInner
5920+
*/
5921+
'id': string;
5922+
}
5923+
/**
5924+
* Search-engine settings to change. Send at least one field; omitted fields keep their current values.
5925+
* @export
5926+
* @interface EcommerceV1ProductUpdateRequestSeoSettings
5927+
*/
5928+
export interface EcommerceV1ProductUpdateRequestSeoSettings {
5929+
/**
5930+
* Search-engine title for the product page.
5931+
* @type {string}
5932+
* @memberof EcommerceV1ProductUpdateRequestSeoSettings
5933+
*/
5934+
'title': string;
5935+
/**
5936+
* Search-engine description for the product page.
5937+
* @type {string}
5938+
* @memberof EcommerceV1ProductUpdateRequestSeoSettings
5939+
*/
5940+
'description': string;
5941+
/**
5942+
* URL slug of the product page. Lowercase letters, digits and dashes.
5943+
* @type {string}
5944+
* @memberof EcommerceV1ProductUpdateRequestSeoSettings
5945+
*/
5946+
'slug': string;
5947+
}
58485948
/**
58495949
*
58505950
* @export
@@ -6506,6 +6606,12 @@ export interface EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner {
65066606
* @memberof EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner
65076607
*/
65086608
'title': string;
6609+
/**
6610+
* The variant SKU.
6611+
* @type {string}
6612+
* @memberof EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner
6613+
*/
6614+
'sku': string;
65096615
/**
65106616
* Units in stock.
65116617
* @type {number}
@@ -28591,7 +28697,7 @@ export const EcommerceProductVariantsApiAxiosParamCreator = function (configurat
2859128697
};
2859228698
},
2859328699
/**
28594-
* Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
28700+
* Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
2859528701
* @summary Update product variants in batch
2859628702
* @param {string} storeId The ID of the store that owns the product.
2859728703
* @param {string} productId The ID of the product whose variants are being updated.
@@ -28691,7 +28797,7 @@ export const EcommerceProductVariantsApiFp = function(configuration?: Configurat
2869128797
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2869228798
},
2869328799
/**
28694-
* Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
28800+
* Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
2869528801
* @summary Update product variants in batch
2869628802
* @param {string} storeId The ID of the store that owns the product.
2869728803
* @param {string} productId The ID of the product whose variants are being updated.
@@ -28751,7 +28857,7 @@ export const EcommerceProductVariantsApiFactory = function (configuration?: Conf
2875128857
return localVarFp.listProductVariantsV1(storeId, productId, page, options).then((request) => request(axios, basePath));
2875228858
},
2875328859
/**
28754-
* Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
28860+
* Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
2875528861
* @summary Update product variants in batch
2875628862
* @param {string} storeId The ID of the store that owns the product.
2875728863
* @param {string} productId The ID of the product whose variants are being updated.
@@ -28815,7 +28921,7 @@ export class EcommerceProductVariantsApi extends BaseAPI {
2881528921
}
2881628922

2881728923
/**
28818-
* Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
28924+
* Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
2881928925
* @summary Update product variants in batch
2882028926
* @param {string} storeId The ID of the store that owns the product.
2882128927
* @param {string} productId The ID of the product whose variants are being updated.
@@ -29073,7 +29179,7 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration?: C
2907329179
};
2907429180
},
2907529181
/**
29076-
* Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
29182+
* Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
2907729183
* @summary Update a product
2907829184
* @param {string} storeId The ID of the store that owns the product.
2907929185
* @param {string} productId The ID of the product to update.
@@ -29248,7 +29354,7 @@ export const EcommerceProductsApiFp = function(configuration?: Configuration) {
2924829354
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2924929355
},
2925029356
/**
29251-
* Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
29357+
* Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
2925229358
* @summary Update a product
2925329359
* @param {string} storeId The ID of the store that owns the product.
2925429360
* @param {string} productId The ID of the product to update.
@@ -29345,7 +29451,7 @@ export const EcommerceProductsApiFactory = function (configuration?: Configurati
2934529451
return localVarFp.listProductsV1(storeId, productIds, status, q, include, page, options).then((request) => request(axios, basePath));
2934629452
},
2934729453
/**
29348-
* Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
29454+
* Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
2934929455
* @summary Update a product
2935029456
* @param {string} storeId The ID of the store that owns the product.
2935129457
* @param {string} productId The ID of the product to update.
@@ -29448,7 +29554,7 @@ export class EcommerceProductsApi extends BaseAPI {
2944829554
}
2944929555

2945029556
/**
29451-
* Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
29557+
* Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
2945229558
* @summary Update a product
2945329559
* @param {string} storeId The ID of the store that owns the product.
2945429560
* @param {string} productId The ID of the product to update.

‎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: 2.0.0
6+
* API Version: 2.1.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: 2.0.0
6+
* API Version: 2.1.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: 2.0.0
6+
* API Version: 2.1.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/2.0.0",
51+
'User-Agent': "hostinger-typescript-sdk/2.1.0",
5252
...param.baseOptions?.headers,
5353
},
5454
};

‎docs/EcommerceProductVariantsApi.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ const { status, data } = await apiInstance.listProductVariantsV1(
191191
# **updateProductVariantsInBatchV1**
192192
> EcommerceV1VariantVariantListResponseResource updateProductVariantsInBatchV1(ecommerceV1VariantBatchUpdateVariantsRequest)
193193
194-
Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
194+
Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
195195

196196
### Example
197197

‎docs/EcommerceProductsApi.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ const { status, data } = await apiInstance.listProductsV1(
311311
# **updateAProductV1**
312312
> EcommerceV1ProductProductResponseResource updateAProductV1(ecommerceV1ProductUpdateRequest)
313313
314-
Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
314+
Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
315315

316316
### Example
317317

‎docs/EcommerceV1ProductCreatePhysicalProductRequest.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**price** | **number** | Price in the smallest currency unit (e.g. cents). Must be positive. | [default to undefined]
1010
**description** | **string** | The product description. | [optional] [default to undefined]
1111
**currency** | **string** | ISO 4217 currency code. Defaults to the store\&#39;s default currency when omitted. | [optional] [default to undefined]
12+
**seo_settings** | [**EcommerceV1ProductCreatePhysicalProductRequestSeoSettings**](EcommerceV1ProductCreatePhysicalProductRequestSeoSettings.md) | | [optional] [default to undefined]
1213

1314
## Example
1415

@@ -20,6 +21,7 @@ const instance: EcommerceV1ProductCreatePhysicalProductRequest = {
2021
price,
2122
description,
2223
currency,
24+
seo_settings,
2325
};
2426
```
2527

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
2+
3+
Search-engine settings. Omitted fields are generated from the name and description; a slug already in use gets a numeric suffix. Send at least one field.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**title** | **string** | Search-engine title for the product page. | [optional] [default to undefined]
10+
**description** | **string** | Search-engine description for the product page. | [optional] [default to undefined]
11+
**slug** | **string** | URL slug of the product page. Lowercase letters, digits and dashes. | [optional] [default to undefined]
12+
13+
## Example
14+
15+
```typescript
16+
import { EcommerceV1ProductCreatePhysicalProductRequestSeoSettings } from '@hostinger/sdk';
17+
18+
const instance: EcommerceV1ProductCreatePhysicalProductRequestSeoSettings = {
19+
title,
20+
description,
21+
slug,
22+
};
23+
```
24+
25+
[[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/EcommerceV1ProductUpdateRequest.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
88
**name** | **string** | The product name. | [optional] [default to undefined]
99
**description** | **string** | The product description. | [optional] [default to undefined]
1010
**status** | **string** | Set \&quot;published\&quot; to make the product buyable, \&quot;draft\&quot; to hide it, or \&quot;archived\&quot; to retire it. | [optional] [default to undefined]
11+
**seo_settings** | [**EcommerceV1ProductUpdateRequestSeoSettings**](EcommerceV1ProductUpdateRequestSeoSettings.md) | | [optional] [default to undefined]
12+
**collection_changes** | [**EcommerceV1ProductUpdateRequestCollectionChanges**](EcommerceV1ProductUpdateRequestCollectionChanges.md) | | [optional] [default to undefined]
1113

1214
## Example
1315

@@ -18,6 +20,8 @@ const instance: EcommerceV1ProductUpdateRequest = {
1820
name,
1921
description,
2022
status,
23+
seo_settings,
24+
collection_changes,
2125
};
2226
```
2327

0 commit comments

Comments
 (0)