NetworkServiceProtocol.swift 714 B

1234567891011121314151617181920
  1. import Foundation
  2. protocol NetworkServiceProtocol {
  3. func fetchSessions() async throws -> [RemoteSession]
  4. func syncSession(
  5. _ session: CelestiaSession,
  6. deletedEventClientIDs: [String]
  7. ) async throws -> RemoteSession
  8. func deleteSession(sessionID: String) async throws
  9. func fetchStorageQuota() async throws -> StorageQuota
  10. func uploadAsset(
  11. sessionID: String,
  12. clientID: String,
  13. kind: String,
  14. fileURL: URL,
  15. progress: @escaping @Sendable (Double) -> Void
  16. ) async throws -> AssetUploadResult
  17. func downloadAsset(sessionID: String, asset: RemoteAsset, destinationURL: URL) async throws
  18. func recordSyncCheckpoint() async throws
  19. }