diff --git a/src/CommonClient.cs b/src/CommonClient.cs index 8a763b1..800b4dc 100644 --- a/src/CommonClient.cs +++ b/src/CommonClient.cs @@ -166,6 +166,17 @@ public async Task> UpdateBlockListAsync( return result; } + public async Task> CheckGCPPubSubAsync(CheckGCPPubSubRequest request, + CancellationToken cancellationToken = default) + { + + var result = await MakeRequestAsync( + "POST", + "/api/v2/check_gcp_pubsub", null, request, null, + cancellationToken); + + return result; + } public async Task> CheckPushAsync(CheckPushRequest request, CancellationToken cancellationToken = default) { diff --git a/src/FeedsV3Client.cs b/src/FeedsV3Client.cs index 06cfdee..c96a4b8 100644 --- a/src/FeedsV3Client.cs +++ b/src/FeedsV3Client.cs @@ -646,6 +646,21 @@ public async Task> UpdateCommentAsync(stri return result; } + public async Task> CommentFeedbackAsync(string id, CommentFeedbackRequest request, + CancellationToken cancellationToken = default) + { + var pathParams = new Dictionary + { + ["id"] = id, + }; + + var result = await _client.MakeRequestAsync( + "POST", + "/api/v2/feeds/comments/{id}/feedback", null, request, pathParams, + cancellationToken); + + return result; + } public async Task> UpdateCommentPartialAsync(string id, UpdateCommentPartialRequest request, CancellationToken cancellationToken = default) { diff --git a/src/VideoClient.cs b/src/VideoClient.cs index 309e122..c55eec9 100644 --- a/src/VideoClient.cs +++ b/src/VideoClient.cs @@ -72,6 +72,18 @@ public async Task> QueryCallMembersAsyn return result; } + // Returns a call's ring attempts, newest first. A session can be rung more than once, and the session-level accepted_by / rejected_by / missed_by maps flatten every ring together; an attempt says which ring a user acted on, which devices it reached, and who settled it and why. Pass call_session_id to limit the read to one session. + public async Task> QueryCallRingAttemptsAsync(QueryCallRingAttemptsRequest request, + CancellationToken cancellationToken = default) + { + + var result = await _client.MakeRequestAsync( + "POST", + "/api/v2/video/call/ring_attempts", null, request, null, + cancellationToken); + return result; + } + public async Task> QueryCallStatsAsync(QueryCallStatsRequest request, CancellationToken cancellationToken = default) diff --git a/src/Webhook.cs b/src/Webhook.cs index 2a0811d..123efdc 100644 --- a/src/Webhook.cs +++ b/src/Webhook.cs @@ -56,6 +56,7 @@ public static class WebhookEventType public const string CallRecordingStopped = "call.recording_stopped"; public const string CallRejected = "call.rejected"; public const string CallRing = "call.ring"; + public const string CallRingSettled = "call.ring_settled"; public const string CallRTMPBroadcastFailed = "call.rtmp_broadcast_failed"; public const string CallRTMPBroadcastStarted = "call.rtmp_broadcast_started"; public const string CallRTMPBroadcastStopped = "call.rtmp_broadcast_stopped"; @@ -93,6 +94,8 @@ public static class WebhookEventType public const string ExportBulkImageModerationSuccess = "export.bulk_image_moderation.success"; public const string ExportChannelsError = "export.channels.error"; public const string ExportChannelsSuccess = "export.channels.success"; + public const string ExportLabelResultsError = "export.label_results.error"; + public const string ExportLabelResultsSuccess = "export.label_results.success"; public const string ExportModerationLogsError = "export.moderation_logs.error"; public const string ExportModerationLogsSuccess = "export.moderation_logs.success"; public const string ExportReviewQueueError = "export.review_queue.error"; @@ -118,6 +121,7 @@ public static class WebhookEventType public const string FeedsBookmarkFolderUpdated = "feeds.bookmark_folder.updated"; public const string FeedsCommentAdded = "feeds.comment.added"; public const string FeedsCommentDeleted = "feeds.comment.deleted"; + public const string FeedsCommentFeedback = "feeds.comment.feedback"; public const string FeedsCommentReactionAdded = "feeds.comment.reaction.added"; public const string FeedsCommentReactionDeleted = "feeds.comment.reaction.deleted"; public const string FeedsCommentReactionUpdated = "feeds.comment.reaction.updated"; @@ -158,7 +162,6 @@ public static class WebhookEventType public const string ModerationCustomAction = "moderation.custom_action"; public const string ModerationFlagged = "moderation.flagged"; public const string ModerationImageAnalysisComplete = "moderation.image_analysis.complete"; - public const string ModerationIntentDetected = "moderation.intent_detected"; public const string ModerationMarkReviewed = "moderation.mark_reviewed"; public const string ModerationTextAnalysisComplete = "moderation.text_analysis.complete"; public const string ModerationCheckCompleted = "moderation_check.completed"; @@ -323,6 +326,7 @@ private static Type GetEventTypeClass(string eventType) "call.recording_stopped" => typeof(CallRecordingStoppedEvent), "call.rejected" => typeof(CallRejectedEvent), "call.ring" => typeof(CallRingEvent), + "call.ring_settled" => typeof(CallRingSettledEvent), "call.rtmp_broadcast_failed" => typeof(CallRtmpBroadcastFailedEvent), "call.rtmp_broadcast_started" => typeof(CallRtmpBroadcastStartedEvent), "call.rtmp_broadcast_stopped" => typeof(CallRtmpBroadcastStoppedEvent), @@ -360,6 +364,8 @@ private static Type GetEventTypeClass(string eventType) "export.bulk_image_moderation.success" => typeof(AsyncBulkImageModerationEvent), "export.channels.error" => typeof(AsyncExportErrorEvent), "export.channels.success" => typeof(AsyncExportChannelsEvent), + "export.label_results.error" => typeof(AsyncExportErrorEvent), + "export.label_results.success" => typeof(AsyncExportLabelResultsEvent), "export.moderation_logs.error" => typeof(AsyncExportErrorEvent), "export.moderation_logs.success" => typeof(AsyncExportModerationLogsEvent), "export.review_queue.error" => typeof(AsyncExportErrorEvent), @@ -385,6 +391,7 @@ private static Type GetEventTypeClass(string eventType) "feeds.bookmark_folder.updated" => typeof(BookmarkFolderUpdatedEvent), "feeds.comment.added" => typeof(CommentAddedEvent), "feeds.comment.deleted" => typeof(CommentDeletedEvent), + "feeds.comment.feedback" => typeof(CommentFeedbackEvent), "feeds.comment.reaction.added" => typeof(CommentReactionAddedEvent), "feeds.comment.reaction.deleted" => typeof(CommentReactionDeletedEvent), "feeds.comment.reaction.updated" => typeof(CommentReactionUpdatedEvent), @@ -425,7 +432,6 @@ private static Type GetEventTypeClass(string eventType) "moderation.custom_action" => typeof(ModerationCustomActionEvent), "moderation.flagged" => typeof(ModerationFlaggedEvent), "moderation.image_analysis.complete" => typeof(ModerationImageAnalysisCompleteEvent), - "moderation.intent_detected" => typeof(IntentDetectedEvent), "moderation.mark_reviewed" => typeof(ModerationMarkReviewedEvent), "moderation.text_analysis.complete" => typeof(ModerationTextAnalysisCompleteEvent), "moderation_check.completed" => typeof(ModerationCheckCompletedEvent), diff --git a/src/models.cs b/src/models.cs index 962addd..d943ef0 100644 --- a/src/models.cs +++ b/src/models.cs @@ -7,20 +7,43 @@ namespace GetStream.Models { public class AIAudioConfigRequest { + /// + /// Bodyguard credentials profile to classify transcripts with. Applies to the NLP engine only; ignored when LLM configurability is enabled. Empty falls back to the app-pinned profile, then the organization's top-level credentials + /// [JsonPropertyName("profile")] public string? Profile { get; set; } + /// + /// Deprecated pre-split rule list. Still the live config while no engine config exists; once one does it is kept as a fallback for whichever engine has none of its own + /// [JsonPropertyName("rules")] public List Rules { get; set; } + [JsonPropertyName("ai_text_config")] + public AITextConfig? AiTextConfig { get; set; } + [JsonPropertyName("llm_config")] + public LLMConfig? LlmConfig { get; set; } } public class AIAudioConfigResponse { + /// + /// Whether the engine selected by the application's LLM configurability flag has a rule that does something. Derived, not stored + /// [JsonPropertyName("enabled")] public bool Enabled { get; set; } + /// + /// Bodyguard credentials profile transcripts are classified with. Applies to the NLP engine only + /// [JsonPropertyName("profile")] public string Profile { get; set; } + /// + /// The active engine's rules, flattened into the pre-split shape for clients that predate the per-engine configs. This is the whole config for a policy that has no per-engine config stored + /// [JsonPropertyName("rules")] public List Rules { get; set; } + [JsonPropertyName("ai_text_config")] + public AITextConfig? AiTextConfig { get; set; } + [JsonPropertyName("llm_config")] + public LLMConfig? LlmConfig { get; set; } } public class AIImageConfig @@ -124,6 +147,11 @@ public class APIError [JsonPropertyName("details")] public List Details { get; set; } /// + /// Milliseconds until the user's slow mode cool down period ends. Only set on code 60 (cool down) errors + /// + [JsonPropertyName("cooldown_remaining_ms")] + public int? CooldownRemainingMs { get; set; } + /// /// Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it /// [JsonPropertyName("unrecoverable")] @@ -1255,6 +1283,11 @@ public class ActivitySelectorConfig [JsonPropertyName("ranking_candidate_limit")] public int? RankingCandidateLimit { get; set; } /// + /// Maximum time in milliseconds this selector may take (25-5000). A selector that runs over its budget is dropped from that read instead of failing it, and stays out for the rest of that pagination session. The budget can only tighten the default, never extend it. Omit to use the default. Only supported on the popular, proximity, interest, query and follow_suggestion selectors + /// + [JsonPropertyName("time_budget_ms")] + public int? TimeBudgetMs { get; set; } + /// /// Sort parameters for activity selection /// [JsonPropertyName("sort")] @@ -1298,6 +1331,11 @@ public class ActivitySelectorConfigResponse [JsonPropertyName("ranking_candidate_limit")] public int? RankingCandidateLimit { get; set; } /// + /// Maximum time in milliseconds this selector may take before it is dropped from the read + /// + [JsonPropertyName("time_budget_ms")] + public int? TimeBudgetMs { get; set; } + /// /// Sort parameters for activity selection /// [JsonPropertyName("sort")] @@ -1431,6 +1469,8 @@ public class AddActivityRequest /// [JsonPropertyName("skip_enrich_url")] public bool? SkipEnrichUrl { get; set; } + [JsonPropertyName("skip_existing")] + public bool? SkipExisting { get; set; } /// /// Whether to skip push notifications /// @@ -1511,6 +1551,11 @@ public class AddActivityResponse /// [JsonPropertyName("mention_notifications_created")] public int? MentionNotificationsCreated { get; set; } + /// + /// Contains the activity ID when skip_existing is true and the activity already existed, so it was left unchanged. + /// + [JsonPropertyName("skipped_existing")] + public List SkippedExisting { get; set; } } public class AddBookmarkRequest @@ -1990,7 +2035,7 @@ public class AggregationConfig [JsonPropertyName("format")] public string? Format { get; set; } /// - /// Maximum number of activities kept in each aggregated group. Omit to use the default of 100. Must be between 1 and 100 when set. + /// Maximum number of activities kept in each aggregated group. Omit to use the default: 15 for apps migrated from Feeds v2 or created on or after 2026-10-11, 100 otherwise. Must be between 1 and 100 when set. /// [JsonPropertyName("group_size")] public int? GroupSize { get; set; } @@ -2155,8 +2200,14 @@ public class AppResponseFields { [JsonPropertyName("allow_multi_user_devices")] public bool AllowMultiUserDevices { get; set; } + /// + /// A boolean value determining if async url enrichment is enabled. + /// [JsonPropertyName("async_url_enrich_enabled")] public bool AsyncUrlEnrichEnabled { get; set; } + /// + /// A boolean value determining if auto translation is enabled. + /// [JsonPropertyName("auto_translation_enabled")] public bool AutoTranslationEnabled { get; set; } [JsonPropertyName("before_message_send_hook_system_messages")] @@ -2205,6 +2256,9 @@ public class AppResponseFields public string ModerationWebhookUrl { get; set; } [JsonPropertyName("multi_tenant_enabled")] public bool MultiTenantEnabled { get; set; } + /// + /// The name of the app. + /// [JsonPropertyName("name")] public string Name { get; set; } [JsonPropertyName("organization")] @@ -2556,6 +2610,26 @@ public class AsyncExportErrorEvent public DateTime? ReceivedAt { get; set; } } + public class AsyncExportLabelResultsEvent + { + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + [JsonPropertyName("finished_at")] + public DateTime FinishedAt { get; set; } + [JsonPropertyName("started_at")] + public DateTime StartedAt { get; set; } + [JsonPropertyName("task_id")] + public string TaskID { get; set; } + [JsonPropertyName("url")] + public string Url { get; set; } + [JsonPropertyName("custom")] + public object Custom { get; set; } + [JsonPropertyName("type")] + public string Type { get; set; } + [JsonPropertyName("received_at")] + public DateTime? ReceivedAt { get; set; } + } + public class AsyncExportModerationLogsEvent { [JsonPropertyName("created_at")] @@ -3039,6 +3113,11 @@ public class BanRequest [JsonPropertyName("target_user_id")] public string TargetUserID { get; set; } /// + /// Whether to also ban the user from future channels created by the banner + /// + [JsonPropertyName("ban_from_future_channels")] + public bool? BanFromFutureChannels { get; set; } + /// /// ID of the user performing the ban /// [JsonPropertyName("banned_by_id")] @@ -3051,6 +3130,11 @@ public class BanRequest [JsonPropertyName("delete_messages")] public string? DeleteMessages { get; set; } /// + /// Whether to delete reactions by the banned user on other users' messages + /// + [JsonPropertyName("delete_reactions")] + public bool? DeleteReactions { get; set; } + /// /// Whether to ban the user's IP address /// [JsonPropertyName("ip_ban")] @@ -4924,6 +5008,64 @@ public class CallRingEvent public string? RingID { get; set; } } + public class CallRingSettledEvent + { + [JsonPropertyName("call_cid")] + public string CallCid { get; set; } + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + /// + /// ID of the user who rang + /// + [JsonPropertyName("initiated_by")] + public string InitiatedBy { get; set; } + /// + /// Final outcome of the ring: answered_all, answered_some, rejected_all, missed_all, cancelled or mixed + /// + [JsonPropertyName("outcome")] + public string Outcome { get; set; } + /// + /// When the ring was sent + /// + [JsonPropertyName("rang_at")] + public DateTime RangAt { get; set; } + /// + /// Identifies this ring of the call session, as carried on call.ring + /// + [JsonPropertyName("ring_id")] + public string RingID { get; set; } + /// + /// Call session ID + /// + [JsonPropertyName("session_id")] + public string SessionID { get; set; } + /// + /// Why the ring closed: answered, rejected, cancel, timeout, ended or auto_end + /// + [JsonPropertyName("settle_reason")] + public string SettleReason { get; set; } + /// + /// When the outcome left ringing + /// + [JsonPropertyName("settled_at")] + public DateTime SettledAt { get; set; } + /// + /// ID of the user whose action closed the ring, or 'server' for the missed-call deadline and automatic ends + /// + [JsonPropertyName("settled_by")] + public string SettledBy { get; set; } + /// + /// Final state of every rung user, keyed by user ID + /// + [JsonPropertyName("targets")] + public Dictionary Targets { get; set; } + /// + /// The type of event: "call.ring_settled" in this case + /// + [JsonPropertyName("type")] + public string Type { get; set; } + } + public class CallRtmpBroadcastFailedEvent { /// @@ -5206,6 +5348,8 @@ public class CallSettingsRequest public IndividualRecordingSettingsRequest? IndividualRecording { get; set; } [JsonPropertyName("ingress")] public IngressSettingsRequest? Ingress { get; set; } + [JsonPropertyName("lifecycle")] + public LifecycleSettingsRequest? Lifecycle { get; set; } [JsonPropertyName("limits")] public LimitsSettingsRequest? Limits { get; set; } [JsonPropertyName("raw_recording")] @@ -5248,6 +5392,11 @@ public class CallSettingsResponse public GeofenceSettingsResponse Geofencing { get; set; } [JsonPropertyName("individual_recording")] public IndividualRecordingSettingsResponse IndividualRecording { get; set; } + /// + /// LifecycleSettings is the payload for call lifecycle settings + /// + [JsonPropertyName("lifecycle")] + public LifecycleSettingsResponse Lifecycle { get; set; } [JsonPropertyName("limits")] public LimitsSettingsResponse Limits { get; set; } [JsonPropertyName("raw_recording")] @@ -5936,6 +6085,16 @@ public class CancelImportV2TaskResponse public class CastPollVoteRequest { + /// + /// Key of the moderation configuration to use. Server-side only. + /// + [JsonPropertyName("config_key")] + public string? ConfigKey { get; set; } + /// + /// Team associated with the configuration. Server-side only. + /// + [JsonPropertyName("config_team")] + public string? ConfigTeam { get; set; } [JsonPropertyName("user_id")] public string? UserID { get; set; } /// @@ -6933,8 +7092,14 @@ public class ChannelOwnCapability public class ChannelPushPreferencesResponse { + /// + /// The scope level of the push notifications. + /// [JsonPropertyName("chat_level")] public string? ChatLevel { get; set; } + /// + /// If provided the notifications will be disabled until the set date. + /// [JsonPropertyName("disabled_until")] public DateTime? DisabledUntil { get; set; } [JsonPropertyName("chat_preferences")] @@ -7091,6 +7256,8 @@ public class ChannelStateResponse public List PinnedMessages { get; set; } [JsonPropertyName("threads")] public List Threads { get; set; } + [JsonPropertyName("cooldown_remaining_ms")] + public int? CooldownRemainingMs { get; set; } [JsonPropertyName("hidden")] public bool? Hidden { get; set; } [JsonPropertyName("hide_messages_before")] @@ -7114,6 +7281,9 @@ public class ChannelStateResponse public DraftResponse? Draft { get; set; } [JsonPropertyName("membership")] public ChannelMemberResponse? Membership { get; set; } + /// + /// The push preference details. + /// [JsonPropertyName("push_preferences")] public ChannelPushPreferencesResponse? PushPreferences { get; set; } } @@ -7138,6 +7308,11 @@ public class ChannelStateResponseFields [JsonPropertyName("threads")] public List Threads { get; set; } /// + /// Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down + /// + [JsonPropertyName("cooldown_remaining_ms")] + public int? CooldownRemainingMs { get; set; } + /// /// Whether this channel is hidden or not /// [JsonPropertyName("hidden")] @@ -7181,6 +7356,9 @@ public class ChannelStateResponseFields public DraftResponse? Draft { get; set; } [JsonPropertyName("membership")] public ChannelMemberResponse? Membership { get; set; } + /// + /// The push preference details. + /// [JsonPropertyName("push_preferences")] public ChannelPushPreferencesResponse? PushPreferences { get; set; } } @@ -7853,6 +8031,46 @@ public class CheckExternalStorageResponse public string FileUrl { get; set; } } + public class CheckGCPPubSubRequest + { + /// + /// Publish the test message with an ordering key through the regional endpoint, as a hook with ordering enabled would; requires gcp_pubsub_region + /// + [JsonPropertyName("gcp_pubsub_event_based_ordering_key_enabled")] + public bool? GcpPubsubEventBasedOrderingKeyEnabled { get; set; } + /// + /// GCP region used for the regional Pub/Sub endpoint when ordering is enabled + /// + [JsonPropertyName("gcp_pubsub_region")] + public string? GcpPubsubRegion { get; set; } + /// + /// Fully qualified GCP Pub/Sub topic name (projects/{project}/topics/{topic}) + /// + [JsonPropertyName("gcp_pubsub_topic")] + public string? GcpPubsubTopic { get; set; } + } + + public class CheckGCPPubSubResponse + { + [JsonPropertyName("duration")] + public string Duration { get; set; } + /// + /// Validation result. One of: ok, error + /// + [JsonPropertyName("status")] + public string Status { get; set; } + /// + /// Error text + /// + [JsonPropertyName("error")] + public string? Error { get; set; } + /// + /// Error data + /// + [JsonPropertyName("data")] + public object Data { get; set; } + } + public class CheckPushRequest { /// @@ -8011,31 +8229,16 @@ public class CheckResponse [JsonPropertyName("status")] public string Status { get; set; } /// - /// Intent topic label matched by this request's text (test mode only; omitted when no topic matched) - /// - [JsonPropertyName("intent_matched_topic")] - public string? IntentMatchedTopic { get; set; } - /// - /// Stage 2 conversation score (0-100) computed synchronously against this request's texts (test mode only). Omitted -- not zero -- when intent_matched_topic is set but scoring could not be completed (matched topic disabled/removed, or the scoring call itself failed); only present when a real score was computed - /// - [JsonPropertyName("intent_score")] - public double? IntentScore { get; set; } - /// - /// The matched topic's configured score_threshold, for comparison against intent_score (test mode only). Same omitted-not-zero rule as intent_score - /// - [JsonPropertyName("intent_score_threshold")] - public double? IntentScoreThreshold { get; set; } - /// - /// Whether intent_score clears intent_score_threshold, i.e. whether this would fire moderation.intent_detected in production (test mode only). Same omitted-not-zero rule as intent_score - /// - [JsonPropertyName("intent_would_fire")] - public bool? IntentWouldFire { get; set; } - /// /// ID of the running moderation task /// [JsonPropertyName("task_id")] public string? TaskID { get; set; } /// + /// Score (0-100) of each policy intent topic against this request's text, in policy order (test mode only; omitted when the policy has no topics or scoring failed) + /// + [JsonPropertyName("intent_scores")] + public List IntentScores { get; set; } + /// /// All moderation rules triggered by this check (content, user, and call rules), with their resolved actions /// [JsonPropertyName("triggered_rules")] @@ -8217,6 +8420,16 @@ public class ClientEvent [JsonPropertyName("join_reason")] public string? JoinReason { get; set; } /// + /// Source of the leave that aborted a join: user, app, callkit, remote_event, sdk_error, or unknown. Not validated against this set, so SDKs may report new values. Optional; sent on failure events. Maximum 32 characters. + /// + [JsonPropertyName("leave_initiator")] + public string? LeaveInitiator { get; set; } + /// + /// Internal reason or triggering event for the leave that aborted a join. Optional; sent on failure events. Maximum 200 characters. + /// + [JsonPropertyName("leave_reason")] + public string? LeaveReason { get; set; } + /// /// Microphone permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Required on every MediaDevicePermission event. /// [JsonPropertyName("microphone_permission_status")] @@ -8526,6 +8739,89 @@ public class CommentDeletedEvent public UserResponseCommonFields? User { get; set; } } + public class CommentFeedbackEvent + { + /// + /// Date/time of creation + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + [JsonPropertyName("comment_feedback")] + public CommentFeedbackEventPayload CommentFeedback { get; set; } + [JsonPropertyName("custom")] + public object Custom { get; set; } + /// + /// The type of event: "feeds.comment.feedback" in this case + /// + [JsonPropertyName("type")] + public string Type { get; set; } + [JsonPropertyName("received_at")] + public DateTime? ReceivedAt { get; set; } + [JsonPropertyName("user")] + public UserResponseCommonFields? User { get; set; } + } + + public class CommentFeedbackEventPayload + { + /// + /// The comment that received feedback + /// + [JsonPropertyName("comment_id")] + public string CommentID { get; set; } + /// + /// When the feedback was created + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + /// + /// Whether the comment is hidden for the user + /// + [JsonPropertyName("hide")] + public bool Hide { get; set; } + /// + /// When the feedback was last updated + /// + [JsonPropertyName("updated_at")] + public DateTime UpdatedAt { get; set; } + /// + /// User response object + /// + [JsonPropertyName("user")] + public UserResponse User { get; set; } + } + + public class CommentFeedbackRequest + { + /// + /// Whether to hide this comment for the user + /// + [JsonPropertyName("hide")] + public bool? Hide { get; set; } + [JsonPropertyName("user_id")] + public string? UserID { get; set; } + /// + /// User request object + /// + [JsonPropertyName("user")] + public UserRequest? User { get; set; } + } + + public class CommentFeedbackResponse + { + /// + /// The ID of the comment that received feedback + /// + [JsonPropertyName("comment_id")] + public string CommentID { get; set; } + [JsonPropertyName("duration")] + public string Duration { get; set; } + /// + /// Whether the comment is hidden for the user + /// + [JsonPropertyName("hide")] + public bool Hide { get; set; } + } + public class CommentReactionAddedEvent { /// @@ -8632,6 +8928,11 @@ public class CommentResponse [JsonPropertyName("downvote_count")] public int DownvoteCount { get; set; } /// + /// Only true in QueryComments results filtered with hidden: true + /// + [JsonPropertyName("hidden")] + public bool Hidden { get; set; } + /// /// Unique identifier for the comment /// [JsonPropertyName("id")] @@ -8979,6 +9280,14 @@ public class ContentCountRuleParameters public string? TimeWindow { get; set; } } + public class ContentCountryCodeParameters + { + [JsonPropertyName("operator")] + public string? @Operator { get; set; } + [JsonPropertyName("country_codes")] + public List CountryCodes { get; set; } + } + public class ContentCustomPropertyCountParameters { [JsonPropertyName("operator")] @@ -9949,6 +10258,16 @@ public class CreatePollOptionRequest /// [JsonPropertyName("text")] public string Text { get; set; } + /// + /// Key of the moderation configuration to use. Server-side only. + /// + [JsonPropertyName("config_key")] + public string? ConfigKey { get; set; } + /// + /// Team associated with the configuration. Server-side only. + /// + [JsonPropertyName("config_team")] + public string? ConfigTeam { get; set; } [JsonPropertyName("user_id")] public string? UserID { get; set; } /// @@ -9978,6 +10297,16 @@ public class CreatePollRequest [JsonPropertyName("allow_user_suggested_options")] public bool? AllowUserSuggestedOptions { get; set; } /// + /// Key of the moderation configuration to use. Server-side only. + /// + [JsonPropertyName("config_key")] + public string? ConfigKey { get; set; } + /// + /// Team associated with the configuration. Server-side only. + /// + [JsonPropertyName("config_team")] + public string? ConfigTeam { get; set; } + /// /// A description of the poll /// [JsonPropertyName("description")] @@ -10003,6 +10332,9 @@ public class CreatePollRequest public string? Team { get; set; } [JsonPropertyName("user_id")] public string? UserID { get; set; } + /// + /// Represents the visibility of votes in a poll. + /// [JsonPropertyName("voting_visibility")] public string? VotingVisibility { get; set; } [JsonPropertyName("options")] @@ -11017,6 +11349,38 @@ public class DeleteModerationTemplateResponse public string Duration { get; set; } } + public class DeletePollAnswerRequestPayload + { + /// + /// Reason for deletion + /// + [JsonPropertyName("reason")] + public string? Reason { get; set; } + } + + public class DeletePollOptionRequestPayload + { + /// + /// Option to delete. Required on an item for a whole poll (create or edit); defaults to the option an add_option / update_option item was raised for + /// + [JsonPropertyName("option_id")] + public string? OptionID { get; set; } + /// + /// Reason for deletion + /// + [JsonPropertyName("reason")] + public string? Reason { get; set; } + } + + public class DeletePollRequestPayload + { + /// + /// Reason for deletion + /// + [JsonPropertyName("reason")] + public string? Reason { get; set; } + } + public class DeleteQueueRequest { [JsonPropertyName("user_id")] @@ -11339,12 +11703,12 @@ public class DeviceErrorInfo public class DeviceResponse { /// - /// Date/time of creation + /// The date when the device was created. /// [JsonPropertyName("created_at")] public DateTime CreatedAt { get; set; } /// - /// Device ID + /// The device identifier. /// [JsonPropertyName("id")] public string ID { get; set; } @@ -11734,6 +12098,11 @@ public class EnrichmentOptions [JsonPropertyName("include_flat_activities")] public bool? IncludeFlatActivities { get; set; } /// + /// Default: false. Server-side only. When true, the response includes ranking_config: the ranking configuration (from the feed view, or the feed group as fallback) used to rank this read. + /// + [JsonPropertyName("include_ranking_config")] + public bool? IncludeRankingConfig { get; set; } + /// /// Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time. /// [JsonPropertyName("include_score_vars")] @@ -11886,6 +12255,9 @@ public class EntityCreatorResponse public DateTime? RevokeTokensIssuedBefore { get; set; } [JsonPropertyName("devices")] public List Devices { get; set; } + /// + /// The privacy settings of the user. + /// [JsonPropertyName("privacy_settings")] public PrivacySettingsResponse? PrivacySettings { get; set; } [JsonPropertyName("push_notifications")] @@ -11941,6 +12313,14 @@ public class EventHook public DateTime? CreatedAt { get; set; } [JsonPropertyName("enabled")] public bool? Enabled { get; set; } + [JsonPropertyName("gcp_pubsub_auth_type")] + public string? GcpPubsubAuthType { get; set; } + [JsonPropertyName("gcp_pubsub_event_based_ordering_key_enabled")] + public bool? GcpPubsubEventBasedOrderingKeyEnabled { get; set; } + [JsonPropertyName("gcp_pubsub_region")] + public string? GcpPubsubRegion { get; set; } + [JsonPropertyName("gcp_pubsub_topic")] + public string? GcpPubsubTopic { get; set; } [JsonPropertyName("hook_type")] public string? HookType { get; set; } [JsonPropertyName("id")] @@ -13083,6 +13463,8 @@ public class FeedsNotificationComment public string ID { get; set; } [JsonPropertyName("user_id")] public string UserID { get; set; } + [JsonPropertyName("parent_id")] + public string? ParentID { get; set; } [JsonPropertyName("attachments")] public List Attachments { get; set; } } @@ -13143,6 +13525,14 @@ public class FeedsNotificationTrigger public object Custom { get; set; } } + public class FeedsPolicyConfig + { + [JsonPropertyName("max_age_hours")] + public int MaxAgeHours { get; set; } + [JsonPropertyName("feed_groups")] + public List FeedGroups { get; set; } + } + public class FeedsPreferences { /// @@ -13238,6 +13628,18 @@ public class FeedsReactionResponse public object Custom { get; set; } } + public class FeedsRetentionPolicy + { + [JsonPropertyName("app_pk")] + public int AppPk { get; set; } + [JsonPropertyName("enabled_at")] + public DateTime EnabledAt { get; set; } + [JsonPropertyName("policy")] + public string Policy { get; set; } + [JsonPropertyName("config")] + public FeedsPolicyConfig Config { get; set; } + } + public class FeedsRetentionRunResponse { [JsonPropertyName("app_pk")] @@ -13380,6 +13782,8 @@ public class FeedsV3CommentResponse public DateTime CreatedAt { get; set; } [JsonPropertyName("downvote_count")] public int DownvoteCount { get; set; } + [JsonPropertyName("hidden")] + public bool Hidden { get; set; } [JsonPropertyName("id")] public string ID { get; set; } [JsonPropertyName("object_id")] @@ -13802,6 +14206,11 @@ public class FollowBatchRequest [JsonPropertyName("follows")] public List Follows { get; set; } /// + /// If true, the batch is queued as a background task, paced per app, and the response has empty follows and a task_id. Server-side only. Supported by the get-or-create endpoint (GetOrCreateFollows); FollowBatch rejects it. Async batches can apply out of order with other follow writes. Defaults to false. + /// + [JsonPropertyName("async")] + public bool? Async { get; set; } + /// /// If true, auto-creates users referenced by source/target FIDs in the batch when they don't already exist. Server-side only. Defaults to false. This top-level field is the only supported batch/upsert create_users control. /// [JsonPropertyName("create_users")] @@ -13827,6 +14236,11 @@ public class FollowBatchResponse /// [JsonPropertyName("follows")] public List Follows { get; set; } + /// + /// ID of the background task when the request was sent with async: true + /// + [JsonPropertyName("task_id")] + public string? TaskID { get; set; } } public class FollowCreatedEvent @@ -14130,6 +14544,9 @@ public class FullUserResponse public DateTime? RevokeTokensIssuedBefore { get; set; } [JsonPropertyName("latest_hidden_channels")] public List LatestHiddenChannels { get; set; } + /// + /// The privacy settings of the user. + /// [JsonPropertyName("privacy_settings")] public PrivacySettingsResponse? PrivacySettings { get; set; } [JsonPropertyName("teams_role")] @@ -14242,6 +14659,9 @@ public class GetApplicationResponse /// [JsonPropertyName("duration")] public string Duration { get; set; } + /// + /// A type representing the app settings. + /// [JsonPropertyName("app")] public AppResponseFields App { get; set; } } @@ -14768,7 +15188,7 @@ public class GetFeedsRetentionPolicyResponse [JsonPropertyName("enabled")] public bool Enabled { get; set; } [JsonPropertyName("policies")] - public List Policies { get; set; } + public List Policies { get; set; } } public class GetFeedsRetentionPolicyRunsRequest @@ -15177,6 +15597,11 @@ public class GetOrCreateFeedResponse public string? Next { get; set; } [JsonPropertyName("prev")] public string? Prev { get; set; } + /// + /// 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 + /// + [JsonPropertyName("degraded_selectors")] + public List DegradedSelectors { get; set; } [JsonPropertyName("followers_pagination")] public PagerResponse? FollowersPagination { get; set; } [JsonPropertyName("following_pagination")] @@ -15185,6 +15610,8 @@ public class GetOrCreateFeedResponse public PagerResponse? MemberPagination { get; set; } [JsonPropertyName("notification_status")] public NotificationStatusResponse? NotificationStatus { get; set; } + [JsonPropertyName("ranking_config")] + public RankingConfig? RankingConfig { get; set; } } public class GetOrCreateFeedViewRequest @@ -16299,28 +16726,28 @@ public class InsertActionLogResponse public string Duration { get; set; } } - public class IntentBufferedItem + public class IntentConditionInfo { /// - /// The ID of the user who authored the buffered message or comment + /// Whether the score reached the threshold. /// - [JsonPropertyName("author_user_id")] - public string AuthorUserID { get; set; } + [JsonPropertyName("passed")] + public bool Passed { get; set; } /// - /// When the buffered message or comment was created + /// Final (damped) score of the topic in this analysis; 0 when the topic is not defined in the policy. /// - [JsonPropertyName("created_at")] - public DateTime CreatedAt { get; set; } + [JsonPropertyName("score")] + public int Score { get; set; } /// - /// The ID of the buffered message or comment + /// Minimum score (1-100) the condition requires. /// - [JsonPropertyName("id")] - public string ID { get; set; } + [JsonPropertyName("threshold")] + public int Threshold { get; set; } /// - /// The text of the buffered message or comment + /// Policy intent topic label the condition references. /// - [JsonPropertyName("text")] - public string Text { get; set; } + [JsonPropertyName("topic")] + public string Topic { get; set; } } public class IntentConfigRequest @@ -16341,51 +16768,49 @@ public class IntentConfigResponse public List Topics { get; set; } } - public class IntentDetectedEvent + public class IntentEvaluationInfo { /// - /// The channel CID (chat) or feed ID (feeds) the buffered conversation belongs to + /// The analyzed conversation: the channel CID for chat, the object ID for feeds. /// [JsonPropertyName("conversation_id")] public string ConversationID { get; set; } - [JsonPropertyName("created_at")] - public DateTime CreatedAt { get; set; } /// - /// The ID of the most recently buffered entity + /// Number of conversation messages sent to the model. /// - [JsonPropertyName("entity_id")] - public string EntityID { get; set; } + [JsonPropertyName("message_count")] + public int MessageCount { get; set; } /// - /// The type of the most recently buffered entity (chat message or feed comment) + /// One entry per `intent_rule` condition of the rule, flat conditions first, then group conditions. /// - [JsonPropertyName("entity_type")] - public string EntityType { get; set; } + [JsonPropertyName("conditions")] + public List Conditions { get; set; } /// - /// The configured intent topic label that started the buffer + /// Score (0-100) the model gave every topic in the analysis call, keyed by topic label, before message-count damping. /// - [JsonPropertyName("matched_topic")] - public string MatchedTopic { get; set; } + [JsonPropertyName("raw_scores")] + public Dictionary RawScores { get; set; } /// - /// The Stage 2 conversation score (0-100) that cleared score_threshold + /// Final score (0-100) of every topic after message-count damping, keyed by topic label. Conditions compare against these. /// + [JsonPropertyName("scores")] + public Dictionary Scores { get; set; } + } + + public class IntentRuleParameters + { + [JsonPropertyName("topic")] + public string Topic { get; set; } + [JsonPropertyName("threshold")] + public int? Threshold { get; set; } + } + + public class IntentScoreResponse + { [JsonPropertyName("score")] - public double Score { get; set; } - /// - /// The ID of the user whose conversation was scored - /// - [JsonPropertyName("user_id")] - public string UserID { get; set; } - /// - /// The buffered items that were scored, in the order they were captured - /// - [JsonPropertyName("items")] - public List Items { get; set; } - [JsonPropertyName("custom")] - public object Custom { get; set; } - [JsonPropertyName("type")] - public string Type { get; set; } - [JsonPropertyName("received_at")] - public DateTime? ReceivedAt { get; set; } + public int Score { get; set; } + [JsonPropertyName("topic")] + public string Topic { get; set; } } public class IntentTopicRequest @@ -16396,74 +16821,24 @@ public class IntentTopicRequest [JsonPropertyName("label")] public string Label { get; set; } /// - /// How long the buffer collects items before scoring runs - /// - [JsonPropertyName("analysis_cooldown_seconds")] - public int? AnalysisCooldownSeconds { get; set; } - /// /// Optional description used in the classification prompt; the label alone is used when empty /// [JsonPropertyName("description")] public string? Description { get; set; } - /// - /// Whether this topic is evaluated - /// - [JsonPropertyName("enabled")] - public bool? Enabled { get; set; } - /// - /// Items buffered per conversation before scoring runs early - /// - [JsonPropertyName("max_captured_items")] - public int? MaxCapturedItems { get; set; } - /// - /// Suppresses this topic for a user and conversation after it fires; 0 uses the default - /// - [JsonPropertyName("refire_cooldown_seconds")] - public int? RefireCooldownSeconds { get; set; } - /// - /// Conversation score (0-100) required to fire moderation.intent_detected - /// - [JsonPropertyName("score_threshold")] - public double? ScoreThreshold { get; set; } } public class IntentTopicResponse { - /// - /// How long the buffer collects items before scoring runs - /// - [JsonPropertyName("analysis_cooldown_seconds")] - public int AnalysisCooldownSeconds { get; set; } - /// - /// Whether this topic is evaluated - /// - [JsonPropertyName("enabled")] - public bool Enabled { get; set; } /// /// Unique topic label (e.g. purchase_intent) /// [JsonPropertyName("label")] public string Label { get; set; } /// - /// Items buffered per conversation before scoring runs early - /// - [JsonPropertyName("max_captured_items")] - public int MaxCapturedItems { get; set; } - /// - /// Conversation score (0-100) required to fire moderation.intent_detected - /// - [JsonPropertyName("score_threshold")] - public double ScoreThreshold { get; set; } - /// /// Optional description used in the classification prompt; the label alone is used when empty /// [JsonPropertyName("description")] public string? Description { get; set; } - /// - /// Suppresses this topic for a user and conversation after it fires; 0 uses the default - /// - [JsonPropertyName("refire_cooldown_seconds")] - public int? RefireCooldownSeconds { get; set; } } public class InterestTagResponse @@ -16852,6 +17227,24 @@ public class LayoutSettingsResponse public object Options { get; set; } } + public class LifecycleSettingsRequest + { + /// + /// Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer (currently: when the caller cancels the ring). Fixed at call creation + /// + [JsonPropertyName("mode")] + public string? Mode { get; set; } + } + + public class LifecycleSettingsResponse + { + /// + /// Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer (currently: when the caller cancels the ring). Fixed at call creation + /// + [JsonPropertyName("mode")] + public string Mode { get; set; } + } + public class LimitInfoResponse { /// @@ -17627,6 +18020,9 @@ public class MemberUserRequest public List Teams { get; set; } [JsonPropertyName("custom")] public object Custom { get; set; } + /// + /// The privacy settings of the user. + /// [JsonPropertyName("privacy_settings")] public PrivacySettingsResponse? PrivacySettings { get; set; } [JsonPropertyName("teams_role")] @@ -18000,6 +18396,9 @@ public class MessageModerationResult /// [JsonPropertyName("moderated_by")] public string? ModeratedBy { get; set; } + /// + /// Response from AI moderation + /// [JsonPropertyName("ai_moderation_response")] public ModerationResponse? AiModerationResponse { get; set; } /// @@ -19537,12 +19936,24 @@ public class ModerationQueueResponse public class ModerationResponse { + /// + /// Explicit score + /// [JsonPropertyName("explicit")] public double @Explicit { get; set; } + /// + /// Action taken by automod + /// [JsonPropertyName("action")] public string Action { get; set; } + /// + /// Spam score + /// [JsonPropertyName("spam")] public double Spam { get; set; } + /// + /// Toxicity score + /// [JsonPropertyName("toxic")] public double Toxic { get; set; } } @@ -19640,6 +20051,8 @@ public class ModerationRulesTriggeredEvent /// [JsonPropertyName("matched_contents")] public List MatchedContents { get; set; } + [JsonPropertyName("intent")] + public IntentEvaluationInfo? Intent { get; set; } } public class ModerationTextAnalysisCompleteEvent @@ -19834,12 +20247,29 @@ public class NoiseCancellationSettings public class NotificationComment { + /// + /// The text of the comment + /// [JsonPropertyName("comment")] public string Comment { get; set; } + /// + /// The ID of the comment + /// [JsonPropertyName("id")] public string ID { get; set; } + /// + /// The ID of the user who wrote the comment + /// [JsonPropertyName("user_id")] public string UserID { get; set; } + /// + /// The ID of the parent comment when this comment is a reply; omitted for top-level comments + /// + [JsonPropertyName("parent_id")] + public string? ParentID { get; set; } + /// + /// Attachments on the comment + /// [JsonPropertyName("attachments")] public List Attachments { get; set; } } @@ -20375,8 +20805,14 @@ public class OwnUserResponse public List BlockedUserIds { get; set; } [JsonPropertyName("latest_hidden_channels")] public List LatestHiddenChannels { get; set; } + /// + /// The privacy settings of the user. + /// [JsonPropertyName("privacy_settings")] public PrivacySettingsResponse? PrivacySettings { get; set; } + /// + /// The push preference details. + /// [JsonPropertyName("push_preferences")] public PushPreferencesResponse? PushPreferences { get; set; } [JsonPropertyName("teams_role")] @@ -21348,10 +21784,19 @@ public class PredefinedFilterStatsResponse public class PrivacySettingsResponse { + /// + /// The settings for the delivery receipt events. + /// [JsonPropertyName("delivery_receipts")] public DeliveryReceiptsResponse? DeliveryReceipts { get; set; } + /// + /// The settings for the read receipt events. + /// [JsonPropertyName("read_receipts")] public ReadReceiptsResponse? ReadReceipts { get; set; } + /// + /// The settings for typing indicator events. + /// [JsonPropertyName("typing_indicators")] public TypingIndicatorsResponse? TypingIndicators { get; set; } } @@ -21555,8 +22000,14 @@ public class PushPreferencesResponse { [JsonPropertyName("call_level")] public string? CallLevel { get; set; } + /// + /// The scope level of the push notifications. + /// [JsonPropertyName("chat_level")] public string? ChatLevel { get; set; } + /// + /// If provided the notifications will be disabled until the set date. + /// [JsonPropertyName("disabled_until")] public DateTime? DisabledUntil { get; set; } [JsonPropertyName("feeds_level")] @@ -21830,10 +22281,15 @@ public class QueryActivitiesRequest /// [JsonPropertyName("include_expired_activities")] public bool? IncludeExpiredActivities { get; set; } + /// + /// When true, include activities hidden by moderation (shadowed or removed). Server-side only; not allowed when a user is set. + /// + [JsonPropertyName("include_moderated_activities")] + public bool? IncludeModeratedActivities { get; set; } [JsonPropertyName("include_private_activities")] public bool? IncludePrivateActivities { get; set; } /// - /// When true, include soft-deleted activities in the result. + /// When true, include soft-deleted activities in the result. Server-side only; not allowed when a user is set. /// [JsonPropertyName("include_soft_deleted_activities")] public bool? IncludeSoftDeletedActivities { get; set; } @@ -22251,6 +22707,59 @@ public class QueryCallParticipantsResponse public CallResponse Call { get; set; } } + public class QueryCallRingAttemptsRequest + { + /// + /// Call ID + /// + [JsonPropertyName("id")] + public string ID { get; set; } + /// + /// The type of call + /// + [JsonPropertyName("type")] + public string Type { get; set; } + /// + /// Limit the attempts to one call session; omit to read every session of the call + /// + [JsonPropertyName("call_session_id")] + public string? CallSessionID { get; set; } + } + + public class QueryCallRingAttemptsResponse + { + /// + /// The ID of the call the attempts belong to + /// + [JsonPropertyName("call_id")] + public string CallID { get; set; } + /// + /// The type of the call the attempts belong to + /// + [JsonPropertyName("call_type")] + public string CallType { get; set; } + /// + /// The number of attempts returned + /// + [JsonPropertyName("count")] + public int Count { get; set; } + /// + /// Duration of the request in milliseconds + /// + [JsonPropertyName("duration")] + public string Duration { get; set; } + /// + /// The attempts, newest first + /// + [JsonPropertyName("ring_attempts")] + public List RingAttempts { get; set; } + /// + /// The call session the attempts were limited to, null when every session was read + /// + [JsonPropertyName("call_session_id")] + public string? CallSessionID { get; set; } + } + public class QueryCallSessionParticipantStatsResponse { [JsonPropertyName("call_id")] @@ -22649,6 +23158,11 @@ public class QueryCommentsRequest [JsonPropertyName("id_around")] public string? IDAround { get; set; } /// + /// When true, include soft-deleted comments in the result. Server-side only, and requires an object_id filter. Covers comments removed via deleteComment and via soft user-data deletion. Moderation-actioned comments (removed, hidden, shadow_blocked) remain excluded, as are comments whose parent activity is itself deleted. + /// + [JsonPropertyName("include_soft_deleted_comments")] + public bool? IncludeSoftDeletedComments { get; set; } + /// /// Maximum number of comments to return /// [JsonPropertyName("limit")] @@ -23406,12 +23920,29 @@ public class QueryPinnedActivitiesRequest { [JsonPropertyName("enrich_own_fields")] public bool? EnrichOwnFields { get; set; } + /// + /// When true, return pinned activities even if they have expired. Server-side only; not allowed when a user is set. + /// + [JsonPropertyName("include_expired_activities")] + public bool? IncludeExpiredActivities { get; set; } + /// + /// When true, return pinned activities even if moderation hides them (shadowed or removed). Server-side only; not allowed when a user is set. + /// + [JsonPropertyName("include_moderated_activities")] + public bool? IncludeModeratedActivities { get; set; } + /// + /// When true, return pinned activities even if they are soft-deleted. Server-side only; not allowed when a user is set. + /// + [JsonPropertyName("include_soft_deleted_activities")] + public bool? IncludeSoftDeletedActivities { get; set; } [JsonPropertyName("limit")] public int? Limit { get; set; } [JsonPropertyName("next")] public string? Next { get; set; } [JsonPropertyName("prev")] public string? Prev { get; set; } + [JsonPropertyName("user_id")] + public string? UserID { get; set; } /// /// Sorting parameters for the query /// @@ -23422,6 +23953,11 @@ public class QueryPinnedActivitiesRequest /// [JsonPropertyName("filter")] public object Filter { get; set; } + /// + /// User request object + /// + [JsonPropertyName("user")] + public UserRequest? User { get; set; } } public class QueryPinnedActivitiesResponse @@ -24098,6 +24634,11 @@ public class RankingConfig [JsonPropertyName("type")] public string Type { get; set; } /// + /// Activities scoring strictly below this value are dropped from the ranked feed. Not supported on aggregated feeds + /// + [JsonPropertyName("exclude_below")] + public double? ExcludeBelow { get; set; } + /// /// Scoring formula. Required when type is 'expression' or 'interest' /// [JsonPropertyName("score")] @@ -25319,6 +25860,8 @@ public class ReviewQueueItemResponse public double? ConfidenceScore { get; set; } [JsonPropertyName("config_key")] public string? ConfigKey { get; set; } + [JsonPropertyName("country_code")] + public string? CountryCode { get; set; } /// /// ID of who created the entity /// @@ -25374,6 +25917,8 @@ public class ReviewQueueItemResponse /// [JsonPropertyName("moderation_payload")] public ModerationPayloadResponse? ModerationPayload { get; set; } + [JsonPropertyName("poll")] + public PollResponseData? Poll { get; set; } [JsonPropertyName("reaction")] public Reaction? Reaction { get; set; } } @@ -25419,6 +25964,85 @@ public class RevisionHistoryResponse public object PreviousObjSerialized { get; set; } } + public class RingAttemptResponse + { + /// + /// The application this ring belongs to + /// + [JsonPropertyName("app_pk")] + public int AppPk { get; set; } + /// + /// The ID of the call that was rung + /// + [JsonPropertyName("call_id")] + public string CallID { get; set; } + /// + /// The type of the call that was rung + /// + [JsonPropertyName("call_type")] + public string CallType { get; set; } + /// + /// When the ring went out + /// + [JsonPropertyName("created_at")] + public DateTime CreatedAt { get; set; } + /// + /// When the ring expires, i.e. when the missed call deadline fires + /// + [JsonPropertyName("expires_at")] + public DateTime ExpiresAt { get; set; } + /// + /// The user that started the ring + /// + [JsonPropertyName("initiated_by")] + public string InitiatedBy { get; set; } + /// + /// The derived outcome: ringing, answered_some, answered_all, rejected_all, missed_all, cancelled or mixed + /// + [JsonPropertyName("outcome")] + public string Outcome { get; set; } + /// + /// The ring, as published in the ring_id of the call.ring event + /// + [JsonPropertyName("ring_id")] + public string RingID { get; set; } + /// + /// The call session that was rung + /// + [JsonPropertyName("session_id")] + public string SessionID { get; set; } + /// + /// Why the ring settled: answered, rejected, cancel, timeout, ended or auto_end; empty while it is still ringing + /// + [JsonPropertyName("settle_reason")] + public string SettleReason { get; set; } + /// + /// The user that settled the ring, or 'server'; empty while it is still ringing + /// + [JsonPropertyName("settled_by")] + public string SettledBy { get; set; } + /// + /// Opaque context stored on the ring by the caller + /// + [JsonPropertyName("custom")] + public object Custom { get; set; } + /// + /// The rung users, keyed by user ID + /// + [JsonPropertyName("targets")] + public Dictionary Targets { get; set; } + /// + /// When the ring was deleted + /// + [JsonPropertyName("deleted_at")] + public DateTime? DeletedAt { get; set; } + /// + /// When the outcome left ringing + /// + [JsonPropertyName("settled_at")] + public DateTime? SettledAt { get; set; } + } + public class RingCallRequest { /// @@ -25454,6 +26078,45 @@ public class RingCallResponse public string? RingID { get; set; } } + public class RingDeliveryResponse + { + /// + /// The transport the ring was dispatched over: ws, apns_voip, apns or fcm + /// + [JsonPropertyName("channel")] + public string Channel { get; set; } + /// + /// When the ring was dispatched + /// + [JsonPropertyName("sent_at")] + public DateTime SentAt { get; set; } + /// + /// When the device acknowledged the ring; not populated yet + /// + [JsonPropertyName("acked_at")] + public DateTime? AckedAt { get; set; } + /// + /// The device the ring was dispatched to, empty for websocket deliveries which fan out to every connection + /// + [JsonPropertyName("device_id")] + public string? DeviceID { get; set; } + /// + /// When the device displayed the ring; not populated yet + /// + [JsonPropertyName("displayed_at")] + public DateTime? DisplayedAt { get; set; } + /// + /// When the device fetched the call; not populated yet + /// + [JsonPropertyName("fetched_at")] + public DateTime? FetchedAt { get; set; } + /// + /// When the push provider accepted the dispatch; not populated yet + /// + [JsonPropertyName("provider_accepted_at")] + public DateTime? ProviderAcceptedAt { get; set; } + } + public class RingSettings { [JsonPropertyName("auto_cancel_timeout_ms")] @@ -25493,6 +26156,40 @@ public class RingSettingsResponse public int MissedCallTimeoutMs { get; set; } } + public class RingSettledTarget + { + [JsonPropertyName("state")] + public string State { get; set; } + [JsonPropertyName("state_at")] + public DateTime StateAt { get; set; } + [JsonPropertyName("reason")] + public string? Reason { get; set; } + } + + public class RingTargetResponse + { + /// + /// The reject or cancel reason, empty otherwise + /// + [JsonPropertyName("reason")] + public string Reason { get; set; } + /// + /// The target's state for this ring: pending, accepted, rejected, missed or cancelled + /// + [JsonPropertyName("state")] + public string State { get; set; } + /// + /// When the target last changed state + /// + [JsonPropertyName("state_at")] + public DateTime StateAt { get; set; } + /// + /// The dispatches of this ring to the target's devices + /// + [JsonPropertyName("deliveries")] + public List Deliveries { get; set; } + } + public class Role { /// @@ -25556,6 +26253,8 @@ public class RuleBuilderCondition public ClosedCaptionRuleParameters? ClosedCaptionRuleParams { get; set; } [JsonPropertyName("content_count_rule_params")] public ContentCountRuleParameters? ContentCountRuleParams { get; set; } + [JsonPropertyName("content_country_code_params")] + public ContentCountryCodeParameters? ContentCountryCodeParams { get; set; } [JsonPropertyName("content_custom_property_count_params")] public ContentCustomPropertyCountParameters? ContentCustomPropertyCountParams { get; set; } [JsonPropertyName("content_custom_property_params")] @@ -25570,6 +26269,11 @@ public class RuleBuilderCondition public ImageContentParameters? ImageContentParams { get; set; } [JsonPropertyName("image_rule_params")] public ImageRuleParameters? ImageRuleParams { get; set; } + /// + /// intent_rule params: policy intent topic label and the minimum final score (1-100) that fires the condition + /// + [JsonPropertyName("intent_rule_params")] + public IntentRuleParameters? IntentRuleParams { get; set; } [JsonPropertyName("ip_content_count_rule_params")] public IPContentCountRuleParameters? IpContentCountRuleParams { get; set; } [JsonPropertyName("ip_flag_count_rule_params")] @@ -25584,6 +26288,8 @@ public class RuleBuilderCondition public TextContentParameters? TextContentParams { get; set; } [JsonPropertyName("text_rule_params")] public TextRuleParameters? TextRuleParams { get; set; } + [JsonPropertyName("user_channel_ban_count_params")] + public UserChannelBanCountRuleParameters? UserChannelBanCountParams { get; set; } [JsonPropertyName("user_channel_count_params")] public UserChannelCountRuleParameters? UserChannelCountParams { get; set; } [JsonPropertyName("user_created_within_params")] @@ -26717,6 +27423,8 @@ public class SetFeedsRetentionPolicyRequest public string Policy { get; set; } [JsonPropertyName("enabled")] public bool? Enabled { get; set; } + [JsonPropertyName("feed_groups")] + public List FeedGroups { get; set; } } public class SetFeedsRetentionPolicyResponse @@ -26729,7 +27437,7 @@ public class SetFeedsRetentionPolicyResponse [JsonPropertyName("enabled")] public bool Enabled { get; set; } [JsonPropertyName("policy")] - public RetentionPolicy Policy { get; set; } + public FeedsRetentionPolicy Policy { get; set; } } public class SetRetentionPolicyRequest @@ -26870,22 +27578,50 @@ public class SharedLocationResponse public class SharedLocationResponseData { + /// + /// The CID (type:id) of the channel that the location is attached to. + /// [JsonPropertyName("channel_cid")] public string ChannelCid { get; set; } + /// + /// The date when the location was created. + /// [JsonPropertyName("created_at")] public DateTime CreatedAt { get; set; } + /// + /// The ID of the device that created the location. + /// [JsonPropertyName("created_by_device_id")] public string CreatedByDeviceID { get; set; } + /// + /// The latitude of the location. + /// [JsonPropertyName("latitude")] public double Latitude { get; set; } + /// + /// The longitude of the location. + /// [JsonPropertyName("longitude")] public double Longitude { get; set; } + /// + /// The ID of the message that the location is attached to. + /// [JsonPropertyName("message_id")] public string MessageID { get; set; } + /// + /// The date when the location was updated. + /// [JsonPropertyName("updated_at")] public DateTime UpdatedAt { get; set; } + /// + /// The ID of the user that created the location. + /// [JsonPropertyName("user_id")] public string UserID { get; set; } + /// + /// The date when the location sharing ends. + /// If it's empty, it means the location sharing is static instead of live. + /// [JsonPropertyName("end_at")] public DateTime? EndAt { get; set; } /// @@ -27368,7 +28104,7 @@ public class StoriesFeedUpdatedEvent public class SubmitActionRequest { /// - /// Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate + /// Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, delete_poll, delete_poll_option, delete_poll_answer, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate /// [JsonPropertyName("action_type")] public string ActionType { get; set; } @@ -27417,6 +28153,21 @@ public class SubmitActionRequest [JsonPropertyName("delete_message")] public DeleteMessageRequestPayload? DeleteMessage { get; set; } /// + /// Configuration for poll deletion action. Poll deletion is always permanent. + /// + [JsonPropertyName("delete_poll")] + public DeletePollRequestPayload? DeletePoll { get; set; } + /// + /// Configuration for deleting the free-text poll answer a review item was raised for. Chat polls only. Deletion is permanent; the poll and other votes are kept. + /// + [JsonPropertyName("delete_poll_answer")] + public DeletePollAnswerRequestPayload? DeletePollAnswer { get; set; } + /// + /// Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept. + /// + [JsonPropertyName("delete_poll_option")] + public DeletePollOptionRequestPayload? DeletePollOption { get; set; } + /// /// Configuration for reaction deletion action /// [JsonPropertyName("delete_reaction")] @@ -27985,6 +28736,8 @@ public class ThreadedCommentResponse public DateTime CreatedAt { get; set; } [JsonPropertyName("downvote_count")] public int DownvoteCount { get; set; } + [JsonPropertyName("hidden")] + public bool Hidden { get; set; } [JsonPropertyName("id")] public string ID { get; set; } [JsonPropertyName("object_id")] @@ -28542,6 +29295,11 @@ public class UnfollowBatchRequest [JsonPropertyName("follows")] public List Follows { get; set; } /// + /// If true, the batch is queued as a background task, paced per app, and the response has empty follows and a task_id. Server-side only. Supported by the get-or-create endpoint (GetOrCreateUnfollows); UnfollowBatch rejects it. Async batches can apply out of order with other follow writes. Defaults to false. + /// + [JsonPropertyName("async")] + public bool? Async { get; set; } + /// /// Whether to delete the corresponding notification activity (default: false) /// [JsonPropertyName("delete_notification_activity")] @@ -28562,6 +29320,11 @@ public class UnfollowBatchResponse /// [JsonPropertyName("follows")] public List Follows { get; set; } + /// + /// ID of the background task when the request was sent with async: true + /// + [JsonPropertyName("task_id")] + public string? TaskID { get; set; } } public class UnfollowPair @@ -28699,20 +29462,38 @@ public class UnreadCountsBatchResponse public class UnreadCountsChannel { + /// + /// The channel CID (type:id). + /// [JsonPropertyName("channel_id")] public string ChannelID { get; set; } + /// + /// The date which the current user last read the channel. + /// [JsonPropertyName("last_read")] public DateTime LastRead { get; set; } + /// + /// The number of unread messages inside the channel. + /// [JsonPropertyName("unread_count")] public int UnreadCount { get; set; } } public class UnreadCountsChannelType { + /// + /// The number of unread channels of this channel type. + /// [JsonPropertyName("channel_count")] public int ChannelCount { get; set; } + /// + /// The channel type. + /// [JsonPropertyName("channel_type")] public string ChannelType { get; set; } + /// + /// The number of unread messages of all the channels with this type. + /// [JsonPropertyName("unread_count")] public int UnreadCount { get; set; } } @@ -28735,12 +29516,24 @@ public class UnreadCountsResponse public class UnreadCountsThread { + /// + /// The date which the current user last read the thread. + /// [JsonPropertyName("last_read")] public DateTime LastRead { get; set; } + /// + /// The id of the last reply which the current user read in the thread. + /// [JsonPropertyName("last_read_message_id")] public string LastReadMessageID { get; set; } + /// + /// The message id of the root of the thread. + /// [JsonPropertyName("parent_message_id")] public string ParentMessageID { get; set; } + /// + /// The number of unread replies inside the thread. + /// [JsonPropertyName("unread_count")] public int UnreadCount { get; set; } } @@ -30367,6 +31160,16 @@ public class UpdatePollOptionRequest /// [JsonPropertyName("text")] public string Text { get; set; } + /// + /// Key of the moderation configuration to use. Server-side only. + /// + [JsonPropertyName("config_key")] + public string? ConfigKey { get; set; } + /// + /// Team associated with the configuration. Server-side only. + /// + [JsonPropertyName("config_team")] + public string? ConfigTeam { get; set; } [JsonPropertyName("user_id")] public string? UserID { get; set; } /// @@ -30383,6 +31186,16 @@ public class UpdatePollOptionRequest public class UpdatePollPartialRequest { + /// + /// Key of the moderation configuration to use. Server-side only. + /// + [JsonPropertyName("config_key")] + public string? ConfigKey { get; set; } + /// + /// Team associated with the configuration. Server-side only. + /// + [JsonPropertyName("config_team")] + public string? ConfigTeam { get; set; } [JsonPropertyName("user_id")] public string? UserID { get; set; } /// @@ -30425,6 +31238,16 @@ public class UpdatePollRequest [JsonPropertyName("allow_user_suggested_options")] public bool? AllowUserSuggestedOptions { get; set; } /// + /// Key of the moderation configuration to use. Server-side only. + /// + [JsonPropertyName("config_key")] + public string? ConfigKey { get; set; } + /// + /// Team associated with the configuration. Server-side only. + /// + [JsonPropertyName("config_team")] + public string? ConfigTeam { get; set; } + /// /// Poll description /// [JsonPropertyName("description")] @@ -30989,6 +31812,11 @@ public class UpsertActivitiesRequest /// [JsonPropertyName("force_moderation")] public bool? ForceModeration { get; set; } + /// + /// Server-side only. If true, activities whose id already exists are left unchanged instead of updated: no write, events or notifications. They are listed in skipped_existing and returned as stored. Soft-deleted activities count as existing and are returned with deleted_at set. Default: false. + /// + [JsonPropertyName("skip_existing")] + public bool? SkipExisting { get; set; } } public class UpsertActivitiesResponse @@ -31005,6 +31833,11 @@ public class UpsertActivitiesResponse /// [JsonPropertyName("mention_notifications_created")] public int? MentionNotificationsCreated { get; set; } + /// + /// IDs of activities left unchanged because they already existed. Only set when skip_existing is true. + /// + [JsonPropertyName("skipped_existing")] + public List SkippedExisting { get; set; } } public class UpsertCollectionsRequest @@ -31471,6 +32304,16 @@ public class UserBannedEvent public UserResponseCommonFields? CreatedBy { get; set; } } + public class UserChannelBanCountRuleParameters + { + [JsonPropertyName("banned_by")] + public string? BannedBy { get; set; } + [JsonPropertyName("threshold")] + public int? Threshold { get; set; } + [JsonPropertyName("time_window")] + public string? TimeWindow { get; set; } + } + public class UserChannelCountRuleParameters { [JsonPropertyName("threshold")] @@ -32028,6 +32871,9 @@ public class UserRequest /// [JsonPropertyName("custom")] public object Custom { get; set; } + /// + /// The privacy settings of the user. + /// [JsonPropertyName("privacy_settings")] public PrivacySettingsResponse? PrivacySettings { get; set; } /// @@ -32134,6 +32980,9 @@ public class UserResponse /// [JsonPropertyName("devices")] public List Devices { get; set; } + /// + /// The privacy settings of the user. + /// [JsonPropertyName("privacy_settings")] public PrivacySettingsResponse? PrivacySettings { get; set; } [JsonPropertyName("push_notifications")] @@ -32220,6 +33069,9 @@ public class UserResponsePrivacyFields public string? Name { get; set; } [JsonPropertyName("revoke_tokens_issued_before")] public DateTime? RevokeTokensIssuedBefore { get; set; } + /// + /// The privacy settings of the user. + /// [JsonPropertyName("privacy_settings")] public PrivacySettingsResponse? PrivacySettings { get; set; } [JsonPropertyName("teams_role")] @@ -32606,6 +33458,9 @@ public class WSEvent public string? UserID { get; set; } [JsonPropertyName("watcher_count")] public int? WatcherCount { get; set; } + /// + /// Response from AI moderation + /// [JsonPropertyName("automoderation_scores")] public ModerationResponse? AutomoderationScores { get; set; } /// @@ -32675,16 +33530,34 @@ public class WrappedUnreadCountsResponse /// [JsonPropertyName("duration")] public string Duration { get; set; } + /// + /// The total number of unread messages. + /// [JsonPropertyName("total_unread_count")] public int TotalUnreadCount { get; set; } + /// + /// The total number of unread threads. + /// [JsonPropertyName("total_unread_threads_count")] public int TotalUnreadThreadsCount { get; set; } + /// + /// The unread information per channel type. + /// [JsonPropertyName("channel_type")] public List ChannelType { get; set; } + /// + /// The unread information per channel. + /// [JsonPropertyName("channels")] public List Channels { get; set; } + /// + /// The unread information per thread. + /// [JsonPropertyName("threads")] public List Threads { get; set; } + /// + /// The total number of unread messages grouped by team. + /// [JsonPropertyName("total_unread_count_by_team")] public Dictionary TotalUnreadCountByTeam { get; set; } } diff --git a/tests/FeedTests.cs b/tests/FeedTests.cs index caba895..b26b3e1 100644 --- a/tests/FeedTests.cs +++ b/tests/FeedTests.cs @@ -1589,6 +1589,42 @@ public async Task UpdateCommentAsync_ShouldCallCorrectEndpoint() It.IsAny()), Times.Once); } [Test] + public async Task CommentFeedbackAsync_ShouldCallCorrectEndpoint() + { + // Arrange + var request = new CommentFeedbackRequest(); + var id = "test-id"; + + var expectedResponse = new StreamResponse + { + Data = new CommentFeedbackResponse() + }; + + _mockClient.Setup(x => x.MakeRequestAsync( + It.IsAny(), + It.IsAny(), + It.IsAny>(), + It.IsAny(), + It.IsAny>(), + It.IsAny())) + .ReturnsAsync(expectedResponse); + + // Act + var result = await _client.CommentFeedbackAsync(id, request); + + // Assert + Assert.That(result, Is.Not.Null); + Assert.That(result, Is.EqualTo(expectedResponse)); + + _mockClient.Verify(x => x.MakeRequestAsync( + "POST", + "/api/v2/feeds/comments/{id}/feedback", + It.IsAny>(), + It.IsAny(), + It.IsAny>(), + It.IsAny()), Times.Once); + } + [Test] public async Task UpdateCommentPartialAsync_ShouldCallCorrectEndpoint() { // Arrange diff --git a/tests/WebhookTests.cs b/tests/WebhookTests.cs index f6bfc96..77b94e2 100644 --- a/tests/WebhookTests.cs +++ b/tests/WebhookTests.cs @@ -401,6 +401,14 @@ public void ParseWebhookEvent_CallRing_ReturnsCorrectType() Assert.That(result, Is.InstanceOf()); } + [Test] + public void ParseWebhookEvent_CallRingSettled_ReturnsCorrectType() + { + var payload = "{\"type\":\"call.ring_settled\"}"; + var result = Webhook.ParseWebhookEvent(payload); + Assert.That(result, Is.InstanceOf()); + } + [Test] public void ParseWebhookEvent_CallRTMPBroadcastFailed_ReturnsCorrectType() { @@ -697,6 +705,22 @@ public void ParseWebhookEvent_ExportChannelsSuccess_ReturnsCorrectType() Assert.That(result, Is.InstanceOf()); } + [Test] + public void ParseWebhookEvent_ExportLabelResultsError_ReturnsCorrectType() + { + var payload = "{\"type\":\"export.label_results.error\"}"; + var result = Webhook.ParseWebhookEvent(payload); + Assert.That(result, Is.InstanceOf()); + } + + [Test] + public void ParseWebhookEvent_ExportLabelResultsSuccess_ReturnsCorrectType() + { + var payload = "{\"type\":\"export.label_results.success\"}"; + var result = Webhook.ParseWebhookEvent(payload); + Assert.That(result, Is.InstanceOf()); + } + [Test] public void ParseWebhookEvent_ExportModerationLogsError_ReturnsCorrectType() { @@ -897,6 +921,14 @@ public void ParseWebhookEvent_FeedsCommentDeleted_ReturnsCorrectType() Assert.That(result, Is.InstanceOf()); } + [Test] + public void ParseWebhookEvent_FeedsCommentFeedback_ReturnsCorrectType() + { + var payload = "{\"type\":\"feeds.comment.feedback\"}"; + var result = Webhook.ParseWebhookEvent(payload); + Assert.That(result, Is.InstanceOf()); + } + [Test] public void ParseWebhookEvent_FeedsCommentReactionAdded_ReturnsCorrectType() { @@ -1217,14 +1249,6 @@ public void ParseWebhookEvent_ModerationImageAnalysisComplete_ReturnsCorrectType Assert.That(result, Is.InstanceOf()); } - [Test] - public void ParseWebhookEvent_ModerationIntentDetected_ReturnsCorrectType() - { - var payload = "{\"type\":\"moderation.intent_detected\"}"; - var result = Webhook.ParseWebhookEvent(payload); - Assert.That(result, Is.InstanceOf()); - } - [Test] public void ParseWebhookEvent_ModerationMarkReviewed_ReturnsCorrectType() {