models

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package models contains simplified Microsoft Teams domain types used by this library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID        string
	Name      string
	IsGeneral bool
}

Channel represents a Microsoft Teams channel.

type Chat

type Chat struct {
	ID       string
	Type     ChatType
	IsHidden bool
	Topic    *string
}

Chat represents a chat in Microsoft Teams.

type ChatType

type ChatType string

ChatType represents the type of chat in Microsoft Teams. Type can be either one-on-one or group chat

const (
	// ChatTypeOneOnOne represents a one-on-one chat.
	ChatTypeOneOnOne ChatType = "one-on-one"
	// ChatTypeGroup represents a group chat.
	ChatTypeGroup ChatType = "group"
)

type ListMessagesOptions

type ListMessagesOptions struct {
	Top           *int32
	ExpandReplies bool
}

ListMessagesOptions contains options for listing messages.

type Member

type Member struct {
	ID          string
	UserID      string
	DisplayName string
	Role        string
	Email       string
}

Member represents a member of a Microsoft Teams channel, direct chat or team.

type Mention

type Mention struct {
	Kind     MentionKind
	AtID     int32
	Text     string
	TargetID string
}

Mention represents a mention in a Microsoft Teams message.

type MentionKind

type MentionKind string

MentionKind represents the kind of mention in a Microsoft Teams message.

const (
	// MentionUser represents a user mention.
	MentionUser MentionKind = "user"
	// MentionChannel represents a channel mention.
	MentionChannel MentionKind = "channel"
	// MentionTeam represents a team mention.
	MentionTeam MentionKind = "team"
	// MentionEveryone represents an everyone mention - applicable to group chats only
	MentionEveryone MentionKind = "everyone"
)

type Message

type Message struct {
	ID              string
	Content         string
	ContentType     MessageContentType
	CreatedDateTime time.Time
	From            *MessageFrom
	ReplyCount      int
}

Message represents a Microsoft Teams chat message. It can be used in both chats and channels.

type MessageBody

type MessageBody struct {
	Content     string
	ContentType MessageContentType
	Mentions    []Mention
}

MessageBody represents the body of a message in Microsoft Teams.

type MessageCollection

type MessageCollection struct {
	Messages []*Message
	NextLink *string
}

MessageCollection represents a collection of messages, potentially with a link to the next page of results.

type MessageContentType

type MessageContentType string

MessageContentType represents the type of content in a Microsoft Teams message. It can be either text or HTML.

const (
	// MessageContentTypeText represents plain text content.
	MessageContentTypeText MessageContentType = "text"
	// MessageContentTypeHTML represents HTML content.
	MessageContentTypeHTML MessageContentType = "html"
)

type MessageFrom

type MessageFrom struct {
	UserID      string
	DisplayName string
}

MessageFrom represents the sender of a message in Microsoft Teams.

type Team

type Team struct {
	ID          string
	DisplayName string
	Description string
	IsArchived  bool
	Visibility  *string
}

Team represents a Microsoft Teams team.

type TeamUpdate

type TeamUpdate struct {
	DisplayName *string
	Description *string
	Visibility  *string
}

TeamUpdate represents the fields that can be updated for a Team.

Jump to

Keyboard shortcuts

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