version 1.0.0

This commit is contained in:
diyaa
2026-05-24 20:53:42 +02:00
commit 4b8701e55b
6577 changed files with 25019 additions and 0 deletions
@@ -0,0 +1,62 @@
import Foundation
public enum DevicePlatform: String, Codable, Sendable, CaseIterable {
case macos = "MACOS"
case iphone = "IPHONE"
}
public struct LibraryTrack: Identifiable, Codable, Hashable, Sendable {
public let id: UUID
public var title: String
public var artist: String
public var album: String?
public init(
id: UUID = UUID(),
title: String,
artist: String,
album: String? = nil
) {
self.id = id
self.title = title
self.artist = artist
self.album = album
}
}
public struct DeviceRegistrationPayload: Codable, Hashable, Sendable {
public var platform: DevicePlatform
public var deviceName: String
public var appVersion: String
public init(
platform: DevicePlatform,
deviceName: String,
appVersion: String
) {
self.platform = platform
self.deviceName = deviceName
self.appVersion = appVersion
}
}
public struct SyncCursor: Codable, Hashable, Sendable {
public var value: String
public init(value: String = "0") {
self.value = value
}
}
public struct ServerEnvironment: Codable, Hashable, Sendable {
public var baseURL: URL
public var appVersion: String
public init(
baseURL: URL,
appVersion: String
) {
self.baseURL = baseURL
self.appVersion = appVersion
}
}