getstream

package module
v0.0.0-...-bd79ff1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: BSD-3-Clause Imports: 19 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.

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 {
	Enabled bool `json:"enabled"`

	Rules []AWSRekognitionRule `json:"rules"`

	Async *bool `json:"async,omitempty"`
}

type AITextConfig ΒΆ

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

	Profile string `json:"profile"`

	Rules []BodyguardRule `json:"rules"`

	SeverityRules []BodyguardSeverityRule `json:"severity_rules"`

	Async *bool `json:"async,omitempty"`
}

type AIVideoConfig ΒΆ

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

	Rules []AWSRekognitionRule `json:"rules"`

	Async *bool `json:"async,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"`

	NotificationTemplate string `json:"notification_template"`

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

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

type AWSRekognitionRule ΒΆ

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

	Label string `json:"label"`

	MinConfidence float64 `json:"min_confidence"`
}

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

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

	ID string `json:"id"`

	Reason string `json:"reason"`

	ReporterType string `json:"reporter_type"`

	ReviewQueueItemID string `json:"review_queue_item_id"`

	TargetUserID string `json:"target_user_id"`

	Type string `json:"type"`

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

	ReviewQueueItem *ReviewQueueItem `json:"review_queue_item,omitempty"`

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

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

type ActionLogResponse ΒΆ

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

	ID string `json:"id"`

	Reason string `json:"reason"`

	TargetUserID string `json:"target_user_id"`

	UserID string `json:"user_id"`

	Type string `json:"type"`

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

	ReviewQueueItem *ReviewQueueItem `json:"review_queue_item,omitempty"`

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

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

type AggregatedStats ΒΆ

type AggregatedStats struct {
	CountrywiseAggregateStats map[string]*CountrywiseAggregateStats `json:"countrywise_aggregate_stats,omitempty"`

	PublisherAggregateStats *PublisherAggregateStats `json:"publisher_aggregate_stats,omitempty"`

	Turn *TURNAggregatedStats `json:"turn,omitempty"`
}

type AnyEvent ΒΆ

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

	Type string `json:"type"`
}

type AppResponseFields ΒΆ

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

	ImageModerationEnabled bool `json:"image_moderation_enabled"`

	ModerationEnabled bool `json:"moderation_enabled"`

	ModerationWebhookUrl string `json:"moderation_webhook_url"`

	MultiTenantEnabled bool `json:"multi_tenant_enabled"`

	Name string `json:"name"`

	Organization string `json:"organization"`

	PermissionVersion string `json:"permission_version"`

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

	WebhookUrl string `json:"webhook_url"`

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

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

	// The latitude of the location
	Latitude *float64 `json:"latitude,omitempty"`

	// The longitude of the location
	Longitude *float64 `json:"longitude,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"`

	// If the user has stopped sharing their location
	StoppedSharing *bool `json:"stopped_sharing,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"`

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

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

	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 {
	Enabled bool `json:"enabled"`

	Rules []AutomodRule `json:"rules"`

	Async *bool `json:"async,omitempty"`
}

type AutomodRule ΒΆ

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

	Label string `json:"label"`

	Threshold float64 `json:"threshold"`
}

type AutomodSemanticFiltersConfig ΒΆ

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

	Rules []AutomodSemanticFiltersRule `json:"rules"`

	Async *bool `json:"async,omitempty"`
}

type AutomodSemanticFiltersRule ΒΆ

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

	Name string `json:"name"`

	Threshold float64 `json:"threshold"`
}

type AutomodToxicityConfig ΒΆ

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

	Rules []AutomodRule `json:"rules"`

	Async *bool `json:"async,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"`

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

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

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

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

type BanRequest ΒΆ

type BanRequest struct {
	TargetUserID string       `json:"target_user_id"`
	BannedByID   *string      `json:"banned_by_id"`
	ChannelCid   *string      `json:"channel_cid"`
	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 BlockListConfig ΒΆ

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

	Rules []BlockListRule `json:"rules"`

	Async *bool `json:"async,omitempty"`
}

type BlockListOptions ΒΆ

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

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

type BlockListResponse ΒΆ

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

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

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

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

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

	Label string `json:"label"`

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

type BodyguardSeverityRule ΒΆ

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

	Severity string `json:"severity"`
}

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

func (c *Call) CollectUserFeedback(ctx context.Context, session string, request *CollectUserFeedbackRequest) (*StreamResponse[CollectUserFeedbackResponse], 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) GetCallStats ΒΆ

func (c *Call) GetCallStats(ctx context.Context, session string, request *GetCallStatsRequest) (*StreamResponse[GetCallStatsResponse], error)

func (*Call) GetOrCreate ΒΆ

func (*Call) GoLive ΒΆ

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

func (*Call) ListRecordings ΒΆ

func (*Call) MuteUsers ΒΆ

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

func (*Call) SendCallEvent ΒΆ

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

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.

type CallClosedCaption ΒΆ

type CallClosedCaption struct {
	EndTime Timestamp `json:"end_time"`

	SpeakerID string `json:"speaker_id"`

	StartTime Timestamp `json:"start_time"`

	Text string `json:"text"`

	User UserResponse `json:"user"`
}

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

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

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

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

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

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

	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

type CallEvent ΒΆ

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

	EndTimestamp int `json:"end_timestamp"`

	Internal bool `json:"internal"`

	Kind string `json:"kind"`

	Severity int `json:"severity"`

	Timestamp int `json:"timestamp"`

	Type string `json:"type"`

	Category *string `json:"category,omitempty"`

	Component *string `json:"component,omitempty"`

	IssueTags []string `json:"issue_tags,omitempty"`
}

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

type CallHLSBroadcastingStartedEvent ΒΆ

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

	CreatedAt Timestamp `json:"created_at"`

	HLSPlaylistUrl string `json:"hls_playlist_url"`

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

This event is sent when HLS broadcasting has started

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

type CallIngressResponse ΒΆ

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

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.

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

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

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

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

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

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

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

type CallRecording ΒΆ

type CallRecording struct {
	EndTime Timestamp `json:"end_time"`

	Filename string `json:"filename"`

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

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

This event is sent when call recording has failed

type CallRecordingReadyEvent ΒΆ

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

	CreatedAt Timestamp `json:"created_at"`

	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

type CallRecordingStartedEvent ΒΆ

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

	CreatedAt Timestamp `json:"created_at"`

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

This event is sent when call recording has started

type CallRecordingStoppedEvent ΒΆ

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

	CreatedAt Timestamp `json:"created_at"`

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

This event is sent when call recording has stopped

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

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

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

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

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

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

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

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

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

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

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

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

This event is sent when a participant leaves a call session

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

type CallSettings ΒΆ

type CallSettings struct {
	Audio *AudioSettings `json:"audio,omitempty"`

	Backstage *BackstageSettings `json:"backstage,omitempty"`

	Broadcasting *BroadcastSettings `json:"broadcasting,omitempty"`

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

	Limits *LimitsSettings `json:"limits,omitempty"`

	Recording *RecordSettings `json:"recording,omitempty"`

	Ring *RingSettings `json:"ring,omitempty"`

	Screensharing *ScreensharingSettings `json:"screensharing,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"`

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

	Limits *LimitsSettingsRequest `json:"limits,omitempty"`

	Recording *RecordSettingsRequest `json:"recording,omitempty"`

	Ring *RingSettingsRequest `json:"ring,omitempty"`

	Screensharing *ScreensharingSettingsRequest `json:"screensharing,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"`

	Geofencing GeofenceSettingsResponse `json:"geofencing"`

	Limits LimitsSettingsResponse `json:"limits"`

	Recording RecordSettingsResponse `json:"recording"`

	Ring RingSettingsResponse `json:"ring"`

	Screensharing ScreensharingSettingsResponse `json:"screensharing"`

	Thumbnails ThumbnailsSettingsResponse `json:"thumbnails"`

	Transcription TranscriptionSettingsResponse `json:"transcription"`

	Video VideoSettingsResponse `json:"video"`
}

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

type CallTimeline struct {
	Events []CallEvent `json:"events"`
}

type CallTranscription ΒΆ

type CallTranscription struct {
	EndTime Timestamp `json:"end_time"`

	Filename string `json:"filename"`

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

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

This event is sent when call transcription has failed

type CallTranscriptionReadyEvent ΒΆ

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

	CreatedAt Timestamp `json:"created_at"`

	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

type CallTranscriptionStartedEvent ΒΆ

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

	CreatedAt Timestamp `json:"created_at"`

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

This event is sent when call transcription has started

type CallTranscriptionStoppedEvent ΒΆ

type CallTranscriptionStoppedEvent 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 transcription has stopped

type CallType ΒΆ

type CallType struct {
	AppPK int `json:"AppPK"`

	CreatedAt Timestamp `json:"CreatedAt"`

	ExternalStorage string `json:"ExternalStorage"`

	Name string `json:"Name"`

	PK int `json:"PK"`

	UpdatedAt Timestamp `json:"UpdatedAt"`

	NotificationSettings *NotificationSettings `json:"NotificationSettings,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.ended" 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.

type CallUserMutedEvent ΒΆ

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

	CreatedAt Timestamp `json:"created_at"`

	FromUserID string `json:"from_user_id"`

	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

type CallsPerDayReport ΒΆ

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

type CallsPerDayReportResponse ΒΆ

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

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

type CampaignCompletedEvent ΒΆ

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

	Type string `json:"type"`

	ReceivedAt *Timestamp `json:"received_at,omitempty"`

	Campaign *CampaignResponse `json:"campaign,omitempty"`
}

type CampaignMessageTemplate ΒΆ

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

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

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

	Type string `json:"type"`

	ReceivedAt *Timestamp `json:"received_at,omitempty"`

	Campaign *CampaignResponse `json:"campaign,omitempty"`
}

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

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

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

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

	Team *string `json:"team,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"`

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

type ChannelConfig ΒΆ

type ChannelConfig struct {
	Automod string `json:"automod"`

	AutomodBehavior string `json:"automod_behavior"`

	ConnectEvents bool `json:"connect_events"`

	CreatedAt Timestamp `json:"created_at"`

	CustomEvents bool `json:"custom_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"`

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

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

	CreatedAt Timestamp `json:"created_at"`

	CustomEvents bool `json:"custom_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"`

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

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

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

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

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

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

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

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

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

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

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

type ChannelMember ΒΆ

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

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

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

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"
	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_TYPING_EVENTS     ChannelOwnCapability = "send-typing-events"
	SET_CHANNEL_COOLDOWN   ChannelOwnCapability = "set-channel-cooldown"
	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 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"`

	// 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 channel members (max 100)
	Members []ChannelMember `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 []ChannelMember `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"`

	PendingMessages []PendingMessageResponse `json:"pending_messages,omitempty"`

	Read []ReadStateResponse `json:"read,omitempty"`

	Watchers []UserResponse `json:"watchers,omitempty"`

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

	Membership *ChannelMember `json:"membership,omitempty"`
}

type ChannelStateResponseFields ΒΆ

type ChannelStateResponseFields struct {
	// List of channel members
	Members []ChannelMember `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"`

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

	Membership *ChannelMember `json:"membership,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"`
}

type ChannelTypeConfig ΒΆ

type ChannelTypeConfig struct {
	Automod string `json:"automod"`

	AutomodBehavior string `json:"automod_behavior"`

	ConnectEvents bool `json:"connect_events"`

	CreatedAt Timestamp `json:"created_at"`

	CustomEvents bool `json:"custom_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"`

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

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

type ChannelUnmutedEvent ΒΆ

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

	Type string `json:"type"`
}

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

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

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

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

func (*Channels) DeleteImage ΒΆ

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

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

func (c *Channels) UpdateMemberPartial(ctx context.Context, userID string, request *UpdateMemberPartialRequest) (*StreamResponse[UpdateMemberPartialResponse], error)

func (*Channels) UploadFile ΒΆ

func (*Channels) UploadImage ΒΆ

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: - poll.vote_casted

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

func (*ChatClient) CreateChannelType ΒΆ

Creates new channel type

func (*ChatClient) CreateCommand ΒΆ

Creates custom chat command

func (*ChatClient) CreatePoll ΒΆ

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

Creates a new poll

func (*ChatClient) CreatePollOption ΒΆ

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

Creates a poll option

Sends events: - poll.updated

func (*ChatClient) DeleteChannel ΒΆ

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

Deletes channel

Sends events: - channel.deleted

func (*ChatClient) DeleteChannelType ΒΆ

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

Deletes channel type

func (*ChatClient) DeleteChannels ΒΆ

Allows to delete several channels at once asynchronously

Sends events: - channel.deleted

func (*ChatClient) DeleteCommand ΒΆ

Deletes custom chat command

func (*ChatClient) DeleteFile ΒΆ

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

Deletes previously uploaded file

func (*ChatClient) DeleteImage ΒΆ

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

Deletes previously uploaded image

func (*ChatClient) DeleteMessage ΒΆ

Deletes message

Sends events: - message.deleted

func (*ChatClient) DeletePoll ΒΆ

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

Deletes a poll

Sends events: - poll.deleted

func (*ChatClient) DeletePollOption ΒΆ

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

Deletes a poll option

Sends events: - poll.updated

func (*ChatClient) DeleteReaction ΒΆ

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

Removes user reaction from the message

Sends events: - reaction.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) 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) GetManyMessages ΒΆ

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

Returns list messages found by IDs

func (*ChatClient) GetMessage ΒΆ

Returns message by ID

func (*ChatClient) GetOrCreateChannel ΒΆ

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

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

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

func (*ChatClient) GetOrCreateDistinctChannel ΒΆ

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

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

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

func (*ChatClient) GetPoll ΒΆ

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

Retrieves a poll

func (*ChatClient) GetPollOption ΒΆ

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

Retrieves a poll option

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

func (*ChatClient) ListChannelTypes ΒΆ

Lists all available channel types

func (*ChatClient) ListCommands ΒΆ

Returns all custom commands

func (*ChatClient) MarkChannelsRead ΒΆ

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

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

Sends events: - message.read

func (*ChatClient) MarkRead ΒΆ

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

Marks channel as read up to the specific message

Sends events: - message.read

func (*ChatClient) MarkUnread ΒΆ

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

Marks channel as unread from a specific message

func (*ChatClient) MuteChannel ΒΆ

Mutes channel for user

Sends events: - channel.muted

func (*ChatClient) QueryBannedUsers ΒΆ

Find and filter channel scoped or global user bans

func (*ChatClient) QueryCampaigns ΒΆ

Query campaigns

func (*ChatClient) QueryChannels ΒΆ

Query channels with filter query

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

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

Queries votes

func (*ChatClient) QueryPolls ΒΆ

Queries polls

func (*ChatClient) QueryReactions ΒΆ

Get reactions on a message

func (*ChatClient) QuerySegmentTargets ΒΆ

Query segment targets

func (*ChatClient) QuerySegments ΒΆ

Query segments

func (*ChatClient) QueryThreads ΒΆ

Returns the list of threads for specific user

func (*ChatClient) RemovePollVote ΒΆ

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

Delete a vote from a poll

Sends events: - poll.vote_removed

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

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

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

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

func (*ChatClient) TruncateChannel ΒΆ

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

Truncates channel

Sends events: - channel.truncated

func (*ChatClient) UndeleteMessage ΒΆ

Undelete a message that was previously soft-deleted

Sends events: - message.undeleted

func (*ChatClient) UnmuteChannel ΒΆ

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

Unmutes channel for user

Sends events: - channel.unmuted

func (*ChatClient) UnreadCounts ΒΆ

Fetch unread counts for a single user

func (*ChatClient) UnreadCountsBatch ΒΆ

Fetch unread counts in batch for multiple users in one call

func (*ChatClient) UpdateChannel ΒΆ

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

Change channel data

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

func (*ChatClient) UpdateChannelPartial ΒΆ

Updates certain fields of the channel

Sends events: - channel.updated

func (*ChatClient) UpdateChannelType ΒΆ

Updates channel type

func (*ChatClient) UpdateCommand ΒΆ

Updates custom chat command

func (*ChatClient) UpdateMemberPartial ΒΆ

func (c *ChatClient) UpdateMemberPartial(ctx context.Context, userID string, _type string, id string, request *UpdateMemberPartialRequest) (*StreamResponse[UpdateMemberPartialResponse], error)

func (*ChatClient) UpdateMessage ΒΆ

Updates message with new data

Sends events: - message.updated

func (*ChatClient) UpdateMessagePartial ΒΆ

Updates certain fields of the message

Sends events: - message.updated

func (*ChatClient) UpdatePoll ΒΆ

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

Updates a poll

Sends events: - poll.closed - poll.updated

func (*ChatClient) UpdatePollOption ΒΆ

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

Updates a poll option

Sends events: - poll.updated

func (*ChatClient) UpdatePollPartial ΒΆ

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

Updates a poll partially

Sends events: - poll.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

func (*ChatClient) UploadFile ΒΆ

func (c *ChatClient) UploadFile(ctx context.Context, _type string, id string, request *UploadFileRequest) (*StreamResponse[FileUploadResponse], error)

Uploads file

func (*ChatClient) UploadImage ΒΆ

func (c *ChatClient) UploadImage(ctx context.Context, _type string, id string, request *UploadImageRequest) (*StreamResponse[ImageUploadResponse], 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"`
	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"`

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

type CheckResponse ΒΆ

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

	RecommendedAction string `json:"recommended_action"`

	Status string `json:"status"`

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

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

Basic response information

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

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

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

Find and filter users

func (*Client) ReactivateUser ΒΆ

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

Activates user who's been deactivated previously

Sends events: - user.reactivated

func (*Client) ReactivateUsers ΒΆ

Reactivate users in batches

Sends events: - user.reactivated

func (*Client) 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[Response], error)

Updates contents of the block list

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

func (*Client) UpsertPushProvider ΒΆ

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

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

type CollectUserFeedbackRequest ΒΆ

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

type CommitMessageRequest struct {
}

type ConfigOverrides ΒΆ

type ConfigOverrides struct {
	Commands []string `json:"commands"`

	Grants map[string][]string `json:"grants"`

	Blocklist *string `json:"blocklist,omitempty"`

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

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

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

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

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

	TypingEvents *bool `json:"typing_events,omitempty"`

	Uploads *bool `json:"uploads,omitempty"`

	UrlEnrichment *bool `json:"url_enrichment,omitempty"`
}

type ConfigResponse ΒΆ

type ConfigResponse struct {
	Async bool `json:"async"`

	CreatedAt Timestamp `json:"created_at"`

	Key string `json:"key"`

	Team string `json:"team"`

	UpdatedAt Timestamp `json:"updated_at"`

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

	VelocityFilterConfig *VelocityFilterConfig `json:"velocity_filter_config,omitempty"`
}

type Coordinates ΒΆ

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

	Longitude float64 `json:"longitude"`
}

type Count ΒΆ

type Count struct {
	Approximate bool `json:"approximate"`

	Value int `json:"value"`
}

type CountrywiseAggregateStats ΒΆ

type CountrywiseAggregateStats struct {
	ParticipantCount *Count `json:"participant_count,omitempty"`

	PublisherJitter *TimeStats `json:"publisher_jitter,omitempty"`

	PublisherLatency *TimeStats `json:"publisher_latency,omitempty"`

	SubscriberJitter *TimeStats `json:"subscriber_jitter,omitempty"`

	SubscriberLatency *TimeStats `json:"subscriber_latency,omitempty"`
}

type CreateBlockListRequest ΒΆ

type CreateBlockListRequest struct {
	Name  string   `json:"name"`
	Words []string `json:"words"`
	Type  *string  `json:"type"`
}

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"`
	CustomEvents                   *bool               `json:"custom_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"`
	SkipLastMsgUpdateForSystemMsgs *bool               `json:"skip_last_msg_update_for_system_msgs"`
	TypingEvents                   *bool               `json:"typing_events"`
	Uploads                        *bool               `json:"uploads"`
	UrlEnrichment                  *bool               `json:"url_enrichment"`
	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"`

	CreatedAt Timestamp `json:"created_at"`

	CustomEvents bool `json:"custom_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"`

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

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

type CreatePollOptionRequest struct {
	Text     string         `json:"text"`
	Position *int           `json:"position"`
	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 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 CustomActionRequest ΒΆ

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

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

type CustomCheckFlag ΒΆ

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

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

	Labels []string `json:"labels,omitempty"`

	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 of the request in milliseconds
	Duration string `json:"duration"`

	ID string `json:"id"`

	Status string `json:"status"`

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

Basic response information

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.

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

type DeleteActivityRequest struct {
	HardDelete *bool `json:"hard_delete,omitempty"`
}

type DeleteBlockListRequest ΒΆ

type DeleteBlockListRequest struct {
}

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

type DeleteCommandRequest struct {
}

type DeleteCommandResponse ΒΆ

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

	// Command name
	Name string `json:"name"`
}

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

type DeleteExternalStorageRequest struct {
}

type DeleteExternalStorageResponse ΒΆ

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

Basic response information

type DeleteFileRequest ΒΆ

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

type DeleteImageRequest ΒΆ

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

type DeleteMessageRequest ΒΆ

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

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 of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

type DeleteModerationTemplateResponse ΒΆ

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

Basic response information

type DeletePollOptionRequest ΒΆ

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

type DeletePollRequest ΒΆ

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

type DeletePushProviderRequest ΒΆ

type DeletePushProviderRequest struct {
}

type DeleteReactionRequest ΒΆ

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

type DeleteRecordingRequest ΒΆ

type DeleteRecordingRequest struct {
}

type DeleteRecordingResponse ΒΆ

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

Response for DeleteRecording

type DeleteRoleRequest ΒΆ

type DeleteRoleRequest struct {
}

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

type DeleteUsersRequest ΒΆ

type DeleteUsersRequest struct {
	UserIds           []string `json:"user_ids"`
	Calls             *string  `json:"calls"`
	Conversations     *string  `json:"conversations"`
	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 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 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"`
}

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

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

type EntityCreator struct {
	BanCount int `json:"ban_count"`

	Banned bool `json:"banned"`

	DeletedContentCount int `json:"deleted_content_count"`

	ID string `json:"id"`

	Online bool `json:"online"`

	Role string `json:"role"`

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

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

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

	DeactivatedAt *Timestamp `json:"deactivated_at,omitempty"`

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

	Invisible *bool `json:"invisible,omitempty"`

	Language *string `json:"language,omitempty"`

	LastActive *Timestamp `json:"last_active,omitempty"`

	LastEngagedAt *Timestamp `json:"last_engaged_at,omitempty"`

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

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

	Teams []string `json:"teams,omitempty"`

	PrivacySettings *PrivacySettings `json:"privacy_settings,omitempty"`

	PushNotifications *PushNotificationSettings `json:"push_notifications,omitempty"`
}

type EntityCreatorResponse ΒΆ

type EntityCreatorResponse struct {
	BanCount int `json:"ban_count"`

	// Whether a user is banned or not
	Banned bool `json:"banned"`

	// Date/time of creation
	CreatedAt Timestamp `json:"created_at"`

	DeletedContentCount int `json:"deleted_content_count"`

	// 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 devices user is using
	Devices []DeviceResponse `json:"devices"`

	// List of teams user is a part of
	Teams []string `json:"teams"`

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

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

	PrivacySettings *PrivacySettingsResponse `json:"privacy_settings,omitempty"`

	PushNotifications *PushNotificationSettingsResponse `json:"push_notifications,omitempty"`
}

User response object

type ErrorResult ΒΆ

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

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

	Version *string `json:"version,omitempty"`
}

type EventNotificationSettings ΒΆ

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

	APNS APNS `json:"apns"`
}

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

type ExportChannelsResult struct {
	// URL of result
	Url string `json:"url"`

	// S3 path of result
	Path *string `json:"path,omitempty"`

	// S3 bucket name result
	S3BucketName *string `json:"s3_bucket_name,omitempty"`
}

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

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

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

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 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 {
	ApnTemplate string `json:"apn_template"`

	DataTemplate string `json:"data_template"`

	Enabled bool `json:"enabled"`

	NotificationTemplate string `json:"notification_template"`

	CredentialsJson *string `json:"credentials_json,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 Flag2 ΒΆ

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

	EntityID string `json:"entity_id"`

	EntityType string `json:"entity_type"`

	UpdatedAt Timestamp `json:"updated_at"`

	Result []map[string]any `json:"result"`

	EntityCreatorID *string `json:"entity_creator_id,omitempty"`

	ModerationPayloadHash *string `json:"moderation_payload_hash,omitempty"`

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

	ReviewQueueItemID *string `json:"review_queue_item_id,omitempty"`

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

	Labels []string `json:"labels,omitempty"`

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

	ModerationPayload *ModerationPayload `json:"moderation_payload,omitempty"`

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

type Flag2Response ΒΆ

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

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

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

	Labels []string `json:"labels,omitempty"`

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

	ModerationPayload *ModerationPayload `json:"moderation_payload,omitempty"`

	User *UserResponse `json:"user,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 of the request in milliseconds
	Duration string `json:"duration"`

	ItemID string `json:"item_id"`
}

Basic response information

type FlagUpdatedEvent ΒΆ

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

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

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

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

	PushNotifications *PushNotificationSettingsResponse `json:"push_notifications,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 GeolocationResult ΒΆ

type GeolocationResult struct {
	AccuracyRadius int `json:"accuracy_radius"`

	City string `json:"city"`

	Continent string `json:"continent"`

	ContinentCode string `json:"continent_code"`

	Country string `json:"country"`

	CountryIsoCode string `json:"country_iso_code"`

	Latitude float64 `json:"latitude"`

	Longitude float64 `json:"longitude"`

	Subdivision string `json:"subdivision"`

	SubdivisionIsoCode string `json:"subdivision_iso_code"`
}

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

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

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

type GetCallStatsRequest struct {
}

type GetCallStatsResponse ΒΆ

type GetCallStatsResponse struct {
	CallDurationSeconds int `json:"call_duration_seconds"`

	CallStatus string `json:"call_status"`

	// Duration of the request in milliseconds
	Duration string `json:"duration"`

	MaxFreezesDurationSeconds int `json:"max_freezes_duration_seconds"`

	MaxParticipants int `json:"max_participants"`

	MaxTotalQualityLimitationDurationSeconds int `json:"max_total_quality_limitation_duration_seconds"`

	PublishingParticipants int `json:"publishing_participants"`

	QualityScore int `json:"quality_score"`

	SfuCount int `json:"sfu_count"`

	ParticipantReport []UserStats `json:"participant_report"`

	Sfus []SFULocationResponse `json:"sfus"`

	AverageConnectionTime *float64 `json:"average_connection_time,omitempty"`

	Aggregated *AggregatedStats `json:"aggregated,omitempty"`

	CallTimeline *CallTimeline `json:"call_timeline,omitempty"`

	Jitter *TimeStats `json:"jitter,omitempty"`

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

Basic response information

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

type GetCampaignResponse ΒΆ

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

	Campaign *CampaignResponse `json:"campaign,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"`

	CreatedAt Timestamp `json:"created_at"`

	CustomEvents bool `json:"custom_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"`

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

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

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

type GetConfigResponse ΒΆ

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

	Config *ConfigResponse `json:"config,omitempty"`
}

Basic response information

type GetCustomPermissionResponse ΒΆ

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

	Permission Permission `json:"permission"`
}

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

type GetExportChannelsStatusRequest struct {
}

type GetExportChannelsStatusResponse ΒΆ

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

	// Duration of the request in milliseconds
	Duration string `json:"duration"`

	// Task status
	Status string `json:"status"`

	TaskID string `json:"task_id"`

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

	Error *ErrorResult `json:"error,omitempty"`

	Result *ExportChannelsResult `json:"result,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 GetModeratorStatsRequest ΒΆ

type GetModeratorStatsRequest struct {
}

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

	Latitude *float64 `json:"latitude,omitempty"`

	Longitude *float64 `json:"longitude,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"`

	StoppedSharing *bool `json:"stopped_sharing,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 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 GetQueueStatsRequest ΒΆ

type GetQueueStatsRequest struct {
}

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

type GetRepliesRequest ΒΆ

type GetRepliesRequest struct {
	Limit                  *int               `json:"-" query:"limit"`
	Offset                 *int               `json:"-" query:"offset"`
	IDGte                  *string            `json:"-" query:"id_gte"`
	IDGt                   *string            `json:"-" query:"id_gt"`
	IDLte                  *string            `json:"-" query:"id_lte"`
	IDLt                   *string            `json:"-" query:"id_lt"`
	CreatedAtAfterOrEqual  *Timestamp         `json:"-" query:"created_at_after_or_equal"`
	CreatedAtAfter         *Timestamp         `json:"-" query:"created_at_after"`
	CreatedAtBeforeOrEqual *Timestamp         `json:"-" query:"created_at_before_or_equal"`
	CreatedAtBefore        *Timestamp         `json:"-" query:"created_at_before"`
	IDAround               *string            `json:"-" query:"id_around"`
	CreatedAtAround        *Timestamp         `json:"-" query:"created_at_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 of the request in milliseconds
	Duration string `json:"duration"`

	History []ReviewQueueItemResponse `json:"history"`

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

Basic response information

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

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

	UserBlocks []UserBlock `json:"user_blocks"`

	UserMutes []UserMute `json:"user_mutes"`

	User UserResponse `json:"user"`
}

Basic response information

type GetUserReportRequest ΒΆ

type GetUserReportRequest struct {
	UserID                string `json:"-" query:"user_id"`
	CreateUserIfNotExists *bool  `json:"-" query:"create_user_if_not_exists"`
	IncludeUserMutes      *bool  `json:"-" query:"include_user_mutes"`
	IncludeUserBlocks     *bool  `json:"-" query:"include_user_blocks"`
}

type GoLiveRequest ΒΆ

type GoLiveRequest struct {
	RecordingStorageName     *string `json:"recording_storage_name"`
	StartClosedCaption       *bool   `json:"start_closed_caption"`
	StartHLS                 *bool   `json:"start_hls"`
	StartRTMPBroadcasts      *bool   `json:"start_rtmp_broadcasts"`
	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 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 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 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 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 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 {
	MaxDurationSeconds *int `json:"max_duration_seconds,omitempty"`

	MaxParticipants *int `json:"max_participants,omitempty"`
}

type LimitsSettingsRequest ΒΆ

type LimitsSettingsRequest struct {
	MaxDurationSeconds *int `json:"max_duration_seconds,omitempty"`

	MaxParticipants *int `json:"max_participants,omitempty"`
}

type LimitsSettingsResponse ΒΆ

type LimitsSettingsResponse struct {
	MaxDurationSeconds *int `json:"max_duration_seconds,omitempty"`

	MaxParticipants *int `json:"max_participants,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 {
}

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

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

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

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

type MediaPubSubHint ΒΆ

type MediaPubSubHint struct {
	AudioPublished bool `json:"audio_published"`

	AudioSubscribed bool `json:"audio_subscribed"`

	VideoPublished bool `json:"video_published"`

	VideoSubscribed bool `json:"video_subscribed"`
}

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

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

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

type MembersResponse ΒΆ

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

	// List of found members
	Members []ChannelMember `json:"members"`
}

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

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

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

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

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

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

	QuotedMessage *Message `json:"quoted_message,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"`

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

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

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

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

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

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

type MessagePaginationParams ΒΆ

type MessagePaginationParams struct{}

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

	LastReadMessageID *string `json:"last_read_message_id,omitempty"`

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

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

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

	Custom map[string]any `json:"custom,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"`

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

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

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

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

Represents any chat message

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

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

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

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

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

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

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

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

Represents any chat message

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

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

	Type string `json:"type"`

	Item *ReviewQueueItem `json:"item,omitempty"`

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

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

type ModerationEvent ΒΆ

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

	Type string `json:"type"`

	ReceivedAt *Timestamp `json:"received_at,omitempty"`

	Flags []Flag2Response `json:"flags,omitempty"`

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

	ReviewQueueItem *ReviewQueueItemResponse `json:"review_queue_item,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"`
}

type ModerationMarkReviewedEvent ΒΆ

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

	Type string `json:"type"`

	Item *ReviewQueueItem `json:"item,omitempty"`

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

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

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

type ModerationUsageStats struct {
	AppPk int `json:"app_pk"`

	ID int `json:"id"`

	OrganizationID int `json:"organization_id"`

	ReferenceDate Timestamp `json:"reference_date"`

	UpdatedAt Timestamp `json:"updated_at"`

	UsageAmount int `json:"usage_amount"`

	UsageType string `json:"usage_type"`
}

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

type ModeratorStats struct {
	ID string `json:"id"`

	ItemsReviewed int `json:"items_reviewed"`

	ActionCounts map[string]int `json:"action_counts"`
}

type ModeratorStatsResponse ΒΆ

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

	ModeratorStats []ModeratorStats `json:"moderator_stats"`
}

Basic response information

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

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

type NullBool struct {
	HasValue *bool `json:"HasValue,omitempty"`

	Value *bool `json:"Value,omitempty"`
}

type NullTime ΒΆ

type NullTime struct {
	HasValue *bool `json:"HasValue,omitempty"`

	Value *Timestamp `json:"Value,omitempty"`
}

type OnlyUserID ΒΆ

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

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"
	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_VIDEO                 OwnCapability = "send-video"
	START_BROADCAST_CALL       OwnCapability = "start-broadcast-call"
	START_CLOSED_CAPTIONS_CALL OwnCapability = "start-closed-captions-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_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"`

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

	PushNotifications *PushNotificationSettings `json:"push_notifications,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"`

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

	PushNotifications *PushNotificationSettingsResponse `json:"push_notifications,omitempty"`
}

type PaginationParams ΒΆ

type PaginationParams struct {
	Limit *int `json:"limit,omitempty"`

	Offset *int `json:"offset,omitempty"`
}

type ParticipantReportResponse ΒΆ

type ParticipantReportResponse struct {
	Sum int `json:"sum"`

	Unique int `json:"unique"`
}

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

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 {
	ReadReceipts *ReadReceipts `json:"read_receipts,omitempty"`

	TypingIndicators *TypingIndicators `json:"typing_indicators,omitempty"`
}

type PrivacySettingsResponse ΒΆ

type PrivacySettingsResponse struct {
	ReadReceipts *ReadReceiptsResponse `json:"read_receipts,omitempty"`

	TypingIndicators *TypingIndicatorsResponse `json:"typing_indicators,omitempty"`
}

type PublishedTrackInfo ΒΆ

type PublishedTrackInfo struct {
	CodecMimeType *string `json:"codec_mime_type,omitempty"`

	DurationSeconds *int `json:"duration_seconds,omitempty"`

	TrackType *string `json:"track_type,omitempty"`
}

type PublisherAggregateStats ΒΆ

type PublisherAggregateStats struct {
	ByTrackType map[string]Count `json:"by_track_type,omitempty"`

	Total *Count `json:"total,omitempty"`
}

type PushConfig ΒΆ

type PushConfig struct {
	Version string `json:"version"`

	OfflineOnly *bool `json:"offline_only,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 PushNotificationSettings ΒΆ

type PushNotificationSettings struct {
	Disabled *bool `json:"disabled,omitempty"`

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

type PushNotificationSettingsInput ΒΆ

type PushNotificationSettingsInput struct {
	Disabled *NullBool `json:"disabled,omitempty"`

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

type PushNotificationSettingsResponse ΒΆ

type PushNotificationSettingsResponse struct {
	Disabled *bool `json:"disabled,omitempty"`

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

	XiaomiAppSecret *string `json:"xiaomi_app_secret,omitempty"`

	XiaomiPackageName *string `json:"xiaomi_package_name,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 QualityScoreReport ΒΆ

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

type QualityScoreReportResponse ΒΆ

type QualityScoreReportResponse struct {
	Daily []DailyAggregateQualityScoreReportResponse `json:"daily"`
}

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 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 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"`
	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 QueryFeedModerationTemplate ΒΆ

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

	Name string `json:"name"`

	UpdatedAt Timestamp `json:"updated_at"`

	Config *FeedsModerationTemplateConfig `json:"config,omitempty"`
}

type QueryFeedModerationTemplatesResponse ΒΆ

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

	Templates []QueryFeedModerationTemplate `json:"templates"`
}

Basic response information

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 []ChannelMember `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 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 of the request in milliseconds
	Duration string `json:"duration"`

	Configs []ConfigResponse `json:"configs"`

	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 of the request in milliseconds
	Duration string `json:"duration"`

	Logs []ActionLogResponse `json:"logs"`

	Next *string `json:"next,omitempty"`

	Prev *string `json:"prev,omitempty"`
}

Basic response information

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 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 of the request in milliseconds
	Duration string `json:"duration"`

	Items []ReviewQueueItemResponse `json:"items"`

	ActionConfig map[string][]ModerationActionConfig `json:"action_config"`

	Stats map[string]int `json:"stats"`

	Next *string `json:"next,omitempty"`

	Prev *string `json:"prev,omitempty"`
}

Basic response information

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"`
	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 QueryUsageStatsRequest ΒΆ

type QueryUsageStatsRequest 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 QueryUsageStatsResponse ΒΆ

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

	Items []ModerationUsageStats `json:"items"`

	Next *string `json:"next,omitempty"`

	Prev *string `json:"prev,omitempty"`
}

Basic response information

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

type QueueStatsResponse struct {
	AvgTimeToAction int `json:"avg_time_to_action"`

	// Duration of the request in milliseconds
	Duration string `json:"duration"`

	TimeToActionBuckets map[string]int `json:"time_to_action_buckets"`
}

Basic response information

type RTMPBroadcastRequest ΒΆ

type RTMPBroadcastRequest struct {
	// Name identifier for RTMP broadcast, must be unique in call
	Name string `json:"name"`

	// URL for the RTMP server to send the call to
	StreamUrl string `json:"stream_url"`

	// If provided, will override the call's RTMP settings quality
	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 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"`
}

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

type ReactionRemovalResponse ΒΆ

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

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

	Reaction *Reaction `json:"reaction,omitempty"`
}

Basic response information

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

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

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

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

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

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

type ReportByHistogramBucket ΒΆ

type ReportByHistogramBucket struct {
	Category string `json:"category"`

	Count int `json:"count"`

	Mean float64 `json:"mean"`

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

type ReviewQueueItem struct {
	BounceCount int `json:"bounce_count"`

	ContentChanged bool `json:"content_changed"`

	CreatedAt Timestamp `json:"created_at"`

	EntityID string `json:"entity_id"`

	EntityType string `json:"entity_type"`

	HasImage bool `json:"has_image"`

	HasText bool `json:"has_text"`

	HasVideo bool `json:"has_video"`

	ID string `json:"id"`

	ModerationPayloadHash string `json:"moderation_payload_hash"`

	RecommendedAction string `json:"recommended_action"`

	ReviewedBy string `json:"reviewed_by"`

	Severity int `json:"severity"`

	Status string `json:"status"`

	UpdatedAt Timestamp `json:"updated_at"`

	Actions []ActionLog `json:"actions"`

	Bans []Ban `json:"bans"`

	Flags []Flag2 `json:"flags"`

	Languages []string `json:"languages"`

	Teams []string `json:"teams"`

	CompletedAt NullTime `json:"completed_at"`

	ReviewedAt NullTime `json:"reviewed_at"`

	AssignedTo *User `json:"assigned_to,omitempty"`

	EntityCreator *EntityCreator `json:"entity_creator,omitempty"`

	FeedsV2Activity *EnrichedActivity `json:"feeds_v2_activity,omitempty"`

	FeedsV2Reaction *Reaction `json:"feeds_v2_reaction,omitempty"`

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

	ModerationPayload *ModerationPayload `json:"moderation_payload,omitempty"`
}

type ReviewQueueItemResponse ΒΆ

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

	EntityID string `json:"entity_id"`

	EntityType string `json:"entity_type"`

	ID string `json:"id"`

	RecommendedAction string `json:"recommended_action"`

	ReviewedBy string `json:"reviewed_by"`

	Severity int `json:"severity"`

	Status string `json:"status"`

	UpdatedAt Timestamp `json:"updated_at"`

	Actions []ActionLogResponse `json:"actions"`

	Bans []Ban `json:"bans"`

	Flags []Flag2Response `json:"flags"`

	Languages []string `json:"languages"`

	CompletedAt *Timestamp `json:"completed_at,omitempty"`

	EntityCreatorID *string `json:"entity_creator_id,omitempty"`

	ReviewedAt *Timestamp `json:"reviewed_at,omitempty"`

	AssignedTo *UserResponse `json:"assigned_to,omitempty"`

	EntityCreator *EntityCreatorResponse `json:"entity_creator,omitempty"`

	FeedsV2Activity *EnrichedActivity `json:"feeds_v2_activity,omitempty"`

	FeedsV2Reaction *Reaction `json:"feeds_v2_reaction,omitempty"`

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

	ModerationPayload *ModerationPayload `json:"moderation_payload,omitempty"`
}

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 {
	AutoCancelTimeoutMs int `json:"auto_cancel_timeout_ms"`

	IncomingCallTimeoutMs int `json:"incoming_call_timeout_ms"`

	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 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 AWS API Secret
	S3Secret *string `json:"s3_secret,omitempty"`
}

Config for creating Amazon S3 storage.

type SDKUsageReport ΒΆ

type SDKUsageReport struct {
	PerSdkUsage map[string]*PerSDKUsageReport `json:"per_sdk_usage"`
}

type SDKUsageReportResponse ΒΆ

type SDKUsageReportResponse struct {
	Daily []DailyAggregateSDKUsageReportResponse `json:"daily"`
}

type SFULocationResponse ΒΆ

type SFULocationResponse struct {
	Datacenter string `json:"datacenter"`

	ID string `json:"id"`

	Coordinates Coordinates `json:"coordinates"`

	Location Location `json:"location"`
}

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

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

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

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

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

	ImageLabels map[string][]string `json:"image_labels,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"`
}

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

Basic response information

type StartClosedCaptionsRequest ΒΆ

type StartClosedCaptionsRequest struct {
	EnableTranscription *bool   `json:"enable_transcription"`
	ExternalStorage     *string `json:"external_storage"`
	Language            *string `json:"language"`
}

type StartClosedCaptionsResponse ΒΆ

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

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 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 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) 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"`
	Custom         *CustomActionRequest   `json:"custom"`
	DeleteActivity *DeleteActivityRequest `json:"delete_activity"`
	DeleteMessage  *DeleteMessageRequest  `json:"delete_message"`
	DeleteReaction *DeleteReactionRequest `json:"delete_reaction"`
	DeleteUser     *DeleteUserRequest     `json:"delete_user"`
	MarkReviewed   *MarkReviewedRequest   `json:"mark_reviewed"`
	Unban          *UnbanActionRequest    `json:"unban"`
	User           *UserRequest           `json:"user"`
}

type SubmitActionResponse ΒΆ

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

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

Basic response information

type Subsession ΒΆ

type Subsession struct {
	EndedAt int `json:"ended_at"`

	JoinedAt int `json:"joined_at"`

	SfuID string `json:"sfu_id"`

	PubSubHint *MediaPubSubHint `json:"pub_sub_hint,omitempty"`
}

type TURNAggregatedStats ΒΆ

type TURNAggregatedStats struct {
	Tcp *Count `json:"tcp,omitempty"`

	Total *Count `json:"total,omitempty"`
}

type TargetResolution ΒΆ

type TargetResolution struct {
	Bitrate int `json:"bitrate"`

	Height int `json:"height"`

	Width int `json:"width"`
}

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

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

	// Active Participant Count
	ActiveParticipantCount *int `json:"active_participant_count,omitempty"`

	// Deleted At
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`

	// Last Message At
	LastMessageAt *Timestamp `json:"last_message_at,omitempty"`

	// Participant Count
	ParticipantCount *int `json:"participant_count,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 {
	// 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"`

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

	// Active Participant Count
	ActiveParticipantCount *int `json:"active_participant_count,omitempty"`

	// Deleted At
	DeletedAt *Timestamp `json:"deleted_at,omitempty"`

	// Last Message At
	LastMessageAt *Timestamp `json:"last_message_at,omitempty"`

	// Participant Count
	ParticipantCount *int `json:"participant_count,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"`

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

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

type TimeStats struct {
	AverageSeconds float64 `json:"average_seconds"`

	MaxSeconds float64 `json:"max_seconds"`
}

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

type TranscriptionSettingsRequest ΒΆ

type TranscriptionSettingsRequest struct {
	Mode string `json:"mode"`

	ClosedCaptionMode *string `json:"closed_caption_mode,omitempty"`

	Language *string `json:"language,omitempty"`
}

type TranscriptionSettingsResponse ΒΆ

type TranscriptionSettingsResponse struct {
	ClosedCaptionMode string `json:"closed_caption_mode"`

	Language string `json:"language"`

	Mode string `json:"mode"`
}

type TranslateMessageRequest ΒΆ

type TranslateMessageRequest struct {
	Language string `json:"language"`
}

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

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 of the request in milliseconds
	Duration string `json:"duration"`
}

Basic response information

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

type UndeleteMessageRequest ΒΆ

type UndeleteMessageRequest struct {
	Message       MessageRequest `json:"message"`
	SkipEnrichUrl *bool          `json:"skip_enrich_url"`
}

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

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

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 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"`
	ImageModerationEnabled     *bool                         `json:"image_moderation_enabled"`
	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"`
	WebhookUrl                 *string                       `json:"webhook_url"`
	AllowedFlagReasons         []string                      `json:"allowed_flag_reasons"`
	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"`
	PushConfig                 *PushConfig                   `json:"push_config"`
	XiaomiConfig               *XiaomiConfig                 `json:"xiaomi_config"`
}

type UpdateBlockListRequest ΒΆ

type UpdateBlockListRequest struct {
	Words []string `json:"words"`
}

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"`
	RejectInvite     *bool           `json:"reject_invite"`
	SkipPush         *bool           `json:"skip_push"`
	UserID           *string         `json:"user_id"`
	AddMembers       []ChannelMember `json:"add_members"`
	AddModerators    []string        `json:"add_moderators"`
	AssignRoles      []ChannelMember `json:"assign_roles"`
	DemoteModerators []string        `json:"demote_moderators"`
	Invites          []ChannelMember `json:"invites"`
	RemoveMembers    []string        `json:"remove_members"`
	Data             *ChannelInput   `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 []ChannelMember `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"`
	CustomEvents                   *bool               `json:"custom_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"`
	SkipLastMsgUpdateForSystemMsgs *bool               `json:"skip_last_msg_update_for_system_msgs"`
	TypingEvents                   *bool               `json:"typing_events"`
	Uploads                        *bool               `json:"uploads"`
	UrlEnrichment                  *bool               `json:"url_enrichment"`
	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"`

	CreatedAt Timestamp `json:"created_at"`

	CustomEvents bool `json:"custom_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"`

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

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

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

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

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

type UpsertConfigResponse ΒΆ

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

	Config *ConfigResponse `json:"config,omitempty"`
}

Basic response information

type UpsertModerationTemplateRequest ΒΆ

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

	Config FeedsModerationTemplateConfig `json:"config"`
}

type UpsertModerationTemplateResponse ΒΆ

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

	// Duration of the request in milliseconds
	Duration string `json:"duration"`

	Name string `json:"name"`

	UpdatedAt Timestamp `json:"updated_at"`

	Config *FeedsModerationTemplateConfig `json:"config,omitempty"`
}

Basic response information

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

type User struct {
	Banned bool `json:"banned"`

	ID string `json:"id"`

	Online bool `json:"online"`

	Role string `json:"role"`

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

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

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

	DeactivatedAt *Timestamp `json:"deactivated_at,omitempty"`

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

	Invisible *bool `json:"invisible,omitempty"`

	Language *string `json:"language,omitempty"`

	LastActive *Timestamp `json:"last_active,omitempty"`

	LastEngagedAt *Timestamp `json:"last_engaged_at,omitempty"`

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

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

	Teams []string `json:"teams,omitempty"`

	PrivacySettings *PrivacySettings `json:"privacy_settings,omitempty"`

	PushNotifications *PushNotificationSettings `json:"push_notifications,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"`
}

type UserBlock ΒΆ

type UserBlock struct {
	BlockedByUserID string `json:"blocked_by_user_id"`

	BlockedUserID string `json:"blocked_user_id"`

	CreatedAt Timestamp `json:"created_at"`
}

type UserCustomEventRequest ΒΆ

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

	Custom map[string]any `json:"custom,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"`
}

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

type UserEventPayload ΒΆ

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

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

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

type UserInfoResponse ΒΆ

type UserInfoResponse struct {
	ID string `json:"id"`

	Image string `json:"image"`

	Name string `json:"name"`

	Roles []string `json:"roles"`

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

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

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

type UserRequest ΒΆ

type UserRequest struct {
	// User ID
	ID string `json:"id"`

	Image *string `json:"image,omitempty"`

	Invisible *bool `json:"invisible,omitempty"`

	Language *string `json:"language,omitempty"`

	// Optional name of user
	Name *string `json:"name,omitempty"`

	Role *string `json:"role,omitempty"`

	Teams []string `json:"teams,omitempty"`

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

	PrivacySettings *PrivacySettingsResponse `json:"privacy_settings,omitempty"`

	PushNotifications *PushNotificationSettingsInput `json:"push_notifications,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 devices user is using
	Devices []DeviceResponse `json:"devices"`

	// List of teams user is a part of
	Teams []string `json:"teams"`

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

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

	PrivacySettings *PrivacySettingsResponse `json:"privacy_settings,omitempty"`

	PushNotifications *PushNotificationSettingsResponse `json:"push_notifications,omitempty"`
}

User response object

type UserSessionStats ΒΆ

type UserSessionStats struct {
	FreezeDurationSeconds int `json:"freeze_duration_seconds"`

	Group string `json:"group"`

	MaxFreezeFraction float64 `json:"max_freeze_fraction"`

	MaxFreezesDurationSeconds int `json:"max_freezes_duration_seconds"`

	MinEventTs int `json:"min_event_ts"`

	PacketLossFraction float64 `json:"packet_loss_fraction"`

	PublisherPacketLossFraction float64 `json:"publisher_packet_loss_fraction"`

	PublishingDurationSeconds int `json:"publishing_duration_seconds"`

	QualityScore float64 `json:"quality_score"`

	ReceivingDurationSeconds int `json:"receiving_duration_seconds"`

	SessionID string `json:"session_id"`

	TotalPixelsIn int `json:"total_pixels_in"`

	TotalPixelsOut int `json:"total_pixels_out"`

	AverageConnectionTime *float64 `json:"average_connection_time,omitempty"`

	Browser *string `json:"browser,omitempty"`

	BrowserVersion *string `json:"browser_version,omitempty"`

	CurrentIp *string `json:"current_ip,omitempty"`

	CurrentSfu *string `json:"current_sfu,omitempty"`

	DeviceModel *string `json:"device_model,omitempty"`

	DeviceVersion *string `json:"device_version,omitempty"`

	DistanceToSfuKilometers *float64 `json:"distance_to_sfu_kilometers,omitempty"`

	MaxFirPerSecond *float64 `json:"max_fir_per_second,omitempty"`

	MaxFreezesPerSecond *float64 `json:"max_freezes_per_second,omitempty"`

	MaxNackPerSecond *float64 `json:"max_nack_per_second,omitempty"`

	MaxPliPerSecond *float64 `json:"max_pli_per_second,omitempty"`

	Os *string `json:"os,omitempty"`

	OsVersion *string `json:"os_version,omitempty"`

	PublisherNoiseCancellationSeconds *float64 `json:"publisher_noise_cancellation_seconds,omitempty"`

	PublisherQualityLimitationFraction *float64 `json:"publisher_quality_limitation_fraction,omitempty"`

	PublishingAudioCodec *string `json:"publishing_audio_codec,omitempty"`

	PublishingVideoCodec *string `json:"publishing_video_codec,omitempty"`

	ReceivingAudioCodec *string `json:"receiving_audio_codec,omitempty"`

	ReceivingVideoCodec *string `json:"receiving_video_codec,omitempty"`

	Sdk *string `json:"sdk,omitempty"`

	SdkVersion *string `json:"sdk_version,omitempty"`

	SubscriberVideoQualityThrottledDurationSeconds *float64 `json:"subscriber_video_quality_throttled_duration_seconds,omitempty"`

	Truncated *bool `json:"truncated,omitempty"`

	WebrtcVersion *string `json:"webrtc_version,omitempty"`

	PublishedTracks []PublishedTrackInfo `json:"published_tracks,omitempty"`

	Subsessions []Subsession `json:"subsessions,omitempty"`

	Geolocation *GeolocationResult `json:"geolocation,omitempty"`

	Jitter *TimeStats `json:"jitter,omitempty"`

	Latency *TimeStats `json:"latency,omitempty"`

	MaxPublishingVideoQuality *VideoQuality `json:"max_publishing_video_quality,omitempty"`

	MaxReceivingVideoQuality *VideoQuality `json:"max_receiving_video_quality,omitempty"`

	PubSubHints *MediaPubSubHint `json:"pub_sub_hints,omitempty"`

	PublisherJitter *TimeStats `json:"publisher_jitter,omitempty"`

	PublisherLatency *TimeStats `json:"publisher_latency,omitempty"`

	PublisherVideoQualityLimitationDurationSeconds map[string]float64 `json:"publisher_video_quality_limitation_duration_seconds,omitempty"`

	SubscriberJitter *TimeStats `json:"subscriber_jitter,omitempty"`

	SubscriberLatency *TimeStats `json:"subscriber_latency,omitempty"`

	Timeline *CallTimeline `json:"timeline,omitempty"`
}

type UserStats ΒΆ

type UserStats struct {
	MinEventTs int `json:"min_event_ts"`

	SessionStats []UserSessionStats `json:"session_stats"`

	Info UserInfoResponse `json:"info"`

	Rating *int `json:"rating,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"`
}

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

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

type UserUpdatedEvent ΒΆ

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

	User UserEventPayload `json:"user"`

	Type string `json:"type"`

	ReceivedAt *Timestamp `json:"received_at,omitempty"`
}

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 {
	CascadingActions bool `json:"cascading_actions"`

	Enabled bool `json:"enabled"`

	FirstMessageOnly bool `json:"first_message_only"`

	Rules []VelocityFilterConfigRule `json:"rules"`

	Async *bool `json:"async,omitempty"`
}

type VelocityFilterConfigRule ΒΆ

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

	BanDuration int `json:"ban_duration"`

	CascadingAction string `json:"cascading_action"`

	CascadingThreshold int `json:"cascading_threshold"`

	CheckMessageContext bool `json:"check_message_context"`

	FastSpamThreshold int `json:"fast_spam_threshold"`

	FastSpamTtl int `json:"fast_spam_ttl"`

	IpBan bool `json:"ip_ban"`

	ShadowBan bool `json:"shadow_ban"`

	SlowSpamThreshold int `json:"slow_spam_threshold"`

	SlowSpamTtl int `json:"slow_spam_ttl"`

	SlowSpamBanDuration *int `json:"slow_spam_ban_duration,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 ΒΆ

func (c *VideoClient) CollectUserFeedback(ctx context.Context, _type string, id string, session string, request *CollectUserFeedbackRequest) (*StreamResponse[CollectUserFeedbackResponse], error)

func (*VideoClient) CreateCallType ΒΆ

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

func (c *VideoClient) GetCallStats(ctx context.Context, _type string, id string, session string, request *GetCallStatsRequest) (*StreamResponse[GetCallStatsResponse], 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) ListCallTypes ΒΆ

func (*VideoClient) ListRecordings ΒΆ

func (c *VideoClient) ListRecordings(ctx context.Context, _type string, id string, request *ListRecordingsRequest) (*StreamResponse[ListRecordingsResponse], error)

Lists recordings

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

func (*VideoClient) QueryCalls ΒΆ

Query calls with filter query

func (*VideoClient) QueryUserFeedback ΒΆ

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

Starts closed captions

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

type VideoDimension struct {
	Height int `json:"height"`

	Width int `json:"width"`
}

type VideoPinRequest ΒΆ

type VideoPinRequest struct {
	SessionID string `json:"session_id"`
	UserID    string `json:"user_id"`
}

type VideoQuality ΒΆ

type VideoQuality struct {
	UsageType *string `json:"usage_type,omitempty"`

	Resolution *VideoDimension `json:"resolution,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"`

	Option *PollOptionResponseData `json:"Option,omitempty"`
}

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL