diff --git a/src/Generated/ChatTrait.php b/src/Generated/ChatTrait.php index 67034fc..f991dd2 100644 --- a/src/Generated/ChatTrait.php +++ b/src/Generated/ChatTrait.php @@ -67,7 +67,7 @@ public function deleteCampaign(string $id): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function getCampaign(string $id, string $prev, string $next, int $limit): StreamResponse { + public function getCampaign(string $id, ?string $prev = null, ?string $next = null, ?int $limit = null): StreamResponse { $path = '/api/v2/chat/campaigns/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -193,7 +193,7 @@ public function deleteChannels(GeneratedModels\DeleteChannelsRequest $requestDat * @return StreamResponse * @throws StreamException */ - public function markDelivered(string $userID, GeneratedModels\MarkDeliveredRequest $requestData): StreamResponse { + public function markDelivered(GeneratedModels\MarkDeliveredRequest $requestData, ?string $userID = null): StreamResponse { $path = '/api/v2/chat/channels/delivered'; $queryParams = []; @@ -266,7 +266,7 @@ public function getOrCreateDistinctChannel(string $type, GeneratedModels\Channel * @return StreamResponse * @throws StreamException */ - public function deleteChannel(string $type, string $id, bool $hardDelete): StreamResponse { + public function deleteChannel(string $type, string $id, ?bool $hardDelete = null): StreamResponse { $path = '/api/v2/chat/channels/{type}/{id}'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -278,6 +278,39 @@ public function deleteChannel(string $type, string $id, bool $hardDelete): Strea $requestData = null; return StreamResponse::fromJson($this->makeRequest('DELETE', $path, $queryParams, $requestData), GeneratedModels\DeleteChannelResponse::class); } + /** + * Returns a channel by its CID without creating it. Responds with 404 when the channel does not exist, so it doubles as an existence check. Pass state=true to also load messages, read state and watchers. + * + * @param string $type + * @param string $id + * @param bool $state + * @param int $messagesLimit + * @param int $membersLimit + * @param int $watchersLimit + * @return StreamResponse + * @throws StreamException + */ + public function getChannel(string $type, string $id, ?bool $state = null, ?int $messagesLimit = null, ?int $membersLimit = null, ?int $watchersLimit = null): StreamResponse { + $path = '/api/v2/chat/channels/{type}/{id}'; + $path = str_replace('{type}', (string) $type, $path); + $path = str_replace('{id}', (string) $id, $path); + + $queryParams = []; + if ($state !== null) { + $queryParams['state'] = $state; + } + if ($messagesLimit !== null) { + $queryParams['messages_limit'] = $messagesLimit; + } + if ($membersLimit !== null) { + $queryParams['members_limit'] = $membersLimit; + } + if ($watchersLimit !== null) { + $queryParams['watchers_limit'] = $watchersLimit; + } + $requestData = null; + return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\ChannelStateResponse::class); + } /** * Updates certain fields of the channel * Sends events: @@ -334,7 +367,7 @@ public function updateChannel(string $type, string $id, GeneratedModels\UpdateCh * @return StreamResponse * @throws StreamException */ - public function deleteDraft(string $type, string $id, string $parentID, string $userID): StreamResponse { + public function deleteDraft(string $type, string $id, ?string $parentID = null, ?string $userID = null): StreamResponse { $path = '/api/v2/chat/channels/{type}/{id}/draft'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -359,7 +392,7 @@ public function deleteDraft(string $type, string $id, string $parentID, string $ * @return StreamResponse * @throws StreamException */ - public function getDraft(string $type, string $id, string $parentID, string $userID): StreamResponse { + public function getDraft(string $type, string $id, ?string $parentID = null, ?string $userID = null): StreamResponse { $path = '/api/v2/chat/channels/{type}/{id}/draft'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -401,7 +434,7 @@ public function sendEvent(string $type, string $id, GeneratedModels\SendEventReq * @return StreamResponse * @throws StreamException */ - public function deleteChannelFile(string $type, string $id, string $url): StreamResponse { + public function deleteChannelFile(string $type, string $id, ?string $url = null): StreamResponse { $path = '/api/v2/chat/channels/{type}/{id}/file'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -460,7 +493,7 @@ public function hideChannel(string $type, string $id, GeneratedModels\HideChanne * @return StreamResponse * @throws StreamException */ - public function deleteChannelImage(string $type, string $id, string $url): StreamResponse { + public function deleteChannelImage(string $type, string $id, ?string $url = null): StreamResponse { $path = '/api/v2/chat/channels/{type}/{id}/image'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -499,7 +532,7 @@ public function uploadChannelImage(string $type, string $id, GeneratedModels\Upl * @return StreamResponse * @throws StreamException */ - public function updateMemberPartial(string $type, string $id, string $userID, GeneratedModels\UpdateMemberPartialRequest $requestData): StreamResponse { + public function updateMemberPartial(string $type, string $id, GeneratedModels\UpdateMemberPartialRequest $requestData, ?string $userID = null): StreamResponse { $path = '/api/v2/chat/channels/{type}/{id}/member'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -836,7 +869,7 @@ public function exportChannels(GeneratedModels\ExportChannelsRequest $requestDat * @return StreamResponse * @throws StreamException */ - public function queryMembers(GeneratedModels\QueryMembersPayload $payload): StreamResponse { + public function queryMembers(?GeneratedModels\QueryMembersPayload $payload = null): StreamResponse { $path = '/api/v2/chat/members'; $queryParams = []; @@ -876,7 +909,7 @@ public function queryMessageHistory(GeneratedModels\QueryMessageHistoryRequest $ * @return StreamResponse * @throws StreamException */ - public function deleteMessage(string $id, bool $hard, string $deletedBy, bool $deleteForMe): StreamResponse { + public function deleteMessage(string $id, ?bool $hard = null, ?string $deletedBy = null, ?bool $deleteForMe = null): StreamResponse { $path = '/api/v2/chat/messages/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -901,7 +934,7 @@ public function deleteMessage(string $id, bool $hard, string $deletedBy, bool $d * @return StreamResponse * @throws StreamException */ - public function getMessage(string $id, bool $showDeletedMessage): StreamResponse { + public function getMessage(string $id, ?bool $showDeletedMessage = null): StreamResponse { $path = '/api/v2/chat/messages/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -1033,7 +1066,7 @@ public function sendReaction(string $id, GeneratedModels\SendReactionRequest $re * @return StreamResponse * @throws StreamException */ - public function deleteReaction(string $id, string $type, string $userID): StreamResponse { + public function deleteReaction(string $id, string $type, ?string $userID = null): StreamResponse { $path = '/api/v2/chat/messages/{id}/reaction/{type}'; $path = str_replace('{id}', (string) $id, $path); $path = str_replace('{type}', (string) $type, $path); @@ -1054,7 +1087,7 @@ public function deleteReaction(string $id, string $type, string $userID): Stream * @return StreamResponse * @throws StreamException */ - public function getReactions(string $id, int $limit, int $offset): StreamResponse { + public function getReactions(string $id, ?int $limit = null, ?int $offset = null): StreamResponse { $path = '/api/v2/chat/messages/{id}/reactions'; $path = str_replace('{id}', (string) $id, $path); @@ -1158,7 +1191,7 @@ public function castPollVote(string $messageID, string $pollID, GeneratedModels\ * @return StreamResponse * @throws StreamException */ - public function deletePollVote(string $messageID, string $pollID, string $voteID, string $userID): StreamResponse { + public function deletePollVote(string $messageID, string $pollID, string $voteID, ?string $userID = null): StreamResponse { $path = '/api/v2/chat/messages/{message_id}/polls/{poll_id}/vote/{vote_id}'; $path = str_replace('{message_id}', (string) $messageID, $path); $path = str_replace('{poll_id}', (string) $pollID, $path); @@ -1181,7 +1214,7 @@ public function deletePollVote(string $messageID, string $pollID, string $voteID * @return StreamResponse * @throws StreamException */ - public function deleteReminder(string $messageID, string $userID): StreamResponse { + public function deleteReminder(string $messageID, ?string $userID = null): StreamResponse { $path = '/api/v2/chat/messages/{message_id}/reminders'; $path = str_replace('{message_id}', (string) $messageID, $path); @@ -1242,7 +1275,7 @@ public function createReminder(string $messageID, GeneratedModels\CreateReminder * @return StreamResponse * @throws StreamException */ - public function getReplies(string $parentID, int $limit, string $idGte, string $idGt, string $idLte, string $idLt, string $idAround, array $sort): StreamResponse { + public function getReplies(string $parentID, ?int $limit = null, ?string $idGte = null, ?string $idGt = null, ?string $idLte = null, ?string $idLt = null, ?string $idAround = null, ?array $sort = null): StreamResponse { $path = '/api/v2/chat/messages/{parent_id}/replies'; $path = str_replace('{parent_id}', (string) $parentID, $path); @@ -1278,7 +1311,7 @@ public function getReplies(string $parentID, int $limit, string $idGte, string $ * @return StreamResponse * @throws StreamException */ - public function queryMessageFlags(GeneratedModels\QueryMessageFlagsPayload $payload): StreamResponse { + public function queryMessageFlags(?GeneratedModels\QueryMessageFlagsPayload $payload = null): StreamResponse { $path = '/api/v2/chat/moderation/flags/message'; $queryParams = []; @@ -1331,7 +1364,7 @@ public function unmuteChannel(GeneratedModels\UnmuteChannelRequest $requestData) * @return StreamResponse * @throws StreamException */ - public function queryBannedUsers(GeneratedModels\QueryBannedUsersPayload $payload): StreamResponse { + public function queryBannedUsers(?GeneratedModels\QueryBannedUsersPayload $payload = null): StreamResponse { $path = '/api/v2/chat/query_banned_users'; $queryParams = []; @@ -1352,7 +1385,7 @@ public function queryBannedUsers(GeneratedModels\QueryBannedUsersPayload $payloa * @return StreamResponse * @throws StreamException */ - public function queryFutureChannelBans(GeneratedModels\QueryFutureChannelBansPayload $payload): StreamResponse { + public function queryFutureChannelBans(?GeneratedModels\QueryFutureChannelBansPayload $payload = null): StreamResponse { $path = '/api/v2/chat/query_future_channel_bans'; $queryParams = []; @@ -1442,7 +1475,7 @@ public function getRetentionPolicyRuns(GeneratedModels\GetRetentionPolicyRunsReq * @return StreamResponse * @throws StreamException */ - public function search(GeneratedModels\SearchPayload $payload): StreamResponse { + public function search(?GeneratedModels\SearchPayload $payload = null): StreamResponse { $path = '/api/v2/chat/search'; $queryParams = []; @@ -1639,7 +1672,7 @@ public function queryThreads(GeneratedModels\QueryThreadsRequest $requestData): * @return StreamResponse * @throws StreamException */ - public function getThread(string $messageID, int $replyLimit, int $participantLimit, int $memberLimit): StreamResponse { + public function getThread(string $messageID, ?int $replyLimit = null, ?int $participantLimit = null, ?int $memberLimit = null): StreamResponse { $path = '/api/v2/chat/threads/{message_id}'; $path = str_replace('{message_id}', (string) $messageID, $path); @@ -1681,7 +1714,7 @@ public function updateThreadPartial(string $messageID, GeneratedModels\UpdateThr * @return StreamResponse * @throws StreamException */ - public function unreadCounts(string $userID): StreamResponse { + public function unreadCounts(?string $userID = null): StreamResponse { $path = '/api/v2/chat/unread'; $queryParams = []; @@ -1723,4 +1756,4 @@ public function sendUserCustomEvent(string $userID, GeneratedModels\SendUserCust // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\Response::class); } -} +} \ No newline at end of file diff --git a/src/Generated/CommonTrait.php b/src/Generated/CommonTrait.php index c2a7db6..99ae370 100644 --- a/src/Generated/CommonTrait.php +++ b/src/Generated/CommonTrait.php @@ -48,7 +48,7 @@ public function updateApp(GeneratedModels\UpdateAppRequest $requestData): Stream * @return StreamResponse * @throws StreamException */ - public function listBlockLists(string $team): StreamResponse { + public function listBlockLists(?string $team = null): StreamResponse { $path = '/api/v2/blocklists'; $queryParams = []; @@ -80,7 +80,7 @@ public function createBlockList(GeneratedModels\CreateBlockListRequest $requestD * @return StreamResponse * @throws StreamException */ - public function deleteBlockList(string $name, string $team): StreamResponse { + public function deleteBlockList(string $name, ?string $team = null): StreamResponse { $path = '/api/v2/blocklists/{name}'; $path = str_replace('{name}', (string) $name, $path); @@ -99,7 +99,7 @@ public function deleteBlockList(string $name, string $team): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function getBlockList(string $name, string $team): StreamResponse { + public function getBlockList(string $name, ?string $team = null): StreamResponse { $path = '/api/v2/blocklists/{name}'; $path = str_replace('{name}', (string) $name, $path); @@ -176,7 +176,7 @@ public function checkSQS(GeneratedModels\CheckSQSRequest $requestData): StreamRe * @return StreamResponse * @throws StreamException */ - public function deleteDevice(string $id, string $userID): StreamResponse { + public function deleteDevice(string $id, ?string $userID = null): StreamResponse { $path = '/api/v2/devices'; $queryParams = []; @@ -196,7 +196,7 @@ public function deleteDevice(string $id, string $userID): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function listDevices(string $userID): StreamResponse { + public function listDevices(?string $userID = null): StreamResponse { $path = '/api/v2/devices'; $queryParams = []; @@ -366,7 +366,7 @@ public function createImport(GeneratedModels\CreateImportRequest $requestData): * @return StreamResponse * @throws StreamException */ - public function listImportV2Tasks(int $state): StreamResponse { + public function listImportV2Tasks(?int $state = null): StreamResponse { $path = '/api/v2/imports/v2'; $queryParams = []; @@ -589,7 +589,7 @@ public function updatePoll(GeneratedModels\UpdatePollRequest $requestData): Stre * @return StreamResponse * @throws StreamException */ - public function queryPolls(string $userID, GeneratedModels\QueryPollsRequest $requestData): StreamResponse { + public function queryPolls(GeneratedModels\QueryPollsRequest $requestData, ?string $userID = null): StreamResponse { $path = '/api/v2/polls/query'; $queryParams = []; @@ -610,7 +610,7 @@ public function queryPolls(string $userID, GeneratedModels\QueryPollsRequest $re * @return StreamResponse * @throws StreamException */ - public function deletePoll(string $pollID, string $userID): StreamResponse { + public function deletePoll(string $pollID, ?string $userID = null): StreamResponse { $path = '/api/v2/polls/{poll_id}'; $path = str_replace('{poll_id}', (string) $pollID, $path); @@ -629,7 +629,7 @@ public function deletePoll(string $pollID, string $userID): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function getPoll(string $pollID, string $userID): StreamResponse { + public function getPoll(string $pollID, ?string $userID = null): StreamResponse { $path = '/api/v2/polls/{poll_id}'; $path = str_replace('{poll_id}', (string) $pollID, $path); @@ -711,7 +711,7 @@ public function updatePollOption(string $pollID, GeneratedModels\UpdatePollOptio * @return StreamResponse * @throws StreamException */ - public function deletePollOption(string $pollID, string $optionID, string $userID): StreamResponse { + public function deletePollOption(string $pollID, string $optionID, ?string $userID = null): StreamResponse { $path = '/api/v2/polls/{poll_id}/options/{option_id}'; $path = str_replace('{poll_id}', (string) $pollID, $path); $path = str_replace('{option_id}', (string) $optionID, $path); @@ -732,7 +732,7 @@ public function deletePollOption(string $pollID, string $optionID, string $userI * @return StreamResponse * @throws StreamException */ - public function getPollOption(string $pollID, string $optionID, string $userID): StreamResponse { + public function getPollOption(string $pollID, string $optionID, ?string $userID = null): StreamResponse { $path = '/api/v2/polls/{poll_id}/options/{option_id}'; $path = str_replace('{poll_id}', (string) $pollID, $path); $path = str_replace('{option_id}', (string) $optionID, $path); @@ -753,7 +753,7 @@ public function getPollOption(string $pollID, string $optionID, string $userID): * @return StreamResponse * @throws StreamException */ - public function queryPollVotes(string $pollID, string $userID, GeneratedModels\QueryPollVotesRequest $requestData): StreamResponse { + public function queryPollVotes(string $pollID, GeneratedModels\QueryPollVotesRequest $requestData, ?string $userID = null): StreamResponse { $path = '/api/v2/polls/{poll_id}/votes'; $path = str_replace('{poll_id}', (string) $pollID, $path); @@ -830,7 +830,7 @@ public function deletePushProvider(string $type, string $name): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function getPushTemplates(string $pushProviderType, string $pushProviderName): StreamResponse { + public function getPushTemplates(string $pushProviderType, ?string $pushProviderName = null): StreamResponse { $path = '/api/v2/push_templates'; $queryParams = []; @@ -868,7 +868,7 @@ public function upsertPushTemplate(GeneratedModels\UpsertPushTemplateRequest $re * @return StreamResponse * @throws StreamException */ - public function getRateLimits(bool $serverSide, bool $android, bool $ios, bool $web, string $endpoints): StreamResponse { + public function getRateLimits(?bool $serverSide = null, ?bool $android = null, ?bool $ios = null, ?bool $web = null, ?string $endpoints = null): StreamResponse { $path = '/api/v2/rate_limits'; $queryParams = []; @@ -928,7 +928,7 @@ public function createRole(GeneratedModels\CreateRoleRequest $requestData): Stre * @return StreamResponse * @throws StreamException */ - public function searchRoles(string $query, int $limit, string $nameGt, string $roleType, bool $includeGlobalRoles): StreamResponse { + public function searchRoles(string $query, ?int $limit = null, ?string $nameGt = null, ?string $roleType = null, ?bool $includeGlobalRoles = null): StreamResponse { $path = '/api/v2/roles/search'; $queryParams = []; @@ -987,7 +987,7 @@ public function getTask(string $id): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function deleteFile(string $url): StreamResponse { + public function deleteFile(?string $url = null): StreamResponse { $path = '/api/v2/uploads/file'; $queryParams = []; @@ -1018,7 +1018,7 @@ public function uploadFile(GeneratedModels\FileUploadRequest $requestData): Stre * @return StreamResponse * @throws StreamException */ - public function deleteImage(string $url): StreamResponse { + public function deleteImage(?string $url = null): StreamResponse { $path = '/api/v2/uploads/image'; $queryParams = []; @@ -1052,7 +1052,7 @@ public function uploadImage(GeneratedModels\ImageUploadRequest $requestData): St * @return StreamResponse * @throws StreamException */ - public function listUserGroups(int $limit, string $idGt, string $createdAtGt, string $teamID): StreamResponse { + public function listUserGroups(?int $limit = null, ?string $idGt = null, ?string $createdAtGt = null, ?string $teamID = null): StreamResponse { $path = '/api/v2/usergroups'; $queryParams = []; @@ -1096,7 +1096,7 @@ public function createUserGroup(GeneratedModels\CreateUserGroupRequest $requestD * @return StreamResponse * @throws StreamException */ - public function searchUserGroups(string $query, int $limit, string $nameGt, string $idGt, string $teamID): StreamResponse { + public function searchUserGroups(string $query, ?int $limit = null, ?string $nameGt = null, ?string $idGt = null, ?string $teamID = null): StreamResponse { $path = '/api/v2/usergroups/search'; $queryParams = []; @@ -1126,7 +1126,7 @@ public function searchUserGroups(string $query, int $limit, string $nameGt, stri * @return StreamResponse * @throws StreamException */ - public function deleteUserGroup(string $id, string $teamID): StreamResponse { + public function deleteUserGroup(string $id, ?string $teamID = null): StreamResponse { $path = '/api/v2/usergroups/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -1145,7 +1145,7 @@ public function deleteUserGroup(string $id, string $teamID): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function getUserGroup(string $id, string $teamID): StreamResponse { + public function getUserGroup(string $id, ?string $teamID = null): StreamResponse { $path = '/api/v2/usergroups/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -1211,7 +1211,7 @@ public function removeUserGroupMembers(string $id, GeneratedModels\RemoveUserGro * @return StreamResponse * @throws StreamException */ - public function queryUsers(GeneratedModels\QueryUsersPayload $payload): StreamResponse { + public function queryUsers(?GeneratedModels\QueryUsersPayload $payload = null): StreamResponse { $path = '/api/v2/users'; $queryParams = []; @@ -1265,7 +1265,7 @@ public function updateUsers(GeneratedModels\UpdateUsersRequest $requestData): St * @return StreamResponse * @throws StreamException */ - public function getBlockedUsers(string $userID): StreamResponse { + public function getBlockedUsers(?string $userID = null): StreamResponse { $path = '/api/v2/users/block'; $queryParams = []; @@ -1329,7 +1329,7 @@ public function deleteUsers(GeneratedModels\DeleteUsersRequest $requestData): St * @return StreamResponse * @throws StreamException */ - public function getUserLiveLocations(string $userID): StreamResponse { + public function getUserLiveLocations(?string $userID = null): StreamResponse { $path = '/api/v2/users/live_locations'; $queryParams = []; @@ -1347,7 +1347,7 @@ public function getUserLiveLocations(string $userID): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function updateLiveLocation(string $userID, GeneratedModels\UpdateLiveLocationRequest $requestData): StreamResponse { + public function updateLiveLocation(GeneratedModels\UpdateLiveLocationRequest $requestData, ?string $userID = null): StreamResponse { $path = '/api/v2/users/live_locations'; $queryParams = []; @@ -1452,4 +1452,4 @@ public function reactivateUser(string $userID, GeneratedModels\ReactivateUserReq // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\ReactivateUserResponse::class); } -} +} \ No newline at end of file diff --git a/src/Generated/FeedMethods.php b/src/Generated/FeedMethods.php index 075addc..cbfefb2 100644 --- a/src/Generated/FeedMethods.php +++ b/src/Generated/FeedMethods.php @@ -23,19 +23,21 @@ trait FeedMethods * @throws StreamException */ public function deleteFeed( - bool $hardDelete, bool $purgeUserActivities, ): StreamResponse { - return $this->feedsV3Client->deleteFeed($this->feedGroup, $this->feedId,$hardDelete, $purgeUserActivities); + ?bool $hardDelete = null, ?bool $purgeUserActivities = null): StreamResponse { + return $this->feedsV3Client->deleteFeed($this->feedGroup, $this->feedId, $hardDelete, $purgeUserActivities); } /** * Create a single feed for a given feed group * + * @param string $language + * @param bool $translateText * @param GeneratedModels\GetOrCreateFeedRequest $requestData * @return StreamResponse * @throws StreamException */ public function getOrCreateFeed( - GeneratedModels\GetOrCreateFeedRequest $requestData): StreamResponse { - return $this->feedsV3Client->getOrCreateFeed($this->feedGroup, $this->feedId, $requestData); + GeneratedModels\GetOrCreateFeedRequest $requestData, ?string $language = null, ?bool $translateText = null): StreamResponse { + return $this->feedsV3Client->getOrCreateFeed($this->feedGroup, $this->feedId, $requestData, $language, $translateText); } /** * Update an existing feed @@ -69,8 +71,8 @@ public function markActivity( * @throws StreamException */ public function unpinActivity( - string $activityID, bool $enrichOwnFields, string $userID, ): StreamResponse { - return $this->feedsV3Client->unpinActivity($this->feedGroup, $this->feedId, $activityID,$enrichOwnFields, $userID); + string $activityID, ?bool $enrichOwnFields = null, ?string $userID = null): StreamResponse { + return $this->feedsV3Client->unpinActivity($this->feedGroup, $this->feedId, $activityID, $enrichOwnFields, $userID); } /** * Pin an activity to a feed. Pinned activities are typically displayed at the top of a feed. @@ -142,13 +144,15 @@ public function rejectFeedMemberInvite( /** * Query pinned activities for a feed with filter query * + * @param string $language + * @param bool $translateText * @param GeneratedModels\QueryPinnedActivitiesRequest $requestData * @return StreamResponse * @throws StreamException */ public function queryPinnedActivities( - GeneratedModels\QueryPinnedActivitiesRequest $requestData): StreamResponse { - return $this->feedsV3Client->queryPinnedActivities($this->feedGroup, $this->feedId, $requestData); + GeneratedModels\QueryPinnedActivitiesRequest $requestData, ?string $language = null, ?bool $translateText = null): StreamResponse { + return $this->feedsV3Client->queryPinnedActivities($this->feedGroup, $this->feedId, $requestData, $language, $translateText); } } diff --git a/src/Generated/FeedsTrait.php b/src/Generated/FeedsTrait.php index 426be13..492699f 100644 --- a/src/Generated/FeedsTrait.php +++ b/src/Generated/FeedsTrait.php @@ -43,7 +43,7 @@ public function upsertActivities(GeneratedModels\UpsertActivitiesRequest $reques return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\UpsertActivitiesResponse::class); } /** - * Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values) will fail the entire batch request. + * Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values, exceeding size limits) will fail the entire batch request. * Sends events: * - feeds.activity.updated * @@ -89,17 +89,39 @@ public function trackActivityMetrics(GeneratedModels\TrackActivityMetricsRequest /** * Query activities based on filters with pagination and sorting options * + * @param string $language + * @param bool $translateText * @param GeneratedModels\QueryActivitiesRequest $requestData * @return StreamResponse * @throws StreamException */ - public function queryActivities(GeneratedModels\QueryActivitiesRequest $requestData): StreamResponse { + public function queryActivities(GeneratedModels\QueryActivitiesRequest $requestData, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/activities/query'; $queryParams = []; + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\QueryActivitiesResponse::class); } + /** + * Returns a single user's reactions across a set of activity IDs, without activity payloads + * + * @param GeneratedModels\BatchQueryActivityReactionsRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function batchQueryActivityReactions(GeneratedModels\BatchQueryActivityReactionsRequest $requestData): StreamResponse { + $path = '/api/v2/feeds/activities/reactions/query'; + + $queryParams = []; + // Use the provided request data array directly + return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\BatchQueryActivityReactionsResponse::class); + } /** * Deletes a bookmark from an activity * @@ -109,7 +131,7 @@ public function queryActivities(GeneratedModels\QueryActivitiesRequest $requestD * @return StreamResponse * @throws StreamException */ - public function deleteBookmark(string $activityID, string $folderID, string $userID): StreamResponse { + public function deleteBookmark(string $activityID, ?string $folderID = null, ?string $userID = null): StreamResponse { $path = '/api/v2/feeds/activities/{activity_id}/bookmarks'; $path = str_replace('{activity_id}', (string) $activityID, $path); @@ -209,7 +231,7 @@ public function castPollVote(string $activityID, string $pollID, GeneratedModels * @return StreamResponse * @throws StreamException */ - public function deletePollVote(string $activityID, string $pollID, string $voteID, string $userID): StreamResponse { + public function deletePollVote(string $activityID, string $pollID, string $voteID, ?string $userID = null): StreamResponse { $path = '/api/v2/feeds/activities/{activity_id}/polls/{poll_id}/vote/{vote_id}'; $path = str_replace('{activity_id}', (string) $activityID, $path); $path = str_replace('{poll_id}', (string) $pollID, $path); @@ -264,7 +286,7 @@ public function queryActivityReactions(string $activityID, GeneratedModels\Query * @return StreamResponse * @throws StreamException */ - public function deleteActivityReaction(string $activityID, string $type, bool $deleteNotificationActivity, string $userID): StreamResponse { + public function deleteActivityReaction(string $activityID, string $type, ?bool $deleteNotificationActivity = null, ?string $userID = null): StreamResponse { $path = '/api/v2/feeds/activities/{activity_id}/reactions/{type}'; $path = str_replace('{activity_id}', (string) $activityID, $path); $path = str_replace('{type}', (string) $type, $path); @@ -279,6 +301,33 @@ public function deleteActivityReaction(string $activityID, string $type, bool $d $requestData = null; return StreamResponse::fromJson($this->makeRequest('DELETE', $path, $queryParams, $requestData), GeneratedModels\DeleteActivityReactionResponse::class); } + /** + * List the shares recorded for an activity, newest-first + * + * @param string $activityID + * @param int $limit + * @param string $prev + * @param string $next + * @return StreamResponse + * @throws StreamException + */ + public function queryActivityShares(string $activityID, ?int $limit = null, ?string $prev = null, ?string $next = null): StreamResponse { + $path = '/api/v2/feeds/activities/{activity_id}/shares'; + $path = str_replace('{activity_id}', (string) $activityID, $path); + + $queryParams = []; + if ($limit !== null) { + $queryParams['limit'] = $limit; + } + if ($prev !== null) { + $queryParams['prev'] = $prev; + } + if ($next !== null) { + $queryParams['next'] = $next; + } + $requestData = null; + return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\QueryActivitySharesResponse::class); + } /** * Delete a single activity by its ID * @@ -288,7 +337,7 @@ public function deleteActivityReaction(string $activityID, string $type, bool $d * @return StreamResponse * @throws StreamException */ - public function deleteActivity(string $id, bool $hardDelete, bool $deleteNotificationActivity): StreamResponse { + public function deleteActivity(string $id, ?bool $hardDelete = null, ?bool $deleteNotificationActivity = null): StreamResponse { $path = '/api/v2/feeds/activities/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -309,10 +358,12 @@ public function deleteActivity(string $id, bool $hardDelete, bool $deleteNotific * @param string $commentSort * @param int $commentLimit * @param string $userID + * @param string $language + * @param bool $translateText * @return StreamResponse * @throws StreamException */ - public function getActivity(string $id, string $commentSort, int $commentLimit, string $userID): StreamResponse { + public function getActivity(string $id, ?string $commentSort = null, ?int $commentLimit = null, ?string $userID = null, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/activities/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -326,6 +377,12 @@ public function getActivity(string $id, string $commentSort, int $commentLimit, if ($userID !== null) { $queryParams['user_id'] = $userID; } + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } $requestData = null; return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetActivityResponse::class); } @@ -374,7 +431,7 @@ public function updateActivity(string $id, GeneratedModels\UpdateActivityRequest * @return StreamResponse * @throws StreamException */ - public function restoreActivity(string $id, bool $enrichOwnFields, GeneratedModels\RestoreActivityRequest $requestData): StreamResponse { + public function restoreActivity(string $id, GeneratedModels\RestoreActivityRequest $requestData, ?bool $enrichOwnFields = null): StreamResponse { $path = '/api/v2/feeds/activities/{id}/restore'; $path = str_replace('{id}', (string) $id, $path); @@ -385,6 +442,24 @@ public function restoreActivity(string $id, bool $enrichOwnFields, GeneratedMode // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\RestoreActivityResponse::class); } + /** + * Translates an activity's text to a given language using automated translation + * Sends events: + * - feeds.activity.updated + * + * @param string $id + * @param GeneratedModels\TranslateActivityRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function translateActivity(string $id, GeneratedModels\TranslateActivityRequest $requestData): StreamResponse { + $path = '/api/v2/feeds/activities/{id}/translate'; + $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\TranslateActivityResponse::class); + } /** * Query bookmark folders with filter query * @@ -433,14 +508,22 @@ public function updateBookmarkFolder(string $folderID, GeneratedModels\UpdateBoo /** * Query bookmarks with filter query * + * @param string $language + * @param bool $translateText * @param GeneratedModels\QueryBookmarksRequest $requestData * @return StreamResponse * @throws StreamException */ - public function queryBookmarks(GeneratedModels\QueryBookmarksRequest $requestData): StreamResponse { + public function queryBookmarks(GeneratedModels\QueryBookmarksRequest $requestData, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/bookmarks/query'; $queryParams = []; + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\QueryBookmarksResponse::class); } @@ -469,7 +552,7 @@ public function deleteCollections(array $collectionRefs): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function readCollections(string $userID, array $collectionRefs): StreamResponse { + public function readCollections(?string $userID = null, ?array $collectionRefs = null): StreamResponse { $path = '/api/v2/feeds/collections'; $queryParams = []; @@ -551,10 +634,12 @@ public function queryCollections(GeneratedModels\QueryCollectionsRequest $reques * @param int $limit * @param string $prev * @param string $next + * @param string $language + * @param bool $translateText * @return StreamResponse * @throws StreamException */ - public function getComments(string $objectID, string $objectType, int $depth, string $sort, int $repliesLimit, string $idAround, string $userID, int $limit, string $prev, string $next): StreamResponse { + public function getComments(string $objectID, string $objectType, ?int $depth = null, ?string $sort = null, ?int $repliesLimit = null, ?string $idAround = null, ?string $userID = null, ?int $limit = null, ?string $prev = null, ?string $next = null, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/comments'; $queryParams = []; @@ -588,6 +673,12 @@ public function getComments(string $objectID, string $objectType, int $depth, st if ($next !== null) { $queryParams['next'] = $next; } + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } $requestData = null; return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetCommentsResponse::class); } @@ -622,17 +713,39 @@ public function addCommentsBatch(GeneratedModels\AddCommentsBatchRequest $reques /** * Query comments using MongoDB-style filters with pagination and sorting options * + * @param string $language + * @param bool $translateText * @param GeneratedModels\QueryCommentsRequest $requestData * @return StreamResponse * @throws StreamException */ - public function queryComments(GeneratedModels\QueryCommentsRequest $requestData): StreamResponse { + public function queryComments(GeneratedModels\QueryCommentsRequest $requestData, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/comments/query'; $queryParams = []; + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\QueryCommentsResponse::class); } + /** + * Returns a single user's reactions across a set of comment IDs, without comment payloads + * + * @param GeneratedModels\BatchQueryCommentReactionsRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function batchQueryCommentReactions(GeneratedModels\BatchQueryCommentReactionsRequest $requestData): StreamResponse { + $path = '/api/v2/feeds/comments/reactions/query'; + + $queryParams = []; + // Use the provided request data array directly + return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\BatchQueryCommentReactionsResponse::class); + } /** * Deletes a bookmark from a comment * @@ -642,7 +755,7 @@ public function queryComments(GeneratedModels\QueryCommentsRequest $requestData) * @return StreamResponse * @throws StreamException */ - public function deleteCommentBookmark(string $commentID, string $folderID, string $userID): StreamResponse { + public function deleteCommentBookmark(string $commentID, ?string $folderID = null, ?string $userID = null): StreamResponse { $path = '/api/v2/feeds/comments/{comment_id}/bookmarks'; $path = str_replace('{comment_id}', (string) $commentID, $path); @@ -697,7 +810,7 @@ public function addCommentBookmark(string $commentID, GeneratedModels\AddComment * @return StreamResponse * @throws StreamException */ - public function deleteComment(string $id, bool $hardDelete, bool $deleteNotificationActivity): StreamResponse { + public function deleteComment(string $id, ?bool $hardDelete = null, ?bool $deleteNotificationActivity = null): StreamResponse { $path = '/api/v2/feeds/comments/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -716,10 +829,12 @@ public function deleteComment(string $id, bool $hardDelete, bool $deleteNotifica * * @param string $id * @param string $userID + * @param string $language + * @param bool $translateText * @return StreamResponse * @throws StreamException */ - public function getComment(string $id, string $userID): StreamResponse { + public function getComment(string $id, ?string $userID = null, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/comments/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -727,6 +842,12 @@ public function getComment(string $id, string $userID): StreamResponse { if ($userID !== null) { $queryParams['user_id'] = $userID; } + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } $requestData = null; return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetCommentResponse::class); } @@ -807,7 +928,7 @@ public function queryCommentReactions(string $id, GeneratedModels\QueryCommentRe * @return StreamResponse * @throws StreamException */ - public function deleteCommentReaction(string $id, string $type, bool $deleteNotificationActivity, string $userID): StreamResponse { + public function deleteCommentReaction(string $id, string $type, ?bool $deleteNotificationActivity = null, ?string $userID = null): StreamResponse { $path = '/api/v2/feeds/comments/{id}/reactions/{type}'; $path = str_replace('{id}', (string) $id, $path); $path = str_replace('{type}', (string) $type, $path); @@ -834,10 +955,12 @@ public function deleteCommentReaction(string $id, string $type, bool $deleteNoti * @param int $limit * @param string $prev * @param string $next + * @param string $language + * @param bool $translateText * @return StreamResponse * @throws StreamException */ - public function getCommentReplies(string $id, int $depth, string $sort, int $repliesLimit, string $idAround, string $userID, int $limit, string $prev, string $next): StreamResponse { + public function getCommentReplies(string $id, ?int $depth = null, ?string $sort = null, ?int $repliesLimit = null, ?string $idAround = null, ?string $userID = null, ?int $limit = null, ?string $prev = null, ?string $next = null, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/comments/{id}/replies'; $path = str_replace('{id}', (string) $id, $path); @@ -866,6 +989,12 @@ public function getCommentReplies(string $id, int $depth, string $sort, int $rep if ($next !== null) { $queryParams['next'] = $next; } + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } $requestData = null; return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetCommentRepliesResponse::class); } @@ -885,6 +1014,24 @@ public function restoreComment(string $id, GeneratedModels\RestoreCommentRequest // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\RestoreCommentResponse::class); } + /** + * Translates a comment's text to a given language using automated translation + * Sends events: + * - feeds.comment.updated + * + * @param string $id + * @param GeneratedModels\TranslateCommentRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function translateComment(string $id, GeneratedModels\TranslateCommentRequest $requestData): StreamResponse { + $path = '/api/v2/feeds/comments/{id}/translate'; + $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\TranslateCommentResponse::class); + } /** * List all feed groups for the application * @@ -892,7 +1039,7 @@ public function restoreComment(string $id, GeneratedModels\RestoreCommentRequest * @return StreamResponse * @throws StreamException */ - public function listFeedGroups(bool $includeSoftDeleted): StreamResponse { + public function listFeedGroups(?bool $includeSoftDeleted = null): StreamResponse { $path = '/api/v2/feeds/feed_groups'; $queryParams = []; @@ -926,7 +1073,7 @@ public function createFeedGroup(GeneratedModels\CreateFeedGroupRequest $requestD * @return StreamResponse * @throws StreamException */ - public function deleteFeed(string $feedGroupID, string $feedID, bool $hardDelete, bool $purgeUserActivities): StreamResponse { + public function deleteFeed(string $feedGroupID, string $feedID, ?bool $hardDelete = null, ?bool $purgeUserActivities = null): StreamResponse { $path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}'; $path = str_replace('{feed_group_id}', (string) $feedGroupID, $path); $path = str_replace('{feed_id}', (string) $feedID, $path); @@ -946,16 +1093,24 @@ public function deleteFeed(string $feedGroupID, string $feedID, bool $hardDelete * * @param string $feedGroupID * @param string $feedID + * @param string $language + * @param bool $translateText * @param GeneratedModels\GetOrCreateFeedRequest $requestData * @return StreamResponse * @throws StreamException */ - public function getOrCreateFeed(string $feedGroupID, string $feedID, GeneratedModels\GetOrCreateFeedRequest $requestData): StreamResponse { + public function getOrCreateFeed(string $feedGroupID, string $feedID, GeneratedModels\GetOrCreateFeedRequest $requestData, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}'; $path = str_replace('{feed_group_id}', (string) $feedGroupID, $path); $path = str_replace('{feed_id}', (string) $feedID, $path); $queryParams = []; + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\GetOrCreateFeedResponse::class); } @@ -1006,7 +1161,7 @@ public function markActivity(string $feedGroupID, string $feedID, GeneratedModel * @return StreamResponse * @throws StreamException */ - public function unpinActivity(string $feedGroupID, string $feedID, string $activityID, bool $enrichOwnFields, string $userID): StreamResponse { + public function unpinActivity(string $feedGroupID, string $feedID, string $activityID, ?bool $enrichOwnFields = null, ?string $userID = null): StreamResponse { $path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/activities/{activity_id}/pin'; $path = str_replace('{feed_group_id}', (string) $feedGroupID, $path); $path = str_replace('{feed_id}', (string) $feedID, $path); @@ -1137,16 +1292,24 @@ public function rejectFeedMemberInvite(string $feedGroupID, string $feedID, Gene * * @param string $feedGroupID * @param string $feedID + * @param string $language + * @param bool $translateText * @param GeneratedModels\QueryPinnedActivitiesRequest $requestData * @return StreamResponse * @throws StreamException */ - public function queryPinnedActivities(string $feedGroupID, string $feedID, GeneratedModels\QueryPinnedActivitiesRequest $requestData): StreamResponse { + public function queryPinnedActivities(string $feedGroupID, string $feedID, GeneratedModels\QueryPinnedActivitiesRequest $requestData, ?string $language = null, ?bool $translateText = null): StreamResponse { $path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query'; $path = str_replace('{feed_group_id}', (string) $feedGroupID, $path); $path = str_replace('{feed_id}', (string) $feedID, $path); $queryParams = []; + if ($language !== null) { + $queryParams['language'] = $language; + } + if ($translateText !== null) { + $queryParams['translate_text'] = $translateText; + } // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\QueryPinnedActivitiesResponse::class); } @@ -1159,7 +1322,7 @@ public function queryPinnedActivities(string $feedGroupID, string $feedID, Gener * @return StreamResponse * @throws StreamException */ - public function getFollowSuggestions(string $feedGroupID, int $limit, string $userID): StreamResponse { + public function getFollowSuggestions(string $feedGroupID, ?int $limit = null, ?string $userID = null): StreamResponse { $path = '/api/v2/feeds/feed_groups/{feed_group_id}/follow_suggestions'; $path = str_replace('{feed_group_id}', (string) $feedGroupID, $path); @@ -1196,7 +1359,7 @@ public function restoreFeedGroup(string $feedGroupID): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function deleteFeedGroup(string $id, bool $hardDelete): StreamResponse { + public function deleteFeedGroup(string $id, ?bool $hardDelete = null): StreamResponse { $path = '/api/v2/feeds/feed_groups/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -1215,7 +1378,7 @@ public function deleteFeedGroup(string $id, bool $hardDelete): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function getFeedGroup(string $id, bool $includeSoftDeleted): StreamResponse { + public function getFeedGroup(string $id, ?bool $includeSoftDeleted = null): StreamResponse { $path = '/api/v2/feeds/feed_groups/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -1459,7 +1622,7 @@ public function queryFeeds(GeneratedModels\QueryFeedsRequest $requestData): Stre * @return StreamResponse * @throws StreamException */ - public function getFeedsRateLimits(string $endpoints, bool $android, bool $ios, bool $web, bool $serverSide): StreamResponse { + public function getFeedsRateLimits(?string $endpoints = null, ?bool $android = null, ?bool $ios = null, ?bool $web = null, ?bool $serverSide = null): StreamResponse { $path = '/api/v2/feeds/feeds/rate_limits'; $queryParams = []; @@ -1604,7 +1767,7 @@ public function getOrCreateFollow(GeneratedModels\FollowRequest $requestData): S * @return StreamResponse * @throws StreamException */ - public function unfollow(string $source, string $target, bool $deleteNotificationActivity, bool $keepHistory, bool $enrichOwnFields): StreamResponse { + public function unfollow(string $source, string $target, ?bool $deleteNotificationActivity = null, ?bool $keepHistory = null, ?bool $enrichOwnFields = null): StreamResponse { $path = '/api/v2/feeds/follows/{source}/{target}'; $path = str_replace('{source}', (string) $source, $path); $path = str_replace('{target}', (string) $target, $path); @@ -1792,7 +1955,7 @@ public function exportFeedUserData(string $userID): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function getUserInterests(string $userID, int $limit): StreamResponse { + public function getUserInterests(string $userID, ?int $limit = null): StreamResponse { $path = '/api/v2/feeds/users/{user_id}/interests'; $path = str_replace('{user_id}', (string) $userID, $path); @@ -1803,4 +1966,4 @@ public function getUserInterests(string $userID, int $limit): StreamResponse { $requestData = null; return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetUserInterestsResponse::class); } -} +} \ No newline at end of file diff --git a/src/Generated/ModerationTrait.php b/src/Generated/ModerationTrait.php index ee4ffc3..af8c7de 100644 --- a/src/Generated/ModerationTrait.php +++ b/src/Generated/ModerationTrait.php @@ -25,7 +25,7 @@ trait ModerationTrait * @return StreamResponse * @throws StreamException */ - public function getActionConfig(string $queueType, string $entityType, bool $excludeDefaults, bool $onlyDefaults, string $userID): StreamResponse { + public function getActionConfig(?string $queueType = null, ?string $entityType = null, ?bool $excludeDefaults = null, ?bool $onlyDefaults = null, ?string $userID = null): StreamResponse { $path = '/api/v2/moderation/action_config'; $queryParams = []; @@ -97,7 +97,7 @@ public function bulkDeleteActionConfig(GeneratedModels\BulkDeleteActionConfigReq * @return StreamResponse * @throws StreamException */ - public function deleteActionConfig(string $id, string $userID): StreamResponse { + public function deleteActionConfig(string $id, ?string $userID = null): StreamResponse { $path = '/api/v2/moderation/action_config/{id}'; $path = str_replace('{id}', (string) $id, $path); @@ -286,7 +286,7 @@ public function upsertConfig(GeneratedModels\UpsertConfigRequest $requestData): * @return StreamResponse * @throws StreamException */ - public function deleteConfig(string $key, string $team, string $userID): StreamResponse { + public function deleteConfig(string $key, ?string $team = null, ?string $userID = null): StreamResponse { $path = '/api/v2/moderation/config/{key}'; $path = str_replace('{key}', (string) $key, $path); @@ -308,7 +308,7 @@ public function deleteConfig(string $key, string $team, string $userID): StreamR * @return StreamResponse * @throws StreamException */ - public function getConfig(string $key, string $team): StreamResponse { + public function getConfig(string $key, ?string $team = null): StreamResponse { $path = '/api/v2/moderation/config/{key}'; $path = str_replace('{key}', (string) $key, $path); @@ -492,7 +492,7 @@ public function upsertModerationRule(GeneratedModels\UpsertModerationRuleRequest * @return StreamResponse * @throws StreamException */ - public function deleteModerationRule(string $userID): StreamResponse { + public function deleteModerationRule(?string $userID = null): StreamResponse { $path = '/api/v2/moderation/moderation_rule/{id}'; $queryParams = []; @@ -543,6 +543,79 @@ public function mute(GeneratedModels\MuteRequest $requestData): StreamResponse { // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\MuteResponse::class); } + /** + * + * @return StreamResponse + * @throws StreamException + */ + public function listQueues(): StreamResponse { + $path = '/api/v2/moderation/queues'; + + $queryParams = []; + $requestData = null; + return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\ListQueuesResponse::class); + } + /** + * + * @param GeneratedModels\CreateQueueRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function createQueue(GeneratedModels\CreateQueueRequest $requestData): StreamResponse { + $path = '/api/v2/moderation/queues'; + + $queryParams = []; + // Use the provided request data array directly + return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\QueueResponse::class); + } + /** + * + * @param string $id + * @param string $userID + * @return StreamResponse + * @throws StreamException + */ + public function getQueue(string $id, ?string $userID = null): StreamResponse { + $path = '/api/v2/moderation/queues/{id}'; + $path = str_replace('{id}', (string) $id, $path); + + $queryParams = []; + if ($userID !== null) { + $queryParams['user_id'] = $userID; + } + $requestData = null; + return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\QueueResponse::class); + } + /** + * + * @param string $id + * @param GeneratedModels\UpdateQueueRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function updateQueue(string $id, GeneratedModels\UpdateQueueRequest $requestData): StreamResponse { + $path = '/api/v2/moderation/queues/{id}'; + $path = str_replace('{id}', (string) $id, $path); + + $queryParams = []; + // Use the provided request data array directly + return StreamResponse::fromJson($this->makeRequest('PATCH', $path, $queryParams, $requestData), GeneratedModels\QueueResponse::class); + } + /** + * + * @param string $id + * @param GeneratedModels\DeleteQueueRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function deleteQueue(string $id, GeneratedModels\DeleteQueueRequest $requestData): StreamResponse { + $path = '/api/v2/moderation/queues/{id}/delete'; + $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\QueueResponse::class); + } /** * Query review queue items allows you to filter the review queue items. This is used for building a moderation dashboard. * @@ -637,7 +710,7 @@ public function submitModerationFeedback(GeneratedModels\SubmitModerationFeedbac * @return StreamResponse * @throws StreamException */ - public function unban(string $targetUserID, string $channelCid, string $createdBy, GeneratedModels\UnbanRequest $requestData): StreamResponse { + public function unban(GeneratedModels\UnbanRequest $requestData, string $targetUserID, ?string $channelCid = null, ?string $createdBy = null): StreamResponse { $path = '/api/v2/moderation/unban'; $queryParams = []; @@ -667,4 +740,4 @@ public function unmute(GeneratedModels\UnmuteRequest $requestData): StreamRespon // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\UnmuteResponse::class); } -} +} \ No newline at end of file diff --git a/src/Generated/VideoTrait.php b/src/Generated/VideoTrait.php index bc368af..10779c0 100644 --- a/src/Generated/VideoTrait.php +++ b/src/Generated/VideoTrait.php @@ -34,7 +34,7 @@ public function getActiveCallsStatus(): StreamResponse { * @return StreamResponse * @throws StreamException */ - public function queryUserFeedback(bool $full, GeneratedModels\QueryUserFeedbackRequest $requestData): StreamResponse { + public function queryUserFeedback(GeneratedModels\QueryUserFeedbackRequest $requestData, ?bool $full = null): StreamResponse { $path = '/api/v2/video/call/feedback'; $queryParams = []; @@ -82,7 +82,7 @@ public function queryCallStats(GeneratedModels\QueryCallStatsRequest $requestDat * @return StreamResponse * @throws StreamException */ - public function getCall(string $type, string $id, int $membersLimit, bool $ring, bool $notify, bool $video): StreamResponse { + public function getCall(string $type, string $id, ?int $membersLimit = null, ?bool $ring = null, ?bool $notify = null, ?bool $video = null): StreamResponse { $path = '/api/v2/video/call/{type}/{id}'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -335,7 +335,7 @@ public function muteUsers(string $type, string $id, GeneratedModels\MuteUsersReq * @return StreamResponse * @throws StreamException */ - public function queryCallParticipants(string $id, string $type, int $limit, GeneratedModels\QueryCallParticipantsRequest $requestData): StreamResponse { + public function queryCallParticipants(string $id, string $type, GeneratedModels\QueryCallParticipantsRequest $requestData, ?int $limit = null): StreamResponse { $path = '/api/v2/video/call/{type}/{id}/participants'; $path = str_replace('{id}', (string) $id, $path); $path = str_replace('{type}', (string) $type, $path); @@ -434,7 +434,7 @@ public function stopRecording(string $type, string $id, string $recordingType, G * @return StreamResponse * @throws StreamException */ - public function getCallReport(string $type, string $id, string $sessionID): StreamResponse { + public function getCallReport(string $type, string $id, ?string $sessionID = null): StreamResponse { $path = '/api/v2/video/call/{type}/{id}/report'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -533,7 +533,7 @@ public function stopRTMPBroadcast(string $type, string $id, string $name, Genera * @return StreamResponse * @throws StreamException */ - public function getCallParticipantSessionMetrics(string $type, string $id, string $session, string $user, string $userSession, \DateTime $since, \DateTime $until): StreamResponse { + public function getCallParticipantSessionMetrics(string $type, string $id, string $session, string $user, string $userSession, ?\DateTime $since = null, ?\DateTime $until = null): StreamResponse { $path = '/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -563,7 +563,7 @@ public function getCallParticipantSessionMetrics(string $type, string $id, strin * @return StreamResponse * @throws StreamException */ - public function queryCallParticipantSessions(string $type, string $id, string $session, int $limit, string $prev, string $next, object $filterConditions): StreamResponse { + public function queryCallParticipantSessions(string $type, string $id, string $session, ?int $limit = null, ?string $prev = null, ?string $next = null, ?object $filterConditions = null): StreamResponse { $path = '/api/v2/video/call/{type}/{id}/session/{session}/participant_sessions'; $path = str_replace('{type}', (string) $type, $path); $path = str_replace('{id}', (string) $id, $path); @@ -912,7 +912,7 @@ public function queryCallSessionStats(GeneratedModels\QueryCallSessionStatsReque * @return StreamResponse * @throws StreamException */ - public function getCallStatsMap(string $callType, string $callID, string $session, \DateTime $startTime, \DateTime $endTime, bool $excludePublishers, bool $excludeSubscribers, bool $excludeSfus): StreamResponse { + public function getCallStatsMap(string $callType, string $callID, string $session, ?\DateTime $startTime = null, ?\DateTime $endTime = null, ?bool $excludePublishers = null, ?bool $excludeSubscribers = null, ?bool $excludeSfus = null): StreamResponse { $path = '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/map'; $path = str_replace('{call_type}', (string) $callType, $path); $path = str_replace('{call_id}', (string) $callID, $path); @@ -950,7 +950,7 @@ public function getCallStatsMap(string $callType, string $callID, string $sessio * @return StreamResponse * @throws StreamException */ - public function getCallSessionParticipantStatsDetails(string $callType, string $callID, string $session, string $user, string $userSession, string $since, string $until, int $maxPoints): StreamResponse { + public function getCallSessionParticipantStatsDetails(string $callType, string $callID, string $session, string $user, string $userSession, ?string $since = null, ?string $until = null, ?int $maxPoints = null): StreamResponse { $path = '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participant/{user}/{user_session}/details'; $path = str_replace('{call_type}', (string) $callType, $path); $path = str_replace('{call_id}', (string) $callID, $path); @@ -984,7 +984,7 @@ public function getCallSessionParticipantStatsDetails(string $callType, string $ * @return StreamResponse * @throws StreamException */ - public function queryCallSessionParticipantStats(string $callType, string $callID, string $session, int $limit, string $prev, string $next, array $sort, object $filterConditions): StreamResponse { + public function queryCallSessionParticipantStats(string $callType, string $callID, string $session, ?int $limit = null, ?string $prev = null, ?string $next = null, ?array $sort = null, ?object $filterConditions = null): StreamResponse { $path = '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants'; $path = str_replace('{call_type}', (string) $callType, $path); $path = str_replace('{call_id}', (string) $callID, $path); @@ -1026,7 +1026,7 @@ public function queryCallSessionParticipantStats(string $callType, string $callI * @return StreamResponse * @throws StreamException */ - public function getCallSessionParticipantStatsTimeline(string $callType, string $callID, string $session, string $user, string $userSession, string $startTime, string $endTime, array $severity): StreamResponse { + public function getCallSessionParticipantStatsTimeline(string $callType, string $callID, string $session, string $user, string $userSession, ?string $startTime = null, ?string $endTime = null, ?array $severity = null): StreamResponse { $path = '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants/{user}/{user_session}/timeline'; $path = str_replace('{call_type}', (string) $callType, $path); $path = str_replace('{call_id}', (string) $callID, $path); @@ -1299,4 +1299,4 @@ public function queryAggregateCallStats(GeneratedModels\QueryAggregateCallStatsR // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\QueryAggregateCallStatsResponse::class); } -} +} \ No newline at end of file diff --git a/src/Generated/Webhook.php b/src/Generated/Webhook.php index c815aeb..25a4946 100644 --- a/src/Generated/Webhook.php +++ b/src/Generated/Webhook.php @@ -24,6 +24,7 @@ use GetStream\GeneratedModels\AsyncExportChannelsEvent; use GetStream\GeneratedModels\AsyncExportErrorEvent; use GetStream\GeneratedModels\AsyncExportModerationLogsEvent; +use GetStream\GeneratedModels\AsyncExportReviewQueueEvent; use GetStream\GeneratedModels\AsyncExportUsersEvent; use GetStream\GeneratedModels\BlockedUserEvent; use GetStream\GeneratedModels\BookmarkAddedEvent; @@ -263,6 +264,8 @@ class Webhook public const EVENT_TYPE_EXPORT_CHANNELS_SUCCESS = 'export.channels.success'; public const EVENT_TYPE_EXPORT_MODERATION_LOGS_ERROR = 'export.moderation_logs.error'; public const EVENT_TYPE_EXPORT_MODERATION_LOGS_SUCCESS = 'export.moderation_logs.success'; + public const EVENT_TYPE_EXPORT_REVIEW_QUEUE_ERROR = 'export.review_queue.error'; + public const EVENT_TYPE_EXPORT_REVIEW_QUEUE_SUCCESS = 'export.review_queue.success'; public const EVENT_TYPE_EXPORT_USERS_ERROR = 'export.users.error'; public const EVENT_TYPE_EXPORT_USERS_SUCCESS = 'export.users.success'; public const EVENT_TYPE_FEEDS_ACTIVITY_ADDED = 'feeds.activity.added'; @@ -502,6 +505,8 @@ private static function getEventClass(string $eventType): ?string 'export.channels.success' => AsyncExportChannelsEvent::class, 'export.moderation_logs.error' => AsyncExportErrorEvent::class, 'export.moderation_logs.success' => AsyncExportModerationLogsEvent::class, + 'export.review_queue.error' => AsyncExportErrorEvent::class, + 'export.review_queue.success' => AsyncExportReviewQueueEvent::class, 'export.users.error' => AsyncExportErrorEvent::class, 'export.users.success' => AsyncExportUsersEvent::class, 'feeds.activity.added' => ActivityAddedEvent::class, diff --git a/src/GeneratedModels/AIAudioConfigRequest.php b/src/GeneratedModels/AIAudioConfigRequest.php new file mode 100644 index 0000000..ed2ec41 --- /dev/null +++ b/src/GeneratedModels/AIAudioConfigRequest.php @@ -0,0 +1,18 @@ +|null */ + #[ArrayOf(BodyguardRule::class)] + public ?array $rules = null, + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/AIAudioConfigResponse.php b/src/GeneratedModels/AIAudioConfigResponse.php new file mode 100644 index 0000000..9e13529 --- /dev/null +++ b/src/GeneratedModels/AIAudioConfigResponse.php @@ -0,0 +1,19 @@ +|null */ + #[ArrayOf(BodyguardRule::class)] + public ?array $rules = null, + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/ActivityResponse.php b/src/GeneratedModels/ActivityResponse.php index 5e9c1ff..42cf619 100644 --- a/src/GeneratedModels/ActivityResponse.php +++ b/src/GeneratedModels/ActivityResponse.php @@ -31,6 +31,7 @@ public function __construct( #[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, @@ -50,6 +51,9 @@ public function __construct( /** @var array|null */ #[ArrayOf(FeedsReactionResponse::class)] public ?array $latestReactions = null, // Recent reactions to the activity + /** @var array|null */ + #[ArrayOf(ShareResponse::class)] + public ?array $latestShares = null, // Recent shares of the activity, one entry per share (org-gated) /** @var array|null */ #[MapOf(FeedsReactionGroupResponse::class)] public ?array $reactionGroups = null, // Grouped reactions by type diff --git a/src/GeneratedModels/AddCommentReactionRequest.php b/src/GeneratedModels/AddCommentReactionRequest.php index a4c167b..fc070db 100644 --- a/src/GeneratedModels/AddCommentReactionRequest.php +++ b/src/GeneratedModels/AddCommentReactionRequest.php @@ -13,6 +13,7 @@ public function __construct( 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 ?array $targetFeeds = null, // Optional list of feeds to create a reference (share) activity of the commented-on activity in. The reference activity's type mirrors the reaction type. public ?string $userID = null, public ?UserRequest $user = null, ) { diff --git a/src/GeneratedModels/AddCommentReactionResponse.php b/src/GeneratedModels/AddCommentReactionResponse.php index 7a48321..d5b0d30 100644 --- a/src/GeneratedModels/AddCommentReactionResponse.php +++ b/src/GeneratedModels/AddCommentReactionResponse.php @@ -8,7 +8,11 @@ class AddCommentReactionResponse extends BaseModel public function __construct( public ?CommentResponse $comment = null, public ?FeedsReactionResponse $reaction = null, - public ?bool $notificationCreated = null, // Whether a notification activity was successfully created + /** @deprecated */ + public ?bool $notificationCreated = null, // Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted + public ?bool $notificationAccepted = null, // Whether notification creation was accepted for asynchronous processing + public ?string $notificationTaskID = null, // ID of the async notification-creation task; poll GET /tasks/{id} for its status + public ?ActivityResponse $referenceActivity = null, public ?string $duration = null, // Duration of the request ) { } diff --git a/src/GeneratedModels/AddReactionRequest.php b/src/GeneratedModels/AddReactionRequest.php index e1f85cc..1402e5d 100644 --- a/src/GeneratedModels/AddReactionRequest.php +++ b/src/GeneratedModels/AddReactionRequest.php @@ -13,6 +13,7 @@ public function __construct( 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 ?array $targetFeeds = null, // Optional list of feeds to create a reference (share) activity of the original activity in. The reference activity's type mirrors the reaction type. public ?bool $createUsers = null, // Server-side only. If true, auto-creates the reacting user identified by user_id when they don't already exist. Default: false. public ?string $userID = null, public ?UserRequest $user = null, diff --git a/src/GeneratedModels/AddReactionResponse.php b/src/GeneratedModels/AddReactionResponse.php index 89a1c9a..32d16bf 100644 --- a/src/GeneratedModels/AddReactionResponse.php +++ b/src/GeneratedModels/AddReactionResponse.php @@ -8,7 +8,11 @@ class AddReactionResponse extends BaseModel public function __construct( public ?ActivityResponse $activity = null, public ?FeedsReactionResponse $reaction = null, - public ?bool $notificationCreated = null, // Whether a notification activity was successfully created + /** @deprecated */ + public ?bool $notificationCreated = null, // Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted + public ?bool $notificationAccepted = null, // Whether notification creation was accepted for asynchronous processing + public ?string $notificationTaskID = null, // ID of the async notification-creation task; poll GET /tasks/{id} for its status + public ?ActivityResponse $referenceActivity = null, public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/AsyncExportReviewQueueEvent.php b/src/GeneratedModels/AsyncExportReviewQueueEvent.php new file mode 100644 index 0000000..a86913b --- /dev/null +++ b/src/GeneratedModels/AsyncExportReviewQueueEvent.php @@ -0,0 +1,22 @@ +|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, + public ?string $userID = null, // Server-side only. The user whose reactions to fetch; defaults to the authenticated user for client-side requests + public ?UserRequest $user = null, + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/BatchQueryActivityReactionsResponse.php b/src/GeneratedModels/BatchQueryActivityReactionsResponse.php new file mode 100644 index 0000000..e520aeb --- /dev/null +++ b/src/GeneratedModels/BatchQueryActivityReactionsResponse.php @@ -0,0 +1,23 @@ +|null */ + #[ArrayOf(FeedsReactionResponse::class)] + public ?array $reactions = null, + public ?string $next = null, + public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/BatchQueryCommentReactionsRequest.php b/src/GeneratedModels/BatchQueryCommentReactionsRequest.php new file mode 100644 index 0000000..bfb4cae --- /dev/null +++ b/src/GeneratedModels/BatchQueryCommentReactionsRequest.php @@ -0,0 +1,24 @@ +|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, + public ?string $userID = null, // Server-side only. The user whose reactions to fetch; defaults to the authenticated user for client-side requests + public ?UserRequest $user = null, + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/BatchQueryCommentReactionsResponse.php b/src/GeneratedModels/BatchQueryCommentReactionsResponse.php new file mode 100644 index 0000000..d116957 --- /dev/null +++ b/src/GeneratedModels/BatchQueryCommentReactionsResponse.php @@ -0,0 +1,23 @@ +|null */ + #[ArrayOf(FeedsReactionResponse::class)] + public ?array $reactions = null, + public ?string $next = null, + public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/BlockListResponse.php b/src/GeneratedModels/BlockListResponse.php index 9499bc4..32c479a 100644 --- a/src/GeneratedModels/BlockListResponse.php +++ b/src/GeneratedModels/BlockListResponse.php @@ -19,6 +19,7 @@ public function __construct( public ?bool $isLeetCheckEnabled = null, public ?bool $isPluralCheckEnabled = null, public ?bool $isConfusableFoldingEnabled = null, + public ?bool $isSubstringMatchingEnabled = null, ) { } diff --git a/src/GeneratedModels/CheckResponse.php b/src/GeneratedModels/CheckResponse.php index b448221..4010419 100644 --- a/src/GeneratedModels/CheckResponse.php +++ b/src/GeneratedModels/CheckResponse.php @@ -11,6 +11,9 @@ public function __construct( public ?string $recommendedAction = null, // Suggested action based on moderation results public ?ReviewQueueItemResponse $item = null, public ?TriggeredRuleResponse $triggeredRule = null, + /** @var array|null */ + #[ArrayOf(TriggeredRuleResponse::class)] + public ?array $triggeredRules = null, // All moderation rules triggered by this check (content, user, and call rules), with their resolved actions public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ClosedCaptionRuleParameters.php b/src/GeneratedModels/ClosedCaptionRuleParameters.php index 428f773..2181467 100644 --- a/src/GeneratedModels/ClosedCaptionRuleParameters.php +++ b/src/GeneratedModels/ClosedCaptionRuleParameters.php @@ -10,6 +10,7 @@ public function __construct( public ?array $llmHarmLabels = null, public ?int $threshold = null, public ?string $timeWindow = null, + public ?string $severity = null, ) { } diff --git a/src/GeneratedModels/CommentResponse.php b/src/GeneratedModels/CommentResponse.php index 8764910..4c2d278 100644 --- a/src/GeneratedModels/CommentResponse.php +++ b/src/GeneratedModels/CommentResponse.php @@ -11,6 +11,7 @@ public function __construct( public ?string $objectType = null, // Type of the object this comment is associated with public ?UserResponse $user = null, public ?string $text = null, // Text content of the comment + public ?array $i18n = null, public ?object $custom = null, // Custom data for the comment public ?string $parentID = null, // ID of parent comment for nested replies public ?int $reactionCount = null, // Number of reactions to this comment diff --git a/src/GeneratedModels/ConfigResponse.php b/src/GeneratedModels/ConfigResponse.php index 41c6264..b62c500 100644 --- a/src/GeneratedModels/ConfigResponse.php +++ b/src/GeneratedModels/ConfigResponse.php @@ -17,6 +17,7 @@ public function __construct( public ?LLMConfig $llmConfig = null, public ?AIImageConfig $aiImageConfig = null, public ?AIVideoConfig $aiVideoConfig = null, + public ?AIAudioConfigResponse $aiAudioConfig = null, public ?VelocityFilterConfig $velocityFilterConfig = null, public ?FloodConfig $floodConfig = null, public ?\DateTime $createdAt = null, // When the configuration was created diff --git a/src/GeneratedModels/CreateBlockListRequest.php b/src/GeneratedModels/CreateBlockListRequest.php index 4598c77..227ffcf 100644 --- a/src/GeneratedModels/CreateBlockListRequest.php +++ b/src/GeneratedModels/CreateBlockListRequest.php @@ -12,6 +12,7 @@ public function __construct( public ?bool $isLeetCheckEnabled = null, public ?bool $isPluralCheckEnabled = null, public ?bool $isConfusableFoldingEnabled = null, + public ?bool $isSubstringMatchingEnabled = null, public ?string $name = null, // Block list name public ?array $words = null, // List of words to block public ?string $type = null, // Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word diff --git a/src/GeneratedModels/CreateQueueRequest.php b/src/GeneratedModels/CreateQueueRequest.php new file mode 100644 index 0000000..95e64b6 --- /dev/null +++ b/src/GeneratedModels/CreateQueueRequest.php @@ -0,0 +1,21 @@ +|null */ #[ArrayOf(FeedsReactionResponse::class)] public ?array $latestReactions = null, + /** @var array|null */ + #[ArrayOf(FeedsShareResponse::class)] + public ?array $latestShares = null, /** @var array|null */ #[MapOf(FeedsReactionGroupResponse::class)] public ?array $reactionGroups = null, diff --git a/src/GeneratedModels/FeedsV3CommentResponse.php b/src/GeneratedModels/FeedsV3CommentResponse.php index 8a8f797..455163d 100644 --- a/src/GeneratedModels/FeedsV3CommentResponse.php +++ b/src/GeneratedModels/FeedsV3CommentResponse.php @@ -11,6 +11,7 @@ public function __construct( public ?string $objectType = null, public ?UserResponse $user = null, public ?string $text = null, + public ?array $i18n = null, public ?object $custom = null, public ?string $parentID = null, public ?int $reactionCount = null, diff --git a/src/GeneratedModels/FilterConfigResponse.php b/src/GeneratedModels/FilterConfigResponse.php index 289c122..0a9de7a 100644 --- a/src/GeneratedModels/FilterConfigResponse.php +++ b/src/GeneratedModels/FilterConfigResponse.php @@ -8,6 +8,7 @@ class FilterConfigResponse extends BaseModel public function __construct( public ?array $llmLabels = null, // LLM moderation labels available as filter values public ?array $aiTextLabels = null, // AI text moderation labels available as filter values + public ?array $aiImageLabels = null, // AI image moderation labels available as filter values. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard L1 label set. public ?array $configKeys = null, // Moderation config keys present in the queue, available as filter values public ?array $filterableCustomKeys = null, // The moderation_payload.custom keys the app has configured as review-queue filter chips (via moderation_dashboard_preferences.filterable_custom_keys). Discovery hint for the dashboard only — the filter accepts any custom key regardless of this list. ) { diff --git a/src/GeneratedModels/ListQueuesResponse.php b/src/GeneratedModels/ListQueuesResponse.php new file mode 100644 index 0000000..055ca55 --- /dev/null +++ b/src/GeneratedModels/ListQueuesResponse.php @@ -0,0 +1,21 @@ +|null */ + #[ArrayOf(ModerationQueueResponse::class)] + public ?array $queues = null, + public ?string $duration = null, // Duration of the request in milliseconds + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/ModerationDashboardPreferences.php b/src/GeneratedModels/ModerationDashboardPreferences.php index 4623622..380952c 100644 --- a/src/GeneratedModels/ModerationDashboardPreferences.php +++ b/src/GeneratedModels/ModerationDashboardPreferences.php @@ -16,10 +16,10 @@ public function __construct( public ?array $keyframeClassificationsMap = null, public ?array $escalationReasons = null, public ?bool $escalationQueueEnabled = null, + public ?bool $customViewsEnabled = null, public ?bool $includeAttachmentPayload = null, - public ?string $webhookHeaderClientRequestIDKey = null, + public ?bool $blockForeignCdnAttachments = null, public ?array $filterableCustomKeys = null, - public ?int $analyzeMaxImageSizeBytes = null, ) { } diff --git a/src/GeneratedModels/ModerationPayload.php b/src/GeneratedModels/ModerationPayload.php index cd99d9d..359a0b5 100644 --- a/src/GeneratedModels/ModerationPayload.php +++ b/src/GeneratedModels/ModerationPayload.php @@ -9,7 +9,12 @@ public function __construct( public ?array $texts = null, public ?array $images = null, public ?array $videos = null, + public ?array $audios = null, public ?object $custom = null, + public ?array $textOrderedKeys = null, + public ?array $imageOrderedKeys = null, + public ?array $textIds = null, + public ?array $imageIds = null, ) { } diff --git a/src/GeneratedModels/ModerationPayloadRequest.php b/src/GeneratedModels/ModerationPayloadRequest.php index 3fa8ecf..2f7b843 100644 --- a/src/GeneratedModels/ModerationPayloadRequest.php +++ b/src/GeneratedModels/ModerationPayloadRequest.php @@ -12,6 +12,7 @@ public function __construct( public ?array $texts = null, // Text content to moderate public ?array $images = null, // Image URLs to moderate (max 30) public ?array $videos = null, // Video URLs to moderate + public ?array $audios = null, // Audio URLs to moderate public ?object $custom = null, // Custom data for moderation ) { } diff --git a/src/GeneratedModels/ModerationPayloadResponse.php b/src/GeneratedModels/ModerationPayloadResponse.php index 2322b24..d03584e 100644 --- a/src/GeneratedModels/ModerationPayloadResponse.php +++ b/src/GeneratedModels/ModerationPayloadResponse.php @@ -12,7 +12,12 @@ public function __construct( public ?array $texts = null, // Text content to moderate public ?array $images = null, // Image URLs to moderate public ?array $videos = null, // Video URLs to moderate + public ?array $audios = null, // Audio URLs to moderate public ?object $custom = null, // Custom data for moderation + public ?array $textOrderedKeys = null, // Caller-supplied keys for texts (e.g. "title", "description"), index-aligned with texts[] + public ?array $imageOrderedKeys = null, // Caller-supplied keys for images, index-aligned with images[] + public ?array $textIds = null, // Caller-supplied content IDs per text key (from content_ids on /analyze) + public ?array $imageIds = null, // Caller-supplied content IDs per image key (from content_ids on /analyze) ) { } diff --git a/src/GeneratedModels/ModerationQueueResponse.php b/src/GeneratedModels/ModerationQueueResponse.php new file mode 100644 index 0000000..1167f1a --- /dev/null +++ b/src/GeneratedModels/ModerationQueueResponse.php @@ -0,0 +1,24 @@ +|null */ + #[ArrayOf(ShareResponse::class)] + public ?array $shares = null, + public ?string $next = null, + public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/QueryModerationRulesResponse.php b/src/GeneratedModels/QueryModerationRulesResponse.php index 9a856b6..c3fadcc 100644 --- a/src/GeneratedModels/QueryModerationRulesResponse.php +++ b/src/GeneratedModels/QueryModerationRulesResponse.php @@ -14,7 +14,7 @@ public function __construct( public ?array $keyframeLabels = null, // Deprecated: use keyframe_label_classifications instead. Available L1 harm labels for keyframe rules public ?array $keyframeLabelClassifications = null, // L1 to L2 mapping of keyframe harm label classifications public ?array $closedCaptionLabels = null, // Available harm labels for closed caption rules - public ?array $ocrLabels = null, // Available harm labels for keyframe OCR rules. Mirrors `closed_caption_labels` today but kept as a separate field so the two pickers can diverge later. + public ?array $ocrLabels = null, // Available harm labels for OCR-based rule conditions (keyframe_ocr_rule and ocr_content). Mirrors `closed_caption_labels` today but kept as a separate field so the pickers can diverge later. /** @var array|null */ #[ArrayOf(AIImageLabelDefinition::class)] public ?array $aiImageLabelDefinitions = null, // AI image label definitions with metadata for dashboard rendering diff --git a/src/GeneratedModels/QueueResponse.php b/src/GeneratedModels/QueueResponse.php new file mode 100644 index 0000000..302b6aa --- /dev/null +++ b/src/GeneratedModels/QueueResponse.php @@ -0,0 +1,19 @@ +|null */ diff --git a/src/GeneratedModels/UpdateBlockListRequest.php b/src/GeneratedModels/UpdateBlockListRequest.php index 0c60977..9221e6b 100644 --- a/src/GeneratedModels/UpdateBlockListRequest.php +++ b/src/GeneratedModels/UpdateBlockListRequest.php @@ -11,6 +11,7 @@ public function __construct( public ?bool $isLeetCheckEnabled = null, public ?bool $isPluralCheckEnabled = null, public ?bool $isConfusableFoldingEnabled = null, + public ?bool $isSubstringMatchingEnabled = null, ) { } diff --git a/src/GeneratedModels/UpdateQueueRequest.php b/src/GeneratedModels/UpdateQueueRequest.php new file mode 100644 index 0000000..1f8172a --- /dev/null +++ b/src/GeneratedModels/UpdateQueueRequest.php @@ -0,0 +1,20 @@ + ['export.channels.success', 'AsyncExportChannelsEvent'], 'export.moderation_logs.error' => ['export.moderation_logs.error', 'AsyncExportErrorEvent'], 'export.moderation_logs.success' => ['export.moderation_logs.success', 'AsyncExportModerationLogsEvent'], + 'export.review_queue.error' => ['export.review_queue.error', 'AsyncExportErrorEvent'], + 'export.review_queue.success' => ['export.review_queue.success', 'AsyncExportReviewQueueEvent'], 'export.users.error' => ['export.users.error', 'AsyncExportErrorEvent'], 'export.users.success' => ['export.users.success', 'AsyncExportUsersEvent'], 'feeds.activity.added' => ['feeds.activity.added', 'ActivityAddedEvent'],