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
4 changes: 2 additions & 2 deletions .spec-version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
spec: openapi-v241.26.0
generator: chat v241.26.0
spec: openapi-v241.26.1
generator: chat v241.26.1
19 changes: 18 additions & 1 deletion lib/getstream_ruby/generated/feeds_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,7 @@ def feeds_get_retention_policy()
)
end

# 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 set_feeds_retention_policy_request [SetFeedsRetentionPolicyRequest]
# @return [Models::SetFeedsRetentionPolicyResponse]
Expand Down Expand Up @@ -2393,6 +2393,23 @@ def publish_scheduled_activity_now(_id)
)
end

# 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 query_feeds_engagement_stats_request [QueryFeedsEngagementStatsRequest]
# @return [Models::QueryFeedsEngagementStatsResponse]
def query_feeds_engagement_stats(query_feeds_engagement_stats_request)
path = '/api/v2/feeds/stats/engagement'
# Build request body
body = query_feeds_engagement_stats_request

# Make the API request
@client.make_request(
:post,
path,
body: body
)
end

# 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.This endpoint is server-side only.
#
# @param query_feeds_usage_stats_request [QueryFeedsUsageStatsRequest]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class ActivityFeedbackRequest < GetStream::BaseModel
# @!attribute hide
# @return [Boolean] Whether to hide this activity
attr_accessor :hide
# @!attribute request_id
# @return [String] From the feed response; attributes the hide to the feed's view
attr_accessor :request_id
# @!attribute show_less
# @return [Boolean] Whether to show less content like this
attr_accessor :show_less
Expand All @@ -29,6 +32,7 @@ class ActivityFeedbackRequest < GetStream::BaseModel
def initialize(attributes = {})
super(attributes)
@hide = attributes.fetch(:hide) { attributes.fetch('hide', nil) }
@request_id = attributes.fetch(:request_id) { attributes.fetch('request_id', nil) }
@show_less = attributes.fetch(:show_less) { attributes.fetch('show_less', nil) }
@show_more = attributes.fetch(:show_more) { attributes.fetch('show_more', nil) }
@user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
Expand All @@ -39,6 +43,7 @@ def initialize(attributes = {})
def self.json_field_mappings
{
hide: 'hide',
request_id: 'request_id',
show_less: 'show_less',
show_more: 'show_more',
user_id: 'user_id',
Expand Down
5 changes: 5 additions & 0 deletions lib/getstream_ruby/generated/models/app_response_fields.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ class AppResponseFields < GetStream::BaseModel
# @!attribute message_marks
# @return [MessageMarksConfig] 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.
attr_accessor :message_marks
# @!attribute message_schema
# @return [MessageSchemaSettings] The app's message schema settings: how strictly messages and reactions are checked, and the JSON Schemas they are checked against.
attr_accessor :message_schema
# @!attribute moderation_dashboard_preferences
# @return [ModerationDashboardPreferences]
attr_accessor :moderation_dashboard_preferences
Expand Down Expand Up @@ -292,6 +295,7 @@ def initialize(attributes = {})
@datadog_info = attributes.fetch(:datadog_info) { attributes.fetch('datadog_info', nil) }
@effective_agent_review = attributes.fetch(:effective_agent_review) { attributes.fetch('effective_agent_review', nil) }
@message_marks = attributes.fetch(:message_marks) { attributes.fetch('message_marks', nil) }
@message_schema = attributes.fetch(:message_schema) { attributes.fetch('message_schema', nil) }
@moderation_dashboard_preferences = attributes.fetch(:moderation_dashboard_preferences) { attributes.fetch('moderation_dashboard_preferences', nil) }
end

Expand Down Expand Up @@ -367,6 +371,7 @@ def self.json_field_mappings
datadog_info: 'datadog_info',
effective_agent_review: 'effective_agent_review',
message_marks: 'message_marks',
message_schema: 'message_schema',
moderation_dashboard_preferences: 'moderation_dashboard_preferences'
}
end
Expand Down
51 changes: 51 additions & 0 deletions lib/getstream_ruby/generated/models/engagement_rates.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class EngagementRates < GetStream::BaseModel

# Model attributes
# @!attribute avg_dwell_ms
# @return [Float] dwell_ms / dwell_count, in milliseconds
attr_accessor :avg_dwell_ms
# @!attribute clicks_per_user
# @return [Float] clicks / users (user-days)
attr_accessor :clicks_per_user
# @!attribute ctr
# @return [Float] clicks / impressions
attr_accessor :ctr
# @!attribute hide_rate
# @return [Float] hides / impressions
attr_accessor :hide_rate
# @!attribute impressions_per_user
# @return [Float] impressions / users (user-days)
attr_accessor :impressions_per_user

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@avg_dwell_ms = attributes.fetch(:avg_dwell_ms) { attributes.fetch('avg_dwell_ms', nil) }
@clicks_per_user = attributes.fetch(:clicks_per_user) { attributes.fetch('clicks_per_user', nil) }
@ctr = attributes.fetch(:ctr) { attributes.fetch('ctr', nil) }
@hide_rate = attributes.fetch(:hide_rate) { attributes.fetch('hide_rate', nil) }
@impressions_per_user = attributes.fetch(:impressions_per_user) { attributes.fetch('impressions_per_user', nil) }
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
avg_dwell_ms: 'avg_dwell_ms',
clicks_per_user: 'clicks_per_user',
ctr: 'ctr',
hide_rate: 'hide_rate',
impressions_per_user: 'impressions_per_user'
}
end
end
end
end
end
51 changes: 51 additions & 0 deletions lib/getstream_ruby/generated/models/engagement_stats_result.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class EngagementStatsResult < GetStream::BaseModel

# Model attributes
# @!attribute experiment_id
# @return [String] Empty outside an experiment
attr_accessor :experiment_id
# @!attribute group_id
# @return [String]
attr_accessor :group_id
# @!attribute view_id
# @return [String]
attr_accessor :view_id
# @!attribute metrics
# @return [Hash<String, DailyMetricStatsResponse>] Daily values and total per metric: reads, users, impressions, clicks, dwell_ms, dwell_count, hides. users.total counts user-days
attr_accessor :metrics
# @!attribute rates
# @return [EngagementRates]
attr_accessor :rates

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@experiment_id = attributes.fetch(:experiment_id) { attributes.fetch('experiment_id', nil) }
@group_id = attributes.fetch(:group_id) { attributes.fetch('group_id', nil) }
@view_id = attributes.fetch(:view_id) { attributes.fetch('view_id', nil) }
@metrics = attributes.fetch(:metrics) { attributes.fetch('metrics', nil) }
@rates = attributes.fetch(:rates) { attributes.fetch('rates', nil) }
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
experiment_id: 'experiment_id',
group_id: 'group_id',
view_id: 'view_id',
metrics: 'metrics',
rates: 'rates'
}
end
end
end
end
end
7 changes: 6 additions & 1 deletion lib/getstream_ruby/generated/models/feeds_policy_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@ class FeedsPolicyConfig < GetStream::BaseModel
# @!attribute feed_groups
# @return [Array<String>]
attr_accessor :feed_groups
# @!attribute filter_conditions
# @return [Object] Activities must match every condition to be deleted.
attr_accessor :filter_conditions

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@max_age_hours = attributes.fetch(:max_age_hours) { attributes.fetch('max_age_hours', nil) }
@feed_groups = attributes.fetch(:feed_groups) { attributes.fetch('feed_groups', nil) }
@filter_conditions = attributes.fetch(:filter_conditions) { attributes.fetch('filter_conditions', nil) }
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
max_age_hours: 'max_age_hours',
feed_groups: 'feed_groups'
feed_groups: 'feed_groups',
filter_conditions: 'filter_conditions'
}
end
end
Expand Down
10 changes: 10 additions & 0 deletions lib/getstream_ruby/generated/models/for_you_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module Models
class ForYouConfig < GetStream::BaseModel

# Model attributes
# @!attribute analytics
# @return [Boolean] Counts engagement per feed view and experiment. Requires enabled and a plan with activity metrics
attr_accessor :analytics
# @!attribute enabled
# @return [Boolean] Turns For You ranking on. Groups: only the non-aggregated 'foryou' group. Views: applies only when read on that group
attr_accessor :enabled
Expand All @@ -21,27 +24,34 @@ class ForYouConfig < GetStream::BaseModel
# @!attribute dwell
# @return [ForYouDwellConfig]
attr_accessor :dwell
# @!attribute experiment
# @return [ForYouExperimentConfig]
attr_accessor :experiment
# @!attribute exploration
# @return [ForYouExplorationConfig]
attr_accessor :exploration

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@analytics = attributes.fetch(:analytics) { attributes.fetch('analytics', nil) }
@enabled = attributes.fetch(:enabled) { attributes.fetch('enabled', nil) }
@preset = attributes.fetch(:preset) { attributes.fetch('preset', nil) }
@trending = attributes.fetch(:trending) { attributes.fetch('trending', nil) }
@dwell = attributes.fetch(:dwell) { attributes.fetch('dwell', nil) }
@experiment = attributes.fetch(:experiment) { attributes.fetch('experiment', nil) }
@exploration = attributes.fetch(:exploration) { attributes.fetch('exploration', nil) }
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
analytics: 'analytics',
enabled: 'enabled',
preset: 'preset',
trending: 'trending',
dwell: 'dwell',
experiment: 'experiment',
exploration: 'exploration'
}
end
Expand Down
36 changes: 36 additions & 0 deletions lib/getstream_ruby/generated/models/for_you_experiment_config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class ForYouExperimentConfig < GetStream::BaseModel

# Model attributes
# @!attribute id
# @return [String] Experiment identifier, 1 to 64 letters, digits, dashes or underscores
attr_accessor :id
# @!attribute variants
# @return [Array<ForYouExperimentVariant>] 2 to 4 feed views with distinct ids; weights are percents summing to 100
attr_accessor :variants

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@id = attributes.fetch(:id) { attributes.fetch('id', nil) }
@variants = attributes.fetch(:variants) { attributes.fetch('variants', nil) }
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
id: 'id',
variants: 'variants'
}
end
end
end
end
end
36 changes: 36 additions & 0 deletions lib/getstream_ruby/generated/models/for_you_experiment_variant.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
#
class ForYouExperimentVariant < GetStream::BaseModel

# Model attributes
# @!attribute view
# @return [String] ID of an existing feed view
attr_accessor :view
# @!attribute weight
# @return [Integer] Share of users in percent, 1 to 100
attr_accessor :weight

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@view = attributes.fetch(:view) { attributes.fetch('view', nil) }
@weight = attributes.fetch(:weight) { attributes.fetch('weight', nil) }
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
view: 'view',
weight: 'weight'
}
end
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class GetOrCreateFeedResponse < GetStream::BaseModel
# @return [String]
attr_accessor :prev
# @!attribute request_id
# @return [String] Signed token identifying this read. Pass it with activity metrics events to attribute them to this read. Only set on feed reads for paid plans with an authenticated user, when the app uses feed impressions (For You exploration, or a For You ranking that uses impressions_bucket)
# @return [String] Signed token identifying this read. Pass it with activity metrics events to attribute them to this read. Only set on feed reads for paid plans with an authenticated user, when the app uses feed impressions (For You exploration, or a For You ranking that uses impressions_bucket) or For You engagement analytics
attr_accessor :request_id
# @!attribute degraded_selectors
# @return [Array<String>] Activity selectors dropped from this read because they exceeded their time budget (see the time_budget_ms selector setting). Their activities are missing from this page, and they stay out for the rest of this pagination session. Omitted when every selector completed
Expand Down
46 changes: 46 additions & 0 deletions lib/getstream_ruby/generated/models/message_schema_settings.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# frozen_string_literal: true

# Code generated by GetStream internal OpenAPI code generator. DO NOT EDIT.

module GetStream
module Generated
module Models
# The app's message schema settings: how strictly messages and reactions are checked, and the JSON Schemas they are checked against.
class MessageSchemaSettings < GetStream::BaseModel

# Model attributes
# @!attribute document_version
# @return [Integer] The settings document version to use. When omitted, the latest version is used; an unknown version is rejected
attr_accessor :document_version
# @!attribute mode
# @return [String] How violations are handled: off does not check, report checks and records violations without rejecting the write, enforce rejects writes that violate the schema. Defaults to off
attr_accessor :mode
# @!attribute message
# @return [MessageValidation] The rules a message is checked against.
attr_accessor :message
# @!attribute reaction
# @return [ReactionValidation] The rules a reaction is checked against.
attr_accessor :reaction

# Initialize with attributes
def initialize(attributes = {})
super(attributes)
@document_version = attributes.fetch(:document_version) { attributes.fetch('document_version', nil) }
@mode = attributes.fetch(:mode) { attributes.fetch('mode', nil) }
@message = attributes.fetch(:message) { attributes.fetch('message', nil) }
@reaction = attributes.fetch(:reaction) { attributes.fetch('reaction', nil) }
end

# Override field mappings for JSON serialization
def self.json_field_mappings
{
document_version: 'document_version',
mode: 'mode',
message: 'message',
reaction: 'reaction'
}
end
end
end
end
end
Loading
Loading