hostinger-api-sdk 1.30.5 → 1.30.7

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.5
1
+ ## hostinger-api-sdk@1.30.7
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.5 --save
8
+ npm install hostinger-api-sdk@1.30.7 --save
9
9
  ```
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.4
6
+ * API Version: 1.32.6
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
@@ -3562,6 +3562,37 @@ export interface EcommerceV1ProductProductImageUploadResource {
3562
3562
  */
3563
3563
  'is_thumbnail': boolean;
3564
3564
  }
3565
+ /**
3566
+ *
3567
+ * @export
3568
+ * @interface EcommerceV1ProductProductImageUploadUrlResource
3569
+ */
3570
+ export interface EcommerceV1ProductProductImageUploadUrlResource {
3571
+ /**
3572
+ * Signed URL to upload the image to with a multipart/form-data POST.
3573
+ * @type {string}
3574
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3575
+ */
3576
+ 'upload_url': string;
3577
+ /**
3578
+ * Form fields to send alongside the file in the multipart POST.
3579
+ * @type {{ [key: string]: string; }}
3580
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3581
+ */
3582
+ 'fields': { [key: string]: string; };
3583
+ /**
3584
+ * Key of the uploaded object — send it to the attach-image endpoint.
3585
+ * @type {string}
3586
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3587
+ */
3588
+ 'object_name': string;
3589
+ /**
3590
+ * Maximum accepted upload size in bytes.
3591
+ * @type {number}
3592
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3593
+ */
3594
+ 'max_bytes': number;
3595
+ }
3565
3596
  /**
3566
3597
  *
3567
3598
  * @export
@@ -3569,11 +3600,17 @@ export interface EcommerceV1ProductProductImageUploadResource {
3569
3600
  */
3570
3601
  export interface EcommerceV1ProductUploadProductImageRequest {
3571
3602
  /**
3572
- * Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted.
3603
+ * Publicly reachable URL of the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name.
3573
3604
  * @type {string}
3574
3605
  * @memberof EcommerceV1ProductUploadProductImageRequest
3575
3606
  */
3576
- 'image': string;
3607
+ 'image_url': string;
3608
+ /**
3609
+ * Key returned by the upload-url endpoint. Provide this instead of image_url to attach an uploaded image.
3610
+ * @type {string}
3611
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3612
+ */
3613
+ 'object_name': string;
3577
3614
  /**
3578
3615
  * 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
3616
  * @type {boolean}
@@ -19231,6 +19268,48 @@ export class EcommercePaymentsApi extends BaseAPI {
19231
19268
  */
19232
19269
  export const EcommerceProductsApiAxiosParamCreator = function (configuration?: Configuration) {
19233
19270
  return {
19271
+ /**
19272
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
19273
+ * @summary Create a product image upload URL
19274
+ * @param {string} storeId The ID of the store the product belongs to.
19275
+ * @param {string} productId The ID of the product the image will be attached to.
19276
+ * @param {*} [options] Override http request option.
19277
+ * @throws {RequiredError}
19278
+ */
19279
+ createAProductImageUploadURLV1: async (storeId: string, productId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
19280
+ // verify required parameter 'storeId' is not null or undefined
19281
+ assertParamExists('createAProductImageUploadURLV1', 'storeId', storeId)
19282
+ // verify required parameter 'productId' is not null or undefined
19283
+ assertParamExists('createAProductImageUploadURLV1', 'productId', productId)
19284
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/images/upload-url`
19285
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
19286
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
19287
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
19288
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
19289
+ let baseOptions;
19290
+ if (configuration) {
19291
+ baseOptions = configuration.baseOptions;
19292
+ }
19293
+
19294
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
19295
+ const localVarHeaderParameter = {} as any;
19296
+ const localVarQueryParameter = {} as any;
19297
+
19298
+ // authentication apiToken required
19299
+ // http bearer authentication required
19300
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
19301
+
19302
+
19303
+
19304
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
19305
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
19306
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
19307
+
19308
+ return {
19309
+ url: toPathString(localVarUrlObj),
19310
+ options: localVarRequestOptions,
19311
+ };
19312
+ },
19234
19313
  /**
19235
19314
  * Create a published digital product with a single variant and an optional external download link.
19236
19315
  * @summary Create digital product
@@ -19320,7 +19399,7 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration?: C
19320
19399
  };
19321
19400
  },
19322
19401
  /**
19323
- * 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.
19402
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
19324
19403
  * @summary Upload and attach a product image
19325
19404
  * @param {string} storeId The ID of the store the product belongs to.
19326
19405
  * @param {string} productId The ID of the product to attach the image to.
@@ -19377,6 +19456,19 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration?: C
19377
19456
  export const EcommerceProductsApiFp = function(configuration?: Configuration) {
19378
19457
  const localVarAxiosParamCreator = EcommerceProductsApiAxiosParamCreator(configuration)
19379
19458
  return {
19459
+ /**
19460
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
19461
+ * @summary Create a product image upload URL
19462
+ * @param {string} storeId The ID of the store the product belongs to.
19463
+ * @param {string} productId The ID of the product the image will be attached to.
19464
+ * @param {*} [options] Override http request option.
19465
+ * @throws {RequiredError}
19466
+ */
19467
+ async createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductImageUploadUrlResource>> {
19468
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAProductImageUploadURLV1(storeId, productId, options);
19469
+ const localVarOperationServerBasePath = operationServerMap['EcommerceProductsApi.createAProductImageUploadURLV1']?.[0]?.url;
19470
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19471
+ },
19380
19472
  /**
19381
19473
  * Create a published digital product with a single variant and an optional external download link.
19382
19474
  * @summary Create digital product
@@ -19404,7 +19496,7 @@ export const EcommerceProductsApiFp = function(configuration?: Configuration) {
19404
19496
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
19405
19497
  },
19406
19498
  /**
19407
- * 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.
19499
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
19408
19500
  * @summary Upload and attach a product image
19409
19501
  * @param {string} storeId The ID of the store the product belongs to.
19410
19502
  * @param {string} productId The ID of the product to attach the image to.
@@ -19427,6 +19519,17 @@ export const EcommerceProductsApiFp = function(configuration?: Configuration) {
19427
19519
  export const EcommerceProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
19428
19520
  const localVarFp = EcommerceProductsApiFp(configuration)
19429
19521
  return {
19522
+ /**
19523
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
19524
+ * @summary Create a product image upload URL
19525
+ * @param {string} storeId The ID of the store the product belongs to.
19526
+ * @param {string} productId The ID of the product the image will be attached to.
19527
+ * @param {*} [options] Override http request option.
19528
+ * @throws {RequiredError}
19529
+ */
19530
+ createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductImageUploadUrlResource> {
19531
+ return localVarFp.createAProductImageUploadURLV1(storeId, productId, options).then((request) => request(axios, basePath));
19532
+ },
19430
19533
  /**
19431
19534
  * Create a published digital product with a single variant and an optional external download link.
19432
19535
  * @summary Create digital product
@@ -19450,7 +19553,7 @@ export const EcommerceProductsApiFactory = function (configuration?: Configurati
19450
19553
  return localVarFp.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(axios, basePath));
19451
19554
  },
19452
19555
  /**
19453
- * 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.
19556
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
19454
19557
  * @summary Upload and attach a product image
19455
19558
  * @param {string} storeId The ID of the store the product belongs to.
19456
19559
  * @param {string} productId The ID of the product to attach the image to.
@@ -19471,6 +19574,19 @@ export const EcommerceProductsApiFactory = function (configuration?: Configurati
19471
19574
  * @extends {BaseAPI}
19472
19575
  */
19473
19576
  export class EcommerceProductsApi extends BaseAPI {
19577
+ /**
19578
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
19579
+ * @summary Create a product image upload URL
19580
+ * @param {string} storeId The ID of the store the product belongs to.
19581
+ * @param {string} productId The ID of the product the image will be attached to.
19582
+ * @param {*} [options] Override http request option.
19583
+ * @throws {RequiredError}
19584
+ * @memberof EcommerceProductsApi
19585
+ */
19586
+ public createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig) {
19587
+ return EcommerceProductsApiFp(this.configuration).createAProductImageUploadURLV1(storeId, productId, options).then((request) => request(this.axios, this.basePath));
19588
+ }
19589
+
19474
19590
  /**
19475
19591
  * Create a published digital product with a single variant and an optional external download link.
19476
19592
  * @summary Create digital product
@@ -19498,7 +19614,7 @@ export class EcommerceProductsApi extends BaseAPI {
19498
19614
  }
19499
19615
 
19500
19616
  /**
19501
- * 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.
19617
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
19502
19618
  * @summary Upload and attach a product image
19503
19619
  * @param {string} storeId The ID of the store the product belongs to.
19504
19620
  * @param {string} productId The ID of the product to attach the image to.
package/base.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.4
6
+ * API Version: 1.32.6
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.4
6
+ * API Version: 1.32.6
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.4
6
+ * API Version: 1.32.6
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.5",
51
+ 'User-Agent': "hostinger-typescript-sdk/1.30.7",
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.4
4
+ * API Version: 1.32.6
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
@@ -3481,6 +3481,39 @@ export interface EcommerceV1ProductProductImageUploadResource {
3481
3481
  */
3482
3482
  'is_thumbnail': boolean;
3483
3483
  }
3484
+ /**
3485
+ *
3486
+ * @export
3487
+ * @interface EcommerceV1ProductProductImageUploadUrlResource
3488
+ */
3489
+ export interface EcommerceV1ProductProductImageUploadUrlResource {
3490
+ /**
3491
+ * Signed URL to upload the image to with a multipart/form-data POST.
3492
+ * @type {string}
3493
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3494
+ */
3495
+ 'upload_url': string;
3496
+ /**
3497
+ * Form fields to send alongside the file in the multipart POST.
3498
+ * @type {{ [key: string]: string; }}
3499
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3500
+ */
3501
+ 'fields': {
3502
+ [key: string]: string;
3503
+ };
3504
+ /**
3505
+ * Key of the uploaded object — send it to the attach-image endpoint.
3506
+ * @type {string}
3507
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3508
+ */
3509
+ 'object_name': string;
3510
+ /**
3511
+ * Maximum accepted upload size in bytes.
3512
+ * @type {number}
3513
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3514
+ */
3515
+ 'max_bytes': number;
3516
+ }
3484
3517
  /**
3485
3518
  *
3486
3519
  * @export
@@ -3488,11 +3521,17 @@ export interface EcommerceV1ProductProductImageUploadResource {
3488
3521
  */
3489
3522
  export interface EcommerceV1ProductUploadProductImageRequest {
3490
3523
  /**
3491
- * Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted.
3524
+ * Publicly reachable URL of the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name.
3492
3525
  * @type {string}
3493
3526
  * @memberof EcommerceV1ProductUploadProductImageRequest
3494
3527
  */
3495
- 'image': string;
3528
+ 'image_url': string;
3529
+ /**
3530
+ * Key returned by the upload-url endpoint. Provide this instead of image_url to attach an uploaded image.
3531
+ * @type {string}
3532
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3533
+ */
3534
+ 'object_name': string;
3496
3535
  /**
3497
3536
  * 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
3537
  * @type {boolean}
@@ -15198,6 +15237,15 @@ export declare class EcommercePaymentsApi extends BaseAPI {
15198
15237
  * @export
15199
15238
  */
15200
15239
  export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Configuration) => {
15240
+ /**
15241
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
15242
+ * @summary Create a product image upload URL
15243
+ * @param {string} storeId The ID of the store the product belongs to.
15244
+ * @param {string} productId The ID of the product the image will be attached to.
15245
+ * @param {*} [options] Override http request option.
15246
+ * @throws {RequiredError}
15247
+ */
15248
+ createAProductImageUploadURLV1: (storeId: string, productId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15201
15249
  /**
15202
15250
  * Create a published digital product with a single variant and an optional external download link.
15203
15251
  * @summary Create digital product
@@ -15217,7 +15265,7 @@ export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Con
15217
15265
  */
15218
15266
  createPhysicalProductV1: (storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15219
15267
  /**
15220
- * 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.
15268
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
15221
15269
  * @summary Upload and attach a product image
15222
15270
  * @param {string} storeId The ID of the store the product belongs to.
15223
15271
  * @param {string} productId The ID of the product to attach the image to.
@@ -15232,6 +15280,15 @@ export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Con
15232
15280
  * @export
15233
15281
  */
15234
15282
  export declare const EcommerceProductsApiFp: (configuration?: Configuration) => {
15283
+ /**
15284
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
15285
+ * @summary Create a product image upload URL
15286
+ * @param {string} storeId The ID of the store the product belongs to.
15287
+ * @param {string} productId The ID of the product the image will be attached to.
15288
+ * @param {*} [options] Override http request option.
15289
+ * @throws {RequiredError}
15290
+ */
15291
+ createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductImageUploadUrlResource>>;
15235
15292
  /**
15236
15293
  * Create a published digital product with a single variant and an optional external download link.
15237
15294
  * @summary Create digital product
@@ -15251,7 +15308,7 @@ export declare const EcommerceProductsApiFp: (configuration?: Configuration) =>
15251
15308
  */
15252
15309
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductCreationResource>>;
15253
15310
  /**
15254
- * 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.
15311
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
15255
15312
  * @summary Upload and attach a product image
15256
15313
  * @param {string} storeId The ID of the store the product belongs to.
15257
15314
  * @param {string} productId The ID of the product to attach the image to.
@@ -15266,6 +15323,15 @@ export declare const EcommerceProductsApiFp: (configuration?: Configuration) =>
15266
15323
  * @export
15267
15324
  */
15268
15325
  export declare const EcommerceProductsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
15326
+ /**
15327
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
15328
+ * @summary Create a product image upload URL
15329
+ * @param {string} storeId The ID of the store the product belongs to.
15330
+ * @param {string} productId The ID of the product the image will be attached to.
15331
+ * @param {*} [options] Override http request option.
15332
+ * @throws {RequiredError}
15333
+ */
15334
+ createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductImageUploadUrlResource>;
15269
15335
  /**
15270
15336
  * Create a published digital product with a single variant and an optional external download link.
15271
15337
  * @summary Create digital product
@@ -15285,7 +15351,7 @@ export declare const EcommerceProductsApiFactory: (configuration?: Configuration
15285
15351
  */
15286
15352
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductCreationResource>;
15287
15353
  /**
15288
- * 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.
15354
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
15289
15355
  * @summary Upload and attach a product image
15290
15356
  * @param {string} storeId The ID of the store the product belongs to.
15291
15357
  * @param {string} productId The ID of the product to attach the image to.
@@ -15302,6 +15368,16 @@ export declare const EcommerceProductsApiFactory: (configuration?: Configuration
15302
15368
  * @extends {BaseAPI}
15303
15369
  */
15304
15370
  export declare class EcommerceProductsApi extends BaseAPI {
15371
+ /**
15372
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
15373
+ * @summary Create a product image upload URL
15374
+ * @param {string} storeId The ID of the store the product belongs to.
15375
+ * @param {string} productId The ID of the product the image will be attached to.
15376
+ * @param {*} [options] Override http request option.
15377
+ * @throws {RequiredError}
15378
+ * @memberof EcommerceProductsApi
15379
+ */
15380
+ createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1ProductProductImageUploadUrlResource, any, {}, any>>;
15305
15381
  /**
15306
15382
  * Create a published digital product with a single variant and an optional external download link.
15307
15383
  * @summary Create digital product
@@ -15323,7 +15399,7 @@ export declare class EcommerceProductsApi extends BaseAPI {
15323
15399
  */
15324
15400
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1ProductProductCreationResource, any, {}, any>>;
15325
15401
  /**
15326
- * 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.
15402
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
15327
15403
  * @summary Upload and attach a product image
15328
15404
  * @param {string} storeId The ID of the store the product belongs to.
15329
15405
  * @param {string} productId The ID of the product to attach the image to.
package/dist/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.32.4
7
+ * API Version: 1.32.6
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
@@ -7626,6 +7626,42 @@ exports.EcommercePaymentsApi = EcommercePaymentsApi;
7626
7626
  */
7627
7627
  const EcommerceProductsApiAxiosParamCreator = function (configuration) {
7628
7628
  return {
7629
+ /**
7630
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
7631
+ * @summary Create a product image upload URL
7632
+ * @param {string} storeId The ID of the store the product belongs to.
7633
+ * @param {string} productId The ID of the product the image will be attached to.
7634
+ * @param {*} [options] Override http request option.
7635
+ * @throws {RequiredError}
7636
+ */
7637
+ createAProductImageUploadURLV1: (storeId_1, productId_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ...args_1], void 0, function* (storeId, productId, options = {}) {
7638
+ // verify required parameter 'storeId' is not null or undefined
7639
+ (0, common_1.assertParamExists)('createAProductImageUploadURLV1', 'storeId', storeId);
7640
+ // verify required parameter 'productId' is not null or undefined
7641
+ (0, common_1.assertParamExists)('createAProductImageUploadURLV1', 'productId', productId);
7642
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/images/upload-url`
7643
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
7644
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
7645
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7646
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
7647
+ let baseOptions;
7648
+ if (configuration) {
7649
+ baseOptions = configuration.baseOptions;
7650
+ }
7651
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
7652
+ const localVarHeaderParameter = {};
7653
+ const localVarQueryParameter = {};
7654
+ // authentication apiToken required
7655
+ // http bearer authentication required
7656
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
7657
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
7658
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7659
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7660
+ return {
7661
+ url: (0, common_1.toPathString)(localVarUrlObj),
7662
+ options: localVarRequestOptions,
7663
+ };
7664
+ }),
7629
7665
  /**
7630
7666
  * Create a published digital product with a single variant and an optional external download link.
7631
7667
  * @summary Create digital product
@@ -7701,7 +7737,7 @@ const EcommerceProductsApiAxiosParamCreator = function (configuration) {
7701
7737
  };
7702
7738
  }),
7703
7739
  /**
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.
7740
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
7705
7741
  * @summary Upload and attach a product image
7706
7742
  * @param {string} storeId The ID of the store the product belongs to.
7707
7743
  * @param {string} productId The ID of the product to attach the image to.
@@ -7751,6 +7787,22 @@ exports.EcommerceProductsApiAxiosParamCreator = EcommerceProductsApiAxiosParamCr
7751
7787
  const EcommerceProductsApiFp = function (configuration) {
7752
7788
  const localVarAxiosParamCreator = (0, exports.EcommerceProductsApiAxiosParamCreator)(configuration);
7753
7789
  return {
7790
+ /**
7791
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
7792
+ * @summary Create a product image upload URL
7793
+ * @param {string} storeId The ID of the store the product belongs to.
7794
+ * @param {string} productId The ID of the product the image will be attached to.
7795
+ * @param {*} [options] Override http request option.
7796
+ * @throws {RequiredError}
7797
+ */
7798
+ createAProductImageUploadURLV1(storeId, productId, options) {
7799
+ return __awaiter(this, void 0, void 0, function* () {
7800
+ var _a, _b;
7801
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAProductImageUploadURLV1(storeId, productId, options);
7802
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['EcommerceProductsApi.createAProductImageUploadURLV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
7803
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7804
+ });
7805
+ },
7754
7806
  /**
7755
7807
  * Create a published digital product with a single variant and an optional external download link.
7756
7808
  * @summary Create digital product
@@ -7784,7 +7836,7 @@ const EcommerceProductsApiFp = function (configuration) {
7784
7836
  });
7785
7837
  },
7786
7838
  /**
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.
7839
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
7788
7840
  * @summary Upload and attach a product image
7789
7841
  * @param {string} storeId The ID of the store the product belongs to.
7790
7842
  * @param {string} productId The ID of the product to attach the image to.
@@ -7810,6 +7862,17 @@ exports.EcommerceProductsApiFp = EcommerceProductsApiFp;
7810
7862
  const EcommerceProductsApiFactory = function (configuration, basePath, axios) {
7811
7863
  const localVarFp = (0, exports.EcommerceProductsApiFp)(configuration);
7812
7864
  return {
7865
+ /**
7866
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
7867
+ * @summary Create a product image upload URL
7868
+ * @param {string} storeId The ID of the store the product belongs to.
7869
+ * @param {string} productId The ID of the product the image will be attached to.
7870
+ * @param {*} [options] Override http request option.
7871
+ * @throws {RequiredError}
7872
+ */
7873
+ createAProductImageUploadURLV1(storeId, productId, options) {
7874
+ return localVarFp.createAProductImageUploadURLV1(storeId, productId, options).then((request) => request(axios, basePath));
7875
+ },
7813
7876
  /**
7814
7877
  * Create a published digital product with a single variant and an optional external download link.
7815
7878
  * @summary Create digital product
@@ -7833,7 +7896,7 @@ const EcommerceProductsApiFactory = function (configuration, basePath, axios) {
7833
7896
  return localVarFp.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(axios, basePath));
7834
7897
  },
7835
7898
  /**
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.
7899
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
7837
7900
  * @summary Upload and attach a product image
7838
7901
  * @param {string} storeId The ID of the store the product belongs to.
7839
7902
  * @param {string} productId The ID of the product to attach the image to.
@@ -7854,6 +7917,18 @@ exports.EcommerceProductsApiFactory = EcommerceProductsApiFactory;
7854
7917
  * @extends {BaseAPI}
7855
7918
  */
7856
7919
  class EcommerceProductsApi extends base_1.BaseAPI {
7920
+ /**
7921
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
7922
+ * @summary Create a product image upload URL
7923
+ * @param {string} storeId The ID of the store the product belongs to.
7924
+ * @param {string} productId The ID of the product the image will be attached to.
7925
+ * @param {*} [options] Override http request option.
7926
+ * @throws {RequiredError}
7927
+ * @memberof EcommerceProductsApi
7928
+ */
7929
+ createAProductImageUploadURLV1(storeId, productId, options) {
7930
+ return (0, exports.EcommerceProductsApiFp)(this.configuration).createAProductImageUploadURLV1(storeId, productId, options).then((request) => request(this.axios, this.basePath));
7931
+ }
7857
7932
  /**
7858
7933
  * Create a published digital product with a single variant and an optional external download link.
7859
7934
  * @summary Create digital product
@@ -7879,7 +7954,7 @@ class EcommerceProductsApi extends base_1.BaseAPI {
7879
7954
  return (0, exports.EcommerceProductsApiFp)(this.configuration).createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(this.axios, this.basePath));
7880
7955
  }
7881
7956
  /**
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.
7957
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
7883
7958
  * @summary Upload and attach a product image
7884
7959
  * @param {string} storeId The ID of the store the product belongs to.
7885
7960
  * @param {string} productId The ID of the product to attach the image to.
package/dist/base.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.4
4
+ * API Version: 1.32.6
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.4
7
+ * API Version: 1.32.6
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.4
4
+ * API Version: 1.32.6
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.4
7
+ * API Version: 1.32.6
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.4
4
+ * API Version: 1.32.6
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.4
7
+ * API Version: 1.32.6
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.5" }, (_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.7" }, (_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.4
4
+ * API Version: 1.32.6
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
@@ -3481,6 +3481,39 @@ export interface EcommerceV1ProductProductImageUploadResource {
3481
3481
  */
3482
3482
  'is_thumbnail': boolean;
3483
3483
  }
3484
+ /**
3485
+ *
3486
+ * @export
3487
+ * @interface EcommerceV1ProductProductImageUploadUrlResource
3488
+ */
3489
+ export interface EcommerceV1ProductProductImageUploadUrlResource {
3490
+ /**
3491
+ * Signed URL to upload the image to with a multipart/form-data POST.
3492
+ * @type {string}
3493
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3494
+ */
3495
+ 'upload_url': string;
3496
+ /**
3497
+ * Form fields to send alongside the file in the multipart POST.
3498
+ * @type {{ [key: string]: string; }}
3499
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3500
+ */
3501
+ 'fields': {
3502
+ [key: string]: string;
3503
+ };
3504
+ /**
3505
+ * Key of the uploaded object — send it to the attach-image endpoint.
3506
+ * @type {string}
3507
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3508
+ */
3509
+ 'object_name': string;
3510
+ /**
3511
+ * Maximum accepted upload size in bytes.
3512
+ * @type {number}
3513
+ * @memberof EcommerceV1ProductProductImageUploadUrlResource
3514
+ */
3515
+ 'max_bytes': number;
3516
+ }
3484
3517
  /**
3485
3518
  *
3486
3519
  * @export
@@ -3488,11 +3521,17 @@ export interface EcommerceV1ProductProductImageUploadResource {
3488
3521
  */
3489
3522
  export interface EcommerceV1ProductUploadProductImageRequest {
3490
3523
  /**
3491
- * Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted.
3524
+ * Publicly reachable URL of the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name.
3492
3525
  * @type {string}
3493
3526
  * @memberof EcommerceV1ProductUploadProductImageRequest
3494
3527
  */
3495
- 'image': string;
3528
+ 'image_url': string;
3529
+ /**
3530
+ * Key returned by the upload-url endpoint. Provide this instead of image_url to attach an uploaded image.
3531
+ * @type {string}
3532
+ * @memberof EcommerceV1ProductUploadProductImageRequest
3533
+ */
3534
+ 'object_name': string;
3496
3535
  /**
3497
3536
  * 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
3537
  * @type {boolean}
@@ -15198,6 +15237,15 @@ export declare class EcommercePaymentsApi extends BaseAPI {
15198
15237
  * @export
15199
15238
  */
15200
15239
  export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Configuration) => {
15240
+ /**
15241
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
15242
+ * @summary Create a product image upload URL
15243
+ * @param {string} storeId The ID of the store the product belongs to.
15244
+ * @param {string} productId The ID of the product the image will be attached to.
15245
+ * @param {*} [options] Override http request option.
15246
+ * @throws {RequiredError}
15247
+ */
15248
+ createAProductImageUploadURLV1: (storeId: string, productId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15201
15249
  /**
15202
15250
  * Create a published digital product with a single variant and an optional external download link.
15203
15251
  * @summary Create digital product
@@ -15217,7 +15265,7 @@ export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Con
15217
15265
  */
15218
15266
  createPhysicalProductV1: (storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15219
15267
  /**
15220
- * 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.
15268
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
15221
15269
  * @summary Upload and attach a product image
15222
15270
  * @param {string} storeId The ID of the store the product belongs to.
15223
15271
  * @param {string} productId The ID of the product to attach the image to.
@@ -15232,6 +15280,15 @@ export declare const EcommerceProductsApiAxiosParamCreator: (configuration?: Con
15232
15280
  * @export
15233
15281
  */
15234
15282
  export declare const EcommerceProductsApiFp: (configuration?: Configuration) => {
15283
+ /**
15284
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
15285
+ * @summary Create a product image upload URL
15286
+ * @param {string} storeId The ID of the store the product belongs to.
15287
+ * @param {string} productId The ID of the product the image will be attached to.
15288
+ * @param {*} [options] Override http request option.
15289
+ * @throws {RequiredError}
15290
+ */
15291
+ createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductImageUploadUrlResource>>;
15235
15292
  /**
15236
15293
  * Create a published digital product with a single variant and an optional external download link.
15237
15294
  * @summary Create digital product
@@ -15251,7 +15308,7 @@ export declare const EcommerceProductsApiFp: (configuration?: Configuration) =>
15251
15308
  */
15252
15309
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<EcommerceV1ProductProductCreationResource>>;
15253
15310
  /**
15254
- * 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.
15311
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
15255
15312
  * @summary Upload and attach a product image
15256
15313
  * @param {string} storeId The ID of the store the product belongs to.
15257
15314
  * @param {string} productId The ID of the product to attach the image to.
@@ -15266,6 +15323,15 @@ export declare const EcommerceProductsApiFp: (configuration?: Configuration) =>
15266
15323
  * @export
15267
15324
  */
15268
15325
  export declare const EcommerceProductsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
15326
+ /**
15327
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
15328
+ * @summary Create a product image upload URL
15329
+ * @param {string} storeId The ID of the store the product belongs to.
15330
+ * @param {string} productId The ID of the product the image will be attached to.
15331
+ * @param {*} [options] Override http request option.
15332
+ * @throws {RequiredError}
15333
+ */
15334
+ createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductImageUploadUrlResource>;
15269
15335
  /**
15270
15336
  * Create a published digital product with a single variant and an optional external download link.
15271
15337
  * @summary Create digital product
@@ -15285,7 +15351,7 @@ export declare const EcommerceProductsApiFactory: (configuration?: Configuration
15285
15351
  */
15286
15352
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): AxiosPromise<EcommerceV1ProductProductCreationResource>;
15287
15353
  /**
15288
- * 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.
15354
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
15289
15355
  * @summary Upload and attach a product image
15290
15356
  * @param {string} storeId The ID of the store the product belongs to.
15291
15357
  * @param {string} productId The ID of the product to attach the image to.
@@ -15302,6 +15368,16 @@ export declare const EcommerceProductsApiFactory: (configuration?: Configuration
15302
15368
  * @extends {BaseAPI}
15303
15369
  */
15304
15370
  export declare class EcommerceProductsApi extends BaseAPI {
15371
+ /**
15372
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
15373
+ * @summary Create a product image upload URL
15374
+ * @param {string} storeId The ID of the store the product belongs to.
15375
+ * @param {string} productId The ID of the product the image will be attached to.
15376
+ * @param {*} [options] Override http request option.
15377
+ * @throws {RequiredError}
15378
+ * @memberof EcommerceProductsApi
15379
+ */
15380
+ createAProductImageUploadURLV1(storeId: string, productId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1ProductProductImageUploadUrlResource, any, {}, any>>;
15305
15381
  /**
15306
15382
  * Create a published digital product with a single variant and an optional external download link.
15307
15383
  * @summary Create digital product
@@ -15323,7 +15399,7 @@ export declare class EcommerceProductsApi extends BaseAPI {
15323
15399
  */
15324
15400
  createPhysicalProductV1(storeId: string, ecommerceV1ProductCreatePhysicalProductRequest: EcommerceV1ProductCreatePhysicalProductRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<EcommerceV1ProductProductCreationResource, any, {}, any>>;
15325
15401
  /**
15326
- * 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.
15402
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
15327
15403
  * @summary Upload and attach a product image
15328
15404
  * @param {string} storeId The ID of the store the product belongs to.
15329
15405
  * @param {string} productId The ID of the product to attach the image to.
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.4
6
+ * API Version: 1.32.6
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
@@ -7515,6 +7515,42 @@ export class EcommercePaymentsApi extends BaseAPI {
7515
7515
  */
7516
7516
  export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
7517
7517
  return {
7518
+ /**
7519
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
7520
+ * @summary Create a product image upload URL
7521
+ * @param {string} storeId The ID of the store the product belongs to.
7522
+ * @param {string} productId The ID of the product the image will be attached to.
7523
+ * @param {*} [options] Override http request option.
7524
+ * @throws {RequiredError}
7525
+ */
7526
+ createAProductImageUploadURLV1: (storeId_1, productId_1, ...args_1) => __awaiter(this, [storeId_1, productId_1, ...args_1], void 0, function* (storeId, productId, options = {}) {
7527
+ // verify required parameter 'storeId' is not null or undefined
7528
+ assertParamExists('createAProductImageUploadURLV1', 'storeId', storeId);
7529
+ // verify required parameter 'productId' is not null or undefined
7530
+ assertParamExists('createAProductImageUploadURLV1', 'productId', productId);
7531
+ const localVarPath = `/api/ecommerce/v1/stores/{store_id}/products/{product_id}/images/upload-url`
7532
+ .replace(`{${"store_id"}}`, encodeURIComponent(String(storeId)))
7533
+ .replace(`{${"product_id"}}`, encodeURIComponent(String(productId)));
7534
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7535
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7536
+ let baseOptions;
7537
+ if (configuration) {
7538
+ baseOptions = configuration.baseOptions;
7539
+ }
7540
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
7541
+ const localVarHeaderParameter = {};
7542
+ const localVarQueryParameter = {};
7543
+ // authentication apiToken required
7544
+ // http bearer authentication required
7545
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
7546
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7547
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7548
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
7549
+ return {
7550
+ url: toPathString(localVarUrlObj),
7551
+ options: localVarRequestOptions,
7552
+ };
7553
+ }),
7518
7554
  /**
7519
7555
  * Create a published digital product with a single variant and an optional external download link.
7520
7556
  * @summary Create digital product
@@ -7590,7 +7626,7 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
7590
7626
  };
7591
7627
  }),
7592
7628
  /**
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.
7629
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
7594
7630
  * @summary Upload and attach a product image
7595
7631
  * @param {string} storeId The ID of the store the product belongs to.
7596
7632
  * @param {string} productId The ID of the product to attach the image to.
@@ -7639,6 +7675,22 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
7639
7675
  export const EcommerceProductsApiFp = function (configuration) {
7640
7676
  const localVarAxiosParamCreator = EcommerceProductsApiAxiosParamCreator(configuration);
7641
7677
  return {
7678
+ /**
7679
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
7680
+ * @summary Create a product image upload URL
7681
+ * @param {string} storeId The ID of the store the product belongs to.
7682
+ * @param {string} productId The ID of the product the image will be attached to.
7683
+ * @param {*} [options] Override http request option.
7684
+ * @throws {RequiredError}
7685
+ */
7686
+ createAProductImageUploadURLV1(storeId, productId, options) {
7687
+ return __awaiter(this, void 0, void 0, function* () {
7688
+ var _a, _b;
7689
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAProductImageUploadURLV1(storeId, productId, options);
7690
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['EcommerceProductsApi.createAProductImageUploadURLV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
7691
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7692
+ });
7693
+ },
7642
7694
  /**
7643
7695
  * Create a published digital product with a single variant and an optional external download link.
7644
7696
  * @summary Create digital product
@@ -7672,7 +7724,7 @@ export const EcommerceProductsApiFp = function (configuration) {
7672
7724
  });
7673
7725
  },
7674
7726
  /**
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.
7727
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
7676
7728
  * @summary Upload and attach a product image
7677
7729
  * @param {string} storeId The ID of the store the product belongs to.
7678
7730
  * @param {string} productId The ID of the product to attach the image to.
@@ -7697,6 +7749,17 @@ export const EcommerceProductsApiFp = function (configuration) {
7697
7749
  export const EcommerceProductsApiFactory = function (configuration, basePath, axios) {
7698
7750
  const localVarFp = EcommerceProductsApiFp(configuration);
7699
7751
  return {
7752
+ /**
7753
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
7754
+ * @summary Create a product image upload URL
7755
+ * @param {string} storeId The ID of the store the product belongs to.
7756
+ * @param {string} productId The ID of the product the image will be attached to.
7757
+ * @param {*} [options] Override http request option.
7758
+ * @throws {RequiredError}
7759
+ */
7760
+ createAProductImageUploadURLV1(storeId, productId, options) {
7761
+ return localVarFp.createAProductImageUploadURLV1(storeId, productId, options).then((request) => request(axios, basePath));
7762
+ },
7700
7763
  /**
7701
7764
  * Create a published digital product with a single variant and an optional external download link.
7702
7765
  * @summary Create digital product
@@ -7720,7 +7783,7 @@ export const EcommerceProductsApiFactory = function (configuration, basePath, ax
7720
7783
  return localVarFp.createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(axios, basePath));
7721
7784
  },
7722
7785
  /**
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.
7786
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
7724
7787
  * @summary Upload and attach a product image
7725
7788
  * @param {string} storeId The ID of the store the product belongs to.
7726
7789
  * @param {string} productId The ID of the product to attach the image to.
@@ -7740,6 +7803,18 @@ export const EcommerceProductsApiFactory = function (configuration, basePath, ax
7740
7803
  * @extends {BaseAPI}
7741
7804
  */
7742
7805
  export class EcommerceProductsApi extends BaseAPI {
7806
+ /**
7807
+ * Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
7808
+ * @summary Create a product image upload URL
7809
+ * @param {string} storeId The ID of the store the product belongs to.
7810
+ * @param {string} productId The ID of the product the image will be attached to.
7811
+ * @param {*} [options] Override http request option.
7812
+ * @throws {RequiredError}
7813
+ * @memberof EcommerceProductsApi
7814
+ */
7815
+ createAProductImageUploadURLV1(storeId, productId, options) {
7816
+ return EcommerceProductsApiFp(this.configuration).createAProductImageUploadURLV1(storeId, productId, options).then((request) => request(this.axios, this.basePath));
7817
+ }
7743
7818
  /**
7744
7819
  * Create a published digital product with a single variant and an optional external download link.
7745
7820
  * @summary Create digital product
@@ -7765,7 +7840,7 @@ export class EcommerceProductsApi extends BaseAPI {
7765
7840
  return EcommerceProductsApiFp(this.configuration).createPhysicalProductV1(storeId, ecommerceV1ProductCreatePhysicalProductRequest, options).then((request) => request(this.axios, this.basePath));
7766
7841
  }
7767
7842
  /**
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.
7843
+ * Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
7769
7844
  * @summary Upload and attach a product image
7770
7845
  * @param {string} storeId The ID of the store the product belongs to.
7771
7846
  * @param {string} productId The ID of the product to attach the image to.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.32.4
4
+ * API Version: 1.32.6
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.4
6
+ * API Version: 1.32.6
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.4
4
+ * API Version: 1.32.6
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.4
6
+ * API Version: 1.32.6
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.4
4
+ * API Version: 1.32.6
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.4
6
+ * API Version: 1.32.6
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.5" }, (_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.7" }, (_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.4
4
+ * API Version: 1.32.6
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.4
6
+ * API Version: 1.32.6
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.4
4
+ * API Version: 1.32.6
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.4
7
+ * API Version: 1.32.6
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
@@ -4,10 +4,67 @@ All URIs are relative to *https://developers.hostinger.com*
4
4
 
5
5
  |Method | HTTP request | Description|
6
6
  |------------- | ------------- | -------------|
7
+ |[**createAProductImageUploadURLV1**](#createaproductimageuploadurlv1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/{product_id}/images/upload-url | Create a product image upload URL|
7
8
  |[**createDigitalProductV1**](#createdigitalproductv1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/digital | Create digital product|
8
9
  |[**createPhysicalProductV1**](#createphysicalproductv1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/physical | Create physical product|
9
10
  |[**uploadAndAttachAProductImageV1**](#uploadandattachaproductimagev1) | **POST** /api/ecommerce/v1/stores/{store_id}/products/{product_id}/images | Upload and attach a product image|
10
11
 
12
+ # **createAProductImageUploadURLV1**
13
+ > EcommerceV1ProductProductImageUploadUrlResource createAProductImageUploadURLV1()
14
+
15
+ Returns a signed URL to upload a product image to (multipart/form-data POST). Then call the attach-image endpoint with the returned object_name to scan and attach it to the product.
16
+
17
+ ### Example
18
+
19
+ ```typescript
20
+ import {
21
+ EcommerceProductsApi,
22
+ Configuration
23
+ } from 'hostinger-api-sdk';
24
+
25
+ const configuration = new Configuration();
26
+ const apiInstance = new EcommerceProductsApi(configuration);
27
+
28
+ let storeId: string; //The ID of the store the product belongs to. (default to undefined)
29
+ let productId: string; //The ID of the product the image will be attached to. (default to undefined)
30
+
31
+ const { status, data } = await apiInstance.createAProductImageUploadURLV1(
32
+ storeId,
33
+ productId
34
+ );
35
+ ```
36
+
37
+ ### Parameters
38
+
39
+ |Name | Type | Description | Notes|
40
+ |------------- | ------------- | ------------- | -------------|
41
+ | **storeId** | [**string**] | The ID of the store the product belongs to. | defaults to undefined|
42
+ | **productId** | [**string**] | The ID of the product the image will be attached to. | defaults to undefined|
43
+
44
+
45
+ ### Return type
46
+
47
+ **EcommerceV1ProductProductImageUploadUrlResource**
48
+
49
+ ### Authorization
50
+
51
+ [apiToken](../README.md#apiToken)
52
+
53
+ ### HTTP request headers
54
+
55
+ - **Content-Type**: Not defined
56
+ - **Accept**: application/json
57
+
58
+
59
+ ### HTTP response details
60
+ | Status code | Description | Response headers |
61
+ |-------------|-------------|------------------|
62
+ |**200** | Success response | - |
63
+ |**401** | Unauthenticated response | - |
64
+ |**500** | Error response | - |
65
+
66
+ [[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)
67
+
11
68
  # **createDigitalProductV1**
12
69
  > EcommerceV1ProductProductCreationResource createDigitalProductV1(ecommerceV1ProductCreateDigitalProductRequest)
13
70
 
@@ -127,7 +184,7 @@ const { status, data } = await apiInstance.createPhysicalProductV1(
127
184
  # **uploadAndAttachAProductImageV1**
128
185
  > EcommerceV1ProductProductImageUploadResource uploadAndAttachAProductImageV1(ecommerceV1ProductUploadProductImageRequest)
129
186
 
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.
187
+ Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product\'s primary image.
131
188
 
132
189
  ### Example
133
190
 
@@ -0,0 +1,26 @@
1
+ # EcommerceV1ProductProductImageUploadUrlResource
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **upload_url** | **string** | Signed URL to upload the image to with a multipart/form-data POST. | [optional] [default to undefined]
9
+ **fields** | **{ [key: string]: string; }** | Form fields to send alongside the file in the multipart POST. | [optional] [default to undefined]
10
+ **object_name** | **string** | Key of the uploaded object — send it to the attach-image endpoint. | [optional] [default to undefined]
11
+ **max_bytes** | **number** | Maximum accepted upload size in bytes. | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { EcommerceV1ProductProductImageUploadUrlResource } from 'hostinger-api-sdk';
17
+
18
+ const instance: EcommerceV1ProductProductImageUploadUrlResource = {
19
+ upload_url,
20
+ fields,
21
+ object_name,
22
+ max_bytes,
23
+ };
24
+ ```
25
+
26
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -5,7 +5,8 @@
5
5
 
6
6
  Name | Type | Description | Notes
7
7
  ------------ | ------------- | ------------- | -------------
8
- **image** | **string** | Raster image file (JPEG, PNG, GIF or WebP), maximum 15MB. SVG is not accepted. | [default to undefined]
8
+ **image_url** | **string** | Publicly reachable URL of the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name. | [optional] [default to undefined]
9
+ **object_name** | **string** | Key returned by the upload-url endpoint. Provide this instead of image_url to attach an uploaded image. | [optional] [default to undefined]
9
10
  **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
 
11
12
  ## Example
@@ -14,7 +15,8 @@ Name | Type | Description | Notes
14
15
  import { EcommerceV1ProductUploadProductImageRequest } from 'hostinger-api-sdk';
15
16
 
16
17
  const instance: EcommerceV1ProductUploadProductImageRequest = {
17
- image,
18
+ image_url,
19
+ object_name,
18
20
  is_thumbnail,
19
21
  };
20
22
  ```
package/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.32.4
6
+ * API Version: 1.32.6
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.5",
3
+ "version": "1.30.7",
4
4
  "description": "Hostinger API TypeScript SDK",
5
5
  "author": "Hostinger",
6
6
  "repository": {