Repository navigation
Expand file tree
/
Copy pathActivityRequest.php
More file actions
43 lines (40 loc) · 3.23 KB
/
Copy pathActivityRequest.php
File metadata and controls
43 lines (40 loc) · 3.23 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
<?php
declare(strict_types=1);
namespace GetStream\GeneratedModels;
class ActivityRequest extends BaseModel
{
public function __construct(
public ?string $id = null, // Optional ID for the activity
public ?string $type = null, // Type of activity
public ?string $userID = null, // ID of the user creating the activity
public ?array $feeds = null, // List of feeds to add the activity to with a default max limit of 25 feeds
public ?string $text = null, // Text content of the activity
/** @var array<Attachment>|null */
#[ArrayOf(Attachment::class)]
public ?array $attachments = null, // List of attachments for the 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 and is required
public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
public ?Location $location = null,
public ?string $expiresAt = null, // Expiration time for the activity
public ?array $mentionedUserIds = null, // List of users mentioned in the activity
public ?object $searchData = null, // Additional data for search indexing
public ?array $filterTags = null, // Tags for filtering activities
public ?array $interestTags = null, // Tags for indicating user interests
public ?array $collectionRefs = null, // Collections that this activity references
/** @var array<CollectionRequest>|null */
#[ArrayOf(CollectionRequest::class)]
public ?array $collections = null, // Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions.
public ?string $parentID = null, // ID of parent activity for replies/comments
public ?string $pollID = null, // ID of a poll to attach to activity
public ?object $custom = null, // Custom data for the activity
public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for the activity
public ?bool $createNotificationActivity = null, // Whether to create notification activities for mentioned users
/** @deprecated */
public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
public ?bool $skipPush = null, // Whether to skip push notifications
) {
}
// BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types!
// Use #[JsonKey('user_id')] to override field names if needed.
}