feat(boxstore): add retention options and box deletion support

Introduce configurable retention options and default selection, store
retention when creating manifests, and add a helper to delete box
directories to enable expiring/cleanup workflows. Update login and upload
styles (new login layout, taller upload window) to support the new UI.feat(boxstore): add retention options and box deletion support

Introduce configurable retention options and default selection, store
retention when creating manifests, and add a helper to delete box
directories to enable expiring/cleanup workflows. Update login and upload
styles (new login layout, taller upload window) to support the new UI.
This commit is contained in:
2026-04-27 18:18:53 +03:00
parent 2f37958c31
commit 041a9798a7
13 changed files with 654 additions and 22 deletions

View File

@@ -1,5 +1,7 @@
package models
import "time"
const (
FileStatusFailed = "failed"
FileStatusReady = "complete"
@@ -7,6 +9,12 @@ const (
FileStatusWork = "uploading"
)
type RetentionOption struct {
Key string `json:"key"`
Label string `json:"label"`
Seconds int64 `json:"seconds"`
}
type BoxFile struct {
ID string `json:"id"`
Name string `json:"name"`
@@ -23,11 +31,23 @@ type BoxFile struct {
}
type BoxManifest struct {
Files []BoxFile `json:"files"`
Files []BoxFile `json:"files"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt time.Time `json:"expires_at"`
RetentionKey string `json:"retention_key"`
RetentionLabel string `json:"retention_label"`
RetentionSecs int64 `json:"retention_seconds"`
PasswordSalt string `json:"password_salt,omitempty"`
PasswordHash string `json:"password_hash,omitempty"`
AuthToken string `json:"auth_token,omitempty"`
DisableZip bool `json:"disable_zip,omitempty"`
}
type CreateBoxRequest struct {
Files []CreateBoxFileRequest `json:"files"`
Files []CreateBoxFileRequest `json:"files"`
RetentionKey string `json:"retention_key"`
Password string `json:"password"`
AllowZip *bool `json:"allow_zip"`
}
type CreateBoxFileRequest struct {