// 存储桶类型
export const OSSBucketType = {
  PRIVATE: 'PRIVATE',
  PUBLIC: 'PUBLIC',
} as const

export type OSSBucketType = (typeof OSSBucketType)[keyof typeof OSSBucketType]

// 统一的上传参数接口
export interface UploadParams {
  file: File
  filePath: string
  bucketType?: OSSBucketType
  options?: Record<string, any>
  custom_bucket?: string
}

// 统一的上传结果接口
export interface UploadResult {
  url: string
  result: any
}

export interface STSTokenResponse {
  server_endpoint?: string | undefined
  access_key_id: string
  access_key_secret: string
  security_token?: string
  expiration?: string
  data_bucket?: string
  resource_bucket?: string
  region?: string
  secure?: boolean
  endpoint?: string
}
