/** * Core type definitions for Microsoft Teams platform */ import { z } from 'zod'; export interface TeamsTeam { id: string; name: string; description?: string; } export interface TeamsChannel { id: string; team_id: string; name: string; type: string; } export interface TeamsMessage { id: string; channel_id: string; author: { id: string; displayName: string; }; content: string; timestamp: string; root_message_id?: string; parent_message_id?: string; is_thread_reply?: boolean; } export interface TeamsSearchResult { id: string; content: string; author: { id: string; displayName: string; }; channel_id: string; thread_id?: string; team_name?: string; channel_name?: string; timestamp: string; permalink?: string; } export interface TeamsUser { id: string; displayName: string; email?: string; userPrincipalName?: string; } export type TeamsChatType = 'oneOnOne' | 'group' | 'self'; export interface TeamsChat { id: string; type: TeamsChatType; topic?: string; last_message?: string; last_message_at?: string; } export interface TeamsReaction { emoji: string; count: number; } export interface TeamsFile { id: string; name: string; size: number; url: string; contentType?: string; sharepoint_url?: string; object_url?: string; } export interface TeamsCredentials { token: string; cookie?: string; } export type TeamsAccountType = 'work' | 'personal'; export type TeamsRegion = 'amer' | 'emea' | 'apac'; export type TeamsAuthMethod = 'device-code' | 'browser' | 'extracted' | 'manual'; export interface TeamsAccount { token: string; token_expires_at?: string; region?: TeamsRegion; account_type: TeamsAccountType; user_name?: string; current_team: string | null; teams: Record; auth_method?: TeamsAuthMethod; aad_refresh_token?: string; aad_client_id?: string; aad_tenant_id?: string; } export interface TeamsConfig { current_account: string | null; accounts: Record; } /** @deprecated Legacy single-account config format for migration */ export interface TeamsConfigLegacy { current_team: string | null; token: string; token_expires_at?: string; teams: Record; } export declare const TeamsTeamSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; export declare const TeamsChannelSchema: z.ZodObject<{ id: z.ZodString; team_id: z.ZodString; name: z.ZodString; type: z.ZodString; }, z.core.$strip>; export declare const TeamsMessageSchema: z.ZodObject<{ id: z.ZodString; channel_id: z.ZodString; author: z.ZodObject<{ id: z.ZodString; displayName: z.ZodString; }, z.core.$strip>; content: z.ZodString; timestamp: z.ZodString; root_message_id: z.ZodOptional; parent_message_id: z.ZodOptional; is_thread_reply: z.ZodOptional; }, z.core.$strip>; export declare const TeamsSearchResultSchema: z.ZodObject<{ id: z.ZodString; content: z.ZodString; author: z.ZodObject<{ id: z.ZodString; displayName: z.ZodString; }, z.core.$strip>; channel_id: z.ZodString; thread_id: z.ZodOptional; team_name: z.ZodOptional; channel_name: z.ZodOptional; timestamp: z.ZodString; permalink: z.ZodOptional; }, z.core.$strip>; export declare const TeamsUserSchema: z.ZodObject<{ id: z.ZodString; displayName: z.ZodString; email: z.ZodOptional; userPrincipalName: z.ZodOptional; }, z.core.$strip>; export declare const TeamsChatTypeSchema: z.ZodEnum<{ group: "group"; oneOnOne: "oneOnOne"; self: "self"; }>; export declare const TeamsChatSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ group: "group"; oneOnOne: "oneOnOne"; self: "self"; }>; topic: z.ZodOptional; last_message: z.ZodOptional; last_message_at: z.ZodOptional; }, z.core.$strip>; export declare const TeamsReactionSchema: z.ZodObject<{ emoji: z.ZodString; count: z.ZodNumber; }, z.core.$strip>; export declare const TeamsFileSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; size: z.ZodNumber; url: z.ZodString; contentType: z.ZodOptional; sharepoint_url: z.ZodOptional; object_url: z.ZodOptional; }, z.core.$strip>; export declare const TeamsCredentialsSchema: z.ZodObject<{ token: z.ZodString; cookie: z.ZodOptional; }, z.core.$strip>; export declare const TeamsAccountTypeSchema: z.ZodEnum<{ personal: "personal"; work: "work"; }>; export declare const TeamsRegionSchema: z.ZodEnum<{ amer: "amer"; apac: "apac"; emea: "emea"; }>; export declare const TeamsAuthMethodSchema: z.ZodEnum<{ browser: "browser"; "device-code": "device-code"; extracted: "extracted"; manual: "manual"; }>; export declare const TeamsAccountSchema: z.ZodObject<{ token: z.ZodString; token_expires_at: z.ZodOptional; region: z.ZodOptional>; account_type: z.ZodEnum<{ personal: "personal"; work: "work"; }>; user_name: z.ZodOptional; current_team: z.ZodNullable; teams: z.ZodRecord>; auth_method: z.ZodOptional>; aad_refresh_token: z.ZodOptional; aad_client_id: z.ZodOptional; aad_tenant_id: z.ZodOptional; }, z.core.$strip>; export declare const TeamsConfigSchema: z.ZodObject<{ current_account: z.ZodNullable; accounts: z.ZodRecord; region: z.ZodOptional>; account_type: z.ZodEnum<{ personal: "personal"; work: "work"; }>; user_name: z.ZodOptional; current_team: z.ZodNullable; teams: z.ZodRecord>; auth_method: z.ZodOptional>; aad_refresh_token: z.ZodOptional; aad_client_id: z.ZodOptional; aad_tenant_id: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export declare const TeamsConfigLegacySchema: z.ZodObject<{ current_team: z.ZodNullable; token: z.ZodString; token_expires_at: z.ZodOptional; teams: z.ZodRecord>; }, z.core.$strip>; export interface TeamsMention { id: string; mri?: string; displayName: string; } export interface TeamsRealtimeMessage { id: string; chatId: string; conversationType: 'chat' | 'channel'; teamId?: string; channelId?: string; content: string; mentions: TeamsMention[]; author: { id: string; displayName: string; }; messageType: string; timestamp: string; } export interface TeamsTrouterGenericEvent { resourceType: string; [key: string]: unknown; } export interface TeamsListenerEventMap { message: [message: TeamsRealtimeMessage]; teams_event: [event: TeamsTrouterGenericEvent]; connected: [info: { endpointId: string; }]; disconnected: []; error: [error: Error]; } export declare class TeamsError extends Error { code: string; constructor(message: string, code: string); } export declare class TeamsAuthCapabilityError extends Error { constructor(); } //# sourceMappingURL=types.d.ts.map