@hostinger/sdk 1.52.1 → 1.53.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.
- package/README.md +2 -2
- package/api.ts +891 -18
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +568 -16
- package/dist/api.js +621 -25
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +568 -16
- package/dist/esm/api.js +607 -15
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/HostingGitApi.md +178 -2
- package/docs/HostingNodeJSApi.md +1 -1
- package/docs/HostingSSLApi.md +242 -0
- package/docs/HostingV1GitGitAutoDeploymentSettingsResource.md +31 -0
- package/docs/HostingV1GitGitCommitAuthorResource.md +22 -0
- package/docs/HostingV1GitGitCommitResource.md +24 -0
- package/docs/HostingV1GitUpdateGitAutoDeploymentSettingsRequest.md +30 -0
- package/docs/HostingV1NodeJsSourceOptionsResource.md +11 -0
- package/docs/HostingV1NodeJsStartBuildRequest.md +1 -1
- package/docs/HostingV1NodeJsStartBuildRequestSourceOptions.md +9 -1
- package/docs/HostingV1SslSslStatusResource.md +30 -0
- package/docs/HostingV1SslToggleHttpsRedirectRequest.md +20 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Hostinger API
|
|
5
5
|
*
|
|
6
|
-
* API Version: 1.
|
|
6
|
+
* API Version: 1.53.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
|
|
@@ -7358,6 +7358,93 @@ export interface HostingV1FilesUploadUrlResource {
|
|
|
7358
7358
|
*/
|
|
7359
7359
|
'rest_auth_key': string;
|
|
7360
7360
|
}
|
|
7361
|
+
/**
|
|
7362
|
+
* Every field is null when the website has no Git auto-deployment configured.
|
|
7363
|
+
* @export
|
|
7364
|
+
* @interface HostingV1GitGitAutoDeploymentSettingsResource
|
|
7365
|
+
*/
|
|
7366
|
+
export interface HostingV1GitGitAutoDeploymentSettingsResource {
|
|
7367
|
+
/**
|
|
7368
|
+
* Git installation the repository is accessed through
|
|
7369
|
+
* @type {string}
|
|
7370
|
+
* @memberof HostingV1GitGitAutoDeploymentSettingsResource
|
|
7371
|
+
*/
|
|
7372
|
+
'installation_uuid': string | null;
|
|
7373
|
+
/**
|
|
7374
|
+
* Whether pushes to the branch deploy automatically
|
|
7375
|
+
* @type {boolean}
|
|
7376
|
+
* @memberof HostingV1GitGitAutoDeploymentSettingsResource
|
|
7377
|
+
*/
|
|
7378
|
+
'is_enabled': boolean | null;
|
|
7379
|
+
/**
|
|
7380
|
+
* Repository owner login
|
|
7381
|
+
* @type {string}
|
|
7382
|
+
* @memberof HostingV1GitGitAutoDeploymentSettingsResource
|
|
7383
|
+
*/
|
|
7384
|
+
'owner': string | null;
|
|
7385
|
+
/**
|
|
7386
|
+
* Repository name
|
|
7387
|
+
* @type {string}
|
|
7388
|
+
* @memberof HostingV1GitGitAutoDeploymentSettingsResource
|
|
7389
|
+
*/
|
|
7390
|
+
'repository': string | null;
|
|
7391
|
+
/**
|
|
7392
|
+
* Branch that is deployed
|
|
7393
|
+
* @type {string}
|
|
7394
|
+
* @memberof HostingV1GitGitAutoDeploymentSettingsResource
|
|
7395
|
+
*/
|
|
7396
|
+
'branch': string | null;
|
|
7397
|
+
/**
|
|
7398
|
+
* Subdirectory under the website document root the repository deploys into. Empty means the document root.
|
|
7399
|
+
* @type {string}
|
|
7400
|
+
* @memberof HostingV1GitGitAutoDeploymentSettingsResource
|
|
7401
|
+
*/
|
|
7402
|
+
'directory': string | null;
|
|
7403
|
+
}
|
|
7404
|
+
/**
|
|
7405
|
+
*
|
|
7406
|
+
* @export
|
|
7407
|
+
* @interface HostingV1GitGitCommitAuthorResource
|
|
7408
|
+
*/
|
|
7409
|
+
export interface HostingV1GitGitCommitAuthorResource {
|
|
7410
|
+
/**
|
|
7411
|
+
* Author name as recorded in the commit
|
|
7412
|
+
* @type {string}
|
|
7413
|
+
* @memberof HostingV1GitGitCommitAuthorResource
|
|
7414
|
+
*/
|
|
7415
|
+
'name': string;
|
|
7416
|
+
/**
|
|
7417
|
+
* Avatar URL of the author on the Git provider
|
|
7418
|
+
* @type {string}
|
|
7419
|
+
* @memberof HostingV1GitGitCommitAuthorResource
|
|
7420
|
+
*/
|
|
7421
|
+
'avatar_url': string | null;
|
|
7422
|
+
}
|
|
7423
|
+
/**
|
|
7424
|
+
*
|
|
7425
|
+
* @export
|
|
7426
|
+
* @interface HostingV1GitGitCommitResource
|
|
7427
|
+
*/
|
|
7428
|
+
export interface HostingV1GitGitCommitResource {
|
|
7429
|
+
/**
|
|
7430
|
+
* Full commit SHA
|
|
7431
|
+
* @type {string}
|
|
7432
|
+
* @memberof HostingV1GitGitCommitResource
|
|
7433
|
+
*/
|
|
7434
|
+
'hash': string;
|
|
7435
|
+
/**
|
|
7436
|
+
* Commit message
|
|
7437
|
+
* @type {string}
|
|
7438
|
+
* @memberof HostingV1GitGitCommitResource
|
|
7439
|
+
*/
|
|
7440
|
+
'message': string;
|
|
7441
|
+
/**
|
|
7442
|
+
*
|
|
7443
|
+
* @type {HostingV1GitGitCommitAuthorResource}
|
|
7444
|
+
* @memberof HostingV1GitGitCommitResource
|
|
7445
|
+
*/
|
|
7446
|
+
'author': HostingV1GitGitCommitAuthorResource;
|
|
7447
|
+
}
|
|
7361
7448
|
/**
|
|
7362
7449
|
*
|
|
7363
7450
|
* @export
|
|
@@ -7496,6 +7583,49 @@ export interface HostingV1GitGitRepositoryResource {
|
|
|
7496
7583
|
*/
|
|
7497
7584
|
'default_branch': string;
|
|
7498
7585
|
}
|
|
7586
|
+
/**
|
|
7587
|
+
*
|
|
7588
|
+
* @export
|
|
7589
|
+
* @interface HostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
7590
|
+
*/
|
|
7591
|
+
export interface HostingV1GitUpdateGitAutoDeploymentSettingsRequest {
|
|
7592
|
+
/**
|
|
7593
|
+
* Active Git installation from `List Git installations`
|
|
7594
|
+
* @type {string}
|
|
7595
|
+
* @memberof HostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
7596
|
+
*/
|
|
7597
|
+
'installation_uuid': string;
|
|
7598
|
+
/**
|
|
7599
|
+
* Repository owner login, as returned by `List Git installation repositories`. GitLab group paths use slashes.
|
|
7600
|
+
* @type {string}
|
|
7601
|
+
* @memberof HostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
7602
|
+
*/
|
|
7603
|
+
'owner': string;
|
|
7604
|
+
/**
|
|
7605
|
+
* Repository name without the .git suffix
|
|
7606
|
+
* @type {string}
|
|
7607
|
+
* @memberof HostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
7608
|
+
*/
|
|
7609
|
+
'repository': string;
|
|
7610
|
+
/**
|
|
7611
|
+
* Branch to deploy
|
|
7612
|
+
* @type {string}
|
|
7613
|
+
* @memberof HostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
7614
|
+
*/
|
|
7615
|
+
'branch': string;
|
|
7616
|
+
/**
|
|
7617
|
+
* Subdirectory under the website document root to deploy into. Empty, null or omitted means the document root.
|
|
7618
|
+
* @type {string}
|
|
7619
|
+
* @memberof HostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
7620
|
+
*/
|
|
7621
|
+
'directory': string | null;
|
|
7622
|
+
/**
|
|
7623
|
+
* Whether pushes to the branch deploy automatically
|
|
7624
|
+
* @type {boolean}
|
|
7625
|
+
* @memberof HostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
7626
|
+
*/
|
|
7627
|
+
'is_enabled': boolean;
|
|
7628
|
+
}
|
|
7499
7629
|
/**
|
|
7500
7630
|
*
|
|
7501
7631
|
* @export
|
|
@@ -7627,7 +7757,8 @@ export const HostingV1NodeJsBuildOptionsResourcePackageManagerEnum = {
|
|
|
7627
7757
|
|
|
7628
7758
|
export type HostingV1NodeJsBuildOptionsResourcePackageManagerEnum = typeof HostingV1NodeJsBuildOptionsResourcePackageManagerEnum[keyof typeof HostingV1NodeJsBuildOptionsResourcePackageManagerEnum];
|
|
7629
7759
|
export const HostingV1NodeJsBuildOptionsResourceSourceTypeEnum = {
|
|
7630
|
-
Archive: 'archive'
|
|
7760
|
+
Archive: 'archive',
|
|
7761
|
+
Git: 'git'
|
|
7631
7762
|
} as const;
|
|
7632
7763
|
|
|
7633
7764
|
export type HostingV1NodeJsBuildOptionsResourceSourceTypeEnum = typeof HostingV1NodeJsBuildOptionsResourceSourceTypeEnum[keyof typeof HostingV1NodeJsBuildOptionsResourceSourceTypeEnum];
|
|
@@ -8026,7 +8157,7 @@ export interface HostingV1NodeJsSetBuildEnvVarsRequestEnvVarsInner {
|
|
|
8026
8157
|
'value': string;
|
|
8027
8158
|
}
|
|
8028
8159
|
/**
|
|
8029
|
-
*
|
|
8160
|
+
* Which keys carry values depends on the parent source_type; the others are null.
|
|
8030
8161
|
* @export
|
|
8031
8162
|
* @interface HostingV1NodeJsSourceOptionsResource
|
|
8032
8163
|
*/
|
|
@@ -8037,6 +8168,36 @@ export interface HostingV1NodeJsSourceOptionsResource {
|
|
|
8037
8168
|
* @memberof HostingV1NodeJsSourceOptionsResource
|
|
8038
8169
|
*/
|
|
8039
8170
|
'archive_path': string | null;
|
|
8171
|
+
/**
|
|
8172
|
+
* Repository owner login (present if source_type is \"git\")
|
|
8173
|
+
* @type {string}
|
|
8174
|
+
* @memberof HostingV1NodeJsSourceOptionsResource
|
|
8175
|
+
*/
|
|
8176
|
+
'owner': string | null;
|
|
8177
|
+
/**
|
|
8178
|
+
* Repository name without the .git suffix (present if source_type is \"git\")
|
|
8179
|
+
* @type {string}
|
|
8180
|
+
* @memberof HostingV1NodeJsSourceOptionsResource
|
|
8181
|
+
*/
|
|
8182
|
+
'repository': string | null;
|
|
8183
|
+
/**
|
|
8184
|
+
* Branch that was built (present if source_type is \"git\")
|
|
8185
|
+
* @type {string}
|
|
8186
|
+
* @memberof HostingV1NodeJsSourceOptionsResource
|
|
8187
|
+
*/
|
|
8188
|
+
'branch': string | null;
|
|
8189
|
+
/**
|
|
8190
|
+
* Git installation used to access the repository (present if source_type is \"git\")
|
|
8191
|
+
* @type {string}
|
|
8192
|
+
* @memberof HostingV1NodeJsSourceOptionsResource
|
|
8193
|
+
*/
|
|
8194
|
+
'installation_uuid': string | null;
|
|
8195
|
+
/**
|
|
8196
|
+
*
|
|
8197
|
+
* @type {HostingV1GitGitCommitResource}
|
|
8198
|
+
* @memberof HostingV1NodeJsSourceOptionsResource
|
|
8199
|
+
*/
|
|
8200
|
+
'commit': HostingV1GitGitCommitResource | null;
|
|
8040
8201
|
}
|
|
8041
8202
|
/**
|
|
8042
8203
|
*
|
|
@@ -8087,7 +8248,7 @@ export interface HostingV1NodeJsStartBuildRequest {
|
|
|
8087
8248
|
*/
|
|
8088
8249
|
'package_manager': HostingV1NodeJsStartBuildRequestPackageManagerEnum | null;
|
|
8089
8250
|
/**
|
|
8090
|
-
*
|
|
8251
|
+
* Where the files come from: `archive` (an uploaded archive on the website) or `git` (a branch of a repository reachable through a Git installation).
|
|
8091
8252
|
* @type {string}
|
|
8092
8253
|
* @memberof HostingV1NodeJsStartBuildRequest
|
|
8093
8254
|
*/
|
|
@@ -8139,13 +8300,14 @@ export const HostingV1NodeJsStartBuildRequestPackageManagerEnum = {
|
|
|
8139
8300
|
|
|
8140
8301
|
export type HostingV1NodeJsStartBuildRequestPackageManagerEnum = typeof HostingV1NodeJsStartBuildRequestPackageManagerEnum[keyof typeof HostingV1NodeJsStartBuildRequestPackageManagerEnum];
|
|
8141
8302
|
export const HostingV1NodeJsStartBuildRequestSourceTypeEnum = {
|
|
8142
|
-
Archive: 'archive'
|
|
8303
|
+
Archive: 'archive',
|
|
8304
|
+
Git: 'git'
|
|
8143
8305
|
} as const;
|
|
8144
8306
|
|
|
8145
8307
|
export type HostingV1NodeJsStartBuildRequestSourceTypeEnum = typeof HostingV1NodeJsStartBuildRequestSourceTypeEnum[keyof typeof HostingV1NodeJsStartBuildRequestSourceTypeEnum];
|
|
8146
8308
|
|
|
8147
8309
|
/**
|
|
8148
|
-
* Source-specific options
|
|
8310
|
+
* Source-specific options. For `archive` send `archive_path`. For `git` send `owner`, `repository`, `branch` and `installation_uuid`, taken from `List Git installations` and `List Git installation repositories`.
|
|
8149
8311
|
* @export
|
|
8150
8312
|
* @interface HostingV1NodeJsStartBuildRequestSourceOptions
|
|
8151
8313
|
*/
|
|
@@ -8156,6 +8318,30 @@ export interface HostingV1NodeJsStartBuildRequestSourceOptions {
|
|
|
8156
8318
|
* @memberof HostingV1NodeJsStartBuildRequestSourceOptions
|
|
8157
8319
|
*/
|
|
8158
8320
|
'archive_path': string;
|
|
8321
|
+
/**
|
|
8322
|
+
* Repository owner login (required if source is \"git\"). GitLab group paths use slashes.
|
|
8323
|
+
* @type {string}
|
|
8324
|
+
* @memberof HostingV1NodeJsStartBuildRequestSourceOptions
|
|
8325
|
+
*/
|
|
8326
|
+
'owner': string;
|
|
8327
|
+
/**
|
|
8328
|
+
* Repository name without the .git suffix (required if source is \"git\")
|
|
8329
|
+
* @type {string}
|
|
8330
|
+
* @memberof HostingV1NodeJsStartBuildRequestSourceOptions
|
|
8331
|
+
*/
|
|
8332
|
+
'repository': string;
|
|
8333
|
+
/**
|
|
8334
|
+
* Branch to build (required if source is \"git\")
|
|
8335
|
+
* @type {string}
|
|
8336
|
+
* @memberof HostingV1NodeJsStartBuildRequestSourceOptions
|
|
8337
|
+
*/
|
|
8338
|
+
'branch': string;
|
|
8339
|
+
/**
|
|
8340
|
+
* Git installation used to access the repository (required if source is \"git\")
|
|
8341
|
+
* @type {string}
|
|
8342
|
+
* @memberof HostingV1NodeJsStartBuildRequestSourceOptions
|
|
8343
|
+
*/
|
|
8344
|
+
'installation_uuid': string;
|
|
8159
8345
|
}
|
|
8160
8346
|
/**
|
|
8161
8347
|
*
|
|
@@ -8711,6 +8897,83 @@ export interface HostingV1RedirectsRedirectResource {
|
|
|
8711
8897
|
*/
|
|
8712
8898
|
'to': string;
|
|
8713
8899
|
}
|
|
8900
|
+
/**
|
|
8901
|
+
*
|
|
8902
|
+
* @export
|
|
8903
|
+
* @interface HostingV1SslSslStatusResource
|
|
8904
|
+
*/
|
|
8905
|
+
export interface HostingV1SslSslStatusResource {
|
|
8906
|
+
/**
|
|
8907
|
+
* Current certificate status
|
|
8908
|
+
* @type {string}
|
|
8909
|
+
* @memberof HostingV1SslSslStatusResource
|
|
8910
|
+
*/
|
|
8911
|
+
'status': HostingV1SslSslStatusResourceStatusEnum;
|
|
8912
|
+
/**
|
|
8913
|
+
* Provider of the assigned certificate, or of the last recorded installation when none is assigned. `custom` means an uploaded certificate. Null when no certificate is assigned and no installation is recorded, which is also the case for free subdomains on the platform-managed certificate.
|
|
8914
|
+
* @type {string}
|
|
8915
|
+
* @memberof HostingV1SslSslStatusResource
|
|
8916
|
+
*/
|
|
8917
|
+
'provider': HostingV1SslSslStatusResourceProviderEnum | null;
|
|
8918
|
+
/**
|
|
8919
|
+
* Whether the certificate comes from a lifetime provider managed by the platform, not an uploaded one. Follows `provider`: it reflects the last recorded installation when no certificate is assigned, and is false when `provider` is null.
|
|
8920
|
+
* @type {boolean}
|
|
8921
|
+
* @memberof HostingV1SslSslStatusResource
|
|
8922
|
+
*/
|
|
8923
|
+
'is_lifetime': boolean;
|
|
8924
|
+
/**
|
|
8925
|
+
* Whether HTTP requests to the website are redirected to HTTPS
|
|
8926
|
+
* @type {boolean}
|
|
8927
|
+
* @memberof HostingV1SslSslStatusResource
|
|
8928
|
+
*/
|
|
8929
|
+
'is_https_redirect_enabled': boolean;
|
|
8930
|
+
/**
|
|
8931
|
+
* End of the assigned certificate validity period; null when no certificate details are available.
|
|
8932
|
+
* @type {string}
|
|
8933
|
+
* @memberof HostingV1SslSslStatusResource
|
|
8934
|
+
*/
|
|
8935
|
+
'expires_at': string | null;
|
|
8936
|
+
/**
|
|
8937
|
+
* Last installation error, when it is one of the known displayable messages
|
|
8938
|
+
* @type {string}
|
|
8939
|
+
* @memberof HostingV1SslSslStatusResource
|
|
8940
|
+
*/
|
|
8941
|
+
'last_error': string | null;
|
|
8942
|
+
}
|
|
8943
|
+
|
|
8944
|
+
export const HostingV1SslSslStatusResourceStatusEnum = {
|
|
8945
|
+
NotInstalled: 'not_installed',
|
|
8946
|
+
Installing: 'installing',
|
|
8947
|
+
WaitingForRetry: 'waiting_for_retry',
|
|
8948
|
+
Active: 'active',
|
|
8949
|
+
Expired: 'expired',
|
|
8950
|
+
Failed: 'failed'
|
|
8951
|
+
} as const;
|
|
8952
|
+
|
|
8953
|
+
export type HostingV1SslSslStatusResourceStatusEnum = typeof HostingV1SslSslStatusResourceStatusEnum[keyof typeof HostingV1SslSslStatusResourceStatusEnum];
|
|
8954
|
+
export const HostingV1SslSslStatusResourceProviderEnum = {
|
|
8955
|
+
Custom: 'custom',
|
|
8956
|
+
Letsencrypt: 'letsencrypt',
|
|
8957
|
+
Zerossl: 'zerossl',
|
|
8958
|
+
Googlessl: 'googlessl',
|
|
8959
|
+
Hssl: 'hssl'
|
|
8960
|
+
} as const;
|
|
8961
|
+
|
|
8962
|
+
export type HostingV1SslSslStatusResourceProviderEnum = typeof HostingV1SslSslStatusResourceProviderEnum[keyof typeof HostingV1SslSslStatusResourceProviderEnum];
|
|
8963
|
+
|
|
8964
|
+
/**
|
|
8965
|
+
*
|
|
8966
|
+
* @export
|
|
8967
|
+
* @interface HostingV1SslToggleHttpsRedirectRequest
|
|
8968
|
+
*/
|
|
8969
|
+
export interface HostingV1SslToggleHttpsRedirectRequest {
|
|
8970
|
+
/**
|
|
8971
|
+
* Turn the HTTP to HTTPS redirect on (true) or off (false) for the website.
|
|
8972
|
+
* @type {boolean}
|
|
8973
|
+
* @memberof HostingV1SslToggleHttpsRedirectRequest
|
|
8974
|
+
*/
|
|
8975
|
+
'is_enabled': boolean;
|
|
8976
|
+
}
|
|
8714
8977
|
/**
|
|
8715
8978
|
*
|
|
8716
8979
|
* @export
|
|
@@ -30812,7 +31075,91 @@ export type ListWebsiteFilesAndDirectoriesV1FileTypesEnum = typeof ListWebsiteFi
|
|
|
30812
31075
|
export const HostingGitApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
30813
31076
|
return {
|
|
30814
31077
|
/**
|
|
30815
|
-
*
|
|
31078
|
+
* Removes the Git auto-deployment settings of the website. Files already deployed stay on the website; pushes stop deploying until settings are saved again. Succeeds also when nothing is configured.
|
|
31079
|
+
* @summary Delete Git auto-deployment settings
|
|
31080
|
+
* @param {string} username
|
|
31081
|
+
* @param {string} domain Domain name
|
|
31082
|
+
* @param {*} [options] Override http request option.
|
|
31083
|
+
* @throws {RequiredError}
|
|
31084
|
+
*/
|
|
31085
|
+
deleteGitAutoDeploymentSettingsV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31086
|
+
// verify required parameter 'username' is not null or undefined
|
|
31087
|
+
assertParamExists('deleteGitAutoDeploymentSettingsV1', 'username', username)
|
|
31088
|
+
// verify required parameter 'domain' is not null or undefined
|
|
31089
|
+
assertParamExists('deleteGitAutoDeploymentSettingsV1', 'domain', domain)
|
|
31090
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
|
|
31091
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31092
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
31093
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31094
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31095
|
+
let baseOptions;
|
|
31096
|
+
if (configuration) {
|
|
31097
|
+
baseOptions = configuration.baseOptions;
|
|
31098
|
+
}
|
|
31099
|
+
|
|
31100
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
31101
|
+
const localVarHeaderParameter = {} as any;
|
|
31102
|
+
const localVarQueryParameter = {} as any;
|
|
31103
|
+
|
|
31104
|
+
// authentication apiToken required
|
|
31105
|
+
// http bearer authentication required
|
|
31106
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31107
|
+
|
|
31108
|
+
|
|
31109
|
+
|
|
31110
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31111
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31112
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31113
|
+
|
|
31114
|
+
return {
|
|
31115
|
+
url: toPathString(localVarUrlObj),
|
|
31116
|
+
options: localVarRequestOptions,
|
|
31117
|
+
};
|
|
31118
|
+
},
|
|
31119
|
+
/**
|
|
31120
|
+
* Returns the Git auto-deployment settings of the website: which repository and branch deploy into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the repository link but ignores pushes. When the website has no auto-deployment configured every field is null. Save settings with `Update Git auto-deployment settings`.
|
|
31121
|
+
* @summary Get Git auto-deployment settings
|
|
31122
|
+
* @param {string} username
|
|
31123
|
+
* @param {string} domain Domain name
|
|
31124
|
+
* @param {*} [options] Override http request option.
|
|
31125
|
+
* @throws {RequiredError}
|
|
31126
|
+
*/
|
|
31127
|
+
getGitAutoDeploymentSettingsV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31128
|
+
// verify required parameter 'username' is not null or undefined
|
|
31129
|
+
assertParamExists('getGitAutoDeploymentSettingsV1', 'username', username)
|
|
31130
|
+
// verify required parameter 'domain' is not null or undefined
|
|
31131
|
+
assertParamExists('getGitAutoDeploymentSettingsV1', 'domain', domain)
|
|
31132
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
|
|
31133
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31134
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
31135
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31136
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31137
|
+
let baseOptions;
|
|
31138
|
+
if (configuration) {
|
|
31139
|
+
baseOptions = configuration.baseOptions;
|
|
31140
|
+
}
|
|
31141
|
+
|
|
31142
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
31143
|
+
const localVarHeaderParameter = {} as any;
|
|
31144
|
+
const localVarQueryParameter = {} as any;
|
|
31145
|
+
|
|
31146
|
+
// authentication apiToken required
|
|
31147
|
+
// http bearer authentication required
|
|
31148
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31149
|
+
|
|
31150
|
+
|
|
31151
|
+
|
|
31152
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31153
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31154
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31155
|
+
|
|
31156
|
+
return {
|
|
31157
|
+
url: toPathString(localVarUrlObj),
|
|
31158
|
+
options: localVarRequestOptions,
|
|
31159
|
+
};
|
|
31160
|
+
},
|
|
31161
|
+
/**
|
|
31162
|
+
* 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 a branch (`default_branch` or another one) go into `source_options` of `Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
|
|
30816
31163
|
* @summary List Git installation repositories
|
|
30817
31164
|
* @param {string} uuid Git installation UUID from the List Git installations endpoint
|
|
30818
31165
|
* @param {*} [options] Override http request option.
|
|
@@ -30850,7 +31197,7 @@ export const HostingGitApiAxiosParamCreator = function (configuration?: Configur
|
|
|
30850
31197
|
};
|
|
30851
31198
|
},
|
|
30852
31199
|
/**
|
|
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
|
|
31200
|
+
* 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, a Git provider (GitHub or GitLab) has to be connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App, Import Git Repository); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`, and as `installation_uuid` in `Start Node.js build` with `source_type` `git` and in `Update Git auto-deployment settings`.
|
|
30854
31201
|
* @summary List Git installations
|
|
30855
31202
|
* @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
|
|
30856
31203
|
* @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
|
|
@@ -30888,6 +31235,54 @@ export const HostingGitApiAxiosParamCreator = function (configuration?: Configur
|
|
|
30888
31235
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
30889
31236
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
30890
31237
|
|
|
31238
|
+
return {
|
|
31239
|
+
url: toPathString(localVarUrlObj),
|
|
31240
|
+
options: localVarRequestOptions,
|
|
31241
|
+
};
|
|
31242
|
+
},
|
|
31243
|
+
/**
|
|
31244
|
+
* Creates or replaces the Git auto-deployment settings of the website: repository, branch, the directory under the document root to deploy into, and `is_enabled`. Send the full set; `is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must be an installation from `List Git installations` that belongs to the same customer as the website. For PHP and static websites, saving with `is_enabled` true deploys the branch right away and every later push to that branch deploys again. For Node.js and Website Builder websites saving does not clone anything. On a Node.js website start the first deploy with `Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build settings stored for the website.
|
|
31245
|
+
* @summary Update Git auto-deployment settings
|
|
31246
|
+
* @param {string} username
|
|
31247
|
+
* @param {string} domain Domain name
|
|
31248
|
+
* @param {HostingV1GitUpdateGitAutoDeploymentSettingsRequest} hostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
31249
|
+
* @param {*} [options] Override http request option.
|
|
31250
|
+
* @throws {RequiredError}
|
|
31251
|
+
*/
|
|
31252
|
+
updateGitAutoDeploymentSettingsV1: async (username: string, domain: string, hostingV1GitUpdateGitAutoDeploymentSettingsRequest: HostingV1GitUpdateGitAutoDeploymentSettingsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
31253
|
+
// verify required parameter 'username' is not null or undefined
|
|
31254
|
+
assertParamExists('updateGitAutoDeploymentSettingsV1', 'username', username)
|
|
31255
|
+
// verify required parameter 'domain' is not null or undefined
|
|
31256
|
+
assertParamExists('updateGitAutoDeploymentSettingsV1', 'domain', domain)
|
|
31257
|
+
// verify required parameter 'hostingV1GitUpdateGitAutoDeploymentSettingsRequest' is not null or undefined
|
|
31258
|
+
assertParamExists('updateGitAutoDeploymentSettingsV1', 'hostingV1GitUpdateGitAutoDeploymentSettingsRequest', hostingV1GitUpdateGitAutoDeploymentSettingsRequest)
|
|
31259
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/git/auto-deployments/settings`
|
|
31260
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
31261
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
31262
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
31263
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
31264
|
+
let baseOptions;
|
|
31265
|
+
if (configuration) {
|
|
31266
|
+
baseOptions = configuration.baseOptions;
|
|
31267
|
+
}
|
|
31268
|
+
|
|
31269
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
31270
|
+
const localVarHeaderParameter = {} as any;
|
|
31271
|
+
const localVarQueryParameter = {} as any;
|
|
31272
|
+
|
|
31273
|
+
// authentication apiToken required
|
|
31274
|
+
// http bearer authentication required
|
|
31275
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
31276
|
+
|
|
31277
|
+
|
|
31278
|
+
|
|
31279
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
31280
|
+
|
|
31281
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
31282
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
31283
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
31284
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1GitUpdateGitAutoDeploymentSettingsRequest, localVarRequestOptions, configuration)
|
|
31285
|
+
|
|
30891
31286
|
return {
|
|
30892
31287
|
url: toPathString(localVarUrlObj),
|
|
30893
31288
|
options: localVarRequestOptions,
|
|
@@ -30904,7 +31299,33 @@ export const HostingGitApiFp = function(configuration?: Configuration) {
|
|
|
30904
31299
|
const localVarAxiosParamCreator = HostingGitApiAxiosParamCreator(configuration)
|
|
30905
31300
|
return {
|
|
30906
31301
|
/**
|
|
30907
|
-
*
|
|
31302
|
+
* Removes the Git auto-deployment settings of the website. Files already deployed stay on the website; pushes stop deploying until settings are saved again. Succeeds also when nothing is configured.
|
|
31303
|
+
* @summary Delete Git auto-deployment settings
|
|
31304
|
+
* @param {string} username
|
|
31305
|
+
* @param {string} domain Domain name
|
|
31306
|
+
* @param {*} [options] Override http request option.
|
|
31307
|
+
* @throws {RequiredError}
|
|
31308
|
+
*/
|
|
31309
|
+
async deleteGitAutoDeploymentSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31310
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGitAutoDeploymentSettingsV1(username, domain, options);
|
|
31311
|
+
const localVarOperationServerBasePath = operationServerMap['HostingGitApi.deleteGitAutoDeploymentSettingsV1']?.[0]?.url;
|
|
31312
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31313
|
+
},
|
|
31314
|
+
/**
|
|
31315
|
+
* Returns the Git auto-deployment settings of the website: which repository and branch deploy into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the repository link but ignores pushes. When the website has no auto-deployment configured every field is null. Save settings with `Update Git auto-deployment settings`.
|
|
31316
|
+
* @summary Get Git auto-deployment settings
|
|
31317
|
+
* @param {string} username
|
|
31318
|
+
* @param {string} domain Domain name
|
|
31319
|
+
* @param {*} [options] Override http request option.
|
|
31320
|
+
* @throws {RequiredError}
|
|
31321
|
+
*/
|
|
31322
|
+
async getGitAutoDeploymentSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1GitGitAutoDeploymentSettingsResource>> {
|
|
31323
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGitAutoDeploymentSettingsV1(username, domain, options);
|
|
31324
|
+
const localVarOperationServerBasePath = operationServerMap['HostingGitApi.getGitAutoDeploymentSettingsV1']?.[0]?.url;
|
|
31325
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31326
|
+
},
|
|
31327
|
+
/**
|
|
31328
|
+
* 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 a branch (`default_branch` or another one) go into `source_options` of `Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
|
|
30908
31329
|
* @summary List Git installation repositories
|
|
30909
31330
|
* @param {string} uuid Git installation UUID from the List Git installations endpoint
|
|
30910
31331
|
* @param {*} [options] Override http request option.
|
|
@@ -30916,7 +31337,7 @@ export const HostingGitApiFp = function(configuration?: Configuration) {
|
|
|
30916
31337
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30917
31338
|
},
|
|
30918
31339
|
/**
|
|
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
|
|
31340
|
+
* 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, a Git provider (GitHub or GitLab) has to be connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App, Import Git Repository); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`, and as `installation_uuid` in `Start Node.js build` with `source_type` `git` and in `Update Git auto-deployment settings`.
|
|
30920
31341
|
* @summary List Git installations
|
|
30921
31342
|
* @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
|
|
30922
31343
|
* @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
|
|
@@ -30928,6 +31349,20 @@ export const HostingGitApiFp = function(configuration?: Configuration) {
|
|
|
30928
31349
|
const localVarOperationServerBasePath = operationServerMap['HostingGitApi.listGitInstallationsV1']?.[0]?.url;
|
|
30929
31350
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
30930
31351
|
},
|
|
31352
|
+
/**
|
|
31353
|
+
* Creates or replaces the Git auto-deployment settings of the website: repository, branch, the directory under the document root to deploy into, and `is_enabled`. Send the full set; `is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must be an installation from `List Git installations` that belongs to the same customer as the website. For PHP and static websites, saving with `is_enabled` true deploys the branch right away and every later push to that branch deploys again. For Node.js and Website Builder websites saving does not clone anything. On a Node.js website start the first deploy with `Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build settings stored for the website.
|
|
31354
|
+
* @summary Update Git auto-deployment settings
|
|
31355
|
+
* @param {string} username
|
|
31356
|
+
* @param {string} domain Domain name
|
|
31357
|
+
* @param {HostingV1GitUpdateGitAutoDeploymentSettingsRequest} hostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
31358
|
+
* @param {*} [options] Override http request option.
|
|
31359
|
+
* @throws {RequiredError}
|
|
31360
|
+
*/
|
|
31361
|
+
async updateGitAutoDeploymentSettingsV1(username: string, domain: string, hostingV1GitUpdateGitAutoDeploymentSettingsRequest: HostingV1GitUpdateGitAutoDeploymentSettingsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
31362
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options);
|
|
31363
|
+
const localVarOperationServerBasePath = operationServerMap['HostingGitApi.updateGitAutoDeploymentSettingsV1']?.[0]?.url;
|
|
31364
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31365
|
+
},
|
|
30931
31366
|
}
|
|
30932
31367
|
};
|
|
30933
31368
|
|
|
@@ -30939,7 +31374,29 @@ export const HostingGitApiFactory = function (configuration?: Configuration, bas
|
|
|
30939
31374
|
const localVarFp = HostingGitApiFp(configuration)
|
|
30940
31375
|
return {
|
|
30941
31376
|
/**
|
|
30942
|
-
*
|
|
31377
|
+
* Removes the Git auto-deployment settings of the website. Files already deployed stay on the website; pushes stop deploying until settings are saved again. Succeeds also when nothing is configured.
|
|
31378
|
+
* @summary Delete Git auto-deployment settings
|
|
31379
|
+
* @param {string} username
|
|
31380
|
+
* @param {string} domain Domain name
|
|
31381
|
+
* @param {*} [options] Override http request option.
|
|
31382
|
+
* @throws {RequiredError}
|
|
31383
|
+
*/
|
|
31384
|
+
deleteGitAutoDeploymentSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31385
|
+
return localVarFp.deleteGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31386
|
+
},
|
|
31387
|
+
/**
|
|
31388
|
+
* Returns the Git auto-deployment settings of the website: which repository and branch deploy into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the repository link but ignores pushes. When the website has no auto-deployment configured every field is null. Save settings with `Update Git auto-deployment settings`.
|
|
31389
|
+
* @summary Get Git auto-deployment settings
|
|
31390
|
+
* @param {string} username
|
|
31391
|
+
* @param {string} domain Domain name
|
|
31392
|
+
* @param {*} [options] Override http request option.
|
|
31393
|
+
* @throws {RequiredError}
|
|
31394
|
+
*/
|
|
31395
|
+
getGitAutoDeploymentSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1GitGitAutoDeploymentSettingsResource> {
|
|
31396
|
+
return localVarFp.getGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(axios, basePath));
|
|
31397
|
+
},
|
|
31398
|
+
/**
|
|
31399
|
+
* 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 a branch (`default_branch` or another one) go into `source_options` of `Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
|
|
30943
31400
|
* @summary List Git installation repositories
|
|
30944
31401
|
* @param {string} uuid Git installation UUID from the List Git installations endpoint
|
|
30945
31402
|
* @param {*} [options] Override http request option.
|
|
@@ -30949,7 +31406,7 @@ export const HostingGitApiFactory = function (configuration?: Configuration, bas
|
|
|
30949
31406
|
return localVarFp.listGitInstallationRepositoriesV1(uuid, options).then((request) => request(axios, basePath));
|
|
30950
31407
|
},
|
|
30951
31408
|
/**
|
|
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
|
|
31409
|
+
* 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, a Git provider (GitHub or GitLab) has to be connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App, Import Git Repository); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`, and as `installation_uuid` in `Start Node.js build` with `source_type` `git` and in `Update Git auto-deployment settings`.
|
|
30953
31410
|
* @summary List Git installations
|
|
30954
31411
|
* @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
|
|
30955
31412
|
* @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
|
|
@@ -30959,6 +31416,18 @@ export const HostingGitApiFactory = function (configuration?: Configuration, bas
|
|
|
30959
31416
|
listGitInstallationsV1(provider?: ListGitInstallationsV1ProviderEnum, status?: ListGitInstallationsV1StatusEnum, options?: RawAxiosRequestConfig): AxiosPromise<Array<HostingV1GitGitInstallationResource>> {
|
|
30960
31417
|
return localVarFp.listGitInstallationsV1(provider, status, options).then((request) => request(axios, basePath));
|
|
30961
31418
|
},
|
|
31419
|
+
/**
|
|
31420
|
+
* Creates or replaces the Git auto-deployment settings of the website: repository, branch, the directory under the document root to deploy into, and `is_enabled`. Send the full set; `is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must be an installation from `List Git installations` that belongs to the same customer as the website. For PHP and static websites, saving with `is_enabled` true deploys the branch right away and every later push to that branch deploys again. For Node.js and Website Builder websites saving does not clone anything. On a Node.js website start the first deploy with `Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build settings stored for the website.
|
|
31421
|
+
* @summary Update Git auto-deployment settings
|
|
31422
|
+
* @param {string} username
|
|
31423
|
+
* @param {string} domain Domain name
|
|
31424
|
+
* @param {HostingV1GitUpdateGitAutoDeploymentSettingsRequest} hostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
31425
|
+
* @param {*} [options] Override http request option.
|
|
31426
|
+
* @throws {RequiredError}
|
|
31427
|
+
*/
|
|
31428
|
+
updateGitAutoDeploymentSettingsV1(username: string, domain: string, hostingV1GitUpdateGitAutoDeploymentSettingsRequest: HostingV1GitUpdateGitAutoDeploymentSettingsRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
31429
|
+
return localVarFp.updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options).then((request) => request(axios, basePath));
|
|
31430
|
+
},
|
|
30962
31431
|
};
|
|
30963
31432
|
};
|
|
30964
31433
|
|
|
@@ -30970,7 +31439,33 @@ export const HostingGitApiFactory = function (configuration?: Configuration, bas
|
|
|
30970
31439
|
*/
|
|
30971
31440
|
export class HostingGitApi extends BaseAPI {
|
|
30972
31441
|
/**
|
|
30973
|
-
*
|
|
31442
|
+
* Removes the Git auto-deployment settings of the website. Files already deployed stay on the website; pushes stop deploying until settings are saved again. Succeeds also when nothing is configured.
|
|
31443
|
+
* @summary Delete Git auto-deployment settings
|
|
31444
|
+
* @param {string} username
|
|
31445
|
+
* @param {string} domain Domain name
|
|
31446
|
+
* @param {*} [options] Override http request option.
|
|
31447
|
+
* @throws {RequiredError}
|
|
31448
|
+
* @memberof HostingGitApi
|
|
31449
|
+
*/
|
|
31450
|
+
public deleteGitAutoDeploymentSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31451
|
+
return HostingGitApiFp(this.configuration).deleteGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31452
|
+
}
|
|
31453
|
+
|
|
31454
|
+
/**
|
|
31455
|
+
* Returns the Git auto-deployment settings of the website: which repository and branch deploy into which directory, and whether pushes trigger a deployment. `is_enabled` false keeps the repository link but ignores pushes. When the website has no auto-deployment configured every field is null. Save settings with `Update Git auto-deployment settings`.
|
|
31456
|
+
* @summary Get Git auto-deployment settings
|
|
31457
|
+
* @param {string} username
|
|
31458
|
+
* @param {string} domain Domain name
|
|
31459
|
+
* @param {*} [options] Override http request option.
|
|
31460
|
+
* @throws {RequiredError}
|
|
31461
|
+
* @memberof HostingGitApi
|
|
31462
|
+
*/
|
|
31463
|
+
public getGitAutoDeploymentSettingsV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
31464
|
+
return HostingGitApiFp(this.configuration).getGitAutoDeploymentSettingsV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
31465
|
+
}
|
|
31466
|
+
|
|
31467
|
+
/**
|
|
31468
|
+
* 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 a branch (`default_branch` or another one) go into `source_options` of `Start Node.js build` or into `Update Git auto-deployment settings`. Returns 404 when the installation does not belong to the customer. Limited to 10 calls per minute per API client (429 above that).
|
|
30974
31469
|
* @summary List Git installation repositories
|
|
30975
31470
|
* @param {string} uuid Git installation UUID from the List Git installations endpoint
|
|
30976
31471
|
* @param {*} [options] Override http request option.
|
|
@@ -30982,7 +31477,7 @@ export class HostingGitApi extends BaseAPI {
|
|
|
30982
31477
|
}
|
|
30983
31478
|
|
|
30984
31479
|
/**
|
|
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
|
|
31480
|
+
* 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, a Git provider (GitHub or GitLab) has to be connected once in hPanel (Websites, Manage, Advanced, Git; or Add Website, Node.js Web App, Import Git Repository); this endpoint then lists the new installation. Use `uuid` as the path parameter of `List Git installation repositories`, and as `installation_uuid` in `Start Node.js build` with `source_type` `git` and in `Update Git auto-deployment settings`.
|
|
30986
31481
|
* @summary List Git installations
|
|
30987
31482
|
* @param {ListGitInstallationsV1ProviderEnum} [provider] Filter by Git provider
|
|
30988
31483
|
* @param {ListGitInstallationsV1StatusEnum} [status] Filter by installation status
|
|
@@ -30993,6 +31488,20 @@ export class HostingGitApi extends BaseAPI {
|
|
|
30993
31488
|
public listGitInstallationsV1(provider?: ListGitInstallationsV1ProviderEnum, status?: ListGitInstallationsV1StatusEnum, options?: RawAxiosRequestConfig) {
|
|
30994
31489
|
return HostingGitApiFp(this.configuration).listGitInstallationsV1(provider, status, options).then((request) => request(this.axios, this.basePath));
|
|
30995
31490
|
}
|
|
31491
|
+
|
|
31492
|
+
/**
|
|
31493
|
+
* Creates or replaces the Git auto-deployment settings of the website: repository, branch, the directory under the document root to deploy into, and `is_enabled`. Send the full set; `is_enabled` defaults to true and `directory` to the document root. `installation_uuid` must be an installation from `List Git installations` that belongs to the same customer as the website. For PHP and static websites, saving with `is_enabled` true deploys the branch right away and every later push to that branch deploys again. For Node.js and Website Builder websites saving does not clone anything. On a Node.js website start the first deploy with `Start Node.js build` using `source_type` `git`; pushes then trigger new builds with the build settings stored for the website.
|
|
31494
|
+
* @summary Update Git auto-deployment settings
|
|
31495
|
+
* @param {string} username
|
|
31496
|
+
* @param {string} domain Domain name
|
|
31497
|
+
* @param {HostingV1GitUpdateGitAutoDeploymentSettingsRequest} hostingV1GitUpdateGitAutoDeploymentSettingsRequest
|
|
31498
|
+
* @param {*} [options] Override http request option.
|
|
31499
|
+
* @throws {RequiredError}
|
|
31500
|
+
* @memberof HostingGitApi
|
|
31501
|
+
*/
|
|
31502
|
+
public updateGitAutoDeploymentSettingsV1(username: string, domain: string, hostingV1GitUpdateGitAutoDeploymentSettingsRequest: HostingV1GitUpdateGitAutoDeploymentSettingsRequest, options?: RawAxiosRequestConfig) {
|
|
31503
|
+
return HostingGitApiFp(this.configuration).updateGitAutoDeploymentSettingsV1(username, domain, hostingV1GitUpdateGitAutoDeploymentSettingsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
31504
|
+
}
|
|
30996
31505
|
}
|
|
30997
31506
|
|
|
30998
31507
|
/**
|
|
@@ -31644,7 +32153,7 @@ export const HostingNodeJSApiAxiosParamCreator = function (configuration?: Confi
|
|
|
31644
32153
|
};
|
|
31645
32154
|
},
|
|
31646
32155
|
/**
|
|
31647
|
-
* Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint.
|
|
32156
|
+
* Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
31648
32157
|
* @summary Start Node.js build
|
|
31649
32158
|
* @param {string} username
|
|
31650
32159
|
* @param {string} domain Domain name
|
|
@@ -31934,7 +32443,7 @@ export const HostingNodeJSApiFp = function(configuration?: Configuration) {
|
|
|
31934
32443
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
31935
32444
|
},
|
|
31936
32445
|
/**
|
|
31937
|
-
* Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint.
|
|
32446
|
+
* Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
31938
32447
|
* @summary Start Node.js build
|
|
31939
32448
|
* @param {string} username
|
|
31940
32449
|
* @param {string} domain Domain name
|
|
@@ -32130,7 +32639,7 @@ export const HostingNodeJSApiFactory = function (configuration?: Configuration,
|
|
|
32130
32639
|
return localVarFp.restartNodeJsApplicationV1(username, domain, options).then((request) => request(axios, basePath));
|
|
32131
32640
|
},
|
|
32132
32641
|
/**
|
|
32133
|
-
* Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint.
|
|
32642
|
+
* Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
32134
32643
|
* @summary Start Node.js build
|
|
32135
32644
|
* @param {string} username
|
|
32136
32645
|
* @param {string} domain Domain name
|
|
@@ -32348,7 +32857,7 @@ export class HostingNodeJSApi extends BaseAPI {
|
|
|
32348
32857
|
}
|
|
32349
32858
|
|
|
32350
32859
|
/**
|
|
32351
|
-
* Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint.
|
|
32860
|
+
* Start a Node.js build process using files already present on the website\'s file storage. WARNING: on success this overwrites the website\'s existing contents and cannot be undone — verify this is intended before calling this endpoint. With `source_type` `archive`, `source_options.archive_path` must point to an existing archive file on the server (relative to the website document root). Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first. To auto-detect build settings from an archive before starting, first call the `Get Node.js Build Settings from Archive` endpoint. With `source_type` `git`, `source_options` carries `owner`, `repository`, `branch` and `installation_uuid`. Take the installation from `List Git installations` and the owner and repository from `List Git installation repositories`; the branch is cloned at its current head. The installation must belong to the same customer as the website. The returned build `uuid` can be used to poll progress and retrieve logs via the `Get Node.js Build Logs` endpoint.
|
|
32352
32861
|
* @summary Start Node.js build
|
|
32353
32862
|
* @param {string} username
|
|
32354
32863
|
* @param {string} domain Domain name
|
|
@@ -33418,6 +33927,370 @@ export class HostingRedirectsApi extends BaseAPI {
|
|
|
33418
33927
|
|
|
33419
33928
|
|
|
33420
33929
|
|
|
33930
|
+
/**
|
|
33931
|
+
* HostingSSLApi - axios parameter creator
|
|
33932
|
+
* @export
|
|
33933
|
+
*/
|
|
33934
|
+
export const HostingSSLApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
33935
|
+
return {
|
|
33936
|
+
/**
|
|
33937
|
+
* Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
|
|
33938
|
+
* @summary Get SSL status
|
|
33939
|
+
* @param {string} username
|
|
33940
|
+
* @param {string} domain Domain name
|
|
33941
|
+
* @param {*} [options] Override http request option.
|
|
33942
|
+
* @throws {RequiredError}
|
|
33943
|
+
*/
|
|
33944
|
+
getSSLStatusV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
33945
|
+
// verify required parameter 'username' is not null or undefined
|
|
33946
|
+
assertParamExists('getSSLStatusV1', 'username', username)
|
|
33947
|
+
// verify required parameter 'domain' is not null or undefined
|
|
33948
|
+
assertParamExists('getSSLStatusV1', 'domain', domain)
|
|
33949
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/status`
|
|
33950
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
33951
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
33952
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
33953
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
33954
|
+
let baseOptions;
|
|
33955
|
+
if (configuration) {
|
|
33956
|
+
baseOptions = configuration.baseOptions;
|
|
33957
|
+
}
|
|
33958
|
+
|
|
33959
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
33960
|
+
const localVarHeaderParameter = {} as any;
|
|
33961
|
+
const localVarQueryParameter = {} as any;
|
|
33962
|
+
|
|
33963
|
+
// authentication apiToken required
|
|
33964
|
+
// http bearer authentication required
|
|
33965
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
33966
|
+
|
|
33967
|
+
|
|
33968
|
+
|
|
33969
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
33970
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
33971
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
33972
|
+
|
|
33973
|
+
return {
|
|
33974
|
+
url: toPathString(localVarUrlObj),
|
|
33975
|
+
options: localVarRequestOptions,
|
|
33976
|
+
};
|
|
33977
|
+
},
|
|
33978
|
+
/**
|
|
33979
|
+
* Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
|
|
33980
|
+
* @summary Install SSL
|
|
33981
|
+
* @param {string} username
|
|
33982
|
+
* @param {string} domain Domain name
|
|
33983
|
+
* @param {*} [options] Override http request option.
|
|
33984
|
+
* @throws {RequiredError}
|
|
33985
|
+
*/
|
|
33986
|
+
installSSLV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
33987
|
+
// verify required parameter 'username' is not null or undefined
|
|
33988
|
+
assertParamExists('installSSLV1', 'username', username)
|
|
33989
|
+
// verify required parameter 'domain' is not null or undefined
|
|
33990
|
+
assertParamExists('installSSLV1', 'domain', domain)
|
|
33991
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/setup`
|
|
33992
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
33993
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
33994
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
33995
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
33996
|
+
let baseOptions;
|
|
33997
|
+
if (configuration) {
|
|
33998
|
+
baseOptions = configuration.baseOptions;
|
|
33999
|
+
}
|
|
34000
|
+
|
|
34001
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
34002
|
+
const localVarHeaderParameter = {} as any;
|
|
34003
|
+
const localVarQueryParameter = {} as any;
|
|
34004
|
+
|
|
34005
|
+
// authentication apiToken required
|
|
34006
|
+
// http bearer authentication required
|
|
34007
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
34008
|
+
|
|
34009
|
+
|
|
34010
|
+
|
|
34011
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
34012
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
34013
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
34014
|
+
|
|
34015
|
+
return {
|
|
34016
|
+
url: toPathString(localVarUrlObj),
|
|
34017
|
+
options: localVarRequestOptions,
|
|
34018
|
+
};
|
|
34019
|
+
},
|
|
34020
|
+
/**
|
|
34021
|
+
* Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
|
|
34022
|
+
* @summary Toggle HTTPS redirect
|
|
34023
|
+
* @param {string} username
|
|
34024
|
+
* @param {string} domain Domain name
|
|
34025
|
+
* @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
|
|
34026
|
+
* @param {*} [options] Override http request option.
|
|
34027
|
+
* @throws {RequiredError}
|
|
34028
|
+
*/
|
|
34029
|
+
toggleHTTPSRedirectV1: async (username: string, domain: string, hostingV1SslToggleHttpsRedirectRequest: HostingV1SslToggleHttpsRedirectRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
34030
|
+
// verify required parameter 'username' is not null or undefined
|
|
34031
|
+
assertParamExists('toggleHTTPSRedirectV1', 'username', username)
|
|
34032
|
+
// verify required parameter 'domain' is not null or undefined
|
|
34033
|
+
assertParamExists('toggleHTTPSRedirectV1', 'domain', domain)
|
|
34034
|
+
// verify required parameter 'hostingV1SslToggleHttpsRedirectRequest' is not null or undefined
|
|
34035
|
+
assertParamExists('toggleHTTPSRedirectV1', 'hostingV1SslToggleHttpsRedirectRequest', hostingV1SslToggleHttpsRedirectRequest)
|
|
34036
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl/https-redirect/toggle`
|
|
34037
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
34038
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
34039
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
34040
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
34041
|
+
let baseOptions;
|
|
34042
|
+
if (configuration) {
|
|
34043
|
+
baseOptions = configuration.baseOptions;
|
|
34044
|
+
}
|
|
34045
|
+
|
|
34046
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
34047
|
+
const localVarHeaderParameter = {} as any;
|
|
34048
|
+
const localVarQueryParameter = {} as any;
|
|
34049
|
+
|
|
34050
|
+
// authentication apiToken required
|
|
34051
|
+
// http bearer authentication required
|
|
34052
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
34053
|
+
|
|
34054
|
+
|
|
34055
|
+
|
|
34056
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
34057
|
+
|
|
34058
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
34059
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
34060
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
34061
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1SslToggleHttpsRedirectRequest, localVarRequestOptions, configuration)
|
|
34062
|
+
|
|
34063
|
+
return {
|
|
34064
|
+
url: toPathString(localVarUrlObj),
|
|
34065
|
+
options: localVarRequestOptions,
|
|
34066
|
+
};
|
|
34067
|
+
},
|
|
34068
|
+
/**
|
|
34069
|
+
* Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
|
|
34070
|
+
* @summary Uninstall SSL
|
|
34071
|
+
* @param {string} username
|
|
34072
|
+
* @param {string} domain Domain name
|
|
34073
|
+
* @param {*} [options] Override http request option.
|
|
34074
|
+
* @throws {RequiredError}
|
|
34075
|
+
*/
|
|
34076
|
+
uninstallSSLV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
34077
|
+
// verify required parameter 'username' is not null or undefined
|
|
34078
|
+
assertParamExists('uninstallSSLV1', 'username', username)
|
|
34079
|
+
// verify required parameter 'domain' is not null or undefined
|
|
34080
|
+
assertParamExists('uninstallSSLV1', 'domain', domain)
|
|
34081
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/ssl`
|
|
34082
|
+
.replace(`{${"username"}}`, encodeURIComponent(String(username)))
|
|
34083
|
+
.replace(`{${"domain"}}`, encodeURIComponent(String(domain)));
|
|
34084
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
34085
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
34086
|
+
let baseOptions;
|
|
34087
|
+
if (configuration) {
|
|
34088
|
+
baseOptions = configuration.baseOptions;
|
|
34089
|
+
}
|
|
34090
|
+
|
|
34091
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
34092
|
+
const localVarHeaderParameter = {} as any;
|
|
34093
|
+
const localVarQueryParameter = {} as any;
|
|
34094
|
+
|
|
34095
|
+
// authentication apiToken required
|
|
34096
|
+
// http bearer authentication required
|
|
34097
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
34098
|
+
|
|
34099
|
+
|
|
34100
|
+
|
|
34101
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
34102
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
34103
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
34104
|
+
|
|
34105
|
+
return {
|
|
34106
|
+
url: toPathString(localVarUrlObj),
|
|
34107
|
+
options: localVarRequestOptions,
|
|
34108
|
+
};
|
|
34109
|
+
},
|
|
34110
|
+
}
|
|
34111
|
+
};
|
|
34112
|
+
|
|
34113
|
+
/**
|
|
34114
|
+
* HostingSSLApi - functional programming interface
|
|
34115
|
+
* @export
|
|
34116
|
+
*/
|
|
34117
|
+
export const HostingSSLApiFp = function(configuration?: Configuration) {
|
|
34118
|
+
const localVarAxiosParamCreator = HostingSSLApiAxiosParamCreator(configuration)
|
|
34119
|
+
return {
|
|
34120
|
+
/**
|
|
34121
|
+
* Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
|
|
34122
|
+
* @summary Get SSL status
|
|
34123
|
+
* @param {string} username
|
|
34124
|
+
* @param {string} domain Domain name
|
|
34125
|
+
* @param {*} [options] Override http request option.
|
|
34126
|
+
* @throws {RequiredError}
|
|
34127
|
+
*/
|
|
34128
|
+
async getSSLStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1SslSslStatusResource>> {
|
|
34129
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSSLStatusV1(username, domain, options);
|
|
34130
|
+
const localVarOperationServerBasePath = operationServerMap['HostingSSLApi.getSSLStatusV1']?.[0]?.url;
|
|
34131
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
34132
|
+
},
|
|
34133
|
+
/**
|
|
34134
|
+
* Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
|
|
34135
|
+
* @summary Install SSL
|
|
34136
|
+
* @param {string} username
|
|
34137
|
+
* @param {string} domain Domain name
|
|
34138
|
+
* @param {*} [options] Override http request option.
|
|
34139
|
+
* @throws {RequiredError}
|
|
34140
|
+
*/
|
|
34141
|
+
async installSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
34142
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.installSSLV1(username, domain, options);
|
|
34143
|
+
const localVarOperationServerBasePath = operationServerMap['HostingSSLApi.installSSLV1']?.[0]?.url;
|
|
34144
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
34145
|
+
},
|
|
34146
|
+
/**
|
|
34147
|
+
* Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
|
|
34148
|
+
* @summary Toggle HTTPS redirect
|
|
34149
|
+
* @param {string} username
|
|
34150
|
+
* @param {string} domain Domain name
|
|
34151
|
+
* @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
|
|
34152
|
+
* @param {*} [options] Override http request option.
|
|
34153
|
+
* @throws {RequiredError}
|
|
34154
|
+
*/
|
|
34155
|
+
async toggleHTTPSRedirectV1(username: string, domain: string, hostingV1SslToggleHttpsRedirectRequest: HostingV1SslToggleHttpsRedirectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
34156
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options);
|
|
34157
|
+
const localVarOperationServerBasePath = operationServerMap['HostingSSLApi.toggleHTTPSRedirectV1']?.[0]?.url;
|
|
34158
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
34159
|
+
},
|
|
34160
|
+
/**
|
|
34161
|
+
* Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
|
|
34162
|
+
* @summary Uninstall SSL
|
|
34163
|
+
* @param {string} username
|
|
34164
|
+
* @param {string} domain Domain name
|
|
34165
|
+
* @param {*} [options] Override http request option.
|
|
34166
|
+
* @throws {RequiredError}
|
|
34167
|
+
*/
|
|
34168
|
+
async uninstallSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
34169
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.uninstallSSLV1(username, domain, options);
|
|
34170
|
+
const localVarOperationServerBasePath = operationServerMap['HostingSSLApi.uninstallSSLV1']?.[0]?.url;
|
|
34171
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
34172
|
+
},
|
|
34173
|
+
}
|
|
34174
|
+
};
|
|
34175
|
+
|
|
34176
|
+
/**
|
|
34177
|
+
* HostingSSLApi - factory interface
|
|
34178
|
+
* @export
|
|
34179
|
+
*/
|
|
34180
|
+
export const HostingSSLApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
34181
|
+
const localVarFp = HostingSSLApiFp(configuration)
|
|
34182
|
+
return {
|
|
34183
|
+
/**
|
|
34184
|
+
* Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
|
|
34185
|
+
* @summary Get SSL status
|
|
34186
|
+
* @param {string} username
|
|
34187
|
+
* @param {string} domain Domain name
|
|
34188
|
+
* @param {*} [options] Override http request option.
|
|
34189
|
+
* @throws {RequiredError}
|
|
34190
|
+
*/
|
|
34191
|
+
getSSLStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1SslSslStatusResource> {
|
|
34192
|
+
return localVarFp.getSSLStatusV1(username, domain, options).then((request) => request(axios, basePath));
|
|
34193
|
+
},
|
|
34194
|
+
/**
|
|
34195
|
+
* Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
|
|
34196
|
+
* @summary Install SSL
|
|
34197
|
+
* @param {string} username
|
|
34198
|
+
* @param {string} domain Domain name
|
|
34199
|
+
* @param {*} [options] Override http request option.
|
|
34200
|
+
* @throws {RequiredError}
|
|
34201
|
+
*/
|
|
34202
|
+
installSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
34203
|
+
return localVarFp.installSSLV1(username, domain, options).then((request) => request(axios, basePath));
|
|
34204
|
+
},
|
|
34205
|
+
/**
|
|
34206
|
+
* Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
|
|
34207
|
+
* @summary Toggle HTTPS redirect
|
|
34208
|
+
* @param {string} username
|
|
34209
|
+
* @param {string} domain Domain name
|
|
34210
|
+
* @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
|
|
34211
|
+
* @param {*} [options] Override http request option.
|
|
34212
|
+
* @throws {RequiredError}
|
|
34213
|
+
*/
|
|
34214
|
+
toggleHTTPSRedirectV1(username: string, domain: string, hostingV1SslToggleHttpsRedirectRequest: HostingV1SslToggleHttpsRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
34215
|
+
return localVarFp.toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options).then((request) => request(axios, basePath));
|
|
34216
|
+
},
|
|
34217
|
+
/**
|
|
34218
|
+
* Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
|
|
34219
|
+
* @summary Uninstall SSL
|
|
34220
|
+
* @param {string} username
|
|
34221
|
+
* @param {string} domain Domain name
|
|
34222
|
+
* @param {*} [options] Override http request option.
|
|
34223
|
+
* @throws {RequiredError}
|
|
34224
|
+
*/
|
|
34225
|
+
uninstallSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
34226
|
+
return localVarFp.uninstallSSLV1(username, domain, options).then((request) => request(axios, basePath));
|
|
34227
|
+
},
|
|
34228
|
+
};
|
|
34229
|
+
};
|
|
34230
|
+
|
|
34231
|
+
/**
|
|
34232
|
+
* HostingSSLApi - object-oriented interface
|
|
34233
|
+
* @export
|
|
34234
|
+
* @class HostingSSLApi
|
|
34235
|
+
* @extends {BaseAPI}
|
|
34236
|
+
*/
|
|
34237
|
+
export class HostingSSLApi extends BaseAPI {
|
|
34238
|
+
/**
|
|
34239
|
+
* Returns the SSL state of the website: the certificate `status` and `provider`, whether the certificate is a lifetime one managed by the platform, whether HTTP requests are redirected to HTTPS, when the certificate stops being valid and the last installation error. `installing` and `waiting_for_retry` mean an installation is in progress. `failed` means the last installation gave up, or the website was not updated for 60 minutes while `installing`; `last_error` holds the reason when it is a known message, otherwise it is null. `expired` means the assigned certificate\'s validity has ended. `not_installed` means no certificate is assigned. Free subdomains use a platform-managed certificate: with no installation recorded they report `active` with `provider` and `expires_at` null.
|
|
34240
|
+
* @summary Get SSL status
|
|
34241
|
+
* @param {string} username
|
|
34242
|
+
* @param {string} domain Domain name
|
|
34243
|
+
* @param {*} [options] Override http request option.
|
|
34244
|
+
* @throws {RequiredError}
|
|
34245
|
+
* @memberof HostingSSLApi
|
|
34246
|
+
*/
|
|
34247
|
+
public getSSLStatusV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
34248
|
+
return HostingSSLApiFp(this.configuration).getSSLStatusV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
34249
|
+
}
|
|
34250
|
+
|
|
34251
|
+
/**
|
|
34252
|
+
* Requests a lifetime SSL certificate for the website. The installation runs in the background; `Get SSL status` reports `active` or `failed` when it ends. An `active` lifetime certificate does not block the request: a new installation is requested, which is how a certificate is reinstalled. Returns 422 for free subdomains (their certificate is managed by the platform), while an installation is `installing` or `waiting_for_retry`, when the website\'s certificate was revoked (it cannot be reissued), and when an uploaded custom certificate is installed; that one has to be uninstalled first.
|
|
34253
|
+
* @summary Install SSL
|
|
34254
|
+
* @param {string} username
|
|
34255
|
+
* @param {string} domain Domain name
|
|
34256
|
+
* @param {*} [options] Override http request option.
|
|
34257
|
+
* @throws {RequiredError}
|
|
34258
|
+
* @memberof HostingSSLApi
|
|
34259
|
+
*/
|
|
34260
|
+
public installSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
34261
|
+
return HostingSSLApiFp(this.configuration).installSSLV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
34262
|
+
}
|
|
34263
|
+
|
|
34264
|
+
/**
|
|
34265
|
+
* Turns the HTTP to HTTPS redirect of the website on or off, based on `is_enabled`. Does nothing when the redirect is already in the requested state. Turning it on requires an installed certificate (`status` `active` or `expired` on `Get SSL status`) and returns 422 when there is none; turning it off is always accepted.
|
|
34266
|
+
* @summary Toggle HTTPS redirect
|
|
34267
|
+
* @param {string} username
|
|
34268
|
+
* @param {string} domain Domain name
|
|
34269
|
+
* @param {HostingV1SslToggleHttpsRedirectRequest} hostingV1SslToggleHttpsRedirectRequest
|
|
34270
|
+
* @param {*} [options] Override http request option.
|
|
34271
|
+
* @throws {RequiredError}
|
|
34272
|
+
* @memberof HostingSSLApi
|
|
34273
|
+
*/
|
|
34274
|
+
public toggleHTTPSRedirectV1(username: string, domain: string, hostingV1SslToggleHttpsRedirectRequest: HostingV1SslToggleHttpsRedirectRequest, options?: RawAxiosRequestConfig) {
|
|
34275
|
+
return HostingSSLApiFp(this.configuration).toggleHTTPSRedirectV1(username, domain, hostingV1SslToggleHttpsRedirectRequest, options).then((request) => request(this.axios, this.basePath));
|
|
34276
|
+
}
|
|
34277
|
+
|
|
34278
|
+
/**
|
|
34279
|
+
* Removes the SSL certificate assigned to the website, turns the HTTPS redirect off and cancels a pending installation retry. The website serves plain HTTP until a new installation completes. `Get SSL status` reports `not_installed` as soon as the call returns; the call also succeeds when no certificate is assigned, so repeating it is safe. Returns 422 for free subdomains (their certificate is managed by the platform) and while an installation is `installing`.
|
|
34280
|
+
* @summary Uninstall SSL
|
|
34281
|
+
* @param {string} username
|
|
34282
|
+
* @param {string} domain Domain name
|
|
34283
|
+
* @param {*} [options] Override http request option.
|
|
34284
|
+
* @throws {RequiredError}
|
|
34285
|
+
* @memberof HostingSSLApi
|
|
34286
|
+
*/
|
|
34287
|
+
public uninstallSSLV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
34288
|
+
return HostingSSLApiFp(this.configuration).uninstallSSLV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
34289
|
+
}
|
|
34290
|
+
}
|
|
34291
|
+
|
|
34292
|
+
|
|
34293
|
+
|
|
33421
34294
|
/**
|
|
33422
34295
|
* HostingWebsitesApi - axios parameter creator
|
|
33423
34296
|
* @export
|