getstream

package module
v5.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: BSD-3-Clause Imports: 26 Imported by: 0

README ΒΆ

Official Go SDK for Stream

Build Status Go Report Card Godoc GitHub release Go Version codecov

Official Go API client for Stream Chat and Video, a service for building chat and video applications.
Explore the docs Β»

Report Bug Β· Request Feature

Migrating from stream-chat-go?

If you are currently using stream-chat-go, we have a detailed migration guide with side-by-side code examples for common Chat use cases. See the Migration Guide.

Upgrading from an older major?

  • v4 β†’ v5: new import path, four removed response fields, CheckResponse no longer comparable.
  • v3 β†’ v4: OpenAPI-aligned type renaming.

What is Stream?

Stream allows developers to rapidly deploy scalable feeds, chat messaging and video with an industry leading 99.999% uptime SLA guarantee.

Stream provides UI components and state handling that make it easy to build video calling for your app. All calls run on Stream's network of edge servers around the world, ensuring optimal latency and reliability.

πŸ‘©β€πŸ’» Free for Makers πŸ‘¨β€πŸ’»

Stream is free for most side and hobby projects. To qualify, your project/company needs to have < 5 team members and < $10k in monthly revenue. Makers get $100 in monthly credit for video for free.

😎 Repo Overview 😎

This repo contains the Golang server-side SDK developed by the team and Stream community. For a feature overview please visit our roadmap.

πŸͺ΅ Logging

The client accepts a custom logger via WithLogger (any type implementing the Logger interface: Debug/Info/Warn/Error). Without one, it falls back to a stderr logger at INFO level, so per-request DEBUG events are silent by default; inject a logger with DEBUG enabled to see them.

Four structured events are emitted: client.initialized (INFO, once at construction, with SDK name/version and connection-pool settings), http.request.sent (DEBUG, before each request), http.response.received (DEBUG, after any response including 4xx/5xx, status codes are just data on this event), and http.request.failed (ERROR, transport-layer failures only, e.g. connection reset, timeout, DNS, TLS, when no HTTP response was received at all).

Security: these events never log HTTP headers (so Authorization is never written to logs), and known-secret values are always redacted regardless of logger: query parameters api_key, api_secret, and token become <redacted>, and top-level JSON body keys api_secret, token, and password become <redacted>. Request/response bodies are not logged by default. Opt in with WithLogBodies(true) if you need them for debugging, this logs a one-time WARN on construction because other sensitive data (message content, PII) may still appear in bodies even with the known-secret keys redacted.

πŸ” Retry

Auto-retry is opt-in and off by default: the client performs exactly one attempt and surfaces errors unchanged unless you enable it with WithRetry:

client, err := stream.NewClient(apiKey, apiSecret,
    stream.WithRetry(stream.RetryConfig{Enabled: true, MaxAttempts: 3, MaxBackoff: 30 * time.Second}),
)

MaxAttempts (default 3) is the total attempt budget including the initial request; MaxBackoff (default 30s) caps every wait between attempts, including Retry-After hints from the server. Only GET/HEAD requests are retried, and only on HTTP 429 (rate limited) or a transport-layer failure (connection reset, timeout, DNS, TLS) β€” never on other 4xx/5xx responses, never on writes, and never when the backend marks the error unrecoverable. Waits use exponential backoff with full jitter (base 1s) unless the server sent a Retry-After header, which takes priority (clamped to MaxBackoff). A retried attempt logs http.request.failed at DEBUG with a retry.attempt field; a final (non-retried) transport failure still logs it at ERROR as before.

✍️ Contributing

We welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our Contributor License Agreement (CLA) first. See our license file for more details.

Head over to CONTRIBUTING.md for some development tips.

Generate Code from Spec

To regenerate the Go source from OpenAPI, just run the ./generate.sh script from this repo.

Note Code generation currently relies on tooling that is not publicly available. Only Stream developers can regenerate SDK source code from the OpenAPI spec.

πŸ§‘β€πŸ’» We Are Hiring!

We've recently closed a $38 million Series B funding round and we keep actively growing. Our APIs are used by more than a billion end-users, and you'll have a chance to make a huge impact on the product within a team of the strongest engineers all over the world.

Check out our current openings and apply via Stream's website.

Documentation ΒΆ

Overview ΒΆ

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

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

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

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

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

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

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

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

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

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

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

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

Index ΒΆ

Examples ΒΆ

Constants ΒΆ

View Source
const (
	EnvStreamApiKey      = "STREAM_API_KEY"
	EnvStreamApiSecret   = "STREAM_API_SECRET"
	EnvStreamBaseUrl     = "STREAM_BASE_URL"
	EnvStreamHttpTimeout = "STREAM_HTTP_TIMEOUT"
)
View Source
const (
	ErrorTypeConnectionReset = "connection_reset"
	ErrorTypeTimeout         = "timeout"
	ErrorTypeDNSFailure      = "dns_failure"
	ErrorTypeTLSHandshake    = "tls_handshake_failed"
	ErrorTypeUnknown         = "unknown"
)

Transport-error subtype values populated on StreamError.ErrorType when the sentinel is ErrTransport.

View Source
const (
	HeaderRateLimit     = "X-Ratelimit-Limit"
	HeaderRateRemaining = "X-Ratelimit-Remaining"
	HeaderRateReset     = "X-Ratelimit-Reset"
)
View Source
const (
	EventTypeWildcard                           = "*"
	EventTypeAppealAccepted                     = "appeal.accepted"
	EventTypeAppealCreated                      = "appeal.created"
	EventTypeAppealRejected                     = "appeal.rejected"
	EventTypeCallAccepted                       = "call.accepted"
	EventTypeCallBlockedUser                    = "call.blocked_user"
	EventTypeCallClosedCaption                  = "call.closed_caption"
	EventTypeCallClosedCaptionsFailed           = "call.closed_captions_failed"
	EventTypeCallClosedCaptionsStarted          = "call.closed_captions_started"
	EventTypeCallClosedCaptionsStopped          = "call.closed_captions_stopped"
	EventTypeCallCreated                        = "call.created"
	EventTypeCallDeleted                        = "call.deleted"
	EventTypeCallDtmf                           = "call.dtmf"
	EventTypeCallEnded                          = "call.ended"
	EventTypeCallFrameRecordingFailed           = "call.frame_recording_failed"
	EventTypeCallFrameRecordingReady            = "call.frame_recording_ready"
	EventTypeCallFrameRecordingStarted          = "call.frame_recording_started"
	EventTypeCallFrameRecordingStopped          = "call.frame_recording_stopped"
	EventTypeCallHLSBroadcastingFailed          = "call.hls_broadcasting_failed"
	EventTypeCallHLSBroadcastingStarted         = "call.hls_broadcasting_started"
	EventTypeCallHLSBroadcastingStopped         = "call.hls_broadcasting_stopped"
	EventTypeCallKickedUser                     = "call.kicked_user"
	EventTypeCallLiveStarted                    = "call.live_started"
	EventTypeCallMemberAdded                    = "call.member_added"
	EventTypeCallMemberRemoved                  = "call.member_removed"
	EventTypeCallMemberUpdated                  = "call.member_updated"
	EventTypeCallMemberUpdatedPermission        = "call.member_updated_permission"
	EventTypeCallMissed                         = "call.missed"
	EventTypeCallModerationBlur                 = "call.moderation_blur"
	EventTypeCallModerationWarning              = "call.moderation_warning"
	EventTypeCallNotification                   = "call.notification"
	EventTypeCallPermissionRequest              = "call.permission_request"
	EventTypeCallPermissionsUpdated             = "call.permissions_updated"
	EventTypeCallReactionNew                    = "call.reaction_new"
	EventTypeCallRecordingFailed                = "call.recording_failed"
	EventTypeCallRecordingReady                 = "call.recording_ready"
	EventTypeCallRecordingStarted               = "call.recording_started"
	EventTypeCallRecordingStopped               = "call.recording_stopped"
	EventTypeCallRejected                       = "call.rejected"
	EventTypeCallRing                           = "call.ring"
	EventTypeCallRTMPBroadcastFailed            = "call.rtmp_broadcast_failed"
	EventTypeCallRTMPBroadcastStarted           = "call.rtmp_broadcast_started"
	EventTypeCallRTMPBroadcastStopped           = "call.rtmp_broadcast_stopped"
	EventTypeCallSessionEnded                   = "call.session_ended"
	EventTypeCallSessionParticipantCountUpdated = "call.session_participant_count_updated"
	EventTypeCallSessionParticipantJoined       = "call.session_participant_joined"
	EventTypeCallSessionParticipantLeft         = "call.session_participant_left"
	EventTypeCallSessionStarted                 = "call.session_started"
	EventTypeCallStatsReportReady               = "call.stats_report_ready"
	EventTypeCallTranscriptionFailed            = "call.transcription_failed"
	EventTypeCallTranscriptionReady             = "call.transcription_ready"
	EventTypeCallTranscriptionStarted           = "call.transcription_started"
	EventTypeCallTranscriptionStopped           = "call.transcription_stopped"
	EventTypeCallUnblockedUser                  = "call.unblocked_user"
	EventTypeCallUpdated                        = "call.updated"
	EventTypeCallUserFeedbackSubmitted          = "call.user_feedback_submitted"
	EventTypeCallUserMuted                      = "call.user_muted"
	EventTypeCampaignCompleted                  = "campaign.completed"
	EventTypeCampaignStarted                    = "campaign.started"
	EventTypeChannelCreated                     = "channel.created"
	EventTypeChannelDeleted                     = "channel.deleted"
	EventTypeChannelFrozen                      = "channel.frozen"
	EventTypeChannelHidden                      = "channel.hidden"
	EventTypeChannelMaxStreakChanged            = "channel.max_streak_changed"
	EventTypeChannelMuted                       = "channel.muted"
	EventTypeChannelTruncated                   = "channel.truncated"
	EventTypeChannelUnfrozen                    = "channel.unfrozen"
	EventTypeChannelUnmuted                     = "channel.unmuted"
	EventTypeChannelUpdated                     = "channel.updated"
	EventTypeChannelVisible                     = "channel.visible"
	EventTypeChannelBatchUpdateCompleted        = "channel_batch_update.completed"
	EventTypeChannelBatchUpdateStarted          = "channel_batch_update.started"
	EventTypeCustom                             = "custom"
	EventTypeExportBulkImageModerationError     = "export.bulk_image_moderation.error"
	EventTypeExportBulkImageModerationSuccess   = "export.bulk_image_moderation.success"
	EventTypeExportChannelsError                = "export.channels.error"
	EventTypeExportChannelsSuccess              = "export.channels.success"
	EventTypeExportModerationLogsError          = "export.moderation_logs.error"
	EventTypeExportModerationLogsSuccess        = "export.moderation_logs.success"
	EventTypeExportReviewQueueError             = "export.review_queue.error"
	EventTypeExportReviewQueueSuccess           = "export.review_queue.success"
	EventTypeExportUsersError                   = "export.users.error"
	EventTypeExportUsersSuccess                 = "export.users.success"
	EventTypeFeedsActivityAdded                 = "feeds.activity.added"
	EventTypeFeedsActivityDeleted               = "feeds.activity.deleted"
	EventTypeFeedsActivityFeedback              = "feeds.activity.feedback"
	EventTypeFeedsActivityMarked                = "feeds.activity.marked"
	EventTypeFeedsActivityPinned                = "feeds.activity.pinned"
	EventTypeFeedsActivityReactionAdded         = "feeds.activity.reaction.added"
	EventTypeFeedsActivityReactionDeleted       = "feeds.activity.reaction.deleted"
	EventTypeFeedsActivityReactionUpdated       = "feeds.activity.reaction.updated"
	EventTypeFeedsActivityRemovedFromFeed       = "feeds.activity.removed_from_feed"
	EventTypeFeedsActivityRestored              = "feeds.activity.restored"
	EventTypeFeedsActivityUnpinned              = "feeds.activity.unpinned"
	EventTypeFeedsActivityUpdated               = "feeds.activity.updated"
	EventTypeFeedsBookmarkAdded                 = "feeds.bookmark.added"
	EventTypeFeedsBookmarkDeleted               = "feeds.bookmark.deleted"
	EventTypeFeedsBookmarkUpdated               = "feeds.bookmark.updated"
	EventTypeFeedsBookmarkFolderDeleted         = "feeds.bookmark_folder.deleted"
	EventTypeFeedsBookmarkFolderUpdated         = "feeds.bookmark_folder.updated"
	EventTypeFeedsCommentAdded                  = "feeds.comment.added"
	EventTypeFeedsCommentDeleted                = "feeds.comment.deleted"
	EventTypeFeedsCommentReactionAdded          = "feeds.comment.reaction.added"
	EventTypeFeedsCommentReactionDeleted        = "feeds.comment.reaction.deleted"
	EventTypeFeedsCommentReactionUpdated        = "feeds.comment.reaction.updated"
	EventTypeFeedsCommentRestored               = "feeds.comment.restored"
	EventTypeFeedsCommentUpdated                = "feeds.comment.updated"
	EventTypeFeedsFeedCreated                   = "feeds.feed.created"
	EventTypeFeedsFeedDeleted                   = "feeds.feed.deleted"
	EventTypeFeedsFeedUpdated                   = "feeds.feed.updated"
	EventTypeFeedsFeedGroupChanged              = "feeds.feed_group.changed"
	EventTypeFeedsFeedGroupDeleted              = "feeds.feed_group.deleted"
	EventTypeFeedsFeedGroupRestored             = "feeds.feed_group.restored"
	EventTypeFeedsFeedMemberAdded               = "feeds.feed_member.added"
	EventTypeFeedsFeedMemberRemoved             = "feeds.feed_member.removed"
	EventTypeFeedsFeedMemberUpdated             = "feeds.feed_member.updated"
	EventTypeFeedsFollowCreated                 = "feeds.follow.created"
	EventTypeFeedsFollowDeleted                 = "feeds.follow.deleted"
	EventTypeFeedsFollowUpdated                 = "feeds.follow.updated"
	EventTypeFeedsNotificationFeedUpdated       = "feeds.notification_feed.updated"
	EventTypeFeedsStoriesFeedUpdated            = "feeds.stories_feed.updated"
	EventTypeFlagUpdated                        = "flag.updated"
	EventTypeIngressError                       = "ingress.error"
	EventTypeIngressStarted                     = "ingress.started"
	EventTypeIngressStopped                     = "ingress.stopped"
	EventTypeMemberAdded                        = "member.added"
	EventTypeMemberRemoved                      = "member.removed"
	EventTypeMemberUpdated                      = "member.updated"
	EventTypeMessageDeleted                     = "message.deleted"
	EventTypeMessageFlagged                     = "message.flagged"
	EventTypeMessageNew                         = "message.new"
	EventTypeMessagePending                     = "message.pending"
	EventTypeMessageRead                        = "message.read"
	EventTypeMessageUnblocked                   = "message.unblocked"
	EventTypeMessageUndeleted                   = "message.undeleted"
	EventTypeMessageUpdated                     = "message.updated"
	EventTypeModerationAnalysisFailed           = "moderation.analysis.failed"
	EventTypeModerationCustomAction             = "moderation.custom_action"
	EventTypeModerationFlagged                  = "moderation.flagged"
	EventTypeModerationImageAnalysisComplete    = "moderation.image_analysis.complete"
	EventTypeModerationMarkReviewed             = "moderation.mark_reviewed"
	EventTypeModerationTextAnalysisComplete     = "moderation.text_analysis.complete"
	EventTypeModerationCheckCompleted           = "moderation_check.completed"
	EventTypeModerationRuleTriggered            = "moderation_rule.triggered"
	EventTypeNotificationMarkUnread             = "notification.mark_unread"
	EventTypeNotificationReminderDue            = "notification.reminder_due"
	EventTypeNotificationThreadMessageNew       = "notification.thread_message_new"
	EventTypeReactionDeleted                    = "reaction.deleted"
	EventTypeReactionNew                        = "reaction.new"
	EventTypeReactionUpdated                    = "reaction.updated"
	EventTypeReminderCreated                    = "reminder.created"
	EventTypeReminderDeleted                    = "reminder.deleted"
	EventTypeReminderUpdated                    = "reminder.updated"
	EventTypeReviewQueueItemNew                 = "review_queue_item.new"
	EventTypeReviewQueueItemUpdated             = "review_queue_item.updated"
	EventTypeThreadUpdated                      = "thread.updated"
	EventTypeUserBanned                         = "user.banned"
	EventTypeUserDeactivated                    = "user.deactivated"
	EventTypeUserDeleted                        = "user.deleted"
	EventTypeUserFlagged                        = "user.flagged"
	EventTypeUserMessagesDeleted                = "user.messages.deleted"
	EventTypeUserMuted                          = "user.muted"
	EventTypeUserReactivated                    = "user.reactivated"
	EventTypeUserUnbanned                       = "user.unbanned"
	EventTypeUserUnmuted                        = "user.unmuted"
	EventTypeUserUnreadMessageReminder          = "user.unread_message_reminder"
	EventTypeUserUpdated                        = "user.updated"
	EventTypeUserGroupCreated                   = "user_group.created"
	EventTypeUserGroupDeleted                   = "user_group.deleted"
	EventTypeUserGroupMemberAdded               = "user_group.member_added"
	EventTypeUserGroupMemberRemoved             = "user_group.member_removed"
	EventTypeUserGroupUpdated                   = "user_group.updated"
)

Webhook event type constants

View Source
const (
	// DefaultBaseURL is the default base URL for the stream chat api.
	// It works like CDN style and connects you to the closest production server.
	// By default, there is no real reason to change it. Use it only if you know what you are doing.
	DefaultBaseURL = "https://chat.stream-io-api.com"
)

Variables ΒΆ

View Source
var (
	// ErrApiResponse fires when the backend returned an HTTP 4xx/5xx
	// (auth, validation, server error, or any other API failure with the
	// APIError envelope). Also satisfied by ErrRateLimited via the
	// Unwrap chain.
	ErrApiResponse = errors.New("stream: api error")

	// ErrRateLimited fires when the backend returned HTTP 429.
	// StreamError.RetryAfter carries the parsed Retry-After header.
	// errors.Is(err, ErrApiResponse) also returns true.
	ErrRateLimited = errors.New("stream: rate limited")

	// ErrTransport fires when a network-layer failure prevented an HTTP
	// response from being received (connection reset, timeout, TLS,
	// DNS). StreamError.ErrorType identifies the subtype; the original
	// error is preserved via errors.Unwrap.
	ErrTransport = errors.New("stream: transport error")

	// ErrTaskFailed fires when WaitForTask observes status=="failed".
	// StreamError.Task carries the task's ErrorResult.
	ErrTaskFailed = errors.New("stream: task failed")
)

Sentinel errors expose the SDK error categories. All concrete errors returned from the SDK are *StreamError; callers branch on category with errors.Is(err, sentinel) and extract structured fields with errors.As(err, &streamErr).

View Source
var ErrInvalidWebhook = errors.New("stream: invalid webhook")

ErrInvalidWebhook is the sentinel for every webhook handling failure. Use errors.Is(err, ErrInvalidWebhook). The wrapped message (err.Error()) identifies the failure mode: "signature mismatch", "invalid base64 encoding", "gzip decompression failed", or "invalid JSON payload".

View Source
var ErrUnknownEventType = errors.New("stream: unknown webhook event type")

ErrUnknownEventType is returned by ParseWebhookEvent when the type discriminator is well-formed but not in the codegen-known set. ParseEvent uses this signal to route to UnknownEvent.

View Source
var WebhookEventKey = webhookEventKeyType{}

Functions ΒΆ

func DecodeSnsPayload ΒΆ

func DecodeSnsPayload(notificationBody string) ([]byte, error)

DecodeSnsPayload accepts either a full SNS HTTP notification envelope JSON ({"Type":"Notification","Message":"<base64>",...}) or a pre-extracted Message string (forwarded-through-SQS path). It then base64-decodes and gunzips the inner payload.

func DecodeSqsPayload ΒΆ

func DecodeSqsPayload(messageBody string) ([]byte, error)

DecodeSqsPayload decodes the SQS Message Body: try base64 first, fall back to raw bytes if base64 fails, then gunzip if gzip-prefixed.

Wire format (per CHA-3071): SQS bodies are raw JSON when enable_hook_payload_compression is off (today's default for all existing apps), and base64(gzip(json)) when it's on. This helper handles both: raw JSON starts with '{' which is not valid base64, so the base64 decode fails and we fall through to raw bytes, then GunzipPayload's magic-byte detection decides whether to decompress.

ParseSqs sits on top of this and works transparently for both wire formats: no caller code change, no flag, no header.

func EncodeValueToQueryParam ΒΆ

func EncodeValueToQueryParam(value any) string

EncodeValueToQueryParam returns the string representation of a value ready to be used as a query param

func GetEventType ΒΆ

func GetEventType(rawEvent []byte) string

GetEventType extracts the event type from a raw webhook payload. This is useful for routing webhooks before full deserialization.

Example:

eventType := getstream.GetEventType(body)
switch eventType {
case "message.new":
    // handle message.new
}

func GunzipPayload ΒΆ

func GunzipPayload(body []byte) ([]byte, error)

GunzipPayload decompresses body if gzip-prefixed, else returns body as-is.

Detection is by the first two bytes (0x1F 0x8B). This is reliable because Stream webhook bodies are always JSON, and JSON's first byte is always '{', '[', '"', a digit, '-', or one of t/f/n/whitespace; never 0x1F.

Returns ErrInvalidWebhook (wrapped) if body has the gzip magic prefix but isn't a valid gzip stream.

func PtrTo ΒΆ

func PtrTo[T any](v T) *T

func StructToMapWithTags ΒΆ

func StructToMapWithTags(input any, tagName string) (map[string]any, error)

func VerifySignature ΒΆ

func VerifySignature(body []byte, signature, secret string) bool

VerifySignature is the canonical name for HMAC-SHA256 signature verification. It aliases the existing VerifyWebhookSignature for backward compatibility.

Prefer this name in new code.

func VerifyWebhookSignature ΒΆ

func VerifyWebhookSignature(body []byte, signature string, secret string) bool

VerifyWebhookSignature verifies the HMAC-SHA256 signature of a webhook payload. This function should be used to verify that webhook requests are authentically from Stream.

Parameters:

  • body: The raw request body bytes
  • signature: The signature from the X-Signature header
  • secret: Your webhook secret (found in the Stream Dashboard)

Returns true if the signature is valid, false otherwise.

Example usage:

func webhookHandler(w http.ResponseWriter, r *http.Request) {
    body, _ := io.ReadAll(r.Body)
    signature := r.Header.Get("X-Signature")
    secret := os.Getenv("STREAM_WEBHOOK_SECRET")

    if !getstream.VerifyWebhookSignature(body, signature, secret) {
        http.Error(w, "Invalid signature", http.StatusForbidden)
        return
    }
    // Process webhook...
}

func Version ΒΆ

func Version() string

Version returns the version of the library. versionName is written by the release workflow and already carries the leading "v".

func WebhookMiddleware ΒΆ

func WebhookMiddleware(secret string) func(http.Handler) http.Handler

WebhookMiddleware verifies + parses Stream webhook requests using the given secret and stores the parsed event in the request context under WebhookEventKey. On signature mismatch or parse failure, responds with 401 and aborts the chain.

Types ΒΆ

type AIAudioConfigRequest ΒΆ

type AIAudioConfigRequest struct {
	Profile *string         `json:"profile,omitempty"`
	Rules   []BodyguardRule `json:"rules,omitempty"`
}

type AIAudioConfigResponse ΒΆ

type AIAudioConfigResponse struct {
	Enabled bool            `json:"enabled"`
	Profile string          `json:"profile"`
	Rules   []BodyguardRule `json:"rules"`
}

type AIImageConfig ΒΆ

type AIImageConfig struct {
	Async    *bool                `json:"async,omitempty"`
	Enabled  *bool                `json:"enabled,omitempty"`
	OcrRules []OCRRule            `json:"ocr_rules,omitempty"`
	Rules    []AWSRekognitionRule `json:"rules,omitempty"`
}

type AIImageLabelDefinition ΒΆ

type AIImageLabelDefinition struct {
	Description string `json:"description"`
	Group       string `json:"group"`
	Key         string `json:"key"`
	Label       string `json:"label"`
}

type AITextConfig ΒΆ

type AITextConfig struct {
	Async         *bool                   `json:"async,omitempty"`
	Enabled       *bool                   `json:"enabled,omitempty"`
	Profile       *string                 `json:"profile,omitempty"`
	Rules         []BodyguardRule         `json:"rules,omitempty"`
	SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}

type AIVideoConfig ΒΆ

type AIVideoConfig struct {
	Async   *bool                `json:"async,omitempty"`
	Enabled *bool                `json:"enabled,omitempty"`
	Rules   []AWSRekognitionRule `json:"rules,omitempty"`
}

type APIError ΒΆ

type APIError struct {
	// API error code
	Code int `json:"code"`
	// Request duration
	Duration string `json:"duration"`
	// Message describing an error
	Message string `json:"message"`
	// URL with additional information
	MoreInfo string `json:"more_info"`
	// Response HTTP status code
	StatusCode int `json:"StatusCode"`
	// Additional error-specific information
	Details []int `json:"details"`
	// 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
	Unrecoverable *bool `json:"unrecoverable,omitempty"`
	// Additional error info
	ExceptionFields map[string]string `json:"exception_fields,omitempty"`
}

type APNConfig ΒΆ

type APNConfig struct {
	AuthKey              *string `json:"auth_key,omitempty"`
	AuthType             *string `json:"auth_type,omitempty"`
	BundleID             *string `json:"bundle_id,omitempty"`
	Development          *bool   `json:"development,omitempty"`
	Disabled             *bool   `json:"Disabled,omitempty"`
	Host                 *string `json:"host,omitempty"`
	KeyID                *string `json:"key_id,omitempty"`
	NotificationTemplate *string `json:"notification_template,omitempty"`
	P12Cert              *string `json:"p12_cert,omitempty"`
	TeamID               *string `json:"team_id,omitempty"`
}

type APNConfigFields ΒΆ

type APNConfigFields struct {
	Development          bool    `json:"development"`
	Enabled              bool    `json:"enabled"`
	AuthKey              *string `json:"auth_key,omitempty"`
	AuthType             *string `json:"auth_type,omitempty"`
	BundleID             *string `json:"bundle_id,omitempty"`
	Host                 *string `json:"host,omitempty"`
	KeyID                *string `json:"key_id,omitempty"`
	NotificationTemplate *string `json:"notification_template,omitempty"`
	P12Cert              *string `json:"p12_cert,omitempty"`
	TeamID               *string `json:"team_id,omitempty"`
}

type APNS ΒΆ

type APNS struct {
	Body             string         `json:"body"`
	Title            string         `json:"title"`
	ContentAvailable *int           `json:"content-available,omitempty"`
	MutableContent   *int           `json:"mutable-content,omitempty"`
	Sound            *string        `json:"sound,omitempty"`
	Data             map[string]any `json:"data,omitempty"`
}

type APNSPayload ΒΆ

type APNSPayload struct {
	Body             *string        `json:"body,omitempty"`
	ContentAvailable *int           `json:"content-available,omitempty"`
	MutableContent   *int           `json:"mutable-content,omitempty"`
	Sound            *string        `json:"sound,omitempty"`
	Title            *string        `json:"title,omitempty"`
	Data             map[string]any `json:"data,omitempty"`
}

type AWSRekognitionRule ΒΆ

type AWSRekognitionRule struct {
	Action             string         `json:"action"`
	Label              string         `json:"label"`
	MinConfidence      float64        `json:"min_confidence"`
	Subclassifications map[string]any `json:"subclassifications,omitempty"`
}

type AbsentMetric ΒΆ added in v5.3.0

type AbsentMetric struct {
	Metric string `json:"metric"`
	Reason string `json:"reason"`
}

type AcceptFeedMemberInviteRequest ΒΆ

type AcceptFeedMemberInviteRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AcceptFeedMemberInviteResponse ΒΆ

type AcceptFeedMemberInviteResponse struct {
	Duration string             `json:"duration"`
	Member   FeedMemberResponse `json:"member"`
}

type AcceptFollowRequest ΒΆ

type AcceptFollowRequest struct {
	// Fully qualified ID of the source feed
	Source string `json:"source"`
	// Fully qualified ID of the target feed
	Target string `json:"target"`
	// Optional role for the follower in the follow relationship
	FollowerRole *string `json:"follower_role,omitempty"`
}

type AcceptFollowResponse ΒΆ

type AcceptFollowResponse struct {
	Duration string         `json:"duration"`
	Follow   FollowResponse `json:"follow"`
}

type Action ΒΆ

type Action struct {
	Name  string  `json:"name"`
	Text  string  `json:"text"`
	Type  string  `json:"type"`
	Style *string `json:"style,omitempty"`
	Value *string `json:"value,omitempty"`
}

type ActionLogResponse ΒΆ

type ActionLogResponse struct {
	// Timestamp when the action was taken
	CreatedAt Timestamp `json:"created_at"`
	// Unique identifier of the action log
	ID string `json:"id"`
	// Reason for the moderation action
	Reason string `json:"reason"`
	// Classification of who triggered the action (e.g. user, moderator, automod, api_integration)
	ReporterType string `json:"reporter_type"`
	// ID of the user who was the target of the action
	TargetUserID string `json:"target_user_id"`
	// ID of the user who performed the action
	UserID string `json:"user_id"`
	// Type of moderation action
	Type        string   `json:"type"`
	AiProviders []string `json:"ai_providers"`
	// Additional metadata about the action
	Custom          map[string]any           `json:"custom"`
	ReviewQueueItem *ReviewQueueItemResponse `json:"review_queue_item,omitempty"`
	// User response object
	TargetUser *UserResponse `json:"target_user,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ActionSequence ΒΆ

type ActionSequence struct {
	Action         *string `json:"action,omitempty"`
	Blur           *bool   `json:"blur,omitempty"`
	CooldownPeriod *int    `json:"cooldown_period,omitempty"`
	Threshold      *int    `json:"threshold,omitempty"`
	TimeWindow     *int    `json:"time_window,omitempty"`
	Warning        *bool   `json:"warning,omitempty"`
	WarningText    *string `json:"warning_text,omitempty"`
}

type ActiveCallsBitrateStats ΒΆ

type ActiveCallsBitrateStats struct {
	P10 float64 `json:"p10"`
	P50 float64 `json:"p50"`
}

type ActiveCallsFPSStats ΒΆ

type ActiveCallsFPSStats struct {
	P05 float64 `json:"p05"`
	P10 float64 `json:"p10"`
	P50 float64 `json:"p50"`
	P90 float64 `json:"p90"`
}

type ActiveCallsLatencyStats ΒΆ

type ActiveCallsLatencyStats struct {
	P50 float64 `json:"p50"`
	P90 float64 `json:"p90"`
}

type ActiveCallsMetrics ΒΆ

type ActiveCallsMetrics struct {
	JoinCallAPI *JoinCallAPIMetrics `json:"join_call_api,omitempty"`
	Publishers  *PublishersMetrics  `json:"publishers,omitempty"`
	Subscribers *SubscribersMetrics `json:"subscribers,omitempty"`
}

type ActiveCallsResolutionStats ΒΆ

type ActiveCallsResolutionStats struct {
	P10 float64 `json:"p10"`
	P50 float64 `json:"p50"`
}

type ActiveCallsSummary ΒΆ

type ActiveCallsSummary struct {
	ActiveCalls       int `json:"active_calls"`
	ActivePublishers  int `json:"active_publishers"`
	ActiveSubscribers int `json:"active_subscribers"`
	Participants      int `json:"participants"`
}

type ActivityAddedEvent ΒΆ

type ActivityAddedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Fid       string           `json:"fid"`
	Activity  ActivityResponse `json:"activity"`
	Custom    map[string]any   `json:"custom"`
	// The type of event: "feeds.activity.added" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when an activity is added to a feed.

func (*ActivityAddedEvent) GetEventType ΒΆ

func (e *ActivityAddedEvent) GetEventType() string

type ActivityDeletedEvent ΒΆ

type ActivityDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Fid       string           `json:"fid"`
	Activity  ActivityResponse `json:"activity"`
	Custom    map[string]any   `json:"custom"`
	// The type of event: "feeds.activity.deleted" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when an activity is deleted.

func (*ActivityDeletedEvent) GetEventType ΒΆ

func (e *ActivityDeletedEvent) GetEventType() string

type ActivityFeedbackEvent ΒΆ

type ActivityFeedbackEvent struct {
	// Date/time of creation
	CreatedAt        Timestamp                    `json:"created_at"`
	ActivityFeedback ActivityFeedbackEventPayload `json:"activity_feedback"`
	Custom           map[string]any               `json:"custom"`
	// The type of event: "feeds.activity.feedback" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when activity feedback is provided.

func (*ActivityFeedbackEvent) GetEventType ΒΆ

func (e *ActivityFeedbackEvent) GetEventType() string

type ActivityFeedbackEventPayload ΒΆ

type ActivityFeedbackEventPayload struct {
	// The type of feedback action. One of: hide, show_more, show_less
	Action string `json:"action"`
	// The activity that received feedback
	ActivityID string `json:"activity_id"`
	// When the feedback was created
	CreatedAt Timestamp `json:"created_at"`
	// When the feedback was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// The feedback value (true/false)
	Value string `json:"value"`
	// User response object
	User UserResponse `json:"user"`
}

type ActivityFeedbackRequest ΒΆ

type ActivityFeedbackRequest struct {
	// Whether to hide this activity
	Hide *bool `json:"hide,omitempty"`
	// Whether to show less content like this
	ShowLess *bool `json:"show_less,omitempty"`
	// Whether to show more content like this
	ShowMore *bool   `json:"show_more,omitempty"`
	UserID   *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type ActivityFeedbackResponse ΒΆ

type ActivityFeedbackResponse struct {
	// The ID of the activity that received feedback
	ActivityID string `json:"activity_id"`
	Duration   string `json:"duration"`
}

Response for activity feedback submission

type ActivityFilterConfig ΒΆ

type ActivityFilterConfig struct {
	// When true, activities authored by the feed owner are excluded from feed reads
	ExcludeOwnerActivities *bool `json:"exclude_owner_activities,omitempty"`
}

type ActivityMarkEvent ΒΆ

type ActivityMarkEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Fid       string         `json:"fid"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "feeds.activity.marked" in this case
	Type           string  `json:"type"`
	FeedVisibility *string `json:"feed_visibility,omitempty"`
	// Whether all activities were marked as read
	MarkAllRead *bool `json:"mark_all_read,omitempty"`
	// Whether all activities were marked as seen
	MarkAllSeen *bool      `json:"mark_all_seen,omitempty"`
	ReceivedAt  *Timestamp `json:"received_at,omitempty"`
	// The IDs of activities marked as read
	MarkRead []string `json:"mark_read,omitempty"`
	// The IDs of activities marked as seen
	MarkSeen []string `json:"mark_seen,omitempty"`
	// The IDs of activities marked as watched
	MarkWatched []string                  `json:"mark_watched,omitempty"`
	User        *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when activities are marked as read, seen, or watched.

func (*ActivityMarkEvent) GetEventType ΒΆ

func (e *ActivityMarkEvent) GetEventType() string

type ActivityPinResponse ΒΆ

type ActivityPinResponse struct {
	// When the pin was created
	CreatedAt Timestamp `json:"created_at"`
	// ID of the feed where activity is pinned
	Feed string `json:"feed"`
	// When the pin was last updated
	UpdatedAt Timestamp        `json:"updated_at"`
	Activity  ActivityResponse `json:"activity"`
	// User response object
	User UserResponse `json:"user"`
}

type ActivityPinnedEvent ΒΆ

type ActivityPinnedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the feed
	Fid            string              `json:"fid"`
	Custom         map[string]any      `json:"custom"`
	PinnedActivity PinActivityResponse `json:"pinned_activity"`
	// The type of event: "feeds.activity.pinned" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when an activity is pinned.

func (*ActivityPinnedEvent) GetEventType ΒΆ

func (e *ActivityPinnedEvent) GetEventType() string

type ActivityProcessorConfig ΒΆ

type ActivityProcessorConfig struct {
	// Type of activity processor (required)
	Type string `json:"type"`
}

type ActivityReactionAddedEvent ΒΆ

type ActivityReactionAddedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp             `json:"created_at"`
	Fid       string                `json:"fid"`
	Activity  ActivityResponse      `json:"activity"`
	Custom    map[string]any        `json:"custom"`
	Reaction  FeedsReactionResponse `json:"reaction"`
	// The type of event: "feeds.activity.reaction.added" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a reaction is added to an activity.

func (*ActivityReactionAddedEvent) GetEventType ΒΆ

func (e *ActivityReactionAddedEvent) GetEventType() string

type ActivityReactionDeletedEvent ΒΆ

type ActivityReactionDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp             `json:"created_at"`
	Fid       string                `json:"fid"`
	Activity  ActivityResponse      `json:"activity"`
	Custom    map[string]any        `json:"custom"`
	Reaction  FeedsReactionResponse `json:"reaction"`
	// The type of the reaction that was removed
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a reaction is deleted from an activity.

func (*ActivityReactionDeletedEvent) GetEventType ΒΆ

func (e *ActivityReactionDeletedEvent) GetEventType() string

type ActivityReactionUpdatedEvent ΒΆ

type ActivityReactionUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp             `json:"created_at"`
	Fid       string                `json:"fid"`
	Activity  ActivityResponse      `json:"activity"`
	Custom    map[string]any        `json:"custom"`
	Reaction  FeedsReactionResponse `json:"reaction"`
	// The type of event: "feeds.activity.reaction.updated" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a reaction is updated on an activity.

func (*ActivityReactionUpdatedEvent) GetEventType ΒΆ

func (e *ActivityReactionUpdatedEvent) GetEventType() string

type ActivityRemovedFromFeedEvent ΒΆ

type ActivityRemovedFromFeedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Fid       string           `json:"fid"`
	Activity  ActivityResponse `json:"activity"`
	Custom    map[string]any   `json:"custom"`
	// The type of event: "feeds.activity.removed_from_feed" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when an activity is removed from a feed.

func (*ActivityRemovedFromFeedEvent) GetEventType ΒΆ

func (e *ActivityRemovedFromFeedEvent) GetEventType() string

type ActivityRequest ΒΆ

type ActivityRequest struct {
	// Type of activity
	Type string `json:"type"`
	// List of feeds to add the activity to with a default max limit of 25 feeds
	Feeds []string `json:"feeds"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create notification activities for mentioned users
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	// Expiration time for the activity
	ExpiresAt *string `json:"expires_at,omitempty"`
	// Optional ID for the activity
	ID *string `json:"id,omitempty"`
	// ID of parent activity for replies/comments
	ParentID *string `json:"parent_id,omitempty"`
	// ID of a poll to attach to activity
	PollID *string `json:"poll_id,omitempty"`
	// Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
	RestrictReplies *string `json:"restrict_replies,omitempty"`
	// Whether to skip URL enrichment for the activity
	SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
	// Whether to skip push notifications
	SkipPush *bool `json:"skip_push,omitempty"`
	// Text content of the activity
	Text *string `json:"text,omitempty"`
	// ID of the user creating the activity
	UserID *string `json:"user_id,omitempty"`
	// Visibility setting for the activity. One of: public, private, tag
	Visibility *string `json:"visibility,omitempty"`
	// If visibility is 'tag', this is the tag name and is required
	VisibilityTag *string `json:"visibility_tag,omitempty"`
	// List of attachments for the activity
	Attachments []Attachment `json:"attachments,omitempty"`
	// Collections that this activity references
	CollectionRefs []string `json:"collection_refs,omitempty"`
	// Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions.
	Collections []CollectionRequest `json:"collections,omitempty"`
	// Tags for filtering activities
	FilterTags []string `json:"filter_tags,omitempty"`
	// Tags for indicating user interests
	InterestTags []string `json:"interest_tags,omitempty"`
	// List of users mentioned in the activity
	MentionedUserIds []string `json:"mentioned_user_ids,omitempty"`
	// Custom data for the activity
	Custom   map[string]any `json:"custom,omitempty"`
	Location *Location      `json:"location,omitempty"`
	// Additional data for search indexing
	SearchData map[string]any `json:"search_data,omitempty"`
}

type ActivityResponse ΒΆ

type ActivityResponse struct {
	// Number of bookmarks on the activity
	BookmarkCount int `json:"bookmark_count"`
	// Number of comments on the activity
	CommentCount int `json:"comment_count"`
	// When the activity was created
	CreatedAt Timestamp `json:"created_at"`
	// If this activity is hidden by this user (using activity feedback)
	Hidden bool `json:"hidden"`
	// Unique identifier for the activity
	ID string `json:"id"`
	// Popularity score of the activity
	Popularity int `json:"popularity"`
	// If this activity is obfuscated for this user. For premium content where you want to show a preview
	Preview bool `json:"preview"`
	// Number of reactions to the activity
	ReactionCount int `json:"reaction_count"`
	// Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
	RestrictReplies string `json:"restrict_replies"`
	// Ranking score for this activity
	Score float64 `json:"score"`
	// Number of times the activity was shared
	ShareCount int `json:"share_count"`
	// When the activity was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Visibility setting for the activity. One of: public, private, tag
	Visibility string `json:"visibility"`
	// Type of activity
	Type string `json:"type"`
	// Media attachments for the activity
	Attachments []Attachment `json:"attachments"`
	// Latest 5 comments of this activity (comment replies excluded)
	Comments []CommentResponse `json:"comments"`
	// List of feed IDs containing this activity
	Feeds []string `json:"feeds"`
	// Tags for filtering
	FilterTags []string `json:"filter_tags"`
	// Tags for user interests
	InterestTags []string `json:"interest_tags"`
	// Recent reactions to the activity
	LatestReactions []FeedsReactionResponse `json:"latest_reactions"`
	// Users mentioned in the activity
	MentionedUsers []UserResponse `json:"mentioned_users"`
	// Current user's bookmarks for this activity
	OwnBookmarks []BookmarkResponse `json:"own_bookmarks"`
	// Current user's reactions to this activity
	OwnReactions []FeedsReactionResponse `json:"own_reactions"`
	// Enriched collection data referenced by this activity
	Collections map[string]EnrichedCollectionResponse `json:"collections"`
	// Custom data for the activity
	Custom map[string]any `json:"custom"`
	// Grouped reactions by type
	ReactionGroups map[string]FeedsReactionGroupResponse `json:"reaction_groups"`
	// Data for search indexing
	SearchData map[string]any `json:"search_data"`
	// User response object
	User UserResponse `json:"user"`
	// When the activity was deleted
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`
	// When the activity was last edited
	EditedAt *Timestamp `json:"edited_at,omitempty"`
	// When the activity will expire
	ExpiresAt *Timestamp `json:"expires_at,omitempty"`
	// Total count of reactions from friends on this activity
	FriendReactionCount *int `json:"friend_reaction_count,omitempty"`
	// Whether this activity has been read. Only set for feed groups with notification config (track_seen/track_read enabled).
	IsRead *bool `json:"is_read,omitempty"`
	// Whether this activity has been seen. Only set for feed groups with notification config (track_seen/track_read enabled).
	IsSeen           *bool   `json:"is_seen,omitempty"`
	IsWatched        *bool   `json:"is_watched,omitempty"`
	ModerationAction *string `json:"moderation_action,omitempty"`
	// Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking.
	SelectorSource *string `json:"selector_source,omitempty"`
	// Text content of the activity
	Text *string `json:"text,omitempty"`
	// If visibility is 'tag', this is the tag name
	VisibilityTag *string `json:"visibility_tag,omitempty"`
	// Reactions from users the current user follows or has mutual follows with
	FriendReactions []FeedsReactionResponse `json:"friend_reactions,omitempty"`
	// Recent shares of the activity, one entry per share (org-gated)
	LatestShares        []ShareResponse       `json:"latest_shares,omitempty"`
	CurrentFeed         *FeedResponse         `json:"current_feed,omitempty"`
	I18n                map[string]string     `json:"i18n,omitempty"`
	Location            *Location             `json:"location,omitempty"`
	Metrics             map[string]int        `json:"metrics,omitempty"`
	Moderation          *ModerationV2Response `json:"moderation,omitempty"`
	NotificationContext *NotificationContext  `json:"notification_context,omitempty"`
	Parent              *ActivityResponse     `json:"parent,omitempty"`
	Poll                *PollResponseData     `json:"poll,omitempty"`
	// Variable values used at ranking time. Only included when include_score_vars is enabled in enrichment options.
	ScoreVars map[string]any `json:"score_vars,omitempty"`
}

type ActivityRestoredEvent ΒΆ

type ActivityRestoredEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Fid       string           `json:"fid"`
	Activity  ActivityResponse `json:"activity"`
	Custom    map[string]any   `json:"custom"`
	// The type of the event
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when an activity is restored.

func (*ActivityRestoredEvent) GetEventType ΒΆ

func (e *ActivityRestoredEvent) GetEventType() string

type ActivitySelectorConfig ΒΆ

type ActivitySelectorConfig struct {
	// Type of selector. One of: popular, proximity, following, current_feed, query, interest, follow_suggestion
	Type string `json:"type"`
	// Time threshold for activity selection (string). Expected RFC3339 format (e.g., 2006-01-02T15:04:05Z07:00). Cannot be used together with cutoff_window
	CutoffTime *string `json:"cutoff_time,omitempty"`
	// Flexible relative time window for activity selection (e.g., '1h', '3d', '1y'). Activities older than this duration will be filtered out. Cannot be used together with cutoff_time
	CutoffWindow *string `json:"cutoff_window,omitempty"`
	// Minimum popularity threshold. For the 'popular' selector, omit to use the default (5); values below 1 are rejected
	MinPopularity *int `json:"min_popularity,omitempty"`
	// Sort parameters for activity selection
	Sort []SortParamRequest `json:"sort,omitempty"`
	// Filter for activity selection
	Filter map[string]any `json:"filter,omitempty"`
	Params map[string]any `json:"params,omitempty"`
}

type ActivitySelectorConfigResponse ΒΆ

type ActivitySelectorConfigResponse struct {
	// Type of selector
	Type string `json:"type"`
	// Time threshold for activity selection (timestamp)
	CutoffTime *Timestamp `json:"cutoff_time,omitempty"`
	// Flexible relative time window for activity selection (e.g., '1h', '3d', '1y')
	CutoffWindow *string `json:"cutoff_window,omitempty"`
	// Minimum popularity threshold. For the 'popular' selector, values below 1 are normalized to the default (5) at read time.
	MinPopularity *int `json:"min_popularity,omitempty"`
	// Sort parameters for activity selection
	Sort []SortParamRequest `json:"sort,omitempty"`
	// Filter for activity selection
	Filter map[string]any `json:"filter,omitempty"`
	// Generic params for selector-specific configuration
	Params map[string]any `json:"params,omitempty"`
}

type ActivityUnpinnedEvent ΒΆ

type ActivityUnpinnedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the feed
	Fid            string              `json:"fid"`
	Custom         map[string]any      `json:"custom"`
	PinnedActivity PinActivityResponse `json:"pinned_activity"`
	// The type of event: "feeds.activity.unpinned" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when an activity is unpinned.

func (*ActivityUnpinnedEvent) GetEventType ΒΆ

func (e *ActivityUnpinnedEvent) GetEventType() string

type ActivityUpdatedEvent ΒΆ

type ActivityUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Fid       string           `json:"fid"`
	Activity  ActivityResponse `json:"activity"`
	Custom    map[string]any   `json:"custom"`
	// The type of the event
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when an activity is updated.

func (*ActivityUpdatedEvent) GetEventType ΒΆ

func (e *ActivityUpdatedEvent) GetEventType() string

type AddActivityReactionRequest ΒΆ

type AddActivityReactionRequest struct {
	// Type of reaction
	Type string `json:"type"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create a notification activity for this reaction
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	// Server-side only. If true, auto-creates the reacting user identified by user_id when they don't already exist. Default: false.
	CreateUsers *bool `json:"create_users,omitempty"`
	// Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)
	EnforceUnique *bool   `json:"enforce_unique,omitempty"`
	SkipPush      *bool   `json:"skip_push,omitempty"`
	UserID        *string `json:"user_id,omitempty"`
	// Optional list of feeds to create a reference (share) activity of the original activity in. The reference activity's type mirrors the reaction type.
	TargetFeeds []string `json:"target_feeds"`
	// Custom data for the reaction
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AddActivityRequest ΒΆ

type AddActivityRequest struct {
	// Type of activity
	Type string `json:"type"`
	// List of feeds to add the activity to with a default max limit of 25 feeds
	Feeds []string `json:"feeds"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create notification activities for mentioned users
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	CreateUsers                *bool `json:"create_users,omitempty"`
	EnrichOwnFields            *bool `json:"enrich_own_fields,omitempty"`
	// Expiration time for the activity
	ExpiresAt       *string `json:"expires_at,omitempty"`
	ForceModeration *bool   `json:"force_moderation,omitempty"`
	// Optional ID for the activity
	ID *string `json:"id,omitempty"`
	// ID of parent activity for replies/comments
	ParentID *string `json:"parent_id,omitempty"`
	// ID of a poll to attach to activity
	PollID *string `json:"poll_id,omitempty"`
	// Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
	RestrictReplies *string `json:"restrict_replies,omitempty"`
	// Whether to skip URL enrichment for the activity
	SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
	// Whether to skip push notifications
	SkipPush *bool `json:"skip_push,omitempty"`
	// Text content of the activity
	Text *string `json:"text,omitempty"`
	// ID of the user creating the activity
	UserID *string `json:"user_id,omitempty"`
	// Visibility setting for the activity. One of: public, private, tag
	Visibility *string `json:"visibility,omitempty"`
	// If visibility is 'tag', this is the tag name and is required
	VisibilityTag *string `json:"visibility_tag,omitempty"`
	// List of attachments for the activity
	Attachments []Attachment `json:"attachments"`
	// Collections that this activity references
	CollectionRefs []string `json:"collection_refs"`
	// Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions.
	Collections []CollectionRequest `json:"collections"`
	// Tags for filtering activities
	FilterTags []string `json:"filter_tags"`
	// Tags for indicating user interests
	InterestTags []string `json:"interest_tags"`
	// List of users mentioned in the activity
	MentionedUserIds []string `json:"mentioned_user_ids"`
	// Custom data for the activity
	Custom   map[string]any `json:"custom"`
	Location *Location      `json:"location,omitempty"`
	// Additional data for search indexing
	SearchData map[string]any `json:"search_data"`
}

type AddActivityResponse ΒΆ

type AddActivityResponse struct {
	Duration string           `json:"duration"`
	Activity ActivityResponse `json:"activity"`
	// Number of mention notification activities created for mentioned users
	MentionNotificationsCreated *int `json:"mention_notifications_created,omitempty"`
}

type AddBookmarkRequest ΒΆ

type AddBookmarkRequest struct {
	// ID of the folder to add the bookmark to
	FolderID *string `json:"folder_id,omitempty"`
	UserID   *string `json:"user_id,omitempty"`
	// Custom data for the bookmark
	Custom    map[string]any    `json:"custom"`
	NewFolder *AddFolderRequest `json:"new_folder,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AddBookmarkResponse ΒΆ

type AddBookmarkResponse struct {
	Duration string           `json:"duration"`
	Bookmark BookmarkResponse `json:"bookmark"`
}

type AddCommentBookmarkRequest ΒΆ

type AddCommentBookmarkRequest struct {
	// ID of the folder to add the bookmark to
	FolderID *string `json:"folder_id,omitempty"`
	UserID   *string `json:"user_id,omitempty"`
	// Custom data for the bookmark
	Custom    map[string]any    `json:"custom"`
	NewFolder *AddFolderRequest `json:"new_folder,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AddCommentBookmarkResponse ΒΆ

type AddCommentBookmarkResponse struct {
	Duration string           `json:"duration"`
	Bookmark BookmarkResponse `json:"bookmark"`
}

type AddCommentReactionRequest ΒΆ

type AddCommentReactionRequest struct {
	// The type of reaction, eg upvote, like, ...
	Type string `json:"type"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create a notification activity for this reaction
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	// Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)
	EnforceUnique *bool   `json:"enforce_unique,omitempty"`
	SkipPush      *bool   `json:"skip_push,omitempty"`
	UserID        *string `json:"user_id,omitempty"`
	// Optional list of feeds to create a reference (share) activity of the commented-on activity in. The reference activity's type mirrors the reaction type.
	TargetFeeds []string `json:"target_feeds"`
	// Optional custom data to add to the reaction
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AddCommentReactionResponse ΒΆ

type AddCommentReactionResponse struct {
	// Duration of the request
	Duration string                `json:"duration"`
	Comment  CommentResponse       `json:"comment"`
	Reaction FeedsReactionResponse `json:"reaction"`
	// Whether notification creation was accepted for asynchronous processing
	NotificationAccepted *bool `json:"notification_accepted,omitempty"`
	// Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted
	// Deprecated: this field is deprecated.
	NotificationCreated *bool `json:"notification_created,omitempty"`
	// ID of the async notification-creation task; poll GET /tasks/{id} for its status
	NotificationTaskID *string           `json:"notification_task_id,omitempty"`
	ReferenceActivity  *ActivityResponse `json:"reference_activity,omitempty"`
}

type AddCommentRequest ΒΆ

type AddCommentRequest struct {
	// Text content of the comment
	Comment *string `json:"comment,omitempty"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create a notification activity for this comment
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	// If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
	ForceModeration *bool `json:"force_moderation,omitempty"`
	// Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated.
	ID *string `json:"id,omitempty"`
	// ID of the object to comment on. Required for root comments
	ObjectID *string `json:"object_id,omitempty"`
	// Type of the object to comment on. Required for root comments
	ObjectType *string `json:"object_type,omitempty"`
	// ID of parent comment for replies. When provided, object_id and object_type are automatically inherited from the parent comment.
	ParentID *string `json:"parent_id,omitempty"`
	// Whether to skip URL enrichment for this comment
	SkipEnrichUrl *bool   `json:"skip_enrich_url,omitempty"`
	SkipPush      *bool   `json:"skip_push,omitempty"`
	UserID        *string `json:"user_id,omitempty"`
	// Media attachments for the reply
	Attachments []Attachment `json:"attachments"`
	// List of users mentioned in the reply
	MentionedUserIds []string `json:"mentioned_user_ids"`
	// Custom data for the comment
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AddCommentResponse ΒΆ

type AddCommentResponse struct {
	Duration string          `json:"duration"`
	Comment  CommentResponse `json:"comment"`
	// Number of mention notification activities created for mentioned users
	MentionNotificationsCreated *int `json:"mention_notifications_created,omitempty"`
	// Whether a notification activity was successfully created
	NotificationCreated *bool `json:"notification_created,omitempty"`
}

type AddCommentsBatchRequest ΒΆ

type AddCommentsBatchRequest struct {
	// List of comments to add
	Comments []AddCommentRequest `json:"comments"`
}

type AddCommentsBatchResponse ΒΆ

type AddCommentsBatchResponse struct {
	Duration string `json:"duration"`
	// List of comments added
	Comments []CommentResponse `json:"comments"`
}

type AddFolderRequest ΒΆ

type AddFolderRequest struct {
	// Name of the folder
	Name string `json:"name"`
	// Custom data for the folder
	Custom map[string]any `json:"custom,omitempty"`
}

type AddReactionRequest ΒΆ

type AddReactionRequest struct {
	// Type of reaction
	Type string `json:"type"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create a notification activity for this reaction
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	// Server-side only. If true, auto-creates the reacting user identified by user_id when they don't already exist. Default: false.
	CreateUsers *bool `json:"create_users,omitempty"`
	// Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)
	EnforceUnique *bool   `json:"enforce_unique,omitempty"`
	SkipPush      *bool   `json:"skip_push,omitempty"`
	UserID        *string `json:"user_id,omitempty"`
	// Optional list of feeds to create a reference (share) activity of the original activity in. The reference activity's type mirrors the reaction type.
	TargetFeeds []string `json:"target_feeds,omitempty"`
	// Custom data for the reaction
	Custom map[string]any `json:"custom,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AddReactionResponse ΒΆ

type AddReactionResponse struct {
	Duration string                `json:"duration"`
	Activity ActivityResponse      `json:"activity"`
	Reaction FeedsReactionResponse `json:"reaction"`
	// Whether notification creation was accepted for asynchronous processing
	NotificationAccepted *bool `json:"notification_accepted,omitempty"`
	// Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted
	// Deprecated: this field is deprecated.
	NotificationCreated *bool `json:"notification_created,omitempty"`
	// ID of the async notification-creation task; poll GET /tasks/{id} for its status
	NotificationTaskID *string           `json:"notification_task_id,omitempty"`
	ReferenceActivity  *ActivityResponse `json:"reference_activity,omitempty"`
}

type AddSegmentTargetsRequest ΒΆ

type AddSegmentTargetsRequest struct {
	// Target IDs
	TargetIds []string `json:"target_ids"`
}

type AddUserGroupMembersRequest ΒΆ

type AddUserGroupMembersRequest struct {
	// List of user IDs to add as members
	MemberIds []string `json:"member_ids"`
	// Whether to add the members as group admins. Defaults to false
	AsAdmin *bool   `json:"as_admin,omitempty"`
	TeamID  *string `json:"team_id,omitempty"`
}

type AddUserGroupMembersResponse ΒΆ

type AddUserGroupMembersResponse struct {
	Duration  string             `json:"duration"`
	UserGroup *UserGroupResponse `json:"user_group,omitempty"`
}

Response for adding members to a user group

type AggregatedActivityResponse ΒΆ

type AggregatedActivityResponse struct {
	// Number of activities in this aggregation
	ActivityCount int `json:"activity_count"`
	// When the aggregation was created
	CreatedAt Timestamp `json:"created_at"`
	// Grouping identifier
	Group string `json:"group"`
	// Ranking score for this aggregation
	Score float64 `json:"score"`
	// When the aggregation was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Number of unique users in this aggregation
	UserCount int `json:"user_count"`
	// Whether this activity group has been truncated due to exceeding the group size limit
	UserCountTruncated bool `json:"user_count_truncated"`
	// List of activities in this aggregation
	Activities []ActivityResponse `json:"activities"`
	// Whether this aggregated group has been read. Only set for feed groups with notification config (track_seen/track_read enabled).
	IsRead *bool `json:"is_read,omitempty"`
	// Whether this aggregated group has been seen. Only set for feed groups with notification config (track_seen/track_read enabled).
	IsSeen    *bool `json:"is_seen,omitempty"`
	IsWatched *bool `json:"is_watched,omitempty"`
}

type AggregationConfig ΒΆ

type AggregationConfig struct {
	// Order of member activities inside each aggregated group for non-stories feeds: created_at_desc (newest first, default) or created_at_asc (oldest first). Stories feeds ignore this and always use oldest first.
	ActivitiesSort *string `json:"activities_sort,omitempty"`
	// Format for activity aggregation
	Format *string `json:"format,omitempty"`
	// Strategy for computing aggregated group scores from member activity scores when ranking is enabled. Valid values: sum, max, avg
	ScoreStrategy *string `json:"score_strategy,omitempty"`
}

type AnalyzeImageField ΒΆ

type AnalyzeImageField struct {
	// Per-image action: keep | flag | remove.
	Action *string `json:"action,omitempty"`
	// Highest confidence (0–1) across detected classifications + sub-classifications. Convenience aggregate over the nested values in `classifications`.
	Confidence *float64 `json:"confidence,omitempty"`
	// Set when moderation couldn't be determined for this image β€” action is absent.
	Error *string `json:"error,omitempty"`
	// Echo of `content_ids[label]` when supplied on the request; omitted otherwise.
	ID *string `json:"id,omitempty"`
	// Hierarchical list of L1 (parent) classifications. Each entry: `name`, `confidence` (0–1), and nested `subclassifications` (L2 leaves with their own confidence). Resolved against the app's effective taxonomy (custom taxonomy when configured, otherwise the standard Bodyguard catalogue).
	Classifications []Classification `json:"classifications,omitempty"`
	// Flat list of Bodyguard OCR text-moderation labels on the image's extracted text (e.g. VULGARITY, PII). Each entry: `name` + `severity`. Populated when BG's OCR pipeline returned non-empty results for this image.
	OcrClassifications []Classification `json:"ocr_classifications,omitempty"`
}

type AnalyzeRequest ΒΆ

type AnalyzeRequest struct {
	// When true, the response carries no verdicts (status `pending`) and per-modality results arrive via `moderation.text_analysis.complete` and `moderation.image_analysis.complete` webhooks. Image moderation runs on a background worker; text moderation runs synchronously and is then delivered via webhook.
	AsyncResponse *bool `json:"async_response,omitempty"`
	// Moderation policy key. Optional in stateful mode, required in stateless mode.
	ConfigKey *string `json:"config_key,omitempty"`
	// Original timestamp when the content was produced. Used as the `published_at` timestamp on per-content log entries that surface in `matched_contents` on aggregation-rule webhooks.
	ContentPublishedAt *Timestamp `json:"content_published_at,omitempty"`
	// ID of the user who created the content. Required with entity_type + entity_id; omit all three for stateless mode.
	EntityCreatorID *string `json:"entity_creator_id,omitempty"`
	// Caller-supplied content identifier. Required with entity_type + entity_creator_id; omit all three for stateless mode.
	EntityID *string `json:"entity_id,omitempty"`
	// Caller-defined entity type. Required with entity_id + entity_creator_id; omit all three for stateless mode.
	EntityType *string `json:"entity_type,omitempty"`
	UserID     *string `json:"user_id,omitempty"`
	// Optional map from a content label (either a `texts` key or an `image:<key>` multipart label) to a caller-supplied per-instance identifier. Echoed on per-field verdicts and surfaced in `matched_contents` when an aggregation rule fires.
	ContentIds map[string]string `json:"content_ids"`
	// Arbitrary metadata surfaced in the dashboard.
	Custom map[string]any `json:"custom"`
	// Named text fields to moderate, keyed by caller label (e.g. title, description).
	Texts map[string]string `json:"texts"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AnalyzeResponse ΒΆ

type AnalyzeResponse struct {
	Duration string `json:"duration"`
	// Always `complete` β€” /analyze is sync-only and the full verdict is in the response.
	Status string `json:"status"`
	// Per-image moderation verdicts keyed by caller label.
	Images map[string]AnalyzeImageField `json:"images,omitempty"`
	// Per-text-field moderation verdicts keyed by caller label.
	Texts map[string]AnalyzeTextField `json:"texts,omitempty"`
}

type AnalyzeTextField ΒΆ

type AnalyzeTextField struct {
	// Per-field action: keep | flag | remove.
	Action *string `json:"action,omitempty"`
	// Set when moderation couldn't be determined for this field β€” action is absent.
	Error *string `json:"error,omitempty"`
	// Echo of `content_ids[label]` when supplied on the request; omitted otherwise.
	ID *string `json:"id,omitempty"`
	// Detected language code.
	Language *string `json:"language,omitempty"`
	// Aggregate severity across the field: LOW | MEDIUM | HIGH | CRITICAL.
	Severity *string `json:"severity,omitempty"`
	// Flat list of detected Bodyguard text labels (e.g. INSULT, VULGARITY). Each entry carries `name` and `severity`.
	Classifications []Classification `json:"classifications,omitempty"`
}

type AppResponseFields ΒΆ

type AppResponseFields struct {
	AllowMultiUserDevices                 bool                            `json:"allow_multi_user_devices"`
	AsyncUrlEnrichEnabled                 bool                            `json:"async_url_enrich_enabled"`
	AutoTranslationEnabled                bool                            `json:"auto_translation_enabled"`
	CampaignEnabled                       bool                            `json:"campaign_enabled"`
	CdnExpirationSeconds                  int                             `json:"cdn_expiration_seconds"`
	CustomActionHandlerUrl                string                          `json:"custom_action_handler_url"`
	DisableAuthChecks                     bool                            `json:"disable_auth_checks"`
	DisablePermissionsChecks              bool                            `json:"disable_permissions_checks"`
	EnforceUniqueUsernames                string                          `json:"enforce_unique_usernames"`
	FeedAuditLogsEnabled                  bool                            `json:"feed_audit_logs_enabled"`
	GuestUserCreationDisabled             bool                            `json:"guest_user_creation_disabled"`
	ID                                    int                             `json:"id"`
	ImageModerationEnabled                bool                            `json:"image_moderation_enabled"`
	MaxAggregatedActivitiesLength         int                             `json:"max_aggregated_activities_length"`
	MemberCustomOnMessagesEnabled         bool                            `json:"member_custom_on_messages_enabled"`
	ModerationAudioCallModerationEnabled  bool                            `json:"moderation_audio_call_moderation_enabled"`
	ModerationEnabled                     bool                            `json:"moderation_enabled"`
	ModerationLlmConfigurabilityEnabled   bool                            `json:"moderation_llm_configurability_enabled"`
	ModerationMultitenantBlocklistEnabled bool                            `json:"moderation_multitenant_blocklist_enabled"`
	ModerationVideoCallModerationEnabled  bool                            `json:"moderation_video_call_moderation_enabled"`
	ModerationWebhookUrl                  string                          `json:"moderation_webhook_url"`
	MultiTenantEnabled                    bool                            `json:"multi_tenant_enabled"`
	Name                                  string                          `json:"name"`
	Organization                          string                          `json:"organization"`
	PermissionVersion                     string                          `json:"permission_version"`
	Placement                             string                          `json:"placement"`
	RemindersInterval                     int                             `json:"reminders_interval"`
	SnsKey                                string                          `json:"sns_key"`
	SnsSecret                             string                          `json:"sns_secret"`
	SnsTopicArn                           string                          `json:"sns_topic_arn"`
	SqsKey                                string                          `json:"sqs_key"`
	SqsSecret                             string                          `json:"sqs_secret"`
	SqsUrl                                string                          `json:"sqs_url"`
	Suspended                             bool                            `json:"suspended"`
	SuspendedExplanation                  string                          `json:"suspended_explanation"`
	UseHookV2                             bool                            `json:"use_hook_v2"`
	UserResponseTimeEnabled               bool                            `json:"user_response_time_enabled"`
	WebhookUrl                            string                          `json:"webhook_url"`
	EventHooks                            []EventHook                     `json:"event_hooks"`
	UserSearchDisallowedRoles             []string                        `json:"user_search_disallowed_roles"`
	WebhookEvents                         []string                        `json:"webhook_events"`
	CallTypes                             map[string]*CallType            `json:"call_types"`
	ChannelConfigs                        map[string]*ChannelConfig       `json:"channel_configs"`
	FileUploadConfig                      FileUploadConfig                `json:"file_upload_config"`
	Grants                                map[string][]string             `json:"grants"`
	ImageUploadConfig                     FileUploadConfig                `json:"image_upload_config"`
	Policies                              map[string][]Policy             `json:"policies"`
	PushNotifications                     PushNotificationFields          `json:"push_notifications"`
	BeforeMessageSendHookAttemptTimeoutMs *int                            `json:"before_message_send_hook_attempt_timeout_ms,omitempty"`
	BeforeMessageSendHookUrl              *string                         `json:"before_message_send_hook_url,omitempty"`
	ChatPrimaryUseCase                    *string                         `json:"chat_primary_use_case,omitempty"`
	ModerationOnboardingComplete          *bool                           `json:"moderation_onboarding_complete,omitempty"`
	ModerationS3ImageAccessRoleArn        *string                         `json:"moderation_s3_image_access_role_arn,omitempty"`
	RevokeTokensIssuedBefore              *Timestamp                      `json:"revoke_tokens_issued_before,omitempty"`
	VideoPrimaryUseCase                   *string                         `json:"video_primary_use_case,omitempty"`
	AllowedFlagReasons                    []string                        `json:"allowed_flag_reasons,omitempty"`
	Geofences                             []GeofenceResponse              `json:"geofences,omitempty"`
	ImageModerationLabels                 []string                        `json:"image_moderation_labels,omitempty"`
	ActivityMetricsConfig                 map[string]int                  `json:"activity_metrics_config,omitempty"`
	DatadogInfo                           *DataDogInfo                    `json:"datadog_info,omitempty"`
	ModerationDashboardPreferences        *ModerationDashboardPreferences `json:"moderation_dashboard_preferences,omitempty"`
}

type AppealAcceptedEvent ΒΆ

type AppealAcceptedEvent struct {
	CreatedAt  Timestamp           `json:"created_at"`
	Custom     map[string]any      `json:"custom"`
	Type       string              `json:"type"`
	ReceivedAt *Timestamp          `json:"received_at,omitempty"`
	Appeal     *AppealItemResponse `json:"appeal,omitempty"`
}

This event is sent when an appeal is accepted

func (*AppealAcceptedEvent) GetEventType ΒΆ

func (e *AppealAcceptedEvent) GetEventType() string

type AppealCreatedEvent ΒΆ

type AppealCreatedEvent struct {
	CreatedAt  Timestamp           `json:"created_at"`
	Custom     map[string]any      `json:"custom"`
	Type       string              `json:"type"`
	ReceivedAt *Timestamp          `json:"received_at,omitempty"`
	Appeal     *AppealItemResponse `json:"appeal,omitempty"`
}

This event is sent when an appeal is created

func (*AppealCreatedEvent) GetEventType ΒΆ

func (e *AppealCreatedEvent) GetEventType() string

type AppealItemResponse ΒΆ

type AppealItemResponse struct {
	// Reason Text of the Appeal Item
	AppealReason string `json:"appeal_reason"`
	// When the flag was created
	CreatedAt Timestamp `json:"created_at"`
	// ID of the entity
	EntityID string `json:"entity_id"`
	// Type of entity
	EntityType string `json:"entity_type"`
	ID         string `json:"id"`
	// Status of the Appeal Item
	Status string `json:"status"`
	// When the flag was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Text severity level assigned by the AI provider
	AiTextSeverity *string `json:"ai_text_severity,omitempty"`
	// CID of the channel the entity belongs to, if applicable
	ChannelCid *string `json:"channel_cid,omitempty"`
	// Moderation policy key that was applied
	ConfigKey *string `json:"config_key,omitempty"`
	// Decision Reason of the Appeal Item
	DecisionReason *string `json:"decision_reason,omitempty"`
	// Action recommended by the automated moderation system (e.g. flag, remove, shadow)
	RecommendedAction *string `json:"recommended_action,omitempty"`
	// ID of the review queue item linked to this appeal, if the appeal was submitted with one
	ReviewQueueItemID *string `json:"review_queue_item_id,omitempty"`
	// Overall content severity score (1–100)
	Severity *int `json:"severity,omitempty"`
	// Full chronological history of all moderation actions on the review queue item
	Actions []ActionLogResponse `json:"actions,omitempty"`
	// Attachments(e.g. Images) of the Appeal Item
	Attachments []string `json:"attachments,omitempty"`
	// Classification labels from automated and manual review
	FlagLabels []string `json:"flag_labels,omitempty"`
	// Types of flags applied to the entity (e.g. user_report, bodyguard)
	FlagTypes []string `json:"flag_types,omitempty"`
	// Per-provider flag records explaining why the action was taken
	Flags                    []ModerationFlagResponse `json:"flags,omitempty"`
	EntityContent            *ModerationPayload       `json:"entity_content,omitempty"`
	ModerationAction         *ActionLogResponse       `json:"moderation_action,omitempty"`
	OriginalModerationAction *ActionLogResponse       `json:"original_moderation_action,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type AppealRejectedEvent ΒΆ

type AppealRejectedEvent struct {
	CreatedAt  Timestamp           `json:"created_at"`
	Custom     map[string]any      `json:"custom"`
	Type       string              `json:"type"`
	ReceivedAt *Timestamp          `json:"received_at,omitempty"`
	Appeal     *AppealItemResponse `json:"appeal,omitempty"`
}

This event is sent when an appeal is rejected

func (*AppealRejectedEvent) GetEventType ΒΆ

func (e *AppealRejectedEvent) GetEventType() string

type AppealRequest ΒΆ

type AppealRequest struct {
	// Explanation for why the content is being appealed
	AppealReason string `json:"appeal_reason"`
	// Unique identifier of the entity being appealed
	EntityID string `json:"entity_id"`
	// Type of entity being appealed (e.g., message, user)
	EntityType string `json:"entity_type"`
	// ID of the review queue item (flagged message) that triggered the ban. Applicable only for user ban appeals.
	ReviewQueueItemID *string `json:"review_queue_item_id,omitempty"`
	UserID            *string `json:"user_id,omitempty"`
	// Array of Attachment URLs(e.g., images)
	Attachments []string `json:"attachments"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type AppealResponse ΒΆ

type AppealResponse struct {
	// Unique identifier of the created Appeal item
	AppealID string `json:"appeal_id"`
	Duration string `json:"duration"`
}

type AsyncBulkImageModerationEvent ΒΆ

type AsyncBulkImageModerationEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	FinishedAt Timestamp      `json:"finished_at"`
	StartedAt  Timestamp      `json:"started_at"`
	TaskID     string         `json:"task_id"`
	Url        string         `json:"url"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

func (*AsyncBulkImageModerationEvent) GetEventType ΒΆ

func (e *AsyncBulkImageModerationEvent) GetEventType() string

type AsyncExportChannelsEvent ΒΆ

type AsyncExportChannelsEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	FinishedAt Timestamp      `json:"finished_at"`
	StartedAt  Timestamp      `json:"started_at"`
	TaskID     string         `json:"task_id"`
	Url        string         `json:"url"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

func (*AsyncExportChannelsEvent) GetEventType ΒΆ

func (e *AsyncExportChannelsEvent) GetEventType() string

type AsyncExportErrorEvent ΒΆ

type AsyncExportErrorEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	Error      string         `json:"error"`
	FinishedAt Timestamp      `json:"finished_at"`
	StartedAt  Timestamp      `json:"started_at"`
	TaskID     string         `json:"task_id"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

func (*AsyncExportErrorEvent) GetEventType ΒΆ

func (e *AsyncExportErrorEvent) GetEventType() string

type AsyncExportModerationLogsEvent ΒΆ

type AsyncExportModerationLogsEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	FinishedAt Timestamp      `json:"finished_at"`
	StartedAt  Timestamp      `json:"started_at"`
	TaskID     string         `json:"task_id"`
	Url        string         `json:"url"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

func (*AsyncExportModerationLogsEvent) GetEventType ΒΆ

func (e *AsyncExportModerationLogsEvent) GetEventType() string

type AsyncExportReviewQueueEvent ΒΆ

type AsyncExportReviewQueueEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	FinishedAt Timestamp      `json:"finished_at"`
	StartedAt  Timestamp      `json:"started_at"`
	TaskID     string         `json:"task_id"`
	Url        string         `json:"url"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

func (*AsyncExportReviewQueueEvent) GetEventType ΒΆ

func (e *AsyncExportReviewQueueEvent) GetEventType() string

type AsyncExportUsersEvent ΒΆ

type AsyncExportUsersEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	FinishedAt Timestamp      `json:"finished_at"`
	StartedAt  Timestamp      `json:"started_at"`
	TaskID     string         `json:"task_id"`
	Url        string         `json:"url"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

func (*AsyncExportUsersEvent) GetEventType ΒΆ

func (e *AsyncExportUsersEvent) GetEventType() string

type AsyncModerationCallbackConfig ΒΆ

type AsyncModerationCallbackConfig struct {
	Mode      *string `json:"mode,omitempty"`
	ServerUrl *string `json:"server_url,omitempty"`
}

type AsyncModerationConfiguration ΒΆ

type AsyncModerationConfiguration struct {
	TimeoutMs *int                           `json:"timeout_ms,omitempty"`
	Callback  *AsyncModerationCallbackConfig `json:"callback,omitempty"`
}

type Attachment ΒΆ

type Attachment struct {
	Custom         map[string]any `json:"custom"`
	AssetUrl       *string        `json:"asset_url,omitempty"`
	AuthorIcon     *string        `json:"author_icon,omitempty"`
	AuthorLink     *string        `json:"author_link,omitempty"`
	AuthorName     *string        `json:"author_name,omitempty"`
	Color          *string        `json:"color,omitempty"`
	Fallback       *string        `json:"fallback,omitempty"`
	Footer         *string        `json:"footer,omitempty"`
	FooterIcon     *string        `json:"footer_icon,omitempty"`
	ImageUrl       *string        `json:"image_url,omitempty"`
	OGScrapeUrl    *string        `json:"og_scrape_url,omitempty"`
	OriginalHeight *int           `json:"original_height,omitempty"`
	OriginalWidth  *int           `json:"original_width,omitempty"`
	Pretext        *string        `json:"pretext,omitempty"`
	Text           *string        `json:"text,omitempty"`
	ThumbUrl       *string        `json:"thumb_url,omitempty"`
	Title          *string        `json:"title,omitempty"`
	TitleLink      *string        `json:"title_link,omitempty"`
	// Attachment type (e.g. image, video, url)
	Type    *string  `json:"type,omitempty"`
	Actions []Action `json:"actions,omitempty"`
	Fields  []Field  `json:"fields,omitempty"`
	Giphy   *Images  `json:"giphy,omitempty"`
}

An attachment is a message object that represents a file uploaded by a user.

type Audience ΒΆ added in v5.3.0

type Audience struct {
	AvgConcurrentViewers  int                 `json:"avg_concurrent_viewers"`
	HoursWatched          float64             `json:"hours_watched"`
	PeakConcurrentViewers int                 `json:"peak_concurrent_viewers"`
	UniqueViewers         int                 `json:"unique_viewers"`
	ViewerConnections     int                 `json:"viewer_connections"`
	ConcurrencyByMinute   []ConcurrencyMinute `json:"concurrency_by_minute"`
	PeakAt                *string             `json:"peak_at,omitempty"`
	RampUpMinTo90pctPeak  *int                `json:"ramp_up_min_to_90pct_peak,omitempty"`
	RetentionAt90pctMark  *float64            `json:"retention_at_90pct_mark,omitempty"`
	RetentionAtMidpoint   *float64            `json:"retention_at_midpoint,omitempty"`
	Shape                 *string             `json:"shape,omitempty"`
}

type AudioSettings ΒΆ

type AudioSettings struct {
	AccessRequestEnabled   bool                       `json:"access_request_enabled"`
	DefaultDevice          string                     `json:"default_device"`
	HifiAudioEnabled       bool                       `json:"hifi_audio_enabled"`
	MicDefaultOn           bool                       `json:"mic_default_on"`
	OpusDtxEnabled         bool                       `json:"opus_dtx_enabled"`
	RedundantCodingEnabled bool                       `json:"redundant_coding_enabled"`
	SpeakerDefaultOn       bool                       `json:"speaker_default_on"`
	NoiseCancellation      *NoiseCancellationSettings `json:"noise_cancellation,omitempty"`
}

type AudioSettingsRequest ΒΆ

type AudioSettingsRequest struct {
	DefaultDevice          string                     `json:"default_device"`
	AccessRequestEnabled   *bool                      `json:"access_request_enabled,omitempty"`
	HifiAudioEnabled       *bool                      `json:"hifi_audio_enabled,omitempty"`
	MicDefaultOn           *bool                      `json:"mic_default_on,omitempty"`
	OpusDtxEnabled         *bool                      `json:"opus_dtx_enabled,omitempty"`
	RedundantCodingEnabled *bool                      `json:"redundant_coding_enabled,omitempty"`
	SpeakerDefaultOn       *bool                      `json:"speaker_default_on,omitempty"`
	NoiseCancellation      *NoiseCancellationSettings `json:"noise_cancellation,omitempty"`
}

type AudioSettingsResponse ΒΆ

type AudioSettingsResponse struct {
	AccessRequestEnabled   bool                       `json:"access_request_enabled"`
	DefaultDevice          string                     `json:"default_device"`
	HifiAudioEnabled       bool                       `json:"hifi_audio_enabled"`
	MicDefaultOn           bool                       `json:"mic_default_on"`
	OpusDtxEnabled         bool                       `json:"opus_dtx_enabled"`
	RedundantCodingEnabled bool                       `json:"redundant_coding_enabled"`
	SpeakerDefaultOn       bool                       `json:"speaker_default_on"`
	NoiseCancellation      *NoiseCancellationSettings `json:"noise_cancellation,omitempty"`
}

type AutomodDetailsResponse ΒΆ

type AutomodDetailsResponse struct {
	Action              *string                     `json:"action,omitempty"`
	OriginalMessageType *string                     `json:"original_message_type,omitempty"`
	ImageLabels         []string                    `json:"image_labels,omitempty"`
	MessageDetails      *FlagMessageDetailsResponse `json:"message_details,omitempty"`
	// Result of the message moderation
	Result *MessageModerationResult `json:"result,omitempty"`
}

type AutomodPlatformCircumventionConfig ΒΆ

type AutomodPlatformCircumventionConfig struct {
	Async   *bool         `json:"async,omitempty"`
	Enabled *bool         `json:"enabled,omitempty"`
	Rules   []AutomodRule `json:"rules,omitempty"`
}

type AutomodRule ΒΆ

type AutomodRule struct {
	Action    string  `json:"action"`
	Label     string  `json:"label"`
	Threshold float64 `json:"threshold"`
}

type AutomodSemanticFiltersConfig ΒΆ

type AutomodSemanticFiltersConfig struct {
	Async   *bool                        `json:"async,omitempty"`
	Enabled *bool                        `json:"enabled,omitempty"`
	Rules   []AutomodSemanticFiltersRule `json:"rules,omitempty"`
}

type AutomodSemanticFiltersRule ΒΆ

type AutomodSemanticFiltersRule struct {
	Action    string  `json:"action"`
	Name      string  `json:"name"`
	Threshold float64 `json:"threshold"`
}

type AutomodToxicityConfig ΒΆ

type AutomodToxicityConfig struct {
	Async   *bool         `json:"async,omitempty"`
	Enabled *bool         `json:"enabled,omitempty"`
	Rules   []AutomodRule `json:"rules,omitempty"`
}

type AzureRequest ΒΆ

type AzureRequest struct {
	// The account name
	AbsAccountName string `json:"abs_account_name"`
	// The client id
	AbsClientID string `json:"abs_client_id"`
	// The client secret
	AbsClientSecret string `json:"abs_client_secret"`
	// The tenant id
	AbsTenantID string `json:"abs_tenant_id"`
}

Config for creating Azure Blob Storage storage

type BackstageSettings ΒΆ

type BackstageSettings struct {
	Enabled              bool `json:"enabled"`
	JoinAheadTimeSeconds *int `json:"join_ahead_time_seconds,omitempty"`
}

type BackstageSettingsRequest ΒΆ

type BackstageSettingsRequest struct {
	Enabled              *bool `json:"enabled,omitempty"`
	JoinAheadTimeSeconds *int  `json:"join_ahead_time_seconds,omitempty"`
}

type BackstageSettingsResponse ΒΆ

type BackstageSettingsResponse struct {
	Enabled              bool `json:"enabled"`
	JoinAheadTimeSeconds *int `json:"join_ahead_time_seconds,omitempty"`
}

type BanActionRequestPayload ΒΆ

type BanActionRequestPayload struct {
	// Also ban user from all channels this moderator creates in the future
	BanFromFutureChannels *bool `json:"ban_from_future_channels,omitempty"`
	// Ban only from specific channel
	ChannelBanOnly *bool   `json:"channel_ban_only,omitempty"`
	ChannelCid     *string `json:"channel_cid,omitempty"`
	// Message deletion mode: soft, pruning, or hard
	DeleteMessages *string `json:"delete_messages,omitempty"`
	// Whether to ban by IP address
	IpBan *bool `json:"ip_ban,omitempty"`
	// Reason for the ban
	Reason *string `json:"reason,omitempty"`
	// Whether this is a shadow ban
	Shadow *bool `json:"shadow,omitempty"`
	// Optional: ban user directly without review item
	TargetUserID *string `json:"target_user_id,omitempty"`
	// Duration of ban in minutes
	Timeout *int `json:"timeout,omitempty"`
}

Configuration for ban moderation action

type BanInfoResponse ΒΆ

type BanInfoResponse struct {
	// When the ban was created
	CreatedAt Timestamp `json:"created_at"`
	// The channel this ban applies to. Empty if this is an app-wide (global) ban rather than a per-channel ban.
	ChannelCid *string `json:"channel_cid,omitempty"`
	// When the ban expires
	Expires *Timestamp `json:"expires,omitempty"`
	// Reason for the ban
	Reason *string `json:"reason,omitempty"`
	// Whether this is a shadow ban
	Shadow  *bool            `json:"shadow,omitempty"`
	Channel *ChannelMetadata `json:"channel,omitempty"`
	// User response object
	CreatedBy *UserResponse `json:"created_by,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

Ban information

type BanOptions ΒΆ

type BanOptions struct {
	DeleteMessages *string `json:"delete_messages,omitempty"`
	Duration       *int    `json:"duration,omitempty"`
	IpBan          *bool   `json:"ip_ban,omitempty"`
	Reason         *string `json:"reason,omitempty"`
	ShadowBan      *bool   `json:"shadow_ban,omitempty"`
}

type BanRequest ΒΆ

type BanRequest struct {
	// ID of the user to ban
	TargetUserID string `json:"target_user_id"`
	// ID of the user performing the ban
	BannedByID *string `json:"banned_by_id,omitempty"`
	// Channel where the ban applies
	ChannelCid     *string `json:"channel_cid,omitempty"`
	DeleteMessages *string `json:"delete_messages,omitempty"`
	// Whether to ban the user's IP address
	IpBan *bool `json:"ip_ban,omitempty"`
	// Optional explanation for the ban
	Reason *string `json:"reason,omitempty"`
	// Whether this is a shadow ban
	Shadow *bool `json:"shadow,omitempty"`
	// Duration of the ban in minutes
	Timeout *int `json:"timeout,omitempty"`
	// User request object
	BannedBy *UserRequest `json:"banned_by,omitempty"`
}

type BanResponse ΒΆ

type BanResponse struct {
	CreatedAt Timestamp  `json:"created_at"`
	Expires   *Timestamp `json:"expires,omitempty"`
	Reason    *string    `json:"reason,omitempty"`
	Shadow    *bool      `json:"shadow,omitempty"`
	// User response object
	BannedBy *UserResponse `json:"banned_by,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type BatchQueryActivityReactionsRequest ΒΆ

type BatchQueryActivityReactionsRequest struct {
	// Activity IDs to fetch the user's reactions for (max 100)
	ActivityIds []string `json:"activity_ids"`
	Limit       *int     `json:"limit,omitempty"`
	Next        *string  `json:"next,omitempty"`
	Prev        *string  `json:"prev,omitempty"`
	// Server-side only. The user whose reactions to fetch; defaults to the authenticated user for client-side requests
	UserID *string            `json:"user_id,omitempty"`
	Sort   []SortParamRequest `json:"sort"`
	// Optional filter on reaction_type or created_at
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type BatchQueryActivityReactionsResponse ΒΆ

type BatchQueryActivityReactionsResponse struct {
	// Duration of the request in milliseconds
	Duration  string                  `json:"duration"`
	Reactions []FeedsReactionResponse `json:"reactions"`
	Next      *string                 `json:"next,omitempty"`
	Prev      *string                 `json:"prev,omitempty"`
}

Basic response information

type BatchQueryCommentReactionsRequest ΒΆ

type BatchQueryCommentReactionsRequest struct {
	// Comment IDs to fetch the user's reactions for (max 100)
	CommentIds []string `json:"comment_ids"`
	Limit      *int     `json:"limit,omitempty"`
	Next       *string  `json:"next,omitempty"`
	Prev       *string  `json:"prev,omitempty"`
	// Server-side only. The user whose reactions to fetch; defaults to the authenticated user for client-side requests
	UserID *string            `json:"user_id,omitempty"`
	Sort   []SortParamRequest `json:"sort"`
	// Optional filter on reaction_type or created_at
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type BatchQueryCommentReactionsResponse ΒΆ

type BatchQueryCommentReactionsResponse struct {
	// Duration of the request in milliseconds
	Duration  string                  `json:"duration"`
	Reactions []FeedsReactionResponse `json:"reactions"`
	Next      *string                 `json:"next,omitempty"`
	Prev      *string                 `json:"prev,omitempty"`
}

Basic response information

type BlockActionRequestPayload ΒΆ

type BlockActionRequestPayload struct {
	// Reason for blocking
	Reason *string `json:"reason,omitempty"`
}

Configuration for block action

type BlockListConfig ΒΆ

type BlockListConfig struct {
	Async          *bool           `json:"async,omitempty"`
	Enabled        *bool           `json:"enabled,omitempty"`
	MatchSubstring *bool           `json:"match_substring,omitempty"`
	Rules          []BlockListRule `json:"rules,omitempty"`
}

type BlockListOptions ΒΆ

type BlockListOptions struct {
	// Blocklist behavior. One of: flag, block, shadow_block
	Behavior string `json:"behavior"`
	// Blocklist name
	Blocklist string `json:"blocklist"`
}

type BlockListResponse ΒΆ

type BlockListResponse struct {
	IsConfusableFoldingEnabled bool `json:"is_confusable_folding_enabled"`
	IsLeetCheckEnabled         bool `json:"is_leet_check_enabled"`
	IsPluralCheckEnabled       bool `json:"is_plural_check_enabled"`
	IsSubstringMatchingEnabled bool `json:"is_substring_matching_enabled"`
	// Block list name
	Name string `json:"name"`
	// Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word
	Type string `json:"type"`
	// List of words to block
	Words []string `json:"words"`
	// Date/time of creation
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	ID          *string    `json:"id,omitempty"`
	OwnerUserID *string    `json:"owner_user_id,omitempty"`
	Team        *string    `json:"team,omitempty"`
	// Date/time of the last update
	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
}

Block list contains restricted words

type BlockListRule ΒΆ

type BlockListRule struct {
	Action string  `json:"action"`
	Name   *string `json:"name,omitempty"`
	Team   *string `json:"team,omitempty"`
}

type BlockUserRequest ΒΆ

type BlockUserRequest struct {
	// the user to block
	UserID string `json:"user_id"`
}

type BlockUserResponse ΒΆ

type BlockUserResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

BlockUserResponse is the payload for blocking a user.

type BlockUsersRequest ΒΆ

type BlockUsersRequest struct {
	// User id to block
	BlockedUserID string  `json:"blocked_user_id"`
	UserID        *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type BlockUsersResponse ΒΆ

type BlockUsersResponse struct {
	// User id who blocked another user
	BlockedByUserID string `json:"blocked_by_user_id"`
	// User id who got blocked
	BlockedUserID string `json:"blocked_user_id"`
	// Timestamp when the user was blocked
	CreatedAt Timestamp `json:"created_at"`
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

type BlockedUserEvent ΒΆ

type BlockedUserEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.blocked_user" in this case
	Type string `json:"type"`
	// User response object
	BlockedByUser *UserResponse `json:"blocked_by_user,omitempty"`
}

This event is sent to call participants to notify when a user is blocked on a call, clients can use this event to show a notification. If the user is the current user, the client should leave the call screen as well

func (*BlockedUserEvent) GetEventType ΒΆ

func (e *BlockedUserEvent) GetEventType() string

type BlockedUserResponse ΒΆ

type BlockedUserResponse struct {
	// ID of the user who got blocked
	BlockedUserID string    `json:"blocked_user_id"`
	CreatedAt     Timestamp `json:"created_at"`
	// ID of the user who blocked another user
	UserID string `json:"user_id"`
	// User response object
	BlockedUser UserResponse `json:"blocked_user"`
	// User response object
	User UserResponse `json:"user"`
}

type BodyguardImageAnalysisConfig ΒΆ

type BodyguardImageAnalysisConfig struct {
	Rules []BodyguardRule `json:"rules,omitempty"`
}

type BodyguardProfileSummary ΒΆ

type BodyguardProfileSummary struct {
	Name        string  `json:"name"`
	DisplayName *string `json:"display_name,omitempty"`
	TextType    *string `json:"text_type,omitempty"`
}

type BodyguardRule ΒΆ

type BodyguardRule struct {
	Label         string                  `json:"label"`
	Action        *string                 `json:"action,omitempty"`
	SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}

type BodyguardSeverityRule ΒΆ

type BodyguardSeverityRule struct {
	Action   string `json:"action"`
	Severity string `json:"severity"`
}

type BookmarkAddedEvent ΒΆ

type BookmarkAddedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Bookmark  BookmarkResponse `json:"bookmark"`
	Custom    map[string]any   `json:"custom"`
	// The type of event: "feeds.bookmark.added" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a user bookmarks an activity.

func (*BookmarkAddedEvent) GetEventType ΒΆ

func (e *BookmarkAddedEvent) GetEventType() string

type BookmarkDeletedEvent ΒΆ

type BookmarkDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Bookmark  BookmarkResponse `json:"bookmark"`
	Custom    map[string]any   `json:"custom"`
	// The type of event: "feeds.bookmark.deleted" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a user deletes a bookmark from an activity.

func (*BookmarkDeletedEvent) GetEventType ΒΆ

func (e *BookmarkDeletedEvent) GetEventType() string

type BookmarkFolderDeletedEvent ΒΆ

type BookmarkFolderDeletedEvent struct {
	// Date/time of creation
	CreatedAt      Timestamp              `json:"created_at"`
	BookmarkFolder BookmarkFolderResponse `json:"bookmark_folder"`
	Custom         map[string]any         `json:"custom"`
	// The type of event: "feeds.bookmark_folder.deleted" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a bookmark folder is deleted.

func (*BookmarkFolderDeletedEvent) GetEventType ΒΆ

func (e *BookmarkFolderDeletedEvent) GetEventType() string

type BookmarkFolderResponse ΒΆ

type BookmarkFolderResponse struct {
	// When the folder was created
	CreatedAt Timestamp `json:"created_at"`
	// Unique identifier for the folder
	ID string `json:"id"`
	// Name of the folder
	Name string `json:"name"`
	// When the folder was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// User response object
	User UserResponse `json:"user"`
	// Custom data for the folder
	Custom map[string]any `json:"custom,omitempty"`
}

type BookmarkFolderUpdatedEvent ΒΆ

type BookmarkFolderUpdatedEvent struct {
	// Date/time of creation
	CreatedAt      Timestamp              `json:"created_at"`
	BookmarkFolder BookmarkFolderResponse `json:"bookmark_folder"`
	Custom         map[string]any         `json:"custom"`
	// The type of event: "feeds.bookmark_folder.updated" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a bookmark folder is updated.

func (*BookmarkFolderUpdatedEvent) GetEventType ΒΆ

func (e *BookmarkFolderUpdatedEvent) GetEventType() string

type BookmarkResponse ΒΆ

type BookmarkResponse struct {
	// When the bookmark was created
	CreatedAt Timestamp `json:"created_at"`
	// ID of the bookmarked object
	ObjectID string `json:"object_id"`
	// Type of the bookmarked object (activity or comment)
	ObjectType string `json:"object_type"`
	// When the bookmark was last updated
	UpdatedAt Timestamp        `json:"updated_at"`
	Activity  ActivityResponse `json:"activity"`
	// User response object
	User       UserResponse     `json:"user"`
	ActivityID *string          `json:"activity_id,omitempty"`
	Comment    *CommentResponse `json:"comment,omitempty"`
	// Custom data for the bookmark
	Custom map[string]any          `json:"custom,omitempty"`
	Folder *BookmarkFolderResponse `json:"folder,omitempty"`
}

type BookmarkUpdatedEvent ΒΆ

type BookmarkUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Bookmark  BookmarkResponse `json:"bookmark"`
	Custom    map[string]any   `json:"custom"`
	// The type of event: "feeds.bookmark.updated" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a user updates a bookmark.

func (*BookmarkUpdatedEvent) GetEventType ΒΆ

func (e *BookmarkUpdatedEvent) GetEventType() string

type Bound ΒΆ

type Bound struct {
	Inclusive bool    `json:"inclusive"`
	Value     float64 `json:"value"`
}

type BroadcastDailyRollup ΒΆ added in v5.3.0

type BroadcastDailyRollup struct {
	Broadcasts               int            `json:"broadcasts"`
	Day                      string         `json:"day"`
	DeadAirS                 int            `json:"dead_air_s"`
	HoursWatched             float64        `json:"hours_watched"`
	IncidentWindows          int            `json:"incident_windows"`
	MaxPeakConcurrentViewers int            `json:"max_peak_concurrent_viewers"`
	Note                     string         `json:"note"`
	SchemaVersion            string         `json:"schema_version"`
	SourceDrops              int            `json:"source_drops"`
	UniqueViewersSum         int            `json:"unique_viewers_sum"`
	TopBroadcasts            []TopBroadcast `json:"top_broadcasts"`
	PoorViewersByCause       PoorByCause    `json:"poor_viewers_by_cause"`
}

type BroadcastDigest ΒΆ added in v5.3.0

type BroadcastDigest struct {
	SchemaVersion string         `json:"schema_version"`
	Audience      Audience       `json:"audience"`
	Broadcast     BroadcastInfo  `json:"broadcast"`
	Coverage      Coverage       `json:"coverage"`
	Joins         Joins          `json:"joins"`
	PoorTail      PoorTail       `json:"poor_tail"`
	Quality       Quality        `json:"quality"`
	Segments      Segments       `json:"segments"`
	Source        SourceHealth   `json:"source"`
	Viewers       ViewerBehavior `json:"viewers"`
}

type BroadcastInfo ΒΆ added in v5.3.0

type BroadcastInfo struct {
	AppID         int      `json:"app_id"`
	CallCid       string   `json:"call_cid"`
	CallSessionID string   `json:"call_session_id"`
	CallType      string   `json:"call_type"`
	DurationMin   float64  `json:"duration_min"`
	EndedAt       string   `json:"ended_at"`
	StartedAt     string   `json:"started_at"`
	Creators      []string `json:"creators"`
	SourceMode    *string  `json:"source_mode,omitempty"`
}

type BroadcastSegment ΒΆ added in v5.3.0

type BroadcastSegment struct {
	Key             string   `json:"key"`
	Sessions        int      `json:"sessions"`
	AvgQualityScore *float64 `json:"avg_quality_score,omitempty"`
	P5QualityScore  *float64 `json:"p5_quality_score,omitempty"`
	PoorPct         *float64 `json:"poor_pct,omitempty"`
	SharePct        *float64 `json:"share_pct,omitempty"`
	WatchSharePct   *float64 `json:"watch_share_pct,omitempty"`
}

type BroadcastSettings ΒΆ

type BroadcastSettings struct {
	Enabled bool          `json:"enabled"`
	HLS     *HLSSettings  `json:"hls,omitempty"`
	RTMP    *RTMPSettings `json:"rtmp,omitempty"`
}

type BroadcastSettingsRequest ΒΆ

type BroadcastSettingsRequest struct {
	Enabled *bool                `json:"enabled,omitempty"`
	HLS     *HLSSettingsRequest  `json:"hls,omitempty"`
	RTMP    *RTMPSettingsRequest `json:"rtmp,omitempty"`
}

type BroadcastSettingsResponse ΒΆ

type BroadcastSettingsResponse struct {
	Enabled bool `json:"enabled"`
	// HLSSettings is the payload for HLS settings
	HLS HLSSettingsResponse `json:"hls"`
	// RTMPSettingsResponse is the payload for RTMP settings
	RTMP RTMPSettingsResponse `json:"rtmp"`
}

BroadcastSettingsResponse is the payload for broadcasting settings

type BrowserDataResponse ΒΆ

type BrowserDataResponse struct {
	Name    *string `json:"name,omitempty"`
	Version *string `json:"version,omitempty"`
}

type BulkActionAppealsRequest ΒΆ

type BulkActionAppealsRequest struct {
	// Action to apply: unban, restore, unblock, mark_reviewed, or reject_appeal
	ActionType string `json:"action_type"`
	// List of appeal UUIDs to process
	AppealIds []string `json:"appeal_ids"`
	UserID    *string  `json:"user_id,omitempty"`
	// Configuration for mark reviewed action
	MarkReviewed *MarkReviewedRequestPayload `json:"mark_reviewed,omitempty"`
	// Configuration for rejecting an appeal
	RejectAppeal *RejectAppealRequestPayload `json:"reject_appeal,omitempty"`
	// Configuration for restore action
	Restore *RestoreActionRequestPayload `json:"restore,omitempty"`
	// Configuration for unban moderation action
	Unban *UnbanActionRequestPayload `json:"unban,omitempty"`
	// Configuration for unblock action
	Unblock *UnblockActionRequestPayload `json:"unblock,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type BulkActionAppealsResponse ΒΆ

type BulkActionAppealsResponse struct {
	Duration string `json:"duration"`
	// Appeals that could not be processed, with per-item error messages
	Errors []BulkAppealError `json:"errors"`
	// Successfully processed appeals
	Results []BulkAppealResult `json:"results"`
}

type BulkAppealError ΒΆ

type BulkAppealError struct {
	AppealID string `json:"appeal_id"`
	Error    string `json:"error"`
}

type BulkAppealResult ΒΆ

type BulkAppealResult struct {
	AppealID   string              `json:"appeal_id"`
	AppealItem *AppealItemResponse `json:"appeal_item,omitempty"`
}

type BulkDeleteActionConfigRequest ΒΆ

type BulkDeleteActionConfigRequest struct {
	// UUIDs of the action configs to delete
	Ids    []string `json:"ids"`
	UserID *string  `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type BulkDeleteActionConfigResponse ΒΆ

type BulkDeleteActionConfigResponse struct {
	// Number of action configs deleted
	Deleted  int    `json:"deleted"`
	Duration string `json:"duration"`
}

type BulkImageModerationRequest ΒΆ

type BulkImageModerationRequest struct {
	// URL to CSV file containing image URLs to moderate
	CsvFile string `json:"csv_file"`
}

type BulkImageModerationResponse ΒΆ

type BulkImageModerationResponse struct {
	Duration string `json:"duration"`
	// ID of the task for processing the bulk image moderation
	TaskID string `json:"task_id"`
}

type BulkUpsertActionConfigRequest ΒΆ

type BulkUpsertActionConfigRequest struct {
	// List of action configs to create or update
	ActionConfigs []UpsertActionConfigItem `json:"action_configs"`
	UserID        *string                  `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type BulkUpsertActionConfigResponse ΒΆ

type BulkUpsertActionConfigResponse struct {
	Duration string `json:"duration"`
	// The created or updated action configs in the same order as the request
	ActionConfigs []ModerationActionConfigResponse `json:"action_configs"`
}

type BypassActionRequest ΒΆ

type BypassActionRequest struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type BypassRequest ΒΆ

type BypassRequest struct {
	// Whether to enable moderation bypass for this user
	Enabled bool `json:"enabled"`
	// ID of the user to update
	TargetUserID string `json:"target_user_id"`
}

type BypassResponse ΒΆ

type BypassResponse struct {
	Duration string `json:"duration"`
}

type Call ΒΆ

type Call struct {
	// contains filtered or unexported fields
}

func NewCall ΒΆ

func NewCall(callType string, callID string, client *VideoClient) *Call

func (*Call) BlockUser ΒΆ

func (c *Call) BlockUser(ctx context.Context, request *BlockUserRequest) (*StreamResponse[BlockUserResponse], error)

func (*Call) CreateSRTCredentials ΒΆ

func (c *Call) CreateSRTCredentials(userID string) (*SRTCredentials, error)

func (*Call) Delete ΒΆ

func (*Call) DeleteRecording ΒΆ

func (c *Call) DeleteRecording(ctx context.Context, session string, filename string, request *DeleteRecordingRequest) (*StreamResponse[DeleteRecordingResponse], error)

func (*Call) DeleteTranscription ΒΆ

func (c *Call) DeleteTranscription(ctx context.Context, session string, filename string, request *DeleteTranscriptionRequest) (*StreamResponse[DeleteTranscriptionResponse], error)

func (*Call) End ΒΆ

func (*Call) Get ΒΆ

func (*Call) GetCallParticipantSessionMetrics ΒΆ

func (c *Call) GetCallParticipantSessionMetrics(ctx context.Context, session string, user string, userSession string, request *GetCallParticipantSessionMetricsRequest) (*StreamResponse[GetCallParticipantSessionMetricsResponse], error)

func (*Call) GetCallReport ΒΆ

func (c *Call) GetCallReport(ctx context.Context, request *GetCallReportRequest) (*StreamResponse[GetCallReportResponse], error)

func (*Call) GetOrCreate ΒΆ

func (*Call) GoLive ΒΆ

func (c *Call) GoLive(ctx context.Context, request *GoLiveRequest) (*StreamResponse[GoLiveResponse], error)

func (*Call) KickUser ΒΆ

func (c *Call) KickUser(ctx context.Context, request *KickUserRequest) (*StreamResponse[KickUserResponse], error)

func (*Call) ListRecordings ΒΆ

func (*Call) MuteUsers ΒΆ

func (c *Call) MuteUsers(ctx context.Context, request *MuteUsersRequest) (*StreamResponse[MuteUsersResponse], error)

func (*Call) Ring ΒΆ

func (*Call) SendCallEvent ΒΆ

func (c *Call) SendCallEvent(ctx context.Context, request *SendCallEventRequest) (*StreamResponse[SendCallEventResponse], error)

func (*Call) StartRecording ΒΆ

func (c *Call) StartRecording(ctx context.Context, recordingType string, request *StartRecordingRequest) (*StreamResponse[StartRecordingResponse], error)

func (*Call) StopLive ΒΆ

func (c *Call) StopLive(ctx context.Context, request *StopLiveRequest) (*StreamResponse[StopLiveResponse], error)

func (*Call) StopRTMPBroadcast ΒΆ

func (c *Call) StopRTMPBroadcast(ctx context.Context, name string, request *StopRTMPBroadcastRequest) (*StreamResponse[StopRTMPBroadcastsResponse], error)

func (*Call) StopRecording ΒΆ

func (c *Call) StopRecording(ctx context.Context, recordingType string, request *StopRecordingRequest) (*StreamResponse[StopRecordingResponse], error)

func (*Call) UnblockUser ΒΆ

func (c *Call) UnblockUser(ctx context.Context, request *UnblockUserRequest) (*StreamResponse[UnblockUserResponse], error)

func (*Call) Update ΒΆ

func (*Call) VideoPin ΒΆ

func (c *Call) VideoPin(ctx context.Context, request *VideoPinRequest) (*StreamResponse[PinResponse], error)

func (*Call) VideoUnpin ΒΆ

func (c *Call) VideoUnpin(ctx context.Context, request *VideoUnpinRequest) (*StreamResponse[UnpinResponse], error)

type CallAcceptedEvent ΒΆ

type CallAcceptedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Represents a call
	Call CallResponse `json:"call"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.accepted" in this case
	Type string `json:"type"`
}

This event is sent when a user accepts a notification to join a call.

func (*CallAcceptedEvent) GetEventType ΒΆ

func (e *CallAcceptedEvent) GetEventType() string

type CallActionOptions ΒΆ

type CallActionOptions struct {
	Duration    *int    `json:"duration,omitempty"`
	FlagReason  *string `json:"flag_reason,omitempty"`
	KickReason  *string `json:"kick_reason,omitempty"`
	MuteAudio   *bool   `json:"mute_audio,omitempty"`
	MuteVideo   *bool   `json:"mute_video,omitempty"`
	Reason      *string `json:"reason,omitempty"`
	WarningText *string `json:"warning_text,omitempty"`
}

type CallClosedCaption ΒΆ

type CallClosedCaption struct {
	EndTime    Timestamp `json:"end_time"`
	ID         string    `json:"id"`
	Language   string    `json:"language"`
	SpeakerID  string    `json:"speaker_id"`
	StartTime  Timestamp `json:"start_time"`
	Text       string    `json:"text"`
	Translated bool      `json:"translated"`
	// User response object
	User    UserResponse `json:"user"`
	Service *string      `json:"service,omitempty"`
}

CallClosedCaption represents a closed caption of a call.

type CallClosedCaptionsFailedEvent ΒΆ

type CallClosedCaptionsFailedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The type of event: "call.closed_captions_failed" in this case
	Type string `json:"type"`
}

This event is sent when call closed captions has failed

func (*CallClosedCaptionsFailedEvent) GetEventType ΒΆ

func (e *CallClosedCaptionsFailedEvent) GetEventType() string

type CallClosedCaptionsStartedEvent ΒΆ

type CallClosedCaptionsStartedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The type of event: "call.closed_captions_started" in this case
	Type string `json:"type"`
}

This event is sent when call closed caption has started

func (*CallClosedCaptionsStartedEvent) GetEventType ΒΆ

func (e *CallClosedCaptionsStartedEvent) GetEventType() string

type CallClosedCaptionsStoppedEvent ΒΆ

type CallClosedCaptionsStoppedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The type of event: "call.transcription_stopped" in this case
	Type string `json:"type"`
}

This event is sent when call closed captions has stopped

func (*CallClosedCaptionsStoppedEvent) GetEventType ΒΆ

func (e *CallClosedCaptionsStoppedEvent) GetEventType() string

type CallCreatedEvent ΒΆ

type CallCreatedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// the members added to this call
	Members []MemberResponse `json:"members"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.created" in this case
	Type string `json:"type"`
}

This event is sent when a call is created. Clients receiving this event should check if the ringing field is set to true and if so, show the call screen

func (*CallCreatedEvent) GetEventType ΒΆ

func (e *CallCreatedEvent) GetEventType() string

type CallCustomPropertyParameters ΒΆ

type CallCustomPropertyParameters struct {
	Operator    *string `json:"operator,omitempty"`
	PropertyKey *string `json:"property_key,omitempty"`
}

type CallDTMFEvent ΒΆ

type CallDTMFEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The DTMF digit (0-9, *, #, A-D)
	Digit string `json:"digit"`
	// Duration of the digit press in milliseconds
	DurationMs int `json:"duration_ms"`
	// Monotonically increasing sequence number for ordering DTMF events within a session
	SeqNumber int `json:"seq_number"`
	// When the digit press ended and was detected
	Timestamp Timestamp `json:"timestamp"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.dtmf" in this case
	Type string `json:"type"`
}

This event is sent asynchronously when a single DTMF digit is received from a SIP participant. The event is broadcast after the digit press ends. Use seq_number for ordering within a session and timestamp for the actual detection time.

func (*CallDTMFEvent) GetEventType ΒΆ

func (e *CallDTMFEvent) GetEventType() string

type CallDeletedEvent ΒΆ

type CallDeletedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.deleted" in this case
	Type string `json:"type"`
}

This event is sent when a call is deleted. Clients receiving this event should leave the call screen

func (*CallDeletedEvent) GetEventType ΒΆ

func (e *CallDeletedEvent) GetEventType() string

type CallDurationReport ΒΆ

type CallDurationReport struct {
	Histogram []ReportByHistogramBucket `json:"histogram"`
}

type CallDurationReportResponse ΒΆ

type CallDurationReportResponse struct {
	Daily []DailyAggregateCallDurationReportResponse `json:"daily"`
}

type CallEndedEvent ΒΆ

type CallEndedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.ended" in this case
	Type string `json:"type"`
	// The reason why the call ended, if available
	Reason *string `json:"reason,omitempty"`
	// The list of members in the call
	Members []MemberResponse `json:"members,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

This event is sent when a call is mark as ended for all its participants. Clients receiving this event should leave the call screen

func (*CallEndedEvent) GetEventType ΒΆ

func (e *CallEndedEvent) GetEventType() string

type CallFrameRecordingFailedEvent ΒΆ

type CallFrameRecordingFailedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.frame_recording_failed" in this case
	Type string `json:"type"`
}

This event is sent when frame recording has failed

func (*CallFrameRecordingFailedEvent) GetEventType ΒΆ

func (e *CallFrameRecordingFailedEvent) GetEventType() string

type CallFrameRecordingFrameReadyEvent ΒΆ

type CallFrameRecordingFrameReadyEvent struct {
	CallCid string `json:"call_cid"`
	// The time the frame was captured
	CapturedAt Timestamp `json:"captured_at"`
	CreatedAt  Timestamp `json:"created_at"`
	EgressID   string    `json:"egress_id"`
	// Call session ID
	SessionID string `json:"session_id"`
	// The type of the track frame was captured from (TRACK_TYPE_VIDEO|TRACK_TYPE_SCREEN_SHARE)
	TrackType string `json:"track_type"`
	// The URL of the frame
	Url string `json:"url"`
	// The users in the frame
	Users map[string]UserResponse `json:"users"`
	// The type of event: "call.frame_recording_ready" in this case
	Type string `json:"type"`
}

This event is sent when a frame is captured from a call

func (*CallFrameRecordingFrameReadyEvent) GetEventType ΒΆ

func (e *CallFrameRecordingFrameReadyEvent) GetEventType() string

type CallFrameRecordingStartedEvent ΒΆ

type CallFrameRecordingStartedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.frame_recording_started" in this case
	Type string `json:"type"`
}

This event is sent when frame recording has started

func (*CallFrameRecordingStartedEvent) GetEventType ΒΆ

func (e *CallFrameRecordingStartedEvent) GetEventType() string

type CallFrameRecordingStoppedEvent ΒΆ

type CallFrameRecordingStoppedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.frame_recording_stopped" in this case
	Type string `json:"type"`
}

This event is sent when frame recording has stopped

func (*CallFrameRecordingStoppedEvent) GetEventType ΒΆ

func (e *CallFrameRecordingStoppedEvent) GetEventType() string

type CallHLSBroadcastingFailedEvent ΒΆ

type CallHLSBroadcastingFailedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The type of event: "call.hls_broadcasting_failed" in this case
	Type string `json:"type"`
}

This event is sent when HLS broadcasting has failed

func (*CallHLSBroadcastingFailedEvent) GetEventType ΒΆ

func (e *CallHLSBroadcastingFailedEvent) GetEventType() string

type CallHLSBroadcastingStartedEvent ΒΆ

type CallHLSBroadcastingStartedEvent struct {
	CallCid        string    `json:"call_cid"`
	CreatedAt      Timestamp `json:"created_at"`
	HLSPlaylistUrl string    `json:"hls_playlist_url"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.hls_broadcasting_started" in this case
	Type string `json:"type"`
}

This event is sent when HLS broadcasting has started

func (*CallHLSBroadcastingStartedEvent) GetEventType ΒΆ

func (e *CallHLSBroadcastingStartedEvent) GetEventType() string

type CallHLSBroadcastingStoppedEvent ΒΆ

type CallHLSBroadcastingStoppedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The type of event: "call.hls_broadcasting_stopped" in this case
	Type string `json:"type"`
}

This event is sent when HLS broadcasting has stopped

func (*CallHLSBroadcastingStoppedEvent) GetEventType ΒΆ

func (e *CallHLSBroadcastingStoppedEvent) GetEventType() string

type CallIngressResponse ΒΆ

type CallIngressResponse struct {
	// RTMP input settings
	RTMP RTMPIngress `json:"rtmp"`
	Srt  SRTIngress  `json:"srt"`
	Whip WHIPIngress `json:"whip"`
}

CallIngressResponse is the payload for ingress settings

type CallLevelEventPayload ΒΆ

type CallLevelEventPayload struct {
	EventType string         `json:"event_type"`
	Timestamp int            `json:"timestamp"`
	UserID    string         `json:"user_id"`
	Payload   map[string]any `json:"payload,omitempty"`
}

type CallLiveStartedEvent ΒΆ

type CallLiveStartedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.live_started" in this case
	Type string `json:"type"`
}

This event is sent when a call is started. Clients receiving this event should start the call.

func (*CallLiveStartedEvent) GetEventType ΒΆ

func (e *CallLiveStartedEvent) GetEventType() string

type CallMemberAddedEvent ΒΆ

type CallMemberAddedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// the members added to this call
	Members []MemberResponse `json:"members"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.member_added" in this case
	Type string `json:"type"`
}

This event is sent when one or more members are added to a call

func (*CallMemberAddedEvent) GetEventType ΒΆ

func (e *CallMemberAddedEvent) GetEventType() string

type CallMemberRemovedEvent ΒΆ

type CallMemberRemovedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// the list of member IDs removed from the call
	Members []string `json:"members"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.member_removed" in this case
	Type string `json:"type"`
}

This event is sent when one or more members are removed from a call

func (*CallMemberRemovedEvent) GetEventType ΒΆ

func (e *CallMemberRemovedEvent) GetEventType() string

type CallMemberUpdatedEvent ΒΆ

type CallMemberUpdatedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The list of members that were updated
	Members []MemberResponse `json:"members"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.member_updated" in this case
	Type string `json:"type"`
}

This event is sent when one or more members are updated

func (*CallMemberUpdatedEvent) GetEventType ΒΆ

func (e *CallMemberUpdatedEvent) GetEventType() string

type CallMemberUpdatedPermissionEvent ΒΆ

type CallMemberUpdatedPermissionEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The list of members that were updated
	Members []MemberResponse `json:"members"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The capabilities by role for this call
	CapabilitiesByRole map[string][]string `json:"capabilities_by_role"`
	// The type of event: "call.member_added" in this case
	Type string `json:"type"`
}

This event is sent when one or more members get its role updated

func (*CallMemberUpdatedPermissionEvent) GetEventType ΒΆ

func (e *CallMemberUpdatedPermissionEvent) GetEventType() string

type CallMissedEvent ΒΆ

type CallMissedEvent struct {
	CallCid    string    `json:"call_cid"`
	CreatedAt  Timestamp `json:"created_at"`
	NotifyUser bool      `json:"notify_user"`
	// Call session ID
	SessionID string `json:"session_id"`
	// List of members who missed the call
	Members []MemberResponse `json:"members"`
	// Represents a call
	Call CallResponse `json:"call"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.notification" in this case
	Type string `json:"type"`
}

This event is sent to call members who did not accept/reject/join the call to notify they missed the call

func (*CallMissedEvent) GetEventType ΒΆ

func (e *CallMissedEvent) GetEventType() string

type CallModerationBlurEvent ΒΆ

type CallModerationBlurEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The user ID whose video stream is being blurred
	UserID string `json:"user_id"`
	// Custom data associated with the moderation action
	Custom map[string]any `json:"custom"`
	// The type of event: "call.moderation_blur" in this case
	Type string `json:"type"`
}

This event is sent when a moderation blur action is applied to a user's video stream

func (*CallModerationBlurEvent) GetEventType ΒΆ

func (e *CallModerationBlurEvent) GetEventType() string

type CallModerationWarningEvent ΒΆ

type CallModerationWarningEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The warning message
	Message string `json:"message"`
	// The user ID who is receiving the warning
	UserID string `json:"user_id"`
	// Custom data associated with the moderation action
	Custom map[string]any `json:"custom"`
	// The type of event: "call.moderation_warning" in this case
	Type string `json:"type"`
}

This event is sent when a moderation warning is issued to a user

func (*CallModerationWarningEvent) GetEventType ΒΆ

func (e *CallModerationWarningEvent) GetEventType() string

type CallNotificationEvent ΒΆ

type CallNotificationEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Call session ID
	SessionID string `json:"session_id"`
	// Call members
	Members []MemberResponse `json:"members"`
	// Represents a call
	Call CallResponse `json:"call"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.notification" in this case
	Type string `json:"type"`
}

This event is sent to all call members to notify they are getting called

func (*CallNotificationEvent) GetEventType ΒΆ

func (e *CallNotificationEvent) GetEventType() string

type CallParticipantCountReport ΒΆ

type CallParticipantCountReport struct {
	Histogram []ReportByHistogramBucket `json:"histogram"`
}

type CallParticipantCountReportResponse ΒΆ

type CallParticipantCountReportResponse struct {
	Daily []DailyAggregateCallParticipantCountReportResponse `json:"daily"`
}

type CallParticipantResponse ΒΆ

type CallParticipantResponse struct {
	JoinedAt      Timestamp `json:"joined_at"`
	Role          string    `json:"role"`
	UserSessionID string    `json:"user_session_id"`
	// User response object
	User UserResponse `json:"user"`
}

type CallParticipantTimeline ΒΆ

type CallParticipantTimeline struct {
	Severity  string         `json:"severity"`
	Timestamp Timestamp      `json:"timestamp"`
	Type      string         `json:"type"`
	Data      map[string]any `json:"data"`
}

type CallReactionEvent ΒΆ

type CallReactionEvent struct {
	CallCid   string                `json:"call_cid"`
	CreatedAt Timestamp             `json:"created_at"`
	Reaction  VideoReactionResponse `json:"reaction"`
	// The type of event: "call.reaction_new" in this case
	Type string `json:"type"`
}

This event is sent when a reaction is sent in a call, clients should use this to show the reaction in the call screen

func (*CallReactionEvent) GetEventType ΒΆ

func (e *CallReactionEvent) GetEventType() string

type CallRecording ΒΆ

type CallRecording struct {
	EndTime       Timestamp `json:"end_time"`
	Filename      string    `json:"filename"`
	RecordingType string    `json:"recording_type"`
	SessionID     string    `json:"session_id"`
	StartTime     Timestamp `json:"start_time"`
	Url           string    `json:"url"`
}

CallRecording represents a recording of a call.

type CallRecordingFailedEvent ΒΆ

type CallRecordingFailedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// The type of recording
	RecordingType string `json:"recording_type"`
	// The type of event: "call.recording_failed" in this case
	Type string `json:"type"`
}

This event is sent when call recording has failed

func (*CallRecordingFailedEvent) GetEventType ΒΆ

func (e *CallRecordingFailedEvent) GetEventType() string

type CallRecordingReadyEvent ΒΆ

type CallRecordingReadyEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// The type of recording
	RecordingType string `json:"recording_type"`
	// CallRecording represents a recording of a call.
	CallRecording CallRecording `json:"call_recording"`
	// The type of event: "call.recording_ready" in this case
	Type string `json:"type"`
}

This event is sent when call recording is ready

func (*CallRecordingReadyEvent) GetEventType ΒΆ

func (e *CallRecordingReadyEvent) GetEventType() string

type CallRecordingStartedEvent ΒΆ

type CallRecordingStartedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// The type of recording
	RecordingType string `json:"recording_type"`
	// The type of event: "call.recording_started" in this case
	Type string `json:"type"`
}

This event is sent when call recording has started

func (*CallRecordingStartedEvent) GetEventType ΒΆ

func (e *CallRecordingStartedEvent) GetEventType() string

type CallRecordingStoppedEvent ΒΆ

type CallRecordingStoppedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// The type of recording
	RecordingType string `json:"recording_type"`
	// The type of event: "call.recording_stopped" in this case
	Type string `json:"type"`
}

This event is sent when call recording has stopped

func (*CallRecordingStoppedEvent) GetEventType ΒΆ

func (e *CallRecordingStoppedEvent) GetEventType() string

type CallRejectedEvent ΒΆ

type CallRejectedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Represents a call
	Call CallResponse `json:"call"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.rejected" in this case
	Type string `json:"type"`
	// Provides information about why the call was rejected. You can provide any value, but the Stream API and SDKs use these default values: rejected, cancel, timeout and busy
	Reason *string `json:"reason,omitempty"`
}

This event is sent when a user rejects a notification to join a call.

func (*CallRejectedEvent) GetEventType ΒΆ

func (e *CallRejectedEvent) GetEventType() string

type CallReportResponse ΒΆ

type CallReportResponse struct {
	Score     float64    `json:"score"`
	EndedAt   *Timestamp `json:"ended_at,omitempty"`
	StartedAt *Timestamp `json:"started_at,omitempty"`
}

type CallRequest ΒΆ

type CallRequest struct {
	ChannelCid  *string         `json:"channel_cid,omitempty"`
	CreatedByID *string         `json:"created_by_id,omitempty"`
	StartsAt    *Timestamp      `json:"starts_at,omitempty"`
	Team        *string         `json:"team,omitempty"`
	Video       *bool           `json:"video,omitempty"`
	Members     []MemberRequest `json:"members,omitempty"`
	// User request object
	CreatedBy        *UserRequest         `json:"created_by,omitempty"`
	Custom           map[string]any       `json:"custom,omitempty"`
	SettingsOverride *CallSettingsRequest `json:"settings_override,omitempty"`
}

CallRequest is the payload for creating a call.

type CallResponse ΒΆ

type CallResponse struct {
	Backstage  bool `json:"backstage"`
	Captioning bool `json:"captioning"`
	// The unique identifier for a call (<type>:<id>)
	Cid string `json:"cid"`
	// Date/time of creation
	CreatedAt        Timestamp `json:"created_at"`
	CurrentSessionID string    `json:"current_session_id"`
	// Call ID
	ID           string `json:"id"`
	Recording    bool   `json:"recording"`
	Transcribing bool   `json:"transcribing"`
	Translating  bool   `json:"translating"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// The type of call
	Type           string   `json:"type"`
	BlockedUserIds []string `json:"blocked_user_ids"`
	// User response object
	CreatedBy UserResponse `json:"created_by"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	Egress EgressResponse `json:"egress"`
	// CallIngressResponse is the payload for ingress settings
	Ingress    CallIngressResponse  `json:"ingress"`
	Settings   CallSettingsResponse `json:"settings"`
	ChannelCid *string              `json:"channel_cid,omitempty"`
	// Date/time when the call ended
	EndedAt              *Timestamp `json:"ended_at,omitempty"`
	JoinAheadTimeSeconds *int       `json:"join_ahead_time_seconds,omitempty"`
	// 10-digit routing number for SIP routing
	RoutingNumber *string `json:"routing_number,omitempty"`
	// Date/time when the call will start
	StartsAt   *Timestamp           `json:"starts_at,omitempty"`
	Team       *string              `json:"team,omitempty"`
	Session    *CallSessionResponse `json:"session,omitempty"`
	Thumbnails *ThumbnailResponse   `json:"thumbnails,omitempty"`
}

Represents a call

type CallRingEvent ΒΆ

type CallRingEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Call session ID
	SessionID string `json:"session_id"`
	Video     bool   `json:"video"`
	// Call members
	Members []MemberResponse `json:"members"`
	// Represents a call
	Call CallResponse `json:"call"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.notification" in this case
	Type string `json:"type"`
}

This event is sent to all call members to notify they are getting called

func (*CallRingEvent) GetEventType ΒΆ

func (e *CallRingEvent) GetEventType() string

type CallRtmpBroadcastFailedEvent ΒΆ

type CallRtmpBroadcastFailedEvent struct {
	// The unique identifier for a call (<type>:<id>)
	CallCid string `json:"call_cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Name of the given RTMP broadcast
	Name string `json:"name"`
	// The type of event: "call.rtmp_broadcast_failed" in this case
	Type string `json:"type"`
}

This event is sent when a call RTMP broadcast has failed

func (*CallRtmpBroadcastFailedEvent) GetEventType ΒΆ

func (e *CallRtmpBroadcastFailedEvent) GetEventType() string

type CallRtmpBroadcastStartedEvent ΒΆ

type CallRtmpBroadcastStartedEvent struct {
	// The unique identifier for a call (<type>:<id>)
	CallCid string `json:"call_cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Name of the given RTMP broadcast
	Name string `json:"name"`
	// The type of event: "call.rtmp_broadcast_started" in this case
	Type string `json:"type"`
}

This event is sent when RTMP broadcast has started

func (*CallRtmpBroadcastStartedEvent) GetEventType ΒΆ

func (e *CallRtmpBroadcastStartedEvent) GetEventType() string

type CallRtmpBroadcastStoppedEvent ΒΆ

type CallRtmpBroadcastStoppedEvent struct {
	// The unique identifier for a call (<type>:<id>)
	CallCid string `json:"call_cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Name of the given RTMP broadcast
	Name string `json:"name"`
	// The type of event: "call.rtmp_broadcast_stopped" in this case
	Type string `json:"type"`
}

This event is sent when RTMP broadcast has stopped

func (*CallRtmpBroadcastStoppedEvent) GetEventType ΒΆ

func (e *CallRtmpBroadcastStoppedEvent) GetEventType() string

type CallRuleActionSequence ΒΆ

type CallRuleActionSequence struct {
	ViolationNumber *int               `json:"violation_number,omitempty"`
	Actions         []string           `json:"actions,omitempty"`
	CallOptions     *CallActionOptions `json:"call_options,omitempty"`
}

type CallSessionEndedEvent ΒΆ

type CallSessionEndedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Call session ID
	SessionID string `json:"session_id"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.session_ended" in this case
	Type string `json:"type"`
}

This event is sent when a call session ends

func (*CallSessionEndedEvent) GetEventType ΒΆ

func (e *CallSessionEndedEvent) GetEventType() string

type CallSessionParticipantCountsUpdatedEvent ΒΆ

type CallSessionParticipantCountsUpdatedEvent struct {
	AnonymousParticipantCount int       `json:"anonymous_participant_count"`
	CallCid                   string    `json:"call_cid"`
	CreatedAt                 Timestamp `json:"created_at"`
	// Call session ID
	SessionID               string         `json:"session_id"`
	ParticipantsCountByRole map[string]int `json:"participants_count_by_role"`
	// The type of event: "call.session_participant_count_updated" in this case
	Type string `json:"type"`
}

This event is sent when the participant counts in a call session are updated

func (*CallSessionParticipantCountsUpdatedEvent) GetEventType ΒΆ

type CallSessionParticipantJoinedEvent ΒΆ

type CallSessionParticipantJoinedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Call session ID
	SessionID   string                  `json:"session_id"`
	Participant CallParticipantResponse `json:"participant"`
	// The type of event: "call.session_participant_joined" in this case
	Type string `json:"type"`
}

This event is sent when a participant joins a call session

func (*CallSessionParticipantJoinedEvent) GetEventType ΒΆ

func (e *CallSessionParticipantJoinedEvent) GetEventType() string

type CallSessionParticipantLeftEvent ΒΆ

type CallSessionParticipantLeftEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The duration participant was in the session in seconds
	DurationSeconds int `json:"duration_seconds"`
	// Call session ID
	SessionID   string                  `json:"session_id"`
	Participant CallParticipantResponse `json:"participant"`
	// The type of event: "call.session_participant_left" in this case
	Type string `json:"type"`
	// The reason why the participant left the session
	Reason *string `json:"reason,omitempty"`
}

This event is sent when a participant leaves a call session

func (*CallSessionParticipantLeftEvent) GetEventType ΒΆ

func (e *CallSessionParticipantLeftEvent) GetEventType() string

type CallSessionResponse ΒΆ

type CallSessionResponse struct {
	AnonymousParticipantCount int                       `json:"anonymous_participant_count"`
	ID                        string                    `json:"id"`
	Participants              []CallParticipantResponse `json:"participants"`
	AcceptedBy                map[string]Timestamp      `json:"accepted_by"`
	MissedBy                  map[string]Timestamp      `json:"missed_by"`
	ParticipantsCountByRole   map[string]int            `json:"participants_count_by_role"`
	RejectedBy                map[string]Timestamp      `json:"rejected_by"`
	EndedAt                   *Timestamp                `json:"ended_at,omitempty"`
	LiveEndedAt               *Timestamp                `json:"live_ended_at,omitempty"`
	LiveStartedAt             *Timestamp                `json:"live_started_at,omitempty"`
	StartedAt                 *Timestamp                `json:"started_at,omitempty"`
	TimerEndsAt               *Timestamp                `json:"timer_ends_at,omitempty"`
}

type CallSessionStartedEvent ΒΆ

type CallSessionStartedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Call session ID
	SessionID string `json:"session_id"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The type of event: "call.session_started" in this case
	Type string `json:"type"`
}

This event is sent when a call session starts

func (*CallSessionStartedEvent) GetEventType ΒΆ

func (e *CallSessionStartedEvent) GetEventType() string

type CallSettings ΒΆ

type CallSettings struct {
	Audio               *AudioSettings            `json:"audio,omitempty"`
	Backstage           *BackstageSettings        `json:"backstage,omitempty"`
	Broadcasting        *BroadcastSettings        `json:"broadcasting,omitempty"`
	FrameRecording      *FrameRecordSettings      `json:"frame_recording,omitempty"`
	Geofencing          *GeofenceSettings         `json:"geofencing,omitempty"`
	IndividualRecording *IndividualRecordSettings `json:"individual_recording,omitempty"`
	Ingress             *IngressSettings          `json:"ingress,omitempty"`
	Limits              *LimitsSettings           `json:"limits,omitempty"`
	RawRecording        *RawRecordSettings        `json:"raw_recording,omitempty"`
	Recording           *RecordSettings           `json:"recording,omitempty"`
	Ring                *RingSettings             `json:"ring,omitempty"`
	Screensharing       *ScreensharingSettings    `json:"screensharing,omitempty"`
	Session             *SessionSettings          `json:"session,omitempty"`
	Thumbnails          *ThumbnailsSettings       `json:"thumbnails,omitempty"`
	Transcription       *TranscriptionSettings    `json:"transcription,omitempty"`
	Video               *VideoSettings            `json:"video,omitempty"`
}

type CallSettingsRequest ΒΆ

type CallSettingsRequest struct {
	Audio               *AudioSettingsRequest               `json:"audio,omitempty"`
	Backstage           *BackstageSettingsRequest           `json:"backstage,omitempty"`
	Broadcasting        *BroadcastSettingsRequest           `json:"broadcasting,omitempty"`
	Encryption          *EncryptionSettingsRequest          `json:"encryption,omitempty"`
	FrameRecording      *FrameRecordingSettingsRequest      `json:"frame_recording,omitempty"`
	Geofencing          *GeofenceSettingsRequest            `json:"geofencing,omitempty"`
	IndividualRecording *IndividualRecordingSettingsRequest `json:"individual_recording,omitempty"`
	Ingress             *IngressSettingsRequest             `json:"ingress,omitempty"`
	Limits              *LimitsSettingsRequest              `json:"limits,omitempty"`
	RawRecording        *RawRecordingSettingsRequest        `json:"raw_recording,omitempty"`
	Recording           *RecordSettingsRequest              `json:"recording,omitempty"`
	Ring                *RingSettingsRequest                `json:"ring,omitempty"`
	Screensharing       *ScreensharingSettingsRequest       `json:"screensharing,omitempty"`
	Session             *SessionSettingsRequest             `json:"session,omitempty"`
	Thumbnails          *ThumbnailsSettingsRequest          `json:"thumbnails,omitempty"`
	Transcription       *TranscriptionSettingsRequest       `json:"transcription,omitempty"`
	Video               *VideoSettingsRequest               `json:"video,omitempty"`
}

type CallSettingsResponse ΒΆ

type CallSettingsResponse struct {
	Audio     AudioSettingsResponse     `json:"audio"`
	Backstage BackstageSettingsResponse `json:"backstage"`
	// BroadcastSettingsResponse is the payload for broadcasting settings
	Broadcasting BroadcastSettingsResponse `json:"broadcasting"`
	// EncryptionSettings is the payload for end-to-end encryption settings
	Encryption          EncryptionSettingsResponse          `json:"encryption"`
	FrameRecording      FrameRecordingSettingsResponse      `json:"frame_recording"`
	Geofencing          GeofenceSettingsResponse            `json:"geofencing"`
	IndividualRecording IndividualRecordingSettingsResponse `json:"individual_recording"`
	Limits              LimitsSettingsResponse              `json:"limits"`
	RawRecording        RawRecordingSettingsResponse        `json:"raw_recording"`
	// RecordSettings is the payload for recording settings
	Recording     RecordSettingsResponse        `json:"recording"`
	Ring          RingSettingsResponse          `json:"ring"`
	Screensharing ScreensharingSettingsResponse `json:"screensharing"`
	Session       SessionSettingsResponse       `json:"session"`
	Thumbnails    ThumbnailsSettingsResponse    `json:"thumbnails"`
	Transcription TranscriptionSettingsResponse `json:"transcription"`
	Video         VideoSettingsResponse         `json:"video"`
	Ingress       *IngressSettingsResponse      `json:"ingress,omitempty"`
}

type CallStateResponseFields ΒΆ

type CallStateResponseFields struct {
	// List of call members
	Members         []MemberResponse `json:"members"`
	OwnCapabilities []OwnCapability  `json:"own_capabilities"`
	// Represents a call
	Call CallResponse `json:"call"`
}

CallStateResponseFields is the payload for call state response

type CallStatsLocation ΒΆ

type CallStatsLocation struct {
	AccuracyRadiusMeters *int     `json:"accuracy_radius_meters,omitempty"`
	City                 *string  `json:"city,omitempty"`
	Continent            *string  `json:"continent,omitempty"`
	Country              *string  `json:"country,omitempty"`
	CountryIsoCode       *string  `json:"country_iso_code,omitempty"`
	Latitude             *float64 `json:"latitude,omitempty"`
	Longitude            *float64 `json:"longitude,omitempty"`
	Subdivision          *string  `json:"subdivision,omitempty"`
}

type CallStatsMapLocation ΒΆ

type CallStatsMapLocation struct {
	Count     int                `json:"count"`
	LiveCount int                `json:"live_count"`
	Location  *CallStatsLocation `json:"location,omitempty"`
}

type CallStatsMapPublisher ΒΆ

type CallStatsMapPublisher struct {
	IsLive          bool                `json:"is_live"`
	UserID          string              `json:"user_id"`
	UserSessionID   string              `json:"user_session_id"`
	PublishedTracks PublishedTrackFlags `json:"published_tracks"`
	Name            *string             `json:"name,omitempty"`
	PublisherType   *string             `json:"publisher_type,omitempty"`
	Location        *CallStatsLocation  `json:"location,omitempty"`
}

type CallStatsMapPublishers ΒΆ

type CallStatsMapPublishers struct {
	Publishers []CallStatsMapPublisher `json:"publishers"`
}

type CallStatsMapSFUs ΒΆ

type CallStatsMapSFUs struct {
	Locations []SFULocationResponse `json:"locations"`
}

type CallStatsMapSubscriber ΒΆ

type CallStatsMapSubscriber struct {
	IsLive        bool               `json:"is_live"`
	UserID        string             `json:"user_id"`
	UserSessionID string             `json:"user_session_id"`
	Name          *string            `json:"name,omitempty"`
	Location      *CallStatsLocation `json:"location,omitempty"`
}

type CallStatsMapSubscribers ΒΆ

type CallStatsMapSubscribers struct {
	Locations    []CallStatsMapLocation   `json:"locations"`
	Participants []CallStatsMapSubscriber `json:"participants,omitempty"`
}

type CallStatsParticipant ΒΆ

type CallStatsParticipant struct {
	UserID           string                        `json:"user_id"`
	Sessions         []CallStatsParticipantSession `json:"sessions"`
	LatestActivityAt *Timestamp                    `json:"latest_activity_at,omitempty"`
	Name             *string                       `json:"name,omitempty"`
	Roles            []string                      `json:"roles,omitempty"`
}

type CallStatsParticipantCounts ΒΆ

type CallStatsParticipantCounts struct {
	LiveSessions             int      `json:"live_sessions"`
	Participants             int      `json:"participants"`
	PeakConcurrentSessions   int      `json:"peak_concurrent_sessions"`
	PeakConcurrentUsers      int      `json:"peak_concurrent_users"`
	Publishers               int      `json:"publishers"`
	Sessions                 int      `json:"sessions"`
	SfusUsed                 int      `json:"sfus_used"`
	AverageJitterMs          *int     `json:"average_jitter_ms,omitempty"`
	AverageLatencyMs         *int     `json:"average_latency_ms,omitempty"`
	AvgUserRating            *float64 `json:"avg_user_rating,omitempty"`
	CallEventCount           *int     `json:"call_event_count,omitempty"`
	CqScore                  *int     `json:"cq_score,omitempty"`
	MaxFreezesDurationMs     *int     `json:"max_freezes_duration_ms,omitempty"`
	MinUserRating            *int     `json:"min_user_rating,omitempty"`
	TotalParticipantDuration *int     `json:"total_participant_duration,omitempty"`
}

type CallStatsParticipantSession ΒΆ

type CallStatsParticipantSession struct {
	IsLive                  bool                `json:"is_live"`
	UserSessionID           string              `json:"user_session_id"`
	PublishedTracks         PublishedTrackFlags `json:"published_tracks"`
	Browser                 *string             `json:"browser,omitempty"`
	BrowserVersion          *string             `json:"browser_version,omitempty"`
	CqScore                 *int                `json:"cq_score,omitempty"`
	CurrentIp               *string             `json:"current_ip,omitempty"`
	CurrentSfu              *string             `json:"current_sfu,omitempty"`
	DistanceToSfuKilometers *float64            `json:"distance_to_sfu_kilometers,omitempty"`
	EndedAt                 *Timestamp          `json:"ended_at,omitempty"`
	FreezesDurationMs       *int                `json:"freezes_duration_ms,omitempty"`
	Ingress                 *string             `json:"ingress,omitempty"`
	JitterMs                *int                `json:"jitter_ms,omitempty"`
	LatencyMs               *int                `json:"latency_ms,omitempty"`
	Os                      *string             `json:"os,omitempty"`
	PublisherType           *string             `json:"publisher_type,omitempty"`
	Sdk                     *string             `json:"sdk,omitempty"`
	SdkVersion              *string             `json:"sdk_version,omitempty"`
	StartedAt               *Timestamp          `json:"started_at,omitempty"`
	UnifiedSessionID        *string             `json:"unified_session_id,omitempty"`
	WebrtcVersion           *string             `json:"webrtc_version,omitempty"`
	Location                *CallStatsLocation  `json:"location,omitempty"`
}

type CallStatsReportReadyEvent ΒΆ

type CallStatsReportReadyEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Call session ID
	SessionID string                     `json:"session_id"`
	Counts    CallStatsParticipantCounts `json:"counts"`
	// The type of event, "call.report_ready" in this case
	Type string `json:"type"`
	// Whether participants_overview is truncated by the server-side limit
	IsTrimmed *bool `json:"is_trimmed,omitempty"`
	// Top participant sessions overview
	ParticipantsOverview []CallStatsParticipant `json:"participants_overview,omitempty"`
}

This event is sent when the insights report is ready

func (*CallStatsReportReadyEvent) GetEventType ΒΆ

func (e *CallStatsReportReadyEvent) GetEventType() string

type CallStatsReportSummaryResponse ΒΆ

type CallStatsReportSummaryResponse struct {
	CallCid             string     `json:"call_cid"`
	CallDurationSeconds int        `json:"call_duration_seconds"`
	CallSessionID       string     `json:"call_session_id"`
	CallStatus          string     `json:"call_status"`
	FirstStatsTime      Timestamp  `json:"first_stats_time"`
	CreatedAt           *Timestamp `json:"created_at,omitempty"`
	MinUserRating       *int       `json:"min_user_rating,omitempty"`
	QualityScore        *int       `json:"quality_score,omitempty"`
}

type CallStatsSessionResponse ΒΆ

type CallStatsSessionResponse struct {
	CallID        string                     `json:"call_id"`
	CallSessionID string                     `json:"call_session_id"`
	CallType      string                     `json:"call_type"`
	GeneratedAt   Timestamp                  `json:"generated_at"`
	Counts        CallStatsParticipantCounts `json:"counts"`
	CallEndedAt   *Timestamp                 `json:"call_ended_at,omitempty"`
	CallStartedAt *Timestamp                 `json:"call_started_at,omitempty"`
}

type CallTranscription ΒΆ

type CallTranscription struct {
	EndTime   Timestamp `json:"end_time"`
	Filename  string    `json:"filename"`
	SessionID string    `json:"session_id"`
	StartTime Timestamp `json:"start_time"`
	Url       string    `json:"url"`
}

CallTranscription represents a transcription of a call.

type CallTranscriptionFailedEvent ΒΆ

type CallTranscriptionFailedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// The type of event: "call.transcription_failed" in this case
	Type string `json:"type"`
	// The error message detailing why transcription failed.
	Error *string `json:"error,omitempty"`
}

This event is sent when call transcription has failed

func (*CallTranscriptionFailedEvent) GetEventType ΒΆ

func (e *CallTranscriptionFailedEvent) GetEventType() string

type CallTranscriptionReadyEvent ΒΆ

type CallTranscriptionReadyEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// CallTranscription represents a transcription of a call.
	CallTranscription CallTranscription `json:"call_transcription"`
	// The type of event: "call.transcription_ready" in this case
	Type string `json:"type"`
}

This event is sent when call transcription is ready

func (*CallTranscriptionReadyEvent) GetEventType ΒΆ

func (e *CallTranscriptionReadyEvent) GetEventType() string

type CallTranscriptionStartedEvent ΒΆ

type CallTranscriptionStartedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// The type of event: "call.transcription_started" in this case
	Type string `json:"type"`
}

This event is sent when call transcription has started

func (*CallTranscriptionStartedEvent) GetEventType ΒΆ

func (e *CallTranscriptionStartedEvent) GetEventType() string

type CallTranscriptionStoppedEvent ΒΆ

type CallTranscriptionStoppedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	EgressID  string    `json:"egress_id"`
	// The type of event: "call.transcription_stopped" in this case
	Type string `json:"type"`
}

This event is sent when call transcription has stopped

func (*CallTranscriptionStoppedEvent) GetEventType ΒΆ

func (e *CallTranscriptionStoppedEvent) GetEventType() string

type CallType ΒΆ

type CallType struct {
	App                      int                   `json:"app"`
	CreatedAt                Timestamp             `json:"created_at"`
	ID                       int                   `json:"id"`
	Name                     string                `json:"name"`
	RecordingExternalStorage string                `json:"recording_external_storage"`
	UpdatedAt                Timestamp             `json:"updated_at"`
	NotificationSettings     *NotificationSettings `json:"notification_settings,omitempty"`
	Settings                 *CallSettings         `json:"settings,omitempty"`
}

type CallTypeResponse ΒΆ

type CallTypeResponse struct {
	// the time the call type was created
	CreatedAt Timestamp `json:"created_at"`
	// the name of the call type
	Name string `json:"name"`
	// the time the call type was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// the permissions granted to each role
	Grants               map[string][]string          `json:"grants"`
	NotificationSettings NotificationSettingsResponse `json:"notification_settings"`
	Settings             CallSettingsResponse         `json:"settings"`
	// the external storage for the call type
	ExternalStorage *string `json:"external_storage,omitempty"`
}

CallTypeResponse is the payload for a call type.

type CallTypeRuleParameters ΒΆ

type CallTypeRuleParameters struct {
	CallType *string `json:"call_type,omitempty"`
}

type CallUpdatedEvent ΒΆ

type CallUpdatedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Represents a call
	Call CallResponse `json:"call"`
	// The capabilities by role for this call
	CapabilitiesByRole map[string][]string `json:"capabilities_by_role"`
	// The type of event: "call.updated" in this case
	Type string `json:"type"`
}

This event is sent when a call is updated, clients should use this update the local state of the call. This event also contains the capabilities by role for the call, clients should update the own_capability for the current.

func (*CallUpdatedEvent) GetEventType ΒΆ

func (e *CallUpdatedEvent) GetEventType() string

type CallUserFeedbackSubmittedEvent ΒΆ

type CallUserFeedbackSubmittedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The rating given by the user (1-5)
	Rating int `json:"rating"`
	// Call session ID
	SessionID string `json:"session_id"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event, "call.user_feedback" in this case
	Type string `json:"type"`
	// The reason provided by the user for the rating
	Reason     *string `json:"reason,omitempty"`
	Sdk        *string `json:"sdk,omitempty"`
	SdkVersion *string `json:"sdk_version,omitempty"`
	// Custom data provided by the user
	Custom map[string]any `json:"custom,omitempty"`
}

This event is sent when a user submits feedback for a call.

func (*CallUserFeedbackSubmittedEvent) GetEventType ΒΆ

func (e *CallUserFeedbackSubmittedEvent) GetEventType() string

type CallUserMutedEvent ΒΆ

type CallUserMutedEvent struct {
	CallCid      string    `json:"call_cid"`
	CreatedAt    Timestamp `json:"created_at"`
	FromUserID   string    `json:"from_user_id"`
	Reason       string    `json:"reason"`
	MutedUserIds []string  `json:"muted_user_ids"`
	// The type of event: "call.user_muted" in this case
	Type string `json:"type"`
}

This event is sent when a call member is muted

func (*CallUserMutedEvent) GetEventType ΒΆ

func (e *CallUserMutedEvent) GetEventType() string

type CallViolationCountParameters ΒΆ

type CallViolationCountParameters struct {
	Threshold  *int    `json:"threshold,omitempty"`
	TimeWindow *string `json:"time_window,omitempty"`
}

type CallsPerDayReport ΒΆ

type CallsPerDayReport struct {
	Count int `json:"count"`
}

type CallsPerDayReportResponse ΒΆ

type CallsPerDayReportResponse struct {
	Daily []DailyAggregateCallsPerDayReportResponse `json:"daily"`
}

type CampaignChannelMember ΒΆ

type CampaignChannelMember struct {
	UserID      string         `json:"user_id"`
	ChannelRole *string        `json:"channel_role,omitempty"`
	Custom      map[string]any `json:"custom,omitempty"`
}

type CampaignChannelTemplate ΒΆ

type CampaignChannelTemplate struct {
	Type            string                  `json:"type"`
	ID              *string                 `json:"id,omitempty"`
	Team            *string                 `json:"team,omitempty"`
	Members         []string                `json:"members,omitempty"`
	MembersTemplate []CampaignChannelMember `json:"members_template,omitempty"`
	Custom          map[string]any          `json:"custom,omitempty"`
}

type CampaignCompletedEvent ΒΆ

type CampaignCompletedEvent struct {
	CreatedAt  Timestamp         `json:"created_at"`
	Custom     map[string]any    `json:"custom"`
	Type       string            `json:"type"`
	ReceivedAt *Timestamp        `json:"received_at,omitempty"`
	Campaign   *CampaignResponse `json:"campaign,omitempty"`
}

func (*CampaignCompletedEvent) GetEventType ΒΆ

func (e *CampaignCompletedEvent) GetEventType() string

type CampaignMessageTemplate ΒΆ

type CampaignMessageTemplate struct {
	Text        string         `json:"text"`
	PollID      *string        `json:"poll_id,omitempty"`
	Searchable  *bool          `json:"searchable,omitempty"`
	Attachments []Attachment   `json:"attachments,omitempty"`
	Custom      map[string]any `json:"custom,omitempty"`
}

type CampaignResponse ΒΆ

type CampaignResponse struct {
	CreateChannels   bool                     `json:"create_channels"`
	CreatedAt        Timestamp                `json:"created_at"`
	Description      string                   `json:"description"`
	ID               string                   `json:"id"`
	Name             string                   `json:"name"`
	SenderID         string                   `json:"sender_id"`
	SenderMode       string                   `json:"sender_mode"`
	SenderVisibility string                   `json:"sender_visibility"`
	ShowChannels     bool                     `json:"show_channels"`
	SkipPush         bool                     `json:"skip_push"`
	SkipWebhook      bool                     `json:"skip_webhook"`
	Status           string                   `json:"status"`
	UpdatedAt        Timestamp                `json:"updated_at"`
	SegmentIds       []string                 `json:"segment_ids"`
	Segments         []Segment                `json:"segments"`
	UserIds          []string                 `json:"user_ids"`
	Users            []UserResponse           `json:"users"`
	Stats            CampaignStatsResponse    `json:"stats"`
	ScheduledFor     *Timestamp               `json:"scheduled_for,omitempty"`
	StopAt           *Timestamp               `json:"stop_at,omitempty"`
	ChannelTemplate  *CampaignChannelTemplate `json:"channel_template,omitempty"`
	MessageTemplate  *CampaignMessageTemplate `json:"message_template,omitempty"`
	// User response object
	Sender *UserResponse `json:"sender,omitempty"`
}

type CampaignStartedEvent ΒΆ

type CampaignStartedEvent struct {
	CreatedAt  Timestamp         `json:"created_at"`
	Custom     map[string]any    `json:"custom"`
	Type       string            `json:"type"`
	ReceivedAt *Timestamp        `json:"received_at,omitempty"`
	Campaign   *CampaignResponse `json:"campaign,omitempty"`
}

func (*CampaignStartedEvent) GetEventType ΒΆ

func (e *CampaignStartedEvent) GetEventType() string

type CampaignStatsResponse ΒΆ

type CampaignStatsResponse struct {
	Progress             float64   `json:"progress"`
	StatsChannelsCreated int       `json:"stats_channels_created"`
	StatsCompletedAt     Timestamp `json:"stats_completed_at"`
	StatsMessagesSent    int       `json:"stats_messages_sent"`
	StatsStartedAt       Timestamp `json:"stats_started_at"`
	StatsUsersRead       int       `json:"stats_users_read"`
	StatsUsersSent       int       `json:"stats_users_sent"`
}

type CancelImportV2TaskRequest ΒΆ

type CancelImportV2TaskRequest struct {
}

type CancelImportV2TaskResponse ΒΆ

type CancelImportV2TaskResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type CastPollVoteRequest ΒΆ

type CastPollVoteRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
	Vote *VoteData    `json:"vote,omitempty"`
}

type ChangeFeedVisibilityRequest ΒΆ

type ChangeFeedVisibilityRequest struct {
	// Feed visibility level: public, visible, followers, members, or private
	Visibility string `json:"visibility"`
	// What to do with existing pending follows when loosening visibility from 'followers': auto_approve (default) or reject
	PendingFollowsAction *string `json:"pending_follows_action,omitempty"`
}

type ChangeFeedVisibilityResponse ΒΆ

type ChangeFeedVisibilityResponse struct {
	Duration string       `json:"duration"`
	Feed     FeedResponse `json:"feed"`
}

type ChannelBatchCompletedEvent ΒΆ

type ChannelBatchCompletedEvent struct {
	BatchCreatedAt       Timestamp              `json:"batch_created_at"`
	CreatedAt            Timestamp              `json:"created_at"`
	FinishedAt           Timestamp              `json:"finished_at"`
	Operation            string                 `json:"operation"`
	Status               string                 `json:"status"`
	SuccessChannelsCount int                    `json:"success_channels_count"`
	TaskID               string                 `json:"task_id"`
	FailedChannels       []FailedChannelUpdates `json:"failed_channels"`
	Custom               map[string]any         `json:"custom"`
	Type                 string                 `json:"type"`
	ReceivedAt           *Timestamp             `json:"received_at,omitempty"`
}

func (*ChannelBatchCompletedEvent) GetEventType ΒΆ

func (e *ChannelBatchCompletedEvent) GetEventType() string

type ChannelBatchMemberRequest ΒΆ

type ChannelBatchMemberRequest struct {
	UserID      string  `json:"user_id"`
	ChannelRole *string `json:"channel_role,omitempty"`
}

type ChannelBatchStartedEvent ΒΆ

type ChannelBatchStartedEvent struct {
	BatchCreatedAt       Timestamp              `json:"batch_created_at"`
	CreatedAt            Timestamp              `json:"created_at"`
	FinishedAt           Timestamp              `json:"finished_at"`
	Operation            string                 `json:"operation"`
	Status               string                 `json:"status"`
	SuccessChannelsCount int                    `json:"success_channels_count"`
	TaskID               string                 `json:"task_id"`
	FailedChannels       []FailedChannelUpdates `json:"failed_channels"`
	Custom               map[string]any         `json:"custom"`
	Type                 string                 `json:"type"`
	ReceivedAt           *Timestamp             `json:"received_at,omitempty"`
}

func (*ChannelBatchStartedEvent) GetEventType ΒΆ

func (e *ChannelBatchStartedEvent) GetEventType() string

type ChannelBatchUpdateRequest ΒΆ

type ChannelBatchUpdateRequest struct {
	Operation string `json:"operation"`
	// Filter to apply to the query
	Filter  map[string]any              `json:"filter"`
	Members []ChannelBatchMemberRequest `json:"members"`
	Data    *ChannelDataUpdate          `json:"data,omitempty"`
}

type ChannelBatchUpdateResponse ΒΆ

type ChannelBatchUpdateResponse struct {
	// Duration of the request in milliseconds
	Duration string  `json:"duration"`
	TaskID   *string `json:"task_id,omitempty"`
}

Basic response information

type ChannelConfig ΒΆ

type ChannelConfig struct {
	Automod                        string    `json:"automod"`
	AutomodBehavior                string    `json:"automod_behavior"`
	ConnectEvents                  bool      `json:"connect_events"`
	CountMessages                  bool      `json:"count_messages"`
	CreatedAt                      Timestamp `json:"created_at"`
	CustomEvents                   bool      `json:"custom_events"`
	DeliveryEvents                 bool      `json:"delivery_events"`
	MarkMessagesPending            bool      `json:"mark_messages_pending"`
	MaxMessageLength               int       `json:"max_message_length"`
	Mutes                          bool      `json:"mutes"`
	Name                           string    `json:"name"`
	Polls                          bool      `json:"polls"`
	PushNotifications              bool      `json:"push_notifications"`
	Quotes                         bool      `json:"quotes"`
	Reactions                      bool      `json:"reactions"`
	ReadEvents                     bool      `json:"read_events"`
	Reminders                      bool      `json:"reminders"`
	Replies                        bool      `json:"replies"`
	Search                         bool      `json:"search"`
	SharedLocations                bool      `json:"shared_locations"`
	SkipLastMsgUpdateForSystemMsgs bool      `json:"skip_last_msg_update_for_system_msgs"`
	TypingEvents                   bool      `json:"typing_events"`
	UpdatedAt                      Timestamp `json:"updated_at"`
	Uploads                        bool      `json:"uploads"`
	UrlEnrichment                  bool      `json:"url_enrichment"`
	UserMessageReminders           bool      `json:"user_message_reminders"`
	// List of commands that channel supports
	Commands           []string           `json:"commands"`
	Blocklist          *string            `json:"blocklist,omitempty"`
	BlocklistBehavior  *string            `json:"blocklist_behavior,omitempty"`
	PartitionSize      *int               `json:"partition_size,omitempty"`
	PartitionTtl       *string            `json:"partition_ttl,omitempty"`
	PushLevel          *string            `json:"push_level,omitempty"`
	AllowedFlagReasons []string           `json:"allowed_flag_reasons,omitempty"`
	Blocklists         []BlockListOptions `json:"blocklists,omitempty"`
	// Sets thresholds for AI moderation
	AutomodThresholds *Thresholds      `json:"automod_thresholds,omitempty"`
	ChatPreferences   *ChatPreferences `json:"chat_preferences,omitempty"`
}

type ChannelConfigOverrides ΒΆ

type ChannelConfigOverrides struct {
	Blocklist         *string `json:"blocklist,omitempty"`
	BlocklistBehavior *string `json:"blocklist_behavior,omitempty"`
	// Enable/disable message counting
	CountMessages *bool `json:"count_messages,omitempty"`
	// Overrides max message length
	MaxMessageLength *int `json:"max_message_length,omitempty"`
	// Overrides the push notification level for this channel
	PushLevel *string `json:"push_level,omitempty"`
	// Enables message quotes
	Quotes *bool `json:"quotes,omitempty"`
	// Enables or disables reactions
	Reactions *bool `json:"reactions,omitempty"`
	// Enables message replies (threads)
	Replies *bool `json:"replies,omitempty"`
	// Enable/disable shared locations
	SharedLocations *bool `json:"shared_locations,omitempty"`
	// Enables or disables typing events
	TypingEvents *bool `json:"typing_events,omitempty"`
	// Enables or disables file uploads
	Uploads *bool `json:"uploads,omitempty"`
	// Enables or disables URL enrichment
	UrlEnrichment *bool `json:"url_enrichment,omitempty"`
	// Enable/disable user message reminders
	UserMessageReminders *bool `json:"user_message_reminders,omitempty"`
	// List of commands that channel supports
	Commands        []string            `json:"commands,omitempty"`
	ChatPreferences *ChatPreferences    `json:"chat_preferences,omitempty"`
	Grants          map[string][]string `json:"grants,omitempty"`
}

Channel configuration overrides

type ChannelConfigWithInfo ΒΆ

type ChannelConfigWithInfo struct {
	Automod                        string             `json:"automod"`
	AutomodBehavior                string             `json:"automod_behavior"`
	ConnectEvents                  bool               `json:"connect_events"`
	CountMessages                  bool               `json:"count_messages"`
	CreatedAt                      Timestamp          `json:"created_at"`
	CustomEvents                   bool               `json:"custom_events"`
	DeliveryEvents                 bool               `json:"delivery_events"`
	MarkMessagesPending            bool               `json:"mark_messages_pending"`
	MaxMessageLength               int                `json:"max_message_length"`
	Mutes                          bool               `json:"mutes"`
	Name                           string             `json:"name"`
	Polls                          bool               `json:"polls"`
	PushNotifications              bool               `json:"push_notifications"`
	Quotes                         bool               `json:"quotes"`
	Reactions                      bool               `json:"reactions"`
	ReadEvents                     bool               `json:"read_events"`
	Reminders                      bool               `json:"reminders"`
	Replies                        bool               `json:"replies"`
	Search                         bool               `json:"search"`
	SharedLocations                bool               `json:"shared_locations"`
	SkipLastMsgUpdateForSystemMsgs bool               `json:"skip_last_msg_update_for_system_msgs"`
	TypingEvents                   bool               `json:"typing_events"`
	UpdatedAt                      Timestamp          `json:"updated_at"`
	Uploads                        bool               `json:"uploads"`
	UrlEnrichment                  bool               `json:"url_enrichment"`
	UserMessageReminders           bool               `json:"user_message_reminders"`
	Commands                       []Command          `json:"commands"`
	Blocklist                      *string            `json:"blocklist,omitempty"`
	BlocklistBehavior              *string            `json:"blocklist_behavior,omitempty"`
	PartitionSize                  *int               `json:"partition_size,omitempty"`
	PartitionTtl                   *string            `json:"partition_ttl,omitempty"`
	PushLevel                      *string            `json:"push_level,omitempty"`
	AllowedFlagReasons             []string           `json:"allowed_flag_reasons,omitempty"`
	Blocklists                     []BlockListOptions `json:"blocklists,omitempty"`
	// Sets thresholds for AI moderation
	AutomodThresholds *Thresholds         `json:"automod_thresholds,omitempty"`
	ChatPreferences   *ChatPreferences    `json:"chat_preferences,omitempty"`
	Grants            map[string][]string `json:"grants,omitempty"`
}

type ChannelContextResponse ΒΆ added in v5.3.0

type ChannelContextResponse struct {
	// Channel CID (<type>:<id>)
	Cid string `json:"cid"`
	// Channel ID
	ID string `json:"id"`
	// Channel type
	Type string `json:"type"`
	// User response object
	CreatedBy *UserResponse `json:"created_by,omitempty"`
}

Slim channel object: identity plus creator

type ChannelCreatedEvent ΒΆ

type ChannelCreatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// The type of event: "channel.created" in this case
	Type string `json:"type"`
	// The ID of the channel which was created
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount  *int `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel which was created
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was created
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel is successfully created.

func (*ChannelCreatedEvent) GetEventType ΒΆ

func (e *ChannelCreatedEvent) GetEventType() string

type ChannelDataUpdate ΒΆ

type ChannelDataUpdate struct {
	AutoTranslationEnabled  *bool   `json:"auto_translation_enabled,omitempty"`
	AutoTranslationLanguage *string `json:"auto_translation_language,omitempty"`
	Disabled                *bool   `json:"disabled,omitempty"`
	Frozen                  *bool   `json:"frozen,omitempty"`
	Team                    *string `json:"team,omitempty"`
	// Channel configuration overrides
	ConfigOverrides *ChannelConfigOverrides `json:"config_overrides,omitempty"`
	Custom          map[string]any          `json:"custom,omitempty"`
}

type ChannelDeletedEvent ΒΆ

type ChannelDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// The type of event: "channel.deleted" in this case
	Type string `json:"type"`
	// The ID of the channel which was deleted
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount  *int `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel which was deleted
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was deleted
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel is successfully deleted.

func (*ChannelDeletedEvent) GetEventType ΒΆ

func (e *ChannelDeletedEvent) GetEventType() string

type ChannelExport ΒΆ

type ChannelExport struct {
	Cid *string `json:"cid,omitempty"`
	// Channel ID
	ID *string `json:"id,omitempty"`
	// Date to export messages since
	MessagesSince *Timestamp `json:"messages_since,omitempty"`
	// Date to export messages until
	MessagesUntil *Timestamp `json:"messages_until,omitempty"`
	// Channel type
	Type *string `json:"type,omitempty"`
}

type ChannelFrozenEvent ΒΆ

type ChannelFrozenEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "channel.frozen" in this case
	Type string `json:"type"`
	// The ID of the channel which was frozen
	ChannelID *string `json:"channel_id,omitempty"`
	// The type of the channel which was frozen
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was frozen
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
}

Emitted when a channel is successfully frozen.

func (*ChannelFrozenEvent) GetEventType ΒΆ

func (e *ChannelFrozenEvent) GetEventType() string

type ChannelGetOrCreateRequest ΒΆ

type ChannelGetOrCreateRequest struct {
	// Whether this channel will be hidden for the user who created the channel or not
	HideForCreator *bool `json:"hide_for_creator,omitempty"`
	// Refresh channel state
	State              *bool `json:"state,omitempty"`
	ThreadUnreadCounts *bool `json:"thread_unread_counts,omitempty"`
	// Top-level keys of the message sender's channel-member custom data to include under member.custom (max 8 keys, 64 chars each)
	MemberCustomInclude []string                 `json:"member_custom_include,omitempty"`
	Data                *ChannelInput            `json:"data,omitempty"`
	Members             *PaginationParams        `json:"members,omitempty"`
	Messages            *MessagePaginationParams `json:"messages,omitempty"`
	Watchers            *PaginationParams        `json:"watchers,omitempty"`
}

type ChannelHiddenEvent ΒΆ

type ChannelHiddenEvent struct {
	// Whether the history was cleared
	ClearHistory bool `json:"clear_history"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// The type of event: "channel.hidden" in this case
	Type string `json:"type"`
	// The ID of the channel which was hidden
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount  *int `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel which was hidden
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was hidden
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel is successfully hidden.

func (*ChannelHiddenEvent) GetEventType ΒΆ

func (e *ChannelHiddenEvent) GetEventType() string

type ChannelInput ΒΆ

type ChannelInput struct {
	// Enable or disable auto translation
	AutoTranslationEnabled *bool `json:"auto_translation_enabled,omitempty"`
	// Language (or comma-separated list of languages) to translate to when auto translation is active
	AutoTranslationLanguage *string `json:"auto_translation_language,omitempty"`
	CreatedByID             *string `json:"created_by_id,omitempty"`
	Disabled                *bool   `json:"disabled,omitempty"`
	// Freeze or unfreeze the channel
	Frozen *bool `json:"frozen,omitempty"`
	// Team the channel belongs to (if multi-tenant mode is enabled)
	Team          *string                `json:"team,omitempty"`
	TruncatedByID *string                `json:"truncated_by_id,omitempty"`
	FilterTags    []string               `json:"filter_tags,omitempty"`
	Invites       []ChannelMemberRequest `json:"invites,omitempty"`
	Members       []ChannelMemberRequest `json:"members,omitempty"`
	// Channel configuration overrides
	ConfigOverrides *ChannelConfigOverrides `json:"config_overrides,omitempty"`
	// User request object
	CreatedBy *UserRequest   `json:"created_by,omitempty"`
	Custom    map[string]any `json:"custom,omitempty"`
}

type ChannelInputRequest ΒΆ

type ChannelInputRequest struct {
	AutoTranslationEnabled  *bool                  `json:"auto_translation_enabled,omitempty"`
	AutoTranslationLanguage *string                `json:"auto_translation_language,omitempty"`
	Disabled                *bool                  `json:"disabled,omitempty"`
	Frozen                  *bool                  `json:"frozen,omitempty"`
	Team                    *string                `json:"team,omitempty"`
	Invites                 []ChannelMemberRequest `json:"invites,omitempty"`
	Members                 []ChannelMemberRequest `json:"members,omitempty"`
	// Channel configuration overrides
	ConfigOverrides *ConfigOverridesRequest `json:"config_overrides,omitempty"`
	// User request object
	CreatedBy *UserRequest   `json:"created_by,omitempty"`
	Custom    map[string]any `json:"custom,omitempty"`
}

type ChannelMemberPartialResponse ΒΆ added in v5.3.0

type ChannelMemberPartialResponse struct {
	// Role of the member in the channel
	ChannelRole string `json:"channel_role"`
	// Whether the user muted notifications for this channel
	NotificationsMuted bool `json:"notifications_muted"`
	// Channel-member custom fields projected via `member_custom_include`
	Custom map[string]any `json:"custom,omitempty"`
}

type ChannelMemberRequest ΒΆ

type ChannelMemberRequest struct {
	UserID string `json:"user_id"`
	// Role of the member in the channel
	ChannelRole *string        `json:"channel_role,omitempty"`
	Custom      map[string]any `json:"custom,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ChannelMemberResponse ΒΆ

type ChannelMemberResponse struct {
	// Whether member is banned this channel or not
	Banned bool `json:"banned"`
	// Role of the member in the channel
	ChannelRole string `json:"channel_role"`
	// Date/time of creation
	CreatedAt          Timestamp `json:"created_at"`
	NotificationsMuted bool      `json:"notifications_muted"`
	// Whether member is shadow banned in this channel or not
	ShadowBanned bool `json:"shadow_banned"`
	// Date/time of the last update
	UpdatedAt  Timestamp      `json:"updated_at"`
	Custom     map[string]any `json:"custom"`
	ArchivedAt *Timestamp     `json:"archived_at,omitempty"`
	// Expiration date of the ban
	BanExpires *Timestamp `json:"ban_expires,omitempty"`
	// Whether the member's ban also applies to channels the channel's creator will create in the future (an active future channel ban by the creator targets this member)
	BanFromFutureChannels *bool      `json:"ban_from_future_channels,omitempty"`
	DeletedAt             *Timestamp `json:"deleted_at,omitempty"`
	// Expiration date of the future channel ban; absent when the future channel ban is permanent
	FutureChannelBanExpires *Timestamp `json:"future_channel_ban_expires,omitempty"`
	// Date when invite was accepted
	InviteAcceptedAt *Timestamp `json:"invite_accepted_at,omitempty"`
	// Date when invite was rejected
	InviteRejectedAt *Timestamp `json:"invite_rejected_at,omitempty"`
	// Whether member was invited or not
	Invited *bool `json:"invited,omitempty"`
	// Whether member is channel moderator or not
	IsModerator *bool      `json:"is_moderator,omitempty"`
	PinnedAt    *Timestamp `json:"pinned_at,omitempty"`
	// Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner
	Role            *string  `json:"role,omitempty"`
	Status          *string  `json:"status,omitempty"`
	UserID          *string  `json:"user_id,omitempty"`
	DeletedMessages []string `json:"deleted_messages,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ChannelMessageCountRuleParameters ΒΆ

type ChannelMessageCountRuleParameters struct {
	Operator  *string `json:"operator,omitempty"`
	Threshold *int    `json:"threshold,omitempty"`
}

type ChannelMessagesResponse ΒΆ

type ChannelMessagesResponse struct {
	// List of messages
	Messages []MessageResponse `json:"messages"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
}

Response containing channel and its messages

type ChannelMetadata ΒΆ added in v5.3.0

type ChannelMetadata struct {
	Cid           string         `json:"cid"`
	ID            string         `json:"id"`
	Type          string         `json:"type"`
	Custom        map[string]any `json:"custom"`
	LastMessageAt *Timestamp     `json:"last_message_at,omitempty"`
	MemberCount   *int           `json:"member_count,omitempty"`
	MessageCount  *int           `json:"message_count,omitempty"`
	PushLevel     *string        `json:"push_level,omitempty"`
	Team          *string        `json:"team,omitempty"`
}

type ChannelMute ΒΆ

type ChannelMute struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// Date/time of mute expiration
	Expires *Timestamp `json:"expires,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ChannelMutedEvent ΒΆ

type ChannelMutedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "channel.muted" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The mute objects
	Mutes []ChannelMute             `json:"mutes,omitempty"`
	Mute  *ChannelMute              `json:"mute,omitempty"`
	User  *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel is successfully muted.

func (*ChannelMutedEvent) GetEventType ΒΆ

func (e *ChannelMutedEvent) GetEventType() string

type ChannelOwnCapability ΒΆ

type ChannelOwnCapability string
const (
	BAN_CHANNEL_MEMBERS                ChannelOwnCapability = "ban-channel-members"
	CAST_POLL_VOTE                     ChannelOwnCapability = "cast-poll-vote"
	CONNECT_EVENTS                     ChannelOwnCapability = "connect-events"
	CREATE_ATTACHMENT                  ChannelOwnCapability = "create-attachment"
	CREATE_MENTION                     ChannelOwnCapability = "create-mention"
	DELETE_ANY_MESSAGE                 ChannelOwnCapability = "delete-any-message"
	DELETE_CHANNEL                     ChannelOwnCapability = "delete-channel"
	DELETE_OWN_MESSAGE                 ChannelOwnCapability = "delete-own-message"
	DELIVERY_EVENTS                    ChannelOwnCapability = "delivery-events"
	FLAG_MESSAGE                       ChannelOwnCapability = "flag-message"
	FREEZE_CHANNEL                     ChannelOwnCapability = "freeze-channel"
	JOIN_CHANNEL                       ChannelOwnCapability = "join-channel"
	LEAVE_CHANNEL                      ChannelOwnCapability = "leave-channel"
	MUTE_CHANNEL                       ChannelOwnCapability = "mute-channel"
	NOTIFY_CHANNEL                     ChannelOwnCapability = "notify-channel"
	NOTIFY_GROUP                       ChannelOwnCapability = "notify-group"
	NOTIFY_HERE                        ChannelOwnCapability = "notify-here"
	NOTIFY_ROLE                        ChannelOwnCapability = "notify-role"
	PIN_MESSAGE                        ChannelOwnCapability = "pin-message"
	QUERY_POLL_VOTES                   ChannelOwnCapability = "query-poll-votes"
	QUOTE_MESSAGE                      ChannelOwnCapability = "quote-message"
	READ_EVENTS                        ChannelOwnCapability = "read-events"
	SEARCH_MESSAGES                    ChannelOwnCapability = "search-messages"
	SEND_CUSTOM_EVENTS                 ChannelOwnCapability = "send-custom-events"
	SEND_LINKS                         ChannelOwnCapability = "send-links"
	SEND_MESSAGE                       ChannelOwnCapability = "send-message"
	SEND_POLL                          ChannelOwnCapability = "send-poll"
	SEND_REACTION                      ChannelOwnCapability = "send-reaction"
	SEND_REPLY                         ChannelOwnCapability = "send-reply"
	SEND_RESTRICTED_VISIBILITY_MESSAGE ChannelOwnCapability = "send-restricted-visibility-message"
	SEND_TYPING_EVENTS                 ChannelOwnCapability = "send-typing-events"
	SET_CHANNEL_COOLDOWN               ChannelOwnCapability = "set-channel-cooldown"
	SHARE_LOCATION                     ChannelOwnCapability = "share-location"
	SKIP_SLOW_MODE                     ChannelOwnCapability = "skip-slow-mode"
	SLOW_MODE                          ChannelOwnCapability = "slow-mode"
	TYPING_EVENTS                      ChannelOwnCapability = "typing-events"
	UPDATE_ANY_MESSAGE                 ChannelOwnCapability = "update-any-message"
	UPDATE_CHANNEL                     ChannelOwnCapability = "update-channel"
	UPDATE_CHANNEL_MEMBERS             ChannelOwnCapability = "update-channel-members"
	UPDATE_OWN_MESSAGE                 ChannelOwnCapability = "update-own-message"
	UPDATE_THREAD                      ChannelOwnCapability = "update-thread"
	UPLOAD_FILE                        ChannelOwnCapability = "upload-file"
)

func (ChannelOwnCapability) String ΒΆ

func (c ChannelOwnCapability) String() string

type ChannelPushPreferencesResponse ΒΆ

type ChannelPushPreferencesResponse struct {
	ChatLevel       *string                  `json:"chat_level,omitempty"`
	DisabledUntil   *Timestamp               `json:"disabled_until,omitempty"`
	ChatPreferences *ChatPreferencesResponse `json:"chat_preferences,omitempty"`
}

type ChannelResponse ΒΆ

type ChannelResponse struct {
	// Channel CID (<type>:<id>)
	Cid string `json:"cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	Disabled  bool      `json:"disabled"`
	// Whether channel is frozen or not
	Frozen bool `json:"frozen"`
	// Channel unique ID
	ID string `json:"id"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// Type of the channel
	Type string `json:"type"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// Whether auto translation is enabled or not
	AutoTranslationEnabled *bool `json:"auto_translation_enabled,omitempty"`
	// Language (or comma-separated list of languages) to translate to when auto translation is active
	AutoTranslationLanguage *string `json:"auto_translation_language,omitempty"`
	// Whether this channel is blocked by current user or not
	Blocked *bool `json:"blocked,omitempty"`
	// Cooldown period after sending each message
	Cooldown *int `json:"cooldown,omitempty"`
	// Date/time of deletion
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`
	// Whether this channel is hidden by current user or not
	Hidden *bool `json:"hidden,omitempty"`
	// Date since when the message history is accessible
	HideMessagesBefore *Timestamp `json:"hide_messages_before,omitempty"`
	// Date of the last message sent
	LastMessageAt *Timestamp `json:"last_message_at,omitempty"`
	// Number of members in the channel
	MemberCount *int `json:"member_count,omitempty"`
	// Number of messages in the channel
	MessageCount *int `json:"message_count,omitempty"`
	// Date of mute expiration
	MuteExpiresAt *Timestamp `json:"mute_expires_at,omitempty"`
	// Whether this channel is muted or not
	Muted *bool `json:"muted,omitempty"`
	// Team the channel belongs to (multi-tenant only)
	Team *string `json:"team,omitempty"`
	// Date of the latest truncation of the channel
	TruncatedAt *Timestamp `json:"truncated_at,omitempty"`
	// List of filter tags associated with the channel
	FilterTags []string `json:"filter_tags,omitempty"`
	// List of channel members (max 100)
	Members []ChannelMemberResponse `json:"members,omitempty"`
	// List of channel capabilities of authenticated user
	OwnCapabilities []ChannelOwnCapability `json:"own_capabilities,omitempty"`
	Config          *ChannelConfigWithInfo `json:"config,omitempty"`
	// User response object
	CreatedBy *UserResponse `json:"created_by,omitempty"`
	// User response object
	TruncatedBy *UserResponse `json:"truncated_by,omitempty"`
}

Represents channel in chat

type ChannelStateResponse ΒΆ

type ChannelStateResponse struct {
	Duration            string                       `json:"duration"`
	Members             []ChannelMemberResponse      `json:"members"`
	Messages            []MessageResponse            `json:"messages"`
	PinnedMessages      []MessageResponse            `json:"pinned_messages"`
	Threads             []ThreadStateResponse        `json:"threads"`
	Hidden              *bool                        `json:"hidden,omitempty"`
	HideMessagesBefore  *Timestamp                   `json:"hide_messages_before,omitempty"`
	WatcherCount        *int                         `json:"watcher_count,omitempty"`
	ActiveLiveLocations []SharedLocationResponseData `json:"active_live_locations,omitempty"`
	PendingMessages     []PendingMessageResponse     `json:"pending_messages,omitempty"`
	Read                []ReadStateResponse          `json:"read,omitempty"`
	Watchers            []UserResponse               `json:"watchers,omitempty"`
	// Represents channel in chat
	Channel         *ChannelResponse                `json:"channel,omitempty"`
	Draft           *DraftResponse                  `json:"draft,omitempty"`
	Membership      *ChannelMemberResponse          `json:"membership,omitempty"`
	PushPreferences *ChannelPushPreferencesResponse `json:"push_preferences,omitempty"`
}

type ChannelStateResponseFields ΒΆ

type ChannelStateResponseFields struct {
	// List of channel members
	Members []ChannelMemberResponse `json:"members"`
	// List of channel messages
	Messages []MessageResponse `json:"messages"`
	// List of pinned messages in the channel
	PinnedMessages []MessageResponse     `json:"pinned_messages"`
	Threads        []ThreadStateResponse `json:"threads"`
	// Whether this channel is hidden or not
	Hidden *bool `json:"hidden,omitempty"`
	// Messages before this date are hidden from the user
	HideMessagesBefore *Timestamp `json:"hide_messages_before,omitempty"`
	// Number of channel watchers
	WatcherCount *int `json:"watcher_count,omitempty"`
	// Active live locations in the channel
	ActiveLiveLocations []SharedLocationResponseData `json:"active_live_locations,omitempty"`
	// Pending messages that this user has sent
	PendingMessages []PendingMessageResponse `json:"pending_messages,omitempty"`
	// List of read states
	Read []ReadStateResponse `json:"read,omitempty"`
	// List of user who is watching the channel
	Watchers []UserResponse `json:"watchers,omitempty"`
	// Represents channel in chat
	Channel         *ChannelResponse                `json:"channel,omitempty"`
	Draft           *DraftResponse                  `json:"draft,omitempty"`
	Membership      *ChannelMemberResponse          `json:"membership,omitempty"`
	PushPreferences *ChannelPushPreferencesResponse `json:"push_preferences,omitempty"`
}

type ChannelTruncatedEvent ΒΆ

type ChannelTruncatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// The type of event: "channel.truncated" in this case
	Type string `json:"type"`
	// The ID of the channel which was truncated
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount  *int `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel which was truncated
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was truncated
	Cid        *string    `json:"cid,omitempty"`
	MessageID  *string    `json:"message_id,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string        `json:"team,omitempty"`
	ChannelCustom map[string]any `json:"channel_custom,omitempty"`
	// Represents any chat message
	Message *MessageResponse          `json:"message,omitempty"`
	User    *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel is successfully truncated.

func (*ChannelTruncatedEvent) GetEventType ΒΆ

func (e *ChannelTruncatedEvent) GetEventType() string

type ChannelTypeConfig ΒΆ

type ChannelTypeConfig struct {
	Automod                        string              `json:"automod"`
	AutomodBehavior                string              `json:"automod_behavior"`
	ConnectEvents                  bool                `json:"connect_events"`
	CountMessages                  bool                `json:"count_messages"`
	CreatedAt                      Timestamp           `json:"created_at"`
	CustomEvents                   bool                `json:"custom_events"`
	DeliveryEvents                 bool                `json:"delivery_events"`
	MarkMessagesPending            bool                `json:"mark_messages_pending"`
	MaxMessageLength               int                 `json:"max_message_length"`
	Mutes                          bool                `json:"mutes"`
	Name                           string              `json:"name"`
	Polls                          bool                `json:"polls"`
	PushNotifications              bool                `json:"push_notifications"`
	Quotes                         bool                `json:"quotes"`
	Reactions                      bool                `json:"reactions"`
	ReadEvents                     bool                `json:"read_events"`
	Reminders                      bool                `json:"reminders"`
	Replies                        bool                `json:"replies"`
	Search                         bool                `json:"search"`
	SharedLocations                bool                `json:"shared_locations"`
	SkipLastMsgUpdateForSystemMsgs bool                `json:"skip_last_msg_update_for_system_msgs"`
	TypingEvents                   bool                `json:"typing_events"`
	UpdatedAt                      Timestamp           `json:"updated_at"`
	Uploads                        bool                `json:"uploads"`
	UrlEnrichment                  bool                `json:"url_enrichment"`
	UserMessageReminders           bool                `json:"user_message_reminders"`
	Commands                       []Command           `json:"commands"`
	Permissions                    []PolicyRequest     `json:"permissions"`
	Grants                         map[string][]string `json:"grants"`
	Blocklist                      *string             `json:"blocklist,omitempty"`
	BlocklistBehavior              *string             `json:"blocklist_behavior,omitempty"`
	PartitionSize                  *int                `json:"partition_size,omitempty"`
	PartitionTtl                   *string             `json:"partition_ttl,omitempty"`
	PushLevel                      *string             `json:"push_level,omitempty"`
	AllowedFlagReasons             []string            `json:"allowed_flag_reasons,omitempty"`
	Blocklists                     []BlockListOptions  `json:"blocklists,omitempty"`
	// Sets thresholds for AI moderation
	AutomodThresholds *Thresholds      `json:"automod_thresholds,omitempty"`
	ChatPreferences   *ChatPreferences `json:"chat_preferences,omitempty"`
}

type ChannelUnFrozenEvent ΒΆ

type ChannelUnFrozenEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "channel.unfrozen" in this case
	Type string `json:"type"`
	// The ID of the channel which was unfrozen
	ChannelID *string `json:"channel_id,omitempty"`
	// The type of the channel which was unfrozen
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was unfrozen
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
}

Emitted when a channel is successfully unfrozen.

func (*ChannelUnFrozenEvent) GetEventType ΒΆ

func (e *ChannelUnFrozenEvent) GetEventType() string

type ChannelUnmutedEvent ΒΆ

type ChannelUnmutedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "channel.unmuted" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The mute objects
	Mutes []ChannelMute             `json:"mutes,omitempty"`
	Mute  *ChannelMute              `json:"mute,omitempty"`
	User  *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel is successfully unmuted.

func (*ChannelUnmutedEvent) GetEventType ΒΆ

func (e *ChannelUnmutedEvent) GetEventType() string

type ChannelUpdatedEvent ΒΆ

type ChannelUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// The type of event: "channel.updated" in this case
	Type string `json:"type"`
	// The ID of the channel which was updated
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount  *int `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel which was updated
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was updated
	Cid        *string    `json:"cid,omitempty"`
	MessageID  *string    `json:"message_id,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string        `json:"team,omitempty"`
	ChannelCustom map[string]any `json:"channel_custom,omitempty"`
	// Represents any chat message
	Message *MessageResponse          `json:"message,omitempty"`
	User    *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel is successfully updated.

func (*ChannelUpdatedEvent) GetEventType ΒΆ

func (e *ChannelUpdatedEvent) GetEventType() string

type ChannelVisibleEvent ΒΆ

type ChannelVisibleEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// The type of event: "channel.visible" in this case
	Type string `json:"type"`
	// The ID of the channel which was shown
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount  *int `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel which was shown
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was shown
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel is successfully shown.

func (*ChannelVisibleEvent) GetEventType ΒΆ

func (e *ChannelVisibleEvent) GetEventType() string

type Channels ΒΆ

type Channels struct {
	// contains filtered or unexported fields
}

func NewChannel ΒΆ

func NewChannel(channelType string, channelD string, client *ChatClient) *Channels

func (*Channels) Delete ΒΆ

func (*Channels) DeleteChannelFile ΒΆ

func (c *Channels) DeleteChannelFile(ctx context.Context, request *DeleteChannelFileRequest) (*StreamResponse[Response], error)

func (*Channels) DeleteChannelImage ΒΆ

func (c *Channels) DeleteChannelImage(ctx context.Context, request *DeleteChannelImageRequest) (*StreamResponse[Response], error)

func (*Channels) DeleteDraft ΒΆ

func (c *Channels) DeleteDraft(ctx context.Context, request *DeleteDraftRequest) (*StreamResponse[Response], error)

func (*Channels) Get ΒΆ

func (*Channels) GetDraft ΒΆ

func (*Channels) GetManyMessages ΒΆ

func (*Channels) GetOrCreate ΒΆ

func (*Channels) Hide ΒΆ

func (*Channels) MarkRead ΒΆ

func (*Channels) MarkUnread ΒΆ

func (c *Channels) MarkUnread(ctx context.Context, request *MarkUnreadRequest) (*StreamResponse[Response], error)

func (*Channels) SendEvent ΒΆ

func (c *Channels) SendEvent(ctx context.Context, request *SendEventRequest) (*StreamResponse[EventResponse], error)

func (*Channels) SendMessage ΒΆ

func (*Channels) Show ΒΆ

func (*Channels) Truncate ΒΆ

func (*Channels) Update ΒΆ

func (*Channels) UploadChannelFile ΒΆ

func (*Channels) UploadChannelImage ΒΆ

type ChatActivityStatsResponse ΒΆ

type ChatActivityStatsResponse struct {
	Messages *MessageStatsResponse `json:"Messages,omitempty"`
}

type ChatClient ΒΆ

type ChatClient struct {
	// contains filtered or unexported fields
}

func NewChatClient ΒΆ

func NewChatClient(client *Client) *ChatClient

func (*ChatClient) AddSegmentTargets ΒΆ

func (c *ChatClient) AddSegmentTargets(ctx context.Context, id string, request *AddSegmentTargetsRequest) (*StreamResponse[Response], error)

Add targets to a segment

func (*ChatClient) CastPollVote ΒΆ

func (c *ChatClient) CastPollVote(ctx context.Context, messageID string, pollID string, request *CastPollVoteRequest) (*StreamResponse[PollVoteResponse], error)

Cast a vote on a poll

Sends events: - feeds.poll.vote_casted - feeds.poll.vote_changed - feeds.poll.vote_removed - poll.vote_casted - poll.vote_changed - poll.vote_removed

func (*ChatClient) Channel ΒΆ

func (c *ChatClient) Channel(channelType, channelD string) *Channels

func (*ChatClient) ChannelBatchUpdate ΒΆ

Update channels in batch

Sends events: - channel.frozen - channel.hidden - channel.unfrozen - channel.updated - channel.visible - member.added - member.removed - member.updated

func (*ChatClient) CommitMessage ΒΆ

Commits a pending message, which will make it visible in the channel

Sends events: - message.new - message.updated

func (*ChatClient) CreateCampaign ΒΆ

Creates a campaign

func (*ChatClient) CreateChannelType ΒΆ

Creates new channel type

func (*ChatClient) CreateCommand ΒΆ

Creates custom chat command

func (*ChatClient) CreateReminder ΒΆ

func (c *ChatClient) CreateReminder(ctx context.Context, messageID string, request *CreateReminderRequest) (*StreamResponse[ReminderResponseData], error)

Creates a new reminder

Sends events: - reminder.created

func (*ChatClient) CreateSegment ΒΆ

Create a segment

func (*ChatClient) DeleteCampaign ΒΆ

Delete campaign

func (*ChatClient) DeleteChannel ΒΆ

func (c *ChatClient) DeleteChannel(ctx context.Context, _type string, id string, request *DeleteChannelRequest) (*StreamResponse[DeleteChannelResponse], error)

Deletes channel

Sends events: - channel.deleted

func (*ChatClient) DeleteChannelFile ΒΆ

func (c *ChatClient) DeleteChannelFile(ctx context.Context, _type string, id string, request *DeleteChannelFileRequest) (*StreamResponse[Response], error)

Deletes previously uploaded file

func (*ChatClient) DeleteChannelImage ΒΆ

func (c *ChatClient) DeleteChannelImage(ctx context.Context, _type string, id string, request *DeleteChannelImageRequest) (*StreamResponse[Response], error)

Deletes previously uploaded image

func (*ChatClient) DeleteChannelType ΒΆ

func (c *ChatClient) DeleteChannelType(ctx context.Context, name string, request *DeleteChannelTypeRequest) (*StreamResponse[Response], error)

Deletes channel type

func (*ChatClient) DeleteChannels ΒΆ

Allows to delete several channels at once asynchronously

Sends events: - channel.deleted

func (*ChatClient) DeleteCommand ΒΆ

Deletes custom chat command

func (*ChatClient) DeleteDraft ΒΆ

func (c *ChatClient) DeleteDraft(ctx context.Context, _type string, id string, request *DeleteDraftRequest) (*StreamResponse[Response], error)

Deletes a draft

Sends events: - draft.deleted

func (*ChatClient) DeleteMessage ΒΆ

Deletes message

Sends events: - message.deleted

func (*ChatClient) DeletePollVote ΒΆ

func (c *ChatClient) DeletePollVote(ctx context.Context, messageID string, pollID string, voteID string, request *DeletePollVoteRequest) (*StreamResponse[PollVoteResponse], error)

Delete a vote from a poll

Sends events: - feeds.poll.vote_removed - poll.vote_removed

func (*ChatClient) DeleteReaction ΒΆ

func (c *ChatClient) DeleteReaction(ctx context.Context, id string, _type string, request *DeleteReactionRequest) (*StreamResponse[DeleteReactionResponse], error)

Removes user reaction from the message

Sends events: - reaction.deleted

func (*ChatClient) DeleteReminder ΒΆ

func (c *ChatClient) DeleteReminder(ctx context.Context, messageID string, request *DeleteReminderRequest) (*StreamResponse[DeleteReminderResponse], error)

Deletes a user's created reminder

Sends events: - reminder.deleted

func (*ChatClient) DeleteRetentionPolicy ΒΆ

Removes a retention policy for the app. Server-side only.

func (*ChatClient) DeleteSegment ΒΆ

func (c *ChatClient) DeleteSegment(ctx context.Context, id string, request *DeleteSegmentRequest) (*StreamResponse[Response], error)

Delete a segment

func (*ChatClient) DeleteSegmentTargets ΒΆ

func (c *ChatClient) DeleteSegmentTargets(ctx context.Context, id string, request *DeleteSegmentTargetsRequest) (*StreamResponse[Response], error)

Delete targets from a segment

func (*ChatClient) EphemeralMessageUpdate ΒΆ

Updates message fields without storing in database, only sends update event

Sends events: - message.updated

func (*ChatClient) ExportChannels ΒΆ

Exports channel data to a JSON or CSV file (CSV requires version=v2)

func (*ChatClient) GetCampaign ΒΆ

Get campaign by ID.

func (*ChatClient) GetChannel ΒΆ

func (c *ChatClient) GetChannel(ctx context.Context, _type string, id string, request *GetChannelRequest) (*StreamResponse[ChannelStateResponse], error)

Returns a channel by its CID without creating it. Responds with 404 when the channel does not exist, so it doubles as an existence check. Pass state=true to also load messages, read state and watchers, and the messages_id_* parameters to page those messages by message ID.

func (*ChatClient) GetChannelType ΒΆ

Gets channel type

func (*ChatClient) GetCommand ΒΆ

func (c *ChatClient) GetCommand(ctx context.Context, name string, request *GetCommandRequest) (*StreamResponse[GetCommandResponse], error)

Returns custom command by its name

func (*ChatClient) GetDraft ΒΆ

func (c *ChatClient) GetDraft(ctx context.Context, _type string, id string, request *GetDraftRequest) (*StreamResponse[GetDraftResponse], error)

Get a draft

func (*ChatClient) GetManyMessages ΒΆ

func (c *ChatClient) GetManyMessages(ctx context.Context, _type string, id string, request *GetManyMessagesRequest) (*StreamResponse[GetManyMessagesResponse], error)

Returns list messages found by IDs

func (*ChatClient) GetMessage ΒΆ

Returns message by ID

func (*ChatClient) GetOrCreateChannel ΒΆ

func (c *ChatClient) GetOrCreateChannel(ctx context.Context, _type string, id string, request *GetOrCreateChannelRequest) (*StreamResponse[ChannelStateResponse], error)

This Method creates a channel or returns an existing one with matching attributes

Sends events: - channel.created - member.added - member.removed - member.updated - user.watching.start

func (*ChatClient) GetOrCreateDistinctChannel ΒΆ

func (c *ChatClient) GetOrCreateDistinctChannel(ctx context.Context, _type string, request *GetOrCreateDistinctChannelRequest) (*StreamResponse[ChannelStateResponse], error)

This Method creates a channel or returns an existing one with matching attributes

Sends events: - channel.created - member.added - member.removed - member.updated - user.watching.start

func (*ChatClient) GetReactions ΒΆ

Returns list of reactions of specific message

func (*ChatClient) GetReplies ΒΆ

func (c *ChatClient) GetReplies(ctx context.Context, parentID string, request *GetRepliesRequest) (*StreamResponse[GetRepliesResponse], error)

Returns replies (thread) of the message

func (*ChatClient) GetRetentionPolicy ΒΆ

Returns all retention policies configured for the app. Server-side only.

func (*ChatClient) GetRetentionPolicyRuns ΒΆ

Returns filtered and sorted retention cleanup run history for the app. Supports filter_conditions on 'policy' (possible values: 'old-messages', 'inactive-channels') and 'date' fields. Server-side only.

func (*ChatClient) GetSegment ΒΆ

Get segment

func (*ChatClient) GetThread ΒΆ

func (c *ChatClient) GetThread(ctx context.Context, messageID string, request *GetThreadRequest) (*StreamResponse[GetThreadResponse], error)

Return a specific thread

func (*ChatClient) GroupedQueryChannels ΒΆ

Query channels grouped into predefined buckets. Only available for enterprise apps.

func (*ChatClient) HideChannel ΒΆ

func (c *ChatClient) HideChannel(ctx context.Context, _type string, id string, request *HideChannelRequest) (*StreamResponse[HideChannelResponse], error)

Marks channel as hidden for current user

Sends events: - channel.hidden

func (*ChatClient) ListChannelTypes ΒΆ

Lists all available channel types

func (*ChatClient) ListCommands ΒΆ

Returns all custom commands

func (*ChatClient) MarkChannelsRead ΒΆ

func (c *ChatClient) MarkChannelsRead(ctx context.Context, request *MarkChannelsReadRequest) (*StreamResponse[MarkReadResponse], error)

Marks channels as read up to the specific message. If no channels is given, mark all channel as read

Sends events: - message.read

func (*ChatClient) MarkDelivered ΒΆ

Mark the status of a channel message delivered.

func (*ChatClient) MarkRead ΒΆ

func (c *ChatClient) MarkRead(ctx context.Context, _type string, id string, request *MarkReadRequest) (*StreamResponse[MarkReadResponse], error)

Marks channel as read up to the specific message

Sends events: - message.read

func (*ChatClient) MarkUnread ΒΆ

func (c *ChatClient) MarkUnread(ctx context.Context, _type string, id string, request *MarkUnreadRequest) (*StreamResponse[Response], error)

Marks channel as unread from a specific message

func (*ChatClient) MuteChannel ΒΆ

Mutes channel for user

Sends events: - channel.muted

func (*ChatClient) QueryBannedUsers ΒΆ

Find and filter channel scoped or global user bans

func (*ChatClient) QueryCampaigns ΒΆ

Query campaigns with filter query

func (*ChatClient) QueryChannels ΒΆ

Query channels with filter query

func (*ChatClient) QueryDrafts ΒΆ

Queries draft messages for a user

func (*ChatClient) QueryFutureChannelBans ΒΆ

Find and filter future channel bans created by the authenticated user

func (*ChatClient) QueryMembers ΒΆ

Find and filter channel members

func (*ChatClient) QueryMessageFlags ΒΆ

Find and filter message flags

func (*ChatClient) QueryMessageHistory ΒΆ

Queries history for one message

func (*ChatClient) QueryReactions ΒΆ

Get reactions on a message

func (*ChatClient) QueryReminders ΒΆ

Queries reminders

func (*ChatClient) QuerySegmentTargets ΒΆ

Query segment targets

func (*ChatClient) QuerySegments ΒΆ

Query segments

func (*ChatClient) QueryTeamUsageStats ΒΆ

Retrieve team-level usage statistics from the warehouse database. Returns all 16 metrics grouped by team with cursor-based pagination.

**Date Range Options (mutually exclusive):** - Use 'month' parameter (YYYY-MM format) for monthly aggregated values - Use 'start_date'/'end_date' parameters (YYYY-MM-DD format) for daily breakdown - If neither provided, defaults to current month (monthly mode)

This endpoint is server-side only.

func (*ChatClient) QueryThreads ΒΆ

Returns the list of threads for specific user

func (*ChatClient) RunMessageAction ΒΆ

Executes message command action with given parameters

Sends events: - message.new

func (*ChatClient) Search ΒΆ

Search messages across channels

func (*ChatClient) SegmentTargetExists ΒΆ

func (c *ChatClient) SegmentTargetExists(ctx context.Context, id string, targetID string, request *SegmentTargetExistsRequest) (*StreamResponse[Response], error)

Check whether a target exists in a segment. Returns 200 if the target exists, 404 otherwise

func (*ChatClient) SendEvent ΒΆ

func (c *ChatClient) SendEvent(ctx context.Context, _type string, id string, request *SendEventRequest) (*StreamResponse[EventResponse], error)

Sends event to the channel

func (*ChatClient) SendMessage ΒΆ

func (c *ChatClient) SendMessage(ctx context.Context, _type string, id string, request *SendMessageRequest) (*StreamResponse[SendMessageResponse], error)

Sends new message to the specified channel

Sends events: - channel.visible - message.new - message.updated

func (*ChatClient) SendReaction ΒΆ

Sends reaction to specified message

Sends events: - reaction.new - reaction.updated

func (*ChatClient) SendUserCustomEvent ΒΆ

func (c *ChatClient) SendUserCustomEvent(ctx context.Context, userID string, request *SendUserCustomEventRequest) (*StreamResponse[Response], error)

Sends a custom event to a user

Sends events: - *

func (*ChatClient) SetRetentionPolicy ΒΆ

Creates or updates a retention policy for the app. Server-side only.

func (*ChatClient) ShowChannel ΒΆ

func (c *ChatClient) ShowChannel(ctx context.Context, _type string, id string, request *ShowChannelRequest) (*StreamResponse[ShowChannelResponse], error)

Shows previously hidden channel

Sends events: - channel.visible

func (*ChatClient) StartCampaign ΒΆ

Starts or schedules a campaign

func (*ChatClient) StopCampaign ΒΆ

func (c *ChatClient) StopCampaign(ctx context.Context, id string, request *StopCampaignRequest) (*StreamResponse[CampaignResponse], error)

Stops a campaign

func (*ChatClient) TranslateMessage ΒΆ

Translates message to a given language using automated translation software

Sends events: - message.updated

func (*ChatClient) TruncateChannel ΒΆ

func (c *ChatClient) TruncateChannel(ctx context.Context, _type string, id string, request *TruncateChannelRequest) (*StreamResponse[TruncateChannelResponse], error)

Truncates messages from a channel. Can be applied to the entire channel or scoped to specific members.

Sends events: - channel.truncated

func (*ChatClient) UndeleteMessage ΒΆ

Undelete a message that was previously soft-deleted

Sends events: - message.undeleted

func (*ChatClient) UnmuteChannel ΒΆ

func (c *ChatClient) UnmuteChannel(ctx context.Context, request *UnmuteChannelRequest) (*StreamResponse[UnmuteResponse], error)

Unmutes channel for user

Sends events: - channel.unmuted

func (*ChatClient) UnreadCounts ΒΆ

Fetch unread counts for a single user

func (*ChatClient) UnreadCountsBatch ΒΆ

Fetch unread counts in batch for multiple users in one call

func (*ChatClient) UpdateCampaign ΒΆ

func (c *ChatClient) UpdateCampaign(ctx context.Context, id string, request *UpdateCampaignRequest) (*StreamResponse[CampaignResponse], error)

Updates a campaign

func (*ChatClient) UpdateChannel ΒΆ

func (c *ChatClient) UpdateChannel(ctx context.Context, _type string, id string, request *UpdateChannelRequest) (*StreamResponse[UpdateChannelResponse], error)

Change channel data

Sends events: - channel.updated - member.added - member.removed - member.updated - message.new

func (*ChatClient) UpdateChannelPartial ΒΆ

Updates certain fields of the channel

Sends events: - channel.updated

func (*ChatClient) UpdateChannelType ΒΆ

Updates channel type

func (*ChatClient) UpdateCommand ΒΆ

Updates custom chat command

func (*ChatClient) UpdateMemberPartial ΒΆ

func (*ChatClient) UpdateMessage ΒΆ

Updates message with new data

Sends events: - message.updated

func (*ChatClient) UpdateMessagePartial ΒΆ

Updates certain fields of the message

Sends events: - message.updated

func (*ChatClient) UpdateReminder ΒΆ

func (c *ChatClient) UpdateReminder(ctx context.Context, messageID string, request *UpdateReminderRequest) (*StreamResponse[UpdateReminderResponse], error)

Updates an existing reminder

Sends events: - reminder.updated

func (*ChatClient) UpdateSegment ΒΆ

Update an existing segment

func (*ChatClient) UpdateThreadPartial ΒΆ

func (c *ChatClient) UpdateThreadPartial(ctx context.Context, messageID string, request *UpdateThreadPartialRequest) (*StreamResponse[UpdateThreadPartialResponse], error)

Updates certain fields of the thread

Sends events: - thread.updated

func (*ChatClient) UploadChannelFile ΒΆ

Uploads file

func (*ChatClient) UploadChannelImage ΒΆ

func (c *ChatClient) UploadChannelImage(ctx context.Context, _type string, id string, request *UploadChannelImageRequest) (*StreamResponse[UploadChannelResponse], error)

Uploads image

type ChatDraftPayloadResponse ΒΆ

type ChatDraftPayloadResponse struct {
	ID              string         `json:"id"`
	Text            string         `json:"text"`
	Custom          map[string]any `json:"custom"`
	Html            *string        `json:"html,omitempty"`
	Mml             *string        `json:"mml,omitempty"`
	ParentID        *string        `json:"parent_id,omitempty"`
	PollID          *string        `json:"poll_id,omitempty"`
	QuotedMessageID *string        `json:"quoted_message_id,omitempty"`
	ShowInChannel   *bool          `json:"show_in_channel,omitempty"`
	Silent          *bool          `json:"silent,omitempty"`
	Type            *string        `json:"type,omitempty"`
	Attachments     []Attachment   `json:"attachments,omitempty"`
	MentionedUsers  []UserResponse `json:"mentioned_users,omitempty"`
}

type ChatDraftResponse ΒΆ

type ChatDraftResponse struct {
	ChannelCid    string                   `json:"channel_cid"`
	CreatedAt     Timestamp                `json:"created_at"`
	Message       ChatDraftPayloadResponse `json:"message"`
	ParentID      *string                  `json:"parent_id,omitempty"`
	ParentMessage *ChatMessageResponse     `json:"parent_message,omitempty"`
	QuotedMessage *ChatMessageResponse     `json:"quoted_message,omitempty"`
}

type ChatMessageResponse ΒΆ

type ChatMessageResponse struct {
	Cid                  string                 `json:"cid"`
	CreatedAt            Timestamp              `json:"created_at"`
	DeletedReplyCount    int                    `json:"deleted_reply_count"`
	Html                 string                 `json:"html"`
	ID                   string                 `json:"id"`
	MentionedChannel     bool                   `json:"mentioned_channel"`
	MentionedHere        bool                   `json:"mentioned_here"`
	Pinned               bool                   `json:"pinned"`
	ReplyCount           int                    `json:"reply_count"`
	Shadowed             bool                   `json:"shadowed"`
	Silent               bool                   `json:"silent"`
	Text                 string                 `json:"text"`
	UpdatedAt            Timestamp              `json:"updated_at"`
	Type                 string                 `json:"type"`
	Attachments          []Attachment           `json:"attachments"`
	LatestReactions      []ChatReactionResponse `json:"latest_reactions"`
	MentionedUsers       []UserResponse         `json:"mentioned_users"`
	OwnReactions         []ChatReactionResponse `json:"own_reactions"`
	RestrictedVisibility []string               `json:"restricted_visibility"`
	Custom               map[string]any         `json:"custom"`
	ReactionCounts       map[string]int         `json:"reaction_counts"`
	ReactionScores       map[string]int         `json:"reaction_scores"`
	// User response object
	User                 UserResponse                  `json:"user"`
	Command              *string                       `json:"command,omitempty"`
	DeletedAt            *Timestamp                    `json:"deleted_at,omitempty"`
	DeletedForMe         *bool                         `json:"deleted_for_me,omitempty"`
	MessageTextUpdatedAt *Timestamp                    `json:"message_text_updated_at,omitempty"`
	Mml                  *string                       `json:"mml,omitempty"`
	ParentID             *string                       `json:"parent_id,omitempty"`
	PinExpires           *Timestamp                    `json:"pin_expires,omitempty"`
	PinnedAt             *Timestamp                    `json:"pinned_at,omitempty"`
	PollID               *string                       `json:"poll_id,omitempty"`
	QuotedMessageID      *string                       `json:"quoted_message_id,omitempty"`
	ShowInChannel        *bool                         `json:"show_in_channel,omitempty"`
	MentionedGroupIds    []string                      `json:"mentioned_group_ids,omitempty"`
	MentionedGroups      []UserGroupResponse           `json:"mentioned_groups,omitempty"`
	MentionedRoles       []string                      `json:"mentioned_roles,omitempty"`
	ThreadParticipants   []UserResponse                `json:"thread_participants,omitempty"`
	Draft                *ChatDraftResponse            `json:"draft,omitempty"`
	I18n                 map[string]string             `json:"i18n,omitempty"`
	ImageLabels          map[string][]string           `json:"image_labels,omitempty"`
	Member               *ChannelMemberPartialResponse `json:"member,omitempty"`
	Moderation           *ChatModerationV2Response     `json:"moderation,omitempty"`
	// User response object
	PinnedBy       *UserResponse                         `json:"pinned_by,omitempty"`
	Poll           *PollResponseData                     `json:"poll,omitempty"`
	QuotedMessage  *ChatMessageResponse                  `json:"quoted_message,omitempty"`
	ReactionGroups map[string]*ChatReactionGroupResponse `json:"reaction_groups,omitempty"`
	Reminder       *ChatReminderResponseData             `json:"reminder,omitempty"`
	SharedLocation *ChatSharedLocationResponseData       `json:"shared_location,omitempty"`
}

type ChatModerationV2Response ΒΆ

type ChatModerationV2Response struct {
	Action                string   `json:"action"`
	OriginalText          string   `json:"original_text"`
	BlocklistMatched      *string  `json:"blocklist_matched,omitempty"`
	PlatformCircumvented  *bool    `json:"platform_circumvented,omitempty"`
	SemanticFilterMatched *string  `json:"semantic_filter_matched,omitempty"`
	BlocklistsMatched     []string `json:"blocklists_matched,omitempty"`
	ImageHarms            []string `json:"image_harms,omitempty"`
	TextHarms             []string `json:"text_harms,omitempty"`
}

type ChatPreferences ΒΆ

type ChatPreferences struct {
	ChannelMentions         *string `json:"channel_mentions,omitempty"`
	DefaultPreference       *string `json:"default_preference,omitempty"`
	DirectMentions          *string `json:"direct_mentions,omitempty"`
	DistinctChannelMessages *string `json:"distinct_channel_messages,omitempty"`
	GroupMentions           *string `json:"group_mentions,omitempty"`
	HereMentions            *string `json:"here_mentions,omitempty"`
	RoleMentions            *string `json:"role_mentions,omitempty"`
	ThreadReplies           *string `json:"thread_replies,omitempty"`
}

type ChatPreferencesInput ΒΆ

type ChatPreferencesInput struct {
	ChannelMentions   *string `json:"channel_mentions,omitempty"`
	DefaultPreference *string `json:"default_preference,omitempty"`
	DirectMentions    *string `json:"direct_mentions,omitempty"`
	GroupMentions     *string `json:"group_mentions,omitempty"`
	HereMentions      *string `json:"here_mentions,omitempty"`
	RoleMentions      *string `json:"role_mentions,omitempty"`
	ThreadReplies     *string `json:"thread_replies,omitempty"`
}

type ChatPreferencesResponse ΒΆ

type ChatPreferencesResponse struct {
	ChannelMentions   *string `json:"channel_mentions,omitempty"`
	DefaultPreference *string `json:"default_preference,omitempty"`
	DirectMentions    *string `json:"direct_mentions,omitempty"`
	GroupMentions     *string `json:"group_mentions,omitempty"`
	HereMentions      *string `json:"here_mentions,omitempty"`
	RoleMentions      *string `json:"role_mentions,omitempty"`
	ThreadReplies     *string `json:"thread_replies,omitempty"`
}

type ChatReactionGroupResponse ΒΆ

type ChatReactionGroupResponse struct {
	Count             int                             `json:"count"`
	FirstReactionAt   Timestamp                       `json:"first_reaction_at"`
	LastReactionAt    Timestamp                       `json:"last_reaction_at"`
	SumScores         int                             `json:"sum_scores"`
	LatestReactionsBy []ChatReactionGroupUserResponse `json:"latest_reactions_by"`
}

type ChatReactionGroupUserResponse ΒΆ

type ChatReactionGroupUserResponse struct {
	CreatedAt Timestamp `json:"created_at"`
	UserID    string    `json:"user_id"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ChatReactionResponse ΒΆ

type ChatReactionResponse struct {
	CreatedAt Timestamp      `json:"created_at"`
	MessageID string         `json:"message_id"`
	Score     int            `json:"score"`
	UpdatedAt Timestamp      `json:"updated_at"`
	UserID    string         `json:"user_id"`
	Type      string         `json:"type"`
	Custom    map[string]any `json:"custom"`
	// User response object
	User UserResponse `json:"user"`
}

type ChatReminderResponseData ΒΆ

type ChatReminderResponseData struct {
	ChannelCid string               `json:"channel_cid"`
	CreatedAt  Timestamp            `json:"created_at"`
	MessageID  string               `json:"message_id"`
	UpdatedAt  Timestamp            `json:"updated_at"`
	UserID     string               `json:"user_id"`
	RemindAt   *Timestamp           `json:"remind_at,omitempty"`
	Message    *ChatMessageResponse `json:"message,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ChatSharedLocationResponseData ΒΆ

type ChatSharedLocationResponseData struct {
	ChannelCid        string               `json:"channel_cid"`
	CreatedAt         Timestamp            `json:"created_at"`
	CreatedByDeviceID string               `json:"created_by_device_id"`
	Latitude          float64              `json:"latitude"`
	Longitude         float64              `json:"longitude"`
	MessageID         string               `json:"message_id"`
	UpdatedAt         Timestamp            `json:"updated_at"`
	UserID            string               `json:"user_id"`
	EndAt             *Timestamp           `json:"end_at,omitempty"`
	Message           *ChatMessageResponse `json:"message,omitempty"`
}

type CheckExternalStorageRequest ΒΆ

type CheckExternalStorageRequest struct {
}

type CheckExternalStorageResponse ΒΆ

type CheckExternalStorageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	FileUrl  string `json:"file_url"`
}

Basic response information

type CheckPushRequest ΒΆ

type CheckPushRequest struct {
	// Push message template for APN
	ApnTemplate *string `json:"apn_template,omitempty"`
	// Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due
	EventType *string `json:"event_type,omitempty"`
	// Push message data template for Firebase
	FirebaseDataTemplate *string `json:"firebase_data_template,omitempty"`
	// Push message template for Firebase
	FirebaseTemplate *string `json:"firebase_template,omitempty"`
	// Message ID to send push notification for
	MessageID *string `json:"message_id,omitempty"`
	// Name of push provider
	PushProviderName *string `json:"push_provider_name,omitempty"`
	// Push provider type. One of: firebase, apn, huawei, xiaomi
	PushProviderType *string `json:"push_provider_type,omitempty"`
	// Don't require existing devices to render templates
	SkipDevices *bool   `json:"skip_devices,omitempty"`
	UserID      *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CheckPushResponse ΒΆ

type CheckPushResponse struct {
	Duration string `json:"duration"`
	// The event type that was tested
	EventType                *string `json:"event_type,omitempty"`
	RenderedApnTemplate      *string `json:"rendered_apn_template,omitempty"`
	RenderedFirebaseTemplate *string `json:"rendered_firebase_template,omitempty"`
	// Don't require existing devices to render templates
	SkipDevices *bool `json:"skip_devices,omitempty"`
	// List of general errors
	GeneralErrors []string `json:"general_errors,omitempty"`
	// Object with device errors
	DeviceErrors    map[string]DeviceErrorInfo `json:"device_errors,omitempty"`
	RenderedMessage map[string]string          `json:"rendered_message,omitempty"`
}

type CheckRequest ΒΆ

type CheckRequest struct {
	// ID of the user who created the entity
	EntityCreatorID string `json:"entity_creator_id"`
	// Unique identifier of the entity to moderate
	EntityID string `json:"entity_id"`
	// Type of entity to moderate
	EntityType string `json:"entity_type"`
	// Key of the moderation configuration to use
	ConfigKey *string `json:"config_key,omitempty"`
	// Team associated with the configuration
	ConfigTeam *string `json:"config_team,omitempty"`
	// Original timestamp when the content was produced (for correlating flagged content with source video timeline)
	ContentPublishedAt *Timestamp `json:"content_published_at,omitempty"`
	// Whether to run moderation in test mode
	TestMode          *bool              `json:"test_mode,omitempty"`
	UserID            *string            `json:"user_id,omitempty"`
	Config            *ModerationConfig  `json:"config,omitempty"`
	ModerationPayload *ModerationPayload `json:"moderation_payload,omitempty"`
	// Additional moderation configuration options
	Options map[string]any `json:"options"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CheckResponse ΒΆ

type CheckResponse struct {
	Duration string `json:"duration"`
	// Suggested action based on moderation results
	RecommendedAction string `json:"recommended_action"`
	// Status of the moderation check (completed or pending)
	Status string `json:"status"`
	// ID of the running moderation task
	TaskID *string `json:"task_id,omitempty"`
	// All moderation rules triggered by this check (content, user, and call rules), with their resolved actions
	TriggeredRules []TriggeredRuleResponse  `json:"triggered_rules,omitempty"`
	Item           *ReviewQueueItemResponse `json:"item,omitempty"`
	TriggeredRule  *TriggeredRuleResponse   `json:"triggered_rule,omitempty"`
}

type CheckS3AccessRequest ΒΆ

type CheckS3AccessRequest struct {
	// Optional stream+s3:// reference to test access against
	S3Url *string `json:"s3_url,omitempty"`
}

type CheckS3AccessResponse ΒΆ

type CheckS3AccessResponse struct {
	Duration string `json:"duration"`
	// Whether the S3 access check succeeded
	Success bool `json:"success"`
	// Descriptive message about the check result
	Message *string `json:"message,omitempty"`
}

type CheckSNSRequest ΒΆ

type CheckSNSRequest struct {
	// AWS SNS access key
	SnsKey *string `json:"sns_key,omitempty"`
	// AWS SNS key secret
	SnsSecret *string `json:"sns_secret,omitempty"`
	// AWS SNS topic ARN
	SnsTopicArn *string `json:"sns_topic_arn,omitempty"`
}

type CheckSNSResponse ΒΆ

type CheckSNSResponse struct {
	Duration string `json:"duration"`
	// Validation result. One of: ok, error
	Status string `json:"status"`
	// Error text
	Error *string `json:"error,omitempty"`
	// Error data
	Data map[string]any `json:"data,omitempty"`
}

type CheckSQSRequest ΒΆ

type CheckSQSRequest struct {
	// AWS SQS access key
	SqsKey *string `json:"sqs_key,omitempty"`
	// AWS SQS key secret
	SqsSecret *string `json:"sqs_secret,omitempty"`
	// AWS SQS endpoint URL
	SqsUrl *string `json:"sqs_url,omitempty"`
}

type CheckSQSResponse ΒΆ

type CheckSQSResponse struct {
	Duration string `json:"duration"`
	// Validation result. One of: ok, error
	Status string `json:"status"`
	// Error text
	Error *string `json:"error,omitempty"`
	// Error data
	Data map[string]any `json:"data,omitempty"`
}

type Claims ΒΆ

type Claims struct {
	Role         string                 // Role assigned to the user
	ChannelCIDs  []string               // Channel IDs the user has access to
	CallCIDs     []string               // Call IDs the user has access to
	CustomClaims map[string]interface{} // Additional custom claims
}

Claims contains optional parameters for token creation.

type Classification ΒΆ

type Classification struct {
	Name               string           `json:"name"`
	Confidence         *float64         `json:"confidence,omitempty"`
	Severity           *string          `json:"severity,omitempty"`
	Subclassifications []Classification `json:"subclassifications,omitempty"`
}

type Client ΒΆ

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) AddUserGroupMembers ΒΆ

Adds members to a user group. All user IDs must exist. The operation is all-or-nothing.

func (*Client) ApiKey ΒΆ

func (c *Client) ApiKey() string

func (*Client) BaseUrl ΒΆ

func (c *Client) BaseUrl() string

func (*Client) BlockUsers ΒΆ

Block users

func (*Client) CancelImportV2Task ΒΆ

Requests a controlled stop of an import v2 task. Allowed only for tasks in queued or processing state; a processing import stops cleanly on its next progress tick.

func (*Client) CheckExternalStorage ΒΆ

func (*Client) CheckPush ΒΆ

func (c *Client) CheckPush(ctx context.Context, request *CheckPushRequest) (*StreamResponse[CheckPushResponse], error)

Sends a test message via push, this is a test endpoint to verify your push settings

func (*Client) CheckSNS ΒΆ

func (c *Client) CheckSNS(ctx context.Context, request *CheckSNSRequest) (*StreamResponse[CheckSNSResponse], error)

Validates Amazon SNS configuration

func (*Client) CheckSQS ΒΆ

func (c *Client) CheckSQS(ctx context.Context, request *CheckSQSRequest) (*StreamResponse[CheckSQSResponse], error)

Validates Amazon SQS credentials

func (*Client) ConnectTimeout ΒΆ

func (c *Client) ConnectTimeout() time.Duration

func (*Client) CreateBlockList ΒΆ

Creates a new application blocklist, once created the blocklist can be used by any channel type

func (*Client) CreateDevice ΒΆ

func (c *Client) CreateDevice(ctx context.Context, request *CreateDeviceRequest) (*StreamResponse[Response], error)

Adds a new device to a user, if the same device already exists the call will have no effect

func (*Client) CreateExternalStorage ΒΆ

Creates new external storage

func (*Client) CreateGuest ΒΆ

func (*Client) CreateImport ΒΆ

Creates a new import

func (*Client) CreateImportURL ΒΆ

Creates a new import URL

func (*Client) CreateImportV2Task ΒΆ

Creates a new import v2 task

func (*Client) CreatePoll ΒΆ

func (c *Client) CreatePoll(ctx context.Context, request *CreatePollRequest) (*StreamResponse[PollResponse], error)

Creates a new poll

func (*Client) CreatePollOption ΒΆ

func (c *Client) CreatePollOption(ctx context.Context, pollID string, request *CreatePollOptionRequest) (*StreamResponse[PollOptionResponse], error)

Creates a poll option

Sends events: - feeds.poll.updated - poll.updated

func (*Client) CreateRole ΒΆ

Creates custom role

func (*Client) CreateUserGroup ΒΆ

Creates a new user group, optionally with initial members

func (*Client) DeactivateUser ΒΆ

func (c *Client) DeactivateUser(ctx context.Context, userID string, request *DeactivateUserRequest) (*StreamResponse[DeactivateUserResponse], error)

Deactivates user with possibility to activate it back

Sends events: - user.deactivated

func (*Client) DeactivateUsers ΒΆ

Deactivate users in batches

Sends events: - user.deactivated

func (*Client) DefaultTimeout ΒΆ

func (c *Client) DefaultTimeout() time.Duration

func (*Client) DeleteBlockList ΒΆ

func (c *Client) DeleteBlockList(ctx context.Context, name string, request *DeleteBlockListRequest) (*StreamResponse[Response], error)

Deletes previously created application blocklist

func (*Client) DeleteDevice ΒΆ

func (c *Client) DeleteDevice(ctx context.Context, request *DeleteDeviceRequest) (*StreamResponse[Response], error)

Deletes one device

func (*Client) DeleteExternalStorage ΒΆ

Deletes external storage

func (*Client) DeleteFile ΒΆ

func (c *Client) DeleteFile(ctx context.Context, request *DeleteFileRequest) (*StreamResponse[Response], error)

Deletes previously uploaded file

func (*Client) DeleteImage ΒΆ

func (c *Client) DeleteImage(ctx context.Context, request *DeleteImageRequest) (*StreamResponse[Response], error)

Deletes previously uploaded image

func (*Client) DeleteImportV2Task ΒΆ

Deletes an import v2 task. Can only delete tasks in queued state.

func (*Client) DeleteImporterExternalStorage ΒΆ

Removes the external storage configuration for the app. Idempotent: succeeds even if no configuration exists.

func (*Client) DeletePoll ΒΆ

func (c *Client) DeletePoll(ctx context.Context, pollID string, request *DeletePollRequest) (*StreamResponse[Response], error)

Deletes a poll

Sends events: - feeds.poll.deleted - poll.deleted

func (*Client) DeletePollOption ΒΆ

func (c *Client) DeletePollOption(ctx context.Context, pollID string, optionID string, request *DeletePollOptionRequest) (*StreamResponse[Response], error)

Deletes a poll option

Sends events: - feeds.poll.updated - poll.updated

func (*Client) DeletePushProvider ΒΆ

func (c *Client) DeletePushProvider(ctx context.Context, _type string, name string, request *DeletePushProviderRequest) (*StreamResponse[Response], error)

Delete a push provider from v2 with multi bundle/package support. v1 isn't supported in this endpoint

func (*Client) DeleteRole ΒΆ

func (c *Client) DeleteRole(ctx context.Context, name string, request *DeleteRoleRequest) (*StreamResponse[Response], error)

Deletes custom role

func (*Client) DeleteUserGroup ΒΆ

func (c *Client) DeleteUserGroup(ctx context.Context, id string, request *DeleteUserGroupRequest) (*StreamResponse[Response], error)

Deletes a user group and all its members

func (*Client) DeleteUsers ΒΆ

Deletes users and optionally all their belongings asynchronously.

Sends events: - channel.deleted - user.deleted

func (*Client) ExportUser ΒΆ

func (c *Client) ExportUser(ctx context.Context, userID string, request *ExportUserRequest) (*StreamResponse[ExportUserResponse], error)

Exports the user's profile, reactions and messages. Raises an error if a user has more than 10k messages or reactions

func (*Client) ExportUsers ΒΆ

Exports user profile, reactions and messages for list of given users

func (*Client) GetApp ΒΆ

This Method returns the application settings

func (*Client) GetBlockList ΒΆ

func (c *Client) GetBlockList(ctx context.Context, name string, request *GetBlockListRequest) (*StreamResponse[GetBlockListResponse], error)

Returns block list by given name

func (*Client) GetBlockedUsers ΒΆ

Get list of blocked Users

func (*Client) GetImport ΒΆ

func (c *Client) GetImport(ctx context.Context, id string, request *GetImportRequest) (*StreamResponse[GetImportResponse], error)

Gets an import

func (*Client) GetImportV2Task ΒΆ

Gets a single import v2 task by ID

func (*Client) GetImporterExternalStorage ΒΆ

Returns the current external storage configuration for the app. Returns 404 if no configuration exists.

func (*Client) GetOG ΒΆ

func (c *Client) GetOG(ctx context.Context, request *GetOGRequest) (*StreamResponse[GetOGResponse], error)

Get an OpenGraph attachment for a link

func (*Client) GetPermission ΒΆ

Gets custom permission

func (*Client) GetPoll ΒΆ

func (c *Client) GetPoll(ctx context.Context, pollID string, request *GetPollRequest) (*StreamResponse[PollResponse], error)

Retrieves a poll

func (*Client) GetPollOption ΒΆ

func (c *Client) GetPollOption(ctx context.Context, pollID string, optionID string, request *GetPollOptionRequest) (*StreamResponse[PollOptionResponse], error)

Retrieves a poll option

func (*Client) GetPushTemplates ΒΆ

Retrieve push notification templates for Chat.

func (*Client) GetRateLimits ΒΆ

Get rate limits usage and quotas

func (*Client) GetTask ΒΆ

func (c *Client) GetTask(ctx context.Context, id string, request *GetTaskRequest) (*StreamResponse[GetTaskResponse], error)

Gets status of a task

func (*Client) GetUserGroup ΒΆ

func (c *Client) GetUserGroup(ctx context.Context, id string, request *GetUserGroupRequest) (*StreamResponse[GetUserGroupResponse], error)

Gets a user group by ID, including its members

func (*Client) GetUserLiveLocations ΒΆ

Retrieves all active live locations for a user

func (*Client) HttpClient ΒΆ

func (c *Client) HttpClient() HttpClient

func (*Client) IdleTimeout ΒΆ

func (c *Client) IdleTimeout() time.Duration

func (*Client) ImportBlockList ΒΆ added in v5.3.0

Enqueues an asynchronous bulk import of items into an existing blocklist. Returns a task ID that can be polled via GET /tasks/{id} to observe progress. AddItems is idempotent: items already present are skipped without error. For lists exceeding the HTTP request-body cap, issue repeated import calls each carrying a bounded slice of items β€” the task result accumulates correctly.

func (*Client) ListBlockLists ΒΆ

Returns all available block lists

func (*Client) ListDevices ΒΆ

Returns all available devices

func (*Client) ListExternalStorage ΒΆ

Lists external storage

func (*Client) ListImportV2Tasks ΒΆ

Lists all import v2 tasks for the app

func (*Client) ListImports ΒΆ

Gets an import

func (*Client) ListPermissions ΒΆ

Lists all available permissions

func (*Client) ListPushProviders ΒΆ

List details of all push providers.

func (*Client) ListRoles ΒΆ

func (c *Client) ListRoles(ctx context.Context, request *ListRolesRequest) (*StreamResponse[ListRolesResponse], error)

Lists all available roles

func (*Client) ListUserGroups ΒΆ

Lists user groups with cursor-based pagination

func (*Client) Logger ΒΆ

func (c *Client) Logger() Logger

func (*Client) MaxConnsPerHost ΒΆ

func (c *Client) MaxConnsPerHost() int

func (*Client) QueryPollVotes ΒΆ

func (c *Client) QueryPollVotes(ctx context.Context, pollID string, request *QueryPollVotesRequest) (*StreamResponse[PollVotesResponse], error)

Queries votes

func (*Client) QueryPolls ΒΆ

Queries polls

func (*Client) QueryUsers ΒΆ

Find and filter users

func (*Client) ReactivateUser ΒΆ

func (c *Client) ReactivateUser(ctx context.Context, userID string, request *ReactivateUserRequest) (*StreamResponse[ReactivateUserResponse], error)

Activates user who's been deactivated previously

Sends events: - user.reactivated

func (*Client) ReactivateUsers ΒΆ

Reactivate users in batches

Sends events: - user.reactivated

func (*Client) RemoveUserGroupMembers ΒΆ

Removes members from a user group. Users already not in the group are silently ignored.

func (*Client) RestoreUsers ΒΆ

func (c *Client) RestoreUsers(ctx context.Context, request *RestoreUsersRequest) (*StreamResponse[Response], error)

Restore soft deleted users

func (*Client) SearchRoles ΒΆ

Searches mentionable roles (user-assignable + channel-assignable, built-in and custom) by name prefix for autocomplete

func (*Client) SearchUserGroups ΒΆ

Searches user groups by name prefix for autocomplete

func (*Client) UnblockUsers ΒΆ

Unblock users

func (*Client) UpdateApp ΒΆ

func (c *Client) UpdateApp(ctx context.Context, request *UpdateAppRequest) (*StreamResponse[Response], error)

This Method updates one or more application settings

func (*Client) UpdateBlockList ΒΆ

func (c *Client) UpdateBlockList(ctx context.Context, name string, request *UpdateBlockListRequest) (*StreamResponse[UpdateBlockListResponse], error)

Updates contents of the block list

func (*Client) UpdateLiveLocation ΒΆ

Updates an existing live location with new coordinates or expiration time

func (*Client) UpdatePoll ΒΆ

func (c *Client) UpdatePoll(ctx context.Context, request *UpdatePollRequest) (*StreamResponse[PollResponse], error)

Updates a poll

Sends events: - feeds.poll.closed - feeds.poll.updated - poll.closed - poll.updated

func (*Client) UpdatePollOption ΒΆ

func (c *Client) UpdatePollOption(ctx context.Context, pollID string, request *UpdatePollOptionRequest) (*StreamResponse[PollOptionResponse], error)

Updates a poll option

Sends events: - feeds.poll.updated - poll.updated

func (*Client) UpdatePollPartial ΒΆ

func (c *Client) UpdatePollPartial(ctx context.Context, pollID string, request *UpdatePollPartialRequest) (*StreamResponse[PollResponse], error)

Updates a poll partially

Sends events: - feeds.poll.closed - feeds.poll.updated - poll.closed - poll.updated

func (*Client) UpdatePushNotificationPreferences ΒΆ

func (c *Client) UpdatePushNotificationPreferences(ctx context.Context, request *UpdatePushNotificationPreferencesRequest) (*StreamResponse[UpsertPushPreferencesResponse], error)

Upserts the push preferences for a user and or channel member. Set to all, mentions or none

func (*Client) UpdateUserGroup ΒΆ

Updates a user group's name and/or description. team_id is immutable.

func (*Client) UpdateUsers ΒΆ

Update or create users in bulk

Sends events: - user.updated

func (*Client) UpdateUsersPartial ΒΆ

func (c *Client) UpdateUsersPartial(ctx context.Context, request *UpdateUsersPartialRequest) (*StreamResponse[UpdateUsersResponse], error)

Updates certain fields of the user

Sends events: - user.presence.changed - user.updated

func (*Client) UploadFile ΒΆ

Uploads file

func (*Client) UploadImage ΒΆ

Uploads image

func (*Client) UpsertImporterExternalStorage ΒΆ

Creates or updates the external storage configuration for the app. Supports AWS S3 (via cross-account IAM role assumption) and GCS (via service-account JSON credentials).

func (*Client) UpsertPushProvider ΒΆ

Upsert a push provider for v2 with multi bundle/package support

func (*Client) UpsertPushTemplate ΒΆ

Create or update a push notification template for a specific event type and push provider

func (*Client) ValidateImporterExternalStorage ΒΆ

Validates the configured external storage. For AWS S3, performs a live STS AssumeRole and S3 ListObjectsV2 check. For GCS, performs a live bucket listing check using the configured service-account credentials.

func (*Client) VerifyWebhook ΒΆ

func (c *Client) VerifyWebhook(body, signature []byte) (valid bool)

VerifyWebhook validates if hmac signature is correct for message body.

type ClientEvent ΒΆ

type ClientEvent struct {
	// Call session ID associated with the attempt. Required on every event except CoordinatorJoin initiation and CoordinatorJoin failure (where the call session is not yet established); optional on MediaDevicePermission.
	CallSessionID *string `json:"call_session_id,omitempty"`
	// Camera permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Required on every MediaDevicePermission event.
	CameraPermissionStatus *string `json:"camera_permission_status,omitempty"`
	// UUID generated by the client and shared across every event of the same coordinator connection. Required on every event except JoinInitiated, which is reported before a coordinator connection exists.
	CoordinatorConnectID *string `json:"coordinator_connect_id,omitempty"`
	// Milliseconds elapsed between the stage attempt's initiation and this event.
	ElapsedTime *int `json:"elapsed_time,omitempty"`
	// Whether the event marks the start (initiated) or resolution (completed) of a stage attempt, or another event-specific value
	EventType *string `json:"event_type,omitempty"`
	// Call ID associated with the event. Required on every stage except CoordinatorWS, where it is optional.
	ID *string `json:"id,omitempty"`
	// Terminal state of the peer connection. Required on PeerConnectionConnect failure.
	IceState *string `json:"ice_state,omitempty"`
	// UUID generated by the client and shared across JoinInitiated and the join-lifecycle events (CoordinatorJoin, WSJoin, PeerConnectionConnect) of the same overall join attempt. Required on every join event except CoordinatorWS, which is reported before a join attempt is established.
	JoinAttemptID *string `json:"join_attempt_id,omitempty"`
	// Reason the client initiated the join. Optional on CoordinatorJoin events; empty when not provided.
	JoinReason *string `json:"join_reason,omitempty"`
	// Microphone permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Required on every MediaDevicePermission event.
	MicrophonePermissionStatus *string `json:"microphone_permission_status,omitempty"`
	// Resolution of a completed event: success or failure. Required on completed join events; forbidden on initiated join events.
	Outcome *string `json:"outcome,omitempty"`
	// Which peer connection a PeerConnectionConnect event reports on: publish or subscribe. Required on every PeerConnectionConnect event.
	PeerConnection *string `json:"peer_connection,omitempty"`
	// UTC timestamp at which the ICE connection was established earlier in the session, when applicable
	PreviouslyConnectedTimestamp *Timestamp `json:"previously_connected_timestamp,omitempty"`
	// Total in-stage retries the client made before resolving (0–1000). Required on completed join events.
	RetryCountAttempt *int `json:"retry_count_attempt,omitempty"`
	// Failure code string. Required on CoordinatorJoin, CoordinatorWS, WSJoin, and PeerConnectionConnect failure.
	RetryFailureCode *string `json:"retry_failure_code,omitempty"`
	// Failure reason string. Required on CoordinatorJoin, CoordinatorWS, WSJoin, and PeerConnectionConnect failure.
	RetryFailureReason *string `json:"retry_failure_reason,omitempty"`
	// Screen-share permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Optional on MediaDevicePermission events.
	ScreenShareStatus *string `json:"screen_share_status,omitempty"`
	// Version of the client SDK
	SdkVersion *string `json:"sdk_version,omitempty"`
	// Identifier of the SFU the client was attempting to connect to. Required on WSJoin and PeerConnectionConnect failure, and on FirstAudioFrame and FirstVideoFrame.
	SfuID *string `json:"sfu_id,omitempty"`
	// Discriminator identifying the event kind. JoinInitiated marks the start of a join attempt; join-lifecycle events use CoordinatorJoin, CoordinatorWS, WSJoin, or PeerConnectionConnect; media-readiness events use FirstAudioFrame or FirstVideoFrame; MediaDevicePermission reports device permission results; other values denote generic client events.
	Stage *string `json:"stage,omitempty"`
	// UUID generated by the client at initiation. Identical on the matching completion event. Absent on JoinInitiated.
	StageID *string `json:"stage_id,omitempty"`
	// UTC timestamp at which the event was recorded
	Timestamp *Timestamp `json:"timestamp,omitempty"`
	// Identifier of the media track the frame belongs to. Required on FirstVideoFrame; optional on FirstAudioFrame.
	TrackID *string `json:"track_id,omitempty"`
	// User agent string of the client SDK
	UserAgent *string `json:"user_agent,omitempty"`
	// ID of the user the event was recorded for
	UserID *string `json:"user_id,omitempty"`
	// Whether the ICE connection had been established earlier in the same session. Required on every PeerConnectionConnect event so reconnects can be distinguished from fresh connects.
	WasPreviouslyConnected *bool `json:"was_previously_connected,omitempty"`
	// Call type associated with the event. Required on every stage except CoordinatorWS, where it is optional.
	Type *string `json:"type,omitempty"`
}

A single client-side telemetry event. JoinInitiated is the top-level marker emitted when a user begins a join attempt and carries only join_attempt_id (no stage_id or coordinator_connect_id). When stage is CoordinatorJoin, CoordinatorWS, WSJoin, or PeerConnectionConnect the event reports a join-lifecycle attempt; initiation and completion of a stage attempt share the same stage_id. FirstAudioFrame and FirstVideoFrame report media readiness and only ever carry an initiated event. MediaDevicePermission reports the result of requesting screen-share, microphone, and camera permissions. Other stage values denote generic client events.

type ClientOSDataResponse ΒΆ

type ClientOSDataResponse struct {
	Architecture *string `json:"architecture,omitempty"`
	Name         *string `json:"name,omitempty"`
	Version      *string `json:"version,omitempty"`
}

type ClientOption ΒΆ

type ClientOption func(c *Client)

func WithAuthToken ΒΆ

func WithAuthToken(authToken string) ClientOption

WithAuthToken sets the auth token for the client.

func WithBaseUrl ΒΆ

func WithBaseUrl(baseURL string) ClientOption

WithBaseUrl sets the base URL for the client.

func WithConnectTimeout ΒΆ

func WithConnectTimeout(d time.Duration) ClientOption

WithConnectTimeout caps TCP+TLS handshake duration. Default: 10s. Ignored when WithHTTPClient is set.

func WithHTTPClient ΒΆ

func WithHTTPClient(httpClient HttpClient) ClientOption

func WithIdleTimeout ΒΆ

func WithIdleTimeout(d time.Duration) ClientOption

WithIdleTimeout sets how long an idle connection lingers before being closed. Default: 55s (sits 5s below the typical 60s LB idle timeout). Ignored when WithHTTPClient is set.

func WithLogBodies ΒΆ

func WithLogBodies(enabled bool) ClientOption

WithLogBodies opts in to logging request/response bodies on the DEBUG events. Known-secret body keys are still redacted. Off by default.

func WithLogger ΒΆ

func WithLogger(logger Logger) ClientOption

WithLogger sets a custom logger for the client.

func WithMaxConnsPerHost ΒΆ

func WithMaxConnsPerHost(n int) ClientOption

WithMaxConnsPerHost caps concurrent TCP connections per host. Default: 5. Ignored when WithHTTPClient is set.

func WithRequestTimeout ΒΆ

func WithRequestTimeout(d time.Duration) ClientOption

WithRequestTimeout sets the default per-request timeout. Default: 30s. Callers can still override per-call via context.WithTimeout. Ignored when WithHTTPClient is set.

func WithRetry ΒΆ

func WithRetry(cfg RetryConfig) ClientOption

WithRetry enables the opt-in auto-retry policy. Zero values for MaxAttempts/MaxBackoff fall back to the documented defaults (3 attempts, 30s cap).

func WithTimeout ΒΆ

func WithTimeout(t time.Duration) ClientOption

WithTimeout sets a custom timeout for all API requests

type ClosedCaptionEvent ΒΆ

type ClosedCaptionEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// CallClosedCaption represents a closed caption of a call.
	ClosedCaption CallClosedCaption `json:"closed_caption"`
	// The type of event: "call.closed_caption" in this case
	Type string `json:"type"`
}

This event is sent when closed captions are being sent in a call, clients should use this to show the closed captions in the call screen

func (*ClosedCaptionEvent) GetEventType ΒΆ

func (e *ClosedCaptionEvent) GetEventType() string

type ClosedCaptionRuleParameters ΒΆ

type ClosedCaptionRuleParameters struct {
	Severity      *string           `json:"severity,omitempty"`
	Threshold     *int              `json:"threshold,omitempty"`
	TimeWindow    *string           `json:"time_window,omitempty"`
	HarmLabels    []string          `json:"harm_labels,omitempty"`
	LlmHarmLabels map[string]string `json:"llm_harm_labels,omitempty"`
}

type CollectUserFeedbackRequest ΒΆ

type CollectUserFeedbackRequest struct {
	Rating        int            `json:"rating"`
	Sdk           string         `json:"sdk"`
	SdkVersion    string         `json:"sdk_version"`
	Reason        *string        `json:"reason,omitempty"`
	UserSessionID *string        `json:"user_session_id,omitempty"`
	Custom        map[string]any `json:"custom"`
}

type CollectUserFeedbackResponse ΒΆ

type CollectUserFeedbackResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type CollectionRequest ΒΆ

type CollectionRequest struct {
	// Name/type of the collection
	Name string `json:"name"`
	// Custom data for the collection (required, must contain at least one key)
	Custom map[string]any `json:"custom"`
	// Unique identifier for the collection within its name (optional, will be auto-generated if not provided)
	ID *string `json:"id,omitempty"`
	// ID of the user who owns this collection
	UserID *string `json:"user_id,omitempty"`
}

type CollectionResponse ΒΆ

type CollectionResponse struct {
	// Unique identifier for the collection within its name
	ID string `json:"id"`
	// Name/type of the collection
	Name string `json:"name"`
	// When the collection was created
	CreatedAt *Timestamp `json:"created_at,omitempty"`
	// When the collection was last updated
	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
	// ID of the user who owns this collection
	UserID *string `json:"user_id,omitempty"`
	// Custom data for the collection
	Custom map[string]any `json:"custom,omitempty"`
}

type Command ΒΆ

type Command struct {
	// Arguments help text, shown in commands auto-completion
	Args string `json:"args"`
	// Description, shown in commands auto-completion
	Description string `json:"description"`
	// Unique command name
	Name string `json:"name"`
	// Set name used for grouping commands
	Set string `json:"set"`
	// Date/time of creation
	CreatedAt *Timestamp `json:"created_at,omitempty"`
	// Date/time of the last update
	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
}

Represents custom chat command

type CommentAddedEvent ΒΆ

type CommentAddedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp        `json:"created_at"`
	Fid       string           `json:"fid"`
	Activity  ActivityResponse `json:"activity"`
	Comment   CommentResponse  `json:"comment"`
	Custom    map[string]any   `json:"custom"`
	// The type of event: "feeds.comment.added" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a comment is added to an activity.

func (*CommentAddedEvent) GetEventType ΒΆ

func (e *CommentAddedEvent) GetEventType() string

type CommentDeletedEvent ΒΆ

type CommentDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp       `json:"created_at"`
	Fid       string          `json:"fid"`
	Comment   CommentResponse `json:"comment"`
	Custom    map[string]any  `json:"custom"`
	// The type of event: "feeds.comment.deleted" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a comment is deleted.

func (*CommentDeletedEvent) GetEventType ΒΆ

func (e *CommentDeletedEvent) GetEventType() string

type CommentReactionAddedEvent ΒΆ

type CommentReactionAddedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp             `json:"created_at"`
	Fid       string                `json:"fid"`
	Activity  ActivityResponse      `json:"activity"`
	Comment   CommentResponse       `json:"comment"`
	Custom    map[string]any        `json:"custom"`
	Reaction  FeedsReactionResponse `json:"reaction"`
	// The type of event: "feeds.comment.reaction.added" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a reaction is added to a comment.

func (*CommentReactionAddedEvent) GetEventType ΒΆ

func (e *CommentReactionAddedEvent) GetEventType() string

type CommentReactionDeletedEvent ΒΆ

type CommentReactionDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp             `json:"created_at"`
	Fid       string                `json:"fid"`
	Comment   CommentResponse       `json:"comment"`
	Custom    map[string]any        `json:"custom"`
	Reaction  FeedsReactionResponse `json:"reaction"`
	// The type of reaction that was removed
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
}

Emitted when a reaction is deleted from a comment.

func (*CommentReactionDeletedEvent) GetEventType ΒΆ

func (e *CommentReactionDeletedEvent) GetEventType() string

type CommentReactionUpdatedEvent ΒΆ

type CommentReactionUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp             `json:"created_at"`
	Fid       string                `json:"fid"`
	Activity  ActivityResponse      `json:"activity"`
	Comment   CommentResponse       `json:"comment"`
	Custom    map[string]any        `json:"custom"`
	Reaction  FeedsReactionResponse `json:"reaction"`
	// The type of event: "feeds.comment.reaction.updated" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a reaction is updated on a comment.

func (*CommentReactionUpdatedEvent) GetEventType ΒΆ

func (e *CommentReactionUpdatedEvent) GetEventType() string

type CommentResponse ΒΆ

type CommentResponse struct {
	BookmarkCount int `json:"bookmark_count"`
	// Confidence score of the comment
	ConfidenceScore float64 `json:"confidence_score"`
	// When the comment was created
	CreatedAt Timestamp `json:"created_at"`
	// Number of downvotes for this comment
	DownvoteCount int `json:"downvote_count"`
	// Unique identifier for the comment
	ID string `json:"id"`
	// ID of the object this comment is associated with
	ObjectID string `json:"object_id"`
	// Type of the object this comment is associated with
	ObjectType string `json:"object_type"`
	// Number of reactions to this comment
	ReactionCount int `json:"reaction_count"`
	// Number of replies to this comment
	ReplyCount int `json:"reply_count"`
	// Score of the comment based on reactions
	Score int `json:"score"`
	// Status of the comment. One of: active, deleted, removed, hidden
	Status string `json:"status"`
	// When the comment was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Number of upvotes for this comment
	UpvoteCount int `json:"upvote_count"`
	// Users mentioned in the comment
	MentionedUsers []UserResponse `json:"mentioned_users"`
	// Current user's reactions to this activity
	OwnReactions []FeedsReactionResponse `json:"own_reactions"`
	// User response object
	User UserResponse `json:"user"`
	// Controversy score of the comment
	ControversyScore *float64 `json:"controversy_score,omitempty"`
	// When the comment was deleted
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`
	// When the comment was last edited
	EditedAt *Timestamp `json:"edited_at,omitempty"`
	// ID of parent comment for nested replies
	ParentID *string `json:"parent_id,omitempty"`
	// Text content of the comment
	Text *string `json:"text,omitempty"`
	// Attachments associated with the comment
	Attachments []Attachment `json:"attachments,omitempty"`
	// Recent reactions to the comment
	LatestReactions []FeedsReactionResponse `json:"latest_reactions,omitempty"`
	// Custom data for the comment
	Custom     map[string]any        `json:"custom,omitempty"`
	I18n       map[string]string     `json:"i18n,omitempty"`
	Moderation *ModerationV2Response `json:"moderation,omitempty"`
	// Grouped reactions by type
	ReactionGroups map[string]FeedsReactionGroupResponse `json:"reaction_groups,omitempty"`
}

type CommentRestoredEvent ΒΆ

type CommentRestoredEvent struct {
	// Date/time of creation
	CreatedAt Timestamp       `json:"created_at"`
	Fid       string          `json:"fid"`
	Comment   CommentResponse `json:"comment"`
	Custom    map[string]any  `json:"custom"`
	// The type of event: "feeds.comment.restored" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a soft-deleted comment is restored.

func (*CommentRestoredEvent) GetEventType ΒΆ

func (e *CommentRestoredEvent) GetEventType() string

type CommentUpdatedEvent ΒΆ

type CommentUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp       `json:"created_at"`
	Fid       string          `json:"fid"`
	Comment   CommentResponse `json:"comment"`
	Custom    map[string]any  `json:"custom"`
	// The type of event: "feeds.comment.updated" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a comment is updated.

func (*CommentUpdatedEvent) GetEventType ΒΆ

func (e *CommentUpdatedEvent) GetEventType() string

type CommitMessageRequest ΒΆ

type CommitMessageRequest struct {
}

type CompositeRecordingResponse ΒΆ

type CompositeRecordingResponse struct {
	Status string `json:"status"`
}

type ConcurrencyMinute ΒΆ added in v5.3.0

type ConcurrencyMinute struct {
	Joins  int    `json:"joins"`
	Leaves int    `json:"leaves"`
	Max    int    `json:"max"`
	Min    int    `json:"min"`
	Minute string `json:"minute"`
}

type ConfigOverridesRequest ΒΆ

type ConfigOverridesRequest struct {
	// Blocklist name
	Blocklist *string `json:"blocklist,omitempty"`
	// Blocklist behavior. One of: flag, block
	BlocklistBehavior *string `json:"blocklist_behavior,omitempty"`
	// Enable/disable message counting
	CountMessages *bool `json:"count_messages,omitempty"`
	// Maximum message length
	MaxMessageLength *int    `json:"max_message_length,omitempty"`
	PushLevel        *string `json:"push_level,omitempty"`
	// Enable/disable quotes
	Quotes *bool `json:"quotes,omitempty"`
	// Enable/disable reactions
	Reactions *bool `json:"reactions,omitempty"`
	// Enable/disable replies
	Replies *bool `json:"replies,omitempty"`
	// Enable/disable shared locations
	SharedLocations *bool `json:"shared_locations,omitempty"`
	// Enable/disable typing events
	TypingEvents *bool `json:"typing_events,omitempty"`
	// Enable/disable uploads
	Uploads *bool `json:"uploads,omitempty"`
	// Enable/disable URL enrichment
	UrlEnrichment *bool `json:"url_enrichment,omitempty"`
	// Enable/disable user message reminders
	UserMessageReminders *bool `json:"user_message_reminders,omitempty"`
	// List of available commands
	Commands        []string         `json:"commands,omitempty"`
	ChatPreferences *ChatPreferences `json:"chat_preferences,omitempty"`
	// Permission grants modifiers
	Grants map[string][]string `json:"grants,omitempty"`
}

Channel configuration overrides

type ConfigResponse ΒΆ

type ConfigResponse struct {
	// Whether moderation should be performed asynchronously
	Async bool `json:"async"`
	// When the configuration was created
	CreatedAt Timestamp `json:"created_at"`
	// Unique identifier for the moderation configuration
	Key string `json:"key"`
	// Team associated with the configuration
	Team string `json:"team"`
	// When the configuration was last updated
	UpdatedAt                   Timestamp `json:"updated_at"`
	SupportedVideoCallHarmTypes []string  `json:"supported_video_call_harm_types"`
	// Configurable image moderation label definitions for dashboard rendering
	AiImageLabelDefinitions []AIImageLabelDefinition `json:"ai_image_label_definitions,omitempty"`
	// Names of Bodyguard credential profiles registered on this app. The dashboard uses this list to render the profile picker on the AI Text section.
	AvailableBodyguardProfiles []BodyguardProfileSummary `json:"available_bodyguard_profiles,omitempty"`
	AiAudioConfig              *AIAudioConfigResponse    `json:"ai_audio_config,omitempty"`
	AiImageConfig              *AIImageConfig            `json:"ai_image_config,omitempty"`
	// Available L2 subclassifications per L1 image moderation label, based on the active provider
	AiImageSubclassifications          map[string][]string                 `json:"ai_image_subclassifications,omitempty"`
	AiTextConfig                       *AITextConfig                       `json:"ai_text_config,omitempty"`
	AiVideoConfig                      *AIVideoConfig                      `json:"ai_video_config,omitempty"`
	AutomodPlatformCircumventionConfig *AutomodPlatformCircumventionConfig `json:"automod_platform_circumvention_config,omitempty"`
	AutomodSemanticFiltersConfig       *AutomodSemanticFiltersConfig       `json:"automod_semantic_filters_config,omitempty"`
	AutomodToxicityConfig              *AutomodToxicityConfig              `json:"automod_toxicity_config,omitempty"`
	BlockListConfig                    *BlockListConfig                    `json:"block_list_config,omitempty"`
	FloodConfig                        *FloodConfig                        `json:"flood_config,omitempty"`
	LlmConfig                          *LLMConfig                          `json:"llm_config,omitempty"`
	VelocityFilterConfig               *VelocityFilterConfig               `json:"velocity_filter_config,omitempty"`
	VideoCallRuleConfig                *VideoCallRuleConfig                `json:"video_call_rule_config,omitempty"`
}

type ContentCountRuleParameters ΒΆ

type ContentCountRuleParameters struct {
	Threshold  *int    `json:"threshold,omitempty"`
	TimeWindow *string `json:"time_window,omitempty"`
}

type ContentCustomPropertyCountParameters ΒΆ

type ContentCustomPropertyCountParameters struct {
	Operator    *string `json:"operator,omitempty"`
	PropertyKey *string `json:"property_key,omitempty"`
	Threshold   *int    `json:"threshold,omitempty"`
	TimeWindow  *string `json:"time_window,omitempty"`
}

type ContentCustomPropertyParameters ΒΆ

type ContentCustomPropertyParameters struct {
	Operator    *string `json:"operator,omitempty"`
	PropertyKey *string `json:"property_key,omitempty"`
}

type CoordinatesResponse ΒΆ

type CoordinatesResponse struct {
	// Latitude coordinate
	Latitude float64 `json:"latitude"`
	// Longitude coordinate
	Longitude float64 `json:"longitude"`
}

Geographic coordinates

type CountByMinuteResponse ΒΆ

type CountByMinuteResponse struct {
	Count   int       `json:"count"`
	StartTs Timestamp `json:"start_ts"`
}

type Coverage ΒΆ added in v5.3.0

type Coverage struct {
	PublisherEncodingProfiles int            `json:"publisher_encoding_profiles"`
	Absent                    []AbsentMetric `json:"absent"`
	MetricsPct                MetricsPct     `json:"metrics_pct"`
}

type CreateBlockListRequest ΒΆ

type CreateBlockListRequest struct {
	// Block list name
	Name string `json:"name"`
	// List of words to block
	Words                      []string `json:"words"`
	IsConfusableFoldingEnabled *bool    `json:"is_confusable_folding_enabled,omitempty"`
	IsLeetCheckEnabled         *bool    `json:"is_leet_check_enabled,omitempty"`
	IsPluralCheckEnabled       *bool    `json:"is_plural_check_enabled,omitempty"`
	IsSubstringMatchingEnabled *bool    `json:"is_substring_matching_enabled,omitempty"`
	Team                       *string  `json:"team,omitempty"`
	UserID                     *string  `json:"user_id,omitempty"`
	// Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word
	Type *string `json:"type,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CreateBlockListResponse ΒΆ

type CreateBlockListResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Block list contains restricted words
	Blocklist *BlockListResponse `json:"blocklist,omitempty"`
}

Basic response information

type CreateCallTypeRequest ΒΆ

type CreateCallTypeRequest struct {
	Name string `json:"name"`
	// the external storage for the call type
	ExternalStorage *string `json:"external_storage,omitempty"`
	// the permissions granted to each role
	Grants               map[string][]string          `json:"grants"`
	NotificationSettings *NotificationSettingsRequest `json:"notification_settings,omitempty"`
	Settings             *CallSettingsRequest         `json:"settings,omitempty"`
}

type CreateCallTypeResponse ΒΆ

type CreateCallTypeResponse struct {
	// the time the call type was created
	CreatedAt Timestamp `json:"created_at"`
	Duration  string    `json:"duration"`
	// the name of the call type
	Name string `json:"name"`
	// the time the call type was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// the permissions granted to each role
	Grants               map[string][]string          `json:"grants"`
	NotificationSettings NotificationSettingsResponse `json:"notification_settings"`
	Settings             CallSettingsResponse         `json:"settings"`
	// the external storage for the call type
	ExternalStorage *string `json:"external_storage,omitempty"`
}

Response for creating a call type

type CreateCampaignRequest ΒΆ

type CreateCampaignRequest struct {
	// The user ID of the sender
	SenderID        string                  `json:"sender_id"`
	MessageTemplate CampaignMessageTemplate `json:"message_template"`
	// Whether to create channels for the campaign, if they don't exist
	CreateChannels *bool `json:"create_channels,omitempty"`
	// The description of the campaign
	Description *string `json:"description,omitempty"`
	ID          *string `json:"id,omitempty"`
	// The name of the campaign
	Name *string `json:"name,omitempty"`
	// The sender mode of the campaign
	SenderMode *string `json:"sender_mode,omitempty"`
	// The visibility of the created channels for the sender
	SenderVisibility *string `json:"sender_visibility,omitempty"`
	// Whether the campaign should show channels, if they are hidden
	ShowChannels *bool `json:"show_channels,omitempty"`
	// Whether to skip push notifications
	SkipPush *bool `json:"skip_push,omitempty"`
	// Whether to skip webhooks
	SkipWebhook *bool `json:"skip_webhook,omitempty"`
	// The IDs of the segments to send the campaign to. Duplicate user IDs are removed. Use either user_ids or segment_ids, not both
	SegmentIds []string `json:"segment_ids"`
	// The userIDs to send the campaign to. Use either segment ids or user ids not both
	UserIds         []string                 `json:"user_ids"`
	ChannelTemplate *CampaignChannelTemplate `json:"channel_template,omitempty"`
}

type CreateCampaignResponse ΒΆ

type CreateCampaignResponse struct {
	// Duration of the request in milliseconds
	Duration string            `json:"duration"`
	Campaign *CampaignResponse `json:"campaign,omitempty"`
	Users    *PagerResponse    `json:"users,omitempty"`
}

Basic response information

type CreateChannelTypeRequest ΒΆ

type CreateChannelTypeRequest struct {
	// Automod. One of: disabled, simple, AI
	Automod string `json:"automod"`
	// Automod behavior. One of: flag, block
	AutomodBehavior string `json:"automod_behavior"`
	// Max message length
	MaxMessageLength int `json:"max_message_length"`
	// Channel type name
	Name string `json:"name"`
	// Blocklist
	Blocklist *string `json:"blocklist,omitempty"`
	// Blocklist behavior. One of: flag, block, shadow_block
	BlocklistBehavior *string `json:"blocklist_behavior,omitempty"`
	// Connect events
	ConnectEvents *bool `json:"connect_events,omitempty"`
	// Count messages in channel.
	CountMessages *bool `json:"count_messages,omitempty"`
	// Custom events
	CustomEvents   *bool `json:"custom_events,omitempty"`
	DeliveryEvents *bool `json:"delivery_events,omitempty"`
	// Mark messages pending
	MarkMessagesPending *bool `json:"mark_messages_pending,omitempty"`
	// Message retention. One of: infinite, numeric
	MessageRetention *string `json:"message_retention,omitempty"`
	// Mutes
	Mutes *bool `json:"mutes,omitempty"`
	// Partition size
	PartitionSize *int `json:"partition_size,omitempty"`
	// Partition TTL
	PartitionTtl *string `json:"partition_ttl,omitempty"`
	// Polls
	Polls *bool `json:"polls,omitempty"`
	// Default push notification level for the channel type. One of: all, all_mentions, mentions, direct_mentions, none
	PushLevel *string `json:"push_level,omitempty"`
	// Push notifications
	PushNotifications *bool `json:"push_notifications,omitempty"`
	// Reactions
	Reactions *bool `json:"reactions,omitempty"`
	// Read events
	ReadEvents *bool `json:"read_events,omitempty"`
	// Replies
	Replies *bool `json:"replies,omitempty"`
	// Search
	Search *bool `json:"search,omitempty"`
	// Enables shared location messages
	SharedLocations                *bool `json:"shared_locations,omitempty"`
	SkipLastMsgUpdateForSystemMsgs *bool `json:"skip_last_msg_update_for_system_msgs,omitempty"`
	// Typing events
	TypingEvents *bool `json:"typing_events,omitempty"`
	// Uploads
	Uploads *bool `json:"uploads,omitempty"`
	// URL enrichment
	UrlEnrichment        *bool `json:"url_enrichment,omitempty"`
	UserMessageReminders *bool `json:"user_message_reminders,omitempty"`
	// Blocklists
	Blocklists []BlockListOptions `json:"blocklists"`
	// List of commands that channel supports
	Commands []string `json:"commands"`
	// List of permissions for the channel type
	Permissions     []PolicyRequest  `json:"permissions"`
	ChatPreferences *ChatPreferences `json:"chat_preferences,omitempty"`
	// List of grants for the channel type
	Grants map[string][]string `json:"grants"`
}

type CreateChannelTypeResponse ΒΆ

type CreateChannelTypeResponse struct {
	Automod                        string              `json:"automod"`
	AutomodBehavior                string              `json:"automod_behavior"`
	ConnectEvents                  bool                `json:"connect_events"`
	CountMessages                  bool                `json:"count_messages"`
	CreatedAt                      Timestamp           `json:"created_at"`
	CustomEvents                   bool                `json:"custom_events"`
	DeliveryEvents                 bool                `json:"delivery_events"`
	Duration                       string              `json:"duration"`
	MarkMessagesPending            bool                `json:"mark_messages_pending"`
	MaxMessageLength               int                 `json:"max_message_length"`
	Mutes                          bool                `json:"mutes"`
	Name                           string              `json:"name"`
	Polls                          bool                `json:"polls"`
	PushNotifications              bool                `json:"push_notifications"`
	Quotes                         bool                `json:"quotes"`
	Reactions                      bool                `json:"reactions"`
	ReadEvents                     bool                `json:"read_events"`
	Reminders                      bool                `json:"reminders"`
	Replies                        bool                `json:"replies"`
	Search                         bool                `json:"search"`
	SharedLocations                bool                `json:"shared_locations"`
	SkipLastMsgUpdateForSystemMsgs bool                `json:"skip_last_msg_update_for_system_msgs"`
	TypingEvents                   bool                `json:"typing_events"`
	UpdatedAt                      Timestamp           `json:"updated_at"`
	Uploads                        bool                `json:"uploads"`
	UrlEnrichment                  bool                `json:"url_enrichment"`
	UserMessageReminders           bool                `json:"user_message_reminders"`
	Commands                       []string            `json:"commands"`
	Permissions                    []PolicyRequest     `json:"permissions"`
	Grants                         map[string][]string `json:"grants"`
	Blocklist                      *string             `json:"blocklist,omitempty"`
	BlocklistBehavior              *string             `json:"blocklist_behavior,omitempty"`
	PartitionSize                  *int                `json:"partition_size,omitempty"`
	PartitionTtl                   *string             `json:"partition_ttl,omitempty"`
	PushLevel                      *string             `json:"push_level,omitempty"`
	AllowedFlagReasons             []string            `json:"allowed_flag_reasons,omitempty"`
	Blocklists                     []BlockListOptions  `json:"blocklists,omitempty"`
	// Sets thresholds for AI moderation
	AutomodThresholds *Thresholds      `json:"automod_thresholds,omitempty"`
	ChatPreferences   *ChatPreferences `json:"chat_preferences,omitempty"`
}

type CreateCollectionsRequest ΒΆ

type CreateCollectionsRequest struct {
	// List of collections to create
	Collections []CollectionRequest `json:"collections"`
	UserID      *string             `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CreateCollectionsResponse ΒΆ

type CreateCollectionsResponse struct {
	Duration string `json:"duration"`
	// List of created collections
	Collections []CollectionResponse `json:"collections"`
}

type CreateCommandRequest ΒΆ

type CreateCommandRequest struct {
	// Description, shown in commands auto-completion
	Description string `json:"description"`
	// Unique command name
	Name string `json:"name"`
	// Arguments help text, shown in commands auto-completion
	Args *string `json:"args,omitempty"`
	// Set name used for grouping commands
	Set *string `json:"set,omitempty"`
}

type CreateCommandResponse ΒΆ

type CreateCommandResponse struct {
	Duration string `json:"duration"`
	// Represents custom chat command
	Command *Command `json:"command,omitempty"`
}

type CreateDeviceRequest ΒΆ

type CreateDeviceRequest struct {
	// Device ID
	ID string `json:"id"`
	// Push provider
	PushProvider string `json:"push_provider"`
	// Stable physical device identifier used to deduplicate pushes across push providers (e.g. APNs VoIP and Firebase on the same iOS device). Distinct from 'id', which is the push token.
	HardwareID *string `json:"hardware_id,omitempty"`
	// Push provider name
	PushProviderName *string `json:"push_provider_name,omitempty"`
	// **Server-side only**. User ID which server acts upon
	UserID *string `json:"user_id,omitempty"`
	// When true the token is for Apple VoIP push notifications
	VoipToken *bool `json:"voip_token,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CreateExternalStorageRequest ΒΆ

type CreateExternalStorageRequest struct {
	// The name of the bucket on the service provider
	Bucket string `json:"bucket"`
	// The name of the provider, this must be unique
	Name string `json:"name"`
	// The type of storage to use
	StorageType    string  `json:"storage_type"`
	GcsCredentials *string `json:"gcs_credentials,omitempty"`
	// The path prefix to use for storing files
	Path *string `json:"path,omitempty"`
	// Config for creating Amazon S3 storage.
	AWSS3 *S3Request `json:"aws_s3,omitempty"`
	// Config for creating Azure Blob Storage storage
	AzureBlob *AzureRequest `json:"azure_blob,omitempty"`
}

type CreateExternalStorageResponse ΒΆ

type CreateExternalStorageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type CreateFeedGroupRequest ΒΆ

type CreateFeedGroupRequest struct {
	// Unique identifier for the feed group
	ID string `json:"id"`
	// Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'private'. Defaults to 'visible' if not provided.
	DefaultVisibility *string `json:"default_visibility,omitempty"`
	// Configuration for activity processors
	ActivityProcessors []ActivityProcessorConfig `json:"activity_processors"`
	// Configuration for activity selectors
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	ActivityFilter    *ActivityFilterConfig    `json:"activity_filter,omitempty"`
	Aggregation       *AggregationConfig       `json:"aggregation,omitempty"`
	// Custom data for the feed group
	Custom           map[string]any          `json:"custom"`
	Notification     *NotificationConfig     `json:"notification,omitempty"`
	PushNotification *PushNotificationConfig `json:"push_notification,omitempty"`
	Ranking          *RankingConfig          `json:"ranking,omitempty"`
	Stories          *StoriesConfig          `json:"stories,omitempty"`
}

type CreateFeedGroupResponse ΒΆ

type CreateFeedGroupResponse struct {
	Duration  string            `json:"duration"`
	FeedGroup FeedGroupResponse `json:"feed_group"`
}

type CreateFeedViewRequest ΒΆ

type CreateFeedViewRequest struct {
	// Unique identifier for the feed view
	ID string `json:"id"`
	// Configuration for selecting activities
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	Aggregation       *AggregationConfig       `json:"aggregation,omitempty"`
	Ranking           *RankingConfig           `json:"ranking,omitempty"`
}

type CreateFeedViewResponse ΒΆ

type CreateFeedViewResponse struct {
	Duration string           `json:"duration"`
	FeedView FeedViewResponse `json:"feed_view"`
}

type CreateFeedsBatchRequest ΒΆ

type CreateFeedsBatchRequest struct {
	// List of feeds to create
	Feeds []FeedRequest `json:"feeds"`
	// If true, enriches the created feeds with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
}

type CreateFeedsBatchResponse ΒΆ

type CreateFeedsBatchResponse struct {
	Duration string `json:"duration"`
	// List of created feeds
	Feeds []FeedResponse `json:"feeds"`
}

type CreateGuestRequest ΒΆ

type CreateGuestRequest struct {
	// User request object
	User UserRequest `json:"user"`
}

type CreateGuestResponse ΒΆ

type CreateGuestResponse struct {
	// the access token to authenticate the user
	AccessToken string `json:"access_token"`
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// User response object
	User UserResponse `json:"user"`
}

type CreateImportRequest ΒΆ

type CreateImportRequest struct {
	Mode        string `json:"mode"`
	Path        string `json:"path"`
	MergeCustom *bool  `json:"merge_custom,omitempty"`
}

type CreateImportResponse ΒΆ

type CreateImportResponse struct {
	// Duration of the request in milliseconds
	Duration   string      `json:"duration"`
	ImportTask *ImportTask `json:"import_task,omitempty"`
}

Basic response information

type CreateImportURLRequest ΒΆ

type CreateImportURLRequest struct {
	Filename *string `json:"filename,omitempty"`
}

type CreateImportURLResponse ΒΆ

type CreateImportURLResponse struct {
	// Duration of the request in milliseconds
	Duration  string `json:"duration"`
	Path      string `json:"path"`
	UploadUrl string `json:"upload_url"`
}

Basic response information

type CreateImportV2TaskRequest ΒΆ

type CreateImportV2TaskRequest struct {
	Product  string               `json:"product"`
	Settings ImportV2TaskSettings `json:"settings"`
	UserID   *string              `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CreateImportV2TaskResponse ΒΆ

type CreateImportV2TaskResponse struct {
	AppPk     int       `json:"app_pk"`
	CreatedAt Timestamp `json:"created_at"`
	// Duration of the request in milliseconds
	Duration  string               `json:"duration"`
	ID        string               `json:"id"`
	Product   string               `json:"product"`
	State     int                  `json:"state"`
	UpdatedAt Timestamp            `json:"updated_at"`
	Settings  ImportV2TaskSettings `json:"settings"`
}

Basic response information

type CreateMembershipLevelRequest ΒΆ

type CreateMembershipLevelRequest struct {
	// Unique identifier for the membership level
	ID string `json:"id"`
	// Display name for the membership level
	Name string `json:"name"`
	// Optional description of the membership level
	Description *string `json:"description,omitempty"`
	// Priority level (higher numbers = higher priority)
	Priority *int `json:"priority,omitempty"`
	// Activity tags this membership level gives access to
	Tags []string `json:"tags"`
	// Custom data for the membership level
	Custom map[string]any `json:"custom"`
}

type CreateMembershipLevelResponse ΒΆ

type CreateMembershipLevelResponse struct {
	Duration        string                  `json:"duration"`
	MembershipLevel MembershipLevelResponse `json:"membership_level"`
}

type CreatePolicyTestSetRequest ΒΆ added in v5.3.0

type CreatePolicyTestSetRequest struct {
	// Display name; unique within an app
	Name string `json:"name"`
	// Moderation config key (default: app default)
	ConfigKey *string `json:"config_key,omitempty"`
	// Execution target: 'check' or 'labels'. Optional β€” defaults to 'labels' when the org has the labels API enabled, 'check' otherwise
	Mode *string `json:"mode,omitempty"`
	// Team scope for the config (optional)
	Team *string `json:"team,omitempty"`
	// Messages to test; capped at 1000. Mutually exclusive with seed
	Rows []PolicyTestRow     `json:"rows"`
	Seed *PolicyTestSeedSpec `json:"seed,omitempty"`
}

type CreatePollOptionRequest ΒΆ

type CreatePollOptionRequest struct {
	// Option text
	Text   string  `json:"text"`
	UserID *string `json:"user_id,omitempty"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CreatePollRequest ΒΆ

type CreatePollRequest struct {
	// The name of the poll
	Name string `json:"name"`
	// Indicates whether users can suggest user defined answers
	AllowAnswers              *bool `json:"allow_answers,omitempty"`
	AllowUserSuggestedOptions *bool `json:"allow_user_suggested_options,omitempty"`
	// A description of the poll
	Description *string `json:"description,omitempty"`
	// Indicates whether users can cast multiple votes
	EnforceUniqueVote *bool   `json:"enforce_unique_vote,omitempty"`
	ID                *string `json:"id,omitempty"`
	// Indicates whether the poll is open for voting
	IsClosed *bool `json:"is_closed,omitempty"`
	// Indicates the maximum amount of votes a user can cast
	MaxVotesAllowed  *int              `json:"max_votes_allowed,omitempty"`
	UserID           *string           `json:"user_id,omitempty"`
	VotingVisibility *string           `json:"voting_visibility,omitempty"`
	Options          []PollOptionInput `json:"options"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CreateQueueRequest ΒΆ

type CreateQueueRequest struct {
	Name        string           `json:"name"`
	Type        string           `json:"type"`
	Description *string          `json:"description,omitempty"`
	UserID      *string          `json:"user_id,omitempty"`
	Sort        []map[string]any `json:"sort"`
	Filters     map[string]any   `json:"filters"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CreateReminderRequest ΒΆ

type CreateReminderRequest struct {
	RemindAt *Timestamp `json:"remind_at,omitempty"`
	UserID   *string    `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CreateRoleRequest ΒΆ

type CreateRoleRequest struct {
	// Role name
	Name string `json:"name"`
}

type CreateRoleResponse ΒΆ

type CreateRoleResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	Role     Role   `json:"role"`
}

Basic response information

type CreateSIPInboundRoutingRuleRequest ΒΆ

type CreateSIPInboundRoutingRuleRequest struct {
	// Name of the SIP Inbound Routing Rule
	Name string `json:"name"`
	// List of SIP trunk IDs
	TrunkIds []string `json:"trunk_ids"`
	// Configuration for SIP caller settings
	CallerConfigs SIPCallerConfigsRequest `json:"caller_configs"`
	// List of called numbers
	CalledNumbers []string `json:"called_numbers"`
	// List of caller numbers (optional)
	CallerNumbers []string `json:"caller_numbers"`
	// Configuration for SIP call settings
	CallConfigs *SIPCallConfigsRequest `json:"call_configs,omitempty"`
	// Configuration for direct routing rule calls
	DirectRoutingConfigs *SIPDirectRoutingRuleCallConfigsRequest `json:"direct_routing_configs,omitempty"`
	// Configuration for PIN protection settings
	PinProtectionConfigs *SIPPinProtectionConfigsRequest `json:"pin_protection_configs,omitempty"`
	// Configuration for PIN routing rule calls
	PinRoutingConfigs *SIPInboundRoutingRulePinConfigsRequest `json:"pin_routing_configs,omitempty"`
}

type CreateSIPTrunkRequest ΒΆ

type CreateSIPTrunkRequest struct {
	// Name of the SIP trunk
	Name string `json:"name"`
	// Phone numbers associated with this SIP trunk
	Numbers []string `json:"numbers"`
	// Optional password for SIP trunk authentication
	Password *string `json:"password,omitempty"`
	// Optional list of allowed IPv4/IPv6 addresses or CIDR blocks
	AllowedIps []string `json:"allowed_ips"`
}

type CreateSIPTrunkResponse ΒΆ

type CreateSIPTrunkResponse struct {
	Duration string `json:"duration"`
	// SIP trunk information
	SipTrunk *SIPTrunkResponse `json:"sip_trunk,omitempty"`
}

Response containing the created SIP trunk

type CreateSegmentRequest ΒΆ

type CreateSegmentRequest struct {
	// The type of the segment
	Type string `json:"type"`
	// If true, all sender channels are included in the segment
	AllSenderChannels *bool `json:"all_sender_channels,omitempty"`
	// If true, all users are included in the segment
	AllUsers *bool `json:"all_users,omitempty"`
	// The description of the segment (max 256 characters)
	Description *string `json:"description,omitempty"`
	// The ID of the segment
	ID *string `json:"id,omitempty"`
	// The name of the segment (max 128 characters)
	Name *string `json:"name,omitempty"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
}

type CreateSegmentResponse ΒΆ

type CreateSegmentResponse struct {
	// Duration of the request in milliseconds
	Duration string           `json:"duration"`
	Segment  *SegmentResponse `json:"segment,omitempty"`
}

Basic response information

type CreateUserGroupRequest ΒΆ

type CreateUserGroupRequest struct {
	// The user friendly name of the user group
	Name string `json:"name"`
	// An optional description for the group
	Description *string `json:"description,omitempty"`
	// Optional user group ID. If not provided, a UUID v7 will be generated
	ID *string `json:"id,omitempty"`
	// Optional team ID to scope the group to a team
	TeamID *string `json:"team_id,omitempty"`
	// Optional initial list of user IDs to add as members
	MemberIds []string `json:"member_ids"`
}

type CreateUserGroupResponse ΒΆ

type CreateUserGroupResponse struct {
	Duration  string             `json:"duration"`
	UserGroup *UserGroupResponse `json:"user_group,omitempty"`
}

Response for creating a user group

type CustomActionRequestPayload ΒΆ

type CustomActionRequestPayload struct {
	// Custom action identifier
	ID *string `json:"id,omitempty"`
	// Custom action options
	Options map[string]any `json:"options,omitempty"`
}

Configuration for custom moderation action

type CustomCheckFlag ΒΆ

type CustomCheckFlag struct {
	// Type of check (custom_check_text, custom_check_image, custom_check_video)
	Type string `json:"type"`
	// Optional explanation for the flag
	Reason *string `json:"reason,omitempty"`
	// Labels from various moderation sources
	Labels []string `json:"labels,omitempty"`
	// Additional metadata for the flag
	Custom map[string]any `json:"custom,omitempty"`
}

type CustomCheckRequest ΒΆ

type CustomCheckRequest struct {
	// Unique identifier of the entity
	EntityID string `json:"entity_id"`
	// Type of entity to perform custom check on
	EntityType string `json:"entity_type"`
	// List of custom check flags (1-10 flags required)
	Flags []CustomCheckFlag `json:"flags"`
	// ID of the user who created the entity (required for non-message entities)
	EntityCreatorID *string `json:"entity_creator_id,omitempty"`
	UserID          *string `json:"user_id,omitempty"`
	// Content payload for moderation
	ModerationPayload *ModerationPayloadRequest `json:"moderation_payload,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type CustomCheckResponse ΒΆ

type CustomCheckResponse struct {
	Duration string `json:"duration"`
	// Unique identifier of the custom check
	ID string `json:"id"`
	// Status of the custom check
	Status string                   `json:"status"`
	Item   *ReviewQueueItemResponse `json:"item,omitempty"`
}

type CustomEvent ΒΆ

type CustomEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

func (*CustomEvent) GetEventType ΒΆ

func (e *CustomEvent) GetEventType() string

type CustomVideoEvent ΒΆ

type CustomVideoEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event, "custom" in this case
	Type string `json:"type"`
}

A custom event, this event is used to send custom events to other participants in the call.

func (*CustomVideoEvent) GetEventType ΒΆ

func (e *CustomVideoEvent) GetEventType() string

type DailyAggregateCallDurationReportResponse ΒΆ

type DailyAggregateCallDurationReportResponse struct {
	Date   string             `json:"date"`
	Report CallDurationReport `json:"report"`
}

type DailyAggregateCallParticipantCountReportResponse ΒΆ

type DailyAggregateCallParticipantCountReportResponse struct {
	Date   string                     `json:"date"`
	Report CallParticipantCountReport `json:"report"`
}

type DailyAggregateCallsPerDayReportResponse ΒΆ

type DailyAggregateCallsPerDayReportResponse struct {
	Date   string            `json:"date"`
	Report CallsPerDayReport `json:"report"`
}

type DailyAggregateQualityScoreReportResponse ΒΆ

type DailyAggregateQualityScoreReportResponse struct {
	Date   string             `json:"date"`
	Report QualityScoreReport `json:"report"`
}

type DailyAggregateSDKUsageReportResponse ΒΆ

type DailyAggregateSDKUsageReportResponse struct {
	Date   string         `json:"date"`
	Report SDKUsageReport `json:"report"`
}

type DailyAggregateUserFeedbackReportResponse ΒΆ

type DailyAggregateUserFeedbackReportResponse struct {
	Date   string             `json:"date"`
	Report UserFeedbackReport `json:"report"`
}

type DailyDigestCallSessionSummary ΒΆ added in v5.3.0

type DailyDigestCallSessionSummary struct {
	CallCid          string                     `json:"call_cid"`
	CallSessionID    string                     `json:"call_session_id"`
	HasDigest        bool                       `json:"has_digest"`
	Counts           CallStatsParticipantCounts `json:"counts"`
	DigestError      *string                    `json:"digest_error,omitempty"`
	SessionEndedAt   *string                    `json:"session_ended_at,omitempty"`
	SessionStartedAt *string                    `json:"session_started_at,omitempty"`
}

type DailyMetricResponse ΒΆ

type DailyMetricResponse struct {
	// Date in YYYY-MM-DD format
	Date string `json:"date"`
	// Metric value for this date
	Value int `json:"value"`
}

type DailyMetricStatsResponse ΒΆ

type DailyMetricStatsResponse struct {
	// Total value across all days in the date range
	Total int `json:"total"`
	// Array of daily metric values
	Daily []DailyMetricResponse `json:"daily"`
}

type DailyValue ΒΆ

type DailyValue struct {
	// Date in YYYY-MM-DD format
	Date string `json:"date"`
	// Metric value for this date
	Value int `json:"value"`
}

Metric value for a specific date

type Data ΒΆ

type Data struct {
	ID string `json:"id"`
}

type DataDogInfo ΒΆ

type DataDogInfo struct {
	APIKey  *string `json:"api_key,omitempty"`
	Enabled *bool   `json:"enabled,omitempty"`
	Site    *string `json:"site,omitempty"`
}

type DeactivateUserRequest ΒΆ

type DeactivateUserRequest struct {
	// ID of the user who deactivated the user
	CreatedByID *string `json:"created_by_id,omitempty"`
	// Makes messages appear to be deleted
	MarkMessagesDeleted *bool `json:"mark_messages_deleted,omitempty"`
}

type DeactivateUserResponse ΒΆ

type DeactivateUserResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type DeactivateUsersRequest ΒΆ

type DeactivateUsersRequest struct {
	// User IDs to deactivate
	UserIds []string `json:"user_ids"`
	// ID of the user who deactivated the users
	CreatedByID         *string `json:"created_by_id,omitempty"`
	MarkChannelsDeleted *bool   `json:"mark_channels_deleted,omitempty"`
	// Makes messages appear to be deleted
	MarkMessagesDeleted *bool `json:"mark_messages_deleted,omitempty"`
}

type DeactivateUsersResponse ΒΆ

type DeactivateUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	TaskID   string `json:"task_id"`
}

Basic response information

type DecayFunctionConfig ΒΆ

type DecayFunctionConfig struct {
	// Base value for decay function
	Base *string `json:"base,omitempty"`
	// Decay rate
	Decay *string `json:"decay,omitempty"`
	// Direction of decay
	Direction *string `json:"direction,omitempty"`
	// Offset value for decay function
	Offset *string `json:"offset,omitempty"`
	// Origin value for decay function
	Origin *string `json:"origin,omitempty"`
	// Scale factor for decay function
	Scale *string `json:"scale,omitempty"`
}

type DefaultLogger ΒΆ

type DefaultLogger struct {
	// contains filtered or unexported fields
}

DefaultLogger is the default implementation of the Logger interface.

func NewDefaultLogger ΒΆ

func NewDefaultLogger(out io.Writer, prefix string, flag int, level LogLevel) *DefaultLogger

NewDefaultLogger creates a new DefaultLogger instance.

func (*DefaultLogger) Debug ΒΆ

func (l *DefaultLogger) Debug(format string, v ...interface{})

Debug logs a debug message.

func (*DefaultLogger) Error ΒΆ

func (l *DefaultLogger) Error(format string, v ...interface{})

Error logs an error message.

func (*DefaultLogger) Info ΒΆ

func (l *DefaultLogger) Info(format string, v ...interface{})

Info logs an info message.

func (*DefaultLogger) SetLevel ΒΆ

func (l *DefaultLogger) SetLevel(level LogLevel)

SetLevel sets the logging level.

func (*DefaultLogger) Warn ΒΆ

func (l *DefaultLogger) Warn(format string, v ...interface{})

Warn logs a warning message.

type DeleteActionConfigRequest ΒΆ

type DeleteActionConfigRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type DeleteActionConfigResponse ΒΆ

type DeleteActionConfigResponse struct {
	// Number of action configs deleted (0 or 1)
	Deleted  int    `json:"deleted"`
	Duration string `json:"duration"`
}

type DeleteActivitiesRequest ΒΆ

type DeleteActivitiesRequest struct {
	// List of activity IDs to delete
	Ids []string `json:"ids"`
	// Whether to also delete any notification activities created from mentions in these activities
	DeleteNotificationActivity *bool `json:"delete_notification_activity,omitempty"`
	// Whether to permanently delete the activities
	HardDelete *bool   `json:"hard_delete,omitempty"`
	UserID     *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type DeleteActivitiesResponse ΒΆ

type DeleteActivitiesResponse struct {
	Duration string `json:"duration"`
	// List of activity IDs that were successfully deleted
	DeletedIds []string `json:"deleted_ids"`
}

type DeleteActivityReactionRequest ΒΆ

type DeleteActivityReactionRequest struct {
	DeleteNotificationActivity *bool   `json:"-" query:"delete_notification_activity"`
	UserID                     *string `json:"-" query:"user_id"`
}

type DeleteActivityReactionResponse ΒΆ

type DeleteActivityReactionResponse struct {
	Duration string                `json:"duration"`
	Activity ActivityResponse      `json:"activity"`
	Reaction FeedsReactionResponse `json:"reaction"`
}

type DeleteActivityRequest ΒΆ

type DeleteActivityRequest struct {
	HardDelete                 *bool `json:"-" query:"hard_delete"`
	DeleteNotificationActivity *bool `json:"-" query:"delete_notification_activity"`
}

type DeleteActivityRequestPayload ΒΆ

type DeleteActivityRequestPayload struct {
	// ID of the activity to delete (alternative to item_id)
	EntityID *string `json:"entity_id,omitempty"`
	// Type of the entity (required for delete_activity to distinguish v2 vs v3)
	EntityType *string `json:"entity_type,omitempty"`
	// Whether to permanently delete the activity
	HardDelete *bool `json:"hard_delete,omitempty"`
	// Reason for deletion
	Reason *string `json:"reason,omitempty"`
}

Configuration for activity deletion action

type DeleteActivityResponse ΒΆ

type DeleteActivityResponse struct {
	Duration string `json:"duration"`
}

type DeleteBlockListRequest ΒΆ

type DeleteBlockListRequest struct {
	Team   *string `json:"-" query:"team"`
	UserID *string `json:"-" query:"user_id"`
}

type DeleteBookmarkFolderRequest ΒΆ

type DeleteBookmarkFolderRequest struct {
}

type DeleteBookmarkFolderResponse ΒΆ

type DeleteBookmarkFolderResponse struct {
	Duration string `json:"duration"`
}

type DeleteBookmarkRequest ΒΆ

type DeleteBookmarkRequest struct {
	FolderID *string `json:"-" query:"folder_id"`
	UserID   *string `json:"-" query:"user_id"`
}

type DeleteBookmarkResponse ΒΆ

type DeleteBookmarkResponse struct {
	Duration string           `json:"duration"`
	Bookmark BookmarkResponse `json:"bookmark"`
}

type DeleteCallRequest ΒΆ

type DeleteCallRequest struct {
	// if true the call will be hard deleted along with all related data
	Hard *bool `json:"hard,omitempty"`
}

type DeleteCallResponse ΒΆ

type DeleteCallResponse struct {
	Duration string `json:"duration"`
	// Represents a call
	Call   CallResponse `json:"call"`
	TaskID *string      `json:"task_id,omitempty"`
}

DeleteCallResponse is the payload for deleting a call.

type DeleteCallTypeRequest ΒΆ

type DeleteCallTypeRequest struct {
}

type DeleteCampaignRequest ΒΆ

type DeleteCampaignRequest struct {
}

type DeleteCampaignResponse ΒΆ

type DeleteCampaignResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type DeleteChannelFileRequest ΒΆ

type DeleteChannelFileRequest struct {
	Url *string `json:"-" query:"url"`
}

type DeleteChannelImageRequest ΒΆ

type DeleteChannelImageRequest struct {
	Url *string `json:"-" query:"url"`
}

type DeleteChannelRequest ΒΆ

type DeleteChannelRequest struct {
	HardDelete *bool `json:"-" query:"hard_delete"`
}

type DeleteChannelResponse ΒΆ

type DeleteChannelResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
}

Basic response information

type DeleteChannelTypeRequest ΒΆ

type DeleteChannelTypeRequest struct {
}

type DeleteChannelsRequest ΒΆ

type DeleteChannelsRequest struct {
	// All channels that should be deleted
	Cids []string `json:"cids"`
	// Specify if channels and all ressources should be hard deleted
	HardDelete *bool `json:"hard_delete,omitempty"`
}

type DeleteChannelsResponse ΒΆ

type DeleteChannelsResponse struct {
	// Duration of the request in milliseconds
	Duration string  `json:"duration"`
	TaskID   *string `json:"task_id,omitempty"`
	// Map of channel IDs and their deletion results
	Result map[string]*DeleteChannelsResultResponse `json:"result,omitempty"`
}

type DeleteChannelsResultResponse ΒΆ

type DeleteChannelsResultResponse struct {
	Status string  `json:"status"`
	Error  *string `json:"error,omitempty"`
}

type DeleteCollectionsRequest ΒΆ

type DeleteCollectionsRequest struct {
	CollectionRefs []string `json:"-" query:"collection_refs"`
}

type DeleteCollectionsResponse ΒΆ

type DeleteCollectionsResponse struct {
	Duration string `json:"duration"`
}

type DeleteCommandRequest ΒΆ

type DeleteCommandRequest struct {
}

type DeleteCommandResponse ΒΆ

type DeleteCommandResponse struct {
	Duration string `json:"duration"`
	// Command name
	Name string `json:"name"`
}

type DeleteCommentBookmarkRequest ΒΆ

type DeleteCommentBookmarkRequest struct {
	FolderID *string `json:"-" query:"folder_id"`
	UserID   *string `json:"-" query:"user_id"`
}

type DeleteCommentBookmarkResponse ΒΆ

type DeleteCommentBookmarkResponse struct {
	Duration string           `json:"duration"`
	Bookmark BookmarkResponse `json:"bookmark"`
}

type DeleteCommentReactionRequest ΒΆ

type DeleteCommentReactionRequest struct {
	DeleteNotificationActivity *bool   `json:"-" query:"delete_notification_activity"`
	UserID                     *string `json:"-" query:"user_id"`
}

type DeleteCommentReactionResponse ΒΆ

type DeleteCommentReactionResponse struct {
	Duration string                `json:"duration"`
	Comment  CommentResponse       `json:"comment"`
	Reaction FeedsReactionResponse `json:"reaction"`
}

type DeleteCommentRequest ΒΆ

type DeleteCommentRequest struct {
	HardDelete                 *bool `json:"-" query:"hard_delete"`
	DeleteNotificationActivity *bool `json:"-" query:"delete_notification_activity"`
}

type DeleteCommentRequestPayload ΒΆ

type DeleteCommentRequestPayload struct {
	// ID of the comment to delete (alternative to item_id)
	EntityID *string `json:"entity_id,omitempty"`
	// Type of the entity
	EntityType *string `json:"entity_type,omitempty"`
	// Whether to permanently delete the comment
	HardDelete *bool `json:"hard_delete,omitempty"`
	// Reason for deletion
	Reason *string `json:"reason,omitempty"`
}

Configuration for comment deletion action

type DeleteCommentResponse ΒΆ

type DeleteCommentResponse struct {
	Duration string           `json:"duration"`
	Activity ActivityResponse `json:"activity"`
	Comment  CommentResponse  `json:"comment"`
}

type DeleteConfigRequest ΒΆ

type DeleteConfigRequest struct {
	Team   *string `json:"-" query:"team"`
	UserID *string `json:"-" query:"user_id"`
}

type DeleteDeviceRequest ΒΆ

type DeleteDeviceRequest struct {
	ID     string  `json:"-" query:"id"`
	UserID *string `json:"-" query:"user_id"`
}

type DeleteDraftRequest ΒΆ

type DeleteDraftRequest struct {
	ParentID *string `json:"-" query:"parent_id"`
	UserID   *string `json:"-" query:"user_id"`
}

type DeleteExternalStorageRequest ΒΆ

type DeleteExternalStorageRequest struct {
}

type DeleteExternalStorageResponse ΒΆ

type DeleteExternalStorageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type DeleteFeedGroupRequest ΒΆ

type DeleteFeedGroupRequest struct {
	HardDelete *bool `json:"-" query:"hard_delete"`
}

type DeleteFeedGroupResponse ΒΆ

type DeleteFeedGroupResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type DeleteFeedRequest ΒΆ

type DeleteFeedRequest struct {
	HardDelete          *bool `json:"-" query:"hard_delete"`
	PurgeUserActivities *bool `json:"-" query:"purge_user_activities"`
}

type DeleteFeedResponse ΒΆ

type DeleteFeedResponse struct {
	Duration string `json:"duration"`
	// The ID of the async task that will handle feed cleanup and hard deletion
	TaskID string `json:"task_id"`
}

type DeleteFeedUserDataRequest ΒΆ

type DeleteFeedUserDataRequest struct {
	// Whether to perform a hard delete instead of a soft delete
	HardDelete *bool `json:"hard_delete,omitempty"`
}

type DeleteFeedUserDataResponse ΒΆ

type DeleteFeedUserDataResponse struct {
	Duration string `json:"duration"`
	// The task ID for the deletion task
	TaskID string `json:"task_id"`
}

Response for deleting feed user data

type DeleteFeedViewRequest ΒΆ

type DeleteFeedViewRequest struct {
}

type DeleteFeedViewResponse ΒΆ

type DeleteFeedViewResponse struct {
	Duration string `json:"duration"`
}

type DeleteFeedsBatchRequest ΒΆ

type DeleteFeedsBatchRequest struct {
	// List of fully qualified feed IDs (format: group_id:feed_id) to delete
	Feeds []string `json:"feeds"`
	// Whether to permanently delete the feeds instead of soft delete
	HardDelete *bool `json:"hard_delete,omitempty"`
	// When hard-deleting, also fully delete activities authored by each feed's owner from every other feed those activities were fanned out to. Default false preserves existing fan-out. Requires 'hard_delete' to be true; the request is rejected otherwise. Feeds with no recorded owner (created_by_id is empty) are silently skipped for the purge step β€” owner-matching against an empty string is a safety guard, not a wildcard.
	PurgeUserActivities *bool `json:"purge_user_activities,omitempty"`
}

type DeleteFeedsBatchResponse ΒΆ

type DeleteFeedsBatchResponse struct {
	Duration string `json:"duration"`
	// The ID of the async task that will handle feed cleanup and hard deletion
	TaskID string `json:"task_id"`
}

type DeleteFileRequest ΒΆ

type DeleteFileRequest struct {
	Url *string `json:"-" query:"url"`
}

type DeleteImageRequest ΒΆ

type DeleteImageRequest struct {
	Url *string `json:"-" query:"url"`
}

type DeleteImportV2TaskRequest ΒΆ

type DeleteImportV2TaskRequest struct {
}

type DeleteImportV2TaskResponse ΒΆ

type DeleteImportV2TaskResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type DeleteImporterExternalStorageRequest ΒΆ

type DeleteImporterExternalStorageRequest struct {
}

type DeleteMembershipLevelRequest ΒΆ

type DeleteMembershipLevelRequest struct {
}

type DeleteMessageRequest ΒΆ

type DeleteMessageRequest struct {
	Hard        *bool   `json:"-" query:"hard"`
	DeletedBy   *string `json:"-" query:"deleted_by"`
	DeleteForMe *bool   `json:"-" query:"delete_for_me"`
}

type DeleteMessageRequestPayload ΒΆ

type DeleteMessageRequestPayload struct {
	// ID of the message to delete (alternative to item_id)
	EntityID *string `json:"entity_id,omitempty"`
	// Type of the entity
	EntityType *string `json:"entity_type,omitempty"`
	// Whether to permanently delete the message
	HardDelete *bool `json:"hard_delete,omitempty"`
	// Reason for deletion
	Reason *string `json:"reason,omitempty"`
}

Configuration for message deletion action

type DeleteMessageResponse ΒΆ

type DeleteMessageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
}

Basic response information

type DeleteModerationConfigResponse ΒΆ

type DeleteModerationConfigResponse struct {
	Duration string `json:"duration"`
}

type DeleteModerationRuleRequest ΒΆ

type DeleteModerationRuleRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type DeleteModerationRuleResponse ΒΆ

type DeleteModerationRuleResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type DeleteModerationTemplateResponse ΒΆ

type DeleteModerationTemplateResponse struct {
	Duration string `json:"duration"`
}

type DeletePolicyTestSetRequest ΒΆ added in v5.3.0

type DeletePolicyTestSetRequest struct {
}

type DeletePollOptionRequest ΒΆ

type DeletePollOptionRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type DeletePollRequest ΒΆ

type DeletePollRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type DeletePollVoteRequest ΒΆ

type DeletePollVoteRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type DeletePushProviderRequest ΒΆ

type DeletePushProviderRequest struct {
}

type DeleteQueueRequest ΒΆ

type DeleteQueueRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type DeleteReactionRequest ΒΆ

type DeleteReactionRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type DeleteReactionRequestPayload ΒΆ

type DeleteReactionRequestPayload struct {
	// ID of the reaction to delete (alternative to item_id)
	EntityID *string `json:"entity_id,omitempty"`
	// Type of the entity
	EntityType *string `json:"entity_type,omitempty"`
	// Whether to permanently delete the reaction
	HardDelete *bool `json:"hard_delete,omitempty"`
	// Reason for deletion
	Reason *string `json:"reason,omitempty"`
}

Configuration for reaction deletion action

type DeleteReactionResponse ΒΆ

type DeleteReactionResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message  MessageResponse  `json:"message"`
	Reaction ReactionResponse `json:"reaction"`
}

Basic response information

type DeleteRecordingRequest ΒΆ

type DeleteRecordingRequest struct {
}

type DeleteRecordingResponse ΒΆ

type DeleteRecordingResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Response for DeleteRecording

type DeleteReminderRequest ΒΆ

type DeleteReminderRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type DeleteReminderResponse ΒΆ

type DeleteReminderResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type DeleteRetentionPolicyRequest ΒΆ

type DeleteRetentionPolicyRequest struct {
	Policy string `json:"policy"`
}

type DeleteRetentionPolicyResponse ΒΆ

type DeleteRetentionPolicyResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type DeleteRoleRequest ΒΆ

type DeleteRoleRequest struct {
}

type DeleteSIPInboundRoutingRuleRequest ΒΆ

type DeleteSIPInboundRoutingRuleRequest struct {
}

type DeleteSIPInboundRoutingRuleResponse ΒΆ

type DeleteSIPInboundRoutingRuleResponse struct {
	Duration string `json:"duration"`
}

Response confirming SIP Inbound Routing Rule deletion

type DeleteSIPTrunkRequest ΒΆ

type DeleteSIPTrunkRequest struct {
}

type DeleteSIPTrunkResponse ΒΆ

type DeleteSIPTrunkResponse struct {
	Duration string `json:"duration"`
}

Response confirming SIP trunk deletion

type DeleteSegmentRequest ΒΆ

type DeleteSegmentRequest struct {
}

type DeleteSegmentTargetsRequest ΒΆ

type DeleteSegmentTargetsRequest struct {
	// Target IDs
	TargetIds []string `json:"target_ids"`
}

type DeleteTranscriptionRequest ΒΆ

type DeleteTranscriptionRequest struct {
}

type DeleteTranscriptionResponse ΒΆ

type DeleteTranscriptionResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

DeleteTranscriptionResponse is the payload for deleting a transcription.

type DeleteUserGroupRequest ΒΆ

type DeleteUserGroupRequest struct {
	TeamID *string `json:"-" query:"team_id"`
}

type DeleteUserMessagesRequestPayload ΒΆ added in v5.3.0

type DeleteUserMessagesRequestPayload struct {
	// Message deletion mode: soft, pruning, or hard
	DeleteMessages string `json:"delete_messages"`
	// Optional: scope deletion to a single channel (alternative to app-wide deletion)
	ChannelCid *string `json:"channel_cid,omitempty"`
	// Whether to also delete the user's reactions on other users' messages
	DeleteReactions *bool `json:"delete_reactions,omitempty"`
	// ID of the user whose messages should be deleted (alternative to item_id)
	EntityID *string `json:"entity_id,omitempty"`
	// Type of the entity
	EntityType *string `json:"entity_type,omitempty"`
	// Reason for the deletion
	Reason *string `json:"reason,omitempty"`
}

Configuration for deleting all of a user's chat messages without banning them or deleting their account

type DeleteUserRequestPayload ΒΆ

type DeleteUserRequestPayload struct {
	// Also delete all user conversations
	DeleteConversationChannels *bool `json:"delete_conversation_channels,omitempty"`
	// Delete flagged feeds content
	DeleteFeedsContent *bool `json:"delete_feeds_content,omitempty"`
	// ID of the user to delete (alternative to item_id)
	EntityID *string `json:"entity_id,omitempty"`
	// Type of the entity
	EntityType *string `json:"entity_type,omitempty"`
	// Whether to permanently delete the user
	HardDelete *bool `json:"hard_delete,omitempty"`
	// Also delete all user messages
	MarkMessagesDeleted *bool `json:"mark_messages_deleted,omitempty"`
	// Reason for deletion
	Reason *string `json:"reason,omitempty"`
}

Configuration for user deletion action

type DeleteUsersRequest ΒΆ

type DeleteUsersRequest struct {
	// IDs of users to delete
	UserIds []string `json:"user_ids"`
	// Calls delete mode.
	// Affected calls are those that include exactly two members, one of whom is the user being deleted.
	// * null or empty string - doesn't delete any calls
	// * soft - marks user's calls and their related data as deleted (soft-delete)
	// * hard - deletes user's calls and their data completely (hard-delete)
	Calls *string `json:"calls,omitempty"`
	// Conversation channels delete mode.
	// Conversation channel is any channel which only has two members one of which is the user being deleted.
	// * null or empty string - doesn't delete any conversation channels
	// * soft - marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
	// * hard - deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
	Conversations *string `json:"conversations,omitempty"`
	// Delete user files.
	// * false or empty string - doesn't delete any files
	// * true - deletes all files uploaded by the user, including images and attachments.
	Files *bool `json:"files,omitempty"`
	// Message delete mode.
	// * null or empty string - doesn't delete user messages
	// * soft - marks all user messages as deleted without removing any related message data
	// * pruning - marks all user messages as deleted, nullifies message information and removes some message data such as reactions and flags
	// * hard - deletes messages completely with all related information
	Messages          *string `json:"messages,omitempty"`
	NewCallOwnerID    *string `json:"new_call_owner_id,omitempty"`
	NewChannelOwnerID *string `json:"new_channel_owner_id,omitempty"`
	// User delete mode.
	// * soft - marks user as deleted and retains all user data
	// * pruning - marks user as deleted and nullifies user information
	// * hard - deletes user completely. Requires 'hard' option for messages and conversations as well
	User *string `json:"user,omitempty"`
}

type DeleteUsersResponse ΒΆ

type DeleteUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// ID of the task to delete users
	TaskID string `json:"task_id"`
}

type DeliveredMessagePayload ΒΆ

type DeliveredMessagePayload struct {
	Cid *string `json:"cid,omitempty"`
	ID  *string `json:"id,omitempty"`
}

type DeliveryReceiptsResponse ΒΆ

type DeliveryReceiptsResponse struct {
	Enabled bool `json:"enabled"`
}

type DeliveryZoneSegment ΒΆ added in v5.3.0

type DeliveryZoneSegment struct {
	Key             string   `json:"key"`
	Outlier         bool     `json:"outlier"`
	Sessions        int      `json:"sessions"`
	AvgQualityScore *float64 `json:"avg_quality_score,omitempty"`
	P5QualityScore  *float64 `json:"p5_quality_score,omitempty"`
	PoorPct         *float64 `json:"poor_pct,omitempty"`
	SharePct        *float64 `json:"share_pct,omitempty"`
	WatchSharePct   *float64 `json:"watch_share_pct,omitempty"`
}

type DeviceDataResponse ΒΆ

type DeviceDataResponse struct {
	Name    *string `json:"name,omitempty"`
	Version *string `json:"version,omitempty"`
}

type DeviceErrorInfo ΒΆ

type DeviceErrorInfo struct {
	ErrorMessage string `json:"error_message"`
	Provider     string `json:"provider"`
	ProviderName string `json:"provider_name"`
}

type DeviceResponse ΒΆ

type DeviceResponse struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Device ID
	ID string `json:"id"`
	// Push provider
	PushProvider string `json:"push_provider"`
	// User ID
	UserID string `json:"user_id"`
	// Whether device is disabled or not
	Disabled *bool `json:"disabled,omitempty"`
	// Reason explaining why device had been disabled
	DisabledReason *string `json:"disabled_reason,omitempty"`
	// Stable physical device identifier used to deduplicate pushes across push providers
	HardwareID *string `json:"hardware_id,omitempty"`
	// Push provider name
	PushProviderName *string `json:"push_provider_name,omitempty"`
	// When true the token is for Apple VoIP push notifications
	Voip *bool `json:"voip,omitempty"`
}

Response for Device

type DraftPayloadResponse ΒΆ

type DraftPayloadResponse struct {
	// Message ID is unique string identifier of the message
	ID string `json:"id"`
	// Text of the message
	Text   string         `json:"text"`
	Custom map[string]any `json:"custom"`
	// Contains HTML markup of the message
	Html *string `json:"html,omitempty"`
	// MML content of the message
	Mml *string `json:"mml,omitempty"`
	// ID of parent message (thread)
	ParentID *string `json:"parent_id,omitempty"`
	// Identifier of the poll to include in the message
	PollID          *string `json:"poll_id,omitempty"`
	QuotedMessageID *string `json:"quoted_message_id,omitempty"`
	// Whether thread reply should be shown in the channel as well
	ShowInChannel *bool `json:"show_in_channel,omitempty"`
	// Whether message is silent or not
	Silent *bool `json:"silent,omitempty"`
	// Contains type of the message. One of: regular, system
	Type *string `json:"type,omitempty"`
	// Array of message attachments
	Attachments []Attachment `json:"attachments,omitempty"`
	// List of mentioned users
	MentionedUsers []UserResponse `json:"mentioned_users,omitempty"`
}

Contains the draft message content

type DraftResponse ΒΆ

type DraftResponse struct {
	ChannelCid string    `json:"channel_cid"`
	CreatedAt  Timestamp `json:"created_at"`
	// Contains the draft message content
	Message  DraftPayloadResponse `json:"message"`
	ParentID *string              `json:"parent_id,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// Represents any chat message
	ParentMessage *MessageResponse `json:"parent_message,omitempty"`
	// Represents any chat message
	QuotedMessage *MessageResponse `json:"quoted_message,omitempty"`
}

type EMAUStatsResponse ΒΆ

type EMAUStatsResponse struct {
	// Per-day unique engaged user counts
	Daily []DailyMetricResponse `json:"daily"`
	// Rolling 30-day engaged user count snapshots
	Last30Days []DailyMetricResponse `json:"last_30_days"`
	// Calendar month-to-date engaged user count snapshots
	MonthToDate []DailyMetricResponse `json:"month_to_date"`
}

type EdgeResponse ΒΆ

type EdgeResponse struct {
	ContinentCode      string  `json:"continent_code"`
	CountryIsoCode     string  `json:"country_iso_code"`
	Green              int     `json:"green"`
	ID                 string  `json:"id"`
	LatencyTestUrl     string  `json:"latency_test_url"`
	Latitude           float64 `json:"latitude"`
	Longitude          float64 `json:"longitude"`
	Red                int     `json:"red"`
	SubdivisionIsoCode string  `json:"subdivision_iso_code"`
	Yellow             int     `json:"yellow"`
}

type EgressHLSResponse ΒΆ

type EgressHLSResponse struct {
	PlaylistUrl string `json:"playlist_url"`
	Status      string `json:"status"`
}

type EgressRTMPResponse ΒΆ

type EgressRTMPResponse struct {
	Name      string    `json:"name"`
	StartedAt Timestamp `json:"started_at"`
	StreamKey *string   `json:"stream_key,omitempty"`
	StreamUrl *string   `json:"stream_url,omitempty"`
}

type EgressResponse ΒΆ

type EgressResponse struct {
	Broadcasting        bool                         `json:"broadcasting"`
	Rtmps               []EgressRTMPResponse         `json:"rtmps"`
	CompositeRecording  *CompositeRecordingResponse  `json:"composite_recording,omitempty"`
	FrameRecording      *FrameRecordingResponse      `json:"frame_recording,omitempty"`
	HLS                 *EgressHLSResponse           `json:"hls,omitempty"`
	IndividualRecording *IndividualRecordingResponse `json:"individual_recording,omitempty"`
	RawRecording        *RawRecordingResponse        `json:"raw_recording,omitempty"`
}

type EncodingProfile ΒΆ added in v5.3.0

type EncodingProfile struct {
	GetstatsSnapshots           int            `json:"getstats_snapshots"`
	SourceFile                  string         `json:"source_file"`
	SvcModes                    []string       `json:"svc_modes"`
	QualityLimitationDurationsS map[string]int `json:"quality_limitation_durations_s"`
	QualityLimitationSamples    map[string]int `json:"quality_limitation_samples"`
	AvgSendKbps                 *int           `json:"avg_send_kbps,omitempty"`
	Codec                       *string        `json:"codec,omitempty"`
	EncoderImpl                 *string        `json:"encoder_impl,omitempty"`
	FpsP10                      *int           `json:"fps_p10,omitempty"`
	FpsP50                      *int           `json:"fps_p50,omitempty"`
	HardwareEncode              *bool          `json:"hardware_encode,omitempty"`
	LadderType                  *string        `json:"ladder_type,omitempty"`
	PowerEfficient              *bool          `json:"power_efficient,omitempty"`
	Resolution                  *string        `json:"resolution,omitempty"`
	SimulcastLayers             *int           `json:"simulcast_layers,omitempty"`
}

type EncryptionSettingsRequest ΒΆ added in v5.3.0

type EncryptionSettingsRequest struct {
	// Encryption mode. One of: available, disabled, auto-on
	Mode *string `json:"mode,omitempty"`
}

type EncryptionSettingsResponse ΒΆ added in v5.3.0

type EncryptionSettingsResponse struct {
	// the resolved encryption mode for the call
	Mode string `json:"mode"`
}

EncryptionSettings is the payload for end-to-end encryption settings

type EndCallRequest ΒΆ

type EndCallRequest struct {
}

type EndCallResponse ΒΆ

type EndCallResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Response for ending a call

type EnrichedActivity ΒΆ

type EnrichedActivity struct {
	ForeignID       *string                       `json:"foreign_id,omitempty"`
	ID              *string                       `json:"id,omitempty"`
	Score           *float64                      `json:"score,omitempty"`
	Verb            *string                       `json:"verb,omitempty"`
	To              []string                      `json:"to,omitempty"`
	Actor           *Data                         `json:"actor,omitempty"`
	LatestReactions map[string][]EnrichedReaction `json:"latest_reactions,omitempty"`
	Object          *Data                         `json:"object,omitempty"`
	Origin          *Data                         `json:"origin,omitempty"`
	OwnReactions    map[string][]EnrichedReaction `json:"own_reactions,omitempty"`
	ReactionCounts  map[string]int                `json:"reaction_counts,omitempty"`
	Target          *Data                         `json:"target,omitempty"`
}

type EnrichedCollectionResponse ΒΆ

type EnrichedCollectionResponse struct {
	// Unique identifier for the collection within its name
	ID string `json:"id"`
	// Name/type of the collection
	Name string `json:"name"`
	// Enrichment status of the collection. One of: ok, notfound
	Status string `json:"status"`
	// When the collection was created
	CreatedAt *Timestamp `json:"created_at,omitempty"`
	// When the collection was last updated
	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
	// ID of the user who owns this collection
	UserID *string `json:"user_id,omitempty"`
	// Custom data for the collection
	Custom map[string]any `json:"custom,omitempty"`
}

type EnrichedReaction ΒΆ

type EnrichedReaction struct {
	ActivityID     string                        `json:"activity_id"`
	Kind           string                        `json:"kind"`
	UserID         string                        `json:"user_id"`
	ID             *string                       `json:"id,omitempty"`
	Parent         *string                       `json:"parent,omitempty"`
	TargetFeeds    []string                      `json:"target_feeds,omitempty"`
	ChildrenCounts map[string]int                `json:"children_counts,omitempty"`
	CreatedAt      *Time                         `json:"created_at,omitempty"`
	Data           map[string]any                `json:"data,omitempty"`
	LatestChildren map[string][]EnrichedReaction `json:"latest_children,omitempty"`
	OwnChildren    map[string][]EnrichedReaction `json:"own_children,omitempty"`
	UpdatedAt      *Time                         `json:"updated_at,omitempty"`
	User           *Data                         `json:"user,omitempty"`
}

type EnrichmentOptions ΒΆ

type EnrichmentOptions struct {
	// Default: false. When true, includes fetching and enriching own_followings (follows where activity author's feeds follow current user's feeds).
	EnrichOwnFollowings *bool `json:"enrich_own_followings,omitempty"`
	// Controls the top-level flat 'activities' array for aggregated feeds. For new apps, defaults to false (excluded); set to true to include. For older apps, defaults to true (included) for backward compatibility; set to false to exclude.
	IncludeFlatActivities *bool `json:"include_flat_activities,omitempty"`
	// Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time.
	IncludeScoreVars *bool `json:"include_score_vars,omitempty"`
	// Default: false. When true, skips all activity enrichments.
	SkipActivity *bool `json:"skip_activity,omitempty"`
	// Default: false. When true, skips enriching collections on activities.
	SkipActivityCollections *bool `json:"skip_activity_collections,omitempty"`
	// Default: false. When true, skips enriching comments on activities.
	SkipActivityComments *bool `json:"skip_activity_comments,omitempty"`
	// Default: false. When true, skips enriching current_feed on activities. Note: CurrentFeed is still computed for permission checks, but enrichment is skipped.
	SkipActivityCurrentFeed *bool `json:"skip_activity_current_feed,omitempty"`
	// Default: false. When true, skips enriching mentioned users on activities.
	SkipActivityMentionedUsers *bool `json:"skip_activity_mentioned_users,omitempty"`
	// Default: false. When true, skips enriching own bookmarks on activities.
	SkipActivityOwnBookmarks *bool `json:"skip_activity_own_bookmarks,omitempty"`
	// Default: false. When true, skips enriching parent activities.
	SkipActivityParents *bool `json:"skip_activity_parents,omitempty"`
	// Default: false. When true, skips enriching poll data on activities.
	SkipActivityPoll *bool `json:"skip_activity_poll,omitempty"`
	// Default: false. When true, skips fetching and enriching latest and own reactions on activities. Note: If reactions are already denormalized in the database, they will still be included.
	SkipActivityReactions *bool `json:"skip_activity_reactions,omitempty"`
	// Default: false. When true, skips refreshing image URLs on activities.
	SkipActivityRefreshImageUrls *bool `json:"skip_activity_refresh_image_urls,omitempty"`
	// Default: false. When true, skips all enrichments.
	SkipAll *bool `json:"skip_all,omitempty"`
	// Default: false. When true, skips enriching user data on feed members.
	SkipFeedMemberUser *bool `json:"skip_feed_member_user,omitempty"`
	// Default: false. When true, skips fetching and enriching followers. Note: If followers_pagination is explicitly provided, followers will be fetched regardless of this setting.
	SkipFollowers *bool `json:"skip_followers,omitempty"`
	// Default: false. When true, skips fetching and enriching following. Note: If following_pagination is explicitly provided, following will be fetched regardless of this setting.
	SkipFollowing *bool `json:"skip_following,omitempty"`
	// Default: false. When true, skips computing and including capabilities for feeds.
	SkipOwnCapabilities *bool `json:"skip_own_capabilities,omitempty"`
	// Default: false. When true, skips fetching and enriching own_follows (follows where user's feeds follow target feeds).
	SkipOwnFollows *bool `json:"skip_own_follows,omitempty"`
	// Default: false. When true, skips enriching pinned activities.
	SkipPins *bool `json:"skip_pins,omitempty"`
}

Options to skip specific enrichments to improve performance. Default is false (enrichments are included). Setting a field to true skips that enrichment.

type EntityCreatorResponse ΒΆ

type EntityCreatorResponse struct {
	// Number of minor actions performed on the user
	BanCount  int       `json:"ban_count"`
	Banned    bool      `json:"banned"`
	CreatedAt Timestamp `json:"created_at"`
	// Number of major actions performed on the user
	DeletedContentCount int `json:"deleted_content_count"`
	// Number of flag actions performed on the user
	FlaggedCount             int                               `json:"flagged_count"`
	ID                       string                            `json:"id"`
	Invisible                bool                              `json:"invisible"`
	Language                 string                            `json:"language"`
	Online                   bool                              `json:"online"`
	Role                     string                            `json:"role"`
	ShadowBanned             bool                              `json:"shadow_banned"`
	UpdatedAt                Timestamp                         `json:"updated_at"`
	BlockedUserIds           []string                          `json:"blocked_user_ids"`
	Teams                    []string                          `json:"teams"`
	Custom                   map[string]any                    `json:"custom"`
	AvgResponseTime          *int                              `json:"avg_response_time,omitempty"`
	BanExpires               *Timestamp                        `json:"ban_expires,omitempty"`
	BypassModeration         *bool                             `json:"bypass_moderation,omitempty"`
	DeactivatedAt            *Timestamp                        `json:"deactivated_at,omitempty"`
	DeletedAt                *Timestamp                        `json:"deleted_at,omitempty"`
	Image                    *string                           `json:"image,omitempty"`
	LastActive               *Timestamp                        `json:"last_active,omitempty"`
	Name                     *string                           `json:"name,omitempty"`
	RevokeTokensIssuedBefore *Timestamp                        `json:"revoke_tokens_issued_before,omitempty"`
	Devices                  []DeviceResponse                  `json:"devices,omitempty"`
	PrivacySettings          *PrivacySettingsResponse          `json:"privacy_settings,omitempty"`
	PushNotifications        *PushNotificationSettingsResponse `json:"push_notifications,omitempty"`
	TeamsRole                map[string]string                 `json:"teams_role,omitempty"`
}

type EphemeralMessageUpdateRequest ΒΆ

type EphemeralMessageUpdateRequest struct {
	// Skip enriching the URL in the message
	SkipEnrichUrl *bool   `json:"skip_enrich_url,omitempty"`
	SkipPush      *bool   `json:"skip_push,omitempty"`
	UserID        *string `json:"user_id,omitempty"`
	// Array of field names to unset
	Unset []string `json:"unset"`
	// Sets new field values
	Set map[string]any `json:"set"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type ErrorResult ΒΆ

type ErrorResult struct {
	Description string  `json:"description"`
	Type        string  `json:"type"`
	Stacktrace  *string `json:"stacktrace,omitempty"`
	Version     *string `json:"version,omitempty"`
}

type EscalatePayload ΒΆ

type EscalatePayload struct {
	// Additional context for the reviewer
	Notes *string `json:"notes,omitempty"`
	// Priority of the escalation (low, medium, high)
	Priority *string `json:"priority,omitempty"`
	// Reason for the escalation (from configured escalation_reasons)
	Reason *string `json:"reason,omitempty"`
}

Configuration for escalation action

type EscalationMetadata ΒΆ

type EscalationMetadata struct {
	Notes    *string `json:"notes,omitempty"`
	Priority *string `json:"priority,omitempty"`
	Reason   *string `json:"reason,omitempty"`
}

type EventHook ΒΆ

type EventHook struct {
	CreatedAt                          *Timestamp                     `json:"created_at,omitempty"`
	Enabled                            *bool                          `json:"enabled,omitempty"`
	HookType                           *string                        `json:"hook_type,omitempty"`
	ID                                 *string                        `json:"id,omitempty"`
	Product                            *string                        `json:"product,omitempty"`
	ShouldSendCustomEvents             *bool                          `json:"should_send_custom_events,omitempty"`
	SnsAuthType                        *string                        `json:"sns_auth_type,omitempty"`
	SnsEventBasedMessageGroupIDEnabled *bool                          `json:"sns_event_based_message_group_id_enabled,omitempty"`
	SnsKey                             *string                        `json:"sns_key,omitempty"`
	SnsRegion                          *string                        `json:"sns_region,omitempty"`
	SnsRoleArn                         *string                        `json:"sns_role_arn,omitempty"`
	SnsSecret                          *string                        `json:"sns_secret,omitempty"`
	SnsTopicArn                        *string                        `json:"sns_topic_arn,omitempty"`
	SqsAuthType                        *string                        `json:"sqs_auth_type,omitempty"`
	SqsKey                             *string                        `json:"sqs_key,omitempty"`
	SqsQueueUrl                        *string                        `json:"sqs_queue_url,omitempty"`
	SqsRegion                          *string                        `json:"sqs_region,omitempty"`
	SqsRoleArn                         *string                        `json:"sqs_role_arn,omitempty"`
	SqsSecret                          *string                        `json:"sqs_secret,omitempty"`
	TimeoutMs                          *int                           `json:"timeout_ms,omitempty"`
	UpdatedAt                          *Timestamp                     `json:"updated_at,omitempty"`
	WebhookUrl                         *string                        `json:"webhook_url,omitempty"`
	EventTypes                         []string                       `json:"event_types,omitempty"`
	Callback                           *AsyncModerationCallbackConfig `json:"callback,omitempty"`
	FailoverConfig                     *WebhookFailoverConfig         `json:"failover_config,omitempty"`
}

type EventNotificationSettings ΒΆ

type EventNotificationSettings struct {
	Enabled bool `json:"enabled"`
	APNS    APNS `json:"apns"`
	Fcm     FCM  `json:"fcm"`
}

type EventNotificationSettingsRequest ΒΆ

type EventNotificationSettingsRequest struct {
	Enabled *bool        `json:"enabled,omitempty"`
	APNS    *APNSPayload `json:"apns,omitempty"`
	Fcm     *FCMPayload  `json:"fcm,omitempty"`
}

type EventNotificationSettingsResponse ΒΆ

type EventNotificationSettingsResponse struct {
	Enabled bool        `json:"enabled"`
	APNS    APNSPayload `json:"apns"`
	Fcm     FCMPayload  `json:"fcm"`
}

type EventRequest ΒΆ

type EventRequest struct {
	Type     string         `json:"type"`
	ParentID *string        `json:"parent_id,omitempty"`
	UserID   *string        `json:"user_id,omitempty"`
	Custom   map[string]any `json:"custom,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type EventResponse ΒΆ

type EventResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents an BaseEvent that happened in Stream Chat
	Event WSEvent `json:"event"`
}

Basic response information

type ExportChannelsRequest ΒΆ

type ExportChannelsRequest struct {
	// Export options for channels
	Channels []ChannelExport `json:"channels"`
	// Set if deleted message text should be cleared
	ClearDeletedMessageText *bool `json:"clear_deleted_message_text,omitempty"`
	ExportUsers             *bool `json:"export_users,omitempty"`
	// Output format: 'json' (default) or 'csv'. csv requires version=v2 and is incompatible with export_users
	Format *string `json:"format,omitempty"`
	// Set if you want to include deleted channels
	IncludeSoftDeletedChannels *bool `json:"include_soft_deleted_channels,omitempty"`
	// Set if you want to include truncated messages
	IncludeTruncatedMessages *bool `json:"include_truncated_messages,omitempty"`
	// Export version
	Version *string `json:"version,omitempty"`
	// For csv format: subset of message columns to include (defaults to a standard set)
	IncludeFields []string `json:"include_fields"`
}

type ExportChannelsResponse ΒΆ

type ExportChannelsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// ID of the task to export channels
	TaskID string `json:"task_id"`
}

type ExportFeedUserDataRequest ΒΆ

type ExportFeedUserDataRequest struct {
}

type ExportFeedUserDataResponse ΒΆ

type ExportFeedUserDataResponse struct {
	Duration string `json:"duration"`
	// The task ID for the export task
	TaskID string `json:"task_id"`
}

Response for exporting feed user data

type ExportUserRequest ΒΆ

type ExportUserRequest struct {
}

type ExportUserResponse ΒΆ

type ExportUserResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// List of exported messages
	Messages []MessageResponse `json:"messages,omitempty"`
	// List of exported reactions
	Reactions []ReactionResponse `json:"reactions,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ExportUsersRequest ΒΆ

type ExportUsersRequest struct {
	UserIds []string `json:"user_ids"`
}

type ExportUsersResponse ΒΆ

type ExportUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	TaskID   string `json:"task_id"`
}

Basic response information

type ExternalStorageResponse ΒΆ

type ExternalStorageResponse struct {
	Bucket string `json:"bucket"`
	Name   string `json:"name"`
	Path   string `json:"path"`
	Type   string `json:"type"`
}

type FCM ΒΆ

type FCM struct {
	Data map[string]any `json:"data,omitempty"`
}

type FCMPayload ΒΆ

type FCMPayload struct {
	Data map[string]any `json:"data,omitempty"`
}

type FailedChannelUpdates ΒΆ

type FailedChannelUpdates struct {
	Reason string   `json:"reason"`
	Cids   []string `json:"cids"`
}

type FeedCreatedEvent ΒΆ

type FeedCreatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                `json:"created_at"`
	Fid       string                   `json:"fid"`
	Members   []FeedMemberResponse     `json:"members"`
	Custom    map[string]any           `json:"custom"`
	Feed      FeedResponse             `json:"feed"`
	User      UserResponseCommonFields `json:"user"`
	// The type of event: "feeds.feed.created" in this case
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
}

Emitted when a feed is created.

func (*FeedCreatedEvent) GetEventType ΒΆ

func (e *FeedCreatedEvent) GetEventType() string

type FeedDeletedEvent ΒΆ

type FeedDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Fid       string         `json:"fid"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "feeds.feed.deleted" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a feed is deleted.

func (*FeedDeletedEvent) GetEventType ΒΆ

func (e *FeedDeletedEvent) GetEventType() string

type FeedGroup ΒΆ

type FeedGroup struct {
	AggregationVersion int                       `json:"aggregation_version"`
	AppPk              int                       `json:"app_pk"`
	CreatedAt          Timestamp                 `json:"created_at"`
	DefaultVisibility  string                    `json:"default_visibility"`
	GroupID            string                    `json:"group_id"`
	UpdatedAt          Timestamp                 `json:"updated_at"`
	ActivityProcessors []ActivityProcessorConfig `json:"activity_processors"`
	ActivitySelectors  []ActivitySelectorConfig  `json:"activity_selectors"`
	Custom             map[string]any            `json:"custom"`
	DeletedAt          *Timestamp                `json:"deleted_at,omitempty"`
	LastFeedGetAt      *Timestamp                `json:"last_feed_get_at,omitempty"`
	ActivityFilter     *ActivityFilterConfig     `json:"activity_filter,omitempty"`
	Aggregation        *AggregationConfig        `json:"aggregation,omitempty"`
	Notification       *NotificationConfig       `json:"notification,omitempty"`
	PushNotification   *PushNotificationConfig   `json:"push_notification,omitempty"`
	Ranking            *RankingConfig            `json:"ranking,omitempty"`
	Stories            *StoriesConfig            `json:"stories,omitempty"`
}

type FeedGroupChangedEvent ΒΆ

type FeedGroupChangedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Fid       string         `json:"fid"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "feeds.feed_group.changed" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	FeedGroup      *FeedGroup                `json:"feed_group,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a feed group is changed.

func (*FeedGroupChangedEvent) GetEventType ΒΆ

func (e *FeedGroupChangedEvent) GetEventType() string

type FeedGroupDeletedEvent ΒΆ

type FeedGroupDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	Fid       string    `json:"fid"`
	// The ID of the feed group that was deleted
	GroupID string         `json:"group_id"`
	Custom  map[string]any `json:"custom"`
	// The type of event: "feeds.feed_group.deleted" in this case
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
}

Emitted when a feed group is deleted.

func (*FeedGroupDeletedEvent) GetEventType ΒΆ

func (e *FeedGroupDeletedEvent) GetEventType() string

type FeedGroupResponse ΒΆ

type FeedGroupResponse struct {
	// When the feed group was created
	CreatedAt Timestamp `json:"created_at"`
	// Identifier within the group
	ID string `json:"id"`
	// When the feed group was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Default visibility for activities. One of: public, visible, followers, members, private
	DefaultVisibility *string    `json:"default_visibility,omitempty"`
	DeletedAt         *Timestamp `json:"deleted_at,omitempty"`
	// Configuration for activity processors
	ActivityProcessors []ActivityProcessorConfig `json:"activity_processors,omitempty"`
	// Configuration for activity selectors
	ActivitySelectors []ActivitySelectorConfigResponse `json:"activity_selectors,omitempty"`
	ActivityFilter    *ActivityFilterConfig            `json:"activity_filter,omitempty"`
	Aggregation       *AggregationConfig               `json:"aggregation,omitempty"`
	// Custom data for the feed group
	Custom           map[string]any          `json:"custom,omitempty"`
	Notification     *NotificationConfig     `json:"notification,omitempty"`
	PushNotification *PushNotificationConfig `json:"push_notification,omitempty"`
	Ranking          *RankingConfig          `json:"ranking,omitempty"`
	Stories          *StoriesConfig          `json:"stories,omitempty"`
}

type FeedGroupRestoredEvent ΒΆ

type FeedGroupRestoredEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	Fid       string    `json:"fid"`
	// The ID of the feed group that was restored
	GroupID string         `json:"group_id"`
	Custom  map[string]any `json:"custom"`
	// The type of event: "feeds.feed_group.restored" in this case
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
}

Emitted when a feed group is restored.

func (*FeedGroupRestoredEvent) GetEventType ΒΆ

func (e *FeedGroupRestoredEvent) GetEventType() string

type FeedInput ΒΆ

type FeedInput struct {
	Description *string             `json:"description,omitempty"`
	Name        *string             `json:"name,omitempty"`
	Visibility  *string             `json:"visibility,omitempty"`
	FilterTags  []string            `json:"filter_tags,omitempty"`
	Members     []FeedMemberRequest `json:"members,omitempty"`
	Custom      map[string]any      `json:"custom,omitempty"`
	Location    *Location           `json:"location,omitempty"`
}

type FeedMemberAddedEvent ΒΆ

type FeedMemberAddedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp          `json:"created_at"`
	Fid       string             `json:"fid"`
	Custom    map[string]any     `json:"custom"`
	Member    FeedMemberResponse `json:"member"`
	// The type of event: "feeds.feed_member.added" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a feed member is added.

func (*FeedMemberAddedEvent) GetEventType ΒΆ

func (e *FeedMemberAddedEvent) GetEventType() string

type FeedMemberRemovedEvent ΒΆ

type FeedMemberRemovedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Fid       string         `json:"fid"`
	MemberID  string         `json:"member_id"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "feeds.feed_member.removed" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a feed member is removed.

func (*FeedMemberRemovedEvent) GetEventType ΒΆ

func (e *FeedMemberRemovedEvent) GetEventType() string

type FeedMemberRequest ΒΆ

type FeedMemberRequest struct {
	// ID of the user to add as a member
	UserID string `json:"user_id"`
	// Whether this is an invite to become a member
	Invite *bool `json:"invite,omitempty"`
	// ID of the membership level to assign to the member
	MembershipLevel *string `json:"membership_level,omitempty"`
	// Role of the member in the feed
	Role *string `json:"role,omitempty"`
	// Custom data for the member
	Custom map[string]any `json:"custom,omitempty"`
}

type FeedMemberResponse ΒΆ

type FeedMemberResponse struct {
	// When the membership was created
	CreatedAt Timestamp `json:"created_at"`
	// Role of the member in the feed
	Role string `json:"role"`
	// Status of the membership. One of: member, pending, rejected
	Status string `json:"status"`
	// When the membership was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// User response object
	User UserResponse `json:"user"`
	// When the invite was accepted
	InviteAcceptedAt *Timestamp `json:"invite_accepted_at,omitempty"`
	// When the invite was rejected
	InviteRejectedAt *Timestamp `json:"invite_rejected_at,omitempty"`
	// Custom data for the membership
	Custom          map[string]any           `json:"custom,omitempty"`
	MembershipLevel *MembershipLevelResponse `json:"membership_level,omitempty"`
}

type FeedMemberUpdatedEvent ΒΆ

type FeedMemberUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp          `json:"created_at"`
	Fid       string             `json:"fid"`
	Custom    map[string]any     `json:"custom"`
	Member    FeedMemberResponse `json:"member"`
	// The type of event: "feeds.feed_member.updated" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a feed member is updated.

func (*FeedMemberUpdatedEvent) GetEventType ΒΆ

func (e *FeedMemberUpdatedEvent) GetEventType() string

type FeedOwnCapability ΒΆ

type FeedOwnCapability string
const (
	ADD_ACTIVITY                 FeedOwnCapability = "add-activity"
	ADD_ACTIVITY_BOOKMARK        FeedOwnCapability = "add-activity-bookmark"
	ADD_ACTIVITY_REACTION        FeedOwnCapability = "add-activity-reaction"
	ADD_COMMENT                  FeedOwnCapability = "add-comment"
	ADD_COMMENT_REACTION         FeedOwnCapability = "add-comment-reaction"
	CREATE_FEED                  FeedOwnCapability = "create-feed"
	DELETE_ANY_ACTIVITY          FeedOwnCapability = "delete-any-activity"
	DELETE_ANY_COMMENT           FeedOwnCapability = "delete-any-comment"
	DELETE_FEED                  FeedOwnCapability = "delete-feed"
	DELETE_OWN_ACTIVITY          FeedOwnCapability = "delete-own-activity"
	DELETE_OWN_ACTIVITY_BOOKMARK FeedOwnCapability = "delete-own-activity-bookmark"
	DELETE_OWN_ACTIVITY_REACTION FeedOwnCapability = "delete-own-activity-reaction"
	DELETE_OWN_COMMENT           FeedOwnCapability = "delete-own-comment"
	DELETE_OWN_COMMENT_REACTION  FeedOwnCapability = "delete-own-comment-reaction"
	FOLLOW                       FeedOwnCapability = "follow"
	PIN_ACTIVITY                 FeedOwnCapability = "pin-activity"
	QUERY_FEED_MEMBERS           FeedOwnCapability = "query-feed-members"
	QUERY_FOLLOWS                FeedOwnCapability = "query-follows"
	READ_ACTIVITIES              FeedOwnCapability = "read-activities"
	READ_FEED                    FeedOwnCapability = "read-feed"
	UNFOLLOW                     FeedOwnCapability = "unfollow"
	UPDATE_ANY_ACTIVITY          FeedOwnCapability = "update-any-activity"
	UPDATE_ANY_COMMENT           FeedOwnCapability = "update-any-comment"
	UPDATE_FEED                  FeedOwnCapability = "update-feed"
	UPDATE_FEED_FOLLOWERS        FeedOwnCapability = "update-feed-followers"
	UPDATE_FEED_MEMBERS          FeedOwnCapability = "update-feed-members"
	UPDATE_OWN_ACTIVITY          FeedOwnCapability = "update-own-activity"
	UPDATE_OWN_ACTIVITY_BOOKMARK FeedOwnCapability = "update-own-activity-bookmark"
	UPDATE_OWN_COMMENT           FeedOwnCapability = "update-own-comment"
)

func (FeedOwnCapability) String ΒΆ

func (c FeedOwnCapability) String() string

type FeedOwnData ΒΆ

type FeedOwnData struct {
	// Capabilities the current user has for this feed
	OwnCapabilities []FeedOwnCapability `json:"own_capabilities,omitempty"`
	// Follow relationships where the feed owner's feeds are following the current user's feeds (up to 5 total)
	OwnFollowings []FollowResponse `json:"own_followings,omitempty"`
	// Follow relationships where the current user's feeds are following this feed
	OwnFollows    []FollowResponse    `json:"own_follows,omitempty"`
	OwnMembership *FeedMemberResponse `json:"own_membership,omitempty"`
}

type FeedRequest ΒΆ

type FeedRequest struct {
	// ID of the feed group
	FeedGroupID string `json:"feed_group_id"`
	// ID of the feed
	FeedID string `json:"feed_id"`
	// ID of the feed creator
	CreatedByID *string `json:"created_by_id,omitempty"`
	// Description of the feed
	Description *string `json:"description,omitempty"`
	// Name of the feed
	Name *string `json:"name,omitempty"`
	// Visibility setting for the feed. One of: public, visible, followers, members, private
	Visibility *string `json:"visibility,omitempty"`
	// Tags used for filtering feeds
	FilterTags []string `json:"filter_tags,omitempty"`
	// Initial members for the feed
	Members []FeedMemberRequest `json:"members,omitempty"`
	// Custom data for the feed
	Custom   map[string]any `json:"custom,omitempty"`
	Location *Location      `json:"location,omitempty"`
}

type FeedResponse ΒΆ

type FeedResponse struct {
	ActivityCount int `json:"activity_count"`
	// When the feed was created
	CreatedAt Timestamp `json:"created_at"`
	// Description of the feed
	Description string `json:"description"`
	// Fully qualified feed ID (group_id:id)
	Feed string `json:"feed"`
	// Number of followers of this feed
	FollowerCount int `json:"follower_count"`
	// Number of feeds this feed follows
	FollowingCount int `json:"following_count"`
	// Group this feed belongs to
	GroupID string `json:"group_id"`
	// Unique identifier for the feed
	ID string `json:"id"`
	// Number of members in this feed
	MemberCount int `json:"member_count"`
	// Name of the feed
	Name string `json:"name"`
	// Number of pinned activities in this feed
	PinCount int `json:"pin_count"`
	// When the feed was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// User response object
	CreatedBy UserResponse `json:"created_by"`
	// When the feed was deleted
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`
	// Visibility setting for the feed
	Visibility *string `json:"visibility,omitempty"`
	// Tags used for filtering feeds
	FilterTags []string `json:"filter_tags,omitempty"`
	// Capabilities the current user has for this feed
	OwnCapabilities []FeedOwnCapability `json:"own_capabilities,omitempty"`
	// Follow relationships where the feed owner’s feeds are following the current user's feeds
	OwnFollowings []FollowResponse `json:"own_followings,omitempty"`
	// Follow relationships where the current user's feeds are following this feed
	OwnFollows []FollowResponse `json:"own_follows,omitempty"`
	// Custom data for the feed
	Custom        map[string]any      `json:"custom,omitempty"`
	Location      *Location           `json:"location,omitempty"`
	OwnMembership *FeedMemberResponse `json:"own_membership,omitempty"`
}

type FeedSuggestionResponse ΒΆ

type FeedSuggestionResponse struct {
	ActivityCount int `json:"activity_count"`
	// When the feed was created
	CreatedAt Timestamp `json:"created_at"`
	// Description of the feed
	Description string `json:"description"`
	// Fully qualified feed ID (group_id:id)
	Feed string `json:"feed"`
	// Number of followers of this feed
	FollowerCount int `json:"follower_count"`
	// Number of feeds this feed follows
	FollowingCount int `json:"following_count"`
	// Group this feed belongs to
	GroupID string `json:"group_id"`
	// Unique identifier for the feed
	ID string `json:"id"`
	// Number of members in this feed
	MemberCount int `json:"member_count"`
	// Name of the feed
	Name string `json:"name"`
	// Number of pinned activities in this feed
	PinCount int `json:"pin_count"`
	// When the feed was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// User response object
	CreatedBy UserResponse `json:"created_by"`
	// When the feed was deleted
	DeletedAt           *Timestamp `json:"deleted_at,omitempty"`
	Reason              *string    `json:"reason,omitempty"`
	RecommendationScore *float64   `json:"recommendation_score,omitempty"`
	// Visibility setting for the feed
	Visibility *string `json:"visibility,omitempty"`
	// Tags used for filtering feeds
	FilterTags []string `json:"filter_tags,omitempty"`
	// Capabilities the current user has for this feed
	OwnCapabilities []FeedOwnCapability `json:"own_capabilities,omitempty"`
	// Follow relationships where the feed owner’s feeds are following the current user's feeds
	OwnFollowings []FollowResponse `json:"own_followings,omitempty"`
	// Follow relationships where the current user's feeds are following this feed
	OwnFollows      []FollowResponse   `json:"own_follows,omitempty"`
	AlgorithmScores map[string]float64 `json:"algorithm_scores,omitempty"`
	// Custom data for the feed
	Custom        map[string]any      `json:"custom,omitempty"`
	Location      *Location           `json:"location,omitempty"`
	OwnMembership *FeedMemberResponse `json:"own_membership,omitempty"`
}

type FeedUpdatedEvent ΒΆ

type FeedUpdatedEvent struct {
	CreatedAt Timestamp      `json:"created_at"`
	Fid       string         `json:"fid"`
	Custom    map[string]any `json:"custom"`
	Feed      FeedResponse   `json:"feed"`
	// The type of event: "feeds.feed.updated" in this case
	Type           string                    `json:"type"`
	FeedVisibility *string                   `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp                `json:"received_at,omitempty"`
	User           *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a feed is updated.

func (*FeedUpdatedEvent) GetEventType ΒΆ

func (e *FeedUpdatedEvent) GetEventType() string

type FeedViewResponse ΒΆ

type FeedViewResponse struct {
	// Unique identifier for the custom feed view
	ID string `json:"id"`
	// When the feed view was last used
	LastUsedAt *Timestamp `json:"last_used_at,omitempty"`
	// Configured activity selectors
	ActivitySelectors []ActivitySelectorConfigResponse `json:"activity_selectors,omitempty"`
	Aggregation       *AggregationConfig               `json:"aggregation,omitempty"`
	Ranking           *RankingConfig                   `json:"ranking,omitempty"`
}

type FeedVisibilityResponse ΒΆ

type FeedVisibilityResponse struct {
	// Name of the feed visibility level
	Name string `json:"name"`
	// List of permission policies
	Permissions []Permission `json:"permissions"`
	// Permission grants for each role
	Grants map[string][]string `json:"grants"`
}

type Feeds ΒΆ

type Feeds struct {
	// contains filtered or unexported fields
}

func NewFeed ΒΆ

func NewFeed(feedType string, feedID string, client *FeedsClient) *Feeds

func (*Feeds) Delete ΒΆ

func (*Feeds) GetOrCreate ΒΆ

func (*Feeds) MarkActivity ΒΆ

func (c *Feeds) MarkActivity(ctx context.Context, request *MarkActivityRequest) (*StreamResponse[Response], error)

func (*Feeds) PinActivity ΒΆ

func (c *Feeds) PinActivity(ctx context.Context, activityID string, request *PinActivityRequest) (*StreamResponse[PinActivityResponse], error)

func (*Feeds) QueryFeedMembers ΒΆ

func (*Feeds) UnpinActivity ΒΆ

func (c *Feeds) UnpinActivity(ctx context.Context, activityID string, request *UnpinActivityRequest) (*StreamResponse[UnpinActivityResponse], error)

func (*Feeds) Update ΒΆ

func (*Feeds) UpdateFeedMembers ΒΆ

type FeedsActivityLocation ΒΆ

type FeedsActivityLocation struct {
	Lat float64 `json:"lat"`
	Lng float64 `json:"lng"`
}

type FeedsBookmarkResponse ΒΆ

type FeedsBookmarkResponse struct {
	CreatedAt  Timestamp `json:"created_at"`
	ObjectID   string    `json:"object_id"`
	ObjectType string    `json:"object_type"`
	UpdatedAt  Timestamp `json:"updated_at"`
	// User response object
	User       UserResponse   `json:"user"`
	ActivityID *string        `json:"activity_id,omitempty"`
	Custom     map[string]any `json:"custom,omitempty"`
}

type FeedsClient ΒΆ

type FeedsClient struct {
	// contains filtered or unexported fields
}

func NewFeedsClient ΒΆ

func NewFeedsClient(client *Client) *FeedsClient

func (*FeedsClient) AcceptFeedMemberInvite ΒΆ

func (c *FeedsClient) AcceptFeedMemberInvite(ctx context.Context, feedID string, feedGroupID string, request *AcceptFeedMemberInviteRequest) (*StreamResponse[AcceptFeedMemberInviteResponse], error)

Accepts a pending feed member request

func (*FeedsClient) AcceptFollow ΒΆ

Accepts a pending follow request

func (*FeedsClient) ActivityFeedback ΒΆ

func (c *FeedsClient) ActivityFeedback(ctx context.Context, activityID string, request *ActivityFeedbackRequest) (*StreamResponse[ActivityFeedbackResponse], error)

Submit feedback for an activity including options to show less, hide, report, or mute the user

func (*FeedsClient) AddActivity ΒΆ

Create a new activity or update an existing one

func (*FeedsClient) AddActivityReaction ΒΆ

func (c *FeedsClient) AddActivityReaction(ctx context.Context, activityID string, request *AddActivityReactionRequest) (*StreamResponse[AddReactionResponse], error)

Adds a reaction to an activity

func (*FeedsClient) AddBookmark ΒΆ

func (c *FeedsClient) AddBookmark(ctx context.Context, activityID string, request *AddBookmarkRequest) (*StreamResponse[AddBookmarkResponse], error)

Adds a bookmark to an activity

func (*FeedsClient) AddComment ΒΆ

Adds a comment to an object (e.g., activity) or a reply to an existing comment, and broadcasts appropriate events

func (*FeedsClient) AddCommentBookmark ΒΆ

func (c *FeedsClient) AddCommentBookmark(ctx context.Context, commentID string, request *AddCommentBookmarkRequest) (*StreamResponse[AddCommentBookmarkResponse], error)

Adds a bookmark to a comment

func (*FeedsClient) AddCommentReaction ΒΆ

Adds a reaction to a comment

func (*FeedsClient) AddCommentsBatch ΒΆ

Adds multiple comments in a single request. Each comment must specify the object type and ID.

func (*FeedsClient) BatchQueryActivityReactions ΒΆ

Returns a single user's reactions across a set of activity IDs, without activity payloads

func (*FeedsClient) BatchQueryCommentReactions ΒΆ

Returns a single user's reactions across a set of comment IDs, without comment payloads

func (*FeedsClient) CastPollVote ΒΆ

func (c *FeedsClient) CastPollVote(ctx context.Context, activityID string, pollID string, request *CastPollVoteRequest) (*StreamResponse[PollVoteResponse], error)

Cast a vote on a poll

Sends events: - feeds.poll.vote_casted - feeds.poll.vote_changed - feeds.poll.vote_removed - poll.vote_casted - poll.vote_changed - poll.vote_removed

func (*FeedsClient) ChangeFeedVisibility ΒΆ

func (c *FeedsClient) ChangeFeedVisibility(ctx context.Context, feedGroupID string, feedID string, request *ChangeFeedVisibilityRequest) (*StreamResponse[ChangeFeedVisibilityResponse], error)

Changes the visibility of an existing feed. Follow reconciliation (rewriting pending follows on loosening, or removing disallowed follows/members on tightening) runs asynchronously in the background; the response returns optimistically with the intended visibility.

func (*FeedsClient) CreateCollections ΒΆ

Create new collections in a batch operation. Collections are data objects that can be attached to activities for managing shared data across multiple activities.

func (*FeedsClient) CreateFeedGroup ΒΆ

Creates a new feed group with the specified configuration

func (*FeedsClient) CreateFeedView ΒΆ

Create a custom view for a feed group with specific selectors, ranking, or aggregation options

func (*FeedsClient) CreateFeedsBatch ΒΆ

Create multiple feeds at once for a given feed group

func (*FeedsClient) CreateMembershipLevel ΒΆ

Create a new membership level with tag-based access controls

func (*FeedsClient) DeleteActivities ΒΆ

Delete one or more activities by their IDs

func (*FeedsClient) DeleteActivity ΒΆ

Delete a single activity by its ID

func (*FeedsClient) DeleteActivityReaction ΒΆ

func (c *FeedsClient) DeleteActivityReaction(ctx context.Context, activityID string, _type string, request *DeleteActivityReactionRequest) (*StreamResponse[DeleteActivityReactionResponse], error)

Removes a reaction from an activity

func (*FeedsClient) DeleteBookmark ΒΆ

func (c *FeedsClient) DeleteBookmark(ctx context.Context, activityID string, request *DeleteBookmarkRequest) (*StreamResponse[DeleteBookmarkResponse], error)

Deletes a bookmark from an activity

func (*FeedsClient) DeleteBookmarkFolder ΒΆ

func (c *FeedsClient) DeleteBookmarkFolder(ctx context.Context, folderID string, request *DeleteBookmarkFolderRequest) (*StreamResponse[DeleteBookmarkFolderResponse], error)

Delete a bookmark folder by its ID

func (*FeedsClient) DeleteCollections ΒΆ

Delete collections in a batch operation. Users can only delete their own collections.

func (*FeedsClient) DeleteComment ΒΆ

Deletes a comment from an object (e.g., activity) and broadcasts appropriate events

func (*FeedsClient) DeleteCommentBookmark ΒΆ

func (c *FeedsClient) DeleteCommentBookmark(ctx context.Context, commentID string, request *DeleteCommentBookmarkRequest) (*StreamResponse[DeleteCommentBookmarkResponse], error)

Deletes a bookmark from a comment

func (*FeedsClient) DeleteCommentReaction ΒΆ

Deletes a reaction from a comment

func (*FeedsClient) DeleteFeed ΒΆ

func (c *FeedsClient) DeleteFeed(ctx context.Context, feedGroupID string, feedID string, request *DeleteFeedRequest) (*StreamResponse[DeleteFeedResponse], error)

Delete a single feed by its ID

func (*FeedsClient) DeleteFeedGroup ΒΆ

Delete a feed group by its ID. Can perform a soft delete (default) or hard delete.

func (*FeedsClient) DeleteFeedUserData ΒΆ

Delete all feed data for a user including: feeds, activities, follows, comments, feed reactions, bookmark folders, bookmarks, and collections owned by the user

func (*FeedsClient) DeleteFeedView ΒΆ

Delete an existing custom feed view

func (*FeedsClient) DeleteFeedsBatch ΒΆ

Delete multiple feeds by their IDs. All feeds must exist. This endpoint is server-side only.

func (*FeedsClient) DeleteMembershipLevel ΒΆ

func (c *FeedsClient) DeleteMembershipLevel(ctx context.Context, id string, request *DeleteMembershipLevelRequest) (*StreamResponse[Response], error)

Delete a membership level by its UUID. This operation is irreversible.

func (*FeedsClient) DeletePollVote ΒΆ

func (c *FeedsClient) DeletePollVote(ctx context.Context, activityID string, pollID string, voteID string, request *DeletePollVoteRequest) (*StreamResponse[PollVoteResponse], error)

Delete a vote from a poll

Sends events: - feeds.poll.vote_removed - poll.vote_removed

func (*FeedsClient) ExportFeedUserData ΒΆ

Export all feed data for a user including: user profile, feeds, activities, follows, comments, feed reactions, bookmark folders, bookmarks, and collections owned by the user

func (*FeedsClient) Feed ΒΆ

func (c *FeedsClient) Feed(feedType, feedID string) *Feeds

func (*FeedsClient) Follow ΒΆ

Creates a follow and broadcasts FollowAddedEvent

func (*FeedsClient) FollowBatch ΒΆ

Creates multiple follows at once and broadcasts FollowAddedEvent for each follow

func (*FeedsClient) GetActivity ΒΆ

Returns activity by ID

func (*FeedsClient) GetComment ΒΆ

Get a comment by ID

func (*FeedsClient) GetCommentReplies ΒΆ

Retrieve a threaded list of replies for a single comment, with configurable depth, sorting, and pagination

func (*FeedsClient) GetComments ΒΆ

Retrieve a threaded list of comments for a specific object (e.g., activity), with configurable depth, sorting, and pagination

func (*FeedsClient) GetFeedGroup ΒΆ

Get a feed group by ID

func (*FeedsClient) GetFeedView ΒΆ

Get a feed view by its ID

func (*FeedsClient) GetFeedVisibility ΒΆ

Gets feed visibility configuration and permissions

func (*FeedsClient) GetFeedsRateLimits ΒΆ

Retrieve current rate limit status for feeds operations. Returns information about limits, usage, and remaining quota for various feed operations.

func (*FeedsClient) GetFollowSuggestions ΒΆ

func (c *FeedsClient) GetFollowSuggestions(ctx context.Context, feedGroupID string, request *GetFollowSuggestionsRequest) (*StreamResponse[GetFollowSuggestionsResponse], error)

Get follow suggestions for a feed group

func (*FeedsClient) GetOrCreateFeed ΒΆ

func (c *FeedsClient) GetOrCreateFeed(ctx context.Context, feedGroupID string, feedID string, request *GetOrCreateFeedRequest) (*StreamResponse[GetOrCreateFeedResponse], error)

Create a single feed for a given feed group

func (*FeedsClient) GetOrCreateFeedGroup ΒΆ

Get an existing feed group or create a new one if it doesn't exist

func (*FeedsClient) GetOrCreateFeedView ΒΆ

Get an existing feed view or create a new one if it doesn't exist

func (*FeedsClient) GetOrCreateFollow ΒΆ

Creates a follow if it does not exist, or returns the existing one. Broadcasts feeds.follow.created (FollowCreatedEvent) only when the follow is newly created.

func (*FeedsClient) GetOrCreateFollows ΒΆ

Creates or updates multiple follows at once. Does not return an error if follows already exist. Broadcasts FollowAddedEvent only for newly created follows.

func (*FeedsClient) GetOrCreateUnfollow ΒΆ

Removes a follow and broadcasts feeds.follow.deleted (FollowDeletedEvent). Does not return an error if the follow does not exist.

func (*FeedsClient) GetOrCreateUnfollows ΒΆ

Removes multiple follows and broadcasts FollowRemovedEvent for each. Does not return an error if follows don't exist.

func (*FeedsClient) GetUserInterests ΒΆ

Returns the user's most common interest tags ranked by the number of distinct activities they reacted to that carried each tag. Client-side callers may only read their own interests; server-side callers may fetch any user. Results are sorted by descending count, then alphabetically by tag.

func (*FeedsClient) ListFeedGroups ΒΆ

List all feed groups for the application

func (*FeedsClient) ListFeedViews ΒΆ

List all feed views for a feed group

func (*FeedsClient) ListFeedVisibilities ΒΆ

Gets all available feed visibility configurations and their permissions

func (*FeedsClient) MarkActivity ΒΆ

func (c *FeedsClient) MarkActivity(ctx context.Context, feedGroupID string, feedID string, request *MarkActivityRequest) (*StreamResponse[Response], error)

Mark activities as read/seen/watched. Can mark by timestamp (seen), activity IDs (read), or all as read.

func (*FeedsClient) OwnBatch ΒΆ

Retrieves own_follows, own_capabilities, and/or own_membership for multiple feeds in a single request. If fields are not specified, all three fields are returned.

func (*FeedsClient) PinActivity ΒΆ

func (c *FeedsClient) PinActivity(ctx context.Context, feedGroupID string, feedID string, activityID string, request *PinActivityRequest) (*StreamResponse[PinActivityResponse], error)

Pin an activity to a feed. Pinned activities are typically displayed at the top of a feed.

func (*FeedsClient) QueryActivities ΒΆ

Query activities based on filters with pagination and sorting options

func (*FeedsClient) QueryActivityReactions ΒΆ

func (c *FeedsClient) QueryActivityReactions(ctx context.Context, activityID string, request *QueryActivityReactionsRequest) (*StreamResponse[QueryActivityReactionsResponse], error)

Query activity reactions

func (*FeedsClient) QueryActivityShares ΒΆ

func (c *FeedsClient) QueryActivityShares(ctx context.Context, activityID string, request *QueryActivitySharesRequest) (*StreamResponse[QueryActivitySharesResponse], error)

List the shares recorded for an activity, newest-first

func (*FeedsClient) QueryBookmarkFolders ΒΆ

Query bookmark folders with filter query

func (*FeedsClient) QueryBookmarks ΒΆ

Query bookmarks with filter query

func (*FeedsClient) QueryCollections ΒΆ

Query collections with filter query

func (*FeedsClient) QueryCommentReactions ΒΆ

Query comment reactions

func (*FeedsClient) QueryComments ΒΆ

Query comments using MongoDB-style filters with pagination and sorting options

func (*FeedsClient) QueryFeedMembers ΒΆ

func (c *FeedsClient) QueryFeedMembers(ctx context.Context, feedGroupID string, feedID string, request *QueryFeedMembersRequest) (*StreamResponse[QueryFeedMembersResponse], error)

Query feed members based on filters with pagination and sorting options

func (*FeedsClient) QueryFeeds ΒΆ

Query feeds with filter query

func (*FeedsClient) QueryFeedsUsageStats ΒΆ

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.

func (*FeedsClient) QueryFollows ΒΆ

Query follows based on filters with pagination and sorting options

func (*FeedsClient) QueryMembershipLevels ΒΆ

Query membership levels with filter query

func (*FeedsClient) QueryPinnedActivities ΒΆ

func (c *FeedsClient) QueryPinnedActivities(ctx context.Context, feedGroupID string, feedID string, request *QueryPinnedActivitiesRequest) (*StreamResponse[QueryPinnedActivitiesResponse], error)

Query pinned activities for a feed with filter query

func (*FeedsClient) QueryRevisionHistory ΒΆ

Queries revision history for activities and comments

func (*FeedsClient) ReadCollections ΒΆ

Read collections by their references. By default, users can only read their own collections.

func (*FeedsClient) RejectFeedMemberInvite ΒΆ

func (c *FeedsClient) RejectFeedMemberInvite(ctx context.Context, feedGroupID string, feedID string, request *RejectFeedMemberInviteRequest) (*StreamResponse[RejectFeedMemberInviteResponse], error)

Rejects a pending feed member request

func (*FeedsClient) RejectFollow ΒΆ

Rejects a pending follow request

func (*FeedsClient) RestoreActivity ΒΆ

Restores a soft-deleted, moderation-removed, or shadow-blocked activity by its ID. Deleted activities can be restored by the owner (client-side). Moderation-blocked activities can only be restored server-side.

func (*FeedsClient) RestoreComment ΒΆ

Restores a soft-deleted, moderation-removed, or shadow-blocked comment by its ID. The comment and all its descendants are restored. Deleted comments can be restored client-side. Moderation-blocked comments can only be restored server-side.

func (*FeedsClient) RestoreFeedGroup ΒΆ

func (c *FeedsClient) RestoreFeedGroup(ctx context.Context, feedGroupID string, request *RestoreFeedGroupRequest) (*StreamResponse[RestoreFeedGroupResponse], error)

Restores a soft-deleted feed group by its ID. Only clears DeletedAt in the database; no other fields are updated.

func (*FeedsClient) TrackActivityMetrics ΒΆ

Track metric events (views, clicks, impressions) for activities. Supports batching up to 100 events per request. Each event is independently rate-limited per user per activity per metric. Server-side calls must include user_id.

func (*FeedsClient) TranslateActivity ΒΆ

Translates an activity's text to a given language using automated translation

Sends events: - feeds.activity.updated

func (*FeedsClient) TranslateComment ΒΆ

Translates a comment's text to a given language using automated translation

Sends events: - feeds.comment.updated

func (*FeedsClient) Unfollow ΒΆ

func (c *FeedsClient) Unfollow(ctx context.Context, source string, target string, request *UnfollowRequest) (*StreamResponse[UnfollowResponse], error)

Removes a follow and broadcasts FollowRemovedEvent

func (*FeedsClient) UnfollowBatch ΒΆ

Removes multiple follows at once and broadcasts FollowRemovedEvent for each one

func (*FeedsClient) UnpinActivity ΒΆ

func (c *FeedsClient) UnpinActivity(ctx context.Context, feedGroupID string, feedID string, activityID string, request *UnpinActivityRequest) (*StreamResponse[UnpinActivityResponse], error)

Unpin an activity from a feed. This removes the pin, so the activity will no longer be displayed at the top of the feed.

func (*FeedsClient) UpdateActivitiesPartialBatch ΒΆ

Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values, exceeding size limits) will fail the entire batch request.

Sends events: - feeds.activity.updated

func (*FeedsClient) UpdateActivity ΒΆ

Replaces an activity with the provided data. Use this to update text, attachments, reply restrictions ('restrict_replies'), mentioned users, and other activity fields. Note: This is a full update - any fields not provided will be cleared.

Sends events: - feeds.activity.updated

func (*FeedsClient) UpdateActivityPartial ΒΆ

Updates certain fields of the activity. Use 'set' to update specific fields and 'unset' to remove fields. This allows you to update only the fields you need without replacing the entire activity. Useful for updating reply restrictions ('restrict_replies'), mentioned users, or custom data.

Sends events: - feeds.activity.updated

func (*FeedsClient) UpdateBookmark ΒΆ

func (c *FeedsClient) UpdateBookmark(ctx context.Context, activityID string, request *UpdateBookmarkRequest) (*StreamResponse[UpdateBookmarkResponse], error)

Updates a bookmark for an activity

func (*FeedsClient) UpdateBookmarkFolder ΒΆ

func (c *FeedsClient) UpdateBookmarkFolder(ctx context.Context, folderID string, request *UpdateBookmarkFolderRequest) (*StreamResponse[UpdateBookmarkFolderResponse], error)

Update a bookmark folder by its ID

func (*FeedsClient) UpdateCollections ΒΆ

Update existing collections in a batch operation. Only the custom data field is updatable. Users can only update their own collections.

func (*FeedsClient) UpdateComment ΒΆ

Updates a comment on an object (e.g., activity) and broadcasts appropriate events

func (*FeedsClient) UpdateCommentBookmark ΒΆ

func (c *FeedsClient) UpdateCommentBookmark(ctx context.Context, commentID string, request *UpdateCommentBookmarkRequest) (*StreamResponse[UpdateCommentBookmarkResponse], error)

Updates a bookmark for a comment

func (*FeedsClient) UpdateCommentPartial ΒΆ

Updates certain fields of the comment. Use 'set' to update specific fields and 'unset' to remove fields.

Sends events: - feeds.activity.updated - feeds.comment.updated

func (*FeedsClient) UpdateFeed ΒΆ

func (c *FeedsClient) UpdateFeed(ctx context.Context, feedGroupID string, feedID string, request *UpdateFeedRequest) (*StreamResponse[UpdateFeedResponse], error)

Update an existing feed

func (*FeedsClient) UpdateFeedGroup ΒΆ

Update a feed group by ID

func (*FeedsClient) UpdateFeedMembers ΒΆ

func (c *FeedsClient) UpdateFeedMembers(ctx context.Context, feedGroupID string, feedID string, request *UpdateFeedMembersRequest) (*StreamResponse[UpdateFeedMembersResponse], error)

Add, remove, or set members for a feed

func (*FeedsClient) UpdateFeedView ΒΆ

Update an existing custom feed view with new selectors, ranking, or aggregation options

func (*FeedsClient) UpdateFeedVisibility ΒΆ

Updates an existing predefined feed visibility configuration

func (*FeedsClient) UpdateFollow ΒΆ

Updates a follow's custom data, push preference, and follower role. Source owner can update custom data and push preference. Follower role can only be updated via server-side requests.

func (*FeedsClient) UpdateMembershipLevel ΒΆ

Update a membership level with partial updates. Only specified fields will be updated.

func (*FeedsClient) UpsertActivities ΒΆ

Create new activities or update existing ones in a batch operation

func (*FeedsClient) UpsertCollections ΒΆ

Insert new collections or update existing ones in a batch operation. Only the custom data field is updatable for existing collections.

type FeedsEnrichedCollectionResponse ΒΆ

type FeedsEnrichedCollectionResponse struct {
	CreatedAt Timestamp      `json:"created_at"`
	ID        string         `json:"id"`
	Name      string         `json:"name"`
	Status    string         `json:"status"`
	UpdatedAt Timestamp      `json:"updated_at"`
	UserID    string         `json:"user_id"`
	Custom    map[string]any `json:"custom"`
}

type FeedsFeedResponse ΒΆ

type FeedsFeedResponse struct {
	ActivityCount  int       `json:"activity_count"`
	CreatedAt      Timestamp `json:"created_at"`
	Description    string    `json:"description"`
	Feed           string    `json:"feed"`
	FollowerCount  int       `json:"follower_count"`
	FollowingCount int       `json:"following_count"`
	GroupID        string    `json:"group_id"`
	ID             string    `json:"id"`
	MemberCount    int       `json:"member_count"`
	Name           string    `json:"name"`
	PinCount       int       `json:"pin_count"`
	UpdatedAt      Timestamp `json:"updated_at"`
	// User response object
	CreatedBy  UserResponse           `json:"created_by"`
	DeletedAt  *Timestamp             `json:"deleted_at,omitempty"`
	Visibility *string                `json:"visibility,omitempty"`
	FilterTags []string               `json:"filter_tags,omitempty"`
	Custom     map[string]any         `json:"custom,omitempty"`
	Location   *FeedsActivityLocation `json:"location,omitempty"`
}

type FeedsModerationTemplateConfigPayload ΒΆ

type FeedsModerationTemplateConfigPayload struct {
	// Map of data type names to their content types
	DataTypes map[string]string `json:"data_types"`
	// Key of the moderation configuration to use
	ConfigKey *string `json:"config_key,omitempty"`
}

Configuration for a feeds moderation template

type FeedsNotificationComment ΒΆ

type FeedsNotificationComment struct {
	Comment     string       `json:"comment"`
	ID          string       `json:"id"`
	UserID      string       `json:"user_id"`
	Attachments []Attachment `json:"attachments,omitempty"`
}

type FeedsNotificationContext ΒΆ

type FeedsNotificationContext struct {
	Target  *FeedsNotificationTarget  `json:"target,omitempty"`
	Trigger *FeedsNotificationTrigger `json:"trigger,omitempty"`
}

type FeedsNotificationParentActivity ΒΆ

type FeedsNotificationParentActivity struct {
	ID          string       `json:"id"`
	Text        *string      `json:"text,omitempty"`
	UserID      *string      `json:"user_id,omitempty"`
	Type        *string      `json:"type,omitempty"`
	Attachments []Attachment `json:"attachments,omitempty"`
}

type FeedsNotificationTarget ΒΆ

type FeedsNotificationTarget struct {
	ID             string                           `json:"id"`
	Name           *string                          `json:"name,omitempty"`
	Text           *string                          `json:"text,omitempty"`
	UserID         *string                          `json:"user_id,omitempty"`
	Type           *string                          `json:"type,omitempty"`
	Attachments    []Attachment                     `json:"attachments,omitempty"`
	Comment        *FeedsNotificationComment        `json:"comment,omitempty"`
	Custom         map[string]any                   `json:"custom,omitempty"`
	ParentActivity *FeedsNotificationParentActivity `json:"parent_activity,omitempty"`
}

type FeedsNotificationTrigger ΒΆ

type FeedsNotificationTrigger struct {
	Text    string                    `json:"text"`
	Type    string                    `json:"type"`
	Comment *FeedsNotificationComment `json:"comment,omitempty"`
	Custom  map[string]any            `json:"custom,omitempty"`
}

type FeedsPreferences ΒΆ

type FeedsPreferences struct {
	// Push notification preference for comments on user's activities. One of: all, none
	Comment *string `json:"comment,omitempty"`
	// Push notification preference for mentions in comments. One of: all, none
	CommentMention *string `json:"comment_mention,omitempty"`
	// Push notification preference for reactions on comments. One of: all, none
	CommentReaction *string `json:"comment_reaction,omitempty"`
	// Push notification preference for replies to comments. One of: all, none
	CommentReply *string `json:"comment_reply,omitempty"`
	// Push notification preference for new followers. One of: all, none
	Follow *string `json:"follow,omitempty"`
	// Push notification preference for mentions in activities. One of: all, none
	Mention *string `json:"mention,omitempty"`
	// Push notification preference for reactions on user's activities or comments. One of: all, none
	Reaction *string `json:"reaction,omitempty"`
	// Push notification preferences for custom activity types. Map of activity type to preference (all or none)
	CustomActivityTypes map[string]string `json:"custom_activity_types,omitempty"`
}

type FeedsPreferencesResponse ΒΆ

type FeedsPreferencesResponse struct {
	Comment             *string           `json:"comment,omitempty"`
	CommentMention      *string           `json:"comment_mention,omitempty"`
	CommentReaction     *string           `json:"comment_reaction,omitempty"`
	CommentReply        *string           `json:"comment_reply,omitempty"`
	Follow              *string           `json:"follow,omitempty"`
	Mention             *string           `json:"mention,omitempty"`
	Reaction            *string           `json:"reaction,omitempty"`
	CustomActivityTypes map[string]string `json:"custom_activity_types,omitempty"`
}

type FeedsReactionGroupResponse ΒΆ

type FeedsReactionGroupResponse struct {
	Count           int       `json:"count"`
	FirstReactionAt Timestamp `json:"first_reaction_at"`
	LastReactionAt  Timestamp `json:"last_reaction_at"`
}

type FeedsReactionResponse ΒΆ

type FeedsReactionResponse struct {
	ActivityID string    `json:"activity_id"`
	CreatedAt  Timestamp `json:"created_at"`
	UpdatedAt  Timestamp `json:"updated_at"`
	Type       string    `json:"type"`
	// User response object
	User      UserResponse   `json:"user"`
	CommentID *string        `json:"comment_id,omitempty"`
	Custom    map[string]any `json:"custom,omitempty"`
}

type FeedsShareResponse ΒΆ

type FeedsShareResponse struct {
	ActivityID string    `json:"activity_id"`
	CreatedAt  Timestamp `json:"created_at"`
	// User response object
	User UserResponse `json:"user"`
}

type FeedsV3ActivityResponse ΒΆ

type FeedsV3ActivityResponse struct {
	BookmarkCount   int                                        `json:"bookmark_count"`
	CommentCount    int                                        `json:"comment_count"`
	CreatedAt       Timestamp                                  `json:"created_at"`
	Hidden          bool                                       `json:"hidden"`
	ID              string                                     `json:"id"`
	Popularity      int                                        `json:"popularity"`
	Preview         bool                                       `json:"preview"`
	ReactionCount   int                                        `json:"reaction_count"`
	RestrictReplies string                                     `json:"restrict_replies"`
	Score           float64                                    `json:"score"`
	ShareCount      int                                        `json:"share_count"`
	UpdatedAt       Timestamp                                  `json:"updated_at"`
	Visibility      string                                     `json:"visibility"`
	Type            string                                     `json:"type"`
	Attachments     []Attachment                               `json:"attachments"`
	Comments        []FeedsV3CommentResponse                   `json:"comments"`
	Feeds           []string                                   `json:"feeds"`
	FilterTags      []string                                   `json:"filter_tags"`
	InterestTags    []string                                   `json:"interest_tags"`
	LatestReactions []FeedsReactionResponse                    `json:"latest_reactions"`
	MentionedUsers  []UserResponse                             `json:"mentioned_users"`
	OwnBookmarks    []FeedsBookmarkResponse                    `json:"own_bookmarks"`
	OwnReactions    []FeedsReactionResponse                    `json:"own_reactions"`
	Collections     map[string]FeedsEnrichedCollectionResponse `json:"collections"`
	Custom          map[string]any                             `json:"custom"`
	ReactionGroups  map[string]FeedsReactionGroupResponse      `json:"reaction_groups"`
	SearchData      map[string]any                             `json:"search_data"`
	// User response object
	User                UserResponse              `json:"user"`
	DeletedAt           *Timestamp                `json:"deleted_at,omitempty"`
	EditedAt            *Timestamp                `json:"edited_at,omitempty"`
	ExpiresAt           *Timestamp                `json:"expires_at,omitempty"`
	FriendReactionCount *int                      `json:"friend_reaction_count,omitempty"`
	IsRead              *bool                     `json:"is_read,omitempty"`
	IsSeen              *bool                     `json:"is_seen,omitempty"`
	IsWatched           *bool                     `json:"is_watched,omitempty"`
	ModerationAction    *string                   `json:"moderation_action,omitempty"`
	SelectorSource      *string                   `json:"selector_source,omitempty"`
	Text                *string                   `json:"text,omitempty"`
	VisibilityTag       *string                   `json:"visibility_tag,omitempty"`
	FriendReactions     []FeedsReactionResponse   `json:"friend_reactions,omitempty"`
	LatestShares        []FeedsShareResponse      `json:"latest_shares,omitempty"`
	CurrentFeed         *FeedsFeedResponse        `json:"current_feed,omitempty"`
	I18n                map[string]string         `json:"i18n,omitempty"`
	Location            *FeedsActivityLocation    `json:"location,omitempty"`
	Metrics             map[string]int            `json:"metrics,omitempty"`
	Moderation          *ModerationV2Response     `json:"moderation,omitempty"`
	NotificationContext *FeedsNotificationContext `json:"notification_context,omitempty"`
	Parent              *FeedsV3ActivityResponse  `json:"parent,omitempty"`
	Poll                *PollResponseData         `json:"poll,omitempty"`
	ScoreVars           map[string]any            `json:"score_vars,omitempty"`
}

type FeedsV3CommentResponse ΒΆ

type FeedsV3CommentResponse struct {
	BookmarkCount   int                     `json:"bookmark_count"`
	ConfidenceScore float64                 `json:"confidence_score"`
	CreatedAt       Timestamp               `json:"created_at"`
	DownvoteCount   int                     `json:"downvote_count"`
	ID              string                  `json:"id"`
	ObjectID        string                  `json:"object_id"`
	ObjectType      string                  `json:"object_type"`
	ReactionCount   int                     `json:"reaction_count"`
	ReplyCount      int                     `json:"reply_count"`
	Score           int                     `json:"score"`
	Status          string                  `json:"status"`
	UpdatedAt       Timestamp               `json:"updated_at"`
	UpvoteCount     int                     `json:"upvote_count"`
	MentionedUsers  []UserResponse          `json:"mentioned_users"`
	OwnReactions    []FeedsReactionResponse `json:"own_reactions"`
	// User response object
	User             UserResponse                          `json:"user"`
	ControversyScore *float64                              `json:"controversy_score,omitempty"`
	DeletedAt        *Timestamp                            `json:"deleted_at,omitempty"`
	EditedAt         *Timestamp                            `json:"edited_at,omitempty"`
	ParentID         *string                               `json:"parent_id,omitempty"`
	Text             *string                               `json:"text,omitempty"`
	Attachments      []Attachment                          `json:"attachments,omitempty"`
	LatestReactions  []FeedsReactionResponse               `json:"latest_reactions,omitempty"`
	Custom           map[string]any                        `json:"custom,omitempty"`
	I18n             map[string]string                     `json:"i18n,omitempty"`
	Moderation       *ModerationV2Response                 `json:"moderation,omitempty"`
	ReactionGroups   map[string]FeedsReactionGroupResponse `json:"reaction_groups,omitempty"`
}

type Field ΒΆ

type Field struct {
	Short bool   `json:"short"`
	Title string `json:"title"`
	Value string `json:"value"`
}

type FileUploadConfig ΒΆ

type FileUploadConfig struct {
	SizeLimit             int      `json:"size_limit"`
	AllowedFileExtensions []string `json:"allowed_file_extensions,omitempty"`
	AllowedMimeTypes      []string `json:"allowed_mime_types,omitempty"`
	BlockedFileExtensions []string `json:"blocked_file_extensions,omitempty"`
	BlockedMimeTypes      []string `json:"blocked_mime_types,omitempty"`
}

type FileUploadRequest ΒΆ

type FileUploadRequest struct {
	// file field
	File *string     `json:"file,omitempty"`
	User *OnlyUserID `json:"user,omitempty"`
}

type FileUploadResponse ΒΆ

type FileUploadResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// URL to the uploaded asset. Should be used to put to `asset_url` attachment field
	File *string `json:"file,omitempty"`
	// URL of the file thumbnail for supported file formats. Should be put to `thumb_url` attachment field
	ThumbUrl *string `json:"thumb_url,omitempty"`
}

type FilterConfigResponse ΒΆ

type FilterConfigResponse struct {
	// LLM moderation labels available as filter values
	LlmLabels []string `json:"llm_labels"`
	// AI image moderation labels available as filter values. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard L1 label set.
	AiImageLabels []string `json:"ai_image_labels,omitempty"`
	// AI text moderation labels available as filter values
	AiTextLabels []string `json:"ai_text_labels,omitempty"`
	// Moderation config keys present in the queue, available as filter values
	ConfigKeys []string `json:"config_keys,omitempty"`
	// The moderation_payload.custom keys the app has configured as review-queue filter chips (via moderation_dashboard_preferences.filterable_custom_keys). Discovery hint for the dashboard only β€” the filter accepts any custom key regardless of this list.
	FilterableCustomKeys []string `json:"filterable_custom_keys,omitempty"`
	// AI image moderation labels available as filter values, as a map of L1 label to its L2 sub-labels. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard catalogue of the org's enabled image providers.
	AiImageTaxonomy map[string][]string `json:"ai_image_taxonomy,omitempty"`
}

type FirebaseConfig ΒΆ

type FirebaseConfig struct {
	ApnTemplate          *string `json:"apn_template,omitempty"`
	CredentialsJson      *string `json:"credentials_json,omitempty"`
	DataTemplate         *string `json:"data_template,omitempty"`
	Disabled             *bool   `json:"Disabled,omitempty"`
	NotificationTemplate *string `json:"notification_template,omitempty"`
	ServerKey            *string `json:"server_key,omitempty"`
}

type FirebaseConfigFields ΒΆ

type FirebaseConfigFields struct {
	Enabled              bool    `json:"enabled"`
	ApnTemplate          *string `json:"apn_template,omitempty"`
	CredentialsJson      *string `json:"credentials_json,omitempty"`
	DataTemplate         *string `json:"data_template,omitempty"`
	NotificationTemplate *string `json:"notification_template,omitempty"`
	ServerKey            *string `json:"server_key,omitempty"`
}

type FlagCountRuleParameters ΒΆ

type FlagCountRuleParameters struct {
	Threshold *int `json:"threshold,omitempty"`
}

type FlagDetails ΒΆ

type FlagDetails struct {
	OriginalText string                  `json:"original_text"`
	Automod      *AutomodDetailsResponse `json:"automod,omitempty"`
}

type FlagDetailsResponse ΒΆ

type FlagDetailsResponse struct {
	OriginalText string                  `json:"original_text"`
	Automod      *AutomodDetailsResponse `json:"automod,omitempty"`
	Extra        map[string]any          `json:"extra,omitempty"`
}

type FlagFeedbackResponse ΒΆ

type FlagFeedbackResponse struct {
	CreatedAt Timestamp       `json:"created_at"`
	MessageID string          `json:"message_id"`
	Labels    []LabelResponse `json:"labels"`
}

type FlagItemResponse ΒΆ

type FlagItemResponse struct {
	Duration string `json:"duration"`
	// Unique identifier of the created moderation item
	ItemID string `json:"item_id"`
}

type FlagMessageDetailsResponse ΒΆ

type FlagMessageDetailsResponse struct {
	PinChanged   *bool   `json:"pin_changed,omitempty"`
	ShouldEnrich *bool   `json:"should_enrich,omitempty"`
	SkipPush     *bool   `json:"skip_push,omitempty"`
	UpdatedByID  *string `json:"updated_by_id,omitempty"`
}

type FlagRequest ΒΆ

type FlagRequest struct {
	// Unique identifier of the entity being flagged
	EntityID string `json:"entity_id"`
	// Type of entity being flagged (e.g., message, user)
	EntityType string `json:"entity_type"`
	// ID of the user who created the flagged entity
	EntityCreatorID *string `json:"entity_creator_id,omitempty"`
	// Optional explanation for why the content is being flagged
	Reason *string `json:"reason,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Additional metadata about the flag
	Custom            map[string]any     `json:"custom"`
	ModerationPayload *ModerationPayload `json:"moderation_payload,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type FlagResponse ΒΆ

type FlagResponse struct {
	CreatedAt        Timestamp      `json:"created_at"`
	CreatedByAutomod bool           `json:"created_by_automod"`
	UpdatedAt        Timestamp      `json:"updated_at"`
	ApprovedAt       *Timestamp     `json:"approved_at,omitempty"`
	Reason           *string        `json:"reason,omitempty"`
	RejectedAt       *Timestamp     `json:"rejected_at,omitempty"`
	ReviewedAt       *Timestamp     `json:"reviewed_at,omitempty"`
	ReviewedBy       *string        `json:"reviewed_by,omitempty"`
	TargetMessageID  *string        `json:"target_message_id,omitempty"`
	Custom           map[string]any `json:"custom,omitempty"`
	Details          *FlagDetails   `json:"details,omitempty"`
	// Represents any chat message
	TargetMessage *MessageResponse `json:"target_message,omitempty"`
	// User response object
	TargetUser *UserResponse `json:"target_user,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type FlagUpdatedEvent ΒΆ

type FlagUpdatedEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
	// User response object
	CreatedBy *UserResponse `json:"CreatedBy,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"Message,omitempty"`
	// User response object
	User *UserResponse `json:"User,omitempty"`
}

func (*FlagUpdatedEvent) GetEventType ΒΆ

func (e *FlagUpdatedEvent) GetEventType() string

type FlagUserOptions ΒΆ

type FlagUserOptions struct {
	Reason *string `json:"reason,omitempty"`
}

type FloodConfig ΒΆ

type FloodConfig struct {
	Allowlist []string              `json:"allowlist,omitempty"`
	Identical *FloodIdenticalConfig `json:"identical,omitempty"`
	Similar   *FloodSimilarConfig   `json:"similar,omitempty"`
}

type FloodIdenticalConfig ΒΆ

type FloodIdenticalConfig struct {
	Action     *string `json:"action,omitempty"`
	Enabled    *bool   `json:"enabled,omitempty"`
	Threshold  *int    `json:"threshold,omitempty"`
	TimeWindow *string `json:"time_window,omitempty"`
}

type FloodIdenticalRuleParameters ΒΆ added in v5.3.0

type FloodIdenticalRuleParameters struct {
	Threshold  *int     `json:"threshold,omitempty"`
	TimeWindow *string  `json:"time_window,omitempty"`
	Allowlist  []string `json:"allowlist,omitempty"`
}

type FloodSimilarConfig ΒΆ

type FloodSimilarConfig struct {
	Action             *string `json:"action,omitempty"`
	Enabled            *bool   `json:"enabled,omitempty"`
	SimilarityDistance *int    `json:"similarity_distance,omitempty"`
	Threshold          *int    `json:"threshold,omitempty"`
	TimeWindow         *string `json:"time_window,omitempty"`
}

type FloodSimilarRuleParameters ΒΆ added in v5.3.0

type FloodSimilarRuleParameters struct {
	SimilarityDistance *int     `json:"similarity_distance,omitempty"`
	Threshold          *int     `json:"threshold,omitempty"`
	TimeWindow         *string  `json:"time_window,omitempty"`
	Allowlist          []string `json:"allowlist,omitempty"`
}

type FollowBatchRequest ΒΆ

type FollowBatchRequest struct {
	// List of follow relationships to create
	Follows []FollowRequest `json:"follows"`
	// 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.
	CreateUsers *bool `json:"create_users,omitempty"`
	// If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
}

type FollowBatchResponse ΒΆ

type FollowBatchResponse struct {
	Duration string `json:"duration"`
	// List of newly created follow relationships
	Created []FollowResponse `json:"created"`
	// List of current follow relationships
	Follows []FollowResponse `json:"follows"`
}

type FollowCreatedEvent ΒΆ

type FollowCreatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Fid       string         `json:"fid"`
	Custom    map[string]any `json:"custom"`
	Follow    FollowResponse `json:"follow"`
	// The type of event: "feeds.follow.created" in this case
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
}

Emitted when a feed follows another feed.

func (*FollowCreatedEvent) GetEventType ΒΆ

func (e *FollowCreatedEvent) GetEventType() string

type FollowDeletedEvent ΒΆ

type FollowDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Fid       string         `json:"fid"`
	Custom    map[string]any `json:"custom"`
	Follow    FollowResponse `json:"follow"`
	// The type of event: "feeds.follow.deleted" in this case
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
}

Emitted when a feed unfollows another feed.

func (*FollowDeletedEvent) GetEventType ΒΆ

func (e *FollowDeletedEvent) GetEventType() string

type FollowRequest ΒΆ

type FollowRequest struct {
	// Fully qualified ID of the source feed
	Source string `json:"source"`
	// Fully qualified ID of the target feed
	Target string `json:"target"`
	// Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.
	ActivityCopyLimit *int `json:"activity_copy_limit,omitempty"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create a notification activity for this follow
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	// If true, auto-creates users referenced by the source and target FIDs when they don't already exist. Server-side only. Defaults to false. Use directly on single follow endpoints (Follow, GetOrCreateFollow). On batch endpoints (FollowBatch, GetOrCreateFollows), use the top-level create_users field; per-item follows[i].create_users is rejected.
	CreateUsers *bool `json:"create_users,omitempty"`
	// If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
	// Push preference for the follow relationship
	PushPreference *string `json:"push_preference,omitempty"`
	// Whether to skip push for this follow
	SkipPush *bool `json:"skip_push,omitempty"`
	// Status of the follow relationship. One of: accepted, pending, rejected
	Status *string `json:"status,omitempty"`
	// Custom data for the follow relationship
	Custom map[string]any `json:"custom"`
}

type FollowResponse ΒΆ

type FollowResponse struct {
	// When the follow relationship was created
	CreatedAt Timestamp `json:"created_at"`
	// Role of the follower (source user) in the follow relationship
	FollowerRole string `json:"follower_role"`
	// Push preference for notifications. One of: all, none
	PushPreference string `json:"push_preference"`
	// Status of the follow relationship. One of: accepted, pending, rejected
	Status string `json:"status"`
	// When the follow relationship was last updated
	UpdatedAt  Timestamp    `json:"updated_at"`
	SourceFeed FeedResponse `json:"source_feed"`
	TargetFeed FeedResponse `json:"target_feed"`
	// When the follow request was accepted
	RequestAcceptedAt *Timestamp `json:"request_accepted_at,omitempty"`
	// When the follow request was rejected
	RequestRejectedAt *Timestamp `json:"request_rejected_at,omitempty"`
	// Custom data for the follow relationship
	Custom map[string]any `json:"custom,omitempty"`
}

type FollowUpdatedEvent ΒΆ

type FollowUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Fid       string         `json:"fid"`
	Custom    map[string]any `json:"custom"`
	Follow    FollowResponse `json:"follow"`
	// The type of event: "feeds.follow.updated" in this case
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
}

Emitted when a follow relationship is updated.

func (*FollowUpdatedEvent) GetEventType ΒΆ

func (e *FollowUpdatedEvent) GetEventType() string

type FrameRecordSettings ΒΆ

type FrameRecordSettings struct {
	CaptureIntervalInSeconds int     `json:"capture_interval_in_seconds"`
	Mode                     string  `json:"mode"`
	Quality                  *string `json:"quality,omitempty"`
}

type FrameRecordingResponse ΒΆ

type FrameRecordingResponse struct {
	Status string `json:"status"`
}

type FrameRecordingSettingsRequest ΒΆ

type FrameRecordingSettingsRequest struct {
	CaptureIntervalInSeconds int     `json:"capture_interval_in_seconds"`
	Mode                     string  `json:"mode"`
	Quality                  *string `json:"quality,omitempty"`
}

type FrameRecordingSettingsResponse ΒΆ

type FrameRecordingSettingsResponse struct {
	CaptureIntervalInSeconds int     `json:"capture_interval_in_seconds"`
	Mode                     string  `json:"mode"`
	Quality                  *string `json:"quality,omitempty"`
}

type FriendReactionsOptions ΒΆ

type FriendReactionsOptions struct {
	// Default: false. When true, fetches friend reactions for activities.
	Enabled *bool `json:"enabled,omitempty"`
	// Default: 3, Max: 10. The maximum number of friend reactions to return per activity.
	Limit *int `json:"limit,omitempty"`
	// Default: 'following'. The type of friend relationship to use. 'following' = users you follow, 'mutual' = users with mutual follows. One of: following, mutual
	Type *string `json:"type,omitempty"`
}

Options to control fetching reactions from friends (users you follow or have mutual follows with).

type FullUserResponse ΒΆ

type FullUserResponse struct {
	Banned                   bool                     `json:"banned"`
	CreatedAt                Timestamp                `json:"created_at"`
	ID                       string                   `json:"id"`
	Invisible                bool                     `json:"invisible"`
	Language                 string                   `json:"language"`
	Online                   bool                     `json:"online"`
	Role                     string                   `json:"role"`
	ShadowBanned             bool                     `json:"shadow_banned"`
	TotalUnreadCount         int                      `json:"total_unread_count"`
	UnreadChannels           int                      `json:"unread_channels"`
	UnreadCount              int                      `json:"unread_count"`
	UnreadThreads            int                      `json:"unread_threads"`
	UpdatedAt                Timestamp                `json:"updated_at"`
	BlockedUserIds           []string                 `json:"blocked_user_ids"`
	ChannelMutes             []ChannelMute            `json:"channel_mutes"`
	Devices                  []DeviceResponse         `json:"devices"`
	Mutes                    []UserMuteResponse       `json:"mutes"`
	Teams                    []string                 `json:"teams"`
	Custom                   map[string]any           `json:"custom"`
	AvgResponseTime          *int                     `json:"avg_response_time,omitempty"`
	BanExpires               *Timestamp               `json:"ban_expires,omitempty"`
	BypassModeration         *bool                    `json:"bypass_moderation,omitempty"`
	DeactivatedAt            *Timestamp               `json:"deactivated_at,omitempty"`
	DeletedAt                *Timestamp               `json:"deleted_at,omitempty"`
	Image                    *string                  `json:"image,omitempty"`
	LastActive               *Timestamp               `json:"last_active,omitempty"`
	Name                     *string                  `json:"name,omitempty"`
	RevokeTokensIssuedBefore *Timestamp               `json:"revoke_tokens_issued_before,omitempty"`
	LatestHiddenChannels     []string                 `json:"latest_hidden_channels,omitempty"`
	PrivacySettings          *PrivacySettingsResponse `json:"privacy_settings,omitempty"`
	TeamsRole                map[string]string        `json:"teams_role,omitempty"`
}

type FutureChannelBanResponse ΒΆ

type FutureChannelBanResponse struct {
	CreatedAt Timestamp  `json:"created_at"`
	Expires   *Timestamp `json:"expires,omitempty"`
	Reason    *string    `json:"reason,omitempty"`
	Shadow    *bool      `json:"shadow,omitempty"`
	// User response object
	BannedBy *UserResponse `json:"banned_by,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type GeofenceResponse ΒΆ

type GeofenceResponse struct {
	Name         string   `json:"name"`
	Description  *string  `json:"description,omitempty"`
	Type         *string  `json:"type,omitempty"`
	CountryCodes []string `json:"country_codes,omitempty"`
}

type GeofenceSettings ΒΆ

type GeofenceSettings struct {
	Names []string `json:"names"`
}

type GeofenceSettingsRequest ΒΆ

type GeofenceSettingsRequest struct {
	Names []string `json:"names,omitempty"`
}

type GeofenceSettingsResponse ΒΆ

type GeofenceSettingsResponse struct {
	Names []string `json:"names"`
}

type GetActionConfigRequest ΒΆ

type GetActionConfigRequest struct {
	QueueType       *string `json:"-" query:"queue_type"`
	EntityType      *string `json:"-" query:"entity_type"`
	ExcludeDefaults *bool   `json:"-" query:"exclude_defaults"`
	OnlyDefaults    *bool   `json:"-" query:"only_defaults"`
	UserID          *string `json:"-" query:"user_id"`
}

type GetActionConfigResponse ΒΆ

type GetActionConfigResponse struct {
	Duration string `json:"duration"`
	// Moderation action configs grouped by entity type, sorted by order ascending
	ActionConfig map[string][]ModerationActionConfigResponse `json:"action_config"`
}

type GetActiveCallsStatusRequest ΒΆ

type GetActiveCallsStatusRequest struct {
}

type GetActiveCallsStatusResponse ΒΆ

type GetActiveCallsStatusResponse struct {
	Duration string `json:"duration"`
	// End time of the status period
	EndTime Timestamp `json:"end_time"`
	// Start time of the status period
	StartTime Timestamp           `json:"start_time"`
	Metrics   *ActiveCallsMetrics `json:"metrics,omitempty"`
	Summary   *ActiveCallsSummary `json:"summary,omitempty"`
}

Response containing active calls status information

type GetActivityRequest ΒΆ

type GetActivityRequest struct {
	CommentSort   *string `json:"-" query:"comment_sort"`
	CommentLimit  *int    `json:"-" query:"comment_limit"`
	UserID        *string `json:"-" query:"user_id"`
	Language      *string `json:"-" query:"language"`
	TranslateText *bool   `json:"-" query:"translate_text"`
}

type GetActivityResponse ΒΆ

type GetActivityResponse struct {
	Duration string           `json:"duration"`
	Activity ActivityResponse `json:"activity"`
}

type GetAppRequest ΒΆ

type GetAppRequest struct {
}

type GetAppealRequest ΒΆ

type GetAppealRequest struct {
}

type GetAppealResponse ΒΆ

type GetAppealResponse struct {
	Duration string              `json:"duration"`
	Item     *AppealItemResponse `json:"item,omitempty"`
}

type GetApplicationResponse ΒΆ

type GetApplicationResponse struct {
	// Duration of the request in milliseconds
	Duration string            `json:"duration"`
	App      AppResponseFields `json:"app"`
}

Basic response information

type GetBlockListRequest ΒΆ

type GetBlockListRequest struct {
	Team *string `json:"-" query:"team"`
}

type GetBlockListResponse ΒΆ

type GetBlockListResponse struct {
	Duration string `json:"duration"`
	// Block list contains restricted words
	Blocklist *BlockListResponse `json:"blocklist,omitempty"`
}

Response for get block list

type GetBlockedUsersRequest ΒΆ

type GetBlockedUsersRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type GetBlockedUsersResponse ΒΆ

type GetBlockedUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Array of blocked user object
	Blocks []BlockedUserResponse `json:"blocks"`
}

type GetCallParticipantSessionMetricsRequest ΒΆ

type GetCallParticipantSessionMetricsRequest struct {
	Since *Timestamp `json:"-" query:"since"`
	Until *Timestamp `json:"-" query:"until"`
}

type GetCallParticipantSessionMetricsResponse ΒΆ

type GetCallParticipantSessionMetricsResponse struct {
	// Duration of the request in milliseconds
	Duration        string                  `json:"duration"`
	IsPublisher     *bool                   `json:"is_publisher,omitempty"`
	IsSubscriber    *bool                   `json:"is_subscriber,omitempty"`
	JoinedAt        *Timestamp              `json:"joined_at,omitempty"`
	PublisherType   *string                 `json:"publisher_type,omitempty"`
	UserID          *string                 `json:"user_id,omitempty"`
	UserSessionID   *string                 `json:"user_session_id,omitempty"`
	PublishedTracks []PublishedTrackMetrics `json:"published_tracks,omitempty"`
	Client          *SessionClient          `json:"client,omitempty"`
}

Basic response information

type GetCallReportRequest ΒΆ

type GetCallReportRequest struct {
	SessionID *string `json:"-" query:"session_id"`
}

type GetCallReportResponse ΒΆ

type GetCallReportResponse struct {
	// Duration of the request in milliseconds
	Duration       string                     `json:"duration"`
	SessionID      string                     `json:"session_id"`
	Report         ReportResponse             `json:"report"`
	VideoReactions []VideoReactionsResponse   `json:"video_reactions,omitempty"`
	ChatActivity   *ChatActivityStatsResponse `json:"chat_activity,omitempty"`
	Digest         *BroadcastDigest           `json:"digest,omitempty"`
	Session        *CallSessionResponse       `json:"session,omitempty"`
}

Basic response information

type GetCallRequest ΒΆ

type GetCallRequest struct {
	MembersLimit *int  `json:"-" query:"members_limit"`
	Ring         *bool `json:"-" query:"ring"`
	Notify       *bool `json:"-" query:"notify"`
	Video        *bool `json:"-" query:"video"`
}

type GetCallResponse ΒΆ

type GetCallResponse struct {
	Duration        string           `json:"duration"`
	Members         []MemberResponse `json:"members"`
	OwnCapabilities []OwnCapability  `json:"own_capabilities"`
	// Represents a call
	Call CallResponse `json:"call"`
}

type GetCallSessionParticipantStatsDetailsRequest ΒΆ

type GetCallSessionParticipantStatsDetailsRequest struct {
	Since     *string `json:"-" query:"since"`
	Until     *string `json:"-" query:"until"`
	MaxPoints *int    `json:"-" query:"max_points"`
}

type GetCallSessionParticipantStatsDetailsResponse ΒΆ

type GetCallSessionParticipantStatsDetailsResponse struct {
	CallID        string `json:"call_id"`
	CallSessionID string `json:"call_session_id"`
	CallType      string `json:"call_type"`
	// Duration of the request in milliseconds
	Duration      string                            `json:"duration"`
	UserID        string                            `json:"user_id"`
	UserSessionID string                            `json:"user_session_id"`
	Publisher     *ParticipantSeriesPublisherStats  `json:"publisher,omitempty"`
	Subscriber    *ParticipantSeriesSubscriberStats `json:"subscriber,omitempty"`
	Timeframe     *ParticipantSeriesTimeframe       `json:"timeframe,omitempty"`
	User          *ParticipantSeriesUserStats       `json:"user,omitempty"`
}

Basic response information

type GetCallSessionParticipantStatsTimelineRequest ΒΆ

type GetCallSessionParticipantStatsTimelineRequest struct {
	StartTime *string  `json:"-" query:"start_time"`
	EndTime   *string  `json:"-" query:"end_time"`
	Severity  []string `json:"-" query:"severity"`
}

type GetCallStatsMapRequest ΒΆ

type GetCallStatsMapRequest struct {
	StartTime          *Timestamp `json:"-" query:"start_time"`
	EndTime            *Timestamp `json:"-" query:"end_time"`
	ExcludePublishers  *bool      `json:"-" query:"exclude_publishers"`
	ExcludeSubscribers *bool      `json:"-" query:"exclude_subscribers"`
	ExcludeSfus        *bool      `json:"-" query:"exclude_sfus"`
}

type GetCallTypeRequest ΒΆ

type GetCallTypeRequest struct {
}

type GetCallTypeResponse ΒΆ

type GetCallTypeResponse struct {
	CreatedAt            Timestamp                    `json:"created_at"`
	Duration             string                       `json:"duration"`
	Name                 string                       `json:"name"`
	UpdatedAt            Timestamp                    `json:"updated_at"`
	Grants               map[string][]string          `json:"grants"`
	NotificationSettings NotificationSettingsResponse `json:"notification_settings"`
	Settings             CallSettingsResponse         `json:"settings"`
	ExternalStorage      *string                      `json:"external_storage,omitempty"`
}

type GetCampaignRequest ΒΆ

type GetCampaignRequest struct {
	Prev  *string `json:"-" query:"prev"`
	Next  *string `json:"-" query:"next"`
	Limit *int    `json:"-" query:"limit"`
}

type GetCampaignResponse ΒΆ

type GetCampaignResponse struct {
	// Duration of the request in milliseconds
	Duration string            `json:"duration"`
	Campaign *CampaignResponse `json:"campaign,omitempty"`
	Users    *PagerResponse    `json:"users,omitempty"`
}

Basic response information

type GetChannelRequest ΒΆ

type GetChannelRequest struct {
	State            *bool   `json:"-" query:"state"`
	MessagesLimit    *int    `json:"-" query:"messages_limit"`
	MembersLimit     *int    `json:"-" query:"members_limit"`
	WatchersLimit    *int    `json:"-" query:"watchers_limit"`
	MessagesIDLt     *string `json:"-" query:"messages_id_lt"`
	MessagesIDLte    *string `json:"-" query:"messages_id_lte"`
	MessagesIDGt     *string `json:"-" query:"messages_id_gt"`
	MessagesIDGte    *string `json:"-" query:"messages_id_gte"`
	MessagesIDAround *string `json:"-" query:"messages_id_around"`
	UserID           *string `json:"-" query:"user_id"`
}

type GetChannelTypeRequest ΒΆ

type GetChannelTypeRequest struct {
}

type GetChannelTypeResponse ΒΆ

type GetChannelTypeResponse struct {
	Automod         string    `json:"automod"`
	AutomodBehavior string    `json:"automod_behavior"`
	ConnectEvents   bool      `json:"connect_events"`
	CountMessages   bool      `json:"count_messages"`
	CreatedAt       Timestamp `json:"created_at"`
	CustomEvents    bool      `json:"custom_events"`
	DeliveryEvents  bool      `json:"delivery_events"`
	// Duration of the request in milliseconds
	Duration                       string              `json:"duration"`
	MarkMessagesPending            bool                `json:"mark_messages_pending"`
	MaxMessageLength               int                 `json:"max_message_length"`
	Mutes                          bool                `json:"mutes"`
	Name                           string              `json:"name"`
	Polls                          bool                `json:"polls"`
	PushNotifications              bool                `json:"push_notifications"`
	Quotes                         bool                `json:"quotes"`
	Reactions                      bool                `json:"reactions"`
	ReadEvents                     bool                `json:"read_events"`
	Reminders                      bool                `json:"reminders"`
	Replies                        bool                `json:"replies"`
	Search                         bool                `json:"search"`
	SharedLocations                bool                `json:"shared_locations"`
	SkipLastMsgUpdateForSystemMsgs bool                `json:"skip_last_msg_update_for_system_msgs"`
	TypingEvents                   bool                `json:"typing_events"`
	UpdatedAt                      Timestamp           `json:"updated_at"`
	Uploads                        bool                `json:"uploads"`
	UrlEnrichment                  bool                `json:"url_enrichment"`
	UserMessageReminders           bool                `json:"user_message_reminders"`
	Commands                       []Command           `json:"commands"`
	Permissions                    []PolicyRequest     `json:"permissions"`
	Grants                         map[string][]string `json:"grants"`
	Blocklist                      *string             `json:"blocklist,omitempty"`
	BlocklistBehavior              *string             `json:"blocklist_behavior,omitempty"`
	PartitionSize                  *int                `json:"partition_size,omitempty"`
	PartitionTtl                   *string             `json:"partition_ttl,omitempty"`
	PushLevel                      *string             `json:"push_level,omitempty"`
	AllowedFlagReasons             []string            `json:"allowed_flag_reasons,omitempty"`
	Blocklists                     []BlockListOptions  `json:"blocklists,omitempty"`
	// Sets thresholds for AI moderation
	AutomodThresholds *Thresholds      `json:"automod_thresholds,omitempty"`
	ChatPreferences   *ChatPreferences `json:"chat_preferences,omitempty"`
}

Basic response information

type GetCommandRequest ΒΆ

type GetCommandRequest struct {
}

type GetCommandResponse ΒΆ

type GetCommandResponse struct {
	Args        string     `json:"args"`
	Description string     `json:"description"`
	Duration    string     `json:"duration"`
	Name        string     `json:"name"`
	Set         string     `json:"set"`
	CreatedAt   *Timestamp `json:"created_at,omitempty"`
	UpdatedAt   *Timestamp `json:"updated_at,omitempty"`
}

type GetCommentRepliesRequest ΒΆ

type GetCommentRepliesRequest struct {
	Depth         *int    `json:"-" query:"depth"`
	Sort          *string `json:"-" query:"sort"`
	RepliesLimit  *int    `json:"-" query:"replies_limit"`
	IDAround      *string `json:"-" query:"id_around"`
	Language      *string `json:"-" query:"language"`
	TranslateText *bool   `json:"-" query:"translate_text"`
	UserID        *string `json:"-" query:"user_id"`
	Limit         *int    `json:"-" query:"limit"`
	Prev          *string `json:"-" query:"prev"`
	Next          *string `json:"-" query:"next"`
}

type GetCommentRepliesResponse ΒΆ

type GetCommentRepliesResponse struct {
	Duration string `json:"duration"`
	// Sort order used for the replies (first, last, top, best, controversial)
	Sort string `json:"sort"`
	// Threaded listing of replies to the comment
	Comments []ThreadedCommentResponse `json:"comments"`
	Next     *string                   `json:"next,omitempty"`
	Prev     *string                   `json:"prev,omitempty"`
}

type GetCommentRequest ΒΆ

type GetCommentRequest struct {
	UserID        *string `json:"-" query:"user_id"`
	Language      *string `json:"-" query:"language"`
	TranslateText *bool   `json:"-" query:"translate_text"`
}

type GetCommentResponse ΒΆ

type GetCommentResponse struct {
	Duration string          `json:"duration"`
	Comment  CommentResponse `json:"comment"`
}

type GetCommentsRequest ΒΆ

type GetCommentsRequest struct {
	ObjectID      string  `json:"-" query:"object_id"`
	ObjectType    string  `json:"-" query:"object_type"`
	Depth         *int    `json:"-" query:"depth"`
	Sort          *string `json:"-" query:"sort"`
	RepliesLimit  *int    `json:"-" query:"replies_limit"`
	IDAround      *string `json:"-" query:"id_around"`
	Language      *string `json:"-" query:"language"`
	TranslateText *bool   `json:"-" query:"translate_text"`
	UserID        *string `json:"-" query:"user_id"`
	Limit         *int    `json:"-" query:"limit"`
	Prev          *string `json:"-" query:"prev"`
	Next          *string `json:"-" query:"next"`
}

type GetCommentsResponse ΒΆ

type GetCommentsResponse struct {
	Duration string `json:"duration"`
	// Sort order used for the comments (first, last, top, best, controversial)
	Sort string `json:"sort"`
	// Threaded listing for the activity
	Comments []ThreadedCommentResponse `json:"comments"`
	Next     *string                   `json:"next,omitempty"`
	Prev     *string                   `json:"prev,omitempty"`
}

type GetConfigRequest ΒΆ

type GetConfigRequest struct {
	Team *string `json:"-" query:"team"`
}

type GetConfigResponse ΒΆ

type GetConfigResponse struct {
	Duration string          `json:"duration"`
	Config   *ConfigResponse `json:"config,omitempty"`
}

type GetCustomPermissionResponse ΒΆ

type GetCustomPermissionResponse struct {
	// Duration of the request in milliseconds
	Duration   string     `json:"duration"`
	Permission Permission `json:"permission"`
}

Basic response information

type GetDailyDigestRequest ΒΆ added in v5.3.0

type GetDailyDigestRequest struct {
	Date  *string `json:"-" query:"date"`
	AppID *string `json:"-" query:"app_id"`
}

type GetDailyDigestResponse ΒΆ added in v5.3.0

type GetDailyDigestResponse struct {
	Date string `json:"date"`
	// Duration of the request in milliseconds
	Duration        string                          `json:"duration"`
	Status          string                          `json:"status"`
	GeneratedAt     *string                         `json:"generated_at,omitempty"`
	RetryAfter      *int                            `json:"retry_after,omitempty"`
	Revision        *int                            `json:"revision,omitempty"`
	SchemaVersion   *string                         `json:"schema_version,omitempty"`
	Broadcasts      []BroadcastDigest               `json:"broadcasts,omitempty"`
	CallSessions    []DailyDigestCallSessionSummary `json:"call_sessions,omitempty"`
	DigestKinds     []string                        `json:"digest_kinds,omitempty"`
	BroadcastRollup *BroadcastDailyRollup           `json:"broadcast_rollup,omitempty"`
}

Basic response information

type GetDraftRequest ΒΆ

type GetDraftRequest struct {
	ParentID *string `json:"-" query:"parent_id"`
	UserID   *string `json:"-" query:"user_id"`
}

type GetDraftResponse ΒΆ

type GetDraftResponse struct {
	// Duration of the request in milliseconds
	Duration string        `json:"duration"`
	Draft    DraftResponse `json:"draft"`
}

Basic response information

type GetEdgesRequest ΒΆ

type GetEdgesRequest struct {
}

type GetEdgesResponse ΒΆ

type GetEdgesResponse struct {
	// Duration of the request in milliseconds
	Duration string         `json:"duration"`
	Edges    []EdgeResponse `json:"edges"`
}

Basic response information

type GetExternalStorageAWSS3Response ΒΆ

type GetExternalStorageAWSS3Response struct {
	Bucket     string  `json:"bucket"`
	Region     string  `json:"region"`
	RoleArn    string  `json:"role_arn"`
	PathPrefix *string `json:"path_prefix,omitempty"`
}

type GetExternalStorageGCSResponse ΒΆ added in v5.3.0

type GetExternalStorageGCSResponse struct {
	Bucket         string  `json:"bucket"`
	CredentialsSet bool    `json:"credentials_set"`
	PathPrefix     *string `json:"path_prefix,omitempty"`
}

type GetExternalStorageResponse ΒΆ

type GetExternalStorageResponse struct {
	CreatedAt Timestamp `json:"created_at"`
	// Duration of the request in milliseconds
	Duration  string                           `json:"duration"`
	UpdatedAt Timestamp                        `json:"updated_at"`
	Type      string                           `json:"type"`
	AWSS3     *GetExternalStorageAWSS3Response `json:"aws_s3,omitempty"`
	Gcs       *GetExternalStorageGCSResponse   `json:"gcs,omitempty"`
}

Basic response information

type GetFeedGroupRequest ΒΆ

type GetFeedGroupRequest struct {
	IncludeSoftDeleted *bool `json:"-" query:"include_soft_deleted"`
}

type GetFeedGroupResponse ΒΆ

type GetFeedGroupResponse struct {
	Duration  string            `json:"duration"`
	FeedGroup FeedGroupResponse `json:"feed_group"`
}

type GetFeedViewRequest ΒΆ

type GetFeedViewRequest struct {
}

type GetFeedViewResponse ΒΆ

type GetFeedViewResponse struct {
	Duration string           `json:"duration"`
	FeedView FeedViewResponse `json:"feed_view"`
}

type GetFeedVisibilityRequest ΒΆ

type GetFeedVisibilityRequest struct {
}

type GetFeedVisibilityResponse ΒΆ

type GetFeedVisibilityResponse struct {
	Duration       string                 `json:"duration"`
	FeedVisibility FeedVisibilityResponse `json:"feed_visibility"`
}

type GetFeedsRateLimitsRequest ΒΆ

type GetFeedsRateLimitsRequest struct {
	Endpoints  *string `json:"-" query:"endpoints"`
	Android    *bool   `json:"-" query:"android"`
	Ios        *bool   `json:"-" query:"ios"`
	Web        *bool   `json:"-" query:"web"`
	Unity      *bool   `json:"-" query:"unity"`
	ServerSide *bool   `json:"-" query:"server_side"`
}

type GetFeedsRateLimitsResponse ΒΆ

type GetFeedsRateLimitsResponse struct {
	Duration string `json:"duration"`
	// Rate limits for Android platform (endpoint name -> limit info)
	Android map[string]LimitInfoResponse `json:"android,omitempty"`
	// Rate limits for iOS platform (endpoint name -> limit info)
	Ios map[string]LimitInfoResponse `json:"ios,omitempty"`
	// Rate limits for server-side platform (endpoint name -> limit info)
	ServerSide map[string]LimitInfoResponse `json:"server_side,omitempty"`
	// Rate limits for Unity platform (endpoint name -> limit info)
	Unity map[string]LimitInfoResponse `json:"unity,omitempty"`
	// Rate limits for Web platform (endpoint name -> limit info)
	Web map[string]LimitInfoResponse `json:"web,omitempty"`
}

type GetFlagCountRequest ΒΆ

type GetFlagCountRequest struct {
	// ID of the user whose content was flagged
	EntityCreatorID string `json:"entity_creator_id"`
	// Optional entity type filter (e.g., stream:chat:v1:message, stream:user)
	EntityType *string `json:"entity_type,omitempty"`
}

type GetFlagCountResponse ΒΆ

type GetFlagCountResponse struct {
	// Total number of flags against the specified user's content
	Count    int    `json:"count"`
	Duration string `json:"duration"`
}

type GetFollowSuggestionsRequest ΒΆ

type GetFollowSuggestionsRequest struct {
	Limit  *int    `json:"-" query:"limit"`
	UserID *string `json:"-" query:"user_id"`
}

type GetFollowSuggestionsResponse ΒΆ

type GetFollowSuggestionsResponse struct {
	Duration string `json:"duration"`
	// List of suggested feeds to follow
	Suggestions   []FeedSuggestionResponse `json:"suggestions"`
	AlgorithmUsed *string                  `json:"algorithm_used,omitempty"`
}

type GetImportRequest ΒΆ

type GetImportRequest struct {
}

type GetImportResponse ΒΆ

type GetImportResponse struct {
	// Duration of the request in milliseconds
	Duration   string      `json:"duration"`
	ImportTask *ImportTask `json:"import_task,omitempty"`
}

Basic response information

type GetImportV2TaskRequest ΒΆ

type GetImportV2TaskRequest struct {
}

type GetImportV2TaskResponse ΒΆ

type GetImportV2TaskResponse struct {
	AppPk     int       `json:"app_pk"`
	CreatedAt Timestamp `json:"created_at"`
	// Duration of the request in milliseconds
	Duration  string               `json:"duration"`
	ID        string               `json:"id"`
	Product   string               `json:"product"`
	State     int                  `json:"state"`
	UpdatedAt Timestamp            `json:"updated_at"`
	Settings  ImportV2TaskSettings `json:"settings"`
	Result    map[string]any       `json:"result,omitempty"`
}

Basic response information

type GetImporterExternalStorageRequest ΒΆ

type GetImporterExternalStorageRequest struct {
}

type GetManyMessagesRequest ΒΆ

type GetManyMessagesRequest struct {
	Ids                 []string `json:"-" query:"ids"`
	MemberCustomInclude []string `json:"-" query:"member_custom_include"`
}

type GetManyMessagesResponse ΒΆ

type GetManyMessagesResponse struct {
	Duration string `json:"duration"`
	// List of messages
	Messages []MessageResponse `json:"messages"`
}

type GetMessageRequest ΒΆ

type GetMessageRequest struct {
	ShowDeletedMessage *bool `json:"-" query:"show_deleted_message"`
}

type GetMessageResponse ΒΆ

type GetMessageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message                MessageWithChannelResponse `json:"message"`
	PendingMessageMetadata map[string]string          `json:"pending_message_metadata,omitempty"`
}

Basic response information

type GetModerationRuleRequest ΒΆ

type GetModerationRuleRequest struct {
}

type GetModerationRuleResponse ΒΆ

type GetModerationRuleResponse struct {
	// Duration of the request in milliseconds
	Duration string                    `json:"duration"`
	Rule     *ModerationRuleV2Response `json:"rule,omitempty"`
}

Basic response information

type GetOGRequest ΒΆ

type GetOGRequest struct {
	Url string `json:"-" query:"url"`
}

type GetOGResponse ΒΆ

type GetOGResponse struct {
	Duration string         `json:"duration"`
	Custom   map[string]any `json:"custom"`
	// URL of detected video or audio
	AssetUrl   *string `json:"asset_url,omitempty"`
	AuthorIcon *string `json:"author_icon,omitempty"`
	// og:site
	AuthorLink *string `json:"author_link,omitempty"`
	// og:site_name
	AuthorName *string `json:"author_name,omitempty"`
	Color      *string `json:"color,omitempty"`
	Fallback   *string `json:"fallback,omitempty"`
	Footer     *string `json:"footer,omitempty"`
	FooterIcon *string `json:"footer_icon,omitempty"`
	// URL of detected image
	ImageUrl *string `json:"image_url,omitempty"`
	// extracted url from the text
	OGScrapeUrl    *string `json:"og_scrape_url,omitempty"`
	OriginalHeight *int    `json:"original_height,omitempty"`
	OriginalWidth  *int    `json:"original_width,omitempty"`
	Pretext        *string `json:"pretext,omitempty"`
	// og:description
	Text *string `json:"text,omitempty"`
	// URL of detected thumb image
	ThumbUrl *string `json:"thumb_url,omitempty"`
	// og:title
	Title *string `json:"title,omitempty"`
	// og:url
	TitleLink *string `json:"title_link,omitempty"`
	// Attachment type, could be empty, image, audio or video
	Type    *string  `json:"type,omitempty"`
	Actions []Action `json:"actions,omitempty"`
	Fields  []Field  `json:"fields,omitempty"`
	Giphy   *Images  `json:"giphy,omitempty"`
}

type GetOrCreateCallRequest ΒΆ

type GetOrCreateCallRequest struct {
	MembersLimit *int `json:"members_limit,omitempty"`
	// if provided it sends a notification event to the members for this call
	Notify *bool `json:"notify,omitempty"`
	// if provided it sends a ring event to the members for this call
	Ring  *bool `json:"ring,omitempty"`
	Video *bool `json:"video,omitempty"`
	// CallRequest is the payload for creating a call.
	Data *CallRequest `json:"data,omitempty"`
}

type GetOrCreateCallResponse ΒΆ

type GetOrCreateCallResponse struct {
	Created         bool             `json:"created"`
	Duration        string           `json:"duration"`
	Members         []MemberResponse `json:"members"`
	OwnCapabilities []OwnCapability  `json:"own_capabilities"`
	// Represents a call
	Call CallResponse `json:"call"`
}

type GetOrCreateChannelRequest ΒΆ

type GetOrCreateChannelRequest struct {
	// Whether this channel will be hidden for the user who created the channel or not
	HideForCreator *bool `json:"hide_for_creator,omitempty"`
	// Refresh channel state
	State              *bool `json:"state,omitempty"`
	ThreadUnreadCounts *bool `json:"thread_unread_counts,omitempty"`
	// Top-level keys of the message sender's channel-member custom data to include under member.custom (max 8 keys, 64 chars each)
	MemberCustomInclude []string                 `json:"member_custom_include"`
	Data                *ChannelInput            `json:"data,omitempty"`
	Members             *PaginationParams        `json:"members,omitempty"`
	Messages            *MessagePaginationParams `json:"messages,omitempty"`
	Watchers            *PaginationParams        `json:"watchers,omitempty"`
}

type GetOrCreateDistinctChannelRequest ΒΆ

type GetOrCreateDistinctChannelRequest struct {
	// Whether this channel will be hidden for the user who created the channel or not
	HideForCreator *bool `json:"hide_for_creator,omitempty"`
	// Refresh channel state
	State              *bool `json:"state,omitempty"`
	ThreadUnreadCounts *bool `json:"thread_unread_counts,omitempty"`
	// Top-level keys of the message sender's channel-member custom data to include under member.custom (max 8 keys, 64 chars each)
	MemberCustomInclude []string                 `json:"member_custom_include"`
	Data                *ChannelInput            `json:"data,omitempty"`
	Members             *PaginationParams        `json:"members,omitempty"`
	Messages            *MessagePaginationParams `json:"messages,omitempty"`
	Watchers            *PaginationParams        `json:"watchers,omitempty"`
}

type GetOrCreateFeedGroupRequest ΒΆ

type GetOrCreateFeedGroupRequest struct {
	// Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'private'. Defaults to 'visible' if not provided.
	DefaultVisibility *string `json:"default_visibility,omitempty"`
	// Configuration for activity processors
	ActivityProcessors []ActivityProcessorConfig `json:"activity_processors"`
	// Configuration for activity selectors
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	ActivityFilter    *ActivityFilterConfig    `json:"activity_filter,omitempty"`
	Aggregation       *AggregationConfig       `json:"aggregation,omitempty"`
	// Custom data for the feed group
	Custom           map[string]any          `json:"custom"`
	Notification     *NotificationConfig     `json:"notification,omitempty"`
	PushNotification *PushNotificationConfig `json:"push_notification,omitempty"`
	Ranking          *RankingConfig          `json:"ranking,omitempty"`
	Stories          *StoriesConfig          `json:"stories,omitempty"`
}

type GetOrCreateFeedGroupResponse ΒΆ

type GetOrCreateFeedGroupResponse struct {
	Duration string `json:"duration"`
	// Indicates whether the feed group was created (true) or already existed (false)
	WasCreated bool              `json:"was_created"`
	FeedGroup  FeedGroupResponse `json:"feed_group"`
}

type GetOrCreateFeedRequest ΒΆ

type GetOrCreateFeedRequest struct {
	Language                 *string    `json:"-" query:"language"`
	TranslateText            *bool      `json:"-" query:"translate_text"`
	IDAround                 *string    `json:"id_around,omitempty"`
	Limit                    *int       `json:"limit,omitempty"`
	Next                     *string    `json:"next,omitempty"`
	OverwriteInterestWeights *bool      `json:"overwrite_interest_weights,omitempty"`
	Prev                     *string    `json:"prev,omitempty"`
	UserID                   *string    `json:"user_id,omitempty"`
	View                     *string    `json:"view,omitempty"`
	Watch                    *bool      `json:"watch,omitempty"`
	Data                     *FeedInput `json:"data,omitempty"`
	// Options to skip specific enrichments to improve performance. Default is false (enrichments are included). Setting a field to true skips that enrichment.
	EnrichmentOptions   *EnrichmentOptions `json:"enrichment_options,omitempty"`
	ExternalRanking     map[string]any     `json:"external_ranking"`
	Filter              map[string]any     `json:"filter"`
	FollowersPagination *PagerRequest      `json:"followers_pagination,omitempty"`
	FollowingPagination *PagerRequest      `json:"following_pagination,omitempty"`
	// Options to control fetching reactions from friends (users you follow or have mutual follows with).
	FriendReactionsOptions *FriendReactionsOptions `json:"friend_reactions_options,omitempty"`
	InterestWeights        map[string]float64      `json:"interest_weights"`
	MemberPagination       *PagerRequest           `json:"member_pagination,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type GetOrCreateFeedResponse ΒΆ

type GetOrCreateFeedResponse struct {
	Created bool `json:"created"`
	// Duration of the request in milliseconds
	Duration             string                       `json:"duration"`
	Activities           []ActivityResponse           `json:"activities"`
	AggregatedActivities []AggregatedActivityResponse `json:"aggregated_activities"`
	Followers            []FollowResponse             `json:"followers"`
	Following            []FollowResponse             `json:"following"`
	Members              []FeedMemberResponse         `json:"members"`
	PinnedActivities     []ActivityPinResponse        `json:"pinned_activities"`
	Feed                 FeedResponse                 `json:"feed"`
	Next                 *string                      `json:"next,omitempty"`
	Prev                 *string                      `json:"prev,omitempty"`
	FollowersPagination  *PagerResponse               `json:"followers_pagination,omitempty"`
	FollowingPagination  *PagerResponse               `json:"following_pagination,omitempty"`
	MemberPagination     *PagerResponse               `json:"member_pagination,omitempty"`
	NotificationStatus   *NotificationStatusResponse  `json:"notification_status,omitempty"`
}

Basic response information

type GetOrCreateFeedViewRequest ΒΆ

type GetOrCreateFeedViewRequest struct {
	// Configuration for selecting activities
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	Aggregation       *AggregationConfig       `json:"aggregation,omitempty"`
	Ranking           *RankingConfig           `json:"ranking,omitempty"`
}

type GetOrCreateFeedViewResponse ΒΆ

type GetOrCreateFeedViewResponse struct {
	Duration string `json:"duration"`
	// Indicates whether the feed view was newly created (true) or already existed (false)
	WasCreated bool             `json:"was_created"`
	FeedView   FeedViewResponse `json:"feed_view"`
}

type GetOrCreateFollowRequest ΒΆ

type GetOrCreateFollowRequest struct {
	// Fully qualified ID of the source feed
	Source string `json:"source"`
	// Fully qualified ID of the target feed
	Target string `json:"target"`
	// Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.
	ActivityCopyLimit *int `json:"activity_copy_limit,omitempty"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create a notification activity for this follow
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	// If true, auto-creates users referenced by the source and target FIDs when they don't already exist. Server-side only. Defaults to false. Use directly on single follow endpoints (Follow, GetOrCreateFollow). On batch endpoints (FollowBatch, GetOrCreateFollows), use the top-level create_users field; per-item follows[i].create_users is rejected.
	CreateUsers *bool `json:"create_users,omitempty"`
	// If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
	// Push preference for the follow relationship
	PushPreference *string `json:"push_preference,omitempty"`
	// Whether to skip push for this follow
	SkipPush *bool `json:"skip_push,omitempty"`
	// Status of the follow relationship. One of: accepted, pending, rejected
	Status *string `json:"status,omitempty"`
	// Custom data for the follow relationship
	Custom map[string]any `json:"custom"`
}

type GetOrCreateFollowResponse ΒΆ

type GetOrCreateFollowResponse struct {
	// True if the follow was newly created by this request; false if it already existed
	Created  bool           `json:"created"`
	Duration string         `json:"duration"`
	Follow   FollowResponse `json:"follow"`
	// Whether a notification activity was successfully created (only set when the follow was newly created)
	NotificationCreated *bool `json:"notification_created,omitempty"`
}

type GetOrCreateFollowsRequest ΒΆ

type GetOrCreateFollowsRequest struct {
	// List of follow relationships to create
	Follows []FollowRequest `json:"follows"`
	// 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.
	CreateUsers *bool `json:"create_users,omitempty"`
	// If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
}

type GetOrCreateUnfollowRequest ΒΆ

type GetOrCreateUnfollowRequest struct {
	// Fully qualified ID of the source feed
	Source string `json:"source"`
	// Fully qualified ID of the target feed
	Target string `json:"target"`
	// Whether to delete the corresponding notification activity (default: false)
	DeleteNotificationActivity *bool `json:"delete_notification_activity,omitempty"`
	// If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
	// When true, activities from the unfollowed feed will remain in the source feed's timeline (default: false)
	KeepHistory *bool `json:"keep_history,omitempty"`
}

type GetOrCreateUnfollowResponse ΒΆ

type GetOrCreateUnfollowResponse struct {
	// True if a follow was found and removed by this request; false if no follow existed
	Deleted  bool            `json:"deleted"`
	Duration string          `json:"duration"`
	Follow   *FollowResponse `json:"follow,omitempty"`
}

type GetOrCreateUnfollowsRequest ΒΆ

type GetOrCreateUnfollowsRequest struct {
	// List of follow relationships to remove, each with optional keep_history
	Follows []UnfollowPair `json:"follows"`
	// Whether to delete the corresponding notification activity (default: false)
	DeleteNotificationActivity *bool `json:"delete_notification_activity,omitempty"`
	// If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
}

type GetPermissionRequest ΒΆ

type GetPermissionRequest struct {
}

type GetPolicyTestRunRequest ΒΆ added in v5.3.0

type GetPolicyTestRunRequest struct {
}

type GetPolicyTestSetRequest ΒΆ added in v5.3.0

type GetPolicyTestSetRequest struct {
}

type GetPollOptionRequest ΒΆ

type GetPollOptionRequest struct {
}

type GetPollRequest ΒΆ

type GetPollRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type GetPushTemplatesRequest ΒΆ

type GetPushTemplatesRequest struct {
	PushProviderType string  `json:"-" query:"push_provider_type"`
	PushProviderName *string `json:"-" query:"push_provider_name"`
}

type GetPushTemplatesResponse ΒΆ

type GetPushTemplatesResponse struct {
	// Duration of the request in milliseconds
	Duration  string                 `json:"duration"`
	Templates []PushTemplateResponse `json:"templates"`
}

Basic response information

type GetQueueRequest ΒΆ

type GetQueueRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type GetRateLimitsRequest ΒΆ

type GetRateLimitsRequest struct {
	ServerSide *bool   `json:"-" query:"server_side"`
	Android    *bool   `json:"-" query:"android"`
	Ios        *bool   `json:"-" query:"ios"`
	Web        *bool   `json:"-" query:"web"`
	Unity      *bool   `json:"-" query:"unity"`
	Endpoints  *string `json:"-" query:"endpoints"`
}

type GetRateLimitsResponse ΒΆ

type GetRateLimitsResponse struct {
	Duration string `json:"duration"`
	// Map of endpoint rate limits for the Android platform
	Android map[string]LimitInfoResponse `json:"android,omitempty"`
	// Map of endpoint rate limits for the iOS platform
	Ios map[string]LimitInfoResponse `json:"ios,omitempty"`
	// Map of endpoint rate limits for the server-side platform
	ServerSide map[string]LimitInfoResponse `json:"server_side,omitempty"`
	// Map of endpoint rate limits for the Unity platform
	Unity map[string]LimitInfoResponse `json:"unity,omitempty"`
	// Map of endpoint rate limits for the web platform
	Web map[string]LimitInfoResponse `json:"web,omitempty"`
}

type GetReactionsRequest ΒΆ

type GetReactionsRequest struct {
	Limit  *int `json:"-" query:"limit"`
	Offset *int `json:"-" query:"offset"`
}

type GetReactionsResponse ΒΆ

type GetReactionsResponse struct {
	Duration string `json:"duration"`
	// List of reactions
	Reactions []ReactionResponse `json:"reactions"`
}

type GetRepliesRequest ΒΆ

type GetRepliesRequest struct {
	Limit               *int               `json:"-" query:"limit"`
	IDGte               *string            `json:"-" query:"id_gte"`
	IDGt                *string            `json:"-" query:"id_gt"`
	IDLte               *string            `json:"-" query:"id_lte"`
	IDLt                *string            `json:"-" query:"id_lt"`
	IDAround            *string            `json:"-" query:"id_around"`
	Sort                []SortParamRequest `json:"-" query:"sort"`
	MemberCustomInclude []string           `json:"-" query:"member_custom_include"`
}

type GetRepliesResponse ΒΆ

type GetRepliesResponse struct {
	// Duration of the request in milliseconds
	Duration string            `json:"duration"`
	Messages []MessageResponse `json:"messages"`
}

Basic response information

type GetRetentionPolicyRequest ΒΆ

type GetRetentionPolicyRequest struct {
}

type GetRetentionPolicyResponse ΒΆ

type GetRetentionPolicyResponse struct {
	// Duration of the request in milliseconds
	Duration string            `json:"duration"`
	Policies []RetentionPolicy `json:"policies"`
}

Basic response information

type GetRetentionPolicyRunsRequest ΒΆ

type GetRetentionPolicyRunsRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
}

type GetRetentionPolicyRunsResponse ΒΆ

type GetRetentionPolicyRunsResponse struct {
	// Duration of the request in milliseconds
	Duration string                 `json:"duration"`
	Runs     []RetentionRunResponse `json:"runs"`
	Next     *string                `json:"next,omitempty"`
	Prev     *string                `json:"prev,omitempty"`
}

Basic response information

type GetReviewQueueItemRequest ΒΆ

type GetReviewQueueItemRequest struct {
}

type GetReviewQueueItemResponse ΒΆ

type GetReviewQueueItemResponse struct {
	Duration string                   `json:"duration"`
	Item     *ReviewQueueItemResponse `json:"item,omitempty"`
}

type GetSegmentRequest ΒΆ

type GetSegmentRequest struct {
}

type GetSegmentResponse ΒΆ

type GetSegmentResponse struct {
	// Duration of the request in milliseconds
	Duration string           `json:"duration"`
	Segment  *SegmentResponse `json:"segment,omitempty"`
}

type GetSetupSessionRequest ΒΆ

type GetSetupSessionRequest struct {
}

type GetSetupSessionResponse ΒΆ

type GetSetupSessionResponse struct {
	Duration     string        `json:"duration"`
	SetupSession *SetupSession `json:"setup_session,omitempty"`
}

type GetTaskRequest ΒΆ

type GetTaskRequest struct {
}

type GetTaskResponse ΒΆ

type GetTaskResponse struct {
	CreatedAt Timestamp `json:"created_at"`
	Duration  string    `json:"duration"`
	// Current status of task
	Status string `json:"status"`
	// ID of task
	TaskID    string       `json:"task_id"`
	UpdatedAt Timestamp    `json:"updated_at"`
	Error     *ErrorResult `json:"error,omitempty"`
	// Result produced by task after completion
	Result map[string]any `json:"result,omitempty"`
}

type GetThreadRequest ΒΆ

type GetThreadRequest struct {
	ReplyLimit       *int `json:"-" query:"reply_limit"`
	ParticipantLimit *int `json:"-" query:"participant_limit"`
	MemberLimit      *int `json:"-" query:"member_limit"`
}

type GetThreadResponse ΒΆ

type GetThreadResponse struct {
	Duration string              `json:"duration"`
	Thread   ThreadStateResponse `json:"thread"`
}

type GetUserGroupRequest ΒΆ

type GetUserGroupRequest struct {
	TeamID *string `json:"-" query:"team_id"`
}

type GetUserGroupResponse ΒΆ

type GetUserGroupResponse struct {
	Duration  string             `json:"duration"`
	UserGroup *UserGroupResponse `json:"user_group,omitempty"`
}

Response for getting a user group

type GetUserInterestsRequest ΒΆ

type GetUserInterestsRequest struct {
	Limit *int `json:"-" query:"limit"`
}

type GetUserInterestsResponse ΒΆ

type GetUserInterestsResponse struct {
	Duration string `json:"duration"`
	// Top-N interest tags sorted by descending count, then alphabetically by tag
	Interests []InterestTagResponse `json:"interests"`
}

User's computed interest tags ordered by descending count, then ascending tag name

type GetUserLiveLocationsRequest ΒΆ

type GetUserLiveLocationsRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type GoLiveRequest ΒΆ

type GoLiveRequest struct {
	RecordingStorageName     *string `json:"recording_storage_name,omitempty"`
	StartClosedCaption       *bool   `json:"start_closed_caption,omitempty"`
	StartCompositeRecording  *bool   `json:"start_composite_recording,omitempty"`
	StartHLS                 *bool   `json:"start_hls,omitempty"`
	StartIndividualRecording *bool   `json:"start_individual_recording,omitempty"`
	StartRawRecording        *bool   `json:"start_raw_recording,omitempty"`
	StartRecording           *bool   `json:"start_recording,omitempty"`
	StartTranscription       *bool   `json:"start_transcription,omitempty"`
	TranscriptionStorageName *string `json:"transcription_storage_name,omitempty"`
}

type GoLiveResponse ΒΆ

type GoLiveResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents a call
	Call CallResponse `json:"call"`
}

Basic response information

type GoogleVisionConfig ΒΆ

type GoogleVisionConfig struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type GroupedChannelsBucket ΒΆ

type GroupedChannelsBucket struct {
	// Channels returned for this bucket
	Channels []ChannelStateResponseFields `json:"channels"`
	// Cursor for the next page of this group
	Next *string `json:"next,omitempty"`
	// Cursor for the previous page of this group
	Prev *string `json:"prev,omitempty"`
	// Unread channels currently classified into this bucket
	UnreadChannels *int `json:"unread_channels,omitempty"`
}

type GroupedChannelsGroupRequest ΒΆ

type GroupedChannelsGroupRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
}

type GroupedQueryChannelsRequest ΒΆ

type GroupedQueryChannelsRequest struct {
	// Default max channels per group (default 10)
	Limit  *int    `json:"limit,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Groups to return, keyed by group name. Each group can define limit, next, or prev. 'next' and 'prev' cursors are only allowed when the request contains exactly one group; multi-group pagination is rejected.
	Groups map[string]GroupedChannelsGroupRequest `json:"groups"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type GroupedQueryChannelsResponse ΒΆ

type GroupedQueryChannelsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Predefined channel groups keyed by group name
	Groups map[string]GroupedChannelsBucket `json:"groups"`
}

type GroupedStatsResponse ΒΆ

type GroupedStatsResponse struct {
	Name   string `json:"name"`
	Unique int    `json:"unique"`
}

type HLSSettings ΒΆ

type HLSSettings struct {
	AutoOn        bool            `json:"auto_on"`
	Enabled       bool            `json:"enabled"`
	QualityTracks []string        `json:"quality_tracks"`
	Layout        *LayoutSettings `json:"layout,omitempty"`
}

type HLSSettingsRequest ΒΆ

type HLSSettingsRequest struct {
	// Quality tracks for HLS. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560
	QualityTracks []string `json:"quality_tracks"`
	// Whether HLS broadcasting should start automatically
	AutoOn *bool `json:"auto_on,omitempty"`
	// Whether HLS broadcasting is enabled
	Enabled *bool                  `json:"enabled,omitempty"`
	Layout  *LayoutSettingsRequest `json:"layout,omitempty"`
}

type HLSSettingsResponse ΒΆ

type HLSSettingsResponse struct {
	AutoOn        bool                   `json:"auto_on"`
	Enabled       bool                   `json:"enabled"`
	QualityTracks []string               `json:"quality_tracks"`
	Layout        LayoutSettingsResponse `json:"layout"`
}

HLSSettings is the payload for HLS settings

type HarmConfig ΒΆ

type HarmConfig struct {
	CooldownPeriod  *int             `json:"cooldown_period,omitempty"`
	Severity        *int             `json:"severity,omitempty"`
	Threshold       *int             `json:"threshold,omitempty"`
	ActionSequences []ActionSequence `json:"action_sequences,omitempty"`
	HarmTypes       []string         `json:"harm_types,omitempty"`
}

type HideChannelRequest ΒΆ

type HideChannelRequest struct {
	// Whether to clear message history of the channel or not
	ClearHistory *bool   `json:"clear_history,omitempty"`
	UserID       *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type HideChannelResponse ΒΆ

type HideChannelResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type HttpClient ΒΆ

type HttpClient interface {
	Do(r *http.Request) (*http.Response, error)
}

type HuaweiConfig ΒΆ

type HuaweiConfig struct {
	Disabled *bool   `json:"Disabled,omitempty"`
	ID       *string `json:"id,omitempty"`
	Secret   *string `json:"secret,omitempty"`
}

type HuaweiConfigFields ΒΆ

type HuaweiConfigFields struct {
	Enabled bool    `json:"enabled"`
	ID      *string `json:"id,omitempty"`
	Secret  *string `json:"secret,omitempty"`
}

type IPContentCountRuleParameters ΒΆ added in v5.3.0

type IPContentCountRuleParameters struct {
	Threshold  *int    `json:"threshold,omitempty"`
	TimeWindow *string `json:"time_window,omitempty"`
}

type IPFlagCountRuleParameters ΒΆ added in v5.3.0

type IPFlagCountRuleParameters struct {
	Severity   *string  `json:"severity,omitempty"`
	Threshold  *int     `json:"threshold,omitempty"`
	TimeWindow *string  `json:"time_window,omitempty"`
	HarmLabels []string `json:"harm_labels,omitempty"`
}

type ImageContentParameters ΒΆ

type ImageContentParameters struct {
	LabelOperator *string  `json:"label_operator,omitempty"`
	MinConfidence *float64 `json:"min_confidence,omitempty"`
	HarmLabels    []string `json:"harm_labels,omitempty"`
}

type ImageData ΒΆ

type ImageData struct {
	Frames string `json:"frames"`
	Height string `json:"height"`
	Size   string `json:"size"`
	Url    string `json:"url"`
	Width  string `json:"width"`
}

type ImageRuleParameters ΒΆ

type ImageRuleParameters struct {
	MinConfidence *float64 `json:"min_confidence,omitempty"`
	Threshold     *int     `json:"threshold,omitempty"`
	TimeWindow    *string  `json:"time_window,omitempty"`
	HarmLabels    []string `json:"harm_labels,omitempty"`
}

type ImageSize ΒΆ

type ImageSize struct {
	// Crop mode. One of: top, bottom, left, right, center
	Crop *string `json:"crop,omitempty"`
	// Target image height
	Height *int `json:"height,omitempty"`
	// Resize method. One of: clip, crop, scale, fill
	Resize *string `json:"resize,omitempty"`
	// Target image width
	Width *int `json:"width,omitempty"`
}

type ImageUploadRequest ΒΆ

type ImageUploadRequest struct {
	File *string `json:"file,omitempty"`
	// field with JSON-encoded array of image size configurations
	UploadSizes []ImageSize `json:"upload_sizes,omitempty"`
	User        *OnlyUserID `json:"user,omitempty"`
}

type ImageUploadResponse ΒΆ

type ImageUploadResponse struct {
	// Duration of the request in milliseconds
	Duration string  `json:"duration"`
	File     *string `json:"file,omitempty"`
	ThumbUrl *string `json:"thumb_url,omitempty"`
	// Array of image size configurations
	UploadSizes []ImageSize `json:"upload_sizes,omitempty"`
}

type Images ΒΆ

type Images struct {
	FixedHeight            ImageData `json:"fixed_height"`
	FixedHeightDownsampled ImageData `json:"fixed_height_downsampled"`
	FixedHeightStill       ImageData `json:"fixed_height_still"`
	FixedWidth             ImageData `json:"fixed_width"`
	FixedWidthDownsampled  ImageData `json:"fixed_width_downsampled"`
	FixedWidthStill        ImageData `json:"fixed_width_still"`
	Original               ImageData `json:"original"`
}

type ImportBlockListRequest ΒΆ added in v5.3.0

type ImportBlockListRequest struct {
	Items     []string `json:"items"`
	ChunkSize *int     `json:"chunk_size,omitempty"`
}

type ImportBlockListResponse ΒΆ added in v5.3.0

type ImportBlockListResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	TaskID   string `json:"task_id"`
}

Basic response information

type ImportTask ΒΆ

type ImportTask struct {
	CreatedAt Timestamp           `json:"created_at"`
	ID        string              `json:"id"`
	Mode      string              `json:"mode"`
	Path      string              `json:"path"`
	State     string              `json:"state"`
	UpdatedAt Timestamp           `json:"updated_at"`
	History   []ImportTaskHistory `json:"history"`
	Size      *int                `json:"size,omitempty"`
}

type ImportTaskHistory ΒΆ

type ImportTaskHistory struct {
	CreatedAt Timestamp `json:"created_at"`
	NextState string    `json:"next_state"`
	PrevState string    `json:"prev_state"`
}

type ImportV2TaskItem ΒΆ

type ImportV2TaskItem struct {
	AppPk     int                  `json:"app_pk"`
	CreatedAt Timestamp            `json:"created_at"`
	ID        string               `json:"id"`
	Product   string               `json:"product"`
	State     int                  `json:"state"`
	UpdatedAt Timestamp            `json:"updated_at"`
	Settings  ImportV2TaskSettings `json:"settings"`
	Result    map[string]any       `json:"result,omitempty"`
}

type ImportV2TaskSettings ΒΆ

type ImportV2TaskSettings struct {
	MergeCustom           *bool                   `json:"merge_custom,omitempty"`
	Mode                  *string                 `json:"mode,omitempty"`
	Path                  *string                 `json:"path,omitempty"`
	SkipReferencesCheck   *bool                   `json:"skip_references_check,omitempty"`
	UseImportTimeAsOpTime *bool                   `json:"use_import_time_as_op_time,omitempty"`
	S3                    *ImportV2TaskSettingsS3 `json:"s3,omitempty"`
}

type ImportV2TaskSettingsS3 ΒΆ

type ImportV2TaskSettingsS3 struct {
	Bucket *string `json:"bucket,omitempty"`
	Dir    *string `json:"dir,omitempty"`
	Region *string `json:"region,omitempty"`
}

type Incident ΒΆ added in v5.3.0

type Incident struct {
	From               string `json:"from"`
	PeakConcurrency    int    `json:"peak_concurrency"`
	To                 string `json:"to"`
	ViewersInterrupted int    `json:"viewers_interrupted"`
}

type IndividualRecordSettings ΒΆ

type IndividualRecordSettings struct {
	Mode        string   `json:"mode"`
	OutputTypes []string `json:"output_types,omitempty"`
}

type IndividualRecordingResponse ΒΆ

type IndividualRecordingResponse struct {
	Status string `json:"status"`
}

type IndividualRecordingSettingsRequest ΒΆ

type IndividualRecordingSettingsRequest struct {
	// Recording mode. One of: available, disabled, auto-on
	Mode string `json:"mode"`
	// Output types to include: audio_only, video_only, audio_video, screenshare_audio_only, screenshare_video_only, screenshare_audio_video
	OutputTypes []string `json:"output_types,omitempty"`
}

type IndividualRecordingSettingsResponse ΒΆ

type IndividualRecordingSettingsResponse struct {
	Mode        string   `json:"mode"`
	OutputTypes []string `json:"output_types,omitempty"`
}

type IngressAudioEncodingOptions ΒΆ

type IngressAudioEncodingOptions struct {
	Bitrate   int  `json:"bitrate"`
	Channels  int  `json:"channels"`
	EnableDtx bool `json:"enable_dtx"`
}

type IngressAudioEncodingOptionsRequest ΒΆ

type IngressAudioEncodingOptionsRequest struct {
	Bitrate   int   `json:"bitrate"`
	Channels  int   `json:"channels"`
	EnableDtx *bool `json:"enable_dtx,omitempty"`
}

type IngressAudioEncodingResponse ΒΆ

type IngressAudioEncodingResponse struct {
	Bitrate   int  `json:"bitrate"`
	Channels  int  `json:"channels"`
	EnableDtx bool `json:"enable_dtx"`
}

type IngressErrorEvent ΒΆ

type IngressErrorEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Human-readable error message
	Error string `json:"error"`
	// Unique identifier for the stream
	IngressStreamID string `json:"ingress_stream_id"`
	// User who was streaming
	UserID string `json:"user_id"`
	// The type of event: "ingress.error" in this case
	Type string `json:"type"`
	// Error code
	Code *string `json:"code,omitempty"`
}

This event is sent when a critical error occurs that breaks the streaming pipeline

func (*IngressErrorEvent) GetEventType ΒΆ

func (e *IngressErrorEvent) GetEventType() string

type IngressSettings ΒΆ

type IngressSettings struct {
	Enabled              bool                                   `json:"enabled"`
	AudioEncodingOptions *IngressAudioEncodingOptions           `json:"audio_encoding_options,omitempty"`
	VideoEncodingOptions map[string]IngressVideoEncodingOptions `json:"video_encoding_options,omitempty"`
}

type IngressSettingsRequest ΒΆ

type IngressSettingsRequest struct {
	Enabled              *bool                                         `json:"enabled,omitempty"`
	AudioEncodingOptions *IngressAudioEncodingOptionsRequest           `json:"audio_encoding_options,omitempty"`
	VideoEncodingOptions map[string]IngressVideoEncodingOptionsRequest `json:"video_encoding_options,omitempty"`
}

type IngressSettingsResponse ΒΆ

type IngressSettingsResponse struct {
	Enabled              bool                                    `json:"enabled"`
	AudioEncodingOptions *IngressAudioEncodingResponse           `json:"audio_encoding_options,omitempty"`
	VideoEncodingOptions map[string]IngressVideoEncodingResponse `json:"video_encoding_options,omitempty"`
}

type IngressSource ΒΆ

type IngressSource struct {
	Fps    int `json:"fps"`
	Height int `json:"height"`
	Width  int `json:"width"`
}

type IngressSourceRequest ΒΆ

type IngressSourceRequest struct {
	Fps    int `json:"fps"`
	Height int `json:"height"`
	Width  int `json:"width"`
}

type IngressSourceResponse ΒΆ

type IngressSourceResponse struct {
	Fps    int `json:"fps"`
	Height int `json:"height"`
	Width  int `json:"width"`
}

type IngressStartedEvent ΒΆ

type IngressStartedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Unique identifier for this stream
	IngressStreamID string `json:"ingress_stream_id"`
	// Streaming protocol (e.g., 'rtmps', 'srt', 'rtmp', 'rtsp')
	PublisherType string `json:"publisher_type"`
	// User who started the stream
	UserID string `json:"user_id"`
	// The type of event: "ingress.started" in this case
	Type string `json:"type"`
	// Client IP address
	ClientIp *string `json:"client_ip,omitempty"`
	// Streaming client software name (e.g., 'OBS Studio')
	ClientName *string `json:"client_name,omitempty"`
	// Client software version
	Version *string `json:"version,omitempty"`
}

This event is sent when a user begins streaming into a call

func (*IngressStartedEvent) GetEventType ΒΆ

func (e *IngressStartedEvent) GetEventType() string

type IngressStoppedEvent ΒΆ

type IngressStoppedEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// Unique identifier for the stream
	IngressStreamID string `json:"ingress_stream_id"`
	// User who was streaming
	UserID string `json:"user_id"`
	// The type of event: "ingress.stopped" in this case
	Type string `json:"type"`
}

This event is sent when streaming stops due to user action or call ended

func (*IngressStoppedEvent) GetEventType ΒΆ

func (e *IngressStoppedEvent) GetEventType() string

type IngressVideoEncodingOptions ΒΆ

type IngressVideoEncodingOptions struct {
	Layers []IngressVideoLayer `json:"layers"`
	Source *IngressSource      `json:"source,omitempty"`
}

type IngressVideoEncodingOptionsRequest ΒΆ

type IngressVideoEncodingOptionsRequest struct {
	Layers []IngressVideoLayerRequest `json:"layers"`
	Source IngressSourceRequest       `json:"source"`
}

type IngressVideoEncodingResponse ΒΆ

type IngressVideoEncodingResponse struct {
	Layers []IngressVideoLayerResponse `json:"layers"`
	Source IngressSourceResponse       `json:"source"`
}

type IngressVideoLayer ΒΆ

type IngressVideoLayer struct {
	Bitrate      int    `json:"bitrate"`
	Codec        string `json:"codec"`
	FrameRate    int    `json:"frame_rate"`
	MaxDimension int    `json:"max_dimension"`
	MinDimension int    `json:"min_dimension"`
}

type IngressVideoLayerRequest ΒΆ

type IngressVideoLayerRequest struct {
	Bitrate        int    `json:"bitrate"`
	Codec          string `json:"codec"`
	FrameRateLimit int    `json:"frame_rate_limit"`
	MaxDimension   int    `json:"max_dimension"`
	MinDimension   int    `json:"min_dimension"`
}

type IngressVideoLayerResponse ΒΆ

type IngressVideoLayerResponse struct {
	Bitrate        int    `json:"bitrate"`
	Codec          string `json:"codec"`
	FrameRateLimit int    `json:"frame_rate_limit"`
	MaxDimension   int    `json:"max_dimension"`
	MinDimension   int    `json:"min_dimension"`
}

type InsertActionLogRequest ΒΆ

type InsertActionLogRequest struct {
	// Type of moderation action taken
	ActionType string `json:"action_type"`
	// ID of the user who created the entity
	EntityCreatorID string `json:"entity_creator_id"`
	// ID of the entity the action was taken on
	EntityID string `json:"entity_id"`
	// Type of entity the action was taken on
	EntityType string `json:"entity_type"`
	// Reason for the action
	Reason *string `json:"reason,omitempty"`
	// Type of reporter; 'api_integration' when the action was triggered by an API integration call with no authenticated user
	ReporterType *string `json:"reporter_type,omitempty"`
	// ID of the user who triggered the action; empty for automated actions
	ReporterUserID *string `json:"reporter_user_id,omitempty"`
	// Custom metadata for the action log
	Custom map[string]any `json:"custom"`
}

type InsertActionLogResponse ΒΆ

type InsertActionLogResponse struct {
	Duration string `json:"duration"`
}

Response after inserting a moderation action log

type InterestTagResponse ΒΆ

type InterestTagResponse struct {
	// Number of distinct reacted-to activities tagged with this value
	Count int `json:"count"`
	// The interest tag value
	Tag string `json:"tag"`
}

An interest tag with the number of distinct activities the user reacted to that carried it

type JoinCallAPIMetrics ΒΆ

type JoinCallAPIMetrics struct {
	Failures float64                  `json:"failures"`
	Total    float64                  `json:"total"`
	Latency  *ActiveCallsLatencyStats `json:"latency,omitempty"`
}

type Joins ΒΆ added in v5.3.0

type Joins struct {
	Reason            string         `json:"reason"`
	DisconnectReasons map[string]int `json:"disconnect_reasons"`
	FailureStages     map[string]int `json:"failure_stages"`
	JoinAttempts      *int           `json:"join_attempts,omitempty"`
	JoinSuccessRate   *float64       `json:"join_success_rate,omitempty"`
}

type KeyframeOCRRuleParameters ΒΆ

type KeyframeOCRRuleParameters struct {
	Threshold  *int     `json:"threshold,omitempty"`
	TimeWindow *string  `json:"time_window,omitempty"`
	HarmLabels []string `json:"harm_labels,omitempty"`
}

type KeyframeRuleParameters ΒΆ

type KeyframeRuleParameters struct {
	MinConfidence *float64 `json:"min_confidence,omitempty"`
	Threshold     *int     `json:"threshold,omitempty"`
	TimeWindow    *string  `json:"time_window,omitempty"`
	HarmLabels    []string `json:"harm_labels,omitempty"`
}

type KickUserRequest ΒΆ

type KickUserRequest struct {
	// The user to kick
	UserID string `json:"user_id"`
	// If true, also block the user from rejoining the call
	Block *bool `json:"block,omitempty"`
	// Server-side: ID of the user performing the action
	KickedByID *string `json:"kicked_by_id,omitempty"`
	// User request object
	KickedBy *UserRequest `json:"kicked_by,omitempty"`
}

type KickUserResponse ΒΆ

type KickUserResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

KickUserResponse is the payload for kicking a user from a call.

type KickedUserEvent ΒΆ

type KickedUserEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.kicked_user" in this case
	Type string `json:"type"`
	// User response object
	KickedByUser *UserResponse `json:"kicked_by_user,omitempty"`
}

This event is sent to call participants to notify when a user is kicked from a call. Clients should make the kicked user leave the call UI.

func (*KickedUserEvent) GetEventType ΒΆ

func (e *KickedUserEvent) GetEventType() string

type LLMConfig ΒΆ

type LLMConfig struct {
	AppContext           *string           `json:"app_context,omitempty"`
	Async                *bool             `json:"async,omitempty"`
	Enabled              *bool             `json:"enabled,omitempty"`
	Rules                []LLMRule         `json:"rules,omitempty"`
	SeverityDescriptions map[string]string `json:"severity_descriptions,omitempty"`
}

type LLMRule ΒΆ

type LLMRule struct {
	Label         string                  `json:"label"`
	Action        *string                 `json:"action,omitempty"`
	Description   *string                 `json:"description,omitempty"`
	SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}

type LabelResponse ΒΆ

type LabelResponse struct {
	Name          string   `json:"name"`
	HarmLabels    []string `json:"harm_labels,omitempty"`
	PhraseListIds []int    `json:"phrase_list_ids,omitempty"`
}

type LabelResultResponse ΒΆ

type LabelResultResponse struct {
	// Category
	Category string `json:"category"`
	// The moderated content
	Content     string `json:"content"`
	ContentType string `json:"content_type"`
	// Timestamp
	CreatedAt Timestamp `json:"created_at"`
	// High-level harm category
	HarmType string `json:"harm_type"`
	// Unique identifier
	ID string `json:"id"`
	// Detected language
	Language string `json:"language"`
	// Provider recommended action
	RecommendedAction string `json:"recommended_action"`
	// Severity level
	Severity string `json:"severity"`
	// Moderation labels
	Labels []string `json:"labels"`
	// Customer-supplied identifier for the moderated content
	ContentID *string `json:"content_id,omitempty"`
	// Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.)
	DirectedAt *string `json:"directed_at,omitempty"`
	// The stored content with every non-whitespace character masked. Present only when recommended_action is not 'keep'. Derived at runtime and never stored.
	FullyMaskedContent *string `json:"fully_masked_content,omitempty"`
	// Content with blocklisted tokens masked (when a blocklist rule with action=mask rewrote the original)
	MaskedContent *string `json:"masked_content,omitempty"`
	Policy        *string `json:"policy,omitempty"`
	// Customer-supplied user identifier for the content author
	UserID *string `json:"user_id,omitempty"`
}

type LabelThresholds ΒΆ

type LabelThresholds struct {
	// Threshold for automatic message block
	Block *float64 `json:"block,omitempty"`
	// Threshold for automatic message flag
	Flag *float64 `json:"flag,omitempty"`
}

type LabelsRequest ΒΆ

type LabelsRequest struct {
	// Content to moderate
	Content string `json:"content"`
	// Optional category for filtering (max 128 chars)
	Category *string `json:"category,omitempty"`
	// Customer-supplied identifier for the moderated content, for tracing
	ContentID *string `json:"content_id,omitempty"`
	// Type of content: 'text' (default), 'message', or 'username'. Stored as-sent; only 'username' routes to the username moderation API.
	ContentType *string `json:"content_type,omitempty"`
	// When true, run moderation and return labels without persisting the result. Useful for one-off checks (e.g. UI testers) that should not be recorded in the stored history.
	DryRun *bool `json:"dry_run,omitempty"`
	// Optional moderation policy key (max 128 chars). For username moderation, set this to a policy whose key starts with 'username:' (e.g. 'username:default') to opt into the low-latency fast-path: blocklists (customer + Stream-managed defaults) short-circuit the LLM, and the LLM fallback uses gpt-4.1-nano with a 24h Valkey verdict cache. Without a 'username:' prefix the request falls through to the standard Bodyguard Analyze v1 username path.
	Policy *string `json:"policy,omitempty"`
	// Optional customer-supplied user identifier for the content author (max 256 chars). Enables filtering stored results by user_id.
	UserID *string `json:"user_id,omitempty"`
}

type LabelsResponse ΒΆ

type LabelsResponse struct {
	Duration string `json:"duration"`
	// Provider recommended action
	RecommendedAction string `json:"recommended_action"`
	// Customer-supplied identifier for the moderated content, for tracing
	ContentID *string `json:"content_id,omitempty"`
	// Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.), when the provider exposes it
	DirectedAt *string `json:"directed_at,omitempty"`
	// The original content with every non-whitespace character masked. Present only when recommended_action is not 'keep'. Derived at runtime and never stored.
	FullyMaskedContent *string `json:"fully_masked_content,omitempty"`
	// High-level harm category
	HarmType *string `json:"harm_type,omitempty"`
	// Detected language
	Language *string `json:"language,omitempty"`
	// Content with blocklisted tokens masked or substituted. Present only when a blocklist rewrote the original content.
	MaskedContent *string `json:"masked_content,omitempty"`
	// Severity level
	Severity *string `json:"severity,omitempty"`
	// Moderation labels detected
	Labels []string `json:"labels,omitempty"`
}

type LayoutSettings ΒΆ

type LayoutSettings struct {
	ExternalAppUrl    string         `json:"external_app_url"`
	ExternalCssUrl    string         `json:"external_css_url"`
	Name              string         `json:"name"`
	DetectOrientation *bool          `json:"detect_orientation,omitempty"`
	Options           map[string]any `json:"options,omitempty"`
}

type LayoutSettingsRequest ΒΆ

type LayoutSettingsRequest struct {
	Name              string         `json:"name"`
	DetectOrientation *bool          `json:"detect_orientation,omitempty"`
	ExternalAppUrl    *string        `json:"external_app_url,omitempty"`
	ExternalCssUrl    *string        `json:"external_css_url,omitempty"`
	Options           map[string]any `json:"options,omitempty"`
}

type LayoutSettingsResponse ΒΆ

type LayoutSettingsResponse struct {
	ExternalAppUrl    string         `json:"external_app_url"`
	ExternalCssUrl    string         `json:"external_css_url"`
	Name              string         `json:"name"`
	DetectOrientation *bool          `json:"detect_orientation,omitempty"`
	Options           map[string]any `json:"options,omitempty"`
}

type LimitInfoResponse ΒΆ

type LimitInfoResponse struct {
	// The maximum number of API calls allowed per time window
	Limit int `json:"limit"`
	// The number of remaining calls in the current window
	Remaining int `json:"remaining"`
	// The Unix timestamp when the rate limit resets
	Reset int `json:"reset"`
}

type LimitsSettings ΒΆ

type LimitsSettings struct {
	MaxParticipantsExcludeRoles []string `json:"max_participants_exclude_roles"`
	MaxDurationSeconds          *int     `json:"max_duration_seconds,omitempty"`
	MaxParticipants             *int     `json:"max_participants,omitempty"`
	MaxParticipantsExcludeOwner *bool    `json:"max_participants_exclude_owner,omitempty"`
}

type LimitsSettingsRequest ΒΆ

type LimitsSettingsRequest struct {
	MaxDurationSeconds          *int     `json:"max_duration_seconds,omitempty"`
	MaxParticipants             *int     `json:"max_participants,omitempty"`
	MaxParticipantsExcludeOwner *bool    `json:"max_participants_exclude_owner,omitempty"`
	MaxParticipantsExcludeRoles []string `json:"max_participants_exclude_roles,omitempty"`
}

type LimitsSettingsResponse ΒΆ

type LimitsSettingsResponse struct {
	MaxParticipantsExcludeRoles []string `json:"max_participants_exclude_roles"`
	MaxDurationSeconds          *int     `json:"max_duration_seconds,omitempty"`
	MaxParticipants             *int     `json:"max_participants,omitempty"`
	MaxParticipantsExcludeOwner *bool    `json:"max_participants_exclude_owner,omitempty"`
}

type ListBlockListResponse ΒΆ

type ListBlockListResponse struct {
	// Duration of the request in milliseconds
	Duration   string              `json:"duration"`
	Blocklists []BlockListResponse `json:"blocklists"`
	NextCursor *string             `json:"next_cursor,omitempty"`
}

Basic response information

type ListBlockListsRequest ΒΆ

type ListBlockListsRequest struct {
	Team   *string `json:"-" query:"team"`
	Cursor *string `json:"-" query:"cursor"`
	Limit  *int    `json:"-" query:"limit"`
}

type ListCallTypeResponse ΒΆ

type ListCallTypeResponse struct {
	Duration  string                      `json:"duration"`
	CallTypes map[string]CallTypeResponse `json:"call_types"`
}

Response for ListCallType

type ListCallTypesRequest ΒΆ

type ListCallTypesRequest struct {
}

type ListChannelTypesRequest ΒΆ

type ListChannelTypesRequest struct {
}

type ListChannelTypesResponse ΒΆ

type ListChannelTypesResponse struct {
	Duration string `json:"duration"`
	// Object with all channel types
	ChannelTypes map[string]*ChannelTypeConfig `json:"channel_types"`
}

type ListCommandsRequest ΒΆ

type ListCommandsRequest struct {
}

type ListCommandsResponse ΒΆ

type ListCommandsResponse struct {
	Duration string `json:"duration"`
	// List of commands
	Commands []Command `json:"commands"`
}

type ListDevicesRequest ΒΆ

type ListDevicesRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type ListDevicesResponse ΒΆ

type ListDevicesResponse struct {
	Duration string `json:"duration"`
	// List of devices
	Devices []DeviceResponse `json:"devices"`
}

List devices response

type ListExternalStorageRequest ΒΆ

type ListExternalStorageRequest struct {
}

type ListExternalStorageResponse ΒΆ

type ListExternalStorageResponse struct {
	// Duration of the request in milliseconds
	Duration         string                             `json:"duration"`
	ExternalStorages map[string]ExternalStorageResponse `json:"external_storages"`
}

Basic response information

type ListFeedGroupsRequest ΒΆ

type ListFeedGroupsRequest struct {
	IncludeSoftDeleted *bool `json:"-" query:"include_soft_deleted"`
}

type ListFeedGroupsResponse ΒΆ

type ListFeedGroupsResponse struct {
	// Duration of the request in milliseconds
	Duration string                       `json:"duration"`
	Groups   map[string]FeedGroupResponse `json:"groups"`
}

Basic response information

type ListFeedViewsRequest ΒΆ

type ListFeedViewsRequest struct {
}

type ListFeedViewsResponse ΒΆ

type ListFeedViewsResponse struct {
	Duration string `json:"duration"`
	// Map of feed view ID to feed view
	Views map[string]FeedViewResponse `json:"views"`
}

type ListFeedVisibilitiesRequest ΒΆ

type ListFeedVisibilitiesRequest struct {
}

type ListFeedVisibilitiesResponse ΒΆ

type ListFeedVisibilitiesResponse struct {
	Duration string `json:"duration"`
	// Map of feed visibility configurations by name
	FeedVisibilities map[string]FeedVisibilityResponse `json:"feed_visibilities"`
}

type ListImportV2TasksRequest ΒΆ

type ListImportV2TasksRequest struct {
	State *int `json:"-" query:"state"`
}

type ListImportV2TasksResponse ΒΆ

type ListImportV2TasksResponse struct {
	// Duration of the request in milliseconds
	Duration    string             `json:"duration"`
	ImportTasks []ImportV2TaskItem `json:"import_tasks"`
	Next        *string            `json:"next,omitempty"`
	Prev        *string            `json:"prev,omitempty"`
}

Basic response information

type ListImportsRequest ΒΆ

type ListImportsRequest struct {
}

type ListImportsResponse ΒΆ

type ListImportsResponse struct {
	// Duration of the request in milliseconds
	Duration    string       `json:"duration"`
	ImportTasks []ImportTask `json:"import_tasks"`
}

Basic response information

type ListPermissionsRequest ΒΆ

type ListPermissionsRequest struct {
}

type ListPermissionsResponse ΒΆ

type ListPermissionsResponse struct {
	// Duration of the request in milliseconds
	Duration    string       `json:"duration"`
	Permissions []Permission `json:"permissions"`
}

Basic response information

type ListPolicyTestSetsRequest ΒΆ added in v5.3.0

type ListPolicyTestSetsRequest struct {
}

type ListPushProvidersRequest ΒΆ

type ListPushProvidersRequest struct {
}

type ListPushProvidersResponse ΒΆ

type ListPushProvidersResponse struct {
	// Duration of the request in milliseconds
	Duration      string                 `json:"duration"`
	PushProviders []PushProviderResponse `json:"push_providers"`
}

Basic response information

type ListQueuesRequest ΒΆ

type ListQueuesRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type ListQueuesResponse ΒΆ

type ListQueuesResponse struct {
	// Duration of the request in milliseconds
	Duration string                    `json:"duration"`
	Queues   []ModerationQueueResponse `json:"queues"`
}

Basic response information

type ListRecordingsRequest ΒΆ

type ListRecordingsRequest struct {
}

type ListRecordingsResponse ΒΆ

type ListRecordingsResponse struct {
	Duration   string          `json:"duration"`
	Recordings []CallRecording `json:"recordings"`
}

Response for listing recordings

type ListRolesRequest ΒΆ

type ListRolesRequest struct {
}

type ListRolesResponse ΒΆ

type ListRolesResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	Roles    []Role `json:"roles"`
}

Basic response information

type ListSIPInboundRoutingRuleRequest ΒΆ

type ListSIPInboundRoutingRuleRequest struct {
}

type ListSIPInboundRoutingRuleResponse ΒΆ

type ListSIPInboundRoutingRuleResponse struct {
	Duration string `json:"duration"`
	// List of SIP Inbound Routing Rules for the application
	SipInboundRoutingRules []SIPInboundRoutingRuleResponse `json:"sip_inbound_routing_rules"`
}

Response containing the list of SIP Inbound Routing Rules

type ListSIPTrunksRequest ΒΆ

type ListSIPTrunksRequest struct {
}

type ListSIPTrunksResponse ΒΆ

type ListSIPTrunksResponse struct {
	Duration string `json:"duration"`
	// List of SIP trunks for the application
	SipTrunks []SIPTrunkResponse `json:"sip_trunks"`
}

Response containing the list of SIP trunks

type ListTranscriptionsRequest ΒΆ

type ListTranscriptionsRequest struct {
}

type ListTranscriptionsResponse ΒΆ

type ListTranscriptionsResponse struct {
	Duration string `json:"duration"`
	// List of transcriptions for the call
	Transcriptions []CallTranscription `json:"transcriptions"`
}

type ListUserGroupsRequest ΒΆ

type ListUserGroupsRequest struct {
	Limit       *int    `json:"-" query:"limit"`
	IDGt        *string `json:"-" query:"id_gt"`
	CreatedAtGt *string `json:"-" query:"created_at_gt"`
	TeamID      *string `json:"-" query:"team_id"`
}

type ListUserGroupsResponse ΒΆ

type ListUserGroupsResponse struct {
	Duration string `json:"duration"`
	// List of user groups
	UserGroups []UserGroupResponse `json:"user_groups"`
}

Response for listing user groups

type Location ΒΆ

type Location struct {
	// Latitude coordinate
	Lat float64 `json:"lat"`
	// Longitude coordinate
	Lng float64 `json:"lng"`
}

type LocationResponse ΒΆ

type LocationResponse struct {
	// Continent code
	ContinentCode string `json:"continent_code"`
	// Country ISO code
	CountryIsoCode string `json:"country_iso_code"`
	// Subdivision ISO code
	SubdivisionIsoCode string `json:"subdivision_iso_code"`
}

Geographic location metadata

type LogLevel ΒΆ

type LogLevel int

LogLevel represents the severity of a log message.

const (
	// LogLevelDebug is the lowest severity.
	LogLevelDebug LogLevel = iota
	// LogLevelInfo is for general information.
	LogLevelInfo
	// LogLevelWarn is for warning messages.
	LogLevelWarn
	// LogLevelError is for error messages.
	LogLevelError
)

type Logger ΒΆ

type Logger interface {
	Debug(format string, v ...interface{})
	Info(format string, v ...interface{})
	Warn(format string, v ...interface{})
	Error(format string, v ...interface{})
}

Logger is an interface that clients can implement to provide custom logging.

var DefaultLoggerInstance Logger = NewDefaultLogger(os.Stderr, "", log.LstdFlags, LogLevelInfo)

DefaultLoggerInstance is the default logger instance.

type MarkActivityRequest ΒΆ

type MarkActivityRequest struct {
	// Whether to mark all activities as read
	MarkAllRead *bool `json:"mark_all_read,omitempty"`
	// Whether to mark all activities as seen
	MarkAllSeen *bool   `json:"mark_all_seen,omitempty"`
	UserID      *string `json:"user_id,omitempty"`
	// List of activity IDs to mark as read
	MarkRead []string `json:"mark_read"`
	// List of activity IDs to mark as seen
	MarkSeen []string `json:"mark_seen"`
	// List of activity IDs to mark as watched (for stories)
	MarkWatched []string `json:"mark_watched"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type MarkChannelsReadRequest ΒΆ

type MarkChannelsReadRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// Map of channel ID to last read message ID
	ReadByChannel map[string]string `json:"read_by_channel"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type MarkDeliveredRequest ΒΆ

type MarkDeliveredRequest struct {
	UserID                  *string                   `json:"-" query:"user_id"`
	LatestDeliveredMessages []DeliveredMessagePayload `json:"latest_delivered_messages"`
}

type MarkDeliveredResponse ΒΆ

type MarkDeliveredResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type MarkReadRequest ΒΆ

type MarkReadRequest struct {
	// ID of the message that is considered last read by client
	MessageID *string `json:"message_id,omitempty"`
	// Optional Thread ID to specifically mark a given thread as read
	ThreadID *string `json:"thread_id,omitempty"`
	UserID   *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type MarkReadResponse ΒΆ

type MarkReadResponse struct {
	// Duration of the request in milliseconds
	Duration string                 `json:"duration"`
	Event    *MarkReadResponseEvent `json:"event,omitempty"`
}

type MarkReadResponseEvent ΒΆ

type MarkReadResponseEvent struct {
	ChannelID            string     `json:"channel_id"`
	ChannelType          string     `json:"channel_type"`
	Cid                  string     `json:"cid"`
	CreatedAt            Timestamp  `json:"created_at"`
	Type                 string     `json:"type"`
	ChannelLastMessageAt *Timestamp `json:"channel_last_message_at,omitempty"`
	LastReadMessageID    *string    `json:"last_read_message_id,omitempty"`
	Team                 *string    `json:"team,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse          `json:"channel,omitempty"`
	Thread  *ThreadResponse           `json:"thread,omitempty"`
	User    *UserResponseCommonFields `json:"user,omitempty"`
}

type MarkReviewedRequestPayload ΒΆ

type MarkReviewedRequestPayload struct {
	// Maximum content items to mark as reviewed
	ContentToMarkAsReviewedLimit *int `json:"content_to_mark_as_reviewed_limit,omitempty"`
	// Reason for the appeal decision
	DecisionReason *string `json:"decision_reason,omitempty"`
	// Skip marking content as reviewed
	DisableMarkingContentAsReviewed *bool `json:"disable_marking_content_as_reviewed,omitempty"`
}

Configuration for mark reviewed action

type MarkUnreadRequest ΒΆ

type MarkUnreadRequest struct {
	// ID of the message from where the channel is marked unread
	MessageID *string `json:"message_id,omitempty"`
	// Timestamp of the message from where the channel is marked unread
	MessageTimestamp *Timestamp `json:"message_timestamp,omitempty"`
	// Mark a thread unread, specify one of the thread, message timestamp, or message id
	ThreadID *string `json:"thread_id,omitempty"`
	UserID   *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type MatchedContent ΒΆ

type MatchedContent struct {
	// The `content_ids[label]` value supplied on the `/analyze` request that contributed this entry.
	ID string `json:"id"`
	// `content_published_at` from the contributing `/analyze` request, or server receive time when that field was omitted.
	PublishedAt Timestamp `json:"published_at"`
	// Content type that contributed this entry: `image` or `text`.
	Type string `json:"type"`
	// Image-classification entries only. Aggregate (max) confidence score across the entry's classifications + sub-classifications. Absent on text and OCR entries.
	Confidence *float64 `json:"confidence,omitempty"`
	// Text and OCR entries. Aggregate (max) Bodyguard severity level (`LOW` / `MEDIUM` / `HIGH` / `CRITICAL`). Absent on image-classification entries.
	Severity *string `json:"severity,omitempty"`
	Text     *string `json:"text,omitempty"`
	// Image-classification entries (keyframe rule, Type=image) carry nested L1 β†’ L2 classifications. Text entries (closed_caption rule, Type=text) carry flat label + severity. Resolved against the app's effective taxonomy on the image side.
	Classifications []Classification `json:"classifications,omitempty"`
	// OCR entries only (keyframe_ocr rule, Type=image). Bodyguard labels that fired against the keyframe's OCR-extracted text (e.g. `INSULT`, `HATE_SPEECH`). Distinct from `classifications` so consumers can route OCR matches separately from image-classification matches.
	OcrClassifications []Classification `json:"ocr_classifications,omitempty"`
}

type MaxStreakChangedEvent ΒΆ

type MaxStreakChangedEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

func (*MaxStreakChangedEvent) GetEventType ΒΆ

func (e *MaxStreakChangedEvent) GetEventType() string

type MemberAddedEvent ΒΆ

type MemberAddedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse       `json:"channel"`
	Custom  map[string]any        `json:"custom"`
	Member  ChannelMemberResponse `json:"member"`
	// The type of event: "member.added" in this case
	Type string `json:"type"`
	// The ID of the channel to which the member was added
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel to which the member was added
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel to which the member was added
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a member is added to a channel.

func (*MemberAddedEvent) GetEventType ΒΆ

func (e *MemberAddedEvent) GetEventType() string

type MemberRemovedEvent ΒΆ

type MemberRemovedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse       `json:"channel"`
	Custom  map[string]any        `json:"custom"`
	Member  ChannelMemberResponse `json:"member"`
	// The type of event: "member.removed" in this case
	Type string `json:"type"`
	// The ID of the channel from which the member was removed
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel from which the member was removed
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel from which the member was removed
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a member is removed from a channel.

func (*MemberRemovedEvent) GetEventType ΒΆ

func (e *MemberRemovedEvent) GetEventType() string

type MemberRequest ΒΆ

type MemberRequest struct {
	UserID string  `json:"user_id"`
	Role   *string `json:"role,omitempty"`
	// Custom data for this object
	Custom map[string]any `json:"custom,omitempty"`
}

MemberRequest is the payload for adding a member to a call.

type MemberResponse ΒΆ

type MemberResponse struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	UserID    string    `json:"user_id"`
	// Custom member response data
	Custom map[string]any `json:"custom"`
	// User response object
	User UserResponse `json:"user"`
	// Date/time of deletion
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`
	Role      *string    `json:"role,omitempty"`
}

MemberResponse is the payload for a member of a call.

type MemberUpdatedEvent ΒΆ

type MemberUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse       `json:"channel"`
	Custom  map[string]any        `json:"custom"`
	Member  ChannelMemberResponse `json:"member"`
	// The type of event: "member.updated" in this case
	Type string `json:"type"`
	// The ID of the channel in which the member was updated
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel in which the member was updated
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel in which the member was updated
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a member is updated in a channel.

func (*MemberUpdatedEvent) GetEventType ΒΆ

func (e *MemberUpdatedEvent) GetEventType() string

type MembersResponse ΒΆ

type MembersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// List of found members
	Members []ChannelMemberResponse `json:"members"`
}

type MembershipLevelResponse ΒΆ

type MembershipLevelResponse struct {
	// When the membership level was created
	CreatedAt Timestamp `json:"created_at"`
	// Unique identifier for the membership level
	ID string `json:"id"`
	// Display name for the membership level
	Name string `json:"name"`
	// Priority level
	Priority int `json:"priority"`
	// When the membership level was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Activity tags this membership level gives access to
	Tags []string `json:"tags"`
	// Description of the membership level
	Description *string `json:"description,omitempty"`
	// Custom data for the membership level
	Custom map[string]any `json:"custom,omitempty"`
}

type MessageActionRequest ΒΆ

type MessageActionRequest struct {
	// ReadOnlyData to execute command with
	FormData map[string]string `json:"form_data"`
	UserID   *string           `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type MessageActionResponse ΒΆ

type MessageActionResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
}

Basic response information

type MessageChangeSet ΒΆ

type MessageChangeSet struct {
	Attachments      bool `json:"attachments"`
	Custom           bool `json:"custom"`
	Html             bool `json:"html"`
	MentionedUserIds bool `json:"mentioned_user_ids"`
	Mml              bool `json:"mml"`
	Pin              bool `json:"pin"`
	QuotedMessageID  bool `json:"quoted_message_id"`
	Silent           bool `json:"silent"`
	Text             bool `json:"text"`
}

type MessageDeletedEvent ΒΆ

type MessageDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Whether the message was hard deleted
	HardDelete bool           `json:"hard_delete"`
	MessageID  string         `json:"message_id"`
	Custom     map[string]any `json:"custom"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// The type of event: "message.deleted" in this case
	Type string `json:"type"`
	// The ID of the channel where the message was sent
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel where the message was sent
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the message was sent
	Cid *string `json:"cid,omitempty"`
	// Whether the message was deleted only for the current user
	DeletedForMe *bool      `json:"deleted_for_me,omitempty"`
	ReceivedAt   *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a message is deleted.

func (*MessageDeletedEvent) GetEventType ΒΆ

func (e *MessageDeletedEvent) GetEventType() string

type MessageFlagResponse ΒΆ

type MessageFlagResponse struct {
	CreatedAt        Timestamp            `json:"created_at"`
	CreatedByAutomod bool                 `json:"created_by_automod"`
	UpdatedAt        Timestamp            `json:"updated_at"`
	ApprovedAt       *Timestamp           `json:"approved_at,omitempty"`
	Reason           *string              `json:"reason,omitempty"`
	RejectedAt       *Timestamp           `json:"rejected_at,omitempty"`
	ReviewedAt       *Timestamp           `json:"reviewed_at,omitempty"`
	Custom           map[string]any       `json:"custom,omitempty"`
	Details          *FlagDetailsResponse `json:"details,omitempty"`
	// Represents any chat message
	Message            *MessageResponse      `json:"message,omitempty"`
	ModerationFeedback *FlagFeedbackResponse `json:"moderation_feedback,omitempty"`
	// Result of the message moderation
	ModerationResult *MessageModerationResult `json:"moderation_result,omitempty"`
	// User response object
	ReviewedBy *UserResponse `json:"reviewed_by,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type MessageFlaggedEvent ΒΆ

type MessageFlaggedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	MessageID string    `json:"message_id"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// The type of event: "message.flagged" in this case
	Type string `json:"type"`
	// The ID of the channel where the message was sent
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel where the message was sent
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the message was sent
	Cid *string `json:"cid,omitempty"`
	// The reason for the flag
	Reason     *string    `json:"reason,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team *string `json:"team,omitempty"`
	// The total number of flags for the user
	TotalFlags    *int           `json:"total_flags,omitempty"`
	ChannelCustom map[string]any `json:"channel_custom,omitempty"`
	// Custom data
	Custom map[string]any `json:"custom,omitempty"`
	// Result of the message moderation
	Details *MessageModerationResult  `json:"details,omitempty"`
	Flag    *FlagResponse             `json:"flag,omitempty"`
	User    *UserResponseCommonFields `json:"user,omitempty"`
}

This event is sent when a message gets flagged. The event contains information about the message that was flagged.

func (*MessageFlaggedEvent) GetEventType ΒΆ

func (e *MessageFlaggedEvent) GetEventType() string

type MessageHistoryEntryResponse ΒΆ

type MessageHistoryEntryResponse struct {
	IsDeleted          bool           `json:"is_deleted"`
	MessageID          string         `json:"message_id"`
	MessageUpdatedAt   Timestamp      `json:"message_updated_at"`
	MessageUpdatedByID string         `json:"message_updated_by_id"`
	Text               string         `json:"text"`
	Attachments        []Attachment   `json:"attachments"`
	Custom             map[string]any `json:"custom"`
}

type MessageModerationResult ΒΆ

type MessageModerationResult struct {
	// Action taken by automod
	Action string `json:"action"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// ID of the message
	MessageID string `json:"message_id"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// Whether user has bad karma
	UserBadKarma bool `json:"user_bad_karma"`
	// Karma of the user
	UserKarma float64 `json:"user_karma"`
	// Word that was blocked
	BlockedWord *string `json:"blocked_word,omitempty"`
	// Name of the blocklist
	BlocklistName *string `json:"blocklist_name,omitempty"`
	// User who moderated the message
	ModeratedBy          *string             `json:"moderated_by,omitempty"`
	AiModerationResponse *ModerationResponse `json:"ai_moderation_response,omitempty"`
	// Sets thresholds for AI moderation
	ModerationThresholds *Thresholds `json:"moderation_thresholds,omitempty"`
}

Result of the message moderation

type MessageNewEvent ΒΆ

type MessageNewEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	MessageID string    `json:"message_id"`
	// The number of watchers
	WatcherCount int            `json:"watcher_count"`
	Custom       map[string]any `json:"custom"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// The type of event: "message.new" in this case
	Type string `json:"type"`
	// The ID of the channel where the message was sent
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel where the message was sent
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the message was sent
	Cid *string `json:"cid,omitempty"`
	// The author of the parent message
	ParentAuthor *string    `json:"parent_author,omitempty"`
	ReceivedAt   *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team             *string `json:"team,omitempty"`
	TotalUnreadCount *int    `json:"total_unread_count,omitempty"`
	UnreadChannels   *int    `json:"unread_channels,omitempty"`
	// The number of unread messages
	UnreadCount *int `json:"unread_count,omitempty"`
	// The participants of the thread
	ThreadParticipants []UserResponseCommonFields `json:"thread_participants,omitempty"`
	// Represents channel in chat
	Channel               *ChannelResponse          `json:"channel,omitempty"`
	ChannelCustom         map[string]any            `json:"channel_custom,omitempty"`
	GroupedUnreadChannels map[string]int            `json:"grouped_unread_channels,omitempty"`
	User                  *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a message was successfully sent or when a message became visible after command execution.

func (*MessageNewEvent) GetEventType ΒΆ

func (e *MessageNewEvent) GetEventType() string

type MessageOptions ΒΆ

type MessageOptions struct {
	IncludeThreadParticipants *bool    `json:"include_thread_participants,omitempty"`
	MemberCustomInclude       []string `json:"member_custom_include,omitempty"`
}

type MessagePaginationParams ΒΆ

type MessagePaginationParams struct {
	// The timestamp to get messages with a created_at timestamp greater than
	CreatedAtAfter *Timestamp `json:"created_at_after,omitempty"`
	// The timestamp to get messages with a created_at timestamp greater than or equal to
	CreatedAtAfterOrEqual *Timestamp `json:"created_at_after_or_equal,omitempty"`
	// The result will be a set of messages, that are both older and newer than the created_at timestamp provided, distributed evenly around the timestamp
	CreatedAtAround *Timestamp `json:"created_at_around,omitempty"`
	// The timestamp to get messages with a created_at timestamp smaller than
	CreatedAtBefore *Timestamp `json:"created_at_before,omitempty"`
	// The timestamp to get messages with a created_at timestamp smaller than or equal to
	CreatedAtBeforeOrEqual *Timestamp `json:"created_at_before_or_equal,omitempty"`
	// The result will be a set of messages, that are both older and newer than the message with the provided ID, and the message with the ID provided will be in the middle of the set
	IDAround *string `json:"id_around,omitempty"`
	// The ID of the message to get messages with a timestamp greater than
	IDGt *string `json:"id_gt,omitempty"`
	// The ID of the message to get messages with a timestamp greater than or equal to
	IDGte *string `json:"id_gte,omitempty"`
	// The ID of the message to get messages with a timestamp smaller than
	IDLt *string `json:"id_lt,omitempty"`
	// The ID of the message to get messages with a timestamp smaller than or equal to
	IDLte *string `json:"id_lte,omitempty"`
	// The maximum number of messages to return (max limit
	Limit *int `json:"limit,omitempty"`
}

type MessageReadEvent ΒΆ

type MessageReadEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "message.read" in this case
	Type string `json:"type"`
	// The ID of the channel where the message was read
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel where the message was read
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the message was read
	Cid *string `json:"cid,omitempty"`
	// The ID of the last read message
	LastReadMessageID *string    `json:"last_read_message_id,omitempty"`
	ReceivedAt        *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team *string `json:"team,omitempty"`
	// Represents channel in chat
	Channel       *ChannelResponse          `json:"channel,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	Thread        *ThreadResponse           `json:"thread,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel or thread is marked as read.

func (*MessageReadEvent) GetEventType ΒΆ

func (e *MessageReadEvent) GetEventType() string

type MessageRequest ΒΆ

type MessageRequest struct {
	// Contains HTML markup of the message. Can only be set when using server-side API
	Html *string `json:"html,omitempty"`
	// Message ID is unique string identifier of the message
	ID               *string `json:"id,omitempty"`
	MentionedChannel *bool   `json:"mentioned_channel,omitempty"`
	MentionedHere    *bool   `json:"mentioned_here,omitempty"`
	// Should be empty if `text` is provided. Can only be set when using server-side API
	Mml *string `json:"mml,omitempty"`
	// ID of parent message (thread)
	ParentID *string `json:"parent_id,omitempty"`
	// Date when pinned message expires
	PinExpires *Timestamp `json:"pin_expires,omitempty"`
	// Whether message is pinned or not
	Pinned *bool `json:"pinned,omitempty"`
	// Date when message got pinned
	PinnedAt *Timestamp `json:"pinned_at,omitempty"`
	// Identifier of the poll to include in the message
	PollID          *string `json:"poll_id,omitempty"`
	QuotedMessageID *string `json:"quoted_message_id,omitempty"`
	// Whether thread reply should be shown in the channel as well
	ShowInChannel *bool `json:"show_in_channel,omitempty"`
	// Whether message is silent or not
	Silent *bool `json:"silent,omitempty"`
	// Text of the message. Should be empty if `mml` is provided
	Text   *string `json:"text,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Contains type of the message. One of: regular, system
	Type *string `json:"type,omitempty"`
	// Array of message attachments
	Attachments []Attachment `json:"attachments,omitempty"`
	// List of user group IDs to mention. Group members who are also channel members will receive push notifications. Max 10 groups
	MentionedGroupIds []string `json:"mentioned_group_ids,omitempty"`
	MentionedRoles    []string `json:"mentioned_roles,omitempty"`
	// Array of user IDs to mention
	MentionedUsers []string `json:"mentioned_users,omitempty"`
	// A list of user ids that have restricted visibility to the message
	RestrictedVisibility []string        `json:"restricted_visibility,omitempty"`
	Custom               map[string]any  `json:"custom,omitempty"`
	SharedLocation       *SharedLocation `json:"shared_location,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

Message data for creating or updating a message

type MessageResponse ΒΆ

type MessageResponse struct {
	// Channel unique identifier in <type>:<id> format
	Cid string `json:"cid"`
	// Date/time of creation
	CreatedAt         Timestamp `json:"created_at"`
	DeletedReplyCount int       `json:"deleted_reply_count"`
	// Contains HTML markup of the message. Can only be set when using server-side API
	Html string `json:"html"`
	// Message ID is unique string identifier of the message
	ID string `json:"id"`
	// Whether the message mentioned the channel tag
	MentionedChannel bool `json:"mentioned_channel"`
	// Whether the message mentioned online users with @here tag
	MentionedHere bool `json:"mentioned_here"`
	// Whether message is pinned or not
	Pinned bool `json:"pinned"`
	// Number of replies to this message
	ReplyCount int `json:"reply_count"`
	// Whether the message was shadowed or not
	Shadowed bool `json:"shadowed"`
	// Whether message is silent or not
	Silent bool `json:"silent"`
	// Text of the message. Should be empty if `mml` is provided
	Text string `json:"text"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted
	Type string `json:"type"`
	// Array of message attachments
	Attachments []Attachment `json:"attachments"`
	// List of 10 latest reactions to this message
	LatestReactions []ReactionResponse `json:"latest_reactions"`
	// List of mentioned users
	MentionedUsers []UserResponse `json:"mentioned_users"`
	// List of 10 latest reactions of authenticated user to this message
	OwnReactions []ReactionResponse `json:"own_reactions"`
	// A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list
	RestrictedVisibility []string       `json:"restricted_visibility"`
	Custom               map[string]any `json:"custom"`
	// An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int)
	ReactionCounts map[string]int `json:"reaction_counts"`
	// An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int)
	ReactionScores map[string]int `json:"reaction_scores"`
	// User response object
	User UserResponse `json:"user"`
	// Contains provided slash command
	Command *string `json:"command,omitempty"`
	// Date/time of deletion
	DeletedAt            *Timestamp `json:"deleted_at,omitempty"`
	DeletedForMe         *bool      `json:"deleted_for_me,omitempty"`
	MessageTextUpdatedAt *Timestamp `json:"message_text_updated_at,omitempty"`
	// Should be empty if `text` is provided. Can only be set when using server-side API
	Mml *string `json:"mml,omitempty"`
	// ID of parent message (thread)
	ParentID *string `json:"parent_id,omitempty"`
	// Date when pinned message expires
	PinExpires *Timestamp `json:"pin_expires,omitempty"`
	// Date when message got pinned
	PinnedAt *Timestamp `json:"pinned_at,omitempty"`
	// Identifier of the poll to include in the message
	PollID          *string `json:"poll_id,omitempty"`
	QuotedMessageID *string `json:"quoted_message_id,omitempty"`
	// Whether thread reply should be shown in the channel as well
	ShowInChannel *bool `json:"show_in_channel,omitempty"`
	// List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups
	MentionedGroupIds []string `json:"mentioned_group_ids,omitempty"`
	// List of mentioned user group objects.
	MentionedGroups []UserGroupResponse `json:"mentioned_groups,omitempty"`
	// List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles
	MentionedRoles []string `json:"mentioned_roles,omitempty"`
	// List of users who participate in thread
	ThreadParticipants []UserResponse `json:"thread_participants,omitempty"`
	Draft              *DraftResponse `json:"draft,omitempty"`
	// Object with translations. Key `language` contains the original language key. Other keys contain translations
	I18n map[string]string `json:"i18n,omitempty"`
	// Contains image moderation information
	ImageLabels map[string][]string           `json:"image_labels,omitempty"`
	Member      *ChannelMemberPartialResponse `json:"member,omitempty"`
	Moderation  *ModerationV2Response         `json:"moderation,omitempty"`
	// User response object
	PinnedBy *UserResponse     `json:"pinned_by,omitempty"`
	Poll     *PollResponseData `json:"poll,omitempty"`
	// Represents any chat message
	QuotedMessage  *MessageResponse                  `json:"quoted_message,omitempty"`
	ReactionGroups map[string]*ReactionGroupResponse `json:"reaction_groups,omitempty"`
	Reminder       *ReminderResponseData             `json:"reminder,omitempty"`
	SharedLocation *SharedLocationResponseData       `json:"shared_location,omitempty"`
}

Represents any chat message

type MessageStatsResponse ΒΆ

type MessageStatsResponse struct {
	CountOverTime []CountByMinuteResponse `json:"count_over_time,omitempty"`
}

type MessageUnblockedEvent ΒΆ

type MessageUnblockedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	MessageID string         `json:"message_id"`
	Custom    map[string]any `json:"custom"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// The type of event: "message.unblocked" in this case
	Type string `json:"type"`
	// The CID of the channel where the message was unblocked
	Cid        *string                   `json:"cid,omitempty"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a message is unblocked.

func (*MessageUnblockedEvent) GetEventType ΒΆ

func (e *MessageUnblockedEvent) GetEventType() string

type MessageUndeletedEvent ΒΆ

type MessageUndeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	MessageID string         `json:"message_id"`
	Custom    map[string]any `json:"custom"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// The type of event: "message.undeleted" in this case
	Type string `json:"type"`
	// The ID of the channel where the message was sent
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel where the message was sent
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the message was sent
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string        `json:"team,omitempty"`
	ChannelCustom map[string]any `json:"channel_custom,omitempty"`
}

Emitted when a message is undeleted.

func (*MessageUndeletedEvent) GetEventType ΒΆ

func (e *MessageUndeletedEvent) GetEventType() string

type MessageUpdate ΒΆ

type MessageUpdate struct {
	OldText   *string           `json:"old_text,omitempty"`
	ChangeSet *MessageChangeSet `json:"change_set,omitempty"`
}

type MessageUpdatedEvent ΒΆ

type MessageUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	MessageID string         `json:"message_id"`
	Custom    map[string]any `json:"custom"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// The type of event: "message.updated" in this case
	Type string `json:"type"`
	// The ID of the channel where the message was sent
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel where the message was sent
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the message was sent
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	MessageUpdate *MessageUpdate            `json:"message_update,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a BaseEvent is updated with translation data or when a message is updated.

func (*MessageUpdatedEvent) GetEventType ΒΆ

func (e *MessageUpdatedEvent) GetEventType() string

type MessageWithChannelResponse ΒΆ

type MessageWithChannelResponse struct {
	// Channel unique identifier in <type>:<id> format
	Cid string `json:"cid"`
	// Date/time of creation
	CreatedAt         Timestamp `json:"created_at"`
	DeletedReplyCount int       `json:"deleted_reply_count"`
	// Contains HTML markup of the message. Can only be set when using server-side API
	Html string `json:"html"`
	// Message ID is unique string identifier of the message
	ID string `json:"id"`
	// Whether the message mentioned the channel tag
	MentionedChannel bool `json:"mentioned_channel"`
	// Whether the message mentioned online users with @here tag
	MentionedHere bool `json:"mentioned_here"`
	// Whether message is pinned or not
	Pinned bool `json:"pinned"`
	// Number of replies to this message
	ReplyCount int `json:"reply_count"`
	// Whether the message was shadowed or not
	Shadowed bool `json:"shadowed"`
	// Whether message is silent or not
	Silent bool `json:"silent"`
	// Text of the message. Should be empty if `mml` is provided
	Text string `json:"text"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted
	Type string `json:"type"`
	// Array of message attachments
	Attachments []Attachment `json:"attachments"`
	// List of 10 latest reactions to this message
	LatestReactions []ReactionResponse `json:"latest_reactions"`
	// List of mentioned users
	MentionedUsers []UserResponse `json:"mentioned_users"`
	// List of 10 latest reactions of authenticated user to this message
	OwnReactions []ReactionResponse `json:"own_reactions"`
	// A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list
	RestrictedVisibility []string `json:"restricted_visibility"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int)
	ReactionCounts map[string]int `json:"reaction_counts"`
	// An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int)
	ReactionScores map[string]int `json:"reaction_scores"`
	// User response object
	User UserResponse `json:"user"`
	// Contains provided slash command
	Command *string `json:"command,omitempty"`
	// Date/time of deletion
	DeletedAt            *Timestamp `json:"deleted_at,omitempty"`
	DeletedForMe         *bool      `json:"deleted_for_me,omitempty"`
	MessageTextUpdatedAt *Timestamp `json:"message_text_updated_at,omitempty"`
	// Should be empty if `text` is provided. Can only be set when using server-side API
	Mml *string `json:"mml,omitempty"`
	// ID of parent message (thread)
	ParentID *string `json:"parent_id,omitempty"`
	// Date when pinned message expires
	PinExpires *Timestamp `json:"pin_expires,omitempty"`
	// Date when message got pinned
	PinnedAt *Timestamp `json:"pinned_at,omitempty"`
	// Identifier of the poll to include in the message
	PollID          *string `json:"poll_id,omitempty"`
	QuotedMessageID *string `json:"quoted_message_id,omitempty"`
	// Whether thread reply should be shown in the channel as well
	ShowInChannel *bool `json:"show_in_channel,omitempty"`
	// List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups
	MentionedGroupIds []string `json:"mentioned_group_ids,omitempty"`
	// List of mentioned user group objects.
	MentionedGroups []UserGroupResponse `json:"mentioned_groups,omitempty"`
	// List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles
	MentionedRoles []string `json:"mentioned_roles,omitempty"`
	// List of users who participate in thread
	ThreadParticipants []UserResponse `json:"thread_participants,omitempty"`
	Draft              *DraftResponse `json:"draft,omitempty"`
	// Object with translations. Key `language` contains the original language key. Other keys contain translations
	I18n map[string]string `json:"i18n,omitempty"`
	// Contains image moderation information
	ImageLabels map[string][]string           `json:"image_labels,omitempty"`
	Member      *ChannelMemberPartialResponse `json:"member,omitempty"`
	Moderation  *ModerationV2Response         `json:"moderation,omitempty"`
	// User response object
	PinnedBy *UserResponse     `json:"pinned_by,omitempty"`
	Poll     *PollResponseData `json:"poll,omitempty"`
	// Represents any chat message
	QuotedMessage  *MessageResponse                  `json:"quoted_message,omitempty"`
	ReactionGroups map[string]*ReactionGroupResponse `json:"reaction_groups,omitempty"`
	Reminder       *ReminderResponseData             `json:"reminder,omitempty"`
	SharedLocation *SharedLocationResponseData       `json:"shared_location,omitempty"`
}

Represents any chat message

type MetricDescriptor ΒΆ

type MetricDescriptor struct {
	Label       string  `json:"label"`
	Description *string `json:"description,omitempty"`
	Unit        *string `json:"unit,omitempty"`
}

type MetricStats ΒΆ

type MetricStats struct {
	// Aggregated total value
	Total int `json:"total"`
	// Per-day values (only present in daily mode)
	Daily []DailyValue `json:"daily,omitempty"`
}

Statistics for a single metric with optional daily breakdown

type MetricThreshold ΒΆ

type MetricThreshold struct {
	Level         string  `json:"level"`
	Operator      string  `json:"operator"`
	Value         float64 `json:"value"`
	ValueUnit     *string `json:"value_unit,omitempty"`
	WindowSeconds *int    `json:"window_seconds,omitempty"`
}

type MetricTimeSeries ΒΆ

type MetricTimeSeries struct {
	DataPoints [][]float64 `json:"data_points,omitempty"`
}

type MetricsPct ΒΆ added in v5.3.0

type MetricsPct struct {
	Freezes      *float64 `json:"freezes,omitempty"`
	Geo          *float64 `json:"geo,omitempty"`
	Jitter       *float64 `json:"jitter,omitempty"`
	Latency      *float64 `json:"latency,omitempty"`
	QualityScore *float64 `json:"quality_score,omitempty"`
}

type ModerationActionConfigResponse ΒΆ

type ModerationActionConfigResponse struct {
	// The action to take
	Action string `json:"action"`
	// Description of what this action does
	Description string `json:"description"`
	// Type of entity this action applies to
	EntityType string `json:"entity_type"`
	// Icon for the dashboard
	Icon string `json:"icon"`
	// Display order (lower numbers shown first)
	Order int     `json:"order"`
	ID    *string `json:"id,omitempty"`
	// Queue type this action config belongs to
	QueueType *string `json:"queue_type,omitempty"`
	// Custom data for the action
	Custom map[string]any `json:"custom,omitempty"`
}

Configuration for a moderation action

type ModerationAnalysisFailedEvent ΒΆ added in v5.3.0

type ModerationAnalysisFailedEvent struct {
	CreatedAt Timestamp `json:"created_at"`
	Type      string    `json:"type"`
	// The moderation policy key the request targeted.
	ConfigKey *string `json:"config_key,omitempty"`
	// Echo of the `entity_creator_id` on the /analyze request.
	EntityCreatorID *string `json:"entity_creator_id,omitempty"`
	// Echo of the `entity_id` on the /analyze request.
	EntityID *string `json:"entity_id,omitempty"`
	// Echo of the `entity_type` on the /analyze request.
	EntityType *string    `json:"entity_type,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// Echo of the request's `content_ids`, keyed by text/image label. On keyframe and caption streams every request repeats the same entity_type/entity_id/entity_creator_id, so this is what identifies the specific submission that went unscreened.
	ContentIds map[string]string `json:"content_ids,omitempty"`
	// Echo of the `custom` metadata on the /analyze request.
	Custom map[string]any `json:"custom,omitempty"`
}

An /analyze call was acknowledged but its moderation could not be completed, so no verdict exists for the content. The content was NOT screened β€” treat it as unverified rather than clean, and re-submit if a verdict is required.

func (*ModerationAnalysisFailedEvent) GetEventType ΒΆ added in v5.3.0

func (e *ModerationAnalysisFailedEvent) GetEventType() string

type ModerationBanResponse ΒΆ

type ModerationBanResponse struct {
	Duration string `json:"duration"`
}

type ModerationCallResponse ΒΆ

type ModerationCallResponse struct {
	Backstage            bool           `json:"backstage"`
	Captioning           bool           `json:"captioning"`
	Cid                  string         `json:"cid"`
	CreatedAt            Timestamp      `json:"created_at"`
	CurrentSessionID     string         `json:"current_session_id"`
	ID                   string         `json:"id"`
	Recording            bool           `json:"recording"`
	Transcribing         bool           `json:"transcribing"`
	Translating          bool           `json:"translating"`
	UpdatedAt            Timestamp      `json:"updated_at"`
	Type                 string         `json:"type"`
	BlockedUserIds       []string       `json:"blocked_user_ids"`
	Custom               map[string]any `json:"custom"`
	ChannelCid           *string        `json:"channel_cid,omitempty"`
	EndedAt              *Timestamp     `json:"ended_at,omitempty"`
	JoinAheadTimeSeconds *int           `json:"join_ahead_time_seconds,omitempty"`
	RoutingNumber        *string        `json:"routing_number,omitempty"`
	StartsAt             *Timestamp     `json:"starts_at,omitempty"`
	Team                 *string        `json:"team,omitempty"`
	// User response object
	CreatedBy *UserResponse `json:"created_by,omitempty"`
}

type ModerationCheckCompletedEvent ΒΆ

type ModerationCheckCompletedEvent struct {
	CreatedAt Timestamp `json:"created_at"`
	// The ID of entity which was moderated
	EntityID string `json:"entity_id"`
	// The type of the entity which was moderated
	EntityType string `json:"entity_type"`
	// The recommended action
	RecommendedAction string `json:"recommended_action"`
	// The review queue item ID
	ReviewQueueItemID string         `json:"review_queue_item_id"`
	Custom            map[string]any `json:"custom"`
	Type              string         `json:"type"`
	ReceivedAt        *Timestamp     `json:"received_at,omitempty"`
}

This event is sent when a moderation check is completed

func (*ModerationCheckCompletedEvent) GetEventType ΒΆ

func (e *ModerationCheckCompletedEvent) GetEventType() string

type ModerationClient ΒΆ

type ModerationClient struct {
	// contains filtered or unexported fields
}

func NewModerationClient ΒΆ

func NewModerationClient(client *Client) *ModerationClient

func (*ModerationClient) Analyze ΒΆ

Moderate named text fields and raw image bytes via multipart/form-data. Returns a per-field lightweight verdict.

func (*ModerationClient) Appeal ΒΆ

Appeal against the moderation decision

func (*ModerationClient) Ban ΒΆ

Ban a user from a channel or the entire app

func (*ModerationClient) BulkActionAppeals ΒΆ

Process multiple appeals in a single request by applying the specified action to each. Supported actions: unban, restore, unblock, mark_reviewed, reject_appeal. Each appeal goes through the same path as a single submit_action call.

func (*ModerationClient) BulkDeleteActionConfig ΒΆ

Delete multiple moderation action config entries by UUID in a single request.

func (*ModerationClient) BulkImageModeration ΒΆ

Moderate multiple images in bulk using a CSV file

func (*ModerationClient) BulkUpsertActionConfig ΒΆ

Create or update multiple moderation action config entries in a single request. Omit the ID field to create; provide an ID to update.

func (*ModerationClient) Bypass ΒΆ

Enable or disable moderation bypass for a user. This endpoint is server-side only.

func (*ModerationClient) Check ΒΆ

Run moderation checks on the provided content

func (*ModerationClient) CheckS3Access ΒΆ

Verifies that the configured IAM role ARN can access private S3 images for moderation. Optionally accepts a stream+s3:// URL to check access to a specific object.

func (*ModerationClient) CreatePolicyTestSet ΒΆ added in v5.3.0

Save a labeled set of messages that can be re-run against the moderation policy.

func (*ModerationClient) CreateQueue ΒΆ

func (*ModerationClient) CustomCheck ΒΆ

Custom check, add your own AI model reports to the review queue

func (*ModerationClient) DeleteActionConfig ΒΆ

Delete a specific moderation action config entry by its UUID.

func (*ModerationClient) DeleteConfig ΒΆ

Delete a specific moderation policy by its name

func (*ModerationClient) DeleteModerationRule ΒΆ

Delete an existing moderation rule

func (*ModerationClient) DeletePolicyTestSet ΒΆ added in v5.3.0

func (c *ModerationClient) DeletePolicyTestSet(ctx context.Context, id string, request *DeletePolicyTestSetRequest) (*StreamResponse[Response], error)

func (*ModerationClient) DeleteQueue ΒΆ

func (*ModerationClient) Flag ΒΆ

Flag any type of content (messages, users, channels, activities) for moderation review. Supports custom content types and additional metadata for flagged content.

func (*ModerationClient) GetActionConfig ΒΆ

Returns moderation action configs grouped by entity type, sorted by order ascending. Supports fetching DB-configured actions, hardcoded defaults, or both.

func (*ModerationClient) GetAppeal ΒΆ

Retrieve a specific appeal item by its ID

func (*ModerationClient) GetConfig ΒΆ

Retrieve a specific moderation configuration by its key and team. This configuration contains settings for various moderation features like toxicity detection, AI analysis, and filtering rules.

func (*ModerationClient) GetFlagCount ΒΆ

Returns the number of moderation flags created against a specific user's content. Optionally filter by entity type.

func (*ModerationClient) GetModerationRule ΒΆ

Get a specific moderation rule by ID

func (*ModerationClient) GetPolicyTestRun ΒΆ added in v5.3.0

func (*ModerationClient) GetPolicyTestSet ΒΆ added in v5.3.0

func (*ModerationClient) GetQueue ΒΆ

func (*ModerationClient) GetReviewQueueItem ΒΆ

Retrieve a specific review queue item by its ID

func (*ModerationClient) GetSetupSession ΒΆ

Retrieve a setup session for an app

func (*ModerationClient) InsertActionLog ΒΆ

Insert a moderation action log entry. Server-side only. Used by product services to log moderation-related actions.

func (*ModerationClient) Labels ΒΆ

Run moderation on text and return labels

func (*ModerationClient) ListPolicyTestSets ΒΆ added in v5.3.0

func (*ModerationClient) ListQueues ΒΆ

func (*ModerationClient) Mute ΒΆ

Mute a user. Mutes are generally not visible to the user you mute, while block is something you notice.

func (*ModerationClient) QueryAppeals ΒΆ

Query Appeals

func (*ModerationClient) QueryLabelResults ΒΆ

Search and filter moderation label results with support for pagination and sorting. View the history of moderation labels applied to content.

func (*ModerationClient) QueryModerationConfigs ΒΆ

Search and filter moderation configurations across your application. This endpoint is designed for building moderation dashboards and managing multiple configuration sets.

func (*ModerationClient) QueryModerationFlags ΒΆ

Query flags associated with moderation items. This is used for building a moderation dashboard.

func (*ModerationClient) QueryModerationLogs ΒΆ

Search and filter moderation action logs with support for pagination. View the history of moderation actions taken, including who performed them and when.

func (*ModerationClient) QueryModerationRules ΒΆ

Search and filter moderation rules across your application. This endpoint is designed for building moderation dashboards and managing multiple rule sets.

func (*ModerationClient) QueryReviewQueue ΒΆ

Query review queue items allows you to filter the review queue items. This is used for building a moderation dashboard.

func (*ModerationClient) StartPolicyTestRun ΒΆ added in v5.3.0

Enqueue a background run of the set against the saved live moderation config.

func (*ModerationClient) SubmitAction ΒΆ

Take action on flagged content, such as marking content as safe, deleting content, banning users, or executing custom moderation actions. Supports various action types with configurable parameters.

func (*ModerationClient) SubmitModerationFeedback ΒΆ

Forward a moderator-supplied correction to the moderation feedback pipeline. Server-side only.

func (*ModerationClient) Unban ΒΆ

Unban a user from a channel or globally.

func (*ModerationClient) Unmute ΒΆ

Unmute a user

func (*ModerationClient) UpdateQueue ΒΆ

func (*ModerationClient) UpsertActionConfig ΒΆ

Create a new moderation action config entry or update an existing one. Action configs control the action buttons displayed in the moderation dashboard for each entity type.

func (*ModerationClient) UpsertConfig ΒΆ

Create a new moderation configuration or update an existing one. Configure settings for content filtering, AI analysis, toxicity detection, and other moderation features.

func (*ModerationClient) UpsertModerationRule ΒΆ

Create or update a moderation rule that can apply app-wide or to specific moderation configs

func (*ModerationClient) UpsertSetupSession ΒΆ

Update a setup session for an app

func (*ModerationClient) V2DeleteTemplate ΒΆ

Delete a specific moderation template by its name

func (*ModerationClient) V2QueryTemplates ΒΆ

Retrieve a list of feed moderation templates that define preset moderation rules and configurations. Limited to 100 templates per request.

func (*ModerationClient) V2UpsertTemplate ΒΆ

Upsert feeds template for moderation

type ModerationConfig ΒΆ

type ModerationConfig struct {
	Async                              *bool                               `json:"async,omitempty"`
	CreatedAt                          *Timestamp                          `json:"created_at,omitempty"`
	Key                                *string                             `json:"key,omitempty"`
	Team                               *string                             `json:"team,omitempty"`
	UpdatedAt                          *Timestamp                          `json:"updated_at,omitempty"`
	SupportedVideoCallHarmTypes        []string                            `json:"supported_video_call_harm_types,omitempty"`
	AiImageConfig                      *AIImageConfig                      `json:"ai_image_config,omitempty"`
	AiImageLiteConfig                  *BodyguardImageAnalysisConfig       `json:"ai_image_lite_config,omitempty"`
	AiTextConfig                       *AITextConfig                       `json:"ai_text_config,omitempty"`
	AiVideoConfig                      *AIVideoConfig                      `json:"ai_video_config,omitempty"`
	AutomodPlatformCircumventionConfig *AutomodPlatformCircumventionConfig `json:"automod_platform_circumvention_config,omitempty"`
	AutomodSemanticFiltersConfig       *AutomodSemanticFiltersConfig       `json:"automod_semantic_filters_config,omitempty"`
	AutomodToxicityConfig              *AutomodToxicityConfig              `json:"automod_toxicity_config,omitempty"`
	BlockListConfig                    *BlockListConfig                    `json:"block_list_config,omitempty"`
	FloodConfig                        *FloodConfig                        `json:"flood_config,omitempty"`
	GoogleVisionConfig                 *GoogleVisionConfig                 `json:"google_vision_config,omitempty"`
	LlmConfig                          *LLMConfig                          `json:"llm_config,omitempty"`
	VelocityFilterConfig               *VelocityFilterConfig               `json:"velocity_filter_config,omitempty"`
	VideoCallRuleConfig                *VideoCallRuleConfig                `json:"video_call_rule_config,omitempty"`
}

type ModerationCustomActionEvent ΒΆ

type ModerationCustomActionEvent struct {
	// The ID of the custom action that was executed
	ActionID        string                  `json:"action_id"`
	CreatedAt       Timestamp               `json:"created_at"`
	Custom          map[string]any          `json:"custom"`
	ReviewQueueItem ReviewQueueItemResponse `json:"review_queue_item"`
	Type            string                  `json:"type"`
	ReceivedAt      *Timestamp              `json:"received_at,omitempty"`
	// Additional options passed to the custom action
	ActionOptions map[string]any `json:"action_options,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
}

This event is sent when a custom moderation action is executed

func (*ModerationCustomActionEvent) GetEventType ΒΆ

func (e *ModerationCustomActionEvent) GetEventType() string

type ModerationDashboardPreferences ΒΆ

type ModerationDashboardPreferences struct {
	AsyncReviewQueueUpsert         *bool                      `json:"async_review_queue_upsert,omitempty"`
	BlockForeignCdnAttachments     *bool                      `json:"block_foreign_cdn_attachments,omitempty"`
	CustomViewsEnabled             *bool                      `json:"custom_views_enabled,omitempty"`
	DisableAuditLogs               *bool                      `json:"disable_audit_logs,omitempty"`
	DisableFlaggingReviewedEntity  *bool                      `json:"disable_flagging_reviewed_entity,omitempty"`
	EscalationQueueEnabled         *bool                      `json:"escalation_queue_enabled,omitempty"`
	FlagUserOnFlaggedContent       *bool                      `json:"flag_user_on_flagged_content,omitempty"`
	IncludeAttachmentPayload       *bool                      `json:"include_attachment_payload,omitempty"`
	MediaQueueBlurEnabled          *bool                      `json:"media_queue_blur_enabled,omitempty"`
	AllowedModerationActionReasons []string                   `json:"allowed_moderation_action_reasons,omitempty"`
	EscalationReasons              []string                   `json:"escalation_reasons,omitempty"`
	FilterableCustomKeys           []string                   `json:"filterable_custom_keys,omitempty"`
	KeyframeClassificationsMap     map[string]map[string]bool `json:"keyframe_classifications_map,omitempty"`
	OverviewDashboard              *OverviewDashboardConfig   `json:"overview_dashboard,omitempty"`
}

type ModerationFlagResponse ΒΆ

type ModerationFlagResponse struct {
	CreatedAt         Timestamp        `json:"created_at"`
	EntityID          string           `json:"entity_id"`
	EntityType        string           `json:"entity_type"`
	UpdatedAt         Timestamp        `json:"updated_at"`
	UserID            string           `json:"user_id"`
	Type              string           `json:"type"`
	Result            []map[string]any `json:"result"`
	EntityCreatorID   *string          `json:"entity_creator_id,omitempty"`
	Reason            *string          `json:"reason,omitempty"`
	ReviewQueueItemID *string          `json:"review_queue_item_id,omitempty"`
	Labels            []string         `json:"labels,omitempty"`
	Custom            map[string]any   `json:"custom,omitempty"`
	// Content payload for moderation
	ModerationPayload *ModerationPayloadResponse `json:"moderation_payload,omitempty"`
	ReviewQueueItem   *ReviewQueueItemResponse   `json:"review_queue_item,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ModerationFlaggedEvent ΒΆ

type ModerationFlaggedEvent struct {
	// The type of content that was flagged
	ContentType string    `json:"content_type"`
	CreatedAt   Timestamp `json:"created_at"`
	// The ID of the flagged content
	ObjectID   string         `json:"object_id"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
}

This event is sent when content is flagged for moderation

func (*ModerationFlaggedEvent) GetEventType ΒΆ

func (e *ModerationFlaggedEvent) GetEventType() string

type ModerationImageAnalysisCompleteEvent ΒΆ

type ModerationImageAnalysisCompleteEvent struct {
	CreatedAt Timestamp `json:"created_at"`
	Type      string    `json:"type"`
	// The moderation policy key that was applied.
	ConfigKey *string `json:"config_key,omitempty"`
	// Echo of the `entity_creator_id` on the /analyze request.
	EntityCreatorID *string `json:"entity_creator_id,omitempty"`
	// Echo of the `entity_id` on the /analyze request.
	EntityID *string `json:"entity_id,omitempty"`
	// Echo of the `entity_type` on the /analyze request.
	EntityType *string    `json:"entity_type,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// Review queue row ID for deep-linking into the dashboard.
	ReviewQueueItemID *string `json:"review_queue_item_id,omitempty"`
	// Echo of the `custom` metadata on the /analyze request.
	Custom map[string]any `json:"custom,omitempty"`
	// Per-image verdicts, same shape as the /analyze HTTP response. Each entry carries `id` when the request supplied `content_ids`.
	Images map[string]AnalyzeImageField `json:"images,omitempty"`
	// Per-text-field verdicts, same shape as the /analyze HTTP response. Each entry carries `id` when the request supplied `content_ids`.
	Texts map[string]AnalyzeTextField `json:"texts,omitempty"`
}

Per-image moderation verdict from /analyze. Fires on every /analyze call that included image inputs (callers also get the verdict on the HTTP response β€” this event is the audit / reconciliation tap). For the /analyze origin it replaces the legacy review_queue_item.* + moderation_check.completed events.

func (*ModerationImageAnalysisCompleteEvent) GetEventType ΒΆ

func (e *ModerationImageAnalysisCompleteEvent) GetEventType() string

type ModerationMarkReviewedEvent ΒΆ

type ModerationMarkReviewedEvent struct {
	CreatedAt  Timestamp               `json:"created_at"`
	Custom     map[string]any          `json:"custom"`
	Item       ReviewQueueItemResponse `json:"item"`
	Type       string                  `json:"type"`
	ReceivedAt *Timestamp              `json:"received_at,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
}

This event is sent when a moderation item is marked as reviewed

func (*ModerationMarkReviewedEvent) GetEventType ΒΆ

func (e *ModerationMarkReviewedEvent) GetEventType() string

type ModerationPayload ΒΆ

type ModerationPayload struct {
	Audios           []string          `json:"audios,omitempty"`
	ImageOrderedKeys []string          `json:"image_ordered_keys,omitempty"`
	Images           []string          `json:"images,omitempty"`
	OtherMedia       []string          `json:"other_media,omitempty"`
	TextOrderedKeys  []string          `json:"text_ordered_keys,omitempty"`
	Texts            []string          `json:"texts,omitempty"`
	Videos           []string          `json:"videos,omitempty"`
	Custom           map[string]any    `json:"custom,omitempty"`
	ImageIds         map[string]string `json:"image_ids,omitempty"`
	TextIds          map[string]string `json:"text_ids,omitempty"`
}

type ModerationPayloadRequest ΒΆ

type ModerationPayloadRequest struct {
	// Audio URLs to moderate
	Audios []string `json:"audios,omitempty"`
	// Image URLs to moderate (max 30)
	Images []string `json:"images,omitempty"`
	// Text content to moderate
	Texts []string `json:"texts,omitempty"`
	// Video URLs to moderate
	Videos []string `json:"videos,omitempty"`
	// Custom data for moderation
	Custom map[string]any `json:"custom,omitempty"`
}

Content payload for moderation

type ModerationPayloadResponse ΒΆ

type ModerationPayloadResponse struct {
	// Audio URLs to moderate
	Audios []string `json:"audios,omitempty"`
	// Caller-supplied keys for images, index-aligned with images[]
	ImageOrderedKeys []string `json:"image_ordered_keys,omitempty"`
	// Image URLs to moderate
	Images []string `json:"images,omitempty"`
	// Media URLs from attachments outside the typed image/video/audio lists (custom attachment types such as GIF pickers)
	OtherMedia []string `json:"other_media,omitempty"`
	// Caller-supplied keys for texts (e.g. "title", "description"), index-aligned with texts[]
	TextOrderedKeys []string `json:"text_ordered_keys,omitempty"`
	// Text content to moderate
	Texts []string `json:"texts,omitempty"`
	// Video URLs to moderate
	Videos []string `json:"videos,omitempty"`
	// Custom data for moderation
	Custom map[string]any `json:"custom,omitempty"`
	// Caller-supplied content IDs per image key (from content_ids on /analyze)
	ImageIds map[string]string `json:"image_ids,omitempty"`
	// Caller-supplied content IDs per text key (from content_ids on /analyze)
	TextIds map[string]string `json:"text_ids,omitempty"`
}

Content payload for moderation

type ModerationQueueResponse ΒΆ

type ModerationQueueResponse struct {
	CreatedAt   Timestamp        `json:"created_at"`
	CreatedBy   string           `json:"created_by"`
	Description string           `json:"description"`
	ID          string           `json:"id"`
	ItemCount   int              `json:"item_count"`
	Name        string           `json:"name"`
	UpdatedAt   Timestamp        `json:"updated_at"`
	Type        string           `json:"type"`
	Sort        []map[string]any `json:"sort"`
	Filters     map[string]any   `json:"filters"`
}

type ModerationResponse ΒΆ

type ModerationResponse struct {
	Action   string  `json:"action"`
	Explicit float64 `json:"explicit"`
	Spam     float64 `json:"spam"`
	Toxic    float64 `json:"toxic"`
}

type ModerationRuleInfo ΒΆ

type ModerationRuleInfo struct {
	Description string `json:"description"`
	ID          string `json:"id"`
	Name        string `json:"name"`
	Type        string `json:"type"`
}

type ModerationRuleV2Response ΒΆ

type ModerationRuleV2Response struct {
	CreatedAt       Timestamp                   `json:"created_at"`
	Description     string                      `json:"description"`
	Enabled         bool                        `json:"enabled"`
	ID              string                      `json:"id"`
	Name            string                      `json:"name"`
	RuleType        string                      `json:"rule_type"`
	Team            string                      `json:"team"`
	UpdatedAt       Timestamp                   `json:"updated_at"`
	ConfigKeys      []string                    `json:"config_keys"`
	CooldownPeriod  *string                     `json:"cooldown_period,omitempty"`
	Logic           *string                     `json:"logic,omitempty"`
	ActionSequences []CallRuleActionSequence    `json:"action_sequences,omitempty"`
	Conditions      []RuleBuilderCondition      `json:"conditions,omitempty"`
	Groups          []RuleBuilderConditionGroup `json:"groups,omitempty"`
	Action          *RuleBuilderAction          `json:"action,omitempty"`
}

type ModerationRulesTriggeredEvent ΒΆ

type ModerationRulesTriggeredEvent struct {
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the entity that triggered the rule
	EntityID string `json:"entity_id"`
	// The type of the entity (call, user, message, etc.)
	EntityType string `json:"entity_type"`
	// The ID of the user who triggered the rule
	UserID string `json:"user_id"`
	// Array of action types that were triggered
	TriggeredActions []string           `json:"triggered_actions"`
	Custom           map[string]any     `json:"custom"`
	Rule             ModerationRuleInfo `json:"rule"`
	Type             string             `json:"type"`
	ReceivedAt       *Timestamp         `json:"received_at,omitempty"`
	// The review queue item ID if applicable
	ReviewQueueItemID *string `json:"review_queue_item_id,omitempty"`
	// The violation number for call rules (optional)
	ViolationNumber *int `json:"violation_number,omitempty"`
	// Ordered list of contents whose verdicts contributed to an aggregation rule's threshold. Populated only for aggregation rules when callers supplied `content_ids`.
	MatchedContents []MatchedContent `json:"matched_contents,omitempty"`
}

This event is sent automatically whenever a rule builder rule is triggered

func (*ModerationRulesTriggeredEvent) GetEventType ΒΆ

func (e *ModerationRulesTriggeredEvent) GetEventType() string

type ModerationTextAnalysisCompleteEvent ΒΆ

type ModerationTextAnalysisCompleteEvent struct {
	CreatedAt Timestamp `json:"created_at"`
	Type      string    `json:"type"`
	// The moderation policy key that was applied.
	ConfigKey *string `json:"config_key,omitempty"`
	// Echo of the `entity_creator_id` on the /analyze request.
	EntityCreatorID *string `json:"entity_creator_id,omitempty"`
	// Echo of the `entity_id` on the /analyze request.
	EntityID *string `json:"entity_id,omitempty"`
	// Echo of the `entity_type` on the /analyze request.
	EntityType *string    `json:"entity_type,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// Review queue row ID for deep-linking into the dashboard.
	ReviewQueueItemID *string `json:"review_queue_item_id,omitempty"`
	// Echo of the `custom` metadata on the /analyze request.
	Custom map[string]any `json:"custom,omitempty"`
	// Per-text-field verdicts, same shape as the /analyze HTTP response. Each entry carries `id` when the request supplied `content_ids`.
	Texts map[string]AnalyzeTextField `json:"texts,omitempty"`
}

Per-text moderation verdict from /analyze. Fires on every /analyze call that included text inputs. Sibling of moderation.image_analysis.complete with the same audit / reconciliation purpose; for the /analyze origin this event replaces the legacy review_queue_item.* + moderation_check.completed events.

func (*ModerationTextAnalysisCompleteEvent) GetEventType ΒΆ

func (e *ModerationTextAnalysisCompleteEvent) GetEventType() string

type ModerationV2Response ΒΆ

type ModerationV2Response struct {
	Action                string   `json:"action"`
	OriginalText          string   `json:"original_text"`
	BlocklistMatched      *string  `json:"blocklist_matched,omitempty"`
	PlatformCircumvented  *bool    `json:"platform_circumvented,omitempty"`
	SemanticFilterMatched *string  `json:"semantic_filter_matched,omitempty"`
	BlocklistsMatched     []string `json:"blocklists_matched,omitempty"`
	ImageHarms            []string `json:"image_harms,omitempty"`
	TextHarms             []string `json:"text_harms,omitempty"`
}

type MuteChannelRequest ΒΆ

type MuteChannelRequest struct {
	// Duration of mute in milliseconds
	Expiration *int    `json:"expiration,omitempty"`
	UserID     *string `json:"user_id,omitempty"`
	// Channel CIDs to mute (if multiple channels)
	ChannelCids []string `json:"channel_cids"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type MuteChannelResponse ΒΆ

type MuteChannelResponse struct {
	Duration string `json:"duration"`
	// Object with mutes (if multiple channels were muted)
	ChannelMutes []ChannelMute    `json:"channel_mutes,omitempty"`
	ChannelMute  *ChannelMute     `json:"channel_mute,omitempty"`
	OwnUser      *OwnUserResponse `json:"own_user,omitempty"`
}

type MuteRequest ΒΆ

type MuteRequest struct {
	// User IDs to mute (if multiple users)
	TargetIds []string `json:"target_ids"`
	// Duration of mute in minutes
	Timeout *int    `json:"timeout,omitempty"`
	UserID  *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type MuteResponse ΒΆ

type MuteResponse struct {
	Duration string `json:"duration"`
	// Object with mutes (if multiple users were muted)
	Mutes []UserMuteResponse `json:"mutes,omitempty"`
	// A list of users that can't be found. Common cause for this is deleted users
	NonExistingUsers []string         `json:"non_existing_users,omitempty"`
	OwnUser          *OwnUserResponse `json:"own_user,omitempty"`
}

type MuteUsersRequest ΒΆ

type MuteUsersRequest struct {
	Audio            *bool    `json:"audio,omitempty"`
	MuteAllUsers     *bool    `json:"mute_all_users,omitempty"`
	MutedByID        *string  `json:"muted_by_id,omitempty"`
	Screenshare      *bool    `json:"screenshare,omitempty"`
	ScreenshareAudio *bool    `json:"screenshare_audio,omitempty"`
	Video            *bool    `json:"video,omitempty"`
	UserIds          []string `json:"user_ids"`
	// User request object
	MutedBy *UserRequest `json:"muted_by,omitempty"`
}

type MuteUsersResponse ΒΆ

type MuteUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

MuteUsersResponse is the response payload for the mute users endpoint.

type NetworkMetricsReportResponse ΒΆ

type NetworkMetricsReportResponse struct {
	AverageConnectionTime  *float64 `json:"average_connection_time,omitempty"`
	AverageJitter          *float64 `json:"average_jitter,omitempty"`
	AverageLatency         *float64 `json:"average_latency,omitempty"`
	AverageTimeToReconnect *float64 `json:"average_time_to_reconnect,omitempty"`
}

type NoiseCancellationSettings ΒΆ

type NoiseCancellationSettings struct {
	Mode string `json:"mode"`
}

type NotificationComment ΒΆ

type NotificationComment struct {
	Comment     string       `json:"comment"`
	ID          string       `json:"id"`
	UserID      string       `json:"user_id"`
	Attachments []Attachment `json:"attachments,omitempty"`
}

type NotificationConfig ΒΆ

type NotificationConfig struct {
	// Time window for deduplicating notification activities (reactions and follows). Empty or '0' = always deduplicate (default). Examples: '1h', '24h', '7d', '1w'
	DeduplicationWindow *string `json:"deduplication_window,omitempty"`
	// Whether to track read status
	TrackRead *bool `json:"track_read,omitempty"`
	// Whether to track seen status
	TrackSeen *bool `json:"track_seen,omitempty"`
}

type NotificationContext ΒΆ

type NotificationContext struct {
	Target  *NotificationTarget  `json:"target,omitempty"`
	Trigger *NotificationTrigger `json:"trigger,omitempty"`
}

type NotificationFeedUpdatedEvent ΒΆ

type NotificationFeedUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the feed
	Fid    string         `json:"fid"`
	Custom map[string]any `json:"custom"`
	// The type of event: "feeds.notification_feed.updated" in this case
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
	// Aggregated activities for notification feeds
	AggregatedActivities []AggregatedActivityResponse `json:"aggregated_activities,omitempty"`
	NotificationStatus   *NotificationStatusResponse  `json:"notification_status,omitempty"`
	User                 *UserResponseCommonFields    `json:"user,omitempty"`
}

Emitted when notification feed is updated.

func (*NotificationFeedUpdatedEvent) GetEventType ΒΆ

func (e *NotificationFeedUpdatedEvent) GetEventType() string

type NotificationMarkUnreadEvent ΒΆ

type NotificationMarkUnreadEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "notification.mark_unread" in this case
	Type string `json:"type"`
	// The ID of the channel which was marked as unread
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount  *int `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel which was marked as unread
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel which was marked as unread
	Cid *string `json:"cid,omitempty"`
	// The ID of the first unread message
	FirstUnreadMessageID *string `json:"first_unread_message_id,omitempty"`
	// The time when the channel/thread was marked as unread
	LastReadAt *Timestamp `json:"last_read_at,omitempty"`
	// The ID of the last read message
	LastReadMessageID *string    `json:"last_read_message_id,omitempty"`
	ReceivedAt        *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team *string `json:"team,omitempty"`
	// The ID of the thread which was marked as unread
	ThreadID *string `json:"thread_id,omitempty"`
	// The total number of unread messages
	TotalUnreadCount *int `json:"total_unread_count,omitempty"`
	// The number of channels with unread messages
	UnreadChannels *int `json:"unread_channels,omitempty"`
	// The total number of unread messages
	UnreadCount *int `json:"unread_count,omitempty"`
	// The number of unread messages in the channel/thread after first_unread_message_id
	UnreadMessages *int `json:"unread_messages,omitempty"`
	// The total number of unread messages in the threads
	UnreadThreadMessages *int `json:"unread_thread_messages,omitempty"`
	// The number of unread threads
	UnreadThreads *int `json:"unread_threads,omitempty"`
	// Represents channel in chat
	Channel               *ChannelResponse          `json:"channel,omitempty"`
	ChannelCustom         map[string]any            `json:"channel_custom,omitempty"`
	GroupedUnreadChannels map[string]int            `json:"grouped_unread_channels,omitempty"`
	User                  *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a channel/thread is marked as unread.

func (*NotificationMarkUnreadEvent) GetEventType ΒΆ

func (e *NotificationMarkUnreadEvent) GetEventType() string

type NotificationParentActivity ΒΆ

type NotificationParentActivity struct {
	ID          string       `json:"id"`
	Text        *string      `json:"text,omitempty"`
	UserID      *string      `json:"user_id,omitempty"`
	Type        *string      `json:"type,omitempty"`
	Attachments []Attachment `json:"attachments,omitempty"`
}

type NotificationSettings ΒΆ

type NotificationSettings struct {
	Enabled          bool                      `json:"enabled"`
	CallLiveStarted  EventNotificationSettings `json:"call_live_started"`
	CallMissed       EventNotificationSettings `json:"call_missed"`
	CallNotification EventNotificationSettings `json:"call_notification"`
	CallRing         EventNotificationSettings `json:"call_ring"`
	SessionStarted   EventNotificationSettings `json:"session_started"`
}

type NotificationSettingsRequest ΒΆ

type NotificationSettingsRequest struct {
	Enabled          *bool                             `json:"enabled,omitempty"`
	CallLiveStarted  *EventNotificationSettingsRequest `json:"call_live_started,omitempty"`
	CallMissed       *EventNotificationSettingsRequest `json:"call_missed,omitempty"`
	CallNotification *EventNotificationSettingsRequest `json:"call_notification,omitempty"`
	CallRing         *EventNotificationSettingsRequest `json:"call_ring,omitempty"`
	SessionStarted   *EventNotificationSettingsRequest `json:"session_started,omitempty"`
}

type NotificationSettingsResponse ΒΆ

type NotificationSettingsResponse struct {
	Enabled          bool                              `json:"enabled"`
	CallLiveStarted  EventNotificationSettingsResponse `json:"call_live_started"`
	CallMissed       EventNotificationSettingsResponse `json:"call_missed"`
	CallNotification EventNotificationSettingsResponse `json:"call_notification"`
	CallRing         EventNotificationSettingsResponse `json:"call_ring"`
	SessionStarted   EventNotificationSettingsResponse `json:"session_started"`
}

type NotificationStatusResponse ΒΆ

type NotificationStatusResponse struct {
	// Number of unread notifications
	Unread int `json:"unread"`
	// Number of unseen notifications
	Unseen int `json:"unseen"`
	// When notifications were last read
	LastReadAt *Timestamp `json:"last_read_at,omitempty"`
	// When notifications were last seen
	LastSeenAt *Timestamp `json:"last_seen_at,omitempty"`
	// Deprecated: use is_read on each activity/group instead. IDs of activities that have been read. Capped at ~101 entries for aggregated feeds.
	ReadActivities []string `json:"read_activities,omitempty"`
	// Deprecated: use is_seen on each activity/group instead. IDs of activities that have been seen. Capped at ~101 entries for aggregated feeds.
	SeenActivities []string `json:"seen_activities,omitempty"`
}

type NotificationTarget ΒΆ

type NotificationTarget struct {
	// The ID of the target (activity ID or user ID)
	ID string `json:"id"`
	// The name of the target user (for user targets like follows)
	Name *string `json:"name,omitempty"`
	// The text content of the target activity (for activity targets)
	Text *string `json:"text,omitempty"`
	// The ID of the user who created the target activity (for activity targets)
	UserID *string `json:"user_id,omitempty"`
	// The type of the target activity (for activity targets)
	Type *string `json:"type,omitempty"`
	// Attachments on the target activity (for activity targets)
	Attachments []Attachment         `json:"attachments,omitempty"`
	Comment     *NotificationComment `json:"comment,omitempty"`
	// Custom data from the target activity
	Custom         map[string]any              `json:"custom,omitempty"`
	ParentActivity *NotificationParentActivity `json:"parent_activity,omitempty"`
}

type NotificationThreadMessageNewEvent ΒΆ

type NotificationThreadMessageNewEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	MessageID string    `json:"message_id"`
	// The ID of the thread
	ThreadID string `json:"thread_id"`
	// The number of watchers
	WatcherCount int `json:"watcher_count"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// The type of event: "notification.message_new" in this case
	Type string `json:"type"`
	// The ID of the channel where the message was sent
	ChannelID           *string `json:"channel_id,omitempty"`
	ChannelMemberCount  *int    `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int    `json:"channel_message_count,omitempty"`
	// The type of the channel where the message was sent
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the message was sent
	Cid          *string    `json:"cid,omitempty"`
	ParentAuthor *string    `json:"parent_author,omitempty"`
	ReceivedAt   *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team                 *string `json:"team,omitempty"`
	UnreadThreadMessages *int    `json:"unread_thread_messages,omitempty"`
	UnreadThreads        *int    `json:"unread_threads,omitempty"`
	// The participants of the thread
	ThreadParticipants []UserResponseCommonFields `json:"thread_participants,omitempty"`
	ChannelCustom      map[string]any             `json:"channel_custom,omitempty"`
}

Emitted when a new message was sent to a thread.

func (*NotificationThreadMessageNewEvent) GetEventType ΒΆ

func (e *NotificationThreadMessageNewEvent) GetEventType() string

type NotificationTrigger ΒΆ

type NotificationTrigger struct {
	// Human-readable text describing the notification
	Text string `json:"text"`
	// The type of notification (mention, reaction, comment, follow, etc.)
	Type    string               `json:"type"`
	Comment *NotificationComment `json:"comment,omitempty"`
	// Custom data from the trigger object (comment, reaction, etc.)
	Custom map[string]any `json:"custom,omitempty"`
}

type OCRContentParameters ΒΆ

type OCRContentParameters struct {
	LabelOperator *string  `json:"label_operator,omitempty"`
	Severity      *string  `json:"severity,omitempty"`
	HarmLabels    []string `json:"harm_labels,omitempty"`
}

type OCRRule ΒΆ

type OCRRule struct {
	Action string `json:"action"`
	Label  string `json:"label"`
}

type OnlyUserID ΒΆ

type OnlyUserID struct {
	ID string `json:"id"`
}

type OverviewDashboardConfig ΒΆ

type OverviewDashboardConfig struct {
	DefaultDateRangeDays *int     `json:"default_date_range_days,omitempty"`
	VisibleCharts        []string `json:"visible_charts,omitempty"`
}

type OwnBatchRequest ΒΆ

type OwnBatchRequest struct {
	// List of feed IDs to get own fields for
	Feeds  []string `json:"feeds"`
	UserID *string  `json:"user_id,omitempty"`
	// Optional list of specific fields to return. If not specified, all fields (own_follows, own_followings, own_capabilities, own_membership) are returned
	Fields []string `json:"fields"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type OwnBatchResponse ΒΆ

type OwnBatchResponse struct {
	Duration string `json:"duration"`
	// Map of feed ID to own fields data
	Data map[string]FeedOwnData `json:"data"`
}

type OwnCapability ΒΆ

type OwnCapability string
const (
	BLOCK_USERS                  OwnCapability = "block-users"
	CHANGE_MAX_DURATION          OwnCapability = "change-max-duration"
	CREATE_CALL                  OwnCapability = "create-call"
	CREATE_REACTION              OwnCapability = "create-reaction"
	ENABLE_NOISE_CANCELLATION    OwnCapability = "enable-noise-cancellation"
	END_CALL                     OwnCapability = "end-call"
	JOIN_BACKSTAGE               OwnCapability = "join-backstage"
	JOIN_CALL                    OwnCapability = "join-call"
	JOIN_ENDED_CALL              OwnCapability = "join-ended-call"
	KICK_USER                    OwnCapability = "kick-user"
	MUTE_USERS                   OwnCapability = "mute-users"
	PIN_FOR_EVERYONE             OwnCapability = "pin-for-everyone"
	READ_CALL                    OwnCapability = "read-call"
	REMOVE_CALL_MEMBER           OwnCapability = "remove-call-member"
	SCREENSHARE                  OwnCapability = "screenshare"
	SEND_AUDIO                   OwnCapability = "send-audio"
	SEND_CLOSED_CAPTIONS_CALL    OwnCapability = "send-closed-captions-call"
	SEND_VIDEO                   OwnCapability = "send-video"
	START_BROADCAST_CALL         OwnCapability = "start-broadcast-call"
	START_CLOSED_CAPTIONS_CALL   OwnCapability = "start-closed-captions-call"
	START_FRAME_RECORD_CALL      OwnCapability = "start-frame-record-call"
	START_INDIVIDUAL_RECORD_CALL OwnCapability = "start-individual-record-call"
	START_RAW_RECORD_CALL        OwnCapability = "start-raw-record-call"
	START_RECORD_CALL            OwnCapability = "start-record-call"
	START_TRANSCRIPTION_CALL     OwnCapability = "start-transcription-call"
	STOP_BROADCAST_CALL          OwnCapability = "stop-broadcast-call"
	STOP_CLOSED_CAPTIONS_CALL    OwnCapability = "stop-closed-captions-call"
	STOP_FRAME_RECORD_CALL       OwnCapability = "stop-frame-record-call"
	STOP_INDIVIDUAL_RECORD_CALL  OwnCapability = "stop-individual-record-call"
	STOP_RAW_RECORD_CALL         OwnCapability = "stop-raw-record-call"
	STOP_RECORD_CALL             OwnCapability = "stop-record-call"
	STOP_TRANSCRIPTION_CALL      OwnCapability = "stop-transcription-call"
	UPDATE_CALL                  OwnCapability = "update-call"
	UPDATE_CALL_MEMBER           OwnCapability = "update-call-member"
	UPDATE_CALL_PERMISSIONS      OwnCapability = "update-call-permissions"
	UPDATE_CALL_SETTINGS         OwnCapability = "update-call-settings"
)

func (OwnCapability) String ΒΆ

func (c OwnCapability) String() string

type OwnUserResponse ΒΆ

type OwnUserResponse struct {
	Banned                   bool                     `json:"banned"`
	CreatedAt                Timestamp                `json:"created_at"`
	ID                       string                   `json:"id"`
	Invisible                bool                     `json:"invisible"`
	Language                 string                   `json:"language"`
	Online                   bool                     `json:"online"`
	Role                     string                   `json:"role"`
	TotalUnreadCount         int                      `json:"total_unread_count"`
	UnreadChannels           int                      `json:"unread_channels"`
	UnreadCount              int                      `json:"unread_count"`
	UnreadThreads            int                      `json:"unread_threads"`
	UpdatedAt                Timestamp                `json:"updated_at"`
	ChannelMutes             []ChannelMute            `json:"channel_mutes"`
	Devices                  []DeviceResponse         `json:"devices"`
	Mutes                    []UserMuteResponse       `json:"mutes"`
	Teams                    []string                 `json:"teams"`
	Custom                   map[string]any           `json:"custom"`
	AvgResponseTime          *int                     `json:"avg_response_time,omitempty"`
	DeactivatedAt            *Timestamp               `json:"deactivated_at,omitempty"`
	DeletedAt                *Timestamp               `json:"deleted_at,omitempty"`
	Image                    *string                  `json:"image,omitempty"`
	LastActive               *Timestamp               `json:"last_active,omitempty"`
	Name                     *string                  `json:"name,omitempty"`
	RevokeTokensIssuedBefore *Timestamp               `json:"revoke_tokens_issued_before,omitempty"`
	BlockedUserIds           []string                 `json:"blocked_user_ids,omitempty"`
	LatestHiddenChannels     []string                 `json:"latest_hidden_channels,omitempty"`
	PrivacySettings          *PrivacySettingsResponse `json:"privacy_settings,omitempty"`
	PushPreferences          *PushPreferencesResponse `json:"push_preferences,omitempty"`
	TeamsRole                map[string]string        `json:"teams_role,omitempty"`
	TotalUnreadCountByTeam   map[string]int           `json:"total_unread_count_by_team,omitempty"`
}

type PagerRequest ΒΆ

type PagerRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
}

type PagerResponse ΒΆ

type PagerResponse struct {
	Next *string `json:"next,omitempty"`
	Prev *string `json:"prev,omitempty"`
}

type PaginationParams ΒΆ

type PaginationParams struct {
	Limit  *int `json:"limit,omitempty"`
	Offset *int `json:"offset,omitempty"`
}

type ParsedPredefinedFilterResponse ΒΆ

type ParsedPredefinedFilterResponse struct {
	Name   string             `json:"name"`
	Filter map[string]any     `json:"filter"`
	Sort   []SortParamRequest `json:"sort,omitempty"`
}

type ParticipantCountByMinuteResponse ΒΆ

type ParticipantCountByMinuteResponse struct {
	First   int       `json:"first"`
	Last    int       `json:"last"`
	Max     int       `json:"max"`
	Min     int       `json:"min"`
	StartTs Timestamp `json:"start_ts"`
}

type ParticipantCountOverTimeResponse ΒΆ

type ParticipantCountOverTimeResponse struct {
	ByMinute []ParticipantCountByMinuteResponse `json:"by_minute,omitempty"`
}

type ParticipantReportResponse ΒΆ

type ParticipantReportResponse struct {
	Sum               int                               `json:"sum"`
	Unique            int                               `json:"unique"`
	MaxConcurrent     *int                              `json:"max_concurrent,omitempty"`
	ByBrowser         []GroupedStatsResponse            `json:"by_browser,omitempty"`
	ByCountry         []GroupedStatsResponse            `json:"by_country,omitempty"`
	ByDevice          []GroupedStatsResponse            `json:"by_device,omitempty"`
	ByOperatingSystem []GroupedStatsResponse            `json:"by_operating_system,omitempty"`
	CountOverTime     *ParticipantCountOverTimeResponse `json:"count_over_time,omitempty"`
	Publishers        *PublisherStatsResponse           `json:"publishers,omitempty"`
	Subscribers       *SubscriberStatsResponse          `json:"subscribers,omitempty"`
}

type ParticipantSeriesPublisherStats ΒΆ

type ParticipantSeriesPublisherStats struct {
	GlobalMetricsOrder []string                                   `json:"global_metrics_order,omitempty"`
	Global             map[string][][]float64                     `json:"global,omitempty"`
	GlobalMeta         map[string]MetricDescriptor                `json:"global_meta,omitempty"`
	GlobalThresholds   map[string][]MetricThreshold               `json:"global_thresholds,omitempty"`
	Tracks             map[string][]ParticipantSeriesTrackMetrics `json:"tracks,omitempty"`
}

type ParticipantSeriesSubscriberStats ΒΆ

type ParticipantSeriesSubscriberStats struct {
	GlobalMetricsOrder []string                                    `json:"global_metrics_order,omitempty"`
	Subscriptions      []ParticipantSeriesSubscriptionTrackMetrics `json:"subscriptions,omitempty"`
	Global             map[string][][]float64                      `json:"global,omitempty"`
	GlobalMeta         map[string]MetricDescriptor                 `json:"global_meta,omitempty"`
	GlobalThresholds   map[string][]MetricThreshold                `json:"global_thresholds,omitempty"`
}

type ParticipantSeriesSubscriptionTrackMetrics ΒΆ

type ParticipantSeriesSubscriptionTrackMetrics struct {
	PublisherUserID        string                                     `json:"publisher_user_id"`
	PublisherName          *string                                    `json:"publisher_name,omitempty"`
	PublisherUserSessionID *string                                    `json:"publisher_user_session_id,omitempty"`
	Tracks                 map[string][]ParticipantSeriesTrackMetrics `json:"tracks,omitempty"`
}

type ParticipantSeriesTimeframe ΒΆ

type ParticipantSeriesTimeframe struct {
	MaxPoints   int       `json:"max_points"`
	Since       Timestamp `json:"since"`
	StepSeconds int       `json:"step_seconds"`
	Until       Timestamp `json:"until"`
}

type ParticipantSeriesTrackMetrics ΒΆ

type ParticipantSeriesTrackMetrics struct {
	TrackID      string                       `json:"track_id"`
	Codec        *string                      `json:"codec,omitempty"`
	Label        *string                      `json:"label,omitempty"`
	Rid          *string                      `json:"rid,omitempty"`
	TrackType    *string                      `json:"track_type,omitempty"`
	MetricsOrder []string                     `json:"metrics_order,omitempty"`
	Metrics      map[string][][]float64       `json:"metrics,omitempty"`
	MetricsMeta  map[string]MetricDescriptor  `json:"metrics_meta,omitempty"`
	Thresholds   map[string][]MetricThreshold `json:"thresholds,omitempty"`
}

type ParticipantSeriesUserStats ΒΆ

type ParticipantSeriesUserStats struct {
	MetricsOrder []string                     `json:"metrics_order,omitempty"`
	Metrics      map[string][][]float64       `json:"metrics,omitempty"`
	MetricsMeta  map[string]MetricDescriptor  `json:"metrics_meta,omitempty"`
	Thresholds   map[string][]MetricThreshold `json:"thresholds,omitempty"`
}

type ParticipantSessionDetails ΒΆ

type ParticipantSessionDetails struct {
	PublisherType     string     `json:"publisher_type"`
	UserID            string     `json:"user_id"`
	UserSessionID     string     `json:"user_session_id"`
	Roles             []string   `json:"roles"`
	DurationInSeconds *int       `json:"duration_in_seconds,omitempty"`
	JoinedAt          *Timestamp `json:"joined_at,omitempty"`
	LeftAt            *Timestamp `json:"left_at,omitempty"`
}

type PendingMessageEvent ΒΆ

type PendingMessageEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The method used for the pending message
	Method string         `json:"method"`
	Custom map[string]any `json:"custom"`
	// The type of event: "message.pending" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
	// Metadata attached to the pending message
	Metadata map[string]string `json:"metadata,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

Pending message event for async moderation

func (*PendingMessageEvent) GetEventType ΒΆ

func (e *PendingMessageEvent) GetEventType() string

type PendingMessageResponse ΒΆ

type PendingMessageResponse struct {
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// Represents any chat message
	Message  *MessageResponse  `json:"message,omitempty"`
	Metadata map[string]string `json:"metadata,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type PerSDKUsageReport ΒΆ

type PerSDKUsageReport struct {
	Total     int            `json:"total"`
	ByVersion map[string]int `json:"by_version"`
}

type Percentiles ΒΆ added in v5.3.0

type Percentiles struct {
	P50 *float64 `json:"p50,omitempty"`
	P95 *float64 `json:"p95,omitempty"`
}

type Permission ΒΆ

type Permission struct {
	// Action name this permission is for (e.g. SendMessage)
	Action string `json:"action"`
	// Whether this is a custom permission or built-in
	Custom bool `json:"custom"`
	// Description of the permission
	Description string `json:"description"`
	// Unique permission ID
	ID string `json:"id"`
	// Level at which permission could be applied (app or channel). One of: app, channel
	Level string `json:"level"`
	// Name of the permission
	Name string `json:"name"`
	// Whether this permission applies to resource owner or not
	Owner bool `json:"owner"`
	// Resource type that defines ownership for this permission's action (e.g. 'Channel' for CreateMessage, 'Message' for UpdateMessage). Identical across all variants of an action; primarily meaningful for owner grants.
	OwnerResource string `json:"owner_resource"`
	// Whether this permission applies to teammates (multi-tenancy mode only)
	SameTeam bool `json:"same_team"`
	// List of tags of the permission
	Tags []string `json:"tags"`
	// MongoDB style condition which decides whether or not the permission is granted
	Condition map[string]any `json:"condition,omitempty"`
}

type PermissionRequestEvent ΒΆ

type PermissionRequestEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The list of permissions requested by the user
	Permissions []string `json:"permissions"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.permission_request" in this case
	Type string `json:"type"`
}

This event is sent when a user requests access to a feature on a call, clients receiving this event should display a permission request to the user

func (*PermissionRequestEvent) GetEventType ΒΆ

func (e *PermissionRequestEvent) GetEventType() string

type PinActivityRequest ΒΆ

type PinActivityRequest struct {
	// If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool   `json:"enrich_own_fields,omitempty"`
	UserID          *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type PinActivityResponse ΒΆ

type PinActivityResponse struct {
	// When the activity was pinned
	CreatedAt Timestamp `json:"created_at"`
	Duration  string    `json:"duration"`
	// Fully qualified ID of the feed the activity was pinned to
	Feed string `json:"feed"`
	// ID of the user who pinned the activity
	UserID   string           `json:"user_id"`
	Activity ActivityResponse `json:"activity"`
}

type PinRequest ΒΆ

type PinRequest struct {
	// the session ID of the user who pinned the message
	SessionID string `json:"session_id"`
	// the user ID of the user who pinned the message
	UserID string `json:"user_id"`
}

PinRequest is the payload for pinning a message.

type PinResponse ΒΆ

type PinResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type PlatformDataResponse ΒΆ

type PlatformDataResponse struct {
	Browser BrowserDataResponse  `json:"browser"`
	Device  DeviceDataResponse   `json:"device"`
	Os      ClientOSDataResponse `json:"os"`
}

type Policy ΒΆ

type Policy struct {
	Action    int       `json:"action"`
	CreatedAt Timestamp `json:"created_at"`
	Name      string    `json:"name"`
	Owner     bool      `json:"owner"`
	Priority  int       `json:"priority"`
	UpdatedAt Timestamp `json:"updated_at"`
	Resources []string  `json:"resources"`
	Roles     []string  `json:"roles"`
}

type PolicyConfig ΒΆ

type PolicyConfig struct {
	MaxAgeHours int `json:"max_age_hours"`
}

type PolicyRequest ΒΆ

type PolicyRequest struct {
	Action string `json:"action"`
	// User-friendly policy name
	Name string `json:"name"`
	// Whether policy applies to resource owner or not
	Owner bool `json:"owner"`
	// Policy priority
	Priority int `json:"priority"`
	// List of resources to apply policy to
	Resources []string `json:"resources"`
	// List of roles to apply policy to
	Roles []string `json:"roles"`
}

Policy request

type PolicyTestLabelDrift ΒΆ added in v5.3.0

type PolicyTestLabelDrift struct {
	Changed int `json:"changed"`
	Same    int `json:"same"`
}

type PolicyTestResult ΒΆ added in v5.3.0

type PolicyTestResult struct {
	CreatedAt      Timestamp      `json:"created_at"`
	ID             int            `json:"id"`
	MessageText    string         `json:"message_text"`
	RowIndex       int            `json:"row_index"`
	RunID          string         `json:"run_id"`
	Scored         bool           `json:"scored"`
	ActualAction   *string        `json:"actual_action,omitempty"`
	ExpectedAction *string        `json:"expected_action,omitempty"`
	FailureReason  *string        `json:"failure_reason,omitempty"`
	Passed         *bool          `json:"passed,omitempty"`
	Severity       *string        `json:"severity,omitempty"`
	ActualLabels   []string       `json:"actual_labels,omitempty"`
	ExpectedLabels []string       `json:"expected_labels,omitempty"`
	RawResponse    map[string]any `json:"raw_response,omitempty"`
}

type PolicyTestRow ΒΆ added in v5.3.0

type PolicyTestRow struct {
	ContentType       *string  `json:"content_type,omitempty"`
	Policy            *string  `json:"policy,omitempty"`
	RecommendedAction *string  `json:"recommended_action,omitempty"`
	Text              *string  `json:"text,omitempty"`
	Labels            []string `json:"labels,omitempty"`
}

type PolicyTestRun ΒΆ added in v5.3.0

type PolicyTestRun struct {
	ConfigKey       string                `json:"config_key"`
	CreatedAt       Timestamp             `json:"created_at"`
	ID              string                `json:"id"`
	RowsCompleted   int                   `json:"rows_completed"`
	RowsTotal       int                   `json:"rows_total"`
	SetID           string                `json:"set_id"`
	Status          string                `json:"status"`
	TaskID          string                `json:"task_id"`
	TriggeredBy     string                `json:"triggered_by"`
	CompletedAt     *Timestamp            `json:"completed_at,omitempty"`
	ConfigUpdatedAt *Timestamp            `json:"config_updated_at,omitempty"`
	ErrorMessage    *string               `json:"error_message,omitempty"`
	StartedAt       *Timestamp            `json:"started_at,omitempty"`
	Metrics         *PolicyTestRunMetrics `json:"metrics,omitempty"`
}

type PolicyTestRunMetrics ΒΆ added in v5.3.0

type PolicyTestRunMetrics struct {
	Mode    string                          `json:"mode"`
	Totals  PolicyTestTotals                `json:"totals"`
	ByLabel map[string]PolicyTestLabelDrift `json:"by_label,omitempty"`
}

type PolicyTestRunResponse ΒΆ added in v5.3.0

type PolicyTestRunResponse struct {
	Duration string `json:"duration"`
	// Per-row results (only present once the run has finished)
	Results []PolicyTestResult `json:"results,omitempty"`
	Run     *PolicyTestRun     `json:"run,omitempty"`
}

type PolicyTestSeedSpec ΒΆ added in v5.3.0

type PolicyTestSeedSpec struct {
	// How many rows to sample, newest first; capped at 1000
	Limit int `json:"limit"`
	// Sample only records carrying any of these labels; empty samples everything
	Labels []string `json:"labels,omitempty"`
}

type PolicyTestSet ΒΆ added in v5.3.0

type PolicyTestSet struct {
	ConfigKey string          `json:"config_key"`
	CreatedAt Timestamp       `json:"created_at"`
	CreatedBy string          `json:"created_by"`
	ID        string          `json:"id"`
	Mode      string          `json:"mode"`
	Name      string          `json:"name"`
	RowCount  int             `json:"row_count"`
	UpdatedAt Timestamp       `json:"updated_at"`
	Team      *string         `json:"team,omitempty"`
	Rows      []PolicyTestRow `json:"rows,omitempty"`
	LastRun   *PolicyTestRun  `json:"last_run,omitempty"`
}

type PolicyTestSetListResponse ΒΆ added in v5.3.0

type PolicyTestSetListResponse struct {
	Duration string `json:"duration"`
	// List of policy test sets for the app
	Sets []PolicyTestSet `json:"sets"`
}

type PolicyTestSetResponse ΒΆ added in v5.3.0

type PolicyTestSetResponse struct {
	Duration string `json:"duration"`
	// The set's baseline run (earliest completed run); later runs are scored against it. Absent until the first run completes
	BaselineRunID *string `json:"baseline_run_id,omitempty"`
	// Retained run history for this set, newest first
	RecentRuns []PolicyTestRun `json:"recent_runs,omitempty"`
	Set        *PolicyTestSet  `json:"set,omitempty"`
}

type PolicyTestTotals ΒΆ added in v5.3.0

type PolicyTestTotals struct {
	Failed   int `json:"failed"`
	Passed   int `json:"passed"`
	Rows     int `json:"rows"`
	Scored   int `json:"scored"`
	Unscored int `json:"unscored"`
}

type PollOptionInput ΒΆ

type PollOptionInput struct {
	Text   *string        `json:"text,omitempty"`
	Custom map[string]any `json:"custom,omitempty"`
}

type PollOptionRequest ΒΆ

type PollOptionRequest struct {
	ID     string         `json:"id"`
	Text   *string        `json:"text,omitempty"`
	Custom map[string]any `json:"custom,omitempty"`
}

type PollOptionResponse ΒΆ

type PollOptionResponse struct {
	// Duration of the request in milliseconds
	Duration   string                 `json:"duration"`
	PollOption PollOptionResponseData `json:"poll_option"`
}

type PollOptionResponseData ΒΆ

type PollOptionResponseData struct {
	ID     string         `json:"id"`
	Text   string         `json:"text"`
	Custom map[string]any `json:"custom"`
}

type PollResponse ΒΆ

type PollResponse struct {
	// Duration of the request in milliseconds
	Duration string           `json:"duration"`
	Poll     PollResponseData `json:"poll"`
}

type PollResponseData ΒΆ

type PollResponseData struct {
	AllowAnswers              bool                              `json:"allow_answers"`
	AllowUserSuggestedOptions bool                              `json:"allow_user_suggested_options"`
	AnswersCount              int                               `json:"answers_count"`
	CreatedAt                 Timestamp                         `json:"created_at"`
	CreatedByID               string                            `json:"created_by_id"`
	Description               string                            `json:"description"`
	EnforceUniqueVote         bool                              `json:"enforce_unique_vote"`
	ID                        string                            `json:"id"`
	Name                      string                            `json:"name"`
	UpdatedAt                 Timestamp                         `json:"updated_at"`
	VoteCount                 int                               `json:"vote_count"`
	VotingVisibility          string                            `json:"voting_visibility"`
	LatestAnswers             []PollVoteResponseData            `json:"latest_answers"`
	Options                   []PollOptionResponseData          `json:"options"`
	OwnVotes                  []PollVoteResponseData            `json:"own_votes"`
	Custom                    map[string]any                    `json:"custom"`
	LatestVotesByOption       map[string][]PollVoteResponseData `json:"latest_votes_by_option"`
	VoteCountsByOption        map[string]int                    `json:"vote_counts_by_option"`
	IsClosed                  *bool                             `json:"is_closed,omitempty"`
	MaxVotesAllowed           *int                              `json:"max_votes_allowed,omitempty"`
	// User response object
	CreatedBy *UserResponse `json:"created_by,omitempty"`
}

type PollVoteResponse ΒΆ

type PollVoteResponse struct {
	// Duration of the request in milliseconds
	Duration string                `json:"duration"`
	Poll     *PollResponseData     `json:"poll,omitempty"`
	Vote     *PollVoteResponseData `json:"vote,omitempty"`
}

type PollVoteResponseData ΒΆ

type PollVoteResponseData struct {
	CreatedAt  Timestamp `json:"created_at"`
	ID         string    `json:"id"`
	OptionID   string    `json:"option_id"`
	PollID     string    `json:"poll_id"`
	UpdatedAt  Timestamp `json:"updated_at"`
	AnswerText *string   `json:"answer_text,omitempty"`
	IsAnswer   *bool     `json:"is_answer,omitempty"`
	UserID     *string   `json:"user_id,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type PollVotesResponse ΒΆ

type PollVotesResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Poll votes
	Votes []PollVoteResponseData `json:"votes"`
	Next  *string                `json:"next,omitempty"`
	Prev  *string                `json:"prev,omitempty"`
}

type PoorByCause ΒΆ added in v5.3.0

type PoorByCause struct {
	Delivery      int `json:"delivery"`
	Edge          int `json:"edge"`
	IsolatedLocal int `json:"isolated_local"`
	Source        int `json:"source"`
	Unattributed  int `json:"unattributed"`
}

type PoorTail ΒΆ added in v5.3.0

type PoorTail struct {
	HealthyViewers int         `json:"healthy_viewers"`
	Note           string      `json:"note"`
	PoorTotal      int         `json:"poor_total"`
	PoorByCause    PoorByCause `json:"poor_by_cause"`
	Supporting     Supporting  `json:"supporting"`
	HealthyPct     *float64    `json:"healthy_pct,omitempty"`
}

type PrivacySettingsResponse ΒΆ

type PrivacySettingsResponse struct {
	DeliveryReceipts *DeliveryReceiptsResponse `json:"delivery_receipts,omitempty"`
	ReadReceipts     *ReadReceiptsResponse     `json:"read_receipts,omitempty"`
	TypingIndicators *TypingIndicatorsResponse `json:"typing_indicators,omitempty"`
}

type PublishedTrackFlags ΒΆ

type PublishedTrackFlags struct {
	Audio            bool `json:"audio"`
	Screenshare      bool `json:"screenshare"`
	ScreenshareAudio bool `json:"screenshare_audio"`
	Video            bool `json:"video"`
}

type PublishedTrackMetrics ΒΆ

type PublishedTrackMetrics struct {
	Codec      *string                      `json:"codec,omitempty"`
	TrackID    *string                      `json:"track_id,omitempty"`
	TrackType  *string                      `json:"track_type,omitempty"`
	Warnings   []SessionWarningResponse     `json:"warnings,omitempty"`
	Bitrate    *MetricTimeSeries            `json:"bitrate,omitempty"`
	Framerate  *MetricTimeSeries            `json:"framerate,omitempty"`
	Resolution *ResolutionMetricsTimeSeries `json:"resolution,omitempty"`
}

type PublisherAllMetrics ΒΆ

type PublisherAllMetrics struct {
	Audio *PublisherAudioMetrics   `json:"audio,omitempty"`
	RttMs *ActiveCallsLatencyStats `json:"rtt_ms,omitempty"`
	Video *PublisherVideoMetrics   `json:"video,omitempty"`
}

type PublisherAudioMetrics ΒΆ

type PublisherAudioMetrics struct {
	JitterMs *ActiveCallsLatencyStats `json:"jitter_ms,omitempty"`
}

type PublisherSession ΒΆ added in v5.3.0

type PublisherSession struct {
	DurationMin      float64          `json:"duration_min"`
	StartedOffsetMin float64          `json:"started_offset_min"`
	UserID           string           `json:"user_id"`
	UserSessionID    string           `json:"user_session_id"`
	AvgJitterMs      *float64         `json:"avg_jitter_ms,omitempty"`
	Browser          *string          `json:"browser,omitempty"`
	DeliveryZone     *string          `json:"delivery_zone,omitempty"`
	Ingest           *string          `json:"ingest,omitempty"`
	Os               *string          `json:"os,omitempty"`
	SendQualityScore *float64         `json:"send_quality_score,omitempty"`
	Tool             *string          `json:"tool,omitempty"`
	Encoding         *EncodingProfile `json:"encoding,omitempty"`
}

type PublisherStatsResponse ΒΆ

type PublisherStatsResponse struct {
	Total   int                  `json:"total"`
	Unique  int                  `json:"unique"`
	ByTrack []TrackStatsResponse `json:"by_track,omitempty"`
}

type PublisherVideoMetrics ΒΆ

type PublisherVideoMetrics struct {
	Bitrate             *ActiveCallsBitrateStats    `json:"bitrate,omitempty"`
	Fps30               *ActiveCallsFPSStats        `json:"fps_30,omitempty"`
	FrameEncodingTimeMs *ActiveCallsLatencyStats    `json:"frame_encoding_time_ms,omitempty"`
	JitterMs            *ActiveCallsLatencyStats    `json:"jitter_ms,omitempty"`
	Resolution          *ActiveCallsResolutionStats `json:"resolution,omitempty"`
}

type PublishersMetrics ΒΆ

type PublishersMetrics struct {
	All *PublisherAllMetrics `json:"all,omitempty"`
}

type PushConfig ΒΆ

type PushConfig struct {
	Version     string `json:"version"`
	OfflineOnly *bool  `json:"offline_only,omitempty"`
}

type PushNotificationConfig ΒΆ

type PushNotificationConfig struct {
	// Whether push notifications are enabled for this feed group
	EnablePush *bool `json:"enable_push,omitempty"`
	// List of notification types that should trigger push notifications (e.g., follow, comment, reaction, comment_reaction, mention)
	PushTypes []string `json:"push_types,omitempty"`
}

type PushNotificationFields ΒΆ

type PushNotificationFields struct {
	OfflineOnly bool                 `json:"offline_only"`
	Version     string               `json:"version"`
	Apn         APNConfigFields      `json:"apn"`
	Firebase    FirebaseConfigFields `json:"firebase"`
	Huawei      HuaweiConfigFields   `json:"huawei"`
	Xiaomi      XiaomiConfigFields   `json:"xiaomi"`
	Providers   []PushProvider       `json:"providers,omitempty"`
}

type PushNotificationSettingsResponse ΒΆ

type PushNotificationSettingsResponse struct {
	Disabled      *bool      `json:"disabled,omitempty"`
	DisabledUntil *Timestamp `json:"disabled_until,omitempty"`
}

type PushPreferenceInput ΒΆ

type PushPreferenceInput struct {
	// Set the level of call push notifications for the user. One of: all, none, default
	CallLevel *string `json:"call_level,omitempty"`
	// Set the push preferences for a specific channel. If empty it sets the default for the user
	ChannelCid *string `json:"channel_cid,omitempty"`
	// Set the level of chat push notifications for the user. Note: "mentions" is deprecated in favor of "direct_mentions". One of: all, mentions, direct_mentions, all_mentions, none, default
	ChatLevel *string `json:"chat_level,omitempty"`
	// Disable push notifications till a certain time
	DisabledUntil *Timestamp `json:"disabled_until,omitempty"`
	// Set the level of feeds push notifications for the user. One of: all, none, default
	FeedsLevel *string `json:"feeds_level,omitempty"`
	// Remove the disabled until time. (IE stop snoozing notifications)
	RemoveDisable *bool `json:"remove_disable,omitempty"`
	// The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth.
	UserID           *string               `json:"user_id,omitempty"`
	ChatPreferences  *ChatPreferencesInput `json:"chat_preferences,omitempty"`
	FeedsPreferences *FeedsPreferences     `json:"feeds_preferences,omitempty"`
}

type PushPreferencesResponse ΒΆ

type PushPreferencesResponse struct {
	CallLevel        *string                   `json:"call_level,omitempty"`
	ChatLevel        *string                   `json:"chat_level,omitempty"`
	DisabledUntil    *Timestamp                `json:"disabled_until,omitempty"`
	FeedsLevel       *string                   `json:"feeds_level,omitempty"`
	ChatPreferences  *ChatPreferencesResponse  `json:"chat_preferences,omitempty"`
	FeedsPreferences *FeedsPreferencesResponse `json:"feeds_preferences,omitempty"`
}

type PushProvider ΒΆ

type PushProvider struct {
	CreatedAt                    Timestamp      `json:"created_at"`
	Name                         string         `json:"name"`
	UpdatedAt                    Timestamp      `json:"updated_at"`
	Type                         string         `json:"type"`
	ApnAuthKey                   *string        `json:"apn_auth_key,omitempty"`
	ApnAuthType                  *string        `json:"apn_auth_type,omitempty"`
	ApnDevelopment               *bool          `json:"apn_development,omitempty"`
	ApnHost                      *string        `json:"apn_host,omitempty"`
	ApnKeyID                     *string        `json:"apn_key_id,omitempty"`
	ApnNotificationTemplate      *string        `json:"apn_notification_template,omitempty"`
	ApnP12Cert                   *string        `json:"apn_p12_cert,omitempty"`
	ApnTeamID                    *string        `json:"apn_team_id,omitempty"`
	ApnTopic                     *string        `json:"apn_topic,omitempty"`
	Description                  *string        `json:"description,omitempty"`
	DisabledAt                   *Timestamp     `json:"disabled_at,omitempty"`
	DisabledReason               *string        `json:"disabled_reason,omitempty"`
	FirebaseApnTemplate          *string        `json:"firebase_apn_template,omitempty"`
	FirebaseCredentials          *string        `json:"firebase_credentials,omitempty"`
	FirebaseDataTemplate         *string        `json:"firebase_data_template,omitempty"`
	FirebaseHost                 *string        `json:"firebase_host,omitempty"`
	FirebaseNotificationTemplate *string        `json:"firebase_notification_template,omitempty"`
	FirebaseServerKey            *string        `json:"firebase_server_key,omitempty"`
	HuaweiAppID                  *string        `json:"huawei_app_id,omitempty"`
	HuaweiAppSecret              *string        `json:"huawei_app_secret,omitempty"`
	HuaweiHost                   *string        `json:"huawei_host,omitempty"`
	XiaomiAppSecret              *string        `json:"xiaomi_app_secret,omitempty"`
	XiaomiPackageName            *string        `json:"xiaomi_package_name,omitempty"`
	PushTemplates                []PushTemplate `json:"push_templates,omitempty"`
}

type PushProviderRequest ΒΆ

type PushProviderRequest struct {
	Name                         string     `json:"name"`
	ApnAuthKey                   *string    `json:"apn_auth_key,omitempty"`
	ApnAuthType                  *string    `json:"apn_auth_type,omitempty"`
	ApnDevelopment               *bool      `json:"apn_development,omitempty"`
	ApnHost                      *string    `json:"apn_host,omitempty"`
	ApnKeyID                     *string    `json:"apn_key_id,omitempty"`
	ApnNotificationTemplate      *string    `json:"apn_notification_template,omitempty"`
	ApnP12Cert                   *string    `json:"apn_p12_cert,omitempty"`
	ApnTeamID                    *string    `json:"apn_team_id,omitempty"`
	ApnTopic                     *string    `json:"apn_topic,omitempty"`
	Description                  *string    `json:"description,omitempty"`
	DisabledAt                   *Timestamp `json:"disabled_at,omitempty"`
	DisabledReason               *string    `json:"disabled_reason,omitempty"`
	FirebaseApnTemplate          *string    `json:"firebase_apn_template,omitempty"`
	FirebaseCredentials          *string    `json:"firebase_credentials,omitempty"`
	FirebaseDataTemplate         *string    `json:"firebase_data_template,omitempty"`
	FirebaseHost                 *string    `json:"firebase_host,omitempty"`
	FirebaseNotificationTemplate *string    `json:"firebase_notification_template,omitempty"`
	FirebaseServerKey            *string    `json:"firebase_server_key,omitempty"`
	HuaweiAppID                  *string    `json:"huawei_app_id,omitempty"`
	HuaweiAppSecret              *string    `json:"huawei_app_secret,omitempty"`
	XiaomiAppSecret              *string    `json:"xiaomi_app_secret,omitempty"`
	XiaomiPackageName            *string    `json:"xiaomi_package_name,omitempty"`
	Type                         *string    `json:"type,omitempty"`
}

type PushProviderResponse ΒΆ

type PushProviderResponse struct {
	CreatedAt                      Timestamp  `json:"created_at"`
	Name                           string     `json:"name"`
	UpdatedAt                      Timestamp  `json:"updated_at"`
	Type                           string     `json:"type"`
	ApnAuthKey                     *string    `json:"apn_auth_key,omitempty"`
	ApnAuthType                    *string    `json:"apn_auth_type,omitempty"`
	ApnDevelopment                 *bool      `json:"apn_development,omitempty"`
	ApnHost                        *string    `json:"apn_host,omitempty"`
	ApnKeyID                       *string    `json:"apn_key_id,omitempty"`
	ApnP12Cert                     *string    `json:"apn_p12_cert,omitempty"`
	ApnSandboxCertificate          *bool      `json:"apn_sandbox_certificate,omitempty"`
	ApnSupportsRemoteNotifications *bool      `json:"apn_supports_remote_notifications,omitempty"`
	ApnSupportsVoipNotifications   *bool      `json:"apn_supports_voip_notifications,omitempty"`
	ApnTeamID                      *string    `json:"apn_team_id,omitempty"`
	ApnTopic                       *string    `json:"apn_topic,omitempty"`
	Description                    *string    `json:"description,omitempty"`
	DisabledAt                     *Timestamp `json:"disabled_at,omitempty"`
	DisabledReason                 *string    `json:"disabled_reason,omitempty"`
	FirebaseApnTemplate            *string    `json:"firebase_apn_template,omitempty"`
	FirebaseCredentials            *string    `json:"firebase_credentials,omitempty"`
	FirebaseDataTemplate           *string    `json:"firebase_data_template,omitempty"`
	FirebaseHost                   *string    `json:"firebase_host,omitempty"`
	FirebaseNotificationTemplate   *string    `json:"firebase_notification_template,omitempty"`
	FirebaseServerKey              *string    `json:"firebase_server_key,omitempty"`
	HuaweiAppID                    *string    `json:"huawei_app_id,omitempty"`
	HuaweiAppSecret                *string    `json:"huawei_app_secret,omitempty"`
	XiaomiAppSecret                *string    `json:"xiaomi_app_secret,omitempty"`
	XiaomiPackageName              *string    `json:"xiaomi_package_name,omitempty"`
}

type PushTemplate ΒΆ

type PushTemplate struct {
	CreatedAt  Timestamp `json:"created_at"`
	EnablePush bool      `json:"enable_push"`
	EventType  string    `json:"event_type"`
	UpdatedAt  Timestamp `json:"updated_at"`
	Template   *string   `json:"template,omitempty"`
}

type PushTemplateResponse ΒΆ

type PushTemplateResponse struct {
	// Time when the template was created
	CreatedAt Timestamp `json:"created_at"`
	// Whether push notification is enabled for this event
	EnablePush bool `json:"enable_push"`
	// Type of event this template applies to
	EventType string `json:"event_type"`
	// Internal ID of the push provider
	PushProviderInternalID string `json:"push_provider_internal_id"`
	// Time when the template was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// The push notification template
	Template *string `json:"template,omitempty"`
}

type Quality ΒΆ added in v5.3.0

type Quality struct {
	ViewerInterruptionNote    string      `json:"viewer_interruption_note"`
	InterruptionIncidents     []Incident  `json:"interruption_incidents"`
	ConnectionAvgJitterMs     Percentiles `json:"connection_avg_jitter_ms"`
	ConnectionAvgLatencyMs    Percentiles `json:"connection_avg_latency_ms"`
	ScoreBandsByConnectionPct ScoreBands  `json:"score_bands_by_connection_pct"`
	ScoreBandsByWatchTimePct  ScoreBands  `json:"score_bands_by_watch_time_pct"`
	P50QualityScore           *float64    `json:"p50_quality_score,omitempty"`
	P5QualityScore            *float64    `json:"p5_quality_score,omitempty"`
	ViewerInterruptionRatePct *float64    `json:"viewer_interruption_rate_pct,omitempty"`
}

type QualityScoreReport ΒΆ

type QualityScoreReport struct {
	Histogram []ReportByHistogramBucket `json:"histogram"`
}

type QualityScoreReportResponse ΒΆ

type QualityScoreReportResponse struct {
	Daily []DailyAggregateQualityScoreReportResponse `json:"daily"`
}

type QueryActivitiesRequest ΒΆ

type QueryActivitiesRequest struct {
	Language        *string `json:"-" query:"language"`
	TranslateText   *bool   `json:"-" query:"translate_text"`
	EnrichOwnFields *bool   `json:"enrich_own_fields,omitempty"`
	// When true, include both expired and non-expired activities in the result.
	IncludeExpiredActivities *bool `json:"include_expired_activities,omitempty"`
	IncludePrivateActivities *bool `json:"include_private_activities,omitempty"`
	// When true, include soft-deleted activities in the result.
	IncludeSoftDeletedActivities *bool   `json:"include_soft_deleted_activities,omitempty"`
	Limit                        *int    `json:"limit,omitempty"`
	Next                         *string `json:"next,omitempty"`
	Prev                         *string `json:"prev,omitempty"`
	UserID                       *string `json:"user_id,omitempty"`
	// Sorting parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' operators.
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryActivitiesResponse ΒΆ

type QueryActivitiesResponse struct {
	Duration string `json:"duration"`
	// List of activities matching the query
	Activities []ActivityResponse `json:"activities"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryActivityReactionsRequest ΒΆ

type QueryActivityReactionsRequest struct {
	Limit *int               `json:"limit,omitempty"`
	Next  *string            `json:"next,omitempty"`
	Prev  *string            `json:"prev,omitempty"`
	Sort  []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryActivityReactionsResponse ΒΆ

type QueryActivityReactionsResponse struct {
	// Duration of the request in milliseconds
	Duration  string                  `json:"duration"`
	Reactions []FeedsReactionResponse `json:"reactions"`
	Next      *string                 `json:"next,omitempty"`
	Prev      *string                 `json:"prev,omitempty"`
}

Basic response information

type QueryActivitySharesRequest ΒΆ

type QueryActivitySharesRequest struct {
	Limit *int    `json:"-" query:"limit"`
	Prev  *string `json:"-" query:"prev"`
	Next  *string `json:"-" query:"next"`
}

type QueryActivitySharesResponse ΒΆ

type QueryActivitySharesResponse struct {
	// Duration of the request in milliseconds
	Duration string          `json:"duration"`
	Shares   []ShareResponse `json:"shares"`
	Next     *string         `json:"next,omitempty"`
	Prev     *string         `json:"prev,omitempty"`
}

Basic response information

type QueryAggregateCallStatsRequest ΒΆ

type QueryAggregateCallStatsRequest struct {
	From        *string  `json:"from,omitempty"`
	To          *string  `json:"to,omitempty"`
	ReportTypes []string `json:"report_types"`
}

type QueryAggregateCallStatsResponse ΒΆ

type QueryAggregateCallStatsResponse struct {
	// Duration of the request in milliseconds
	Duration                   string                              `json:"duration"`
	CallDurationReport         *CallDurationReportResponse         `json:"call_duration_report,omitempty"`
	CallParticipantCountReport *CallParticipantCountReportResponse `json:"call_participant_count_report,omitempty"`
	CallsPerDayReport          *CallsPerDayReportResponse          `json:"calls_per_day_report,omitempty"`
	NetworkMetricsReport       *NetworkMetricsReportResponse       `json:"network_metrics_report,omitempty"`
	QualityScoreReport         *QualityScoreReportResponse         `json:"quality_score_report,omitempty"`
	SdkUsageReport             *SDKUsageReportResponse             `json:"sdk_usage_report,omitempty"`
	UserFeedbackReport         *UserFeedbackReportResponse         `json:"user_feedback_report,omitempty"`
}

Basic response information

type QueryAppealsRequest ΒΆ

type QueryAppealsRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Sorting parameters for appeals
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions for appeals
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryAppealsResponse ΒΆ

type QueryAppealsResponse struct {
	Duration string `json:"duration"`
	// List of Appeal Items
	Items []AppealItemResponse `json:"items"`
	Next  *string              `json:"next,omitempty"`
	Prev  *string              `json:"prev,omitempty"`
}

type QueryBannedUsersPayload ΒΆ

type QueryBannedUsersPayload struct {
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
	// Whether to exclude expired bans or not
	ExcludeExpiredBans *bool `json:"exclude_expired_bans,omitempty"`
	// Number of records to return
	Limit *int `json:"limit,omitempty"`
	// Number of records to offset
	Offset *int    `json:"offset,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryBannedUsersRequest ΒΆ

type QueryBannedUsersRequest struct {
	Payload *QueryBannedUsersPayload `json:"-" query:"payload"`
}

type QueryBannedUsersResponse ΒΆ

type QueryBannedUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// List of found bans
	Bans []BanResponse `json:"bans"`
}

type QueryBookmarkFoldersRequest ΒΆ

type QueryBookmarkFoldersRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Sorting parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryBookmarkFoldersResponse ΒΆ

type QueryBookmarkFoldersResponse struct {
	Duration string `json:"duration"`
	// List of bookmark folders matching the query
	BookmarkFolders []BookmarkFolderResponse `json:"bookmark_folders"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryBookmarksRequest ΒΆ

type QueryBookmarksRequest struct {
	Language        *string `json:"-" query:"language"`
	TranslateText   *bool   `json:"-" query:"translate_text"`
	EnrichOwnFields *bool   `json:"enrich_own_fields,omitempty"`
	Limit           *int    `json:"limit,omitempty"`
	Next            *string `json:"next,omitempty"`
	Prev            *string `json:"prev,omitempty"`
	UserID          *string `json:"user_id,omitempty"`
	// Sorting parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryBookmarksResponse ΒΆ

type QueryBookmarksResponse struct {
	Duration string `json:"duration"`
	// List of bookmarks matching the query
	Bookmarks []BookmarkResponse `json:"bookmarks"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryCallMembersRequest ΒΆ

type QueryCallMembersRequest struct {
	ID    string  `json:"id"`
	Type  string  `json:"type"`
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
}

type QueryCallMembersResponse ΒΆ

type QueryCallMembersResponse struct {
	// Duration of the request in milliseconds
	Duration string           `json:"duration"`
	Members  []MemberResponse `json:"members"`
	Next     *string          `json:"next,omitempty"`
	Prev     *string          `json:"prev,omitempty"`
}

Basic response information

type QueryCallParticipantSessionsRequest ΒΆ

type QueryCallParticipantSessionsRequest struct {
	Limit            *int           `json:"-" query:"limit"`
	Prev             *string        `json:"-" query:"prev"`
	Next             *string        `json:"-" query:"next"`
	FilterConditions map[string]any `json:"-" query:"filter_conditions"`
}

type QueryCallParticipantSessionsResponse ΒΆ

type QueryCallParticipantSessionsResponse struct {
	CallID        string `json:"call_id"`
	CallSessionID string `json:"call_session_id"`
	CallType      string `json:"call_type"`
	// Duration of the request in milliseconds
	Duration                 int                         `json:"duration"`
	TotalParticipantDuration int                         `json:"total_participant_duration"`
	TotalParticipantSessions int                         `json:"total_participant_sessions"`
	ParticipantsSessions     []ParticipantSessionDetails `json:"participants_sessions"`
	Next                     *string                     `json:"next,omitempty"`
	Prev                     *string                     `json:"prev,omitempty"`
	Session                  *CallSessionResponse        `json:"session,omitempty"`
}

Basic response information

type QueryCallParticipantsRequest ΒΆ

type QueryCallParticipantsRequest struct {
	Limit *int `json:"-" query:"limit"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
}

type QueryCallParticipantsResponse ΒΆ

type QueryCallParticipantsResponse struct {
	Duration          string           `json:"duration"`
	TotalParticipants int              `json:"total_participants"`
	Members           []MemberResponse `json:"members"`
	OwnCapabilities   []OwnCapability  `json:"own_capabilities"`
	// List of call participants
	Participants []CallParticipantResponse `json:"participants"`
	// Represents a call
	Call CallResponse `json:"call"`
}

type QueryCallSessionParticipantStatsRequest ΒΆ

type QueryCallSessionParticipantStatsRequest struct {
	Limit            *int               `json:"-" query:"limit"`
	Prev             *string            `json:"-" query:"prev"`
	Next             *string            `json:"-" query:"next"`
	Sort             []SortParamRequest `json:"-" query:"sort"`
	FilterConditions map[string]any     `json:"-" query:"filter_conditions"`
}

type QueryCallSessionParticipantStatsResponse ΒΆ

type QueryCallSessionParticipantStatsResponse struct {
	CallID        string `json:"call_id"`
	CallSessionID string `json:"call_session_id"`
	CallType      string `json:"call_type"`
	// Duration of the request in milliseconds
	Duration      string                     `json:"duration"`
	Participants  []CallStatsParticipant     `json:"participants"`
	Counts        CallStatsParticipantCounts `json:"counts"`
	CallEndedAt   *Timestamp                 `json:"call_ended_at,omitempty"`
	CallStartedAt *Timestamp                 `json:"call_started_at,omitempty"`
	Next          *string                    `json:"next,omitempty"`
	Prev          *string                    `json:"prev,omitempty"`
	TmpDataSource *string                    `json:"tmp_data_source,omitempty"`
	CallEvents    []CallLevelEventPayload    `json:"call_events,omitempty"`
}

Basic response information

type QueryCallSessionParticipantStatsTimelineResponse ΒΆ

type QueryCallSessionParticipantStatsTimelineResponse struct {
	CallID        string `json:"call_id"`
	CallSessionID string `json:"call_session_id"`
	CallType      string `json:"call_type"`
	// Duration of the request in milliseconds
	Duration      string                    `json:"duration"`
	UserID        string                    `json:"user_id"`
	UserSessionID string                    `json:"user_session_id"`
	Events        []CallParticipantTimeline `json:"events"`
}

Basic response information

type QueryCallSessionStatsRequest ΒΆ

type QueryCallSessionStatsRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
}

type QueryCallSessionStatsResponse ΒΆ

type QueryCallSessionStatsResponse struct {
	// Duration of the request in milliseconds
	Duration  string                     `json:"duration"`
	CallStats []CallStatsSessionResponse `json:"call_stats"`
	Next      *string                    `json:"next,omitempty"`
	Prev      *string                    `json:"prev,omitempty"`
}

Basic response information

type QueryCallStatsMapResponse ΒΆ

type QueryCallStatsMapResponse struct {
	CallID        string `json:"call_id"`
	CallSessionID string `json:"call_session_id"`
	CallType      string `json:"call_type"`
	// Duration of the request in milliseconds
	Duration      string                     `json:"duration"`
	Counts        CallStatsParticipantCounts `json:"counts"`
	CallEndedAt   *Timestamp                 `json:"call_ended_at,omitempty"`
	CallStartedAt *Timestamp                 `json:"call_started_at,omitempty"`
	DataSource    *string                    `json:"data_source,omitempty"`
	EndTime       *Timestamp                 `json:"end_time,omitempty"`
	GeneratedAt   *Timestamp                 `json:"generated_at,omitempty"`
	StartTime     *Timestamp                 `json:"start_time,omitempty"`
	Publishers    *CallStatsMapPublishers    `json:"publishers,omitempty"`
	Sfus          *CallStatsMapSFUs          `json:"sfus,omitempty"`
	Subscribers   *CallStatsMapSubscribers   `json:"subscribers,omitempty"`
}

Basic response information

type QueryCallStatsRequest ΒΆ

type QueryCallStatsRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
}

type QueryCallStatsResponse ΒΆ

type QueryCallStatsResponse struct {
	// Duration of the request in milliseconds
	Duration string                           `json:"duration"`
	Reports  []CallStatsReportSummaryResponse `json:"reports"`
	Next     *string                          `json:"next,omitempty"`
	Prev     *string                          `json:"prev,omitempty"`
}

Basic response information

type QueryCallsRequest ΒΆ

type QueryCallsRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
}

type QueryCallsResponse ΒΆ

type QueryCallsResponse struct {
	// Duration of the request in milliseconds
	Duration string                    `json:"duration"`
	Calls    []CallStateResponseFields `json:"calls"`
	Next     *string                   `json:"next,omitempty"`
	Prev     *string                   `json:"prev,omitempty"`
}

type QueryCampaignsRequest ΒΆ

type QueryCampaignsRequest struct {
	Limit     *int               `json:"limit,omitempty"`
	Next      *string            `json:"next,omitempty"`
	Prev      *string            `json:"prev,omitempty"`
	UserLimit *int               `json:"user_limit,omitempty"`
	Sort      []SortParamRequest `json:"sort"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryCampaignsResponse ΒΆ

type QueryCampaignsResponse struct {
	// Duration of the request in milliseconds
	Duration  string             `json:"duration"`
	Campaigns []CampaignResponse `json:"campaigns"`
	Next      *string            `json:"next,omitempty"`
	Prev      *string            `json:"prev,omitempty"`
}

Basic response information

type QueryChannelsRequest ΒΆ

type QueryChannelsRequest struct {
	// Number of channels to limit
	Limit *int `json:"limit,omitempty"`
	// Number of members to limit
	MemberLimit *int `json:"member_limit,omitempty"`
	// Number of messages to limit
	MessageLimit *int `json:"message_limit,omitempty"`
	// Channel pagination offset
	Offset *int `json:"offset,omitempty"`
	// ID of a predefined filter to use instead of filter_conditions
	PredefinedFilter *string `json:"predefined_filter,omitempty"`
	// Whether to update channel state or not
	State  *bool   `json:"state,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Top-level keys of the message sender's channel-member custom data to include under member.custom (max 8 keys, 64 chars each)
	MemberCustomInclude []string `json:"member_custom_include"`
	// List of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
	// Values to interpolate into the predefined filter template
	FilterValues map[string]any `json:"filter_values"`
	SortValues   map[string]any `json:"sort_values"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryChannelsResponse ΒΆ

type QueryChannelsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// List of channels
	Channels         []ChannelStateResponseFields    `json:"channels"`
	PredefinedFilter *ParsedPredefinedFilterResponse `json:"predefined_filter,omitempty"`
}

type QueryCollectionsRequest ΒΆ

type QueryCollectionsRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Sorting parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryCollectionsResponse ΒΆ

type QueryCollectionsResponse struct {
	Duration string `json:"duration"`
	// List of collections matching the query
	Collections []CollectionResponse `json:"collections"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryCommentReactionsRequest ΒΆ

type QueryCommentReactionsRequest struct {
	Limit *int               `json:"limit,omitempty"`
	Next  *string            `json:"next,omitempty"`
	Prev  *string            `json:"prev,omitempty"`
	Sort  []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryCommentReactionsResponse ΒΆ

type QueryCommentReactionsResponse struct {
	// Duration of the request in milliseconds
	Duration  string                  `json:"duration"`
	Reactions []FeedsReactionResponse `json:"reactions"`
	Next      *string                 `json:"next,omitempty"`
	Prev      *string                 `json:"prev,omitempty"`
}

Basic response information

type QueryCommentsRequest ΒΆ

type QueryCommentsRequest struct {
	Language      *string `json:"-" query:"language"`
	TranslateText *bool   `json:"-" query:"translate_text"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
	// Returns the comment with the specified ID along with surrounding comments for context
	IDAround *string `json:"id_around,omitempty"`
	// Maximum number of comments to return
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort   *string `json:"sort,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryCommentsResponse ΒΆ

type QueryCommentsResponse struct {
	Duration string `json:"duration"`
	// List of comments matching the query
	Comments []CommentResponse `json:"comments"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryDraftsRequest ΒΆ

type QueryDraftsRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryDraftsResponse ΒΆ

type QueryDraftsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Drafts
	Drafts []DraftResponse `json:"drafts"`
	Next   *string         `json:"next,omitempty"`
	Prev   *string         `json:"prev,omitempty"`
}

type QueryFeedMembersRequest ΒΆ

type QueryFeedMembersRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Sort parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filter parameters for the query
	Filter map[string]any `json:"filter"`
}

type QueryFeedMembersResponse ΒΆ

type QueryFeedMembersResponse struct {
	Duration string `json:"duration"`
	// List of feed members
	Members []FeedMemberResponse `json:"members"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryFeedModerationTemplate ΒΆ

type QueryFeedModerationTemplate struct {
	// When the template was created
	CreatedAt Timestamp `json:"created_at"`
	// Name of the moderation template
	Name string `json:"name"`
	// When the template was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Configuration for a feeds moderation template
	Config *FeedsModerationTemplateConfigPayload `json:"config,omitempty"`
}

type QueryFeedModerationTemplatesResponse ΒΆ

type QueryFeedModerationTemplatesResponse struct {
	Duration string `json:"duration"`
	// List of moderation templates
	Templates []QueryFeedModerationTemplate `json:"templates"`
}

type QueryFeedsRequest ΒΆ

type QueryFeedsRequest struct {
	EnrichOwnFields *bool   `json:"enrich_own_fields,omitempty"`
	Limit           *int    `json:"limit,omitempty"`
	Next            *string `json:"next,omitempty"`
	Prev            *string `json:"prev,omitempty"`
	// Whether to subscribe to realtime updates
	Watch *bool `json:"watch,omitempty"`
	// Sorting parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryFeedsResponse ΒΆ

type QueryFeedsResponse struct {
	Duration string `json:"duration"`
	// List of feeds matching the query
	Feeds []FeedResponse `json:"feeds"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryFeedsUsageStatsRequest ΒΆ

type QueryFeedsUsageStatsRequest struct {
	// Start date in YYYY-MM-DD format (optional, defaults to 30 days ago)
	From *string `json:"from,omitempty"`
	// End date in YYYY-MM-DD format (optional, defaults to today)
	To *string `json:"to,omitempty"`
}

type QueryFeedsUsageStatsResponse ΒΆ

type QueryFeedsUsageStatsResponse struct {
	Duration       string                   `json:"duration"`
	APIRequests    DailyMetricStatsResponse `json:"api_requests"`
	Activities     DailyMetricStatsResponse `json:"activities"`
	Follows        DailyMetricStatsResponse `json:"follows"`
	OpenaiRequests DailyMetricStatsResponse `json:"openai_requests"`
	Emau           *EMAUStatsResponse       `json:"emau,omitempty"`
}

type QueryFollowsRequest ΒΆ

type QueryFollowsRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Sorting parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryFollowsResponse ΒΆ

type QueryFollowsResponse struct {
	Duration string `json:"duration"`
	// List of follow relationships matching the query
	Follows []FollowResponse `json:"follows"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryFutureChannelBansPayload ΒΆ

type QueryFutureChannelBansPayload struct {
	// Whether to exclude expired bans or not
	ExcludeExpiredBans *bool `json:"exclude_expired_bans,omitempty"`
	// When true, the response includes the total number of bans matching the query filter (independent of limit and offset, capped at 100000)
	IncludeTotal *bool `json:"include_total,omitempty"`
	// Number of records to return
	Limit *int `json:"limit,omitempty"`
	// Number of records to offset
	Offset *int `json:"offset,omitempty"`
	// Filter by the target user ID. Server-side: returns all bans against this user. Client-side: narrows the authenticated user's own bans to this target.
	TargetUserID *string `json:"target_user_id,omitempty"`
	UserID       *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryFutureChannelBansRequest ΒΆ

type QueryFutureChannelBansRequest struct {
	Payload *QueryFutureChannelBansPayload `json:"-" query:"payload"`
}

type QueryFutureChannelBansResponse ΒΆ

type QueryFutureChannelBansResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// List of found future channel bans
	Bans []FutureChannelBanResponse `json:"bans"`
	// Total number of bans matching the query filter, computed at query time and capped at 100000. Only present when include_total is set on the request; omitted when computing the total timed out
	Total *int `json:"total,omitempty"`
}

type QueryLabelResultsRequest ΒΆ

type QueryLabelResultsRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Sorting parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryLabelResultsResponse ΒΆ

type QueryLabelResultsResponse struct {
	Duration string `json:"duration"`
	// List of moderation label results
	LabelResults []LabelResultResponse `json:"label_results"`
	Next         *string               `json:"next,omitempty"`
	Prev         *string               `json:"prev,omitempty"`
}

type QueryMembersPayload ΒΆ

type QueryMembersPayload struct {
	Type string `json:"type"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any         `json:"filter_conditions"`
	ID               *string                `json:"id,omitempty"`
	Limit            *int                   `json:"limit,omitempty"`
	Offset           *int                   `json:"offset,omitempty"`
	UserID           *string                `json:"user_id,omitempty"`
	Members          []ChannelMemberRequest `json:"members,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryMembersRequest ΒΆ

type QueryMembersRequest struct {
	Payload *QueryMembersPayload `json:"-" query:"payload"`
}

type QueryMembershipLevelsRequest ΒΆ

type QueryMembershipLevelsRequest struct {
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Sorting parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryMembershipLevelsResponse ΒΆ

type QueryMembershipLevelsResponse struct {
	Duration         string                    `json:"duration"`
	MembershipLevels []MembershipLevelResponse `json:"membership_levels"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryMessageFlagsPayload ΒΆ

type QueryMessageFlagsPayload struct {
	Limit  *int `json:"limit,omitempty"`
	Offset *int `json:"offset,omitempty"`
	// Whether to include deleted messages in the results
	ShowDeletedMessages *bool   `json:"show_deleted_messages,omitempty"`
	UserID              *string `json:"user_id,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort,omitempty"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryMessageFlagsRequest ΒΆ

type QueryMessageFlagsRequest struct {
	Payload *QueryMessageFlagsPayload `json:"-" query:"payload"`
}

type QueryMessageFlagsResponse ΒΆ

type QueryMessageFlagsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// The flags that match the query
	Flags []MessageFlagResponse `json:"flags"`
}

Query message flags response

type QueryMessageHistoryRequest ΒΆ

type QueryMessageHistoryRequest struct {
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
	Limit  *int           `json:"limit,omitempty"`
	Next   *string        `json:"next,omitempty"`
	Prev   *string        `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
}

type QueryMessageHistoryResponse ΒΆ

type QueryMessageHistoryResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Message history entries
	MessageHistory []MessageHistoryEntryResponse `json:"message_history"`
	Next           *string                       `json:"next,omitempty"`
	Prev           *string                       `json:"prev,omitempty"`
}

type QueryModerationConfigsRequest ΒΆ

type QueryModerationConfigsRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Sorting parameters for the results
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions for moderation configs
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryModerationConfigsResponse ΒΆ

type QueryModerationConfigsResponse struct {
	Duration string `json:"duration"`
	// List of moderation configurations
	Configs []ConfigResponse `json:"configs"`
	Next    *string          `json:"next,omitempty"`
	Prev    *string          `json:"prev,omitempty"`
}

type QueryModerationFlagsRequest ΒΆ

type QueryModerationFlagsRequest struct {
	Limit *int               `json:"limit,omitempty"`
	Next  *string            `json:"next,omitempty"`
	Prev  *string            `json:"prev,omitempty"`
	Sort  []SortParamRequest `json:"sort"`
	// Filter conditions for moderation flags
	Filter map[string]any `json:"filter"`
}

type QueryModerationFlagsResponse ΒΆ

type QueryModerationFlagsResponse struct {
	// Duration of the request in milliseconds
	Duration string                   `json:"duration"`
	Flags    []ModerationFlagResponse `json:"flags"`
	Next     *string                  `json:"next,omitempty"`
	Prev     *string                  `json:"prev,omitempty"`
}

Basic response information

type QueryModerationLogsRequest ΒΆ

type QueryModerationLogsRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Sorting parameters for the results
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions for moderation logs
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryModerationLogsResponse ΒΆ

type QueryModerationLogsResponse struct {
	Duration string `json:"duration"`
	// List of moderation action logs
	Logs []ActionLogResponse `json:"logs"`
	Next *string             `json:"next,omitempty"`
	Prev *string             `json:"prev,omitempty"`
}

type QueryModerationRulesRequest ΒΆ

type QueryModerationRulesRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Sorting parameters for the results
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions for moderation rules
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryModerationRulesResponse ΒΆ

type QueryModerationRulesResponse struct {
	Duration string `json:"duration"`
	// AI image label definitions with metadata for dashboard rendering
	AiImageLabelDefinitions []AIImageLabelDefinition `json:"ai_image_label_definitions"`
	// Available harm labels for closed caption rules
	ClosedCaptionLabels []string `json:"closed_caption_labels"`
	// Deprecated: use keyframe_label_classifications instead. Available L1 harm labels for keyframe rules
	KeyframeLabels []string `json:"keyframe_labels"`
	// Available harm labels for OCR-based rule conditions (keyframe_ocr_rule and ocr_content). Mirrors `closed_caption_labels` today but kept as a separate field so the pickers can diverge later.
	OcrLabels []string `json:"ocr_labels"`
	// List of moderation rules
	Rules []ModerationRuleV2Response `json:"rules"`
	// Stream L1 to leaf-level label name mapping for AI image rules
	AiImageSubclassifications map[string][]string `json:"ai_image_subclassifications"`
	// Default LLM label descriptions
	DefaultLlmLabels map[string]string `json:"default_llm_labels"`
	// Recommended LLM label descriptions for username-scoped policies (key starts with 'username:'). Used by /moderation/v2/labels fast-path.
	DefaultUsernameLlmLabels map[string]string `json:"default_username_llm_labels"`
	// L1 to L2 mapping of keyframe harm label classifications
	KeyframeLabelClassifications map[string][]string `json:"keyframe_label_classifications"`
	Next                         *string             `json:"next,omitempty"`
	Prev                         *string             `json:"prev,omitempty"`
}

type QueryPinnedActivitiesRequest ΒΆ

type QueryPinnedActivitiesRequest struct {
	Language        *string `json:"-" query:"language"`
	TranslateText   *bool   `json:"-" query:"translate_text"`
	EnrichOwnFields *bool   `json:"enrich_own_fields,omitempty"`
	Limit           *int    `json:"limit,omitempty"`
	Next            *string `json:"next,omitempty"`
	Prev            *string `json:"prev,omitempty"`
	// Sorting parameters for the query
	Sort []SortParamRequest `json:"sort"`
	// Filters to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryPinnedActivitiesResponse ΒΆ

type QueryPinnedActivitiesResponse struct {
	Duration string `json:"duration"`
	// List of pinned activities matching the query
	PinnedActivities []ActivityPinResponse `json:"pinned_activities"`
	// Cursor for next page
	Next *string `json:"next,omitempty"`
	// Cursor for previous page
	Prev *string `json:"prev,omitempty"`
}

type QueryPollVotesRequest ΒΆ

type QueryPollVotesRequest struct {
	UserID *string `json:"-" query:"user_id"`
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryPollsRequest ΒΆ

type QueryPollsRequest struct {
	UserID *string `json:"-" query:"user_id"`
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
}

type QueryPollsResponse ΒΆ

type QueryPollsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Polls data returned by the query
	Polls []PollResponseData `json:"polls"`
	Next  *string            `json:"next,omitempty"`
	Prev  *string            `json:"prev,omitempty"`
}

type QueryReactionsRequest ΒΆ

type QueryReactionsRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryReactionsResponse ΒΆ

type QueryReactionsResponse struct {
	// Duration of the request in milliseconds
	Duration  string             `json:"duration"`
	Reactions []ReactionResponse `json:"reactions"`
	Next      *string            `json:"next,omitempty"`
	Prev      *string            `json:"prev,omitempty"`
}

Basic response information

type QueryRemindersRequest ΒΆ

type QueryRemindersRequest struct {
	Limit  *int    `json:"limit,omitempty"`
	Next   *string `json:"next,omitempty"`
	Prev   *string `json:"prev,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryRemindersResponse ΒΆ

type QueryRemindersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// MessageReminders data returned by the query
	Reminders []ReminderResponseData `json:"reminders"`
	Next      *string                `json:"next,omitempty"`
	Prev      *string                `json:"prev,omitempty"`
}

type QueryReviewQueueRequest ΒΆ

type QueryReviewQueueRequest struct {
	ExcludeDefaultActionConfig *bool `json:"exclude_default_action_config,omitempty"`
	Limit                      *int  `json:"limit,omitempty"`
	// Number of items to lock (1-25)
	LockCount *int `json:"lock_count,omitempty"`
	// Duration for which items should be locked
	LockDuration *int `json:"lock_duration,omitempty"`
	// Whether to lock items for review (true), unlock items (false), or just fetch (nil)
	LockItems *bool   `json:"lock_items,omitempty"`
	Next      *string `json:"next,omitempty"`
	Prev      *string `json:"prev,omitempty"`
	// Whether to return only statistics
	StatsOnly *bool   `json:"stats_only,omitempty"`
	UserID    *string `json:"user_id,omitempty"`
	// Sorting parameters for the results
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions for review queue items. Accepts built-in fields (e.g. status, channel_cid, severity, recommended_action) and customer-supplied moderation_payload.custom keys: any key that is not a built-in field is matched against the item's custom moderation data (e.g. {"location_id": "loc-42"}). Use filter_config.filterable_custom_keys to discover which custom keys the app exposes as chips.
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryReviewQueueResponse ΒΆ

type QueryReviewQueueResponse struct {
	Duration string `json:"duration"`
	// List of review queue items
	Items []ReviewQueueItemResponse `json:"items"`
	// Configuration for moderation actions
	ActionConfig map[string][]ModerationActionConfigResponse `json:"action_config"`
	// Statistics about the review queue
	Stats               map[string]any                              `json:"stats"`
	Next                *string                                     `json:"next,omitempty"`
	Prev                *string                                     `json:"prev,omitempty"`
	DefaultActionConfig map[string][]ModerationActionConfigResponse `json:"default_action_config,omitempty"`
	FilterConfig        *FilterConfigResponse                       `json:"filter_config,omitempty"`
}

type QueryRevisionHistoryRequest ΒΆ

type QueryRevisionHistoryRequest struct {
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
	Limit  *int           `json:"limit,omitempty"`
	Next   *string        `json:"next,omitempty"`
	Prev   *string        `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
}

type QueryRevisionHistoryResponse ΒΆ

type QueryRevisionHistoryResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Revision history entries
	Revisions []RevisionHistoryResponse `json:"revisions"`
	Next      *string                   `json:"next,omitempty"`
	Prev      *string                   `json:"prev,omitempty"`
}

type QuerySegmentTargetsRequest ΒΆ

type QuerySegmentTargetsRequest struct {
	// Limit
	Limit *int `json:"limit,omitempty"`
	// Next
	Next *string `json:"next,omitempty"`
	// Prev
	Prev   *string            `json:"prev,omitempty"`
	Sort   []SortParamRequest `json:"Sort"`
	Filter map[string]any     `json:"Filter"`
}

type QuerySegmentTargetsResponse ΒΆ

type QuerySegmentTargetsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Targets
	Targets []SegmentTargetResponse `json:"targets"`
	Next    *string                 `json:"next,omitempty"`
	Prev    *string                 `json:"prev,omitempty"`
}

type QuerySegmentsRequest ΒΆ

type QuerySegmentsRequest struct {
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
	Limit  *int           `json:"limit,omitempty"`
	Next   *string        `json:"next,omitempty"`
	Prev   *string        `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
}

type QuerySegmentsResponse ΒΆ

type QuerySegmentsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Segments
	Segments []SegmentResponse `json:"segments"`
	Next     *string           `json:"next,omitempty"`
	Prev     *string           `json:"prev,omitempty"`
}

type QueryTeamUsageStatsRequest ΒΆ

type QueryTeamUsageStatsRequest struct {
	// End date in YYYY-MM-DD format. Used with start_date for custom date range. Returns daily breakdown.
	EndDate *string `json:"end_date,omitempty"`
	// Maximum number of teams to return per page (default: 30, max: 30)
	Limit *int `json:"limit,omitempty"`
	// Month in YYYY-MM format (e.g., '2026-01'). Mutually exclusive with start_date/end_date. Returns aggregated monthly values.
	Month *string `json:"month,omitempty"`
	// Cursor for pagination to fetch next page of teams
	Next *string `json:"next,omitempty"`
	// Start date in YYYY-MM-DD format. Used with end_date for custom date range. Returns daily breakdown.
	StartDate *string `json:"start_date,omitempty"`
}

type QueryTeamUsageStatsResponse ΒΆ

type QueryTeamUsageStatsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Array of team usage statistics
	Teams []TeamUsageStats `json:"teams"`
	// Cursor for pagination to fetch next page
	Next *string `json:"next,omitempty"`
}

Response containing team-level usage statistics

type QueryThreadsRequest ΒΆ

type QueryThreadsRequest struct {
	Limit       *int    `json:"limit,omitempty"`
	MemberLimit *int    `json:"member_limit,omitempty"`
	Next        *string `json:"next,omitempty"`
	// Limit the number of participants returned per each thread
	ParticipantLimit *int    `json:"participant_limit,omitempty"`
	Prev             *string `json:"prev,omitempty"`
	// Limit the number of replies returned per each thread
	ReplyLimit *int    `json:"reply_limit,omitempty"`
	UserID     *string `json:"user_id,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryThreadsResponse ΒΆ

type QueryThreadsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// List of enriched thread states
	Threads []ThreadStateResponse `json:"threads"`
	Next    *string               `json:"next,omitempty"`
	Prev    *string               `json:"prev,omitempty"`
}

type QueryUserFeedbackRequest ΒΆ

type QueryUserFeedbackRequest struct {
	Full  *bool   `json:"-" query:"full"`
	Limit *int    `json:"limit,omitempty"`
	Next  *string `json:"next,omitempty"`
	Prev  *string `json:"prev,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort"`
	// Filter conditions to apply to the query
	FilterConditions map[string]any `json:"filter_conditions"`
}

type QueryUserFeedbackResponse ΒΆ

type QueryUserFeedbackResponse struct {
	// Duration of the request in milliseconds
	Duration     string                 `json:"duration"`
	UserFeedback []UserFeedbackResponse `json:"user_feedback"`
	Next         *string                `json:"next,omitempty"`
	Prev         *string                `json:"prev,omitempty"`
}

Basic response information

type QueryUsersPayload ΒΆ

type QueryUsersPayload struct {
	// Filter conditions to apply to the query
	FilterConditions        map[string]any `json:"filter_conditions"`
	IncludeDeactivatedUsers *bool          `json:"include_deactivated_users,omitempty"`
	Limit                   *int           `json:"limit,omitempty"`
	Offset                  *int           `json:"offset,omitempty"`
	Presence                *bool          `json:"presence,omitempty"`
	UserID                  *string        `json:"user_id,omitempty"`
	// Array of sort parameters
	Sort []SortParamRequest `json:"sort,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type QueryUsersRequest ΒΆ

type QueryUsersRequest struct {
	Payload *QueryUsersPayload `json:"-" query:"payload"`
}

type QueryUsersResponse ΒΆ

type QueryUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Array of users as result of filters applied.
	Users []FullUserResponse `json:"users"`
}

type QueueResponse ΒΆ

type QueueResponse struct {
	// Duration of the request in milliseconds
	Duration string                   `json:"duration"`
	Queue    *ModerationQueueResponse `json:"queue,omitempty"`
}

Basic response information

type RTMPBroadcastRequest ΒΆ

type RTMPBroadcastRequest struct {
	// Name identifier for RTMP broadcast, must be unique in call
	Name string `json:"name"`
	// URL for the RTMP server to send the call to
	StreamUrl string `json:"stream_url"`
	// If provided, will override the call's RTMP settings quality. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560
	Quality *string `json:"quality,omitempty"`
	// If provided, will be appended at the end of stream_url
	StreamKey *string                `json:"stream_key,omitempty"`
	Layout    *LayoutSettingsRequest `json:"layout,omitempty"`
}

RTMPBroadcastRequest is the payload for starting an RTMP broadcast.

type RTMPIngress ΒΆ

type RTMPIngress struct {
	Address string `json:"address"`
}

RTMP input settings

type RTMPLocation ΒΆ

type RTMPLocation struct {
	Name      string `json:"name"`
	StreamKey string `json:"stream_key"`
	StreamUrl string `json:"stream_url"`
}

type RTMPSettings ΒΆ

type RTMPSettings struct {
	Enabled     bool            `json:"enabled"`
	QualityName *string         `json:"quality_name,omitempty"`
	Layout      *LayoutSettings `json:"layout,omitempty"`
	Location    *RTMPLocation   `json:"location,omitempty"`
}

type RTMPSettingsRequest ΒΆ

type RTMPSettingsRequest struct {
	// Whether RTMP broadcasting is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// Resolution to set for the RTMP stream. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560
	Quality *string                `json:"quality,omitempty"`
	Layout  *LayoutSettingsRequest `json:"layout,omitempty"`
}

type RTMPSettingsResponse ΒΆ

type RTMPSettingsResponse struct {
	Enabled bool                   `json:"enabled"`
	Quality string                 `json:"quality"`
	Layout  LayoutSettingsResponse `json:"layout"`
}

RTMPSettingsResponse is the payload for RTMP settings

type RankingConfig ΒΆ

type RankingConfig struct {
	// Type of ranking algorithm. Required. One of: expression, interest
	Type string `json:"type"`
	// Scoring formula. Required when type is 'expression' or 'interest'
	Score *string `json:"score,omitempty"`
	// Default values for ranking
	Defaults map[string]any `json:"defaults,omitempty"`
	// Decay functions configuration
	Functions map[string]DecayFunctionConfig `json:"functions,omitempty"`
}

type RateLimitInfo ΒΆ

type RateLimitInfo struct {
	// Limit is the maximum number of API calls for a single time window (1 minute).
	Limit int64 `json:"limit"`
	// Remaining is the number of API calls remaining in the current time window (1 minute).
	Remaining int64 `json:"remaining"`
	// Reset is the Unix timestamp of the expiration of the current rate limit time window.
	Reset int64 `json:"reset"`
}

RateLimitInfo represents the quota and usage for a single endpoint.

func NewRateLimitFromHeaders ΒΆ

func NewRateLimitFromHeaders(headers http.Header) *RateLimitInfo

type RawRecordSettings ΒΆ

type RawRecordSettings struct {
	Mode      string `json:"mode"`
	AudioOnly *bool  `json:"audio_only,omitempty"`
}

type RawRecordingResponse ΒΆ

type RawRecordingResponse struct {
	Status string `json:"status"`
}

type RawRecordingSettingsRequest ΒΆ

type RawRecordingSettingsRequest struct {
	// Recording mode. One of: available, disabled, auto-on
	Mode string `json:"mode"`
	// If true, only audio tracks will be recorded
	AudioOnly *bool `json:"audio_only,omitempty"`
}

type RawRecordingSettingsResponse ΒΆ

type RawRecordingSettingsResponse struct {
	Mode      string `json:"mode"`
	AudioOnly *bool  `json:"audio_only,omitempty"`
}

type Reaction ΒΆ

type Reaction struct {
	ActivityID           string                `json:"activity_id"`
	CreatedAt            Timestamp             `json:"created_at"`
	Kind                 string                `json:"kind"`
	UpdatedAt            Timestamp             `json:"updated_at"`
	UserID               string                `json:"user_id"`
	DeletedAt            *Timestamp            `json:"deleted_at,omitempty"`
	ID                   *string               `json:"id,omitempty"`
	Parent               *string               `json:"parent,omitempty"`
	Score                *float64              `json:"score,omitempty"`
	TargetFeeds          []string              `json:"target_feeds,omitempty"`
	ChildrenCounts       map[string]any        `json:"children_counts,omitempty"`
	Data                 map[string]any        `json:"data,omitempty"`
	LatestChildren       map[string][]Reaction `json:"latest_children,omitempty"`
	Moderation           map[string]any        `json:"moderation,omitempty"`
	OwnChildren          map[string][]Reaction `json:"own_children,omitempty"`
	TargetFeedsExtraData map[string]any        `json:"target_feeds_extra_data,omitempty"`
	User                 *User                 `json:"user,omitempty"`
}

type ReactionDeletedEvent ΒΆ

type ReactionDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// The type of event: "reaction.deleted" in this case
	Type string `json:"type"`
	// The ID of the channel containing the message
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel containing the message
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel containing the message
	Cid        *string    `json:"cid,omitempty"`
	MessageID  *string    `json:"message_id,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team *string `json:"team,omitempty"`
	// The participants of the thread
	ThreadParticipants []UserResponseCommonFields `json:"thread_participants,omitempty"`
	ChannelCustom      map[string]any             `json:"channel_custom,omitempty"`
	// Represents any chat message
	Message  *MessageResponse          `json:"message,omitempty"`
	Reaction *ReactionResponse         `json:"reaction,omitempty"`
	User     *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a reaction is deleted from a message.

func (*ReactionDeletedEvent) GetEventType ΒΆ

func (e *ReactionDeletedEvent) GetEventType() string

type ReactionGroupResponse ΒΆ

type ReactionGroupResponse struct {
	// Count is the number of reactions of this type.
	Count int `json:"count"`
	// FirstReactionAt is the time of the first reaction of this type. This is the same also if all reaction of this type are deleted, because if someone will react again with the same type, will be preserved the sorting.
	FirstReactionAt Timestamp `json:"first_reaction_at"`
	// LastReactionAt is the time of the last reaction of this type.
	LastReactionAt Timestamp `json:"last_reaction_at"`
	// SumScores is the sum of all scores of reactions of this type. Medium allows you to clap articles more than once and shows the sum of all claps from all users. For example, you can send `clap` x5 using `score: 5`.
	SumScores int `json:"sum_scores"`
	// The most recent users who reacted with this type, ordered by most recent first.
	LatestReactionsBy []ReactionGroupUserResponse `json:"latest_reactions_by"`
}

ReactionGroupResponse contains all information about a reaction of the same type.

type ReactionGroupUserResponse ΒΆ

type ReactionGroupUserResponse struct {
	// The time when the user reacted.
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the user who reacted.
	UserID string `json:"user_id"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

Contains information about a user who reacted with this reaction type.

type ReactionNewEvent ΒΆ

type ReactionNewEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// The type of event: "reaction.new" in this case
	Type string `json:"type"`
	// The ID of the channel containing the message
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel containing the message
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel containing the message
	Cid        *string    `json:"cid,omitempty"`
	MessageID  *string    `json:"message_id,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team *string `json:"team,omitempty"`
	// The participants of the thread
	ThreadParticipants []UserResponseCommonFields `json:"thread_participants,omitempty"`
	ChannelCustom      map[string]any             `json:"channel_custom,omitempty"`
	// Represents any chat message
	Message  *MessageResponse          `json:"message,omitempty"`
	Reaction *ReactionResponse         `json:"reaction,omitempty"`
	User     *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a new reaction is added to a message.

func (*ReactionNewEvent) GetEventType ΒΆ

func (e *ReactionNewEvent) GetEventType() string

type ReactionRequest ΒΆ

type ReactionRequest struct {
	// The type of reaction (e.g. 'like', 'laugh', 'wow')
	Type string `json:"type"`
	// Date/time of creation
	CreatedAt *Timestamp `json:"created_at,omitempty"`
	// Reaction score. If not specified reaction has score of 1
	Score *int `json:"score,omitempty"`
	// Date/time of the last update
	UpdatedAt *Timestamp     `json:"updated_at,omitempty"`
	UserID    *string        `json:"user_id,omitempty"`
	Custom    map[string]any `json:"custom,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

Represents user reaction to a message

type ReactionResponse ΒΆ

type ReactionResponse struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Message ID
	MessageID string `json:"message_id"`
	// Score of the reaction
	Score int `json:"score"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// User ID
	UserID string `json:"user_id"`
	// Type of reaction
	Type string `json:"type"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// User response object
	User UserResponse `json:"user"`
}

type ReactionUpdatedEvent ΒΆ

type ReactionUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	MessageID string    `json:"message_id"`
	// Represents channel in chat
	Channel ChannelResponse `json:"channel"`
	Custom  map[string]any  `json:"custom"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// The type of event: "reaction.updated" in this case
	Type string `json:"type"`
	// The ID of the channel containing the message
	ChannelID *string `json:"channel_id,omitempty"`
	// The number of members in the channel
	ChannelMemberCount *int `json:"channel_member_count,omitempty"`
	// The number of messages in the channel
	ChannelMessageCount *int `json:"channel_message_count,omitempty"`
	// The type of the channel containing the message
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel containing the message
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team ID
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	Reaction      *ReactionResponse         `json:"reaction,omitempty"`
	User          *UserResponseCommonFields `json:"user,omitempty"`
}

Emitted when a reaction is updated on a message.

func (*ReactionUpdatedEvent) GetEventType ΒΆ

func (e *ReactionUpdatedEvent) GetEventType() string

type ReactivateUserRequest ΒΆ

type ReactivateUserRequest struct {
	// ID of the user who's reactivating the user
	CreatedByID *string `json:"created_by_id,omitempty"`
	// Set this field to put new name for the user
	Name *string `json:"name,omitempty"`
	// Restore previously deleted messages
	RestoreMessages *bool `json:"restore_messages,omitempty"`
}

type ReactivateUserResponse ΒΆ

type ReactivateUserResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ReactivateUsersRequest ΒΆ

type ReactivateUsersRequest struct {
	// User IDs to reactivate
	UserIds []string `json:"user_ids"`
	// ID of the user who's reactivating the users
	CreatedByID     *string `json:"created_by_id,omitempty"`
	RestoreChannels *bool   `json:"restore_channels,omitempty"`
	// Restore previously deleted messages
	RestoreMessages *bool `json:"restore_messages,omitempty"`
}

type ReactivateUsersResponse ΒΆ

type ReactivateUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	TaskID   string `json:"task_id"`
}

Basic response information

type ReadCollectionsRequest ΒΆ

type ReadCollectionsRequest struct {
	UserID         *string  `json:"-" query:"user_id"`
	CollectionRefs []string `json:"-" query:"collection_refs"`
}

type ReadCollectionsResponse ΒΆ

type ReadCollectionsResponse struct {
	Duration string `json:"duration"`
	// List of collections matching the references
	Collections []CollectionResponse `json:"collections"`
}

type ReadReceiptsResponse ΒΆ

type ReadReceiptsResponse struct {
	Enabled bool `json:"enabled"`
}

type ReadStateResponse ΒΆ

type ReadStateResponse struct {
	LastRead       Timestamp `json:"last_read"`
	UnreadMessages int       `json:"unread_messages"`
	// User response object
	User                   UserResponse `json:"user"`
	LastDeliveredAt        *Timestamp   `json:"last_delivered_at,omitempty"`
	LastDeliveredMessageID *string      `json:"last_delivered_message_id,omitempty"`
	LastReadMessageID      *string      `json:"last_read_message_id,omitempty"`
}

type RecordSettings ΒΆ

type RecordSettings struct {
	Mode      string          `json:"mode"`
	AudioOnly *bool           `json:"audio_only,omitempty"`
	Quality   *string         `json:"quality,omitempty"`
	Layout    *LayoutSettings `json:"layout,omitempty"`
}

type RecordSettingsRequest ΒΆ

type RecordSettingsRequest struct {
	// Recording mode. One of: available, disabled, auto-on
	Mode string `json:"mode"`
	// Whether to record audio only
	AudioOnly *bool `json:"audio_only,omitempty"`
	// Recording quality. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560
	Quality *string                `json:"quality,omitempty"`
	Layout  *LayoutSettingsRequest `json:"layout,omitempty"`
}

type RecordSettingsResponse ΒΆ

type RecordSettingsResponse struct {
	AudioOnly bool                   `json:"audio_only"`
	Mode      string                 `json:"mode"`
	Quality   string                 `json:"quality"`
	Layout    LayoutSettingsResponse `json:"layout"`
}

RecordSettings is the payload for recording settings

type RejectAppealRequestPayload ΒΆ

type RejectAppealRequestPayload struct {
	// Reason for rejecting the appeal
	DecisionReason string `json:"decision_reason"`
}

Configuration for rejecting an appeal

type RejectFeedMemberInviteRequest ΒΆ

type RejectFeedMemberInviteRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type RejectFeedMemberInviteResponse ΒΆ

type RejectFeedMemberInviteResponse struct {
	Duration string             `json:"duration"`
	Member   FeedMemberResponse `json:"member"`
}

type RejectFollowRequest ΒΆ

type RejectFollowRequest struct {
	// Fully qualified ID of the source feed
	Source string `json:"source"`
	// Fully qualified ID of the target feed
	Target string `json:"target"`
}

type RejectFollowResponse ΒΆ

type RejectFollowResponse struct {
	Duration string         `json:"duration"`
	Follow   FollowResponse `json:"follow"`
}

type ReminderCreatedEvent ΒΆ

type ReminderCreatedEvent struct {
	// The CID of the Channel for which the reminder was created
	Cid string `json:"cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the message for which the reminder was created
	MessageID string `json:"message_id"`
	// The ID of the user for whom the reminder was created
	UserID string         `json:"user_id"`
	Custom map[string]any `json:"custom"`
	// The type of event: "reminder.created" in this case
	Type string `json:"type"`
	// The ID of the parent message, if the reminder is for a thread message
	ParentID   *string               `json:"parent_id,omitempty"`
	ReceivedAt *Timestamp            `json:"received_at,omitempty"`
	Reminder   *ReminderResponseData `json:"reminder,omitempty"`
}

Emitted when a reminder is created.

func (*ReminderCreatedEvent) GetEventType ΒΆ

func (e *ReminderCreatedEvent) GetEventType() string

type ReminderDeletedEvent ΒΆ

type ReminderDeletedEvent struct {
	// The CID of the Channel for which the reminder was created
	Cid string `json:"cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the message for which the reminder was created
	MessageID string `json:"message_id"`
	// The ID of the user for whom the reminder was created
	UserID string         `json:"user_id"`
	Custom map[string]any `json:"custom"`
	// The type of event: "reminder.deleted" in this case
	Type string `json:"type"`
	// The ID of the parent message, if the reminder is for a thread message
	ParentID   *string               `json:"parent_id,omitempty"`
	ReceivedAt *Timestamp            `json:"received_at,omitempty"`
	Reminder   *ReminderResponseData `json:"reminder,omitempty"`
}

Emitted when a reminder is deleted.

func (*ReminderDeletedEvent) GetEventType ΒΆ

func (e *ReminderDeletedEvent) GetEventType() string

type ReminderNotificationEvent ΒΆ

type ReminderNotificationEvent struct {
	// The CID of the Channel for which the reminder was created
	Cid string `json:"cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the message for which the reminder was created
	MessageID string `json:"message_id"`
	// The ID of the user for whom the reminder was created
	UserID string         `json:"user_id"`
	Custom map[string]any `json:"custom"`
	// The type of event: "notification.reminder_due" in this case
	Type       string                `json:"type"`
	ParentID   *string               `json:"parent_id,omitempty"`
	ReceivedAt *Timestamp            `json:"received_at,omitempty"`
	Reminder   *ReminderResponseData `json:"reminder,omitempty"`
}

Emitted when a reminder becomes due, triggering a notification for the user.

func (*ReminderNotificationEvent) GetEventType ΒΆ

func (e *ReminderNotificationEvent) GetEventType() string

type ReminderResponseData ΒΆ

type ReminderResponseData struct {
	ChannelCid string     `json:"channel_cid"`
	CreatedAt  Timestamp  `json:"created_at"`
	MessageID  string     `json:"message_id"`
	UpdatedAt  Timestamp  `json:"updated_at"`
	UserID     string     `json:"user_id"`
	RemindAt   *Timestamp `json:"remind_at,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type ReminderUpdatedEvent ΒΆ

type ReminderUpdatedEvent struct {
	// The CID of the Channel for which the reminder was created
	Cid string `json:"cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the message for which the reminder was created
	MessageID string `json:"message_id"`
	// The ID of the user for whom the reminder was created
	UserID string         `json:"user_id"`
	Custom map[string]any `json:"custom"`
	// The type of event: "reminder.updated" in this case
	Type string `json:"type"`
	// The ID of the parent message, if the reminder is for a thread message
	ParentID   *string               `json:"parent_id,omitempty"`
	ReceivedAt *Timestamp            `json:"received_at,omitempty"`
	Reminder   *ReminderResponseData `json:"reminder,omitempty"`
}

Emitted when a reminder is updated.

func (*ReminderUpdatedEvent) GetEventType ΒΆ

func (e *ReminderUpdatedEvent) GetEventType() string

type RemoveUserGroupMembersRequest ΒΆ

type RemoveUserGroupMembersRequest struct {
	// List of user IDs to remove
	MemberIds []string `json:"member_ids"`
	TeamID    *string  `json:"team_id,omitempty"`
}

type RemoveUserGroupMembersResponse ΒΆ

type RemoveUserGroupMembersResponse struct {
	Duration  string             `json:"duration"`
	UserGroup *UserGroupResponse `json:"user_group,omitempty"`
}

Response for removing members from a user group

type RepliesMeta ΒΆ

type RepliesMeta struct {
	// True if the subtree was cut because the requested depth was reached.
	DepthTruncated bool `json:"depth_truncated"`
	// True if more siblings exist in the database.
	HasMore bool `json:"has_more"`
	// Number of unread siblings that match current filters.
	Remaining int `json:"remaining"`
	// Opaque cursor to request the next page of siblings.
	NextCursor *string `json:"next_cursor,omitempty"`
}

Cursor & depth information for a comment's direct replies. Mirrors Reddit's 'load more replies' semantics.

type ReportByHistogramBucket ΒΆ

type ReportByHistogramBucket struct {
	Category   string  `json:"category"`
	Count      int     `json:"count"`
	Sum        float64 `json:"sum"`
	LowerBound *Bound  `json:"lower_bound,omitempty"`
	UpperBound *Bound  `json:"upper_bound,omitempty"`
}

type ReportClientCallEventRequest ΒΆ

type ReportClientCallEventRequest struct {
	// Client-side events to report (1-100 per request)
	Events []ClientEvent `json:"events"`
}

type ReportClientEventRequest ΒΆ

type ReportClientEventRequest struct {
	// Client-side events to report (1-100 per request)
	Events []ClientEvent `json:"events"`
}

Reports a batch of client-side telemetry events. Each event is validated and processed independently; one invalid event does not block the rest of the batch.

type ReportClientEventResponse ΒΆ

type ReportClientEventResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Response for reporting client-side telemetry events

type ReportResponse ΒΆ

type ReportResponse struct {
	Call         CallReportResponse        `json:"call"`
	Participants ParticipantReportResponse `json:"participants"`
	UserRatings  UserRatingReportResponse  `json:"user_ratings"`
}

type ResolutionMetricsTimeSeries ΒΆ

type ResolutionMetricsTimeSeries struct {
	Height *MetricTimeSeries `json:"height,omitempty"`
	Width  *MetricTimeSeries `json:"width,omitempty"`
}

type ResolveSipAuthRequest ΒΆ

type ResolveSipAuthRequest struct {
	// SIP caller number
	SipCallerNumber string `json:"sip_caller_number"`
	// SIP trunk number to look up
	SipTrunkNumber string `json:"sip_trunk_number"`
	// Host from the SIP From header
	FromHost *string `json:"from_host,omitempty"`
	// Transport-layer source IP address of the SIP request
	SourceIp *string `json:"source_ip,omitempty"`
}

type ResolveSipAuthResponse ΒΆ

type ResolveSipAuthResponse struct {
	// Authentication result: password, accept, or no_trunk_found
	AuthResult string `json:"auth_result"`
	Duration   string `json:"duration"`
	// Password for digest authentication (when auth_result is password)
	Password *string `json:"password,omitempty"`
	// ID of the matched SIP trunk
	TrunkID *string `json:"trunk_id,omitempty"`
	// Username for digest authentication (when auth_result is password)
	Username *string `json:"username,omitempty"`
}

Response containing the pre-authentication decision for a SIP trunk

type ResolveSipInboundRequest ΒΆ

type ResolveSipInboundRequest struct {
	// SIP caller number
	SipCallerNumber string `json:"sip_caller_number"`
	// SIP trunk number to resolve
	SipTrunkNumber string `json:"sip_trunk_number"`
	// Optional routing number for routing number-based call routing (10 digits)
	RoutingNumber *string `json:"routing_number,omitempty"`
	// Optional pre-authenticated trunk ID (from PreAuth no-auth flow)
	TrunkID *string `json:"trunk_id,omitempty"`
	// SIP digest challenge authentication data
	Challenge *SIPChallengeRequest `json:"challenge,omitempty"`
	// Optional SIP headers as key-value pairs
	SipHeaders map[string]string `json:"sip_headers"`
}

type ResolveSipInboundResponse ΒΆ

type ResolveSipInboundResponse struct {
	Duration string `json:"duration"`
	// Credentials for SIP inbound call authentication
	Credentials SipInboundCredentials `json:"credentials"`
	// SIP Inbound Routing Rule response
	SipRoutingRule *SIPInboundRoutingRuleResponse `json:"sip_routing_rule,omitempty"`
	// SIP trunk information
	SipTrunk *SIPTrunkResponse `json:"sip_trunk,omitempty"`
}

Response containing resolved SIP inbound routing information

type Response ΒΆ

type Response struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type RestoreActionRequestPayload ΒΆ

type RestoreActionRequestPayload struct {
	// Reason for the appeal decision
	DecisionReason *string `json:"decision_reason,omitempty"`
}

Configuration for restore action

type RestoreActivityRequest ΒΆ

type RestoreActivityRequest struct {
	EnrichOwnFields *bool   `json:"-" query:"enrich_own_fields"`
	UserID          *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type RestoreActivityResponse ΒΆ

type RestoreActivityResponse struct {
	Duration string           `json:"duration"`
	Activity ActivityResponse `json:"activity"`
}

type RestoreCommentRequest ΒΆ

type RestoreCommentRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type RestoreCommentResponse ΒΆ

type RestoreCommentResponse struct {
	Duration string           `json:"duration"`
	Activity ActivityResponse `json:"activity"`
	Comment  CommentResponse  `json:"comment"`
}

type RestoreFeedGroupRequest ΒΆ

type RestoreFeedGroupRequest struct {
}

type RestoreFeedGroupResponse ΒΆ

type RestoreFeedGroupResponse struct {
	Duration  string            `json:"duration"`
	FeedGroup FeedGroupResponse `json:"feed_group"`
}

type RestoreUsersRequest ΒΆ

type RestoreUsersRequest struct {
	UserIds []string `json:"user_ids"`
}

type RetentionPolicy ΒΆ

type RetentionPolicy struct {
	AppPk     int          `json:"app_pk"`
	EnabledAt Timestamp    `json:"enabled_at"`
	Policy    string       `json:"policy"`
	Config    PolicyConfig `json:"config"`
}

type RetentionRunResponse ΒΆ

type RetentionRunResponse struct {
	AppPk  int      `json:"app_pk"`
	Date   string   `json:"date"`
	Policy string   `json:"policy"`
	Stats  RunStats `json:"stats"`
}

type RetryConfig ΒΆ

type RetryConfig struct {
	// Enabled turns retries on. Default false.
	Enabled bool
	// MaxAttempts is the total attempt budget including the initial request.
	// Default 3 (1 initial + 2 retries).
	MaxAttempts int
	// MaxBackoff caps every wait between attempts, including Retry-After
	// hints from the server. Default 30s.
	MaxBackoff time.Duration
}

RetryConfig is the opt-in auto-retry policy. Disabled by default: the client performs exactly one attempt and surfaces errors unchanged. When enabled, only GET/HEAD requests failing with HTTP 429 or a transport error are retried, and never when the backend marked the error unrecoverable.

type ReviewQueueItemNewEvent ΒΆ

type ReviewQueueItemNewEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
	// The flags associated with this review queue item
	Flags           []ModerationFlagResponse `json:"flags,omitempty"`
	Action          *ActionLogResponse       `json:"action,omitempty"`
	ReviewQueueItem *ReviewQueueItemResponse `json:"review_queue_item,omitempty"`
}

This event is sent when a new moderation review queue item is created

func (*ReviewQueueItemNewEvent) GetEventType ΒΆ

func (e *ReviewQueueItemNewEvent) GetEventType() string

type ReviewQueueItemResponse ΒΆ

type ReviewQueueItemResponse struct {
	// AI-determined text severity
	AiTextSeverity string `json:"ai_text_severity"`
	// When the item was created
	CreatedAt Timestamp `json:"created_at"`
	// ID of the entity being reviewed
	EntityID string `json:"entity_id"`
	// Type of entity being reviewed
	EntityType string `json:"entity_type"`
	// Whether the item has been escalated
	Escalated  bool `json:"escalated"`
	FlagsCount int  `json:"flags_count"`
	// Unique identifier of the review queue item
	ID                    string `json:"id"`
	LatestModeratorAction string `json:"latest_moderator_action"`
	// Suggested moderation action
	RecommendedAction string `json:"recommended_action"`
	// ID of the moderator who reviewed the item
	ReviewedBy string `json:"reviewed_by"`
	// Severity level of the content
	Severity int `json:"severity"`
	// Current status of the review
	Status string `json:"status"`
	// When the item was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Moderation actions taken
	Actions []ActionLogResponse `json:"actions"`
	// Associated ban records
	Bans []BanInfoResponse `json:"bans"`
	// Associated flag records
	Flags []ModerationFlagResponse `json:"flags"`
	// Detected languages in the content
	Languages []string `json:"languages"`
	// When the review was completed
	CompletedAt *Timestamp `json:"completed_at,omitempty"`
	ConfigKey   *string    `json:"config_key,omitempty"`
	// ID of who created the entity
	EntityCreatorID *string `json:"entity_creator_id,omitempty"`
	// When the item was escalated
	EscalatedAt *Timestamp `json:"escalated_at,omitempty"`
	// ID of the moderator who escalated the item
	EscalatedBy *string `json:"escalated_by,omitempty"`
	// When the item was reviewed
	ReviewedAt *Timestamp `json:"reviewed_at,omitempty"`
	// Teams associated with this item
	Teams    []string            `json:"teams,omitempty"`
	Activity *EnrichedActivity   `json:"activity,omitempty"`
	Appeal   *AppealItemResponse `json:"appeal,omitempty"`
	// User response object
	AssignedTo         *UserResponse            `json:"assigned_to,omitempty"`
	Call               *ModerationCallResponse  `json:"call,omitempty"`
	EntityCreator      *EntityCreatorResponse   `json:"entity_creator,omitempty"`
	EscalationMetadata *EscalationMetadata      `json:"escalation_metadata,omitempty"`
	FeedsV2Activity    *EnrichedActivity        `json:"feeds_v2_activity,omitempty"`
	FeedsV2Reaction    *Reaction                `json:"feeds_v2_reaction,omitempty"`
	FeedsV3Activity    *FeedsV3ActivityResponse `json:"feeds_v3_activity,omitempty"`
	FeedsV3Comment     *FeedsV3CommentResponse  `json:"feeds_v3_comment,omitempty"`
	Message            *ChatMessageResponse     `json:"message,omitempty"`
	// Content payload for moderation
	ModerationPayload *ModerationPayloadResponse `json:"moderation_payload,omitempty"`
	Reaction          *Reaction                  `json:"reaction,omitempty"`
}

type ReviewQueueItemUpdatedEvent ΒΆ

type ReviewQueueItemUpdatedEvent struct {
	CreatedAt  Timestamp      `json:"created_at"`
	Custom     map[string]any `json:"custom"`
	Type       string         `json:"type"`
	ReceivedAt *Timestamp     `json:"received_at,omitempty"`
	// The flags associated with this review queue item
	Flags           []ModerationFlagResponse `json:"flags,omitempty"`
	Action          *ActionLogResponse       `json:"action,omitempty"`
	ReviewQueueItem *ReviewQueueItemResponse `json:"review_queue_item,omitempty"`
}

This event is sent when a moderation review queue item is updated

func (*ReviewQueueItemUpdatedEvent) GetEventType ΒΆ

func (e *ReviewQueueItemUpdatedEvent) GetEventType() string

type RevisionHistoryResponse ΒΆ

type RevisionHistoryResponse struct {
	ActionType            string         `json:"action_type"`
	ActorType             string         `json:"actor_type"`
	CreatedAt             Timestamp      `json:"created_at"`
	ObjectID              string         `json:"object_id"`
	ObjectType            string         `json:"object_type"`
	UserID                string         `json:"user_id"`
	ChangedFields         []string       `json:"changed_fields,omitempty"`
	PreviousObjSerialized map[string]any `json:"previous_obj_serialized,omitempty"`
}

type RingCallRequest ΒΆ

type RingCallRequest struct {
	// Indicate if call should be video
	Video *bool `json:"video,omitempty"`
	// Members that should receive the ring. If no ids are provided, all call members who are not already in the call will receive ring notifications.
	MembersIds []string `json:"members_ids"`
}

type RingCallResponse ΒΆ

type RingCallResponse struct {
	Duration string `json:"duration"`
	// List of members ringing notification was sent to
	MembersIds []string `json:"members_ids"`
}

type RingSettings ΒΆ

type RingSettings struct {
	AutoCancelTimeoutMs   int `json:"auto_cancel_timeout_ms"`
	IncomingCallTimeoutMs int `json:"incoming_call_timeout_ms"`
	MissedCallTimeoutMs   int `json:"missed_call_timeout_ms"`
}

type RingSettingsRequest ΒΆ

type RingSettingsRequest struct {
	// When none of the callees accept a ring call in this time a rejection will be sent by the caller with reason 'timeout' by the SDKs
	AutoCancelTimeoutMs int `json:"auto_cancel_timeout_ms"`
	// When a callee is online but doesn't answer a ring call in this time a rejection will be sent with reason 'timeout' by the SDKs
	IncomingCallTimeoutMs int `json:"incoming_call_timeout_ms"`
	// When a callee doesn't accept or reject a ring call in this time a missed call event will be sent
	MissedCallTimeoutMs *int `json:"missed_call_timeout_ms,omitempty"`
}

type RingSettingsResponse ΒΆ

type RingSettingsResponse struct {
	AutoCancelTimeoutMs   int `json:"auto_cancel_timeout_ms"`
	IncomingCallTimeoutMs int `json:"incoming_call_timeout_ms"`
	MissedCallTimeoutMs   int `json:"missed_call_timeout_ms"`
}

type Role ΒΆ

type Role struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Whether this is a custom role or built-in
	Custom bool `json:"custom"`
	// Unique role name
	Name string `json:"name"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// List of scopes where this role is currently present. `.app` means that role is present in app-level grants
	Scopes []string `json:"scopes"`
}

type RuleBuilderAction ΒΆ

type RuleBuilderAction struct {
	Reason          *string            `json:"reason,omitempty"`
	SkipInbox       *bool              `json:"skip_inbox,omitempty"`
	Type            *string            `json:"type,omitempty"`
	BanOptions      *BanOptions        `json:"ban_options,omitempty"`
	CallOptions     *CallActionOptions `json:"call_options,omitempty"`
	FlagUserOptions *FlagUserOptions   `json:"flag_user_options,omitempty"`
}

type RuleBuilderCondition ΒΆ

type RuleBuilderCondition struct {
	Confidence                       *float64                              `json:"confidence,omitempty"`
	Type                             *string                               `json:"type,omitempty"`
	CallCustomPropertyParams         *CallCustomPropertyParameters         `json:"call_custom_property_params,omitempty"`
	CallTypeRuleParams               *CallTypeRuleParameters               `json:"call_type_rule_params,omitempty"`
	CallViolationCountParams         *CallViolationCountParameters         `json:"call_violation_count_params,omitempty"`
	ChannelMessageCountRuleParams    *ChannelMessageCountRuleParameters    `json:"channel_message_count_rule_params,omitempty"`
	ClosedCaptionRuleParams          *ClosedCaptionRuleParameters          `json:"closed_caption_rule_params,omitempty"`
	ContentCountRuleParams           *ContentCountRuleParameters           `json:"content_count_rule_params,omitempty"`
	ContentCustomPropertyCountParams *ContentCustomPropertyCountParameters `json:"content_custom_property_count_params,omitempty"`
	ContentCustomPropertyParams      *ContentCustomPropertyParameters      `json:"content_custom_property_params,omitempty"`
	ContentFlagCountRuleParams       *FlagCountRuleParameters              `json:"content_flag_count_rule_params,omitempty"`
	FloodIdenticalParams             *FloodIdenticalRuleParameters         `json:"flood_identical_params,omitempty"`
	FloodSimilarParams               *FloodSimilarRuleParameters           `json:"flood_similar_params,omitempty"`
	ImageContentParams               *ImageContentParameters               `json:"image_content_params,omitempty"`
	ImageRuleParams                  *ImageRuleParameters                  `json:"image_rule_params,omitempty"`
	IpContentCountRuleParams         *IPContentCountRuleParameters         `json:"ip_content_count_rule_params,omitempty"`
	IpFlagCountRuleParams            *IPFlagCountRuleParameters            `json:"ip_flag_count_rule_params,omitempty"`
	KeyframeOcrRuleParams            *KeyframeOCRRuleParameters            `json:"keyframe_ocr_rule_params,omitempty"`
	KeyframeRuleParams               *KeyframeRuleParameters               `json:"keyframe_rule_params,omitempty"`
	OcrContentParams                 *OCRContentParameters                 `json:"ocr_content_params,omitempty"`
	TextContentParams                *TextContentParameters                `json:"text_content_params,omitempty"`
	TextRuleParams                   *TextRuleParameters                   `json:"text_rule_params,omitempty"`
	UserCreatedWithinParams          *UserCreatedWithinParameters          `json:"user_created_within_params,omitempty"`
	UserCustomPropertyParams         *UserCustomPropertyParameters         `json:"user_custom_property_params,omitempty"`
	UserFlagCountRuleParams          *FlagCountRuleParameters              `json:"user_flag_count_rule_params,omitempty"`
	UserIdenticalContentCountParams  *UserIdenticalContentCountParameters  `json:"user_identical_content_count_params,omitempty"`
	UserRoleParams                   *UserRoleParameters                   `json:"user_role_params,omitempty"`
	UserRuleParams                   *UserRuleParameters                   `json:"user_rule_params,omitempty"`
	VideoContentParams               *VideoContentParameters               `json:"video_content_params,omitempty"`
	VideoRuleParams                  *VideoRuleParameters                  `json:"video_rule_params,omitempty"`
}

type RuleBuilderConditionGroup ΒΆ

type RuleBuilderConditionGroup struct {
	Logic      *string                `json:"logic,omitempty"`
	Conditions []RuleBuilderCondition `json:"conditions,omitempty"`
}

type RuleBuilderConfig ΒΆ

type RuleBuilderConfig struct {
	Async *bool             `json:"async,omitempty"`
	Rules []RuleBuilderRule `json:"rules,omitempty"`
}

type RuleBuilderRule ΒΆ

type RuleBuilderRule struct {
	RuleType        string                      `json:"rule_type"`
	CooldownPeriod  *string                     `json:"cooldown_period,omitempty"`
	ID              *string                     `json:"id,omitempty"`
	Logic           *string                     `json:"logic,omitempty"`
	ActionSequences []CallRuleActionSequence    `json:"action_sequences,omitempty"`
	Conditions      []RuleBuilderCondition      `json:"conditions,omitempty"`
	Groups          []RuleBuilderConditionGroup `json:"groups,omitempty"`
	Action          *RuleBuilderAction          `json:"action,omitempty"`
}

type RunMessageActionRequest ΒΆ

type RunMessageActionRequest struct {
	// ReadOnlyData to execute command with
	FormData map[string]string `json:"form_data"`
	UserID   *string           `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type RunStats ΒΆ

type RunStats struct {
	ChannelsDeleted *int `json:"channels_deleted,omitempty"`
	MessagesDeleted *int `json:"messages_deleted,omitempty"`
}

type S3Request ΒΆ

type S3Request struct {
	// The AWS region where the bucket is hosted
	S3Region string `json:"s3_region"`
	// The AWS API key. To use Amazon S3 as your storage provider, you have two authentication options: IAM role or API key. If you do not specify the `s3_api_key` parameter, Stream will use IAM role authentication. In that case make sure to have the correct IAM role configured for your application.
	S3APIKey *string `json:"s3_api_key,omitempty"`
	// The custom endpoint for S3. If you want to use a custom endpoint, you must also provide the `s3_api_key` and `s3_secret` parameters.
	S3CustomEndpointUrl *string `json:"s3_custom_endpoint_url,omitempty"`
	// The AWS API Secret
	S3Secret *string `json:"s3_secret,omitempty"`
}

Config for creating Amazon S3 storage.

type SDKUsageReport ΒΆ

type SDKUsageReport struct {
	PerSdkUsage map[string]*PerSDKUsageReport `json:"per_sdk_usage"`
}

type SDKUsageReportResponse ΒΆ

type SDKUsageReportResponse struct {
	Daily []DailyAggregateSDKUsageReportResponse `json:"daily"`
}

type SFULocationResponse ΒΆ

type SFULocationResponse struct {
	Datacenter string `json:"datacenter"`
	ID         string `json:"id"`
	// Geographic coordinates
	Coordinates CoordinatesResponse `json:"coordinates"`
	// Geographic location metadata
	Location LocationResponse `json:"location"`
	Count    *int             `json:"count,omitempty"`
}

type SIPCallConfigsRequest ΒΆ

type SIPCallConfigsRequest struct {
	// Custom data associated with the call
	CustomData map[string]any `json:"custom_data,omitempty"`
}

Configuration for SIP call settings

type SIPCallConfigsResponse ΒΆ

type SIPCallConfigsResponse struct {
	// Custom data associated with the call
	CustomData map[string]any `json:"custom_data"`
}

SIP call configuration response

type SIPCallerConfigsRequest ΒΆ

type SIPCallerConfigsRequest struct {
	// Unique identifier for the caller (handlebars template)
	ID string `json:"id"`
	// Custom data associated with the caller (values are handlebars templates)
	CustomData map[string]any `json:"custom_data,omitempty"`
}

Configuration for SIP caller settings

type SIPCallerConfigsResponse ΒΆ

type SIPCallerConfigsResponse struct {
	// Unique identifier for the caller
	ID string `json:"id"`
	// Custom data associated with the caller
	CustomData map[string]any `json:"custom_data"`
}

SIP caller configuration response

type SIPChallengeRequest ΒΆ

type SIPChallengeRequest struct {
	// Deprecated: A1 hash for backward compatibility
	A1 *string `json:"a1,omitempty"`
	// Hash algorithm (e.g., MD5, SHA-256)
	Algorithm *string `json:"algorithm,omitempty"`
	// Character set
	Charset *string `json:"charset,omitempty"`
	// Client nonce for qop=auth
	Cnonce *string `json:"cnonce,omitempty"`
	// SIP method (e.g., INVITE)
	Method *string `json:"method,omitempty"`
	// Nonce count for qop=auth
	Nc *string `json:"nc,omitempty"`
	// Server nonce
	Nonce *string `json:"nonce,omitempty"`
	// Opaque value
	Opaque *string `json:"opaque,omitempty"`
	// Authentication realm
	Realm *string `json:"realm,omitempty"`
	// Digest response hash from client
	Response *string `json:"response,omitempty"`
	// Whether the nonce is stale
	Stale *bool `json:"stale,omitempty"`
	// Request URI
	Uri *string `json:"uri,omitempty"`
	// Whether to hash the username
	Userhash *bool `json:"userhash,omitempty"`
	// Username for authentication
	Username *string `json:"username,omitempty"`
	// Domain list
	Domain []string `json:"domain,omitempty"`
	// Quality of protection options
	Qop []string `json:"qop,omitempty"`
}

SIP digest challenge authentication data

type SIPDirectRoutingRuleCallConfigsRequest ΒΆ

type SIPDirectRoutingRuleCallConfigsRequest struct {
	// ID of the call (handlebars template)
	CallID string `json:"call_id"`
	// Type of the call
	CallType string `json:"call_type"`
}

Configuration for direct routing rule calls

type SIPDirectRoutingRuleCallConfigsResponse ΒΆ

type SIPDirectRoutingRuleCallConfigsResponse struct {
	// ID of the call
	CallID string `json:"call_id"`
	// Type of the call
	CallType string `json:"call_type"`
}

Direct routing rule call configuration response

type SIPInboundRoutingRulePinConfigsRequest ΒΆ

type SIPInboundRoutingRulePinConfigsRequest struct {
	// Optional webhook URL for custom PIN handling
	CustomWebhookUrl *string `json:"custom_webhook_url,omitempty"`
	// Prompt message for failed PIN attempts
	PinFailedAttemptPrompt *string `json:"pin_failed_attempt_prompt,omitempty"`
	// Prompt message for hangup after PIN input
	PinHangupPrompt *string `json:"pin_hangup_prompt,omitempty"`
	// Prompt message for PIN input
	PinPrompt *string `json:"pin_prompt,omitempty"`
	// Prompt message for successful PIN input
	PinSuccessPrompt *string `json:"pin_success_prompt,omitempty"`
}

Configuration for PIN routing rule calls

type SIPInboundRoutingRulePinConfigsResponse ΒΆ

type SIPInboundRoutingRulePinConfigsResponse struct {
	// Optional webhook URL for custom PIN handling
	CustomWebhookUrl *string `json:"custom_webhook_url,omitempty"`
	// Prompt message for failed PIN attempts
	PinFailedAttemptPrompt *string `json:"pin_failed_attempt_prompt,omitempty"`
	// Prompt message for hangup after PIN input
	PinHangupPrompt *string `json:"pin_hangup_prompt,omitempty"`
	// Prompt message for PIN input
	PinPrompt *string `json:"pin_prompt,omitempty"`
	// Prompt message for successful PIN input
	PinSuccessPrompt *string `json:"pin_success_prompt,omitempty"`
}

PIN routing rule call configuration response

type SIPInboundRoutingRuleRequest ΒΆ

type SIPInboundRoutingRuleRequest struct {
	// Name of the SIP Inbound Routing Rule
	Name string `json:"name"`
	// List of SIP trunk IDs
	TrunkIds []string `json:"trunk_ids"`
	// Configuration for SIP caller settings
	CallerConfigs SIPCallerConfigsRequest `json:"caller_configs"`
	// List of called numbers
	CalledNumbers []string `json:"called_numbers,omitempty"`
	// List of caller numbers (optional)
	CallerNumbers []string `json:"caller_numbers,omitempty"`
	// Configuration for SIP call settings
	CallConfigs *SIPCallConfigsRequest `json:"call_configs,omitempty"`
	// Configuration for direct routing rule calls
	DirectRoutingConfigs *SIPDirectRoutingRuleCallConfigsRequest `json:"direct_routing_configs,omitempty"`
	// Configuration for PIN protection settings
	PinProtectionConfigs *SIPPinProtectionConfigsRequest `json:"pin_protection_configs,omitempty"`
	// Configuration for PIN routing rule calls
	PinRoutingConfigs *SIPInboundRoutingRulePinConfigsRequest `json:"pin_routing_configs,omitempty"`
}

Request to create or update a SIP Inbound Routing Rule

type SIPInboundRoutingRuleResponse ΒΆ

type SIPInboundRoutingRuleResponse struct {
	// Creation timestamp
	CreatedAt Timestamp `json:"created_at"`
	Duration  string    `json:"duration"`
	// Unique identifier of the SIP Inbound Routing Rule
	ID string `json:"id"`
	// Name of the SIP Inbound Routing Rule
	Name string `json:"name"`
	// Last update timestamp
	UpdatedAt Timestamp `json:"updated_at"`
	// List of called numbers
	CalledNumbers []string `json:"called_numbers"`
	// List of SIP trunk IDs
	TrunkIds []string `json:"trunk_ids"`
	// List of caller numbers
	CallerNumbers []string `json:"caller_numbers,omitempty"`
	// SIP call configuration response
	CallConfigs *SIPCallConfigsResponse `json:"call_configs,omitempty"`
	// SIP caller configuration response
	CallerConfigs *SIPCallerConfigsResponse `json:"caller_configs,omitempty"`
	// Direct routing rule call configuration response
	DirectRoutingConfigs *SIPDirectRoutingRuleCallConfigsResponse `json:"direct_routing_configs,omitempty"`
	// PIN protection configuration response
	PinProtectionConfigs *SIPPinProtectionConfigsResponse `json:"pin_protection_configs,omitempty"`
	// PIN routing rule call configuration response
	PinRoutingConfigs *SIPInboundRoutingRulePinConfigsResponse `json:"pin_routing_configs,omitempty"`
}

SIP Inbound Routing Rule response

type SIPPinProtectionConfigsRequest ΒΆ

type SIPPinProtectionConfigsRequest struct {
	// Default PIN to use if there is no PIN set on the call object
	DefaultPin *string `json:"default_pin,omitempty"`
	// Whether PIN protection is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// Maximum number of PIN attempts allowed
	MaxAttempts *int `json:"max_attempts,omitempty"`
	// Number of digits required for the PIN
	RequiredPinDigits *int `json:"required_pin_digits,omitempty"`
}

Configuration for PIN protection settings

type SIPPinProtectionConfigsResponse ΒΆ

type SIPPinProtectionConfigsResponse struct {
	// Whether PIN protection is enabled
	Enabled bool `json:"enabled"`
	// Default PIN to use if there is no PIN set on the call object
	DefaultPin *string `json:"default_pin,omitempty"`
	// Maximum number of PIN attempts allowed
	MaxAttempts *int `json:"max_attempts,omitempty"`
	// Number of digits required for the PIN
	RequiredPinDigits *int `json:"required_pin_digits,omitempty"`
}

PIN protection configuration response

type SIPTrunkResponse ΒΆ

type SIPTrunkResponse struct {
	// Creation timestamp
	CreatedAt Timestamp `json:"created_at"`
	// Unique identifier for the SIP trunk
	ID string `json:"id"`
	// Name of the SIP trunk
	Name string `json:"name"`
	// Password for SIP trunk authentication
	Password string `json:"password"`
	// Last update timestamp
	UpdatedAt Timestamp `json:"updated_at"`
	// The URI for the SIP trunk
	Uri string `json:"uri"`
	// Username for SIP trunk authentication
	Username string `json:"username"`
	// Allowed IPv4/IPv6 addresses or CIDR blocks
	AllowedIps []string `json:"allowed_ips"`
	// Phone numbers associated with this SIP trunk
	Numbers []string `json:"numbers"`
}

SIP trunk information

type SRTCredentials ΒΆ

type SRTCredentials struct {
	Address string
}

type SRTIngress ΒΆ

type SRTIngress struct {
	Address string `json:"address"`
}

type ScoreBands ΒΆ added in v5.3.0

type ScoreBands struct {
	Good *float64 `json:"good,omitempty"`
	Ok   *float64 `json:"ok,omitempty"`
	Poor *float64 `json:"poor,omitempty"`
}

type ScreensharingSettings ΒΆ

type ScreensharingSettings struct {
	AccessRequestEnabled bool              `json:"access_request_enabled"`
	Enabled              bool              `json:"enabled"`
	TargetResolution     *TargetResolution `json:"target_resolution,omitempty"`
}

type ScreensharingSettingsRequest ΒΆ

type ScreensharingSettingsRequest struct {
	AccessRequestEnabled *bool             `json:"access_request_enabled,omitempty"`
	Enabled              *bool             `json:"enabled,omitempty"`
	TargetResolution     *TargetResolution `json:"target_resolution,omitempty"`
}

type ScreensharingSettingsResponse ΒΆ

type ScreensharingSettingsResponse struct {
	AccessRequestEnabled bool              `json:"access_request_enabled"`
	Enabled              bool              `json:"enabled"`
	TargetResolution     *TargetResolution `json:"target_resolution,omitempty"`
}

type SearchPayload ΒΆ

type SearchPayload struct {
	// Channel filter conditions
	FilterConditions   map[string]any `json:"filter_conditions"`
	ForceDefaultSearch *bool          `json:"force_default_search,omitempty"`
	ForceSqlV2Backend  *bool          `json:"force_sql_v2_backend,omitempty"`
	// Number of messages to return
	Limit *int `json:"limit,omitempty"`
	// Pagination parameter. Cannot be used with non-zero offset.
	Next *string `json:"next,omitempty"`
	// Pagination offset. Cannot be used with sort or next.
	Offset *int `json:"offset,omitempty"`
	// Search phrase
	Query *string `json:"query,omitempty"`
	// Sort parameters. Cannot be used with non-zero offset
	Sort []SortParamRequest `json:"sort,omitempty"`
	// Message filter conditions
	MessageFilterConditions map[string]any  `json:"message_filter_conditions,omitempty"`
	MessageOptions          *MessageOptions `json:"message_options,omitempty"`
}

type SearchRequest ΒΆ

type SearchRequest struct {
	Payload *SearchPayload `json:"-" query:"payload"`
}

type SearchResponse ΒΆ

type SearchResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Search results
	Results []SearchResult `json:"results"`
	// Value to pass to the next search query in order to paginate
	Next *string `json:"next,omitempty"`
	// Value that points to the previous page. Pass as the next value in a search query to paginate backwards
	Previous       *string        `json:"previous,omitempty"`
	ResultsWarning *SearchWarning `json:"results_warning,omitempty"`
}

type SearchResult ΒΆ

type SearchResult struct {
	Message *SearchResultMessage `json:"message,omitempty"`
}

type SearchResultMessage ΒΆ

type SearchResultMessage struct {
	Cid                  string             `json:"cid"`
	CreatedAt            Timestamp          `json:"created_at"`
	DeletedReplyCount    int                `json:"deleted_reply_count"`
	Html                 string             `json:"html"`
	ID                   string             `json:"id"`
	MentionedChannel     bool               `json:"mentioned_channel"`
	MentionedHere        bool               `json:"mentioned_here"`
	Pinned               bool               `json:"pinned"`
	ReplyCount           int                `json:"reply_count"`
	Shadowed             bool               `json:"shadowed"`
	Silent               bool               `json:"silent"`
	Text                 string             `json:"text"`
	UpdatedAt            Timestamp          `json:"updated_at"`
	Type                 string             `json:"type"`
	Attachments          []Attachment       `json:"attachments"`
	LatestReactions      []ReactionResponse `json:"latest_reactions"`
	MentionedUsers       []UserResponse     `json:"mentioned_users"`
	OwnReactions         []ReactionResponse `json:"own_reactions"`
	RestrictedVisibility []string           `json:"restricted_visibility"`
	Custom               map[string]any     `json:"custom"`
	ReactionCounts       map[string]int     `json:"reaction_counts"`
	ReactionScores       map[string]int     `json:"reaction_scores"`
	// User response object
	User                 UserResponse        `json:"user"`
	Command              *string             `json:"command,omitempty"`
	DeletedAt            *Timestamp          `json:"deleted_at,omitempty"`
	DeletedForMe         *bool               `json:"deleted_for_me,omitempty"`
	MessageTextUpdatedAt *Timestamp          `json:"message_text_updated_at,omitempty"`
	Mml                  *string             `json:"mml,omitempty"`
	ParentID             *string             `json:"parent_id,omitempty"`
	PinExpires           *Timestamp          `json:"pin_expires,omitempty"`
	PinnedAt             *Timestamp          `json:"pinned_at,omitempty"`
	PollID               *string             `json:"poll_id,omitempty"`
	QuotedMessageID      *string             `json:"quoted_message_id,omitempty"`
	ShowInChannel        *bool               `json:"show_in_channel,omitempty"`
	MentionedGroupIds    []string            `json:"mentioned_group_ids,omitempty"`
	MentionedGroups      []UserGroupResponse `json:"mentioned_groups,omitempty"`
	MentionedRoles       []string            `json:"mentioned_roles,omitempty"`
	ThreadParticipants   []UserResponse      `json:"thread_participants,omitempty"`
	// Represents channel in chat
	Channel     *ChannelResponse              `json:"channel,omitempty"`
	Draft       *DraftResponse                `json:"draft,omitempty"`
	I18n        map[string]string             `json:"i18n,omitempty"`
	ImageLabels map[string][]string           `json:"image_labels,omitempty"`
	Member      *ChannelMemberPartialResponse `json:"member,omitempty"`
	Moderation  *ModerationV2Response         `json:"moderation,omitempty"`
	// User response object
	PinnedBy *UserResponse     `json:"pinned_by,omitempty"`
	Poll     *PollResponseData `json:"poll,omitempty"`
	// Represents any chat message
	QuotedMessage  *MessageResponse                  `json:"quoted_message,omitempty"`
	ReactionGroups map[string]*ReactionGroupResponse `json:"reaction_groups,omitempty"`
	Reminder       *ReminderResponseData             `json:"reminder,omitempty"`
	SharedLocation *SharedLocationResponseData       `json:"shared_location,omitempty"`
}

type SearchRolesRequest ΒΆ

type SearchRolesRequest struct {
	Query              string  `json:"-" query:"query"`
	Limit              *int    `json:"-" query:"limit"`
	NameGt             *string `json:"-" query:"name_gt"`
	RoleType           *string `json:"-" query:"role_type"`
	IncludeGlobalRoles *bool   `json:"-" query:"include_global_roles"`
}

type SearchRolesResponse ΒΆ

type SearchRolesResponse struct {
	Duration string `json:"duration"`
	// Matching roles, sorted ascending by name
	Roles []Role `json:"roles"`
}

type SearchUserGroupsRequest ΒΆ

type SearchUserGroupsRequest struct {
	Query  string  `json:"-" query:"query"`
	Limit  *int    `json:"-" query:"limit"`
	NameGt *string `json:"-" query:"name_gt"`
	IDGt   *string `json:"-" query:"id_gt"`
	TeamID *string `json:"-" query:"team_id"`
}

type SearchUserGroupsResponse ΒΆ

type SearchUserGroupsResponse struct {
	Duration string `json:"duration"`
	// List of matching user groups
	UserGroups []UserGroupResponse `json:"user_groups"`
}

Response for searching user groups

type SearchWarning ΒΆ

type SearchWarning struct {
	// Code corresponding to the warning
	WarningCode int `json:"warning_code"`
	// Description of the warning
	WarningDescription string `json:"warning_description"`
	// Number of channels searched
	ChannelSearchCount *int `json:"channel_search_count,omitempty"`
	// Channel CIDs for the searched channels
	ChannelSearchCids []string `json:"channel_search_cids,omitempty"`
}

type Segment ΒΆ

type Segment struct {
	AllSenderChannels bool           `json:"all_sender_channels"`
	AllUsers          bool           `json:"all_users"`
	CreatedAt         Timestamp      `json:"created_at"`
	ID                string         `json:"id"`
	Name              string         `json:"name"`
	Size              int            `json:"size"`
	UpdatedAt         Timestamp      `json:"updated_at"`
	Type              string         `json:"type"`
	DeletedAt         *Timestamp     `json:"deleted_at,omitempty"`
	Description       *string        `json:"description,omitempty"`
	TaskID            *string        `json:"task_id,omitempty"`
	Filter            map[string]any `json:"filter,omitempty"`
}

type SegmentResponse ΒΆ

type SegmentResponse struct {
	AllSenderChannels bool           `json:"all_sender_channels"`
	AllUsers          bool           `json:"all_users"`
	CreatedAt         Timestamp      `json:"created_at"`
	DeletedAt         Timestamp      `json:"deleted_at"`
	Description       string         `json:"description"`
	ID                string         `json:"id"`
	Name              string         `json:"name"`
	Size              int            `json:"size"`
	UpdatedAt         Timestamp      `json:"updated_at"`
	Type              string         `json:"type"`
	Filter            map[string]any `json:"filter"`
}

type SegmentTargetExistsRequest ΒΆ

type SegmentTargetExistsRequest struct {
}

type SegmentTargetResponse ΒΆ

type SegmentTargetResponse struct {
	AppPk     int       `json:"app_pk"`
	CreatedAt Timestamp `json:"created_at"`
	SegmentID string    `json:"segment_id"`
	TargetID  string    `json:"target_id"`
}

type Segments ΒΆ added in v5.3.0

type Segments struct {
	ByCountryReason string                `json:"by_country_reason"`
	ByBrowser       []BroadcastSegment    `json:"by_browser"`
	ByCountry       []BroadcastSegment    `json:"by_country"`
	ByDeliveryZone  []DeliveryZoneSegment `json:"by_delivery_zone"`
	ByOs            []BroadcastSegment    `json:"by_os"`
	BySdk           []BroadcastSegment    `json:"by_sdk"`
}

type SendCallEventRequest ΒΆ

type SendCallEventRequest struct {
	UserID *string        `json:"user_id,omitempty"`
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type SendCallEventResponse ΒΆ

type SendCallEventResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

type SendClosedCaptionRequest ΒΆ

type SendClosedCaptionRequest struct {
	SpeakerID  string     `json:"speaker_id"`
	Text       string     `json:"text"`
	EndTime    *Timestamp `json:"end_time,omitempty"`
	Language   *string    `json:"language,omitempty"`
	Service    *string    `json:"service,omitempty"`
	StartTime  *Timestamp `json:"start_time,omitempty"`
	Translated *bool      `json:"translated,omitempty"`
	UserID     *string    `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type SendClosedCaptionResponse ΒΆ

type SendClosedCaptionResponse struct {
	Duration string `json:"duration"`
}

type SendEventRequest ΒΆ

type SendEventRequest struct {
	Event EventRequest `json:"event"`
}

type SendMessageRequest ΒΆ

type SendMessageRequest struct {
	// Message data for creating or updating a message
	Message         MessageRequest `json:"message"`
	ForceModeration *bool          `json:"force_moderation,omitempty"`
	// When true, the response includes channel_context: a slim channel object with cid, type, id and created_by
	IncludeChannelContext *bool `json:"include_channel_context,omitempty"`
	// When true, the response includes mentioned_members: for each mentioned user, whether that user is currently a channel member. Requires the ReadChannelMembers permission
	IncludeMentionedMembers *bool             `json:"include_mentioned_members,omitempty"`
	KeepChannelHidden       *bool             `json:"keep_channel_hidden,omitempty"`
	Pending                 *bool             `json:"pending,omitempty"`
	SkipEnrichUrl           *bool             `json:"skip_enrich_url,omitempty"`
	SkipPush                *bool             `json:"skip_push,omitempty"`
	PendingMessageMetadata  map[string]string `json:"pending_message_metadata"`
}

type SendMessageResponse ΒΆ

type SendMessageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
	// Slim channel object: identity plus creator
	ChannelContext *ChannelContextResponse `json:"channel_context,omitempty"`
	// Map of mentioned user ID to whether that user is currently an active channel member. Only set when include_mentioned_members was requested; omitted when the message has no mentions or the membership lookup failed
	MentionedMembers map[string]bool `json:"mentioned_members,omitempty"`
	// Pending message metadata
	PendingMessageMetadata map[string]string `json:"pending_message_metadata,omitempty"`
}

type SendReactionRequest ΒΆ

type SendReactionRequest struct {
	// Represents user reaction to a message
	Reaction ReactionRequest `json:"reaction"`
	// Whether to replace all existing user reactions
	EnforceUnique *bool `json:"enforce_unique,omitempty"`
	// Skips any mobile push notifications
	SkipPush *bool `json:"skip_push,omitempty"`
}

type SendReactionResponse ΒΆ

type SendReactionResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message  MessageResponse  `json:"message"`
	Reaction ReactionResponse `json:"reaction"`
}

Basic response information

type SendUserCustomEventRequest ΒΆ

type SendUserCustomEventRequest struct {
	Event UserCustomEventRequest `json:"event"`
}

type SessionClient ΒΆ

type SessionClient struct {
	Ip          *string            `json:"ip,omitempty"`
	Name        *string            `json:"name,omitempty"`
	NetworkType *string            `json:"network_type,omitempty"`
	Version     *string            `json:"version,omitempty"`
	Location    *CallStatsLocation `json:"location,omitempty"`
}

type SessionSettings ΒΆ

type SessionSettings struct {
	InactivityTimeoutSeconds int `json:"inactivity_timeout_seconds"`
}

type SessionSettingsRequest ΒΆ

type SessionSettingsRequest struct {
	InactivityTimeoutSeconds int `json:"inactivity_timeout_seconds"`
}

type SessionSettingsResponse ΒΆ

type SessionSettingsResponse struct {
	InactivityTimeoutSeconds int `json:"inactivity_timeout_seconds"`
}

type SessionWarningResponse ΒΆ

type SessionWarningResponse struct {
	Code    string     `json:"code"`
	Warning string     `json:"warning"`
	Time    *Timestamp `json:"time,omitempty"`
}

type SetRetentionPolicyRequest ΒΆ

type SetRetentionPolicyRequest struct {
	MaxAgeHours int    `json:"max_age_hours"`
	Policy      string `json:"policy"`
}

type SetRetentionPolicyResponse ΒΆ

type SetRetentionPolicyResponse struct {
	// Duration of the request in milliseconds
	Duration string          `json:"duration"`
	Policy   RetentionPolicy `json:"policy"`
}

Basic response information

type SetupSession ΒΆ

type SetupSession struct {
	CreatedAt   Timestamp      `json:"created_at"`
	CurrentStep string         `json:"current_step"`
	Status      string         `json:"status"`
	UpdatedAt   Timestamp      `json:"updated_at"`
	SetupData   map[string]any `json:"setup_data"`
	CompletedAt *Timestamp     `json:"completed_at,omitempty"`
}

type ShadowBlockActionRequestPayload ΒΆ

type ShadowBlockActionRequestPayload struct {
	// Reason for shadow blocking
	Reason *string `json:"reason,omitempty"`
}

Configuration for shadow block action

type ShareResponse ΒΆ

type ShareResponse struct {
	// ID of the sharing (child) activity
	ActivityID string `json:"activity_id"`
	// When the share occurred
	CreatedAt Timestamp `json:"created_at"`
	// User response object
	User UserResponse `json:"user"`
}

type SharedLocation ΒΆ

type SharedLocation struct {
	Latitude          float64    `json:"latitude"`
	Longitude         float64    `json:"longitude"`
	CreatedByDeviceID *string    `json:"created_by_device_id,omitempty"`
	EndAt             *Timestamp `json:"end_at,omitempty"`
}

type SharedLocationResponse ΒΆ

type SharedLocationResponse struct {
	// Channel CID
	ChannelCid string `json:"channel_cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Device ID that created the live location
	CreatedByDeviceID string `json:"created_by_device_id"`
	Duration          string `json:"duration"`
	// Latitude coordinate
	Latitude float64 `json:"latitude"`
	// Longitude coordinate
	Longitude float64 `json:"longitude"`
	// Message ID
	MessageID string `json:"message_id"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// User ID
	UserID string `json:"user_id"`
	// Time when the live location expires
	EndAt *Timestamp `json:"end_at,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
}

type SharedLocationResponseData ΒΆ

type SharedLocationResponseData struct {
	ChannelCid        string     `json:"channel_cid"`
	CreatedAt         Timestamp  `json:"created_at"`
	CreatedByDeviceID string     `json:"created_by_device_id"`
	Latitude          float64    `json:"latitude"`
	Longitude         float64    `json:"longitude"`
	MessageID         string     `json:"message_id"`
	UpdatedAt         Timestamp  `json:"updated_at"`
	UserID            string     `json:"user_id"`
	EndAt             *Timestamp `json:"end_at,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
}

type SharedLocationsResponse ΒΆ

type SharedLocationsResponse struct {
	Duration            string                       `json:"duration"`
	ActiveLiveLocations []SharedLocationResponseData `json:"active_live_locations"`
}

type ShowChannelRequest ΒΆ

type ShowChannelRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type ShowChannelResponse ΒΆ

type ShowChannelResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type SingleFollowResponse ΒΆ

type SingleFollowResponse struct {
	Duration string         `json:"duration"`
	Follow   FollowResponse `json:"follow"`
	// Whether a notification activity was successfully created
	NotificationCreated *bool `json:"notification_created,omitempty"`
}

type SipInboundCredentials ΒΆ

type SipInboundCredentials struct {
	// API key for the application
	APIKey string `json:"api_key"`
	// ID of the call
	CallID string `json:"call_id"`
	// Type of the call
	CallType string `json:"call_type"`
	// Authentication token for the call
	Token string `json:"token"`
	// User ID for the call
	UserID string `json:"user_id"`
	// Custom data associated with the call
	CallCustomData map[string]any `json:"call_custom_data"`
	// Custom data associated with the user
	UserCustomData map[string]any `json:"user_custom_data"`
}

Credentials for SIP inbound call authentication

type SortParamRequest ΒΆ

type SortParamRequest struct {
	// Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One of: -1, 1
	Direction *int `json:"direction,omitempty"`
	// Name of field to sort by
	Field *string `json:"field,omitempty"`
	// Type of field to sort by. Empty string or omitted means string type (default). One of: number, boolean
	Type *string `json:"type,omitempty"`
}

type SourceHealth ΒΆ added in v5.3.0

type SourceHealth struct {
	CoHostPeak        int                  `json:"co_host_peak"`
	DeadAirS          int                  `json:"dead_air_s"`
	Interruptions     []SourceInterruption `json:"interruptions"`
	PublisherSessions []PublisherSession   `json:"publisher_sessions"`
}

type SourceInterruption ΒΆ added in v5.3.0

type SourceInterruption struct {
	AtOffsetMin float64 `json:"at_offset_min"`
	DeadAirS    int     `json:"dead_air_s"`
	Kind        string  `json:"kind"`
	Seamless    *bool   `json:"seamless,omitempty"`
}

type SpeechSegmentConfig ΒΆ

type SpeechSegmentConfig struct {
	MaxSpeechCaptionMs *int `json:"max_speech_caption_ms,omitempty"`
	SilenceDurationMs  *int `json:"silence_duration_ms,omitempty"`
}

type StartCampaignRequest ΒΆ

type StartCampaignRequest struct {
	ScheduledFor *Timestamp `json:"scheduled_for,omitempty"`
	StopAt       *Timestamp `json:"stop_at,omitempty"`
}

type StartCampaignResponse ΒΆ

type StartCampaignResponse struct {
	// Duration of the request in milliseconds
	Duration string            `json:"duration"`
	Campaign *CampaignResponse `json:"campaign,omitempty"`
	Users    *PagerResponse    `json:"users,omitempty"`
}

Basic response information

type StartClosedCaptionsRequest ΒΆ

type StartClosedCaptionsRequest struct {
	// Enable transcriptions along with closed captions
	EnableTranscription *bool `json:"enable_transcription,omitempty"`
	// Which external storage to use for transcriptions (only applicable if enable_transcription is true)
	ExternalStorage *string `json:"external_storage,omitempty"`
	// The spoken language in the call, if not provided the language defined in the transcription settings will be used. One of: auto, ar, bg, ca, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, ms, nl, no, pl, pt, ro, ru, sk, sl, sv, ta, th, tl, tr, uk, zh
	Language            *string              `json:"language,omitempty"`
	SpeechSegmentConfig *SpeechSegmentConfig `json:"speech_segment_config,omitempty"`
}

type StartClosedCaptionsResponse ΒΆ

type StartClosedCaptionsResponse struct {
	Duration string `json:"duration"`
}

type StartFrameRecordingRequest ΒΆ

type StartFrameRecordingRequest struct {
	RecordingExternalStorage *string `json:"recording_external_storage,omitempty"`
}

type StartFrameRecordingResponse ΒΆ

type StartFrameRecordingResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

StartFrameRecordingResponse is the response payload for the start frame recording endpoint.

type StartHLSBroadcastingRequest ΒΆ

type StartHLSBroadcastingRequest struct {
}

type StartHLSBroadcastingResponse ΒΆ

type StartHLSBroadcastingResponse struct {
	Duration string `json:"duration"`
	// the URL of the HLS playlist
	PlaylistUrl string `json:"playlist_url"`
}

StartHLSBroadcastingResponse is the payload for starting an HLS broadcasting.

type StartPolicyTestRunRequest ΒΆ added in v5.3.0

type StartPolicyTestRunRequest struct {
}

type StartRTMPBroadcastsRequest ΒΆ

type StartRTMPBroadcastsRequest struct {
	// List of broadcasts to start
	Broadcasts []RTMPBroadcastRequest `json:"broadcasts"`
}

type StartRTMPBroadcastsResponse ΒΆ

type StartRTMPBroadcastsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

StartRTMPBroadcastsResponse is the payload for starting an RTMP broadcast.

type StartRecordingRequest ΒΆ

type StartRecordingRequest struct {
	RecordingExternalStorage *string `json:"recording_external_storage,omitempty"`
}

type StartRecordingResponse ΒΆ

type StartRecordingResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

StartRecordingResponse is the response payload for the start recording endpoint.

type StartTranscriptionRequest ΒΆ

type StartTranscriptionRequest struct {
	// Enable closed captions along with transcriptions
	EnableClosedCaptions *bool `json:"enable_closed_captions,omitempty"`
	// The spoken language in the call, if not provided the language defined in the transcription settings will be used. One of: auto, ar, bg, ca, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, ms, nl, no, pl, pt, ro, ru, sk, sl, sv, ta, th, tl, tr, uk, zh
	Language *string `json:"language,omitempty"`
	// Store transcriptions in this external storage
	TranscriptionExternalStorage *string `json:"transcription_external_storage,omitempty"`
}

type StartTranscriptionResponse ΒΆ

type StartTranscriptionResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

type StopAllRTMPBroadcastsRequest ΒΆ

type StopAllRTMPBroadcastsRequest struct {
}

type StopAllRTMPBroadcastsResponse ΒΆ

type StopAllRTMPBroadcastsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

type StopCampaignRequest ΒΆ

type StopCampaignRequest struct {
}

type StopClosedCaptionsRequest ΒΆ

type StopClosedCaptionsRequest struct {
	StopTranscription *bool `json:"stop_transcription,omitempty"`
}

type StopClosedCaptionsResponse ΒΆ

type StopClosedCaptionsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type StopFrameRecordingRequest ΒΆ

type StopFrameRecordingRequest struct {
}

type StopFrameRecordingResponse ΒΆ

type StopFrameRecordingResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type StopHLSBroadcastingRequest ΒΆ

type StopHLSBroadcastingRequest struct {
}

type StopHLSBroadcastingResponse ΒΆ

type StopHLSBroadcastingResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type StopLiveRequest ΒΆ

type StopLiveRequest struct {
	ContinueClosedCaption       *bool `json:"continue_closed_caption,omitempty"`
	ContinueCompositeRecording  *bool `json:"continue_composite_recording,omitempty"`
	ContinueHLS                 *bool `json:"continue_hls,omitempty"`
	ContinueIndividualRecording *bool `json:"continue_individual_recording,omitempty"`
	ContinueRTMPBroadcasts      *bool `json:"continue_rtmp_broadcasts,omitempty"`
	ContinueRawRecording        *bool `json:"continue_raw_recording,omitempty"`
	ContinueRecording           *bool `json:"continue_recording,omitempty"`
	ContinueTranscription       *bool `json:"continue_transcription,omitempty"`
}

type StopLiveResponse ΒΆ

type StopLiveResponse struct {
	Duration string `json:"duration"`
	// Represents a call
	Call CallResponse `json:"call"`
}

type StopRTMPBroadcastRequest ΒΆ

type StopRTMPBroadcastRequest struct {
}

type StopRTMPBroadcastsRequest ΒΆ

type StopRTMPBroadcastsRequest struct {
}

Request for stopping RTMP broadcasts

type StopRTMPBroadcastsResponse ΒΆ

type StopRTMPBroadcastsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type StopRecordingRequest ΒΆ

type StopRecordingRequest struct {
}

type StopRecordingResponse ΒΆ

type StopRecordingResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type StopTranscriptionRequest ΒΆ

type StopTranscriptionRequest struct {
	StopClosedCaptions *bool `json:"stop_closed_captions,omitempty"`
}

type StopTranscriptionResponse ΒΆ

type StopTranscriptionResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type StoriesConfig ΒΆ

type StoriesConfig struct {
	// Whether to skip already watched stories
	SkipWatched *bool `json:"skip_watched,omitempty"`
	// Whether to track watched status for stories
	TrackWatched *bool `json:"track_watched,omitempty"`
}

type StoriesFeedUpdatedEvent ΒΆ

type StoriesFeedUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The ID of the feed
	Fid    string         `json:"fid"`
	Custom map[string]any `json:"custom"`
	// The type of event: "feeds.stories_feed.updated" in this case
	Type           string     `json:"type"`
	FeedVisibility *string    `json:"feed_visibility,omitempty"`
	ReceivedAt     *Timestamp `json:"received_at,omitempty"`
	// Individual activities for stories feeds
	Activities []ActivityResponse `json:"activities,omitempty"`
	// Aggregated activities for stories feeds
	AggregatedActivities []AggregatedActivityResponse `json:"aggregated_activities,omitempty"`
	User                 *UserResponseCommonFields    `json:"user,omitempty"`
}

Emitted when stories feed is updated.

func (*StoriesFeedUpdatedEvent) GetEventType ΒΆ

func (e *StoriesFeedUpdatedEvent) GetEventType() string

type Stream ΒΆ

type Stream struct {
	*Client
	// contains filtered or unexported fields
}

func NewClient ΒΆ

func NewClient(apiKey, apiSecret string, options ...ClientOption) (*Stream, error)
Example (WithConnectionPoolTuning) ΒΆ
package main

import (
	"context"
	"time"

	"github.com/GetStream/getstream-go/v5"
)

var ctx context.Context

func init() {
	ctx = context.Background()
}

func main() {
	client, err := getstream.NewClient(
		"apiKey", "apiSecret",
		getstream.WithMaxConnsPerHost(10),
		getstream.WithIdleTimeout(55*time.Second),
		getstream.WithConnectTimeout(5*time.Second),
		getstream.WithRequestTimeout(20*time.Second),
	)
	if err != nil {
		panic(err)
	}
	_ = client
}

func NewClientFromEnvVars ΒΆ

func NewClientFromEnvVars(options ...ClientOption) (*Stream, error)

func (*Stream) Chat ΒΆ

func (s *Stream) Chat() *ChatClient

func (*Stream) CreateToken ΒΆ

func (s *Stream) CreateToken(userID string, opts ...TokenOption) (string, error)

CreateToken generates a token for a given user ID, with optional claims.

Parameters: - userID (string): The unique identifier of the user for whom the token is being created. - claims (*Claims): A pointer to a Claims struct containing optional parameters.

Returns: - (string): The generated JWT token. - (error): An error object if token creation fails.

token, err := client.CreateToken("userID", getstream.WithExpiration(time.Hour))

func (*Stream) Feeds ΒΆ

func (s *Stream) Feeds() *FeedsClient

Feeds client

func (*Stream) Moderation ΒΆ

func (s *Stream) Moderation() *ModerationClient

Moderation client

func (*Stream) ParseSns ΒΆ

func (s *Stream) ParseSns(notificationBody string) (WebhookEvent, error)

ParseSns is a convenience wrapper that calls the package-level ParseSns. No signature is required; SNS deliveries are authenticated via AWS IAM.

func (*Stream) ParseSqs ΒΆ

func (s *Stream) ParseSqs(messageBody string) (WebhookEvent, error)

ParseSqs is a convenience wrapper that calls the package-level ParseSqs. No signature is required; SQS deliveries are authenticated via AWS IAM.

func (*Stream) VerifyAndParseWebhook ΒΆ

func (s *Stream) VerifyAndParseWebhook(r *http.Request) (WebhookEvent, error)

VerifyAndParseWebhook verifies and parses a webhook payload from an *http.Request using this client's API secret. The request body is restored so downstream handlers can read it again. Convenience wrapper around the package-level VerifyAndParseWebhook β€” drops the secret parameter.

func (*Stream) VerifyAndParseWebhookBytes ΒΆ

func (s *Stream) VerifyAndParseWebhookBytes(body []byte, signature string) (WebhookEvent, error)

VerifyAndParseWebhookBytes verifies and parses a webhook payload (raw bytes) using this client's API secret. Convenience wrapper around the package-level VerifyAndParseWebhookBytes β€” drops the secret parameter.

func (*Stream) VerifyWebhookSignature ΒΆ

func (s *Stream) VerifyWebhookSignature(body []byte, signature string) bool

VerifyWebhookSignature verifies the HMAC-SHA256 signature of a webhook body using this client's API secret. Convenience wrapper around the package-level VerifyWebhookSignature function β€” drops the secret parameter in favor of the secret stored on the client.

func (*Stream) Video ΒΆ

func (s *Stream) Video() *VideoClient

type StreamError ΒΆ

type StreamError struct {
	Code            int               `json:"code"`
	Message         string            `json:"message"`
	ExceptionFields map[string]string `json:"exception_fields,omitempty"`
	StatusCode      int               `json:"StatusCode"`
	Duration        string            `json:"duration"`
	MoreInfo        string            `json:"more_info"`
	// Unrecoverable mirrors APIError.unrecoverable. When true, the request
	// that produced this error must not be retried.
	Unrecoverable bool `json:"unrecoverable,omitempty"`
	// Details carries the opaque APIError.details payload verbatim. nil if
	// the backend omitted the field.
	Details json.RawMessage `json:"details,omitempty"`
	// RawResponseBody is the unparsed response body. Always set on API-response
	// errors (including the unparseable-body case).
	RawResponseBody string `json:"-"`
	// RetryAfter is the parsed Retry-After header on HTTP 429. Zero otherwise.
	RetryAfter time.Duration `json:"-"`
	// ErrorType is populated only when the sentinel is ErrTransport. One of
	// ErrorTypeConnectionReset, ErrorTypeTimeout, ErrorTypeDNSFailure,
	// ErrorTypeTLSHandshake, ErrorTypeUnknown.
	ErrorType string `json:"-"`
	// Task carries the failed-task payload when the sentinel is ErrTaskFailed.
	Task *TaskErrorDetails `json:"-"`
	// RateLimit carries the rate-limit window info from response headers.
	RateLimit *RateLimitInfo `json:"-"`
	// contains filtered or unexported fields
}

StreamError is the single concrete error type returned by the SDK.

Category is signaled by the sentinel embedded via Is: callers branch with errors.Is(err, ErrApiResponse | ErrRateLimited | ErrTransport | ErrTaskFailed) and extract fields with errors.As(err, &streamErr).

func (*StreamError) Error ΒΆ

func (e *StreamError) Error() string

func (*StreamError) Is ΒΆ

func (e *StreamError) Is(target error) bool

Is reports whether target matches the StreamError's category sentinel. ErrRateLimited additionally matches ErrApiResponse.

func (*StreamError) Sentinel ΒΆ

func (e *StreamError) Sentinel() error

Sentinel reports the category sentinel this error belongs to (e.g. ErrApiResponse). Returns nil if no category was set.

func (*StreamError) Unwrap ΒΆ

func (e *StreamError) Unwrap() error

Unwrap returns the underlying cause (typically a stack-bearing wrapper over the original transport error or JSON-parse error). Returns nil for API-response errors that have no upstream cause.

type StreamResponse ΒΆ

type StreamResponse[T any] struct {
	RateLimitInfo *RateLimitInfo `json:"ratelimit"`
	Data          T
}

Response is the base response returned to the client

func MakeRequest ΒΆ

func MakeRequest[GRequest any, GResponse any](c *Client, ctx context.Context, method, path string, params url.Values, data *GRequest, response *GResponse, pathParams map[string]string) (*StreamResponse[GResponse], error)

MakeRequest makes a generic HTTP request, auto-retrying per the client's opt-in RetryConfig (GET/HEAD on 429/transport errors only). Disabled by default: exactly one attempt, errors surface unchanged.

func WaitForTask ΒΆ

func WaitForTask(ctx context.Context, client *Stream, taskID string, opts ...WaitForTaskOption) (*StreamResponse[GetTaskResponse], error)

WaitForTask polls the task-status endpoint until the task reaches a terminal state, the configured timeout elapses, or ctx is cancelled.

  • On status "completed": returns the final StreamResponse.
  • On status "failed": returns a *StreamError with sentinel ErrTaskFailed and the populated Task field.
  • On timeout or ctx cancellation: returns a *StreamError with sentinel ErrTransport and ErrorType "timeout"; the original cause (a context.DeadlineExceeded or ctx.Err()) is reachable via errors.Unwrap.

Defaults: pollInterval = 1s, timeout = 60s; override with WaitForTaskOption.

type SubmitActionRequest ΒΆ

type SubmitActionRequest struct {
	// 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
	ActionType string `json:"action_type"`
	// UUID of the appeal to act on (required for reject_appeal, optional for other actions)
	AppealID *string `json:"appeal_id,omitempty"`
	// UUID of the review queue item to act on
	ItemID *string `json:"item_id,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Configuration for ban moderation action
	Ban *BanActionRequestPayload `json:"ban,omitempty"`
	// Configuration for block action
	Block  *BlockActionRequestPayload `json:"block,omitempty"`
	Bypass *BypassActionRequest       `json:"bypass,omitempty"`
	// Configuration for custom moderation action
	Custom *CustomActionRequestPayload `json:"custom,omitempty"`
	// Configuration for activity deletion action
	DeleteActivity *DeleteActivityRequestPayload `json:"delete_activity,omitempty"`
	// Configuration for comment deletion action
	DeleteComment *DeleteCommentRequestPayload `json:"delete_comment,omitempty"`
	// Configuration for message deletion action
	DeleteMessage *DeleteMessageRequestPayload `json:"delete_message,omitempty"`
	// Configuration for reaction deletion action
	DeleteReaction *DeleteReactionRequestPayload `json:"delete_reaction,omitempty"`
	// Configuration for user deletion action
	DeleteUser *DeleteUserRequestPayload `json:"delete_user,omitempty"`
	// Configuration for deleting all of a user's chat messages without banning them or deleting their account
	DeleteUserMessages *DeleteUserMessagesRequestPayload `json:"delete_user_messages,omitempty"`
	// Configuration for escalation action
	Escalate *EscalatePayload `json:"escalate,omitempty"`
	Flag     *FlagRequest     `json:"flag,omitempty"`
	// Configuration for mark reviewed action
	MarkReviewed *MarkReviewedRequestPayload `json:"mark_reviewed,omitempty"`
	// Configuration for rejecting an appeal
	RejectAppeal *RejectAppealRequestPayload `json:"reject_appeal,omitempty"`
	// Configuration for restore action
	Restore *RestoreActionRequestPayload `json:"restore,omitempty"`
	// Configuration for shadow block action
	ShadowBlock *ShadowBlockActionRequestPayload `json:"shadow_block,omitempty"`
	// Configuration for unban moderation action
	Unban *UnbanActionRequestPayload `json:"unban,omitempty"`
	// Configuration for unblock action
	Unblock *UnblockActionRequestPayload `json:"unblock,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type SubmitActionResponse ΒΆ

type SubmitActionResponse struct {
	Duration string `json:"duration"`
	// Present when the appeal was accepted but the entity could not be restored automatically. The moderator should restore it manually.
	AutoRestoreWarning *string                  `json:"auto_restore_warning,omitempty"`
	AppealItem         *AppealItemResponse      `json:"appeal_item,omitempty"`
	Item               *ReviewQueueItemResponse `json:"item,omitempty"`
}

type SubmitModerationFeedbackRequest ΒΆ

type SubmitModerationFeedbackRequest struct {
	// The moderated content the moderator is providing feedback on
	Message string `json:"message"`
	// Original publication time of the moderated content (RFC3339)
	PublishedAt string `json:"published_at"`
	// Provider-side reference identifying the moderated content
	Reference string `json:"reference"`
	// Optional moderation channel UUID for context
	ChannelID *string `json:"channel_id,omitempty"`
	// Action originally produced by the moderation system
	CurrentRecommendedAction *string `json:"current_recommended_action,omitempty"`
	// Optional free-form note explaining why the classification was wrong
	Description *string `json:"description,omitempty"`
	// Optional moderator-supplied action
	ExpectedRecommendedAction *string `json:"expected_recommended_action,omitempty"`
	// Classifications originally produced by the moderation system
	CurrentLabels []string `json:"current_labels"`
	// Optional moderator-supplied classifications (up to 16 entries)
	ExpectedLabels []string `json:"expected_labels"`
}

type SubmitModerationFeedbackResponse ΒΆ

type SubmitModerationFeedbackResponse struct {
	Duration string `json:"duration"`
}

type SubscriberAllMetrics ΒΆ

type SubscriberAllMetrics struct {
	Audio *SubscriberAudioMetrics  `json:"audio,omitempty"`
	RttMs *ActiveCallsLatencyStats `json:"rtt_ms,omitempty"`
	Video *SubscriberVideoMetrics  `json:"video,omitempty"`
}

type SubscriberAudioMetrics ΒΆ

type SubscriberAudioMetrics struct {
	ConcealmentPct *ActiveCallsLatencyStats `json:"concealment_pct,omitempty"`
	JitterMs       *ActiveCallsLatencyStats `json:"jitter_ms,omitempty"`
	PacketsLostPct *ActiveCallsLatencyStats `json:"packets_lost_pct,omitempty"`
}

type SubscriberStatsResponse ΒΆ

type SubscriberStatsResponse struct {
	Total                          int `json:"total"`
	TotalSubscribedDurationSeconds int `json:"total_subscribed_duration_seconds"`
	Unique                         int `json:"unique"`
}

type SubscriberVideoMetrics ΒΆ

type SubscriberVideoMetrics struct {
	Fps30          *ActiveCallsFPSStats     `json:"fps_30,omitempty"`
	JitterMs       *ActiveCallsLatencyStats `json:"jitter_ms,omitempty"`
	PacketsLostPct *ActiveCallsLatencyStats `json:"packets_lost_pct,omitempty"`
}

type SubscribersMetrics ΒΆ

type SubscribersMetrics struct {
	All *SubscriberAllMetrics `json:"all,omitempty"`
}

type Supporting ΒΆ added in v5.3.0

type Supporting struct {
	DeliveryIncidentWindows []Incident   `json:"delivery_incident_windows"`
	EdgeOutlierZones        []string     `json:"edge_outlier_zones"`
	SourceDropWindows       []TimeWindow `json:"source_drop_windows"`
}

type TargetResolution ΒΆ

type TargetResolution struct {
	Height  int  `json:"height"`
	Width   int  `json:"width"`
	Bitrate *int `json:"bitrate,omitempty"`
}

type TaskErrorDetails ΒΆ

type TaskErrorDetails struct {
	TaskID      string
	ErrorType   string
	Description string
	StackTrace  string
	Version     string
}

TaskErrorDetails carries the failed-task payload exposed on StreamError.Task when the sentinel is ErrTaskFailed.

type TeamUsageStats ΒΆ

type TeamUsageStats struct {
	// Team identifier (empty string for users not assigned to any team)
	Team string `json:"team"`
	// Statistics for a single metric with optional daily breakdown
	ConcurrentConnections MetricStats `json:"concurrent_connections"`
	// Statistics for a single metric with optional daily breakdown
	ConcurrentUsers MetricStats `json:"concurrent_users"`
	// Statistics for a single metric with optional daily breakdown
	ImageModerationsDaily MetricStats `json:"image_moderations_daily"`
	// Statistics for a single metric with optional daily breakdown
	MessagesDaily MetricStats `json:"messages_daily"`
	// Statistics for a single metric with optional daily breakdown
	MessagesLast24Hours MetricStats `json:"messages_last_24_hours"`
	// Statistics for a single metric with optional daily breakdown
	MessagesLast30Days MetricStats `json:"messages_last_30_days"`
	// Statistics for a single metric with optional daily breakdown
	MessagesMonthToDate MetricStats `json:"messages_month_to_date"`
	// Statistics for a single metric with optional daily breakdown
	MessagesTotal MetricStats `json:"messages_total"`
	// Statistics for a single metric with optional daily breakdown
	TranslationsDaily MetricStats `json:"translations_daily"`
	// Statistics for a single metric with optional daily breakdown
	UsersDaily MetricStats `json:"users_daily"`
	// Statistics for a single metric with optional daily breakdown
	UsersEngagedLast30Days MetricStats `json:"users_engaged_last_30_days"`
	// Statistics for a single metric with optional daily breakdown
	UsersEngagedMonthToDate MetricStats `json:"users_engaged_month_to_date"`
	// Statistics for a single metric with optional daily breakdown
	UsersLast24Hours MetricStats `json:"users_last_24_hours"`
	// Statistics for a single metric with optional daily breakdown
	UsersLast30Days MetricStats `json:"users_last_30_days"`
	// Statistics for a single metric with optional daily breakdown
	UsersMonthToDate MetricStats `json:"users_month_to_date"`
	// Statistics for a single metric with optional daily breakdown
	UsersTotal MetricStats `json:"users_total"`
}

Usage statistics for a single team containing all 16 metrics

type TextContentParameters ΒΆ

type TextContentParameters struct {
	ContainsUrl        *bool             `json:"contains_url,omitempty"`
	LabelOperator      *string           `json:"label_operator,omitempty"`
	Severity           *string           `json:"severity,omitempty"`
	TextLength         *int              `json:"text_length,omitempty"`
	TextLengthOperator *string           `json:"text_length_operator,omitempty"`
	BlocklistMatch     []string          `json:"blocklist_match,omitempty"`
	HarmLabels         []string          `json:"harm_labels,omitempty"`
	LlmHarmLabels      map[string]string `json:"llm_harm_labels,omitempty"`
}

type TextRuleParameters ΒΆ

type TextRuleParameters struct {
	ContainsUrl                *bool             `json:"contains_url,omitempty"`
	SemanticFilterMinThreshold *float64          `json:"semantic_filter_min_threshold,omitempty"`
	Severity                   *string           `json:"severity,omitempty"`
	Threshold                  *int              `json:"threshold,omitempty"`
	TimeWindow                 *string           `json:"time_window,omitempty"`
	BlocklistMatch             []string          `json:"blocklist_match,omitempty"`
	HarmLabels                 []string          `json:"harm_labels,omitempty"`
	SemanticFilterNames        []string          `json:"semantic_filter_names,omitempty"`
	LlmHarmLabels              map[string]string `json:"llm_harm_labels,omitempty"`
}

type ThreadParticipant ΒΆ

type ThreadParticipant struct {
	ChannelCid string `json:"channel_cid"`
	// Date/time of creation
	CreatedAt           Timestamp      `json:"created_at"`
	LastReadAt          Timestamp      `json:"last_read_at"`
	Custom              map[string]any `json:"custom"`
	LastThreadMessageAt *Timestamp     `json:"last_thread_message_at,omitempty"`
	// Left Thread At is the time when the user left the thread
	LeftThreadAt *Timestamp `json:"left_thread_at,omitempty"`
	// Thead ID is unique string identifier of the thread
	ThreadID *string `json:"thread_id,omitempty"`
	// User ID is unique string identifier of the user
	UserID *string `json:"user_id,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

Represents a user that is participating in a thread.

type ThreadResponse ΒΆ

type ThreadResponse struct {
	// Active Participant Count
	ActiveParticipantCount int `json:"active_participant_count"`
	// Channel CID
	ChannelCid string `json:"channel_cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Created By User ID
	CreatedByUserID string `json:"created_by_user_id"`
	// Parent Message ID
	ParentMessageID string `json:"parent_message_id"`
	// Participant Count
	ParticipantCount int `json:"participant_count"`
	// Reply Count
	ReplyCount int `json:"reply_count"`
	// Title
	Title string `json:"title"`
	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// Deleted At
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`
	// Last Message At
	LastMessageAt *Timestamp `json:"last_message_at,omitempty"`
	// Thread Participants
	ThreadParticipants []ThreadParticipant `json:"thread_participants,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// User response object
	CreatedBy *UserResponse `json:"created_by,omitempty"`
	// Represents any chat message
	ParentMessage *MessageResponse `json:"parent_message,omitempty"`
}

type ThreadStateResponse ΒΆ

type ThreadStateResponse struct {
	// Active Participant Count
	ActiveParticipantCount int `json:"active_participant_count"`
	// Channel CID
	ChannelCid string `json:"channel_cid"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Created By User ID
	CreatedByUserID string `json:"created_by_user_id"`
	// Parent Message ID
	ParentMessageID string `json:"parent_message_id"`
	// Participant Count
	ParticipantCount int `json:"participant_count"`
	// Reply Count
	ReplyCount int `json:"reply_count"`
	// Title
	Title string `json:"title"`
	// Date/time of the last update
	UpdatedAt     Timestamp         `json:"updated_at"`
	LatestReplies []MessageResponse `json:"latest_replies"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// Deleted At
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`
	// Last Message At
	LastMessageAt *Timestamp          `json:"last_message_at,omitempty"`
	Read          []ReadStateResponse `json:"read,omitempty"`
	// Thread Participants
	ThreadParticipants []ThreadParticipant `json:"thread_participants,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// User response object
	CreatedBy *UserResponse  `json:"created_by,omitempty"`
	Draft     *DraftResponse `json:"draft,omitempty"`
	// Represents any chat message
	ParentMessage *MessageResponse `json:"parent_message,omitempty"`
}

type ThreadUpdatedEvent ΒΆ

type ThreadUpdatedEvent struct {
	CreatedAt   Timestamp       `json:"created_at"`
	Custom      map[string]any  `json:"custom"`
	Type        string          `json:"type"`
	ChannelID   *string         `json:"channel_id,omitempty"`
	ChannelType *string         `json:"channel_type,omitempty"`
	Cid         *string         `json:"cid,omitempty"`
	ReceivedAt  *Timestamp      `json:"received_at,omitempty"`
	Thread      *ThreadResponse `json:"thread,omitempty"`
}

func (*ThreadUpdatedEvent) GetEventType ΒΆ

func (e *ThreadUpdatedEvent) GetEventType() string

type ThreadedCommentResponse ΒΆ

type ThreadedCommentResponse struct {
	BookmarkCount   int       `json:"bookmark_count"`
	ConfidenceScore float64   `json:"confidence_score"`
	CreatedAt       Timestamp `json:"created_at"`
	DownvoteCount   int       `json:"downvote_count"`
	ID              string    `json:"id"`
	ObjectID        string    `json:"object_id"`
	ObjectType      string    `json:"object_type"`
	ReactionCount   int       `json:"reaction_count"`
	ReplyCount      int       `json:"reply_count"`
	Score           int       `json:"score"`
	// Status of the comment. One of: active, deleted, removed, hidden
	Status         string                  `json:"status"`
	UpdatedAt      Timestamp               `json:"updated_at"`
	UpvoteCount    int                     `json:"upvote_count"`
	MentionedUsers []UserResponse          `json:"mentioned_users"`
	OwnReactions   []FeedsReactionResponse `json:"own_reactions"`
	// User response object
	User             UserResponse            `json:"user"`
	ControversyScore *float64                `json:"controversy_score,omitempty"`
	DeletedAt        *Timestamp              `json:"deleted_at,omitempty"`
	EditedAt         *Timestamp              `json:"edited_at,omitempty"`
	ParentID         *string                 `json:"parent_id,omitempty"`
	Text             *string                 `json:"text,omitempty"`
	Attachments      []Attachment            `json:"attachments,omitempty"`
	LatestReactions  []FeedsReactionResponse `json:"latest_reactions,omitempty"`
	// Slice of nested comments (may be empty).
	Replies []ThreadedCommentResponse `json:"replies,omitempty"`
	Custom  map[string]any            `json:"custom,omitempty"`
	I18n    map[string]string         `json:"i18n,omitempty"`
	// Cursor & depth information for a comment's direct replies. Mirrors Reddit's 'load more replies' semantics.
	Meta           *RepliesMeta                          `json:"meta,omitempty"`
	Moderation     *ModerationV2Response                 `json:"moderation,omitempty"`
	ReactionGroups map[string]FeedsReactionGroupResponse `json:"reaction_groups,omitempty"`
}

A comment with an optional, depth‑limited slice of nested replies.

type Thresholds ΒΆ

type Thresholds struct {
	Explicit *LabelThresholds `json:"explicit,omitempty"`
	Spam     *LabelThresholds `json:"spam,omitempty"`
	Toxic    *LabelThresholds `json:"toxic,omitempty"`
}

Sets thresholds for AI moderation

type ThumbnailResponse ΒΆ

type ThumbnailResponse struct {
	ImageUrl string `json:"image_url"`
}

type ThumbnailsSettings ΒΆ

type ThumbnailsSettings struct {
	Enabled bool `json:"enabled"`
}

type ThumbnailsSettingsRequest ΒΆ

type ThumbnailsSettingsRequest struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type ThumbnailsSettingsResponse ΒΆ

type ThumbnailsSettingsResponse struct {
	Enabled bool `json:"enabled"`
}

type Time ΒΆ

type Time struct {
}

type TimeWindow ΒΆ added in v5.3.0

type TimeWindow struct {
	From string `json:"from"`
	To   string `json:"to"`
}

type Timestamp ΒΆ

type Timestamp struct {
	Time *time.Time
}

func (Timestamp) MarshalJSON ΒΆ

func (t Timestamp) MarshalJSON() ([]byte, error)

func (*Timestamp) UnmarshalJSON ΒΆ

func (t *Timestamp) UnmarshalJSON(data []byte) error

type TokenOption ΒΆ

type TokenOption func(*tokenOptions)

func WithClaims ΒΆ

func WithClaims(claims Claims) TokenOption

func WithExpiration ΒΆ

func WithExpiration(d time.Duration) TokenOption

type TopBroadcast ΒΆ added in v5.3.0

type TopBroadcast struct {
	CallCid               string   `json:"call_cid"`
	HoursWatched          float64  `json:"hours_watched"`
	PeakConcurrentViewers int      `json:"peak_concurrent_viewers"`
	PoorPct               *float64 `json:"poor_pct,omitempty"`
}

type TrackActivityMetricsEvent ΒΆ

type TrackActivityMetricsEvent struct {
	// The ID of the activity to track the metric for
	ActivityID string `json:"activity_id"`
	// The metric name (e.g. views, clicks, impressions). Alphanumeric and underscores only.
	Metric string `json:"metric"`
	// The amount to increment (positive) or decrement (negative). Defaults to 1. The absolute value counts against rate limits.
	Delta *int `json:"delta,omitempty"`
}

A single metric event to track for an activity

type TrackActivityMetricsEventResult ΒΆ

type TrackActivityMetricsEventResult struct {
	// The activity ID from the request
	ActivityID string `json:"activity_id"`
	// Whether the metric was counted (false if rate-limited)
	Allowed bool `json:"allowed"`
	// The metric name from the request
	Metric string `json:"metric"`
	// Error message if processing failed
	Error *string `json:"error,omitempty"`
}

Result of tracking a single metric event

type TrackActivityMetricsRequest ΒΆ

type TrackActivityMetricsRequest struct {
	// List of metric events to track (max 100 per request)
	Events []TrackActivityMetricsEvent `json:"events"`
	UserID *string                     `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type TrackActivityMetricsResponse ΒΆ

type TrackActivityMetricsResponse struct {
	Duration string `json:"duration"`
	// Results for each event in the request, in the same order
	Results []TrackActivityMetricsEventResult `json:"results"`
}

Response containing results for each tracked metric event

type TrackStatsResponse ΒΆ

type TrackStatsResponse struct {
	DurationSeconds int    `json:"duration_seconds"`
	TrackType       string `json:"track_type"`
}

type TranscriptionSettings ΒΆ

type TranscriptionSettings struct {
	// One of: available, disabled, auto-on
	ClosedCaptionMode string `json:"closed_caption_mode"`
	// The language used in this call as a two letter code
	Language            string               `json:"language"`
	Mode                string               `json:"mode"`
	SpeechSegmentConfig *SpeechSegmentConfig `json:"speech_segment_config,omitempty"`
	Translation         *TranslationSettings `json:"translation,omitempty"`
}

type TranscriptionSettingsRequest ΒΆ

type TranscriptionSettingsRequest struct {
	ClosedCaptionMode   *string              `json:"closed_caption_mode,omitempty"`
	Language            *string              `json:"language,omitempty"`
	Mode                *string              `json:"mode,omitempty"`
	SpeechSegmentConfig *SpeechSegmentConfig `json:"speech_segment_config,omitempty"`
	Translation         *TranslationSettings `json:"translation,omitempty"`
}

type TranscriptionSettingsResponse ΒΆ

type TranscriptionSettingsResponse struct {
	ClosedCaptionMode   string               `json:"closed_caption_mode"`
	Language            string               `json:"language"`
	Mode                string               `json:"mode"`
	SpeechSegmentConfig *SpeechSegmentConfig `json:"speech_segment_config,omitempty"`
	Translation         *TranslationSettings `json:"translation,omitempty"`
}

type TranslateActivityRequest ΒΆ

type TranslateActivityRequest struct {
	// ISO 639-1 language code to translate to
	Language string `json:"language"`
}

type TranslateActivityResponse ΒΆ

type TranslateActivityResponse struct {
	// Duration of the request in milliseconds
	Duration string           `json:"duration"`
	Activity ActivityResponse `json:"activity"`
}

Basic response information

type TranslateCommentRequest ΒΆ

type TranslateCommentRequest struct {
	// ISO 639-1 language code to translate to
	Language string `json:"language"`
}

type TranslateCommentResponse ΒΆ

type TranslateCommentResponse struct {
	// Duration of the request in milliseconds
	Duration string          `json:"duration"`
	Comment  CommentResponse `json:"comment"`
}

Basic response information

type TranslateMessageRequest ΒΆ

type TranslateMessageRequest struct {
	// Language to translate message to
	Language string `json:"language"`
}

type TranslationSettings ΒΆ

type TranslationSettings struct {
	Enabled   *bool    `json:"enabled,omitempty"`
	Languages []string `json:"languages,omitempty"`
}

type TriggeredRuleResponse ΒΆ

type TriggeredRuleResponse struct {
	// ID of the moderation rule that triggered
	RuleID string `json:"rule_id"`
	// Action types resolved from the rule's action sequence
	Actions []string `json:"actions"`
	// Name of the moderation rule that triggered
	RuleName *string `json:"rule_name,omitempty"`
	// Violation count for action sequence rules (1-based)
	ViolationNumber *int `json:"violation_number,omitempty"`
	// Type of the moderation rule that triggered (content, user, or call)
	Type        *string            `json:"type,omitempty"`
	CallOptions *CallActionOptions `json:"call_options,omitempty"`
}

type TruncateChannelRequest ΒΆ

type TruncateChannelRequest struct {
	// Permanently delete channel data (messages, reactions, etc.)
	HardDelete *bool `json:"hard_delete,omitempty"`
	// When `message` is set disables all push notifications for it
	SkipPush *bool `json:"skip_push,omitempty"`
	// Truncate channel data up to `truncated_at`. The system message (if provided) creation time is always greater than `truncated_at`
	TruncatedAt *Timestamp `json:"truncated_at,omitempty"`
	UserID      *string    `json:"user_id,omitempty"`
	// List of member IDs to hide message history for. If empty, truncates the channel for all members
	MemberIds []string `json:"member_ids"`
	// Message data for creating or updating a message
	Message *MessageRequest `json:"message,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type TruncateChannelResponse ΒΆ

type TruncateChannelResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
}

type TypingIndicatorsResponse ΒΆ

type TypingIndicatorsResponse struct {
	Enabled bool `json:"enabled"`
}

type UnbanActionRequestPayload ΒΆ

type UnbanActionRequestPayload struct {
	// Channel CID for channel-specific unban
	ChannelCid *string `json:"channel_cid,omitempty"`
	// Reason for the appeal decision
	DecisionReason *string `json:"decision_reason,omitempty"`
	// Also remove the future channels ban for this user
	RemoveFutureChannelsBan *bool `json:"remove_future_channels_ban,omitempty"`
	// Optional: unban user directly without review item
	TargetUserID *string `json:"target_user_id,omitempty"`
}

Configuration for unban moderation action

type UnbanRequest ΒΆ

type UnbanRequest struct {
	TargetUserID string  `json:"-" query:"target_user_id"`
	ChannelCid   *string `json:"-" query:"channel_cid"`
	CreatedBy    *string `json:"-" query:"created_by"`
	// ID of the user performing the unban
	UnbannedByID *string `json:"unbanned_by_id,omitempty"`
	// User request object
	UnbannedBy *UserRequest `json:"unbanned_by,omitempty"`
}

type UnbanResponse ΒΆ

type UnbanResponse struct {
	Duration string `json:"duration"`
}

type UnblockActionRequestPayload ΒΆ

type UnblockActionRequestPayload struct {
	// Reason for the appeal decision
	DecisionReason *string `json:"decision_reason,omitempty"`
}

Configuration for unblock action

type UnblockUserRequest ΒΆ

type UnblockUserRequest struct {
	// the user to unblock
	UserID string `json:"user_id"`
}

type UnblockUserResponse ΒΆ

type UnblockUserResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

UnblockUserResponse is the payload for unblocking a user.

type UnblockUsersRequest ΒΆ

type UnblockUsersRequest struct {
	BlockedUserID string  `json:"blocked_user_id"`
	UserID        *string `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UnblockUsersResponse ΒΆ

type UnblockUsersResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

type UnblockedUserEvent ΒΆ

type UnblockedUserEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.unblocked_user" in this case
	Type string `json:"type"`
}

This event is sent when a user is unblocked on a call, this can be useful to notify the user that they can now join the call again

func (*UnblockedUserEvent) GetEventType ΒΆ

func (e *UnblockedUserEvent) GetEventType() string

type UndeleteMessageRequest ΒΆ

type UndeleteMessageRequest struct {
	// ID of the user who is undeleting the message
	UndeletedBy string `json:"undeleted_by"`
}

type UndeleteMessageResponse ΒΆ

type UndeleteMessageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message MessageResponse `json:"message"`
}

Basic response information

type UnfollowBatchRequest ΒΆ

type UnfollowBatchRequest struct {
	// List of follow relationships to remove, each with optional keep_history
	Follows []UnfollowPair `json:"follows"`
	// Whether to delete the corresponding notification activity (default: false)
	DeleteNotificationActivity *bool `json:"delete_notification_activity,omitempty"`
	// If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
}

type UnfollowBatchResponse ΒΆ

type UnfollowBatchResponse struct {
	Duration string `json:"duration"`
	// List of follow relationships that were removed
	Follows []FollowResponse `json:"follows"`
}

type UnfollowPair ΒΆ

type UnfollowPair struct {
	// Fully qualified ID of the source feed
	Source string `json:"source"`
	// Fully qualified ID of the target feed
	Target string `json:"target"`
	// When true, activities from the unfollowed feed will remain in the source feed's timeline (default: false)
	KeepHistory *bool `json:"keep_history,omitempty"`
}

type UnfollowRequest ΒΆ

type UnfollowRequest struct {
	DeleteNotificationActivity *bool `json:"-" query:"delete_notification_activity"`
	KeepHistory                *bool `json:"-" query:"keep_history"`
	EnrichOwnFields            *bool `json:"-" query:"enrich_own_fields"`
}

type UnfollowResponse ΒΆ

type UnfollowResponse struct {
	Duration string         `json:"duration"`
	Follow   FollowResponse `json:"follow"`
}

type UnknownEvent ΒΆ

type UnknownEvent struct {
	Type      string         `json:"type"`
	CreatedAt *Timestamp     `json:"created_at,omitempty"`
	Raw       map[string]any `json:"-"`
}

UnknownEvent is returned by ParseEvent when the type discriminator is well-formed but unknown to this SDK version. Forward-compat surface for new event types.

To handle unknown events, switch on the returned event's concrete type and include *UnknownEvent in your default case.

func (*UnknownEvent) GetEventType ΒΆ

func (u *UnknownEvent) GetEventType() string

GetEventType returns the unrecognized discriminator value.

type UnmuteChannelRequest ΒΆ

type UnmuteChannelRequest struct {
	// Duration of mute in milliseconds
	Expiration *int    `json:"expiration,omitempty"`
	UserID     *string `json:"user_id,omitempty"`
	// Channel CIDs to mute (if multiple channels)
	ChannelCids []string `json:"channel_cids"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UnmuteRequest ΒΆ

type UnmuteRequest struct {
	// User IDs to unmute
	TargetIds []string `json:"target_ids"`
	UserID    *string  `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UnmuteResponse ΒΆ

type UnmuteResponse struct {
	Duration string `json:"duration"`
	// A list of users that can't be found. Common cause for this is deleted users
	NonExistingUsers []string `json:"non_existing_users,omitempty"`
}

type UnpinActivityRequest ΒΆ

type UnpinActivityRequest struct {
	EnrichOwnFields *bool   `json:"-" query:"enrich_own_fields"`
	UserID          *string `json:"-" query:"user_id"`
}

type UnpinActivityResponse ΒΆ

type UnpinActivityResponse struct {
	Duration string `json:"duration"`
	// Fully qualified ID of the feed the activity was unpinned from
	Feed string `json:"feed"`
	// ID of the user who unpinned the activity
	UserID   string           `json:"user_id"`
	Activity ActivityResponse `json:"activity"`
}

type UnpinRequest ΒΆ

type UnpinRequest struct {
	// the session ID of the user who pinned the message
	SessionID string `json:"session_id"`
	// the user ID of the user who pinned the message
	UserID string `json:"user_id"`
}

UnpinRequest is the payload for unpinning a message.

type UnpinResponse ΒΆ

type UnpinResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

UnpinResponse is the payload for unpinning a message.

type UnreadCountsBatchRequest ΒΆ

type UnreadCountsBatchRequest struct {
	UserIds []string `json:"user_ids"`
}

type UnreadCountsBatchResponse ΒΆ

type UnreadCountsBatchResponse struct {
	// Duration of the request in milliseconds
	Duration     string                           `json:"duration"`
	CountsByUser map[string]*UnreadCountsResponse `json:"counts_by_user"`
}

Basic response information

type UnreadCountsChannel ΒΆ

type UnreadCountsChannel struct {
	ChannelID   string    `json:"channel_id"`
	LastRead    Timestamp `json:"last_read"`
	UnreadCount int       `json:"unread_count"`
}

type UnreadCountsChannelType ΒΆ

type UnreadCountsChannelType struct {
	ChannelCount int    `json:"channel_count"`
	ChannelType  string `json:"channel_type"`
	UnreadCount  int    `json:"unread_count"`
}

type UnreadCountsRequest ΒΆ

type UnreadCountsRequest struct {
	UserID *string `json:"-" query:"user_id"`
}

type UnreadCountsResponse ΒΆ

type UnreadCountsResponse struct {
	TotalUnreadCount        int                       `json:"total_unread_count"`
	TotalUnreadThreadsCount int                       `json:"total_unread_threads_count"`
	ChannelType             []UnreadCountsChannelType `json:"channel_type"`
	Channels                []UnreadCountsChannel     `json:"channels"`
	Threads                 []UnreadCountsThread      `json:"threads"`
	TotalUnreadCountByTeam  map[string]int            `json:"total_unread_count_by_team,omitempty"`
}

type UnreadCountsThread ΒΆ

type UnreadCountsThread struct {
	LastRead          Timestamp `json:"last_read"`
	LastReadMessageID string    `json:"last_read_message_id"`
	ParentMessageID   string    `json:"parent_message_id"`
	UnreadCount       int       `json:"unread_count"`
}

type UpdateActivitiesPartialBatchRequest ΒΆ

type UpdateActivitiesPartialBatchRequest struct {
	// List of activity changes to apply. Each change specifies an activity ID and the fields to set/unset
	Changes []UpdateActivityPartialChangeRequest `json:"changes"`
	// If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
	ForceModeration *bool `json:"force_moderation,omitempty"`
}

type UpdateActivitiesPartialBatchResponse ΒΆ

type UpdateActivitiesPartialBatchResponse struct {
	Duration string `json:"duration"`
	// List of successfully updated activities
	Activities []ActivityResponse `json:"activities"`
}

type UpdateActivityPartialChangeRequest ΒΆ

type UpdateActivityPartialChangeRequest struct {
	// ID of the activity to update
	ActivityID string `json:"activity_id"`
	// Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// When true and 'mentioned_user_ids' is updated, automatically creates or deletes mention notifications for added/removed users. Only applicable for client-side requests (ignored for server-side requests)
	HandleMentionNotifications *bool `json:"handle_mention_notifications,omitempty"`
	// List of field names to remove. Supported fields: 'custom', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids'. Use dot-notation for nested custom fields (e.g., 'custom.field_name')
	Unset []string `json:"unset,omitempty"`
	// Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids'. For custom fields, use dot-notation (e.g., 'custom.field_name')
	Set map[string]any `json:"set,omitempty"`
}

type UpdateActivityPartialRequest ΒΆ

type UpdateActivityPartialRequest struct {
	// Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
	// If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
	ForceModeration *bool `json:"force_moderation,omitempty"`
	// If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned
	HandleMentionNotifications *bool `json:"handle_mention_notifications,omitempty"`
	// If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false.
	RunActivityProcessors *bool   `json:"run_activity_processors,omitempty"`
	UserID                *string `json:"user_id,omitempty"`
	// List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids', 'search_data'. Use dot-notation for nested custom fields (e.g., 'custom.field_name')
	Unset []string `json:"unset"`
	// Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids', 'search_data'. For custom fields, use dot-notation (e.g., 'custom.field_name')
	Set map[string]any `json:"set"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateActivityPartialResponse ΒΆ

type UpdateActivityPartialResponse struct {
	Duration string           `json:"duration"`
	Activity ActivityResponse `json:"activity"`
}

type UpdateActivityRequest ΒΆ

type UpdateActivityRequest struct {
	// Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
	// Time when the activity will expire
	ExpiresAt *Timestamp `json:"expires_at,omitempty"`
	// If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
	ForceModeration *bool `json:"force_moderation,omitempty"`
	// If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned
	HandleMentionNotifications *bool `json:"handle_mention_notifications,omitempty"`
	// Poll ID
	PollID *string `json:"poll_id,omitempty"`
	// Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody
	RestrictReplies *string `json:"restrict_replies,omitempty"`
	// If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false.
	RunActivityProcessors *bool `json:"run_activity_processors,omitempty"`
	// Whether to skip URL enrichment for the activity
	SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
	// The text content of the activity
	Text   *string `json:"text,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Visibility setting for the activity
	Visibility *string `json:"visibility,omitempty"`
	// If visibility is 'tag', this is the tag name and is required
	VisibilityTag *string `json:"visibility_tag,omitempty"`
	// List of attachments for the activity
	Attachments []Attachment `json:"attachments"`
	// Collections that this activity references
	CollectionRefs []string `json:"collection_refs"`
	// List of feeds the activity is present in
	Feeds []string `json:"feeds"`
	// Tags used for filtering the activity
	FilterTags []string `json:"filter_tags"`
	// Tags indicating interest categories
	InterestTags []string `json:"interest_tags"`
	// List of user IDs mentioned in the activity
	MentionedUserIds []string `json:"mentioned_user_ids"`
	// Custom data for the activity
	Custom   map[string]any `json:"custom"`
	Location *Location      `json:"location,omitempty"`
	// Additional data for search indexing
	SearchData map[string]any `json:"search_data"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateActivityResponse ΒΆ

type UpdateActivityResponse struct {
	Duration string           `json:"duration"`
	Activity ActivityResponse `json:"activity"`
}

type UpdateAppRequest ΒΆ

type UpdateAppRequest struct {
	AsyncUrlEnrichEnabled                 *bool                           `json:"async_url_enrich_enabled,omitempty"`
	AutoTranslationEnabled                *bool                           `json:"auto_translation_enabled,omitempty"`
	BeforeMessageSendHookAttemptTimeoutMs *int                            `json:"before_message_send_hook_attempt_timeout_ms,omitempty"`
	BeforeMessageSendHookUrl              *string                         `json:"before_message_send_hook_url,omitempty"`
	CdnExpirationSeconds                  *int                            `json:"cdn_expiration_seconds,omitempty"`
	ChannelHideMembersOnly                *bool                           `json:"channel_hide_members_only,omitempty"`
	ChatPrimaryUseCase                    *string                         `json:"chat_primary_use_case,omitempty"`
	CustomActionHandlerUrl                *string                         `json:"custom_action_handler_url,omitempty"`
	DisableAuthChecks                     *bool                           `json:"disable_auth_checks,omitempty"`
	DisablePermissionsChecks              *bool                           `json:"disable_permissions_checks,omitempty"`
	EnableHookPayloadCompression          *bool                           `json:"enable_hook_payload_compression,omitempty"`
	EnforceUniqueUsernames                *string                         `json:"enforce_unique_usernames,omitempty"`
	FeedAuditLogsEnabled                  *bool                           `json:"feed_audit_logs_enabled,omitempty"`
	FeedsModerationEnabled                *bool                           `json:"feeds_moderation_enabled,omitempty"`
	FeedsV2Region                         *string                         `json:"feeds_v2_region,omitempty"`
	GuestUserCreationDisabled             *bool                           `json:"guest_user_creation_disabled,omitempty"`
	ImageModerationEnabled                *bool                           `json:"image_moderation_enabled,omitempty"`
	MaxAggregatedActivitiesLength         *int                            `json:"max_aggregated_activities_length,omitempty"`
	MemberCustomOnMessagesEnabled         *bool                           `json:"member_custom_on_messages_enabled,omitempty"`
	MigratePermissionsToV2                *bool                           `json:"migrate_permissions_to_v2,omitempty"`
	ModerationAnalyticsEnabled            *bool                           `json:"moderation_analytics_enabled,omitempty"`
	ModerationEnabled                     *bool                           `json:"moderation_enabled,omitempty"`
	ModerationOnboardingComplete          *bool                           `json:"moderation_onboarding_complete,omitempty"`
	ModerationS3ImageAccessRoleArn        *string                         `json:"moderation_s3_image_access_role_arn,omitempty"`
	ModerationWebhookUrl                  *string                         `json:"moderation_webhook_url,omitempty"`
	MultiTenantEnabled                    *bool                           `json:"multi_tenant_enabled,omitempty"`
	PermissionVersion                     *string                         `json:"permission_version,omitempty"`
	RemindersInterval                     *int                            `json:"reminders_interval,omitempty"`
	RemindersMaxMembers                   *int                            `json:"reminders_max_members,omitempty"`
	RemindersMaxPerUser                   *int                            `json:"reminders_max_per_user,omitempty"`
	RevokeTokensIssuedBefore              *Timestamp                      `json:"revoke_tokens_issued_before,omitempty"`
	SnsKey                                *string                         `json:"sns_key,omitempty"`
	SnsSecret                             *string                         `json:"sns_secret,omitempty"`
	SnsTopicArn                           *string                         `json:"sns_topic_arn,omitempty"`
	SqsKey                                *string                         `json:"sqs_key,omitempty"`
	SqsSecret                             *string                         `json:"sqs_secret,omitempty"`
	SqsUrl                                *string                         `json:"sqs_url,omitempty"`
	UserResponseTimeEnabled               *bool                           `json:"user_response_time_enabled,omitempty"`
	VideoPrimaryUseCase                   *string                         `json:"video_primary_use_case,omitempty"`
	WebhookUrl                            *string                         `json:"webhook_url,omitempty"`
	AllowedFlagReasons                    []string                        `json:"allowed_flag_reasons"`
	EventHooks                            []EventHook                     `json:"event_hooks"`
	ImageModerationBlockLabels            []string                        `json:"image_moderation_block_labels"`
	ImageModerationLabels                 []string                        `json:"image_moderation_labels"`
	UserSearchDisallowedRoles             []string                        `json:"user_search_disallowed_roles"`
	WebhookEvents                         []string                        `json:"webhook_events"`
	ActivityMetricsConfig                 map[string]int                  `json:"activity_metrics_config"`
	ApnConfig                             *APNConfig                      `json:"apn_config,omitempty"`
	AsyncModerationConfig                 *AsyncModerationConfiguration   `json:"async_moderation_config,omitempty"`
	DatadogInfo                           *DataDogInfo                    `json:"datadog_info,omitempty"`
	FileUploadConfig                      *FileUploadConfig               `json:"file_upload_config,omitempty"`
	FirebaseConfig                        *FirebaseConfig                 `json:"firebase_config,omitempty"`
	Grants                                map[string][]string             `json:"grants"`
	HuaweiConfig                          *HuaweiConfig                   `json:"huawei_config,omitempty"`
	ImageUploadConfig                     *FileUploadConfig               `json:"image_upload_config,omitempty"`
	ModerationDashboardPreferences        *ModerationDashboardPreferences `json:"moderation_dashboard_preferences,omitempty"`
	PushConfig                            *PushConfig                     `json:"push_config,omitempty"`
	XiaomiConfig                          *XiaomiConfig                   `json:"xiaomi_config,omitempty"`
}

type UpdateBlockListRequest ΒΆ

type UpdateBlockListRequest struct {
	IsConfusableFoldingEnabled *bool   `json:"is_confusable_folding_enabled,omitempty"`
	IsLeetCheckEnabled         *bool   `json:"is_leet_check_enabled,omitempty"`
	IsPluralCheckEnabled       *bool   `json:"is_plural_check_enabled,omitempty"`
	IsSubstringMatchingEnabled *bool   `json:"is_substring_matching_enabled,omitempty"`
	Team                       *string `json:"team,omitempty"`
	UserID                     *string `json:"user_id,omitempty"`
	// List of words to block
	Words []string `json:"words"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateBlockListResponse ΒΆ

type UpdateBlockListResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Block list contains restricted words
	Blocklist *BlockListResponse `json:"blocklist,omitempty"`
}

Basic response information

type UpdateBookmarkFolderRequest ΒΆ

type UpdateBookmarkFolderRequest struct {
	// Name of the folder
	Name   *string `json:"name,omitempty"`
	UserID *string `json:"user_id,omitempty"`
	// Custom data for the folder
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateBookmarkFolderResponse ΒΆ

type UpdateBookmarkFolderResponse struct {
	Duration       string                 `json:"duration"`
	BookmarkFolder BookmarkFolderResponse `json:"bookmark_folder"`
}

type UpdateBookmarkRequest ΒΆ

type UpdateBookmarkRequest struct {
	// ID of the folder containing the bookmark
	FolderID *string `json:"folder_id,omitempty"`
	// Move the bookmark to this folder (empty string removes the folder)
	NewFolderID *string `json:"new_folder_id,omitempty"`
	UserID      *string `json:"user_id,omitempty"`
	// Custom data for the bookmark
	Custom    map[string]any    `json:"custom"`
	NewFolder *AddFolderRequest `json:"new_folder,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateBookmarkResponse ΒΆ

type UpdateBookmarkResponse struct {
	Duration string           `json:"duration"`
	Bookmark BookmarkResponse `json:"bookmark"`
}

type UpdateCallMembersRequest ΒΆ

type UpdateCallMembersRequest struct {
	// List of userID to remove
	RemoveMembers []string `json:"remove_members"`
	// List of members to update or insert
	UpdateMembers []MemberRequest `json:"update_members"`
}

type UpdateCallMembersResponse ΒΆ

type UpdateCallMembersResponse struct {
	// Duration of the request in milliseconds
	Duration string           `json:"duration"`
	Members  []MemberResponse `json:"members"`
}

Basic response information

type UpdateCallRequest ΒΆ

type UpdateCallRequest struct {
	// the time the call is scheduled to start
	StartsAt *Timestamp `json:"starts_at,omitempty"`
	// Custom data for this object
	Custom           map[string]any       `json:"custom"`
	SettingsOverride *CallSettingsRequest `json:"settings_override,omitempty"`
}

type UpdateCallResponse ΒΆ

type UpdateCallResponse struct {
	Duration        string           `json:"duration"`
	Members         []MemberResponse `json:"members"`
	OwnCapabilities []OwnCapability  `json:"own_capabilities"`
	// Represents a call
	Call CallResponse `json:"call"`
}

Response for updating a call

type UpdateCallTypeRequest ΒΆ

type UpdateCallTypeRequest struct {
	ExternalStorage      *string                      `json:"external_storage,omitempty"`
	Grants               map[string][]string          `json:"grants"`
	NotificationSettings *NotificationSettingsRequest `json:"notification_settings,omitempty"`
	Settings             *CallSettingsRequest         `json:"settings,omitempty"`
}

type UpdateCallTypeResponse ΒΆ

type UpdateCallTypeResponse struct {
	// the time the call type was created
	CreatedAt Timestamp `json:"created_at"`
	Duration  string    `json:"duration"`
	// the name of the call type
	Name string `json:"name"`
	// the time the call type was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// the permissions granted to each role
	Grants               map[string][]string          `json:"grants"`
	NotificationSettings NotificationSettingsResponse `json:"notification_settings"`
	Settings             CallSettingsResponse         `json:"settings"`
	// the external storage for the call type
	ExternalStorage *string `json:"external_storage,omitempty"`
}

UpdateCallTypeResponse is the payload for updating a call type.

type UpdateCampaignRequest ΒΆ

type UpdateCampaignRequest struct {
	SenderID         string                   `json:"sender_id"`
	MessageTemplate  CampaignMessageTemplate  `json:"message_template"`
	CreateChannels   *bool                    `json:"create_channels,omitempty"`
	Description      *string                  `json:"description,omitempty"`
	ID               *string                  `json:"id,omitempty"`
	Name             *string                  `json:"name,omitempty"`
	SenderMode       *string                  `json:"sender_mode,omitempty"`
	SenderVisibility *string                  `json:"sender_visibility,omitempty"`
	ShowChannels     *bool                    `json:"show_channels,omitempty"`
	SkipPush         *bool                    `json:"skip_push,omitempty"`
	SkipWebhook      *bool                    `json:"skip_webhook,omitempty"`
	SegmentIds       []string                 `json:"segment_ids"`
	UserIds          []string                 `json:"user_ids"`
	ChannelTemplate  *CampaignChannelTemplate `json:"channel_template,omitempty"`
}

type UpdateChannelPartialRequest ΒΆ

type UpdateChannelPartialRequest struct {
	UserID *string        `json:"user_id,omitempty"`
	Unset  []string       `json:"unset"`
	Set    map[string]any `json:"set"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateChannelPartialResponse ΒΆ

type UpdateChannelPartialResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// List of updated members
	Members []ChannelMemberResponse `json:"members"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
}

type UpdateChannelRequest ΒΆ

type UpdateChannelRequest struct {
	// Set to `true` to accept the invite
	AcceptInvite *bool `json:"accept_invite,omitempty"`
	// Sets cool down period for the channel in seconds
	Cooldown *int `json:"cooldown,omitempty"`
	// Set to `true` to hide channel's history when adding new members
	HideHistory *bool `json:"hide_history,omitempty"`
	// If set, hides channel's history before this time when adding new members. Takes precedence over `hide_history` when both are provided. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past.
	HideHistoryBefore *Timestamp `json:"hide_history_before,omitempty"`
	// Set to `true` to reject the invite
	RejectInvite *bool `json:"reject_invite,omitempty"`
	// When `message` is set disables all push notifications for it
	SkipPush *bool   `json:"skip_push,omitempty"`
	UserID   *string `json:"user_id,omitempty"`
	// List of filter tags to add to the channel
	AddFilterTags []string `json:"add_filter_tags"`
	// List of user IDs to add to the channel
	AddMembers []ChannelMemberRequest `json:"add_members"`
	// List of user IDs to make channel moderators
	AddModerators []string `json:"add_moderators"`
	// List of channel member role assignments. If any specified user is not part of the channel, the request will fail
	AssignRoles []ChannelMemberRequest `json:"assign_roles"`
	// List of user IDs to take away moderators status from
	DemoteModerators []string `json:"demote_moderators"`
	// List of user IDs to invite to the channel
	Invites []ChannelMemberRequest `json:"invites"`
	// List of filter tags to remove from the channel
	RemoveFilterTags []string `json:"remove_filter_tags"`
	// List of user IDs to remove from the channel
	RemoveMembers []string             `json:"remove_members"`
	Data          *ChannelInputRequest `json:"data,omitempty"`
	// Message data for creating or updating a message
	Message *MessageRequest `json:"message,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateChannelResponse ΒΆ

type UpdateChannelResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// List of channel members
	Members []ChannelMemberResponse `json:"members"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
}

type UpdateChannelTypeRequest ΒΆ

type UpdateChannelTypeRequest struct {
	Automod                        string             `json:"automod"`
	AutomodBehavior                string             `json:"automod_behavior"`
	MaxMessageLength               int                `json:"max_message_length"`
	Blocklist                      *string            `json:"blocklist,omitempty"`
	BlocklistBehavior              *string            `json:"blocklist_behavior,omitempty"`
	ConnectEvents                  *bool              `json:"connect_events,omitempty"`
	CountMessages                  *bool              `json:"count_messages,omitempty"`
	CustomEvents                   *bool              `json:"custom_events,omitempty"`
	DeliveryEvents                 *bool              `json:"delivery_events,omitempty"`
	MarkMessagesPending            *bool              `json:"mark_messages_pending,omitempty"`
	Mutes                          *bool              `json:"mutes,omitempty"`
	PartitionSize                  *int               `json:"partition_size,omitempty"`
	PartitionTtl                   *string            `json:"partition_ttl,omitempty"`
	Polls                          *bool              `json:"polls,omitempty"`
	PushLevel                      *string            `json:"push_level,omitempty"`
	PushNotifications              *bool              `json:"push_notifications,omitempty"`
	Quotes                         *bool              `json:"quotes,omitempty"`
	Reactions                      *bool              `json:"reactions,omitempty"`
	ReadEvents                     *bool              `json:"read_events,omitempty"`
	Reminders                      *bool              `json:"reminders,omitempty"`
	Replies                        *bool              `json:"replies,omitempty"`
	Search                         *bool              `json:"search,omitempty"`
	SharedLocations                *bool              `json:"shared_locations,omitempty"`
	SkipLastMsgUpdateForSystemMsgs *bool              `json:"skip_last_msg_update_for_system_msgs,omitempty"`
	TypingEvents                   *bool              `json:"typing_events,omitempty"`
	Uploads                        *bool              `json:"uploads,omitempty"`
	UrlEnrichment                  *bool              `json:"url_enrichment,omitempty"`
	UserMessageReminders           *bool              `json:"user_message_reminders,omitempty"`
	AllowedFlagReasons             []string           `json:"allowed_flag_reasons"`
	Blocklists                     []BlockListOptions `json:"blocklists"`
	// List of commands that channel supports
	Commands    []string        `json:"commands"`
	Permissions []PolicyRequest `json:"permissions"`
	// Sets thresholds for AI moderation
	AutomodThresholds *Thresholds         `json:"automod_thresholds,omitempty"`
	ChatPreferences   *ChatPreferences    `json:"chat_preferences,omitempty"`
	Grants            map[string][]string `json:"grants"`
}

type UpdateChannelTypeResponse ΒΆ

type UpdateChannelTypeResponse struct {
	Automod                        string              `json:"automod"`
	AutomodBehavior                string              `json:"automod_behavior"`
	ConnectEvents                  bool                `json:"connect_events"`
	CountMessages                  bool                `json:"count_messages"`
	CreatedAt                      Timestamp           `json:"created_at"`
	CustomEvents                   bool                `json:"custom_events"`
	DeliveryEvents                 bool                `json:"delivery_events"`
	Duration                       string              `json:"duration"`
	MarkMessagesPending            bool                `json:"mark_messages_pending"`
	MaxMessageLength               int                 `json:"max_message_length"`
	Mutes                          bool                `json:"mutes"`
	Name                           string              `json:"name"`
	Polls                          bool                `json:"polls"`
	PushNotifications              bool                `json:"push_notifications"`
	Quotes                         bool                `json:"quotes"`
	Reactions                      bool                `json:"reactions"`
	ReadEvents                     bool                `json:"read_events"`
	Reminders                      bool                `json:"reminders"`
	Replies                        bool                `json:"replies"`
	Search                         bool                `json:"search"`
	SharedLocations                bool                `json:"shared_locations"`
	SkipLastMsgUpdateForSystemMsgs bool                `json:"skip_last_msg_update_for_system_msgs"`
	TypingEvents                   bool                `json:"typing_events"`
	UpdatedAt                      Timestamp           `json:"updated_at"`
	Uploads                        bool                `json:"uploads"`
	UrlEnrichment                  bool                `json:"url_enrichment"`
	UserMessageReminders           bool                `json:"user_message_reminders"`
	Commands                       []string            `json:"commands"`
	Permissions                    []PolicyRequest     `json:"permissions"`
	Grants                         map[string][]string `json:"grants"`
	Blocklist                      *string             `json:"blocklist,omitempty"`
	BlocklistBehavior              *string             `json:"blocklist_behavior,omitempty"`
	PartitionSize                  *int                `json:"partition_size,omitempty"`
	PartitionTtl                   *string             `json:"partition_ttl,omitempty"`
	PushLevel                      *string             `json:"push_level,omitempty"`
	AllowedFlagReasons             []string            `json:"allowed_flag_reasons,omitempty"`
	Blocklists                     []BlockListOptions  `json:"blocklists,omitempty"`
	// Sets thresholds for AI moderation
	AutomodThresholds *Thresholds      `json:"automod_thresholds,omitempty"`
	ChatPreferences   *ChatPreferences `json:"chat_preferences,omitempty"`
}

type UpdateCollectionRequest ΒΆ

type UpdateCollectionRequest struct {
	// Unique identifier for the collection within its name
	ID string `json:"id"`
	// Name/type of the collection
	Name string `json:"name"`
	// Custom data for the collection (required, must contain at least one key)
	Custom map[string]any `json:"custom"`
}

type UpdateCollectionsRequest ΒΆ

type UpdateCollectionsRequest struct {
	// List of collections to update (only custom data is updatable)
	Collections []UpdateCollectionRequest `json:"collections"`
	UserID      *string                   `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateCollectionsResponse ΒΆ

type UpdateCollectionsResponse struct {
	Duration string `json:"duration"`
	// List of updated collections
	Collections []CollectionResponse `json:"collections"`
}

type UpdateCommandRequest ΒΆ

type UpdateCommandRequest struct {
	// Description, shown in commands auto-completion
	Description string `json:"description"`
	// Arguments help text, shown in commands auto-completion
	Args *string `json:"args,omitempty"`
	// Set name used for grouping commands
	Set *string `json:"set,omitempty"`
}

type UpdateCommandResponse ΒΆ

type UpdateCommandResponse struct {
	Duration string `json:"duration"`
	// Represents custom chat command
	Command *Command `json:"command,omitempty"`
}

type UpdateCommentBookmarkRequest ΒΆ

type UpdateCommentBookmarkRequest struct {
	// ID of the folder containing the bookmark
	FolderID *string `json:"folder_id,omitempty"`
	// Move the bookmark to this folder (empty string removes the folder)
	NewFolderID *string `json:"new_folder_id,omitempty"`
	UserID      *string `json:"user_id,omitempty"`
	// Custom data for the bookmark
	Custom    map[string]any    `json:"custom"`
	NewFolder *AddFolderRequest `json:"new_folder,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateCommentBookmarkResponse ΒΆ

type UpdateCommentBookmarkResponse struct {
	Duration string           `json:"duration"`
	Bookmark BookmarkResponse `json:"bookmark"`
}

type UpdateCommentPartialRequest ΒΆ

type UpdateCommentPartialRequest struct {
	// Whether to copy custom data to notification activities Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
	ForceModeration *bool `json:"force_moderation,omitempty"`
	// Whether to handle mention notification changes
	HandleMentionNotifications *bool `json:"handle_mention_notifications,omitempty"`
	// Whether to skip URL enrichment
	SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
	// Whether to skip push notifications
	SkipPush *bool   `json:"skip_push,omitempty"`
	UserID   *string `json:"user_id,omitempty"`
	// List of field names to remove. Supported fields: 'custom', 'attachments', 'mentioned_user_ids', 'status'. Use dot-notation for nested custom fields (e.g., 'custom.field_name')
	Unset []string `json:"unset"`
	// Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'mentioned_user_ids', 'status'. Use dot-notation for nested custom fields (e.g., 'custom.field_name')
	Set map[string]any `json:"set"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateCommentPartialResponse ΒΆ

type UpdateCommentPartialResponse struct {
	Duration string          `json:"duration"`
	Comment  CommentResponse `json:"comment"`
}

type UpdateCommentRequest ΒΆ

type UpdateCommentRequest struct {
	// Updated text content of the comment
	Comment *string `json:"comment,omitempty"`
	// Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
	ForceModeration *bool `json:"force_moderation,omitempty"`
	// If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned
	HandleMentionNotifications *bool `json:"handle_mention_notifications,omitempty"`
	// Whether to skip URL enrichment for this comment
	SkipEnrichUrl *bool   `json:"skip_enrich_url,omitempty"`
	SkipPush      *bool   `json:"skip_push,omitempty"`
	UserID        *string `json:"user_id,omitempty"`
	// Updated media attachments for the comment. Providing this field will replace all existing attachments.
	Attachments []Attachment `json:"attachments"`
	// List of user IDs mentioned in the comment
	MentionedUserIds []string `json:"mentioned_user_ids"`
	// Updated custom data for the comment
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateCommentResponse ΒΆ

type UpdateCommentResponse struct {
	Duration string          `json:"duration"`
	Comment  CommentResponse `json:"comment"`
}

type UpdateExternalStorageRequest ΒΆ

type UpdateExternalStorageRequest struct {
	// The name of the bucket on the service provider
	Bucket string `json:"bucket"`
	// The type of storage to use
	StorageType    string  `json:"storage_type"`
	GcsCredentials *string `json:"gcs_credentials,omitempty"`
	// The path prefix to use for storing files
	Path *string `json:"path,omitempty"`
	// Config for creating Amazon S3 storage.
	AWSS3 *S3Request `json:"aws_s3,omitempty"`
	// Config for creating Azure Blob Storage storage
	AzureBlob *AzureRequest `json:"azure_blob,omitempty"`
}

type UpdateExternalStorageResponse ΒΆ

type UpdateExternalStorageResponse struct {
	Bucket string `json:"bucket"`
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	Name     string `json:"name"`
	Path     string `json:"path"`
	Type     string `json:"type"`
}

Basic response information

type UpdateFeedGroupRequest ΒΆ

type UpdateFeedGroupRequest struct {
	DefaultVisibility *string `json:"default_visibility,omitempty"`
	// Configuration for activity processors
	ActivityProcessors []ActivityProcessorConfig `json:"activity_processors"`
	// Configuration for activity selectors
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	ActivityFilter    *ActivityFilterConfig    `json:"activity_filter,omitempty"`
	Aggregation       *AggregationConfig       `json:"aggregation,omitempty"`
	// Custom data for the feed group
	Custom           map[string]any          `json:"custom"`
	Notification     *NotificationConfig     `json:"notification,omitempty"`
	PushNotification *PushNotificationConfig `json:"push_notification,omitempty"`
	Ranking          *RankingConfig          `json:"ranking,omitempty"`
	Stories          *StoriesConfig          `json:"stories,omitempty"`
}

type UpdateFeedGroupResponse ΒΆ

type UpdateFeedGroupResponse struct {
	Duration  string            `json:"duration"`
	FeedGroup FeedGroupResponse `json:"feed_group"`
}

type UpdateFeedMembersRequest ΒΆ

type UpdateFeedMembersRequest struct {
	// Type of update operation to perform. One of: upsert, remove, set
	Operation string  `json:"operation"`
	Limit     *int    `json:"limit,omitempty"`
	Next      *string `json:"next,omitempty"`
	Prev      *string `json:"prev,omitempty"`
	// List of members to upsert, remove, or set
	Members []FeedMemberRequest `json:"members"`
}

type UpdateFeedMembersResponse ΒΆ

type UpdateFeedMembersResponse struct {
	// Duration of the request in milliseconds
	Duration   string               `json:"duration"`
	Added      []FeedMemberResponse `json:"added"`
	RemovedIds []string             `json:"removed_ids"`
	Updated    []FeedMemberResponse `json:"updated"`
}

Basic response information

type UpdateFeedRequest ΒΆ

type UpdateFeedRequest struct {
	// If true, removes the geographic location from the feed
	ClearLocation *bool `json:"clear_location,omitempty"`
	// ID of the new feed creator (owner)
	CreatedByID *string `json:"created_by_id,omitempty"`
	// Description of the feed
	Description *string `json:"description,omitempty"`
	// If true, enriches the feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
	// Name of the feed
	Name *string `json:"name,omitempty"`
	// Tags used for filtering feeds
	FilterTags []string `json:"filter_tags"`
	// Custom data for the feed
	Custom   map[string]any `json:"custom"`
	Location *Location      `json:"location,omitempty"`
}

type UpdateFeedResponse ΒΆ

type UpdateFeedResponse struct {
	Duration string       `json:"duration"`
	Feed     FeedResponse `json:"feed"`
}

type UpdateFeedViewRequest ΒΆ

type UpdateFeedViewRequest struct {
	// Updated configuration for selecting activities
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	Aggregation       *AggregationConfig       `json:"aggregation,omitempty"`
	Ranking           *RankingConfig           `json:"ranking,omitempty"`
}

type UpdateFeedViewResponse ΒΆ

type UpdateFeedViewResponse struct {
	Duration string           `json:"duration"`
	FeedView FeedViewResponse `json:"feed_view"`
}

type UpdateFeedVisibilityRequest ΒΆ

type UpdateFeedVisibilityRequest struct {
	// Updated permission grants for each role
	Grants map[string][]string `json:"grants"`
}

type UpdateFeedVisibilityResponse ΒΆ

type UpdateFeedVisibilityResponse struct {
	Duration       string                 `json:"duration"`
	FeedVisibility FeedVisibilityResponse `json:"feed_visibility"`
}

type UpdateFollowRequest ΒΆ

type UpdateFollowRequest struct {
	// Fully qualified ID of the source feed
	Source string `json:"source"`
	// Fully qualified ID of the target feed
	Target string `json:"target"`
	// Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.
	ActivityCopyLimit *int `json:"activity_copy_limit,omitempty"`
	// Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead
	// Deprecated: this field is deprecated.
	CopyCustomToNotification *bool `json:"copy_custom_to_notification,omitempty"`
	// Whether to create a notification activity for this follow
	CreateNotificationActivity *bool `json:"create_notification_activity,omitempty"`
	// If true, auto-creates users referenced by the source and target FIDs when they don't already exist. Server-side only. Defaults to false. Use directly on single follow endpoints (Follow, GetOrCreateFollow). On batch endpoints (FollowBatch, GetOrCreateFollows), use the top-level create_users field; per-item follows[i].create_users is rejected.
	CreateUsers *bool `json:"create_users,omitempty"`
	// If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool   `json:"enrich_own_fields,omitempty"`
	FollowerRole    *string `json:"follower_role,omitempty"`
	// Push preference for the follow relationship
	PushPreference *string `json:"push_preference,omitempty"`
	// Whether to skip push for this follow
	SkipPush *bool `json:"skip_push,omitempty"`
	// Status of the follow relationship. One of: accepted, pending, rejected
	Status *string `json:"status,omitempty"`
	// Custom data for the follow relationship
	Custom map[string]any `json:"custom"`
}

type UpdateFollowResponse ΒΆ

type UpdateFollowResponse struct {
	Duration string         `json:"duration"`
	Follow   FollowResponse `json:"follow"`
}

type UpdateLiveLocationRequest ΒΆ

type UpdateLiveLocationRequest struct {
	UserID *string `json:"-" query:"user_id"`
	// Live location ID
	MessageID string `json:"message_id"`
	// Time when the live location expires
	EndAt *Timestamp `json:"end_at,omitempty"`
	// Latitude coordinate
	Latitude *float64 `json:"latitude,omitempty"`
	// Longitude coordinate
	Longitude *float64 `json:"longitude,omitempty"`
}

type UpdateMemberPartialRequest ΒΆ

type UpdateMemberPartialRequest struct {
	UserID *string        `json:"-" query:"user_id"`
	Unset  []string       `json:"unset"`
	Set    map[string]any `json:"set"`
}

type UpdateMemberPartialResponse ΒΆ

type UpdateMemberPartialResponse struct {
	// Duration of the request in milliseconds
	Duration      string                 `json:"duration"`
	ChannelMember *ChannelMemberResponse `json:"channel_member,omitempty"`
}

type UpdateMembershipLevelRequest ΒΆ

type UpdateMembershipLevelRequest struct {
	// Optional description of the membership level
	Description *string `json:"description,omitempty"`
	// Display name for the membership level
	Name *string `json:"name,omitempty"`
	// Priority level (higher numbers = higher priority)
	Priority *int `json:"priority,omitempty"`
	// Activity tags this membership level gives access to
	Tags []string `json:"tags"`
	// Custom data for the membership level
	Custom map[string]any `json:"custom"`
}

type UpdateMembershipLevelResponse ΒΆ

type UpdateMembershipLevelResponse struct {
	Duration        string                  `json:"duration"`
	MembershipLevel MembershipLevelResponse `json:"membership_level"`
}

type UpdateMessagePartialRequest ΒΆ

type UpdateMessagePartialRequest struct {
	// Skip enriching the URL in the message
	SkipEnrichUrl *bool   `json:"skip_enrich_url,omitempty"`
	SkipPush      *bool   `json:"skip_push,omitempty"`
	UserID        *string `json:"user_id,omitempty"`
	// Array of field names to unset
	Unset []string `json:"unset"`
	// Sets new field values
	Set map[string]any `json:"set"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateMessagePartialResponse ΒΆ

type UpdateMessagePartialResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message *MessageResponse `json:"message,omitempty"`
	// Pending message metadata
	PendingMessageMetadata map[string]string `json:"pending_message_metadata,omitempty"`
}

type UpdateMessageRequest ΒΆ

type UpdateMessageRequest struct {
	// Message data for creating or updating a message
	Message MessageRequest `json:"message"`
	// Skip enrich URL
	SkipEnrichUrl *bool `json:"skip_enrich_url,omitempty"`
	SkipPush      *bool `json:"skip_push,omitempty"`
}

type UpdateMessageResponse ΒΆ

type UpdateMessageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// Represents any chat message
	Message                MessageResponse   `json:"message"`
	PendingMessageMetadata map[string]string `json:"pending_message_metadata,omitempty"`
}

Basic response information

type UpdatePollOptionRequest ΒΆ

type UpdatePollOptionRequest struct {
	// Option ID
	ID string `json:"id"`
	// Option text
	Text   string  `json:"text"`
	UserID *string `json:"user_id,omitempty"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdatePollPartialRequest ΒΆ

type UpdatePollPartialRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// Array of field names to unset
	Unset []string `json:"unset"`
	// Sets new field values
	Set map[string]any `json:"set"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdatePollRequest ΒΆ

type UpdatePollRequest struct {
	// Poll ID
	ID string `json:"id"`
	// Poll name
	Name string `json:"name"`
	// Allow answers
	AllowAnswers *bool `json:"allow_answers,omitempty"`
	// Allow user suggested options
	AllowUserSuggestedOptions *bool `json:"allow_user_suggested_options,omitempty"`
	// Poll description
	Description *string `json:"description,omitempty"`
	// Enforce unique vote
	EnforceUniqueVote *bool `json:"enforce_unique_vote,omitempty"`
	// Is closed
	IsClosed *bool `json:"is_closed,omitempty"`
	// Max votes allowed
	MaxVotesAllowed *int    `json:"max_votes_allowed,omitempty"`
	UserID          *string `json:"user_id,omitempty"`
	// Voting visibility
	VotingVisibility *string `json:"voting_visibility,omitempty"`
	// Poll options
	Options []PollOptionRequest `json:"options"`
	// Custom data for this object
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdatePushNotificationPreferencesRequest ΒΆ

type UpdatePushNotificationPreferencesRequest struct {
	// A list of push preferences for channels, calls, or the user.
	Preferences []PushPreferenceInput `json:"preferences"`
}

type UpdateQueueRequest ΒΆ

type UpdateQueueRequest struct {
	Description *string          `json:"description,omitempty"`
	Name        *string          `json:"name,omitempty"`
	UserID      *string          `json:"user_id,omitempty"`
	Sort        []map[string]any `json:"sort"`
	Filters     map[string]any   `json:"filters"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateReminderRequest ΒΆ

type UpdateReminderRequest struct {
	RemindAt *Timestamp `json:"remind_at,omitempty"`
	UserID   *string    `json:"user_id,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateReminderResponse ΒΆ

type UpdateReminderResponse struct {
	// Duration of the request in milliseconds
	Duration string               `json:"duration"`
	Reminder ReminderResponseData `json:"reminder"`
}

Basic response information

type UpdateSIPInboundRoutingRuleRequest ΒΆ

type UpdateSIPInboundRoutingRuleRequest struct {
	// Name of the SIP Inbound Routing Rule
	Name string `json:"name"`
	// List of SIP trunk IDs
	TrunkIds []string `json:"trunk_ids"`
	// Configuration for SIP caller settings
	CallerConfigs SIPCallerConfigsRequest `json:"caller_configs"`
	// List of called numbers
	CalledNumbers []string `json:"called_numbers"`
	// List of caller numbers (optional)
	CallerNumbers []string `json:"caller_numbers"`
	// Configuration for SIP call settings
	CallConfigs *SIPCallConfigsRequest `json:"call_configs,omitempty"`
	// Configuration for direct routing rule calls
	DirectRoutingConfigs *SIPDirectRoutingRuleCallConfigsRequest `json:"direct_routing_configs,omitempty"`
	// Configuration for PIN protection settings
	PinProtectionConfigs *SIPPinProtectionConfigsRequest `json:"pin_protection_configs,omitempty"`
	// Configuration for PIN routing rule calls
	PinRoutingConfigs *SIPInboundRoutingRulePinConfigsRequest `json:"pin_routing_configs,omitempty"`
}

type UpdateSIPInboundRoutingRuleResponse ΒΆ

type UpdateSIPInboundRoutingRuleResponse struct {
	Duration string `json:"duration"`
	// SIP Inbound Routing Rule response
	SipInboundRoutingRule *SIPInboundRoutingRuleResponse `json:"sip_inbound_routing_rule,omitempty"`
}

Response containing the updated SIP Inbound Routing Rule

type UpdateSIPTrunkRequest ΒΆ

type UpdateSIPTrunkRequest struct {
	// Name of the SIP trunk
	Name string `json:"name"`
	// Phone numbers associated with this SIP trunk
	Numbers []string `json:"numbers"`
	// Optional password for SIP trunk authentication
	Password *string `json:"password,omitempty"`
	// Optional list of allowed IPv4/IPv6 addresses or CIDR blocks
	AllowedIps []string `json:"allowed_ips"`
}

type UpdateSIPTrunkResponse ΒΆ

type UpdateSIPTrunkResponse struct {
	Duration string `json:"duration"`
	// SIP trunk information
	SipTrunk *SIPTrunkResponse `json:"sip_trunk,omitempty"`
}

Response containing the updated SIP trunk

type UpdateSegmentRequest ΒΆ

type UpdateSegmentRequest struct {
	// The description of the segment (max 256 characters)
	Description *string `json:"description,omitempty"`
	// The name of the segment (max 128 characters)
	Name *string `json:"name,omitempty"`
	// Filter to apply to the query
	Filter map[string]any `json:"filter"`
}

type UpdateSegmentResponse ΒΆ

type UpdateSegmentResponse struct {
	// Duration of the request in milliseconds
	Duration string          `json:"duration"`
	Segment  SegmentResponse `json:"segment"`
}

type UpdateThreadPartialRequest ΒΆ

type UpdateThreadPartialRequest struct {
	UserID *string `json:"user_id,omitempty"`
	// Array of field names to unset
	Unset []string `json:"unset"`
	// Sets new field values
	Set map[string]any `json:"set"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpdateThreadPartialResponse ΒΆ

type UpdateThreadPartialResponse struct {
	// Duration of the request in milliseconds
	Duration string         `json:"duration"`
	Thread   ThreadResponse `json:"thread"`
}

type UpdateUserGroupRequest ΒΆ

type UpdateUserGroupRequest struct {
	// The new description for the group
	Description *string `json:"description,omitempty"`
	// The new name of the user group
	Name   *string `json:"name,omitempty"`
	TeamID *string `json:"team_id,omitempty"`
}

type UpdateUserGroupResponse ΒΆ

type UpdateUserGroupResponse struct {
	Duration  string             `json:"duration"`
	UserGroup *UserGroupResponse `json:"user_group,omitempty"`
}

Response for updating a user group

type UpdateUserPartialRequest ΒΆ

type UpdateUserPartialRequest struct {
	// User ID to update
	ID    string         `json:"id"`
	Unset []string       `json:"unset,omitempty"`
	Set   map[string]any `json:"set,omitempty"`
}

type UpdateUserPermissionsRequest ΒΆ

type UpdateUserPermissionsRequest struct {
	UserID            string   `json:"user_id"`
	GrantPermissions  []string `json:"grant_permissions"`
	RevokePermissions []string `json:"revoke_permissions"`
}

type UpdateUserPermissionsResponse ΒΆ

type UpdateUserPermissionsResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type UpdateUsersPartialRequest ΒΆ

type UpdateUsersPartialRequest struct {
	Users []UpdateUserPartialRequest `json:"users"`
}

type UpdateUsersRequest ΒΆ

type UpdateUsersRequest struct {
	// Object containing users
	Users map[string]UserRequest `json:"users"`
}

type UpdateUsersResponse ΒΆ

type UpdateUsersResponse struct {
	// Duration of the request in milliseconds
	Duration                 string `json:"duration"`
	MembershipDeletionTaskID string `json:"membership_deletion_task_id"`
	// Object containing users
	Users map[string]FullUserResponse `json:"users"`
}

type UpdatedCallPermissionsEvent ΒΆ

type UpdatedCallPermissionsEvent struct {
	CallCid   string    `json:"call_cid"`
	CreatedAt Timestamp `json:"created_at"`
	// The capabilities of the current user
	OwnCapabilities []OwnCapability `json:"own_capabilities"`
	// User response object
	User UserResponse `json:"user"`
	// The type of event: "call.permissions_updated" in this case
	Type string `json:"type"`
}

This event is sent to notify about permission changes for a user, clients receiving this event should update their UI accordingly

func (*UpdatedCallPermissionsEvent) GetEventType ΒΆ

func (e *UpdatedCallPermissionsEvent) GetEventType() string

type UploadChannelFileRequest ΒΆ

type UploadChannelFileRequest struct {
	// file field
	File *string     `json:"file,omitempty"`
	User *OnlyUserID `json:"user,omitempty"`
}

type UploadChannelFileResponse ΒΆ

type UploadChannelFileResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// URL to the uploaded asset. Should be used to put to `asset_url` attachment field
	File             *string `json:"file,omitempty"`
	ModerationAction *string `json:"moderation_action,omitempty"`
	// URL of the file thumbnail for supported file formats. Should be put to `thumb_url` attachment field
	ThumbUrl *string `json:"thumb_url,omitempty"`
}

type UploadChannelImageRequest ΒΆ

type UploadChannelImageRequest struct {
	File *string `json:"file,omitempty"`
	// field with JSON-encoded array of image size configurations
	UploadSizes []ImageSize `json:"upload_sizes"`
	User        *OnlyUserID `json:"user,omitempty"`
}

type UploadChannelRequest ΒΆ

type UploadChannelRequest struct {
	File *string `json:"file,omitempty"`
	// field with JSON-encoded array of image size configurations
	UploadSizes []ImageSize `json:"upload_sizes,omitempty"`
	User        *OnlyUserID `json:"user,omitempty"`
}

type UploadChannelResponse ΒΆ

type UploadChannelResponse struct {
	// Duration of the request in milliseconds
	Duration         string  `json:"duration"`
	File             *string `json:"file,omitempty"`
	ModerationAction *string `json:"moderation_action,omitempty"`
	ThumbUrl         *string `json:"thumb_url,omitempty"`
	// Array of image size configurations
	UploadSizes []ImageSize `json:"upload_sizes,omitempty"`
}

type UploadFileRequest ΒΆ

type UploadFileRequest struct {
	// file field
	File *string     `json:"file,omitempty"`
	User *OnlyUserID `json:"user,omitempty"`
}

type UploadImageRequest ΒΆ

type UploadImageRequest struct {
	File *string `json:"file,omitempty"`
	// field with JSON-encoded array of image size configurations
	UploadSizes []ImageSize `json:"upload_sizes"`
	User        *OnlyUserID `json:"user,omitempty"`
}

type UpsertActionConfigItem ΒΆ

type UpsertActionConfigItem struct {
	Action      string         `json:"action"`
	EntityType  string         `json:"entity_type"`
	Order       int            `json:"order"`
	Description *string        `json:"description,omitempty"`
	ID          *string        `json:"id,omitempty"`
	Icon        *string        `json:"icon,omitempty"`
	QueueType   *string        `json:"queue_type,omitempty"`
	Custom      map[string]any `json:"custom,omitempty"`
}

type UpsertActionConfigRequest ΒΆ

type UpsertActionConfigRequest struct {
	// The action to perform (e.g. ban, delete_message, custom)
	Action string `json:"action"`
	// Type of entity this action applies to (e.g. stream:chat:v1:message)
	EntityType string `json:"entity_type"`
	// Display order in the dashboard (0–100, lower numbers shown first)
	Order int `json:"order"`
	// Human-readable label for the dashboard button
	Description *string `json:"description,omitempty"`
	// UUID of an existing action config to update; omit to create a new record
	ID *string `json:"id,omitempty"`
	// Icon identifier for the dashboard button
	Icon *string `json:"icon,omitempty"`
	// Queue this config belongs to; null means the default queue
	QueueType *string `json:"queue_type,omitempty"`
	// Optional user ID to associate with the audit log entry
	UserID *string `json:"user_id,omitempty"`
	// Action-specific parameters passed to the action handler
	Custom map[string]any `json:"custom"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpsertActionConfigResponse ΒΆ

type UpsertActionConfigResponse struct {
	Duration string `json:"duration"`
	// Configuration for a moderation action
	ActionConfig *ModerationActionConfigResponse `json:"action_config,omitempty"`
}

type UpsertActivitiesRequest ΒΆ

type UpsertActivitiesRequest struct {
	// List of activities to create or update
	Activities []ActivityRequest `json:"activities"`
	// Server-side only. If true, auto-creates users referenced by activity user_id values that don't already exist. Default: false.
	CreateUsers *bool `json:"create_users,omitempty"`
	// If true, enriches the activities' current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
	EnrichOwnFields *bool `json:"enrich_own_fields,omitempty"`
	// If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
	ForceModeration *bool `json:"force_moderation,omitempty"`
}

type UpsertActivitiesResponse ΒΆ

type UpsertActivitiesResponse struct {
	Duration string `json:"duration"`
	// List of created or updated activities
	Activities []ActivityResponse `json:"activities"`
	// Total number of mention notification activities created for mentioned users across all activities
	MentionNotificationsCreated *int `json:"mention_notifications_created,omitempty"`
}

type UpsertCollectionsRequest ΒΆ

type UpsertCollectionsRequest struct {
	// List of collections to upsert (insert if new, update if existing)
	Collections []CollectionRequest `json:"collections"`
}

type UpsertCollectionsResponse ΒΆ

type UpsertCollectionsResponse struct {
	Duration string `json:"duration"`
	// List of upserted collections
	Collections []CollectionResponse `json:"collections"`
}

type UpsertConfigRequest ΒΆ

type UpsertConfigRequest struct {
	// Unique identifier for the moderation configuration
	Key string `json:"key"`
	// Whether moderation should be performed asynchronously
	Async *bool `json:"async,omitempty"`
	// Team associated with the configuration
	Team *string `json:"team,omitempty"`
	// Optional user ID to associate with the audit log entry
	UserID                             *string                             `json:"user_id,omitempty"`
	AWSRekognitionConfig               *AIImageConfig                      `json:"aws_rekognition_config,omitempty"`
	AiAudioConfig                      *AIAudioConfigRequest               `json:"ai_audio_config,omitempty"`
	AiImageConfig                      *AIImageConfig                      `json:"ai_image_config,omitempty"`
	AiTextConfig                       *AITextConfig                       `json:"ai_text_config,omitempty"`
	AiVideoConfig                      *AIVideoConfig                      `json:"ai_video_config,omitempty"`
	AutomodPlatformCircumventionConfig *AutomodPlatformCircumventionConfig `json:"automod_platform_circumvention_config,omitempty"`
	AutomodSemanticFiltersConfig       *AutomodSemanticFiltersConfig       `json:"automod_semantic_filters_config,omitempty"`
	AutomodToxicityConfig              *AutomodToxicityConfig              `json:"automod_toxicity_config,omitempty"`
	BlockListConfig                    *BlockListConfig                    `json:"block_list_config,omitempty"`
	BodyguardConfig                    *AITextConfig                       `json:"bodyguard_config,omitempty"`
	FloodConfig                        *FloodConfig                        `json:"flood_config,omitempty"`
	GoogleVisionConfig                 *GoogleVisionConfig                 `json:"google_vision_config,omitempty"`
	LlmConfig                          *LLMConfig                          `json:"llm_config,omitempty"`
	RuleBuilderConfig                  *RuleBuilderConfig                  `json:"rule_builder_config,omitempty"`
	// User request object
	User                 *UserRequest          `json:"user,omitempty"`
	VelocityFilterConfig *VelocityFilterConfig `json:"velocity_filter_config,omitempty"`
	VideoCallRuleConfig  *VideoCallRuleConfig  `json:"video_call_rule_config,omitempty"`
}

type UpsertConfigResponse ΒΆ

type UpsertConfigResponse struct {
	Duration string          `json:"duration"`
	Config   *ConfigResponse `json:"config,omitempty"`
}

type UpsertExternalStorageAWSS3Request ΒΆ

type UpsertExternalStorageAWSS3Request struct {
	Bucket     string  `json:"bucket"`
	Region     string  `json:"region"`
	RoleArn    string  `json:"role_arn"`
	PathPrefix *string `json:"path_prefix,omitempty"`
}

type UpsertExternalStorageGCSRequest ΒΆ added in v5.3.0

type UpsertExternalStorageGCSRequest struct {
	Bucket      string  `json:"bucket"`
	Credentials string  `json:"credentials"`
	PathPrefix  *string `json:"path_prefix,omitempty"`
}

type UpsertExternalStorageRequest ΒΆ

type UpsertExternalStorageRequest struct {
	Type  string                             `json:"type"`
	AWSS3 *UpsertExternalStorageAWSS3Request `json:"aws_s3,omitempty"`
	Gcs   *UpsertExternalStorageGCSRequest   `json:"gcs,omitempty"`
}

type UpsertExternalStorageResponse ΒΆ

type UpsertExternalStorageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type UpsertImporterExternalStorageRequest ΒΆ

type UpsertImporterExternalStorageRequest struct {
	Type  string                             `json:"type"`
	AWSS3 *UpsertExternalStorageAWSS3Request `json:"aws_s3,omitempty"`
	Gcs   *UpsertExternalStorageGCSRequest   `json:"gcs,omitempty"`
}

type UpsertModerationRuleRequest ΒΆ

type UpsertModerationRuleRequest struct {
	// Unique rule name
	Name string `json:"name"`
	// Type of rule: user, content, call, or flood
	RuleType string `json:"rule_type"`
	// Duration before rule can trigger again (e.g. 24h, 7d)
	CooldownPeriod *string `json:"cooldown_period,omitempty"`
	// Optional description of the rule
	Description *string `json:"description,omitempty"`
	// Whether the rule is active
	Enabled *bool `json:"enabled,omitempty"`
	// Logical operator between conditions/groups: AND or OR
	Logic *string `json:"logic,omitempty"`
	// Team scope for the rule
	Team *string `json:"team,omitempty"`
	// Optional user ID to associate with the audit log entry
	UserID *string `json:"user_id,omitempty"`
	// Escalation sequences for call rules
	ActionSequences []CallRuleActionSequence `json:"action_sequences"`
	// Flat list of conditions (legacy)
	Conditions []RuleBuilderCondition `json:"conditions"`
	// List of config keys this rule applies to
	ConfigKeys []string `json:"config_keys"`
	// Nested condition groups
	Groups []RuleBuilderConditionGroup `json:"groups"`
	Action *RuleBuilderAction          `json:"action,omitempty"`
	// User request object
	User *UserRequest `json:"user,omitempty"`
}

type UpsertModerationRuleResponse ΒΆ

type UpsertModerationRuleResponse struct {
	// Duration of the request in milliseconds
	Duration string                    `json:"duration"`
	Rule     *ModerationRuleV2Response `json:"rule,omitempty"`
}

Basic response information

type UpsertModerationTemplateRequest ΒΆ

type UpsertModerationTemplateRequest struct {
	// Name of the moderation template
	Name string `json:"name"`
	// Configuration for a feeds moderation template
	Config FeedsModerationTemplateConfigPayload `json:"config"`
}

type UpsertModerationTemplateResponse ΒΆ

type UpsertModerationTemplateResponse struct {
	// When the template was created
	CreatedAt Timestamp `json:"created_at"`
	Duration  string    `json:"duration"`
	// Name of the moderation template
	Name string `json:"name"`
	// When the template was last updated
	UpdatedAt Timestamp `json:"updated_at"`
	// Configuration for a feeds moderation template
	Config *FeedsModerationTemplateConfigPayload `json:"config,omitempty"`
}

type UpsertPushPreferencesRequest ΒΆ

type UpsertPushPreferencesRequest struct {
	// A list of push preferences for channels, calls, or the user.
	Preferences []PushPreferenceInput `json:"preferences"`
}

type UpsertPushPreferencesResponse ΒΆ

type UpsertPushPreferencesResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
	// The channel specific push notification preferences, only returned for channels you've edited.
	UserChannelPreferences map[string]map[string]ChannelPushPreferencesResponse `json:"user_channel_preferences"`
	// The user preferences, always returned regardless if you edited it
	UserPreferences map[string]PushPreferencesResponse `json:"user_preferences"`
}

type UpsertPushProviderRequest ΒΆ

type UpsertPushProviderRequest struct {
	PushProvider *PushProviderRequest `json:"push_provider,omitempty"`
}

type UpsertPushProviderResponse ΒΆ

type UpsertPushProviderResponse struct {
	// Duration of the request in milliseconds
	Duration     string               `json:"duration"`
	PushProvider PushProviderResponse `json:"push_provider"`
}

Basic response information

type UpsertPushTemplateRequest ΒΆ

type UpsertPushTemplateRequest struct {
	// Event type. One of: message.new, message.updated, reaction.new, notification.reminder_due, feeds.activity.added, feeds.comment.added, feeds.activity.reaction.added, feeds.comment.reaction.added, feeds.follow.created, feeds.notification_feed.updated
	EventType string `json:"event_type"`
	// Push provider type. One of: firebase, apn, huawei, xiaomi
	PushProviderType string `json:"push_provider_type"`
	// Whether to send push notification for this event
	EnablePush *bool `json:"enable_push,omitempty"`
	// Push provider name
	PushProviderName *string `json:"push_provider_name,omitempty"`
	// Push template
	Template *string `json:"template,omitempty"`
}

type UpsertPushTemplateResponse ΒΆ

type UpsertPushTemplateResponse struct {
	// Duration of the request in milliseconds
	Duration string                `json:"duration"`
	Template *PushTemplateResponse `json:"template,omitempty"`
}

Basic response information

type UpsertSetupSessionRequest ΒΆ

type UpsertSetupSessionRequest struct {
	// The current step of the setup wizard. One of: welcome, input, configure, live
	CurrentStep string `json:"current_step"`
	// The status of the setup session. One of: in_progress, completed
	Status string `json:"status"`
	// Per-step data keyed by step name (welcome, input, configure, live)
	SetupData map[string]any `json:"setup_data"`
}

type UpsertSetupSessionResponse ΒΆ

type UpsertSetupSessionResponse struct {
	Duration     string        `json:"duration"`
	SetupSession *SetupSession `json:"setup_session,omitempty"`
}

type User ΒΆ

type User struct {
	ID   string         `json:"id"`
	Data map[string]any `json:"data,omitempty"`
}

type UserBannedEvent ΒΆ

type UserBannedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                `json:"created_at"`
	Custom    map[string]any           `json:"custom"`
	User      UserResponseCommonFields `json:"user"`
	// The type of event: "user.banned" in this case
	Type string `json:"type"`
	// The ID of the channel where the target user was banned
	ChannelID           *string `json:"channel_id,omitempty"`
	ChannelMemberCount  *int    `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int    `json:"channel_message_count,omitempty"`
	// The type of the channel where the target user was banned
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the target user was banned
	Cid *string `json:"cid,omitempty"`
	// The expiration date of the ban
	Expiration *Timestamp `json:"expiration,omitempty"`
	// The reason for the ban
	Reason     *string    `json:"reason,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// ID of the review queue item (flagged message) that triggered the ban, if the ban was applied from the moderation review queue
	ReviewQueueItemID *string `json:"review_queue_item_id,omitempty"`
	// Whether the user was shadow banned
	Shadow *bool `json:"shadow,omitempty"`
	// The team of the channel where the target user was banned
	Team          *string                   `json:"team,omitempty"`
	TotalBans     *int                      `json:"total_bans,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	CreatedBy     *UserResponseCommonFields `json:"created_by,omitempty"`
}

This event is sent when a user gets banned. The event contains information about the user that was banned.

func (*UserBannedEvent) GetEventType ΒΆ

func (e *UserBannedEvent) GetEventType() string

type UserCreatedWithinParameters ΒΆ

type UserCreatedWithinParameters struct {
	MaxAge *string `json:"max_age,omitempty"`
}

type UserCustomEventRequest ΒΆ

type UserCustomEventRequest struct {
	Type   string         `json:"type"`
	Custom map[string]any `json:"custom,omitempty"`
}

type UserCustomPropertyParameters ΒΆ

type UserCustomPropertyParameters struct {
	Operator    *string `json:"operator,omitempty"`
	PropertyKey *string `json:"property_key,omitempty"`
}

type UserDeactivatedEvent ΒΆ

type UserDeactivatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                `json:"created_at"`
	Custom    map[string]any           `json:"custom"`
	User      UserResponseCommonFields `json:"user"`
	// The type of event: "user.deactivated" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	CreatedBy  *UserResponseCommonFields `json:"created_by,omitempty"`
}

This event is sent when a user gets deactivated. The event contains information about the user that was deactivated.

func (*UserDeactivatedEvent) GetEventType ΒΆ

func (e *UserDeactivatedEvent) GetEventType() string

type UserDeletedEvent ΒΆ

type UserDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The type of deletion that was used for the user's conversations. One of: hard, soft, pruning, (empty string)
	DeleteConversation string `json:"delete_conversation"`
	// Whether the user's conversation channels were deleted
	DeleteConversationChannels bool `json:"delete_conversation_channels"`
	// The type of deletion that was used for the user's messages. One of: hard, soft, pruning, (empty string)
	DeleteMessages string `json:"delete_messages"`
	// The type of deletion that was used for the user. One of: hard, soft, pruning, (empty string)
	DeleteUser string `json:"delete_user"`
	// Whether the user was hard deleted
	HardDelete bool `json:"hard_delete"`
	// Whether the user's messages were marked as deleted
	MarkMessagesDeleted bool                     `json:"mark_messages_deleted"`
	Custom              map[string]any           `json:"custom"`
	User                UserResponseCommonFields `json:"user"`
	// The type of event: "user.deleted" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
}

This event is sent when a user gets deleted. The event contains information about the user that was deleted and the deletion options that were used.

func (*UserDeletedEvent) GetEventType ΒΆ

func (e *UserDeletedEvent) GetEventType() string

type UserFeedbackReport ΒΆ

type UserFeedbackReport struct {
	UnreportedCount int            `json:"unreported_count"`
	CountByRating   map[string]int `json:"count_by_rating"`
}

type UserFeedbackReportResponse ΒΆ

type UserFeedbackReportResponse struct {
	Daily []DailyAggregateUserFeedbackReportResponse `json:"daily"`
}

type UserFeedbackResponse ΒΆ

type UserFeedbackResponse struct {
	Cid        string               `json:"cid"`
	Rating     int                  `json:"rating"`
	Reason     string               `json:"reason"`
	Sdk        string               `json:"sdk"`
	SdkVersion string               `json:"sdk_version"`
	SessionID  string               `json:"session_id"`
	UserID     string               `json:"user_id"`
	Platform   PlatformDataResponse `json:"platform"`
	Custom     map[string]any       `json:"custom,omitempty"`
}

type UserFlaggedEvent ΒΆ

type UserFlaggedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The reason for the flag
	Reason string `json:"reason"`
	// The total number of flags for the user
	TotalFlags int                      `json:"total_flags"`
	User       UserResponseCommonFields `json:"user"`
	// The type of event: "user.flagged" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// Custom data
	Custom     map[string]any            `json:"custom,omitempty"`
	TargetUser *UserResponseCommonFields `json:"target_user,omitempty"`
}

This event is sent when a user gets flagged. The event contains information about the user that was flagged.

func (*UserFlaggedEvent) GetEventType ΒΆ

func (e *UserFlaggedEvent) GetEventType() string

type UserGroup ΒΆ

type UserGroup struct {
	AppPk       int               `json:"app_pk"`
	CreatedAt   Timestamp         `json:"created_at"`
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	UpdatedAt   Timestamp         `json:"updated_at"`
	CreatedBy   *string           `json:"created_by,omitempty"`
	Description *string           `json:"description,omitempty"`
	TeamID      *string           `json:"team_id,omitempty"`
	Members     []UserGroupMember `json:"members,omitempty"`
}

type UserGroupCreatedEvent ΒΆ

type UserGroupCreatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "user_group.created" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
	UserGroup  *UserGroup                `json:"user_group,omitempty"`
}

Emitted when a user group is created.

func (*UserGroupCreatedEvent) GetEventType ΒΆ

func (e *UserGroupCreatedEvent) GetEventType() string

type UserGroupDeletedEvent ΒΆ

type UserGroupDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "user_group.deleted" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
	UserGroup  *UserGroup                `json:"user_group,omitempty"`
}

Emitted when a user group is deleted.

func (*UserGroupDeletedEvent) GetEventType ΒΆ

func (e *UserGroupDeletedEvent) GetEventType() string

type UserGroupMember ΒΆ

type UserGroupMember struct {
	AppPk     int       `json:"app_pk"`
	CreatedAt Timestamp `json:"created_at"`
	GroupID   string    `json:"group_id"`
	IsAdmin   bool      `json:"is_admin"`
	UserID    string    `json:"user_id"`
}

type UserGroupMemberAddedEvent ΒΆ

type UserGroupMemberAddedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The user IDs that were added
	Members []string       `json:"members"`
	Custom  map[string]any `json:"custom"`
	// The type of event: "user_group.member_added" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
	UserGroup  *UserGroup                `json:"user_group,omitempty"`
}

Emitted when members are added to a user group.

func (*UserGroupMemberAddedEvent) GetEventType ΒΆ

func (e *UserGroupMemberAddedEvent) GetEventType() string

type UserGroupMemberRemovedEvent ΒΆ

type UserGroupMemberRemovedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The user IDs that were removed
	Members []string       `json:"members"`
	Custom  map[string]any `json:"custom"`
	// The type of event: "user_group.member_removed" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
	UserGroup  *UserGroup                `json:"user_group,omitempty"`
}

Emitted when members are removed from a user group.

func (*UserGroupMemberRemovedEvent) GetEventType ΒΆ

func (e *UserGroupMemberRemovedEvent) GetEventType() string

type UserGroupResponse ΒΆ

type UserGroupResponse struct {
	CreatedAt   Timestamp         `json:"created_at"`
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	UpdatedAt   Timestamp         `json:"updated_at"`
	CreatedBy   *string           `json:"created_by,omitempty"`
	Description *string           `json:"description,omitempty"`
	TeamID      *string           `json:"team_id,omitempty"`
	Members     []UserGroupMember `json:"members,omitempty"`
}

type UserGroupUpdatedEvent ΒΆ

type UserGroupUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp      `json:"created_at"`
	Custom    map[string]any `json:"custom"`
	// The type of event: "user_group.updated" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	User       *UserResponseCommonFields `json:"user,omitempty"`
	UserGroup  *UserGroup                `json:"user_group,omitempty"`
}

Emitted when a user group is updated.

func (*UserGroupUpdatedEvent) GetEventType ΒΆ

func (e *UserGroupUpdatedEvent) GetEventType() string

type UserIdenticalContentCountParameters ΒΆ

type UserIdenticalContentCountParameters struct {
	Threshold  *int    `json:"threshold,omitempty"`
	TimeWindow *string `json:"time_window,omitempty"`
}

type UserMessagesDeletedEvent ΒΆ

type UserMessagesDeletedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                `json:"created_at"`
	Custom    map[string]any           `json:"custom"`
	User      UserResponseCommonFields `json:"user"`
	// The type of event: "user.messages.deleted" in this case
	Type string `json:"type"`
	// The ID of the channel where the target user's messages were deleted
	ChannelID           *string `json:"channel_id,omitempty"`
	ChannelMemberCount  *int    `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int    `json:"channel_message_count,omitempty"`
	// The type of the channel where the target user's messages were deleted
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the target user's messages were deleted
	Cid *string `json:"cid,omitempty"`
	// Whether Messages were hard deleted
	HardDelete *bool      `json:"hard_delete,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The team of the channel where the target user's messages were deleted
	Team          *string        `json:"team,omitempty"`
	ChannelCustom map[string]any `json:"channel_custom,omitempty"`
}

This event is sent when a user's message get deleted. The event contains information about the user whose messages got deleted.

func (*UserMessagesDeletedEvent) GetEventType ΒΆ

func (e *UserMessagesDeletedEvent) GetEventType() string

type UserMuteResponse ΒΆ

type UserMuteResponse struct {
	CreatedAt Timestamp  `json:"created_at"`
	UpdatedAt Timestamp  `json:"updated_at"`
	Expires   *Timestamp `json:"expires,omitempty"`
	// User response object
	Target *UserResponse `json:"target,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

type UserMutedEvent ΒΆ

type UserMutedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                `json:"created_at"`
	Custom    map[string]any           `json:"custom"`
	User      UserResponseCommonFields `json:"user"`
	// The type of event: "user.muted" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The target users that were muted
	TargetUsers []UserResponseCommonFields `json:"target_users,omitempty"`
	TargetUser  *UserResponseCommonFields  `json:"target_user,omitempty"`
}

This event is sent when a user gets muted. The event contains information about the user that was muted.

func (*UserMutedEvent) GetEventType ΒΆ

func (e *UserMutedEvent) GetEventType() string

type UserRatingReportResponse ΒΆ

type UserRatingReportResponse struct {
	Average float64 `json:"average"`
	Count   int     `json:"count"`
}

type UserReactivatedEvent ΒΆ

type UserReactivatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                `json:"created_at"`
	Custom    map[string]any           `json:"custom"`
	User      UserResponseCommonFields `json:"user"`
	// The type of event: "user.reactivated" in this case
	Type       string                    `json:"type"`
	ReceivedAt *Timestamp                `json:"received_at,omitempty"`
	CreatedBy  *UserResponseCommonFields `json:"created_by,omitempty"`
}

This event is sent when a user gets reactivated. The event contains information about the user that was reactivated.

func (*UserReactivatedEvent) GetEventType ΒΆ

func (e *UserReactivatedEvent) GetEventType() string

type UserRequest ΒΆ

type UserRequest struct {
	// User ID
	ID string `json:"id"`
	// User's profile image URL
	Image     *string `json:"image,omitempty"`
	Invisible *bool   `json:"invisible,omitempty"`
	Language  *string `json:"language,omitempty"`
	// Optional name of user
	Name *string `json:"name,omitempty"`
	// User's global role
	Role *string `json:"role,omitempty"`
	// List of teams the user belongs to
	Teams []string `json:"teams,omitempty"`
	// Custom user data
	Custom          map[string]any           `json:"custom,omitempty"`
	PrivacySettings *PrivacySettingsResponse `json:"privacy_settings,omitempty"`
	// Map of team-specific roles for the user
	TeamsRole map[string]string `json:"teams_role,omitempty"`
}

User request object

type UserResponse ΒΆ

type UserResponse struct {
	// Whether a user is banned or not
	Banned bool `json:"banned"`
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// Unique user identifier
	ID        string `json:"id"`
	Invisible bool   `json:"invisible"`
	// Preferred language of a user
	Language string `json:"language"`
	// Whether a user online or not
	Online bool `json:"online"`
	// Determines the set of user permissions
	Role string `json:"role"`
	// Whether a user is shadow banned
	ShadowBanned bool `json:"shadow_banned"`
	// Date/time of the last update
	UpdatedAt      Timestamp `json:"updated_at"`
	BlockedUserIds []string  `json:"blocked_user_ids"`
	// List of teams user is a part of
	Teams []string `json:"teams"`
	// Custom data for this object
	Custom          map[string]any `json:"custom"`
	AvgResponseTime *int           `json:"avg_response_time,omitempty"`
	// Date when ban expires
	BanExpires       *Timestamp `json:"ban_expires,omitempty"`
	BypassModeration *bool      `json:"bypass_moderation,omitempty"`
	// Date of deactivation
	DeactivatedAt *Timestamp `json:"deactivated_at,omitempty"`
	// Date/time of deletion
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`
	Image     *string    `json:"image,omitempty"`
	// Date of last activity
	LastActive *Timestamp `json:"last_active,omitempty"`
	// Optional name of user
	Name *string `json:"name,omitempty"`
	// Revocation date for tokens
	RevokeTokensIssuedBefore *Timestamp `json:"revoke_tokens_issued_before,omitempty"`
	// List of devices user is using
	Devices           []DeviceResponse                  `json:"devices,omitempty"`
	PrivacySettings   *PrivacySettingsResponse          `json:"privacy_settings,omitempty"`
	PushNotifications *PushNotificationSettingsResponse `json:"push_notifications,omitempty"`
	TeamsRole         map[string]string                 `json:"teams_role,omitempty"`
}

User response object

type UserResponseCommonFields ΒΆ

type UserResponseCommonFields struct {
	Banned                   bool              `json:"banned"`
	CreatedAt                Timestamp         `json:"created_at"`
	ID                       string            `json:"id"`
	Language                 string            `json:"language"`
	Online                   bool              `json:"online"`
	Role                     string            `json:"role"`
	UpdatedAt                Timestamp         `json:"updated_at"`
	BlockedUserIds           []string          `json:"blocked_user_ids"`
	Teams                    []string          `json:"teams"`
	Custom                   map[string]any    `json:"custom"`
	AvgResponseTime          *int              `json:"avg_response_time,omitempty"`
	DeactivatedAt            *Timestamp        `json:"deactivated_at,omitempty"`
	DeletedAt                *Timestamp        `json:"deleted_at,omitempty"`
	Image                    *string           `json:"image,omitempty"`
	LastActive               *Timestamp        `json:"last_active,omitempty"`
	Name                     *string           `json:"name,omitempty"`
	RevokeTokensIssuedBefore *Timestamp        `json:"revoke_tokens_issued_before,omitempty"`
	TeamsRole                map[string]string `json:"teams_role,omitempty"`
}

type UserResponsePrivacyFields ΒΆ

type UserResponsePrivacyFields struct {
	Banned                   bool                     `json:"banned"`
	CreatedAt                Timestamp                `json:"created_at"`
	ID                       string                   `json:"id"`
	Language                 string                   `json:"language"`
	Online                   bool                     `json:"online"`
	Role                     string                   `json:"role"`
	UpdatedAt                Timestamp                `json:"updated_at"`
	BlockedUserIds           []string                 `json:"blocked_user_ids"`
	Teams                    []string                 `json:"teams"`
	Custom                   map[string]any           `json:"custom"`
	AvgResponseTime          *int                     `json:"avg_response_time,omitempty"`
	DeactivatedAt            *Timestamp               `json:"deactivated_at,omitempty"`
	DeletedAt                *Timestamp               `json:"deleted_at,omitempty"`
	Image                    *string                  `json:"image,omitempty"`
	Invisible                *bool                    `json:"invisible,omitempty"`
	LastActive               *Timestamp               `json:"last_active,omitempty"`
	Name                     *string                  `json:"name,omitempty"`
	RevokeTokensIssuedBefore *Timestamp               `json:"revoke_tokens_issued_before,omitempty"`
	PrivacySettings          *PrivacySettingsResponse `json:"privacy_settings,omitempty"`
	TeamsRole                map[string]string        `json:"teams_role,omitempty"`
}

type UserRoleParameters ΒΆ

type UserRoleParameters struct {
	Operator *string `json:"operator,omitempty"`
	Role     *string `json:"role,omitempty"`
}

type UserRuleParameters ΒΆ

type UserRuleParameters struct {
	MaxAge *string `json:"max_age,omitempty"`
}

type UserUnbannedEvent ΒΆ

type UserUnbannedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                `json:"created_at"`
	Custom    map[string]any           `json:"custom"`
	User      UserResponseCommonFields `json:"user"`
	// The type of event: "user.unbanned" in this case
	Type string `json:"type"`
	// The ID of the channel where the target user was unbanned
	ChannelID           *string `json:"channel_id,omitempty"`
	ChannelMemberCount  *int    `json:"channel_member_count,omitempty"`
	ChannelMessageCount *int    `json:"channel_message_count,omitempty"`
	// The type of the channel where the target user was unbanned
	ChannelType *string `json:"channel_type,omitempty"`
	// The CID of the channel where the target user was unbanned
	Cid        *string    `json:"cid,omitempty"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// Whether the target user was shadow unbanned
	Shadow *bool `json:"shadow,omitempty"`
	// The team of the channel where the target user was unbanned
	Team          *string                   `json:"team,omitempty"`
	ChannelCustom map[string]any            `json:"channel_custom,omitempty"`
	CreatedBy     *UserResponseCommonFields `json:"created_by,omitempty"`
}

This event is sent when a user gets unbanned. The event contains information about the user that was unbanned.

func (*UserUnbannedEvent) GetEventType ΒΆ

func (e *UserUnbannedEvent) GetEventType() string

type UserUnmutedEvent ΒΆ

type UserUnmutedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                `json:"created_at"`
	Custom    map[string]any           `json:"custom"`
	User      UserResponseCommonFields `json:"user"`
	// The type of event: "user.unmuted" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
	// The target users that were unmuted
	TargetUsers []UserResponseCommonFields `json:"target_users,omitempty"`
	TargetUser  *UserResponseCommonFields  `json:"target_user,omitempty"`
}

This event is sent when a user gets unmuted. The event contains information about the user that was unmuted.

func (*UserUnmutedEvent) GetEventType ΒΆ

func (e *UserUnmutedEvent) GetEventType() string

type UserUnreadReminderEvent ΒΆ

type UserUnreadReminderEvent struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`
	// The channels with unread messages
	Channels map[string]*ChannelMessagesResponse `json:"channels"`
	Custom   map[string]any                      `json:"custom"`
	User     UserResponseCommonFields            `json:"user"`
	// The type of event: "user.unread_message_reminder" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
}

Reminder events allow you to notify your users about unread messages. Reminders can be used to trigger an email, push notification or SMS to the user.

func (*UserUnreadReminderEvent) GetEventType ΒΆ

func (e *UserUnreadReminderEvent) GetEventType() string

type UserUpdatedEvent ΒΆ

type UserUpdatedEvent struct {
	// Date/time of creation
	CreatedAt Timestamp                 `json:"created_at"`
	Custom    map[string]any            `json:"custom"`
	User      UserResponsePrivacyFields `json:"user"`
	// The type of event: "user.updated" in this case
	Type       string     `json:"type"`
	ReceivedAt *Timestamp `json:"received_at,omitempty"`
}

This event is sent when a user gets updated. The event contains information about the updated user.

func (*UserUpdatedEvent) GetEventType ΒΆ

func (e *UserUpdatedEvent) GetEventType() string

type V2DeleteTemplateRequest ΒΆ

type V2DeleteTemplateRequest struct {
}

type V2QueryTemplatesRequest ΒΆ

type V2QueryTemplatesRequest struct {
}

type V2UpsertTemplateRequest ΒΆ

type V2UpsertTemplateRequest struct {
	// Name of the moderation template
	Name string `json:"name"`
	// Configuration for a feeds moderation template
	Config FeedsModerationTemplateConfigPayload `json:"config"`
}

type ValidateExternalStorageResponse ΒΆ

type ValidateExternalStorageResponse struct {
	// Duration of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type ValidateImporterExternalStorageRequest ΒΆ

type ValidateImporterExternalStorageRequest struct {
}

type VelocityFilterConfig ΒΆ

type VelocityFilterConfig struct {
	AdvancedFilters  *bool                      `json:"advanced_filters,omitempty"`
	Async            *bool                      `json:"async,omitempty"`
	CascadingActions *bool                      `json:"cascading_actions,omitempty"`
	CidsPerUser      *int                       `json:"cids_per_user,omitempty"`
	Enabled          *bool                      `json:"enabled,omitempty"`
	FirstMessageOnly *bool                      `json:"first_message_only,omitempty"`
	Rules            []VelocityFilterConfigRule `json:"rules,omitempty"`
}

type VelocityFilterConfigRule ΒΆ

type VelocityFilterConfigRule struct {
	Action              string  `json:"action"`
	BanDuration         *int    `json:"ban_duration,omitempty"`
	CascadingAction     *string `json:"cascading_action,omitempty"`
	CascadingThreshold  *int    `json:"cascading_threshold,omitempty"`
	CheckMessageContext *bool   `json:"check_message_context,omitempty"`
	FastSpamThreshold   *int    `json:"fast_spam_threshold,omitempty"`
	FastSpamTtl         *int    `json:"fast_spam_ttl,omitempty"`
	IpBan               *bool   `json:"ip_ban,omitempty"`
	ProbationPeriod     *int    `json:"probation_period,omitempty"`
	ShadowBan           *bool   `json:"shadow_ban,omitempty"`
	SlowSpamBanDuration *int    `json:"slow_spam_ban_duration,omitempty"`
	SlowSpamThreshold   *int    `json:"slow_spam_threshold,omitempty"`
	SlowSpamTtl         *int    `json:"slow_spam_ttl,omitempty"`
	UrlOnly             *bool   `json:"url_only,omitempty"`
}

type VideoCallRuleConfig ΒΆ

type VideoCallRuleConfig struct {
	FlagAllLabels *bool        `json:"flag_all_labels,omitempty"`
	FlaggedLabels []string     `json:"flagged_labels,omitempty"`
	Rules         []HarmConfig `json:"rules,omitempty"`
}

type VideoClient ΒΆ

type VideoClient struct {
	// contains filtered or unexported fields
}

func NewVideoClient ΒΆ

func NewVideoClient(client *Client) *VideoClient

func (*VideoClient) BlockUser ΒΆ

func (c *VideoClient) BlockUser(ctx context.Context, _type string, id string, request *BlockUserRequest) (*StreamResponse[BlockUserResponse], error)

Block a user, preventing them from joining the call until they are unblocked.

Sends events: - call.blocked_user

func (*VideoClient) Call ΒΆ

func (c *VideoClient) Call(callType, callID string) *Call

func (*VideoClient) CollectUserFeedback ΒΆ

Sends events: - call.user_feedback_submitted

func (*VideoClient) CreateCallType ΒΆ

func (*VideoClient) CreateSIPInboundRoutingRule ΒΆ

Create a new SIP Inbound Routing Rule with either direct routing or PIN routing configuration

func (*VideoClient) CreateSIPTrunk ΒΆ

Create a new SIP trunk for the application

func (*VideoClient) DeleteCall ΒΆ

func (c *VideoClient) DeleteCall(ctx context.Context, _type string, id string, request *DeleteCallRequest) (*StreamResponse[DeleteCallResponse], error)

Sends events: - call.deleted

func (*VideoClient) DeleteCallType ΒΆ

func (c *VideoClient) DeleteCallType(ctx context.Context, name string, request *DeleteCallTypeRequest) (*StreamResponse[Response], error)

func (*VideoClient) DeleteRecording ΒΆ

func (c *VideoClient) DeleteRecording(ctx context.Context, _type string, id string, session string, filename string, request *DeleteRecordingRequest) (*StreamResponse[DeleteRecordingResponse], error)

Deletes recording

func (*VideoClient) DeleteSIPInboundRoutingRule ΒΆ

Delete a SIP Inbound Routing Rule for the application

func (*VideoClient) DeleteSIPTrunk ΒΆ

Delete a SIP trunk for the application

func (*VideoClient) DeleteTranscription ΒΆ

func (c *VideoClient) DeleteTranscription(ctx context.Context, _type string, id string, session string, filename string, request *DeleteTranscriptionRequest) (*StreamResponse[DeleteTranscriptionResponse], error)

Deletes transcription

func (*VideoClient) EndCall ΒΆ

func (c *VideoClient) EndCall(ctx context.Context, _type string, id string, request *EndCallRequest) (*StreamResponse[EndCallResponse], error)

Sends events: - call.ended

func (*VideoClient) GetActiveCallsStatus ΒΆ

Get the current status of all active calls including metrics and summary information

func (*VideoClient) GetCall ΒΆ

func (c *VideoClient) GetCall(ctx context.Context, _type string, id string, request *GetCallRequest) (*StreamResponse[GetCallResponse], error)

func (*VideoClient) GetCallParticipantSessionMetrics ΒΆ

func (c *VideoClient) GetCallParticipantSessionMetrics(ctx context.Context, _type string, id string, session string, user string, userSession string, request *GetCallParticipantSessionMetricsRequest) (*StreamResponse[GetCallParticipantSessionMetricsResponse], error)

func (*VideoClient) GetCallReport ΒΆ

func (c *VideoClient) GetCallReport(ctx context.Context, _type string, id string, request *GetCallReportRequest) (*StreamResponse[GetCallReportResponse], error)

func (*VideoClient) GetCallSessionParticipantStatsDetails ΒΆ

func (c *VideoClient) GetCallSessionParticipantStatsDetails(ctx context.Context, callType string, callID string, session string, user string, userSession string, request *GetCallSessionParticipantStatsDetailsRequest) (*StreamResponse[GetCallSessionParticipantStatsDetailsResponse], error)

func (*VideoClient) GetCallSessionParticipantStatsTimeline ΒΆ

func (c *VideoClient) GetCallSessionParticipantStatsTimeline(ctx context.Context, callType string, callID string, session string, user string, userSession string, request *GetCallSessionParticipantStatsTimelineRequest) (*StreamResponse[QueryCallSessionParticipantStatsTimelineResponse], error)

func (*VideoClient) GetCallStatsMap ΒΆ

func (c *VideoClient) GetCallStatsMap(ctx context.Context, callType string, callID string, session string, request *GetCallStatsMapRequest) (*StreamResponse[QueryCallStatsMapResponse], error)

func (*VideoClient) GetCallType ΒΆ

func (*VideoClient) GetDailyDigest ΒΆ added in v5.3.0

Returns the app's per-broadcast daily digest bundle for one UTC day, with an explicit readiness status (ready, pending, failed, future_date, expired). Payload keys are only present when status is ready.

func (*VideoClient) GetEdges ΒΆ

Returns the list of all edges available for video calls.

func (*VideoClient) GetOrCreateCall ΒΆ

Gets or creates a new call

Sends events: - call.created - call.notification - call.ring

func (*VideoClient) GoLive ΒΆ

func (c *VideoClient) GoLive(ctx context.Context, _type string, id string, request *GoLiveRequest) (*StreamResponse[GoLiveResponse], error)

Sends events: - call.live_started

func (*VideoClient) KickUser ΒΆ

func (c *VideoClient) KickUser(ctx context.Context, _type string, id string, request *KickUserRequest) (*StreamResponse[KickUserResponse], error)

Kicks a user from the call. Optionally block the user from rejoining by setting block=true.

Sends events: - call.blocked_user - call.kicked_user

func (*VideoClient) ListCallTypes ΒΆ

func (*VideoClient) ListRecordings ΒΆ

func (c *VideoClient) ListRecordings(ctx context.Context, _type string, id string, request *ListRecordingsRequest) (*StreamResponse[ListRecordingsResponse], error)

Lists recordings

func (*VideoClient) ListSIPInboundRoutingRule ΒΆ

List all SIP Inbound Routing Rules for the application

func (*VideoClient) ListSIPTrunks ΒΆ

List all SIP trunks for the application

func (*VideoClient) ListTranscriptions ΒΆ

Lists transcriptions

func (*VideoClient) MuteUsers ΒΆ

func (c *VideoClient) MuteUsers(ctx context.Context, _type string, id string, request *MuteUsersRequest) (*StreamResponse[MuteUsersResponse], error)

Mutes users in a call

func (*VideoClient) QueryCallMembers ΒΆ

Query call members with filter query

func (*VideoClient) QueryCallParticipantSessions ΒΆ

func (c *VideoClient) QueryCallParticipantSessions(ctx context.Context, _type string, id string, session string, request *QueryCallParticipantSessionsRequest) (*StreamResponse[QueryCallParticipantSessionsResponse], error)

func (*VideoClient) QueryCallParticipants ΒΆ

Returns a list of participants connected to the call

func (*VideoClient) QueryCallSessionParticipantStats ΒΆ

func (c *VideoClient) QueryCallSessionParticipantStats(ctx context.Context, callType string, callID string, session string, request *QueryCallSessionParticipantStatsRequest) (*StreamResponse[QueryCallSessionParticipantStatsResponse], error)

func (*VideoClient) QueryCallStats ΒΆ

func (*VideoClient) QueryCalls ΒΆ

Query calls with filter query

func (*VideoClient) QueryUserFeedback ΒΆ

func (*VideoClient) ReportClientCallEvent ΒΆ

Reports a batch of client-side telemetry events. Events are processed independently; one invalid event does not block the rest of the batch, but the request fails if any event is invalid.

func (*VideoClient) ResolveSipAuth ΒΆ

Determine authentication requirements for an inbound SIP call before sending a digest challenge

func (*VideoClient) ResolveSipInbound ΒΆ

Resolve SIP inbound routing based on trunk number, caller number, and challenge authentication

func (*VideoClient) RingCall ΒΆ

func (c *VideoClient) RingCall(ctx context.Context, _type string, id string, request *RingCallRequest) (*StreamResponse[RingCallResponse], error)

Sends a ring notification to the provided users who are not already in the call. All users should be members of the call

Sends events: - call.ring

func (*VideoClient) SendCallEvent ΒΆ

func (c *VideoClient) SendCallEvent(ctx context.Context, _type string, id string, request *SendCallEventRequest) (*StreamResponse[SendCallEventResponse], error)

Sends custom event to the call

Sends events: - custom

func (*VideoClient) SendClosedCaption ΒΆ

Sends a closed caption event to the call

Sends events: - call.closed_caption

func (*VideoClient) StartClosedCaptions ΒΆ

Starts closed captions

func (*VideoClient) StartFrameRecording ΒΆ

Starts frame by frame recording

Sends events: - call.frame_recording_started

func (*VideoClient) StartHLSBroadcasting ΒΆ

Starts HLS broadcasting

func (*VideoClient) StartRTMPBroadcasts ΒΆ

Starts RTMP broadcasts for the provided RTMP destinations

func (*VideoClient) StartRecording ΒΆ

func (c *VideoClient) StartRecording(ctx context.Context, _type string, id string, recordingType string, request *StartRecordingRequest) (*StreamResponse[StartRecordingResponse], error)

Starts recording

Sends events: - call.recording_started

func (*VideoClient) StartTranscription ΒΆ

Starts transcription

func (*VideoClient) StopAllRTMPBroadcasts ΒΆ

Stop all RTMP broadcasts for the provided call

func (*VideoClient) StopClosedCaptions ΒΆ

Stops closed captions

Sends events: - call.transcription_stopped

func (*VideoClient) StopFrameRecording ΒΆ

Stops frame recording

Sends events: - call.frame_recording_stopped

func (*VideoClient) StopHLSBroadcasting ΒΆ

Stops HLS broadcasting

func (*VideoClient) StopLive ΒΆ

func (c *VideoClient) StopLive(ctx context.Context, _type string, id string, request *StopLiveRequest) (*StreamResponse[StopLiveResponse], error)

Sends events: - call.updated

func (*VideoClient) StopRTMPBroadcast ΒΆ

func (c *VideoClient) StopRTMPBroadcast(ctx context.Context, _type string, id string, name string, request *StopRTMPBroadcastRequest) (*StreamResponse[StopRTMPBroadcastsResponse], error)

Stop RTMP broadcasts for the provided RTMP destinations

func (*VideoClient) StopRecording ΒΆ

func (c *VideoClient) StopRecording(ctx context.Context, _type string, id string, recordingType string, request *StopRecordingRequest) (*StreamResponse[StopRecordingResponse], error)

Stops recording

Sends events: - call.recording_stopped

func (*VideoClient) StopTranscription ΒΆ

Stops transcription

Sends events: - call.transcription_stopped

func (*VideoClient) UnblockUser ΒΆ

func (c *VideoClient) UnblockUser(ctx context.Context, _type string, id string, request *UnblockUserRequest) (*StreamResponse[UnblockUserResponse], error)

Removes the block for a user on a call. The user will be able to join the call again.

Sends events: - call.unblocked_user

func (*VideoClient) UpdateCall ΒΆ

func (c *VideoClient) UpdateCall(ctx context.Context, _type string, id string, request *UpdateCallRequest) (*StreamResponse[UpdateCallResponse], error)

Sends events: - call.updated

func (*VideoClient) UpdateCallMembers ΒΆ

Sends events: - call.member_added - call.member_removed - call.member_updated

func (*VideoClient) UpdateCallType ΒΆ

func (*VideoClient) UpdateSIPInboundRoutingRule ΒΆ

Update an existing SIP Inbound Routing Rule with new configuration

func (*VideoClient) UpdateSIPTrunk ΒΆ

Update a SIP trunk for the application

func (*VideoClient) UpdateUserPermissions ΒΆ

Updates user permissions

Sends events: - call.permissions_updated

func (*VideoClient) VideoPin ΒΆ

func (c *VideoClient) VideoPin(ctx context.Context, _type string, id string, request *VideoPinRequest) (*StreamResponse[PinResponse], error)

Pins a track for all users in the call.

func (*VideoClient) VideoUnpin ΒΆ

func (c *VideoClient) VideoUnpin(ctx context.Context, _type string, id string, request *VideoUnpinRequest) (*StreamResponse[UnpinResponse], error)

Unpins a track for all users in the call.

type VideoContentParameters ΒΆ

type VideoContentParameters struct {
	LabelOperator *string  `json:"label_operator,omitempty"`
	HarmLabels    []string `json:"harm_labels,omitempty"`
}

type VideoEndCallRequestPayload ΒΆ

type VideoEndCallRequestPayload struct {
}

Configuration for ending video call

type VideoKickUserRequestPayload ΒΆ

type VideoKickUserRequestPayload struct {
}

Configuration for kicking user from video call

type VideoPinRequest ΒΆ

type VideoPinRequest struct {
	// the session ID of the user who pinned the message
	SessionID string `json:"session_id"`
	// the user ID of the user who pinned the message
	UserID string `json:"user_id"`
}

type VideoReactionOverTimeResponse ΒΆ

type VideoReactionOverTimeResponse struct {
	ByMinute []CountByMinuteResponse `json:"by_minute,omitempty"`
}

type VideoReactionResponse ΒΆ

type VideoReactionResponse struct {
	Type string `json:"type"`
	// User response object
	User      UserResponse   `json:"user"`
	EmojiCode *string        `json:"emoji_code,omitempty"`
	Custom    map[string]any `json:"custom,omitempty"`
}

type VideoReactionsResponse ΒΆ

type VideoReactionsResponse struct {
	Reaction      string                         `json:"reaction"`
	CountOverTime *VideoReactionOverTimeResponse `json:"count_over_time,omitempty"`
}

type VideoRuleParameters ΒΆ

type VideoRuleParameters struct {
	Threshold  *int     `json:"threshold,omitempty"`
	TimeWindow *string  `json:"time_window,omitempty"`
	HarmLabels []string `json:"harm_labels,omitempty"`
}

type VideoSettings ΒΆ

type VideoSettings struct {
	AccessRequestEnabled bool             `json:"access_request_enabled"`
	CameraDefaultOn      bool             `json:"camera_default_on"`
	CameraFacing         string           `json:"camera_facing"`
	Enabled              bool             `json:"enabled"`
	TargetResolution     TargetResolution `json:"target_resolution"`
}

type VideoSettingsRequest ΒΆ

type VideoSettingsRequest struct {
	AccessRequestEnabled *bool             `json:"access_request_enabled,omitempty"`
	CameraDefaultOn      *bool             `json:"camera_default_on,omitempty"`
	CameraFacing         *string           `json:"camera_facing,omitempty"`
	Enabled              *bool             `json:"enabled,omitempty"`
	TargetResolution     *TargetResolution `json:"target_resolution,omitempty"`
}

type VideoSettingsResponse ΒΆ

type VideoSettingsResponse struct {
	AccessRequestEnabled bool             `json:"access_request_enabled"`
	CameraDefaultOn      bool             `json:"camera_default_on"`
	CameraFacing         string           `json:"camera_facing"`
	Enabled              bool             `json:"enabled"`
	TargetResolution     TargetResolution `json:"target_resolution"`
}

type VideoUnpinRequest ΒΆ

type VideoUnpinRequest struct {
	// the session ID of the user who pinned the message
	SessionID string `json:"session_id"`
	// the user ID of the user who pinned the message
	UserID string `json:"user_id"`
}

type ViewerBehavior ΒΆ added in v5.3.0

type ViewerBehavior struct {
	ConnectionDurationP50S   int      `json:"connection_duration_p50_s"`
	ConnectionsPerViewerMean float64  `json:"connections_per_viewer_mean"`
	MedianWatchMin           float64  `json:"median_watch_min"`
	Note                     string   `json:"note"`
	P90WatchMin              float64  `json:"p90_watch_min"`
	BounceRatePct            *float64 `json:"bounce_rate_pct,omitempty"`
	ConnectionsUnder30sPct   *float64 `json:"connections_under_30s_pct,omitempty"`
	ReturnVisitRatePct       *float64 `json:"return_visit_rate_pct,omitempty"`
}

type VoteData ΒΆ

type VoteData struct {
	AnswerText *string `json:"answer_text,omitempty"`
	OptionID   *string `json:"option_id,omitempty"`
}

type WHEvent ΒΆ

type WHEvent struct {
	Type string `json:"type"`
}

The discriminator object for all webhook events, it maps events' payload to the final type

type WHIPIngress ΒΆ

type WHIPIngress struct {
	// URL for a new whip input, every time a new link is created
	Address string `json:"address"`
}

type WSEvent ΒΆ

type WSEvent struct {
	CreatedAt            Timestamp           `json:"created_at"`
	Type                 string              `json:"type"`
	Custom               map[string]any      `json:"custom"`
	Automoderation       *bool               `json:"automoderation,omitempty"`
	ChannelID            *string             `json:"channel_id,omitempty"`
	ChannelLastMessageAt *Timestamp          `json:"channel_last_message_at,omitempty"`
	ChannelType          *string             `json:"channel_type,omitempty"`
	Cid                  *string             `json:"cid,omitempty"`
	ConnectionID         *string             `json:"connection_id,omitempty"`
	ParentID             *string             `json:"parent_id,omitempty"`
	Reason               *string             `json:"reason,omitempty"`
	Team                 *string             `json:"team,omitempty"`
	ThreadID             *string             `json:"thread_id,omitempty"`
	UserID               *string             `json:"user_id,omitempty"`
	WatcherCount         *int                `json:"watcher_count,omitempty"`
	AutomoderationScores *ModerationResponse `json:"automoderation_scores,omitempty"`
	// Represents channel in chat
	Channel *ChannelResponse `json:"channel,omitempty"`
	// User response object
	CreatedBy *UserResponse          `json:"created_by,omitempty"`
	Me        *OwnUserResponse       `json:"me,omitempty"`
	Member    *ChannelMemberResponse `json:"member,omitempty"`
	// Represents any chat message
	Message       *MessageResponse      `json:"message,omitempty"`
	MessageUpdate *MessageUpdate        `json:"message_update,omitempty"`
	Poll          *PollResponseData     `json:"poll,omitempty"`
	PollVote      *PollVoteResponseData `json:"poll_vote,omitempty"`
	Reaction      *ReactionResponse     `json:"reaction,omitempty"`
	Thread        *ThreadResponse       `json:"thread,omitempty"`
	// User response object
	User *UserResponse `json:"user,omitempty"`
}

Represents an BaseEvent that happened in Stream Chat

type WaitForTaskOption ΒΆ

type WaitForTaskOption func(*waitForTaskConfig)

WaitForTaskOption configures WaitForTask.

func WithWaitForTaskPollInterval ΒΆ

func WithWaitForTaskPollInterval(d time.Duration) WaitForTaskOption

WithWaitForTaskPollInterval sets how often the task-status endpoint is polled. Default 1s. Values <= 0 are ignored.

func WithWaitForTaskTimeout ΒΆ

func WithWaitForTaskTimeout(d time.Duration) WaitForTaskOption

WithWaitForTaskTimeout sets the maximum wait before returning a timeout error. Default 60s. Values <= 0 disable the timeout (waits until ctx ends or terminal status is reached).

type WebhookEvent ΒΆ

type WebhookEvent interface {
	GetEventType() string
}

WebhookEvent is implemented by all webhook event types.

func ParseEvent ΒΆ

func ParseEvent(payload []byte) (WebhookEvent, error)

ParseEvent parses a webhook payload and returns the typed event for known discriminators or *UnknownEvent for well-formed-but-unknown ones.

Returns an error wrapping ErrInvalidWebhook for invalid JSON, missing/non-string type field, or any deserialization failure on a known type. The wrapped message identifies the failure mode (e.g., "invalid JSON payload").

Distinct from ParseWebhookEvent: ParseEvent returns *UnknownEvent on unknown discriminators (forward-compat); ParseWebhookEvent returns an error.

func ParseSns ΒΆ

func ParseSns(notificationBody string) (WebhookEvent, error)

ParseSns unwraps the standard AWS SNS notification envelope and parses the inner payload. Same no-signature posture as ParseSqs.

func ParseSqs ΒΆ

func ParseSqs(messageBody string) (WebhookEvent, error)

ParseSqs decodes (base64 + gzip pass-through) and parses an SQS Message Body.

Backend emits no signature attribute on SQS messages today, so this helper performs no signature verification. If a signed variant is added later, it'll be a separate function rather than retrofitting this signature.

func ParseWebhookEvent ΒΆ

func ParseWebhookEvent(rawEvent []byte) (WebhookEvent, error)

ParseWebhookEvent deserializes a raw webhook payload into a typed event. It uses the "type" field to determine which event struct to deserialize into.

Returns WebhookEvent - the concrete event type (e.g., *MessageNewEvent, *ChannelCreatedEvent). All webhook events implement the WebhookEvent interface with a GetEventType() method.

Returns an error if the event type is unknown or if deserialization fails.

Example usage:

func webhookHandler(w http.ResponseWriter, r *http.Request) {
    body, _ := io.ReadAll(r.Body)
    signature := r.Header.Get("X-Signature")
    secret := os.Getenv("STREAM_WEBHOOK_SECRET")

    if !getstream.VerifyWebhookSignature(body, signature, secret) {
        http.Error(w, "Invalid signature", http.StatusForbidden)
        return
    }

    event, err := getstream.ParseWebhookEvent(body)
    if err != nil {
        http.Error(w, err.Error(), http.StatusBadRequest)
        return
    }

    switch e := event.(type) {
    case *getstream.MessageNewEvent:
        fmt.Printf("New message: %s\n", e.Message.Text)
    case *getstream.ChannelCreatedEvent:
        fmt.Printf("Channel created: %s\n", e.Channel.Cid)
    default:
        fmt.Printf("Unknown event type: %s\n", e.GetEventType())
    }
    w.WriteHeader(200)
}

func VerifyAndParseWebhook ΒΆ

func VerifyAndParseWebhook(r *http.Request, secret string) (WebhookEvent, error)

VerifyAndParseWebhook reads the request body and the X-Signature header, then delegates to VerifyAndParseWebhookBytes. The request body is restored so downstream handlers can read it again.

func VerifyAndParseWebhookBytes ΒΆ

func VerifyAndParseWebhookBytes(body []byte, signature, secret string) (WebhookEvent, error)

VerifyAndParseWebhookBytes is the spec-canonical HTTP composite. It takes the raw HTTP body (which may be gzip-compressed), the X-Signature header value, and the webhook secret. Steps: gunzip if gzip-prefixed β†’ verify HMAC-SHA256 over the uncompressed bytes β†’ parse into a typed event.

Returns an error wrapping ErrInvalidWebhook for every failure mode. The wrapped message identifies which mode fired ("signature mismatch", "invalid base64 encoding", "gzip decompression failed", or "invalid JSON payload"). Callers that want a single arm use errors.Is(err, ErrInvalidWebhook); callers that need to differentiate (security logging, retry policy) filter on err.Error().

Example:

func webhookHandler(w http.ResponseWriter, r *http.Request) {
    body, _ := io.ReadAll(r.Body)
    sig := r.Header.Get("X-Signature")
    event, err := getstream.VerifyAndParseWebhookBytes(body, sig, secret)
    if err != nil {
        http.Error(w, err.Error(), http.StatusBadRequest)
        return
    }
    // Handle event...
    w.WriteHeader(http.StatusOK)
}

type WebhookFailoverConfig ΒΆ

type WebhookFailoverConfig struct {
	GcsBucket      *string `json:"gcs_bucket,omitempty"`
	GcsCredentials *string `json:"gcs_credentials,omitempty"`
	GcsPath        *string `json:"gcs_path,omitempty"`
	Type           *string `json:"type,omitempty"`
}

type WrappedUnreadCountsResponse ΒΆ

type WrappedUnreadCountsResponse struct {
	// Duration of the request in milliseconds
	Duration                string                    `json:"duration"`
	TotalUnreadCount        int                       `json:"total_unread_count"`
	TotalUnreadThreadsCount int                       `json:"total_unread_threads_count"`
	ChannelType             []UnreadCountsChannelType `json:"channel_type"`
	Channels                []UnreadCountsChannel     `json:"channels"`
	Threads                 []UnreadCountsThread      `json:"threads"`
	TotalUnreadCountByTeam  map[string]int            `json:"total_unread_count_by_team,omitempty"`
}

Basic response information

type XiaomiConfig ΒΆ

type XiaomiConfig struct {
	Disabled    *bool   `json:"Disabled,omitempty"`
	PackageName *string `json:"package_name,omitempty"`
	Secret      *string `json:"secret,omitempty"`
}

type XiaomiConfigFields ΒΆ

type XiaomiConfigFields struct {
	Enabled     bool    `json:"enabled"`
	PackageName *string `json:"package_name,omitempty"`
	Secret      *string `json:"secret,omitempty"`
}

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL