feat: basics #1
+3
-1
@@ -5,7 +5,9 @@ import { createRequire } from "node:module";
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
import { promisify } from "node:util";
|
import { promisify } from "node:util";
|
||||||
import type { Email, Folder, LoginConfig } from "./models.ts";
|
import type { Email } from "./types/email.ts";
|
||||||
|
import type { Folder } from "./types/folder.ts";
|
||||||
|
import type { LoginConfig } from "./types/login_config.ts";
|
||||||
|
|
||||||
let inMemoryPassword: string | null = null;
|
let inMemoryPassword: string | null = null;
|
||||||
|
|
||||||
|
|||||||
@@ -1,102 +0,0 @@
|
|||||||
export interface LoginConfig {
|
|
||||||
serverUrl: string;
|
|
||||||
email: string;
|
|
||||||
username: string;
|
|
||||||
domain?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Email {
|
|
||||||
subject: string;
|
|
||||||
from: string;
|
|
||||||
fromName: string;
|
|
||||||
date: string;
|
|
||||||
isRead: boolean;
|
|
||||||
hasAttachments: boolean;
|
|
||||||
hasLinks: boolean;
|
|
||||||
itemId: string;
|
|
||||||
size: number;
|
|
||||||
isMeeting: boolean;
|
|
||||||
itemType: string;
|
|
||||||
to: string[];
|
|
||||||
cc: string[];
|
|
||||||
body: string;
|
|
||||||
bodyType: string;
|
|
||||||
attachments: Attachment[];
|
|
||||||
preview: string;
|
|
||||||
location?: string;
|
|
||||||
start?: string;
|
|
||||||
end?: string;
|
|
||||||
requiredAttendees?: string[];
|
|
||||||
optionalAttendees?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Attachment {
|
|
||||||
name: string;
|
|
||||||
size: number;
|
|
||||||
contentType: string;
|
|
||||||
attachmentId: string;
|
|
||||||
isInline: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Folder {
|
|
||||||
name: string;
|
|
||||||
id: string;
|
|
||||||
totalCount: number;
|
|
||||||
unreadCount: number;
|
|
||||||
childFolderCount: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Person {
|
|
||||||
name: string;
|
|
||||||
email: string;
|
|
||||||
mailboxType: string;
|
|
||||||
firstName: string;
|
|
||||||
lastName: string;
|
|
||||||
jobTitle: string;
|
|
||||||
department: string;
|
|
||||||
company: string;
|
|
||||||
office: string;
|
|
||||||
alias: string;
|
|
||||||
manager: string;
|
|
||||||
managerEmail: string;
|
|
||||||
phones: Record<string, string>;
|
|
||||||
address: string;
|
|
||||||
directReports: Array<{ name: string; email: string }>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CalendarEvent {
|
|
||||||
subject: string;
|
|
||||||
start: string;
|
|
||||||
end: string;
|
|
||||||
location: string;
|
|
||||||
isAllDay: boolean;
|
|
||||||
isCancelled: boolean;
|
|
||||||
isMeeting: boolean;
|
|
||||||
isRecurring: boolean;
|
|
||||||
organizer: string;
|
|
||||||
organizerEmail: string;
|
|
||||||
myResponse: string;
|
|
||||||
itemId: string;
|
|
||||||
body: string;
|
|
||||||
requiredAttendees: string[];
|
|
||||||
optionalAttendees: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FreeSlot {
|
|
||||||
date: string;
|
|
||||||
start: string;
|
|
||||||
end: string;
|
|
||||||
durationMinutes: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MeetingResult {
|
|
||||||
success: boolean;
|
|
||||||
subject: string;
|
|
||||||
date: string;
|
|
||||||
startTime: string;
|
|
||||||
endTime: string;
|
|
||||||
location: string;
|
|
||||||
requiredAttendees: string[];
|
|
||||||
optionalAttendees: string[];
|
|
||||||
error: string;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
export interface CalendarEvent {
|
||||||
|
subject: string;
|
||||||
|
start: string;
|
||||||
|
end: string;
|
||||||
|
location: string;
|
||||||
|
isAllDay: boolean;
|
||||||
|
isCancelled: boolean;
|
||||||
|
isMeeting: boolean;
|
||||||
|
isRecurring: boolean;
|
||||||
|
organizer: string;
|
||||||
|
organizerEmail: string;
|
||||||
|
myResponse: string;
|
||||||
|
itemId: string;
|
||||||
|
body: string;
|
||||||
|
requiredAttendees: string[];
|
||||||
|
optionalAttendees: string[];
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
export interface Email {
|
||||||
|
subject: string;
|
||||||
|
from: string;
|
||||||
|
fromName: string;
|
||||||
|
date: string;
|
||||||
|
isRead: boolean;
|
||||||
|
hasAttachments: boolean;
|
||||||
|
hasLinks: boolean;
|
||||||
|
itemId: string;
|
||||||
|
size: number;
|
||||||
|
isMeeting: boolean;
|
||||||
|
itemType: string;
|
||||||
|
to: string[];
|
||||||
|
cc: string[];
|
||||||
|
body: string;
|
||||||
|
bodyType: string;
|
||||||
|
attachments: Attachment[];
|
||||||
|
preview: string;
|
||||||
|
location?: string;
|
||||||
|
start?: string;
|
||||||
|
end?: string;
|
||||||
|
requiredAttendees?: string[];
|
||||||
|
optionalAttendees?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Attachment {
|
||||||
|
name: string;
|
||||||
|
size: number;
|
||||||
|
contentType: string;
|
||||||
|
attachmentId: string;
|
||||||
|
isInline: boolean;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export interface Folder {
|
||||||
|
name: string;
|
||||||
|
id: string;
|
||||||
|
totalCount: number;
|
||||||
|
unreadCount: number;
|
||||||
|
childFolderCount: number;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export interface FreeSlot {
|
||||||
|
date: string;
|
||||||
|
start: string;
|
||||||
|
end: string;
|
||||||
|
durationMinutes: number;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export interface LoginConfig {
|
||||||
|
serverUrl: string;
|
||||||
|
email: string;
|
||||||
|
username: string;
|
||||||
|
domain?: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
export interface MeetingResult {
|
||||||
|
success: boolean;
|
||||||
|
subject: string;
|
||||||
|
date: string;
|
||||||
|
startTime: string;
|
||||||
|
endTime: string;
|
||||||
|
location: string;
|
||||||
|
requiredAttendees: string[];
|
||||||
|
optionalAttendees: string[];
|
||||||
|
error: string;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
export interface Person {
|
||||||
|
name: string;
|
||||||
|
email: string;
|
||||||
|
mailboxType: string;
|
||||||
|
firstName: string;
|
||||||
|
lastName: string;
|
||||||
|
jobTitle: string;
|
||||||
|
department: string;
|
||||||
|
company: string;
|
||||||
|
office: string;
|
||||||
|
alias: string;
|
||||||
|
manager: string;
|
||||||
|
managerEmail: string;
|
||||||
|
phones: Record<string, string>;
|
||||||
|
address: string;
|
||||||
|
directReports: Array<{ name: string; email: string }>;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user