Skip to content

Commit

Permalink
feat: start adding infra & endpoints for groups
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDecMeetsMore committed Dec 4, 2024
1 parent a2c5078 commit a8ff76a
Show file tree
Hide file tree
Showing 26 changed files with 2,311 additions and 4 deletions.
2 changes: 2 additions & 0 deletions clients/javascript/lib/gen_types/EventGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import type { ID } from './ID'
export type EventGroup = {
id: ID
calendarId: ID
userId: ID
accountId: ID
parentId: string | null
externalId: string | null
eventIds: Array<ID>
Expand Down
4 changes: 4 additions & 0 deletions clients/javascript/lib/gen_types/SearchEventsRequestBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export type SearchEventsRequestBody = {
* Optional query on parent ID
*/
parentId?: IDQuery
/**
* Optional query on group ID
*/
groupId?: IDQuery
/**
* Optional query on start time - "lower than or equal", or "great than or equal" (UTC)
*/
Expand Down
5 changes: 5 additions & 0 deletions crates/api/src/event/search_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub async fn search_events_controller(
user_id: body.user_id,
calendar_ids: body.calendar_ids,
parent_id: body.parent_id,
group_id: body.group_id,
start_time: body.start_time,
end_time: body.end_time,
status: body.status,
Expand Down Expand Up @@ -52,6 +53,9 @@ pub struct SearchEventsUseCase {
/// Optional query on parent ID
pub parent_id: Option<IDQuery>,

/// Optional query on the group ID
pub group_id: Option<IDQuery>,

/// Optional query on start time - "lower than or equal", or "great than or equal" (UTC)
pub start_time: Option<DateTimeQuery>,

Expand Down Expand Up @@ -141,6 +145,7 @@ impl UseCase for SearchEventsUseCase {
user_id: self.user_id.clone(),
calendar_ids: self.calendar_ids.clone(),
parent_id: self.parent_id.clone(),
group_id: self.group_id.clone(),
start_time: self.start_time.clone(),
end_time: self.end_time.clone(),
status: self.status.clone(),
Expand Down
2 changes: 1 addition & 1 deletion crates/api/src/event/sync_event_reminders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async fn create_event_reminders(
}

#[async_trait::async_trait(?Send)]
impl<'a> UseCase for SyncEventRemindersUseCase<'a> {
impl UseCase for SyncEventRemindersUseCase<'_> {
type Response = ();

type Error = UseCaseError;
Expand Down
Loading

0 comments on commit a8ff76a

Please sign in to comment.