05296b3166
- FU-C 멀티파트 업로드(DSClient.uploadDocument + LiveDSClient 401 재시도 공유 + 툴바/상태바) - FU-D 네이티브 다운로드(NSSavePanel + URLSession, ?token= 미노출, 임시파일 정리) - 로그아웃(AppModel.logout 세션 전체 초기화 + 계정 메뉴) - 셸 2-column 재구성: 질문/이드 제거, 홈 코크핏 + 문서 3-pane 컬럼 브라우저 (인스펙터 TL;DR/핵심점/심층/불일치) + 도메인 필터 전체 load-all - 적대 리뷰 반영(stale 401 데모션·다운로드 임시파일 정리·메모 저장 saveMemo 경유·도메인 필터 선택 정합) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
81 lines
2.7 KiB
Swift
81 lines
2.7 KiB
Swift
import Foundation
|
|
|
|
public enum SearchMode: String, Sendable, CaseIterable {
|
|
case text, vector, hybrid
|
|
}
|
|
|
|
public struct DocumentListQuery: Sendable {
|
|
public var page: Int = 1
|
|
public var pageSize: Int = 20
|
|
public var domain: String?
|
|
public var subGroup: String?
|
|
public var source: String?
|
|
public var format: String?
|
|
public var reviewStatus: String?
|
|
public var category: String?
|
|
public init() {}
|
|
}
|
|
|
|
public struct MemoListQuery: Sendable {
|
|
public var page: Int = 1
|
|
public var pageSize: Int = 20
|
|
public var pinned: Bool?
|
|
public var archived: Bool?
|
|
public init() {}
|
|
}
|
|
|
|
/// 멀티파트 업로드 페이로드 (POST /documents/). `file` 파트 + 선택 form 필드.
|
|
/// `data` 는 메모리 적재(개인 문서 규모 가정) — 대용량 디스크 스트리밍은 후속.
|
|
public struct DocumentUpload: Sendable {
|
|
public var filename: String
|
|
public var data: Data
|
|
public var mimeType: String?
|
|
/// "business" | "knowledge" | nil. business 는 서버가 @library 로 자동 태깅.
|
|
public var docPurpose: String?
|
|
public var libraryPath: String?
|
|
public init(filename: String, data: Data, mimeType: String? = nil,
|
|
docPurpose: String? = nil, libraryPath: String? = nil) {
|
|
self.filename = filename
|
|
self.data = data
|
|
self.mimeType = mimeType
|
|
self.docPurpose = docPurpose
|
|
self.libraryPath = libraryPath
|
|
}
|
|
}
|
|
|
|
public struct DocumentUpdate: Codable, Sendable {
|
|
public var title: String?
|
|
public var userNote: String?
|
|
public var pinned: Bool?
|
|
public var reviewStatus: String?
|
|
public init(title: String? = nil, userNote: String? = nil, pinned: Bool? = nil, reviewStatus: String? = nil) {
|
|
self.title = title; self.userNote = userNote; self.pinned = pinned; self.reviewStatus = reviewStatus
|
|
}
|
|
enum CodingKeys: String, CodingKey {
|
|
case title, pinned
|
|
case userNote = "user_note"
|
|
case reviewStatus = "review_status"
|
|
}
|
|
}
|
|
|
|
public struct MemoCreate: Codable, Sendable {
|
|
public var content: String
|
|
public var title: String?
|
|
public var askIncludable: Bool?
|
|
public var sourceChannel: String?
|
|
public init(content: String, title: String? = nil, askIncludable: Bool? = nil, sourceChannel: String? = nil) {
|
|
self.content = content; self.title = title; self.askIncludable = askIncludable; self.sourceChannel = sourceChannel
|
|
}
|
|
enum CodingKeys: String, CodingKey {
|
|
case content, title
|
|
case askIncludable = "ask_includable"
|
|
case sourceChannel = "source_channel"
|
|
}
|
|
}
|
|
|
|
public struct MemoUpdate: Codable, Sendable {
|
|
public var content: String
|
|
public var title: String?
|
|
public init(content: String, title: String? = nil) { self.content = content; self.title = title }
|
|
}
|