Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions src/Generated/ChatTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -1363,25 +1363,18 @@ public function deleteRetentionPolicy(GeneratedModels\DeleteRetentionPolicyReque
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\DeleteRetentionPolicyResponse::class);
}
/**
* Returns paginated retention cleanup run history for the app. Server-side only.
* Returns filtered and sorted retention cleanup run history for the app. Supports filter_conditions on 'policy' (possible values: 'old-messages', 'inactive-channels') and 'date' fields. Server-side only.
*
* @param int $limit
* @param int $offset
* @param GeneratedModels\GetRetentionPolicyRunsRequest $requestData
* @return StreamResponse<GeneratedModels\GetRetentionPolicyRunsResponse>
* @throws StreamException
*/
public function getRetentionPolicyRuns(int $limit, int $offset): StreamResponse {
public function getRetentionPolicyRuns(GeneratedModels\GetRetentionPolicyRunsRequest $requestData): StreamResponse {
$path = '/api/v2/chat/retention_policy/runs';

$queryParams = [];
if ($limit !== null) {
$queryParams['limit'] = $limit;
}
if ($offset !== null) {
$queryParams['offset'] = $offset;
}
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetRetentionPolicyRunsResponse::class);
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\GetRetentionPolicyRunsResponse::class);
}
/**
* Search messages across channels
Expand Down
53 changes: 53 additions & 0 deletions src/Generated/CommonTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,59 @@ public function createImportV2Task(GeneratedModels\CreateImportV2TaskRequest $re
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\CreateImportV2TaskResponse::class);
}
/**
* Removes the external storage configuration for the app. Idempotent: succeeds even if no configuration exists.
*
* @return StreamResponse<GeneratedModels\DeleteExternalStorageResponse>
* @throws StreamException
*/
public function deleteImporterExternalStorage(): StreamResponse {
$path = '/api/v2/imports/v2/external-storage';

$queryParams = [];
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('DELETE', $path, $queryParams, $requestData), GeneratedModels\DeleteExternalStorageResponse::class);
}
/**
* Returns the current external storage configuration for the app. Returns 404 if no configuration exists.
*
* @return StreamResponse<GeneratedModels\GetExternalStorageResponse>
* @throws StreamException
*/
public function getImporterExternalStorage(): StreamResponse {
$path = '/api/v2/imports/v2/external-storage';

$queryParams = [];
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetExternalStorageResponse::class);
}
/**
* Creates or updates the external storage configuration for the app. Currently only AWS S3 (via cross-account IAM role assumption) is supported.
*
* @param GeneratedModels\UpsertExternalStorageRequest $requestData
* @return StreamResponse<GeneratedModels\UpsertExternalStorageResponse>
* @throws StreamException
*/
public function upsertImporterExternalStorage(GeneratedModels\UpsertExternalStorageRequest $requestData): StreamResponse {
$path = '/api/v2/imports/v2/external-storage';

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('PUT', $path, $queryParams, $requestData), GeneratedModels\UpsertExternalStorageResponse::class);
}
/**
* Validates the configured external S3 storage by performing a live STS AssumeRole and S3 ListObjectsV2 check.
*
* @return StreamResponse<GeneratedModels\ValidateExternalStorageResponse>
* @throws StreamException
*/
public function validateImporterExternalStorage(): StreamResponse {
$path = '/api/v2/imports/v2/external-storage/validate';

$queryParams = [];
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\ValidateExternalStorageResponse::class);
}
/**
* Deletes an import v2 task. Can only delete tasks in queued state.
*
Expand Down
53 changes: 50 additions & 3 deletions src/Generated/FeedsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,14 +534,15 @@ public function queryCollections(GeneratedModels\QueryCollectionsRequest $reques
* @param int $depth
* @param string $sort
* @param int $repliesLimit
* @param string $idAround
* @param string $userID
* @param int $limit
* @param string $prev
* @param string $next
* @return StreamResponse<GeneratedModels\GetCommentsResponse>
* @throws StreamException
*/
public function getComments(string $objectID, string $objectType, int $depth, string $sort, int $repliesLimit, string $userID, int $limit, string $prev, string $next): StreamResponse {
public function getComments(string $objectID, string $objectType, int $depth, string $sort, int $repliesLimit, string $idAround, string $userID, int $limit, string $prev, string $next): StreamResponse {
$path = '/api/v2/feeds/comments';

$queryParams = [];
Expand All @@ -560,6 +561,9 @@ public function getComments(string $objectID, string $objectType, int $depth, st
if ($repliesLimit !== null) {
$queryParams['replies_limit'] = $repliesLimit;
}
if ($idAround !== null) {
$queryParams['id_around'] = $idAround;
}
if ($userID !== null) {
$queryParams['user_id'] = $userID;
}
Expand Down Expand Up @@ -671,6 +675,25 @@ public function updateComment(string $id, GeneratedModels\UpdateCommentRequest $
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('PATCH', $path, $queryParams, $requestData), GeneratedModels\UpdateCommentResponse::class);
}
/**
* Updates certain fields of the comment. Use 'set' to update specific fields and 'unset' to remove fields.
* Sends events:
* - feeds.activity.updated
* - feeds.comment.updated
*
* @param string $id
* @param GeneratedModels\UpdateCommentPartialRequest $requestData
* @return StreamResponse<GeneratedModels\UpdateCommentPartialResponse>
* @throws StreamException
*/
public function updateCommentPartial(string $id, GeneratedModels\UpdateCommentPartialRequest $requestData): StreamResponse {
$path = '/api/v2/feeds/comments/{id}/partial';
$path = str_replace('{id}', (string) $id, $path);

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\UpdateCommentPartialResponse::class);
}
/**
* Adds a reaction to a comment
*
Expand Down Expand Up @@ -735,14 +758,15 @@ public function deleteCommentReaction(string $id, string $type, bool $deleteNoti
* @param int $depth
* @param string $sort
* @param int $repliesLimit
* @param string $idAround
* @param string $userID
* @param int $limit
* @param string $prev
* @param string $next
* @return StreamResponse<GeneratedModels\GetCommentRepliesResponse>
* @throws StreamException
*/
public function getCommentReplies(string $id, int $depth, string $sort, int $repliesLimit, string $userID, int $limit, string $prev, string $next): StreamResponse {
public function getCommentReplies(string $id, int $depth, string $sort, int $repliesLimit, string $idAround, string $userID, int $limit, string $prev, string $next): StreamResponse {
$path = '/api/v2/feeds/comments/{id}/replies';
$path = str_replace('{id}', (string) $id, $path);

Expand All @@ -756,6 +780,9 @@ public function getCommentReplies(string $id, int $depth, string $sort, int $rep
if ($repliesLimit !== null) {
$queryParams['replies_limit'] = $repliesLimit;
}
if ($idAround !== null) {
$queryParams['id_around'] = $idAround;
}
if ($userID !== null) {
$queryParams['user_id'] = $userID;
}
Expand All @@ -771,6 +798,22 @@ public function getCommentReplies(string $id, int $depth, string $sort, int $rep
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetCommentRepliesResponse::class);
}
/**
* Restores a soft-deleted comment by its ID. The comment and all its descendants are restored. Requires moderator permissions.
*
* @param string $id
* @param GeneratedModels\RestoreCommentRequest $requestData
* @return StreamResponse<GeneratedModels\RestoreCommentResponse>
* @throws StreamException
*/
public function restoreComment(string $id, GeneratedModels\RestoreCommentRequest $requestData): StreamResponse {
$path = '/api/v2/feeds/comments/{id}/restore';
$path = str_replace('{id}', (string) $id, $path);

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\RestoreCommentResponse::class);
}
/**
* List all feed groups for the application
*
Expand Down Expand Up @@ -1449,11 +1492,12 @@ public function rejectFollow(GeneratedModels\RejectFollowRequest $requestData):
* @param string $source
* @param string $target
* @param bool $deleteNotificationActivity
* @param bool $keepHistory
* @param bool $enrichOwnFields
* @return StreamResponse<GeneratedModels\UnfollowResponse>
* @throws StreamException
*/
public function unfollow(string $source, string $target, bool $deleteNotificationActivity, bool $enrichOwnFields): StreamResponse {
public function unfollow(string $source, string $target, bool $deleteNotificationActivity, bool $keepHistory, bool $enrichOwnFields): StreamResponse {
$path = '/api/v2/feeds/follows/{source}/{target}';
$path = str_replace('{source}', (string) $source, $path);
$path = str_replace('{target}', (string) $target, $path);
Expand All @@ -1462,6 +1506,9 @@ public function unfollow(string $source, string $target, bool $deleteNotificatio
if ($deleteNotificationActivity !== null) {
$queryParams['delete_notification_activity'] = $deleteNotificationActivity;
}
if ($keepHistory !== null) {
$queryParams['keep_history'] = $keepHistory;
}
if ($enrichOwnFields !== null) {
$queryParams['enrich_own_fields'] = $enrichOwnFields;
}
Expand Down
28 changes: 28 additions & 0 deletions src/Generated/ModerationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
*/
trait ModerationTrait
{
/**
* Insert a moderation action log entry. Server-side only. Used by product services to log moderation-related actions.
*
* @param GeneratedModels\InsertActionLogRequest $requestData
* @return StreamResponse<GeneratedModels\InsertActionLogResponse>
* @throws StreamException
*/
public function insertActionLog(GeneratedModels\InsertActionLogRequest $requestData): StreamResponse {
$path = '/api/v2/moderation/action_logs';

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\InsertActionLogResponse::class);
}
/**
* Appeal against the moderation decision
*
Expand Down Expand Up @@ -247,6 +261,20 @@ public function flag(GeneratedModels\FlagRequest $requestData): StreamResponse {
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\FlagResponse::class);
}
/**
* Returns the number of moderation flags created against a specific user's content. Optionally filter by entity type.
*
* @param GeneratedModels\GetFlagCountRequest $requestData
* @return StreamResponse<GeneratedModels\GetFlagCountResponse>
* @throws StreamException
*/
public function getFlagCount(GeneratedModels\GetFlagCountRequest $requestData): StreamResponse {
$path = '/api/v2/moderation/flag_count';

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\GetFlagCountResponse::class);
}
/**
* Query flags associated with moderation items. This is used for building a moderation dashboard.
*
Expand Down
3 changes: 3 additions & 0 deletions src/Generated/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
use GetStream\GeneratedModels\CommentReactionAddedEvent;
use GetStream\GeneratedModels\CommentReactionDeletedEvent;
use GetStream\GeneratedModels\CommentReactionUpdatedEvent;
use GetStream\GeneratedModels\CommentRestoredEvent;
use GetStream\GeneratedModels\CommentUpdatedEvent;
use GetStream\GeneratedModels\CustomEvent;
use GetStream\GeneratedModels\CustomVideoEvent;
Expand Down Expand Up @@ -275,6 +276,7 @@ class Webhook
public const EVENT_TYPE_FEEDS_COMMENT_REACTION_ADDED = 'feeds.comment.reaction.added';
public const EVENT_TYPE_FEEDS_COMMENT_REACTION_DELETED = 'feeds.comment.reaction.deleted';
public const EVENT_TYPE_FEEDS_COMMENT_REACTION_UPDATED = 'feeds.comment.reaction.updated';
public const EVENT_TYPE_FEEDS_COMMENT_RESTORED = 'feeds.comment.restored';
public const EVENT_TYPE_FEEDS_COMMENT_UPDATED = 'feeds.comment.updated';
public const EVENT_TYPE_FEEDS_FEED_CREATED = 'feeds.feed.created';
public const EVENT_TYPE_FEEDS_FEED_DELETED = 'feeds.feed.deleted';
Expand Down Expand Up @@ -503,6 +505,7 @@ private static function getEventClass(string $eventType): ?string
'feeds.comment.reaction.added' => CommentReactionAddedEvent::class,
'feeds.comment.reaction.deleted' => CommentReactionDeletedEvent::class,
'feeds.comment.reaction.updated' => CommentReactionUpdatedEvent::class,
'feeds.comment.restored' => CommentRestoredEvent::class,
'feeds.comment.updated' => CommentUpdatedEvent::class,
'feeds.feed.created' => FeedCreatedEvent::class,
'feeds.feed.deleted' => FeedDeletedEvent::class,
Expand Down
3 changes: 2 additions & 1 deletion src/GeneratedModels/ActivityRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public function __construct(
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
public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
/** @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
) {
}
Expand Down
1 change: 1 addition & 0 deletions src/GeneratedModels/ActivityResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function __construct(
public ?NotificationContext $notificationContext = null,
public ?int $popularity = null, // Popularity score of the activity
public ?int $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 ?string $selectorSource = null, // Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking.
/** @var array<CommentResponse>|null */
#[ArrayOf(CommentResponse::class)]
Expand Down
3 changes: 2 additions & 1 deletion src/GeneratedModels/AddActivityRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public function __construct(
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
public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
/** @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
public ?bool $enrichOwnFields = null,
) {
Expand Down
3 changes: 2 additions & 1 deletion src/GeneratedModels/AddCommentReactionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public function __construct(
public ?string $type = null, // The type of reaction, eg upvote, like, ...
public ?object $custom = null, // Optional custom data to add to the reaction
public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this reaction
public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
/** @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,
public ?bool $enforceUnique = null, // Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)
public ?string $userID = null,
Expand Down
3 changes: 2 additions & 1 deletion src/GeneratedModels/AddCommentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public function __construct(
public ?string $parentID = null, // ID of parent comment for replies. When provided, object_id and object_type are automatically inherited from the parent comment.
public ?object $custom = null, // Custom data for the comment
public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this comment
public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true)
/** @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,
public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for this comment
public ?string $userID = null,
Expand Down
Loading
Loading