ios_app_v2/yobble/Network/APIModels.swift

45 lines
811 B
Swift

import Foundation
struct APIResponse<T: Decodable>: Decodable {
let status: String
let data: T
let detail: String?
}
struct TokenPairPayload: Decodable {
let access_token: String
let refresh_token: String
let user_id: String?
}
struct RegisterPayload: Decodable {
let message: String
}
struct ErrorPayload: Decodable {
let message: String?
}
struct ErrorResponse: Decodable {
let status: String?
let data: ErrorPayload?
let detail: String?
}
struct MessagePayload: Decodable {
let message: String
}
struct BlockedUserInfo: Decodable {
let userId: UUID
let login: String
let fullName: String?
let customName: String?
let createdAt: Date
}
struct BlockedUsersPayload: Decodable {
let hasMore: Bool
let items: [BlockedUserInfo]
}