hostinger-api-sdk 1.68.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +2 -2
  2. package/api.ts +324 -20
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +272 -21
  7. package/dist/api.js +127 -22
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/esm/api.d.ts +272 -21
  15. package/dist/esm/api.js +118 -13
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +2 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/EcommerceProductVariantsApi.md +1 -1
  27. package/docs/EcommerceProductsApi.md +1 -1
  28. package/docs/EcommerceV1ProductCreatePhysicalProductRequest.md +2 -0
  29. package/docs/EcommerceV1ProductCreatePhysicalProductRequestSeoSettings.md +25 -0
  30. package/docs/EcommerceV1ProductUpdateRequest.md +4 -0
  31. package/docs/EcommerceV1ProductUpdateRequestCollectionChanges.md +23 -0
  32. package/docs/EcommerceV1ProductUpdateRequestCollectionChangesAddInner.md +20 -0
  33. package/docs/EcommerceV1ProductUpdateRequestSeoSettings.md +25 -0
  34. package/docs/EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner.md +2 -0
  35. package/docs/WordPressAIContentApi.md +70 -3
  36. package/docs/WordPressV1ContentGeneratedImageResource.md +27 -0
  37. package/docs/WordPressV1ContentGeneratedImagesResource.md +3 -3
  38. package/docs/WordPressV1ContentGenerationResource.md +27 -0
  39. package/docs/WordPressV1ContentGenerationResourceResult.md +23 -0
  40. package/index.ts +1 -1
  41. package/package.json +1 -1
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.68.0
6
+ * API Version: 2.1.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1150,6 +1150,15 @@ export const WordPressV1ContentGenerateImagesRequestImageTypeEnum = {
1150
1150
  Product: 'product',
1151
1151
  Logo: 'logo'
1152
1152
  };
1153
+ export const WordPressV1ContentGenerationResourceTypeEnum = {
1154
+ WebsiteGeneration: 'website-generation',
1155
+ ImageGeneration: 'image-generation'
1156
+ };
1157
+ export const WordPressV1ContentGenerationResourceStatusEnum = {
1158
+ InProgress: 'in-progress',
1159
+ Completed: 'completed',
1160
+ Failed: 'failed'
1161
+ };
1153
1162
  export const WordPressV1HostingerPluginsUpdateAiOptionStatusRequestOptionEnum = {
1154
1163
  Llmstxt: 'llmstxt',
1155
1164
  Web2agent: 'web2agent'
@@ -10623,7 +10632,7 @@ export const EcommerceProductVariantsApiAxiosParamCreator = function (configurat
10623
10632
  };
10624
10633
  }),
10625
10634
  /**
10626
- * Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
10635
+ * Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
10627
10636
  * @summary Update product variants in batch
10628
10637
  * @param {string} storeId The ID of the store that owns the product.
10629
10638
  * @param {string} productId The ID of the product whose variants are being updated.
@@ -10724,7 +10733,7 @@ export const EcommerceProductVariantsApiFp = function (configuration) {
10724
10733
  });
10725
10734
  },
10726
10735
  /**
10727
- * Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
10736
+ * Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
10728
10737
  * @summary Update product variants in batch
10729
10738
  * @param {string} storeId The ID of the store that owns the product.
10730
10739
  * @param {string} productId The ID of the product whose variants are being updated.
@@ -10786,7 +10795,7 @@ export const EcommerceProductVariantsApiFactory = function (configuration, baseP
10786
10795
  return localVarFp.listProductVariantsV1(storeId, productId, page, options).then((request) => request(axios, basePath));
10787
10796
  },
10788
10797
  /**
10789
- * Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
10798
+ * Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
10790
10799
  * @summary Update product variants in batch
10791
10800
  * @param {string} storeId The ID of the store that owns the product.
10792
10801
  * @param {string} productId The ID of the product whose variants are being updated.
@@ -10846,7 +10855,7 @@ export class EcommerceProductVariantsApi extends BaseAPI {
10846
10855
  return EcommerceProductVariantsApiFp(this.configuration).listProductVariantsV1(storeId, productId, page, options).then((request) => request(this.axios, this.basePath));
10847
10856
  }
10848
10857
  /**
10849
- * Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
10858
+ * Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
10850
10859
  * @summary Update product variants in batch
10851
10860
  * @param {string} storeId The ID of the store that owns the product.
10852
10861
  * @param {string} productId The ID of the product whose variants are being updated.
@@ -11064,7 +11073,7 @@ export const EcommerceProductsApiAxiosParamCreator = function (configuration) {
11064
11073
  };
11065
11074
  }),
11066
11075
  /**
11067
- * Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
11076
+ * Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
11068
11077
  * @summary Update a product
11069
11078
  * @param {string} storeId The ID of the store that owns the product.
11070
11079
  * @param {string} productId The ID of the product to update.
@@ -11239,7 +11248,7 @@ export const EcommerceProductsApiFp = function (configuration) {
11239
11248
  });
11240
11249
  },
11241
11250
  /**
11242
- * Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
11251
+ * Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
11243
11252
  * @summary Update a product
11244
11253
  * @param {string} storeId The ID of the store that owns the product.
11245
11254
  * @param {string} productId The ID of the product to update.
@@ -11341,7 +11350,7 @@ export const EcommerceProductsApiFactory = function (configuration, basePath, ax
11341
11350
  return localVarFp.listProductsV1(storeId, productIds, status, q, include, page, options).then((request) => request(axios, basePath));
11342
11351
  },
11343
11352
  /**
11344
- * Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
11353
+ * Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
11345
11354
  * @summary Update a product
11346
11355
  * @param {string} storeId The ID of the store that owns the product.
11347
11356
  * @param {string} productId The ID of the product to update.
@@ -11438,7 +11447,7 @@ export class EcommerceProductsApi extends BaseAPI {
11438
11447
  return EcommerceProductsApiFp(this.configuration).listProductsV1(storeId, productIds, status, q, include, page, options).then((request) => request(this.axios, this.basePath));
11439
11448
  }
11440
11449
  /**
11441
- * Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
11450
+ * Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
11442
11451
  * @summary Update a product
11443
11452
  * @param {string} storeId The ID of the store that owns the product.
11444
11453
  * @param {string} productId The ID of the product to update.
@@ -32643,7 +32652,7 @@ export class VPSVirtualMachineApi extends BaseAPI {
32643
32652
  export const WordPressAIContentApiAxiosParamCreator = function (configuration) {
32644
32653
  return {
32645
32654
  /**
32646
- * Generate one or more images from a prompt and an image type for the specified WordPress installation. Images are returned inline as base64-encoded PNGs. They match the requested aspect ratio and are never smaller than the requested size; logos are transparent PNGs cropped to the mark. Generation is synchronous and can take up to a minute. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32655
+ * Start generating one or more images from a prompt and an image type for the specified WordPress installation. The generation runs asynchronously: the response is returned right away with `status: in-progress` and a `generation_id`. Poll GET /api/hosting/v1/accounts/{username}/wordpress/{software}/content/generations/{generation_id} every few seconds until `status` is `completed` or `failed`. A completed generation returns temporary image URLs together with the time they expire; download the images before then. Images match the requested aspect ratio and are never smaller than the requested size; logos are transparent images cropped to the mark. Only one image generation can run per installation at a time: while one is still in progress the endpoint returns 409 without the ID of the running generation, so a caller that did not receive the `202` has to wait for it to finish (up to a few minutes) before starting a new one. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32647
32656
  * @summary Generate images
32648
32657
  * @param {string} username
32649
32658
  * @param {string} software WordPress installation (software) identifier
@@ -32683,6 +32692,50 @@ export const WordPressAIContentApiAxiosParamCreator = function (configuration) {
32683
32692
  options: localVarRequestOptions,
32684
32693
  };
32685
32694
  }),
32695
+ /**
32696
+ * Get the result of an AI content generation started for the specified WordPress installation, such as an image generation started with POST /api/hosting/v1/accounts/{username}/wordpress/{software}/content/images/generate. While the generation is still running only `status: in-progress` is returned; poll every few seconds. Once `completed`, `result` holds the generated content shaped according to `type`: temporary image URLs together with the time they expire for `image-generation`, or the generated website document for `website-generation` (started from the Hostinger WordPress plugin). A `failed` generation has no `result`. Unknown or expired generation IDs return 404. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32697
+ * @summary Get generation result
32698
+ * @param {string} username
32699
+ * @param {string} software WordPress installation (software) identifier
32700
+ * @param {string} generationId Generation ID returned when the generation was started
32701
+ * @param {GetGenerationResultV1TypeEnum} [type] Generation type to look up. When omitted, every generation type is checked.
32702
+ * @param {*} [options] Override http request option.
32703
+ * @throws {RequiredError}
32704
+ */
32705
+ getGenerationResultV1: (username_1, software_1, generationId_1, type_1, ...args_1) => __awaiter(this, [username_1, software_1, generationId_1, type_1, ...args_1], void 0, function* (username, software, generationId, type, options = {}) {
32706
+ // verify required parameter 'username' is not null or undefined
32707
+ assertParamExists('getGenerationResultV1', 'username', username);
32708
+ // verify required parameter 'software' is not null or undefined
32709
+ assertParamExists('getGenerationResultV1', 'software', software);
32710
+ // verify required parameter 'generationId' is not null or undefined
32711
+ assertParamExists('getGenerationResultV1', 'generationId', generationId);
32712
+ const localVarPath = `/api/hosting/v1/accounts/{username}/wordpress/{software}/content/generations/{generation_id}`
32713
+ .replace(`{${"username"}}`, encodeURIComponent(String(username)))
32714
+ .replace(`{${"software"}}`, encodeURIComponent(String(software)))
32715
+ .replace(`{${"generation_id"}}`, encodeURIComponent(String(generationId)));
32716
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
32717
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
32718
+ let baseOptions;
32719
+ if (configuration) {
32720
+ baseOptions = configuration.baseOptions;
32721
+ }
32722
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
32723
+ const localVarHeaderParameter = {};
32724
+ const localVarQueryParameter = {};
32725
+ // authentication apiToken required
32726
+ // http bearer authentication required
32727
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
32728
+ if (type !== undefined) {
32729
+ localVarQueryParameter['type'] = type;
32730
+ }
32731
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
32732
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
32733
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
32734
+ return {
32735
+ url: toPathString(localVarUrlObj),
32736
+ options: localVarRequestOptions,
32737
+ };
32738
+ }),
32686
32739
  };
32687
32740
  };
32688
32741
  /**
@@ -32693,7 +32746,7 @@ export const WordPressAIContentApiFp = function (configuration) {
32693
32746
  const localVarAxiosParamCreator = WordPressAIContentApiAxiosParamCreator(configuration);
32694
32747
  return {
32695
32748
  /**
32696
- * Generate one or more images from a prompt and an image type for the specified WordPress installation. Images are returned inline as base64-encoded PNGs. They match the requested aspect ratio and are never smaller than the requested size; logos are transparent PNGs cropped to the mark. Generation is synchronous and can take up to a minute. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32749
+ * Start generating one or more images from a prompt and an image type for the specified WordPress installation. The generation runs asynchronously: the response is returned right away with `status: in-progress` and a `generation_id`. Poll GET /api/hosting/v1/accounts/{username}/wordpress/{software}/content/generations/{generation_id} every few seconds until `status` is `completed` or `failed`. A completed generation returns temporary image URLs together with the time they expire; download the images before then. Images match the requested aspect ratio and are never smaller than the requested size; logos are transparent images cropped to the mark. Only one image generation can run per installation at a time: while one is still in progress the endpoint returns 409 without the ID of the running generation, so a caller that did not receive the `202` has to wait for it to finish (up to a few minutes) before starting a new one. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32697
32750
  * @summary Generate images
32698
32751
  * @param {string} username
32699
32752
  * @param {string} software WordPress installation (software) identifier
@@ -32709,6 +32762,24 @@ export const WordPressAIContentApiFp = function (configuration) {
32709
32762
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32710
32763
  });
32711
32764
  },
32765
+ /**
32766
+ * Get the result of an AI content generation started for the specified WordPress installation, such as an image generation started with POST /api/hosting/v1/accounts/{username}/wordpress/{software}/content/images/generate. While the generation is still running only `status: in-progress` is returned; poll every few seconds. Once `completed`, `result` holds the generated content shaped according to `type`: temporary image URLs together with the time they expire for `image-generation`, or the generated website document for `website-generation` (started from the Hostinger WordPress plugin). A `failed` generation has no `result`. Unknown or expired generation IDs return 404. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32767
+ * @summary Get generation result
32768
+ * @param {string} username
32769
+ * @param {string} software WordPress installation (software) identifier
32770
+ * @param {string} generationId Generation ID returned when the generation was started
32771
+ * @param {GetGenerationResultV1TypeEnum} [type] Generation type to look up. When omitted, every generation type is checked.
32772
+ * @param {*} [options] Override http request option.
32773
+ * @throws {RequiredError}
32774
+ */
32775
+ getGenerationResultV1(username, software, generationId, type, options) {
32776
+ return __awaiter(this, void 0, void 0, function* () {
32777
+ var _a, _b;
32778
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getGenerationResultV1(username, software, generationId, type, options);
32779
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['WordPressAIContentApi.getGenerationResultV1']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
32780
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
32781
+ });
32782
+ },
32712
32783
  };
32713
32784
  };
32714
32785
  /**
@@ -32719,7 +32790,7 @@ export const WordPressAIContentApiFactory = function (configuration, basePath, a
32719
32790
  const localVarFp = WordPressAIContentApiFp(configuration);
32720
32791
  return {
32721
32792
  /**
32722
- * Generate one or more images from a prompt and an image type for the specified WordPress installation. Images are returned inline as base64-encoded PNGs. They match the requested aspect ratio and are never smaller than the requested size; logos are transparent PNGs cropped to the mark. Generation is synchronous and can take up to a minute. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32793
+ * Start generating one or more images from a prompt and an image type for the specified WordPress installation. The generation runs asynchronously: the response is returned right away with `status: in-progress` and a `generation_id`. Poll GET /api/hosting/v1/accounts/{username}/wordpress/{software}/content/generations/{generation_id} every few seconds until `status` is `completed` or `failed`. A completed generation returns temporary image URLs together with the time they expire; download the images before then. Images match the requested aspect ratio and are never smaller than the requested size; logos are transparent images cropped to the mark. Only one image generation can run per installation at a time: while one is still in progress the endpoint returns 409 without the ID of the running generation, so a caller that did not receive the `202` has to wait for it to finish (up to a few minutes) before starting a new one. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32723
32794
  * @summary Generate images
32724
32795
  * @param {string} username
32725
32796
  * @param {string} software WordPress installation (software) identifier
@@ -32730,6 +32801,19 @@ export const WordPressAIContentApiFactory = function (configuration, basePath, a
32730
32801
  generateImagesV1(username, software, wordPressV1ContentGenerateImagesRequest, options) {
32731
32802
  return localVarFp.generateImagesV1(username, software, wordPressV1ContentGenerateImagesRequest, options).then((request) => request(axios, basePath));
32732
32803
  },
32804
+ /**
32805
+ * Get the result of an AI content generation started for the specified WordPress installation, such as an image generation started with POST /api/hosting/v1/accounts/{username}/wordpress/{software}/content/images/generate. While the generation is still running only `status: in-progress` is returned; poll every few seconds. Once `completed`, `result` holds the generated content shaped according to `type`: temporary image URLs together with the time they expire for `image-generation`, or the generated website document for `website-generation` (started from the Hostinger WordPress plugin). A `failed` generation has no `result`. Unknown or expired generation IDs return 404. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32806
+ * @summary Get generation result
32807
+ * @param {string} username
32808
+ * @param {string} software WordPress installation (software) identifier
32809
+ * @param {string} generationId Generation ID returned when the generation was started
32810
+ * @param {GetGenerationResultV1TypeEnum} [type] Generation type to look up. When omitted, every generation type is checked.
32811
+ * @param {*} [options] Override http request option.
32812
+ * @throws {RequiredError}
32813
+ */
32814
+ getGenerationResultV1(username, software, generationId, type, options) {
32815
+ return localVarFp.getGenerationResultV1(username, software, generationId, type, options).then((request) => request(axios, basePath));
32816
+ },
32733
32817
  };
32734
32818
  };
32735
32819
  /**
@@ -32740,7 +32824,7 @@ export const WordPressAIContentApiFactory = function (configuration, basePath, a
32740
32824
  */
32741
32825
  export class WordPressAIContentApi extends BaseAPI {
32742
32826
  /**
32743
- * Generate one or more images from a prompt and an image type for the specified WordPress installation. Images are returned inline as base64-encoded PNGs. They match the requested aspect ratio and are never smaller than the requested size; logos are transparent PNGs cropped to the mark. Generation is synchronous and can take up to a minute. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32827
+ * Start generating one or more images from a prompt and an image type for the specified WordPress installation. The generation runs asynchronously: the response is returned right away with `status: in-progress` and a `generation_id`. Poll GET /api/hosting/v1/accounts/{username}/wordpress/{software}/content/generations/{generation_id} every few seconds until `status` is `completed` or `failed`. A completed generation returns temporary image URLs together with the time they expire; download the images before then. Images match the requested aspect ratio and are never smaller than the requested size; logos are transparent images cropped to the mark. Only one image generation can run per installation at a time: while one is still in progress the endpoint returns 409 without the ID of the running generation, so a caller that did not receive the `202` has to wait for it to finish (up to a few minutes) before starting a new one. The endpoint is limited to 10 requests per minute. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32744
32828
  * @summary Generate images
32745
32829
  * @param {string} username
32746
32830
  * @param {string} software WordPress installation (software) identifier
@@ -32752,7 +32836,28 @@ export class WordPressAIContentApi extends BaseAPI {
32752
32836
  generateImagesV1(username, software, wordPressV1ContentGenerateImagesRequest, options) {
32753
32837
  return WordPressAIContentApiFp(this.configuration).generateImagesV1(username, software, wordPressV1ContentGenerateImagesRequest, options).then((request) => request(this.axios, this.basePath));
32754
32838
  }
32839
+ /**
32840
+ * Get the result of an AI content generation started for the specified WordPress installation, such as an image generation started with POST /api/hosting/v1/accounts/{username}/wordpress/{software}/content/images/generate. While the generation is still running only `status: in-progress` is returned; poll every few seconds. Once `completed`, `result` holds the generated content shaped according to `type`: temporary image URLs together with the time they expire for `image-generation`, or the generated website document for `website-generation` (started from the Hostinger WordPress plugin). A `failed` generation has no `result`. Unknown or expired generation IDs return 404. Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the `id` field).
32841
+ * @summary Get generation result
32842
+ * @param {string} username
32843
+ * @param {string} software WordPress installation (software) identifier
32844
+ * @param {string} generationId Generation ID returned when the generation was started
32845
+ * @param {GetGenerationResultV1TypeEnum} [type] Generation type to look up. When omitted, every generation type is checked.
32846
+ * @param {*} [options] Override http request option.
32847
+ * @throws {RequiredError}
32848
+ * @memberof WordPressAIContentApi
32849
+ */
32850
+ getGenerationResultV1(username, software, generationId, type, options) {
32851
+ return WordPressAIContentApiFp(this.configuration).getGenerationResultV1(username, software, generationId, type, options).then((request) => request(this.axios, this.basePath));
32852
+ }
32755
32853
  }
32854
+ /**
32855
+ * @export
32856
+ */
32857
+ export const GetGenerationResultV1TypeEnum = {
32858
+ WebsiteGeneration: 'website-generation',
32859
+ ImageGeneration: 'image-generation'
32860
+ };
32756
32861
  /**
32757
32862
  * WordPressAIToolsApi - axios parameter creator
32758
32863
  * @export
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.68.0
4
+ * API Version: 2.1.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/base.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.68.0
6
+ * API Version: 2.1.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.68.0
4
+ * API Version: 2.1.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.68.0
6
+ * API Version: 2.1.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.68.0
4
+ * API Version: 2.1.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.68.0
6
+ * API Version: 2.1.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -13,7 +13,7 @@ export class Configuration {
13
13
  var _a;
14
14
  this.accessToken = param.accessToken;
15
15
  this.basePath = param.basePath;
16
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({ 'User-Agent': "hostinger-typescript-sdk/1.68.0" }, (_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/2.1.0" }, (_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.68.0
4
+ * API Version: 2.1.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.68.0
6
+ * API Version: 2.1.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.68.0
4
+ * API Version: 2.1.0
5
5
  *
6
6
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
7
7
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.68.0
7
+ * API Version: 2.1.0
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -191,7 +191,7 @@ const { status, data } = await apiInstance.listProductVariantsV1(
191
191
  # **updateProductVariantsInBatchV1**
192
192
  > EcommerceV1VariantVariantListResponseResource updateProductVariantsInBatchV1(ecommerceV1VariantBatchUpdateVariantsRequest)
193
193
 
194
- Update up to 100 existing variants in place by id — title, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
194
+ Update up to 100 existing variants in place by id — title, SKU, inventory, stock tracking and prices. Variants omitted from the request are left untouched. Prices replace the variant\'s existing prices in full. Returns the updated variants.
195
195
 
196
196
  ### Example
197
197
 
@@ -311,7 +311,7 @@ const { status, data } = await apiInstance.listProductsV1(
311
311
  # **updateAProductV1**
312
312
  > EcommerceV1ProductProductResponseResource updateAProductV1(ecommerceV1ProductUpdateRequest)
313
313
 
314
- Update a product\'s name, description or status. Set status to published to make it buyable, draft to hide it, or archived to retire it. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
314
+ Update a product\'s name, description, status, SEO settings or collections. Set status to published to make it buyable, draft to hide it, or archived to retire it. SEO settings (title, description, slug) left out keep their values. collection_changes adds or removes collections without touching the others. Variants, prices and inventory are managed through the variant endpoints, not here. Returns the updated product summary.
315
315
 
316
316
  ### Example
317
317
 
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **price** | **number** | Price in the smallest currency unit (e.g. cents). Must be positive. | [default to undefined]
10
10
  **description** | **string** | The product description. | [optional] [default to undefined]
11
11
  **currency** | **string** | ISO 4217 currency code. Defaults to the store\'s default currency when omitted. | [optional] [default to undefined]
12
+ **seo_settings** | [**EcommerceV1ProductCreatePhysicalProductRequestSeoSettings**](EcommerceV1ProductCreatePhysicalProductRequestSeoSettings.md) | | [optional] [default to undefined]
12
13
 
13
14
  ## Example
14
15
 
@@ -20,6 +21,7 @@ const instance: EcommerceV1ProductCreatePhysicalProductRequest = {
20
21
  price,
21
22
  description,
22
23
  currency,
24
+ seo_settings,
23
25
  };
24
26
  ```
25
27
 
@@ -0,0 +1,25 @@
1
+ # EcommerceV1ProductCreatePhysicalProductRequestSeoSettings
2
+
3
+ Search-engine settings. Omitted fields are generated from the name and description; a slug already in use gets a numeric suffix. Send at least one field.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **title** | **string** | Search-engine title for the product page. | [optional] [default to undefined]
10
+ **description** | **string** | Search-engine description for the product page. | [optional] [default to undefined]
11
+ **slug** | **string** | URL slug of the product page. Lowercase letters, digits and dashes. | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { EcommerceV1ProductCreatePhysicalProductRequestSeoSettings } from '@hostinger/sdk';
17
+
18
+ const instance: EcommerceV1ProductCreatePhysicalProductRequestSeoSettings = {
19
+ title,
20
+ description,
21
+ slug,
22
+ };
23
+ ```
24
+
25
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -8,6 +8,8 @@ Name | Type | Description | Notes
8
8
  **name** | **string** | The product name. | [optional] [default to undefined]
9
9
  **description** | **string** | The product description. | [optional] [default to undefined]
10
10
  **status** | **string** | Set \"published\" to make the product buyable, \"draft\" to hide it, or \"archived\" to retire it. | [optional] [default to undefined]
11
+ **seo_settings** | [**EcommerceV1ProductUpdateRequestSeoSettings**](EcommerceV1ProductUpdateRequestSeoSettings.md) | | [optional] [default to undefined]
12
+ **collection_changes** | [**EcommerceV1ProductUpdateRequestCollectionChanges**](EcommerceV1ProductUpdateRequestCollectionChanges.md) | | [optional] [default to undefined]
11
13
 
12
14
  ## Example
13
15
 
@@ -18,6 +20,8 @@ const instance: EcommerceV1ProductUpdateRequest = {
18
20
  name,
19
21
  description,
20
22
  status,
23
+ seo_settings,
24
+ collection_changes,
21
25
  };
22
26
  ```
23
27
 
@@ -0,0 +1,23 @@
1
+ # EcommerceV1ProductUpdateRequestCollectionChanges
2
+
3
+ Adds the product to or removes it from collections without touching its other collections. Send at least one collection in add or remove.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **add** | [**Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>**](EcommerceV1ProductUpdateRequestCollectionChangesAddInner.md) | Collections to add the product to. Every id must exist in the store. | [optional] [default to undefined]
10
+ **remove** | [**Array<EcommerceV1ProductUpdateRequestCollectionChangesAddInner>**](EcommerceV1ProductUpdateRequestCollectionChangesAddInner.md) | Collections to take the product out of. Ids the product is not in are ignored. | [optional] [default to undefined]
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import { EcommerceV1ProductUpdateRequestCollectionChanges } from '@hostinger/sdk';
16
+
17
+ const instance: EcommerceV1ProductUpdateRequestCollectionChanges = {
18
+ add,
19
+ remove,
20
+ };
21
+ ```
22
+
23
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,20 @@
1
+ # EcommerceV1ProductUpdateRequestCollectionChangesAddInner
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | The collection id. | [default to undefined]
9
+
10
+ ## Example
11
+
12
+ ```typescript
13
+ import { EcommerceV1ProductUpdateRequestCollectionChangesAddInner } from '@hostinger/sdk';
14
+
15
+ const instance: EcommerceV1ProductUpdateRequestCollectionChangesAddInner = {
16
+ id,
17
+ };
18
+ ```
19
+
20
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,25 @@
1
+ # EcommerceV1ProductUpdateRequestSeoSettings
2
+
3
+ Search-engine settings to change. Send at least one field; omitted fields keep their current values.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **title** | **string** | Search-engine title for the product page. | [optional] [default to undefined]
10
+ **description** | **string** | Search-engine description for the product page. | [optional] [default to undefined]
11
+ **slug** | **string** | URL slug of the product page. Lowercase letters, digits and dashes. | [optional] [default to undefined]
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import { EcommerceV1ProductUpdateRequestSeoSettings } from '@hostinger/sdk';
17
+
18
+ const instance: EcommerceV1ProductUpdateRequestSeoSettings = {
19
+ title,
20
+ description,
21
+ slug,
22
+ };
23
+ ```
24
+
25
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
7
7
  ------------ | ------------- | ------------- | -------------
8
8
  **variant_id** | **string** | The id of the variant to update. | [default to undefined]
9
9
  **title** | **string** | The variant title. | [optional] [default to undefined]
10
+ **sku** | **string** | The variant SKU. | [optional] [default to undefined]
10
11
  **inventory_quantity** | **number** | Units in stock. | [optional] [default to undefined]
11
12
  **manage_inventory** | **boolean** | Whether stock is tracked for this variant. | [optional] [default to undefined]
12
13
  **prices** | [**Array<EcommerceV1VariantBatchUpdateVariantsRequestVariantsInnerPricesInner>**](EcommerceV1VariantBatchUpdateVariantsRequestVariantsInnerPricesInner.md) | The full list of prices for the variant, replacing the existing ones. A free item is amount: 0. | [optional] [default to undefined]
@@ -19,6 +20,7 @@ import { EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner } from '@host
19
20
  const instance: EcommerceV1VariantBatchUpdateVariantsRequestVariantsInner = {
20
21
  variant_id,
21
22
  title,
23
+ sku,
22
24
  inventory_quantity,
23
25
  manage_inventory,
24
26
  prices,