hostinger-api-sdk 1.68.0 → 2.0.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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Hostinger API
3
3
  *
4
- * API Version: 1.68.0
4
+ * API Version: 2.0.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
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger API
6
6
  *
7
- * API Version: 1.68.0
7
+ * API Version: 2.0.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
@@ -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.68.0" }, (_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/2.0.0" }, (_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.68.0
4
+ * API Version: 2.0.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
@@ -16738,6 +16738,37 @@ export declare const WordPressV1ContentGenerateImagesRequestImageTypeEnum: {
16738
16738
  readonly Logo: "logo";
16739
16739
  };
16740
16740
  export type WordPressV1ContentGenerateImagesRequestImageTypeEnum = typeof WordPressV1ContentGenerateImagesRequestImageTypeEnum[keyof typeof WordPressV1ContentGenerateImagesRequestImageTypeEnum];
16741
+ /**
16742
+ * Single image generated by the AI image generator.
16743
+ * @export
16744
+ * @interface WordPressV1ContentGeneratedImageResource
16745
+ */
16746
+ export interface WordPressV1ContentGeneratedImageResource {
16747
+ /**
16748
+ * Temporary URL of the generated image, valid until the `expires_at` time of the result
16749
+ * @type {string}
16750
+ * @memberof WordPressV1ContentGeneratedImageResource
16751
+ */
16752
+ 'url': string;
16753
+ /**
16754
+ * Image width in pixels
16755
+ * @type {number}
16756
+ * @memberof WordPressV1ContentGeneratedImageResource
16757
+ */
16758
+ 'width': number;
16759
+ /**
16760
+ * Image height in pixels
16761
+ * @type {number}
16762
+ * @memberof WordPressV1ContentGeneratedImageResource
16763
+ */
16764
+ 'height': number;
16765
+ /**
16766
+ * MIME type of the image
16767
+ * @type {string}
16768
+ * @memberof WordPressV1ContentGeneratedImageResource
16769
+ */
16770
+ 'content_type': string;
16771
+ }
16741
16772
  /**
16742
16773
  * Images generated by the AI image generator.
16743
16774
  * @export
@@ -16745,17 +16776,78 @@ export type WordPressV1ContentGenerateImagesRequestImageTypeEnum = typeof WordPr
16745
16776
  */
16746
16777
  export interface WordPressV1ContentGeneratedImagesResource {
16747
16778
  /**
16748
- * Generated images, each encoded as a base64 string
16749
- * @type {Array<string>}
16779
+ * Generated images, each available at a temporary URL
16780
+ * @type {Array<WordPressV1ContentGeneratedImageResource>}
16750
16781
  * @memberof WordPressV1ContentGeneratedImagesResource
16751
16782
  */
16752
- 'images': Array<string>;
16783
+ 'images': Array<WordPressV1ContentGeneratedImageResource>;
16753
16784
  /**
16754
- * MIME type shared by all returned images
16785
+ * Time after which the image URLs stop working. Download the images before then.
16755
16786
  * @type {string}
16756
16787
  * @memberof WordPressV1ContentGeneratedImagesResource
16757
16788
  */
16758
- 'content_type': string;
16789
+ 'expires_at': string;
16790
+ }
16791
+ /**
16792
+ * State of an AI content generation and, once completed, its result.
16793
+ * @export
16794
+ * @interface WordPressV1ContentGenerationResource
16795
+ */
16796
+ export interface WordPressV1ContentGenerationResource {
16797
+ /**
16798
+ * Generation ID (UUID) used to poll for the result
16799
+ * @type {string}
16800
+ * @memberof WordPressV1ContentGenerationResource
16801
+ */
16802
+ 'generation_id': string;
16803
+ /**
16804
+ * Kind of generation, determines the shape of `result`
16805
+ * @type {string}
16806
+ * @memberof WordPressV1ContentGenerationResource
16807
+ */
16808
+ 'type': WordPressV1ContentGenerationResourceTypeEnum;
16809
+ /**
16810
+ * `in-progress` while the generation is still running, `completed` once `result` is available, `failed` when the generation stopped without a result.
16811
+ * @type {string}
16812
+ * @memberof WordPressV1ContentGenerationResource
16813
+ */
16814
+ 'status': WordPressV1ContentGenerationResourceStatusEnum;
16815
+ /**
16816
+ *
16817
+ * @type {WordPressV1ContentGenerationResourceResult}
16818
+ * @memberof WordPressV1ContentGenerationResource
16819
+ */
16820
+ 'result': WordPressV1ContentGenerationResourceResult | null;
16821
+ }
16822
+ export declare const WordPressV1ContentGenerationResourceTypeEnum: {
16823
+ readonly WebsiteGeneration: "website-generation";
16824
+ readonly ImageGeneration: "image-generation";
16825
+ };
16826
+ export type WordPressV1ContentGenerationResourceTypeEnum = typeof WordPressV1ContentGenerationResourceTypeEnum[keyof typeof WordPressV1ContentGenerationResourceTypeEnum];
16827
+ export declare const WordPressV1ContentGenerationResourceStatusEnum: {
16828
+ readonly InProgress: "in-progress";
16829
+ readonly Completed: "completed";
16830
+ readonly Failed: "failed";
16831
+ };
16832
+ export type WordPressV1ContentGenerationResourceStatusEnum = typeof WordPressV1ContentGenerationResourceStatusEnum[keyof typeof WordPressV1ContentGenerationResourceStatusEnum];
16833
+ /**
16834
+ * Generated content, `null` until the status is `completed`. For `image-generation` it is the generated images object; for `website-generation` it is the generated website document.
16835
+ * @export
16836
+ * @interface WordPressV1ContentGenerationResourceResult
16837
+ */
16838
+ export interface WordPressV1ContentGenerationResourceResult {
16839
+ /**
16840
+ * Generated images, each available at a temporary URL
16841
+ * @type {Array<WordPressV1ContentGeneratedImageResource>}
16842
+ * @memberof WordPressV1ContentGenerationResourceResult
16843
+ */
16844
+ 'images': Array<WordPressV1ContentGeneratedImageResource>;
16845
+ /**
16846
+ * Time after which the image URLs stop working. Download the images before then.
16847
+ * @type {string}
16848
+ * @memberof WordPressV1ContentGenerationResourceResult
16849
+ */
16850
+ 'expires_at': string;
16759
16851
  }
16760
16852
  /**
16761
16853
  *
@@ -34412,7 +34504,7 @@ export declare class VPSVirtualMachineApi extends BaseAPI {
34412
34504
  */
34413
34505
  export declare const WordPressAIContentApiAxiosParamCreator: (configuration?: Configuration) => {
34414
34506
  /**
34415
- * 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).
34507
+ * 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).
34416
34508
  * @summary Generate images
34417
34509
  * @param {string} username
34418
34510
  * @param {string} software WordPress installation (software) identifier
@@ -34421,6 +34513,17 @@ export declare const WordPressAIContentApiAxiosParamCreator: (configuration?: Co
34421
34513
  * @throws {RequiredError}
34422
34514
  */
34423
34515
  generateImagesV1: (username: string, software: string, wordPressV1ContentGenerateImagesRequest: WordPressV1ContentGenerateImagesRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
34516
+ /**
34517
+ * 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).
34518
+ * @summary Get generation result
34519
+ * @param {string} username
34520
+ * @param {string} software WordPress installation (software) identifier
34521
+ * @param {string} generationId Generation ID returned when the generation was started
34522
+ * @param {GetGenerationResultV1TypeEnum} [type] Generation type to look up. When omitted, every generation type is checked.
34523
+ * @param {*} [options] Override http request option.
34524
+ * @throws {RequiredError}
34525
+ */
34526
+ getGenerationResultV1: (username: string, software: string, generationId: string, type?: GetGenerationResultV1TypeEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
34424
34527
  };
34425
34528
  /**
34426
34529
  * WordPressAIContentApi - functional programming interface
@@ -34428,7 +34531,7 @@ export declare const WordPressAIContentApiAxiosParamCreator: (configuration?: Co
34428
34531
  */
34429
34532
  export declare const WordPressAIContentApiFp: (configuration?: Configuration) => {
34430
34533
  /**
34431
- * 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).
34534
+ * 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).
34432
34535
  * @summary Generate images
34433
34536
  * @param {string} username
34434
34537
  * @param {string} software WordPress installation (software) identifier
@@ -34436,7 +34539,18 @@ export declare const WordPressAIContentApiFp: (configuration?: Configuration) =>
34436
34539
  * @param {*} [options] Override http request option.
34437
34540
  * @throws {RequiredError}
34438
34541
  */
34439
- generateImagesV1(username: string, software: string, wordPressV1ContentGenerateImagesRequest: WordPressV1ContentGenerateImagesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WordPressV1ContentGeneratedImagesResource>>;
34542
+ generateImagesV1(username: string, software: string, wordPressV1ContentGenerateImagesRequest: WordPressV1ContentGenerateImagesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WordPressV1ContentGenerationResource>>;
34543
+ /**
34544
+ * 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).
34545
+ * @summary Get generation result
34546
+ * @param {string} username
34547
+ * @param {string} software WordPress installation (software) identifier
34548
+ * @param {string} generationId Generation ID returned when the generation was started
34549
+ * @param {GetGenerationResultV1TypeEnum} [type] Generation type to look up. When omitted, every generation type is checked.
34550
+ * @param {*} [options] Override http request option.
34551
+ * @throws {RequiredError}
34552
+ */
34553
+ getGenerationResultV1(username: string, software: string, generationId: string, type?: GetGenerationResultV1TypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WordPressV1ContentGenerationResource>>;
34440
34554
  };
34441
34555
  /**
34442
34556
  * WordPressAIContentApi - factory interface
@@ -34444,7 +34558,7 @@ export declare const WordPressAIContentApiFp: (configuration?: Configuration) =>
34444
34558
  */
34445
34559
  export declare const WordPressAIContentApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
34446
34560
  /**
34447
- * 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).
34561
+ * 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).
34448
34562
  * @summary Generate images
34449
34563
  * @param {string} username
34450
34564
  * @param {string} software WordPress installation (software) identifier
@@ -34452,7 +34566,18 @@ export declare const WordPressAIContentApiFactory: (configuration?: Configuratio
34452
34566
  * @param {*} [options] Override http request option.
34453
34567
  * @throws {RequiredError}
34454
34568
  */
34455
- generateImagesV1(username: string, software: string, wordPressV1ContentGenerateImagesRequest: WordPressV1ContentGenerateImagesRequest, options?: RawAxiosRequestConfig): AxiosPromise<WordPressV1ContentGeneratedImagesResource>;
34569
+ generateImagesV1(username: string, software: string, wordPressV1ContentGenerateImagesRequest: WordPressV1ContentGenerateImagesRequest, options?: RawAxiosRequestConfig): AxiosPromise<WordPressV1ContentGenerationResource>;
34570
+ /**
34571
+ * 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).
34572
+ * @summary Get generation result
34573
+ * @param {string} username
34574
+ * @param {string} software WordPress installation (software) identifier
34575
+ * @param {string} generationId Generation ID returned when the generation was started
34576
+ * @param {GetGenerationResultV1TypeEnum} [type] Generation type to look up. When omitted, every generation type is checked.
34577
+ * @param {*} [options] Override http request option.
34578
+ * @throws {RequiredError}
34579
+ */
34580
+ getGenerationResultV1(username: string, software: string, generationId: string, type?: GetGenerationResultV1TypeEnum, options?: RawAxiosRequestConfig): AxiosPromise<WordPressV1ContentGenerationResource>;
34456
34581
  };
34457
34582
  /**
34458
34583
  * WordPressAIContentApi - object-oriented interface
@@ -34462,7 +34587,7 @@ export declare const WordPressAIContentApiFactory: (configuration?: Configuratio
34462
34587
  */
34463
34588
  export declare class WordPressAIContentApi extends BaseAPI {
34464
34589
  /**
34465
- * 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).
34590
+ * 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).
34466
34591
  * @summary Generate images
34467
34592
  * @param {string} username
34468
34593
  * @param {string} software WordPress installation (software) identifier
@@ -34471,8 +34596,28 @@ export declare class WordPressAIContentApi extends BaseAPI {
34471
34596
  * @throws {RequiredError}
34472
34597
  * @memberof WordPressAIContentApi
34473
34598
  */
34474
- generateImagesV1(username: string, software: string, wordPressV1ContentGenerateImagesRequest: WordPressV1ContentGenerateImagesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WordPressV1ContentGeneratedImagesResource, any, {}, any>>;
34599
+ generateImagesV1(username: string, software: string, wordPressV1ContentGenerateImagesRequest: WordPressV1ContentGenerateImagesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WordPressV1ContentGenerationResource, any, {}, any>>;
34600
+ /**
34601
+ * 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).
34602
+ * @summary Get generation result
34603
+ * @param {string} username
34604
+ * @param {string} software WordPress installation (software) identifier
34605
+ * @param {string} generationId Generation ID returned when the generation was started
34606
+ * @param {GetGenerationResultV1TypeEnum} [type] Generation type to look up. When omitted, every generation type is checked.
34607
+ * @param {*} [options] Override http request option.
34608
+ * @throws {RequiredError}
34609
+ * @memberof WordPressAIContentApi
34610
+ */
34611
+ getGenerationResultV1(username: string, software: string, generationId: string, type?: GetGenerationResultV1TypeEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WordPressV1ContentGenerationResource, any, {}, any>>;
34475
34612
  }
34613
+ /**
34614
+ * @export
34615
+ */
34616
+ export declare const GetGenerationResultV1TypeEnum: {
34617
+ readonly WebsiteGeneration: "website-generation";
34618
+ readonly ImageGeneration: "image-generation";
34619
+ };
34620
+ export type GetGenerationResultV1TypeEnum = typeof GetGenerationResultV1TypeEnum[keyof typeof GetGenerationResultV1TypeEnum];
34476
34621
  /**
34477
34622
  * WordPressAIToolsApi - axios parameter creator
34478
34623
  * @export
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.0.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'
@@ -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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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