hostinger-api-sdk 2.13.2 → 2.14.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 +2 -2
- package/api.ts +729 -24
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +494 -24
- package/dist/api.js +481 -33
- 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 +494 -24
- package/dist/esm/api.js +465 -21
- 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/HostingPocketBaseApi.md +311 -0
- package/docs/HostingV1OnboardingsStartOnboardingRequest.md +1 -1
- package/docs/HostingV1PocketBaseBackendCreatedResource.md +36 -0
- package/docs/HostingV1PocketBaseBackendResource.md +32 -0
- package/docs/HostingV1PocketBaseCreateBackendRequest.md +22 -0
- package/docs/HostingV1PocketBaseInstanceResource.md +32 -0
- package/docs/HostingV1PocketBaseSuperuserResource.md +24 -0
- package/docs/HostingV1PocketBaseUpdateSuperuserRequest.md +22 -0
- package/docs/HostingWebsitesApi.md +1 -1
- package/docs/MailAPITokensApi.md +3 -3
- package/docs/MailV1ApiTokensApiTokenCreatedResource.md +1 -1
- package/docs/WordPressInstallationsApi.md +1 -1
- package/docs/WordPressV1InstallationsInstallWordPressRequest.md +1 -1
- 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: 2.
|
|
6
|
+
* API Version: 2.14.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
|
|
@@ -10019,7 +10019,7 @@ export type HostingV1OnboardingsOnboardingResourceStatusEnum = typeof HostingV1O
|
|
|
10019
10019
|
*/
|
|
10020
10020
|
export interface HostingV1OnboardingsStartOnboardingRequest {
|
|
10021
10021
|
/**
|
|
10022
|
-
* Website type. Omit or `null` for an empty website. `wordpress` installs WordPress in the website root and requires `wordpress`. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory with generated credentials. `headless_empty` installs nothing, so WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless
|
|
10022
|
+
* Website type. Omit or `null` for an empty website. `wordpress` installs WordPress in the website root and requires `wordpress`. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory with generated credentials. `headless_pocketbase` only marks the website as a headless PocketBase website: create the backend afterwards with `Create PocketBase backend` (`POST /api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase`). `headless_empty` installs nothing, so WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`, or a PocketBase backend through the PocketBase endpoint.
|
|
10023
10023
|
* @type {string}
|
|
10024
10024
|
* @memberof HostingV1OnboardingsStartOnboardingRequest
|
|
10025
10025
|
*/
|
|
@@ -10329,6 +10329,270 @@ export interface HostingV1PhpUpdatePhpVersionRequest {
|
|
|
10329
10329
|
*/
|
|
10330
10330
|
'version': string;
|
|
10331
10331
|
}
|
|
10332
|
+
/**
|
|
10333
|
+
*
|
|
10334
|
+
* @export
|
|
10335
|
+
* @interface HostingV1PocketBaseBackendCreatedResource
|
|
10336
|
+
*/
|
|
10337
|
+
export interface HostingV1PocketBaseBackendCreatedResource {
|
|
10338
|
+
/**
|
|
10339
|
+
* PocketBase instance ID
|
|
10340
|
+
* @type {string}
|
|
10341
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10342
|
+
*/
|
|
10343
|
+
'instance_id': string;
|
|
10344
|
+
/**
|
|
10345
|
+
* Website domain that serves the PocketBase API
|
|
10346
|
+
* @type {string}
|
|
10347
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10348
|
+
*/
|
|
10349
|
+
'domain': string;
|
|
10350
|
+
/**
|
|
10351
|
+
* Base URL of the PocketBase REST API
|
|
10352
|
+
* @type {string}
|
|
10353
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10354
|
+
*/
|
|
10355
|
+
'api_url': string;
|
|
10356
|
+
/**
|
|
10357
|
+
* URL of the PocketBase dashboard
|
|
10358
|
+
* @type {string}
|
|
10359
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10360
|
+
*/
|
|
10361
|
+
'admin_url': string;
|
|
10362
|
+
/**
|
|
10363
|
+
* Email of the superuser set up when the backend was created
|
|
10364
|
+
* @type {string}
|
|
10365
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10366
|
+
*/
|
|
10367
|
+
'superuser_email': string | null;
|
|
10368
|
+
/**
|
|
10369
|
+
* Password of that superuser, generated when the request had none. Returned only here: Hostinger does not store it, so save it right away.
|
|
10370
|
+
* @type {string}
|
|
10371
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10372
|
+
*/
|
|
10373
|
+
'superuser_password': string | null;
|
|
10374
|
+
/**
|
|
10375
|
+
* Live process state. The instance sleeps when idle and wakes on the first request. Usually null right after creation.
|
|
10376
|
+
* @type {string}
|
|
10377
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10378
|
+
*/
|
|
10379
|
+
'state': HostingV1PocketBaseBackendCreatedResourceStateEnum | null;
|
|
10380
|
+
/**
|
|
10381
|
+
* PocketBase version
|
|
10382
|
+
* @type {string}
|
|
10383
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10384
|
+
*/
|
|
10385
|
+
'version': string | null;
|
|
10386
|
+
/**
|
|
10387
|
+
* What to do next with this backend
|
|
10388
|
+
* @type {Array<string>}
|
|
10389
|
+
* @memberof HostingV1PocketBaseBackendCreatedResource
|
|
10390
|
+
*/
|
|
10391
|
+
'next_steps': Array<string>;
|
|
10392
|
+
}
|
|
10393
|
+
|
|
10394
|
+
export const HostingV1PocketBaseBackendCreatedResourceStateEnum = {
|
|
10395
|
+
Asleep: 'asleep',
|
|
10396
|
+
Starting: 'starting',
|
|
10397
|
+
Running: 'running',
|
|
10398
|
+
Stopping: 'stopping',
|
|
10399
|
+
Failed: 'failed',
|
|
10400
|
+
Unregistered: 'unregistered',
|
|
10401
|
+
Unknown: 'unknown',
|
|
10402
|
+
Missing: 'missing'
|
|
10403
|
+
} as const;
|
|
10404
|
+
|
|
10405
|
+
export type HostingV1PocketBaseBackendCreatedResourceStateEnum = typeof HostingV1PocketBaseBackendCreatedResourceStateEnum[keyof typeof HostingV1PocketBaseBackendCreatedResourceStateEnum];
|
|
10406
|
+
|
|
10407
|
+
/**
|
|
10408
|
+
*
|
|
10409
|
+
* @export
|
|
10410
|
+
* @interface HostingV1PocketBaseBackendResource
|
|
10411
|
+
*/
|
|
10412
|
+
export interface HostingV1PocketBaseBackendResource {
|
|
10413
|
+
/**
|
|
10414
|
+
* PocketBase instance ID
|
|
10415
|
+
* @type {string}
|
|
10416
|
+
* @memberof HostingV1PocketBaseBackendResource
|
|
10417
|
+
*/
|
|
10418
|
+
'instance_id': string;
|
|
10419
|
+
/**
|
|
10420
|
+
* Website domain that serves the PocketBase API
|
|
10421
|
+
* @type {string}
|
|
10422
|
+
* @memberof HostingV1PocketBaseBackendResource
|
|
10423
|
+
*/
|
|
10424
|
+
'domain': string;
|
|
10425
|
+
/**
|
|
10426
|
+
* Base URL of the PocketBase REST API
|
|
10427
|
+
* @type {string}
|
|
10428
|
+
* @memberof HostingV1PocketBaseBackendResource
|
|
10429
|
+
*/
|
|
10430
|
+
'api_url': string;
|
|
10431
|
+
/**
|
|
10432
|
+
* URL of the PocketBase dashboard
|
|
10433
|
+
* @type {string}
|
|
10434
|
+
* @memberof HostingV1PocketBaseBackendResource
|
|
10435
|
+
*/
|
|
10436
|
+
'admin_url': string;
|
|
10437
|
+
/**
|
|
10438
|
+
* Live process state. The instance sleeps when idle and wakes on the first request. Null when the server could not be reached.
|
|
10439
|
+
* @type {string}
|
|
10440
|
+
* @memberof HostingV1PocketBaseBackendResource
|
|
10441
|
+
*/
|
|
10442
|
+
'state': HostingV1PocketBaseBackendResourceStateEnum | null;
|
|
10443
|
+
/**
|
|
10444
|
+
* PocketBase version
|
|
10445
|
+
* @type {string}
|
|
10446
|
+
* @memberof HostingV1PocketBaseBackendResource
|
|
10447
|
+
*/
|
|
10448
|
+
'version': string | null;
|
|
10449
|
+
/**
|
|
10450
|
+
* What to do next with this backend
|
|
10451
|
+
* @type {Array<string>}
|
|
10452
|
+
* @memberof HostingV1PocketBaseBackendResource
|
|
10453
|
+
*/
|
|
10454
|
+
'next_steps': Array<string>;
|
|
10455
|
+
}
|
|
10456
|
+
|
|
10457
|
+
export const HostingV1PocketBaseBackendResourceStateEnum = {
|
|
10458
|
+
Asleep: 'asleep',
|
|
10459
|
+
Starting: 'starting',
|
|
10460
|
+
Running: 'running',
|
|
10461
|
+
Stopping: 'stopping',
|
|
10462
|
+
Failed: 'failed',
|
|
10463
|
+
Unregistered: 'unregistered',
|
|
10464
|
+
Unknown: 'unknown',
|
|
10465
|
+
Missing: 'missing'
|
|
10466
|
+
} as const;
|
|
10467
|
+
|
|
10468
|
+
export type HostingV1PocketBaseBackendResourceStateEnum = typeof HostingV1PocketBaseBackendResourceStateEnum[keyof typeof HostingV1PocketBaseBackendResourceStateEnum];
|
|
10469
|
+
|
|
10470
|
+
/**
|
|
10471
|
+
*
|
|
10472
|
+
* @export
|
|
10473
|
+
* @interface HostingV1PocketBaseCreateBackendRequest
|
|
10474
|
+
*/
|
|
10475
|
+
export interface HostingV1PocketBaseCreateBackendRequest {
|
|
10476
|
+
/**
|
|
10477
|
+
* Email of the PocketBase superuser. Defaults to the email of the website owner.
|
|
10478
|
+
* @type {string}
|
|
10479
|
+
* @memberof HostingV1PocketBaseCreateBackendRequest
|
|
10480
|
+
*/
|
|
10481
|
+
'superuser_email': string | null;
|
|
10482
|
+
/**
|
|
10483
|
+
* Password for the PocketBase superuser, 10-128 characters. Leave it out to have a strong one generated. Either way it is returned once in the response and never stored.
|
|
10484
|
+
* @type {string}
|
|
10485
|
+
* @memberof HostingV1PocketBaseCreateBackendRequest
|
|
10486
|
+
*/
|
|
10487
|
+
'superuser_password': string | null;
|
|
10488
|
+
}
|
|
10489
|
+
/**
|
|
10490
|
+
*
|
|
10491
|
+
* @export
|
|
10492
|
+
* @interface HostingV1PocketBaseInstanceResource
|
|
10493
|
+
*/
|
|
10494
|
+
export interface HostingV1PocketBaseInstanceResource {
|
|
10495
|
+
/**
|
|
10496
|
+
* PocketBase instance ID
|
|
10497
|
+
* @type {string}
|
|
10498
|
+
* @memberof HostingV1PocketBaseInstanceResource
|
|
10499
|
+
*/
|
|
10500
|
+
'instance_id': string;
|
|
10501
|
+
/**
|
|
10502
|
+
* Website domain that serves the PocketBase API
|
|
10503
|
+
* @type {string}
|
|
10504
|
+
* @memberof HostingV1PocketBaseInstanceResource
|
|
10505
|
+
*/
|
|
10506
|
+
'domain': string;
|
|
10507
|
+
/**
|
|
10508
|
+
* Base URL of the PocketBase REST API
|
|
10509
|
+
* @type {string}
|
|
10510
|
+
* @memberof HostingV1PocketBaseInstanceResource
|
|
10511
|
+
*/
|
|
10512
|
+
'api_url': string;
|
|
10513
|
+
/**
|
|
10514
|
+
* URL of the PocketBase dashboard
|
|
10515
|
+
* @type {string}
|
|
10516
|
+
* @memberof HostingV1PocketBaseInstanceResource
|
|
10517
|
+
*/
|
|
10518
|
+
'admin_url': string;
|
|
10519
|
+
/**
|
|
10520
|
+
* Live process state. The instance sleeps when idle and wakes on the first request. Null when the server could not be reached.
|
|
10521
|
+
* @type {string}
|
|
10522
|
+
* @memberof HostingV1PocketBaseInstanceResource
|
|
10523
|
+
*/
|
|
10524
|
+
'state': HostingV1PocketBaseInstanceResourceStateEnum | null;
|
|
10525
|
+
/**
|
|
10526
|
+
* PocketBase version
|
|
10527
|
+
* @type {string}
|
|
10528
|
+
* @memberof HostingV1PocketBaseInstanceResource
|
|
10529
|
+
*/
|
|
10530
|
+
'version': string | null;
|
|
10531
|
+
/**
|
|
10532
|
+
* Disk space used by the instance data, in KB
|
|
10533
|
+
* @type {number}
|
|
10534
|
+
* @memberof HostingV1PocketBaseInstanceResource
|
|
10535
|
+
*/
|
|
10536
|
+
'disk_usage_kb': number | null;
|
|
10537
|
+
}
|
|
10538
|
+
|
|
10539
|
+
export const HostingV1PocketBaseInstanceResourceStateEnum = {
|
|
10540
|
+
Asleep: 'asleep',
|
|
10541
|
+
Starting: 'starting',
|
|
10542
|
+
Running: 'running',
|
|
10543
|
+
Stopping: 'stopping',
|
|
10544
|
+
Failed: 'failed',
|
|
10545
|
+
Unregistered: 'unregistered',
|
|
10546
|
+
Unknown: 'unknown',
|
|
10547
|
+
Missing: 'missing'
|
|
10548
|
+
} as const;
|
|
10549
|
+
|
|
10550
|
+
export type HostingV1PocketBaseInstanceResourceStateEnum = typeof HostingV1PocketBaseInstanceResourceStateEnum[keyof typeof HostingV1PocketBaseInstanceResourceStateEnum];
|
|
10551
|
+
|
|
10552
|
+
/**
|
|
10553
|
+
*
|
|
10554
|
+
* @export
|
|
10555
|
+
* @interface HostingV1PocketBaseSuperuserResource
|
|
10556
|
+
*/
|
|
10557
|
+
export interface HostingV1PocketBaseSuperuserResource {
|
|
10558
|
+
/**
|
|
10559
|
+
* Website domain that serves the PocketBase API
|
|
10560
|
+
* @type {string}
|
|
10561
|
+
* @memberof HostingV1PocketBaseSuperuserResource
|
|
10562
|
+
*/
|
|
10563
|
+
'domain': string;
|
|
10564
|
+
/**
|
|
10565
|
+
* Email of the superuser that was created or got the new password
|
|
10566
|
+
* @type {string}
|
|
10567
|
+
* @memberof HostingV1PocketBaseSuperuserResource
|
|
10568
|
+
*/
|
|
10569
|
+
'superuser_email': string;
|
|
10570
|
+
/**
|
|
10571
|
+
* The new password of that superuser, generated when the request had none. Hostinger does not store it and will not show it again, so save it right away.
|
|
10572
|
+
* @type {string}
|
|
10573
|
+
* @memberof HostingV1PocketBaseSuperuserResource
|
|
10574
|
+
*/
|
|
10575
|
+
'superuser_password': string;
|
|
10576
|
+
}
|
|
10577
|
+
/**
|
|
10578
|
+
*
|
|
10579
|
+
* @export
|
|
10580
|
+
* @interface HostingV1PocketBaseUpdateSuperuserRequest
|
|
10581
|
+
*/
|
|
10582
|
+
export interface HostingV1PocketBaseUpdateSuperuserRequest {
|
|
10583
|
+
/**
|
|
10584
|
+
* Email of the superuser to create or update. Defaults to the email of the website owner.
|
|
10585
|
+
* @type {string}
|
|
10586
|
+
* @memberof HostingV1PocketBaseUpdateSuperuserRequest
|
|
10587
|
+
*/
|
|
10588
|
+
'superuser_email': string | null;
|
|
10589
|
+
/**
|
|
10590
|
+
* New password of the PocketBase superuser, 10-128 characters. Leave it out to have a strong one generated. Either way it is returned once in the response and never stored.
|
|
10591
|
+
* @type {string}
|
|
10592
|
+
* @memberof HostingV1PocketBaseUpdateSuperuserRequest
|
|
10593
|
+
*/
|
|
10594
|
+
'superuser_password': string | null;
|
|
10595
|
+
}
|
|
10332
10596
|
/**
|
|
10333
10597
|
*
|
|
10334
10598
|
* @export
|
|
@@ -11043,7 +11307,7 @@ export interface MailV1ApiTokensApiTokenCreatedResource {
|
|
|
11043
11307
|
*/
|
|
11044
11308
|
'id': string;
|
|
11045
11309
|
/**
|
|
11046
|
-
* Plaintext API token, returned only in this response. Grants access to the [Hostinger
|
|
11310
|
+
* Plaintext API token, returned only in this response. Grants access to the mailboxes it is scoped to through the [Hostinger Mail API](https://api.mail.hostinger.com/).
|
|
11047
11311
|
* @type {string}
|
|
11048
11312
|
* @memberof MailV1ApiTokensApiTokenCreatedResource
|
|
11049
11313
|
*/
|
|
@@ -18344,7 +18608,7 @@ export interface WordPressV1InstallationsInstallWordPressRequest {
|
|
|
18344
18608
|
*/
|
|
18345
18609
|
'language': string | null;
|
|
18346
18610
|
/**
|
|
18347
|
-
* Installation kind; `default` when omitted. `headless` installs WordPress into the `cms` directory with the Hostinger headless MU plugin and marks the website as a headless WordPress website. Accepted only for
|
|
18611
|
+
* Installation kind; `default` when omitted. `headless` installs WordPress into the `cms` directory with the Hostinger headless MU plugin and marks the website as a headless WordPress website. Accepted only for an empty headless website, e.g. one created by `POST /api/hosting/v1/orders/{order_id}/onboardings` (`hosting_websites_create`) with `type: headless_empty`; any other website, including a headless website that already has WordPress or a PocketBase backend, is rejected with 422.
|
|
18348
18612
|
* @type {string}
|
|
18349
18613
|
* @memberof WordPressV1InstallationsInstallWordPressRequest
|
|
18350
18614
|
*/
|
|
@@ -38296,6 +38560,447 @@ export class HostingPHPApi extends BaseAPI {
|
|
|
38296
38560
|
|
|
38297
38561
|
|
|
38298
38562
|
|
|
38563
|
+
/**
|
|
38564
|
+
* HostingPocketBaseApi - axios parameter creator
|
|
38565
|
+
* @export
|
|
38566
|
+
*/
|
|
38567
|
+
export const HostingPocketBaseApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
38568
|
+
return {
|
|
38569
|
+
/**
|
|
38570
|
+
* Creates a PocketBase backend for a website: a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. A website has at most one PocketBase backend. Creation usually takes a few seconds. The backend takes over the `/api` and `/_` paths of the website: from then on requests to these paths and everything below them go to PocketBase, while every other path keeps serving the website. Do not create a backend for a website that serves its own `/api` or `/_` paths, because they stop working; confirm with the user before calling it. Deleting the backend gives both paths back to the website. Headless WordPress websites and parked domains are not supported; for a parked domain, use the website it is parked on. A website that already has a backend is rejected with 422, unless that backend is in state `missing`: then it is replaced with a new, empty one. A website set up with `type: headless_empty` becomes `headless_pocketbase`; any other website keeps its type. `superuser_password` is optional: leave it out to get a strong generated password, or send your own (10-128 characters). The response returns it in `superuser_password` once and Hostinger never stores it, so save it in your app secrets right away; you need it to manage the backend through the PocketBase REST API. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. `superuser_email` defaults to the email of the website owner. The instance sleeps when idle and wakes on the first request, so the first call after a quiet period can take a few seconds. `next_steps` in the response lists what to do next. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38571
|
+
* @summary Create PocketBase backend
|
|
38572
|
+
* @param {string} username
|
|
38573
|
+
* @param {string} domain Domain name
|
|
38574
|
+
* @param {HostingV1PocketBaseCreateBackendRequest} [hostingV1PocketBaseCreateBackendRequest]
|
|
38575
|
+
* @param {*} [options] Override http request option.
|
|
38576
|
+
* @throws {RequiredError}
|
|
38577
|
+
*/
|
|
38578
|
+
createPocketBaseBackendV1: async (username: string, domain: string, hostingV1PocketBaseCreateBackendRequest?: HostingV1PocketBaseCreateBackendRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38579
|
+
// verify required parameter 'username' is not null or undefined
|
|
38580
|
+
assertParamExists('createPocketBaseBackendV1', 'username', username)
|
|
38581
|
+
// verify required parameter 'domain' is not null or undefined
|
|
38582
|
+
assertParamExists('createPocketBaseBackendV1', 'domain', domain)
|
|
38583
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase`
|
|
38584
|
+
.replace(`{${"username"}}`, encodePathParam('username', username))
|
|
38585
|
+
.replace(`{${"domain"}}`, encodePathParam('domain', domain));
|
|
38586
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
38587
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
38588
|
+
let baseOptions;
|
|
38589
|
+
if (configuration) {
|
|
38590
|
+
baseOptions = configuration.baseOptions;
|
|
38591
|
+
}
|
|
38592
|
+
|
|
38593
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
38594
|
+
const localVarHeaderParameter = {} as any;
|
|
38595
|
+
const localVarQueryParameter = {} as any;
|
|
38596
|
+
|
|
38597
|
+
// authentication apiToken required
|
|
38598
|
+
// http bearer authentication required
|
|
38599
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
38600
|
+
|
|
38601
|
+
|
|
38602
|
+
|
|
38603
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
38604
|
+
|
|
38605
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
38606
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
38607
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
38608
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1PocketBaseCreateBackendRequest, localVarRequestOptions, configuration)
|
|
38609
|
+
|
|
38610
|
+
return {
|
|
38611
|
+
url: toPathString(localVarUrlObj),
|
|
38612
|
+
options: localVarRequestOptions,
|
|
38613
|
+
};
|
|
38614
|
+
},
|
|
38615
|
+
/**
|
|
38616
|
+
* Permanently deletes the PocketBase backend of a website with all its data (collections, records, users and uploaded files) and gives the `/api` and `/_` paths back to the website; a `headless_pocketbase` website becomes `headless_empty`. This cannot be undone and every app using this backend stops working, so confirm with the user before calling it and export the data you need from the dashboard (`admin_url`) first. Returns success also when the website has no PocketBase backend; then it only clears a `headless_pocketbase` mark. To regain access after losing the superuser password, use the `Set PocketBase superuser` endpoint instead of deleting the backend. PocketBase is rolling out gradually: an account without access yet gets 422; an unknown website gets 404.
|
|
38617
|
+
* @summary Delete PocketBase backend
|
|
38618
|
+
* @param {string} username
|
|
38619
|
+
* @param {string} domain Domain name
|
|
38620
|
+
* @param {*} [options] Override http request option.
|
|
38621
|
+
* @throws {RequiredError}
|
|
38622
|
+
*/
|
|
38623
|
+
deletePocketBaseBackendV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38624
|
+
// verify required parameter 'username' is not null or undefined
|
|
38625
|
+
assertParamExists('deletePocketBaseBackendV1', 'username', username)
|
|
38626
|
+
// verify required parameter 'domain' is not null or undefined
|
|
38627
|
+
assertParamExists('deletePocketBaseBackendV1', 'domain', domain)
|
|
38628
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase`
|
|
38629
|
+
.replace(`{${"username"}}`, encodePathParam('username', username))
|
|
38630
|
+
.replace(`{${"domain"}}`, encodePathParam('domain', domain));
|
|
38631
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
38632
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
38633
|
+
let baseOptions;
|
|
38634
|
+
if (configuration) {
|
|
38635
|
+
baseOptions = configuration.baseOptions;
|
|
38636
|
+
}
|
|
38637
|
+
|
|
38638
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
38639
|
+
const localVarHeaderParameter = {} as any;
|
|
38640
|
+
const localVarQueryParameter = {} as any;
|
|
38641
|
+
|
|
38642
|
+
// authentication apiToken required
|
|
38643
|
+
// http bearer authentication required
|
|
38644
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
38645
|
+
|
|
38646
|
+
|
|
38647
|
+
|
|
38648
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
38649
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
38650
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
38651
|
+
|
|
38652
|
+
return {
|
|
38653
|
+
url: toPathString(localVarUrlObj),
|
|
38654
|
+
options: localVarRequestOptions,
|
|
38655
|
+
};
|
|
38656
|
+
},
|
|
38657
|
+
/**
|
|
38658
|
+
* Returns the PocketBase backend of a website: its REST API and dashboard URLs, live state and version. A PocketBase backend gives the website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain under `/api` and `/_`. Returns 404 when the website has no PocketBase backend. The superuser password is only shown once, when it is set, and is never returned here. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. The instance sleeps when idle and wakes on the first request, so `asleep` is a normal state and the first call to a sleeping instance can take a few seconds. `starting`, `running` and `stopping` are healthy; `failed` or `unregistered` mean the instance is broken; `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38659
|
+
* @summary Get PocketBase backend
|
|
38660
|
+
* @param {string} username
|
|
38661
|
+
* @param {string} domain Domain name
|
|
38662
|
+
* @param {*} [options] Override http request option.
|
|
38663
|
+
* @throws {RequiredError}
|
|
38664
|
+
*/
|
|
38665
|
+
getPocketBaseBackendV1: async (username: string, domain: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38666
|
+
// verify required parameter 'username' is not null or undefined
|
|
38667
|
+
assertParamExists('getPocketBaseBackendV1', 'username', username)
|
|
38668
|
+
// verify required parameter 'domain' is not null or undefined
|
|
38669
|
+
assertParamExists('getPocketBaseBackendV1', 'domain', domain)
|
|
38670
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase`
|
|
38671
|
+
.replace(`{${"username"}}`, encodePathParam('username', username))
|
|
38672
|
+
.replace(`{${"domain"}}`, encodePathParam('domain', domain));
|
|
38673
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
38674
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
38675
|
+
let baseOptions;
|
|
38676
|
+
if (configuration) {
|
|
38677
|
+
baseOptions = configuration.baseOptions;
|
|
38678
|
+
}
|
|
38679
|
+
|
|
38680
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
38681
|
+
const localVarHeaderParameter = {} as any;
|
|
38682
|
+
const localVarQueryParameter = {} as any;
|
|
38683
|
+
|
|
38684
|
+
// authentication apiToken required
|
|
38685
|
+
// http bearer authentication required
|
|
38686
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
38687
|
+
|
|
38688
|
+
|
|
38689
|
+
|
|
38690
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
38691
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
38692
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
38693
|
+
|
|
38694
|
+
return {
|
|
38695
|
+
url: toPathString(localVarUrlObj),
|
|
38696
|
+
options: localVarRequestOptions,
|
|
38697
|
+
};
|
|
38698
|
+
},
|
|
38699
|
+
/**
|
|
38700
|
+
* Lists the PocketBase backends of all websites of a hosting account with their URLs, live state, version and disk usage. A PocketBase backend gives a website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. An empty list means no website of the account has a PocketBase backend. States: `asleep` is normal (the instance sleeps when idle and wakes on the first request); `starting`, `running` and `stopping` are healthy; `failed` or `unregistered` mean the instance is broken; `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38701
|
+
* @summary List account PocketBase backends
|
|
38702
|
+
* @param {string} username
|
|
38703
|
+
* @param {*} [options] Override http request option.
|
|
38704
|
+
* @throws {RequiredError}
|
|
38705
|
+
*/
|
|
38706
|
+
listAccountPocketBaseBackendsV1: async (username: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38707
|
+
// verify required parameter 'username' is not null or undefined
|
|
38708
|
+
assertParamExists('listAccountPocketBaseBackendsV1', 'username', username)
|
|
38709
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/pocketbase`
|
|
38710
|
+
.replace(`{${"username"}}`, encodePathParam('username', username));
|
|
38711
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
38712
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
38713
|
+
let baseOptions;
|
|
38714
|
+
if (configuration) {
|
|
38715
|
+
baseOptions = configuration.baseOptions;
|
|
38716
|
+
}
|
|
38717
|
+
|
|
38718
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
38719
|
+
const localVarHeaderParameter = {} as any;
|
|
38720
|
+
const localVarQueryParameter = {} as any;
|
|
38721
|
+
|
|
38722
|
+
// authentication apiToken required
|
|
38723
|
+
// http bearer authentication required
|
|
38724
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
38725
|
+
|
|
38726
|
+
|
|
38727
|
+
|
|
38728
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
38729
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
38730
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
38731
|
+
|
|
38732
|
+
return {
|
|
38733
|
+
url: toPathString(localVarUrlObj),
|
|
38734
|
+
options: localVarRequestOptions,
|
|
38735
|
+
};
|
|
38736
|
+
},
|
|
38737
|
+
/**
|
|
38738
|
+
* Sets the password of a superuser of the website\'s PocketBase backend, and creates that superuser when there is none with the given email. The old password of that superuser stops working at once, so apps and scripts still using it lose superuser access; confirm with the user before calling it. Use it when the superuser password is lost (Hostinger never stores it), when it leaked and must be rotated, or to add another superuser with a different email. Returns 404 when the website has no PocketBase backend; create one first. App user accounts are managed through the PocketBase REST API, not here. `superuser_password` is optional: leave it out to get a strong generated password, or send your own (10-128 characters). The response returns it in `superuser_password` once and Hostinger never stores it, so save it in your app secrets right away, then authenticate again with `pb.collection(\'_superusers\').authWithPassword`. `superuser_email` defaults to the email of the website owner. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38739
|
+
* @summary Set PocketBase superuser
|
|
38740
|
+
* @param {string} username
|
|
38741
|
+
* @param {string} domain Domain name
|
|
38742
|
+
* @param {HostingV1PocketBaseUpdateSuperuserRequest} [hostingV1PocketBaseUpdateSuperuserRequest]
|
|
38743
|
+
* @param {*} [options] Override http request option.
|
|
38744
|
+
* @throws {RequiredError}
|
|
38745
|
+
*/
|
|
38746
|
+
setPocketBaseSuperuserV1: async (username: string, domain: string, hostingV1PocketBaseUpdateSuperuserRequest?: HostingV1PocketBaseUpdateSuperuserRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38747
|
+
// verify required parameter 'username' is not null or undefined
|
|
38748
|
+
assertParamExists('setPocketBaseSuperuserV1', 'username', username)
|
|
38749
|
+
// verify required parameter 'domain' is not null or undefined
|
|
38750
|
+
assertParamExists('setPocketBaseSuperuserV1', 'domain', domain)
|
|
38751
|
+
const localVarPath = `/api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase/superuser`
|
|
38752
|
+
.replace(`{${"username"}}`, encodePathParam('username', username))
|
|
38753
|
+
.replace(`{${"domain"}}`, encodePathParam('domain', domain));
|
|
38754
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
38755
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
38756
|
+
let baseOptions;
|
|
38757
|
+
if (configuration) {
|
|
38758
|
+
baseOptions = configuration.baseOptions;
|
|
38759
|
+
}
|
|
38760
|
+
|
|
38761
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
38762
|
+
const localVarHeaderParameter = {} as any;
|
|
38763
|
+
const localVarQueryParameter = {} as any;
|
|
38764
|
+
|
|
38765
|
+
// authentication apiToken required
|
|
38766
|
+
// http bearer authentication required
|
|
38767
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
38768
|
+
|
|
38769
|
+
|
|
38770
|
+
|
|
38771
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
38772
|
+
|
|
38773
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
38774
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
38775
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
38776
|
+
localVarRequestOptions.data = serializeDataIfNeeded(hostingV1PocketBaseUpdateSuperuserRequest, localVarRequestOptions, configuration)
|
|
38777
|
+
|
|
38778
|
+
return {
|
|
38779
|
+
url: toPathString(localVarUrlObj),
|
|
38780
|
+
options: localVarRequestOptions,
|
|
38781
|
+
};
|
|
38782
|
+
},
|
|
38783
|
+
}
|
|
38784
|
+
};
|
|
38785
|
+
|
|
38786
|
+
/**
|
|
38787
|
+
* HostingPocketBaseApi - functional programming interface
|
|
38788
|
+
* @export
|
|
38789
|
+
*/
|
|
38790
|
+
export const HostingPocketBaseApiFp = function(configuration?: Configuration) {
|
|
38791
|
+
const localVarAxiosParamCreator = HostingPocketBaseApiAxiosParamCreator(configuration)
|
|
38792
|
+
return {
|
|
38793
|
+
/**
|
|
38794
|
+
* Creates a PocketBase backend for a website: a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. A website has at most one PocketBase backend. Creation usually takes a few seconds. The backend takes over the `/api` and `/_` paths of the website: from then on requests to these paths and everything below them go to PocketBase, while every other path keeps serving the website. Do not create a backend for a website that serves its own `/api` or `/_` paths, because they stop working; confirm with the user before calling it. Deleting the backend gives both paths back to the website. Headless WordPress websites and parked domains are not supported; for a parked domain, use the website it is parked on. A website that already has a backend is rejected with 422, unless that backend is in state `missing`: then it is replaced with a new, empty one. A website set up with `type: headless_empty` becomes `headless_pocketbase`; any other website keeps its type. `superuser_password` is optional: leave it out to get a strong generated password, or send your own (10-128 characters). The response returns it in `superuser_password` once and Hostinger never stores it, so save it in your app secrets right away; you need it to manage the backend through the PocketBase REST API. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. `superuser_email` defaults to the email of the website owner. The instance sleeps when idle and wakes on the first request, so the first call after a quiet period can take a few seconds. `next_steps` in the response lists what to do next. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38795
|
+
* @summary Create PocketBase backend
|
|
38796
|
+
* @param {string} username
|
|
38797
|
+
* @param {string} domain Domain name
|
|
38798
|
+
* @param {HostingV1PocketBaseCreateBackendRequest} [hostingV1PocketBaseCreateBackendRequest]
|
|
38799
|
+
* @param {*} [options] Override http request option.
|
|
38800
|
+
* @throws {RequiredError}
|
|
38801
|
+
*/
|
|
38802
|
+
async createPocketBaseBackendV1(username: string, domain: string, hostingV1PocketBaseCreateBackendRequest?: HostingV1PocketBaseCreateBackendRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1PocketBaseBackendCreatedResource>> {
|
|
38803
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createPocketBaseBackendV1(username, domain, hostingV1PocketBaseCreateBackendRequest, options);
|
|
38804
|
+
const localVarOperationServerBasePath = operationServerMap['HostingPocketBaseApi.createPocketBaseBackendV1']?.[0]?.url;
|
|
38805
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
38806
|
+
},
|
|
38807
|
+
/**
|
|
38808
|
+
* Permanently deletes the PocketBase backend of a website with all its data (collections, records, users and uploaded files) and gives the `/api` and `/_` paths back to the website; a `headless_pocketbase` website becomes `headless_empty`. This cannot be undone and every app using this backend stops working, so confirm with the user before calling it and export the data you need from the dashboard (`admin_url`) first. Returns success also when the website has no PocketBase backend; then it only clears a `headless_pocketbase` mark. To regain access after losing the superuser password, use the `Set PocketBase superuser` endpoint instead of deleting the backend. PocketBase is rolling out gradually: an account without access yet gets 422; an unknown website gets 404.
|
|
38809
|
+
* @summary Delete PocketBase backend
|
|
38810
|
+
* @param {string} username
|
|
38811
|
+
* @param {string} domain Domain name
|
|
38812
|
+
* @param {*} [options] Override http request option.
|
|
38813
|
+
* @throws {RequiredError}
|
|
38814
|
+
*/
|
|
38815
|
+
async deletePocketBaseBackendV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CommonSuccessEmptyResource>> {
|
|
38816
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePocketBaseBackendV1(username, domain, options);
|
|
38817
|
+
const localVarOperationServerBasePath = operationServerMap['HostingPocketBaseApi.deletePocketBaseBackendV1']?.[0]?.url;
|
|
38818
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
38819
|
+
},
|
|
38820
|
+
/**
|
|
38821
|
+
* Returns the PocketBase backend of a website: its REST API and dashboard URLs, live state and version. A PocketBase backend gives the website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain under `/api` and `/_`. Returns 404 when the website has no PocketBase backend. The superuser password is only shown once, when it is set, and is never returned here. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. The instance sleeps when idle and wakes on the first request, so `asleep` is a normal state and the first call to a sleeping instance can take a few seconds. `starting`, `running` and `stopping` are healthy; `failed` or `unregistered` mean the instance is broken; `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38822
|
+
* @summary Get PocketBase backend
|
|
38823
|
+
* @param {string} username
|
|
38824
|
+
* @param {string} domain Domain name
|
|
38825
|
+
* @param {*} [options] Override http request option.
|
|
38826
|
+
* @throws {RequiredError}
|
|
38827
|
+
*/
|
|
38828
|
+
async getPocketBaseBackendV1(username: string, domain: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1PocketBaseBackendResource>> {
|
|
38829
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPocketBaseBackendV1(username, domain, options);
|
|
38830
|
+
const localVarOperationServerBasePath = operationServerMap['HostingPocketBaseApi.getPocketBaseBackendV1']?.[0]?.url;
|
|
38831
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
38832
|
+
},
|
|
38833
|
+
/**
|
|
38834
|
+
* Lists the PocketBase backends of all websites of a hosting account with their URLs, live state, version and disk usage. A PocketBase backend gives a website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. An empty list means no website of the account has a PocketBase backend. States: `asleep` is normal (the instance sleeps when idle and wakes on the first request); `starting`, `running` and `stopping` are healthy; `failed` or `unregistered` mean the instance is broken; `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38835
|
+
* @summary List account PocketBase backends
|
|
38836
|
+
* @param {string} username
|
|
38837
|
+
* @param {*} [options] Override http request option.
|
|
38838
|
+
* @throws {RequiredError}
|
|
38839
|
+
*/
|
|
38840
|
+
async listAccountPocketBaseBackendsV1(username: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<HostingV1PocketBaseInstanceResource>>> {
|
|
38841
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listAccountPocketBaseBackendsV1(username, options);
|
|
38842
|
+
const localVarOperationServerBasePath = operationServerMap['HostingPocketBaseApi.listAccountPocketBaseBackendsV1']?.[0]?.url;
|
|
38843
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
38844
|
+
},
|
|
38845
|
+
/**
|
|
38846
|
+
* Sets the password of a superuser of the website\'s PocketBase backend, and creates that superuser when there is none with the given email. The old password of that superuser stops working at once, so apps and scripts still using it lose superuser access; confirm with the user before calling it. Use it when the superuser password is lost (Hostinger never stores it), when it leaked and must be rotated, or to add another superuser with a different email. Returns 404 when the website has no PocketBase backend; create one first. App user accounts are managed through the PocketBase REST API, not here. `superuser_password` is optional: leave it out to get a strong generated password, or send your own (10-128 characters). The response returns it in `superuser_password` once and Hostinger never stores it, so save it in your app secrets right away, then authenticate again with `pb.collection(\'_superusers\').authWithPassword`. `superuser_email` defaults to the email of the website owner. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38847
|
+
* @summary Set PocketBase superuser
|
|
38848
|
+
* @param {string} username
|
|
38849
|
+
* @param {string} domain Domain name
|
|
38850
|
+
* @param {HostingV1PocketBaseUpdateSuperuserRequest} [hostingV1PocketBaseUpdateSuperuserRequest]
|
|
38851
|
+
* @param {*} [options] Override http request option.
|
|
38852
|
+
* @throws {RequiredError}
|
|
38853
|
+
*/
|
|
38854
|
+
async setPocketBaseSuperuserV1(username: string, domain: string, hostingV1PocketBaseUpdateSuperuserRequest?: HostingV1PocketBaseUpdateSuperuserRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HostingV1PocketBaseSuperuserResource>> {
|
|
38855
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.setPocketBaseSuperuserV1(username, domain, hostingV1PocketBaseUpdateSuperuserRequest, options);
|
|
38856
|
+
const localVarOperationServerBasePath = operationServerMap['HostingPocketBaseApi.setPocketBaseSuperuserV1']?.[0]?.url;
|
|
38857
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
38858
|
+
},
|
|
38859
|
+
}
|
|
38860
|
+
};
|
|
38861
|
+
|
|
38862
|
+
/**
|
|
38863
|
+
* HostingPocketBaseApi - factory interface
|
|
38864
|
+
* @export
|
|
38865
|
+
*/
|
|
38866
|
+
export const HostingPocketBaseApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
38867
|
+
const localVarFp = HostingPocketBaseApiFp(configuration)
|
|
38868
|
+
return {
|
|
38869
|
+
/**
|
|
38870
|
+
* Creates a PocketBase backend for a website: a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. A website has at most one PocketBase backend. Creation usually takes a few seconds. The backend takes over the `/api` and `/_` paths of the website: from then on requests to these paths and everything below them go to PocketBase, while every other path keeps serving the website. Do not create a backend for a website that serves its own `/api` or `/_` paths, because they stop working; confirm with the user before calling it. Deleting the backend gives both paths back to the website. Headless WordPress websites and parked domains are not supported; for a parked domain, use the website it is parked on. A website that already has a backend is rejected with 422, unless that backend is in state `missing`: then it is replaced with a new, empty one. A website set up with `type: headless_empty` becomes `headless_pocketbase`; any other website keeps its type. `superuser_password` is optional: leave it out to get a strong generated password, or send your own (10-128 characters). The response returns it in `superuser_password` once and Hostinger never stores it, so save it in your app secrets right away; you need it to manage the backend through the PocketBase REST API. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. `superuser_email` defaults to the email of the website owner. The instance sleeps when idle and wakes on the first request, so the first call after a quiet period can take a few seconds. `next_steps` in the response lists what to do next. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38871
|
+
* @summary Create PocketBase backend
|
|
38872
|
+
* @param {string} username
|
|
38873
|
+
* @param {string} domain Domain name
|
|
38874
|
+
* @param {HostingV1PocketBaseCreateBackendRequest} [hostingV1PocketBaseCreateBackendRequest]
|
|
38875
|
+
* @param {*} [options] Override http request option.
|
|
38876
|
+
* @throws {RequiredError}
|
|
38877
|
+
*/
|
|
38878
|
+
createPocketBaseBackendV1(username: string, domain: string, hostingV1PocketBaseCreateBackendRequest?: HostingV1PocketBaseCreateBackendRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1PocketBaseBackendCreatedResource> {
|
|
38879
|
+
return localVarFp.createPocketBaseBackendV1(username, domain, hostingV1PocketBaseCreateBackendRequest, options).then((request) => request(axios, basePath));
|
|
38880
|
+
},
|
|
38881
|
+
/**
|
|
38882
|
+
* Permanently deletes the PocketBase backend of a website with all its data (collections, records, users and uploaded files) and gives the `/api` and `/_` paths back to the website; a `headless_pocketbase` website becomes `headless_empty`. This cannot be undone and every app using this backend stops working, so confirm with the user before calling it and export the data you need from the dashboard (`admin_url`) first. Returns success also when the website has no PocketBase backend; then it only clears a `headless_pocketbase` mark. To regain access after losing the superuser password, use the `Set PocketBase superuser` endpoint instead of deleting the backend. PocketBase is rolling out gradually: an account without access yet gets 422; an unknown website gets 404.
|
|
38883
|
+
* @summary Delete PocketBase backend
|
|
38884
|
+
* @param {string} username
|
|
38885
|
+
* @param {string} domain Domain name
|
|
38886
|
+
* @param {*} [options] Override http request option.
|
|
38887
|
+
* @throws {RequiredError}
|
|
38888
|
+
*/
|
|
38889
|
+
deletePocketBaseBackendV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<CommonSuccessEmptyResource> {
|
|
38890
|
+
return localVarFp.deletePocketBaseBackendV1(username, domain, options).then((request) => request(axios, basePath));
|
|
38891
|
+
},
|
|
38892
|
+
/**
|
|
38893
|
+
* Returns the PocketBase backend of a website: its REST API and dashboard URLs, live state and version. A PocketBase backend gives the website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain under `/api` and `/_`. Returns 404 when the website has no PocketBase backend. The superuser password is only shown once, when it is set, and is never returned here. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. The instance sleeps when idle and wakes on the first request, so `asleep` is a normal state and the first call to a sleeping instance can take a few seconds. `starting`, `running` and `stopping` are healthy; `failed` or `unregistered` mean the instance is broken; `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38894
|
+
* @summary Get PocketBase backend
|
|
38895
|
+
* @param {string} username
|
|
38896
|
+
* @param {string} domain Domain name
|
|
38897
|
+
* @param {*} [options] Override http request option.
|
|
38898
|
+
* @throws {RequiredError}
|
|
38899
|
+
*/
|
|
38900
|
+
getPocketBaseBackendV1(username: string, domain: string, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1PocketBaseBackendResource> {
|
|
38901
|
+
return localVarFp.getPocketBaseBackendV1(username, domain, options).then((request) => request(axios, basePath));
|
|
38902
|
+
},
|
|
38903
|
+
/**
|
|
38904
|
+
* Lists the PocketBase backends of all websites of a hosting account with their URLs, live state, version and disk usage. A PocketBase backend gives a website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. An empty list means no website of the account has a PocketBase backend. States: `asleep` is normal (the instance sleeps when idle and wakes on the first request); `starting`, `running` and `stopping` are healthy; `failed` or `unregistered` mean the instance is broken; `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38905
|
+
* @summary List account PocketBase backends
|
|
38906
|
+
* @param {string} username
|
|
38907
|
+
* @param {*} [options] Override http request option.
|
|
38908
|
+
* @throws {RequiredError}
|
|
38909
|
+
*/
|
|
38910
|
+
listAccountPocketBaseBackendsV1(username: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<HostingV1PocketBaseInstanceResource>> {
|
|
38911
|
+
return localVarFp.listAccountPocketBaseBackendsV1(username, options).then((request) => request(axios, basePath));
|
|
38912
|
+
},
|
|
38913
|
+
/**
|
|
38914
|
+
* Sets the password of a superuser of the website\'s PocketBase backend, and creates that superuser when there is none with the given email. The old password of that superuser stops working at once, so apps and scripts still using it lose superuser access; confirm with the user before calling it. Use it when the superuser password is lost (Hostinger never stores it), when it leaked and must be rotated, or to add another superuser with a different email. Returns 404 when the website has no PocketBase backend; create one first. App user accounts are managed through the PocketBase REST API, not here. `superuser_password` is optional: leave it out to get a strong generated password, or send your own (10-128 characters). The response returns it in `superuser_password` once and Hostinger never stores it, so save it in your app secrets right away, then authenticate again with `pb.collection(\'_superusers\').authWithPassword`. `superuser_email` defaults to the email of the website owner. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38915
|
+
* @summary Set PocketBase superuser
|
|
38916
|
+
* @param {string} username
|
|
38917
|
+
* @param {string} domain Domain name
|
|
38918
|
+
* @param {HostingV1PocketBaseUpdateSuperuserRequest} [hostingV1PocketBaseUpdateSuperuserRequest]
|
|
38919
|
+
* @param {*} [options] Override http request option.
|
|
38920
|
+
* @throws {RequiredError}
|
|
38921
|
+
*/
|
|
38922
|
+
setPocketBaseSuperuserV1(username: string, domain: string, hostingV1PocketBaseUpdateSuperuserRequest?: HostingV1PocketBaseUpdateSuperuserRequest, options?: RawAxiosRequestConfig): AxiosPromise<HostingV1PocketBaseSuperuserResource> {
|
|
38923
|
+
return localVarFp.setPocketBaseSuperuserV1(username, domain, hostingV1PocketBaseUpdateSuperuserRequest, options).then((request) => request(axios, basePath));
|
|
38924
|
+
},
|
|
38925
|
+
};
|
|
38926
|
+
};
|
|
38927
|
+
|
|
38928
|
+
/**
|
|
38929
|
+
* HostingPocketBaseApi - object-oriented interface
|
|
38930
|
+
* @export
|
|
38931
|
+
* @class HostingPocketBaseApi
|
|
38932
|
+
* @extends {BaseAPI}
|
|
38933
|
+
*/
|
|
38934
|
+
export class HostingPocketBaseApi extends BaseAPI {
|
|
38935
|
+
/**
|
|
38936
|
+
* Creates a PocketBase backend for a website: a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. A website has at most one PocketBase backend. Creation usually takes a few seconds. The backend takes over the `/api` and `/_` paths of the website: from then on requests to these paths and everything below them go to PocketBase, while every other path keeps serving the website. Do not create a backend for a website that serves its own `/api` or `/_` paths, because they stop working; confirm with the user before calling it. Deleting the backend gives both paths back to the website. Headless WordPress websites and parked domains are not supported; for a parked domain, use the website it is parked on. A website that already has a backend is rejected with 422, unless that backend is in state `missing`: then it is replaced with a new, empty one. A website set up with `type: headless_empty` becomes `headless_pocketbase`; any other website keeps its type. `superuser_password` is optional: leave it out to get a strong generated password, or send your own (10-128 characters). The response returns it in `superuser_password` once and Hostinger never stores it, so save it in your app secrets right away; you need it to manage the backend through the PocketBase REST API. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. `superuser_email` defaults to the email of the website owner. The instance sleeps when idle and wakes on the first request, so the first call after a quiet period can take a few seconds. `next_steps` in the response lists what to do next. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38937
|
+
* @summary Create PocketBase backend
|
|
38938
|
+
* @param {string} username
|
|
38939
|
+
* @param {string} domain Domain name
|
|
38940
|
+
* @param {HostingV1PocketBaseCreateBackendRequest} [hostingV1PocketBaseCreateBackendRequest]
|
|
38941
|
+
* @param {*} [options] Override http request option.
|
|
38942
|
+
* @throws {RequiredError}
|
|
38943
|
+
* @memberof HostingPocketBaseApi
|
|
38944
|
+
*/
|
|
38945
|
+
public createPocketBaseBackendV1(username: string, domain: string, hostingV1PocketBaseCreateBackendRequest?: HostingV1PocketBaseCreateBackendRequest, options?: RawAxiosRequestConfig) {
|
|
38946
|
+
return HostingPocketBaseApiFp(this.configuration).createPocketBaseBackendV1(username, domain, hostingV1PocketBaseCreateBackendRequest, options).then((request) => request(this.axios, this.basePath));
|
|
38947
|
+
}
|
|
38948
|
+
|
|
38949
|
+
/**
|
|
38950
|
+
* Permanently deletes the PocketBase backend of a website with all its data (collections, records, users and uploaded files) and gives the `/api` and `/_` paths back to the website; a `headless_pocketbase` website becomes `headless_empty`. This cannot be undone and every app using this backend stops working, so confirm with the user before calling it and export the data you need from the dashboard (`admin_url`) first. Returns success also when the website has no PocketBase backend; then it only clears a `headless_pocketbase` mark. To regain access after losing the superuser password, use the `Set PocketBase superuser` endpoint instead of deleting the backend. PocketBase is rolling out gradually: an account without access yet gets 422; an unknown website gets 404.
|
|
38951
|
+
* @summary Delete PocketBase backend
|
|
38952
|
+
* @param {string} username
|
|
38953
|
+
* @param {string} domain Domain name
|
|
38954
|
+
* @param {*} [options] Override http request option.
|
|
38955
|
+
* @throws {RequiredError}
|
|
38956
|
+
* @memberof HostingPocketBaseApi
|
|
38957
|
+
*/
|
|
38958
|
+
public deletePocketBaseBackendV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
38959
|
+
return HostingPocketBaseApiFp(this.configuration).deletePocketBaseBackendV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
38960
|
+
}
|
|
38961
|
+
|
|
38962
|
+
/**
|
|
38963
|
+
* Returns the PocketBase backend of a website: its REST API and dashboard URLs, live state and version. A PocketBase backend gives the website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain under `/api` and `/_`. Returns 404 when the website has no PocketBase backend. The superuser password is only shown once, when it is set, and is never returned here. If it is lost, set a new one with the `Set PocketBase superuser` endpoint. The instance sleeps when idle and wakes on the first request, so `asleep` is a normal state and the first call to a sleeping instance can take a few seconds. `starting`, `running` and `stopping` are healthy; `failed` or `unregistered` mean the instance is broken; `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38964
|
+
* @summary Get PocketBase backend
|
|
38965
|
+
* @param {string} username
|
|
38966
|
+
* @param {string} domain Domain name
|
|
38967
|
+
* @param {*} [options] Override http request option.
|
|
38968
|
+
* @throws {RequiredError}
|
|
38969
|
+
* @memberof HostingPocketBaseApi
|
|
38970
|
+
*/
|
|
38971
|
+
public getPocketBaseBackendV1(username: string, domain: string, options?: RawAxiosRequestConfig) {
|
|
38972
|
+
return HostingPocketBaseApiFp(this.configuration).getPocketBaseBackendV1(username, domain, options).then((request) => request(this.axios, this.basePath));
|
|
38973
|
+
}
|
|
38974
|
+
|
|
38975
|
+
/**
|
|
38976
|
+
* Lists the PocketBase backends of all websites of a hosting account with their URLs, live state, version and disk usage. A PocketBase backend gives a website a database, authentication, file storage and a realtime REST API, served from the website\'s own domain. An empty list means no website of the account has a PocketBase backend. States: `asleep` is normal (the instance sleeps when idle and wakes on the first request); `starting`, `running` and `stopping` are healthy; `failed` or `unregistered` mean the instance is broken; `missing` means its files are gone from the server, and creating the PocketBase backend again sets up a new, empty one. `state` is null when the server could not be reached; retry later. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38977
|
+
* @summary List account PocketBase backends
|
|
38978
|
+
* @param {string} username
|
|
38979
|
+
* @param {*} [options] Override http request option.
|
|
38980
|
+
* @throws {RequiredError}
|
|
38981
|
+
* @memberof HostingPocketBaseApi
|
|
38982
|
+
*/
|
|
38983
|
+
public listAccountPocketBaseBackendsV1(username: string, options?: RawAxiosRequestConfig) {
|
|
38984
|
+
return HostingPocketBaseApiFp(this.configuration).listAccountPocketBaseBackendsV1(username, options).then((request) => request(this.axios, this.basePath));
|
|
38985
|
+
}
|
|
38986
|
+
|
|
38987
|
+
/**
|
|
38988
|
+
* Sets the password of a superuser of the website\'s PocketBase backend, and creates that superuser when there is none with the given email. The old password of that superuser stops working at once, so apps and scripts still using it lose superuser access; confirm with the user before calling it. Use it when the superuser password is lost (Hostinger never stores it), when it leaked and must be rotated, or to add another superuser with a different email. Returns 404 when the website has no PocketBase backend; create one first. App user accounts are managed through the PocketBase REST API, not here. `superuser_password` is optional: leave it out to get a strong generated password, or send your own (10-128 characters). The response returns it in `superuser_password` once and Hostinger never stores it, so save it in your app secrets right away, then authenticate again with `pb.collection(\'_superusers\').authWithPassword`. `superuser_email` defaults to the email of the website owner. PocketBase is rolling out gradually: an account without access yet gets 422.
|
|
38989
|
+
* @summary Set PocketBase superuser
|
|
38990
|
+
* @param {string} username
|
|
38991
|
+
* @param {string} domain Domain name
|
|
38992
|
+
* @param {HostingV1PocketBaseUpdateSuperuserRequest} [hostingV1PocketBaseUpdateSuperuserRequest]
|
|
38993
|
+
* @param {*} [options] Override http request option.
|
|
38994
|
+
* @throws {RequiredError}
|
|
38995
|
+
* @memberof HostingPocketBaseApi
|
|
38996
|
+
*/
|
|
38997
|
+
public setPocketBaseSuperuserV1(username: string, domain: string, hostingV1PocketBaseUpdateSuperuserRequest?: HostingV1PocketBaseUpdateSuperuserRequest, options?: RawAxiosRequestConfig) {
|
|
38998
|
+
return HostingPocketBaseApiFp(this.configuration).setPocketBaseSuperuserV1(username, domain, hostingV1PocketBaseUpdateSuperuserRequest, options).then((request) => request(this.axios, this.basePath));
|
|
38999
|
+
}
|
|
39000
|
+
}
|
|
39001
|
+
|
|
39002
|
+
|
|
39003
|
+
|
|
38299
39004
|
/**
|
|
38300
39005
|
* HostingRedirectsApi - axios parameter creator
|
|
38301
39006
|
* @export
|
|
@@ -39223,7 +39928,7 @@ export const HostingWebsitesApiAxiosParamCreator = function (configuration?: Con
|
|
|
39223
39928
|
};
|
|
39224
39929
|
},
|
|
39225
39930
|
/**
|
|
39226
|
-
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_empty` installs nothing: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless
|
|
39931
|
+
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_pocketbase` marks the website as a headless PocketBase website but installs nothing: create its PocketBase backend with `Create PocketBase backend` (`POST /api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase`) once the setup is `completed`. `headless_empty` installs nothing either: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`, or a PocketBase backend through the same PocketBase endpoint. Omit `domain` to set the website up on a generated temporary free subdomain; the created setup returns it as `domain`. REST clients that need to know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, can generate one through `POST /api/hosting/v1/domains/free-subdomains` and send it as `domain`. It is accepted for 24 hours, only from the client that generated it. When the order has no hosting account yet, the setup creates one first, in the datacenter given by `datacenter_code` or the order\'s default datacenter when it is omitted. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
39227
39932
|
* @summary Start website setup
|
|
39228
39933
|
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
39229
39934
|
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
@@ -39348,7 +40053,7 @@ export const HostingWebsitesApiFp = function(configuration?: Configuration) {
|
|
|
39348
40053
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
39349
40054
|
},
|
|
39350
40055
|
/**
|
|
39351
|
-
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_empty` installs nothing: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless
|
|
40056
|
+
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_pocketbase` marks the website as a headless PocketBase website but installs nothing: create its PocketBase backend with `Create PocketBase backend` (`POST /api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase`) once the setup is `completed`. `headless_empty` installs nothing either: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`, or a PocketBase backend through the same PocketBase endpoint. Omit `domain` to set the website up on a generated temporary free subdomain; the created setup returns it as `domain`. REST clients that need to know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, can generate one through `POST /api/hosting/v1/domains/free-subdomains` and send it as `domain`. It is accepted for 24 hours, only from the client that generated it. When the order has no hosting account yet, the setup creates one first, in the datacenter given by `datacenter_code` or the order\'s default datacenter when it is omitted. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
39352
40057
|
* @summary Start website setup
|
|
39353
40058
|
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
39354
40059
|
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
@@ -39432,7 +40137,7 @@ export const HostingWebsitesApiFactory = function (configuration?: Configuration
|
|
|
39432
40137
|
return localVarFp.listWebsitesV1(page, perPage, username, orderId, isEnabled, domain, websiteTypes, options).then((request) => request(axios, basePath));
|
|
39433
40138
|
},
|
|
39434
40139
|
/**
|
|
39435
|
-
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_empty` installs nothing: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless
|
|
40140
|
+
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_pocketbase` marks the website as a headless PocketBase website but installs nothing: create its PocketBase backend with `Create PocketBase backend` (`POST /api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase`) once the setup is `completed`. `headless_empty` installs nothing either: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`, or a PocketBase backend through the same PocketBase endpoint. Omit `domain` to set the website up on a generated temporary free subdomain; the created setup returns it as `domain`. REST clients that need to know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, can generate one through `POST /api/hosting/v1/domains/free-subdomains` and send it as `domain`. It is accepted for 24 hours, only from the client that generated it. When the order has no hosting account yet, the setup creates one first, in the datacenter given by `datacenter_code` or the order\'s default datacenter when it is omitted. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
39436
40141
|
* @summary Start website setup
|
|
39437
40142
|
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
39438
40143
|
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
@@ -39524,7 +40229,7 @@ export class HostingWebsitesApi extends BaseAPI {
|
|
|
39524
40229
|
}
|
|
39525
40230
|
|
|
39526
40231
|
/**
|
|
39527
|
-
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_empty` installs nothing: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless
|
|
40232
|
+
* Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (`hosting_websites_list-setups`) with the `domain` filter every 10 to 15 seconds and wait for `status: completed` before uploading files, deploying or creating databases. Omit `type` for an empty website. `type: wordpress` installs WordPress in the website root with the admin user, email and password from `wordpress`, the domain as the site title, and `en_US` when `wordpress.language` is omitted. The headless types (`headless_empty`, `headless_wordpress`, `headless_ecommerce`, `headless_pocketbase`) create a headless website; `headless_wordpress` additionally installs WordPress into the `cms` directory of the website root with generated credentials. `headless_pocketbase` marks the website as a headless PocketBase website but installs nothing: create its PocketBase backend with `Create PocketBase backend` (`POST /api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase`) once the setup is `completed`. `headless_empty` installs nothing either: WordPress can be added later through `POST /api/hosting/v1/accounts/{username}/wordpress/installations` (`wordpress_installations_install`) with `type: headless`, or a PocketBase backend through the same PocketBase endpoint. Omit `domain` to set the website up on a generated temporary free subdomain; the created setup returns it as `domain`. REST clients that need to know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, can generate one through `POST /api/hosting/v1/domains/free-subdomains` and send it as `domain`. It is accepted for 24 hours, only from the client that generated it. When the order has no hosting account yet, the setup creates one first, in the datacenter given by `datacenter_code` or the order\'s default datacenter when it is omitted. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a `Retry-After` header while a setup for the same domain is still running.
|
|
39528
40233
|
* @summary Start website setup
|
|
39529
40234
|
* @param {number} orderId Hosting order ID. List orders to find available IDs.
|
|
39530
40235
|
* @param {HostingV1OnboardingsStartOnboardingRequest} hostingV1OnboardingsStartOnboardingRequest
|
|
@@ -39557,7 +40262,7 @@ export type ListWebsitesV1WebsiteTypesEnum = typeof ListWebsitesV1WebsiteTypesEn
|
|
|
39557
40262
|
export const MailAPITokensApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
39558
40263
|
return {
|
|
39559
40264
|
/**
|
|
39560
|
-
* Create an API token for the given mail order.
|
|
40265
|
+
* Create an API token for the given mail order. Through the [Hostinger Mail API](https://api.mail.hostinger.com/), the token grants access to the mailboxes it is scoped to (for example, to read, search, send and organise email messages), without signing in with a mailbox password over IMAP, SMTP or webmail. A token covers either all mailboxes of the order or only the ones you choose. Set `scope.has_all_mailboxes` to `true` to cover all current and future mailboxes, or to `false` and list specific mailboxes in `scope.mailbox_ids`. The plaintext token is returned only in this response, never again. Store it securely, because anyone who has it gets the same access. A maximum of 10 tokens can exist per order.
|
|
39561
40266
|
* @summary Create API token
|
|
39562
40267
|
* @param {string} orderId Order resource ID
|
|
39563
40268
|
* @param {MailV1SchemaCreateApiTokenRequestSchema} mailV1SchemaCreateApiTokenRequestSchema
|
|
@@ -39601,7 +40306,7 @@ export const MailAPITokensApiAxiosParamCreator = function (configuration?: Confi
|
|
|
39601
40306
|
};
|
|
39602
40307
|
},
|
|
39603
40308
|
/**
|
|
39604
|
-
* Retrieve a paginated list of [Hostinger
|
|
40309
|
+
* Retrieve a paginated list of [Hostinger Mail API](https://api.mail.hostinger.com/) tokens across all your mail orders, optionally filtered by order. Plaintext tokens are never included; they are returned only when a token is created.
|
|
39605
40310
|
* @summary List API tokens
|
|
39606
40311
|
* @param {string | null} [orderId] Filter tokens by order resource ID. Single value or comma-separated list.
|
|
39607
40312
|
* @param {number} [page] Page number
|
|
@@ -39650,7 +40355,7 @@ export const MailAPITokensApiAxiosParamCreator = function (configuration?: Confi
|
|
|
39650
40355
|
};
|
|
39651
40356
|
},
|
|
39652
40357
|
/**
|
|
39653
|
-
* Revoke an API token. The token immediately loses access to the [Hostinger
|
|
40358
|
+
* Revoke an API token. The token immediately loses access to the [Hostinger Mail API](https://api.mail.hostinger.com/). This action cannot be undone.
|
|
39654
40359
|
* @summary Revoke API token
|
|
39655
40360
|
* @param {string} tokenId API token ID (returned when the token was created)
|
|
39656
40361
|
* @param {*} [options] Override http request option.
|
|
@@ -39698,7 +40403,7 @@ export const MailAPITokensApiFp = function(configuration?: Configuration) {
|
|
|
39698
40403
|
const localVarAxiosParamCreator = MailAPITokensApiAxiosParamCreator(configuration)
|
|
39699
40404
|
return {
|
|
39700
40405
|
/**
|
|
39701
|
-
* Create an API token for the given mail order.
|
|
40406
|
+
* Create an API token for the given mail order. Through the [Hostinger Mail API](https://api.mail.hostinger.com/), the token grants access to the mailboxes it is scoped to (for example, to read, search, send and organise email messages), without signing in with a mailbox password over IMAP, SMTP or webmail. A token covers either all mailboxes of the order or only the ones you choose. Set `scope.has_all_mailboxes` to `true` to cover all current and future mailboxes, or to `false` and list specific mailboxes in `scope.mailbox_ids`. The plaintext token is returned only in this response, never again. Store it securely, because anyone who has it gets the same access. A maximum of 10 tokens can exist per order.
|
|
39702
40407
|
* @summary Create API token
|
|
39703
40408
|
* @param {string} orderId Order resource ID
|
|
39704
40409
|
* @param {MailV1SchemaCreateApiTokenRequestSchema} mailV1SchemaCreateApiTokenRequestSchema
|
|
@@ -39711,7 +40416,7 @@ export const MailAPITokensApiFp = function(configuration?: Configuration) {
|
|
|
39711
40416
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
39712
40417
|
},
|
|
39713
40418
|
/**
|
|
39714
|
-
* Retrieve a paginated list of [Hostinger
|
|
40419
|
+
* Retrieve a paginated list of [Hostinger Mail API](https://api.mail.hostinger.com/) tokens across all your mail orders, optionally filtered by order. Plaintext tokens are never included; they are returned only when a token is created.
|
|
39715
40420
|
* @summary List API tokens
|
|
39716
40421
|
* @param {string | null} [orderId] Filter tokens by order resource ID. Single value or comma-separated list.
|
|
39717
40422
|
* @param {number} [page] Page number
|
|
@@ -39725,7 +40430,7 @@ export const MailAPITokensApiFp = function(configuration?: Configuration) {
|
|
|
39725
40430
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
39726
40431
|
},
|
|
39727
40432
|
/**
|
|
39728
|
-
* Revoke an API token. The token immediately loses access to the [Hostinger
|
|
40433
|
+
* Revoke an API token. The token immediately loses access to the [Hostinger Mail API](https://api.mail.hostinger.com/). This action cannot be undone.
|
|
39729
40434
|
* @summary Revoke API token
|
|
39730
40435
|
* @param {string} tokenId API token ID (returned when the token was created)
|
|
39731
40436
|
* @param {*} [options] Override http request option.
|
|
@@ -39747,7 +40452,7 @@ export const MailAPITokensApiFactory = function (configuration?: Configuration,
|
|
|
39747
40452
|
const localVarFp = MailAPITokensApiFp(configuration)
|
|
39748
40453
|
return {
|
|
39749
40454
|
/**
|
|
39750
|
-
* Create an API token for the given mail order.
|
|
40455
|
+
* Create an API token for the given mail order. Through the [Hostinger Mail API](https://api.mail.hostinger.com/), the token grants access to the mailboxes it is scoped to (for example, to read, search, send and organise email messages), without signing in with a mailbox password over IMAP, SMTP or webmail. A token covers either all mailboxes of the order or only the ones you choose. Set `scope.has_all_mailboxes` to `true` to cover all current and future mailboxes, or to `false` and list specific mailboxes in `scope.mailbox_ids`. The plaintext token is returned only in this response, never again. Store it securely, because anyone who has it gets the same access. A maximum of 10 tokens can exist per order.
|
|
39751
40456
|
* @summary Create API token
|
|
39752
40457
|
* @param {string} orderId Order resource ID
|
|
39753
40458
|
* @param {MailV1SchemaCreateApiTokenRequestSchema} mailV1SchemaCreateApiTokenRequestSchema
|
|
@@ -39758,7 +40463,7 @@ export const MailAPITokensApiFactory = function (configuration?: Configuration,
|
|
|
39758
40463
|
return localVarFp.createAPITokenV1(orderId, mailV1SchemaCreateApiTokenRequestSchema, options).then((request) => request(axios, basePath));
|
|
39759
40464
|
},
|
|
39760
40465
|
/**
|
|
39761
|
-
* Retrieve a paginated list of [Hostinger
|
|
40466
|
+
* Retrieve a paginated list of [Hostinger Mail API](https://api.mail.hostinger.com/) tokens across all your mail orders, optionally filtered by order. Plaintext tokens are never included; they are returned only when a token is created.
|
|
39762
40467
|
* @summary List API tokens
|
|
39763
40468
|
* @param {string | null} [orderId] Filter tokens by order resource ID. Single value or comma-separated list.
|
|
39764
40469
|
* @param {number} [page] Page number
|
|
@@ -39770,7 +40475,7 @@ export const MailAPITokensApiFactory = function (configuration?: Configuration,
|
|
|
39770
40475
|
return localVarFp.listAPITokensV1(orderId, page, perPage, options).then((request) => request(axios, basePath));
|
|
39771
40476
|
},
|
|
39772
40477
|
/**
|
|
39773
|
-
* Revoke an API token. The token immediately loses access to the [Hostinger
|
|
40478
|
+
* Revoke an API token. The token immediately loses access to the [Hostinger Mail API](https://api.mail.hostinger.com/). This action cannot be undone.
|
|
39774
40479
|
* @summary Revoke API token
|
|
39775
40480
|
* @param {string} tokenId API token ID (returned when the token was created)
|
|
39776
40481
|
* @param {*} [options] Override http request option.
|
|
@@ -39790,7 +40495,7 @@ export const MailAPITokensApiFactory = function (configuration?: Configuration,
|
|
|
39790
40495
|
*/
|
|
39791
40496
|
export class MailAPITokensApi extends BaseAPI {
|
|
39792
40497
|
/**
|
|
39793
|
-
* Create an API token for the given mail order.
|
|
40498
|
+
* Create an API token for the given mail order. Through the [Hostinger Mail API](https://api.mail.hostinger.com/), the token grants access to the mailboxes it is scoped to (for example, to read, search, send and organise email messages), without signing in with a mailbox password over IMAP, SMTP or webmail. A token covers either all mailboxes of the order or only the ones you choose. Set `scope.has_all_mailboxes` to `true` to cover all current and future mailboxes, or to `false` and list specific mailboxes in `scope.mailbox_ids`. The plaintext token is returned only in this response, never again. Store it securely, because anyone who has it gets the same access. A maximum of 10 tokens can exist per order.
|
|
39794
40499
|
* @summary Create API token
|
|
39795
40500
|
* @param {string} orderId Order resource ID
|
|
39796
40501
|
* @param {MailV1SchemaCreateApiTokenRequestSchema} mailV1SchemaCreateApiTokenRequestSchema
|
|
@@ -39803,7 +40508,7 @@ export class MailAPITokensApi extends BaseAPI {
|
|
|
39803
40508
|
}
|
|
39804
40509
|
|
|
39805
40510
|
/**
|
|
39806
|
-
* Retrieve a paginated list of [Hostinger
|
|
40511
|
+
* Retrieve a paginated list of [Hostinger Mail API](https://api.mail.hostinger.com/) tokens across all your mail orders, optionally filtered by order. Plaintext tokens are never included; they are returned only when a token is created.
|
|
39807
40512
|
* @summary List API tokens
|
|
39808
40513
|
* @param {string | null} [orderId] Filter tokens by order resource ID. Single value or comma-separated list.
|
|
39809
40514
|
* @param {number} [page] Page number
|
|
@@ -39817,7 +40522,7 @@ export class MailAPITokensApi extends BaseAPI {
|
|
|
39817
40522
|
}
|
|
39818
40523
|
|
|
39819
40524
|
/**
|
|
39820
|
-
* Revoke an API token. The token immediately loses access to the [Hostinger
|
|
40525
|
+
* Revoke an API token. The token immediately loses access to the [Hostinger Mail API](https://api.mail.hostinger.com/). This action cannot be undone.
|
|
39821
40526
|
* @summary Revoke API token
|
|
39822
40527
|
* @param {string} tokenId API token ID (returned when the token was created)
|
|
39823
40528
|
* @param {*} [options] Override http request option.
|
|
@@ -55945,7 +56650,7 @@ export const WordPressInstallationsApiAxiosParamCreator = function (configuratio
|
|
|
55945
56650
|
};
|
|
55946
56651
|
},
|
|
55947
56652
|
/**
|
|
55948
|
-
* Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must
|
|
56653
|
+
* Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must be an empty headless website (`headless_empty`): the headless install rewrites the root `.htaccess`, so any other website, including a headless website that already has WordPress or a PocketBase backend, is rejected with 422. To replace a PocketBase backend with WordPress, delete it first with `Delete PocketBase backend`. Call GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain before proceeding to check whether WordPress is already installed on the target domain/path. If WordPress already exists and `overwrite` is false (the default), the async job will fail. This operation is asynchronous: a successful response only means the install job has been queued, not that WordPress is ready. Installation typically takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain to track progress. When the installation appears in that list, WordPress is ready. Returns 422 when the account already uses all the databases its plan allows, unless `database.name` is an existing database on the account.
|
|
55949
56654
|
* @summary Install WordPress
|
|
55950
56655
|
* @param {string} username
|
|
55951
56656
|
* @param {WordPressV1InstallationsInstallWordPressRequest} wordPressV1InstallationsInstallWordPressRequest
|
|
@@ -56246,7 +56951,7 @@ export const WordPressInstallationsApiFp = function(configuration?: Configuratio
|
|
|
56246
56951
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
56247
56952
|
},
|
|
56248
56953
|
/**
|
|
56249
|
-
* Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must
|
|
56954
|
+
* Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must be an empty headless website (`headless_empty`): the headless install rewrites the root `.htaccess`, so any other website, including a headless website that already has WordPress or a PocketBase backend, is rejected with 422. To replace a PocketBase backend with WordPress, delete it first with `Delete PocketBase backend`. Call GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain before proceeding to check whether WordPress is already installed on the target domain/path. If WordPress already exists and `overwrite` is false (the default), the async job will fail. This operation is asynchronous: a successful response only means the install job has been queued, not that WordPress is ready. Installation typically takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain to track progress. When the installation appears in that list, WordPress is ready. Returns 422 when the account already uses all the databases its plan allows, unless `database.name` is an existing database on the account.
|
|
56250
56955
|
* @summary Install WordPress
|
|
56251
56956
|
* @param {string} username
|
|
56252
56957
|
* @param {WordPressV1InstallationsInstallWordPressRequest} wordPressV1InstallationsInstallWordPressRequest
|
|
@@ -56379,7 +57084,7 @@ export const WordPressInstallationsApiFactory = function (configuration?: Config
|
|
|
56379
57084
|
return localVarFp.importWordPressWebsiteV1(username, domain, wordPressV1InstallationsImportWordPressRequest, options).then((request) => request(axios, basePath));
|
|
56380
57085
|
},
|
|
56381
57086
|
/**
|
|
56382
|
-
* Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must
|
|
57087
|
+
* Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must be an empty headless website (`headless_empty`): the headless install rewrites the root `.htaccess`, so any other website, including a headless website that already has WordPress or a PocketBase backend, is rejected with 422. To replace a PocketBase backend with WordPress, delete it first with `Delete PocketBase backend`. Call GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain before proceeding to check whether WordPress is already installed on the target domain/path. If WordPress already exists and `overwrite` is false (the default), the async job will fail. This operation is asynchronous: a successful response only means the install job has been queued, not that WordPress is ready. Installation typically takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain to track progress. When the installation appears in that list, WordPress is ready. Returns 422 when the account already uses all the databases its plan allows, unless `database.name` is an existing database on the account.
|
|
56383
57088
|
* @summary Install WordPress
|
|
56384
57089
|
* @param {string} username
|
|
56385
57090
|
* @param {WordPressV1InstallationsInstallWordPressRequest} wordPressV1InstallationsInstallWordPressRequest
|
|
@@ -56512,7 +57217,7 @@ export class WordPressInstallationsApi extends BaseAPI {
|
|
|
56512
57217
|
}
|
|
56513
57218
|
|
|
56514
57219
|
/**
|
|
56515
|
-
* Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must
|
|
57220
|
+
* Install WordPress on an existing website. The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/orders/{order_id}/onboardings (`hosting_websites_create`) and poll GET /api/hosting/v1/onboardings (`hosting_websites_list-setups`) with the `domain` filter until its `status` is `completed`. Send `type: headless` to turn a headless website (for example one created by `hosting_websites_create` with `type: headless_empty`) into a headless WordPress website: WordPress is installed into the `cms` directory with the Hostinger headless MU plugin and the website is marked as a headless WordPress website. `directory` is not allowed with it. The target website must be an empty headless website (`headless_empty`): the headless install rewrites the root `.htaccess`, so any other website, including a headless website that already has WordPress or a PocketBase backend, is rejected with 422. To replace a PocketBase backend with WordPress, delete it first with `Delete PocketBase backend`. Call GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain before proceeding to check whether WordPress is already installed on the target domain/path. If WordPress already exists and `overwrite` is false (the default), the async job will fail. This operation is asynchronous: a successful response only means the install job has been queued, not that WordPress is ready. Installation typically takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations (`wordpress_installations_list`) filtered by username and domain to track progress. When the installation appears in that list, WordPress is ready. Returns 422 when the account already uses all the databases its plan allows, unless `database.name` is an existing database on the account.
|
|
56516
57221
|
* @summary Install WordPress
|
|
56517
57222
|
* @param {string} username
|
|
56518
57223
|
* @param {WordPressV1InstallationsInstallWordPressRequest} wordPressV1InstallationsInstallWordPressRequest
|