@spacefast/wpcloud-sdk 0.0.2

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.
Files changed (59) hide show
  1. package/README.md +38 -0
  2. package/dist/fake/index.d.ts +4 -0
  3. package/dist/fake/index.d.ts.map +1 -0
  4. package/dist/fake/index.js +3 -0
  5. package/dist/fake/router.d.ts +17 -0
  6. package/dist/fake/router.d.ts.map +1 -0
  7. package/dist/fake/router.js +188 -0
  8. package/dist/fake/server.d.ts +10 -0
  9. package/dist/fake/server.d.ts.map +1 -0
  10. package/dist/fake/server.js +62 -0
  11. package/dist/fake/store.d.ts +67 -0
  12. package/dist/fake/store.d.ts.map +1 -0
  13. package/dist/fake/store.js +174 -0
  14. package/dist/generated/client/client.gen.d.ts +3 -0
  15. package/dist/generated/client/client.gen.d.ts.map +1 -0
  16. package/dist/generated/client/client.gen.js +216 -0
  17. package/dist/generated/client/index.d.ts +8 -0
  18. package/dist/generated/client/index.d.ts.map +1 -0
  19. package/dist/generated/client/index.js +5 -0
  20. package/dist/generated/client/types.gen.d.ts +125 -0
  21. package/dist/generated/client/types.gen.d.ts.map +1 -0
  22. package/dist/generated/client/types.gen.js +2 -0
  23. package/dist/generated/client/utils.gen.d.ts +39 -0
  24. package/dist/generated/client/utils.gen.d.ts.map +1 -0
  25. package/dist/generated/client/utils.gen.js +228 -0
  26. package/dist/generated/client.gen.d.ts +13 -0
  27. package/dist/generated/client.gen.d.ts.map +1 -0
  28. package/dist/generated/client.gen.js +7 -0
  29. package/dist/generated/core/auth.gen.d.ts +19 -0
  30. package/dist/generated/core/auth.gen.d.ts.map +1 -0
  31. package/dist/generated/core/auth.gen.js +14 -0
  32. package/dist/generated/core/bodySerializer.gen.d.ts +18 -0
  33. package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
  34. package/dist/generated/core/bodySerializer.gen.js +57 -0
  35. package/dist/generated/core/params.gen.d.ts +34 -0
  36. package/dist/generated/core/params.gen.d.ts.map +1 -0
  37. package/dist/generated/core/params.gen.js +88 -0
  38. package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
  39. package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
  40. package/dist/generated/core/pathSerializer.gen.js +106 -0
  41. package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
  42. package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  43. package/dist/generated/core/serverSentEvents.gen.js +131 -0
  44. package/dist/generated/core/types.gen.d.ts +79 -0
  45. package/dist/generated/core/types.gen.d.ts.map +1 -0
  46. package/dist/generated/core/types.gen.js +2 -0
  47. package/dist/generated/core/utils.gen.d.ts +15 -0
  48. package/dist/generated/core/utils.gen.d.ts.map +1 -0
  49. package/dist/generated/core/utils.gen.js +69 -0
  50. package/dist/generated/sdk.gen.d.ts +840 -0
  51. package/dist/generated/sdk.gen.d.ts.map +1 -0
  52. package/dist/generated/sdk.gen.js +2198 -0
  53. package/dist/generated/types.gen.d.ts +7970 -0
  54. package/dist/generated/types.gen.d.ts.map +1 -0
  55. package/dist/generated/types.gen.js +2 -0
  56. package/dist/runtime.d.ts +24 -0
  57. package/dist/runtime.d.ts.map +1 -0
  58. package/dist/runtime.js +486 -0
  59. package/package.json +36 -0
@@ -0,0 +1,2198 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { urlSearchParamsBodySerializer, } from "./client";
3
+ import { client as _heyApiClient } from "./client.gen";
4
+ /**
5
+ * Activate a Staged Custom Certificate
6
+ * Activate a previously staged custom SSL certificate for use on one or more domains.
7
+ */
8
+ export const postCustomCertificatesSiteCustomCertificateIdActivate = (options) => {
9
+ return (options.client ?? _heyApiClient).post({
10
+ ...urlSearchParamsBodySerializer,
11
+ security: [
12
+ {
13
+ name: "auth",
14
+ type: "apiKey",
15
+ },
16
+ ],
17
+ url: "/custom-certificates/{site}/{custom_certificate_id}/activate",
18
+ ...options,
19
+ headers: {
20
+ "Content-Type": "application/x-www-form-urlencoded",
21
+ ...options.headers,
22
+ },
23
+ });
24
+ };
25
+ /**
26
+ * Add Client Meta
27
+ * Add a new client meta value.
28
+ *
29
+ * Note: `max_space_quota` is read-only and cannot be added.
30
+ */
31
+ export const postClientMetaClientKeyAdd = (options) => {
32
+ return (options.client ?? _heyApiClient).post({
33
+ ...urlSearchParamsBodySerializer,
34
+ security: [
35
+ {
36
+ name: "auth",
37
+ type: "apiKey",
38
+ },
39
+ ],
40
+ url: "/client-meta/{client}/{key}/add",
41
+ ...options,
42
+ headers: {
43
+ "Content-Type": "application/x-www-form-urlencoded",
44
+ ...options.headers,
45
+ },
46
+ });
47
+ };
48
+ /**
49
+ * Add Cron Entry
50
+ * Adds a cron entry for a site.
51
+ *
52
+ * A cron entry runs a `command` on the site according to a given `schedule`.
53
+ *
54
+ * A `schedule` is defined using the literals `hourly`, `daily`, `twicedaily` or `weekly`. Shorthand formats are also supported, such as `2h` (twice per hour), `6d` (six times per day), and `3w` (three times per week).
55
+ *
56
+ * If the site or client supports the advanced cron feature, the `schedule` may be specified as a full crontab expression. For example, `*\/2 * * * *` runs every two minutes.
57
+ *
58
+ * The `command` is executed in an environment similar to an SSH, with utilities such as WP-CLI available. Shell scripts may be used for more complex logic or multi-step commands.
59
+ *
60
+ * There are time and concurrency limits for cron entries:
61
+ *
62
+ * - Each cron entry has a maximum runtime of 8 hours.
63
+ * - A cron entry is skipped if its previous execution has not finished.
64
+ * - Up to three cron entries can run concurrently per site, additional ones will be postponed.
65
+ *
66
+ * A webhook named `site-cron-results` is sent if execution of a cron entry fails, either by exiting with a non-zero status code or by breaching concurrency limits.
67
+ */
68
+ export const postCrontabSiteAdd = (options) => {
69
+ return (options.client ?? _heyApiClient).post({
70
+ ...urlSearchParamsBodySerializer,
71
+ security: [
72
+ {
73
+ name: "auth",
74
+ type: "apiKey",
75
+ },
76
+ ],
77
+ url: "/crontab/{site}/add",
78
+ ...options,
79
+ headers: {
80
+ "Content-Type": "application/x-www-form-urlencoded",
81
+ ...options.headers,
82
+ },
83
+ });
84
+ };
85
+ /**
86
+ * Add Firewall Rule
87
+ * Add a new firewall rule for a site.
88
+ */
89
+ export const postFirewallRulesSiteAdd = (options) => {
90
+ return (options.client ?? _heyApiClient).post({
91
+ ...urlSearchParamsBodySerializer,
92
+ security: [
93
+ {
94
+ name: "auth",
95
+ type: "apiKey",
96
+ },
97
+ ],
98
+ url: "/firewall-rules/{site}/add",
99
+ ...options,
100
+ headers: {
101
+ "Content-Type": "application/x-www-form-urlencoded",
102
+ ...options.headers,
103
+ },
104
+ });
105
+ };
106
+ /**
107
+ * Add Persistent Site Data
108
+ * Add or remove persistent key-value data for a site. Persistent data is preserved across site resets and clones. Parameters use PHP nested array form encoding: data[key][value]=... to set, data[key][delete]=1 to remove.
109
+ */
110
+ export const postSitePersistDataSite = (options) => {
111
+ return (options.client ?? _heyApiClient).post({
112
+ ...urlSearchParamsBodySerializer,
113
+ security: [
114
+ {
115
+ name: "auth",
116
+ type: "apiKey",
117
+ },
118
+ ],
119
+ url: "/site-persist-data/{site}",
120
+ ...options,
121
+ headers: {
122
+ "Content-Type": "application/x-www-form-urlencoded",
123
+ ...options.headers,
124
+ },
125
+ });
126
+ };
127
+ /**
128
+ * Add Site SSH/SFTP User
129
+ * Create a new SSH/SFTP user for a site. Username must be 5+ characters and not all numbers. Password behavior: omit for random password, empty string for no password (key-only auth), or provide specific password. Allowed key types: ssh-rsa (2048-16384 bits), ecdsa-sha2-nistp256 (256 bits), ssh-ed25519 (256 bits).
130
+ */
131
+ export const postSshUserServiceIdentifierAdd = (options) => {
132
+ return (options.client ?? _heyApiClient).post({
133
+ ...urlSearchParamsBodySerializer,
134
+ security: [
135
+ {
136
+ name: "auth",
137
+ type: "apiKey",
138
+ },
139
+ ],
140
+ url: "/ssh-user/{service}/{identifier}/add",
141
+ ...options,
142
+ headers: {
143
+ "Content-Type": "application/x-www-form-urlencoded",
144
+ ...options.headers,
145
+ },
146
+ });
147
+ };
148
+ /**
149
+ * Configure a site to accept an incoming SSH migration
150
+ * Configure a site to accept an incoming SSH migration. Because an SSH migration, by default is a destructive operation (destroying existing files and database data) you must first configure a site as a migration target before creating a migration for it. In this way you must explicitly signal to us that you accept responsibility for this site and its data being deleted by a migration should one be configured for it. You cannot currently undo this operation.
151
+ */
152
+ export const postSiteAllowSshMigrationSite = (options) => {
153
+ return (options.client ?? _heyApiClient).post({
154
+ security: [
155
+ {
156
+ name: "auth",
157
+ type: "apiKey",
158
+ },
159
+ ],
160
+ url: "/site-allow-ssh-migration/{site}",
161
+ ...options,
162
+ });
163
+ };
164
+ /**
165
+ * Get the current Defensive Mode status.
166
+ * Fetch the current state of Defensive Mode for a site.
167
+ */
168
+ export const getEdgeCacheSiteDdosUntil = (options) => {
169
+ return (options.client ?? _heyApiClient).get({
170
+ security: [
171
+ {
172
+ name: "auth",
173
+ type: "apiKey",
174
+ },
175
+ ],
176
+ url: "/edge-cache/{site}/ddos_until",
177
+ ...options,
178
+ });
179
+ };
180
+ /**
181
+ * Configure Defensive Mode for a site.
182
+ * Enable or disable Defensive Mode for a site.
183
+ */
184
+ export const postEdgeCacheSiteDdosUntil = (options) => {
185
+ return (options.client ?? _heyApiClient).post({
186
+ ...urlSearchParamsBodySerializer,
187
+ security: [
188
+ {
189
+ name: "auth",
190
+ type: "apiKey",
191
+ },
192
+ ],
193
+ url: "/edge-cache/{site}/ddos_until",
194
+ ...options,
195
+ headers: {
196
+ "Content-Type": "application/x-www-form-urlencoded",
197
+ ...options.headers,
198
+ },
199
+ });
200
+ };
201
+ /**
202
+ * Get the current Defensive Mode status.
203
+ * Fetch the current state of Defensive Mode for a site.
204
+ */
205
+ export const getEdgeCacheSiteDdosUntilDomain = (options) => {
206
+ return (options.client ?? _heyApiClient).get({
207
+ security: [
208
+ {
209
+ name: "auth",
210
+ type: "apiKey",
211
+ },
212
+ ],
213
+ url: "/edge-cache/{site}/ddos_until/{domain}",
214
+ ...options,
215
+ });
216
+ };
217
+ /**
218
+ * Configure Defensive Mode for a site.
219
+ * Enable or disable Defensive Mode for a site.
220
+ */
221
+ export const postEdgeCacheSiteDdosUntilDomain = (options) => {
222
+ return (options.client ?? _heyApiClient).post({
223
+ ...urlSearchParamsBodySerializer,
224
+ security: [
225
+ {
226
+ name: "auth",
227
+ type: "apiKey",
228
+ },
229
+ ],
230
+ url: "/edge-cache/{site}/ddos_until/{domain}",
231
+ ...options,
232
+ headers: {
233
+ "Content-Type": "application/x-www-form-urlencoded",
234
+ ...options.headers,
235
+ },
236
+ });
237
+ };
238
+ /**
239
+ * Convert Site Database Character Set
240
+ * Convert a site's tables from a known character set to a specified one.
241
+ */
242
+ export const getSiteConvertDbCharsetServiceIdentifierFromTo = (options) => {
243
+ return (options.client ?? _heyApiClient).get({
244
+ security: [
245
+ {
246
+ name: "auth",
247
+ type: "apiKey",
248
+ },
249
+ ],
250
+ url: "/site-convert-db-charset/{service}/{identifier}/{from}/{to}",
251
+ ...options,
252
+ });
253
+ };
254
+ /**
255
+ * Create or Update Public Key
256
+ * Create or update, as appropriate, an aliasable public key.
257
+ *
258
+ * Assuming your client name is "foo", your category is "bar", and your name is "test-key" this endpoint will create or update the public key at the address 'pub://foo/bar?test-key'
259
+ *
260
+ * Once created you can use 'pub://foo/bar?test-key' as the value for pkey in the ssh-user endpoint and also authorized_keys_line in the client-authorized-keys endpoint. If you do then when you update the referenced key (such as changing the public key, or changing the parsed options) those changes will be immediately reflected by all ssh-user and client-authorized-keys referencing this address.
261
+ *
262
+ * Categories. Categories should be used sparingly, and for the purposes of identifying classes of keys. A good use of categories would be to differentiate between end-user, developer, support, and automation keys. A poor use of categories would be grouping by site-id at scale. Category names are arbitrary, and exist, or not, based on there being keys using them.
263
+ *
264
+ * Names. Names are arbitrary identifiers. A name does not need to make sense to us, though it is helpful when attempting to support you if they do. It is perfectly acceptable to use something like {userid}, {siteid}-{userid}, {userid}-{keynumber}, or whatever else makes sense for your desired operation. It is suggested that some form of immutable ID number or string be used in the name for your aliases to reduce possible confusion when tracking them later on.
265
+ *
266
+ * Scale. It is acceptable to use alias-pkey's for 0% of your public keys, 100% of your public keys, or anywhere in-between. The main draw for using them is updating the referenced key once updates all N references to it at the same time N being 1 is acceptable but, in our opinion, it's usually very likely that that will change at some point.
267
+ *
268
+ * Uniqueness. Keys are unique based on [client,category,name]. Therefor all of the following are completely unique: pub://client-a/employees?jennifer pub://client-a/users?jennifer pub://client-b/users?jennifer
269
+ *
270
+ * Of interest is that it is entirely valid for an ssh-user or client-authorized-key to reference an address belonging to a different client entirely. It is assumed that this will not com up often but an example use case would be for allowing atomic staff access to a site for debugging purposes.
271
+ *
272
+ * Of note is that alias-pkeys cannot reference other alias-pkeys. This may change in the future given a compelling use case but this is not currently planned and there are no known good reasons to start planning.
273
+ *
274
+ * References to an aliasable key are not tracked by atomic. As such removing an aliasable key does not remove references to that address. Likewise removing an aliasable key does not remove objects which reference its address from the system either. If a client should have a use case which requires doing such then the client should plan on tracking where those keys are referenced on their end.
275
+ */
276
+ export const postAliasPkeySetClientCategoryName = (options) => {
277
+ return (options.client ?? _heyApiClient).post({
278
+ ...urlSearchParamsBodySerializer,
279
+ security: [
280
+ {
281
+ name: "auth",
282
+ type: "apiKey",
283
+ },
284
+ ],
285
+ url: "/alias-pkey/set/{client}/{category}/{name}",
286
+ ...options,
287
+ headers: {
288
+ "Content-Type": "application/x-www-form-urlencoded",
289
+ ...options.headers,
290
+ },
291
+ });
292
+ };
293
+ /**
294
+ * Create Site
295
+ * Create a WP Cloud site with the following options.
296
+ */
297
+ export const postCreateSiteClient = (options) => {
298
+ return (options?.client ?? _heyApiClient).post({
299
+ ...urlSearchParamsBodySerializer,
300
+ security: [
301
+ {
302
+ name: "auth",
303
+ type: "apiKey",
304
+ },
305
+ ],
306
+ url: "/create-site/{client}",
307
+ ...options,
308
+ headers: {
309
+ "Content-Type": "application/x-www-form-urlencoded",
310
+ ...options?.headers,
311
+ },
312
+ });
313
+ };
314
+ /**
315
+ * Create Task
316
+ * Create a task that will iterate over all client sites.
317
+ *
318
+ * "software" : Perform changes to site software (plugins and themes).
319
+ *
320
+ * "site-find-files" : Search for files that match the provided pattern. Note that * and ? characters can be used: * will be expanded to (.*) and ? will be expanded to (.)
321
+ *
322
+ * "run-wp-cli-command" : Perform a wp-cli command. Note that the command is limited to a run time of 5 minutes and max memory usage of 1200 MB.
323
+ *
324
+ * "wpcloud-scan" : Run WP Cloud Scan checks across sites.
325
+ */
326
+ export const postTaskCreateClientType = (options) => {
327
+ return (options.client ?? _heyApiClient).post({
328
+ ...urlSearchParamsBodySerializer,
329
+ security: [
330
+ {
331
+ name: "auth",
332
+ type: "apiKey",
333
+ },
334
+ ],
335
+ url: "/task-create/{client}/{type}",
336
+ ...options,
337
+ headers: {
338
+ "Content-Type": "application/x-www-form-urlencoded",
339
+ ...options.headers,
340
+ },
341
+ });
342
+ };
343
+ /**
344
+ * Deactivate a Custom Certificate
345
+ * Deactivate an active custom SSL certificate. If id is omitted, the currently active certificate is deactivated.
346
+ */
347
+ export const postCustomCertificatesSiteIdDeactivate = (options) => {
348
+ return (options.client ?? _heyApiClient).post({
349
+ security: [
350
+ {
351
+ name: "auth",
352
+ type: "apiKey",
353
+ },
354
+ ],
355
+ url: "/custom-certificates/{site}/{id}/deactivate",
356
+ ...options,
357
+ });
358
+ };
359
+ /**
360
+ * Delete a Custom Certificate
361
+ * Delete a custom certificate by ID. The certificate must not be active.
362
+ */
363
+ export const postCustomCertificatesSiteIdDelete = (options) => {
364
+ return (options.client ?? _heyApiClient).post({
365
+ security: [
366
+ {
367
+ name: "auth",
368
+ type: "apiKey",
369
+ },
370
+ ],
371
+ url: "/custom-certificates/{site}/{id}/delete",
372
+ ...options,
373
+ });
374
+ };
375
+ /**
376
+ * Delete Site
377
+ * Mark a site for deletion.
378
+ */
379
+ export const postDeleteSiteServiceIdentifier = (options) => {
380
+ return (options.client ?? _heyApiClient).post({
381
+ security: [
382
+ {
383
+ name: "auth",
384
+ type: "apiKey",
385
+ },
386
+ ],
387
+ url: "/delete-site/{service}/{identifier}",
388
+ ...options,
389
+ });
390
+ };
391
+ /**
392
+ * Disable HSTS preload directive
393
+ * Disable HSTS preload directive.
394
+ */
395
+ export const postSslHstsPreloadDomainFalse = (options) => {
396
+ return (options.client ?? _heyApiClient).post({
397
+ security: [
398
+ {
399
+ name: "auth",
400
+ type: "apiKey",
401
+ },
402
+ ],
403
+ url: "/ssl-hsts-preload/{domain}/false",
404
+ ...options,
405
+ });
406
+ };
407
+ /**
408
+ * Fetch SSL Certificate Information
409
+ * Fetch SSL certificate information.
410
+ */
411
+ export const postSslInfoDomain = (options) => {
412
+ return (options.client ?? _heyApiClient).post({
413
+ security: [
414
+ {
415
+ name: "auth",
416
+ type: "apiKey",
417
+ },
418
+ ],
419
+ url: "/ssl-info/{domain}",
420
+ ...options,
421
+ });
422
+ };
423
+ /**
424
+ * Get Available Datacenters
425
+ * Get a list of datacenters with available (non-full, active) servers.
426
+ */
427
+ export const getGetAvailableDatacentersClient = (options) => {
428
+ return (options?.client ?? _heyApiClient).get({
429
+ security: [
430
+ {
431
+ name: "auth",
432
+ type: "apiKey",
433
+ },
434
+ ],
435
+ url: "/get-available-datacenters/{client}",
436
+ ...options,
437
+ });
438
+ };
439
+ /**
440
+ * Get Client IP Addresses
441
+ * Get the IPs for a client; if a domain is included, get suggested IPs if possible for the client.
442
+ */
443
+ export const getGetIpsClient = (options) => {
444
+ return (options.client ?? _heyApiClient).get({
445
+ security: [
446
+ {
447
+ name: "auth",
448
+ type: "apiKey",
449
+ },
450
+ ],
451
+ url: "/get-ips/{client}",
452
+ ...options,
453
+ });
454
+ };
455
+ /**
456
+ * Get Client IP Addresses
457
+ * Get the IPs for a client; if a domain is included, get suggested IPs if possible for the client.
458
+ */
459
+ export const getGetIpsClientDomain = (options) => {
460
+ return (options.client ?? _heyApiClient).get({
461
+ security: [
462
+ {
463
+ name: "auth",
464
+ type: "apiKey",
465
+ },
466
+ ],
467
+ url: "/get-ips/{client}/{domain}",
468
+ ...options,
469
+ });
470
+ };
471
+ /**
472
+ * Get Client Meta
473
+ * Retrieve a client meta value.
474
+ *
475
+ * Note: `webhook_hmac_key` does not support the `get` method.
476
+ */
477
+ export const getClientMetaClientKeyGet = (options) => {
478
+ return (options.client ?? _heyApiClient).get({
479
+ security: [
480
+ {
481
+ name: "auth",
482
+ type: "apiKey",
483
+ },
484
+ ],
485
+ url: "/client-meta/{client}/{key}/get",
486
+ ...options,
487
+ });
488
+ };
489
+ /**
490
+ * Get Custom Certificate details
491
+ * Retrieve details about a custom certificate for a site. Omit the certificate ID to fetch the currently active custom certificate (if any).
492
+ */
493
+ export const getCustomCertificatesSite = (options) => {
494
+ return (options.client ?? _heyApiClient).get({
495
+ security: [
496
+ {
497
+ name: "auth",
498
+ type: "apiKey",
499
+ },
500
+ ],
501
+ url: "/custom-certificates/{site}",
502
+ ...options,
503
+ });
504
+ };
505
+ /**
506
+ * Get Custom Certificate details
507
+ * Retrieve details about a custom certificate for a site. Omit the certificate ID to fetch the currently active custom certificate (if any).
508
+ */
509
+ export const getCustomCertificatesSiteId = (options) => {
510
+ return (options.client ?? _heyApiClient).get({
511
+ security: [
512
+ {
513
+ name: "auth",
514
+ type: "apiKey",
515
+ },
516
+ ],
517
+ url: "/custom-certificates/{site}/{id}",
518
+ ...options,
519
+ });
520
+ };
521
+ /**
522
+ * Get Domain Verification Code
523
+ * Generates the domain verification code, to be used as a TXT record so that a domain can be "claimed" from another WP Cloud client.
524
+ */
525
+ export const getGetDomainVerificationCodeClientDomain = (options) => {
526
+ return (options.client ?? _heyApiClient).get({
527
+ security: [
528
+ {
529
+ name: "auth",
530
+ type: "apiKey",
531
+ },
532
+ ],
533
+ url: "/get-domain-verification-code/{client}/{domain}",
534
+ ...options,
535
+ });
536
+ };
537
+ /**
538
+ * Get Edge Cache Settings
539
+ * Endpoint for getting a site's edge cache settings.
540
+ */
541
+ export const getEdgeCacheSite = (options) => {
542
+ return (options.client ?? _heyApiClient).get({
543
+ security: [
544
+ {
545
+ name: "auth",
546
+ type: "apiKey",
547
+ },
548
+ ],
549
+ url: "/edge-cache/{site}",
550
+ ...options,
551
+ });
552
+ };
553
+ /**
554
+ * Get Edge Cache Settings
555
+ * Endpoint for getting a site's edge cache settings.
556
+ */
557
+ export const getEdgeCacheSiteAction = (options) => {
558
+ return (options.client ?? _heyApiClient).get({
559
+ security: [
560
+ {
561
+ name: "auth",
562
+ type: "apiKey",
563
+ },
564
+ ],
565
+ url: "/edge-cache/{site}/{action}",
566
+ ...options,
567
+ });
568
+ };
569
+ /**
570
+ * Update Edge Cache Settings
571
+ * Endpoint for managing a site's edge cache settings.
572
+ */
573
+ export const postEdgeCacheSiteAction = (options) => {
574
+ return (options.client ?? _heyApiClient).post({
575
+ ...urlSearchParamsBodySerializer,
576
+ security: [
577
+ {
578
+ name: "auth",
579
+ type: "apiKey",
580
+ },
581
+ ],
582
+ url: "/edge-cache/{site}/{action}",
583
+ ...options,
584
+ headers: {
585
+ "Content-Type": "application/x-www-form-urlencoded",
586
+ ...options.headers,
587
+ },
588
+ });
589
+ };
590
+ /**
591
+ * Get Edge Cache Settings
592
+ * Endpoint for getting a site's edge cache settings.
593
+ */
594
+ export const getEdgeCacheSiteActionDomain = (options) => {
595
+ return (options.client ?? _heyApiClient).get({
596
+ security: [
597
+ {
598
+ name: "auth",
599
+ type: "apiKey",
600
+ },
601
+ ],
602
+ url: "/edge-cache/{site}/{action}/{domain}",
603
+ ...options,
604
+ });
605
+ };
606
+ /**
607
+ * Update Edge Cache Settings
608
+ * Endpoint for managing a site's edge cache settings.
609
+ */
610
+ export const postEdgeCacheSiteActionDomain = (options) => {
611
+ return (options.client ?? _heyApiClient).post({
612
+ ...urlSearchParamsBodySerializer,
613
+ security: [
614
+ {
615
+ name: "auth",
616
+ type: "apiKey",
617
+ },
618
+ ],
619
+ url: "/edge-cache/{site}/{action}/{domain}",
620
+ ...options,
621
+ headers: {
622
+ "Content-Type": "application/x-www-form-urlencoded",
623
+ ...options.headers,
624
+ },
625
+ });
626
+ };
627
+ /**
628
+ * Get Job Status
629
+ * Get status of a job by ID. Supports getting a single job via GET with URL parameter, or multiple jobs via POST with body parameter.
630
+ */
631
+ export const getJobCompletionId = (options) => {
632
+ return (options.client ?? _heyApiClient).get({
633
+ security: [
634
+ {
635
+ name: "auth",
636
+ type: "apiKey",
637
+ },
638
+ ],
639
+ url: "/job-completion/{id}",
640
+ ...options,
641
+ });
642
+ };
643
+ /**
644
+ * Get Job Status
645
+ * Get status of a job by ID. Supports getting a single job via GET with URL parameter, or multiple jobs via POST with body parameter.
646
+ */
647
+ export const postJobCompletionId = (options) => {
648
+ return (options.client ?? _heyApiClient).post({
649
+ ...urlSearchParamsBodySerializer,
650
+ security: [
651
+ {
652
+ name: "auth",
653
+ type: "apiKey",
654
+ },
655
+ ],
656
+ url: "/job-completion/{id}",
657
+ ...options,
658
+ headers: {
659
+ "Content-Type": "application/x-www-form-urlencoded",
660
+ ...options.headers,
661
+ },
662
+ });
663
+ };
664
+ /**
665
+ * Get Job Statuses
666
+ * Get full status details of one or more jobs by ID. Returns complete job object including status, data, and metadata.
667
+ */
668
+ export const getJobStatus = (options) => {
669
+ return (options?.client ?? _heyApiClient).get({
670
+ security: [
671
+ {
672
+ name: "auth",
673
+ type: "apiKey",
674
+ },
675
+ ],
676
+ url: "/job-status",
677
+ ...options,
678
+ });
679
+ };
680
+ /**
681
+ * Get Job Statuses
682
+ * Get full status details of one or more jobs by ID. Returns complete job object including status, data, and metadata.
683
+ */
684
+ export const postJobStatus = (options) => {
685
+ return (options?.client ?? _heyApiClient).post({
686
+ ...urlSearchParamsBodySerializer,
687
+ security: [
688
+ {
689
+ name: "auth",
690
+ type: "apiKey",
691
+ },
692
+ ],
693
+ url: "/job-status",
694
+ ...options,
695
+ headers: {
696
+ "Content-Type": "application/x-www-form-urlencoded",
697
+ ...options?.headers,
698
+ },
699
+ });
700
+ };
701
+ /**
702
+ * Get Job Statuses
703
+ * Get full status details of one or more jobs by ID. Returns complete job object including status, data, and metadata.
704
+ */
705
+ export const getJobStatusId = (options) => {
706
+ return (options.client ?? _heyApiClient).get({
707
+ security: [
708
+ {
709
+ name: "auth",
710
+ type: "apiKey",
711
+ },
712
+ ],
713
+ url: "/job-status/{id}",
714
+ ...options,
715
+ });
716
+ };
717
+ /**
718
+ * Get Job Statuses
719
+ * Get full status details of one or more jobs by ID. Returns complete job object including status, data, and metadata.
720
+ */
721
+ export const postJobStatusId = (options) => {
722
+ return (options.client ?? _heyApiClient).post({
723
+ ...urlSearchParamsBodySerializer,
724
+ security: [
725
+ {
726
+ name: "auth",
727
+ type: "apiKey",
728
+ },
729
+ ],
730
+ url: "/job-status/{id}",
731
+ ...options,
732
+ headers: {
733
+ "Content-Type": "application/x-www-form-urlencoded",
734
+ ...options.headers,
735
+ },
736
+ });
737
+ };
738
+ /**
739
+ * Get Multiple Response Ticket Statuses
740
+ * Retrieve the current status of multiple response tickets in a single request. Requires the "response-ticket/multi-status" extended endpoint authorization.
741
+ */
742
+ export const postResponseTicketMultiStatus = (options) => {
743
+ return (options?.client ?? _heyApiClient).post({
744
+ ...urlSearchParamsBodySerializer,
745
+ security: [
746
+ {
747
+ name: "auth",
748
+ type: "apiKey",
749
+ },
750
+ ],
751
+ url: "/response-ticket/multi-status",
752
+ ...options,
753
+ headers: {
754
+ "Content-Type": "application/x-www-form-urlencoded",
755
+ ...options?.headers,
756
+ },
757
+ });
758
+ };
759
+ /**
760
+ * Get PHP Versions
761
+ * Get a list of available PHP versions, in either simplified (default) or verbose format.
762
+ */
763
+ export const getGetPhpVersionsClientVerbose = (options) => {
764
+ return (options?.client ?? _heyApiClient).get({
765
+ security: [
766
+ {
767
+ name: "auth",
768
+ type: "apiKey",
769
+ },
770
+ ],
771
+ url: "/get-php-versions/{client}[/verbose]",
772
+ ...options,
773
+ });
774
+ };
775
+ /**
776
+ * Get Public Key
777
+ * Retrieve a single aliasable public key.
778
+ */
779
+ export const getAliasPkeyGetClientCategoryName = (options) => {
780
+ return (options.client ?? _heyApiClient).get({
781
+ security: [
782
+ {
783
+ name: "auth",
784
+ type: "apiKey",
785
+ },
786
+ ],
787
+ url: "/alias-pkey/get/{client}/{category}/{name}",
788
+ ...options,
789
+ });
790
+ };
791
+ /**
792
+ * Get Response Ticket Details
793
+ * Retrieve all data for the response ticket including all messages.
794
+ */
795
+ export const postResponseTicketGetFull = (options) => {
796
+ return (options?.client ?? _heyApiClient).post({
797
+ ...urlSearchParamsBodySerializer,
798
+ security: [
799
+ {
800
+ name: "auth",
801
+ type: "apiKey",
802
+ },
803
+ ],
804
+ url: "/response-ticket/get/full",
805
+ ...options,
806
+ headers: {
807
+ "Content-Type": "application/x-www-form-urlencoded",
808
+ ...options?.headers,
809
+ },
810
+ });
811
+ };
812
+ /**
813
+ * Get Response Ticket Summary
814
+ * Retrieve metadata about the response ticket.
815
+ */
816
+ export const postResponseTicketGetSummary = (options) => {
817
+ return (options?.client ?? _heyApiClient).post({
818
+ ...urlSearchParamsBodySerializer,
819
+ security: [
820
+ {
821
+ name: "auth",
822
+ type: "apiKey",
823
+ },
824
+ ],
825
+ url: "/response-ticket/get/summary",
826
+ ...options,
827
+ headers: {
828
+ "Content-Type": "application/x-www-form-urlencoded",
829
+ ...options?.headers,
830
+ },
831
+ });
832
+ };
833
+ /**
834
+ * Get Site Backup Data
835
+ * Download a site's filesystem or database backup.
836
+ *
837
+ * The response body is the raw backup blob, not a JSON envelope. The exact bytes and headers depend on the backup `type` returned by `site-backup-info` and `site-backups-list`:
838
+ *
839
+ * - `fs` and `ondemand-fs`: `Content-Type: application/octet-stream`, no `Content-Encoding`. Body is a bzip2-compressed tar archive. Recommended filename: `<site_id>-<backup_id>-fs.tar.bz2`.
840
+ * - `db` and `ondemand-db`: `Content-Type: application/sql`, always returned with `Content-Encoding: gzip` regardless of the request's `Accept-Encoding`. Body on the wire is a gzip-compressed MySQL dump. Recommended filename: `<site_id>-<backup_id>-db.sql.gz` for the raw bytes, or `<site_id>-<backup_id>-db.sql` if the client decompresses in transit.
841
+ * - `ondemand` (legacy): inspect `type` via `site-backup-info` and follow the row above that matches the actual contents.
842
+ *
843
+ * Because DB downloads include `Content-Encoding: gzip` unconditionally, clients that honor the header (browsers, `curl --compressed`, most HTTP libraries with default settings) will deliver plain SQL text to disk, while clients that ignore it (default `curl -o file`, `wget` without `--compressed`) will deliver gzip-compressed bytes. The response is identical; only client handling differs. For byte-exact downloads, send `Accept-Encoding: identity` and avoid client-side auto-decompression flags such as `curl --compressed`.
844
+ *
845
+ * `Content-Disposition` is not set on either response, so callers must choose the filename and extension. `Accept-Ranges: bytes` is honored, which is useful for resuming the multi-GB filesystem downloads.
846
+ *
847
+ * When proxying the response to an end user, stream the body straight through without buffering -- FS backups can exceed several gigabytes. Decide deliberately whether to forward the upstream `Content-Encoding: gzip` to the end user (and serve `.sql.gz`) or decompress server-side first (and serve `.sql`).
848
+ */
849
+ export const getSiteBackupGetServiceIdentifierBackupId = (options) => {
850
+ return (options.client ?? _heyApiClient).get({
851
+ security: [
852
+ {
853
+ name: "auth",
854
+ type: "apiKey",
855
+ },
856
+ ],
857
+ url: "/site-backup-get/{service}/{identifier}/{backup_id}",
858
+ ...options,
859
+ });
860
+ };
861
+ /**
862
+ * Get Site Backup Details
863
+ * Get the details for a single backup.
864
+ *
865
+ * Pass the returned `atomic_backup_id` (with its `type`) to `site-backup-get` to download the backup. The `type` determines the response format and recommended filename -- see `site-backup-get` for the per-type format details.
866
+ */
867
+ export const getSiteBackupInfoServiceIdentifierBackupId = (options) => {
868
+ return (options.client ?? _heyApiClient).get({
869
+ security: [
870
+ {
871
+ name: "auth",
872
+ type: "apiKey",
873
+ },
874
+ ],
875
+ url: "/site-backup-info/{service}/{identifier}/{backup_id}",
876
+ ...options,
877
+ });
878
+ };
879
+ /**
880
+ * Get Site Details
881
+ * Get site details by site ID or domain name.
882
+ */
883
+ export const getGetSiteSiteExtra = (options) => {
884
+ return (options.client ?? _heyApiClient).get({
885
+ security: [
886
+ {
887
+ name: "auth",
888
+ type: "apiKey",
889
+ },
890
+ ],
891
+ url: "/get-site/{site}[/extra]",
892
+ ...options,
893
+ });
894
+ };
895
+ /**
896
+ * Get Site Metrics
897
+ * Get time series metrics from a site.
898
+ *
899
+ * **NOTE:** This endpoint is deprecated in favor of /metrics.
900
+ */
901
+ export const postSiteMetricsSiteSummarize = (options) => {
902
+ return (options.client ?? _heyApiClient).post({
903
+ ...urlSearchParamsBodySerializer,
904
+ security: [
905
+ {
906
+ name: "auth",
907
+ type: "apiKey",
908
+ },
909
+ ],
910
+ url: "/site-metrics/{site}[/summarize]",
911
+ ...options,
912
+ headers: {
913
+ "Content-Type": "application/x-www-form-urlencoded",
914
+ ...options.headers,
915
+ },
916
+ });
917
+ };
918
+ /**
919
+ * Get Site PHP Error Logs
920
+ * Get PHP error log data from a site. Logs are only guaranteed for 28 days; a start timestamp before that may return incomplete data.
921
+ */
922
+ export const postSiteErrorLogsSite = (options) => {
923
+ return (options.client ?? _heyApiClient).post({
924
+ ...urlSearchParamsBodySerializer,
925
+ security: [
926
+ {
927
+ name: "auth",
928
+ type: "apiKey",
929
+ },
930
+ ],
931
+ url: "/site-error-logs/{site}",
932
+ ...options,
933
+ headers: {
934
+ "Content-Type": "application/x-www-form-urlencoded",
935
+ ...options.headers,
936
+ },
937
+ });
938
+ };
939
+ /**
940
+ * Get Site phpMyAdmin URL
941
+ * Get a time-limited URL for accessing a site's database via phpMyAdmin.
942
+ */
943
+ export const postSitePhpmyadminSite = (options) => {
944
+ return (options.client ?? _heyApiClient).post({
945
+ security: [
946
+ {
947
+ name: "auth",
948
+ type: "apiKey",
949
+ },
950
+ ],
951
+ url: "/site-phpmyadmin/{site}",
952
+ ...options,
953
+ });
954
+ };
955
+ /**
956
+ * Get SSH User Details
957
+ * Retrieve details for an SSH/SFTP user including site ID and timestamps. Validates that the requesting client has access to the user's site.
958
+ */
959
+ export const getGetSshUserUsername = (options) => {
960
+ return (options.client ?? _heyApiClient).get({
961
+ security: [
962
+ {
963
+ name: "auth",
964
+ type: "apiKey",
965
+ },
966
+ ],
967
+ url: "/get-ssh-user/{username}",
968
+ ...options,
969
+ });
970
+ };
971
+ /**
972
+ * Get Task Details
973
+ * Get the details of a task.
974
+ */
975
+ export const postTaskGetAtomicTaskId = (options) => {
976
+ return (options.client ?? _heyApiClient).post({
977
+ security: [
978
+ {
979
+ name: "auth",
980
+ type: "apiKey",
981
+ },
982
+ ],
983
+ url: "/task-get/{atomic_task_id}",
984
+ ...options,
985
+ });
986
+ };
987
+ /**
988
+ * Get Time Series Metrics
989
+ * Get time series metrics.
990
+ *
991
+ * This endpoint queries a time series database and returns metrics that correspond to a site or client. Each metric can be further analyzed by specifying a dimension to segment the metric data on for sub analysis. In the API response an array of time periods are returned with each array item containing a `timestamp` field that specifies the start time of the span of time that the metric is reported for. The number of seconds for the span is given by the `data._meta.resolution` field in the response.
992
+ *
993
+ * We support up to a 10 second resolution for recent data and metrics are downsampled into larger and larger minimum resolutions as time passes. Querying for a shorter and more recent time span will yield higher resolution data. Both longer time spans (longer time between the `start` and `end` parameters) as well as queries for older metrics data will result in lower resolution response data.
994
+ *
995
+ * This endpoint supports returning multiple metrics per 1 dimension or up to 5 dimensions per 1 metric. By passing an array of metrics or dimensions to the metric and dimension field respectively.
996
+ *
997
+ * Metrics can be pulled from multiple sources. Based on the Source different dimensions are available for segmentation. The API will respond with a 400 response if invalid metric, dimensions combinations are requested.
998
+ *
999
+ * Supported metrics and dimensions to report are:
1000
+ *
1001
+ * Edge Logs metrics
1002
+ * - `requests` - Number of requests
1003
+ * - `requests_persec` - Number of requests per second.
1004
+ * - `response_bytes` - Bandwidth consumed for all responses in bytes.
1005
+ * - `response_bytes_persec` - Bandwidth consumed for all responses in bytes per second.
1006
+ * - `response_bytes_average` - Average number of bytes of each response.
1007
+ * - `response_time_average` - (Default) Average response time of each response.
1008
+ *
1009
+ * Edge Logs dimensions:
1010
+ * - `server_protocol` - Protocol version used by the client.
1011
+ * - `request_method` - Type of request made. (GET, POST, etc.)
1012
+ * - `http_host` - (Default) Hostname of the request.
1013
+ * - `http_status` - HTTP status code of the response.
1014
+ * - `http_user_agent` - HTTP User Agent of the request
1015
+ * - `referer_domain` - Referer Domain of the request
1016
+ * - `page_renderer` - The backend that handled the request (PHP, static file, etc.)
1017
+ * - `page_is_cached` - If the response page came from cache.
1018
+ * - `wp_admin_ajax_action` - For requests to the WP admin AJAX endpoint, which action was specified.
1019
+ * - `visitor_asn` - The ASN that the request came from.
1020
+ * - `visitor_country_code` - The country the request came from according to GeoIP.
1021
+ * - `visitor_is_crawler` - If the visitor appears to be an automated bot or crawler.
1022
+ * - `visitor_device_type` - The detected device that the request came from.
1023
+ * - `visitor_browser` - The detected browser that the request came from.
1024
+ * - `visitor_os` - The detected os that the request came from.
1025
+ * - `visitor_is_logged_in` - If the visitor appears to be logged in.
1026
+ * - `edge_cache_status` - Request Status from Edge.
1027
+ * - `is_rate_limited` - If the request was rate limited.
1028
+ * - `rate_limit_reason` - Reason for the request to be limited.
1029
+ * - `datacenter` - Datacenter that processed the request
1030
+ * - `path` - Request path/url without query string
1031
+ * - `remote_address` - IP that the request was issued from.
1032
+ * - `atomic_site_id` - WP Cloud Site ID associated with the request
1033
+ * - `proxy_type` - Type of proxy server that the request came from.
1034
+ *
1035
+ * PHP Logs metrics
1036
+ * - `php_cpu_time` - Total CPU time.
1037
+ * - `php_cpu_time_persec` - CPU time per second.
1038
+ * - `php_response_time` - Total response time.
1039
+ * - `php_requests` - Number of requests .
1040
+ * - `php_requests_persec` - Number of requests per second.
1041
+ * - `php_workers_average` - Average number of php workers in use.
1042
+ * - `php_workers_min` - Minimum number of php workers in use.
1043
+ * - `php_workers_max` - Maximum number of php workers in use.
1044
+ * - `php_request_burst_percentage` - Percentage of requests in burst mode
1045
+ * - `php_request_limited_percentage` - Percentage of requests that were limited from burst mode.
1046
+ * - `php_request_normal_percentage` - Percentage of requests that were not in burst mode.
1047
+ *
1048
+ * PHP logs dimensions:
1049
+ * - `http_verb` - Type of request made. (GET, POST, etc.)
1050
+ * - `http_host` - Hostname of the request
1051
+ * - `datacenter` - Datacenter that processed the request
1052
+ * - `atomic_site_id` - WP Cloud Site ID associated with the request
1053
+ * - `burst_status` - Request Burst Status [BURST, LIMITED, -]
1054
+ *
1055
+ * Uniques and Views metrics (aggregated from edge available as daily stat)
1056
+ * - `uniques` - Number of unique visitors
1057
+ * - `views` - Number of page views
1058
+ *
1059
+ * Uniques and Views dimensions:
1060
+ * - `hostname` - Hostname.
1061
+ *
1062
+ * MySQL UserStats metrics
1063
+ * - `mysql_total_connections` - number of connections.
1064
+ * - `mysql_concurrent_connections` - number of concurrent connections.
1065
+ * - `mysql_connected_time` - cumulative number of seconds elapsed while there were connections
1066
+ * - `mysql_busy_time` - cumulative number of seconds there was activity on connections
1067
+ * - `mysql_cpu_time` - cumulative CPU time elapsed, in seconds, while servicing connections
1068
+ * - `mysql_bytes_received` - number of bytes received
1069
+ * - `mysql_bytes_sent` - number of bytes sent
1070
+ * - `mysql_binlog_bytes_written` - number of bytes written to the binary log
1071
+ * - `mysql_rows_read` - number of rows read from tables
1072
+ * - `mysql_rows_sent` - number of rows sent to tables
1073
+ * - `mysql_rows_deleted` - number of rows deleted from tables
1074
+ * - `mysql_rows_inserted` - number of rows inserted to tables
1075
+ * - `mysql_rows_updated` - number of rows updated in tables
1076
+ * - `mysql_select_commands` - number of SELECT commands executed
1077
+ * - `mysql_update_commands` - number of UPDATE commands executed
1078
+ * - `mysql_other_commands` - number of OTHER commands executed
1079
+ * - `mysql_commit_transactions` - number of COMMIT commands issued
1080
+ * - `mysql_rollback_transactions` - number of ROLLBACK commands issued
1081
+ * - `mysql_denied_connections` - number of connections denied
1082
+ * - `mysql_lost_connections` - number of connections that were terminated uncleanly
1083
+ * - `mysql_access_denied` - number of issued commands that were denied.
1084
+ * - `mysql_empty_queries` - number of empty queries.
1085
+ * - `mysql_total_ssl_connections` - number of thread connections that used SSL.
1086
+ * - `mysql_max_statement_time_exceeded` - number of times a query has exceeded the maximum execution time
1087
+ *
1088
+ * All mysql metrics have _persec variants.
1089
+ *
1090
+ * MySQL Userstats dimensions:
1091
+ * - `pool` - Pool Number
1092
+ * - `server` - Server Name
1093
+ * - `atomic_site_id` - WP Cloud Site ID
1094
+ *
1095
+ * CGroup Userstats metrics:
1096
+ * - `cgroup_cpu_usage` - PHP CPU usage
1097
+ * - `cgroup_cpu_usage_persec` - PHP CPU usage per second
1098
+ *
1099
+ * CGroup Userstats dimensions:
1100
+ * - `pool` - Pool Number
1101
+ * - `server` - Server Name
1102
+ * - `atomic_site_id` - WP Cloud Site ID
1103
+ */
1104
+ export const postMetricsTypeKeySummarize = (options) => {
1105
+ return (options.client ?? _heyApiClient).post({
1106
+ ...urlSearchParamsBodySerializer,
1107
+ security: [
1108
+ {
1109
+ name: "auth",
1110
+ type: "apiKey",
1111
+ },
1112
+ ],
1113
+ url: "/metrics/{type}/{key}[/summarize]",
1114
+ ...options,
1115
+ headers: {
1116
+ "Content-Type": "application/x-www-form-urlencoded",
1117
+ ...options.headers,
1118
+ },
1119
+ });
1120
+ };
1121
+ /**
1122
+ * Get Time Series Usage Data
1123
+ * Get the usage data of a site.
1124
+ *
1125
+ * This endpoint queries a time series database and returns usage data for a site. Usage data includes: compute, bandwidth, email and storage.
1126
+ *
1127
+ * Note on Supported Resolutions and periods:
1128
+ * - `hour` - Available for periods spanning 3 days up to 7 days ago
1129
+ * - `day` - Available for periods spanning 31 days up to 2 months ago
1130
+ * - `month` - Available for periods up to 2 years ago
1131
+ *
1132
+ * Forecast Usage:
1133
+ *
1134
+ * Day and Month resolution usage forecasts are available up to end of the current month. The forecast is generated from the 7-day rolling average of hourly usage and will not capture spikes in usage from sales, advertising or breaking news.
1135
+ */
1136
+ export const postUsageSite = (options) => {
1137
+ return (options.client ?? _heyApiClient).post({
1138
+ ...urlSearchParamsBodySerializer,
1139
+ security: [
1140
+ {
1141
+ name: "auth",
1142
+ type: "apiKey",
1143
+ },
1144
+ ],
1145
+ url: "/usage/{site}",
1146
+ ...options,
1147
+ headers: {
1148
+ "Content-Type": "application/x-www-form-urlencoded",
1149
+ ...options.headers,
1150
+ },
1151
+ });
1152
+ };
1153
+ /**
1154
+ * Get Web Server Logs
1155
+ * Get web server (nginx) log data from a site. Logs are only guaranteed for 28 days; a start timestamp before that may return incomplete data.
1156
+ */
1157
+ export const postSiteLogsSite = (options) => {
1158
+ return (options.client ?? _heyApiClient).post({
1159
+ ...urlSearchParamsBodySerializer,
1160
+ security: [
1161
+ {
1162
+ name: "auth",
1163
+ type: "apiKey",
1164
+ },
1165
+ ],
1166
+ url: "/site-logs/{site}",
1167
+ ...options,
1168
+ headers: {
1169
+ "Content-Type": "application/x-www-form-urlencoded",
1170
+ ...options.headers,
1171
+ },
1172
+ });
1173
+ };
1174
+ /**
1175
+ * Get Web Server Logs for a Site
1176
+ * Get web server (nginx) log data for a site. Logs are only guaranteed for 28 days; a start timestamp before that may return incomplete data.
1177
+ */
1178
+ export const postLogsSiteSite = (options) => {
1179
+ return (options.client ?? _heyApiClient).post({
1180
+ ...urlSearchParamsBodySerializer,
1181
+ security: [
1182
+ {
1183
+ name: "auth",
1184
+ type: "apiKey",
1185
+ },
1186
+ ],
1187
+ url: "/logs/site/{site}",
1188
+ ...options,
1189
+ headers: {
1190
+ "Content-Type": "application/x-www-form-urlencoded",
1191
+ ...options.headers,
1192
+ },
1193
+ });
1194
+ };
1195
+ /**
1196
+ * Interrupt Task
1197
+ * Interrupt an incomplete task.
1198
+ */
1199
+ export const postTaskInterruptTaskId = (options) => {
1200
+ return (options.client ?? _heyApiClient).post({
1201
+ security: [
1202
+ {
1203
+ name: "auth",
1204
+ type: "apiKey",
1205
+ },
1206
+ ],
1207
+ url: "/task-interrupt/{task_id}",
1208
+ ...options,
1209
+ });
1210
+ };
1211
+ /**
1212
+ * List Client Sites
1213
+ * List a client's sites, generally for auditing purposes.
1214
+ *
1215
+ * Additional site meta keys can be added to the output by specifying them at the end of the endpoint URI separated by '/'. For example, `/get-sites/:client/php_version` would add each site's `php_version` to the output.
1216
+ *
1217
+ * The following additional site meta keys are supported:
1218
+ * - `wp_version`
1219
+ * - `php_version`
1220
+ * - `space_quota`
1221
+ * - `db_file_size`
1222
+ * - `static_file_404`
1223
+ * - `suspended`
1224
+ * - `suspend_after`
1225
+ * - `burst_php_conns`
1226
+ * - `default_php_conns`
1227
+ * - `php_memory_limit`
1228
+ * - `opcache_memory_limit_mb`
1229
+ * - `chroot_path`
1230
+ * - `chroot_ssh_path`
1231
+ * - `_data`
1232
+ */
1233
+ export const getGetSitesClient = (options) => {
1234
+ return (options.client ?? _heyApiClient).get({
1235
+ security: [
1236
+ {
1237
+ name: "auth",
1238
+ type: "apiKey",
1239
+ },
1240
+ ],
1241
+ url: "/get-sites/{client}/+",
1242
+ ...options,
1243
+ });
1244
+ };
1245
+ /**
1246
+ * List Client Sites
1247
+ * List a client's sites, generally for auditing purposes.
1248
+ *
1249
+ * Additional site meta keys can be added to the output by specifying them at the end of the endpoint URI separated by '/'. For example, `/get-sites/:client/php_version` would add each site's `php_version` to the output.
1250
+ *
1251
+ * The following additional site meta keys are supported:
1252
+ * - `wp_version`
1253
+ * - `php_version`
1254
+ * - `space_quota`
1255
+ * - `db_file_size`
1256
+ * - `static_file_404`
1257
+ * - `suspended`
1258
+ * - `suspend_after`
1259
+ * - `burst_php_conns`
1260
+ * - `default_php_conns`
1261
+ * - `php_memory_limit`
1262
+ * - `opcache_memory_limit_mb`
1263
+ * - `chroot_path`
1264
+ * - `chroot_ssh_path`
1265
+ * - `_data`
1266
+ */
1267
+ export const getGetSitesClientMeta = (options) => {
1268
+ return (options.client ?? _heyApiClient).get({
1269
+ security: [
1270
+ {
1271
+ name: "auth",
1272
+ type: "apiKey",
1273
+ },
1274
+ ],
1275
+ url: "/get-sites/{client}/+{meta}/",
1276
+ ...options,
1277
+ });
1278
+ };
1279
+ /**
1280
+ * List Cron Entries
1281
+ * Returns a list of cron entries for a site.
1282
+ */
1283
+ export const getCrontabSiteList = (options) => {
1284
+ return (options.client ?? _heyApiClient).get({
1285
+ security: [
1286
+ {
1287
+ name: "auth",
1288
+ type: "apiKey",
1289
+ },
1290
+ ],
1291
+ url: "/crontab/{site}/list",
1292
+ ...options,
1293
+ });
1294
+ };
1295
+ /**
1296
+ * List Custom Certificates
1297
+ * List custom SSL certificates, with optional filtering and pagination.
1298
+ */
1299
+ export const getCustomCertificatesSiteList = (options) => {
1300
+ return (options.client ?? _heyApiClient).get({
1301
+ security: [
1302
+ {
1303
+ name: "auth",
1304
+ type: "apiKey",
1305
+ },
1306
+ ],
1307
+ url: "/custom-certificates/{site}/list",
1308
+ ...options,
1309
+ });
1310
+ };
1311
+ /**
1312
+ * List Failed Webhook Jobs
1313
+ * Lists recent failed webhook jobs for a client.
1314
+ */
1315
+ export const getWebhookFailuresClient = (options) => {
1316
+ return (options.client ?? _heyApiClient).get({
1317
+ security: [
1318
+ {
1319
+ name: "auth",
1320
+ type: "apiKey",
1321
+ },
1322
+ ],
1323
+ url: "/webhook/failures/{client}",
1324
+ ...options,
1325
+ });
1326
+ };
1327
+ /**
1328
+ * List Firewall Rules
1329
+ * Get a list of firewall rules for a site.
1330
+ */
1331
+ export const getFirewallRulesSiteList = (options) => {
1332
+ return (options.client ?? _heyApiClient).get({
1333
+ security: [
1334
+ {
1335
+ name: "auth",
1336
+ type: "apiKey",
1337
+ },
1338
+ ],
1339
+ url: "/firewall-rules/{site}/list",
1340
+ ...options,
1341
+ });
1342
+ };
1343
+ /**
1344
+ * List Public Key Categories
1345
+ * Enumerate your category list.
1346
+ */
1347
+ export const getAliasPkeyCategoriesClient = (options) => {
1348
+ return (options.client ?? _heyApiClient).get({
1349
+ security: [
1350
+ {
1351
+ name: "auth",
1352
+ type: "apiKey",
1353
+ },
1354
+ ],
1355
+ url: "/alias-pkey/categories/{client}",
1356
+ ...options,
1357
+ });
1358
+ };
1359
+ /**
1360
+ * List Public Keys
1361
+ * Enumerate your aliasable public keys, 1000 records at a time.
1362
+ */
1363
+ export const postAliasPkeyListClientCategory = (options) => {
1364
+ return (options.client ?? _heyApiClient).post({
1365
+ ...urlSearchParamsBodySerializer,
1366
+ security: [
1367
+ {
1368
+ name: "auth",
1369
+ type: "apiKey",
1370
+ },
1371
+ ],
1372
+ url: "/alias-pkey/list/{client}/{category}",
1373
+ ...options,
1374
+ headers: {
1375
+ "Content-Type": "application/x-www-form-urlencoded",
1376
+ ...options.headers,
1377
+ },
1378
+ });
1379
+ };
1380
+ /**
1381
+ * List Site Backups
1382
+ * Get a list of backups for a site.
1383
+ *
1384
+ * Pass the returned `atomic_backup_id` (with its `type`) to `site-backup-get` to download a backup. The `type` determines the response format and recommended filename -- see `site-backup-get` for the per-type format details.
1385
+ */
1386
+ export const getSiteBackupsListServiceIdentifier = (options) => {
1387
+ return (options.client ?? _heyApiClient).get({
1388
+ security: [
1389
+ {
1390
+ name: "auth",
1391
+ type: "apiKey",
1392
+ },
1393
+ ],
1394
+ url: "/site-backups-list/{service}/{identifier}",
1395
+ ...options,
1396
+ });
1397
+ };
1398
+ /**
1399
+ * List Site Backups
1400
+ * Get a list of backups for a site.
1401
+ *
1402
+ * Pass the returned `atomic_backup_id` (with its `type`) to `site-backup-get` to download a backup. The `type` determines the response format and recommended filename -- see `site-backup-get` for the per-type format details.
1403
+ */
1404
+ export const getSiteBackupsListServiceIdentifierBackupType = (options) => {
1405
+ return (options.client ?? _heyApiClient).get({
1406
+ security: [
1407
+ {
1408
+ name: "auth",
1409
+ type: "apiKey",
1410
+ },
1411
+ ],
1412
+ url: "/site-backups-list/{service}/{identifier}/{backup_type}",
1413
+ ...options,
1414
+ });
1415
+ };
1416
+ /**
1417
+ * List Site SSH/SFTP Users
1418
+ * List all SSH/SFTP usernames for a site.
1419
+ */
1420
+ export const getSshUserServiceIdentifierList = (options) => {
1421
+ return (options.client ?? _heyApiClient).get({
1422
+ security: [
1423
+ {
1424
+ name: "auth",
1425
+ type: "apiKey",
1426
+ },
1427
+ ],
1428
+ url: "/ssh-user/{service}/{identifier}/list",
1429
+ ...options,
1430
+ });
1431
+ };
1432
+ /**
1433
+ * Manage Blocked Domains
1434
+ * Manage domains that have been blocked from sending email via the platform-provided mail service.
1435
+ *
1436
+ * The following actions are allowed:
1437
+ *
1438
+ * - `list` - List blocked domains for a given client
1439
+ *
1440
+ * The following types are allowed:
1441
+ *
1442
+ * - `sasl_block` - Domains that are blocked as a sender
1443
+ */
1444
+ export const getEmailBlockClientActionType = (options) => {
1445
+ return (options.client ?? _heyApiClient).get({
1446
+ security: [
1447
+ {
1448
+ name: "auth",
1449
+ type: "apiKey",
1450
+ },
1451
+ ],
1452
+ url: "/email-block/{client}/{action}/{type}",
1453
+ ...options,
1454
+ });
1455
+ };
1456
+ /**
1457
+ * Manage Client Authorized Keys
1458
+ * Manage client-level SSH authorized keys that grant access to all sites owned by a client via client-ssh.atomicsites.net. Only available to fully onboarded clients with allowlisted IP addresses. Keys are parsed and validated, with specific SSH options honored (from, command) and enforced (restrict, agent-forwarding, pty). Allowed key types: ssh-rsa (2048-16384 bits), ecdsa-sha2-nistp256 (256 bits), ssh-ed25519 (256 bits). See OpenBSD sshd authorized_keys format for details.
1459
+ */
1460
+ export const getClientAuthorizedKeysClientAction = (options) => {
1461
+ return (options.client ?? _heyApiClient).get({
1462
+ security: [
1463
+ {
1464
+ name: "auth",
1465
+ type: "apiKey",
1466
+ },
1467
+ ],
1468
+ url: "/client-authorized-keys/{client}/{action}",
1469
+ ...options,
1470
+ });
1471
+ };
1472
+ /**
1473
+ * Manage Client Authorized Keys
1474
+ * Manage client-level SSH authorized keys that grant access to all sites owned by a client via client-ssh.atomicsites.net. Only available to fully onboarded clients with allowlisted IP addresses. Keys are parsed and validated, with specific SSH options honored (from, command) and enforced (restrict, agent-forwarding, pty). Allowed key types: ssh-rsa (2048-16384 bits), ecdsa-sha2-nistp256 (256 bits), ssh-ed25519 (256 bits). See OpenBSD sshd authorized_keys format for details.
1475
+ */
1476
+ export const postClientAuthorizedKeysClientAction = (options) => {
1477
+ return (options.client ?? _heyApiClient).post({
1478
+ ...urlSearchParamsBodySerializer,
1479
+ security: [
1480
+ {
1481
+ name: "auth",
1482
+ type: "apiKey",
1483
+ },
1484
+ ],
1485
+ url: "/client-authorized-keys/{client}/{action}",
1486
+ ...options,
1487
+ headers: {
1488
+ "Content-Type": "application/x-www-form-urlencoded",
1489
+ ...options.headers,
1490
+ },
1491
+ });
1492
+ };
1493
+ /**
1494
+ * Manage Client Authorized Keys
1495
+ * Manage client-level SSH authorized keys that grant access to all sites owned by a client via client-ssh.atomicsites.net. Only available to fully onboarded clients with allowlisted IP addresses. Keys are parsed and validated, with specific SSH options honored (from, command) and enforced (restrict, agent-forwarding, pty). Allowed key types: ssh-rsa (2048-16384 bits), ecdsa-sha2-nistp256 (256 bits), ssh-ed25519 (256 bits). See OpenBSD sshd authorized_keys format for details.
1496
+ */
1497
+ export const getClientAuthorizedKeysClientActionId = (options) => {
1498
+ return (options.client ?? _heyApiClient).get({
1499
+ security: [
1500
+ {
1501
+ name: "auth",
1502
+ type: "apiKey",
1503
+ },
1504
+ ],
1505
+ url: "/client-authorized-keys/{client}/{action}/{id}",
1506
+ ...options,
1507
+ });
1508
+ };
1509
+ /**
1510
+ * Manage Client Authorized Keys
1511
+ * Manage client-level SSH authorized keys that grant access to all sites owned by a client via client-ssh.atomicsites.net. Only available to fully onboarded clients with allowlisted IP addresses. Keys are parsed and validated, with specific SSH options honored (from, command) and enforced (restrict, agent-forwarding, pty). Allowed key types: ssh-rsa (2048-16384 bits), ecdsa-sha2-nistp256 (256 bits), ssh-ed25519 (256 bits). See OpenBSD sshd authorized_keys format for details.
1512
+ */
1513
+ export const postClientAuthorizedKeysClientActionId = (options) => {
1514
+ return (options.client ?? _heyApiClient).post({
1515
+ ...urlSearchParamsBodySerializer,
1516
+ security: [
1517
+ {
1518
+ name: "auth",
1519
+ type: "apiKey",
1520
+ },
1521
+ ],
1522
+ url: "/client-authorized-keys/{client}/{action}/{id}",
1523
+ ...options,
1524
+ headers: {
1525
+ "Content-Type": "application/x-www-form-urlencoded",
1526
+ ...options.headers,
1527
+ },
1528
+ });
1529
+ };
1530
+ /**
1531
+ * Manage Site Aliases
1532
+ * Manage domain aliases for a site.
1533
+ */
1534
+ export const getSiteAliasServiceIdentifierAction = (options) => {
1535
+ return (options.client ?? _heyApiClient).get({
1536
+ security: [
1537
+ {
1538
+ name: "auth",
1539
+ type: "apiKey",
1540
+ },
1541
+ ],
1542
+ url: "/site-alias/{service}/{identifier}/{action}",
1543
+ ...options,
1544
+ });
1545
+ };
1546
+ /**
1547
+ * Manage Site Meta
1548
+ * Endpoint for managing site meta.
1549
+ *
1550
+ * The following meta keys are supported:
1551
+ *
1552
+ * - Values for `db_charset` and `db_collate` include "latin1", "latin1_swedish_ci"; "utf8", "utf8_general_ci"; and "utf8mb4", "utf8mb4_general_ci".
1553
+ * - `suspended` suspends a site. The value is the HTTP 4xx status code the site will respond with. The supported statuses are "403", "404", "410", "451", "480", and "503".
1554
+ * - `suspend_after` will suspend a site after a given unixtime timestamp with the status specified in "suspended", default 480.
1555
+ * - `allow_restore` opts a site into self-restore via the "restore-site" endpoint. The value must be a positive Unix timestamp, must not be more than 5 minutes in the future, and must be recent (within MONTH_IN_SECONDS) when "restore-site" is called. It only authorizes the restore window; the restore is started with the "restore-site" endpoint.
1556
+ * - `php_version` sets the site's PHP version. Supported values include "8.2", "8.3", "8.4", and "8.5".
1557
+ * - `wp_version` is a get-only key that can be used to retrieve the site's current managed WordPress version, which can be either "latest", "previous", or "beta" (used to test WordPress releases). Use the "site-wordpress-version" endpoint to set "wp_version".
1558
+ * - `do_not_delete` may be set to a truthy value to prevent a site from begin deleted. This can be useful in some cases. For example, you might wish to preserve a site while it is being reviewed for Terms of Service violations.
1559
+ * - `space_used` is a get-only key that returns an integer in bytes; it is updated every 12 hours with the amount of space used by a site's files.
1560
+ * - `db_file_size` is a get-only key that returns an integer in bytes. It is updated every 12 hours with the amount of space used by a site's database.
1561
+ * - `space_quota` can be used to get and set the space quota for a site. Value must be an integer followed by a size specifier like "200G".
1562
+ * - `max_space_quota` is get-only and may be present if the platform has set a space_quota" maximum for a specific site.
1563
+ * - `photon_subsizes` controls whether WP skips generating intermediate image files when an image is uploaded. The platform is able to satisfy requests for intermediate image files whether or not they exist, so sites can save disk space by not creating them. When the a site's web server receives a request for a non-existent intermediate image file, it proxies the request to Photon which responds with the intermediate image size. Can be set to "0" or "1" or deleted.
1564
+ * - `privacy_model` facilitates protection of site assets. May be set to "wp_uploads" to block logged-out requests for WP uploads. If set, an AT_PRIVACY_MODEL constant will be defined in the PHP environment.
1565
+ * - `geo_affinity` may be used to get and set a site's geo-affinity. Allowed values are those returned by the "get-available-datacenters" endpoint. It is not currently useful to set a site's geo-affinity after creation unless you have access to an endpoint that allows you to subsequently trigger migration of the site to another server pool.
1566
+ * - `static_file_404` may be used to get and set how a site responds to requests for non-existent static files. May be set to "lightweight" for simple, fast web server 404s. May be set to "wordpress" to delegate such requests to WordPress. The current default is "wordpress".
1567
+ * - `php_memory_limit` may be used to set the per-request PHP memory limit to a value between 512MB and 2048MB. Allowed values are 512, 1024, 1536, 2048. The default if not set is 512.
1568
+ * - `opcache_memory_limit_mb` may be used to set the per-request PHP memory limit to a value up to 300.
1569
+ * - `default_php_conns` may be used to either limit site's allowed concurrent PHP connections or to increase the default number of concurrent connections a site can use if the web server has spare PHP connections capacity. Clients may set any value for a site between 2 and 10; the platform has more leeway if needed.
1570
+ * - `burst_php_conns` may be used to enable burst for sites with fewer than 10 default_php_conns. 0 or absent when default_php_conns < 10 means burst is disabled, 1 means burst is enabled.
1571
+ * - `php_fs_permissions` may be used to cause HTTP requests being handled by PHP for a site to have that sites filesystem mounted specially. Currently supported values are "rw" (readwrite - the default), "ro" (readonly), and "loggedin" (read only unless logged into WordPress). It is possible that other more complicated settings may be added in the future.
1572
+ * - `canonicalize_aliases` may be used to change whether a sites domain aliases redirect (default, "true") to the sites primary domain name or are served directly (when set to "false")
1573
+ * - `_data` is provided for clients to store a JSON-encoded array of site-specific data not to exceed 1M in size; this string is available via the get-sites endpoint, but is not part of the get-site record, nor is it available in the context of the site itself.
1574
+ */
1575
+ export const getSiteMetaSiteKeyAction = (options) => {
1576
+ return (options.client ?? _heyApiClient).get({
1577
+ security: [
1578
+ {
1579
+ name: "auth",
1580
+ type: "apiKey",
1581
+ },
1582
+ ],
1583
+ url: "/site-meta/{site}/{key}/{action}",
1584
+ ...options,
1585
+ });
1586
+ };
1587
+ /**
1588
+ * Manage Site Meta
1589
+ * Endpoint for managing site meta.
1590
+ *
1591
+ * The following meta keys are supported:
1592
+ *
1593
+ * - Values for `db_charset` and `db_collate` include "latin1", "latin1_swedish_ci"; "utf8", "utf8_general_ci"; and "utf8mb4", "utf8mb4_general_ci".
1594
+ * - `suspended` suspends a site. The value is the HTTP 4xx status code the site will respond with. The supported statuses are "403", "404", "410", "451", "480", and "503".
1595
+ * - `suspend_after` will suspend a site after a given unixtime timestamp with the status specified in "suspended", default 480.
1596
+ * - `allow_restore` opts a site into self-restore via the "restore-site" endpoint. The value must be a positive Unix timestamp, must not be more than 5 minutes in the future, and must be recent (within MONTH_IN_SECONDS) when "restore-site" is called. It only authorizes the restore window; the restore is started with the "restore-site" endpoint.
1597
+ * - `php_version` sets the site's PHP version. Supported values include "8.2", "8.3", "8.4", and "8.5".
1598
+ * - `wp_version` is a get-only key that can be used to retrieve the site's current managed WordPress version, which can be either "latest", "previous", or "beta" (used to test WordPress releases). Use the "site-wordpress-version" endpoint to set "wp_version".
1599
+ * - `do_not_delete` may be set to a truthy value to prevent a site from begin deleted. This can be useful in some cases. For example, you might wish to preserve a site while it is being reviewed for Terms of Service violations.
1600
+ * - `space_used` is a get-only key that returns an integer in bytes; it is updated every 12 hours with the amount of space used by a site's files.
1601
+ * - `db_file_size` is a get-only key that returns an integer in bytes. It is updated every 12 hours with the amount of space used by a site's database.
1602
+ * - `space_quota` can be used to get and set the space quota for a site. Value must be an integer followed by a size specifier like "200G".
1603
+ * - `max_space_quota` is get-only and may be present if the platform has set a space_quota" maximum for a specific site.
1604
+ * - `photon_subsizes` controls whether WP skips generating intermediate image files when an image is uploaded. The platform is able to satisfy requests for intermediate image files whether or not they exist, so sites can save disk space by not creating them. When the a site's web server receives a request for a non-existent intermediate image file, it proxies the request to Photon which responds with the intermediate image size. Can be set to "0" or "1" or deleted.
1605
+ * - `privacy_model` facilitates protection of site assets. May be set to "wp_uploads" to block logged-out requests for WP uploads. If set, an AT_PRIVACY_MODEL constant will be defined in the PHP environment.
1606
+ * - `geo_affinity` may be used to get and set a site's geo-affinity. Allowed values are those returned by the "get-available-datacenters" endpoint. It is not currently useful to set a site's geo-affinity after creation unless you have access to an endpoint that allows you to subsequently trigger migration of the site to another server pool.
1607
+ * - `static_file_404` may be used to get and set how a site responds to requests for non-existent static files. May be set to "lightweight" for simple, fast web server 404s. May be set to "wordpress" to delegate such requests to WordPress. The current default is "wordpress".
1608
+ * - `php_memory_limit` may be used to set the per-request PHP memory limit to a value between 512MB and 2048MB. Allowed values are 512, 1024, 1536, 2048. The default if not set is 512.
1609
+ * - `opcache_memory_limit_mb` may be used to set the per-request PHP memory limit to a value up to 300.
1610
+ * - `default_php_conns` may be used to either limit site's allowed concurrent PHP connections or to increase the default number of concurrent connections a site can use if the web server has spare PHP connections capacity. Clients may set any value for a site between 2 and 10; the platform has more leeway if needed.
1611
+ * - `burst_php_conns` may be used to enable burst for sites with fewer than 10 default_php_conns. 0 or absent when default_php_conns < 10 means burst is disabled, 1 means burst is enabled.
1612
+ * - `php_fs_permissions` may be used to cause HTTP requests being handled by PHP for a site to have that sites filesystem mounted specially. Currently supported values are "rw" (readwrite - the default), "ro" (readonly), and "loggedin" (read only unless logged into WordPress). It is possible that other more complicated settings may be added in the future.
1613
+ * - `canonicalize_aliases` may be used to change whether a sites domain aliases redirect (default, "true") to the sites primary domain name or are served directly (when set to "false")
1614
+ * - `_data` is provided for clients to store a JSON-encoded array of site-specific data not to exceed 1M in size; this string is available via the get-sites endpoint, but is not part of the get-site record, nor is it available in the context of the site itself.
1615
+ */
1616
+ export const postSiteMetaSiteKeyAction = (options) => {
1617
+ return (options.client ?? _heyApiClient).post({
1618
+ ...urlSearchParamsBodySerializer,
1619
+ security: [
1620
+ {
1621
+ name: "auth",
1622
+ type: "apiKey",
1623
+ },
1624
+ ],
1625
+ url: "/site-meta/{site}/{key}/{action}",
1626
+ ...options,
1627
+ headers: {
1628
+ "Content-Type": "application/x-www-form-urlencoded",
1629
+ ...options.headers,
1630
+ },
1631
+ });
1632
+ };
1633
+ /**
1634
+ * Manage Site Software
1635
+ * Manage a site's software installation and activation.
1636
+ */
1637
+ export const postSiteManageSoftwareTypeSite = (options) => {
1638
+ return (options.client ?? _heyApiClient).post({
1639
+ ...urlSearchParamsBodySerializer,
1640
+ security: [
1641
+ {
1642
+ name: "auth",
1643
+ type: "apiKey",
1644
+ },
1645
+ ],
1646
+ url: "/site-manage-software/{type}/{site}",
1647
+ ...options,
1648
+ headers: {
1649
+ "Content-Type": "application/x-www-form-urlencoded",
1650
+ ...options.headers,
1651
+ },
1652
+ });
1653
+ };
1654
+ /**
1655
+ * Queue SSH Disconnect All Users Job
1656
+ * Queue a job to terminate all active SSH and SFTP connections for a site. Affects both user-level and client-level connections.
1657
+ */
1658
+ export const getSshDisconnectAllUsersServiceIdentifier = (options) => {
1659
+ return (options.client ?? _heyApiClient).get({
1660
+ security: [
1661
+ {
1662
+ name: "auth",
1663
+ type: "apiKey",
1664
+ },
1665
+ ],
1666
+ url: "/ssh-disconnect-all-users/{service}/{identifier}",
1667
+ ...options,
1668
+ });
1669
+ };
1670
+ /**
1671
+ * Remove Client Meta
1672
+ * Remove a client meta value.
1673
+ *
1674
+ * Note: `max_space_quota` is read-only and cannot be removed.
1675
+ */
1676
+ export const getClientMetaClientKeyRemove = (options) => {
1677
+ return (options.client ?? _heyApiClient).get({
1678
+ security: [
1679
+ {
1680
+ name: "auth",
1681
+ type: "apiKey",
1682
+ },
1683
+ ],
1684
+ url: "/client-meta/{client}/{key}/remove",
1685
+ ...options,
1686
+ });
1687
+ };
1688
+ /**
1689
+ * Remove Cron Entry
1690
+ * Removes a cron entry from a site.
1691
+ *
1692
+ * If the event is already running, removing it will prevent future runs, but will not interrupt any existing runs.
1693
+ */
1694
+ export const postCrontabSiteRemove = (options) => {
1695
+ return (options.client ?? _heyApiClient).post({
1696
+ ...urlSearchParamsBodySerializer,
1697
+ security: [
1698
+ {
1699
+ name: "auth",
1700
+ type: "apiKey",
1701
+ },
1702
+ ],
1703
+ url: "/crontab/{site}/remove",
1704
+ ...options,
1705
+ headers: {
1706
+ "Content-Type": "application/x-www-form-urlencoded",
1707
+ ...options.headers,
1708
+ },
1709
+ });
1710
+ };
1711
+ /**
1712
+ * Remove Firewall Rule
1713
+ * Remove an existing firewall rule from a site.
1714
+ */
1715
+ export const postFirewallRulesSiteRemove = (options) => {
1716
+ return (options.client ?? _heyApiClient).post({
1717
+ ...urlSearchParamsBodySerializer,
1718
+ security: [
1719
+ {
1720
+ name: "auth",
1721
+ type: "apiKey",
1722
+ },
1723
+ ],
1724
+ url: "/firewall-rules/{site}/remove",
1725
+ ...options,
1726
+ headers: {
1727
+ "Content-Type": "application/x-www-form-urlencoded",
1728
+ ...options.headers,
1729
+ },
1730
+ });
1731
+ };
1732
+ /**
1733
+ * Remove Public Key
1734
+ * Delete a single aliasable public key.
1735
+ *
1736
+ * Removes an aliasable public key. Any object referencing this address will still be doing so. An object referencing the address of a nonexistent key will, effectively, have no key. If a key is [re]created at an address then all objects referencing that address will then be accessible via the aliasable key.
1737
+ */
1738
+ export const postAliasPkeyRemoveClientCategoryName = (options) => {
1739
+ return (options.client ?? _heyApiClient).post({
1740
+ security: [
1741
+ {
1742
+ name: "auth",
1743
+ type: "apiKey",
1744
+ },
1745
+ ],
1746
+ url: "/alias-pkey/remove/{client}/{category}/{name}",
1747
+ ...options,
1748
+ });
1749
+ };
1750
+ /**
1751
+ * Remove Site SSH/SFTP User
1752
+ * Delete an SSH/SFTP user from a site. Also queues a disconnect job to terminate any active SSH sessions for this user.
1753
+ */
1754
+ export const getSshUserServiceIdentifierRemoveUsername = (options) => {
1755
+ return (options.client ?? _heyApiClient).get({
1756
+ security: [
1757
+ {
1758
+ name: "auth",
1759
+ type: "apiKey",
1760
+ },
1761
+ ],
1762
+ url: "/ssh-user/{service}/{identifier}/remove/{username}",
1763
+ ...options,
1764
+ });
1765
+ };
1766
+ /**
1767
+ * Remove Site SSH/SFTP User
1768
+ * Delete an SSH/SFTP user from a site. Also queues a disconnect job to terminate any active SSH sessions for this user.
1769
+ */
1770
+ export const postSshUserServiceIdentifierRemoveUsername = (options) => {
1771
+ return (options.client ?? _heyApiClient).post({
1772
+ security: [
1773
+ {
1774
+ name: "auth",
1775
+ type: "apiKey",
1776
+ },
1777
+ ],
1778
+ url: "/ssh-user/{service}/{identifier}/remove/{username}",
1779
+ ...options,
1780
+ });
1781
+ };
1782
+ /**
1783
+ * Request Backup Creation
1784
+ * Request creation of an on-demand backup for a site. The backup will contain either filesystem data, database data, or both depending on the type specified. Backups are subject to quota limits which can be customized via site or client metadata.
1785
+ */
1786
+ export const postOnDemandBackupCreateSiteType = (options) => {
1787
+ return (options.client ?? _heyApiClient).post({
1788
+ security: [
1789
+ {
1790
+ name: "auth",
1791
+ type: "apiKey",
1792
+ },
1793
+ ],
1794
+ url: "/on-demand-backup/create/{site}/{type}",
1795
+ ...options,
1796
+ });
1797
+ };
1798
+ /**
1799
+ * Request Backup Deletion
1800
+ * Request deletion of an existing on-demand backup. Only backups of type "ondemand-fs", "ondemand-db", or legacy "ondemand" can be deleted.
1801
+ */
1802
+ export const postOnDemandBackupDeleteSiteBackupId = (options) => {
1803
+ return (options.client ?? _heyApiClient).post({
1804
+ security: [
1805
+ {
1806
+ name: "auth",
1807
+ type: "apiKey",
1808
+ },
1809
+ ],
1810
+ url: "/on-demand-backup/delete/{site}/{backup_id}",
1811
+ ...options,
1812
+ });
1813
+ };
1814
+ /**
1815
+ * Reset Database Password
1816
+ * Reset the database password for a site.
1817
+ */
1818
+ export const postResetDbPasswordTypeSite = (options) => {
1819
+ return (options.client ?? _heyApiClient).post({
1820
+ security: [
1821
+ {
1822
+ name: "auth",
1823
+ type: "apiKey",
1824
+ },
1825
+ ],
1826
+ url: "/reset-db-password/{type}/{site}",
1827
+ ...options,
1828
+ });
1829
+ };
1830
+ /**
1831
+ * Reset Database Password
1832
+ * Reset the database password for a site.
1833
+ */
1834
+ export const postResetDbPasswordTypeSiteNew = (options) => {
1835
+ return (options.client ?? _heyApiClient).post({
1836
+ security: [
1837
+ {
1838
+ name: "auth",
1839
+ type: "apiKey",
1840
+ },
1841
+ ],
1842
+ url: "/reset-db-password/{type}/{site}/{new}",
1843
+ ...options,
1844
+ });
1845
+ };
1846
+ /**
1847
+ * Restore Existing Site From Its Own Backups
1848
+ * Restore an existing site from a filesystem + database backup pair belonging to that same site. Requires the customer to have set the `allow_restore` site meta to a recent Unix timestamp (within MONTH_IN_SECONDS), and to have suspended the destination site with status 503 via the `suspended` site meta, using the `site-meta` endpoint.
1849
+ *
1850
+ * Mirrors the work performed by `site-provisioned/:site_id/restore` after a `create-site` with `restore_from`, but writes against an existing site instead of a freshly provisioned one.
1851
+ */
1852
+ export const postRestoreSiteSite = (options) => {
1853
+ return (options.client ?? _heyApiClient).post({
1854
+ ...urlSearchParamsBodySerializer,
1855
+ security: [
1856
+ {
1857
+ name: "auth",
1858
+ type: "apiKey",
1859
+ },
1860
+ ],
1861
+ url: "/restore-site/{site}",
1862
+ ...options,
1863
+ headers: {
1864
+ "Content-Type": "application/x-www-form-urlencoded",
1865
+ ...options.headers,
1866
+ },
1867
+ });
1868
+ };
1869
+ /**
1870
+ * Retry SSL Provisioning
1871
+ * Retry SSL certificate provisioning.
1872
+ */
1873
+ export const postSslRetryDomain = (options) => {
1874
+ return (options.client ?? _heyApiClient).post({
1875
+ security: [
1876
+ {
1877
+ name: "auth",
1878
+ type: "apiKey",
1879
+ },
1880
+ ],
1881
+ url: "/ssl-retry/{domain}",
1882
+ ...options,
1883
+ });
1884
+ };
1885
+ /**
1886
+ * Scan Site for Malware
1887
+ * Scan a site for malware.
1888
+ */
1889
+ export const postMalwareScanSite = (options) => {
1890
+ return (options.client ?? _heyApiClient).post({
1891
+ ...urlSearchParamsBodySerializer,
1892
+ security: [
1893
+ {
1894
+ name: "auth",
1895
+ type: "apiKey",
1896
+ },
1897
+ ],
1898
+ url: "/malware/scan/{site}",
1899
+ ...options,
1900
+ headers: {
1901
+ "Content-Type": "application/x-www-form-urlencoded",
1902
+ ...options.headers,
1903
+ },
1904
+ });
1905
+ };
1906
+ /**
1907
+ * Stage a Custom Certificate
1908
+ * Prepare a certificate for use on one or more domains. Does not activate the certificate immediately.
1909
+ */
1910
+ export const postCustomCertificatesSiteStage = (options) => {
1911
+ return (options.client ?? _heyApiClient).post({
1912
+ ...urlSearchParamsBodySerializer,
1913
+ security: [
1914
+ {
1915
+ name: "auth",
1916
+ type: "apiKey",
1917
+ },
1918
+ ],
1919
+ url: "/custom-certificates/{site}/stage",
1920
+ ...options,
1921
+ headers: {
1922
+ "Content-Type": "application/x-www-form-urlencoded",
1923
+ ...options.headers,
1924
+ },
1925
+ });
1926
+ };
1927
+ /**
1928
+ * Toggle Android Compatibility
1929
+ * Enable/disable certificates compatible with older Android devices. Android compatibility is enabled by default.
1930
+ */
1931
+ export const postSslAndroidCompatDomainEnable = (options) => {
1932
+ return (options.client ?? _heyApiClient).post({
1933
+ security: [
1934
+ {
1935
+ name: "auth",
1936
+ type: "apiKey",
1937
+ },
1938
+ ],
1939
+ url: "/ssl-android-compat/{domain}/{enable}",
1940
+ ...options,
1941
+ });
1942
+ };
1943
+ /**
1944
+ * Toggle HSTS includeSubDomains
1945
+ * Enable/disable HSTS includeSubDomains directive. Includes the preload directive for ease of use.
1946
+ */
1947
+ export const postSslHstsSubdomainDomainEnable = (options) => {
1948
+ return (options.client ?? _heyApiClient).post({
1949
+ security: [
1950
+ {
1951
+ name: "auth",
1952
+ type: "apiKey",
1953
+ },
1954
+ ],
1955
+ url: "/ssl-hsts-subdomain/{domain}/{enable}",
1956
+ ...options,
1957
+ });
1958
+ };
1959
+ /**
1960
+ * Toggle Social Crawler Redirect
1961
+ * Enable/disable redirect from https to http for social crawlers. This is used to retain share counts between http/https for Facebook/Twitter/LinkedIn, if links were originally shared as http. Social crawler redirect is disabled by default for all new domains since 2022-11-04.
1962
+ */
1963
+ export const postSslSocialCrawlerRedirectDomainEnable = (options) => {
1964
+ return (options.client ?? _heyApiClient).post({
1965
+ security: [
1966
+ {
1967
+ name: "auth",
1968
+ type: "apiKey",
1969
+ },
1970
+ ],
1971
+ url: "/ssl-social-crawler-redirect/{domain}/{enable}",
1972
+ ...options,
1973
+ });
1974
+ };
1975
+ /**
1976
+ * Update a Custom Certificate
1977
+ * Update an existing custom SSL certificate for renewal or rekeying. If id is omitted, the currently active certificate is updated.
1978
+ */
1979
+ export const postCustomCertificatesSiteIdUpdate = (options) => {
1980
+ return (options.client ?? _heyApiClient).post({
1981
+ ...urlSearchParamsBodySerializer,
1982
+ security: [
1983
+ {
1984
+ name: "auth",
1985
+ type: "apiKey",
1986
+ },
1987
+ ],
1988
+ url: "/custom-certificates/{site}/{id}/update",
1989
+ ...options,
1990
+ headers: {
1991
+ "Content-Type": "application/x-www-form-urlencoded",
1992
+ ...options.headers,
1993
+ },
1994
+ });
1995
+ };
1996
+ /**
1997
+ * Update Client Meta
1998
+ * Update an existing client meta value.
1999
+ *
2000
+ * Note: `max_space_quota` is read-only and cannot be updated.
2001
+ */
2002
+ export const postClientMetaClientKeyUpdate = (options) => {
2003
+ return (options.client ?? _heyApiClient).post({
2004
+ ...urlSearchParamsBodySerializer,
2005
+ security: [
2006
+ {
2007
+ name: "auth",
2008
+ type: "apiKey",
2009
+ },
2010
+ ],
2011
+ url: "/client-meta/{client}/{key}/update",
2012
+ ...options,
2013
+ headers: {
2014
+ "Content-Type": "application/x-www-form-urlencoded",
2015
+ ...options.headers,
2016
+ },
2017
+ });
2018
+ };
2019
+ /**
2020
+ * Update Cron Entry
2021
+ * Update an existing cron entry.
2022
+ */
2023
+ export const postCrontabSiteUpdateCronId = (options) => {
2024
+ return (options.client ?? _heyApiClient).post({
2025
+ ...urlSearchParamsBodySerializer,
2026
+ security: [
2027
+ {
2028
+ name: "auth",
2029
+ type: "apiKey",
2030
+ },
2031
+ ],
2032
+ url: "/crontab/{site}/update/{cron_id}",
2033
+ ...options,
2034
+ headers: {
2035
+ "Content-Type": "application/x-www-form-urlencoded",
2036
+ ...options.headers,
2037
+ },
2038
+ });
2039
+ };
2040
+ /**
2041
+ * Update Site Chroot
2042
+ * Update the chroot environment for a site. The chroot slug must be one of the allowed values for the client. Queues a job to apply the filesystem changes on the pool server; use the returned job_id to track completion.
2043
+ */
2044
+ export const postSiteSetChrootSiteDesired = (options) => {
2045
+ return (options.client ?? _heyApiClient).post({
2046
+ security: [
2047
+ {
2048
+ name: "auth",
2049
+ type: "apiKey",
2050
+ },
2051
+ ],
2052
+ url: "/site-set-chroot/{site}/{desired}",
2053
+ ...options,
2054
+ });
2055
+ };
2056
+ /**
2057
+ * Update Site Domain
2058
+ * Update a site's primary domain.
2059
+ */
2060
+ export const postUpdateSiteDomainServiceIdentifierDomain = (options) => {
2061
+ return (options.client ?? _heyApiClient).post({
2062
+ security: [
2063
+ {
2064
+ name: "auth",
2065
+ type: "apiKey",
2066
+ },
2067
+ ],
2068
+ url: "/update-site-domain/{service}/{identifier}/{domain}",
2069
+ ...options,
2070
+ });
2071
+ };
2072
+ /**
2073
+ * Update Site Domain
2074
+ * Update a site's primary domain.
2075
+ */
2076
+ export const postUpdateSiteDomainServiceIdentifierDomainKeep = (options) => {
2077
+ return (options.client ?? _heyApiClient).post({
2078
+ security: [
2079
+ {
2080
+ name: "auth",
2081
+ type: "apiKey",
2082
+ },
2083
+ ],
2084
+ url: "/update-site-domain/{service}/{identifier}/{domain}/{keep}",
2085
+ ...options,
2086
+ });
2087
+ };
2088
+ /**
2089
+ * Update Site Options
2090
+ * Update a site's WordPress options.
2091
+ */
2092
+ export const postUpdateSiteOptionsTypeSite = (options) => {
2093
+ return (options.client ?? _heyApiClient).post({
2094
+ ...urlSearchParamsBodySerializer,
2095
+ security: [
2096
+ {
2097
+ name: "auth",
2098
+ type: "apiKey",
2099
+ },
2100
+ ],
2101
+ url: "/update-site-options/{type}/{site}",
2102
+ ...options,
2103
+ headers: {
2104
+ "Content-Type": "application/x-www-form-urlencoded",
2105
+ ...options.headers,
2106
+ },
2107
+ });
2108
+ };
2109
+ /**
2110
+ * Update Site SSH/SFTP User
2111
+ * Update password or SSH key for an existing SSH/SFTP user. Empty password string disables password authentication (key-only). Allowed key types: ssh-rsa (2048-16384 bits), ecdsa-sha2-nistp256 (256 bits), ssh-ed25519 (256 bits).
2112
+ */
2113
+ export const postSshUserServiceIdentifierUpdateUsername = (options) => {
2114
+ return (options.client ?? _heyApiClient).post({
2115
+ ...urlSearchParamsBodySerializer,
2116
+ security: [
2117
+ {
2118
+ name: "auth",
2119
+ type: "apiKey",
2120
+ },
2121
+ ],
2122
+ url: "/ssh-user/{service}/{identifier}/update/{username}",
2123
+ ...options,
2124
+ headers: {
2125
+ "Content-Type": "application/x-www-form-urlencoded",
2126
+ ...options.headers,
2127
+ },
2128
+ });
2129
+ };
2130
+ /**
2131
+ * Update Site WordPress Version
2132
+ * Configure a site to use a specific managed version of WordPress.
2133
+ */
2134
+ export const postSiteWordpressVersionSiteVersion = (options) => {
2135
+ return (options.client ?? _heyApiClient).post({
2136
+ security: [
2137
+ {
2138
+ name: "auth",
2139
+ type: "apiKey",
2140
+ },
2141
+ ],
2142
+ url: "/site-wordpress-version/{site}/{version}",
2143
+ ...options,
2144
+ });
2145
+ };
2146
+ /**
2147
+ * Validate Custom Certificate
2148
+ * Validate a custom SSL certificate for use on one or more domains.
2149
+ */
2150
+ export const postCustomCertificatesSiteValidate = (options) => {
2151
+ return (options.client ?? _heyApiClient).post({
2152
+ ...urlSearchParamsBodySerializer,
2153
+ security: [
2154
+ {
2155
+ name: "auth",
2156
+ type: "apiKey",
2157
+ },
2158
+ ],
2159
+ url: "/custom-certificates/{site}/validate",
2160
+ ...options,
2161
+ headers: {
2162
+ "Content-Type": "application/x-www-form-urlencoded",
2163
+ ...options.headers,
2164
+ },
2165
+ });
2166
+ };
2167
+ /**
2168
+ * Validate Domain Eligibility
2169
+ * Check whether a domain can be hosted on WP Cloud. Note that this check will return false for valid domains that are already hosted on WordPress.com or WP Cloud infrastructure.
2170
+ */
2171
+ export const getCheckCanHostDomainClientDomain = (options) => {
2172
+ return (options.client ?? _heyApiClient).get({
2173
+ security: [
2174
+ {
2175
+ name: "auth",
2176
+ type: "apiKey",
2177
+ },
2178
+ ],
2179
+ url: "/check-can-host-domain/{client}/{domain}",
2180
+ ...options,
2181
+ });
2182
+ };
2183
+ /**
2184
+ * Manage Site Aliases
2185
+ * Manage domain aliases for a site.
2186
+ */
2187
+ export const getSiteAliasServiceIdentifierActionDomain = (options) => {
2188
+ return (options.client ?? _heyApiClient).get({
2189
+ security: [
2190
+ {
2191
+ name: "auth",
2192
+ type: "apiKey",
2193
+ },
2194
+ ],
2195
+ url: "/site-alias/{service}/{identifier}/{action}[/domain]",
2196
+ ...options,
2197
+ });
2198
+ };