Skip to content
Merged
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
161 changes: 161 additions & 0 deletions src/Generated/ChatTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,83 @@ public function getManyMessages(string $type, string $id, array $ids, ?array $me
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetManyMessagesResponse::class);
}
/**
* Returns pinned messages for the channel
*
* @param string $type
* @param string $id
* @param ?int $limit
* @param ?int $offset
* @param ?string $idGte
* @param ?string $idGt
* @param ?string $idLte
* @param ?string $idLt
* @param ?\DateTime $pinnedAtAfterOrEqual
* @param ?\DateTime $pinnedAtAfter
* @param ?\DateTime $pinnedAtBeforeOrEqual
* @param ?\DateTime $pinnedAtBefore
* @param ?string $idAround
* @param ?\DateTime $pinnedAtAround
* @param ?string $userID
* @param ?array $sort
* @param ?array $memberCustomInclude
* @return StreamResponse<GeneratedModels\GetPinnedMessagesResponse>
* @throws StreamException
*/
public function getPinnedMessages(string $type, string $id, ?int $limit = null, ?int $offset = null, ?string $idGte = null, ?string $idGt = null, ?string $idLte = null, ?string $idLt = null, ?\DateTime $pinnedAtAfterOrEqual = null, ?\DateTime $pinnedAtAfter = null, ?\DateTime $pinnedAtBeforeOrEqual = null, ?\DateTime $pinnedAtBefore = null, ?string $idAround = null, ?\DateTime $pinnedAtAround = null, ?string $userID = null, ?array $sort = null, ?array $memberCustomInclude = null): StreamResponse {
$path = '/api/v2/chat/channels/{type}/{id}/pinned_messages';
$path = str_replace('{type}', (string) $type, $path);
$path = str_replace('{id}', (string) $id, $path);

$queryParams = [];
if ($limit !== null) {
$queryParams['limit'] = $limit;
}
if ($offset !== null) {
$queryParams['offset'] = $offset;
}
if ($idGte !== null) {
$queryParams['id_gte'] = $idGte;
}
if ($idGt !== null) {
$queryParams['id_gt'] = $idGt;
}
if ($idLte !== null) {
$queryParams['id_lte'] = $idLte;
}
if ($idLt !== null) {
$queryParams['id_lt'] = $idLt;
}
if ($pinnedAtAfterOrEqual !== null) {
$queryParams['pinned_at_after_or_equal'] = $pinnedAtAfterOrEqual;
}
if ($pinnedAtAfter !== null) {
$queryParams['pinned_at_after'] = $pinnedAtAfter;
}
if ($pinnedAtBeforeOrEqual !== null) {
$queryParams['pinned_at_before_or_equal'] = $pinnedAtBeforeOrEqual;
}
if ($pinnedAtBefore !== null) {
$queryParams['pinned_at_before'] = $pinnedAtBefore;
}
if ($idAround !== null) {
$queryParams['id_around'] = $idAround;
}
if ($pinnedAtAround !== null) {
$queryParams['pinned_at_around'] = $pinnedAtAround;
}
if ($userID !== null) {
$queryParams['user_id'] = $userID;
}
if ($sort !== null) {
$queryParams['sort'] = $sort;
}
if ($memberCustomInclude !== null) {
$queryParams['member_custom_include'] = $memberCustomInclude;
}
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetPinnedMessagesResponse::class);
}
/**
* This Method creates a channel or returns an existing one with matching attributes
* Sends events:
Expand Down Expand Up @@ -1390,6 +1467,87 @@ public function unmuteChannel(GeneratedModels\UnmuteChannelRequest $requestData)
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\UnmuteResponse::class);
}
/**
* Get all predefined filters with optional sorting by created_at, updated_at, name, or operation
*
* @param ?bool $includeStats
* @param ?array $sort
* @return StreamResponse<GeneratedModels\QueryPredefinedFiltersResponse>
* @throws StreamException
*/
public function getPredefinedFilters(?bool $includeStats = null, ?array $sort = null): StreamResponse {
$path = '/api/v2/chat/predefined_filters';

$queryParams = [];
if ($includeStats !== null) {
$queryParams['include_stats'] = $includeStats;
}
if ($sort !== null) {
$queryParams['sort'] = $sort;
}
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\QueryPredefinedFiltersResponse::class);
}
/**
* Create a predefined filter that can be used in Query endpoints
*
* @param GeneratedModels\CreatePredefinedFilterRequest $requestData
* @return StreamResponse<GeneratedModels\CreatePredefinedFilterResponse>
* @throws StreamException
*/
public function createPredefinedFilter(GeneratedModels\CreatePredefinedFilterRequest $requestData): StreamResponse {
$path = '/api/v2/chat/predefined_filters';

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\CreatePredefinedFilterResponse::class);
}
/**
* Delete a predefined filter by name
*
* @param string $name
* @return StreamResponse<GeneratedModels\Response>
* @throws StreamException
*/
public function deletePredefinedFilter(string $name): StreamResponse {
$path = '/api/v2/chat/predefined_filters/{name}';
$path = str_replace('{name}', (string) $name, $path);

$queryParams = [];
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('DELETE', $path, $queryParams, $requestData), GeneratedModels\Response::class);
}
/**
* Get a predefined filter by name
*
* @param string $name
* @return StreamResponse<GeneratedModels\GetPredefinedFilterResponse>
* @throws StreamException
*/
public function getPredefinedFilter(string $name): StreamResponse {
$path = '/api/v2/chat/predefined_filters/{name}';
$path = str_replace('{name}', (string) $name, $path);

$queryParams = [];
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetPredefinedFilterResponse::class);
}
/**
* Update a predefined filter by name
*
* @param string $name
* @param GeneratedModels\UpdatePredefinedFilterRequest $requestData
* @return StreamResponse<GeneratedModels\UpdatePredefinedFilterResponse>
* @throws StreamException
*/
public function updatePredefinedFilter(string $name, GeneratedModels\UpdatePredefinedFilterRequest $requestData): StreamResponse {
$path = '/api/v2/chat/predefined_filters/{name}';
$path = str_replace('{name}', (string) $name, $path);

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('PUT', $path, $queryParams, $requestData), GeneratedModels\UpdatePredefinedFilterResponse::class);
}
/**
* Find and filter channel scoped or global user bans
*
Expand Down Expand Up @@ -1668,6 +1826,9 @@ public function querySegmentTargets(string $id, GeneratedModels\QuerySegmentTarg
* - Use 'month' parameter (YYYY-MM format) for monthly aggregated values
* - Use 'start_date'/'end_date' parameters (YYYY-MM-DD format) for daily breakdown
* - If neither provided, defaults to current month (monthly mode)
* **Team Filter:**
* - Use 'team' to return a single team's stats (empty string selects users not assigned to any team)
* - Mutually exclusive with the 'next' pagination cursor
* This endpoint is server-side only.
*
* @param GeneratedModels\QueryTeamUsageStatsRequest $requestData
Expand Down
45 changes: 45 additions & 0 deletions src/Generated/CommonTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,35 @@ public function listPermissions(): StreamResponse {
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\ListPermissionsResponse::class);
}
/**
* Creates permission
*
* @param GeneratedModels\CreatePermissionRequest $requestData
* @return StreamResponse<GeneratedModels\Response>
* @throws StreamException
*/
public function createPermission(GeneratedModels\CreatePermissionRequest $requestData): StreamResponse {
$path = '/api/v2/permissions';

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\Response::class);
}
/**
* Deletes custom permission
*
* @param string $id
* @return StreamResponse<GeneratedModels\Response>
* @throws StreamException
*/
public function deletePermission(string $id): StreamResponse {
$path = '/api/v2/permissions/{id}';
$path = str_replace('{id}', (string) $id, $path);

$queryParams = [];
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('DELETE', $path, $queryParams, $requestData), GeneratedModels\Response::class);
}
/**
* Gets custom permission
*
Expand All @@ -580,6 +609,22 @@ public function getPermission(string $id): StreamResponse {
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetCustomPermissionResponse::class);
}
/**
* Updates custom permission
*
* @param string $id
* @param GeneratedModels\PermissionRequest $requestData
* @return StreamResponse<GeneratedModels\Response>
* @throws StreamException
*/
public function updatePermission(string $id, GeneratedModels\PermissionRequest $requestData): StreamResponse {
$path = '/api/v2/permissions/{id}';
$path = str_replace('{id}', (string) $id, $path);

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('PUT', $path, $queryParams, $requestData), GeneratedModels\Response::class);
}
/**
* Creates a new poll
*
Expand Down
10 changes: 10 additions & 0 deletions src/Generated/FeedMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ public function changeFeedVisibility(
GeneratedModels\ChangeFeedVisibilityRequest $requestData): StreamResponse {
return $this->feedsV3Client->changeFeedVisibility($this->feedGroup, $this->feedId, $requestData);
}
/**
* Returns the number of activities in a feed, the total number of comments on those activities (including nested replies), and the sum of both. The comment total is cached for a few seconds on large feeds.
*
* @return StreamResponse<GeneratedModels\GetFeedCountsResponse>
* @throws StreamException
*/
public function getFeedCounts(
): StreamResponse {
return $this->feedsV3Client->getFeedCounts($this->feedGroup, $this->feedId);
}
/**
* Add, remove, or set members for a feed
*
Expand Down
17 changes: 17 additions & 0 deletions src/Generated/FeedsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,23 @@ public function changeFeedVisibility(string $feedGroupID, string $feedID, Genera
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\ChangeFeedVisibilityResponse::class);
}
/**
* Returns the number of activities in a feed, the total number of comments on those activities (including nested replies), and the sum of both. The comment total is cached for a few seconds on large feeds.
*
* @param string $feedGroupID
* @param string $feedID
* @return StreamResponse<GeneratedModels\GetFeedCountsResponse>
* @throws StreamException
*/
public function getFeedCounts(string $feedGroupID, string $feedID): StreamResponse {
$path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/counts';
$path = str_replace('{feed_group_id}', (string) $feedGroupID, $path);
$path = str_replace('{feed_id}', (string) $feedID, $path);

$queryParams = [];
$requestData = null;
return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetFeedCountsResponse::class);
}
/**
* Add, remove, or set members for a feed
*
Expand Down
2 changes: 2 additions & 0 deletions src/GeneratedModels/ActivityProcessorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class ActivityProcessorConfig extends BaseModel
{
public function __construct(
public ?string $type = null, // Type of activity processor (required)
public ?int $minTextLength = null, // Minimum number of characters the activity text must have before this processor runs. 0 (the default) disables the check. Only applies to text_interest_tags.
public ?int $minWordCount = null, // Minimum number of words the activity text must have before this processor runs. 0 (the default) disables the check. Only applies to text_interest_tags. Words are whitespace-separated, so scripts written without word spacing (Chinese, Japanese, Thai) always count as 1 word regardless of length — use min_text_length for those.
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/GeneratedModels/BulkActionAppealsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public function __construct(
public ?array $appealIds = null, // List of appeal UUIDs to process
public ?string $actionType = null, // Action to apply: unban, restore, unblock, mark_reviewed, or reject_appeal
public ?UnbanActionRequestPayload $unban = null, // Configuration for unban moderation action
public ?RestoreActionRequestPayload $restore = null, // Configuration for restore action
public ?UnblockActionRequestPayload $unblock = null, // Configuration for unblock action
public ?RestoreActionRequestPayload $restore = null, // Configuration for restore action. State-aware: reverses whichever of a delete, a block, or a shadow block currently applies to the content (including both a delete and a block/shadow block at once).
public ?UnblockActionRequestPayload $unblock = null, // Deprecated: use restore instead — it now also reverses a block or shadow block. Configuration for unblock action.
public ?MarkReviewedRequestPayload $markReviewed = null, // Configuration for mark reviewed action
public ?RejectAppealRequestPayload $rejectAppeal = null, // Configuration for rejecting an appeal
public ?string $userID = null,
Expand Down
1 change: 1 addition & 0 deletions src/GeneratedModels/ChannelConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function __construct(
public ?bool $userMessageReminders = null,
public ?bool $sharedLocations = null,
public ?bool $countMessages = null,
public ?string $messageRetention = null,
public ?int $maxMessageLength = null,
public ?string $automod = null,
public ?string $automodBehavior = null,
Expand Down
1 change: 1 addition & 0 deletions src/GeneratedModels/ChannelConfigWithInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function __construct(
public ?bool $userMessageReminders = null,
public ?bool $sharedLocations = null,
public ?bool $countMessages = null,
public ?string $messageRetention = null,
public ?int $maxMessageLength = null,
public ?string $automod = null,
public ?string $automodBehavior = null,
Expand Down
1 change: 1 addition & 0 deletions src/GeneratedModels/ChannelTypeConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function __construct(
public ?bool $userMessageReminders = null,
public ?bool $sharedLocations = null,
public ?bool $countMessages = null,
public ?string $messageRetention = null,
public ?int $maxMessageLength = null,
public ?string $automod = null,
public ?string $automodBehavior = null,
Expand Down
1 change: 1 addition & 0 deletions src/GeneratedModels/Classification.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public function __construct(
/** @var array<Classification>|null */
#[ArrayOf(Classification::class)]
public ?array $subclassifications = null,
public ?array $matchedContributors = null,
) {
}

Expand Down
1 change: 1 addition & 0 deletions src/GeneratedModels/CreateChannelTypeResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function __construct(
public ?bool $userMessageReminders = null,
public ?bool $sharedLocations = null,
public ?bool $countMessages = null,
public ?string $messageRetention = null,
public ?int $maxMessageLength = null,
public ?string $automod = null,
public ?string $automodBehavior = null,
Expand Down
21 changes: 21 additions & 0 deletions src/GeneratedModels/CreatePermissionRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

declare(strict_types=1);

namespace GetStream\GeneratedModels;
class CreatePermissionRequest extends BaseModel
{
public function __construct(
public ?string $id = null, // Unique permission ID
public ?string $name = null, // Name of the permission
public ?string $description = null, // Description of the permission
public ?string $action = null, // Action name this permission is for (e.g. SendMessage)
public ?bool $owner = null, // Whether this permission applies to resource owner or not
public ?bool $sameTeam = null, // Whether this permission applies to teammates (multi-tenancy mode only)
public ?object $condition = null, // MongoDB style condition which decides whether or not the permission is granted
) {
}

// BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types!
// Use #[JsonKey('user_id')] to override field names if needed.
}
19 changes: 19 additions & 0 deletions src/GeneratedModels/CreatePredefinedFilterRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

namespace GetStream\GeneratedModels;
class CreatePredefinedFilterRequest extends BaseModel
{
public function __construct(
public ?string $name = null, // The unique name of the predefined filter (alphanumeric, _, - only)
public ?string $description = null, // The description of the predefined filter
public ?string $operation = null, // The operation this filter is for (e.g., QueryChannels)
public ?object $filter = null, // Filter to apply to the query
public ?array $sort = null,
) {
}

// BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types!
// Use #[JsonKey('user_id')] to override field names if needed.
}
Loading
Loading