hostinger-api-sdk 2.0.0 → 2.1.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.
- package/README.md +2 -2
- package/api.ts +115 -9
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +115 -9
- package/dist/api.js +9 -9
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +115 -9
- package/dist/esm/api.js +9 -9
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/EcommerceProductVariantsApi.md +1 -1
- package/docs/EcommerceProductsApi.md +1 -1
- package/docs/EcommerceV1ProductCreatePhysicalProductRequest.md +2 -0
- package/docs/EcommerceV1ProductCreatePhysicalProductRequestSeoSettings.md +25 -0
- package/docs/EcommerceV1ProductUpdateRequest.md +4 -0
- package/docs/EcommerceV1ProductUpdateRequestCollectionChanges.md +23 -0
- package/docs/EcommerceV1ProductUpdateRequestCollectionChangesAddInner.md +20 -0
- package/docs/EcommerceV1ProductUpdateRequestSeoSettings.md +25 -0
- package/docs/EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner.md +2 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.1.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
|
|
@@ -5306,6 +5306,37 @@ export interface EcommerceV1ProductCreatePhysicalProductRequest {
|
|
|
5306
5306
|
* @memberof EcommerceV1ProductCreatePhysicalProductRequest
|
|
5307
5307
|
*/
|
|
5308
5308
|
'currency': string | null;
|
|
5309
|
+
/**
|
|
5310
|
+
*
|
|
5311
|
+
* @type {EcommerceV1ProductCreatePhysicalProductRequestSeoSettings}
|
|
5312
|
+
* @memberof EcommerceV1ProductCreatePhysicalProductRequest
|
|
5313
|
+
*/
|
|
5314
|
+
'seo_settings': EcommerceV1ProductCreatePhysicalProductRequestSeoSettings;
|
|
5315
|
+
}
|
|
5316
|
+
/**
|
|
5317
|
+
* 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.
|
|
5318
|
+
* @export
|
|
5319
|
+
* @interface EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
|
|
5320
|
+
*/
|
|
5321
|
+
export interface EcommerceV1ProductCreatePhysicalProductRequestSeoSettings {
|
|
5322
|
+
/**
|
|
5323
|
+
* Search-engine title for the product page.
|
|
5324
|
+
* @type {string}
|
|
5325
|
+
* @memberof EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
|
|
5326
|
+
*/
|
|
5327
|
+
'title': string;
|
|
5328
|
+
/**
|
|
5329
|
+
* Search-engine description for the product page.
|
|
5330
|
+
* @type {string}
|
|
5331
|
+
* @memberof EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
|
|
5332
|
+
*/
|
|
5333
|
+
'description': string;
|
|
5334
|
+
/**
|
|
5335
|
+
* URL slug of the product page. Lowercase letters, digits and dashes.
|
|
5336
|
+
* @type {string}
|
|
5337
|
+
* @memberof EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
|
|
5338
|
+
*/
|
|
5339
|
+
'slug': string;
|
|
5309
5340
|
}
|
|
5310
5341
|
/**
|
|
5311
5342
|
*
|
|
@@ -5713,6 +5744,18 @@ export interface EcommerceV1ProductUpdateRequest {
|
|
|
5713
5744
|
* @memberof EcommerceV1ProductUpdateRequest
|
|
5714
5745
|
*/
|
|
5715
5746
|
'status': EcommerceV1ProductUpdateRequestStatusEnum;
|
|
5747
|
+
/**
|
|
5748
|
+
*
|
|
5749
|
+
* @type {EcommerceV1ProductUpdateRequestSeoSettings}
|
|
5750
|
+
* @memberof EcommerceV1ProductUpdateRequest
|
|
5751
|
+
*/
|
|
5752
|
+
'seo_settings': EcommerceV1ProductUpdateRequestSeoSettings;
|
|
5753
|
+
/**
|
|
5754
|
+
*
|
|
5755
|
+
* @type {EcommerceV1ProductUpdateRequestCollectionChanges}
|
|
5756
|
+
* @memberof EcommerceV1ProductUpdateRequest
|
|
5757
|
+
*/
|
|
5758
|
+
'collection_changes': EcommerceV1ProductUpdateRequestCollectionChanges;
|
|
5716
5759
|
}
|
|
5717
5760
|
export declare const EcommerceV1ProductUpdateRequestStatusEnum: {
|
|
5718
5761
|
readonly Draft: "draft";
|
|
@@ -5720,6 +5763,63 @@ export declare const EcommerceV1ProductUpdateRequestStatusEnum: {
|
|
|
5720
5763
|
readonly Archived: "archived";
|
|
5721
5764
|
};
|
|
5722
5765
|
export type EcommerceV1ProductUpdateRequestStatusEnum = typeof EcommerceV1ProductUpdateRequestStatusEnum[keyof typeof EcommerceV1ProductUpdateRequestStatusEnum];
|
|
5766
|
+
/**
|
|
5767
|
+
* Adds the product to or removes it from collections without touching its other collections. Send at least one collection in add or remove.
|
|
5768
|
+
* @export
|
|
5769
|
+
* @interface EcommerceV1ProductUpdateRequestCollectionChanges
|
|
5770
|
+
*/
|
|
5771
|
+
export interface EcommerceV1ProductUpdateRequestCollectionChanges {
|
|
5772
|
+
/**
|
|
5773
|
+
* Collections to add the product to. Every id must exist in the store.
|
|
5774
|
+
* @type {Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>}
|
|
5775
|
+
* @memberof EcommerceV1ProductUpdateRequestCollectionChanges
|
|
5776
|
+
*/
|
|
5777
|
+
'add': Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>;
|
|
5778
|
+
/**
|
|
5779
|
+
* Collections to take the product out of. Ids the product is not in are ignored.
|
|
5780
|
+
* @type {Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>}
|
|
5781
|
+
* @memberof EcommerceV1ProductUpdateRequestCollectionChanges
|
|
5782
|
+
*/
|
|
5783
|
+
'remove': Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>;
|
|
5784
|
+
}
|
|
5785
|
+
/**
|
|
5786
|
+
*
|
|
5787
|
+
* @export
|
|
5788
|
+
* @interface EcommerceV1ProductUpdateRequestCollectionChangesAddInner
|
|
5789
|
+
*/
|
|
5790
|
+
export interface EcommerceV1ProductUpdateRequestCollectionChangesAddInner {
|
|
5791
|
+
/**
|
|
5792
|
+
* The collection id.
|
|
5793
|
+
* @type {string}
|
|
5794
|
+
* @memberof EcommerceV1ProductUpdateRequestCollectionChangesAddInner
|
|
5795
|
+
*/
|
|
5796
|
+
'id': string;
|
|
5797
|
+
}
|
|
5798
|
+
/**
|
|
5799
|
+
* Search-engine settings to change. Send at least one field; omitted fields keep their current values.
|
|
5800
|
+
* @export
|
|
5801
|
+
* @interface EcommerceV1ProductUpdateRequestSeoSettings
|
|
5802
|
+
*/
|
|
5803
|
+
export interface EcommerceV1ProductUpdateRequestSeoSettings {
|
|
5804
|
+
/**
|
|
5805
|
+
* Search-engine title for the product page.
|
|
5806
|
+
* @type {string}
|
|
5807
|
+
* @memberof EcommerceV1ProductUpdateRequestSeoSettings
|
|
5808
|
+
*/
|
|
5809
|
+
'title': string;
|
|
5810
|
+
/**
|
|
5811
|
+
* Search-engine description for the product page.
|
|
5812
|
+
* @type {string}
|
|
5813
|
+
* @memberof EcommerceV1ProductUpdateRequestSeoSettings
|
|
5814
|
+
*/
|
|
5815
|
+
'description': string;
|
|
5816
|
+
/**
|
|
5817
|
+
* URL slug of the product page. Lowercase letters, digits and dashes.
|
|
5818
|
+
* @type {string}
|
|
5819
|
+
* @memberof EcommerceV1ProductUpdateRequestSeoSettings
|
|
5820
|
+
*/
|
|
5821
|
+
'slug': string;
|
|
5822
|
+
}
|
|
5723
5823
|
/**
|
|
5724
5824
|
*
|
|
5725
5825
|
* @export
|
|
@@ -6366,6 +6466,12 @@ export interface EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner {
|
|
|
6366
6466
|
* @memberof EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner
|
|
6367
6467
|
*/
|
|
6368
6468
|
'title': string;
|
|
6469
|
+
/**
|
|
6470
|
+
* The variant SKU.
|
|
6471
|
+
* @type {string}
|
|
6472
|
+
* @memberof EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner
|
|
6473
|
+
*/
|
|
6474
|
+
'sku': string;
|
|
6369
6475
|
/**
|
|
6370
6476
|
* Units in stock.
|
|
6371
6477
|
* @type {number}
|
|
@@ -22980,7 +23086,7 @@ export declare const EcommerceProductVariantsApiAxiosParamCreator: (configuratio
|
|
|
22980
23086
|
*/
|
|
22981
23087
|
listProductVariantsV1: (storeId: string, productId: string, page?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
22982
23088
|
/**
|
|
22983
|
-
* 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.
|
|
23089
|
+
* 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.
|
|
22984
23090
|
* @summary Update product variants in batch
|
|
22985
23091
|
* @param {string} storeId The ID of the store that owns the product.
|
|
22986
23092
|
* @param {string} productId The ID of the product whose variants are being updated.
|
|
@@ -23026,7 +23132,7 @@ export declare const EcommerceProductVariantsApiFp: (configuration?: Configurati
|
|
|
23026
23132
|
*/
|
|
23027
23133
|
listProductVariantsV1(storeId: string, productId: string, page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceListProductVariantsV1200Response>>;
|
|
23028
23134
|
/**
|
|
23029
|
-
* 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.
|
|
23135
|
+
* 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.
|
|
23030
23136
|
* @summary Update product variants in batch
|
|
23031
23137
|
* @param {string} storeId The ID of the store that owns the product.
|
|
23032
23138
|
* @param {string} productId The ID of the product whose variants are being updated.
|
|
@@ -23072,7 +23178,7 @@ export declare const EcommerceProductVariantsApiFactory: (configuration?: Config
|
|
|
23072
23178
|
*/
|
|
23073
23179
|
listProductVariantsV1(storeId: string, productId: string, page?: number, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceListProductVariantsV1200Response>;
|
|
23074
23180
|
/**
|
|
23075
|
-
* 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.
|
|
23181
|
+
* 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.
|
|
23076
23182
|
* @summary Update product variants in batch
|
|
23077
23183
|
* @param {string} storeId The ID of the store that owns the product.
|
|
23078
23184
|
* @param {string} productId The ID of the product whose variants are being updated.
|
|
@@ -23123,7 +23229,7 @@ export declare class EcommerceProductVariantsApi extends BaseAPI {
|
|
|
23123
23229
|
*/
|
|
23124
23230
|
listProductVariantsV1(storeId: string, productId: string, page?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceListProductVariantsV1200Response, any, {}, any>>;
|
|
23125
23231
|
/**
|
|
23126
|
-
* 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.
|
|
23232
|
+
* 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.
|
|
23127
23233
|
* @summary Update product variants in batch
|
|
23128
23234
|
* @param {string} storeId The ID of the store that owns the product.
|
|
23129
23235
|
* @param {string} productId The ID of the product whose variants are being updated.
|
|
@@ -23189,7 +23295,7 @@ export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Con
|
|
|
23189
23295
|
*/
|
|
23190
23296
|
listProductsV1: (storeId: string, productIds?: Array<string>, status?: Array<ListProductsV1StatusEnum>, q?: string, include?: Array<ListProductsV1IncludeEnum>, page?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
23191
23297
|
/**
|
|
23192
|
-
* Update a product\'s name, description or
|
|
23298
|
+
* 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.
|
|
23193
23299
|
* @summary Update a product
|
|
23194
23300
|
* @param {string} storeId The ID of the store that owns the product.
|
|
23195
23301
|
* @param {string} productId The ID of the product to update.
|
|
@@ -23264,7 +23370,7 @@ export declare const EcommerceProductsApiFp: (configuration?: Configuration) =>
|
|
|
23264
23370
|
*/
|
|
23265
23371
|
listProductsV1(storeId: string, productIds?: Array<string>, status?: Array<ListProductsV1StatusEnum>, q?: string, include?: Array<ListProductsV1IncludeEnum>, page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceListProductsV1200Response>>;
|
|
23266
23372
|
/**
|
|
23267
|
-
* Update a product\'s name, description or
|
|
23373
|
+
* 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.
|
|
23268
23374
|
* @summary Update a product
|
|
23269
23375
|
* @param {string} storeId The ID of the store that owns the product.
|
|
23270
23376
|
* @param {string} productId The ID of the product to update.
|
|
@@ -23339,7 +23445,7 @@ export declare const EcommerceProductsApiFactory: (configuration?: Configuration
|
|
|
23339
23445
|
*/
|
|
23340
23446
|
listProductsV1(storeId: string, productIds?: Array<string>, status?: Array<ListProductsV1StatusEnum>, q?: string, include?: Array<ListProductsV1IncludeEnum>, page?: number, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceListProductsV1200Response>;
|
|
23341
23447
|
/**
|
|
23342
|
-
* Update a product\'s name, description or
|
|
23448
|
+
* 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.
|
|
23343
23449
|
* @summary Update a product
|
|
23344
23450
|
* @param {string} storeId The ID of the store that owns the product.
|
|
23345
23451
|
* @param {string} productId The ID of the product to update.
|
|
@@ -23421,7 +23527,7 @@ export declare class EcommerceProductsApi extends BaseAPI {
|
|
|
23421
23527
|
*/
|
|
23422
23528
|
listProductsV1(storeId: string, productIds?: Array<string>, status?: Array<ListProductsV1StatusEnum>, q?: string, include?: Array<ListProductsV1IncludeEnum>, page?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceListProductsV1200Response, any, {}, any>>;
|
|
23423
23529
|
/**
|
|
23424
|
-
* Update a product\'s name, description or
|
|
23530
|
+
* 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.
|
|
23425
23531
|
* @summary Update a product
|
|
23426
23532
|
* @param {string} storeId The ID of the store that owns the product.
|
|
23427
23533
|
* @param {string} productId The ID of the product to update.
|
package/dist/esm/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.1.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
|
|
@@ -10632,7 +10632,7 @@ export const EcommerceProductVariantsApiAxiosParamCreator = function (configurat
|
|
|
10632
10632
|
};
|
|
10633
10633
|
}),
|
|
10634
10634
|
/**
|
|
10635
|
-
* 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.
|
|
10635
|
+
* 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.
|
|
10636
10636
|
* @summary Update product variants in batch
|
|
10637
10637
|
* @param {string} storeId The ID of the store that owns the product.
|
|
10638
10638
|
* @param {string} productId The ID of the product whose variants are being updated.
|
|
@@ -10733,7 +10733,7 @@ export const EcommerceProductVariantsApiFp = function (configuration) {
|
|
|
10733
10733
|
});
|
|
10734
10734
|
},
|
|
10735
10735
|
/**
|
|
10736
|
-
* 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.
|
|
10736
|
+
* 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.
|
|
10737
10737
|
* @summary Update product variants in batch
|
|
10738
10738
|
* @param {string} storeId The ID of the store that owns the product.
|
|
10739
10739
|
* @param {string} productId The ID of the product whose variants are being updated.
|
|
@@ -10795,7 +10795,7 @@ export const EcommerceProductVariantsApiFactory = function (configuration, baseP
|
|
|
10795
10795
|
return localVarFp.listProductVariantsV1(storeId, productId, page, options).then((request) => request(axios, basePath));
|
|
10796
10796
|
},
|
|
10797
10797
|
/**
|
|
10798
|
-
* 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.
|
|
10798
|
+
* 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.
|
|
10799
10799
|
* @summary Update product variants in batch
|
|
10800
10800
|
* @param {string} storeId The ID of the store that owns the product.
|
|
10801
10801
|
* @param {string} productId The ID of the product whose variants are being updated.
|
|
@@ -10855,7 +10855,7 @@ export class EcommerceProductVariantsApi extends BaseAPI {
|
|
|
10855
10855
|
return EcommerceProductVariantsApiFp(this.configuration).listProductVariantsV1(storeId, productId, page, options).then((request) => request(this.axios, this.basePath));
|
|
10856
10856
|
}
|
|
10857
10857
|
/**
|
|
10858
|
-
* 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.
|
|
10858
|
+
* 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.
|
|
10859
10859
|
* @summary Update product variants in batch
|
|
10860
10860
|
* @param {string} storeId The ID of the store that owns the product.
|
|
10861
10861
|
* @param {string} productId The ID of the product whose variants are being updated.
|
|
@@ -11073,7 +11073,7 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
|
|
|
11073
11073
|
};
|
|
11074
11074
|
}),
|
|
11075
11075
|
/**
|
|
11076
|
-
* Update a product\'s name, description or
|
|
11076
|
+
* 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.
|
|
11077
11077
|
* @summary Update a product
|
|
11078
11078
|
* @param {string} storeId The ID of the store that owns the product.
|
|
11079
11079
|
* @param {string} productId The ID of the product to update.
|
|
@@ -11248,7 +11248,7 @@ export const EcommerceProductsApiFp = function (configuration) {
|
|
|
11248
11248
|
});
|
|
11249
11249
|
},
|
|
11250
11250
|
/**
|
|
11251
|
-
* Update a product\'s name, description or
|
|
11251
|
+
* 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.
|
|
11252
11252
|
* @summary Update a product
|
|
11253
11253
|
* @param {string} storeId The ID of the store that owns the product.
|
|
11254
11254
|
* @param {string} productId The ID of the product to update.
|
|
@@ -11350,7 +11350,7 @@ export const EcommerceProductsApiFactory = function (configuration, basePath, ax
|
|
|
11350
11350
|
return localVarFp.listProductsV1(storeId, productIds, status, q, include, page, options).then((request) => request(axios, basePath));
|
|
11351
11351
|
},
|
|
11352
11352
|
/**
|
|
11353
|
-
* Update a product\'s name, description or
|
|
11353
|
+
* 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.
|
|
11354
11354
|
* @summary Update a product
|
|
11355
11355
|
* @param {string} storeId The ID of the store that owns the product.
|
|
11356
11356
|
* @param {string} productId The ID of the product to update.
|
|
@@ -11447,7 +11447,7 @@ export class EcommerceProductsApi extends BaseAPI {
|
|
|
11447
11447
|
return EcommerceProductsApiFp(this.configuration).listProductsV1(storeId, productIds, status, q, include, page, options).then((request) => request(this.axios, this.basePath));
|
|
11448
11448
|
}
|
|
11449
11449
|
/**
|
|
11450
|
-
* Update a product\'s name, description or
|
|
11450
|
+
* 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.
|
|
11451
11451
|
* @summary Update a product
|
|
11452
11452
|
* @param {string} storeId The ID of the store that owns the product.
|
|
11453
11453
|
* @param {string} productId The ID of the product to update.
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.1.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/base.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.1.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/esm/common.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.1.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/common.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.1.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: 2.
|
|
4
|
+
* API Version: 2.1.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: 2.
|
|
6
|
+
* API Version: 2.1.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/2.
|
|
16
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/2.1.0" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
17
17
|
this.formDataCtor = param.formDataCtor;
|
|
18
18
|
}
|
|
19
19
|
/**
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hostinger API
|
|
3
3
|
*
|
|
4
|
-
* API Version: 2.
|
|
4
|
+
* API Version: 2.1.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: 2.
|
|
6
|
+
* API Version: 2.1.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: 2.
|
|
4
|
+
* API Version: 2.1.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: 2.
|
|
7
|
+
* API Version: 2.1.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
|
|
@@ -191,7 +191,7 @@ const { status, data } = await apiInstance.listProductVariantsV1(
|
|
|
191
191
|
# **updateProductVariantsInBatchV1**
|
|
192
192
|
> EcommerceV1VariantVariantListResponseResource updateProductVariantsInBatchV1(ecommerceV1VariantBatchUpdateVariantsRequest)
|
|
193
193
|
|
|
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.
|
|
195
195
|
|
|
196
196
|
### Example
|
|
197
197
|
|
|
@@ -311,7 +311,7 @@ const { status, data } = await apiInstance.listProductsV1(
|
|
|
311
311
|
# **updateAProductV1**
|
|
312
312
|
> EcommerceV1ProductProductResponseResource updateAProductV1(ecommerceV1ProductUpdateRequest)
|
|
313
313
|
|
|
314
|
-
Update a product\'s name, description or
|
|
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.
|
|
315
315
|
|
|
316
316
|
### Example
|
|
317
317
|
|
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**price** | **number** | Price in the smallest currency unit (e.g. cents). Must be positive. | [default to undefined]
|
|
10
10
|
**description** | **string** | The product description. | [optional] [default to undefined]
|
|
11
11
|
**currency** | **string** | ISO 4217 currency code. Defaults to the store\'s default currency when omitted. | [optional] [default to undefined]
|
|
12
|
+
**seo_settings** | [**EcommerceV1ProductCreatePhysicalProductRequestSeoSettings**](EcommerceV1ProductCreatePhysicalProductRequestSeoSettings.md) | | [optional] [default to undefined]
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const instance: EcommerceV1ProductCreatePhysicalProductRequest = {
|
|
|
20
21
|
price,
|
|
21
22
|
description,
|
|
22
23
|
currency,
|
|
24
|
+
seo_settings,
|
|
23
25
|
};
|
|
24
26
|
```
|
|
25
27
|
|
|
@@ -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)
|
|
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
|
|
|
8
8
|
**name** | **string** | The product name. | [optional] [default to undefined]
|
|
9
9
|
**description** | **string** | The product description. | [optional] [default to undefined]
|
|
10
10
|
**status** | **string** | Set \"published\" to make the product buyable, \"draft\" to hide it, or \"archived\" 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]
|
|
11
13
|
|
|
12
14
|
## Example
|
|
13
15
|
|
|
@@ -18,6 +20,8 @@ const instance: EcommerceV1ProductUpdateRequest = {
|
|
|
18
20
|
name,
|
|
19
21
|
description,
|
|
20
22
|
status,
|
|
23
|
+
seo_settings,
|
|
24
|
+
collection_changes,
|
|
21
25
|
};
|
|
22
26
|
```
|
|
23
27
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# EcommerceV1ProductUpdateRequestCollectionChanges
|
|
2
|
+
|
|
3
|
+
Adds the product to or removes it from collections without touching its other collections. Send at least one collection in add or remove.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**add** | [**Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>**](EcommerceV1ProductUpdateRequestCollectionChangesAddInner.md) | Collections to add the product to. Every id must exist in the store. | [optional] [default to undefined]
|
|
10
|
+
**remove** | [**Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>**](EcommerceV1ProductUpdateRequestCollectionChangesAddInner.md) | Collections to take the product out of. Ids the product is not in are ignored. | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { EcommerceV1ProductUpdateRequestCollectionChanges } from '@hostinger/sdk';
|
|
16
|
+
|
|
17
|
+
const instance: EcommerceV1ProductUpdateRequestCollectionChanges = {
|
|
18
|
+
add,
|
|
19
|
+
remove,
|
|
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,0 +1,20 @@
|
|
|
1
|
+
# EcommerceV1ProductUpdateRequestCollectionChangesAddInner
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | The collection id. | [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { EcommerceV1ProductUpdateRequestCollectionChangesAddInner } from '@hostinger/sdk';
|
|
14
|
+
|
|
15
|
+
const instance: EcommerceV1ProductUpdateRequestCollectionChangesAddInner = {
|
|
16
|
+
id,
|
|
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,25 @@
|
|
|
1
|
+
# EcommerceV1ProductUpdateRequestSeoSettings
|
|
2
|
+
|
|
3
|
+
Search-engine settings to change. Send at least one field; omitted fields keep their current values.
|
|
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 { EcommerceV1ProductUpdateRequestSeoSettings } from '@hostinger/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: EcommerceV1ProductUpdateRequestSeoSettings = {
|
|
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)
|
|
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**variant_id** | **string** | The id of the variant to update. | [default to undefined]
|
|
9
9
|
**title** | **string** | The variant title. | [optional] [default to undefined]
|
|
10
|
+
**sku** | **string** | The variant SKU. | [optional] [default to undefined]
|
|
10
11
|
**inventory_quantity** | **number** | Units in stock. | [optional] [default to undefined]
|
|
11
12
|
**manage_inventory** | **boolean** | Whether stock is tracked for this variant. | [optional] [default to undefined]
|
|
12
13
|
**prices** | [**Array<EcommerceV1VariantBatchUpdateVariantsRequestVariantsInnerPricesInner>**](EcommerceV1VariantBatchUpdateVariantsRequestVariantsInnerPricesInner.md) | The full list of prices for the variant, replacing the existing ones. A free item is amount: 0. | [optional] [default to undefined]
|
|
@@ -19,6 +20,7 @@ import { EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner } from '@host
|
|
|
19
20
|
const instance: EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner = {
|
|
20
21
|
variant_id,
|
|
21
22
|
title,
|
|
23
|
+
sku,
|
|
22
24
|
inventory_quantity,
|
|
23
25
|
manage_inventory,
|
|
24
26
|
prices,
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 2.
|
|
6
|
+
* API Version: 2.1.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
|