Repository navigation
Expand file tree
/
Copy pathActivityResponse.php
More file actions
87 lines (84 loc) · 6.47 KB
/
Copy pathActivityResponse.php
File metadata and controls
87 lines (84 loc) · 6.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
declare(strict_types=1);
namespace GetStream\GeneratedModels;
class ActivityResponse extends BaseModel
{
public function __construct(
public ?string $id = null, // Unique identifier for the activity
public ?string $type = null, // Type of activity
public ?UserResponse $user = null, // User response object
public ?array $feeds = null, // List of feed IDs containing this activity
public ?string $visibility = null, // Visibility setting for the activity. One of: public, private, tag
public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name
public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
public ?\DateTime $createdAt = null, // When the activity was created
public ?\DateTime $updatedAt = null, // When the activity was last updated
/** @var array<Attachment>|null */
#[ArrayOf(Attachment::class)]
public ?array $attachments = null, // Media attachments for the activity
/** @var array<UserResponse>|null */
#[ArrayOf(UserResponse::class)]
public ?array $mentionedUsers = null, // Users mentioned in the activity
public ?object $custom = null, // Custom data for the activity
public ?NotificationContext $notificationContext = null,
public ?int $popularity = null, // Popularity score of the activity
public ?float $score = null, // Ranking score for this activity
public ?object $scoreVars = null, // Variable values used at ranking time. Only included when include_score_vars is enabled in enrichment options.
public ?array $reasons = null, // Codes explaining why this activity was shown (e.g. 'following', 'popular', 'interest:nba'). Only included when include_reasons is enabled in enrichment options.
public ?string $selectorSource = null, // Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'), or 'exploration' for the For You exploration slot. Only set when using multiple activity selectors with ranking.
public ?int $position = null, // 1-based position of this activity. On ranked feeds it is the activity's slot in the ranked feed, continuing across pages; activities filtered out for this user leave gaps. Otherwise it is relative to the returned page. Only set on feed reads for paid plans with an authenticated user, when the app uses feed impressions (For You exploration, or a For You ranking that uses impressions_bucket).
/** @var array<CommentResponse>|null */
#[ArrayOf(CommentResponse::class)]
public ?array $comments = null, // Latest 5 comments of this activity (comment replies excluded)
public ?string $text = null, // Text content of the activity
public ?array $i18n = null,
public ?Location $location = null,
public ?ActivityResponse $parent = null,
public ?PollResponseData $poll = null,
public ?\DateTime $editedAt = null, // When the activity was last edited
public ?\DateTime $deletedAt = null, // When the activity was deleted
public ?\DateTime $expiresAt = null, // When the activity will expire
public ?object $searchData = null, // Data for search indexing
public ?array $filterTags = null, // Tags for filtering
public ?array $interestTags = null, // Tags for user interests
public ?ModerationV2Response $moderation = null,
public ?string $moderationAction = null,
public ?int $commentCount = null, // Number of comments on the activity
public ?int $topLevelCommentCount = null, // Number of top-level comments (comments directly on the activity, excluding replies). Only returned by GetActivity when include_top_level_comment_count=true; never set on feed reads or events. Same status/deletion rules as comment_count; not adjusted per viewer.
public ?int $bookmarkCount = null, // Number of bookmarks on the activity
public ?int $shareCount = null, // Number of times the activity was shared
public ?int $reactionCount = null, // Number of reactions to the activity
public ?array $metrics = null,
/** @var array<FeedsReactionResponse>|null */
#[ArrayOf(FeedsReactionResponse::class)]
public ?array $latestReactions = null, // Recent reactions to the activity
/** @var array<ShareResponse>|null */
#[ArrayOf(ShareResponse::class)]
public ?array $latestShares = null, // Recent shares of the activity, one entry per share (org-gated)
/** @var array<string, FeedsReactionGroupResponse>|null */
#[MapOf(FeedsReactionGroupResponse::class)]
public ?array $reactionGroups = null, // Grouped reactions by type
/** @var array<FeedsReactionResponse>|null */
#[ArrayOf(FeedsReactionResponse::class)]
public ?array $ownReactions = null, // Current user's reactions to this activity
/** @var array<BookmarkResponse>|null */
#[ArrayOf(BookmarkResponse::class)]
public ?array $ownBookmarks = null, // Current user's bookmarks for this activity
/** @var array<string, EnrichedCollectionResponse>|null */
#[MapOf(EnrichedCollectionResponse::class)]
public ?array $collections = null, // Enriched collection data referenced by this activity
/** @var array<FeedsReactionResponse>|null */
#[ArrayOf(FeedsReactionResponse::class)]
public ?array $friendReactions = null, // Reactions from users the current user follows or has mutual follows with
public ?int $friendReactionCount = null, // Total count of reactions from friends on this activity
public ?FeedResponse $currentFeed = null,
public ?bool $hidden = null, // If this activity is hidden by this user (using activity feedback)
public ?bool $preview = null, // If this activity is obfuscated for this user. For premium content where you want to show a preview
public ?bool $isWatched = null,
public ?bool $isSeen = null, // Whether this activity has been seen. Only set for feed groups with notification config (track_seen/track_read enabled).
public ?bool $isRead = null, // Whether this activity has been read. Only set for feed groups with notification config (track_seen/track_read enabled).
) {
}
// BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types!
// Use #[JsonKey('user_id')] to override field names if needed.
}