站点同步
This commit is contained in:
1 parent
a64be50b73
commit
9cb8552a99
28 files changed
+1683
-18
No files matched your search
@@ -0,0 +1,59 @@
|
||||
import type { MediaType, TranscodeStatus } from '../storage/types'
|
||||
|
||||
export interface SiteSyncTag {
|
||||
name: string
|
||||
color: string
|
||||
}
|
||||
|
||||
export interface SiteSyncMediaTransfer {
|
||||
key: string
|
||||
ownerUsername: string | null
|
||||
originalName: string
|
||||
contentType: string
|
||||
size: number
|
||||
uploadedAt: string
|
||||
mediaType: MediaType
|
||||
thumbKey: string | null
|
||||
hlsKey: string | null
|
||||
transcodeStatus: TranscodeStatus
|
||||
transcodeProgress: number
|
||||
transcodePreset: string | null
|
||||
transcodeError: string | null
|
||||
sourceDeleted: boolean
|
||||
tags: SiteSyncTag[]
|
||||
}
|
||||
|
||||
export interface SiteSyncInventory {
|
||||
users: string[]
|
||||
mediaKeys: string[]
|
||||
objects: Array<{ key: string, size: number }>
|
||||
}
|
||||
|
||||
export interface SiteSyncMediaAsset {
|
||||
key: string
|
||||
size: number
|
||||
}
|
||||
|
||||
export interface SiteSyncMediaBundle {
|
||||
media: SiteSyncMediaTransfer
|
||||
assets: SiteSyncMediaAsset[]
|
||||
}
|
||||
|
||||
export interface SiteSyncMediaPage {
|
||||
items: SiteSyncMediaBundle[]
|
||||
totalMedia: number
|
||||
nextCursor: string | null
|
||||
}
|
||||
|
||||
export interface SiteSyncUsers {
|
||||
users: string[]
|
||||
}
|
||||
|
||||
export type SiteSyncDirection = 'push' | 'pull'
|
||||
|
||||
export interface SiteSyncObjectOptions {
|
||||
targetBaseUrl: string
|
||||
token: string
|
||||
conflictMode: 'skip' | 'overwrite'
|
||||
direction?: SiteSyncDirection
|
||||
}
|
||||
Reference in new issue
Block a user