microsoftteams

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package microsoftteams provides the Microsoft Teams integration definition for integrations

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrOAuthTokenMissing indicates the OAuth access token is missing
	ErrOAuthTokenMissing = errors.New("microsoftteams: oauth token missing")
	// ErrChannelMissing indicates the team_id or channel_id is missing
	ErrChannelMissing = errors.New("microsoftteams: team_id and channel_id are required")
	// ErrMessageEmpty indicates the message body is empty
	ErrMessageEmpty = errors.New("microsoftteams: message body is required")
	// ErrProfileLookupFailed indicates the Graph /me request failed
	ErrProfileLookupFailed = errors.New("microsoftteams: profile lookup failed")
	// ErrOperationConfigInvalid indicates operation config could not be decoded
	ErrOperationConfigInvalid = errors.New("microsoftteams: operation config invalid")
	// ErrChannelMessageSendFailed indicates the Graph channel message request failed
	ErrChannelMessageSendFailed = errors.New("microsoftteams: channel message send failed")
	// ErrResultEncode indicates an operation result could not be serialized
	ErrResultEncode = errors.New("microsoftteams: result encode failed")
	// ErrCredentialEncode indicates the credential could not be serialized
	ErrCredentialEncode = errors.New("microsoftteams: credential encode failed")
	// ErrCredentialDecode indicates the credential could not be deserialized
	ErrCredentialDecode = errors.New("microsoftteams: credential decode failed")
)

Functions

func Builder

func Builder(cfg Config) registry.Builder

Builder returns the Microsoft Teams definition builder with the supplied operator config applied

Types

type Client

type Client struct{}

Client builds Microsoft Graph service clients for one Teams installation

func (Client) Build

Build constructs the Microsoft Graph service client from the installation OAuth access token

type Config

type Config struct {
	// ClientID is the Azure OAuth application client identifier
	ClientID string `json:"clientid" koanf:"clientid"`
	// ClientSecret is the Azure OAuth application client secret
	ClientSecret string `json:"clientsecret" koanf:"clientsecret" sensitive:"true"`
	// RedirectURL is the OAuth callback URL registered with the Azure application
	RedirectURL string `json:"redirecturl" koanf:"redirecturl" default:"https://api.theopenlane.io/v1/integrations/auth/callback"`
}

Config holds operator-level credentials for the Microsoft Teams definition

type HealthCheck

type HealthCheck struct {
	// ID is the Microsoft Graph user identifier
	ID string `json:"id"`
	// Mail is the user's email address
	Mail string `json:"mail"`
}

HealthCheck holds the result of a Microsoft Teams health check

func (HealthCheck) Handle

func (h HealthCheck) Handle() types.OperationHandler

Handle adapts the health check to the generic operation registration boundary

func (HealthCheck) Run

Run executes the Microsoft Teams health check via Microsoft Graph

type InstallationMetadata

type InstallationMetadata struct {
	// TenantID is the Microsoft Entra tenant identifier extracted from the access token when available
	TenantID string `json:"tenantId,omitempty" jsonschema:"title=Tenant ID"`
}

InstallationMetadata holds the stable Microsoft tenant identity for one Teams installation

func (InstallationMetadata) InstallationIdentity

InstallationIdentity implements types.InstallationIdentifiable

type MessageSend

type MessageSend struct {
	// TeamID is the target team identifier
	TeamID string `json:"teamId"`
	// ChannelID is the target channel identifier
	ChannelID string `json:"channelId"`
	// MessageID is the identifier of the created message
	MessageID string `json:"messageId"`
}

MessageSend sends a Microsoft Teams channel message

func (MessageSend) Handle

func (m MessageSend) Handle() types.OperationHandler

Handle adapts message send to the generic operation registration boundary

func (MessageSend) Run

Run sends a Microsoft Teams channel message via Microsoft Graph

type MessageSendOperation

type MessageSendOperation struct {
	// TeamID is the target Microsoft Teams team identifier
	TeamID string `json:"team_id" jsonschema:"required,title=Team ID"`
	// ChannelID is the target Teams channel identifier
	ChannelID string `json:"channel_id" jsonschema:"required,title=Channel ID"`
	// Body is the message body content
	Body string `json:"body" jsonschema:"required,title=Message Body"`
	// BodyFormat controls the content type: text or html
	BodyFormat string `json:"body_format,omitempty" jsonschema:"title=Body Format,enum=text,enum=html"`
	// Subject is an optional message subject
	Subject string `json:"subject,omitempty" jsonschema:"title=Subject"`
}

MessageSendOperation holds per-invocation parameters for the message.send operation

type UserInput

type UserInput struct {
	// FilterExpr limits imported records to envelopes matching the CEL expression
	FilterExpr string `` /* 173-byte string literal not displayed */
}

UserInput holds installation-specific configuration collected from the user

Jump to

Keyboard shortcuts

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