brows3r — TypeScript API
    Preparing search index...

    Function diffPreviewCreate

    • Create a pending diff record and return its DiffId.

      Parameters

      • kind — Must be "storage_class" in v1.
      • payload — JSON payload matching the schema for the given kind.

      The backend returns AppError { kind: "Validation" } for unsupported kinds.

      Usage

      const diffId = await diffPreviewCreate("storage_class", {
      targets: [{ bucket: "my-bucket", key: "photos/img.jpg" }],
      current: { "photos/img.jpg": "STANDARD" },
      new_class: "GLACIER",
      });

      Parameters

      • kind: string

        The diff kind string. Currently only "storage_class".

      • payload: Record<string, unknown>

        The diff payload object for the given kind.

      Returns Promise<string>