hostinger-api-mcp 0.2.4 → 0.2.6
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 +118 -2
- package/package.json +1 -1
- package/src/core/runtime.js +1 -1
- package/src/core/runtime.ts +1 -1
- package/src/core/tools/all.js +397 -0
- package/src/core/tools/all.ts +397 -0
- package/src/core/tools/hosting.js +397 -0
- package/src/core/tools/hosting.ts +397 -0
- 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/hosting.js +1 -1
- package/src/servers/hosting.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/types.d.ts +288 -0
package/types.d.ts
CHANGED
|
@@ -796,6 +796,30 @@ Use this endpoint to view which domains use specific contact profiles.
|
|
|
796
796
|
response: any; // Response structure will depend on the API
|
|
797
797
|
};
|
|
798
798
|
|
|
799
|
+
/**
|
|
800
|
+
* Changes the password for the specified database user.
|
|
801
|
+
|
|
802
|
+
The database name must be the full name returned by the list databases endpoint.
|
|
803
|
+
The password must also be updated in any website configuration that uses this database.
|
|
804
|
+
*/
|
|
805
|
+
"hosting_changeDatabasePasswordV1": {
|
|
806
|
+
params: {
|
|
807
|
+
/**
|
|
808
|
+
* username parameter
|
|
809
|
+
*/
|
|
810
|
+
username: string;
|
|
811
|
+
/**
|
|
812
|
+
* Full database name as returned by the list databases endpoint.
|
|
813
|
+
*/
|
|
814
|
+
name: string;
|
|
815
|
+
/**
|
|
816
|
+
* New database user password.
|
|
817
|
+
*/
|
|
818
|
+
password: string;
|
|
819
|
+
};
|
|
820
|
+
response: any; // Response structure will depend on the API
|
|
821
|
+
};
|
|
822
|
+
|
|
799
823
|
/**
|
|
800
824
|
* Returns a paginated list of databases for the specified account.
|
|
801
825
|
|
|
@@ -881,6 +905,46 @@ The database name must be the full name returned by the list databases endpoint.
|
|
|
881
905
|
response: any; // Response structure will depend on the API
|
|
882
906
|
};
|
|
883
907
|
|
|
908
|
+
/**
|
|
909
|
+
* Repairs corrupted database tables asynchronously.
|
|
910
|
+
|
|
911
|
+
Use when database errors, crashes, or corruption are reported.
|
|
912
|
+
The database name must be the full name returned by the list databases endpoint.
|
|
913
|
+
*/
|
|
914
|
+
"hosting_repairDatabaseV1": {
|
|
915
|
+
params: {
|
|
916
|
+
/**
|
|
917
|
+
* username parameter
|
|
918
|
+
*/
|
|
919
|
+
username: string;
|
|
920
|
+
/**
|
|
921
|
+
* Full database name as returned by the list databases endpoint.
|
|
922
|
+
*/
|
|
923
|
+
name: string;
|
|
924
|
+
};
|
|
925
|
+
response: any; // Response structure will depend on the API
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
/**
|
|
929
|
+
* Returns a direct sign-on link to phpMyAdmin for the specified database.
|
|
930
|
+
|
|
931
|
+
Use this when a visual database interface is needed for SQL queries, imports, exports, or table management.
|
|
932
|
+
The database name must be the full name returned by the list databases endpoint.
|
|
933
|
+
*/
|
|
934
|
+
"hosting_getPhpMyAdminLinkV1": {
|
|
935
|
+
params: {
|
|
936
|
+
/**
|
|
937
|
+
* username parameter
|
|
938
|
+
*/
|
|
939
|
+
username: string;
|
|
940
|
+
/**
|
|
941
|
+
* Full database name as returned by the list databases endpoint.
|
|
942
|
+
*/
|
|
943
|
+
name: string;
|
|
944
|
+
};
|
|
945
|
+
response: any; // Response structure will depend on the API
|
|
946
|
+
};
|
|
947
|
+
|
|
884
948
|
/**
|
|
885
949
|
* Retrieve a list of datacenters available for setting up hosting plans
|
|
886
950
|
based on available datacenter capacity and hosting plan of your order.
|
|
@@ -1071,6 +1135,137 @@ Skip this verification when using Hostinger's free subdomains (*.hostingersite.c
|
|
|
1071
1135
|
response: any; // Response structure will depend on the API
|
|
1072
1136
|
};
|
|
1073
1137
|
|
|
1138
|
+
/**
|
|
1139
|
+
* Retrieve a paginated list of Node.js build processes for a specific website.
|
|
1140
|
+
|
|
1141
|
+
Each build represents a single run of the Node.js build pipeline. Use the `states`
|
|
1142
|
+
query parameter to filter results by build state (pending, running, completed, failed).
|
|
1143
|
+
Use the `uuid` from a build to poll its output via the `Get Node.js Build Logs` endpoint.
|
|
1144
|
+
*/
|
|
1145
|
+
"hosting_listNode.jsBuildsV1": {
|
|
1146
|
+
params: {
|
|
1147
|
+
/**
|
|
1148
|
+
* username parameter
|
|
1149
|
+
*/
|
|
1150
|
+
username: string;
|
|
1151
|
+
/**
|
|
1152
|
+
* Domain name
|
|
1153
|
+
*/
|
|
1154
|
+
domain: string;
|
|
1155
|
+
/**
|
|
1156
|
+
* Page number
|
|
1157
|
+
*/
|
|
1158
|
+
page?: number;
|
|
1159
|
+
/**
|
|
1160
|
+
* Number of items per page
|
|
1161
|
+
*/
|
|
1162
|
+
per_page?: number;
|
|
1163
|
+
/**
|
|
1164
|
+
* Build states to filter by
|
|
1165
|
+
*/
|
|
1166
|
+
states?: array;
|
|
1167
|
+
};
|
|
1168
|
+
response: any; // Response structure will depend on the API
|
|
1169
|
+
};
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Upload a project archive, auto-detect build settings, and immediately start a Node.js build.
|
|
1173
|
+
|
|
1174
|
+
This is the recommended single-step approach for deploying a Node.js application.
|
|
1175
|
+
The archive is uploaded to the website's file storage, build settings are auto-detected
|
|
1176
|
+
from the package.json inside the archive, and the build process starts automatically.
|
|
1177
|
+
Optional override fields take precedence over auto-detected values.
|
|
1178
|
+
Maximum archive size is 50MB.
|
|
1179
|
+
|
|
1180
|
+
Before archiving, exclude `node_modules/` and any build output directories
|
|
1181
|
+
(e.g. `dist/`, `.next/`, `build/`) — they are not needed because the build
|
|
1182
|
+
process runs the install step automatically, and including them unnecessarily
|
|
1183
|
+
increases the archive size. This also helps keep the archive well under the 50MB limit.
|
|
1184
|
+
|
|
1185
|
+
Example (zip):
|
|
1186
|
+
```
|
|
1187
|
+
zip -r archive.zip . --exclude "node_modules/*" --exclude "dist/*"
|
|
1188
|
+
```
|
|
1189
|
+
|
|
1190
|
+
The returned build `uuid` can be used to poll progress and retrieve logs via
|
|
1191
|
+
the `Get Node.js Build Logs` endpoint.
|
|
1192
|
+
*/
|
|
1193
|
+
"hosting_createNode.jsBuildFromArchiveV1": {
|
|
1194
|
+
params: {
|
|
1195
|
+
/**
|
|
1196
|
+
* username parameter
|
|
1197
|
+
*/
|
|
1198
|
+
username: string;
|
|
1199
|
+
/**
|
|
1200
|
+
* Domain name
|
|
1201
|
+
*/
|
|
1202
|
+
domain: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* Project archive file (.zip, .tar.gz, or .tgz), maximum 50MB
|
|
1205
|
+
*/
|
|
1206
|
+
archive: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* Node.js version override (auto-detected from package.json if omitted)
|
|
1209
|
+
*/
|
|
1210
|
+
node_version?: number;
|
|
1211
|
+
/**
|
|
1212
|
+
* Node.js application type override
|
|
1213
|
+
*/
|
|
1214
|
+
app_type?: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* Application root directory override (where package.json is located) relative to public_html
|
|
1217
|
+
*/
|
|
1218
|
+
root_directory?: string;
|
|
1219
|
+
/**
|
|
1220
|
+
* Build output directory override relative to the root directory
|
|
1221
|
+
*/
|
|
1222
|
+
output_directory?: string;
|
|
1223
|
+
/**
|
|
1224
|
+
* Build script override
|
|
1225
|
+
*/
|
|
1226
|
+
build_script?: string;
|
|
1227
|
+
/**
|
|
1228
|
+
* Main entry point file override
|
|
1229
|
+
*/
|
|
1230
|
+
entry_file?: string;
|
|
1231
|
+
/**
|
|
1232
|
+
* Package manager override
|
|
1233
|
+
*/
|
|
1234
|
+
package_manager?: string;
|
|
1235
|
+
};
|
|
1236
|
+
response: any; // Response structure will depend on the API
|
|
1237
|
+
};
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Retrieve logs from a specific Node.js build process.
|
|
1241
|
+
|
|
1242
|
+
To stream live output while a build is running, poll this endpoint repeatedly
|
|
1243
|
+
while the build state is `running`, passing the previously returned `lines` count
|
|
1244
|
+
as `from_line` to fetch only new output since the last call.
|
|
1245
|
+
Log content may contain ANSI escape sequences (color codes).
|
|
1246
|
+
*/
|
|
1247
|
+
"hosting_getNode.jsBuildLogsV1": {
|
|
1248
|
+
params: {
|
|
1249
|
+
/**
|
|
1250
|
+
* username parameter
|
|
1251
|
+
*/
|
|
1252
|
+
username: string;
|
|
1253
|
+
/**
|
|
1254
|
+
* Domain name
|
|
1255
|
+
*/
|
|
1256
|
+
domain: string;
|
|
1257
|
+
/**
|
|
1258
|
+
* Build UUID
|
|
1259
|
+
*/
|
|
1260
|
+
uuid: string;
|
|
1261
|
+
/**
|
|
1262
|
+
* Line from which to start retrieving logs
|
|
1263
|
+
*/
|
|
1264
|
+
from_line?: number;
|
|
1265
|
+
};
|
|
1266
|
+
response: any; // Response structure will depend on the API
|
|
1267
|
+
};
|
|
1268
|
+
|
|
1074
1269
|
/**
|
|
1075
1270
|
* Retrieve a paginated list of orders accessible to the authenticated client.
|
|
1076
1271
|
|
|
@@ -1173,6 +1368,99 @@ websites list endpoint to see when your new website becomes available.
|
|
|
1173
1368
|
response: any; // Response structure will depend on the API
|
|
1174
1369
|
};
|
|
1175
1370
|
|
|
1371
|
+
/**
|
|
1372
|
+
* Install WordPress on an existing website.
|
|
1373
|
+
|
|
1374
|
+
The website must already exist before calling this endpoint. To create a new
|
|
1375
|
+
website first, use POST /api/hosting/v1/websites and poll
|
|
1376
|
+
GET /api/hosting/v1/websites until it appears.
|
|
1377
|
+
|
|
1378
|
+
Call GET /api/hosting/v1/wordpress/installations filtered by username and
|
|
1379
|
+
domain before proceeding to check whether WordPress is already installed on
|
|
1380
|
+
the target domain/path. If WordPress already exists and `overwrite` is false
|
|
1381
|
+
(the default), the async job will fail.
|
|
1382
|
+
|
|
1383
|
+
This operation is asynchronous: a successful response only means the install
|
|
1384
|
+
job has been queued, not that WordPress is ready. Installation typically
|
|
1385
|
+
takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations filtered
|
|
1386
|
+
by username and domain to track progress. When the installation appears in
|
|
1387
|
+
that list, WordPress is ready.
|
|
1388
|
+
*/
|
|
1389
|
+
"hosting_installWordPressV1": {
|
|
1390
|
+
params: {
|
|
1391
|
+
/**
|
|
1392
|
+
* username parameter
|
|
1393
|
+
*/
|
|
1394
|
+
username: string;
|
|
1395
|
+
/**
|
|
1396
|
+
* Domain of the existing website where WordPress will be installed
|
|
1397
|
+
*/
|
|
1398
|
+
domain: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* Title of the WordPress site
|
|
1401
|
+
*/
|
|
1402
|
+
site_title: string;
|
|
1403
|
+
/**
|
|
1404
|
+
* WordPress locale. Defaults to en_US when omitted.
|
|
1405
|
+
*/
|
|
1406
|
+
language?: string;
|
|
1407
|
+
/**
|
|
1408
|
+
* Relative directory to install WordPress into. Defaults to the website root when omitted.
|
|
1409
|
+
*/
|
|
1410
|
+
directory?: string;
|
|
1411
|
+
/**
|
|
1412
|
+
* When false (default), does not replace an existing installation. If WordPress is already installed on the domain/path, the async install job fails unless true.
|
|
1413
|
+
*/
|
|
1414
|
+
overwrite?: boolean;
|
|
1415
|
+
/**
|
|
1416
|
+
* WordPress core auto-update policy
|
|
1417
|
+
*/
|
|
1418
|
+
auto_updates?: string;
|
|
1419
|
+
/**
|
|
1420
|
+
* WordPress core version to install. If omitted, the latest core version compatible with the account vhost PHP version is selected.
|
|
1421
|
+
*/
|
|
1422
|
+
version?: string;
|
|
1423
|
+
/**
|
|
1424
|
+
* WordPress admin credentials
|
|
1425
|
+
*/
|
|
1426
|
+
credentials: object;
|
|
1427
|
+
/**
|
|
1428
|
+
* Optional. If the named database already exists, it will be used for this WordPress install. Otherwise a new database is created with a generated name and random credentials.
|
|
1429
|
+
*/
|
|
1430
|
+
database?: object;
|
|
1431
|
+
};
|
|
1432
|
+
response: any; // Response structure will depend on the API
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* List WordPress installations accessible to the authenticated client.
|
|
1437
|
+
|
|
1438
|
+
Use this endpoint to discover existing WordPress installations and to poll
|
|
1439
|
+
for installation status after calling the install endpoint. When a newly
|
|
1440
|
+
requested installation appears in this list, WordPress is ready. Filter by
|
|
1441
|
+
username and domain to narrow results to a specific website.
|
|
1442
|
+
|
|
1443
|
+
Each installation includes a `valid` flag and, when invalid, a
|
|
1444
|
+
`validationError` describing why.
|
|
1445
|
+
*/
|
|
1446
|
+
"hosting_listWordPressInstallationsV1": {
|
|
1447
|
+
params: {
|
|
1448
|
+
/**
|
|
1449
|
+
* Filter by specific username
|
|
1450
|
+
*/
|
|
1451
|
+
username?: string;
|
|
1452
|
+
/**
|
|
1453
|
+
* Filter by domain name (exact match)
|
|
1454
|
+
*/
|
|
1455
|
+
domain?: string;
|
|
1456
|
+
/**
|
|
1457
|
+
* Filter by ownership type. Defaults to "owned". Use "all" to include both owned and managed installations.
|
|
1458
|
+
*/
|
|
1459
|
+
ownership?: string;
|
|
1460
|
+
};
|
|
1461
|
+
response: any; // Response structure will depend on the API
|
|
1462
|
+
};
|
|
1463
|
+
|
|
1176
1464
|
/**
|
|
1177
1465
|
* Delete a contact with the specified UUID.
|
|
1178
1466
|
|