getstream

package module
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: BSD-3-Clause Imports: 20 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

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.

✍️ 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.

Index ΒΆ

Constants ΒΆ

View Source
const (
	EnvStreamApiKey      = "STREAM_API_KEY"
	EnvStreamApiSecret   = "STREAM_API_SECRET"
	EnvStreamBaseUrl     = "STREAM_BASE_URL"
	EnvStreamHttpTimeout = "STREAM_HTTP_TIMEOUT"
)
View Source
const (
	HeaderRateLimit     = "X-Ratelimit-Limit"
	HeaderRateRemaining = "X-Ratelimit-Remaining"
	HeaderRateReset     = "X-Ratelimit-Reset"
)
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 ΒΆ

This section is empty.

Functions ΒΆ

func EncodeValueToQueryParam ΒΆ

func EncodeValueToQueryParam(value any) string

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

func PtrTo ΒΆ

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

func StructToMapWithTags ΒΆ

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

func Version ΒΆ

func Version() string

Version returns the version of the library.

Types ΒΆ

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 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 AWSRekognitionRule ΒΆ

type AWSRekognitionRule struct {
	Action string `json:"action"`

	Label string `json:"label"`

	MinConfidence float64 `json:"min_confidence"`
}

type AcceptFeedMemberInviteRequest ΒΆ

type AcceptFeedMemberInviteRequest struct {
	UserID *string      `json:"user_id"`
	User   *UserRequest `json:"user"`
}

type AcceptFeedMemberInviteResponse ΒΆ

type AcceptFeedMemberInviteResponse struct {
	Duration string `json:"duration"`

	Member FeedMemberResponse `json:"member"`
}

type AcceptFollowRequest ΒΆ

type AcceptFollowRequest struct {
	Source       string  `json:"source"`
	Target       string  `json:"target"`
	FollowerRole *string `json:"follower_role"`
}

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"`

	// 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"`

	TargetUser *UserResponse `json:"target_user,omitempty"`

	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 ΒΆ added in v3.1.0

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 ΒΆ added in v3.1.0

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 (*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 (*ActivityDeletedEvent) GetEventType() string

type ActivityFeedbackEvent ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

func (*ActivityFeedbackEvent) GetEventType() string

type ActivityFeedbackEventPayload ΒΆ added in v3.4.0

type ActivityFeedbackEventPayload struct {
	// The type of feedback action
	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 UserResponse `json:"user"`
}

type ActivityFeedbackRequest ΒΆ added in v3.1.0

type ActivityFeedbackRequest struct {
	Hide     *bool        `json:"hide"`
	ShowLess *bool        `json:"show_less"`
	ShowMore *bool        `json:"show_more"`
	UserID   *string      `json:"user_id"`
	User     *UserRequest `json:"user"`
}

type ActivityFeedbackResponse ΒΆ added in v3.1.0

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 ActivityLocation ΒΆ

type ActivityLocation struct {
	// Latitude coordinate
	Lat float64 `json:"lat"`

	// Longitude coordinate
	Lng float64 `json:"lng"`
}

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 (*ActivityMarkEvent) GetEventType() string

type ActivityMarkedEvent ΒΆ

type ActivityMarkedEvent struct {
	AllRead bool `json:"all_read"`

	AllSeen bool `json:"all_seen"`

	CreatedAt Timestamp `json:"created_at"`

	FeedID string `json:"feed_id"`

	UserID string `json:"user_id"`

	Type string `json:"type"`

	MarkedRead []string `json:"marked_read,omitempty"`

	MarkedWatched []string `json:"marked_watched,omitempty"`
}

func (*ActivityMarkedEvent) GetEventType ΒΆ

func (*ActivityMarkedEvent) 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 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 (*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 (*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 (*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 (*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 (*ActivityRemovedFromFeedEvent) GetEventType() string

type ActivityRequest ΒΆ

type ActivityRequest struct {
	// Type of activity
	Type string `json:"type"`

	// List of feed IDs to add the activity to
	Feeds []string `json:"feeds"`

	// 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. Options: 'everyone' (default - anyone can reply), 'people_i_follow' (only people the activity creator follows can reply), 'nobody' (no one can reply)
	RestrictReplies *string `json:"restrict_replies,omitempty"`

	// Whether to skip URL enrichment for the activity
	SkipEnrichUrl *bool `json:"skip_enrich_url,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
	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"`

	// 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 *ActivityLocation `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 reply to this activity. Values: 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
	Visibility string `json:"visibility"`

	// Type of activity
	Type string `json:"type"`

	// Media attachments for the activity
	Attachments []Attachment `json:"attachments"`

	// Comments on this activity
	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]*ReactionGroupResponse `json:"reaction_groups"`

	// Data for search indexing
	SearchData map[string]any `json:"search_data"`

	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"`

	IsWatched *bool `json:"is_watched,omitempty"`

	ModerationAction *string `json:"moderation_action,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"`

	CurrentFeed *FeedResponse `json:"current_feed,omitempty"`

	Location *ActivityLocation `json:"location,omitempty"`

	Moderation *ModerationV2Response `json:"moderation,omitempty"`

	NotificationContext *NotificationContext `json:"notification_context,omitempty"`

	Parent *ActivityResponse `json:"parent,omitempty"`

	Poll *PollResponseData `json:"poll,omitempty"`
}

type ActivitySelectorConfig ΒΆ

type ActivitySelectorConfig struct {
	// Type of selector
	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
	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"`
}

type ActivitySelectorConfigResponse ΒΆ added in v3.3.0

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
	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"`
}

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 (*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 (*ActivityUpdatedEvent) GetEventType() string

type AddActivityReactionRequest ΒΆ added in v3.3.0

type AddActivityReactionRequest struct {
	Type                       string         `json:"type"`
	CreateNotificationActivity *bool          `json:"create_notification_activity"`
	EnforceUnique              *bool          `json:"enforce_unique"`
	SkipPush                   *bool          `json:"skip_push"`
	UserID                     *string        `json:"user_id"`
	Custom                     map[string]any `json:"custom"`
	User                       *UserRequest   `json:"user"`
}

type AddActivityRequest ΒΆ

type AddActivityRequest struct {
	Type             string            `json:"type"`
	Feeds            []string          `json:"feeds"`
	ExpiresAt        *string           `json:"expires_at"`
	ID               *string           `json:"id"`
	ParentID         *string           `json:"parent_id"`
	PollID           *string           `json:"poll_id"`
	RestrictReplies  *string           `json:"restrict_replies"`
	SkipEnrichUrl    *bool             `json:"skip_enrich_url"`
	Text             *string           `json:"text"`
	UserID           *string           `json:"user_id"`
	Visibility       *string           `json:"visibility"`
	VisibilityTag    *string           `json:"visibility_tag"`
	Attachments      []Attachment      `json:"attachments"`
	CollectionRefs   []string          `json:"collection_refs"`
	FilterTags       []string          `json:"filter_tags"`
	InterestTags     []string          `json:"interest_tags"`
	MentionedUserIds []string          `json:"mentioned_user_ids"`
	Custom           map[string]any    `json:"custom"`
	Location         *ActivityLocation `json:"location"`
	SearchData       map[string]any    `json:"search_data"`
}

type AddActivityResponse ΒΆ

type AddActivityResponse struct {
	Duration string `json:"duration"`

	Activity ActivityResponse `json:"activity"`
}

type AddBookmarkRequest ΒΆ

type AddBookmarkRequest struct {
	FolderID  *string           `json:"folder_id"`
	UserID    *string           `json:"user_id"`
	Custom    map[string]any    `json:"custom"`
	NewFolder *AddFolderRequest `json:"new_folder"`
	User      *UserRequest      `json:"user"`
}

type AddBookmarkResponse ΒΆ

type AddBookmarkResponse struct {
	Duration string `json:"duration"`

	Bookmark BookmarkResponse `json:"bookmark"`
}

type AddCommentReactionRequest ΒΆ

type AddCommentReactionRequest struct {
	Type                       string         `json:"type"`
	CreateNotificationActivity *bool          `json:"create_notification_activity"`
	EnforceUnique              *bool          `json:"enforce_unique"`
	SkipPush                   *bool          `json:"skip_push"`
	UserID                     *string        `json:"user_id"`
	Custom                     map[string]any `json:"custom"`
	User                       *UserRequest   `json:"user"`
}

type AddCommentReactionResponse ΒΆ

type AddCommentReactionResponse struct {
	// Duration of the request
	Duration string `json:"duration"`

	Comment CommentResponse `json:"comment"`

	Reaction FeedsReactionResponse `json:"reaction"`
}

type AddCommentRequest ΒΆ

type AddCommentRequest struct {
	Comment                    *string        `json:"comment"`
	CreateNotificationActivity *bool          `json:"create_notification_activity"`
	ID                         *string        `json:"id"`
	ObjectID                   *string        `json:"object_id"`
	ObjectType                 *string        `json:"object_type"`
	ParentID                   *string        `json:"parent_id"`
	SkipEnrichUrl              *bool          `json:"skip_enrich_url"`
	SkipPush                   *bool          `json:"skip_push"`
	UserID                     *string        `json:"user_id"`
	Attachments                []Attachment   `json:"attachments"`
	MentionedUserIds           []string       `json:"mentioned_user_ids"`
	Custom                     map[string]any `json:"custom"`
	User                       *UserRequest   `json:"user"`
}

type AddCommentResponse ΒΆ

type AddCommentResponse struct {
	Duration string `json:"duration"`

	Comment CommentResponse `json:"comment"`
}

type AddCommentsBatchRequest ΒΆ

type AddCommentsBatchRequest struct {
	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 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"`

	// Custom data for the reaction
	Custom map[string]any `json:"custom,omitempty"`

	User *UserRequest `json:"user,omitempty"`
}

type AddReactionResponse ΒΆ

type AddReactionResponse struct {
	Duration string `json:"duration"`

	Activity ActivityResponse `json:"activity"`

	Reaction FeedsReactionResponse `json:"reaction"`
}

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"`

	IsWatched *bool `json:"is_watched,omitempty"`
}

type AggregationConfig ΒΆ

type AggregationConfig struct {
	// Format for activity aggregation
	Format *string `json:"format,omitempty"`
}

type AnyEvent ΒΆ

type AnyEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`
}

func (*AnyEvent) GetEventType ΒΆ

func (*AnyEvent) GetEventType() string

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"`

	GuestUserCreationDisabled bool `json:"guest_user_creation_disabled"`

	ID int `json:"id"`

	ImageModerationEnabled bool `json:"image_moderation_enabled"`

	MaxAggregatedActivitiesLength int `json:"max_aggregated_activities_length"`

	ModerationBulkSubmitActionEnabled bool `json:"moderation_bulk_submit_action_enabled"`

	ModerationEnabled bool `json:"moderation_enabled"`

	ModerationLlmConfigurabilityEnabled bool `json:"moderation_llm_configurability_enabled"`

	ModerationMultitenantBlocklistEnabled bool `json:"moderation_multitenant_blocklist_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"`

	BeforeMessageSendHookUrl *string `json:"before_message_send_hook_url,omitempty"`

	RevokeTokensIssuedBefore *Timestamp `json:"revoke_tokens_issued_before,omitempty"`

	AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`

	Geofences []GeofenceResponse `json:"geofences,omitempty"`

	ImageModerationLabels []string `json:"image_moderation_labels,omitempty"`

	DatadogInfo *DataDogInfo `json:"datadog_info,omitempty"`

	ModerationDashboardPreferences *ModerationDashboardPreferences `json:"moderation_dashboard_preferences,omitempty"`
}

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 (*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 (*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 (*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 (*AsyncExportModerationLogsEvent) 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 (*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 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 AutomodDetails ΒΆ

type AutomodDetails struct {
	Action *string `json:"action,omitempty"`

	OriginalMessageType *string `json:"original_message_type,omitempty"`

	ImageLabels []string `json:"image_labels,omitempty"`

	MessageDetails *FlagMessageDetails `json:"message_details,omitempty"`

	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 Ban ΒΆ

type Ban struct {
	CreatedAt Timestamp `json:"created_at"`

	Shadow bool `json:"shadow"`

	Expires *Timestamp `json:"expires,omitempty"`

	Reason *string `json:"reason,omitempty"`

	Channel *Channel `json:"channel,omitempty"`

	CreatedBy *User `json:"created_by,omitempty"`

	Target *User `json:"target,omitempty"`
}

type BanActionRequest ΒΆ

type BanActionRequest struct {
	ChannelBanOnly *bool `json:"channel_ban_only,omitempty"`

	DeleteMessages *string `json:"delete_messages,omitempty"`

	IpBan *bool `json:"ip_ban,omitempty"`

	Reason *string `json:"reason,omitempty"`

	Shadow *bool `json:"shadow,omitempty"`

	Timeout *int `json:"timeout,omitempty"`
}

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 {
	TargetUserID   string       `json:"target_user_id"`
	BannedByID     *string      `json:"banned_by_id"`
	ChannelCid     *string      `json:"channel_cid"`
	DeleteMessages *string      `json:"delete_messages"`
	IpBan          *bool        `json:"ip_ban"`
	Reason         *string      `json:"reason"`
	Shadow         *bool        `json:"shadow"`
	Timeout        *int         `json:"timeout"`
	BannedBy       *UserRequest `json:"banned_by"`
}

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"`

	BannedBy *UserResponse `json:"banned_by,omitempty"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	User *UserResponse `json:"user,omitempty"`
}

type BlockActionRequest ΒΆ added in v3.4.0

type BlockActionRequest struct {
	Reason *string `json:"reason,omitempty"`
}

type BlockListConfig ΒΆ

type BlockListConfig struct {
	Async *bool `json:"async,omitempty"`

	Enabled *bool `json:"enabled,omitempty"`

	Rules []BlockListRule `json:"rules,omitempty"`
}

type BlockListOptions ΒΆ

type BlockListOptions struct {
	// Blocklist behavior
	Behavior string `json:"behavior"`

	// Blocklist name
	Blocklist string `json:"blocklist"`
}

type BlockListResponse ΒΆ

type BlockListResponse struct {
	IsLeetCheckEnabled bool `json:"is_leet_check_enabled"`

	IsPluralCheckEnabled bool `json:"is_plural_check_enabled"`

	// Block list name
	Name string `json:"name"`

	// Block list type.
	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"`

	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 {
	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 {
	BlockedUserID string       `json:"blocked_user_id"`
	UserID        *string      `json:"user_id"`
	User          *UserRequest `json:"user"`
}

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 UserResponse `json:"user"`

	// The type of event: "call.blocked_user" in this case
	Type string `json:"type"`

	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 (*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"`

	BlockedUser UserResponse `json:"blocked_user"`

	User UserResponse `json:"user"`
}

type BodyguardImageAnalysisConfig ΒΆ added in v3.1.1

type BodyguardImageAnalysisConfig struct {
	Rules []BodyguardRule `json:"rules,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 (*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 (*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 (*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 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 (*BookmarkFolderUpdatedEvent) GetEventType() string

type BookmarkResponse ΒΆ

type BookmarkResponse struct {
	// When the bookmark was created
	CreatedAt Timestamp `json:"created_at"`

	// When the bookmark was last updated
	UpdatedAt Timestamp `json:"updated_at"`

	Activity ActivityResponse `json:"activity"`

	User UserResponse `json:"user"`

	// 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 (*BookmarkUpdatedEvent) GetEventType() string

type Bound ΒΆ

type Bound struct {
	Inclusive bool `json:"inclusive"`

	Value float64 `json:"value"`
}

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"`

	HLS HLSSettingsResponse `json:"hls"`

	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 BulkImageModerationRequest ΒΆ

type BulkImageModerationRequest struct {
	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 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 ΒΆ added in v3.2.0

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) 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 ΒΆ added in v3.1.0

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 ΒΆ added in v3.5.0

func (*Call) SendCallEvent ΒΆ

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

func (*Call) SendClosedCaption ΒΆ added in v3.1.1

func (*Call) StartRecording ΒΆ

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, 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"`

	Call CallResponse `json:"call"`

	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 (*CallAcceptedEvent) GetEventType() string

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 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 (*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 (*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 (*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"`

	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 (*CallCreatedEvent) GetEventType() string

type CallDeletedEvent ΒΆ

type CallDeletedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	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 (*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"`

	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"`

	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 (*CallEndedEvent) GetEventType() string

type CallFrameRecordingFailedEvent ΒΆ

type CallFrameRecordingFailedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	EgressID string `json:"egress_id"`

	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 (*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 (*CallFrameRecordingFrameReadyEvent) GetEventType() string

type CallFrameRecordingStartedEvent ΒΆ

type CallFrameRecordingStartedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	EgressID string `json:"egress_id"`

	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 (*CallFrameRecordingStartedEvent) GetEventType() string

type CallFrameRecordingStoppedEvent ΒΆ

type CallFrameRecordingStoppedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	EgressID string `json:"egress_id"`

	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 (*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 (*CallHLSBroadcastingFailedEvent) GetEventType() string

type CallHLSBroadcastingStartedEvent ΒΆ

type CallHLSBroadcastingStartedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	HLSPlaylistUrl string `json:"hls_playlist_url"`

	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 (*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 (*CallHLSBroadcastingStoppedEvent) GetEventType() string

type CallIngressResponse ΒΆ

type CallIngressResponse struct {
	RTMP RTMPIngress `json:"rtmp"`

	Srt SRTIngress `json:"srt"`

	Whip WHIPIngress `json:"whip"`
}

CallIngressResponse is the payload for ingress settings

type CallLiveStartedEvent ΒΆ

type CallLiveStartedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	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 (*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"`

	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 (*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"`

	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 (*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"`

	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 (*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"`

	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 (*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"`

	Call CallResponse `json:"call"`

	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 (*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 (*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 (*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"`

	Call CallResponse `json:"call"`

	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 (*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 UserResponse `json:"user"`
}

type CallParticipantTimeline ΒΆ added in v3.3.0

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 ReactionResponse `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 (*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 event: "call.recording_failed" in this case
	Type string `json:"type"`
}

This event is sent when call recording has failed

func (*CallRecordingFailedEvent) GetEventType ΒΆ

func (*CallRecordingFailedEvent) GetEventType() string

type CallRecordingReadyEvent ΒΆ

type CallRecordingReadyEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	EgressID string `json:"egress_id"`

	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 (*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 event: "call.recording_started" in this case
	Type string `json:"type"`
}

This event is sent when call recording has started

func (*CallRecordingStartedEvent) GetEventType ΒΆ

func (*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 event: "call.recording_stopped" in this case
	Type string `json:"type"`
}

This event is sent when call recording has stopped

func (*CallRecordingStoppedEvent) GetEventType ΒΆ

func (*CallRecordingStoppedEvent) GetEventType() string

type CallRejectedEvent ΒΆ

type CallRejectedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	Call CallResponse `json:"call"`

	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 (*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"`

	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"`

	CreatedBy UserResponse `json:"created_by"`

	// Custom data for this object
	Custom map[string]any `json:"custom"`

	Egress EgressResponse `json:"egress"`

	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"`

	// 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"`

	Call CallResponse `json:"call"`

	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 (*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 (*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 (*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 (*CallRtmpBroadcastStoppedEvent) GetEventType() string

type CallSessionEndedEvent ΒΆ

type CallSessionEndedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	// Call session ID
	SessionID string `json:"session_id"`

	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 (*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 (*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 (*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"`

	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 (*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"`

	Ingress *IngressSettings `json:"ingress,omitempty"`

	Limits *LimitsSettings `json:"limits,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"`

	FrameRecording *FrameRecordingSettingsRequest `json:"frame_recording,omitempty"`

	Geofencing *GeofenceSettingsRequest `json:"geofencing,omitempty"`

	Ingress *IngressSettingsRequest `json:"ingress,omitempty"`

	Limits *LimitsSettingsRequest `json:"limits,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"`

	Broadcasting BroadcastSettingsResponse `json:"broadcasting"`

	FrameRecording FrameRecordingSettingsResponse `json:"frame_recording"`

	Geofencing GeofenceSettingsResponse `json:"geofencing"`

	Limits LimitsSettingsResponse `json:"limits"`

	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"`

	Call CallResponse `json:"call"`
}

CallStateResponseFields is the payload for call state response

type CallStatsLocation ΒΆ added in v3.4.0

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 ΒΆ added in v3.7.0

type CallStatsMapLocation struct {
	Count int `json:"count"`

	LiveCount int `json:"live_count"`

	Location *CallStatsLocation `json:"location,omitempty"`
}

type CallStatsMapPublisher ΒΆ added in v3.7.0

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 ΒΆ added in v3.7.0

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

type CallStatsMapSFUs ΒΆ added in v3.7.0

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

type CallStatsMapSubscriber ΒΆ added in v3.7.0

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 ΒΆ added in v3.7.0

type CallStatsMapSubscribers struct {
	Locations []CallStatsMapLocation `json:"locations"`

	Participants []CallStatsMapSubscriber `json:"participants,omitempty"`
}

type CallStatsParticipant ΒΆ added in v3.2.0

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 ΒΆ added in v3.2.0

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"`
}

type CallStatsParticipantSession ΒΆ added in v3.2.0

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"`

	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"`

	// The type of event, "call.report_ready" in this case
	Type string `json:"type"`
}

This event is sent when the insights report is ready

func (*CallStatsReportReadyEvent) GetEventType ΒΆ

func (*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 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 (*CallTranscriptionFailedEvent) GetEventType() string

type CallTranscriptionReadyEvent ΒΆ

type CallTranscriptionReadyEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	EgressID string `json:"egress_id"`

	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 (*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 (*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 (*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 NotificationSettings `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 CallUpdatedEvent ΒΆ

type CallUpdatedEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	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 (*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 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 (*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 (*CallUserMutedEvent) GetEventType() string

type CallsPerDayReport ΒΆ

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

type CallsPerDayReportResponse ΒΆ

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

type CampaignChannelMember ΒΆ added in v3.4.0

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"`

	Custom map[string]any `json:"custom"`

	ID *string `json:"id,omitempty"`

	Team *string `json:"team,omitempty"`

	Members []string `json:"members,omitempty"`

	MembersTemplate []CampaignChannelMember `json:"members_template,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 (*CampaignCompletedEvent) GetEventType() string

type CampaignMessageTemplate ΒΆ

type CampaignMessageTemplate struct {
	PollID string `json:"poll_id"`

	Searchable bool `json:"searchable"`

	Text string `json:"text"`

	Attachments []Attachment `json:"attachments"`

	Custom map[string]any `json:"custom"`
}

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"`

	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 (*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 CastPollVoteRequest ΒΆ

type CastPollVoteRequest struct {
	UserID *string      `json:"user_id"`
	User   *UserRequest `json:"user"`
	Vote   *VoteData    `json:"vote"`
}

type Channel ΒΆ

type Channel struct {
	AutoTranslationLanguage string `json:"auto_translation_language"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Disabled bool `json:"disabled"`

	Frozen bool `json:"frozen"`

	ID string `json:"id"`

	UpdatedAt Timestamp `json:"updated_at"`

	Type string `json:"type"`

	Custom map[string]any `json:"custom"`

	AutoTranslationEnabled *bool `json:"auto_translation_enabled,omitempty"`

	Cooldown *int `json:"cooldown,omitempty"`

	DeletedAt *Timestamp `json:"deleted_at,omitempty"`

	LastCampaigns *string `json:"last_campaigns,omitempty"`

	LastMessageAt *Timestamp `json:"last_message_at,omitempty"`

	MemberCount *int `json:"member_count,omitempty"`

	MessageCount *int `json:"message_count,omitempty"`

	MessageCountUpdatedAt *Timestamp `json:"message_count_updated_at,omitempty"`

	Team *string `json:"team,omitempty"`

	ActiveLiveLocations []SharedLocation `json:"active_live_locations,omitempty"`

	FilterTags []string `json:"filter_tags,omitempty"`

	Invites []ChannelMember `json:"invites,omitempty"`

	Members []ChannelMember `json:"members,omitempty"`

	Config *ChannelConfig `json:"config,omitempty"`

	ConfigOverrides *ConfigOverrides `json:"config_overrides,omitempty"`

	CreatedBy *User `json:"created_by,omitempty"`

	MembersLookup map[string]*ChannelMemberLookup `json:"members_lookup,omitempty"`

	TruncatedBy *User `json:"truncated_by,omitempty"`
}

type ChannelBatchUpdatedCompletedEvent ΒΆ added in v3.7.0

type ChannelBatchUpdatedCompletedEvent 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 (*ChannelBatchUpdatedCompletedEvent) GetEventType ΒΆ added in v3.7.0

func (*ChannelBatchUpdatedCompletedEvent) GetEventType() string

type ChannelBatchUpdatedStartedEvent ΒΆ added in v3.7.0

type ChannelBatchUpdatedStartedEvent 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 (*ChannelBatchUpdatedStartedEvent) GetEventType ΒΆ added in v3.7.0

func (*ChannelBatchUpdatedStartedEvent) GetEventType() string

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"`

	AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`

	Blocklists []BlockListOptions `json:"blocklists,omitempty"`

	AutomodThresholds *Thresholds `json:"automod_thresholds,omitempty"`
}

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"`

	AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`

	Blocklists []BlockListOptions `json:"blocklists,omitempty"`

	AutomodThresholds *Thresholds `json:"automod_thresholds,omitempty"`

	Grants map[string][]string `json:"grants,omitempty"`
}

type ChannelCreatedEvent ΒΆ

type ChannelCreatedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`
}

func (*ChannelCreatedEvent) GetEventType ΒΆ

func (*ChannelCreatedEvent) GetEventType() string

type ChannelDeletedEvent ΒΆ

type ChannelDeletedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelMemberCount int `json:"channel_member_count"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	Channel *ChannelResponse `json:"channel,omitempty"`
}

func (*ChannelDeletedEvent) GetEventType ΒΆ

func (*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 {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`
}

func (*ChannelFrozenEvent) GetEventType ΒΆ

func (*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"`

	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 {
	ChannelID string `json:"channel_id"`

	ChannelMemberCount int `json:"channel_member_count"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	ClearHistory bool `json:"clear_history"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*ChannelHiddenEvent) GetEventType ΒΆ

func (*ChannelHiddenEvent) GetEventType() string

type ChannelInput ΒΆ

type ChannelInput struct {
	// Enable or disable auto translation
	AutoTranslationEnabled *bool `json:"auto_translation_enabled,omitempty"`

	// Switch auto translation language
	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"`

	ConfigOverrides *ChannelConfig `json:"config_overrides,omitempty"`

	CreatedBy *UserRequest `json:"created_by,omitempty"`

	Custom map[string]any `json:"custom,omitempty"`
}

type ChannelInputRequest ΒΆ added in v3.6.0

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 []ChannelMember `json:"invites,omitempty"`

	Members []ChannelMember `json:"members,omitempty"`

	ConfigOverrides *ConfigOverrides `json:"config_overrides,omitempty"`

	CreatedBy *User `json:"created_by,omitempty"`

	Custom map[string]any `json:"custom,omitempty"`
}

type ChannelMember ΒΆ

type ChannelMember struct {
	ArchivedAt *Timestamp `json:"archived_at,omitempty"`

	BanExpires *Timestamp `json:"ban_expires,omitempty"`

	Banned *bool `json:"banned,omitempty"`

	Blocked *bool `json:"blocked,omitempty"`

	ChannelRole *string `json:"channel_role,omitempty"`

	CreatedAt *Timestamp `json:"created_at,omitempty"`

	DeletedAt *Timestamp `json:"deleted_at,omitempty"`

	Hidden *bool `json:"hidden,omitempty"`

	InviteAcceptedAt *Timestamp `json:"invite_accepted_at,omitempty"`

	InviteRejectedAt *Timestamp `json:"invite_rejected_at,omitempty"`

	Invited *bool `json:"invited,omitempty"`

	IsGlobalBanned *bool `json:"is_global_banned,omitempty"`

	IsModerator *bool `json:"is_moderator,omitempty"`

	NotificationsMuted *bool `json:"notifications_muted,omitempty"`

	PinnedAt *Timestamp `json:"pinned_at,omitempty"`

	ShadowBanned *bool `json:"shadow_banned,omitempty"`

	Status *string `json:"status,omitempty"`

	UpdatedAt *Timestamp `json:"updated_at,omitempty"`

	UserID *string `json:"user_id,omitempty"`

	DeletedMessages []string `json:"deleted_messages,omitempty"`

	Channel *DenormalizedChannelFields `json:"channel,omitempty"`

	Custom map[string]any `json:"custom,omitempty"`

	User *User `json:"user,omitempty"`
}

type ChannelMemberLookup ΒΆ added in v3.1.2

type ChannelMemberLookup struct {
	Archived bool `json:"archived"`

	Banned bool `json:"banned"`

	Blocked bool `json:"blocked"`

	Hidden bool `json:"hidden"`

	Pinned bool `json:"pinned"`

	ArchivedAt *Timestamp `json:"archived_at,omitempty"`

	BanExpires *Timestamp `json:"ban_expires,omitempty"`

	PinnedAt *Timestamp `json:"pinned_at,omitempty"`
}

type ChannelMemberRequest ΒΆ added in v3.4.0

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 *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"`

	DeletedAt *Timestamp `json:"deleted_at,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)
	Role *string `json:"role,omitempty"`

	Status *string `json:"status,omitempty"`

	UserID *string `json:"user_id,omitempty"`

	DeletedMessages []string `json:"deleted_messages,omitempty"`

	User *UserResponse `json:"user,omitempty"`
}

type ChannelMessages ΒΆ

type ChannelMessages struct {
	Messages []Message `json:"messages"`

	Channel *ChannelResponse `json:"channel,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"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	User *UserResponse `json:"user,omitempty"`
}

type ChannelMutedEvent ΒΆ

type ChannelMutedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`
}

func (*ChannelMutedEvent) GetEventType ΒΆ

func (*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"
	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"
	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 ChannelPushPreferences ΒΆ

type ChannelPushPreferences struct {
	ChatLevel *string `json:"chat_level,omitempty"`

	DisabledUntil *Timestamp `json:"disabled_until,omitempty"`
}

type ChannelPushPreferencesResponse ΒΆ added in v3.6.0

type ChannelPushPreferencesResponse struct {
	ChatLevel *string `json:"chat_level,omitempty"`

	DisabledUntil *Timestamp `json:"disabled_until,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 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"`

	CreatedBy *UserResponse `json:"created_by,omitempty"`

	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"`

	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"`

	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 {
	ChannelID string `json:"channel_id"`

	ChannelMemberCount int `json:"channel_member_count"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Channel *ChannelResponse `json:"channel,omitempty"`
}

func (*ChannelTruncatedEvent) GetEventType ΒΆ

func (*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"`

	AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`

	Blocklists []BlockListOptions `json:"blocklists,omitempty"`

	AutomodThresholds *Thresholds `json:"automod_thresholds,omitempty"`
}

type ChannelUnFrozenEvent ΒΆ

type ChannelUnFrozenEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`
}

func (*ChannelUnFrozenEvent) GetEventType ΒΆ

func (*ChannelUnFrozenEvent) GetEventType() string

type ChannelUnmutedEvent ΒΆ

type ChannelUnmutedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`
}

func (*ChannelUnmutedEvent) GetEventType ΒΆ

func (*ChannelUnmutedEvent) GetEventType() string

type ChannelUpdatedEvent ΒΆ

type ChannelUpdatedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelMemberCount int `json:"channel_member_count"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	Message *Message `json:"message,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*ChannelUpdatedEvent) GetEventType ΒΆ

func (*ChannelUpdatedEvent) GetEventType() string

type ChannelVisibleEvent ΒΆ

type ChannelVisibleEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	User *User `json:"user,omitempty"`
}

func (*ChannelVisibleEvent) GetEventType ΒΆ

func (*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 ΒΆ added in v3.2.0

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

func (*Channels) DeleteChannelImage ΒΆ added in v3.2.0

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) 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 ΒΆ added in v3.2.0

func (*Channels) UploadChannelImage ΒΆ added in v3.2.0

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) 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) CommitMessage ΒΆ

func (c *ChatClient) CommitMessage(ctx context.Context, id string, request *CommitMessageRequest) (*StreamResponse[MessageResponse], error)

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

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

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) DeleteChannel ΒΆ

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

Deletes channel

Sends events: - channel.deleted - channel.deleted

func (*ChatClient) DeleteChannelFile ΒΆ added in v3.2.0

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

Deletes previously uploaded file

func (*ChatClient) DeleteChannelImage ΒΆ added in v3.2.0

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 - 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 - 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) 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 ΒΆ added in v3.1.2

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

Sends events: - message.updated - message.updated

func (*ChatClient) ExportChannels ΒΆ

Exports channel data to JSON file

func (*ChatClient) GetCampaign ΒΆ

Get campaign by 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 - channel.created - 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 - channel.created - 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) 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) 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 - 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 - message.read

func (*ChatClient) MarkDelivered ΒΆ added in v3.6.0

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 - 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 - 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) 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) QueryThreads ΒΆ

Returns the list of threads for specific user

func (*ChatClient) RunMessageAction ΒΆ

func (c *ChatClient) RunMessageAction(ctx context.Context, id string, request *RunMessageActionRequest) (*StreamResponse[MessageResponse], error)

Executes message command action with given parameters

Sends events: - message.new - message.new

func (*ChatClient) ScheduleCampaign ΒΆ

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

Stops a campaign

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: - message.new - message.updated - 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) 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 - channel.visible

func (*ChatClient) StartCampaign ΒΆ

Starts or schedules a campaign

func (*ChatClient) TranslateMessage ΒΆ

func (c *ChatClient) TranslateMessage(ctx context.Context, id string, request *TranslateMessageRequest) (*StreamResponse[MessageResponse], error)

Translates message to a given language using automated translation software

Sends events: - message.updated - 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 - channel.truncated

func (*ChatClient) UndeleteMessage ΒΆ

Undelete a message that was previously soft-deleted

Sends events: - message.undeleted - 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 - 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) 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 - channel.updated - message.new

func (*ChatClient) UpdateChannelPartial ΒΆ

Updates certain fields of the channel

Sends events: - channel.updated - 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 - message.updated

func (*ChatClient) UpdateMessagePartial ΒΆ

Updates certain fields of the message

Sends events: - message.updated - 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) 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 - thread.updated

func (*ChatClient) UploadChannelFile ΒΆ added in v3.2.0

Uploads file

func (*ChatClient) UploadChannelImage ΒΆ added in v3.2.0

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

Uploads image

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 {
	ApnTemplate          *string      `json:"apn_template"`
	EventType            *string      `json:"event_type"`
	FirebaseDataTemplate *string      `json:"firebase_data_template"`
	FirebaseTemplate     *string      `json:"firebase_template"`
	MessageID            *string      `json:"message_id"`
	PushProviderName     *string      `json:"push_provider_name"`
	PushProviderType     *string      `json:"push_provider_type"`
	SkipDevices          *bool        `json:"skip_devices"`
	UserID               *string      `json:"user_id"`
	User                 *UserRequest `json:"user"`
}

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 {
	EntityCreatorID   string             `json:"entity_creator_id"`
	EntityID          string             `json:"entity_id"`
	EntityType        string             `json:"entity_type"`
	ConfigKey         *string            `json:"config_key"`
	ConfigTeam        *string            `json:"config_team"`
	TestMode          *bool              `json:"test_mode"`
	UserID            *string            `json:"user_id"`
	Config            *ModerationConfig  `json:"config"`
	ModerationPayload *ModerationPayload `json:"moderation_payload"`
	Options           map[string]any     `json:"options"`
	User              *UserRequest       `json:"user"`
}

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"`

	Item *ReviewQueueItemResponse `json:"item,omitempty"`
}

type CheckSNSRequest ΒΆ

type CheckSNSRequest struct {
	SnsKey      *string `json:"sns_key"`
	SnsSecret   *string `json:"sns_secret"`
	SnsTopicArn *string `json:"sns_topic_arn"`
}

type CheckSNSResponse ΒΆ

type CheckSNSResponse struct {
	Duration string `json:"duration"`

	// Validation result
	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 {
	SqsKey    *string `json:"sqs_key"`
	SqsSecret *string `json:"sqs_secret"`
	SqsUrl    *string `json:"sqs_url"`
}

type CheckSQSResponse ΒΆ

type CheckSQSResponse struct {
	Duration string `json:"duration"`

	// Validation result
	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 Client ΒΆ

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

func (*Client) ApiKey ΒΆ

func (c *Client) ApiKey() string

func (*Client) BaseUrl ΒΆ

func (c *Client) BaseUrl() string

func (*Client) BlockUsers ΒΆ

Block users

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) 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) 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) 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) 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) 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) 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 ΒΆ added in v3.1.2

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) GetUserLiveLocations ΒΆ

Retrieves all active live locations for a user

func (*Client) HttpClient ΒΆ

func (c *Client) HttpClient() HttpClient

func (*Client) ListBlockLists ΒΆ

Returns all available block lists

func (*Client) ListDevices ΒΆ

Returns all available devices

func (*Client) ListExternalStorage ΒΆ

Lists external storage

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) Logger ΒΆ

func (c *Client) Logger() Logger

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 - user.reactivated

func (*Client) RestoreUsers ΒΆ

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

Restore soft deleted users

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 ΒΆ added in v3.1.2

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) 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 - user.presence.changed

func (*Client) UploadFile ΒΆ

Uploads file

func (*Client) UploadImage ΒΆ

Uploads image

func (*Client) UpsertPushProvider ΒΆ

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

func (*Client) UpsertPushTemplate ΒΆ added in v3.1.2

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

func (*Client) VerifyWebhook ΒΆ

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

VerifyWebhook validates if hmac signature is correct for message body.

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 WithHTTPClient ΒΆ

func WithHTTPClient(httpClient HttpClient) ClientOption

func WithLogger ΒΆ

func WithLogger(logger Logger) ClientOption

WithLogger sets a custom logger for the client.

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"`

	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 (*ClosedCaptionEvent) GetEventType() string

type CollectUserFeedbackRequest ΒΆ

type CollectUserFeedbackRequest struct {
	Rating        int            `json:"rating"`
	Sdk           string         `json:"sdk"`
	SdkVersion    string         `json:"sdk_version"`
	Reason        *string        `json:"reason"`
	UserSessionID *string        `json:"user_session_id"`
	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 ΒΆ added in v3.5.0

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 ΒΆ added in v3.5.0

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 (*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 (*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 (*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 (*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 (*CommentReactionUpdatedEvent) GetEventType() string

type CommentResponse ΒΆ

type CommentResponse struct {
	// 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 (e.g., active, deleted)
	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 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"`

	// ID of parent comment for nested replies
	ParentID *string `json:"parent_id,omitempty"`

	// Text content of the comment
	Text *string `json:"text,omitempty"`

	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"`

	Moderation *ModerationV2Response `json:"moderation,omitempty"`

	// Grouped reactions by type
	ReactionGroups map[string]*ReactionGroupResponse `json:"reaction_groups,omitempty"`
}

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 (*CommentUpdatedEvent) GetEventType() string

type CommitMessageRequest ΒΆ

type CommitMessageRequest struct {
}

type ConfigOverrides ΒΆ

type ConfigOverrides struct {
	Blocklist *string `json:"blocklist,omitempty"`

	BlocklistBehavior *string `json:"blocklist_behavior,omitempty"`

	CountMessages *bool `json:"count_messages,omitempty"`

	MaxMessageLength *int `json:"max_message_length,omitempty"`

	Quotes *bool `json:"quotes,omitempty"`

	Reactions *bool `json:"reactions,omitempty"`

	Replies *bool `json:"replies,omitempty"`

	SharedLocations *bool `json:"shared_locations,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"`

	Commands []string `json:"commands,omitempty"`

	Grants map[string][]string `json:"grants,omitempty"`
}

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"`

	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"`

	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 Coordinates ΒΆ added in v3.7.0

type Coordinates struct {
	Latitude float64 `json:"latitude"`

	Longitude float64 `json:"longitude"`
}

type CountByMinuteResponse ΒΆ

type CountByMinuteResponse struct {
	Count int `json:"count"`

	StartTs Timestamp `json:"start_ts"`
}

type CreateBlockListRequest ΒΆ

type CreateBlockListRequest struct {
	Name                 string   `json:"name"`
	Words                []string `json:"words"`
	IsLeetCheckEnabled   *bool    `json:"is_leet_check_enabled"`
	IsPluralCheckEnabled *bool    `json:"is_plural_check_enabled"`
	Team                 *string  `json:"team"`
	Type                 *string  `json:"type"`
}

type CreateBlockListResponse ΒΆ

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

	Blocklist *BlockListResponse `json:"blocklist,omitempty"`
}

Basic response information

type CreateCallTypeRequest ΒΆ

type CreateCallTypeRequest struct {
	Name                 string                `json:"name"`
	ExternalStorage      *string               `json:"external_storage"`
	Grants               map[string][]string   `json:"grants"`
	NotificationSettings *NotificationSettings `json:"notification_settings"`
	Settings             *CallSettingsRequest  `json:"settings"`
}

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 NotificationSettings `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 CreateChannelTypeRequest ΒΆ

type CreateChannelTypeRequest struct {
	Automod                        string              `json:"automod"`
	AutomodBehavior                string              `json:"automod_behavior"`
	MaxMessageLength               int                 `json:"max_message_length"`
	Name                           string              `json:"name"`
	Blocklist                      *string             `json:"blocklist"`
	BlocklistBehavior              *string             `json:"blocklist_behavior"`
	ConnectEvents                  *bool               `json:"connect_events"`
	CountMessages                  *bool               `json:"count_messages"`
	CustomEvents                   *bool               `json:"custom_events"`
	DeliveryEvents                 *bool               `json:"delivery_events"`
	MarkMessagesPending            *bool               `json:"mark_messages_pending"`
	MessageRetention               *string             `json:"message_retention"`
	Mutes                          *bool               `json:"mutes"`
	PartitionSize                  *int                `json:"partition_size"`
	PartitionTtl                   *string             `json:"partition_ttl"`
	Polls                          *bool               `json:"polls"`
	PushNotifications              *bool               `json:"push_notifications"`
	Reactions                      *bool               `json:"reactions"`
	ReadEvents                     *bool               `json:"read_events"`
	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"`
	Uploads                        *bool               `json:"uploads"`
	UrlEnrichment                  *bool               `json:"url_enrichment"`
	UserMessageReminders           *bool               `json:"user_message_reminders"`
	Blocklists                     []BlockListOptions  `json:"blocklists"`
	Commands                       []string            `json:"commands"`
	Permissions                    []PolicyRequest     `json:"permissions"`
	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"`

	AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`

	Blocklists []BlockListOptions `json:"blocklists,omitempty"`

	AutomodThresholds *Thresholds `json:"automod_thresholds,omitempty"`
}

type CreateCollectionsRequest ΒΆ added in v3.5.0

type CreateCollectionsRequest struct {
	Collections []CollectionRequest `json:"collections"`
	UserID      *string             `json:"user_id"`
	User        *UserRequest        `json:"user"`
}

type CreateCollectionsResponse ΒΆ added in v3.5.0

type CreateCollectionsResponse struct {
	Duration string `json:"duration"`

	// List of created collections
	Collections []CollectionResponse `json:"collections"`
}

type CreateCommandRequest ΒΆ

type CreateCommandRequest struct {
	Description string  `json:"description"`
	Name        string  `json:"name"`
	Args        *string `json:"args"`
	Set         *string `json:"set"`
}

type CreateCommandResponse ΒΆ

type CreateCommandResponse struct {
	Duration string `json:"duration"`

	Command *Command `json:"command,omitempty"`
}

type CreateDeviceRequest ΒΆ

type CreateDeviceRequest struct {
	ID               string       `json:"id"`
	PushProvider     string       `json:"push_provider"`
	PushProviderName *string      `json:"push_provider_name"`
	UserID           *string      `json:"user_id"`
	VoipToken        *bool        `json:"voip_token"`
	User             *UserRequest `json:"user"`
}

type CreateExternalStorageRequest ΒΆ

type CreateExternalStorageRequest struct {
	Bucket         string        `json:"bucket"`
	Name           string        `json:"name"`
	StorageType    string        `json:"storage_type"`
	GcsCredentials *string       `json:"gcs_credentials"`
	Path           *string       `json:"path"`
	AWSS3          *S3Request    `json:"aws_s3"`
	AzureBlob      *AzureRequest `json:"azure_blob"`
}

type CreateExternalStorageResponse ΒΆ

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

Basic response information

type CreateFeedGroupRequest ΒΆ

type CreateFeedGroupRequest struct {
	ID                 string                    `json:"id"`
	DefaultVisibility  *string                   `json:"default_visibility"`
	ActivityProcessors []ActivityProcessorConfig `json:"activity_processors"`
	ActivitySelectors  []ActivitySelectorConfig  `json:"activity_selectors"`
	Aggregation        *AggregationConfig        `json:"aggregation"`
	Custom             map[string]any            `json:"custom"`
	Notification       *NotificationConfig       `json:"notification"`
	PushNotification   *PushNotificationConfig   `json:"push_notification"`
	Ranking            *RankingConfig            `json:"ranking"`
	Stories            *StoriesConfig            `json:"stories"`
}

type CreateFeedGroupResponse ΒΆ

type CreateFeedGroupResponse struct {
	Duration string `json:"duration"`

	FeedGroup FeedGroupResponse `json:"feed_group"`
}

type CreateFeedViewRequest ΒΆ

type CreateFeedViewRequest struct {
	ID                string                   `json:"id"`
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	Aggregation       *AggregationConfig       `json:"aggregation"`
	Ranking           *RankingConfig           `json:"ranking"`
}

type CreateFeedViewResponse ΒΆ

type CreateFeedViewResponse struct {
	Duration string `json:"duration"`

	FeedView FeedViewResponse `json:"feed_view"`
}

type CreateFeedsBatchRequest ΒΆ

type CreateFeedsBatchRequest struct {
	Feeds []FeedRequest `json:"feeds"`
}

type CreateFeedsBatchResponse ΒΆ

type CreateFeedsBatchResponse struct {
	Duration string `json:"duration"`

	// List of created feeds
	Feeds []FeedResponse `json:"feeds"`
}

type CreateGuestRequest ΒΆ

type CreateGuestRequest struct {
	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 UserResponse `json:"user"`
}

type CreateImportRequest ΒΆ

type CreateImportRequest struct {
	Mode string `json:"mode"`
	Path string `json:"path"`
}

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"`
}

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 CreateMembershipLevelRequest ΒΆ added in v3.1.0

type CreateMembershipLevelRequest struct {
	ID          string         `json:"id"`
	Name        string         `json:"name"`
	Description *string        `json:"description"`
	Priority    *int           `json:"priority"`
	Tags        []string       `json:"tags"`
	Custom      map[string]any `json:"custom"`
}

type CreateMembershipLevelResponse ΒΆ added in v3.1.0

type CreateMembershipLevelResponse struct {
	Duration string `json:"duration"`

	MembershipLevel MembershipLevelResponse `json:"membership_level"`
}

type CreatePollOptionRequest ΒΆ

type CreatePollOptionRequest struct {
	Text   string         `json:"text"`
	UserID *string        `json:"user_id"`
	Custom map[string]any `json:"Custom"`
	User   *UserRequest   `json:"user"`
}

type CreatePollRequest ΒΆ

type CreatePollRequest struct {
	Name                      string            `json:"name"`
	AllowAnswers              *bool             `json:"allow_answers"`
	AllowUserSuggestedOptions *bool             `json:"allow_user_suggested_options"`
	Description               *string           `json:"description"`
	EnforceUniqueVote         *bool             `json:"enforce_unique_vote"`
	ID                        *string           `json:"id"`
	IsClosed                  *bool             `json:"is_closed"`
	MaxVotesAllowed           *int              `json:"max_votes_allowed"`
	UserID                    *string           `json:"user_id"`
	VotingVisibility          *string           `json:"voting_visibility"`
	Options                   []PollOptionInput `json:"options"`
	Custom                    map[string]any    `json:"Custom"`
	User                      *UserRequest      `json:"user"`
}

type CreateReminderRequest ΒΆ

type CreateReminderRequest struct {
	RemindAt *Timestamp   `json:"remind_at"`
	UserID   *string      `json:"user_id"`
	User     *UserRequest `json:"user"`
}

type CreateRoleRequest ΒΆ

type CreateRoleRequest struct {
	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 ΒΆ added in v3.4.0

type CreateSIPInboundRoutingRuleRequest struct {
	Name                 string                                  `json:"name"`
	TrunkIds             []string                                `json:"trunk_ids"`
	CallerConfigs        SIPCallerConfigsRequest                 `json:"caller_configs"`
	CalledNumbers        []string                                `json:"called_numbers"`
	CallerNumbers        []string                                `json:"caller_numbers"`
	CallConfigs          *SIPCallConfigsRequest                  `json:"call_configs"`
	DirectRoutingConfigs *SIPDirectRoutingRuleCallConfigsRequest `json:"direct_routing_configs"`
	PinProtectionConfigs *SIPPinProtectionConfigsRequest         `json:"pin_protection_configs"`
	PinRoutingConfigs    *SIPInboundRoutingRulePinConfigsRequest `json:"pin_routing_configs"`
}

type CreateSIPTrunkRequest ΒΆ added in v3.4.0

type CreateSIPTrunkRequest struct {
	Name    string   `json:"name"`
	Numbers []string `json:"numbers"`
}

type CreateSIPTrunkResponse ΒΆ added in v3.4.0

type CreateSIPTrunkResponse struct {
	Duration string `json:"duration"`

	SipTrunk *SIPTrunkResponse `json:"sip_trunk,omitempty"`
}

Response containing the created SIP trunk

type CustomActionRequest ΒΆ

type CustomActionRequest struct {
	ID *string `json:"id,omitempty"`

	Options map[string]any `json:"options,omitempty"`
}

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 {
	EntityID          string             `json:"entity_id"`
	EntityType        string             `json:"entity_type"`
	Flags             []CustomCheckFlag  `json:"flags"`
	EntityCreatorID   *string            `json:"entity_creator_id"`
	UserID            *string            `json:"user_id"`
	ModerationPayload *ModerationPayload `json:"moderation_payload"`
	User              *UserRequest       `json:"user"`
}

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 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 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 (*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 DailyMetricResponse ΒΆ added in v3.4.0

type DailyMetricResponse struct {
	// Date in YYYY-MM-DD format
	Date string `json:"date"`

	// Metric value for this date
	Value int `json:"value"`
}

type DailyMetricStatsResponse ΒΆ added in v3.4.0

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 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 {
	CreatedByID         *string `json:"created_by_id"`
	MarkMessagesDeleted *bool   `json:"mark_messages_deleted"`
}

type DeactivateUserResponse ΒΆ

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

	User *UserResponse `json:"user,omitempty"`
}

type DeactivateUsersRequest ΒΆ

type DeactivateUsersRequest struct {
	UserIds             []string `json:"user_ids"`
	CreatedByID         *string  `json:"created_by_id"`
	MarkChannelsDeleted *bool    `json:"mark_channels_deleted"`
	MarkMessagesDeleted *bool    `json:"mark_messages_deleted"`
}

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 DeleteActivitiesRequest ΒΆ

type DeleteActivitiesRequest struct {
	Ids        []string     `json:"ids"`
	HardDelete *bool        `json:"hard_delete"`
	UserID     *string      `json:"user_id"`
	User       *UserRequest `json:"user"`
}

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 {
	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"`
}

type DeleteActivityResponse ΒΆ

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

type DeleteBlockListRequest ΒΆ

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

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 {
	Hard *bool `json:"hard"`
}

type DeleteCallResponse ΒΆ

type DeleteCallResponse struct {
	Duration string `json:"duration"`

	Call CallResponse `json:"call"`

	TaskID *string `json:"task_id,omitempty"`
}

DeleteCallResponse is the payload for deleting a call.

type DeleteCallTypeRequest ΒΆ

type DeleteCallTypeRequest struct {
}

type DeleteChannelFileRequest ΒΆ added in v3.2.0

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

type DeleteChannelImageRequest ΒΆ added in v3.2.0

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"`

	Channel *ChannelResponse `json:"channel,omitempty"`
}

Basic response information

type DeleteChannelTypeRequest ΒΆ

type DeleteChannelTypeRequest struct {
}

type DeleteChannelsRequest ΒΆ

type DeleteChannelsRequest struct {
	Cids       []string `json:"cids"`
	HardDelete *bool    `json:"hard_delete"`
}

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 ΒΆ added in v3.5.0

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

type DeleteCollectionsResponse ΒΆ added in v3.5.0

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 DeleteCommentReactionRequest ΒΆ

type DeleteCommentReactionRequest struct {
	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"`
}

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"`
}

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"`
}

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 {
}

type DeleteFeedUserDataResponse ΒΆ

type DeleteFeedUserDataResponse struct {
	// Number of activities that were deleted
	DeletedActivities int `json:"deleted_activities"`

	// Number of bookmarks that were deleted
	DeletedBookmarks int `json:"deleted_bookmarks"`

	// Number of comments that were deleted
	DeletedComments int `json:"deleted_comments"`

	// Number of reactions that were deleted
	DeletedReactions int `json:"deleted_reactions"`

	Duration string `json:"duration"`
}

Response for deleting feed user data

type DeleteFeedViewRequest ΒΆ

type DeleteFeedViewRequest struct {
}

type DeleteFeedViewResponse ΒΆ

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

type DeleteFileRequest ΒΆ

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

type DeleteImageRequest ΒΆ

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

type DeleteMembershipLevelRequest ΒΆ added in v3.1.0

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 DeleteMessageResponse ΒΆ

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

	Message MessageResponse `json:"message"`
}

Basic response information

type DeleteModerationConfigResponse ΒΆ

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

type DeleteModerationRuleRequest ΒΆ added in v3.1.1

type DeleteModerationRuleRequest struct {
}

type DeleteModerationRuleResponse ΒΆ added in v3.1.1

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 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 DeleteReactionRequest ΒΆ

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

type DeleteReactionResponse ΒΆ

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

	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 DeleteRoleRequest ΒΆ

type DeleteRoleRequest struct {
}

type DeleteSIPInboundRoutingRuleRequest ΒΆ added in v3.4.0

type DeleteSIPInboundRoutingRuleRequest struct {
}

type DeleteSIPInboundRoutingRuleResponse ΒΆ added in v3.4.0

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

Response confirming SIP Inbound Routing Rule deletion

type DeleteSIPTrunkRequest ΒΆ added in v3.4.0

type DeleteSIPTrunkRequest struct {
}

type DeleteSIPTrunkResponse ΒΆ added in v3.4.0

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

Response confirming SIP trunk deletion

type DeleteSegmentRequest ΒΆ

type DeleteSegmentRequest struct {
}

type DeleteSegmentTargetsRequest ΒΆ

type DeleteSegmentTargetsRequest struct {
	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 DeleteUserRequest ΒΆ

type DeleteUserRequest struct {
	DeleteConversationChannels *bool `json:"delete_conversation_channels,omitempty"`

	DeleteFeedsContent *bool `json:"delete_feeds_content,omitempty"`

	HardDelete *bool `json:"hard_delete,omitempty"`

	MarkMessagesDeleted *bool `json:"mark_messages_deleted,omitempty"`

	Reason *string `json:"reason,omitempty"`
}

type DeleteUsersRequest ΒΆ

type DeleteUsersRequest struct {
	UserIds           []string `json:"user_ids"`
	Calls             *string  `json:"calls"`
	Conversations     *string  `json:"conversations"`
	Files             *bool    `json:"files"`
	Messages          *string  `json:"messages"`
	NewCallOwnerID    *string  `json:"new_call_owner_id"`
	NewChannelOwnerID *string  `json:"new_channel_owner_id"`
	User              *string  `json:"user"`
}

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 ΒΆ added in v3.6.0

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

	ID *string `json:"id,omitempty"`
}

type DeliveryReceipts ΒΆ added in v3.3.0

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

type DeliveryReceiptsResponse ΒΆ added in v3.3.0

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

type DenormalizedChannelFields ΒΆ added in v3.4.0

type DenormalizedChannelFields struct {
	CreatedAt *string `json:"created_at,omitempty"`

	CreatedByID *string `json:"created_by_id,omitempty"`

	Disabled *bool `json:"disabled,omitempty"`

	Frozen *bool `json:"frozen,omitempty"`

	ID *string `json:"id,omitempty"`

	LastMessageAt *string `json:"last_message_at,omitempty"`

	MemberCount *int `json:"member_count,omitempty"`

	Team *string `json:"team,omitempty"`

	UpdatedAt *string `json:"updated_at,omitempty"`

	Type *string `json:"type,omitempty"`

	Custom map[string]any `json:"custom,omitempty"`
}

type Device ΒΆ

type Device struct {
	CreatedAt Timestamp `json:"created_at"`

	ID string `json:"id"`

	PushProvider string `json:"push_provider"`

	UserID string `json:"user_id"`

	Disabled *bool `json:"disabled,omitempty"`

	DisabledReason *string `json:"disabled_reason,omitempty"`

	PushProviderName *string `json:"push_provider_name,omitempty"`

	Voip *bool `json:"voip,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"`

	// 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 {
	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 DraftResponse ΒΆ

type DraftResponse struct {
	ChannelCid string `json:"channel_cid"`

	CreatedAt Timestamp `json:"created_at"`

	Message DraftPayloadResponse `json:"message"`

	ParentID *string `json:"parent_id,omitempty"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	ParentMessage *MessageResponse `json:"parent_message,omitempty"`

	QuotedMessage *MessageResponse `json:"quoted_message,omitempty"`
}

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"`

	FrameRecording *FrameRecordingResponse `json:"frame_recording,omitempty"`

	HLS *EgressHLSResponse `json:"hls,omitempty"`
}

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 ΒΆ added in v3.5.0

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
	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 ΒΆ added in v3.7.0

type EnrichmentOptions struct {
	SkipActivity *bool `json:"skip_activity,omitempty"`

	SkipActivityCollections *bool `json:"skip_activity_collections,omitempty"`

	SkipActivityComments *bool `json:"skip_activity_comments,omitempty"`

	SkipActivityCurrentFeed *bool `json:"skip_activity_current_feed,omitempty"`

	SkipActivityMentionedUsers *bool `json:"skip_activity_mentioned_users,omitempty"`

	SkipActivityOwnBookmarks *bool `json:"skip_activity_own_bookmarks,omitempty"`

	SkipActivityParents *bool `json:"skip_activity_parents,omitempty"`

	SkipActivityPoll *bool `json:"skip_activity_poll,omitempty"`

	SkipActivityReactions *bool `json:"skip_activity_reactions,omitempty"`

	SkipActivityRefreshImageUrls *bool `json:"skip_activity_refresh_image_urls,omitempty"`

	SkipAll *bool `json:"skip_all,omitempty"`

	SkipFeedMemberUser *bool `json:"skip_feed_member_user,omitempty"`

	SkipFollowers *bool `json:"skip_followers,omitempty"`

	SkipFollowing *bool `json:"skip_following,omitempty"`

	SkipOwnCapabilities *bool `json:"skip_own_capabilities,omitempty"`

	SkipOwnFollows *bool `json:"skip_own_follows,omitempty"`

	SkipPins *bool `json:"skip_pins,omitempty"`
}

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"`

	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 ΒΆ added in v3.1.2

type EphemeralMessageUpdateRequest struct {
	SkipEnrichUrl *bool          `json:"skip_enrich_url"`
	UserID        *string        `json:"user_id"`
	Unset         []string       `json:"unset"`
	Set           map[string]any `json:"set"`
	User          *UserRequest   `json:"user"`
}

type ErrorResult ΒΆ

type ErrorResult struct {
	Type string `json:"type"`

	Stacktrace *string `json:"stacktrace,omitempty"`

	Version *string `json:"version,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"`

	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"`
}

type EventNotificationSettings ΒΆ

type EventNotificationSettings struct {
	Enabled bool `json:"enabled"`

	APNS APNS `json:"apns"`

	Fcm FCM `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 *UserRequest `json:"user,omitempty"`
}

type EventResponse ΒΆ

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

	Event WSEvent `json:"event"`
}

Basic response information

type ExportChannelsRequest ΒΆ

type ExportChannelsRequest struct {
	Channels                   []ChannelExport `json:"channels"`
	ClearDeletedMessageText    *bool           `json:"clear_deleted_message_text"`
	ExportUsers                *bool           `json:"export_users"`
	IncludeSoftDeletedChannels *bool           `json:"include_soft_deleted_channels"`
	IncludeTruncatedMessages   *bool           `json:"include_truncated_messages"`
	Version                    *string         `json:"version"`
}

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 *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 FailedChannelUpdates ΒΆ added in v3.7.0

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 (*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 (*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"`

	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 (*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 (*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
	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"`

	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 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"`
}

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 (*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 (*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
	Status string `json:"status"`

	// When the membership was last updated
	UpdatedAt Timestamp `json:"updated_at"`

	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 (*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 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
	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"`
}

type FeedResponse ΒΆ

type FeedResponse struct {
	// 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"`

	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 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"`

	OwnMembership *FeedMemberResponse `json:"own_membership,omitempty"`
}

type FeedSuggestionResponse ΒΆ added in v3.4.0

type FeedSuggestionResponse struct {
	// 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"`

	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 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"`

	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 created.

func (*FeedUpdatedEvent) GetEventType ΒΆ

func (*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 ΒΆ added in v3.2.0

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 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 ΒΆ added in v3.1.0

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 ΒΆ added in v3.3.0

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) 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) 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) CreateCollections ΒΆ added in v3.5.0

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 ΒΆ added in v3.1.0

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 ΒΆ added in v3.5.0

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) 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 activities, reactions, comments, and bookmarks for a user

func (*FeedsClient) DeleteFeedView ΒΆ

Delete an existing custom feed view

func (*FeedsClient) DeleteMembershipLevel ΒΆ added in v3.1.0

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 ΒΆ added in v3.2.0

Gets feed visibility configuration and permissions

func (*FeedsClient) GetFeedsRateLimits ΒΆ added in v3.4.0

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 ΒΆ added in v3.1.0

Get an existing feed group or create a new one if it doesn't exist

func (*FeedsClient) GetOrCreateFeedView ΒΆ added in v3.1.0

Get an existing feed view or create a new one if it doesn't exist

func (*FeedsClient) GetOrCreateFollows ΒΆ added in v3.7.0

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) GetOrCreateUnfollows ΒΆ added in v3.7.0

Removes multiple follows and broadcasts FollowRemovedEvent for each. Does not return an error if follows don't exist.

func (*FeedsClient) ListFeedGroups ΒΆ

List all feed groups for the application

func (*FeedsClient) ListFeedViews ΒΆ

List all feed views for a feed group

func (*FeedsClient) ListFeedVisibilities ΒΆ added in v3.2.0

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) OwnCapabilitiesBatch ΒΆ added in v3.4.0

Retrieves capabilities for multiple feeds in a single request. Useful for batch processing when activities are added to feeds.

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) QueryBookmarkFolders ΒΆ

Query bookmark folders with filter query

func (*FeedsClient) QueryBookmarks ΒΆ

Query bookmarks 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 ΒΆ added in v3.1.0

Query feeds with filter query

func (*FeedsClient) QueryFeedsUsageStats ΒΆ added in v3.4.0

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 ΒΆ added in v3.1.0

Query membership levels with filter query

func (*FeedsClient) ReadCollections ΒΆ added in v3.5.0

Read collections with optional filtering by user ID and collection name. 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) 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) 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 ΒΆ added in v3.5.0

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) 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 ΒΆ added in v3.4.0

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 ΒΆ added in v3.1.0

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 ΒΆ added in v3.5.0

Insert new collections or update existing ones in a batch operation. Only the custom data field is updatable for existing collections.

type FeedsModerationTemplateConfig ΒΆ

type FeedsModerationTemplateConfig struct {
	ConfigKey string `json:"config_key"`

	DataTypes map[string]string `json:"data_types"`
}

type FeedsPreferences ΒΆ added in v3.1.2

type FeedsPreferences struct {
	// Push notification preference for comments on user's activities
	Comment *string `json:"comment,omitempty"`

	// Push notification preference for reactions on comments
	CommentReaction *string `json:"comment_reaction,omitempty"`

	// Push notification preference for replies to comments
	CommentReply *string `json:"comment_reply,omitempty"`

	// Push notification preference for new followers
	Follow *string `json:"follow,omitempty"`

	// Push notification preference for mentions in activities or comments
	Mention *string `json:"mention,omitempty"`

	// Push notification preference for reactions on user's activities or comments
	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 ΒΆ added in v3.6.0

type FeedsPreferencesResponse struct {
	Comment *string `json:"comment,omitempty"`

	CommentReaction *string `json:"comment_reaction,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 FeedsReactionResponse ΒΆ

type FeedsReactionResponse struct {
	// ID of the activity that was reacted to
	ActivityID string `json:"activity_id"`

	// When the reaction was created
	CreatedAt Timestamp `json:"created_at"`

	// When the reaction was last updated
	UpdatedAt Timestamp `json:"updated_at"`

	// Type of reaction
	Type string `json:"type"`

	User UserResponse `json:"user"`

	// ID of the comment that was reacted to
	CommentID *string `json:"comment_id,omitempty"`

	// Custom data for the reaction
	Custom map[string]any `json:"custom,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 ΒΆ added in v3.6.0

type FilterConfigResponse struct {
	LlmLabels []string `json:"llm_labels"`

	AiTextLabels []string `json:"ai_text_labels,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 Flag ΒΆ

type Flag struct {
	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`

	CreatedByAutomod bool `json:"created_by_automod"`

	// Date/time of the last update
	UpdatedAt Timestamp `json:"updated_at"`

	// Date of the approval
	ApprovedAt *Timestamp `json:"approved_at,omitempty"`

	Reason *string `json:"reason,omitempty"`

	// Date of the rejection
	RejectedAt *Timestamp `json:"rejected_at,omitempty"`

	// Date of the review
	ReviewedAt *Timestamp `json:"reviewed_at,omitempty"`

	ReviewedBy *string `json:"reviewed_by,omitempty"`

	// ID of flagged message
	TargetMessageID *string `json:"target_message_id,omitempty"`

	Custom map[string]any `json:"custom,omitempty"`

	Details *FlagDetails `json:"details,omitempty"`

	TargetMessage *Message `json:"target_message,omitempty"`

	TargetUser *User `json:"target_user,omitempty"`

	User *User `json:"user,omitempty"`
}

Contains information about flagged user or message

type FlagCountRuleParameters ΒΆ added in v3.7.0

type FlagCountRuleParameters struct {
	Threshold *int `json:"threshold,omitempty"`
}

type FlagDetails ΒΆ

type FlagDetails struct {
	OriginalText string `json:"original_text"`

	Extra map[string]any `json:"Extra"`

	Automod *AutomodDetails `json:"automod,omitempty"`
}

type FlagFeedback ΒΆ

type FlagFeedback struct {
	CreatedAt Timestamp `json:"created_at"`

	MessageID string `json:"message_id"`

	Labels []Label `json:"labels"`
}

type FlagMessageDetails ΒΆ

type FlagMessageDetails 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 {
	EntityID          string             `json:"entity_id"`
	EntityType        string             `json:"entity_type"`
	EntityCreatorID   *string            `json:"entity_creator_id"`
	Reason            *string            `json:"reason"`
	UserID            *string            `json:"user_id"`
	Custom            map[string]any     `json:"custom"`
	ModerationPayload *ModerationPayload `json:"moderation_payload"`
	User              *UserRequest       `json:"user"`
}

type FlagResponse ΒΆ

type FlagResponse struct {
	Duration string `json:"duration"`

	// Unique identifier of the created moderation item
	ItemID string `json:"item_id"`
}

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"`

	CreatedBy *UserResponse `json:"CreatedBy,omitempty"`

	Message *MessageResponse `json:"Message,omitempty"`

	User *UserResponse `json:"User,omitempty"`
}

func (*FlagUpdatedEvent) GetEventType ΒΆ

func (*FlagUpdatedEvent) GetEventType() string

type FlagUserOptions ΒΆ

type FlagUserOptions struct {
	Reason *string `json:"reason,omitempty"`
}

type FollowBatchRequest ΒΆ

type FollowBatchRequest struct {
	Follows []FollowRequest `json:"follows"`
}

type FollowBatchResponse ΒΆ

type FollowBatchResponse struct {
	Duration string `json:"duration"`

	// List of created 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 (*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 (*FollowDeletedEvent) GetEventType() string

type FollowPair ΒΆ

type FollowPair struct {
	// Fully qualified ID of the source feed
	Source string `json:"source"`

	// Fully qualified ID of the target feed
	Target string `json:"target"`
}

type FollowRequest ΒΆ

type FollowRequest struct {
	Source                     string         `json:"source"`
	Target                     string         `json:"target"`
	CreateNotificationActivity *bool          `json:"create_notification_activity"`
	PushPreference             *string        `json:"push_preference"`
	SkipPush                   *bool          `json:"skip_push"`
	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
	PushPreference string `json:"push_preference"`

	// Status of the follow relationship
	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 (*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 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"`

	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 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 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 {
}

type GetActivityResponse ΒΆ

type GetActivityResponse struct {
	Duration string `json:"duration"`

	Activity ActivityResponse `json:"activity"`
}

type GetAppRequest ΒΆ

type GetAppRequest struct {
}

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"`

	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 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"`

	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"`

	Call CallResponse `json:"call"`
}

type GetCallSessionParticipantStatsDetailsRequest ΒΆ added in v3.3.0

type GetCallSessionParticipantStatsDetailsRequest struct {
	Since     *string `json:"-" query:"since"`
	Until     *string `json:"-" query:"until"`
	MaxPoints *int    `json:"-" query:"max_points"`
}

type GetCallSessionParticipantStatsDetailsResponse ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

type GetCallSessionParticipantStatsTimelineRequest struct {
	StartTime *string  `json:"-" query:"start_time"`
	EndTime   *string  `json:"-" query:"end_time"`
	Severity  []string `json:"-" query:"severity"`
}

type GetCallStatsMapRequest ΒΆ added in v3.7.0

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 NotificationSettings `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 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"`

	AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`

	Blocklists []BlockListOptions `json:"blocklists,omitempty"`

	AutomodThresholds *Thresholds `json:"automod_thresholds,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"`
	Limit        *int    `json:"-" query:"limit"`
	Prev         *string `json:"-" query:"prev"`
	Next         *string `json:"-" query:"next"`
}

type GetCommentRepliesResponse ΒΆ

type GetCommentRepliesResponse struct {
	Duration string `json:"duration"`

	// 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 {
}

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"`
	Limit        *int    `json:"-" query:"limit"`
	Prev         *string `json:"-" query:"prev"`
	Next         *string `json:"-" query:"next"`
}

type GetCommentsResponse ΒΆ

type GetCommentsResponse struct {
	Duration string `json:"duration"`

	// 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 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 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 ΒΆ added in v3.2.0

type GetFeedVisibilityRequest struct {
}

type GetFeedVisibilityResponse ΒΆ added in v3.2.0

type GetFeedVisibilityResponse struct {
	Duration string `json:"duration"`

	FeedVisibility FeedVisibilityResponse `json:"feed_visibility"`
}

type GetFeedsRateLimitsRequest ΒΆ added in v3.4.0

type GetFeedsRateLimitsRequest struct {
	Endpoints  *string `json:"-" query:"endpoints"`
	Android    *bool   `json:"-" query:"android"`
	Ios        *bool   `json:"-" query:"ios"`
	Web        *bool   `json:"-" query:"web"`
	ServerSide *bool   `json:"-" query:"server_side"`
}

type GetFeedsRateLimitsResponse ΒΆ added in v3.4.0

type GetFeedsRateLimitsResponse struct {
	Duration string `json:"duration"`

	// Rate limits for Android platform (endpoint name -> limit info)
	Android map[string]LimitInfo `json:"android,omitempty"`

	// Rate limits for iOS platform (endpoint name -> limit info)
	Ios map[string]LimitInfo `json:"ios,omitempty"`

	// Rate limits for server-side platform (endpoint name -> limit info)
	ServerSide map[string]LimitInfo `json:"server_side,omitempty"`

	// Rate limits for Web platform (endpoint name -> limit info)
	Web map[string]LimitInfo `json:"web,omitempty"`
}

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 GetManyMessagesRequest ΒΆ

type GetManyMessagesRequest struct {
	Ids []string `json:"-" query:"ids"`
}

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"`

	Message MessageWithChannelResponse `json:"message"`

	PendingMessageMetadata map[string]string `json:"pending_message_metadata,omitempty"`
}

Basic response information

type GetModerationRuleRequest ΒΆ added in v3.1.1

type GetModerationRuleRequest struct {
}

type GetModerationRuleResponse ΒΆ added in v3.1.1

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"`
	Notify       *bool        `json:"notify"`
	Ring         *bool        `json:"ring"`
	Video        *bool        `json:"video"`
	Data         *CallRequest `json:"data"`
}

type GetOrCreateCallResponse ΒΆ

type GetOrCreateCallResponse struct {
	Created bool `json:"created"`

	Duration string `json:"duration"`

	Members []MemberResponse `json:"members"`

	OwnCapabilities []OwnCapability `json:"own_capabilities"`

	Call CallResponse `json:"call"`
}

type GetOrCreateChannelRequest ΒΆ

type GetOrCreateChannelRequest struct {
	HideForCreator     *bool                    `json:"hide_for_creator"`
	State              *bool                    `json:"state"`
	ThreadUnreadCounts *bool                    `json:"thread_unread_counts"`
	Data               *ChannelInput            `json:"data"`
	Members            *PaginationParams        `json:"members"`
	Messages           *MessagePaginationParams `json:"messages"`
	Watchers           *PaginationParams        `json:"watchers"`
}

type GetOrCreateDistinctChannelRequest ΒΆ

type GetOrCreateDistinctChannelRequest struct {
	HideForCreator     *bool                    `json:"hide_for_creator"`
	State              *bool                    `json:"state"`
	ThreadUnreadCounts *bool                    `json:"thread_unread_counts"`
	Data               *ChannelInput            `json:"data"`
	Members            *PaginationParams        `json:"members"`
	Messages           *MessagePaginationParams `json:"messages"`
	Watchers           *PaginationParams        `json:"watchers"`
}

type GetOrCreateFeedGroupRequest ΒΆ added in v3.1.0

type GetOrCreateFeedGroupRequest struct {
	DefaultVisibility  *string                   `json:"default_visibility"`
	ActivityProcessors []ActivityProcessorConfig `json:"activity_processors"`
	ActivitySelectors  []ActivitySelectorConfig  `json:"activity_selectors"`
	Aggregation        *AggregationConfig        `json:"aggregation"`
	Custom             map[string]any            `json:"custom"`
	Notification       *NotificationConfig       `json:"notification"`
	PushNotification   *PushNotificationConfig   `json:"push_notification"`
	Ranking            *RankingConfig            `json:"ranking"`
	Stories            *StoriesConfig            `json:"stories"`
}

type GetOrCreateFeedGroupResponse ΒΆ added in v3.1.0

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 {
	IDAround            *string            `json:"id_around"`
	Limit               *int               `json:"limit"`
	Next                *string            `json:"next"`
	Prev                *string            `json:"prev"`
	UserID              *string            `json:"user_id"`
	View                *string            `json:"view"`
	Watch               *bool              `json:"watch"`
	Data                *FeedInput         `json:"data"`
	EnrichmentOptions   *EnrichmentOptions `json:"enrichment_options"`
	ExternalRanking     map[string]any     `json:"external_ranking"`
	Filter              map[string]any     `json:"filter"`
	FollowersPagination *PagerRequest      `json:"followers_pagination"`
	FollowingPagination *PagerRequest      `json:"following_pagination"`
	InterestWeights     map[string]float64 `json:"interest_weights"`
	MemberPagination    *PagerRequest      `json:"member_pagination"`
	User                *UserRequest       `json:"user"`
}

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 ΒΆ added in v3.1.0

type GetOrCreateFeedViewRequest struct {
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	Aggregation       *AggregationConfig       `json:"aggregation"`
	Ranking           *RankingConfig           `json:"ranking"`
}

type GetOrCreateFeedViewResponse ΒΆ added in v3.1.0

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 GetOrCreateFollowsRequest ΒΆ added in v3.7.0

type GetOrCreateFollowsRequest struct {
	Follows []FollowRequest `json:"follows"`
}

type GetOrCreateUnfollowsRequest ΒΆ added in v3.7.0

type GetOrCreateUnfollowsRequest struct {
	Follows []FollowPair `json:"follows"`
}

type GetPermissionRequest ΒΆ

type GetPermissionRequest struct {
}

type GetPollOptionRequest ΒΆ

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

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 []PushTemplate `json:"templates"`
}

Basic response information

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"`
	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]LimitInfo `json:"android,omitempty"`

	// Map of endpoint rate limits for the iOS platform
	Ios map[string]LimitInfo `json:"ios,omitempty"`

	// Map of endpoint rate limits for the server-side platform
	ServerSide map[string]LimitInfo `json:"server_side,omitempty"`

	// Map of endpoint rate limits for the web platform
	Web map[string]LimitInfo `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"`
}

type GetRepliesResponse ΒΆ

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

	Messages []MessageResponse `json:"messages"`
}

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 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 GetUserLiveLocationsRequest ΒΆ

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

type GoLiveRequest ΒΆ

type GoLiveRequest struct {
	RecordingStorageName     *string `json:"recording_storage_name"`
	StartClosedCaption       *bool   `json:"start_closed_caption"`
	StartHLS                 *bool   `json:"start_hls"`
	StartRecording           *bool   `json:"start_recording"`
	StartTranscription       *bool   `json:"start_transcription"`
	TranscriptionStorageName *string `json:"transcription_storage_name"`
}

type GoLiveResponse ΒΆ

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

	Call CallResponse `json:"call"`
}

Basic response information

type GoogleVisionConfig ΒΆ

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

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 {
	QualityTracks []string `json:"quality_tracks"`

	AutoOn *bool `json:"auto_on,omitempty"`

	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 {
	ClearHistory *bool        `json:"clear_history"`
	UserID       *string      `json:"user_id"`
	User         *UserRequest `json:"user"`
}

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 ImageContentParameters ΒΆ

type ImageContentParameters struct {
	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 {
	Threshold *int `json:"threshold,omitempty"`

	TimeWindow *string `json:"time_window,omitempty"`

	HarmLabels []string `json:"harm_labels,omitempty"`
}

type ImageSize ΒΆ

type ImageSize struct {
	// Crop mode
	Crop *string `json:"crop,omitempty"`

	// Target image height
	Height *int `json:"height,omitempty"`

	// Resize method
	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 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 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 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 ΒΆ added in v3.3.0

type IngressSource struct {
	Fps int `json:"fps"`

	Height int `json:"height"`

	Width int `json:"width"`
}

type IngressSourceRequest ΒΆ added in v3.3.0

type IngressSourceRequest struct {
	Fps int `json:"fps"`

	Height int `json:"height"`

	Width int `json:"width"`
}

type IngressSourceResponse ΒΆ added in v3.3.0

type IngressSourceResponse struct {
	Fps int `json:"fps"`

	Height int `json:"height"`

	Width int `json:"width"`
}

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 JoinCallAPIMetrics ΒΆ

type JoinCallAPIMetrics struct {
	Failures float64 `json:"failures"`

	Total float64 `json:"total"`

	Latency *ActiveCallsLatencyStats `json:"latency,omitempty"`
}

type KickUserRequest ΒΆ added in v3.1.0

type KickUserRequest struct {
	UserID     string       `json:"user_id"`
	Block      *bool        `json:"block"`
	KickedByID *string      `json:"kicked_by_id"`
	KickedBy   *UserRequest `json:"kicked_by"`
}

type KickUserResponse ΒΆ added in v3.1.0

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 ΒΆ added in v3.1.0

type KickedUserEvent struct {
	CallCid string `json:"call_cid"`

	CreatedAt Timestamp `json:"created_at"`

	User UserResponse `json:"user"`

	// The type of event: "call.kicked_user" in this case
	Type string `json:"type"`

	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 ΒΆ added in v3.1.0

func (*KickedUserEvent) GetEventType() string

type LLMConfig ΒΆ added in v3.1.0

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 ΒΆ added in v3.1.0

type LLMRule struct {
	Description string `json:"description"`

	Label string `json:"label"`

	Action *string `json:"action,omitempty"`

	SeverityRules []BodyguardSeverityRule `json:"severity_rules,omitempty"`
}

type Label ΒΆ

type Label struct {
	Name string `json:"name"`

	HarmLabels []string `json:"harm_labels,omitempty"`

	PhraseListIds []int `json:"phrase_list_ids,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 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 LimitInfo ΒΆ

type LimitInfo struct {
	// The maximum number of calls allowed for the time window
	Limit int `json:"limit"`

	// The number of remaining calls in the current window
	Remaining int `json:"remaining"`

	// The Unix timestamp of the next window
	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"`
}

Basic response information

type ListBlockListsRequest ΒΆ

type ListBlockListsRequest struct {
	Team *string `json:"-" query:"team"`
}

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 ΒΆ added in v3.2.0

type ListFeedVisibilitiesRequest struct {
}

type ListFeedVisibilitiesResponse ΒΆ added in v3.2.0

type ListFeedVisibilitiesResponse struct {
	Duration string `json:"duration"`

	// Map of feed visibility configurations by name
	FeedVisibilities map[string]FeedVisibilityResponse `json:"feed_visibilities"`
}

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 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 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 ΒΆ added in v3.4.0

type ListSIPInboundRoutingRuleRequest struct {
}

type ListSIPInboundRoutingRuleResponse ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

type ListSIPTrunksRequest struct {
}

type ListSIPTrunksResponse ΒΆ added in v3.4.0

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 Location ΒΆ added in v3.7.0

type Location struct {
	ContinentCode string `json:"continent_code"`

	CountryIsoCode string `json:"country_iso_code"`

	SubdivisionIsoCode string `json:"subdivision_iso_code"`
}

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 {
	MarkAllRead *bool        `json:"mark_all_read"`
	MarkAllSeen *bool        `json:"mark_all_seen"`
	UserID      *string      `json:"user_id"`
	MarkRead    []string     `json:"mark_read"`
	MarkSeen    []string     `json:"mark_seen"`
	MarkWatched []string     `json:"mark_watched"`
	User        *UserRequest `json:"user"`
}

type MarkChannelsReadRequest ΒΆ

type MarkChannelsReadRequest struct {
	UserID        *string           `json:"user_id"`
	ReadByChannel map[string]string `json:"read_by_channel"`
	User          *UserRequest      `json:"user"`
}

type MarkDeliveredRequest ΒΆ added in v3.6.0

type MarkDeliveredRequest struct {
	UserID                  *string                   `json:"-" query:"user_id"`
	LatestDeliveredMessages []DeliveredMessagePayload `json:"latest_delivered_messages"`
}

type MarkDeliveredResponse ΒΆ added in v3.6.0

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

Basic response information

type MarkReadRequest ΒΆ

type MarkReadRequest struct {
	MessageID *string      `json:"message_id"`
	ThreadID  *string      `json:"thread_id"`
	UserID    *string      `json:"user_id"`
	User      *UserRequest `json:"user"`
}

type MarkReadResponse ΒΆ

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

	Event *MessageReadEvent `json:"event,omitempty"`
}

type MarkReviewedRequest ΒΆ

type MarkReviewedRequest struct {
	ContentToMarkAsReviewedLimit *int `json:"content_to_mark_as_reviewed_limit,omitempty"`

	DisableMarkingContentAsReviewed *bool `json:"disable_marking_content_as_reviewed,omitempty"`
}

type MarkUnreadRequest ΒΆ

type MarkUnreadRequest struct {
	MessageID        *string      `json:"message_id"`
	MessageTimestamp *Timestamp   `json:"message_timestamp"`
	ThreadID         *string      `json:"thread_id"`
	UserID           *string      `json:"user_id"`
	User             *UserRequest `json:"user"`
}

type MemberAddedEvent ΒΆ

type MemberAddedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	Member *ChannelMember `json:"member,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MemberAddedEvent) GetEventType ΒΆ

func (*MemberAddedEvent) GetEventType() string

type MemberRemovedEvent ΒΆ

type MemberRemovedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Member *ChannelMember `json:"member,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MemberRemovedEvent) GetEventType ΒΆ

func (*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 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 {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	Member *ChannelMember `json:"member,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MemberUpdatedEvent) GetEventType ΒΆ

func (*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 ΒΆ added in v3.1.0

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 Message ΒΆ

type Message struct {
	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	DeletedReplyCount int `json:"deleted_reply_count"`

	Html string `json:"html"`

	ID string `json:"id"`

	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 []Reaction `json:"latest_reactions"`

	MentionedUsers []User `json:"mentioned_users"`

	OwnReactions []Reaction `json:"own_reactions"`

	RestrictedVisibility []string `json:"restricted_visibility"`

	Custom map[string]any `json:"custom"`

	ReactionCounts map[string]int `json:"reaction_counts"`

	ReactionGroups map[string]*ReactionGroupResponse `json:"reaction_groups"`

	ReactionScores map[string]int `json:"reaction_scores"`

	BeforeMessageSendFailed *bool `json:"before_message_send_failed,omitempty"`

	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"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	I18n map[string]string `json:"i18n,omitempty"`

	ImageLabels map[string][]string `json:"image_labels,omitempty"`

	Member *ChannelMember `json:"member,omitempty"`

	Moderation *ModerationV2Response `json:"moderation,omitempty"`

	PinnedBy *User `json:"pinned_by,omitempty"`

	Poll *Poll `json:"poll,omitempty"`

	QuotedMessage *Message `json:"quoted_message,omitempty"`

	Reminder *MessageReminder `json:"reminder,omitempty"`

	SharedLocation *SharedLocation `json:"shared_location,omitempty"`

	User *User `json:"user,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 *UserRequest `json:"user,omitempty"`
}

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 {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	HardDelete bool `json:"hard_delete"`

	Type string `json:"type"`

	DeletedForMe *bool `json:"deleted_for_me,omitempty"`

	Team *string `json:"team,omitempty"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	Message *Message `json:"message,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MessageDeletedEvent) GetEventType ΒΆ

func (*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 *FlagDetails `json:"details,omitempty"`

	Message *Message `json:"message,omitempty"`

	ModerationFeedback *FlagFeedback `json:"moderation_feedback,omitempty"`

	ModerationResult *MessageModerationResult `json:"moderation_result,omitempty"`

	ReviewedBy *UserResponse `json:"reviewed_by,omitempty"`

	User *UserResponse `json:"user,omitempty"`
}

type MessageFlaggedEvent ΒΆ

type MessageFlaggedEvent struct {
	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	Flag *Flag `json:"flag,omitempty"`

	Message *Message `json:"message,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MessageFlaggedEvent) GetEventType ΒΆ

func (*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"`

	ModerationThresholds *Thresholds `json:"moderation_thresholds,omitempty"`
}

Result of the message moderation

type MessageNewEvent ΒΆ

type MessageNewEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	WatcherCount int `json:"watcher_count"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	Message *Message `json:"message,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MessageNewEvent) GetEventType ΒΆ

func (*MessageNewEvent) GetEventType() string

type MessageOptions ΒΆ

type MessageOptions struct {
	IncludeThreadParticipants *bool `json:"include_thread_participants,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 {
	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"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	Thread *ThreadResponse `json:"thread,omitempty"`

	User *UserResponseCommonFields `json:"user,omitempty"`
}

type MessageReminder ΒΆ

type MessageReminder struct {
	ChannelCid string `json:"channel_cid"`

	CreatedAt Timestamp `json:"created_at"`

	MessageID string `json:"message_id"`

	TaskID string `json:"task_id"`

	UpdatedAt Timestamp `json:"updated_at"`

	UserID string `json:"user_id"`

	RemindAt *Timestamp `json:"remind_at,omitempty"`

	Channel *Channel `json:"channel,omitempty"`

	Message *Message `json:"message,omitempty"`

	User *User `json:"user,omitempty"`
}

type MessageRequest ΒΆ

type MessageRequest struct {
	Html *string `json:"html,omitempty"`

	ID *string `json:"id,omitempty"`

	Mml *string `json:"mml,omitempty"`

	ParentID *string `json:"parent_id,omitempty"`

	PinExpires *Timestamp `json:"pin_expires,omitempty"`

	Pinned *bool `json:"pinned,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"`

	Silent *bool `json:"silent,omitempty"`

	Text *string `json:"text,omitempty"`

	UserID *string `json:"user_id,omitempty"`

	Type *string `json:"type,omitempty"`

	Attachments []Attachment `json:"attachments,omitempty"`

	MentionedUsers []string `json:"mentioned_users,omitempty"`

	RestrictedVisibility []string `json:"restricted_visibility,omitempty"`

	Custom map[string]any `json:"custom,omitempty"`

	SharedLocation *SharedLocation `json:"shared_location,omitempty"`

	User *UserRequest `json:"user,omitempty"`
}

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 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
	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 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 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 *ChannelMemberResponse `json:"member,omitempty"`

	Moderation *ModerationV2Response `json:"moderation,omitempty"`

	PinnedBy *UserResponse `json:"pinned_by,omitempty"`

	Poll *PollResponseData `json:"poll,omitempty"`

	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 {
	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	Message *Message `json:"message,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MessageUnblockedEvent) GetEventType ΒΆ

func (*MessageUnblockedEvent) GetEventType() string

type MessageUndeletedEvent ΒΆ

type MessageUndeletedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	Message *Message `json:"message,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MessageUndeletedEvent) GetEventType ΒΆ

func (*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 {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	Message *Message `json:"message,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*MessageUpdatedEvent) GetEventType ΒΆ

func (*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 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
	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"`

	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 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 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 *ChannelMemberResponse `json:"member,omitempty"`

	Moderation *ModerationV2Response `json:"moderation,omitempty"`

	PinnedBy *UserResponse `json:"pinned_by,omitempty"`

	Poll *PollResponseData `json:"poll,omitempty"`

	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 ΒΆ added in v3.4.0

type MetricDescriptor struct {
	Label string `json:"label"`

	Description *string `json:"description,omitempty"`

	Unit *string `json:"unit,omitempty"`
}

type MetricThreshold ΒΆ added in v3.4.0

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 ModerationActionConfig ΒΆ

type ModerationActionConfig struct {
	Action string `json:"action"`

	Description string `json:"description"`

	EntityType string `json:"entity_type"`

	Icon string `json:"icon"`

	Order int `json:"order"`

	Custom map[string]any `json:"custom"`
}

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 (*ModerationCheckCompletedEvent) GetEventType() string

type ModerationClient ΒΆ added in v3.3.0

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

func NewModerationClient ΒΆ added in v3.3.0

func NewModerationClient(client *Client) *ModerationClient

func (*ModerationClient) Ban ΒΆ added in v3.3.0

Ban a user from a channel or the entire app

func (*ModerationClient) BulkImageModeration ΒΆ added in v3.3.0

Moderate multiple images in bulk using a CSV file

func (*ModerationClient) Check ΒΆ added in v3.3.0

Run moderation checks on the provided content

func (*ModerationClient) CustomCheck ΒΆ added in v3.3.0

Custom check, add your own AI model reports to the review queue

func (*ModerationClient) DeleteConfig ΒΆ added in v3.3.0

Delete a specific moderation policy by its name

func (*ModerationClient) DeleteModerationRule ΒΆ added in v3.3.0

Delete an existing moderation rule

func (*ModerationClient) Flag ΒΆ added in v3.3.0

Flag any type of content (messages, users, channels, activities) for moderation review. Supports custom content types and additional metadata for flagged content.

func (*ModerationClient) GetConfig ΒΆ added in v3.3.0

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) GetModerationRule ΒΆ added in v3.3.0

Get a specific moderation rule by ID

func (*ModerationClient) GetReviewQueueItem ΒΆ added in v3.3.0

Retrieve a specific review queue item by its ID

func (*ModerationClient) Mute ΒΆ added in v3.3.0

Mute a user. Mutes are generally not visible to the user you mute, while block is something you notice.

func (*ModerationClient) QueryModerationConfigs ΒΆ added in v3.3.0

Search and filter moderation configurations across your application. This endpoint is designed for building moderation dashboards and managing multiple configuration sets.

func (*ModerationClient) QueryModerationFlags ΒΆ added in v3.3.0

Query flags associated with moderation items. This is used for building a moderation dashboard.

func (*ModerationClient) QueryModerationLogs ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

Search and filter moderation rules across your application. This endpoint is designed for building moderation dashboards and managing multiple rule sets.

func (*ModerationClient) QueryReviewQueue ΒΆ added in v3.3.0

Query review queue items allows you to filter the review queue items. This is used for building a moderation dashboard.

func (*ModerationClient) SubmitAction ΒΆ added in v3.3.0

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) Unban ΒΆ added in v3.3.0

Unban a user from a channel or globally.

func (*ModerationClient) Unmute ΒΆ added in v3.3.0

Unmute a user

func (*ModerationClient) UpsertConfig ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

Create or update a moderation rule that can apply app-wide or to specific moderation configs

func (*ModerationClient) V2DeleteTemplate ΒΆ added in v3.3.0

Delete a specific moderation template by its name

func (*ModerationClient) V2QueryTemplates ΒΆ added in v3.3.0

Retrieve a list of feed moderation templates that define preset moderation rules and configurations. Limited to 100 templates per request.

func (*ModerationClient) V2UpsertTemplate ΒΆ added in v3.3.0

Upsert feeds template for moderation

type ModerationConfig ΒΆ added in v3.1.1

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"`

	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"`

	Message *MessageResponse `json:"message,omitempty"`
}

This event is sent when a custom moderation action is executed

func (*ModerationCustomActionEvent) GetEventType ΒΆ

func (*ModerationCustomActionEvent) GetEventType() string

type ModerationDashboardPreferences ΒΆ

type ModerationDashboardPreferences struct {
	DisableFlaggingReviewedEntity *bool `json:"disable_flagging_reviewed_entity,omitempty"`

	FlagUserOnFlaggedContent *bool `json:"flag_user_on_flagged_content,omitempty"`

	MediaQueueBlurEnabled *bool `json:"media_queue_blur_enabled,omitempty"`

	AllowedModerationActionReasons []string `json:"allowed_moderation_action_reasons,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"`

	ModerationPayload *ModerationPayload `json:"moderation_payload,omitempty"`

	ReviewQueueItem *ReviewQueueItemResponse `json:"review_queue_item,omitempty"`

	User *UserResponse `json:"user,omitempty"`
}

type ModerationFlaggedEvent ΒΆ

type ModerationFlaggedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Item *string `json:"item,omitempty"`

	ObjectID *string `json:"object_id,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*ModerationFlaggedEvent) GetEventType ΒΆ

func (*ModerationFlaggedEvent) 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"`

	Message *MessageResponse `json:"message,omitempty"`
}

This event is sent when a moderation item is marked as reviewed

func (*ModerationMarkReviewedEvent) GetEventType ΒΆ

func (*ModerationMarkReviewedEvent) GetEventType() string

type ModerationPayload ΒΆ

type ModerationPayload struct {
	Images []string `json:"images,omitempty"`

	Texts []string `json:"texts,omitempty"`

	Videos []string `json:"videos,omitempty"`

	Custom map[string]any `json:"custom,omitempty"`
}

type ModerationResponse ΒΆ

type ModerationResponse struct {
	Action string `json:"action"`

	Explicit float64 `json:"explicit"`

	Spam float64 `json:"spam"`

	Toxic float64 `json:"toxic"`
}

type ModerationRuleV2Response ΒΆ added in v3.1.1

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"`

	Action RuleBuilderAction `json:"action"`

	CooldownPeriod *string `json:"cooldown_period,omitempty"`

	Logic *string `json:"logic,omitempty"`

	Conditions []RuleBuilderCondition `json:"conditions,omitempty"`

	Groups []RuleBuilderConditionGroup `json:"groups,omitempty"`
}

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"`

	ImageHarms []string `json:"image_harms,omitempty"`

	TextHarms []string `json:"text_harms,omitempty"`
}

type MuteChannelRequest ΒΆ

type MuteChannelRequest struct {
	Expiration  *int         `json:"expiration"`
	UserID      *string      `json:"user_id"`
	ChannelCids []string     `json:"channel_cids"`
	User        *UserRequest `json:"user"`
}

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 *OwnUser `json:"own_user,omitempty"`
}

type MuteRequest ΒΆ

type MuteRequest struct {
	TargetIds []string     `json:"target_ids"`
	Timeout   *int         `json:"timeout"`
	UserID    *string      `json:"user_id"`
	User      *UserRequest `json:"user"`
}

type MuteResponse ΒΆ

type MuteResponse struct {
	Duration string `json:"duration"`

	// Object with mutes (if multiple users were muted)
	Mutes []UserMute `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 *OwnUser `json:"own_user,omitempty"`
}

type MuteUsersRequest ΒΆ

type MuteUsersRequest struct {
	Audio            *bool        `json:"audio"`
	MuteAllUsers     *bool        `json:"mute_all_users"`
	MutedByID        *string      `json:"muted_by_id"`
	Screenshare      *bool        `json:"screenshare"`
	ScreenshareAudio *bool        `json:"screenshare_audio"`
	Video            *bool        `json:"video"`
	UserIds          []string     `json:"user_ids"`
	MutedBy          *UserRequest `json:"muted_by"`
}

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 ΒΆ added in v3.6.0

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 ΒΆ added in v3.1.2

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 (*NotificationFeedUpdatedEvent) GetEventType() string

type NotificationMarkUnreadEvent ΒΆ

type NotificationMarkUnreadEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelMemberCount int `json:"channel_member_count"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	FirstUnreadMessageID string `json:"first_unread_message_id"`

	LastReadAt Timestamp `json:"last_read_at"`

	TotalUnreadCount int `json:"total_unread_count"`

	UnreadChannels int `json:"unread_channels"`

	UnreadCount int `json:"unread_count"`

	UnreadMessages int `json:"unread_messages"`

	UnreadThreads int `json:"unread_threads"`

	Type string `json:"type"`

	LastReadMessageID *string `json:"last_read_message_id,omitempty"`

	Team *string `json:"team,omitempty"`

	ThreadID *string `json:"thread_id,omitempty"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*NotificationMarkUnreadEvent) GetEventType ΒΆ

func (*NotificationMarkUnreadEvent) GetEventType() string

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 NotificationStatusResponse ΒΆ

type NotificationStatusResponse struct {
	// Number of unread notifications
	Unread int `json:"unread"`

	// Number of unseen notifications
	Unseen int `json:"unseen"`

	LastReadAt *Timestamp `json:"last_read_at,omitempty"`

	// When notifications were last seen
	LastSeenAt *Timestamp `json:"last_seen_at,omitempty"`

	// IDs of activities that have been read
	ReadActivities []string `json:"read_activities,omitempty"`

	SeenActivities []string `json:"seen_activities,omitempty"`
}

type NotificationTarget ΒΆ added in v3.1.2

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"`
}

type NotificationTrigger ΒΆ added in v3.1.2

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"`
}

type OCRRule ΒΆ

type OCRRule struct {
	Action string `json:"action"`

	Label string `json:"label"`
}

type OnlyUserID ΒΆ

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

type OverviewDashboardConfig ΒΆ added in v3.4.0

type OverviewDashboardConfig struct {
	DefaultDateRangeDays *int `json:"default_date_range_days,omitempty"`

	VisibleCharts []string `json:"visible_charts,omitempty"`
}

type OwnCapabilitiesBatchRequest ΒΆ added in v3.4.0

type OwnCapabilitiesBatchRequest struct {
	Feeds  []string     `json:"feeds"`
	UserID *string      `json:"user_id"`
	User   *UserRequest `json:"user"`
}

type OwnCapabilitiesBatchResponse ΒΆ added in v3.4.0

type OwnCapabilitiesBatchResponse struct {
	Duration string `json:"duration"`

	// Map of feed ID to capabilities array
	Capabilities map[string][]FeedOwnCapability `json:"capabilities"`
}

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_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_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 OwnUser ΒΆ

type OwnUser 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"`

	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 []Device `json:"devices"`

	Mutes []UserMute `json:"mutes"`

	Custom map[string]any `json:"custom"`

	TotalUnreadCountByTeam map[string]int `json:"total_unread_count_by_team"`

	AvgResponseTime *int `json:"avg_response_time,omitempty"`

	DeactivatedAt *Timestamp `json:"deactivated_at,omitempty"`

	DeletedAt *Timestamp `json:"deleted_at,omitempty"`

	Invisible *bool `json:"invisible,omitempty"`

	LastActive *Timestamp `json:"last_active,omitempty"`

	LastEngagedAt *Timestamp `json:"last_engaged_at,omitempty"`

	BlockedUserIds []string `json:"blocked_user_ids,omitempty"`

	LatestHiddenChannels []string `json:"latest_hidden_channels,omitempty"`

	Teams []string `json:"teams,omitempty"`

	PrivacySettings *PrivacySettings `json:"privacy_settings,omitempty"`

	PushPreferences *PushPreferences `json:"push_preferences,omitempty"`

	TeamsRole map[string]string `json:"teams_role,omitempty"`
}

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 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 ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

type ParticipantSeriesTimeframe struct {
	MaxPoints int `json:"max_points"`

	Since Timestamp `json:"since"`

	StepSeconds int `json:"step_seconds"`

	Until Timestamp `json:"until"`
}

type ParticipantSeriesTrackMetrics ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

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 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"`

	Channel *Channel `json:"channel,omitempty"`

	Message *Message `json:"message,omitempty"`

	Metadata map[string]string `json:"metadata,omitempty"`

	User *User `json:"user,omitempty"`
}

Pending message event for async moderation

func (*PendingMessageEvent) GetEventType ΒΆ

func (*PendingMessageEvent) GetEventType() string

type PendingMessageResponse ΒΆ

type PendingMessageResponse struct {
	Channel *ChannelResponse `json:"channel,omitempty"`

	Message *MessageResponse `json:"message,omitempty"`

	Metadata map[string]string `json:"metadata,omitempty"`

	User *UserResponse `json:"user,omitempty"`
}

type PerSDKUsageReport ΒΆ

type PerSDKUsageReport struct {
	Total int `json:"total"`

	ByVersion map[string]int `json:"by_version"`
}

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)
	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"`

	// 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 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 (*PermissionRequestEvent) GetEventType() string

type PinActivityRequest ΒΆ

type PinActivityRequest struct {
	UserID *string      `json:"user_id"`
	User   *UserRequest `json:"user"`
}

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 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 Poll ΒΆ

type Poll 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"`

	LatestAnswers []PollVote `json:"latest_answers"`

	Options []PollOption `json:"options"`

	OwnVotes []PollVote `json:"own_votes"`

	Custom map[string]any `json:"Custom"`

	LatestVotesByOption map[string][]PollVote `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"`

	VotingVisibility *string `json:"voting_visibility,omitempty"`

	CreatedBy *User `json:"created_by,omitempty"`
}

type PollOption ΒΆ

type PollOption struct {
	ID string `json:"id"`

	Text string `json:"text"`

	Custom map[string]any `json:"custom"`
}

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"`

	CreatedBy *UserResponse `json:"created_by,omitempty"`
}

type PollVote ΒΆ

type PollVote 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 *User `json:"user,omitempty"`
}

type PollVoteResponse ΒΆ

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

	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 *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 PrivacySettings ΒΆ

type PrivacySettings struct {
	DeliveryReceipts *DeliveryReceipts `json:"delivery_receipts,omitempty"`

	ReadReceipts *ReadReceipts `json:"read_receipts,omitempty"`

	TypingIndicators *TypingIndicators `json:"typing_indicators,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 ΒΆ added in v3.2.0

type PublishedTrackFlags struct {
	Audio bool `json:"audio"`

	Screenshare bool `json:"screenshare"`

	ScreenshareAudio bool `json:"screenshare_audio"`

	Video bool `json:"video"`
}

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 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 ΒΆ added in v3.1.0

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. One of 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"`

	FeedsPreferences *FeedsPreferences `json:"feeds_preferences,omitempty"`
}

type PushPreferences ΒΆ

type PushPreferences 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"`

	FeedsPreferences *FeedsPreferences `json:"feeds_preferences,omitempty"`
}

type PushPreferencesResponse ΒΆ added in v3.6.0

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"`

	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 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 QualityScoreReport ΒΆ

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

type QualityScoreReportResponse ΒΆ

type QualityScoreReportResponse struct {
	Daily []DailyAggregateQualityScoreReportResponse `json:"daily"`
}

type QueryActivitiesRequest ΒΆ

type QueryActivitiesRequest struct {
	IncludePrivateActivities *bool              `json:"include_private_activities"`
	Limit                    *int               `json:"limit"`
	Next                     *string            `json:"next"`
	Prev                     *string            `json:"prev"`
	UserID                   *string            `json:"user_id"`
	Sort                     []SortParamRequest `json:"sort"`
	Filter                   map[string]any     `json:"filter"`
	User                     *UserRequest       `json:"user"`
}

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"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	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 QueryAggregateCallStatsRequest ΒΆ

type QueryAggregateCallStatsRequest struct {
	From        *string  `json:"from"`
	To          *string  `json:"to"`
	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 QueryBannedUsersPayload ΒΆ

type QueryBannedUsersPayload struct {
	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 *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"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	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 {
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
}

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"`
	Next             *string            `json:"next"`
	Prev             *string            `json:"prev"`
	Sort             []SortParamRequest `json:"sort"`
	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 QueryCallParticipantsRequest ΒΆ

type QueryCallParticipantsRequest struct {
	Limit            *int           `json:"-" query:"limit"`
	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"`

	Call CallResponse `json:"call"`
}

type QueryCallSessionParticipantStatsRequest ΒΆ added in v3.2.0

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 ΒΆ added in v3.2.0

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"`
}

Basic response information

type QueryCallSessionParticipantStatsTimelineResponse ΒΆ added in v3.3.0

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 QueryCallStatsMapResponse ΒΆ added in v3.7.0

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"`
	Next             *string            `json:"next"`
	Prev             *string            `json:"prev"`
	Sort             []SortParamRequest `json:"sort"`
	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"`
	Next             *string            `json:"next"`
	Prev             *string            `json:"prev"`
	Sort             []SortParamRequest `json:"sort"`
	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"`
	Next      *string            `json:"next"`
	Prev      *string            `json:"prev"`
	UserLimit *int               `json:"user_limit"`
	Sort      []SortParamRequest `json:"sort"`
	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 {
	Limit            *int               `json:"limit"`
	MemberLimit      *int               `json:"member_limit"`
	MessageLimit     *int               `json:"message_limit"`
	Offset           *int               `json:"offset"`
	State            *bool              `json:"state"`
	UserID           *string            `json:"user_id"`
	Sort             []SortParamRequest `json:"sort"`
	FilterConditions map[string]any     `json:"filter_conditions"`
	User             *UserRequest       `json:"user"`
}

type QueryChannelsResponse ΒΆ

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

	// List of channels
	Channels []ChannelStateResponseFields `json:"channels"`
}

type QueryCommentReactionsRequest ΒΆ

type QueryCommentReactionsRequest struct {
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	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 {
	Filter map[string]any `json:"filter"`
	Limit  *int           `json:"limit"`
	Next   *string        `json:"next"`
	Prev   *string        `json:"prev"`
	Sort   *string        `json:"sort"`
}

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"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	UserID *string            `json:"user_id"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
	User   *UserRequest       `json:"user"`
}

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"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	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"`

	Config *FeedsModerationTemplateConfig `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 {
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Watch  *bool              `json:"watch"`
	Sort   []SortParamRequest `json:"sort"`
	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 ΒΆ added in v3.4.0

type QueryFeedsUsageStatsRequest struct {
	From *string `json:"from"`
	To   *string `json:"to"`
}

type QueryFeedsUsageStatsResponse ΒΆ added in v3.4.0

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"`
}

type QueryFollowsRequest ΒΆ

type QueryFollowsRequest struct {
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	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 QueryMembersPayload ΒΆ

type QueryMembersPayload struct {
	Type string `json:"type"`

	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"`

	Sort []SortParamRequest `json:"sort,omitempty"`

	User *UserRequest `json:"user,omitempty"`
}

Client request

type QueryMembersRequest ΒΆ

type QueryMembersRequest struct {
	Payload *QueryMembersPayload `json:"-" query:"payload"`
}

type QueryMembershipLevelsRequest ΒΆ added in v3.1.0

type QueryMembershipLevelsRequest struct {
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
}

type QueryMembershipLevelsResponse ΒΆ added in v3.1.0

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"`

	Sort []SortParamRequest `json:"sort,omitempty"`

	FilterConditions map[string]any `json:"filter_conditions,omitempty"`

	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 map[string]any     `json:"filter"`
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	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"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	UserID *string            `json:"user_id"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
	User   *UserRequest       `json:"user"`
}

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"`
	Next   *string        `json:"next"`
	Prev   *string        `json:"prev"`
	Sort   []SortParam    `json:"sort"`
	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"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	UserID *string            `json:"user_id"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
	User   *UserRequest       `json:"user"`
}

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 ΒΆ added in v3.1.1

type QueryModerationRulesRequest struct {
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	UserID *string            `json:"user_id"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
	User   *UserRequest       `json:"user"`
}

type QueryModerationRulesResponse ΒΆ added in v3.1.1

type QueryModerationRulesResponse struct {
	Duration string `json:"duration"`

	// List of moderation rules
	Rules []ModerationRuleV2Response `json:"rules"`

	// Default LLM label descriptions
	DefaultLlmLabels map[string]string `json:"default_llm_labels"`

	Next *string `json:"next,omitempty"`

	Prev *string `json:"prev,omitempty"`
}

type QueryPollVotesRequest ΒΆ

type QueryPollVotesRequest struct {
	UserID *string            `json:"-" query:"user_id"`
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
}

type QueryPollsRequest ΒΆ

type QueryPollsRequest struct {
	UserID *string            `json:"-" query:"user_id"`
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	Sort   []SortParamRequest `json:"sort"`
	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"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	UserID *string            `json:"user_id"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
	User   *UserRequest       `json:"user"`
}

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"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	UserID *string            `json:"user_id"`
	Sort   []SortParamRequest `json:"sort"`
	Filter map[string]any     `json:"filter"`
	User   *UserRequest       `json:"user"`
}

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 {
	Limit        *int               `json:"limit"`
	LockCount    *int               `json:"lock_count"`
	LockDuration *int               `json:"lock_duration"`
	LockItems    *bool              `json:"lock_items"`
	Next         *string            `json:"next"`
	Prev         *string            `json:"prev"`
	StatsOnly    *bool              `json:"stats_only"`
	UserID       *string            `json:"user_id"`
	Sort         []SortParamRequest `json:"sort"`
	Filter       map[string]any     `json:"filter"`
	User         *UserRequest       `json:"user"`
}

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][]ModerationActionConfig `json:"action_config"`

	// Statistics about the review queue
	Stats map[string]any `json:"stats"`

	Next *string `json:"next,omitempty"`

	Prev *string `json:"prev,omitempty"`

	FilterConfig *FilterConfigResponse `json:"filter_config,omitempty"`
}

type QuerySegmentTargetsRequest ΒΆ

type QuerySegmentTargetsRequest struct {
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	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 map[string]any     `json:"filter"`
	Limit  *int               `json:"limit"`
	Next   *string            `json:"next"`
	Prev   *string            `json:"prev"`
	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 QueryThreadsRequest ΒΆ

type QueryThreadsRequest struct {
	Limit            *int               `json:"limit"`
	MemberLimit      *int               `json:"member_limit"`
	Next             *string            `json:"next"`
	ParticipantLimit *int               `json:"participant_limit"`
	Prev             *string            `json:"prev"`
	ReplyLimit       *int               `json:"reply_limit"`
	UserID           *string            `json:"user_id"`
	Sort             []SortParamRequest `json:"sort"`
	Filter           map[string]any     `json:"filter"`
	User             *UserRequest       `json:"user"`
}

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"`
	Next             *string            `json:"next"`
	Prev             *string            `json:"prev"`
	Sort             []SortParamRequest `json:"sort"`
	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 {
	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"`

	Sort []SortParamRequest `json:"sort,omitempty"`

	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 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
	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 {
	Enabled *bool `json:"enabled,omitempty"`

	// Resolution to set for the RTMP stream
	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. Must be one of: recency, 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 Reaction ΒΆ

type Reaction struct {
	CreatedAt Timestamp `json:"created_at"`

	MessageID string `json:"message_id"`

	Score int `json:"score"`

	UpdatedAt Timestamp `json:"updated_at"`

	Type string `json:"type"`

	Custom map[string]any `json:"custom"`

	UserID *string `json:"user_id,omitempty"`

	User *User `json:"user,omitempty"`
}

type ReactionDeletedEvent ΒΆ

type ReactionDeletedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	Message *Message `json:"message,omitempty"`

	Reaction *Reaction `json:"reaction,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*ReactionDeletedEvent) GetEventType ΒΆ

func (*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"`
}

ReactionGroupResponse contains all information about a reaction of the same type.

type ReactionNewEvent ΒΆ

type ReactionNewEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	ThreadParticipants []User `json:"thread_participants,omitempty"`

	Message *Message `json:"message,omitempty"`

	Reaction *Reaction `json:"reaction,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*ReactionNewEvent) GetEventType ΒΆ

func (*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 *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 UserResponse `json:"user"`
}

type ReactionUpdatedEvent ΒΆ

type ReactionUpdatedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Message Message `json:"message"`

	Reaction Reaction `json:"reaction"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*ReactionUpdatedEvent) GetEventType ΒΆ

func (*ReactionUpdatedEvent) GetEventType() string

type ReactivateUserRequest ΒΆ

type ReactivateUserRequest struct {
	CreatedByID     *string `json:"created_by_id"`
	Name            *string `json:"name"`
	RestoreMessages *bool   `json:"restore_messages"`
}

type ReactivateUserResponse ΒΆ

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

	User *UserResponse `json:"user,omitempty"`
}

type ReactivateUsersRequest ΒΆ

type ReactivateUsersRequest struct {
	UserIds         []string `json:"user_ids"`
	CreatedByID     *string  `json:"created_by_id"`
	RestoreChannels *bool    `json:"restore_channels"`
	RestoreMessages *bool    `json:"restore_messages"`
}

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 ΒΆ added in v3.5.0

type ReadCollectionsRequest struct {
	CollectionRefs []string `json:"-" query:"collection_refs"`
	UserID         *string  `json:"-" query:"user_id"`
}

type ReadCollectionsResponse ΒΆ added in v3.5.0

type ReadCollectionsResponse struct {
	Duration string `json:"duration"`

	// List of collections matching the query
	Collections []CollectionResponse `json:"collections"`
}

type ReadReceipts ΒΆ

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

type ReadReceiptsResponse ΒΆ

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

type ReadStateResponse ΒΆ

type ReadStateResponse struct {
	LastRead Timestamp `json:"last_read"`

	UnreadMessages int `json:"unread_messages"`

	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 {
	Mode string `json:"mode"`

	AudioOnly *bool `json:"audio_only,omitempty"`

	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 RejectFeedMemberInviteRequest ΒΆ

type RejectFeedMemberInviteRequest struct {
	UserID *string      `json:"user_id"`
	User   *UserRequest `json:"user"`
}

type RejectFeedMemberInviteResponse ΒΆ

type RejectFeedMemberInviteResponse struct {
	Duration string `json:"duration"`

	Member FeedMemberResponse `json:"member"`
}

type RejectFollowRequest ΒΆ

type RejectFollowRequest struct {
	Source string `json:"source"`
	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 (*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 (*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 (*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"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	Message *MessageResponse `json:"message,omitempty"`

	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 (*ReminderUpdatedEvent) GetEventType() string

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 ReportResponse ΒΆ

type ReportResponse struct {
	Call CallReportResponse `json:"call"`

	Participants ParticipantReportResponse `json:"participants"`

	UserRatings UserRatingReportResponse `json:"user_ratings"`
}

type ResolveSipInboundRequest ΒΆ added in v3.4.0

type ResolveSipInboundRequest struct {
	SipCallerNumber string            `json:"sip_caller_number"`
	SipTrunkNumber  string            `json:"sip_trunk_number"`
	Challenge       SIPChallenge      `json:"challenge"`
	SipHeaders      map[string]string `json:"sip_headers"`
}

type ResolveSipInboundResponse ΒΆ added in v3.4.0

type ResolveSipInboundResponse struct {
	Duration string `json:"duration"`

	Credentials SipInboundCredentials `json:"credentials"`

	SipRoutingRule *SIPInboundRoutingRuleResponse `json:"sip_routing_rule,omitempty"`

	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 RestoreActionRequest ΒΆ

type RestoreActionRequest struct{}

type RestoreUsersRequest ΒΆ

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

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 (*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"`

	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 []Ban `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 reviewed
	ReviewedAt *Timestamp `json:"reviewed_at,omitempty"`

	// Teams associated with this item
	Teams []string `json:"teams,omitempty"`

	Activity *EnrichedActivity `json:"activity,omitempty"`

	AssignedTo *UserResponse `json:"assigned_to,omitempty"`

	Call *CallResponse `json:"call,omitempty"`

	EntityCreator *EntityCreatorResponse `json:"entity_creator,omitempty"`

	FeedsV2Activity *EnrichedActivity `json:"feeds_v2_activity,omitempty"`

	FeedsV2Reaction *Reaction `json:"feeds_v2_reaction,omitempty"`

	FeedsV3Activity *ActivityResponse `json:"feeds_v3_activity,omitempty"`

	FeedsV3Comment *CommentResponse `json:"feeds_v3_comment,omitempty"`

	Message *MessageResponse `json:"message,omitempty"`

	ModerationPayload *ModerationPayload `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 (*ReviewQueueItemUpdatedEvent) GetEventType() string

type RingCallRequest ΒΆ added in v3.5.0

type RingCallRequest struct {
	Video      *bool    `json:"video"`
	MembersIds []string `json:"members_ids"`
}

type RingCallResponse ΒΆ added in v3.5.0

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 {
	Type string `json:"type"`

	BanOptions *BanOptions `json:"ban_options,omitempty"`

	FlagUserOptions *FlagUserOptions `json:"flag_user_options,omitempty"`
}

type RuleBuilderCondition ΒΆ

type RuleBuilderCondition struct {
	Confidence *float64 `json:"confidence,omitempty"`

	Type *string `json:"type,omitempty"`

	ContentCountRuleParams *ContentCountRuleParameters `json:"content_count_rule_params,omitempty"`

	ContentFlagCountRuleParams *FlagCountRuleParameters `json:"content_flag_count_rule_params,omitempty"`

	ImageContentParams *ImageContentParameters `json:"image_content_params,omitempty"`

	ImageRuleParams *ImageRuleParameters `json:"image_rule_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"`

	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"`

	Action RuleBuilderAction `json:"action"`

	CooldownPeriod *string `json:"cooldown_period,omitempty"`

	ID *string `json:"id,omitempty"`

	Logic *string `json:"logic,omitempty"`

	Conditions []RuleBuilderCondition `json:"conditions,omitempty"`

	Groups []RuleBuilderConditionGroup `json:"groups,omitempty"`
}

type RunMessageActionRequest ΒΆ

type RunMessageActionRequest struct {
	FormData map[string]string `json:"form_data"`
	UserID   *string           `json:"user_id"`
	User     *UserRequest      `json:"user"`
}

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 ΒΆ added in v3.7.0

type SFULocationResponse struct {
	Datacenter string `json:"datacenter"`

	ID string `json:"id"`

	Coordinates Coordinates `json:"coordinates"`

	Location Location `json:"location"`

	Count *int `json:"count,omitempty"`
}

type SIPCallConfigsRequest ΒΆ added in v3.4.0

type SIPCallConfigsRequest struct {
	// Custom data associated with the call
	CustomData map[string]any `json:"custom_data,omitempty"`
}

Configuration for SIP call settings

type SIPCallConfigsResponse ΒΆ added in v3.4.0

type SIPCallConfigsResponse struct {
	// Custom data associated with the call
	CustomData map[string]any `json:"custom_data"`
}

SIP call configuration response

type SIPCallerConfigsRequest ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

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 SIPChallenge ΒΆ added in v3.4.0

type SIPChallenge struct {
	A1 *string `json:"a1,omitempty"`

	Algorithm *string `json:"algorithm,omitempty"`

	Charset *string `json:"charset,omitempty"`

	Cnonce *string `json:"cnonce,omitempty"`

	Method *string `json:"method,omitempty"`

	Nc *string `json:"nc,omitempty"`

	Nonce *string `json:"nonce,omitempty"`

	Opaque *string `json:"opaque,omitempty"`

	Realm *string `json:"realm,omitempty"`

	Response *string `json:"response,omitempty"`

	Stale *bool `json:"stale,omitempty"`

	Uri *string `json:"uri,omitempty"`

	Userhash *bool `json:"userhash,omitempty"`

	Username *string `json:"username,omitempty"`

	Domain []string `json:"domain,omitempty"`

	Qop []string `json:"qop,omitempty"`
}

type SIPDirectRoutingRuleCallConfigsRequest ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

type SIPInboundRoutingRuleRequest struct {
	// Name of the SIP Inbound Routing Rule
	Name string `json:"name"`

	// List of SIP trunk IDs
	TrunkIds []string `json:"trunk_ids"`

	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"`

	CallConfigs *SIPCallConfigsRequest `json:"call_configs,omitempty"`

	DirectRoutingConfigs *SIPDirectRoutingRuleCallConfigsRequest `json:"direct_routing_configs,omitempty"`

	PinProtectionConfigs *SIPPinProtectionConfigsRequest `json:"pin_protection_configs,omitempty"`

	PinRoutingConfigs *SIPInboundRoutingRulePinConfigsRequest `json:"pin_routing_configs,omitempty"`
}

Request to create or update a SIP Inbound Routing Rule

type SIPInboundRoutingRuleResponse ΒΆ added in v3.4.0

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"`

	CallConfigs *SIPCallConfigsResponse `json:"call_configs,omitempty"`

	CallerConfigs *SIPCallerConfigsResponse `json:"caller_configs,omitempty"`

	DirectRoutingConfigs *SIPDirectRoutingRuleCallConfigsResponse `json:"direct_routing_configs,omitempty"`

	PinProtectionConfigs *SIPPinProtectionConfigsResponse `json:"pin_protection_configs,omitempty"`

	PinRoutingConfigs *SIPInboundRoutingRulePinConfigsResponse `json:"pin_routing_configs,omitempty"`
}

SIP Inbound Routing Rule response

type SIPPinProtectionConfigsRequest ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

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"`

	// Phone numbers associated with this SIP trunk
	Numbers []string `json:"numbers"`
}

SIP trunk information

type SRTCredentials ΒΆ added in v3.2.0

type SRTCredentials struct {
	Address string
}

type SRTIngress ΒΆ added in v3.1.2

type SRTIngress struct {
	Address string `json:"address"`
}

type ScheduleCampaignRequest ΒΆ

type ScheduleCampaignRequest struct {
}

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"`

	// 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"`

	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 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"`

	ThreadParticipants []UserResponse `json:"thread_participants,omitempty"`

	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 *ChannelMemberResponse `json:"member,omitempty"`

	Moderation *ModerationV2Response `json:"moderation,omitempty"`

	PinnedBy *UserResponse `json:"pinned_by,omitempty"`

	Poll *PollResponseData `json:"poll,omitempty"`

	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 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 SendCallEventRequest ΒΆ

type SendCallEventRequest struct {
	UserID *string        `json:"user_id"`
	Custom map[string]any `json:"custom"`
	User   *UserRequest   `json:"user"`
}

type SendCallEventResponse ΒΆ

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

type SendClosedCaptionRequest ΒΆ added in v3.1.1

type SendClosedCaptionRequest struct {
	SpeakerID  string       `json:"speaker_id"`
	Text       string       `json:"text"`
	EndTime    *Timestamp   `json:"end_time"`
	Language   *string      `json:"language"`
	Service    *string      `json:"service"`
	StartTime  *Timestamp   `json:"start_time"`
	Translated *bool        `json:"translated"`
	UserID     *string      `json:"user_id"`
	User       *UserRequest `json:"user"`
}

type SendClosedCaptionResponse ΒΆ added in v3.1.1

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

type SendEventRequest ΒΆ

type SendEventRequest struct {
	Event EventRequest `json:"event"`
}

type SendMessageRequest ΒΆ

type SendMessageRequest struct {
	Message                MessageRequest    `json:"message"`
	ForceModeration        *bool             `json:"force_moderation"`
	KeepChannelHidden      *bool             `json:"keep_channel_hidden"`
	Pending                *bool             `json:"pending"`
	SkipEnrichUrl          *bool             `json:"skip_enrich_url"`
	SkipPush               *bool             `json:"skip_push"`
	PendingMessageMetadata map[string]string `json:"pending_message_metadata"`
}

type SendMessageResponse ΒΆ

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

	Message MessageResponse `json:"message"`

	// Pending message metadata
	PendingMessageMetadata map[string]string `json:"pending_message_metadata,omitempty"`
}

type SendReactionRequest ΒΆ

type SendReactionRequest struct {
	Reaction      ReactionRequest `json:"reaction"`
	EnforceUnique *bool           `json:"enforce_unique"`
	SkipPush      *bool           `json:"skip_push"`
}

type SendReactionResponse ΒΆ

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

	Message MessageResponse `json:"message"`

	Reaction ReactionResponse `json:"reaction"`
}

Basic response information

type SendUserCustomEventRequest ΒΆ

type SendUserCustomEventRequest struct {
	Event UserCustomEventRequest `json:"event"`
}

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 ShadowBlockActionRequest ΒΆ

type ShadowBlockActionRequest struct {
	Reason *string `json:"reason,omitempty"`
}

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"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	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"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	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"`
	User   *UserRequest `json:"user"`
}

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"`
}

type SipInboundCredentials ΒΆ added in v3.4.0

type SipInboundCredentials struct {
	// 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 SortParam ΒΆ

type SortParam struct {
	Direction *int `json:"direction,omitempty"`

	Field *string `json:"field,omitempty"`
}

type SortParamRequest ΒΆ

type SortParamRequest struct {
	// Direction of sorting, 1 for Ascending, -1 for Descending, default is 1
	Direction *int `json:"direction,omitempty"`

	// Name of field to sort by
	Field *string `json:"field,omitempty"`
}

type SpeechSegmentConfig ΒΆ added in v3.1.1

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"`
	StopAt       *Timestamp `json:"stop_at"`
}

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 {
	EnableTranscription *bool                `json:"enable_transcription"`
	ExternalStorage     *string              `json:"external_storage"`
	Language            *string              `json:"language"`
	SpeechSegmentConfig *SpeechSegmentConfig `json:"speech_segment_config"`
}

type StartClosedCaptionsResponse ΒΆ

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

type StartFrameRecordingRequest ΒΆ

type StartFrameRecordingRequest struct {
	RecordingExternalStorage *string `json:"recording_external_storage"`
}

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 StartRTMPBroadcastsRequest ΒΆ

type StartRTMPBroadcastsRequest struct {
	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"`
}

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 {
	EnableClosedCaptions         *bool   `json:"enable_closed_captions"`
	Language                     *string `json:"language"`
	TranscriptionExternalStorage *string `json:"transcription_external_storage"`
}

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"`
}

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"`
	ContinueHLS            *bool `json:"continue_hls"`
	ContinueRTMPBroadcasts *bool `json:"continue_rtmp_broadcasts"`
	ContinueRecording      *bool `json:"continue_recording"`
	ContinueTranscription  *bool `json:"continue_transcription"`
}

type StopLiveResponse ΒΆ

type StopLiveResponse struct {
	Duration string `json:"duration"`

	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"`
}

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 ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

func (*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)

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 ΒΆ added in v3.3.0

func (s *Stream) Moderation() *ModerationClient

Moderation 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"`
	RateLimit       *RateLimitInfo    `json:"-"`
}

Error represents an API error

func (StreamError) Error ΒΆ

func (e StreamError) Error() string

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

type SubmitActionRequest ΒΆ

type SubmitActionRequest struct {
	ActionType     string                    `json:"action_type"`
	ItemID         string                    `json:"item_id"`
	UserID         *string                   `json:"user_id"`
	Ban            *BanActionRequest         `json:"ban"`
	Block          *BlockActionRequest       `json:"block"`
	Custom         *CustomActionRequest      `json:"custom"`
	DeleteActivity *DeleteActivityRequest    `json:"delete_activity"`
	DeleteComment  *DeleteCommentRequest     `json:"delete_comment"`
	DeleteMessage  *DeleteMessageRequest     `json:"delete_message"`
	DeleteReaction *DeleteReactionRequest    `json:"delete_reaction"`
	DeleteUser     *DeleteUserRequest        `json:"delete_user"`
	MarkReviewed   *MarkReviewedRequest      `json:"mark_reviewed"`
	ShadowBlock    *ShadowBlockActionRequest `json:"shadow_block"`
	Unban          *UnbanActionRequest       `json:"unban"`
	User           *UserRequest              `json:"user"`
}

type SubmitActionResponse ΒΆ

type SubmitActionResponse struct {
	Duration string `json:"duration"`

	Item *ReviewQueueItemResponse `json:"item,omitempty"`
}

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 TargetResolution ΒΆ

type TargetResolution struct {
	Bitrate int `json:"bitrate"`

	Height int `json:"height"`

	Width int `json:"width"`
}

type TextContentParameters ΒΆ

type TextContentParameters struct {
	ContainsUrl *bool `json:"contains_url,omitempty"`

	Severity *string `json:"severity,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"`

	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"`

	LlmHarmLabels map[string]string `json:"llm_harm_labels,omitempty"`
}

type ThreadParticipant ΒΆ

type ThreadParticipant struct {
	AppPk int `json:"app_pk"`

	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 *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"`

	// 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"`

	// Reply Count
	ReplyCount *int `json:"reply_count,omitempty"`

	// Thread Participants
	ThreadParticipants []ThreadParticipant `json:"thread_participants,omitempty"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	CreatedBy *UserResponse `json:"created_by,omitempty"`

	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"`

	// 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"`

	// Reply Count
	ReplyCount *int `json:"reply_count,omitempty"`

	Read []ReadStateResponse `json:"read,omitempty"`

	// Thread Participants
	ThreadParticipants []ThreadParticipant `json:"thread_participants,omitempty"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	CreatedBy *UserResponse `json:"created_by,omitempty"`

	Draft *DraftResponse `json:"draft,omitempty"`

	ParentMessage *MessageResponse `json:"parent_message,omitempty"`
}

type ThreadUpdatedEvent ΒΆ

type ThreadUpdatedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	Thread *ThreadResponse `json:"thread,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*ThreadUpdatedEvent) GetEventType ΒΆ

func (*ThreadUpdatedEvent) GetEventType() string

type ThreadedCommentResponse ΒΆ

type ThreadedCommentResponse struct {
	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 UserResponse `json:"user"`

	ControversyScore *float64 `json:"controversy_score,omitempty"`

	DeletedAt *Timestamp `json:"deleted_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"`

	Meta *RepliesMeta `json:"meta,omitempty"`

	Moderation *ModerationV2Response `json:"moderation,omitempty"`

	ReactionGroups map[string]*ReactionGroupResponse `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 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 TrackStatsResponse ΒΆ

type TrackStatsResponse struct {
	DurationSeconds int `json:"duration_seconds"`

	TrackType string `json:"track_type"`
}

type TranscriptionSettings ΒΆ

type TranscriptionSettings struct {
	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 TranslateMessageRequest ΒΆ

type TranslateMessageRequest struct {
	Language string `json:"language"`
}

type TranslationSettings ΒΆ added in v3.1.2

type TranslationSettings struct {
	Enabled bool `json:"enabled"`

	Languages []string `json:"languages"`
}

type TruncateChannelRequest ΒΆ

type TruncateChannelRequest struct {
	HardDelete  *bool           `json:"hard_delete"`
	SkipPush    *bool           `json:"skip_push"`
	TruncatedAt *Timestamp      `json:"truncated_at"`
	UserID      *string         `json:"user_id"`
	MemberIds   []string        `json:"member_ids"`
	Message     *MessageRequest `json:"message"`
	User        *UserRequest    `json:"user"`
}

type TruncateChannelResponse ΒΆ

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

	Channel *ChannelResponse `json:"channel,omitempty"`

	Message *MessageResponse `json:"message,omitempty"`
}

type TypingIndicators ΒΆ

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

type TypingIndicatorsResponse ΒΆ

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

type UnbanActionRequest ΒΆ

type UnbanActionRequest struct{}

type UnbanRequest ΒΆ

type UnbanRequest struct {
	TargetUserID string       `json:"-" query:"target_user_id"`
	ChannelCid   *string      `json:"-" query:"channel_cid"`
	CreatedBy    *string      `json:"-" query:"created_by"`
	UnbannedByID *string      `json:"unbanned_by_id"`
	UnbannedBy   *UserRequest `json:"unbanned_by"`
}

type UnbanResponse ΒΆ

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

type UnblockActionRequest ΒΆ

type UnblockActionRequest struct{}

type UnblockUserRequest ΒΆ

type UnblockUserRequest struct {
	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"`
	User          *UserRequest `json:"user"`
}

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 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 (*UnblockedUserEvent) GetEventType() string

type UndeleteMessageRequest ΒΆ

type UndeleteMessageRequest struct {
	Message       MessageRequest `json:"message"`
	SkipEnrichUrl *bool          `json:"skip_enrich_url"`
	SkipPush      *bool          `json:"skip_push"`
}

type UnfollowBatchRequest ΒΆ

type UnfollowBatchRequest struct {
	Follows []FollowPair `json:"follows"`
}

type UnfollowBatchResponse ΒΆ

type UnfollowBatchResponse struct {
	Duration string `json:"duration"`

	// List of follow relationships that were removed
	Follows []FollowResponse `json:"follows"`
}

type UnfollowRequest ΒΆ

type UnfollowRequest struct {
}

type UnfollowResponse ΒΆ

type UnfollowResponse struct {
	Duration string `json:"duration"`

	Follow FollowResponse `json:"follow"`
}

type UnmuteChannelRequest ΒΆ

type UnmuteChannelRequest struct {
	Expiration  *int         `json:"expiration"`
	UserID      *string      `json:"user_id"`
	ChannelCids []string     `json:"channel_cids"`
	User        *UserRequest `json:"user"`
}

type UnmuteRequest ΒΆ

type UnmuteRequest struct {
	TargetIds []string     `json:"target_ids"`
	UserID    *string      `json:"user_id"`
	User      *UserRequest `json:"user"`
}

type UnmuteResponse ΒΆ

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

	NonExistingUsers []string `json:"non_existing_users,omitempty"`
}

Basic response information

type UnpinActivityRequest ΒΆ

type UnpinActivityRequest struct {
	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 UpdateActivityPartialRequest ΒΆ

type UpdateActivityPartialRequest struct {
	UserID *string        `json:"user_id"`
	Unset  []string       `json:"unset"`
	Set    map[string]any `json:"set"`
	User   *UserRequest   `json:"user"`
}

type UpdateActivityPartialResponse ΒΆ

type UpdateActivityPartialResponse struct {
	Duration string `json:"duration"`

	Activity ActivityResponse `json:"activity"`
}

type UpdateActivityRequest ΒΆ

type UpdateActivityRequest struct {
	ExpiresAt       *Timestamp        `json:"expires_at"`
	PollID          *string           `json:"poll_id"`
	RestrictReplies *string           `json:"restrict_replies"`
	SkipEnrichUrl   *bool             `json:"skip_enrich_url"`
	Text            *string           `json:"text"`
	UserID          *string           `json:"user_id"`
	Visibility      *string           `json:"visibility"`
	Attachments     []Attachment      `json:"attachments"`
	CollectionRefs  []string          `json:"collection_refs"`
	Feeds           []string          `json:"feeds"`
	FilterTags      []string          `json:"filter_tags"`
	InterestTags    []string          `json:"interest_tags"`
	Custom          map[string]any    `json:"custom"`
	Location        *ActivityLocation `json:"location"`
	User            *UserRequest      `json:"user"`
}

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"`
	AutoTranslationEnabled         *bool                           `json:"auto_translation_enabled"`
	BeforeMessageSendHookUrl       *string                         `json:"before_message_send_hook_url"`
	CdnExpirationSeconds           *int                            `json:"cdn_expiration_seconds"`
	ChannelHideMembersOnly         *bool                           `json:"channel_hide_members_only"`
	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"`
	FeedsModerationEnabled         *bool                           `json:"feeds_moderation_enabled"`
	FeedsV2Region                  *string                         `json:"feeds_v2_region"`
	GuestUserCreationDisabled      *bool                           `json:"guest_user_creation_disabled"`
	ImageModerationEnabled         *bool                           `json:"image_moderation_enabled"`
	MaxAggregatedActivitiesLength  *int                            `json:"max_aggregated_activities_length"`
	MigratePermissionsToV2         *bool                           `json:"migrate_permissions_to_v2"`
	ModerationEnabled              *bool                           `json:"moderation_enabled"`
	ModerationWebhookUrl           *string                         `json:"moderation_webhook_url"`
	MultiTenantEnabled             *bool                           `json:"multi_tenant_enabled"`
	PermissionVersion              *string                         `json:"permission_version"`
	RemindersInterval              *int                            `json:"reminders_interval"`
	RemindersMaxMembers            *int                            `json:"reminders_max_members"`
	RevokeTokensIssuedBefore       *Timestamp                      `json:"revoke_tokens_issued_before"`
	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"`
	UserResponseTimeEnabled        *bool                           `json:"user_response_time_enabled"`
	WebhookUrl                     *string                         `json:"webhook_url"`
	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"`
	ApnConfig                      *APNConfig                      `json:"apn_config"`
	AsyncModerationConfig          *AsyncModerationConfiguration   `json:"async_moderation_config"`
	DatadogInfo                    *DataDogInfo                    `json:"datadog_info"`
	FileUploadConfig               *FileUploadConfig               `json:"file_upload_config"`
	FirebaseConfig                 *FirebaseConfig                 `json:"firebase_config"`
	Grants                         map[string][]string             `json:"grants"`
	HuaweiConfig                   *HuaweiConfig                   `json:"huawei_config"`
	ImageUploadConfig              *FileUploadConfig               `json:"image_upload_config"`
	ModerationDashboardPreferences *ModerationDashboardPreferences `json:"moderation_dashboard_preferences"`
	PushConfig                     *PushConfig                     `json:"push_config"`
	XiaomiConfig                   *XiaomiConfig                   `json:"xiaomi_config"`
}

type UpdateBlockListRequest ΒΆ

type UpdateBlockListRequest struct {
	IsLeetCheckEnabled   *bool    `json:"is_leet_check_enabled"`
	IsPluralCheckEnabled *bool    `json:"is_plural_check_enabled"`
	Team                 *string  `json:"team"`
	Words                []string `json:"words"`
}

type UpdateBlockListResponse ΒΆ

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

	Blocklist *BlockListResponse `json:"blocklist,omitempty"`
}

Basic response information

type UpdateBookmarkFolderRequest ΒΆ

type UpdateBookmarkFolderRequest struct {
	Name   *string        `json:"name"`
	UserID *string        `json:"user_id"`
	Custom map[string]any `json:"custom"`
	User   *UserRequest   `json:"user"`
}

type UpdateBookmarkFolderResponse ΒΆ

type UpdateBookmarkFolderResponse struct {
	Duration string `json:"duration"`

	BookmarkFolder BookmarkFolderResponse `json:"bookmark_folder"`
}

type UpdateBookmarkRequest ΒΆ

type UpdateBookmarkRequest struct {
	FolderID    *string           `json:"folder_id"`
	NewFolderID *string           `json:"new_folder_id"`
	UserID      *string           `json:"user_id"`
	Custom      map[string]any    `json:"custom"`
	NewFolder   *AddFolderRequest `json:"new_folder"`
	User        *UserRequest      `json:"user"`
}

type UpdateBookmarkResponse ΒΆ

type UpdateBookmarkResponse struct {
	Duration string `json:"duration"`

	Bookmark BookmarkResponse `json:"bookmark"`
}

type UpdateCallMembersRequest ΒΆ

type UpdateCallMembersRequest struct {
	RemoveMembers []string        `json:"remove_members"`
	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 {
	StartsAt         *Timestamp           `json:"starts_at"`
	Custom           map[string]any       `json:"custom"`
	SettingsOverride *CallSettingsRequest `json:"settings_override"`
}

type UpdateCallResponse ΒΆ

type UpdateCallResponse struct {
	Duration string `json:"duration"`

	Members []MemberResponse `json:"members"`

	OwnCapabilities []OwnCapability `json:"own_capabilities"`

	Call CallResponse `json:"call"`
}

Response for updating a call

type UpdateCallTypeRequest ΒΆ

type UpdateCallTypeRequest struct {
	ExternalStorage      *string               `json:"external_storage"`
	Grants               map[string][]string   `json:"grants"`
	NotificationSettings *NotificationSettings `json:"notification_settings"`
	Settings             *CallSettingsRequest  `json:"settings"`
}

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 NotificationSettings `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 UpdateChannelPartialRequest ΒΆ

type UpdateChannelPartialRequest struct {
	UserID *string        `json:"user_id"`
	Unset  []string       `json:"unset"`
	Set    map[string]any `json:"set"`
	User   *UserRequest   `json:"user"`
}

type UpdateChannelPartialResponse ΒΆ

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

	// List of updated members
	Members []ChannelMemberResponse `json:"members"`

	Channel *ChannelResponse `json:"channel,omitempty"`
}

type UpdateChannelRequest ΒΆ

type UpdateChannelRequest struct {
	AcceptInvite      *bool                  `json:"accept_invite"`
	Cooldown          *int                   `json:"cooldown"`
	HideHistory       *bool                  `json:"hide_history"`
	HideHistoryBefore *Timestamp             `json:"hide_history_before"`
	RejectInvite      *bool                  `json:"reject_invite"`
	SkipPush          *bool                  `json:"skip_push"`
	UserID            *string                `json:"user_id"`
	AddFilterTags     []string               `json:"add_filter_tags"`
	AddMembers        []ChannelMemberRequest `json:"add_members"`
	AddModerators     []string               `json:"add_moderators"`
	AssignRoles       []ChannelMemberRequest `json:"assign_roles"`
	DemoteModerators  []string               `json:"demote_moderators"`
	Invites           []ChannelMemberRequest `json:"invites"`
	RemoveFilterTags  []string               `json:"remove_filter_tags"`
	RemoveMembers     []string               `json:"remove_members"`
	Data              *ChannelInputRequest   `json:"data"`
	Message           *MessageRequest        `json:"message"`
	User              *UserRequest           `json:"user"`
}

type UpdateChannelResponse ΒΆ

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

	// List of channel members
	Members []ChannelMemberResponse `json:"members"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	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"`
	BlocklistBehavior              *string             `json:"blocklist_behavior"`
	ConnectEvents                  *bool               `json:"connect_events"`
	CountMessages                  *bool               `json:"count_messages"`
	CustomEvents                   *bool               `json:"custom_events"`
	DeliveryEvents                 *bool               `json:"delivery_events"`
	MarkMessagesPending            *bool               `json:"mark_messages_pending"`
	Mutes                          *bool               `json:"mutes"`
	PartitionSize                  *int                `json:"partition_size"`
	PartitionTtl                   *string             `json:"partition_ttl"`
	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"`
	Uploads                        *bool               `json:"uploads"`
	UrlEnrichment                  *bool               `json:"url_enrichment"`
	UserMessageReminders           *bool               `json:"user_message_reminders"`
	AllowedFlagReasons             []string            `json:"allowed_flag_reasons"`
	Blocklists                     []BlockListOptions  `json:"blocklists"`
	Commands                       []string            `json:"commands"`
	Permissions                    []PolicyRequest     `json:"permissions"`
	AutomodThresholds              *Thresholds         `json:"automod_thresholds"`
	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"`

	AllowedFlagReasons []string `json:"allowed_flag_reasons,omitempty"`

	Blocklists []BlockListOptions `json:"blocklists,omitempty"`

	AutomodThresholds *Thresholds `json:"automod_thresholds,omitempty"`
}

type UpdateCollectionRequest ΒΆ added in v3.5.0

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 ΒΆ added in v3.5.0

type UpdateCollectionsRequest struct {
	Collections []UpdateCollectionRequest `json:"collections"`
	UserID      *string                   `json:"user_id"`
	User        *UserRequest              `json:"user"`
}

type UpdateCollectionsResponse ΒΆ added in v3.5.0

type UpdateCollectionsResponse struct {
	Duration string `json:"duration"`

	// List of updated collections
	Collections []CollectionResponse `json:"collections"`
}

type UpdateCommandRequest ΒΆ

type UpdateCommandRequest struct {
	Description string  `json:"description"`
	Args        *string `json:"args"`
	Set         *string `json:"set"`
}

type UpdateCommandResponse ΒΆ

type UpdateCommandResponse struct {
	Duration string `json:"duration"`

	Command *Command `json:"command,omitempty"`
}

type UpdateCommentRequest ΒΆ

type UpdateCommentRequest struct {
	Comment       *string        `json:"comment"`
	SkipEnrichUrl *bool          `json:"skip_enrich_url"`
	SkipPush      *bool          `json:"skip_push"`
	UserID        *string        `json:"user_id"`
	Custom        map[string]any `json:"custom"`
	User          *UserRequest   `json:"user"`
}

type UpdateCommentResponse ΒΆ

type UpdateCommentResponse struct {
	Duration string `json:"duration"`

	Comment CommentResponse `json:"comment"`
}

type UpdateExternalStorageRequest ΒΆ

type UpdateExternalStorageRequest struct {
	Bucket         string        `json:"bucket"`
	StorageType    string        `json:"storage_type"`
	GcsCredentials *string       `json:"gcs_credentials"`
	Path           *string       `json:"path"`
	AWSS3          *S3Request    `json:"aws_s3"`
	AzureBlob      *AzureRequest `json:"azure_blob"`
}

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"`
	ActivityProcessors []ActivityProcessorConfig `json:"activity_processors"`
	ActivitySelectors  []ActivitySelectorConfig  `json:"activity_selectors"`
	Aggregation        *AggregationConfig        `json:"aggregation"`
	Custom             map[string]any            `json:"custom"`
	Notification       *NotificationConfig       `json:"notification"`
	PushNotification   *PushNotificationConfig   `json:"push_notification"`
	Ranking            *RankingConfig            `json:"ranking"`
	Stories            *StoriesConfig            `json:"stories"`
}

type UpdateFeedGroupResponse ΒΆ

type UpdateFeedGroupResponse struct {
	Duration string `json:"duration"`

	FeedGroup FeedGroupResponse `json:"feed_group"`
}

type UpdateFeedMembersRequest ΒΆ

type UpdateFeedMembersRequest struct {
	Operation string              `json:"operation"`
	Limit     *int                `json:"limit"`
	Next      *string             `json:"next"`
	Prev      *string             `json:"prev"`
	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 {
	CreatedByID *string        `json:"created_by_id"`
	Custom      map[string]any `json:"custom"`
}

type UpdateFeedResponse ΒΆ

type UpdateFeedResponse struct {
	Duration string `json:"duration"`

	Feed FeedResponse `json:"feed"`
}

type UpdateFeedViewRequest ΒΆ

type UpdateFeedViewRequest struct {
	ActivitySelectors []ActivitySelectorConfig `json:"activity_selectors"`
	Aggregation       *AggregationConfig       `json:"aggregation"`
	Ranking           *RankingConfig           `json:"ranking"`
}

type UpdateFeedViewResponse ΒΆ

type UpdateFeedViewResponse struct {
	Duration string `json:"duration"`

	FeedView FeedViewResponse `json:"feed_view"`
}

type UpdateFeedVisibilityRequest ΒΆ added in v3.4.0

type UpdateFeedVisibilityRequest struct {
	Grants map[string][]string `json:"grants"`
}

type UpdateFeedVisibilityResponse ΒΆ added in v3.4.0

type UpdateFeedVisibilityResponse struct {
	Duration string `json:"duration"`

	FeedVisibility FeedVisibilityResponse `json:"feed_visibility"`
}

type UpdateFollowRequest ΒΆ

type UpdateFollowRequest struct {
	Source                     string         `json:"source"`
	Target                     string         `json:"target"`
	CreateNotificationActivity *bool          `json:"create_notification_activity"`
	FollowerRole               *string        `json:"follower_role"`
	PushPreference             *string        `json:"push_preference"`
	SkipPush                   *bool          `json:"skip_push"`
	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"`
	MessageID string     `json:"message_id"`
	EndAt     *Timestamp `json:"end_at"`
	Latitude  *float64   `json:"latitude"`
	Longitude *float64   `json:"longitude"`
}

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 ΒΆ added in v3.1.0

type UpdateMembershipLevelRequest struct {
	Description *string        `json:"description"`
	Name        *string        `json:"name"`
	Priority    *int           `json:"priority"`
	Tags        []string       `json:"tags"`
	Custom      map[string]any `json:"custom"`
}

type UpdateMembershipLevelResponse ΒΆ added in v3.1.0

type UpdateMembershipLevelResponse struct {
	Duration string `json:"duration"`

	MembershipLevel MembershipLevelResponse `json:"membership_level"`
}

type UpdateMessagePartialRequest ΒΆ

type UpdateMessagePartialRequest struct {
	SkipEnrichUrl *bool          `json:"skip_enrich_url"`
	UserID        *string        `json:"user_id"`
	Unset         []string       `json:"unset"`
	Set           map[string]any `json:"set"`
	User          *UserRequest   `json:"user"`
}

type UpdateMessagePartialResponse ΒΆ

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

	Message *MessageResponse `json:"message,omitempty"`

	// Pending message metadata
	PendingMessageMetadata map[string]string `json:"pending_message_metadata,omitempty"`
}

type UpdateMessageRequest ΒΆ

type UpdateMessageRequest struct {
	Message       MessageRequest `json:"message"`
	SkipEnrichUrl *bool          `json:"skip_enrich_url"`
	SkipPush      *bool          `json:"skip_push"`
}

type UpdateMessageResponse ΒΆ

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

	Message MessageResponse `json:"message"`

	PendingMessageMetadata map[string]string `json:"pending_message_metadata,omitempty"`
}

Basic response information

type UpdatePollOptionRequest ΒΆ

type UpdatePollOptionRequest struct {
	ID     string         `json:"id"`
	Text   string         `json:"text"`
	UserID *string        `json:"user_id"`
	Custom map[string]any `json:"Custom"`
	User   *UserRequest   `json:"user"`
}

type UpdatePollPartialRequest ΒΆ

type UpdatePollPartialRequest struct {
	UserID *string        `json:"user_id"`
	Unset  []string       `json:"unset"`
	Set    map[string]any `json:"set"`
	User   *UserRequest   `json:"user"`
}

type UpdatePollRequest ΒΆ

type UpdatePollRequest struct {
	ID                        string              `json:"id"`
	Name                      string              `json:"name"`
	AllowAnswers              *bool               `json:"allow_answers"`
	AllowUserSuggestedOptions *bool               `json:"allow_user_suggested_options"`
	Description               *string             `json:"description"`
	EnforceUniqueVote         *bool               `json:"enforce_unique_vote"`
	IsClosed                  *bool               `json:"is_closed"`
	MaxVotesAllowed           *int                `json:"max_votes_allowed"`
	UserID                    *string             `json:"user_id"`
	VotingVisibility          *string             `json:"voting_visibility"`
	Options                   []PollOptionRequest `json:"options"`
	Custom                    map[string]any      `json:"Custom"`
	User                      *UserRequest        `json:"user"`
}

type UpdatePushNotificationPreferencesRequest ΒΆ

type UpdatePushNotificationPreferencesRequest struct {
	Preferences []PushPreferenceInput `json:"preferences"`
}

type UpdateReminderRequest ΒΆ

type UpdateReminderRequest struct {
	RemindAt *Timestamp   `json:"remind_at"`
	UserID   *string      `json:"user_id"`
	User     *UserRequest `json:"user"`
}

type UpdateReminderResponse ΒΆ

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

	Reminder ReminderResponseData `json:"reminder"`
}

Basic response information

type UpdateSIPInboundRoutingRuleRequest ΒΆ added in v3.4.0

type UpdateSIPInboundRoutingRuleRequest struct {
	Name                 string                                  `json:"name"`
	CalledNumbers        []string                                `json:"called_numbers"`
	TrunkIds             []string                                `json:"trunk_ids"`
	CallerConfigs        SIPCallerConfigsRequest                 `json:"caller_configs"`
	CallerNumbers        []string                                `json:"caller_numbers"`
	CallConfigs          *SIPCallConfigsRequest                  `json:"call_configs"`
	DirectRoutingConfigs *SIPDirectRoutingRuleCallConfigsRequest `json:"direct_routing_configs"`
	PinProtectionConfigs *SIPPinProtectionConfigsRequest         `json:"pin_protection_configs"`
	PinRoutingConfigs    *SIPInboundRoutingRulePinConfigsRequest `json:"pin_routing_configs"`
}

type UpdateSIPInboundRoutingRuleResponse ΒΆ added in v3.4.0

type UpdateSIPInboundRoutingRuleResponse struct {
	Duration string `json:"duration"`

	SipInboundRoutingRule *SIPInboundRoutingRuleResponse `json:"sip_inbound_routing_rule,omitempty"`
}

Response containing the updated SIP Inbound Routing Rule

type UpdateSIPTrunkRequest ΒΆ added in v3.4.0

type UpdateSIPTrunkRequest struct {
	Name    string   `json:"name"`
	Numbers []string `json:"numbers"`
}

type UpdateSIPTrunkResponse ΒΆ added in v3.4.0

type UpdateSIPTrunkResponse struct {
	Duration string `json:"duration"`

	SipTrunk *SIPTrunkResponse `json:"sip_trunk,omitempty"`
}

Response containing the updated SIP trunk

type UpdateThreadPartialRequest ΒΆ

type UpdateThreadPartialRequest struct {
	UserID *string        `json:"user_id"`
	Unset  []string       `json:"unset"`
	Set    map[string]any `json:"set"`
	User   *UserRequest   `json:"user"`
}

type UpdateThreadPartialResponse ΒΆ

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

	Thread ThreadResponse `json:"thread"`
}

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 {
	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 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 (*UpdatedCallPermissionsEvent) GetEventType() string

type UploadChannelFileRequest ΒΆ added in v3.2.0

type UploadChannelFileRequest struct {
	File *string     `json:"file"`
	User *OnlyUserID `json:"user"`
}

type UploadChannelFileResponse ΒΆ added in v3.2.0

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 ΒΆ added in v3.2.0

type UploadChannelImageRequest struct {
	File        *string     `json:"file"`
	UploadSizes []ImageSize `json:"upload_sizes"`
	User        *OnlyUserID `json:"user"`
}

type UploadChannelRequest ΒΆ added in v3.2.0

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 ΒΆ added in v3.2.0

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 *string     `json:"file"`
	User *OnlyUserID `json:"user"`
}

type UploadImageRequest ΒΆ

type UploadImageRequest struct {
	File        *string     `json:"file"`
	UploadSizes []ImageSize `json:"upload_sizes"`
	User        *OnlyUserID `json:"user"`
}

type UpsertActivitiesRequest ΒΆ

type UpsertActivitiesRequest struct {
	Activities []ActivityRequest `json:"activities"`
}

type UpsertActivitiesResponse ΒΆ

type UpsertActivitiesResponse struct {
	Duration string `json:"duration"`

	// List of created or updated activities
	Activities []ActivityResponse `json:"activities"`
}

type UpsertCollectionsRequest ΒΆ added in v3.5.0

type UpsertCollectionsRequest struct {
	Collections []CollectionRequest `json:"collections"`
}

type UpsertCollectionsResponse ΒΆ added in v3.5.0

type UpsertCollectionsResponse struct {
	Duration string `json:"duration"`

	// List of upserted collections
	Collections []CollectionResponse `json:"collections"`
}

type UpsertConfigRequest ΒΆ

type UpsertConfigRequest struct {
	Key                                string                              `json:"key"`
	Async                              *bool                               `json:"async"`
	Team                               *string                             `json:"team"`
	UserID                             *string                             `json:"user_id"`
	AWSRekognitionConfig               *AIImageConfig                      `json:"aws_rekognition_config"`
	AiImageConfig                      *AIImageConfig                      `json:"ai_image_config"`
	AiTextConfig                       *AITextConfig                       `json:"ai_text_config"`
	AiVideoConfig                      *AIVideoConfig                      `json:"ai_video_config"`
	AutomodPlatformCircumventionConfig *AutomodPlatformCircumventionConfig `json:"automod_platform_circumvention_config"`
	AutomodSemanticFiltersConfig       *AutomodSemanticFiltersConfig       `json:"automod_semantic_filters_config"`
	AutomodToxicityConfig              *AutomodToxicityConfig              `json:"automod_toxicity_config"`
	BlockListConfig                    *BlockListConfig                    `json:"block_list_config"`
	BodyguardConfig                    *AITextConfig                       `json:"bodyguard_config"`
	GoogleVisionConfig                 *GoogleVisionConfig                 `json:"google_vision_config"`
	LlmConfig                          *LLMConfig                          `json:"llm_config"`
	RuleBuilderConfig                  *RuleBuilderConfig                  `json:"rule_builder_config"`
	User                               *UserRequest                        `json:"user"`
	VelocityFilterConfig               *VelocityFilterConfig               `json:"velocity_filter_config"`
	VideoCallRuleConfig                *VideoCallRuleConfig                `json:"video_call_rule_config"`
}

type UpsertConfigResponse ΒΆ

type UpsertConfigResponse struct {
	Duration string `json:"duration"`

	Config *ConfigResponse `json:"config,omitempty"`
}

type UpsertModerationRuleRequest ΒΆ added in v3.1.1

type UpsertModerationRuleRequest struct {
	Name           string                      `json:"name"`
	RuleType       string                      `json:"rule_type"`
	Action         RuleBuilderAction           `json:"action"`
	CooldownPeriod *string                     `json:"cooldown_period"`
	Description    *string                     `json:"description"`
	Enabled        *bool                       `json:"enabled"`
	Logic          *string                     `json:"logic"`
	Team           *string                     `json:"team"`
	Conditions     []RuleBuilderCondition      `json:"conditions"`
	ConfigKeys     []string                    `json:"config_keys"`
	Groups         []RuleBuilderConditionGroup `json:"groups"`
}

type UpsertModerationRuleResponse ΒΆ added in v3.1.1

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"`

	Config FeedsModerationTemplateConfig `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"`

	Config *FeedsModerationTemplateConfig `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]*ChannelPushPreferences `json:"user_channel_preferences"`

	// The user preferences, always returned regardless if you edited it
	UserPreferences map[string]*PushPreferences `json:"user_preferences"`
}

type UpsertPushProviderRequest ΒΆ

type UpsertPushProviderRequest struct {
	PushProvider *PushProvider `json:"push_provider"`
}

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 {
	EventType        string  `json:"event_type"`
	PushProviderType string  `json:"push_provider_type"`
	EnablePush       *bool   `json:"enable_push"`
	PushProviderName *string `json:"push_provider_name"`
	Template         *string `json:"template"`
}

type UpsertPushTemplateResponse ΒΆ

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

	Template *PushTemplate `json:"template,omitempty"`
}

Basic response information

type User ΒΆ

type User struct {
	ID string `json:"id"`

	BanExpires *Timestamp `json:"ban_expires,omitempty"`

	Banned *bool `json:"banned,omitempty"`

	Invisible *bool `json:"invisible,omitempty"`

	Language *string `json:"language,omitempty"`

	RevokeTokensIssuedBefore *Timestamp `json:"revoke_tokens_issued_before,omitempty"`

	Role *string `json:"role,omitempty"`

	Teams []string `json:"teams,omitempty"`

	Custom map[string]any `json:"custom,omitempty"`

	PrivacySettings *PrivacySettings `json:"privacy_settings,omitempty"`

	TeamsRole map[string]string `json:"teams_role,omitempty"`
}

type UserBannedEvent ΒΆ

type UserBannedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Shadow bool `json:"shadow"`

	CreatedBy User `json:"created_by"`

	Type string `json:"type"`

	Expiration *Timestamp `json:"expiration,omitempty"`

	Reason *string `json:"reason,omitempty"`

	Team *string `json:"team,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*UserBannedEvent) GetEventType ΒΆ

func (*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 ΒΆ added in v3.1.1

type UserCustomPropertyParameters struct {
	Operator *string `json:"operator,omitempty"`

	PropertyKey *string `json:"property_key,omitempty"`
}

type UserDeactivatedEvent ΒΆ

type UserDeactivatedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	CreatedBy User `json:"created_by"`

	Type string `json:"type"`

	User *User `json:"user,omitempty"`
}

func (*UserDeactivatedEvent) GetEventType ΒΆ

func (*UserDeactivatedEvent) GetEventType() string

type UserDeletedEvent ΒΆ

type UserDeletedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	DeleteConversationChannels bool `json:"delete_conversation_channels"`

	HardDelete bool `json:"hard_delete"`

	MarkMessagesDeleted bool `json:"mark_messages_deleted"`

	Type string `json:"type"`

	User *User `json:"user,omitempty"`
}

func (*UserDeletedEvent) GetEventType ΒΆ

func (*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 {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	TargetUser *string `json:"target_user,omitempty"`

	TargetUsers []string `json:"target_users,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*UserFlaggedEvent) GetEventType ΒΆ

func (*UserFlaggedEvent) GetEventType() string

type UserMessagesDeletedEvent ΒΆ added in v3.1.0

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 ΒΆ added in v3.1.0

func (*UserMessagesDeletedEvent) GetEventType() string

type UserMute ΒΆ

type UserMute 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"`

	Target *User `json:"target,omitempty"`

	User *User `json:"user,omitempty"`
}

type UserMuteResponse ΒΆ

type UserMuteResponse struct {
	CreatedAt Timestamp `json:"created_at"`

	UpdatedAt Timestamp `json:"updated_at"`

	Expires *Timestamp `json:"expires,omitempty"`

	Target *UserResponse `json:"target,omitempty"`

	User *UserResponse `json:"user,omitempty"`
}

type UserMutedEvent ΒΆ

type UserMutedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	TargetUser *string `json:"target_user,omitempty"`

	TargetUsers []string `json:"target_users,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*UserMutedEvent) GetEventType ΒΆ

func (*UserMutedEvent) GetEventType() string

type UserRatingReportResponse ΒΆ

type UserRatingReportResponse struct {
	Average float64 `json:"average"`

	Count int `json:"count"`
}

type UserReactivatedEvent ΒΆ

type UserReactivatedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	User *User `json:"user,omitempty"`
}

func (*UserReactivatedEvent) GetEventType ΒΆ

func (*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"`

	// 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 UserRuleParameters ΒΆ

type UserRuleParameters struct {
	MaxAge *string `json:"max_age,omitempty"`
}

type UserUnbannedEvent ΒΆ

type UserUnbannedEvent struct {
	ChannelID string `json:"channel_id"`

	ChannelType string `json:"channel_type"`

	Cid string `json:"cid"`

	CreatedAt Timestamp `json:"created_at"`

	Shadow bool `json:"shadow"`

	Type string `json:"type"`

	Team *string `json:"team,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*UserUnbannedEvent) GetEventType ΒΆ

func (*UserUnbannedEvent) GetEventType() string

type UserUnmutedEvent ΒΆ

type UserUnmutedEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Type string `json:"type"`

	TargetUser *string `json:"target_user,omitempty"`

	TargetUsers []string `json:"target_users,omitempty"`

	User *User `json:"user,omitempty"`
}

func (*UserUnmutedEvent) GetEventType ΒΆ

func (*UserUnmutedEvent) GetEventType() string

type UserUnreadReminderEvent ΒΆ

type UserUnreadReminderEvent struct {
	CreatedAt Timestamp `json:"created_at"`

	Channels map[string]*ChannelMessages `json:"channels"`

	Type string `json:"type"`

	User *User `json:"user,omitempty"`
}

func (*UserUnreadReminderEvent) GetEventType ΒΆ

func (*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 (*UserUpdatedEvent) GetEventType() string

type V2DeleteTemplateRequest ΒΆ

type V2DeleteTemplateRequest struct {
}

type V2QueryTemplatesRequest ΒΆ

type V2QueryTemplatesRequest struct {
}

type V2UpsertTemplateRequest ΒΆ

type V2UpsertTemplateRequest struct {
	Name   string                        `json:"name"`
	Config FeedsModerationTemplateConfig `json:"config"`
}

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 ΒΆ added in v3.4.0

Create a new SIP Inbound Routing Rule with either direct routing or PIN routing configuration

func (*VideoClient) CreateSIPTrunk ΒΆ added in v3.4.0

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 ΒΆ added in v3.4.0

Delete a SIP Inbound Routing Rule for the application

func (*VideoClient) DeleteSIPTrunk ΒΆ added in v3.4.0

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) GetCallReport ΒΆ

func (c *VideoClient) GetCallReport(ctx context.Context, _type string, id string, request *GetCallReportRequest) (*StreamResponse[GetCallReportResponse], error)

func (*VideoClient) GetCallSessionParticipantStatsDetails ΒΆ added in v3.3.0

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 ΒΆ added in v3.3.0

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 ΒΆ added in v3.7.0

func (c *VideoClient) GetCallStatsMap(ctx context.Context, callType string, callID string, session string, request *GetCallStatsMapRequest) (*StreamResponse[QueryCallStatsMapResponse], error)

func (*VideoClient) GetCallType ΒΆ

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 ΒΆ added in v3.1.0

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 ΒΆ added in v3.4.0

List all SIP Inbound Routing Rules for the application

func (*VideoClient) ListSIPTrunks ΒΆ added in v3.4.0

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) QueryCallParticipants ΒΆ

Returns a list of participants connected to the call

func (*VideoClient) QueryCallSessionParticipantStats ΒΆ added in v3.2.0

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) ResolveSipInbound ΒΆ added in v3.4.0

Resolve SIP inbound routing based on trunk number, caller number, and challenge authentication

func (*VideoClient) RingCall ΒΆ added in v3.5.0

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 ΒΆ added in v3.1.1

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, 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, 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 ΒΆ added in v3.4.0

Update an existing SIP Inbound Routing Rule with new configuration

func (*VideoClient) UpdateSIPTrunk ΒΆ added in v3.4.0

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 {
	HarmLabels []string `json:"harm_labels,omitempty"`
}

type VideoEndCallRequest ΒΆ

type VideoEndCallRequest struct{}

type VideoKickUserRequest ΒΆ

type VideoKickUserRequest struct{}

type VideoPinRequest ΒΆ

type VideoPinRequest struct {
	SessionID string `json:"session_id"`
	UserID    string `json:"user_id"`
}

type VideoReactionOverTimeResponse ΒΆ

type VideoReactionOverTimeResponse struct {
	ByMinute []CountByMinuteResponse `json:"by_minute,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 {
	SessionID string `json:"session_id"`
	UserID    string `json:"user_id"`
}

type VoteData ΒΆ

type VoteData struct {
	AnswerText *string `json:"answer_text,omitempty"`

	OptionID *string `json:"option_id,omitempty"`
}

type WHIPIngress ΒΆ added in v3.1.2

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"`

	Channel *ChannelResponse `json:"channel,omitempty"`

	CreatedBy *UserResponse `json:"created_by,omitempty"`

	Me *OwnUserResponse `json:"me,omitempty"`

	Member *ChannelMemberResponse `json:"member,omitempty"`

	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 *UserResponse `json:"user,omitempty"`
}

Represents an BaseEvent that happened in Stream Chat

type WebhookEvent ΒΆ

type WebhookEvent struct {
	Type string `json:"type"`
}

The discriminator object for all webhook events, it maps events' payload to the final type

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