Skip to content

Commit f3a3b7c

Browse files
rainbowFim-hulbert
authored andcommitted
Add details of annotations types to example documentation
1 parent d6916a9 commit f3a3b7c

File tree

1 file changed

+9
-3
lines changed
  • examples/pub-sub-message-annotations/javascript

1 file changed

+9
-3
lines changed

examples/pub-sub-message-annotations/javascript/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ Use the following methods to work with message annotations in a pub/sub applicat
1818

1919
Find out more about [annotations](/docs/messages/annotations).
2020

21-
## Annotation Types
21+
## Annotation types
2222

23-
This example demonstrates five common annotation types, each suited to different use cases:
23+
This example demonstrates five common [annotation types](/docs/messages/annotations#annotation-types), each suited to different use cases:
2424

25-
<!-- TODO -->
25+
| Type | Description | Use cases |
26+
| ----- | ----------- | --------- |
27+
| Total | Tracks the cumulative count of annotations, regardless of value or user. | Use for aggregate counts, such as a simple “like” or “upvote” counter. |
28+
| Distinct | Allows multiple annotation values per user, but only one instance of each value. Multiple users can share the same value. | Works similar to Slack reactions - a user can add both 👍 and ❤️ to a message, but only once per reaction type. |
29+
| Unique | Restricts each user to one annotation value per message. | Works like WhatsApp reactions - a user can react with 👍 or ❤️, but not both. |
30+
| Multiple | Allows users to send the same annotation multiple times per value. | Ideal for repeated actions, like goal celebrations where users can send 🎉 multiple times. |
31+
| Flag | Represents a binary user state - flagged or unflagged. Each user can flag a message once, and multiple users can flag the same message. |Use for moderation workflows, e.g. flagging a message for review or follow-up. |
2632

2733
## Features
2834

0 commit comments

Comments
 (0)