Skip to content

Commit

Permalink
refactor(CalendarEventDTO): set Option<> as optional in TS
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDecMeetsMore committed Jan 6, 2025
1 parent 99b4f95 commit bb22498
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clients/javascript/lib/gen_types/CalendarEventDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export type CalendarEventDTO = {
/**
* Optional title of the event
*/
title: string | null
title?: string
/**
* Optional description of the event
*/
description: string | null
description?: string
/**
* Optional location of the event
*/
location: string | null
location?: string
/**
* Flag to indicate if the event is all day, default is false
*/
Expand All @@ -36,11 +36,11 @@ export type CalendarEventDTO = {
/**
* Optional parent event ID
*/
parentId: string | null
parentId?: string
/**
* Optional external ID
*/
externalId: string | null
externalId?: string
/**
* Start time of the event (UTC)
*/
Expand Down Expand Up @@ -84,7 +84,7 @@ export type CalendarEventDTO = {
/**
* Optional group ID
*/
groupId: ID | null
groupId?: ID
/**
* List of reminders
*/
Expand Down
6 changes: 6 additions & 0 deletions crates/api_structs/src/event/dtos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ pub struct CalendarEventDTO {
pub id: ID,

/// Optional title of the event
#[ts(optional)]
pub title: Option<String>,

/// Optional description of the event
#[ts(optional)]
pub description: Option<String>,

/// Optional location of the event
#[ts(optional)]
pub location: Option<String>,

/// Flag to indicate if the event is all day, default is false
Expand All @@ -34,9 +37,11 @@ pub struct CalendarEventDTO {
pub status: CalendarEventStatus,

/// Optional parent event ID
#[ts(optional)]
pub parent_id: Option<String>,

/// Optional external ID
#[ts(optional)]
pub external_id: Option<String>,

/// Start time of the event (UTC)
Expand Down Expand Up @@ -77,6 +82,7 @@ pub struct CalendarEventDTO {
pub user_id: ID,

/// Optional group ID
#[ts(optional)]
pub group_id: Option<ID>,

/// List of reminders
Expand Down

0 comments on commit bb22498

Please sign in to comment.