From 5a0189fb3556c70a7ab924a9d498bc19d37237dd Mon Sep 17 00:00:00 2001 From: Ali Hesari Date: Sun, 20 Sep 2026 02:23:52 +0200 Subject: [PATCH] feat(inbox): review items with a rating and the reviews thread kind --- src/main/java/com/fopost/sdk/model/InboxItem.java | 6 ++++-- src/main/java/com/fopost/sdk/model/InboxThread.java | 3 ++- src/main/java/com/fopost/sdk/param/InboxThreadParams.java | 2 +- src/main/java/com/fopost/sdk/resource/InboxResource.java | 7 ++++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/fopost/sdk/model/InboxItem.java b/src/main/java/com/fopost/sdk/model/InboxItem.java index 1f412c0..7a37c04 100644 --- a/src/main/java/com/fopost/sdk/model/InboxItem.java +++ b/src/main/java/com/fopost/sdk/model/InboxItem.java @@ -4,9 +4,10 @@ import java.util.List; /** - * A comment, mention or direct message on a connected account. + * A comment, mention, review or direct message on a connected account. * - *

{@code type} is comment, mention or dm; {@code state} is unread, read, resolved or snoozed. + *

{@code type} is comment, mention, review or dm; {@code state} is unread, read, resolved or + * snoozed. {@code rating} is the stars on a review, 1-5, and null on every other type. * The {@code can*} flags say which actions the platform allows on it. {@code canDelete} covers a * comment someone left or our own reply; {@code canPin} and {@code canEdit} are our own comments * only; {@code canPrivateReply} means a DM can be opened from it with @@ -24,6 +25,7 @@ public record InboxItem( String authorHandle, String authorAvatarUrl, String text, + Integer rating, List attachments, String permalink, String postExternalId, diff --git a/src/main/java/com/fopost/sdk/model/InboxThread.java b/src/main/java/com/fopost/sdk/model/InboxThread.java index c187b24..f2630ea 100644 --- a/src/main/java/com/fopost/sdk/model/InboxThread.java +++ b/src/main/java/com/fopost/sdk/model/InboxThread.java @@ -2,7 +2,7 @@ import java.time.Instant; -/** One platform post and the comments it has collected. */ +/** One platform post and the comments it has collected, or one review left on the business. */ public record InboxThread( String workspaceId, String accountId, @@ -12,5 +12,6 @@ public record InboxThread( Instant lastCommentAt, String lastCommentText, String lastCommentAuthor, + Integer rating, InboxPostContext post, InboxAccountRef account) {} diff --git a/src/main/java/com/fopost/sdk/param/InboxThreadParams.java b/src/main/java/com/fopost/sdk/param/InboxThreadParams.java index d728057..b5ab817 100644 --- a/src/main/java/com/fopost/sdk/param/InboxThreadParams.java +++ b/src/main/java/com/fopost/sdk/param/InboxThreadParams.java @@ -19,7 +19,7 @@ public InboxThreadParams workspaceId(String workspaceId) { /** * Threads only: {@code comments} (the default) for threads under our posts, {@code mentions} - * for posts we were tagged in. + * for posts we were tagged in, {@code reviews} for one row per review left on the business. */ public InboxThreadParams kind(String kind) { query.put("kind", kind); diff --git a/src/main/java/com/fopost/sdk/resource/InboxResource.java b/src/main/java/com/fopost/sdk/resource/InboxResource.java index 74a6531..d6dc54a 100644 --- a/src/main/java/com/fopost/sdk/resource/InboxResource.java +++ b/src/main/java/com/fopost/sdk/resource/InboxResource.java @@ -26,7 +26,7 @@ import java.util.Map; /** - * Comments, mentions and direct messages on the connected accounts. + * Comments, mentions, reviews and direct messages on the connected accounts. * *

{@code
  * InboxPage unread = client.inbox().list(
@@ -66,8 +66,9 @@ public InboxPage threads() {
     }
 
     /**
-     * One row per platform post that has collected comments, or per post the account was tagged
-     * in with {@code kind("mentions")}. Fetch a thread's items with {@link #list} filtered by
+     * One row per platform post that has collected comments, per post the account was tagged in
+     * with {@code kind("mentions")}, or per review with {@code kind("reviews")}. Fetch a thread's
+     * items with {@link #list} filtered by
      * {@code accountId} and {@code postExternalId}.
      */
     public InboxPage threads(InboxThreadParams params) {