@@ -174,6 +174,13 @@ final class APIClient {
174174 try await deleteCamel ( " /api/user/identities " , body: Body ( provider: provider, providerId: providerId) )
175175 }
176176
177+ /// Actively verifies a stored OAuth credential — the only route that reports real
178+ /// token health. The five `/status` routes report whether a *provider* is
179+ /// configured server-side, not whether this account's token still works, which is
180+ /// why `LinkedIdentitiesView` cannot show a "reconnect needed" state today. Kept
181+ /// as the primitive that closes that gap; no caller yet.
182+ ///
183+ /// Note: the route reads only `provider` — `providerId` is accepted and ignored.
177184 func verifyIdentity( provider: String , providerId: String ) async throws {
178185 struct Body : Encodable { let provider : String ; let providerId : String }
179186 struct Response : Decodable { let ok : Bool ? }
@@ -366,6 +373,11 @@ final class APIClient {
366373 }
367374
368375 /// Fetch/refresh OpenGraph link-preview metadata for a message's links.
376+ ///
377+ /// No caller yet, deliberately. The web fires this after publishing and after an
378+ /// edit (`MessageInput.tsx:511`) so a new post's link previews populate without a
379+ /// reload. Wiring it adds a request to the publish path, so it is tracked
380+ /// separately rather than slipped into a hygiene sweep.
369381 @discardableResult
370382 func refreshMessageMetadata( messageId: String ) async throws -> [ MessageLinkPreview ] {
371383 struct Response : Decodable {
@@ -717,16 +729,6 @@ final class APIClient {
717729 return list
718730 }
719731
720- func updateListSchema( listId: String , schemaDSL: String ) async throws -> [ ListPropertyDef ] {
721- struct Body : Encodable { let schema : String }
722- // Response shape isn't documented; tolerate missing `properties` (e.g. {"ok":true}).
723- struct Response : Decodable { let properties : [ ListPropertyDef ] ? }
724- let encoded = listId. addingPercentEncoding ( withAllowedCharacters: . urlPathAllowed) ?? listId
725- let response : Response = try await putCamel ( " /api/lists/ \( encoded) /schema " ,
726- body: Body ( schema: schemaDSL) )
727- return response. properties ?? [ ]
728- }
729-
730732 func searchLists( q: String , limit: Int = 20 , offset: Int = 0 ) async throws -> ( [ UserList ] , Pagination ? ) {
731733 let qEncoded = q. addingPercentEncoding ( withAllowedCharacters: . urlQueryAllowed) ?? q
732734 struct Response : Decodable { let lists : [ UserList ] ; let pagination : Pagination ? }
@@ -743,18 +745,6 @@ final class APIClient {
743745 return try await get ( " /api/github/repos " )
744746 }
745747
746- /// Open (or `state`) issues for a repo (`GET /api/github/issues?repo=owner/repo`,
747- /// Bearer). Raw GitHub REST array; decode defensively.
748- func githubIssues( repo: String , state: String = " open " ) async throws -> [ GitHubIssue ] {
749- var components = URLComponents ( string: baseURL + " /api/github/issues " )
750- components? . queryItems = [
751- URLQueryItem ( name: " repo " , value: repo) ,
752- URLQueryItem ( name: " state " , value: state) ,
753- ]
754- let query = components? . percentEncodedQuery. map { " ? " + $0 } ?? " "
755- return try await get ( " /api/github/issues " + query)
756- }
757-
758748 /// Re-syncs a GitHub-backed list's cached rows from GitHub issues
759749 /// (`POST /api/lists/:id/refresh`, Bearer). 400 if the list isn't github-backed
760750 /// or its repo is missing.
@@ -1290,11 +1280,6 @@ final class APIClient {
12901280
12911281 // MARK: - Organizations (Phase 8)
12921282
1293- func organizations( limit: Int = 30 , offset: Int = 0 ) async throws -> ( orgs: [ Organization ] , pagination: Pagination ? ) {
1294- let response : OrganizationsResponse = try await get ( " /api/organizations?limit= \( limit) &offset= \( offset) " )
1295- return ( response. organizations, response. pagination)
1296- }
1297-
12981283 func organization( id: String ) async throws -> Organization {
12991284 let encoded = id. addingPercentEncoding ( withAllowedCharacters: . urlPathAllowed) ?? id
13001285 let response : OrganizationResponse = try await get ( " /api/organizations/ \( encoded) " )
@@ -1467,20 +1452,6 @@ final class APIClient {
14671452 return response. message
14681453 }
14691454
1470- func directMessage( id: String ) async throws -> DMMessage {
1471- let encoded = id. addingPercentEncoding ( withAllowedCharacters: . urlPathAllowed) ?? id
1472- let response : DMMessageResponse = try await get ( " /api/dm/ \( encoded) " )
1473- return response. message
1474- }
1475-
1476- @discardableResult
1477- func markDMRead( id: String ) async throws -> Int {
1478- struct Empty : Encodable { }
1479- let encoded = id. addingPercentEncoding ( withAllowedCharacters: . urlPathAllowed) ?? id
1480- let response : DMUpdatedResponse = try await post ( " /api/dm/ \( encoded) /read " , body: Empty ( ) )
1481- return response. updated
1482- }
1483-
14841455 func trashDM( id: String ) async throws {
14851456 struct Empty : Encodable { }
14861457 struct Response : Decodable { let ok : Bool ? }
0 commit comments