feat: add Group Calendar

This commit is contained in:
pa
2025-08-21 16:29:21 +09:00
committed by Natsumi
parent f1d8d554e6
commit 99e45f1980
14 changed files with 1332 additions and 27 deletions

View File

@@ -7,6 +7,10 @@ export type GetGroup = (params: {
params: { groupId: string; includeRoles?: boolean };
}>;
export type GetCalendars = (date: string) => Promise<CalendarResponse>;
export type GetFollowingCalendars = (date: string) => Promise<CalendarResponse>;
// API response types
interface GetGroupResponse {
badges: any[];
@@ -28,9 +32,51 @@ interface GetGroupResponse {
membershipStatus: string;
name: string;
onlineMemberCount: number;
// groupId
ownerId: string;
privacy: string;
rules: string;
shortCode: string;
tags: string[];
}
}
// Exported interfaces
/**
* Group calendar event object
*/
export interface GroupCalendarEvent {
accessType: 'public' | 'group' | string;
category: 'hangout' | 'education' | 'roleplaying' | string;
closeInstanceAfterEndMinutes: number;
createdAt: string;
deletedAt: string | null;
description: string;
endsAt: string;
featured: boolean;
guestEarlyJoinMinutes: number;
hostEarlyJoinMinutes: number;
id: string;
imageId: string | null;
imageUrl?: string;
interestedUserCount: number;
isDraft: boolean;
languages: string[];
ownerId: string;
platforms: string[];
roleIds: string[] | null;
startsAt: string;
tags: string[];
title: string;
type: 'event' | string;
updatedAt: string;
userInterest?: GroupCalendarUserInterest;
usesInstanceOverflow: boolean;
}
// Internal response types
interface CalendarResponse {
hasNext: boolean;
results: GroupCalendarEvent[];
totalCount: number;
}