@zinn-digital/sdk 0.1.1447 → 0.1.1449

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.
@@ -52870,6 +52870,58 @@ export interface paths {
52870
52870
  patch?: never;
52871
52871
  trace?: never;
52872
52872
  };
52873
+ "/v1/sites/{siteId}/wordpress/hardening": {
52874
+ parameters: {
52875
+ query?: never;
52876
+ header?: never;
52877
+ path: {
52878
+ /** @description Site ID (UUIDv7). */
52879
+ siteId: components["parameters"]["SiteId"];
52880
+ };
52881
+ cookie?: never;
52882
+ };
52883
+ /**
52884
+ * The site's security hardening checklist, read from the site.
52885
+ * @description A WordPress manager's hardening checklist (Plesk WP Toolkit "Security" parity): the theme/plugin file editor, debug mode, `FORCE_SSL_ADMIN`, unique secret keys, an HTTPS site address, no account called `admin`, and XML-RPC.
52886
+ *
52887
+ * ⛔ Read from **the site** (`wp-config.php`, options, users), never our memory. Only the named constants are read — never `DB_PASSWORD` — and a salt value never leaves the box, only whether the eight are unique. XML-RPC is the platform firewall's setting for the site. An empty `checks` list means the platform hosting this site has no checklist (a vendor package). Requires `sites.view`.
52888
+ */
52889
+ get: operations["getSiteWordPressHardening"];
52890
+ put?: never;
52891
+ post?: never;
52892
+ delete?: never;
52893
+ options?: never;
52894
+ head?: never;
52895
+ patch?: never;
52896
+ trace?: never;
52897
+ };
52898
+ "/v1/sites/{siteId}/wordpress/hardening/{check}": {
52899
+ parameters: {
52900
+ query?: never;
52901
+ header?: never;
52902
+ path: {
52903
+ /** @description The check to fix — one whose `fixable` is true. */
52904
+ check: "file_editor_disabled" | "debug_off" | "force_ssl_admin" | "salts_unique";
52905
+ /** @description Site ID (UUIDv7). */
52906
+ siteId: components["parameters"]["SiteId"];
52907
+ };
52908
+ cookie?: never;
52909
+ };
52910
+ get?: never;
52911
+ put?: never;
52912
+ /**
52913
+ * Apply the one-click fix for one hardening check.
52914
+ * @description Writes the fix (`DISALLOW_FILE_EDIT`, `WP_DEBUG` off, `FORCE_SSL_ADMIN`, or fresh secret keys with `wp config shuffle-salts`, which signs every user out), then **confirms it by re-reading the site**, and audit-logs `wordpress.hardening.<check>`. `force_ssl_admin` is refused while the site address is not HTTPS (it would lock the admin out). The response is the whole checklist as re-read.
52915
+ *
52916
+ * ⛔ **Fleet only** — refused where `wp_maintenance` is `false`. Requires `sites.view` and `sites.panel_access`.
52917
+ */
52918
+ post: operations["fixSiteWordPressHardening"];
52919
+ delete?: never;
52920
+ options?: never;
52921
+ head?: never;
52922
+ patch?: never;
52923
+ trace?: never;
52924
+ };
52873
52925
  "/v1/sites/{siteId}/wordpress/maintenance": {
52874
52926
  parameters: {
52875
52927
  query?: never;
@@ -53265,6 +53317,37 @@ export interface paths {
53265
53317
  patch?: never;
53266
53318
  trace?: never;
53267
53319
  };
53320
+ "/v1/sites/{siteId}/wordpress/switches": {
53321
+ parameters: {
53322
+ query?: never;
53323
+ header?: never;
53324
+ path: {
53325
+ /** @description Site ID (UUIDv7). */
53326
+ siteId: components["parameters"]["SiteId"];
53327
+ };
53328
+ cookie?: never;
53329
+ };
53330
+ /**
53331
+ * Search-engine visibility and debug mode, read from the site.
53332
+ * @description The two on/off switches a WordPress manager offers: whether search engines are asked to index the site (`blog_public`) and whether `WP_DEBUG` is on.
53333
+ *
53334
+ * ⛔ Read from **the site**, never our record of what we last set — a customer can tick "Discourage search engines" in wp-admin and a developer can edit `wp-config.php`. An empty object means the platform hosting this site has no such switches (a vendor package). Requires `sites.view`.
53335
+ */
53336
+ get: operations["getSiteWordPressSwitches"];
53337
+ /**
53338
+ * Turn search-engine visibility or debug mode on or off.
53339
+ * @description Send one switch or both; an absent switch is left alone. Each is written, then **confirmed by re-reading the site**, and audit-logged as `wordpress.switch.<name>.<on|off>`. The response is the site's state as re-read.
53340
+ *
53341
+ * ⛔ **Fleet only** — refused where `wp_maintenance` is `false`. Requires `sites.view` and `sites.panel_access`.
53342
+ */
53343
+ put: operations["setSiteWordPressSwitches"];
53344
+ post?: never;
53345
+ delete?: never;
53346
+ options?: never;
53347
+ head?: never;
53348
+ patch?: never;
53349
+ trace?: never;
53350
+ };
53268
53351
  "/v1/sites/{siteId}/wordpress/themes": {
53269
53352
  parameters: {
53270
53353
  query?: never;
@@ -105419,6 +105502,21 @@ export interface components {
105419
105502
  /** @description Whether the install can reach its database. */
105420
105503
  ok: boolean;
105421
105504
  };
105505
+ /** @description A site's hardening checklist as the site reports it. `checks` is empty where the platform hosting the site has no checklist. */
105506
+ SiteWordPressHardening: {
105507
+ checks: components["schemas"]["SiteWordPressHardeningCheck"][];
105508
+ };
105509
+ SiteWordPressHardeningCheck: {
105510
+ /** @description True when `POST …/hardening/{key}` can fix it now (false once passed, for checks with no one-click fix, and for `force_ssl_admin` while the address is not HTTPS). */
105511
+ fixable: boolean;
105512
+ /**
105513
+ * @description Which check.
105514
+ * @enum {string}
105515
+ */
105516
+ key: "file_editor_disabled" | "debug_off" | "force_ssl_admin" | "salts_unique" | "https_site_url" | "no_admin_username" | "xmlrpc_blocked";
105517
+ /** @description True when the site already meets it. */
105518
+ passed: boolean;
105519
+ };
105422
105520
  /** @description Whether the site is showing WordPress's maintenance page. ⛔ Always read from the site, never from our record of what we last set — WordPress sets this flag itself during a core update. */
105423
105521
  SiteWordPressMaintenance: {
105424
105522
  /** @description True when visitors are seeing the maintenance page. */
@@ -105627,6 +105725,13 @@ export interface components {
105627
105725
  */
105628
105726
  mode: "files" | "db" | "both";
105629
105727
  };
105728
+ /** @description Search-engine visibility and debug mode as the site reports them. Empty where the platform hosting the site has no such switches. */
105729
+ SiteWordPressSwitches: {
105730
+ /** @description True when `WP_DEBUG` is on in `wp-config.php`. */
105731
+ debug_mode?: boolean;
105732
+ /** @description False when WordPress's "Discourage search engines" is ticked (`blog_public` = 0). */
105733
+ search_engines_visible?: boolean;
105734
+ };
105630
105735
  /** @description One theme installed on a site's WordPress — the same four facts as a plugin. */
105631
105736
  SiteWordPressTheme: {
105632
105737
  /**
@@ -198496,6 +198601,67 @@ export interface operations {
198496
198601
  503: components["responses"]["ProviderNotConfigured"];
198497
198602
  };
198498
198603
  };
198604
+ getSiteWordPressHardening: {
198605
+ parameters: {
198606
+ query?: never;
198607
+ header?: never;
198608
+ path: {
198609
+ /** @description Site ID (UUIDv7). */
198610
+ siteId: components["parameters"]["SiteId"];
198611
+ };
198612
+ cookie?: never;
198613
+ };
198614
+ requestBody?: never;
198615
+ responses: {
198616
+ /** @description The checklist as the site reports it. */
198617
+ 200: {
198618
+ headers: {
198619
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
198620
+ [name: string]: unknown;
198621
+ };
198622
+ content: {
198623
+ "application/json": components["schemas"]["SiteWordPressHardening"];
198624
+ };
198625
+ };
198626
+ 401: components["responses"]["Unauthorized"];
198627
+ 403: components["responses"]["Forbidden"];
198628
+ 404: components["responses"]["NotFound"];
198629
+ 429: components["responses"]["TooManyRequests"];
198630
+ 503: components["responses"]["ProviderNotConfigured"];
198631
+ };
198632
+ };
198633
+ fixSiteWordPressHardening: {
198634
+ parameters: {
198635
+ query?: never;
198636
+ header?: never;
198637
+ path: {
198638
+ /** @description The check to fix — one whose `fixable` is true. */
198639
+ check: "file_editor_disabled" | "debug_off" | "force_ssl_admin" | "salts_unique";
198640
+ /** @description Site ID (UUIDv7). */
198641
+ siteId: components["parameters"]["SiteId"];
198642
+ };
198643
+ cookie?: never;
198644
+ };
198645
+ requestBody?: never;
198646
+ responses: {
198647
+ /** @description The checklist after the fix, re-read from the site. */
198648
+ 200: {
198649
+ headers: {
198650
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
198651
+ [name: string]: unknown;
198652
+ };
198653
+ content: {
198654
+ "application/json": components["schemas"]["SiteWordPressHardening"];
198655
+ };
198656
+ };
198657
+ 401: components["responses"]["Unauthorized"];
198658
+ 403: components["responses"]["Forbidden"];
198659
+ 404: components["responses"]["NotFound"];
198660
+ 422: components["responses"]["UnprocessableEntity"];
198661
+ 429: components["responses"]["TooManyRequests"];
198662
+ 503: components["responses"]["ProviderNotConfigured"];
198663
+ };
198664
+ };
198499
198665
  getSiteWordPressMaintenance: {
198500
198666
  parameters: {
198501
198667
  query?: never;
@@ -199127,6 +199293,80 @@ export interface operations {
199127
199293
  503: components["responses"]["ProviderNotConfigured"];
199128
199294
  };
199129
199295
  };
199296
+ getSiteWordPressSwitches: {
199297
+ parameters: {
199298
+ query?: never;
199299
+ header?: never;
199300
+ path: {
199301
+ /** @description Site ID (UUIDv7). */
199302
+ siteId: components["parameters"]["SiteId"];
199303
+ };
199304
+ cookie?: never;
199305
+ };
199306
+ requestBody?: never;
199307
+ responses: {
199308
+ /** @description The switches as the site reports them. */
199309
+ 200: {
199310
+ headers: {
199311
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
199312
+ [name: string]: unknown;
199313
+ };
199314
+ content: {
199315
+ "application/json": components["schemas"]["SiteWordPressSwitches"];
199316
+ };
199317
+ };
199318
+ 401: components["responses"]["Unauthorized"];
199319
+ 403: components["responses"]["Forbidden"];
199320
+ 404: components["responses"]["NotFound"];
199321
+ 429: components["responses"]["TooManyRequests"];
199322
+ 503: components["responses"]["ProviderNotConfigured"];
199323
+ };
199324
+ };
199325
+ setSiteWordPressSwitches: {
199326
+ parameters: {
199327
+ query?: never;
199328
+ header?: never;
199329
+ path: {
199330
+ /** @description Site ID (UUIDv7). */
199331
+ siteId: components["parameters"]["SiteId"];
199332
+ };
199333
+ cookie?: never;
199334
+ };
199335
+ requestBody: {
199336
+ content: {
199337
+ "application/json": {
199338
+ /**
199339
+ * @description Sets `WP_DEBUG` in `wp-config.php`.
199340
+ * @example false
199341
+ */
199342
+ debug_mode?: boolean;
199343
+ /**
199344
+ * @description False ticks WordPress's "Discourage search engines" setting.
199345
+ * @example true
199346
+ */
199347
+ search_engines_visible?: boolean;
199348
+ };
199349
+ };
199350
+ };
199351
+ responses: {
199352
+ /** @description The switches after the change, re-read from the site. */
199353
+ 200: {
199354
+ headers: {
199355
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
199356
+ [name: string]: unknown;
199357
+ };
199358
+ content: {
199359
+ "application/json": components["schemas"]["SiteWordPressSwitches"];
199360
+ };
199361
+ };
199362
+ 401: components["responses"]["Unauthorized"];
199363
+ 403: components["responses"]["Forbidden"];
199364
+ 404: components["responses"]["NotFound"];
199365
+ 422: components["responses"]["UnprocessableEntity"];
199366
+ 429: components["responses"]["TooManyRequests"];
199367
+ 503: components["responses"]["ProviderNotConfigured"];
199368
+ };
199369
+ };
199130
199370
  listSiteWordPressThemes: {
199131
199371
  parameters: {
199132
199372
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1447",
3
+ "version": "0.1.1449",
4
4
  "description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
5
5
  "license": "MIT",
6
6
  "author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",