im

package
v1.0.69 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package im registers IM-domain EventKeys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys() []event.KeyDefinition

Keys returns all IM-domain EventKey definitions.

Types

type CardActionTriggerOutput added in v1.0.58

type CardActionTriggerOutput struct {
	Type        string `json:"type"                    desc:"Event type; always card.action.trigger"`
	EventID     string `json:"event_id,omitempty"      desc:"Globally unique event ID"`
	Timestamp   string `json:"timestamp,omitempty"     desc:"Event delivery time (ms timestamp string)" kind:"timestamp_ms"`
	OperatorID  string `json:"operator_id,omitempty"   desc:"Operator open_id"                          kind:"open_id"`
	MessageID   string `json:"message_id,omitempty"    desc:"Message ID of the card"                    kind:"message_id"`
	ChatID      string `json:"chat_id,omitempty"       desc:"Chat ID"                                   kind:"chat_id"`
	Host        string `json:"host,omitempty"          desc:"Host type: im_message / im_top_notice"`
	Token       string `json:"token,omitempty"         desc:"Token for delay card update (valid 30 min, max 2 updates)"`
	ActionTag   string `json:"action_tag,omitempty"    desc:"Triggered element type: button/select_static/input/checker/etc"`
	ActionValue string `json:"action_value,omitempty"  desc:"Developer-defined action value as JSON string"`
	ActionName  string `json:"action_name,omitempty"   desc:"Element name attribute"`
	FormValue   string `json:"form_value,omitempty"    desc:"Form submission values as JSON string (only on form submit)"`
	InputValue  string `json:"input_value,omitempty"   desc:"Input field value (only for input elements)"`
	Option      string `json:"option,omitempty"        desc:"Selected option value (for single-select dropdown)"`
	Options     string `json:"options,omitempty"       desc:"Selected options, comma-separated (for multi-select)"`
	Checked     bool   `json:"checked"                 desc:"Checkbox state (for checkbox elements)"`
	Timezone    string `json:"timezone,omitempty"      desc:"User timezone for date/time picker interactions"`
	CardContent string `` /* 188-byte string literal not displayed */
}

CardActionTriggerOutput is the flattened shape for card.action.trigger.

type ImMessageReceiveOutput

type ImMessageReceiveOutput struct {
	Type        string          `json:"type"                   desc:"Event type; always im.message.receive_v1"`
	EventID     string          `json:"event_id,omitempty"     desc:"Event delivery ID. Do not use as the message deduplication key; use message_id instead."`
	Timestamp   string          `` /* 235-byte string literal not displayed */
	ID          string          `` /* 234-byte string literal not displayed */
	MessageID   string          `` /* 234-byte string literal not displayed */
	CreateTime  string          `` /* 236-byte string literal not displayed */
	UpdateTime  string          `` /* 237-byte string literal not displayed */
	ChatID      string          `` /* 231-byte string literal not displayed */
	ChatType    string          `` /* 233-byte string literal not displayed */
	MessageType string          `json:"message_type,omitempty" desc:"Message type"`
	SenderID    string          `` /* 231-byte string literal not displayed */
	SenderType  string          `` /* 232-byte string literal not displayed */
	RootID      string          `` /* 234-byte string literal not displayed */
	ThreadID    string          `json:"thread_id,omitempty"    desc:"Thread ID, when present"`
	ReplyTo     string          `` /* 234-byte string literal not displayed */
	Content     string          `` /* 145-byte string literal not displayed */
	Mentions    []MentionOutput `json:"mentions,omitempty" desc:"Compact mentions aligned with im +messages-mget"`
}

ImMessageReceiveOutput is the flattened shape for im.message.receive_v1; `desc` tags drive the reflected schema.

type MentionOutput added in v1.0.69

type MentionOutput struct {
	Key  string `json:"key,omitempty"  desc:"Mention placeholder key, for example @_user_1"`
	ID   string `json:"id,omitempty"   desc:"Mentioned user open_id; prefixed with ou_"        kind:"open_id"`
	Name string `json:"name,omitempty" desc:"Mentioned display name"`
}

Jump to

Keyboard shortcuts

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