hostinger-api-sdk 1.30.1 → 1.30.2

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 CHANGED
@@ -1,9 +1,9 @@
1
- ## hostinger-api-sdk@1.30.1
1
+ ## hostinger-api-sdk@1.30.2
2
2
 
3
3
  For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
4
4
 
5
5
  ### Usage
6
6
 
7
7
  ```
8
- npm install hostinger-api-sdk@1.30.1 --save
8
+ npm install hostinger-api-sdk@1.30.2 --save
9
9
  ```
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.1
6
+ * API Version: 1.32.2
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
@@ -3543,6 +3543,44 @@ export const EcommerceV1ProductProductCreationResourceProductTypeEnum = {
3543
3543
 
3544
3544
  export type EcommerceV1ProductProductCreationResourceProductTypeEnum = typeof EcommerceV1ProductProductCreationResourceProductTypeEnum[keyof typeof EcommerceV1ProductProductCreationResourceProductTypeEnum];
3545
3545
 
3546
+ /**
3547
+ *
3548
+ * @export
3549
+ * @interface EcommerceV1ProductProductImageUploadResource
3550
+ */
3551
+ export interface EcommerceV1ProductProductImageUploadResource {
3552
+ /**
3553
+ * CDN URL of the uploaded image.
3554
+ * @type {string}
3555
+ * @memberof EcommerceV1ProductProductImageUploadResource
3556
+ */
3557
+ 'url': string;
3558
+ /**
3559
+ * Whether the image was set as the product\'s thumbnail (primary image).
3560
+ * @type {boolean}
3561
+ * @memberof EcommerceV1ProductProductImageUploadResource
3562
+ */
3563
+ 'is_thumbnail': boolean;
3564
+ }
3565
+ /**
3566
+ *
3567
+ * @export
3568
+ * @interface EcommerceV1ProductUploadProductImageRequest
3569
+ */
3570
+ export interface EcommerceV1ProductUploadProductImageRequest {
3571
+ /**
3572
+ * Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted.
3573
+ * @type {string}
3574
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3575
+ */
3576
+ 'image': string;
3577
+ /**
3578
+ * 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.
3579
+ * @type {boolean}
3580
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3581
+ */
3582
+ 'is_thumbnail': boolean | null;
3583
+ }
3546
3584
  /**
3547
3585
  *
3548
3586
  * @export
@@ -19282,6 +19320,54 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration?: C
19282
19320
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
19283
19321
  localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1ProductCreatePhysicalProductRequest, localVarRequestOptions, configuration)
19284
19322
 
19323
+ return {
19324
+ url: toPathString(localVarUrlObj),
19325
+ options: localVarRequestOptions,
19326
+ };
19327
+ },
19328
+ /**
19329
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
19330
+ * @summary Upload and attach a product image
19331
+ * @param {string} storeId The ID of the store the product belongs to.
19332
+ * @param {string} productId The ID of the product to attach the image to.
19333
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
19334
+ * @param {*} [options] Override http request option.
19335
+ * @throws {RequiredError}
19336
+ */
19337
+ uploadAndAttachAProductImageV1: async (storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
19338
+ // verify required parameter 'storeId' is not null or undefined
19339
+ assertParamExists('uploadAndAttachAProductImageV1', 'storeId', storeId)
19340
+ // verify required parameter 'productId' is not null or undefined
19341
+ assertParamExists('uploadAndAttachAProductImageV1', 'productId', productId)
19342
+ // verify required parameter 'ecommerceV1ProductUploadProductImageRequest' is not null or undefined
19343
+ assertParamExists('uploadAndAttachAProductImageV1', 'ecommerceV1ProductUploadProductImageRequest', ecommerceV1ProductUploadProductImageRequest)
19344
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/images`
19345
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
19346
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
19347
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
19348
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
19349
+ let baseOptions;
19350
+ if (configuration) {
19351
+ baseOptions = configuration.baseOptions;
19352
+ }
19353
+
19354
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
19355
+ const localVarHeaderParameter = {} as any;
19356
+ const localVarQueryParameter = {} as any;
19357
+
19358
+ // authentication apiToken required
19359
+ // http bearer authentication required
19360
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
19361
+
19362
+
19363
+
19364
+ localVarHeaderParameter['Content-Type'] = 'application/json';
19365
+
19366
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
19367
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
19368
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
19369
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1ProductUploadProductImageRequest, localVarRequestOptions, configuration)
19370
+
19285
19371
  return {
19286
19372
  url: toPathString(localVarUrlObj),
19287
19373
  options: localVarRequestOptions,
@@ -19323,6 +19409,20 @@ export const EcommerceProductsApiFp = function(configuration?: Configuration) {
19323
19409
  const localVarOperationServerBasePath = operationServerMap['EcommerceProductsApi.createPhysicalProductV1']?.[0]?.url;
19324
19410
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19325
19411
  },
19412
+ /**
19413
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
19414
+ * @summary Upload and attach a product image
19415
+ * @param {string} storeId The ID of the store the product belongs to.
19416
+ * @param {string} productId The ID of the product to attach the image to.
19417
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
19418
+ * @param {*} [options] Override http request option.
19419
+ * @throws {RequiredError}
19420
+ */
19421
+ async uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductImageUploadResource>> {
19422
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options);
19423
+ const localVarOperationServerBasePath = operationServerMap['EcommerceProductsApi.uploadAndAttachAProductImageV1']?.[0]?.url;
19424
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19425
+ },
19326
19426
  }
19327
19427
  };
19328
19428
 
@@ -19355,6 +19455,18 @@ export const EcommerceProductsApiFactory = function (configuration?: Configurati
19355
19455
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductCreationResource> {
19356
19456
  return localVarFp.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(axios, basePath));
19357
19457
  },
19458
+ /**
19459
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
19460
+ * @summary Upload and attach a product image
19461
+ * @param {string} storeId The ID of the store the product belongs to.
19462
+ * @param {string} productId The ID of the product to attach the image to.
19463
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
19464
+ * @param {*} [options] Override http request option.
19465
+ * @throws {RequiredError}
19466
+ */
19467
+ uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductImageUploadResource> {
19468
+ return localVarFp.uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(axios, basePath));
19469
+ },
19358
19470
  };
19359
19471
  };
19360
19472
 
@@ -19390,6 +19502,20 @@ export class EcommerceProductsApi extends BaseAPI {
19390
19502
  public createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig) {
19391
19503
  return EcommerceProductsApiFp(this.configuration).createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(this.axios, this.basePath));
19392
19504
  }
19505
+
19506
+ /**
19507
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
19508
+ * @summary Upload and attach a product image
19509
+ * @param {string} storeId The ID of the store the product belongs to.
19510
+ * @param {string} productId The ID of the product to attach the image to.
19511
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
19512
+ * @param {*} [options] Override http request option.
19513
+ * @throws {RequiredError}
19514
+ * @memberof EcommerceProductsApi
19515
+ */
19516
+ public uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig) {
19517
+ return EcommerceProductsApiFp(this.configuration).uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(this.axios, this.basePath));
19518
+ }
19393
19519
  }
19394
19520
 
19395
19521
 
package/base.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.1
6
+ * API Version: 1.32.2
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/common.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.1
6
+ * API Version: 1.32.2
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/configuration.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.1
6
+ * API Version: 1.32.2
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
@@ -48,7 +48,7 @@ export class Configuration {
48
48
  this.baseOptions = {
49
49
  ...param.baseOptions,
50
50
  headers: {
51
- 'User-Agent': "hostinger-typescript-sdk/1.30.1",
51
+ 'User-Agent': "hostinger-typescript-sdk/1.30.2",
52
52
  ...param.baseOptions?.headers,
53
53
  },
54
54
  };
package/dist/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.1
4
+ * API Version: 1.32.2
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
@@ -3462,6 +3462,44 @@ export declare const EcommerceV1ProductProductCreationResourceProductTypeEnum: {
3462
3462
  readonly Digital: "digital";
3463
3463
  };
3464
3464
  export type EcommerceV1ProductProductCreationResourceProductTypeEnum = typeof EcommerceV1ProductProductCreationResourceProductTypeEnum[keyof typeof EcommerceV1ProductProductCreationResourceProductTypeEnum];
3465
+ /**
3466
+ *
3467
+ * @export
3468
+ * @interface EcommerceV1ProductProductImageUploadResource
3469
+ */
3470
+ export interface EcommerceV1ProductProductImageUploadResource {
3471
+ /**
3472
+ * CDN URL of the uploaded image.
3473
+ * @type {string}
3474
+ * @memberof EcommerceV1ProductProductImageUploadResource
3475
+ */
3476
+ 'url': string;
3477
+ /**
3478
+ * Whether the image was set as the product\'s thumbnail (primary image).
3479
+ * @type {boolean}
3480
+ * @memberof EcommerceV1ProductProductImageUploadResource
3481
+ */
3482
+ 'is_thumbnail': boolean;
3483
+ }
3484
+ /**
3485
+ *
3486
+ * @export
3487
+ * @interface EcommerceV1ProductUploadProductImageRequest
3488
+ */
3489
+ export interface EcommerceV1ProductUploadProductImageRequest {
3490
+ /**
3491
+ * Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted.
3492
+ * @type {string}
3493
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3494
+ */
3495
+ 'image': string;
3496
+ /**
3497
+ * 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.
3498
+ * @type {boolean}
3499
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3500
+ */
3501
+ 'is_thumbnail': boolean | null;
3502
+ }
3465
3503
  /**
3466
3504
  *
3467
3505
  * @export
@@ -15183,6 +15221,16 @@ export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Con
15183
15221
  * @throws {RequiredError}
15184
15222
  */
15185
15223
  createPhysicalProductV1: (storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15224
+ /**
15225
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
15226
+ * @summary Upload and attach a product image
15227
+ * @param {string} storeId The ID of the store the product belongs to.
15228
+ * @param {string} productId The ID of the product to attach the image to.
15229
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
15230
+ * @param {*} [options] Override http request option.
15231
+ * @throws {RequiredError}
15232
+ */
15233
+ uploadAndAttachAProductImageV1: (storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15186
15234
  };
15187
15235
  /**
15188
15236
  * EcommerceProductsApi - functional programming interface
@@ -15207,6 +15255,16 @@ export declare const EcommerceProductsApiFp: (configuration?: Configuration) =>
15207
15255
  * @throws {RequiredError}
15208
15256
  */
15209
15257
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductCreationResource>>;
15258
+ /**
15259
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
15260
+ * @summary Upload and attach a product image
15261
+ * @param {string} storeId The ID of the store the product belongs to.
15262
+ * @param {string} productId The ID of the product to attach the image to.
15263
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
15264
+ * @param {*} [options] Override http request option.
15265
+ * @throws {RequiredError}
15266
+ */
15267
+ uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductImageUploadResource>>;
15210
15268
  };
15211
15269
  /**
15212
15270
  * EcommerceProductsApi - factory interface
@@ -15231,6 +15289,16 @@ export declare const EcommerceProductsApiFactory: (configuration?: Configuration
15231
15289
  * @throws {RequiredError}
15232
15290
  */
15233
15291
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductCreationResource>;
15292
+ /**
15293
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
15294
+ * @summary Upload and attach a product image
15295
+ * @param {string} storeId The ID of the store the product belongs to.
15296
+ * @param {string} productId The ID of the product to attach the image to.
15297
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
15298
+ * @param {*} [options] Override http request option.
15299
+ * @throws {RequiredError}
15300
+ */
15301
+ uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductImageUploadResource>;
15234
15302
  };
15235
15303
  /**
15236
15304
  * EcommerceProductsApi - object-oriented interface
@@ -15259,6 +15327,17 @@ export declare class EcommerceProductsApi extends BaseAPI {
15259
15327
  * @memberof EcommerceProductsApi
15260
15328
  */
15261
15329
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1ProductProductCreationResource, any, {}, any>>;
15330
+ /**
15331
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
15332
+ * @summary Upload and attach a product image
15333
+ * @param {string} storeId The ID of the store the product belongs to.
15334
+ * @param {string} productId The ID of the product to attach the image to.
15335
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
15336
+ * @param {*} [options] Override http request option.
15337
+ * @throws {RequiredError}
15338
+ * @memberof EcommerceProductsApi
15339
+ */
15340
+ uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1ProductProductImageUploadResource, any, {}, any>>;
15262
15341
  }
15263
15342
  /**
15264
15343
  * EcommerceSalesChannelsApi - axios parameter creator
package/dist/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.32.1
7
+ * API Version: 1.32.2
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
@@ -7700,6 +7700,47 @@ const EcommerceProductsApiAxiosParamCreator = function (configuration) {
7700
7700
  options: localVarRequestOptions,
7701
7701
  };
7702
7702
  }),
7703
+ /**
7704
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
7705
+ * @summary Upload and attach a product image
7706
+ * @param {string} storeId The ID of the store the product belongs to.
7707
+ * @param {string} productId The ID of the product to attach the image to.
7708
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
7709
+ * @param {*} [options] Override http request option.
7710
+ * @throws {RequiredError}
7711
+ */
7712
+ uploadAndAttachAProductImageV1: (storeId_1, productId_1, ecommerceV1ProductUploadProductImageRequest_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ecommerceV1ProductUploadProductImageRequest_1, ...args_1], void 0, function* (storeId, productId, ecommerceV1ProductUploadProductImageRequest, options = {}) {
7713
+ // verify required parameter 'storeId' is not null or undefined
7714
+ (0, common_1.assertParamExists)('uploadAndAttachAProductImageV1', 'storeId', storeId);
7715
+ // verify required parameter 'productId' is not null or undefined
7716
+ (0, common_1.assertParamExists)('uploadAndAttachAProductImageV1', 'productId', productId);
7717
+ // verify required parameter 'ecommerceV1ProductUploadProductImageRequest' is not null or undefined
7718
+ (0, common_1.assertParamExists)('uploadAndAttachAProductImageV1', 'ecommerceV1ProductUploadProductImageRequest', ecommerceV1ProductUploadProductImageRequest);
7719
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/images`
7720
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
7721
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
7722
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7723
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
7724
+ let baseOptions;
7725
+ if (configuration) {
7726
+ baseOptions = configuration.baseOptions;
7727
+ }
7728
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
7729
+ const localVarHeaderParameter = {};
7730
+ const localVarQueryParameter = {};
7731
+ // authentication apiToken required
7732
+ // http bearer authentication required
7733
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
7734
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7735
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
7736
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7737
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7738
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(ecommerceV1ProductUploadProductImageRequest, localVarRequestOptions, configuration);
7739
+ return {
7740
+ url: (0, common_1.toPathString)(localVarUrlObj),
7741
+ options: localVarRequestOptions,
7742
+ };
7743
+ }),
7703
7744
  };
7704
7745
  };
7705
7746
  exports.EcommerceProductsApiAxiosParamCreator = EcommerceProductsApiAxiosParamCreator;
@@ -7742,6 +7783,23 @@ const EcommerceProductsApiFp = function (configuration) {
7742
7783
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7743
7784
  });
7744
7785
  },
7786
+ /**
7787
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
7788
+ * @summary Upload and attach a product image
7789
+ * @param {string} storeId The ID of the store the product belongs to.
7790
+ * @param {string} productId The ID of the product to attach the image to.
7791
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
7792
+ * @param {*} [options] Override http request option.
7793
+ * @throws {RequiredError}
7794
+ */
7795
+ uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
7796
+ return __awaiter(this, void 0, void 0, function* () {
7797
+ var _a, _b;
7798
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options);
7799
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['EcommerceProductsApi.uploadAndAttachAProductImageV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
7800
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7801
+ });
7802
+ },
7745
7803
  };
7746
7804
  };
7747
7805
  exports.EcommerceProductsApiFp = EcommerceProductsApiFp;
@@ -7774,6 +7832,18 @@ const EcommerceProductsApiFactory = function (configuration, basePath, axios) {
7774
7832
  createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
7775
7833
  return localVarFp.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(axios, basePath));
7776
7834
  },
7835
+ /**
7836
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
7837
+ * @summary Upload and attach a product image
7838
+ * @param {string} storeId The ID of the store the product belongs to.
7839
+ * @param {string} productId The ID of the product to attach the image to.
7840
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
7841
+ * @param {*} [options] Override http request option.
7842
+ * @throws {RequiredError}
7843
+ */
7844
+ uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
7845
+ return localVarFp.uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(axios, basePath));
7846
+ },
7777
7847
  };
7778
7848
  };
7779
7849
  exports.EcommerceProductsApiFactory = EcommerceProductsApiFactory;
@@ -7808,6 +7878,19 @@ class EcommerceProductsApi extends base_1.BaseAPI {
7808
7878
  createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
7809
7879
  return (0, exports.EcommerceProductsApiFp)(this.configuration).createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(this.axios, this.basePath));
7810
7880
  }
7881
+ /**
7882
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
7883
+ * @summary Upload and attach a product image
7884
+ * @param {string} storeId The ID of the store the product belongs to.
7885
+ * @param {string} productId The ID of the product to attach the image to.
7886
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
7887
+ * @param {*} [options] Override http request option.
7888
+ * @throws {RequiredError}
7889
+ * @memberof EcommerceProductsApi
7890
+ */
7891
+ uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
7892
+ return (0, exports.EcommerceProductsApiFp)(this.configuration).uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(this.axios, this.basePath));
7893
+ }
7811
7894
  }
7812
7895
  exports.EcommerceProductsApi = EcommerceProductsApi;
7813
7896
  /**
package/dist/base.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.1
4
+ * API Version: 1.32.2
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/base.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.32.1
7
+ * API Version: 1.32.2
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
package/dist/common.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.1
4
+ * API Version: 1.32.2
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/common.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.32.1
7
+ * API Version: 1.32.2
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.1
4
+ * API Version: 1.32.2
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
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.32.1
7
+ * API Version: 1.32.2
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
@@ -16,7 +16,7 @@ class Configuration {
16
16
  var _a;
17
17
  this.accessToken = param.accessToken;
18
18
  this.basePath = param.basePath;
19
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.30.1" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
19
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.30.2" }, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
20
20
  this.formDataCtor = param.formDataCtor;
21
21
  }
22
22
  /**
package/dist/esm/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.1
4
+ * API Version: 1.32.2
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
@@ -3462,6 +3462,44 @@ export declare const EcommerceV1ProductProductCreationResourceProductTypeEnum: {
3462
3462
  readonly Digital: "digital";
3463
3463
  };
3464
3464
  export type EcommerceV1ProductProductCreationResourceProductTypeEnum = typeof EcommerceV1ProductProductCreationResourceProductTypeEnum[keyof typeof EcommerceV1ProductProductCreationResourceProductTypeEnum];
3465
+ /**
3466
+ *
3467
+ * @export
3468
+ * @interface EcommerceV1ProductProductImageUploadResource
3469
+ */
3470
+ export interface EcommerceV1ProductProductImageUploadResource {
3471
+ /**
3472
+ * CDN URL of the uploaded image.
3473
+ * @type {string}
3474
+ * @memberof EcommerceV1ProductProductImageUploadResource
3475
+ */
3476
+ 'url': string;
3477
+ /**
3478
+ * Whether the image was set as the product\'s thumbnail (primary image).
3479
+ * @type {boolean}
3480
+ * @memberof EcommerceV1ProductProductImageUploadResource
3481
+ */
3482
+ 'is_thumbnail': boolean;
3483
+ }
3484
+ /**
3485
+ *
3486
+ * @export
3487
+ * @interface EcommerceV1ProductUploadProductImageRequest
3488
+ */
3489
+ export interface EcommerceV1ProductUploadProductImageRequest {
3490
+ /**
3491
+ * Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted.
3492
+ * @type {string}
3493
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3494
+ */
3495
+ 'image': string;
3496
+ /**
3497
+ * 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.
3498
+ * @type {boolean}
3499
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3500
+ */
3501
+ 'is_thumbnail': boolean | null;
3502
+ }
3465
3503
  /**
3466
3504
  *
3467
3505
  * @export
@@ -15183,6 +15221,16 @@ export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Con
15183
15221
  * @throws {RequiredError}
15184
15222
  */
15185
15223
  createPhysicalProductV1: (storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15224
+ /**
15225
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
15226
+ * @summary Upload and attach a product image
15227
+ * @param {string} storeId The ID of the store the product belongs to.
15228
+ * @param {string} productId The ID of the product to attach the image to.
15229
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
15230
+ * @param {*} [options] Override http request option.
15231
+ * @throws {RequiredError}
15232
+ */
15233
+ uploadAndAttachAProductImageV1: (storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15186
15234
  };
15187
15235
  /**
15188
15236
  * EcommerceProductsApi - functional programming interface
@@ -15207,6 +15255,16 @@ export declare const EcommerceProductsApiFp: (configuration?: Configuration) =>
15207
15255
  * @throws {RequiredError}
15208
15256
  */
15209
15257
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductCreationResource>>;
15258
+ /**
15259
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
15260
+ * @summary Upload and attach a product image
15261
+ * @param {string} storeId The ID of the store the product belongs to.
15262
+ * @param {string} productId The ID of the product to attach the image to.
15263
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
15264
+ * @param {*} [options] Override http request option.
15265
+ * @throws {RequiredError}
15266
+ */
15267
+ uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductImageUploadResource>>;
15210
15268
  };
15211
15269
  /**
15212
15270
  * EcommerceProductsApi - factory interface
@@ -15231,6 +15289,16 @@ export declare const EcommerceProductsApiFactory: (configuration?: Configuration
15231
15289
  * @throws {RequiredError}
15232
15290
  */
15233
15291
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductCreationResource>;
15292
+ /**
15293
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
15294
+ * @summary Upload and attach a product image
15295
+ * @param {string} storeId The ID of the store the product belongs to.
15296
+ * @param {string} productId The ID of the product to attach the image to.
15297
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
15298
+ * @param {*} [options] Override http request option.
15299
+ * @throws {RequiredError}
15300
+ */
15301
+ uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductImageUploadResource>;
15234
15302
  };
15235
15303
  /**
15236
15304
  * EcommerceProductsApi - object-oriented interface
@@ -15259,6 +15327,17 @@ export declare class EcommerceProductsApi extends BaseAPI {
15259
15327
  * @memberof EcommerceProductsApi
15260
15328
  */
15261
15329
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1ProductProductCreationResource, any, {}, any>>;
15330
+ /**
15331
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
15332
+ * @summary Upload and attach a product image
15333
+ * @param {string} storeId The ID of the store the product belongs to.
15334
+ * @param {string} productId The ID of the product to attach the image to.
15335
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
15336
+ * @param {*} [options] Override http request option.
15337
+ * @throws {RequiredError}
15338
+ * @memberof EcommerceProductsApi
15339
+ */
15340
+ uploadAndAttachAProductImageV1(storeId: string, productId: string, ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1ProductProductImageUploadResource, any, {}, any>>;
15262
15341
  }
15263
15342
  /**
15264
15343
  * EcommerceSalesChannelsApi - axios parameter creator
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.1
6
+ * API Version: 1.32.2
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
@@ -7589,6 +7589,47 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
7589
7589
  options: localVarRequestOptions,
7590
7590
  };
7591
7591
  }),
7592
+ /**
7593
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
7594
+ * @summary Upload and attach a product image
7595
+ * @param {string} storeId The ID of the store the product belongs to.
7596
+ * @param {string} productId The ID of the product to attach the image to.
7597
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
7598
+ * @param {*} [options] Override http request option.
7599
+ * @throws {RequiredError}
7600
+ */
7601
+ uploadAndAttachAProductImageV1: (storeId_1, productId_1, ecommerceV1ProductUploadProductImageRequest_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ecommerceV1ProductUploadProductImageRequest_1, ...args_1], void 0, function* (storeId, productId, ecommerceV1ProductUploadProductImageRequest, options = {}) {
7602
+ // verify required parameter 'storeId' is not null or undefined
7603
+ assertParamExists('uploadAndAttachAProductImageV1', 'storeId', storeId);
7604
+ // verify required parameter 'productId' is not null or undefined
7605
+ assertParamExists('uploadAndAttachAProductImageV1', 'productId', productId);
7606
+ // verify required parameter 'ecommerceV1ProductUploadProductImageRequest' is not null or undefined
7607
+ assertParamExists('uploadAndAttachAProductImageV1', 'ecommerceV1ProductUploadProductImageRequest', ecommerceV1ProductUploadProductImageRequest);
7608
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/images`
7609
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
7610
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
7611
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7612
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7613
+ let baseOptions;
7614
+ if (configuration) {
7615
+ baseOptions = configuration.baseOptions;
7616
+ }
7617
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
7618
+ const localVarHeaderParameter = {};
7619
+ const localVarQueryParameter = {};
7620
+ // authentication apiToken required
7621
+ // http bearer authentication required
7622
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
7623
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7624
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7625
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7626
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7627
+ localVarRequestOptions.data = serializeDataIfNeeded(ecommerceV1ProductUploadProductImageRequest, localVarRequestOptions, configuration);
7628
+ return {
7629
+ url: toPathString(localVarUrlObj),
7630
+ options: localVarRequestOptions,
7631
+ };
7632
+ }),
7592
7633
  };
7593
7634
  };
7594
7635
  /**
@@ -7630,6 +7671,23 @@ export const EcommerceProductsApiFp = function (configuration) {
7630
7671
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7631
7672
  });
7632
7673
  },
7674
+ /**
7675
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
7676
+ * @summary Upload and attach a product image
7677
+ * @param {string} storeId The ID of the store the product belongs to.
7678
+ * @param {string} productId The ID of the product to attach the image to.
7679
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
7680
+ * @param {*} [options] Override http request option.
7681
+ * @throws {RequiredError}
7682
+ */
7683
+ uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
7684
+ return __awaiter(this, void 0, void 0, function* () {
7685
+ var _a, _b;
7686
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options);
7687
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.uploadAndAttachAProductImageV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
7688
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7689
+ });
7690
+ },
7633
7691
  };
7634
7692
  };
7635
7693
  /**
@@ -7661,6 +7719,18 @@ export const EcommerceProductsApiFactory = function (configuration, basePath, ax
7661
7719
  createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
7662
7720
  return localVarFp.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(axios, basePath));
7663
7721
  },
7722
+ /**
7723
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
7724
+ * @summary Upload and attach a product image
7725
+ * @param {string} storeId The ID of the store the product belongs to.
7726
+ * @param {string} productId The ID of the product to attach the image to.
7727
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
7728
+ * @param {*} [options] Override http request option.
7729
+ * @throws {RequiredError}
7730
+ */
7731
+ uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
7732
+ return localVarFp.uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(axios, basePath));
7733
+ },
7664
7734
  };
7665
7735
  };
7666
7736
  /**
@@ -7694,6 +7764,19 @@ export class EcommerceProductsApi extends BaseAPI {
7694
7764
  createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options) {
7695
7765
  return EcommerceProductsApiFp(this.configuration).createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(this.axios, this.basePath));
7696
7766
  }
7767
+ /**
7768
+ * Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
7769
+ * @summary Upload and attach a product image
7770
+ * @param {string} storeId The ID of the store the product belongs to.
7771
+ * @param {string} productId The ID of the product to attach the image to.
7772
+ * @param {EcommerceV1ProductUploadProductImageRequest} ecommerceV1ProductUploadProductImageRequest
7773
+ * @param {*} [options] Override http request option.
7774
+ * @throws {RequiredError}
7775
+ * @memberof EcommerceProductsApi
7776
+ */
7777
+ uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options) {
7778
+ return EcommerceProductsApiFp(this.configuration).uploadAndAttachAProductImageV1(storeId, productId, ecommerceV1ProductUploadProductImageRequest, options).then((request) => request(this.axios, this.basePath));
7779
+ }
7697
7780
  }
7698
7781
  /**
7699
7782
  * EcommerceSalesChannelsApi - axios parameter creator
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.1
4
+ * API Version: 1.32.2
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: 1.32.1
6
+ * API Version: 1.32.2
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: 1.32.1
4
+ * API Version: 1.32.2
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: 1.32.1
6
+ * API Version: 1.32.2
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: 1.32.1
4
+ * API Version: 1.32.2
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: 1.32.1
6
+ * API Version: 1.32.2
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/1.30.1" }, (_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/1.30.2" }, (_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: 1.32.1
4
+ * API Version: 1.32.2
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: 1.32.1
6
+ * API Version: 1.32.2
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: 1.32.1
4
+ * API Version: 1.32.2
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: 1.32.1
7
+ * API Version: 1.32.2
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
@@ -6,6 +6,7 @@ All URIs are relative to *https://developers.hostinger.com*
6
6
  |------------- | ------------- | -------------|
7
7
  |[**createDigitalProductV1**](#createdigitalproductv1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/digital | Create digital product|
8
8
  |[**createPhysicalProductV1**](#createphysicalproductv1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/physical | Create physical product|
9
+ |[**uploadAndAttachAProductImageV1**](#uploadandattachaproductimagev1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/{product_id}/images | Upload and attach a product image|
9
10
 
10
11
  # **createDigitalProductV1**
11
12
  > EcommerceV1ProductProductCreationResource createDigitalProductV1(ecommerceV1ProductCreateDigitalProductRequest)
@@ -123,3 +124,64 @@ const { status, data } = await apiInstance.createPhysicalProductV1(
123
124
 
124
125
  [[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
 
127
+ # **uploadAndAttachAProductImageV1**
128
+ > EcommerceV1ProductProductImageUploadResource uploadAndAttachAProductImageV1(ecommerceV1ProductUploadProductImageRequest)
129
+
130
+ Upload a raster image (JPEG, PNG, GIF or WebP, max 15MB) 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.
131
+
132
+ ### Example
133
+
134
+ ```typescript
135
+ import {
136
+ EcommerceProductsApi,
137
+ Configuration,
138
+ EcommerceV1ProductUploadProductImageRequest
139
+ } from 'hostinger-api-sdk';
140
+
141
+ const configuration = new Configuration();
142
+ const apiInstance = new EcommerceProductsApi(configuration);
143
+
144
+ let storeId: string; //The ID of the store the product belongs to. (default to undefined)
145
+ let productId: string; //The ID of the product to attach the image to. (default to undefined)
146
+ let ecommerceV1ProductUploadProductImageRequest: EcommerceV1ProductUploadProductImageRequest; //
147
+
148
+ const { status, data } = await apiInstance.uploadAndAttachAProductImageV1(
149
+ storeId,
150
+ productId,
151
+ ecommerceV1ProductUploadProductImageRequest
152
+ );
153
+ ```
154
+
155
+ ### Parameters
156
+
157
+ |Name | Type | Description | Notes|
158
+ |------------- | ------------- | ------------- | -------------|
159
+ | **ecommerceV1ProductUploadProductImageRequest** | **EcommerceV1ProductUploadProductImageRequest**| | |
160
+ | **storeId** | [**string**] | The ID of the store the product belongs to. | defaults to undefined|
161
+ | **productId** | [**string**] | The ID of the product to attach the image to. | defaults to undefined|
162
+
163
+
164
+ ### Return type
165
+
166
+ **EcommerceV1ProductProductImageUploadResource**
167
+
168
+ ### Authorization
169
+
170
+ [apiToken](../README.md#apiToken)
171
+
172
+ ### HTTP request headers
173
+
174
+ - **Content-Type**: application/json
175
+ - **Accept**: application/json
176
+
177
+
178
+ ### HTTP response details
179
+ | Status code | Description | Response headers |
180
+ |-------------|-------------|------------------|
181
+ |**200** | Success response | - |
182
+ |**422** | Validation error response | - |
183
+ |**401** | Unauthenticated response | - |
184
+ |**500** | Error response | - |
185
+
186
+ [[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)
187
+
@@ -0,0 +1,22 @@
1
+ # EcommerceV1ProductProductImageUploadResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **url** | **string** | CDN URL of the uploaded image. | [optional] [default to undefined]
9
+ **is_thumbnail** | **boolean** | Whether the image was set as the product\&#39;s thumbnail (primary image). | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { EcommerceV1ProductProductImageUploadResource } from 'hostinger-api-sdk';
15
+
16
+ const instance: EcommerceV1ProductProductImageUploadResource = {
17
+ url,
18
+ is_thumbnail,
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,22 @@
1
+ # EcommerceV1ProductUploadProductImageRequest
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **image** | **string** | Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted. | [default to undefined]
9
+ **is_thumbnail** | **boolean** | When true, the image becomes the product\&#39;s thumbnail (primary image). When omitted, it becomes the thumbnail only if the product does not have one yet. | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { EcommerceV1ProductUploadProductImageRequest } from 'hostinger-api-sdk';
15
+
16
+ const instance: EcommerceV1ProductUploadProductImageRequest = {
17
+ image,
18
+ is_thumbnail,
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)
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.1
6
+ * API Version: 1.32.2
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": "1.30.1",
3
+ "version": "1.30.2",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {