@zinn-digital/sdk 0.1.1825 → 0.1.1828

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.
@@ -11819,7 +11819,7 @@ export interface paths {
11819
11819
  query?: never;
11820
11820
  header?: never;
11821
11821
  path: {
11822
- action: "repair" | "dismiss" | "undo";
11822
+ action: "repair" | "dismiss" | "undo" | "restore_backup";
11823
11823
  findingId: string;
11824
11824
  };
11825
11825
  cookie?: never;
@@ -11827,8 +11827,8 @@ export interface paths {
11827
11827
  get?: never;
11828
11828
  put?: never;
11829
11829
  /**
11830
- * Repair a site integrity finding now (202), dismiss it, or undo its deep clean (202; staff, audit-logged).
11831
- * @description `undo` puts back the files and database backup the finding's deep clean took (`detail.deep_clean.backup_dir`); a finding without one answers 409.
11830
+ * Repair a site integrity finding now (202), dismiss it, undo its deep clean or restore its pre-repair backup (202; staff, audit-logged).
11831
+ * @description `undo` puts back the files and database backup the finding's deep clean took (`detail.deep_clean.backup_dir`); a finding without one answers 409. `restore_backup` puts back the backup taken before the finding's automatic repair (`detail.pre_repair_backup.backup_dir`: the core files, or the database); the live copy it replaces is kept beside the backup, and the outcome is recorded as `detail.pre_repair_restore`. A finding without one answers 409 (`refusal.pluginGuard.noPreRepairBackup`).
11832
11832
  */
11833
11833
  post: operations["actOnSiteIntegrityFinding"];
11834
11834
  delete?: never;
@@ -57398,9 +57398,11 @@ export interface paths {
57398
57398
  * Rewrite a string throughout a site's WordPress database.
57399
57399
  * @description ⛔ **Destructive and irreversible from this platform.** It rewrites every occurrence in the site's database, including inside serialised values, and this platform holds no copy of what was there before. the platform returns no body, so a refusal cannot be detected after the fact — every protection is in **front** of the call: the package must carry `wp_search_replace`, WordPress must be installed, and `search` must not be blank (an empty search rewrites every row in the database, and it is refused twice — at the field and again before the vendor call).
57400
57400
  *
57401
- * The client is required to take a typed confirmation naming the site. `202` and no body, because the rewrite continues at the vendor after the acknowledgement.
57401
+ * The client is required to take a typed confirmation naming the site.
57402
57402
  *
57403
- * `404` for a site with no vendor hosting package. Requires `sites.view` and `sites.panel_access`.
57403
+ * **Asynchronous.** Only the cheap refusals (capability, WordPress installed, blank search) run in the request; the safety backup and the rewrite run in the `SiteWordPressSearchReplaceWorkflow` (one per site, `hosting-provisioning` queue). In the request, a real site's backup outlived the request budget (BACKUPACCUM1114-SR). The two terms are held in a short-lived tenant-scoped row, never in workflow history (`search` can be a secret), and deleted when the rewrite ends. The `wordpress.search-replace` activity row (the search LENGTH only, never either term) is written when the rewrite HAS happened, `wordpress.search_replace_failed` (with a redacted reason) when it did not.
57404
+ *
57405
+ * `202` and no body. `404` for a site with no vendor hosting package. `409` (`refusal.hosting.wordpressSearchReplaceInFlight`) while a rewrite of this site is already running. `503` (`refusal.hosting.wordpressSearchReplaceUnavailable`) when the workflow engine cannot be reached; nothing was started and nothing was stored. The workflow starts once the request has committed; a start that fails after that writes `wordpress.search_replace_failed` (`reason` `in_flight` or `unavailable`) and deletes the terms. Requires `sites.view` and `sites.panel_access`.
57404
57406
  */
57405
57407
  post: operations["runSiteWordPressSearchReplace"];
57406
57408
  delete?: never;
@@ -110382,6 +110384,22 @@ export interface components {
110382
110384
  last_seen_at: string;
110383
110385
  /** @description Staff only. */
110384
110386
  org_id?: string;
110387
+ /** @description Staff only. The backup taken on the box BEFORE this finding's automatic repair (`core`: wp-admin, wp-includes and the root PHP files; `db`: the database), and staff's restore of it (`POST .../restore_backup`). Null when no repair took one. */
110388
+ pre_repair_backup?: {
110389
+ /** Format: date-time */
110390
+ at?: string;
110391
+ backup_dir?: string;
110392
+ restore?: {
110393
+ /** Format: date-time */
110394
+ at?: string;
110395
+ error?: string;
110396
+ ok?: boolean;
110397
+ /** @description Where the live copy it replaced was kept. */
110398
+ replaced_kept_at?: string;
110399
+ } | null;
110400
+ /** @enum {string} */
110401
+ scope?: "core" | "db";
110402
+ } | null;
110385
110403
  /** @description Staff's free-text note in English; customer surfaces show repair_reason instead. */
110386
110404
  repair_note?: string;
110387
110405
  /**
@@ -140615,7 +140633,7 @@ export interface operations {
140615
140633
  query?: never;
140616
140634
  header?: never;
140617
140635
  path: {
140618
- action: "repair" | "dismiss" | "undo";
140636
+ action: "repair" | "dismiss" | "undo" | "restore_backup";
140619
140637
  findingId: string;
140620
140638
  };
140621
140639
  cookie?: never;
@@ -216684,7 +216702,7 @@ export interface operations {
216684
216702
  };
216685
216703
  };
216686
216704
  responses: {
216687
- /** @description The rewrite was accepted and continues at the vendor. */
216705
+ /** @description The rewrite was accepted and runs in the background, after its safety backup. */
216688
216706
  202: {
216689
216707
  headers: {
216690
216708
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1825",
3
+ "version": "0.1.1828",
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>",