mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 10:56:28 +00:00
cf9e36f10a
Add calendar authentication and event/task actions, plus rich-description styling and setup documentation.
87 lines
1.9 KiB
TypeScript
87 lines
1.9 KiB
TypeScript
export interface CalendarActionResponse<T = unknown> {
|
|
success: boolean;
|
|
data?: T;
|
|
error?: string;
|
|
warning?: string;
|
|
}
|
|
|
|
export interface CalendarEventItem {
|
|
id: string;
|
|
summary: string;
|
|
description?: string;
|
|
location?: string;
|
|
start: string; // ISO String or YYYY-MM-DD (inclusive for UI)
|
|
end: string; // ISO String or YYYY-MM-DD (inclusive for UI)
|
|
isAllDay: boolean;
|
|
colorId?: string;
|
|
attendees?: string[];
|
|
hangoutLink?: string;
|
|
htmlLink?: string;
|
|
creatorEmail?: string;
|
|
createdAt?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface CreateEventInput {
|
|
summary: string;
|
|
description?: string;
|
|
location?: string;
|
|
startDateTime: string; // ISO string or YYYY-MM-DD
|
|
endDateTime: string; // ISO string or YYYY-MM-DD (inclusive from form)
|
|
isAllDay?: boolean;
|
|
colorId?: string;
|
|
attendees?: string[];
|
|
generateMeet?: boolean;
|
|
manualMeetLink?: string;
|
|
}
|
|
|
|
export interface UpdateEventInput {
|
|
summary?: string;
|
|
description?: string;
|
|
location?: string;
|
|
startDateTime?: string;
|
|
endDateTime?: string;
|
|
isAllDay?: boolean;
|
|
colorId?: string;
|
|
attendees?: string[];
|
|
generateMeet?: boolean;
|
|
manualMeetLink?: string;
|
|
}
|
|
|
|
export type TaskStatus = 'needsAction' | 'completed';
|
|
|
|
export interface CalendarTaskItem {
|
|
id: string;
|
|
title: string;
|
|
description?: string;
|
|
due: string; // ISO date/time string
|
|
status: TaskStatus;
|
|
completedAt?: string;
|
|
htmlLink?: string;
|
|
createdAt?: string;
|
|
updatedAt?: string;
|
|
}
|
|
|
|
export interface CreateTaskInput {
|
|
title: string;
|
|
description?: string;
|
|
due: string; // ISO string
|
|
status?: TaskStatus;
|
|
}
|
|
|
|
export interface UpdateTaskInput {
|
|
title?: string;
|
|
description?: string;
|
|
due?: string;
|
|
status?: TaskStatus;
|
|
}
|
|
|
|
export interface CalendarSummaryStats {
|
|
totalEvents: number;
|
|
totalTasks: number;
|
|
completedTasks: number;
|
|
pendingTasks: number;
|
|
calendarId: string;
|
|
serviceAccountEmail: string;
|
|
}
|