@hostinger/sdk 1.51.0 → 1.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- ## @hostinger/sdk@1.51.0
1
+ ## @hostinger/sdk@1.52.1
2
2
 
3
3
  For more information, please visit [https://developers.hostinger.com](https://developers.hostinger.com).
4
4
 
5
5
  ### Usage
6
6
 
7
7
  ```
8
- npm install @hostinger/sdk@1.51.0 --save
8
+ npm install @hostinger/sdk@1.52.1 --save
9
9
  ```
package/api.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.51.0
6
+ * API Version: 1.52.1
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
@@ -7358,6 +7358,144 @@ export interface HostingV1FilesUploadUrlResource {
7358
7358
  */
7359
7359
  'rest_auth_key': string;
7360
7360
  }
7361
+ /**
7362
+ *
7363
+ * @export
7364
+ * @interface HostingV1GitGitInstallationResource
7365
+ */
7366
+ export interface HostingV1GitGitInstallationResource {
7367
+ /**
7368
+ * Installation identifier. Use it as the path parameter of List Git installation repositories.
7369
+ * @type {string}
7370
+ * @memberof HostingV1GitGitInstallationResource
7371
+ */
7372
+ 'uuid': string;
7373
+ /**
7374
+ * Git provider the account belongs to
7375
+ * @type {string}
7376
+ * @memberof HostingV1GitGitInstallationResource
7377
+ */
7378
+ 'provider': HostingV1GitGitInstallationResourceProviderEnum;
7379
+ /**
7380
+ * Login of the connected provider account (user or organization)
7381
+ * @type {string}
7382
+ * @memberof HostingV1GitGitInstallationResource
7383
+ */
7384
+ 'account_login': string | null;
7385
+ /**
7386
+ * Whether the connected account is a user or an organization
7387
+ * @type {string}
7388
+ * @memberof HostingV1GitGitInstallationResource
7389
+ */
7390
+ 'account_type': HostingV1GitGitInstallationResourceAccountTypeEnum | null;
7391
+ /**
7392
+ * Avatar URL of the connected provider account
7393
+ * @type {string}
7394
+ * @memberof HostingV1GitGitInstallationResource
7395
+ */
7396
+ 'account_avatar_url': string | null;
7397
+ /**
7398
+ * Installation status. Only active installations are listed unless the status filter says otherwise.
7399
+ * @type {string}
7400
+ * @memberof HostingV1GitGitInstallationResource
7401
+ */
7402
+ 'status': HostingV1GitGitInstallationResourceStatusEnum;
7403
+ /**
7404
+ * When the provider app was installed on the account
7405
+ * @type {string}
7406
+ * @memberof HostingV1GitGitInstallationResource
7407
+ */
7408
+ 'installed_at': string | null;
7409
+ /**
7410
+ * When the installation record was created
7411
+ * @type {string}
7412
+ * @memberof HostingV1GitGitInstallationResource
7413
+ */
7414
+ 'created_at': string;
7415
+ /**
7416
+ * True when the GitHub user account has a stored OAuth token whose refresh token is still valid, false when the token is missing or its refresh token expired. Null for organization accounts and for providers other than GitHub.
7417
+ * @type {boolean}
7418
+ * @memberof HostingV1GitGitInstallationResource
7419
+ */
7420
+ 'has_oauth': boolean | null;
7421
+ }
7422
+
7423
+ export const HostingV1GitGitInstallationResourceProviderEnum = {
7424
+ Github: 'github',
7425
+ Gitlab: 'gitlab',
7426
+ Bitbucket: 'bitbucket'
7427
+ } as const;
7428
+
7429
+ export type HostingV1GitGitInstallationResourceProviderEnum = typeof HostingV1GitGitInstallationResourceProviderEnum[keyof typeof HostingV1GitGitInstallationResourceProviderEnum];
7430
+ export const HostingV1GitGitInstallationResourceAccountTypeEnum = {
7431
+ User: 'User',
7432
+ Organization: 'Organization'
7433
+ } as const;
7434
+
7435
+ export type HostingV1GitGitInstallationResourceAccountTypeEnum = typeof HostingV1GitGitInstallationResourceAccountTypeEnum[keyof typeof HostingV1GitGitInstallationResourceAccountTypeEnum];
7436
+ export const HostingV1GitGitInstallationResourceStatusEnum = {
7437
+ Pending: 'pending',
7438
+ Active: 'active',
7439
+ Suspended: 'suspended'
7440
+ } as const;
7441
+
7442
+ export type HostingV1GitGitInstallationResourceStatusEnum = typeof HostingV1GitGitInstallationResourceStatusEnum[keyof typeof HostingV1GitGitInstallationResourceStatusEnum];
7443
+
7444
+ /**
7445
+ *
7446
+ * @export
7447
+ * @interface HostingV1GitGitRepositoryResource
7448
+ */
7449
+ export interface HostingV1GitGitRepositoryResource {
7450
+ /**
7451
+ * Repository identifier assigned by the Git provider
7452
+ * @type {number}
7453
+ * @memberof HostingV1GitGitRepositoryResource
7454
+ */
7455
+ 'id': number;
7456
+ /**
7457
+ * Repository name without the .git suffix
7458
+ * @type {string}
7459
+ * @memberof HostingV1GitGitRepositoryResource
7460
+ */
7461
+ 'name': string;
7462
+ /**
7463
+ * Owner and repository name joined with a slash
7464
+ * @type {string}
7465
+ * @memberof HostingV1GitGitRepositoryResource
7466
+ */
7467
+ 'full_name': string;
7468
+ /**
7469
+ * Repository owner login
7470
+ * @type {string}
7471
+ * @memberof HostingV1GitGitRepositoryResource
7472
+ */
7473
+ 'owner': string;
7474
+ /**
7475
+ * Whether the repository is private
7476
+ * @type {boolean}
7477
+ * @memberof HostingV1GitGitRepositoryResource
7478
+ */
7479
+ 'is_private': boolean;
7480
+ /**
7481
+ * Repository page URL
7482
+ * @type {string}
7483
+ * @memberof HostingV1GitGitRepositoryResource
7484
+ */
7485
+ 'html_url': string;
7486
+ /**
7487
+ * HTTPS clone URL
7488
+ * @type {string}
7489
+ * @memberof HostingV1GitGitRepositoryResource
7490
+ */
7491
+ 'clone_url': string;
7492
+ /**
7493
+ * Default branch of the repository
7494
+ * @type {string}
7495
+ * @memberof HostingV1GitGitRepositoryResource
7496
+ */
7497
+ 'default_branch': string;
7498
+ }
7361
7499
  /**
7362
7500
  *
7363
7501
  * @export
@@ -30667,6 +30805,216 @@ export const ListWebsiteFilesAndDirectoriesV1FileTypesEnum = {
30667
30805
  export type ListWebsiteFilesAndDirectoriesV1FileTypesEnum = typeof ListWebsiteFilesAndDirectoriesV1FileTypesEnum[keyof typeof ListWebsiteFilesAndDirectoriesV1FileTypesEnum];
30668
30806
 
30669
30807
 
30808
+ /**
30809
+ * HostingGitApi - axios parameter creator
30810
+ * @export
30811
+ */
30812
+ export const HostingGitApiAxiosParamCreator = function (configuration?: Configuration) {
30813
+ return {
30814
+ /**
30815
+ * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
30816
+ * @summary List Git installation repositories
30817
+ * @param {string} uuid Git installation UUID from the List Git installations endpoint
30818
+ * @param {*} [options] Override http request option.
30819
+ * @throws {RequiredError}
30820
+ */
30821
+ listGitInstallationRepositoriesV1: async (uuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30822
+ // verify required parameter 'uuid' is not null or undefined
30823
+ assertParamExists('listGitInstallationRepositoriesV1', 'uuid', uuid)
30824
+ const localVarPath = `/api/hosting/v1/git/installations/{uuid}/repositories`
30825
+ .replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
30826
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
30827
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
30828
+ let baseOptions;
30829
+ if (configuration) {
30830
+ baseOptions = configuration.baseOptions;
30831
+ }
30832
+
30833
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
30834
+ const localVarHeaderParameter = {} as any;
30835
+ const localVarQueryParameter = {} as any;
30836
+
30837
+ // authentication apiToken required
30838
+ // http bearer authentication required
30839
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
30840
+
30841
+
30842
+
30843
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
30844
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
30845
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
30846
+
30847
+ return {
30848
+ url: toPathString(localVarUrlObj),
30849
+ options: localVarRequestOptions,
30850
+ };
30851
+ },
30852
+ /**
30853
+ * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
30854
+ * @summary List Git installations
30855
+ * @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
30856
+ * @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
30857
+ * @param {*} [options] Override http request option.
30858
+ * @throws {RequiredError}
30859
+ */
30860
+ listGitInstallationsV1: async (provider?: ListGitInstallationsV1ProviderEnum, status?: ListGitInstallationsV1StatusEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
30861
+ const localVarPath = `/api/hosting/v1/git/installations`;
30862
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
30863
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
30864
+ let baseOptions;
30865
+ if (configuration) {
30866
+ baseOptions = configuration.baseOptions;
30867
+ }
30868
+
30869
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
30870
+ const localVarHeaderParameter = {} as any;
30871
+ const localVarQueryParameter = {} as any;
30872
+
30873
+ // authentication apiToken required
30874
+ // http bearer authentication required
30875
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
30876
+
30877
+ if (provider !== undefined) {
30878
+ localVarQueryParameter['provider'] = provider;
30879
+ }
30880
+
30881
+ if (status !== undefined) {
30882
+ localVarQueryParameter['status'] = status;
30883
+ }
30884
+
30885
+
30886
+
30887
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
30888
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
30889
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
30890
+
30891
+ return {
30892
+ url: toPathString(localVarUrlObj),
30893
+ options: localVarRequestOptions,
30894
+ };
30895
+ },
30896
+ }
30897
+ };
30898
+
30899
+ /**
30900
+ * HostingGitApi - functional programming interface
30901
+ * @export
30902
+ */
30903
+ export const HostingGitApiFp = function(configuration?: Configuration) {
30904
+ const localVarAxiosParamCreator = HostingGitApiAxiosParamCreator(configuration)
30905
+ return {
30906
+ /**
30907
+ * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
30908
+ * @summary List Git installation repositories
30909
+ * @param {string} uuid Git installation UUID from the List Git installations endpoint
30910
+ * @param {*} [options] Override http request option.
30911
+ * @throws {RequiredError}
30912
+ */
30913
+ async listGitInstallationRepositoriesV1(uuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<HostingV1GitGitRepositoryResource>>> {
30914
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listGitInstallationRepositoriesV1(uuid, options);
30915
+ const localVarOperationServerBasePath = operationServerMap['HostingGitApi.listGitInstallationRepositoriesV1']?.[0]?.url;
30916
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
30917
+ },
30918
+ /**
30919
+ * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
30920
+ * @summary List Git installations
30921
+ * @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
30922
+ * @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
30923
+ * @param {*} [options] Override http request option.
30924
+ * @throws {RequiredError}
30925
+ */
30926
+ async listGitInstallationsV1(provider?: ListGitInstallationsV1ProviderEnum, status?: ListGitInstallationsV1StatusEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<HostingV1GitGitInstallationResource>>> {
30927
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listGitInstallationsV1(provider, status, options);
30928
+ const localVarOperationServerBasePath = operationServerMap['HostingGitApi.listGitInstallationsV1']?.[0]?.url;
30929
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
30930
+ },
30931
+ }
30932
+ };
30933
+
30934
+ /**
30935
+ * HostingGitApi - factory interface
30936
+ * @export
30937
+ */
30938
+ export const HostingGitApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
30939
+ const localVarFp = HostingGitApiFp(configuration)
30940
+ return {
30941
+ /**
30942
+ * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
30943
+ * @summary List Git installation repositories
30944
+ * @param {string} uuid Git installation UUID from the List Git installations endpoint
30945
+ * @param {*} [options] Override http request option.
30946
+ * @throws {RequiredError}
30947
+ */
30948
+ listGitInstallationRepositoriesV1(uuid: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<HostingV1GitGitRepositoryResource>> {
30949
+ return localVarFp.listGitInstallationRepositoriesV1(uuid, options).then((request) => request(axios, basePath));
30950
+ },
30951
+ /**
30952
+ * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
30953
+ * @summary List Git installations
30954
+ * @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
30955
+ * @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
30956
+ * @param {*} [options] Override http request option.
30957
+ * @throws {RequiredError}
30958
+ */
30959
+ listGitInstallationsV1(provider?: ListGitInstallationsV1ProviderEnum, status?: ListGitInstallationsV1StatusEnum, options?: RawAxiosRequestConfig): AxiosPromise<Array<HostingV1GitGitInstallationResource>> {
30960
+ return localVarFp.listGitInstallationsV1(provider, status, options).then((request) => request(axios, basePath));
30961
+ },
30962
+ };
30963
+ };
30964
+
30965
+ /**
30966
+ * HostingGitApi - object-oriented interface
30967
+ * @export
30968
+ * @class HostingGitApi
30969
+ * @extends {BaseAPI}
30970
+ */
30971
+ export class HostingGitApi extends BaseAPI {
30972
+ /**
30973
+ * Lists the repositories the Git installation can access, read live from the provider. Works for github and gitlab installations. Use an active installation: a suspended or pending one is still queried and the call fails with whatever the provider answers. The list is cut at the first 500 repositories in the order the provider returns them; when the account has more, name the repository directly instead of searching this list. `owner`, `name` and `default_branch` identify a repository and a branch to deploy. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
30974
+ * @summary List Git installation repositories
30975
+ * @param {string} uuid Git installation UUID from the List Git installations endpoint
30976
+ * @param {*} [options] Override http request option.
30977
+ * @throws {RequiredError}
30978
+ * @memberof HostingGitApi
30979
+ */
30980
+ public listGitInstallationRepositoriesV1(uuid: string, options?: RawAxiosRequestConfig) {
30981
+ return HostingGitApiFp(this.configuration).listGitInstallationRepositoriesV1(uuid, options).then((request) => request(this.axios, this.basePath));
30982
+ }
30983
+
30984
+ /**
30985
+ * Lists the Git provider accounts the customer has connected. Only installations with status `active` are returned unless the `status` filter says otherwise. An empty list means the customer has no active installation. Check `status=suspended` and `status=pending` as well. If there is none at all, GitHub has to be connected once in hPanel (Websites, Manage, Advanced, Git, Connect GitHub; or Add Website, Node.js Web App, Import Git Repository, Continue with GitHub); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`.
30986
+ * @summary List Git installations
30987
+ * @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
30988
+ * @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
30989
+ * @param {*} [options] Override http request option.
30990
+ * @throws {RequiredError}
30991
+ * @memberof HostingGitApi
30992
+ */
30993
+ public listGitInstallationsV1(provider?: ListGitInstallationsV1ProviderEnum, status?: ListGitInstallationsV1StatusEnum, options?: RawAxiosRequestConfig) {
30994
+ return HostingGitApiFp(this.configuration).listGitInstallationsV1(provider, status, options).then((request) => request(this.axios, this.basePath));
30995
+ }
30996
+ }
30997
+
30998
+ /**
30999
+ * @export
31000
+ */
31001
+ export const ListGitInstallationsV1ProviderEnum = {
31002
+ Github: 'github',
31003
+ Gitlab: 'gitlab',
31004
+ Bitbucket: 'bitbucket'
31005
+ } as const;
31006
+ export type ListGitInstallationsV1ProviderEnum = typeof ListGitInstallationsV1ProviderEnum[keyof typeof ListGitInstallationsV1ProviderEnum];
31007
+ /**
31008
+ * @export
31009
+ */
31010
+ export const ListGitInstallationsV1StatusEnum = {
31011
+ Pending: 'pending',
31012
+ Active: 'active',
31013
+ Suspended: 'suspended'
31014
+ } as const;
31015
+ export type ListGitInstallationsV1StatusEnum = typeof ListGitInstallationsV1StatusEnum[keyof typeof ListGitInstallationsV1StatusEnum];
31016
+
31017
+
30670
31018
  /**
30671
31019
  * HostingNodeJSApi - axios parameter creator
30672
31020
  * @export
package/base.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.51.0
6
+ * API Version: 1.52.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/common.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.51.0
6
+ * API Version: 1.52.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
package/configuration.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger API
5
5
  *
6
- * API Version: 1.51.0
6
+ * API Version: 1.52.1
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -48,7 +48,7 @@ export class Configuration {
48
48
  this.baseOptions = {
49
49
  ...param.baseOptions,
50
50
  headers: {
51
- 'User-Agent': "hostinger-typescript-sdk/1.51.0",
51
+ 'User-Agent': "hostinger-typescript-sdk/1.52.1",
52
52
  ...param.baseOptions?.headers,
53
53
  },
54
54
  };