Skip to content
Open
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
8 changes: 4 additions & 4 deletions src/Generated/ModerationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ public function bulkActionAppeals(GeneratedModels\BulkActionAppealsRequest $requ
* Ban a user from a channel or the entire app
*
* @param GeneratedModels\BanRequest $requestData
* @return StreamResponse<GeneratedModels\BanResponse>
* @return StreamResponse<GeneratedModels\ModerationBanResponse>
* @throws StreamException
*/
public function ban(GeneratedModels\BanRequest $requestData): StreamResponse {
$path = '/api/v2/moderation/ban';

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\BanResponse::class);
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\ModerationBanResponse::class);
}
/**
* Moderate multiple images in bulk using a CSV file
Expand Down Expand Up @@ -391,15 +391,15 @@ public function v2UpsertTemplate(GeneratedModels\UpsertModerationTemplateRequest
* Flag any type of content (messages, users, channels, activities) for moderation review. Supports custom content types and additional metadata for flagged content.
*
* @param GeneratedModels\FlagRequest $requestData
* @return StreamResponse<GeneratedModels\FlagResponse>
* @return StreamResponse<GeneratedModels\FlagItemResponse>
* @throws StreamException
*/
public function flag(GeneratedModels\FlagRequest $requestData): StreamResponse {
$path = '/api/v2/moderation/flag';

$queryParams = [];
// Use the provided request data array directly
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\FlagResponse::class);
return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\FlagItemResponse::class);
}
/**
* Returns the number of moderation flags created against a specific user's content. Optionally filter by entity type.
Expand Down
51 changes: 35 additions & 16 deletions src/GeneratedModels/ChannelConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,47 @@
declare(strict_types=1);

namespace GetStream\GeneratedModels;
/**
* Channel configuration overrides
*/
class ChannelConfig extends BaseModel
{
public function __construct(
public ?bool $typingEvents = null, // Enables or disables typing events
public ?bool $reactions = null, // Enables or disables reactions
public ?bool $replies = null, // Enables message replies (threads)
public ?bool $quotes = null, // Enables message quotes
public ?bool $uploads = null, // Enables or disables file uploads
public ?bool $urlEnrichment = null, // Enables or disables URL enrichment
public ?int $maxMessageLength = null, // Overrides max message length
public ?string $name = null,
public ?bool $typingEvents = null,
public ?bool $readEvents = null,
public ?bool $connectEvents = null,
public ?bool $deliveryEvents = null,
public ?bool $search = null,
public ?bool $reactions = null,
public ?bool $replies = null,
public ?bool $quotes = null,
public ?bool $mutes = null,
public ?bool $uploads = null,
public ?bool $urlEnrichment = null,
public ?bool $customEvents = null,
public ?bool $pushNotifications = null,
public ?bool $reminders = null,
public ?bool $markMessagesPending = null,
public ?bool $polls = null,
public ?bool $userMessageReminders = null,
public ?bool $sharedLocations = null,
public ?bool $countMessages = null,
public ?int $maxMessageLength = null,
public ?string $automod = null,
public ?string $automodBehavior = null,
public ?string $blocklist = null,
public ?string $blocklistBehavior = null,
public ?array $grants = null,
public ?array $commands = null, // List of commands that channel supports
public ?string $pushLevel = null, // Overrides the push notification level for this channel
/** @var array<BlockListOptions>|null */
#[ArrayOf(BlockListOptions::class)]
public ?array $blocklists = null,
public ?array $allowedFlagReasons = null,
public ?Thresholds $automodThresholds = null,
public ?int $partitionSize = null,
public ?string $partitionTtl = null,
public ?bool $skipLastMsgUpdateForSystemMsgs = null,
public ?string $pushLevel = null,
public ?ChatPreferences $chatPreferences = null,
public ?bool $userMessageReminders = null, // Enable/disable user message reminders
public ?bool $sharedLocations = null, // Enable/disable shared locations
public ?bool $countMessages = null, // Enable/disable message counting
public ?\DateTime $createdAt = null,
public ?\DateTime $updatedAt = null,
public ?array $commands = null, // List of commands that channel supports
) {
}

Expand Down
33 changes: 33 additions & 0 deletions src/GeneratedModels/ChannelConfigOverrides.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace GetStream\GeneratedModels;
/**
* Channel configuration overrides
*/
class ChannelConfigOverrides extends BaseModel
{
public function __construct(
public ?bool $typingEvents = null, // Enables or disables typing events
public ?bool $reactions = null, // Enables or disables reactions
public ?bool $replies = null, // Enables message replies (threads)
public ?bool $quotes = null, // Enables message quotes
public ?bool $uploads = null, // Enables or disables file uploads
public ?bool $urlEnrichment = null, // Enables or disables URL enrichment
public ?int $maxMessageLength = null, // Overrides max message length
public ?string $blocklist = null,
public ?string $blocklistBehavior = null,
public ?array $grants = null,
public ?array $commands = null, // List of commands that channel supports
public ?string $pushLevel = null, // Overrides the push notification level for this channel
public ?ChatPreferences $chatPreferences = null,
public ?bool $userMessageReminders = null, // Enable/disable user message reminders
public ?bool $sharedLocations = null, // Enable/disable shared locations
public ?bool $countMessages = null, // Enable/disable message counting
) {
}

// BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types!
// Use #[JsonKey('user_id')] to override field names if needed.
}
2 changes: 1 addition & 1 deletion src/GeneratedModels/ChannelDataUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function __construct(
public ?bool $disabled = null,
public ?object $custom = null,
public ?string $team = null,
public ?ChannelConfig $configOverrides = null,
public ?ChannelConfigOverrides $configOverrides = null,
public ?bool $autoTranslationEnabled = null,
public ?string $autoTranslationLanguage = null,
) {
Expand Down
2 changes: 1 addition & 1 deletion src/GeneratedModels/ChannelInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(
/** @var array<ChannelMemberRequest>|null */
#[ArrayOf(ChannelMemberRequest::class)]
public ?array $members = null,
public ?ChannelConfig $configOverrides = null,
public ?ChannelConfigOverrides $configOverrides = null,
public ?array $filterTags = null,
) {
}
Expand Down
10 changes: 1 addition & 9 deletions src/GeneratedModels/FlagDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@
declare(strict_types=1);

namespace GetStream\GeneratedModels;
/**
*
*
* @property string $originalText
* @property object $extra
* @property AutomodDetails|null $automod
*/
class FlagDetails extends BaseModel
{
public function __construct(
public ?AutomodDetailsResponse $automod = null,
public ?string $originalText = null,
public ?object $extra = null,
public ?AutomodDetails $automod = null,
) {
}

Expand Down
16 changes: 16 additions & 0 deletions src/GeneratedModels/FlagItemResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace GetStream\GeneratedModels;
class FlagItemResponse extends BaseModel
{
public function __construct(
public ?string $itemID = null, // Unique identifier of the created moderation item
public ?string $duration = null,
) {
}

// BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types!
// Use #[JsonKey('user_id')] to override field names if needed.
}
16 changes: 14 additions & 2 deletions src/GeneratedModels/FlagResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@
class FlagResponse extends BaseModel
{
public function __construct(
public ?string $itemID = null, // Unique identifier of the created moderation item
public ?string $duration = null,
public ?bool $createdByAutomod = null,
public ?UserResponse $user = null,
public ?string $targetMessageID = null,
public ?MessageResponse $targetMessage = null,
public ?UserResponse $targetUser = null,
public ?\DateTime $createdAt = null,
public ?\DateTime $updatedAt = null,
public ?\DateTime $reviewedAt = null,
public ?string $reviewedBy = null,
public ?\DateTime $approvedAt = null,
public ?\DateTime $rejectedAt = null,
public ?string $reason = null,
public ?FlagDetails $details = null,
public ?object $custom = null,
) {
}

Expand Down
15 changes: 15 additions & 0 deletions src/GeneratedModels/ModerationBanResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace GetStream\GeneratedModels;
class ModerationBanResponse extends BaseModel
{
public function __construct(
public ?string $duration = null,
) {
}

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