hostinger-api-mcp 1.43.1 → 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +181 -4
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/core/runtime.js +1 -1
- package/src/core/runtime.ts +1 -1
- package/src/core/tools/agency-hosting.js +24 -0
- package/src/core/tools/agency-hosting.ts +24 -0
- package/src/core/tools/all.js +356 -1
- package/src/core/tools/all.ts +356 -1
- package/src/core/tools/hosting.js +211 -1
- package/src/core/tools/hosting.ts +211 -1
- package/src/core/tools/wordpress.js +121 -0
- package/src/core/tools/wordpress.ts +121 -0
- package/src/servers/agency-hosting.js +1 -1
- package/src/servers/agency-hosting.ts +1 -1
- package/src/servers/all.js +1 -1
- package/src/servers/all.ts +1 -1
- package/src/servers/billing.js +1 -1
- package/src/servers/billing.ts +1 -1
- package/src/servers/dns.js +1 -1
- package/src/servers/dns.ts +1 -1
- package/src/servers/domains.js +1 -1
- package/src/servers/domains.ts +1 -1
- package/src/servers/ecommerce.js +1 -1
- package/src/servers/ecommerce.ts +1 -1
- package/src/servers/horizons.js +1 -1
- package/src/servers/horizons.ts +1 -1
- package/src/servers/hosting.js +1 -1
- package/src/servers/hosting.ts +1 -1
- package/src/servers/mail.js +1 -1
- package/src/servers/mail.ts +1 -1
- package/src/servers/reach.js +1 -1
- package/src/servers/reach.ts +1 -1
- package/src/servers/vps.js +1 -1
- package/src/servers/vps.ts +1 -1
- package/src/servers/wordpress.js +1 -1
- package/src/servers/wordpress.ts +1 -1
- package/types.d.ts +325 -0
package/src/servers/mail.ts
CHANGED
package/src/servers/reach.js
CHANGED
package/src/servers/reach.ts
CHANGED
package/src/servers/vps.js
CHANGED
package/src/servers/vps.ts
CHANGED
package/src/servers/wordpress.js
CHANGED
package/src/servers/wordpress.ts
CHANGED
package/types.d.ts
CHANGED
|
@@ -306,6 +306,55 @@ If this is the only domain on the website, unlinking leaves the website without
|
|
|
306
306
|
response: any; // Response structure will depend on the API
|
|
307
307
|
};
|
|
308
308
|
|
|
309
|
+
/**
|
|
310
|
+
* Generate a file browser upload URL with authentication credentials for uploading files
|
|
311
|
+
to an Agency Plan website's file storage.
|
|
312
|
+
|
|
313
|
+
Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the
|
|
314
|
+
website's file storage via the TUS resumable upload protocol (TUS 1.0.0). Send
|
|
315
|
+
`X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below.
|
|
316
|
+
|
|
317
|
+
1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers
|
|
318
|
+
`upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`.
|
|
319
|
+
2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or
|
|
320
|
+
`PATCH` requests with an `upload-offset` header tracking progress) until complete.
|
|
321
|
+
|
|
322
|
+
`relative_file_path` is the destination path inside the website's file storage, e.g.
|
|
323
|
+
`app.zip`.
|
|
324
|
+
|
|
325
|
+
Instead of a TUS client, plain `curl` also works:
|
|
326
|
+
```
|
|
327
|
+
FILE=app.zip
|
|
328
|
+
SIZE=$(stat -f%z "$FILE") # stat -c%s on Linux
|
|
329
|
+
|
|
330
|
+
curl -i -X POST "{url}/${FILE}?override=true" \
|
|
331
|
+
-H "X-Auth: {auth_key}" \
|
|
332
|
+
-H "X-Auth-Rest: {rest_auth_key}" \
|
|
333
|
+
-H "Tus-Resumable: 1.0.0" \
|
|
334
|
+
-H "Upload-Length: ${SIZE}" \
|
|
335
|
+
-H "Upload-Offset: 0"
|
|
336
|
+
# -> 201 Created
|
|
337
|
+
|
|
338
|
+
curl -i -X PATCH "{url}/${FILE}?override=true" \
|
|
339
|
+
-H "X-Auth: {auth_key}" \
|
|
340
|
+
-H "X-Auth-Rest: {rest_auth_key}" \
|
|
341
|
+
-H "Tus-Resumable: 1.0.0" \
|
|
342
|
+
-H "Content-Type: application/offset+octet-stream" \
|
|
343
|
+
-H "Upload-Offset: 0" \
|
|
344
|
+
--data-binary "@${FILE}"
|
|
345
|
+
# -> 204 No Content, Upload-Offset response header equals SIZE when done
|
|
346
|
+
```
|
|
347
|
+
*/
|
|
348
|
+
"agency-hosting_generateUploadURLV1": {
|
|
349
|
+
params: {
|
|
350
|
+
/**
|
|
351
|
+
* Agency Plan website UID
|
|
352
|
+
*/
|
|
353
|
+
website_uid: string;
|
|
354
|
+
};
|
|
355
|
+
response: any; // Response structure will depend on the API
|
|
356
|
+
};
|
|
357
|
+
|
|
309
358
|
/**
|
|
310
359
|
* Imports an Agency Plan website from an already-uploaded archive.
|
|
311
360
|
|
|
@@ -2977,6 +3026,59 @@ Skip this verification when using Hostinger's free subdomains (*.hostingersite.c
|
|
|
2977
3026
|
response: any; // Response structure will depend on the API
|
|
2978
3027
|
};
|
|
2979
3028
|
|
|
3029
|
+
/**
|
|
3030
|
+
* Generate a file browser upload URL with authentication credentials
|
|
3031
|
+
for uploading files directly to a website's file storage.
|
|
3032
|
+
|
|
3033
|
+
Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the
|
|
3034
|
+
website's `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0).
|
|
3035
|
+
Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request
|
|
3036
|
+
below.
|
|
3037
|
+
|
|
3038
|
+
1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers
|
|
3039
|
+
`upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`.
|
|
3040
|
+
2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or
|
|
3041
|
+
`PATCH` requests with an `upload-offset` header tracking progress) until complete.
|
|
3042
|
+
|
|
3043
|
+
`relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`.
|
|
3044
|
+
|
|
3045
|
+
Instead of a TUS client, plain `curl` also works:
|
|
3046
|
+
```
|
|
3047
|
+
FILE=app.zip
|
|
3048
|
+
SIZE=$(stat -f%z "$FILE") # stat -c%s on Linux
|
|
3049
|
+
|
|
3050
|
+
curl -i -X POST "{url}/${FILE}?override=true" \
|
|
3051
|
+
-H "X-Auth: {auth_key}" \
|
|
3052
|
+
-H "X-Auth-Rest: {rest_auth_key}" \
|
|
3053
|
+
-H "Tus-Resumable: 1.0.0" \
|
|
3054
|
+
-H "Upload-Length: ${SIZE}" \
|
|
3055
|
+
-H "Upload-Offset: 0"
|
|
3056
|
+
# -> 201 Created
|
|
3057
|
+
|
|
3058
|
+
curl -i -X PATCH "{url}/${FILE}?override=true" \
|
|
3059
|
+
-H "X-Auth: {auth_key}" \
|
|
3060
|
+
-H "X-Auth-Rest: {rest_auth_key}" \
|
|
3061
|
+
-H "Tus-Resumable: 1.0.0" \
|
|
3062
|
+
-H "Content-Type: application/offset+octet-stream" \
|
|
3063
|
+
-H "Upload-Offset: 0" \
|
|
3064
|
+
--data-binary "@${FILE}"
|
|
3065
|
+
# -> 204 No Content, Upload-Offset response header equals SIZE when done
|
|
3066
|
+
```
|
|
3067
|
+
*/
|
|
3068
|
+
"hosting_generateUploadURLV1": {
|
|
3069
|
+
params: {
|
|
3070
|
+
/**
|
|
3071
|
+
* Account username
|
|
3072
|
+
*/
|
|
3073
|
+
username: string;
|
|
3074
|
+
/**
|
|
3075
|
+
* Website domain
|
|
3076
|
+
*/
|
|
3077
|
+
domain: string;
|
|
3078
|
+
};
|
|
3079
|
+
response: any; // Response structure will depend on the API
|
|
3080
|
+
};
|
|
3081
|
+
|
|
2980
3082
|
/**
|
|
2981
3083
|
* List files and directories under a website's document root.
|
|
2982
3084
|
|
|
@@ -3082,9 +3184,79 @@ Use the `uuid` from a build to poll its output via the `Get Node.js Build Logs`
|
|
|
3082
3184
|
response: any; // Response structure will depend on the API
|
|
3083
3185
|
};
|
|
3084
3186
|
|
|
3187
|
+
/**
|
|
3188
|
+
* Start a Node.js build process using files already present on the website's file storage.
|
|
3189
|
+
|
|
3190
|
+
WARNING: on success this overwrites the website's existing contents and cannot be
|
|
3191
|
+
undone — verify this is intended before calling this endpoint.
|
|
3192
|
+
|
|
3193
|
+
The `source_type` must be `archive` and `source_options.archive_path` must point to an
|
|
3194
|
+
existing archive file on the server (relative to the website document root).
|
|
3195
|
+
Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first.
|
|
3196
|
+
|
|
3197
|
+
To auto-detect build settings from an archive before starting, first call the
|
|
3198
|
+
`Get Node.js Build Settings from Archive` endpoint. To upload an archive and start
|
|
3199
|
+
a build in one step, use the `Create Node.js Build from Archive` endpoint instead.
|
|
3200
|
+
|
|
3201
|
+
The returned build `uuid` can be used to poll progress and retrieve logs via
|
|
3202
|
+
the `Get Node.js Build Logs` endpoint.
|
|
3203
|
+
*/
|
|
3204
|
+
"hosting_startNode_jsBuildV1": {
|
|
3205
|
+
params: {
|
|
3206
|
+
/**
|
|
3207
|
+
* username parameter
|
|
3208
|
+
*/
|
|
3209
|
+
username: string;
|
|
3210
|
+
/**
|
|
3211
|
+
* Domain name
|
|
3212
|
+
*/
|
|
3213
|
+
domain: string;
|
|
3214
|
+
/**
|
|
3215
|
+
* Node.js version
|
|
3216
|
+
*/
|
|
3217
|
+
node_version: number;
|
|
3218
|
+
/**
|
|
3219
|
+
* Node.js application type
|
|
3220
|
+
*/
|
|
3221
|
+
app_type: string;
|
|
3222
|
+
/**
|
|
3223
|
+
* Application root directory (where package.json is located) relative to public_html
|
|
3224
|
+
*/
|
|
3225
|
+
root_directory: string;
|
|
3226
|
+
/**
|
|
3227
|
+
* Build output directory relative to the root directory
|
|
3228
|
+
*/
|
|
3229
|
+
output_directory: string;
|
|
3230
|
+
/**
|
|
3231
|
+
* Build script that will be ran to build the application
|
|
3232
|
+
*/
|
|
3233
|
+
build_script: string;
|
|
3234
|
+
/**
|
|
3235
|
+
* The main entry point file for the application
|
|
3236
|
+
*/
|
|
3237
|
+
entry_file?: string;
|
|
3238
|
+
/**
|
|
3239
|
+
* Package manager
|
|
3240
|
+
*/
|
|
3241
|
+
package_manager?: string;
|
|
3242
|
+
/**
|
|
3243
|
+
* The source type of the files
|
|
3244
|
+
*/
|
|
3245
|
+
source_type: string;
|
|
3246
|
+
/**
|
|
3247
|
+
* Source-specific options
|
|
3248
|
+
*/
|
|
3249
|
+
source_options: object;
|
|
3250
|
+
};
|
|
3251
|
+
response: any; // Response structure will depend on the API
|
|
3252
|
+
};
|
|
3253
|
+
|
|
3085
3254
|
/**
|
|
3086
3255
|
* Upload a project archive, auto-detect build settings, and immediately start a Node.js build.
|
|
3087
3256
|
|
|
3257
|
+
WARNING: on success this overwrites the website's existing contents and cannot be
|
|
3258
|
+
undone — verify this is intended before calling this endpoint.
|
|
3259
|
+
|
|
3088
3260
|
This is the recommended single-step approach for deploying a Node.js application.
|
|
3089
3261
|
The archive is uploaded to the website's file storage, build settings are auto-detected
|
|
3090
3262
|
from the package.json inside the archive, and the build process starts automatically.
|
|
@@ -3150,6 +3322,36 @@ the `Get Node.js Build Logs` endpoint.
|
|
|
3150
3322
|
response: any; // Response structure will depend on the API
|
|
3151
3323
|
};
|
|
3152
3324
|
|
|
3325
|
+
/**
|
|
3326
|
+
* Auto-detect Node.js build settings from a package.json inside an archive already on the server.
|
|
3327
|
+
|
|
3328
|
+
Use this before calling `Start Node.js Build` to preview what settings will be used,
|
|
3329
|
+
or to let the user review and override values (framework, node version, root directory,
|
|
3330
|
+
output directory, build script) before committing to a build.
|
|
3331
|
+
|
|
3332
|
+
The archive must already be present on the website's file storage. Use the
|
|
3333
|
+
`Generate Upload URL` endpoint to obtain credentials and upload the archive first.
|
|
3334
|
+
To upload an archive and start a build in one step without inspecting settings first,
|
|
3335
|
+
use the `Create Node.js Build from Archive` endpoint instead.
|
|
3336
|
+
*/
|
|
3337
|
+
"hosting_getNode_jsBuildSettingsFromArchiveV1": {
|
|
3338
|
+
params: {
|
|
3339
|
+
/**
|
|
3340
|
+
* username parameter
|
|
3341
|
+
*/
|
|
3342
|
+
username: string;
|
|
3343
|
+
/**
|
|
3344
|
+
* Domain name
|
|
3345
|
+
*/
|
|
3346
|
+
domain: string;
|
|
3347
|
+
/**
|
|
3348
|
+
* The path to the archive file relative to the document root of the vhost
|
|
3349
|
+
*/
|
|
3350
|
+
archive_path: string;
|
|
3351
|
+
};
|
|
3352
|
+
response: any; // Response structure will depend on the API
|
|
3353
|
+
};
|
|
3354
|
+
|
|
3153
3355
|
/**
|
|
3154
3356
|
* Retrieve logs from a specific Node.js build process.
|
|
3155
3357
|
|
|
@@ -3590,6 +3792,38 @@ websites list endpoint to see when your new website becomes available.
|
|
|
3590
3792
|
response: any; // Response structure will depend on the API
|
|
3591
3793
|
};
|
|
3592
3794
|
|
|
3795
|
+
/**
|
|
3796
|
+
* Deploy a static application from an archive file.
|
|
3797
|
+
|
|
3798
|
+
WARNING: this overwrites the website's existing contents and cannot be undone —
|
|
3799
|
+
verify this is intended before calling this endpoint.
|
|
3800
|
+
|
|
3801
|
+
This endpoint allows you to deploy a static application from an archive
|
|
3802
|
+
file that has been uploaded to the website's directory.
|
|
3803
|
+
|
|
3804
|
+
This only works for static sites (pre-built HTML/CSS/JS with no build step). For
|
|
3805
|
+
Node.js applications, use `Create NodeJS build from archive` instead, or
|
|
3806
|
+
`Start Node.js build` if the archive is already uploaded. For WordPress sites,
|
|
3807
|
+
use `Import WordPress website`.
|
|
3808
|
+
*/
|
|
3809
|
+
"hosting_deployStaticSiteArchiveV1": {
|
|
3810
|
+
params: {
|
|
3811
|
+
/**
|
|
3812
|
+
* username parameter
|
|
3813
|
+
*/
|
|
3814
|
+
username: string;
|
|
3815
|
+
/**
|
|
3816
|
+
* Domain name
|
|
3817
|
+
*/
|
|
3818
|
+
domain: string;
|
|
3819
|
+
/**
|
|
3820
|
+
* Relative path to the archive file from website root directory
|
|
3821
|
+
*/
|
|
3822
|
+
archive_path: string;
|
|
3823
|
+
};
|
|
3824
|
+
response: any; // Response structure will depend on the API
|
|
3825
|
+
};
|
|
3826
|
+
|
|
3593
3827
|
/**
|
|
3594
3828
|
* This endpoint permanently removes a website and all of its data. This action
|
|
3595
3829
|
cannot be undone. Before calling it, make sure the user understands the
|
|
@@ -7129,6 +7363,37 @@ detected installations once the scan completes.
|
|
|
7129
7363
|
response: any; // Response structure will depend on the API
|
|
7130
7364
|
};
|
|
7131
7365
|
|
|
7366
|
+
/**
|
|
7367
|
+
* Import WordPress website to the specified domain.
|
|
7368
|
+
|
|
7369
|
+
WARNING: this overwrites the website's existing contents and cannot be undone —
|
|
7370
|
+
verify this is intended before calling this endpoint.
|
|
7371
|
+
|
|
7372
|
+
This endpoint allows you to import a WordPress website from archive and
|
|
7373
|
+
database files that have been uploaded to the website's directory.
|
|
7374
|
+
*/
|
|
7375
|
+
"hosting_importWordPressWebsiteV1": {
|
|
7376
|
+
params: {
|
|
7377
|
+
/**
|
|
7378
|
+
* username parameter
|
|
7379
|
+
*/
|
|
7380
|
+
username: string;
|
|
7381
|
+
/**
|
|
7382
|
+
* Domain name
|
|
7383
|
+
*/
|
|
7384
|
+
domain: string;
|
|
7385
|
+
/**
|
|
7386
|
+
* Path to the WordPress archive file (relative to website root)
|
|
7387
|
+
*/
|
|
7388
|
+
archive_path: string;
|
|
7389
|
+
/**
|
|
7390
|
+
* Path to the database SQL file (relative to website root)
|
|
7391
|
+
*/
|
|
7392
|
+
sql_path: string;
|
|
7393
|
+
};
|
|
7394
|
+
response: any; // Response structure will depend on the API
|
|
7395
|
+
};
|
|
7396
|
+
|
|
7132
7397
|
/**
|
|
7133
7398
|
* Install WordPress on an existing website.
|
|
7134
7399
|
|
|
@@ -7521,6 +7786,34 @@ deactivation job has been queued.
|
|
|
7521
7786
|
response: any; // Response structure will depend on the API
|
|
7522
7787
|
};
|
|
7523
7788
|
|
|
7789
|
+
/**
|
|
7790
|
+
* Deploy a WordPress plugin from an already uploaded directory.
|
|
7791
|
+
|
|
7792
|
+
This endpoint allows you to deploy a WordPress plugin that has been uploaded to the website's directory.
|
|
7793
|
+
The plugin will be activated and made available in the WordPress admin panel.
|
|
7794
|
+
*/
|
|
7795
|
+
"hosting_deployWordPressPluginV1": {
|
|
7796
|
+
params: {
|
|
7797
|
+
/**
|
|
7798
|
+
* username parameter
|
|
7799
|
+
*/
|
|
7800
|
+
username: string;
|
|
7801
|
+
/**
|
|
7802
|
+
* Domain name
|
|
7803
|
+
*/
|
|
7804
|
+
domain: string;
|
|
7805
|
+
/**
|
|
7806
|
+
* Slug of the plugin
|
|
7807
|
+
*/
|
|
7808
|
+
slug: string;
|
|
7809
|
+
/**
|
|
7810
|
+
* Relative path to the plugin directory from wp-content/plugins
|
|
7811
|
+
*/
|
|
7812
|
+
plugin_path: string;
|
|
7813
|
+
};
|
|
7814
|
+
response: any; // Response structure will depend on the API
|
|
7815
|
+
};
|
|
7816
|
+
|
|
7524
7817
|
/**
|
|
7525
7818
|
* Install one or more plugins on an existing WordPress installation.
|
|
7526
7819
|
|
|
@@ -7751,6 +8044,38 @@ job has been queued.
|
|
|
7751
8044
|
response: any; // Response structure will depend on the API
|
|
7752
8045
|
};
|
|
7753
8046
|
|
|
8047
|
+
/**
|
|
8048
|
+
* Deploy a WordPress theme from an already uploaded directory.
|
|
8049
|
+
|
|
8050
|
+
This endpoint allows you to deploy a WordPress theme that has been uploaded to the website's directory.
|
|
8051
|
+
The theme can be optionally activated after deployment.
|
|
8052
|
+
*/
|
|
8053
|
+
"hosting_deployWordPressThemeV1": {
|
|
8054
|
+
params: {
|
|
8055
|
+
/**
|
|
8056
|
+
* username parameter
|
|
8057
|
+
*/
|
|
8058
|
+
username: string;
|
|
8059
|
+
/**
|
|
8060
|
+
* Domain name
|
|
8061
|
+
*/
|
|
8062
|
+
domain: string;
|
|
8063
|
+
/**
|
|
8064
|
+
* Slug of the theme
|
|
8065
|
+
*/
|
|
8066
|
+
slug: string;
|
|
8067
|
+
/**
|
|
8068
|
+
* Relative path to the theme directory from wp-content/themes
|
|
8069
|
+
*/
|
|
8070
|
+
theme_path: string;
|
|
8071
|
+
/**
|
|
8072
|
+
* Whether to activate the theme after deployment
|
|
8073
|
+
*/
|
|
8074
|
+
is_activated?: boolean;
|
|
8075
|
+
};
|
|
8076
|
+
response: any; // Response structure will depend on the API
|
|
8077
|
+
};
|
|
8078
|
+
|
|
7754
8079
|
/**
|
|
7755
8080
|
* Install a theme on an existing WordPress installation.
|
|
7756
8081
|
|