brows3r — TypeScript API
    Preparing search index...

    Function objectSetStorageClass

    • Change the storage class of one or more objects.

      Requires a confirmedDiffId from diffPreviewCreate that has not been cancelled, expired, or already consumed. The backend validates the diff atomically before calling S3.

      On success the backend emits objects:updated { profileId, bucket, prefix } for each affected object's parent prefix.

      Decision D2 (optimistic boundary)

      This mutation is NOT subject to optimistic updates. The caller must wait for the objects:updated event to refresh the listing. EXCLUDED_FROM_OPTIMISM in src/query/optimistic.ts contains "storage_class" to enforce this.

      Error cases

      • AppError { kind: "Validation", details.field: "confirmed_diff_id" } — diff was cancelled, expired, already consumed, or payload mismatch.

      Parameters

      • profileId: string

        The profile whose credentials to use.

      • targets: ObjectRef[]

        The objects to update.

      • newStorageClass: string

        The target storage class (e.g. "GLACIER").

      • confirmedDiffId: string

        The DiffId from diffPreviewCreate.

      Returns Promise<PutResult[]>