From c423fa37e0f0183a1636b8f9b432224f4c1db765 Mon Sep 17 00:00:00 2001 From: "getstream-sdk-bot[bot]" <352448594+getstream-sdk-bot[bot]@users.noreply.github.com> Date: Fri, 27 Nov 2026 15:46:26 +0000 Subject: [PATCH] feat: regenerate client from openapi-v241.26.1 --- .spec-version | 4 ++-- src/Generated/FeedsTrait.php | 20 +++++++++++++++++- .../ActivityFeedbackRequest.php | 1 + src/GeneratedModels/AppResponseFields.php | 1 + src/GeneratedModels/EngagementRates.php | 19 +++++++++++++++++ src/GeneratedModels/EngagementStatsResult.php | 21 +++++++++++++++++++ src/GeneratedModels/FeedsPolicyConfig.php | 1 + src/GeneratedModels/ForYouConfig.php | 2 ++ .../ForYouExperimentConfig.php | 18 ++++++++++++++++ .../ForYouExperimentVariant.php | 16 ++++++++++++++ .../GetOrCreateFeedResponse.php | 2 +- src/GeneratedModels/MessageSchemaSettings.php | 21 +++++++++++++++++++ src/GeneratedModels/MessageValidation.php | 19 +++++++++++++++++ .../QueryFeedsEngagementStatsRequest.php | 20 ++++++++++++++++++ .../QueryFeedsEngagementStatsResponse.php | 18 ++++++++++++++++ src/GeneratedModels/ReactionValidation.php | 18 ++++++++++++++++ .../SetFeedsRetentionPolicyRequest.php | 1 + .../TrackActivityMetricsEvent.php | 2 +- src/GeneratedModels/UpdateAppRequest.php | 1 + 19 files changed, 200 insertions(+), 5 deletions(-) create mode 100644 src/GeneratedModels/EngagementRates.php create mode 100644 src/GeneratedModels/EngagementStatsResult.php create mode 100644 src/GeneratedModels/ForYouExperimentConfig.php create mode 100644 src/GeneratedModels/ForYouExperimentVariant.php create mode 100644 src/GeneratedModels/MessageSchemaSettings.php create mode 100644 src/GeneratedModels/MessageValidation.php create mode 100644 src/GeneratedModels/QueryFeedsEngagementStatsRequest.php create mode 100644 src/GeneratedModels/QueryFeedsEngagementStatsResponse.php create mode 100644 src/GeneratedModels/ReactionValidation.php diff --git a/.spec-version b/.spec-version index dd127fd8..d305fa74 100644 --- a/.spec-version +++ b/.spec-version @@ -1,2 +1,2 @@ -spec: openapi-v241.26.0 -generator: chat v241.26.0 +spec: openapi-v241.26.1 +generator: chat v241.26.1 diff --git a/src/Generated/FeedsTrait.php b/src/Generated/FeedsTrait.php index 8af27f8a..6356ed7a 100644 --- a/src/Generated/FeedsTrait.php +++ b/src/Generated/FeedsTrait.php @@ -2025,7 +2025,7 @@ public function feedsGetRetentionPolicy(): StreamResponse { return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\GetFeedsRetentionPolicyResponse::class); } /** - * Creates or updates a feeds retention policy for the app (an app may have multiple, each scoped to feed groups). Server-side only. + * Creates or updates a feeds retention policy for the app (an app may have multiple, each scoped to feed groups and, except old-activities, optionally narrowed by filter_conditions). Server-side only. * * @param GeneratedModels\SetFeedsRetentionPolicyRequest $requestData * @return StreamResponse @@ -2165,6 +2165,24 @@ public function publishScheduledActivityNow(string $id): StreamResponse { $requestData = null; return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\PublishScheduledActivityNowResponse::class); } + /** + * Retrieve For You engagement statistics (reads, users, impressions, clicks, dwell, hides) per view and experiment, aggregated by day. + * users.total counts user-days. + * Requires a paid Feeds plan (403 otherwise). + * limit is the maximum number of series (one per group, view and experiment), not rows; it never cuts a series. A metric's days with no events are omitted from its daily values. + * This endpoint is not paginated: it is a bounded report over one group's views and experiments for at most 396 days, and limit x days must not exceed 10,000 (the default limit always fits). + * This endpoint is server-side only. + * + * @param GeneratedModels\QueryFeedsEngagementStatsRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function queryFeedsEngagementStats(GeneratedModels\QueryFeedsEngagementStatsRequest $requestData): StreamResponse { + $path = '/api/v2/feeds/stats/engagement'; + + $queryParams = []; + return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\QueryFeedsEngagementStatsResponse::class); + } /** * Retrieve usage statistics for feeds including activity count, follow count, and API request count. * Returns data aggregated by day with pagination support via from/to date parameters. diff --git a/src/GeneratedModels/ActivityFeedbackRequest.php b/src/GeneratedModels/ActivityFeedbackRequest.php index 9ef5897c..4c55ff13 100644 --- a/src/GeneratedModels/ActivityFeedbackRequest.php +++ b/src/GeneratedModels/ActivityFeedbackRequest.php @@ -12,6 +12,7 @@ public function __construct( public ?bool $showLess = null, // Whether to show less content like this public ?bool $hide = null, // Whether to hide this activity public ?bool $showMore = null, // Whether to show more content like this + public ?string $requestID = null, // From the feed response; attributes the hide to the feed's view public ?string $userID = null, public ?UserRequest $user = null, // User request object ) { diff --git a/src/GeneratedModels/AppResponseFields.php b/src/GeneratedModels/AppResponseFields.php index fc89054f..5ab09248 100644 --- a/src/GeneratedModels/AppResponseFields.php +++ b/src/GeneratedModels/AppResponseFields.php @@ -87,6 +87,7 @@ public function __construct( public ?AgentReviewSettingsPayload $agentReview = null, // Settings for the moderation agent reviewer, which reviews moderation outcomes and proposes or applies an action. public ?AgentReviewSettingsPayload $effectiveAgentReview = null, // Settings for the moderation agent reviewer, which reviews moderation outcomes and proposes or applies an action. public ?MessageMarksConfig $messageMarks = null, // The app's message marks policy: the mark types it defines or overrides, and the privacy switch. The channel type's mark_types says which of them are on in its channels. + public ?MessageSchemaSettings $messageSchema = null, // The app's message schema settings: how strictly messages and reactions are checked, and the JSON Schemas they are checked against. ) { } diff --git a/src/GeneratedModels/EngagementRates.php b/src/GeneratedModels/EngagementRates.php new file mode 100644 index 00000000..00507c62 --- /dev/null +++ b/src/GeneratedModels/EngagementRates.php @@ -0,0 +1,19 @@ +|null */ + #[MapOf(DailyMetricStatsResponse::class)] + public ?array $metrics = null, // Daily values and total per metric: reads, users, impressions, clicks, dwell_ms, dwell_count, hides. users.total counts user-days + public ?EngagementRates $rates = 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/FeedsPolicyConfig.php b/src/GeneratedModels/FeedsPolicyConfig.php index 39fe122c..4845c176 100644 --- a/src/GeneratedModels/FeedsPolicyConfig.php +++ b/src/GeneratedModels/FeedsPolicyConfig.php @@ -8,6 +8,7 @@ class FeedsPolicyConfig extends BaseModel public function __construct( public ?int $maxAgeHours = null, public ?array $feedGroups = null, + public ?object $filterConditions = null, // Activities must match every condition to be deleted. ) { } diff --git a/src/GeneratedModels/ForYouConfig.php b/src/GeneratedModels/ForYouConfig.php index 838c0bc6..e0fef827 100644 --- a/src/GeneratedModels/ForYouConfig.php +++ b/src/GeneratedModels/ForYouConfig.php @@ -11,6 +11,8 @@ public function __construct( public ?ForYouExplorationConfig $exploration = null, public ?ForYouDwellConfig $dwell = null, public ?bool $trending = null, // Tracks trending tags and turns on the topic_trend ranking variable (0-1, the highest trend over a post's interest tags). Requires enabled + public ?bool $analytics = null, // Counts engagement per feed view and experiment. Requires enabled and a plan with activity metrics + public ?ForYouExperimentConfig $experiment = null, ) { } diff --git a/src/GeneratedModels/ForYouExperimentConfig.php b/src/GeneratedModels/ForYouExperimentConfig.php new file mode 100644 index 00000000..7f542703 --- /dev/null +++ b/src/GeneratedModels/ForYouExperimentConfig.php @@ -0,0 +1,18 @@ +|null */ + #[ArrayOf(ForYouExperimentVariant::class)] + public ?array $variants = null, // 2 to 4 feed views with distinct ids; weights are percents summing to 100 + ) { + } + + // 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/ForYouExperimentVariant.php b/src/GeneratedModels/ForYouExperimentVariant.php new file mode 100644 index 00000000..80cbda47 --- /dev/null +++ b/src/GeneratedModels/ForYouExperimentVariant.php @@ -0,0 +1,16 @@ +|null */ + #[ArrayOf(EngagementStatsResult::class)] + public ?array $results = null, // One series per (group, view, experiment), in byte order of experiment, view, then group + ) { + } + + // 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/ReactionValidation.php b/src/GeneratedModels/ReactionValidation.php new file mode 100644 index 00000000..d6cc157f --- /dev/null +++ b/src/GeneratedModels/ReactionValidation.php @@ -0,0 +1,18 @@ +